]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
f1c28a63eaa90668dcf11c9764d3b87b2fdccda2
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.3 created this file. For more info see http://www.lyx.org/
2 \lyxformat 510
3 \begin_document
4 \begin_header
5 \save_transient_properties true
6 \origin /systemlyxdir/doc/
7 \textclass scrbook
8 \begin_preamble
9 % DO NOT ALTER THIS PREAMBLE!!!
10 %
11 % This preamble is designed to ensure that the manual prints
12 % out as advertised. If you mess with this preamble,
13 % parts of the manual may not print out as expected.  If you
14 % have problems LaTeXing this file, please contact 
15 % the documentation team
16 % email: lyx-docs@lists.lyx.org
17
18 % the pages of the TOC are numbered roman
19 % and a PDF-bookmark for the TOC is added
20 \pagenumbering{roman}
21 \let\myTOC\tableofcontents
22 \renewcommand{\tableofcontents}{%
23  \pdfbookmark[1]{\contentsname}{}
24  \myTOC
25  \cleardoublepage
26  \pagenumbering{arabic}}
27
28 % extra space for tables
29 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
30 \end_preamble
31 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
32 \use_default_options false
33 \begin_modules
34 logicalmkup
35 theorems-ams
36 theorems-ams-extended
37 multicol
38 shapepar
39 \end_modules
40 \maintain_unincluded_children false
41 \language english
42 \language_package default
43 \inputencoding auto
44 \fontencoding global
45 \font_roman "lmodern" "default"
46 \font_sans "lmss" "default"
47 \font_typewriter "lmtt" "default"
48 \font_math "auto" "auto"
49 \font_default_family default
50 \use_non_tex_fonts false
51 \font_sc false
52 \font_osf false
53 \font_sf_scale 100 100
54 \font_tt_scale 100 100
55 \use_microtype false
56 \graphics default
57 \default_output_format pdf2
58 \output_sync 0
59 \bibtex_command default
60 \index_command default
61 \paperfontsize 12
62 \spacing single
63 \use_hyperref true
64 \pdf_title "LyX's Additional Features manual"
65 \pdf_author "LyX Team"
66 \pdf_subject "LyX's additional features documentation"
67 \pdf_keywords "LyX, Documentation, Additional"
68 \pdf_bookmarks true
69 \pdf_bookmarksnumbered true
70 \pdf_bookmarksopen false
71 \pdf_bookmarksopenlevel 1
72 \pdf_breaklinks false
73 \pdf_pdfborder false
74 \pdf_colorlinks true
75 \pdf_backref false
76 \pdf_pdfusetitle false
77 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
78 \papersize a4paper
79 \use_geometry false
80 \use_package amsmath 1
81 \use_package amssymb 1
82 \use_package cancel 0
83 \use_package esint 0
84 \use_package mathdots 1
85 \use_package mathtools 0
86 \use_package mhchem 1
87 \use_package stackrel 0
88 \use_package stmaryrd 0
89 \use_package undertilde 0
90 \cite_engine basic
91 \cite_engine_type default
92 \biblio_style plain
93 \use_bibtopic false
94 \use_indices false
95 \paperorientation portrait
96 \suppress_date false
97 \justification true
98 \use_refstyle 0
99 \notefontcolor #0000ff
100 \index Index
101 \shortcut idx
102 \color #008000
103 \end_index
104 \secnumdepth 3
105 \tocdepth 3
106 \paragraph_separation indent
107 \paragraph_indentation default
108 \quotes_language english
109 \papercolumns 1
110 \papersides 2
111 \paperpagestyle headings
112 \tracking_changes true
113 \output_changes false
114 \html_math_output 0
115 \html_css_as_file 0
116 \html_be_strict true
117 \author 424524441 "rgheck"
118 \author 893223064 "John Robert Hudson" j.r.hudson@virginmedia.com
119 \end_header
120
121 \begin_body
122
123 \begin_layout Title
124 Additional \SpecialChar LyX
125  Features
126 \end_layout
127
128 \begin_layout Subtitle
129 Version 2.
130 \change_inserted 424524441 1467174349
131 3
132 \change_deleted 424524441 1467174348
133 2
134 \change_unchanged
135 .x
136 \end_layout
137
138 \begin_layout Author
139 by the \SpecialChar LyX
140  Team
141 \begin_inset Foot
142 status collapsed
143
144 \begin_layout Plain Layout
145 \noindent
146 Principal maintainer of this file is
147 \noun on
148  Richard Heck
149 \noun default
150 .
151  If you have comments or error corrections, please send them to the \SpecialChar LyX
152  Documentati
153 on mailing list, 
154 \begin_inset Flex Code
155 status collapsed
156
157 \begin_layout Plain Layout
158 \noindent
159 <lyx-docs@lists.lyx.org>
160 \end_layout
161
162 \end_inset
163
164 .
165 \end_layout
166
167 \end_inset
168
169
170 \end_layout
171
172 \begin_layout Standard
173 \begin_inset CommandInset toc
174 LatexCommand tableofcontents
175
176 \end_inset
177
178
179 \end_layout
180
181 \begin_layout Chapter
182 Introduction
183 \end_layout
184
185 \begin_layout Standard
186 This manual is essentially Part II of the 
187 \emph on
188 User's Guide\SpecialChar endofsentence
189
190 \emph default
191  The reason for separating the two documents is simple: the 
192 \emph on
193 User's Guide
194 \emph default
195  is already quite lengthy, and it contains information on all of the basic
196  features one needs to know in order to prepare most documents.
197  However, the \SpecialChar LyX
198  Team has worked to make \SpecialChar LyX
199  extensible through various configuration
200  files and external packages.
201  That means that if you want to support the Fizzwizzle \SpecialChar LaTeX
202  package, you can
203  create a layout file (or module) for it without having to alter \SpecialChar LyX
204  itself.
205  We've already had contributions of several new features this way, and some
206  of them are documented here.
207  There are also some more `advanced' features, such as how to control the
208  presentation of bibliographies and how to work with multi-part documents,
209  that are not covered in the 
210 \emph on
211 User's Guide
212 \emph default
213  and are discussed here.
214 \end_layout
215
216 \begin_layout Standard
217 This manual also documents some special features, like fax support, version
218  control, and SGML support, which require additional software to work properly.
219  There is also a chapter on \SpecialChar LyX
220 's support for HTML.
221  And lastly, there's a chapter of \SpecialChar LaTeX
222  tools and tips, things you can use to
223  spruce up your documents by directly using the powerful features of \SpecialChar LaTeX
224 .
225  After all, \SpecialChar LyX
226  
227 \emph on
228 is
229 \emph default
230  only WYSIWYM and will only ever interface to some, not all, \SpecialChar LaTeX
231  features.
232 \end_layout
233
234 \begin_layout Standard
235 If you haven't read the 
236 \emph on
237 Introduction
238 \emph default
239  yet, you are definitely in the wrong manual.
240  The 
241 \emph on
242 Introduction
243 \emph default
244  is the first place to go, since it describes the notation and format of
245  all of the manuals.
246  You should also be thoroughly familiar with the 
247 \emph on
248 User's Guide
249 \emph default
250  and all of the basic features of \SpecialChar LyX
251  before attempting to read this one.
252 \end_layout
253
254 \begin_layout Standard
255 Since many of the topics in this manual depend heavily on \SpecialChar LyX
256 's interaction
257  with \SpecialChar LaTeX
258 , this first chapter covers the inner workings of \SpecialChar LyX
259  and how to direct
260  \SpecialChar LyX
261  to generate exactly the \SpecialChar LaTeX
262  code you want.
263  It is obviously for more seasoned \SpecialChar LyX
264  users.
265 \end_layout
266
267 \begin_layout Chapter
268 \SpecialChar LyX
269  and \SpecialChar LaTeX
270
271 \end_layout
272
273 \begin_layout Section
274 How \SpecialChar LyX
275  Uses \SpecialChar LaTeX
276
277 \end_layout
278
279 \begin_layout Standard
280 This chapter is for both \SpecialChar TeX
281 -nicians and the \SpecialChar LaTeX
282 -curious.
283  In it, we'll explain how \SpecialChar LyX
284  and \SpecialChar LaTeX
285  work together to produce printable output.
286  This is the only place in any of the manuals where we assume you know something
287  about \SpecialChar LaTeX
288 .
289 \end_layout
290
291 \begin_layout Standard
292 At one time, \SpecialChar LyX
293  was called a 
294 \begin_inset Quotes eld
295 \end_inset
296
297 WYSIWYM frontend to \SpecialChar LaTeX
298 ,
299 \begin_inset Quotes erd
300 \end_inset
301
302  but that's no longer true.
303  There are frontends to \SpecialChar LaTeX
304  out there.
305 \begin_inset Foot
306 status collapsed
307
308 \begin_layout Plain Layout
309 Some familar ones are \SpecialChar TeX
310 maker and kile, on Linux, and \SpecialChar TeX
311 shop, OSX.
312  There are also the \SpecialChar LaTeX
313  modes for vi and emacs, of course.
314 \end_layout
315
316 \end_inset
317
318  These are basically text editors with the ability to run \SpecialChar LaTeX
319  and mark any
320  errors in the file you're editing.
321  Although \SpecialChar LyX
322  
323 \emph on
324 is
325 \emph default
326  an editor, and it 
327 \emph on
328 does
329 \emph default
330  run \SpecialChar LaTeX
331 , and it also indicates errors in the file, it also does much, much
332  more.
333  For one thing, you don't need to know \SpecialChar LaTeX
334  to use \SpecialChar LyX
335  effectively.
336  And \SpecialChar LyX
337  has added its own extensions to \SpecialChar LaTeX
338 .
339  Try the following sometime: select 
340 \begin_inset Flex Noun
341 status collapsed
342
343 \begin_layout Plain Layout
344 Export\SpecialChar menuseparator
345 LaTeX
346 \end_layout
347
348 \end_inset
349
350  from the 
351 \begin_inset Flex Noun
352 status collapsed
353
354 \begin_layout Plain Layout
355 File
356 \end_layout
357
358 \end_inset
359
360  menu (or 
361 \begin_inset Flex Noun
362 status collapsed
363
364 \begin_layout Plain Layout
365 View\SpecialChar menuseparator
366 Source
367 \begin_inset space ~
368 \end_inset
369
370 Pane
371 \end_layout
372
373 \end_inset
374
375 ), then look at the preamble of the resulting 
376 \begin_inset Flex Code
377 status collapsed
378
379 \begin_layout Plain Layout
380 .tex
381 \end_layout
382
383 \end_inset
384
385  file.
386  You'll notice a variety of new macros defined specifically by \SpecialChar LyX
387 .
388  These macros are defined automatically, according to the features you use
389  in the document.
390 \end_layout
391
392 \begin_layout Standard
393 There are several commands that automatically invoke \SpecialChar LaTeX
394 .
395  They are:
396 \end_layout
397
398 \begin_layout Itemize
399 \begin_inset Flex Noun
400 status collapsed
401
402 \begin_layout Plain Layout
403 Document\SpecialChar menuseparator
404 View
405 \end_layout
406
407 \end_inset
408
409
410 \end_layout
411
412 \begin_layout Itemize
413 \begin_inset Flex Noun
414 status collapsed
415
416 \begin_layout Plain Layout
417 Document\SpecialChar menuseparator
418 Update
419 \end_layout
420
421 \end_inset
422
423
424 \end_layout
425
426 \begin_layout Standard
427 They will only invoke \SpecialChar LaTeX
428  if the file has changed since the last time \SpecialChar LaTeX
429  was
430  run.
431  
432 \end_layout
433
434 \begin_layout Standard
435 When \SpecialChar LyX
436  runs \SpecialChar LaTeX
437  on the file you're editing, it performs these steps:
438 \end_layout
439
440 \begin_layout Enumerate
441 Convert the document to \SpecialChar LaTeX
442  and save to a file with the extension 
443 \begin_inset Flex Code
444 status collapsed
445
446 \begin_layout Plain Layout
447 .tex
448 \end_layout
449
450 \end_inset
451
452  in place of 
453 \begin_inset Flex Code
454 status collapsed
455
456 \begin_layout Plain Layout
457 .lyx
458 \end_layout
459
460 \end_inset
461
462 .
463 \end_layout
464
465 \begin_layout Enumerate
466 Run \SpecialChar LaTeX
467  on the 
468 \begin_inset Flex Code
469 status collapsed
470
471 \begin_layout Plain Layout
472 .tex
473 \end_layout
474
475 \end_inset
476
477  file (maybe several times), and run any other commands (such as 
478 \begin_inset Flex Code
479 status collapsed
480
481 \begin_layout Plain Layout
482 bibtex
483 \end_layout
484
485 \end_inset
486
487  or 
488 \begin_inset Flex Code
489 status collapsed
490
491 \begin_layout Plain Layout
492 makeindex
493 \end_layout
494
495 \end_inset
496
497 ) needed to compile the \SpecialChar LaTeX
498  file.
499 \end_layout
500
501 \begin_layout Enumerate
502 If there are any errors, show the error log.
503 \end_layout
504
505 \begin_layout Standard
506 If you have run \SpecialChar LaTeX
507  using 
508 \begin_inset Flex Noun
509 status collapsed
510
511 \begin_layout Plain Layout
512 View\SpecialChar menuseparator
513 DVI
514 \end_layout
515
516 \end_inset
517
518 , \SpecialChar LyX
519  then runs a DVI viewer to display the DVI-file.
520  If you have used 
521 \begin_inset Flex Noun
522 status collapsed
523
524 \begin_layout Plain Layout
525 View\SpecialChar menuseparator
526 PostScript
527 \end_layout
528
529 \end_inset
530
531 , \SpecialChar LyX
532  performs further steps:
533 \end_layout
534
535 \begin_layout Itemize
536 Run 
537 \begin_inset Flex Code
538 status collapsed
539
540 \begin_layout Plain Layout
541 dvips
542 \end_layout
543
544 \end_inset
545
546  to convert the DVI file to PostScript.
547 \end_layout
548
549 \begin_layout Itemize
550 Run a PostScript viewer, such as 
551 \begin_inset Flex Code
552 status collapsed
553
554 \begin_layout Plain Layout
555 ghostview
556 \end_layout
557
558 \end_inset
559
560 , to display the PostScript file.
561 \end_layout
562
563 \begin_layout Standard
564 \SpecialChar LyX
565  does similar things when viewing, or exporting, other formats.
566 \end_layout
567
568 \begin_layout Section
569 Translating \SpecialChar LaTeX
570  files into \SpecialChar LyX
571
572 \end_layout
573
574 \begin_layout Standard
575 You can import a \SpecialChar LaTeX
576  file into \SpecialChar LyX
577  by using the 
578 \begin_inset Flex Noun
579 status collapsed
580
581 \begin_layout Plain Layout
582 File\SpecialChar menuseparator
583 Import\SpecialChar menuseparator
584 LaTeX
585 \end_layout
586
587 \end_inset
588
589  command in \SpecialChar LyX
590 .
591  This will call a program named 
592 \begin_inset Flex Code
593 status collapsed
594
595 \begin_layout Plain Layout
596 tex2lyx
597 \end_layout
598
599 \end_inset
600
601  which will create a file 
602 \begin_inset Flex Code
603 status collapsed
604
605 \begin_layout Plain Layout
606 foo.lyx
607 \end_layout
608
609 \end_inset
610
611  from the file 
612 \begin_inset Flex Code
613 status collapsed
614
615 \begin_layout Plain Layout
616 foo.tex
617 \end_layout
618
619 \end_inset
620
621 .
622  \SpecialChar LyX
623  will then open that file.
624 \begin_inset Foot
625 status collapsed
626
627 \begin_layout Plain Layout
628 \begin_inset Flex Code
629 status collapsed
630
631 \begin_layout Plain Layout
632 tex2lyx
633 \end_layout
634
635 \end_inset
636
637  can also be run from the command line, of course.
638 \end_layout
639
640 \end_inset
641
642
643 \end_layout
644
645 \begin_layout Standard
646 \begin_inset Flex Code
647 status collapsed
648
649 \begin_layout Plain Layout
650 tex2lyx
651 \end_layout
652
653 \end_inset
654
655  will translate most legal \SpecialChar LaTeX
656 , but not everything.
657  It will put things it doesn't understand into \SpecialChar TeX
658  code, so after translating
659  a file with 
660 \begin_inset Flex Code
661 status collapsed
662
663 \begin_layout Plain Layout
664 tex2lyx
665 \end_layout
666
667 \end_inset
668
669 , you can look for \SpecialChar TeX
670  code and hand-edit it until it looks right.
671 \end_layout
672
673 \begin_layout Standard
674 If you don't know what \SpecialChar TeX
675  code is, read the next section.
676 \end_layout
677
678 \begin_layout Section
679 \begin_inset CommandInset label
680 LatexCommand label
681 name "sec:Inserting-TeX-Code"
682
683 \end_inset
684
685 Inserting \SpecialChar TeX
686  Code into \SpecialChar LyX
687  Documents 
688 \end_layout
689
690 \begin_layout Standard
691 Anything you can do in \SpecialChar LaTeX
692  you can do in \SpecialChar LyX
693 , for a very simple reason: You can
694  always insert \SpecialChar TeX
695  code into any \SpecialChar LyX
696  document.
697  \SpecialChar LyX
698  cannot, and will never be able to, display every possible \SpecialChar LaTeX
699  construct.
700  If ever you need to insert \SpecialChar LaTeX
701  commands into your \SpecialChar LyX
702  document, you can use the
703  
704 \begin_inset Flex Code
705 status collapsed
706
707 \begin_layout Plain Layout
708 \SpecialChar TeX
709  Code
710 \end_layout
711
712 \end_inset
713
714  box, which you can insert into your document with 
715 \begin_inset Flex Noun
716 status collapsed
717
718 \begin_layout Plain Layout
719 Insert\SpecialChar menuseparator
720
721 \family sans
722 TeX
723 \family default
724  Code
725 \end_layout
726
727 \end_inset
728
729  or the keyboard shortcut 
730 \begin_inset Info
731 type  "shortcut"
732 arg   "ert-insert"
733 \end_inset
734
735 .
736 \end_layout
737
738 \begin_layout Standard
739 Here's an example of inserting \SpecialChar LaTeX
740  commands in a \SpecialChar LyX
741  document.
742  The code looks like this:
743 \end_layout
744
745 \begin_layout LyX-Code
746
747 \backslash
748 begin{tabular}{ll}
749 \begin_inset Newline newline
750 \end_inset
751
752
753 \backslash
754 begin{minipage}{5cm}
755 \begin_inset Newline newline
756 \end_inset
757
758 This is an example of a minipage environment.
759  You 
760 \begin_inset Newline newline
761 \end_inset
762
763 can put nearly everything in it, even (non-floating) 
764 \begin_inset Newline newline
765 \end_inset
766
767 figures and tables.
768  
769 \begin_inset Newline newline
770 \end_inset
771
772
773 \backslash
774 end{minipage}
775 \begin_inset Newline newline
776 \end_inset
777
778 &
779 \begin_inset Newline newline
780 \end_inset
781
782
783 \backslash
784 begin{minipage}{5cm}
785 \begin_inset Newline newline
786 \end_inset
787
788
789 \backslash
790 begin{verbatim}
791 \begin_inset Newline newline
792 \end_inset
793
794
795 \backslash
796 begin{minipage}{5cm}
797 \begin_inset Newline newline
798 \end_inset
799
800 This ...
801  
802 \begin_inset Newline newline
803 \end_inset
804
805
806 \backslash
807 end{minipage}
808 \begin_inset Newline newline
809 \end_inset
810
811
812 \backslash
813 end{verbatim}
814 \begin_inset Newline newline
815 \end_inset
816
817
818 \backslash
819 end{minipage}
820 \begin_inset Newline newline
821 \end_inset
822
823
824 \backslash
825 end{tabular}
826 \end_layout
827
828 \begin_layout LyX-Code
829
830 \end_layout
831
832 \begin_layout Standard
833 The 
834 \begin_inset Flex Code
835 status collapsed
836
837 \begin_layout Plain Layout
838 \SpecialChar TeX
839  Code
840 \end_layout
841
842 \end_inset
843
844  box containing this text is directly after this paragraph.
845  Those of you reading the manual in \SpecialChar LyX
846  will only see the \SpecialChar TeX
847  code inset.
848  Those reading a printed version of the manuals will see the actual results:
849 \begin_inset VSpace bigskip
850 \end_inset
851
852
853 \end_layout
854
855 \begin_layout Standard
856 \begin_inset ERT
857 status open
858
859 \begin_layout Plain Layout
860
861
862 \backslash
863 begin{tabular}{ll}
864 \end_layout
865
866 \begin_layout Plain Layout
867
868
869 \backslash
870 begin{minipage}{5cm}
871 \end_layout
872
873 \begin_layout Plain Layout
874
875 This is an example of a minipage environment.
876  You can put nearly everything in it, even (non-floating) figures and tables.
877  
878 \end_layout
879
880 \begin_layout Plain Layout
881
882
883 \backslash
884 end{minipage}
885 \end_layout
886
887 \begin_layout Plain Layout
888
889 &
890 \end_layout
891
892 \begin_layout Plain Layout
893
894
895 \backslash
896 begin{minipage}{5cm}
897 \end_layout
898
899 \begin_layout Plain Layout
900
901
902 \backslash
903 begin{verbatim}
904 \end_layout
905
906 \begin_layout Plain Layout
907
908
909 \backslash
910 begin{minipage}{5cm}
911 \end_layout
912
913 \begin_layout Plain Layout
914
915 This ...
916  
917 \end_layout
918
919 \begin_layout Plain Layout
920
921
922 \backslash
923 end{minipage}
924 \end_layout
925
926 \begin_layout Plain Layout
927
928
929 \backslash
930 end{verbatim}
931 \end_layout
932
933 \begin_layout Plain Layout
934
935
936 \backslash
937 end{minipage}
938 \end_layout
939
940 \begin_layout Plain Layout
941
942
943 \backslash
944 end{tabular}
945 \end_layout
946
947 \end_inset
948
949
950 \begin_inset VSpace bigskip
951 \end_inset
952
953
954 \end_layout
955
956 \begin_layout Standard
957 In addition to using \SpecialChar TeX
958  code, you can also create a separate file containing
959  some complex \SpecialChar LaTeX
960  structure and then use 
961 \begin_inset Flex Noun
962 status collapsed
963
964 \begin_layout Plain Layout
965 Insert\SpecialChar menuseparator
966 Child
967 \begin_inset space ~
968 \end_inset
969
970 Document
971 \end_layout
972
973 \end_inset
974
975  to include your file (you should select the type 
976 \begin_inset Flex Code
977 status collapsed
978
979 \begin_layout Plain Layout
980 Input
981 \end_layout
982
983 \end_inset
984
985 ).
986  We recommend that you only do this if you have a 
987 \begin_inset Flex Code
988 status collapsed
989
990 \begin_layout Plain Layout
991 .tex
992 \end_layout
993
994 \end_inset
995
996  file which you 
997 \emph on
998 know
999 \emph default
1000  works already.
1001  Otherwise, you'll have a big job tracking down \SpecialChar LaTeX
1002  errors.
1003 \end_layout
1004
1005 \begin_layout Standard
1006 There are a few last points to emphasize:
1007 \end_layout
1008
1009 \begin_layout Itemize
1010 \SpecialChar LyX
1011  
1012 \emph on
1013 does not
1014 \emph default
1015  check if your \SpecialChar LaTeX
1016  code is correct.
1017 \end_layout
1018
1019 \begin_layout Itemize
1020 Beware of reinventing the wheel.
1021 \end_layout
1022
1023 \begin_layout Standard
1024 On that last point, \SpecialChar LyX
1025  does have quite a few features tucked into it, and
1026  more are coming.
1027  Be sure to check the manuals to make sure that \SpecialChar LyX
1028  doesn't have such-and-such
1029  feature before you decide you have to do it by hand.
1030  Moreover, there are numerous \SpecialChar LaTeX
1031  packages out there to do all sorts of things,
1032  from labels to envelopes to fancy multipage tables.
1033  Check out 
1034 \begin_inset CommandInset href
1035 LatexCommand href
1036 name "CTAN"
1037 target "http://www.ctan.org/"
1038
1039 \end_inset
1040
1041  for details.
1042 \end_layout
1043
1044 \begin_layout Standard
1045 If you do need to do some wild and fancy things within your document, be
1046  sure to check out a good \SpecialChar LaTeX
1047  book for assistance.
1048  There are a number of them listed in the bibliography of the 
1049 \emph on
1050 User's Guide
1051 \emph default
1052 .
1053 \end_layout
1054
1055 \begin_layout Section
1056 \SpecialChar LyX
1057  and the \SpecialChar LaTeX
1058  Preamble
1059 \end_layout
1060
1061 \begin_layout Subsection
1062 About the \SpecialChar LaTeX
1063  Preamble
1064 \end_layout
1065
1066 \begin_layout Standard
1067 If you already know \SpecialChar LaTeX
1068 , there is no need to explain here what the preamble
1069  is good for.
1070  If you don't, the following will give you some ideas—we recommend again
1071  that you consult a \SpecialChar LaTeX
1072  book for further information.
1073  In any case, you should read the points below, because they explain what
1074  you can do and what you don't need to do in the \SpecialChar LaTeX
1075  preamble of a \SpecialChar LyX
1076  document.
1077 \end_layout
1078
1079 \begin_layout Standard
1080 The \SpecialChar LaTeX
1081  preamble comes at the very beginning of a document, 
1082 \emph on
1083 before
1084 \emph default
1085  the text.
1086  It serves to:
1087 \end_layout
1088
1089 \begin_layout Itemize
1090 Declare the document class.
1091  
1092 \begin_inset Newline newline
1093 \end_inset
1094
1095 \SpecialChar LyX
1096  already does this for you.
1097  If you're a seasoned \SpecialChar LaTeX
1098 -nician, and you have a custom document class you
1099  want to use, check out the 
1100 \emph on
1101 Customization Manual
1102 \emph default
1103  for information on how to make \SpecialChar LyX
1104  interface to it.
1105 \end_layout
1106
1107 \begin_layout Itemize
1108 Declare the usage of packages.
1109  
1110 \begin_inset Newline newline
1111 \end_inset
1112
1113 \SpecialChar LaTeX
1114  packages provide special commands, which are only available within a document
1115  when the package has been declared in the preamble.
1116  In addition to providing special commands, the inclusion of a package can
1117  change the document.
1118  For example, the package 
1119 \begin_inset Flex Code
1120 status collapsed
1121
1122 \begin_layout Plain Layout
1123 indentfirst
1124 \end_layout
1125
1126 \end_inset
1127
1128  forces all paragraphs to be indented.
1129  There are other packages for labels, envelopes, margins, etc.
1130  
1131 \end_layout
1132
1133 \begin_layout Itemize
1134 Set counters, variables, lengths and widths.
1135  
1136 \begin_inset Newline newline
1137 \end_inset
1138
1139 There are several \SpecialChar LaTeX
1140  counters and variables that 
1141 \emph on
1142 must
1143 \emph default
1144  be set globally from within the preamble in order to have the desired effect.
1145  (There are variables that you can set and reset inside the document, too.)
1146  Margins are a good example of something that must be set in the preamble.
1147  Another example is the label format for lists.
1148  You can actually set these just about anywhere, but it's best to do it
1149  just once, inside the preamble.
1150 \end_layout
1151
1152 \begin_layout Itemize
1153 Declare user defined commands (with 
1154 \begin_inset Flex Code
1155 status collapsed
1156
1157 \begin_layout Plain Layout
1158
1159 \backslash
1160 newcommand
1161 \end_layout
1162
1163 \end_inset
1164
1165  or 
1166 \begin_inset Flex Code
1167 status collapsed
1168
1169 \begin_layout Plain Layout
1170
1171 \backslash
1172 renewcommand
1173 \end_layout
1174
1175 \end_inset
1176
1177 ).
1178 \begin_inset Newline newline
1179 \end_inset
1180
1181 These are abbreviations for \SpecialChar LaTeX
1182  commands which appear very often inside a document.
1183  Although the preamble is a good place to declare such commands, they 
1184 \emph on
1185 can
1186 \emph default
1187  be declared anywhere (before they are used for the first time, of course).
1188  This can be useful if there is a lot of raw \SpecialChar LaTeX
1189  code in your document, which
1190  normally should not be the case.
1191 \end_layout
1192
1193 \begin_layout Standard
1194 \SpecialChar LyX
1195  adds its own set of definitions to the preamble of the 
1196 \begin_inset Flex Code
1197 status collapsed
1198
1199 \begin_layout Plain Layout
1200 .tex
1201 \end_layout
1202
1203 \end_inset
1204
1205  file it produces.
1206  This makes \SpecialChar LaTeX
1207  files generated by \SpecialChar LyX
1208  portable.
1209 \end_layout
1210
1211 \begin_layout Subsection
1212 Changing the Preamble
1213 \end_layout
1214
1215 \begin_layout Standard
1216 The commands which \SpecialChar LyX
1217  adds to the preamble of a \SpecialChar LaTeX
1218  file are fixed; you can't
1219  change them without patching \SpecialChar LyX
1220  itself.
1221  You can, however, add your own stuff to the preamble by selecting 
1222 \begin_inset Flex Noun
1223 status collapsed
1224
1225 \begin_layout Plain Layout
1226 \SpecialChar LaTeX
1227
1228 \begin_inset space ~
1229 \end_inset
1230
1231 Preamble
1232 \end_layout
1233
1234 \end_inset
1235
1236  in the 
1237 \begin_inset Flex Noun
1238 status collapsed
1239
1240 \begin_layout Plain Layout
1241 Document\SpecialChar menuseparator
1242 Settings
1243 \end_layout
1244
1245 \end_inset
1246
1247  dialog.
1248  \SpecialChar LyX
1249  adds anything in the 
1250 \begin_inset Flex Noun
1251 status collapsed
1252
1253 \begin_layout Plain Layout
1254 Preamble
1255 \end_layout
1256
1257 \end_inset
1258
1259  dialog to its own built-in preamble.
1260  Before adding your own declarations in the preamble, you should make sure
1261  that \SpecialChar LyX
1262  doesn't already support what you want to do.
1263  (Remember what we said about reinventing the wheel?) Also, 
1264 \emph on
1265 make sure your preamble code is correct
1266 \emph default
1267 .
1268  \SpecialChar LyX
1269  doesn't check it for you.
1270  If there is an error, you're likely to get an error like 
1271 \begin_inset Quotes eld
1272 \end_inset
1273
1274
1275 \begin_inset Flex Code
1276 status collapsed
1277
1278 \begin_layout Plain Layout
1279 Missing 
1280 \backslash
1281 begin{document}
1282 \end_layout
1283
1284 \end_inset
1285
1286
1287 \begin_inset Quotes erd
1288 \end_inset
1289
1290 .
1291  If you see this error, check your preamble.
1292 \end_layout
1293
1294 \begin_layout Subsection
1295 Examples
1296 \end_layout
1297
1298 \begin_layout Standard
1299 Here are some examples of what you can add to a preamble, and what they
1300  do.
1301 \end_layout
1302
1303 \begin_layout Subsubsection
1304 Example #1: Offsets
1305 \end_layout
1306
1307 \begin_layout Standard
1308 There are two variables under \SpecialChar LaTeX
1309  that control page position: 
1310 \begin_inset Flex Code
1311 status collapsed
1312
1313 \begin_layout Plain Layout
1314
1315 \backslash
1316 hoffset
1317 \end_layout
1318
1319 \end_inset
1320
1321  and 
1322 \begin_inset Flex Code
1323 status collapsed
1324
1325 \begin_layout Plain Layout
1326
1327 \backslash
1328 voffset
1329 \end_layout
1330
1331 \end_inset
1332
1333 .
1334  Their names should be self-explanatory.
1335  These variables are useful if you think for a moment about computer labels.
1336  Sometimes, the size of a print medium and the area of the medium that you
1337  can actually print on aren't the same.
1338  This is where 
1339 \begin_inset Flex Code
1340 status collapsed
1341
1342 \begin_layout Plain Layout
1343
1344 \backslash
1345 hoffset
1346 \end_layout
1347
1348 \end_inset
1349
1350  and 
1351 \begin_inset Flex Code
1352 status collapsed
1353
1354 \begin_layout Plain Layout
1355
1356 \backslash
1357 voffset
1358 \end_layout
1359
1360 \end_inset
1361
1362  come in.
1363 \end_layout
1364
1365 \begin_layout Standard
1366 The default values for 
1367 \begin_inset Flex Code
1368 status collapsed
1369
1370 \begin_layout Plain Layout
1371
1372 \backslash
1373 hoffset
1374 \end_layout
1375
1376 \end_inset
1377
1378  and 
1379 \begin_inset Flex Code
1380 status collapsed
1381
1382 \begin_layout Plain Layout
1383
1384 \backslash
1385 voffset
1386 \end_layout
1387
1388 \end_inset
1389
1390  are both 0
1391 \begin_inset space \thinspace{}
1392 \end_inset
1393
1394 points, i.
1395 \begin_inset space \thinspace{}
1396 \end_inset
1397
1398 e.
1399 \begin_inset space \space{}
1400 \end_inset
1401
1402 the page isn't shifted.
1403  Unfortunately, some DVI drivers always seem to shift the page.
1404  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1405  If you're using \SpecialChar LyX
1406  on a system that you don't personally maintain, and your
1407  sysadmin is a doofus, 
1408 \begin_inset Flex Code
1409 status collapsed
1410
1411 \begin_layout Plain Layout
1412
1413 \backslash
1414 hoffset
1415 \end_layout
1416
1417 \end_inset
1418
1419  and 
1420 \begin_inset Flex Code
1421 status collapsed
1422
1423 \begin_layout Plain Layout
1424
1425 \backslash
1426 voffset
1427 \end_layout
1428
1429 \end_inset
1430
1431  can save the day.
1432  Suppose your left and top margins are always 0.5
1433 \begin_inset space \thinspace{}
1434 \end_inset
1435
1436 inches too big.
1437  You can add this to the preamble:
1438 \end_layout
1439
1440 \begin_layout LyX-Code
1441
1442 \backslash
1443 setlength{
1444 \backslash
1445 hoffset}{-0.5 in}
1446 \end_layout
1447
1448 \begin_layout LyX-Code
1449
1450 \backslash
1451 setlength{
1452 \backslash
1453 voffset}{-0.5 in}
1454 \end_layout
1455
1456 \begin_layout Standard
1457 and your margins should now be correct.
1458 \end_layout
1459
1460 \begin_layout Subsubsection
1461 Example #2: Labels
1462 \end_layout
1463
1464 \begin_layout Standard
1465 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1466  There's a rather nice package, available at your nearest CTAN archive,
1467  for printing sheets of labels: 
1468 \begin_inset Flex Code
1469 status collapsed
1470
1471 \begin_layout Plain Layout
1472 labels.sty
1473 \end_layout
1474
1475 \end_inset
1476
1477 .
1478  Now, your system may not have this package installed by default.
1479  We leave that up to you to check.
1480  You'll also want to read the documentation for it; we're not going to do
1481  that for you.
1482  Since this is an example, however, we'll give you an example of how you
1483  use this package.
1484 \end_layout
1485
1486 \begin_layout Standard
1487 First, make sure you're using the 
1488 \begin_inset Flex Code
1489 status collapsed
1490
1491 \begin_layout Plain Layout
1492 article
1493 \end_layout
1494
1495 \end_inset
1496
1497  document class.
1498  Next, you need to put the following in your preamble:
1499 \end_layout
1500
1501 \begin_layout LyX-Code
1502
1503 \backslash
1504 usepackage{labels}
1505 \end_layout
1506
1507 \begin_layout LyX-Code
1508
1509 \backslash
1510 LabelCols=3
1511 \end_layout
1512
1513 \begin_layout LyX-Code
1514
1515 \backslash
1516 LabelRows=7
1517 \end_layout
1518
1519 \begin_layout LyX-Code
1520
1521 \backslash
1522 LeftBorder=8mm
1523 \end_layout
1524
1525 \begin_layout LyX-Code
1526
1527 \backslash
1528 RightBorder=8mm
1529 \end_layout
1530
1531 \begin_layout LyX-Code
1532
1533 \backslash
1534 TopBorder=9mm
1535 \end_layout
1536
1537 \begin_layout LyX-Code
1538
1539 \backslash
1540 BottomBorder=2mm
1541 \end_layout
1542
1543 \begin_layout Standard
1544 This sets things up for Avery label sheets, stock #5360.
1545  You're now ready to print labels, but you'll need to insert \SpecialChar LaTeX
1546  code, placing
1547  the commands 
1548 \begin_inset Flex Code
1549 status collapsed
1550
1551 \begin_layout Plain Layout
1552
1553 \backslash
1554 begin{labels}
1555 \end_layout
1556
1557 \end_inset
1558
1559  and 
1560 \begin_inset Flex Code
1561 status collapsed
1562
1563 \begin_layout Plain Layout
1564
1565 \backslash
1566 end{labels}
1567 \end_layout
1568
1569 \end_inset
1570
1571  around each label text.
1572  This and other special features of 
1573 \begin_inset Flex Code
1574 status collapsed
1575
1576 \begin_layout Plain Layout
1577 labels.sty
1578 \end_layout
1579
1580 \end_inset
1581
1582  are explained in its documentation.
1583 \end_layout
1584
1585 \begin_layout Standard
1586 Someday, someone may write a \SpecialChar LyX
1587  layout file to support this package directly.
1588  Maybe that someone is you.
1589 \end_layout
1590
1591 \begin_layout Subsubsection
1592 Example #3: Paragraph Indentation
1593 \end_layout
1594
1595 \begin_layout Standard
1596 Americans are trained to indent the first line of 
1597 \emph on
1598 every
1599 \emph default
1600  paragraph.
1601  As with all of their other weird quirks, most Americans will whine and
1602  moan until they can have their way and indent the first line of all paragraphs.
1603  (Yes, we're joking.
1604  (We are?) 
1605 \emph on
1606 Yeah
1607 \emph default
1608 , we are.)
1609 \end_layout
1610
1611 \begin_layout Standard
1612 Of course, this behavior isn't standard typography.
1613  In books, you typically only indent the first line of a paragraph 
1614 \emph on
1615 if
1616 \emph default
1617  it follows another one.
1618  The idea behind indenting the first line of a paragraph is to distinguish
1619  neighboring paragraphs from one another.
1620  If there is no previous paragraph—for example, if it follows a figure or
1621  is the first paragraph in a section—then there is no need for indentation.
1622  
1623 \end_layout
1624
1625 \begin_layout Standard
1626 If you're a typical American (we're still joking!), though, you don't care
1627  about such esoteric things; you want your indentation! Add this to the
1628  preamble:
1629 \end_layout
1630
1631 \begin_layout LyX-Code
1632
1633 \backslash
1634 usepackage{indentfirst}
1635 \end_layout
1636
1637 \begin_layout Standard
1638 If your \SpecialChar TeX
1639  distribution isn't braindead, you'll have this package, and all
1640  of your paragraphs will get the indentation the Founding Fathers intended
1641  they should have.
1642 \end_layout
1643
1644 \begin_layout Subsubsection
1645 Example #4: This Document
1646 \end_layout
1647
1648 \begin_layout Standard
1649 You can also check out the preamble of this document to get an idea of some
1650  of the advanced things you can do.
1651 \end_layout
1652
1653 \begin_layout Section
1654 \SpecialChar LyX
1655  and \SpecialChar LaTeX
1656  Errors
1657 \end_layout
1658
1659 \begin_layout Standard
1660 When \SpecialChar LyX
1661  calls \SpecialChar LaTeX
1662 , it tells \SpecialChar LaTeX
1663  to blithely ignore any errors and keep going.
1664  It then uses the logfile from the \SpecialChar LaTeX
1665  run to do a post-mortem.
1666  After analyzing the logfile, \SpecialChar LyX
1667  displays a dialog listing the errors.
1668  Clicking on any one of them will take you to the position in your \SpecialChar LyX
1669  file
1670  where the error occurred.
1671 \begin_inset Foot
1672 status collapsed
1673
1674 \begin_layout Plain Layout
1675 Well, usually.
1676  Analyzing the logfile is a tough job, and \SpecialChar LyX
1677  doesn't always go to the right
1678  line.
1679  There are also cases where \SpecialChar LaTeX
1680  reports the error on one line, but the actual
1681  error is earlier.
1682  This is not unlike forgetting a closing brace in a program: You'll get
1683  an error, but only later.
1684 \end_layout
1685
1686 \end_inset
1687
1688
1689 \end_layout
1690
1691 \begin_layout Standard
1692 Some folks also like to look at the log file directly: It is available from
1693  
1694 \begin_inset Flex Noun
1695 status collapsed
1696
1697 \begin_layout Plain Layout
1698 Document\SpecialChar menuseparator
1699 LaTeX
1700 \begin_inset space ~
1701 \end_inset
1702
1703 Log
1704 \end_layout
1705
1706 \end_inset
1707
1708 .
1709  There are some fairly common error messages and warnings.
1710  We'll cover those here.
1711  You should look at a good \SpecialChar LaTeX
1712  book for a complete listing.
1713 \end_layout
1714
1715 \begin_layout Itemize
1716 \begin_inset Flex Code
1717 status collapsed
1718
1719 \begin_layout Plain Layout
1720 LaTeX Warning
1721 \end_layout
1722
1723 \end_inset
1724
1725
1726 \begin_inset Newline newline
1727 \end_inset
1728
1729 Anything beginning with these words is a warning message for the purpose
1730  of 
1731 \begin_inset Quotes eld
1732 \end_inset
1733
1734 debugging
1735 \begin_inset Quotes erd
1736 \end_inset
1737
1738  the \SpecialChar LaTeX
1739  code itself.
1740  You'll get messages like this if you added or changed cross-references
1741  or bibliography entries, in which case, \SpecialChar LaTeX
1742  is trying to tell you that you
1743  need to make another run.
1744  You can by-and-large ignore these.
1745 \end_layout
1746
1747 \begin_layout Itemize
1748 \begin_inset Flex Code
1749 status collapsed
1750
1751 \begin_layout Plain Layout
1752 LaTeX Font Warning
1753 \end_layout
1754
1755 \end_inset
1756
1757
1758 \begin_inset Newline newline
1759 \end_inset
1760
1761 Another warning message, this time about fonts which \SpecialChar LaTeX
1762  couldn't find.
1763  The rest of the message will often say something about a replacement font
1764  that \SpecialChar LaTeX
1765  used.
1766  You can safely ignore these, too.
1767 \end_layout
1768
1769 \begin_layout Itemize
1770 \begin_inset Flex Code
1771 status collapsed
1772
1773 \begin_layout Plain Layout
1774 Overfull 
1775 \backslash
1776 hbox
1777 \end_layout
1778
1779 \end_inset
1780
1781
1782 \begin_inset Newline newline
1783 \end_inset
1784
1785 \SpecialChar LaTeX
1786  absolutely 
1787 \emph on
1788 loves
1789 \emph default
1790  to spew these out.
1791  They are warnings about lines that were too long and run past the right
1792  margin.
1793  Almost always, this is unnoticeable in the final output.
1794  (It can be just a point or two.) Or, only one or two characters extend past
1795  the margin.
1796  \SpecialChar LaTeX
1797  seems to generate at least one of these messages for just about any document
1798  you write.
1799 \begin_inset Newline newline
1800 \end_inset
1801
1802 You can ignore these messages.
1803  Your eyes will tell you if there's a problem with something that's too
1804  wide; just look at the output.
1805 \begin_inset Foot
1806 status collapsed
1807
1808 \begin_layout Plain Layout
1809 You can also enable the `draft' option in 
1810 \begin_inset Flex Noun
1811 status collapsed
1812
1813 \begin_layout Plain Layout
1814 Document\SpecialChar menuseparator
1815 Settings
1816 \end_layout
1817
1818 \end_inset
1819
1820 , and then \SpecialChar LaTeX
1821  will draw a black box in the margin of lines that are overfull.
1822 \end_layout
1823
1824 \end_inset
1825
1826
1827 \end_layout
1828
1829 \begin_layout Itemize
1830 \begin_inset Flex Code
1831 status collapsed
1832
1833 \begin_layout Plain Layout
1834 Underfull 
1835 \backslash
1836 hbox
1837 \end_layout
1838
1839 \end_inset
1840
1841
1842 \begin_inset Newline newline
1843 \end_inset
1844
1845 Not quite as common as its cousin.
1846  \SpecialChar LaTeX
1847  seems to like to print lines that are a bit too wide as opposed to ones
1848  that are a bit too narrow.
1849  We have no idea why.
1850 \end_layout
1851
1852 \begin_layout Itemize
1853 \begin_inset Flex Code
1854 status collapsed
1855
1856 \begin_layout Plain Layout
1857 Overfull 
1858 \backslash
1859 vbox
1860 \end_layout
1861
1862 \end_inset
1863
1864  and 
1865 \begin_inset Flex Code
1866 status collapsed
1867
1868 \begin_layout Plain Layout
1869 Underfull 
1870 \backslash
1871 vbox
1872 \end_layout
1873
1874 \end_inset
1875
1876
1877 \begin_inset Newline newline
1878 \end_inset
1879
1880 Warnings about troubles breaking the page.
1881  Once again, just look at the output.
1882  Your eyes will tell you where something has gone wrong.
1883 \end_layout
1884
1885 \begin_layout Itemize
1886 \begin_inset Flex Code
1887 status collapsed
1888
1889 \begin_layout Plain Layout
1890 LaTeX Error: File 
1891 \begin_inset Quotes els
1892 \end_inset
1893
1894 Xxxx
1895 \begin_inset Quotes ers
1896 \end_inset
1897
1898  not found
1899 \end_layout
1900
1901 \end_inset
1902
1903
1904 \begin_inset Newline newline
1905 \end_inset
1906
1907 The file 
1908 \begin_inset Quotes eld
1909 \end_inset
1910
1911 Xxxx
1912 \begin_inset Quotes erd
1913 \end_inset
1914
1915  isn't installed on this system.
1916  This usually appears because some package your document needs isn't installed.
1917  If you didn't touch the preamble or didn't use the 
1918 \begin_inset Flex Code
1919 status collapsed
1920
1921 \begin_layout Plain Layout
1922
1923 \backslash
1924 usepackage{}
1925 \end_layout
1926
1927 \end_inset
1928
1929  command, then one of the packages \SpecialChar LyX
1930  tried to load is missing.
1931  Use 
1932 \begin_inset Flex Noun
1933 status collapsed
1934
1935 \begin_layout Plain Layout
1936 Help\SpecialChar menuseparator
1937 \SpecialChar LaTeX
1938  Configuration
1939 \end_layout
1940
1941 \end_inset
1942
1943  to get a list of packages that \SpecialChar LyX
1944  knows about.
1945  This file is updated whenever you reconfigure \SpecialChar LyX
1946  (using 
1947 \begin_inset Flex Noun
1948 status collapsed
1949
1950 \begin_layout Plain Layout
1951 Tools\SpecialChar menuseparator
1952 Reconfigure
1953 \end_layout
1954
1955 \end_inset
1956
1957 ) and tells you which packages have been detected and what they do.
1958 \begin_inset Newline newline
1959 \end_inset
1960
1961 If you did use the 
1962 \begin_inset Flex Code
1963 status collapsed
1964
1965 \begin_layout Plain Layout
1966
1967 \backslash
1968 usepackage{}
1969 \end_layout
1970
1971 \end_inset
1972
1973  command and the package in question isn't installed, then you'll need to
1974  install it yourself.
1975 \end_layout
1976
1977 \begin_layout Itemize
1978 \begin_inset Flex Code
1979 status collapsed
1980
1981 \begin_layout Plain Layout
1982 LaTeX Error: Unknown option
1983 \end_layout
1984
1985 \end_inset
1986
1987
1988 \begin_inset Newline newline
1989 \end_inset
1990
1991 Error messages beginning with this are trying to tell you that you specified
1992  a bad or undefined option to a package.
1993  Check the package's documentation.
1994 \end_layout
1995
1996 \begin_layout Itemize
1997 \begin_inset Flex Code
1998 status collapsed
1999
2000 \begin_layout Plain Layout
2001 Undefined control sequence
2002 \end_layout
2003
2004 \end_inset
2005
2006
2007 \begin_inset Newline newline
2008 \end_inset
2009
2010 If you've inserted \SpecialChar LaTeX
2011  code into your document, but made a typo, you'll get
2012  one of these.
2013  You may have forgotten to load a package.
2014  In any case, this error message usually means that you used an undefined
2015  command.
2016  
2017 \end_layout
2018
2019 \begin_layout Standard
2020 There are other error and warning messages.
2021  Some are self-explanatory.
2022  These are usually \SpecialChar LaTeX
2023  messages.
2024  Others are downright cryptic.
2025  These are usually \SpecialChar TeX
2026  error messages, and we really have 
2027 \emph on
2028 no clue
2029 \emph default
2030  what they mean or how to decipher them.
2031  No-one does.
2032 \end_layout
2033
2034 \begin_layout Standard
2035 There's a general sequence you should follow if you get error messages:
2036 \end_layout
2037
2038 \begin_layout Enumerate
2039 Look at the \SpecialChar LaTeX
2040  code you inserted for typos.
2041 \end_layout
2042
2043 \begin_layout Enumerate
2044 If there are no typos, check that you used the command(s) correctly.
2045 \end_layout
2046
2047 \begin_layout Enumerate
2048 If you get a bunch of error boxes piled up at the very top of the document—and
2049  especially if you see a 
2050 \begin_inset Quotes eld
2051 \end_inset
2052
2053
2054 \begin_inset Flex Code
2055 status collapsed
2056
2057 \begin_layout Plain Layout
2058 Missing 
2059 \backslash
2060 begin{document}
2061 \end_layout
2062
2063 \end_inset
2064
2065
2066 \begin_inset Quotes erd
2067 \end_inset
2068
2069  error—it means that there are errors in the preamble.
2070  Start debugging your preamble.
2071 \end_layout
2072
2073 \begin_layout Enumerate
2074 If you didn't add anything to the preamble and didn't add any \SpecialChar LaTeX
2075  code to the
2076  document, the first suspect is your \SpecialChar LaTeX
2077  distribution itself.
2078  Check for missing packages and install them.
2079 \end_layout
2080
2081 \begin_layout Enumerate
2082 Okay, so there are no missing packages.
2083  Did you use any of the fine-tuning options in \SpecialChar LyX
2084 ? Specifically, did you 
2085 \emph on
2086 misuse
2087 \emph default
2088  any of them, like trying to manually insert lots of 
2089 \begin_inset Flex Code
2090 status collapsed
2091
2092 \begin_layout Plain Layout
2093 Protected
2094 \begin_inset space ~
2095 \end_inset
2096
2097 Blanks
2098 \end_layout
2099
2100 \end_inset
2101
2102
2103 \begin_inset Flex Code
2104 status collapsed
2105
2106 \begin_layout Plain Layout
2107 Linebreaks
2108 \end_layout
2109
2110 \end_inset
2111
2112 , or 
2113 \begin_inset Flex Code
2114 status collapsed
2115
2116 \begin_layout Plain Layout
2117 Pagebreaks
2118 \end_layout
2119
2120 \end_inset
2121
2122 ? Did you try to kludge something together with these instead of using the
2123  appropriate paragraph environment?
2124 \end_layout
2125
2126 \begin_layout Enumerate
2127 All right, you didn't use any of the fine-tuning options, you played by
2128  the rules.
2129  Did you try to pull a fancy maneuver? Did you do something funky inside
2130  a table or an equation, like inserting a graphic into a table cell?
2131 \end_layout
2132
2133 \begin_layout Enumerate
2134 Do you have long sections of text where \SpecialChar LaTeX
2135  cannot find a place to break a
2136  line? By default, \SpecialChar LaTeX
2137  is rather strict about how much extra inter-word spacing
2138  it will add in order to break a line.
2139  Preferably, you should rework the paragraph to avoid the problem.
2140 \end_layout
2141
2142 \begin_layout Enumerate
2143 Did you go overboard with the nesting? \SpecialChar LyX
2144  (currently) doesn't check to make
2145  sure you're in the limits for nesting environments.
2146  If you nested a bunch of environments to the 
2147 \begin_inset Formula $17^{\mathrm{th}}$
2148 \end_inset
2149
2150  level, that's the problem.
2151  (The limit in \SpecialChar LaTeX
2152  is five.)
2153 \end_layout
2154
2155 \begin_layout Enumerate
2156 Okay, you didn't get any error messages, but your output looks awful.
2157  If you have a table or figure that's too wide or long for the page, you
2158  need to:
2159 \begin_inset Separator latexpar
2160 \end_inset
2161
2162
2163 \end_layout
2164
2165 \begin_deeper
2166 \begin_layout Enumerate
2167 rescale the figure so it fits.
2168 \end_layout
2169
2170 \begin_layout Enumerate
2171 trim down the table so it fits.
2172 \end_layout
2173
2174 \end_deeper
2175 \begin_layout Enumerate
2176 If something else is wrong with the output, and you didn't try to pull anything
2177  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2178 \end_layout
2179
2180 \begin_layout Standard
2181 If all this doesn't help—well, then 
2182 \emph on
2183 perhaps
2184 \emph default
2185  you might have found a bug in \SpecialChar LyX
2186 \SpecialChar ldots
2187 .
2188 \end_layout
2189
2190 \begin_layout Chapter
2191
2192 \change_inserted 893223064 1464851738
2193 Document classes
2194 \end_layout
2195
2196 \begin_layout Standard
2197
2198 \change_inserted 893223064 1464852146
2199 This section will be updated in due course.
2200 \end_layout
2201
2202 \begin_layout Standard
2203 Special Document Classes
2204 \end_layout
2205
2206 \begin_layout Section
2207 A&A Paper
2208 \end_layout
2209
2210 \begin_layout Standard
2211 by 
2212 \noun on
2213 Peter Sütterlin
2214 \end_layout
2215
2216 \begin_layout Subsection
2217 Introduction
2218 \end_layout
2219
2220 \begin_layout Standard
2221 This section describes how \SpecialChar LyX
2222  can be used to write articles for submission
2223  to the scientific journal 
2224 \emph on
2225 Astronomy and Astrophysics
2226 \emph default
2227  (
2228 \begin_inset Flex URL
2229 status collapsed
2230
2231 \begin_layout Plain Layout
2232
2233 http://www.edpsciences.fr/aa/
2234 \end_layout
2235
2236 \end_inset
2237
2238 ) using Version 5.01 of the document class 
2239 \family typewriter
2240 aa.cls
2241 \family default
2242 .
2243  This package can be downloaded from the ftp site
2244 \end_layout
2245
2246 \begin_layout Standard
2247 \begin_inset VSpace medskip
2248 \end_inset
2249
2250
2251 \end_layout
2252
2253 \begin_layout Standard
2254 \align center
2255 \begin_inset Flex URL
2256 status collapsed
2257
2258 \begin_layout Plain Layout
2259
2260 ftp://ftp.edpsciences.org/pub/aa/readme.html
2261 \end_layout
2262
2263 \end_inset
2264
2265
2266 \end_layout
2267
2268 \begin_layout Standard
2269 \begin_inset VSpace medskip
2270 \end_inset
2271
2272
2273 \end_layout
2274
2275 \begin_layout Standard
2276 A manual comes together with that package, and this text is not meant to
2277  replace the original manual but is merely a short guide in how to realize
2278  the correct form of your paper.
2279  
2280 \end_layout
2281
2282 \begin_layout Standard
2283 Please note that the publisher of the journal was changed from Springer
2284  to EDP Sciences starting January 1, 2001.
2285  That change involved also some slight changes to the style files, namely
2286  the removal of the thesaurus command.
2287  The \SpecialChar LyX
2288  class aa supports the newest version of these style files, V 5.01.
2289  If you have an older version installed, please upgrade.
2290  For compatibility, the old (version 4) layout has been kept as 
2291 \family sans
2292 article (A&A V4)
2293 \family default
2294 .
2295  Please refer to the comments in 
2296 \family typewriter
2297 \SpecialChar LyX
2298 Dir/layouts/aapaper.layout
2299 \family default
2300 .
2301 \end_layout
2302
2303 \begin_layout Subsection
2304 Getting started
2305 \end_layout
2306
2307 \begin_layout Standard
2308 It is recommended you start from the example template distributed with \SpecialChar LyX
2309 .
2310  If you are not using a template, note the following settings:
2311 \end_layout
2312
2313 \begin_layout Itemize
2314 Select 
2315 \family sans
2316 article (A&A)
2317 \family default
2318  in the 
2319 \family sans
2320 Document\SpecialChar menuseparator
2321 Settings
2322 \family default
2323  dialog (OK, that one was obvious).
2324 \end_layout
2325
2326 \begin_layout Itemize
2327 Don't change the option 
2328 \family sans
2329 Page
2330 \begin_inset space ~
2331 \end_inset
2332
2333 style
2334 \family default
2335 : Leave it set to 
2336 \family sans
2337 default
2338 \family default
2339 .
2340  The whole layout is done by the macros, you shouldn't change anything.
2341 \end_layout
2342
2343 \begin_layout Subsection
2344 The header block
2345 \end_layout
2346
2347 \begin_layout Standard
2348 First thing to enter is the header information.
2349  It consists of seven entries, of which some are optional.
2350  They are
2351 \end_layout
2352
2353 \begin_layout Itemize
2354
2355 \family sans
2356 Title
2357 \family default
2358 : [required] 
2359 \end_layout
2360
2361 \begin_layout Itemize
2362
2363 \family sans
2364 Subtitle
2365 \family default
2366 : [optional] 
2367 \end_layout
2368
2369 \begin_layout Itemize
2370
2371 \family sans
2372 Author
2373 \family default
2374 : [required]
2375 \end_layout
2376
2377 \begin_layout Itemize
2378
2379 \family sans
2380 Address
2381 \family default
2382 : [required]
2383 \end_layout
2384
2385 \begin_layout Itemize
2386
2387 \family sans
2388 Offprints
2389 \family default
2390 : [optional] if more than one author: whom to contact for offprint requests.
2391 \end_layout
2392
2393 \begin_layout Itemize
2394
2395 \family sans
2396 Mail
2397 \family default
2398 : [optional] mail address for contacts.
2399 \end_layout
2400
2401 \begin_layout Itemize
2402
2403 \family sans
2404 Date
2405 \family default
2406 : [required].
2407  Suggested format is 
2408 \family typewriter
2409 Received: <date>; Accepted <date> 
2410 \end_layout
2411
2412 \begin_layout Standard
2413 There is no need to issue the 
2414 \family typewriter
2415
2416 \backslash
2417 maketitle
2418 \family default
2419  command, this is done automatically by \SpecialChar LyX
2420  when the header is finished.
2421  Although the order of the single header entries doesn't matter it is advised
2422  to keep the above sequence, just to get the best optics and meets the layout
2423  of the real document.
2424 \end_layout
2425
2426 \begin_layout Standard
2427 If you want to place footnotes in the header block, e.
2428 \begin_inset space \thinspace{}
2429 \end_inset
2430
2431 g.
2432 \begin_inset space \space{}
2433 \end_inset
2434
2435 to state your present address, just use the standard footnote via the menu
2436  
2437 \family sans
2438 Insert\SpecialChar menuseparator
2439 Footnote.
2440
2441 \family default
2442  \SpecialChar LyX
2443  will automagically use the term 
2444 \family typewriter
2445
2446 \backslash
2447 thanks{}
2448 \family default
2449  in that case.
2450 \end_layout
2451
2452 \begin_layout Standard
2453 In addition to these topics, the macros use three additional \SpecialChar LaTeX
2454  commands that
2455  have no counterpart in \SpecialChar LyX
2456 :
2457 \end_layout
2458
2459 \begin_layout Itemize
2460
2461 \family typewriter
2462
2463 \backslash
2464 and
2465 \family default
2466  to separate different names for more than one author and institute, respectivel
2467 y.
2468 \end_layout
2469
2470 \begin_layout Itemize
2471
2472 \family typewriter
2473
2474 \backslash
2475 inst{<nr>}
2476 \family default
2477 to mark corresponding author/institute pairs.
2478  The institutes are numbered sequentially as they appear in the 
2479 \family sans
2480 Address
2481 \family default
2482  field, so you have to put a marker to each author.
2483 \end_layout
2484
2485 \begin_layout Itemize
2486
2487 \family typewriter
2488
2489 \backslash
2490 email{address}
2491 \family default
2492  to supply an email address for fast contact.
2493 \end_layout
2494
2495 \begin_layout Standard
2496 In all cases, the appropriate command has to be entered in \SpecialChar LyX
2497  and marked as
2498  \SpecialChar LaTeX
2499  code.
2500  See the examples.
2501  
2502 \end_layout
2503
2504 \begin_layout Subsection
2505 The abstract
2506 \end_layout
2507
2508 \begin_layout Standard
2509 The abstract should immediately follow the header block.
2510  With version 5 the abstract environment was changed to a command, and there
2511  is now a resctriction to only one paragraph.
2512  In addition, it should contain an entry with the keywords.
2513  This is not yet implemented for \SpecialChar LyX
2514 , therefore you have to enter the \SpecialChar LaTeX
2515  command
2516  
2517 \family typewriter
2518
2519 \backslash
2520 keywords{}
2521 \family default
2522  by hand and mark it as \SpecialChar LaTeX
2523  code.
2524  Refer to the example paper.
2525 \end_layout
2526
2527 \begin_layout Subsection
2528 Supported environments
2529 \end_layout
2530
2531 \begin_layout Standard
2532 The A&A paper layout supports the following environments for structuring
2533  your text:
2534 \end_layout
2535
2536 \begin_layout Itemize
2537
2538 \family sans
2539 Standard
2540 \end_layout
2541
2542 \begin_layout Itemize
2543
2544 \family sans
2545 Section
2546 \end_layout
2547
2548 \begin_layout Itemize
2549
2550 \family sans
2551 Subsection
2552 \end_layout
2553
2554 \begin_layout Itemize
2555
2556 \family sans
2557 Subsubsection
2558 \end_layout
2559
2560 \begin_layout Itemize
2561
2562 \family sans
2563 Itemize
2564 \end_layout
2565
2566 \begin_layout Itemize
2567
2568 \family sans
2569 Enumerate
2570 \end_layout
2571
2572 \begin_layout Itemize
2573
2574 \family sans
2575 Description
2576 \end_layout
2577
2578 \begin_layout Itemize
2579
2580 \family sans
2581 Caption
2582 \end_layout
2583
2584 \begin_layout Itemize
2585
2586 \family sans
2587 Abstract
2588 \end_layout
2589
2590 \begin_layout Itemize
2591
2592 \family sans
2593 Acknowledgment
2594 \end_layout
2595
2596 \begin_layout Itemize
2597
2598 \family sans
2599 Bibliography
2600 \end_layout
2601
2602 \begin_layout Itemize
2603
2604 \family sans
2605 \SpecialChar LaTeX
2606
2607 \end_layout
2608
2609 \begin_layout Subsection
2610 Commands not supported by \SpecialChar LyX
2611
2612 \end_layout
2613
2614 \begin_layout Standard
2615 Some commands are not yet supported by the 
2616 \family sans
2617 paper (A&A)
2618 \family default
2619  layout for \SpecialChar LyX
2620 .
2621  Some have already been mentioned.
2622  For the sake of completeness, they are listed all together here:
2623 \end_layout
2624
2625 \begin_layout Itemize
2626
2627 \family typewriter
2628
2629 \backslash
2630 and
2631 \end_layout
2632
2633 \begin_layout Itemize
2634
2635 \family typewriter
2636
2637 \backslash
2638 email
2639 \end_layout
2640
2641 \begin_layout Itemize
2642
2643 \family typewriter
2644
2645 \backslash
2646 appendix
2647 \end_layout
2648
2649 \begin_layout Itemize
2650
2651 \family typewriter
2652
2653 \backslash
2654 authorrunning
2655 \end_layout
2656
2657 \begin_layout Itemize
2658
2659 \family typewriter
2660
2661 \backslash
2662 inst{}
2663 \end_layout
2664
2665 \begin_layout Itemize
2666
2667 \family typewriter
2668
2669 \backslash
2670 keywords{}
2671 \end_layout
2672
2673 \begin_layout Itemize
2674
2675 \family typewriter
2676
2677 \backslash
2678 object{}
2679 \end_layout
2680
2681 \begin_layout Itemize
2682
2683 \family typewriter
2684
2685 \backslash
2686 titlerunning{}
2687 \end_layout
2688
2689 \begin_layout Standard
2690 If you want to use any of these commands, you have to enter them yourself.
2691  
2692 \series bold
2693 Do not forget to mark them as \SpecialChar LaTeX
2694  code!
2695 \end_layout
2696
2697 \begin_layout Subsection
2698 Figure and Table Floats
2699 \end_layout
2700
2701 \begin_layout Standard
2702 \SpecialChar LyX
2703  provides support for the necessary float environments 
2704 \family sans
2705 figure, figure*, table
2706 \family default
2707  and 
2708 \family sans
2709 table*
2710 \family default
2711 , therefore we won't tell much about it here.
2712  Refer to the 
2713 \emph on
2714 User's
2715 \begin_inset space ~
2716 \end_inset
2717
2718 Guide
2719 \emph default
2720 .
2721  Just remember that tables should be left-aligned.
2722  For that, select the table and change the alignment in 
2723 \family sans
2724 Edit\SpecialChar menuseparator
2725 Paragraph
2726 \begin_inset space ~
2727 \end_inset
2728
2729 Settings.
2730 \end_layout
2731
2732 \begin_layout Standard
2733 There is only one special thing: the figures with caption besides the figure.
2734  To create such a figure, you have to do the following:
2735 \end_layout
2736
2737 \begin_layout Enumerate
2738 Create a wide figure float: 
2739 \family sans
2740 Insert\SpecialChar menuseparator
2741 Float\SpecialChar menuseparator
2742 Figure
2743 \family default
2744 , then right click in the figure and select 
2745 \family sans
2746 Span
2747 \begin_inset space ~
2748 \end_inset
2749
2750 columns
2751 \family default
2752 .
2753 \end_layout
2754
2755 \begin_layout Enumerate
2756 Enter your caption text.
2757 \end_layout
2758
2759 \begin_layout Enumerate
2760 Press 
2761 \family sans
2762 Return
2763 \family default
2764  to move the cursor above the caption.
2765 \end_layout
2766
2767 \begin_layout Enumerate
2768 Insert your figure
2769 \end_layout
2770
2771 \begin_layout Enumerate
2772 Position the cursor behind the figure and insert a horizontal fill: 
2773 \family sans
2774 Insert\SpecialChar menuseparator
2775 Special
2776 \begin_inset space ~
2777 \end_inset
2778
2779 Character\SpecialChar menuseparator
2780 Horizontal
2781 \begin_inset space ~
2782 \end_inset
2783
2784 Fill
2785 \family default
2786 .
2787 \end_layout
2788
2789 \begin_layout Enumerate
2790 Switch to \SpecialChar LaTeX
2791  mode: 
2792 \family sans
2793 M-c
2794 \begin_inset space ~
2795 \end_inset
2796
2797 t
2798 \family default
2799 .
2800 \end_layout
2801
2802 \begin_layout Enumerate
2803 Enter 
2804 \family typewriter
2805
2806 \backslash
2807 parbox[b]{55mm}{
2808 \family default
2809 .
2810  
2811 \series bold
2812 Do not close the brace!
2813 \end_layout
2814
2815 \begin_layout Enumerate
2816 Position the cursor behind the caption text, switch to \SpecialChar LaTeX
2817  mode and insert
2818  the closing brace: 
2819 \family sans
2820 M-c
2821 \begin_inset space ~
2822 \end_inset
2823
2824 t
2825 \family default
2826  
2827 \family typewriter
2828 }
2829 \family default
2830 .
2831 \end_layout
2832
2833 \begin_layout Standard
2834 Also, refer to the figures in the example paper.
2835 \end_layout
2836
2837 \begin_layout Subsection
2838 Referee layout
2839 \end_layout
2840
2841 \begin_layout Standard
2842 For submission, the paper has to be formated in a special double-spacing
2843  layout.
2844  For this purpose, you have to give the option 
2845 \family typewriter
2846 referee
2847 \family default
2848  to the documentclass.
2849  This must be done using the extra class options field in the 
2850 \family sans
2851 Document\SpecialChar menuseparator
2852 Settings
2853 \family default
2854  dialog.
2855  Just enter the string 
2856 \family typewriter
2857 referee
2858 \family default
2859  there.
2860 \end_layout
2861
2862 \begin_layout Subsection
2863 The example paper
2864 \end_layout
2865
2866 \begin_layout Standard
2867 The 
2868 \family sans
2869 Examples
2870 \family default
2871  directory contains an example paper written with \SpecialChar LyX
2872 .
2873  It is the example paper from the original macro package, translated to
2874  \SpecialChar LyX
2875 .
2876  Use it for inspiration, and compare the original \SpecialChar LaTeX
2877  code with \SpecialChar LyX
2878  way of writing.
2879 \end_layout
2880
2881 \begin_layout Section
2882 AAS\SpecialChar TeX
2883
2884 \end_layout
2885
2886 \begin_layout Standard
2887 by 
2888 \noun on
2889 Mike Ressler
2890 \end_layout
2891
2892 \begin_layout Subsection
2893 Introduction
2894 \end_layout
2895
2896 \begin_layout Standard
2897 AAS\SpecialChar TeX
2898  is a set of macros produced by the American Astronomical Society to
2899  facilitate electronic manuscript submission to the three journals they
2900  publish: the Astrophysical Journal (including the Letters and Supplement),
2901  the Astronomical Journal, and the Publications of the Astronomical Society
2902  of the Pacific.
2903  \SpecialChar LyX
2904  has proven to be an excellent tool for generating these documents, especially
2905  given its equation, citation, and figure handling capabilities.
2906  \SpecialChar LyX
2907  requires version 5.0 (or higher) of these macros; preferably 5.2, which
2908  is the version described here, or higher.
2909  Versions prior to 5.0 are intended for use with \SpecialChar LaTeX
2910 2.09 and are fundamentally
2911  incompatible with \SpecialChar LyX
2912 .
2913  The AAS\SpecialChar TeX
2914  package may be downloaded from the AAS\SpecialChar TeX
2915  Web site
2916 \end_layout
2917
2918 \begin_layout Standard
2919 \begin_inset VSpace medskip
2920 \end_inset
2921
2922
2923 \end_layout
2924
2925 \begin_layout Standard
2926 \align center
2927 \begin_inset Flex URL
2928 status collapsed
2929
2930 \begin_layout Plain Layout
2931
2932 https://aas.org/aastex/aastex-downloads
2933 \end_layout
2934
2935 \end_inset
2936
2937
2938 \end_layout
2939
2940 \begin_layout Standard
2941 \begin_inset VSpace medskip
2942 \end_inset
2943
2944
2945 \end_layout
2946
2947 \begin_layout Standard
2948 A complete user guide is contained in that package and you should familiarize
2949  yourself with it thoroughly before embarking on writing a paper in \SpecialChar LyX
2950 .
2951  \SpecialChar LyX
2952  will not reduce the need to figure out all the AAS\SpecialChar TeX
2953  commands, it will only
2954  reduce the drudgery of typing everything in.
2955  It is your responsibility to ensure that the final exported \SpecialChar LaTeX
2956  document conforms
2957  completely to the requirements of the journal to which you are submitting
2958  your paper.
2959 \end_layout
2960
2961 \begin_layout Subsection
2962 Starting a New Paper
2963 \end_layout
2964
2965 \begin_layout Standard
2966 I strongly suggest that you start with the AAS\SpecialChar TeX
2967  template file.
2968  Click on 
2969 \family sans
2970 File\SpecialChar menuseparator
2971 New from
2972 \family default
2973  
2974 \family sans
2975 Template
2976 \family default
2977 , enter the new file name, then choose the 
2978 \family typewriter
2979 aastex.lyx
2980 \family default
2981  template.
2982  This will show the most common fields found in a manuscript.
2983  Simply overwrite the existing text (including the brackets, 
2984 \family typewriter
2985 <>
2986 \family default
2987 ) with the correct information.
2988  Many of the AAS\SpecialChar TeX
2989  commands and environments can be implemented directly in
2990  \SpecialChar LyX
2991 , but some cannot: most noticeably 
2992 \family typewriter
2993
2994 \backslash
2995 altaffilmark
2996 \family default
2997  and 
2998 \family typewriter
2999
3000 \backslash
3001 altaffiltext
3002 \family default
3003 , which should stick out like a sore thumb if you actually just opened the
3004  template file.
3005  For commands such as these, the \SpecialChar LaTeX
3006  code must be entered directly and marked
3007  as such.
3008  Such commands are referred to as \SpecialChar TeX
3009  code, or Evil Red Text.
3010  I tried to minimize the amount of \SpecialChar TeX
3011  code needed in an AAS\SpecialChar TeX
3012  document, but
3013  there is still a bit more required than any of us would like.
3014 \end_layout
3015
3016 \begin_layout Subsection
3017 Finishing Your Paper
3018 \end_layout
3019
3020 \begin_layout Standard
3021 When the paper is finished to your satisfaction and previews/prints correctly,
3022  there are a few 
3023 \begin_inset Quotes eld
3024 \end_inset
3025
3026 postprocessing
3027 \begin_inset Quotes erd
3028 \end_inset
3029
3030  actions which need to be done before you submit it to the journals.
3031  
3032 \end_layout
3033
3034 \begin_layout Enumerate
3035 Export your paper as a \SpecialChar LaTeX
3036  file (
3037 \family sans
3038 File\SpecialChar menuseparator
3039 Export\SpecialChar menuseparator
3040 \SpecialChar LaTeX
3041
3042 \family default
3043 ).
3044  
3045 \end_layout
3046
3047 \begin_layout Enumerate
3048 Edit the resulting 
3049 \family typewriter
3050 .tex
3051 \family default
3052  file with your favorite text editor
3053 \begin_inset Separator latexpar
3054 \end_inset
3055
3056
3057 \end_layout
3058
3059 \begin_deeper
3060 \begin_layout Enumerate
3061 remove the comment lines before the 
3062 \family typewriter
3063
3064 \backslash
3065 documentclass
3066 \family default
3067  command
3068 \end_layout
3069
3070 \begin_layout Enumerate
3071 remove the 
3072 \family typewriter
3073
3074 \backslash
3075 usepackage...{fontenc}
3076 \family default
3077  line if it appears (usually just after 
3078 \family typewriter
3079
3080 \backslash
3081 documentclass
3082 \family default
3083 }; also remove the 
3084 \family typewriter
3085
3086 \backslash
3087 secnumdepth
3088 \family default
3089  line if it appears.
3090 \end_layout
3091
3092 \begin_layout Enumerate
3093 remove everything between (and including) the 
3094 \family typewriter
3095
3096 \backslash
3097 makeatletter
3098 \family default
3099  and 
3100 \family typewriter
3101
3102 \backslash
3103 makeatother
3104 \family default
3105  commands, except for any commands you specifically put into the \SpecialChar LaTeX
3106  preamble
3107  (which should appear immediately after the 
3108 \begin_inset Quotes eld
3109 \end_inset
3110
3111 User specified \SpecialChar LaTeX
3112  commands
3113 \begin_inset Quotes erd
3114 \end_inset
3115
3116  comment in the 
3117 \family typewriter
3118 .tex
3119 \family default
3120  file).
3121 \end_layout
3122
3123 \end_deeper
3124 \begin_layout Enumerate
3125 Run the resulting file through \SpecialChar LaTeX
3126  to make sure it still processes correctly.
3127 \end_layout
3128
3129 \begin_layout Enumerate
3130 Reread the journal requirements to make sure your filenames and formats
3131  are correct.
3132 \end_layout
3133
3134 \begin_layout Enumerate
3135 Submit it.
3136 \end_layout
3137
3138 \begin_layout Subsection
3139 Comments On Specific Commands
3140 \end_layout
3141
3142 \begin_layout Standard
3143 I will not describe the detailed usage of the individual AAS\SpecialChar TeX
3144  commands: the
3145  AAS\SpecialChar TeX
3146  User Guide (
3147 \family typewriter
3148 aasguide.tex
3149 \family default
3150 ) gives a good description of each.
3151  Thus it's probably easiest for me to go down the list as found in the guide
3152  and offer comments where necessary.
3153  So let's begin \SpecialChar ldots
3154
3155 \end_layout
3156
3157 \begin_layout Subsubsection
3158 Things that work as expected
3159 \end_layout
3160
3161 \begin_layout Standard
3162 Because they work as you might expect, I simply list them and the section
3163  they are found in: 
3164 \family typewriter
3165
3166 \backslash
3167 documentclass
3168 \family default
3169  (2.1.1), 
3170 \family typewriter
3171
3172 \backslash
3173 begin{document}
3174 \family default
3175  (2.2), 
3176 \family typewriter
3177
3178 \backslash
3179 title
3180 \family default
3181  (2.3), 
3182 \family typewriter
3183
3184 \backslash
3185 author
3186 \family default
3187  (2.3), 
3188 \family typewriter
3189
3190 \backslash
3191 affil
3192 \family default
3193  (2.3), 
3194 \family typewriter
3195
3196 \backslash
3197 abstract
3198 \family default
3199  (2.4), 
3200 \family typewriter
3201
3202 \backslash
3203 keywords
3204 \family default
3205  (2.5), 
3206 \family typewriter
3207
3208 \backslash
3209 section
3210 \family default
3211  (2.7), 
3212 \family typewriter
3213
3214 \backslash
3215 subsection
3216 \family default
3217  (2.7), 
3218 \family typewriter
3219
3220 \backslash
3221 subsubsection
3222 \family default
3223  (2.7), 
3224 \family typewriter
3225
3226 \backslash
3227 paragraph
3228 \family default
3229  (2.7), 
3230 \family typewriter
3231
3232 \backslash
3233 facility
3234 \family default
3235  (2.10), 
3236 \family typewriter
3237
3238 \backslash
3239 begin{displaymath}
3240 \family default
3241  (2.12), 
3242 \family typewriter
3243
3244 \backslash
3245 begin{equation}
3246 \family default
3247  (2.12), 
3248 \family typewriter
3249
3250 \backslash
3251 begin{eqnarray}
3252 \family default
3253  (2.12), 
3254 \family typewriter
3255
3256 \backslash
3257 begin{mathletters}
3258 \family default
3259  (2.12), 
3260 \family typewriter
3261
3262 \backslash
3263 begin{thebibliography}
3264 \family default
3265  (2.13.1), 
3266 \family typewriter
3267
3268 \backslash
3269 bibitem
3270 \family default
3271  (2.13.2), all the cite commands and their variations (2.13.2), the generic
3272  graphicx figure commands (2.14.1), 
3273 \family typewriter
3274
3275 \backslash
3276 begin{table}
3277 \family default
3278  (2.15.4), 
3279 \family typewriter
3280
3281 \backslash
3282 begin{tabular}
3283 \family default
3284  (2.15.4), 
3285 \family typewriter
3286
3287 \backslash
3288 caption
3289 \family default
3290  (2.15.4), 
3291 \family typewriter
3292
3293 \backslash
3294 label
3295 \family default
3296  (2.15.4, amongst other places), 
3297 \family typewriter
3298
3299 \backslash
3300 tablerefs
3301 \family default
3302  (2.15.5), 
3303 \family typewriter
3304
3305 \backslash
3306 tablecomments
3307 \family default
3308  (2.15.5), 
3309 \family typewriter
3310
3311 \backslash
3312 url
3313 \family default
3314  (2.17.4), 
3315 \family typewriter
3316
3317 \backslash
3318 end{document}
3319 \family default
3320  (2.18).
3321 \end_layout
3322
3323 \begin_layout Standard
3324 The following style options also work correctly: 
3325 \family typewriter
3326 longabstract
3327 \family default
3328  (2.4), 
3329 \family typewriter
3330 preprint
3331 \family default
3332  (3.2.1), 
3333 \family typewriter
3334 preprint2
3335 \family default
3336  (3.2.2), 
3337 \family typewriter
3338 eqsecnum
3339 \family default
3340  (3.3), 
3341 \family typewriter
3342 flushrt
3343 \family default
3344  (3.4).
3345  Simply put them in the 
3346 \family sans
3347 Options
3348 \family default
3349  box in 
3350 \family sans
3351 Layout\SpecialChar menuseparator
3352 Document
3353 \family default
3354 .
3355 \end_layout
3356
3357 \begin_layout Subsubsection
3358 Things that work, but require more comment
3359 \end_layout
3360
3361 \begin_layout Standard
3362 The following items work, but require a little more discussion:
3363 \end_layout
3364
3365 \begin_layout Itemize
3366 These items are reserved for use by the journal editors, but you can put
3367  them into the \SpecialChar LaTeX
3368  preamble if you feel compelled to do so: 
3369 \family typewriter
3370
3371 \backslash
3372 received
3373 \family default
3374
3375 \family typewriter
3376
3377 \backslash
3378 revised
3379 \family default
3380
3381 \family typewriter
3382
3383 \backslash
3384 accepted
3385 \family default
3386
3387 \family typewriter
3388
3389 \backslash
3390 ccc
3391 \family default
3392
3393 \family typewriter
3394
3395 \backslash
3396 cpright
3397 \family default
3398  (all from 2.1.3)
3399 \end_layout
3400
3401 \begin_layout Itemize
3402 These items may be placed in the \SpecialChar LaTeX
3403  preamble, and are included as blanks in
3404  the template file: 
3405 \family typewriter
3406
3407 \backslash
3408 slugcomment
3409 \family default
3410  (2.1.4), 
3411 \family typewriter
3412
3413 \backslash
3414 shorttitle
3415 \family default
3416  (2.1.5), 
3417 \family typewriter
3418
3419 \backslash
3420 shortauthors
3421 \family default
3422  (2.1.5)
3423 \end_layout
3424
3425 \begin_layout Itemize
3426
3427 \family typewriter
3428
3429 \backslash
3430 email
3431 \family default
3432  (2.3) – can only be used 
3433 \begin_inset Quotes eld
3434 \end_inset
3435
3436 standalone
3437 \begin_inset Quotes erd
3438 \end_inset
3439
3440 , not in the middle of a paragraph.
3441  Use \SpecialChar TeX
3442  code if you need to embed it.
3443 \end_layout
3444
3445 \begin_layout Itemize
3446
3447 \family typewriter
3448
3449 \backslash
3450 and
3451 \family default
3452  (2.3) – will have extra {} after it.
3453  This should not cause an error.
3454 \end_layout
3455
3456 \begin_layout Itemize
3457
3458 \family typewriter
3459
3460 \backslash
3461 notetoeditor
3462 \family default
3463  (2.6) – can only be used 
3464 \begin_inset Quotes eld
3465 \end_inset
3466
3467 standalone
3468 \begin_inset Quotes erd
3469 \end_inset
3470
3471 , not in the middle of a paragraph.
3472  Use \SpecialChar TeX
3473  code if you need to embed it.
3474 \end_layout
3475
3476 \begin_layout Itemize
3477
3478 \family typewriter
3479
3480 \backslash
3481 placetable
3482 \family default
3483  (2.8) – can't insert a cross-reference tag, you must type the tag name by
3484  hand
3485 \end_layout
3486
3487 \begin_layout Itemize
3488
3489 \family typewriter
3490
3491 \backslash
3492 placefigure
3493 \family default
3494  (2.8) – same as for 
3495 \family typewriter
3496
3497 \backslash
3498 placetable
3499 \end_layout
3500
3501 \begin_layout Itemize
3502
3503 \family typewriter
3504
3505 \backslash
3506 acknowledgements
3507 \family default
3508  (2.9) – will have extra {} after it.
3509  This should not cause an error.
3510 \end_layout
3511
3512 \begin_layout Itemize
3513
3514 \family typewriter
3515
3516 \backslash
3517 appendix
3518 \family default
3519  (2.11) – will have extra {} after it.
3520  This should not cause an error.
3521 \end_layout
3522
3523 \begin_layout Itemize
3524
3525 \family typewriter
3526
3527 \backslash
3528 figcaption
3529 \family default
3530  (2.14.2) – you can insert an optional filename argument by placing the cursor
3531  at the beginning of the text and selecting 
3532 \family sans
3533 Insert\SpecialChar menuseparator
3534 Short Title
3535 \family default
3536 .
3537  
3538 \begin_inset Quotes eld
3539 \end_inset
3540
3541 Short Title
3542 \begin_inset Quotes erd
3543 \end_inset
3544
3545  inserts an optional argument of the type needed by 
3546 \family typewriter
3547
3548 \backslash
3549 figcaption
3550 \family default
3551 .
3552  Hopefully it will be renamed someday.
3553 \end_layout
3554
3555 \begin_layout Itemize
3556
3557 \family typewriter
3558
3559 \backslash
3560 objectname
3561 \family default
3562  (2.17.1) – same as 
3563 \family typewriter
3564
3565 \backslash
3566 figcaption
3567 \family default
3568  for the catalog ID optional parameter
3569 \end_layout
3570
3571 \begin_layout Itemize
3572
3573 \family typewriter
3574
3575 \backslash
3576 dataset
3577 \family default
3578  (2.17.1) – same as 
3579 \family typewriter
3580
3581 \backslash
3582 figcaption
3583 \family default
3584  for the catalog ID optional parameter
3585 \end_layout
3586
3587 \begin_layout Subsubsection
3588 Things not implemented, use \SpecialChar TeX
3589  code
3590 \end_layout
3591
3592 \begin_layout Standard
3593
3594 \family typewriter
3595
3596 \backslash
3597 altaffilmark
3598 \family default
3599  (2.3), 
3600 \family typewriter
3601
3602 \backslash
3603 altaffiltext
3604 \family default
3605  (2.3), 
3606 \family typewriter
3607
3608 \backslash
3609 eqnum
3610 \family default
3611  (2.12), 
3612 \family typewriter
3613
3614 \backslash
3615 setcounter{equation}
3616 \family default
3617  (2.12), Journal name abbreviations (2.13.4), 
3618 \family typewriter
3619
3620 \backslash
3621 figurenum
3622 \family default
3623  (2.14.1), 
3624 \family typewriter
3625
3626 \backslash
3627 epsscale
3628 \family default
3629  (2.14.1), 
3630 \family typewriter
3631
3632 \backslash
3633 plotone
3634 \family default
3635  (2.14.1), 
3636 \family typewriter
3637
3638 \backslash
3639 plottwo
3640 \family default
3641  (2.14.1), 
3642 \family typewriter
3643
3644 \backslash
3645 tablenum
3646 \family default
3647  (2.15.4), 
3648 \family typewriter
3649
3650 \backslash
3651 tableline
3652 \family default
3653  (2.15.4, insert it as the first element in the lefthand cell after where
3654  you want it.
3655  Don't use any of \SpecialChar LyX
3656 's rules in the table), 
3657 \family typewriter
3658
3659 \backslash
3660 tablenotemark
3661 \family default
3662  (2.15.5), 
3663 \family typewriter
3664
3665 \backslash
3666 tablenotetext
3667 \family default
3668  (2.15.5), much of Misc (2.17, except 
3669 \family typewriter
3670
3671 \backslash
3672 objectname
3673 \family default
3674
3675 \family typewriter
3676
3677 \backslash
3678 dataset
3679 \family default
3680
3681 \family typewriter
3682
3683 \backslash
3684 url
3685 \family default
3686 , and 
3687 \family typewriter
3688
3689 \backslash
3690 email
3691 \family default
3692 ; see above), 
3693 \family typewriter
3694
3695 \backslash
3696 singlespace
3697 \family default
3698  (3.1), 
3699 \family typewriter
3700
3701 \backslash
3702 doublespace
3703 \family default
3704  (3.1), 
3705 \family typewriter
3706
3707 \backslash
3708 onecolumn
3709 \family default
3710  (3.2), 
3711 \family typewriter
3712
3713 \backslash
3714 twocolumn
3715 \family default
3716  (3.2)
3717 \end_layout
3718
3719 \begin_layout Subsubsection
3720 Things that cannot be implemented
3721 \end_layout
3722
3723 \begin_layout Standard
3724 \SpecialChar ldots
3725  at least in any meaningful sort of way, so I suggest ignoring them.
3726  They are the references environment (2.13.3), and the deluxetable environment
3727  (2.15).
3728  If you really, really need to use deluxetable, I suggest editing it in
3729  a separate file with a text editor, then using 
3730 \family sans
3731 Insert\SpecialChar menuseparator
3732 Child
3733 \begin_inset space ~
3734 \end_inset
3735
3736 Document
3737 \family default
3738  to include it in your \SpecialChar LyX
3739  document.
3740  See the 
3741 \family typewriter
3742 aas_sample.lyx
3743 \family default
3744  file to see an example of this.
3745 \end_layout
3746
3747 \begin_layout Subsection
3748 FAQs, Tips, Tricks, and Other Ruminations
3749 \end_layout
3750
3751 \begin_layout Subsubsection
3752 Getting \SpecialChar LyX
3753  and AAS\SpecialChar TeX
3754  to cooperate
3755 \end_layout
3756
3757 \begin_layout Standard
3758 It can be a bit tricky to get \SpecialChar LyX
3759  to recognize a new layout and document class.
3760  When all else fails, do this:
3761 \end_layout
3762
3763 \begin_layout Enumerate
3764 Make certain that \SpecialChar LaTeX
3765  can find AAS\SpecialChar TeX
3766 .
3767  Copy sample.tex (and perhaps table.tex) from the AAS\SpecialChar TeX
3768  distribution into a
3769  directory completely unrelated to \SpecialChar LaTeX
3770  or AAS\SpecialChar TeX
3771  and run \SpecialChar LaTeX
3772  on 
3773 \family typewriter
3774 sample.tex
3775 \family default
3776 .
3777 \end_layout
3778
3779 \begin_layout Enumerate
3780 Make certain that 
3781 \family typewriter
3782 aastex.layout
3783 \family default
3784  appears in \SpecialChar LyX
3785 's 
3786 \family typewriter
3787 layouts
3788 \family default
3789  folder
3790 \end_layout
3791
3792 \begin_layout Enumerate
3793 Rerun 
3794 \family sans
3795 Tools\SpecialChar menuseparator
3796 Reconfigure
3797 \family default
3798  in \SpecialChar LyX
3799 , then restart \SpecialChar LyX
3800 .
3801 \end_layout
3802
3803 \begin_layout Enumerate
3804 Open a regular new file, not from a template.
3805  Does AAS\SpecialChar TeX
3806  appear in the class list in 
3807 \family sans
3808 Document\SpecialChar menuseparator
3809 Settings
3810 \family default
3811 ?
3812 \end_layout
3813
3814 \begin_layout Standard
3815 If you get a warning from an existing AAS\SpecialChar TeX
3816  document about not being able
3817  to find the AAS\SpecialChar TeX
3818  layout or a message about 
3819 \begin_inset Quotes eld
3820 \end_inset
3821
3822 You should not mix title layouts with normal ones
3823 \begin_inset Quotes erd
3824 \end_inset
3825
3826 , things haven't been installed correctly.
3827 \end_layout
3828
3829 \begin_layout Subsubsection
3830 \SpecialChar LaTeX
3831  error processing a table 
3832 \end_layout
3833
3834 \begin_layout Standard
3835 \SpecialChar LyX
3836 , by default, attempts to center the table caption/title.
3837  This seems to produce a bad interaction in AAS\SpecialChar TeX
3838  so you should click somewhere
3839  in the caption/title, then select 
3840 \family sans
3841 Edit\SpecialChar menuseparator
3842 Paragraph
3843 \begin_inset space ~
3844 \end_inset
3845
3846 Settings
3847 \family default
3848 , then set the 
3849 \family sans
3850 Alignment
3851 \family default
3852  to 
3853 \family sans
3854 Block
3855 \family default
3856 .
3857  This took care of it for me.
3858 \end_layout
3859
3860 \begin_layout Subsubsection
3861 References
3862 \end_layout
3863
3864 \begin_layout Standard
3865 A couple of things: 1) I have noticed some funny spacing in the reference
3866  entries in the text.
3867  When you enter the bibliography item data, make sure their is 
3868 \emph on
3869 no
3870 \emph default
3871  space between the last author and the parenthesis setting off the year;
3872  
3873 \emph on
3874 e.
3875 \begin_inset space \thinspace{}
3876 \end_inset
3877
3878 g.
3879 \begin_inset space \space{}
3880 \end_inset
3881
3882
3883 \emph default
3884 type 
3885 \family typewriter
3886 Ressler(1992)
3887 \family default
3888 , not 
3889 \family typewriter
3890 Ressler (1992)
3891 \family default
3892 .
3893  2) Entering the references at all is not obvious.
3894  The easiest thing is to start typing your first reference at the end of
3895  the document, then mark it as type 
3896 \family sans
3897 References
3898 \family default
3899 .
3900  That will put a small gray box in front of what you just typed.
3901  Click on the box to fill in the rest of the information.
3902  For new references, go to the end of an existing reference and press return.
3903  That will create a new line with its own box, etc.
3904 \end_layout
3905
3906 \begin_layout Subsubsection
3907 Including EPS files
3908 \end_layout
3909
3910 \begin_layout Standard
3911 Even though AAS\SpecialChar TeX
3912  provides its own figure commands (
3913 \family typewriter
3914
3915 \backslash
3916 plotone
3917 \family default
3918 , for example), I much prefer \SpecialChar LaTeX
3919 's standard figure commands (with the default
3920  graphicx).
3921  You can insert the 
3922 \family typewriter
3923
3924 \backslash
3925 plotone
3926 \family default
3927 , etc.
3928 \begin_inset space ~
3929 \end_inset
3930
3931 commands as \SpecialChar TeX
3932  code into a Figure Float box if you desire, but I never have
3933  much luck getting the layout right.
3934  With the standard graphics, \SpecialChar LyX
3935  will insert a 
3936 \family typewriter
3937
3938 \backslash
3939 usepackage{graphicx}
3940 \family default
3941  command into the \SpecialChar LaTeX
3942  preamble and handle the figures in the standard \SpecialChar LaTeX2e
3943  way,
3944  interspersing the figures in the text.
3945  I believe ApJ accepts figures exactly this way now; AJ might still use
3946  the 
3947 \begin_inset Quotes eld
3948 \end_inset
3949
3950 stack everything at the end
3951 \begin_inset Quotes erd
3952 \end_inset
3953
3954  technique.
3955 \end_layout
3956
3957 \begin_layout Subsubsection
3958 Things I could have done, but didn't
3959 \end_layout
3960
3961 \begin_layout Standard
3962 There are a few 
3963 \begin_inset Quotes eld
3964 \end_inset
3965
3966 pretty
3967 \begin_inset Quotes erd
3968 \end_inset
3969
3970  things I could have implemented, but chose not to.
3971  For instance, I saw no point in double-spacing the text in the \SpecialChar LyX
3972  window,
3973  even though it is double-spaced in the paper manuscript.
3974  Also, I chose not to make separate layouts for the preprint and preprint2
3975  styles.
3976  Since I assume you will spend most of your time in the plain manuscript
3977  mode anyway, I decided not to chew up more disk space with this.
3978  
3979 \end_layout
3980
3981 \begin_layout Subsection
3982 Final Caveat
3983 \end_layout
3984
3985 \begin_layout Standard
3986 Your mileage may vary.
3987  I've now had papers published by both ApJ and AJ that have had 98% of the
3988  effort done in \SpecialChar LyX
3989 ; the last 2% was the \SpecialChar LaTeX
3990  post-processing and a few cleanups.
3991  I have had no trouble with the submission process, and I'm sure the journals
3992  were never aware that there might be a difference.
3993  So, go forth and publish!
3994 \end_layout
3995
3996 \begin_layout Section
3997 AMS \SpecialChar LaTeX
3998
3999 \end_layout
4000
4001 \begin_layout Standard
4002 by 
4003 \noun on
4004 David Johnson
4005 \noun default
4006 ; updated by 
4007 \noun on
4008 Richard Heck
4009 \end_layout
4010
4011 \begin_layout Standard
4012 \begin_inset VSpace bigskip
4013 \end_inset
4014
4015
4016 \end_layout
4017
4018 \begin_layout Standard
4019 \noindent
4020 The AMS \SpecialChar LaTeX
4021  layouts are set up to conform to suggested styles for mathematical
4022  papers to be submitted to American Mathematical Society publications.
4023  The layouts are not tailored to a specific journal, but easily can be.
4024  You should refer to the AMS documentation for specific instructions for
4025  each journal (usually it will entail only changing a single line in the
4026  \SpecialChar TeX
4027  output).
4028  That documentation is available on the Web at 
4029 \begin_inset Flex URL
4030 status open
4031
4032 \begin_layout Plain Layout
4033
4034 http://www.ams.org
4035 \end_layout
4036
4037 \end_inset
4038
4039  or by ftp at 
4040 \begin_inset Flex URL
4041 status open
4042
4043 \begin_layout Plain Layout
4044
4045 ftp://ftp.ams.org/pub/tex/amslatex/
4046 \end_layout
4047
4048 \end_inset
4049
4050 .
4051  These layouts are appropriate, and useful, for any mathematical writing.
4052  
4053 \end_layout
4054
4055 \begin_layout Standard
4056 There are two basic AMS \SpecialChar LaTeX
4057  layouts: 
4058 \end_layout
4059
4060 \begin_layout Itemize
4061 amsart: The standard AMS article format.
4062 \end_layout
4063
4064 \begin_layout Itemize
4065 amsbook: the standard AMS book (really, monograph) format.
4066  
4067 \end_layout
4068
4069 \begin_layout Standard
4070 The layouts themselves contain only the minimum necessary to use the AMS
4071  classes.
4072  They do not, in particular, contain any of the `theorem' environments used
4073  for setting theorems, lemmas, and the like.
4074  These are contained, instead, in the 
4075 \begin_inset Flex Code
4076 status collapsed
4077
4078 \begin_layout Plain Layout
4079 Theorems (AMS)
4080 \end_layout
4081
4082 \end_inset
4083
4084  module, which is loaded by default when you select one of the AMS classes.
4085  (It can also be used with other classes and can be removed, if you would
4086  rather use something else.) Less commonly used environments are in the 
4087 \begin_inset Flex Code
4088 status collapsed
4089
4090 \begin_layout Plain Layout
4091 Theorems (AMS-Extended)
4092 \end_layout
4093
4094 \end_inset
4095
4096  module, which must be loaded manually.
4097 \end_layout
4098
4099 \begin_layout Standard
4100 By default, theorems and the like are numbered consecutively throughout
4101  the document, but this may be modified by loading the module 
4102 \begin_inset Flex Code
4103 status collapsed
4104
4105 \begin_layout Plain Layout
4106 Theorems (Order by Section)
4107 \end_layout
4108
4109 \end_inset
4110
4111  or, if you are using 
4112 \begin_inset Flex Code
4113 status collapsed
4114
4115 \begin_layout Plain Layout
4116 book (AMS)
4117 \end_layout
4118
4119 \end_inset
4120
4121 , the module 
4122 \begin_inset Flex Code
4123 status collapsed
4124
4125 \begin_layout Plain Layout
4126 Theorems (Order by Chapter)
4127 \end_layout
4128
4129 \end_inset
4130
4131 .
4132  These will number the results as 
4133 \begin_inset Formula $n.m$
4134 \end_inset
4135
4136 , where the first number refers to the section (or chapter) and the second
4137  refers to the total number of results so far in that section (or chapter).
4138  Many environments are also available unnumbered.
4139  These are indicated by an asterisk at the end.
4140  If you happen to want 
4141 \emph on
4142 only
4143 \emph default
4144  unnumbered results, the module 
4145 \begin_inset Flex Code
4146 status collapsed
4147
4148 \begin_layout Plain Layout
4149 Theorems (Starred)
4150 \end_layout
4151
4152 \end_inset
4153
4154  provides that option.
4155 \end_layout
4156
4157 \begin_layout Standard
4158 Note that these modules do not 
4159 \emph on
4160 have
4161 \emph default
4162  to be used with the AMS classes.
4163  It is perfectly possible to use the 
4164 \begin_inset Flex Code
4165 status collapsed
4166
4167 \begin_layout Plain Layout
4168 Theorems (AMS)
4169 \end_layout
4170
4171 \end_inset
4172
4173  module, and the others mentioned, with other classes, such as 
4174 \begin_inset Flex Code
4175 status collapsed
4176
4177 \begin_layout Plain Layout
4178 article
4179 \end_layout
4180
4181 \end_inset
4182
4183
4184 \begin_inset Flex Code
4185 status collapsed
4186
4187 \begin_layout Plain Layout
4188 report
4189 \end_layout
4190
4191 \end_inset
4192
4193
4194 \begin_inset Flex Code
4195 status collapsed
4196
4197 \begin_layout Plain Layout
4198 book (KOMA-script)
4199 \end_layout
4200
4201 \end_inset
4202
4203 , and so forth.
4204 \end_layout
4205
4206 \begin_layout Subsection
4207 What these layouts provide
4208 \end_layout
4209
4210 \begin_layout Standard
4211 There is a long list of included environments provided by these layouts.
4212  In AMS-\SpecialChar LaTeX
4213 , there is, in fact, an opportunity to define an unlimited variety
4214  of `theorem' environments.
4215  However, the AMS recommends the environments that are available in \SpecialChar LyX
4216 .
4217  
4218 \end_layout
4219
4220 \begin_layout Standard
4221 The following environments—as well as the standard environments, such as
4222  
4223 \begin_inset Flex Noun
4224 status collapsed
4225
4226 \begin_layout Plain Layout
4227 section
4228 \end_layout
4229
4230 \end_inset
4231
4232
4233 \begin_inset Flex Noun
4234 status collapsed
4235
4236 \begin_layout Plain Layout
4237 bibliography
4238 \end_layout
4239
4240 \end_inset
4241
4242
4243 \begin_inset Flex Noun
4244 status collapsed
4245
4246 \begin_layout Plain Layout
4247 title
4248 \end_layout
4249
4250 \end_inset
4251
4252
4253 \begin_inset Flex Noun
4254 status collapsed
4255
4256 \begin_layout Plain Layout
4257 author
4258 \end_layout
4259
4260 \end_inset
4261
4262 , and 
4263 \begin_inset Flex Noun
4264 status collapsed
4265
4266 \begin_layout Plain Layout
4267 date
4268 \end_layout
4269
4270 \end_inset
4271
4272 —are provided by 
4273 \begin_inset Flex Code
4274 status collapsed
4275
4276 \begin_layout Plain Layout
4277 article (AMS)
4278 \end_layout
4279
4280 \end_inset
4281
4282  and 
4283 \begin_inset Flex Code
4284 status collapsed
4285
4286 \begin_layout Plain Layout
4287 book (AMS)
4288 \end_layout
4289
4290 \end_inset
4291
4292 :
4293 \end_layout
4294
4295 \begin_layout Description
4296 Address This should be the author's permanent address.
4297 \end_layout
4298
4299 \begin_layout Description
4300 Current
4301 \begin_inset space ~
4302 \end_inset
4303
4304 Address This should be the author's temporary address at the time of submission,
4305  if different from the Address.
4306 \end_layout
4307
4308 \begin_layout Description
4309 Email Author's e-mail address
4310 \end_layout
4311
4312 \begin_layout Description
4313 URL Author's Web address, if desired.
4314 \end_layout
4315
4316 \begin_layout Description
4317 Keywords Key words or phrases used to identify specific topics discussed
4318  in the paper.
4319 \end_layout
4320
4321 \begin_layout Description
4322 Subjectclass These refer to the AMS Subject Classifications, published and
4323  described in 
4324 \emph on
4325 Mathematical Reviews
4326 \emph default
4327 .
4328  These are also available online at the AMS cites listed above.
4329 \end_layout
4330
4331 \begin_layout Description
4332 Thanks
4333 \end_layout
4334
4335 \begin_layout Description
4336 Dedicatory
4337 \end_layout
4338
4339 \begin_layout Description
4340 Translator
4341 \end_layout
4342
4343 \begin_layout Standard
4344 The following environments are provided by both the 
4345 \begin_inset Flex Code
4346 status collapsed
4347
4348 \begin_layout Plain Layout
4349 Theorems
4350 \end_layout
4351
4352 \end_inset
4353
4354  and 
4355 \begin_inset Flex Code
4356 status collapsed
4357
4358 \begin_layout Plain Layout
4359 Theorems (AMS)
4360 \end_layout
4361
4362 \end_inset
4363
4364  modules, in the latter case in both starred (unnumbered) and unstarred
4365  (numbered) versions.
4366  These same environments are provided only in the starred versions by the
4367  
4368 \begin_inset Flex Code
4369 status collapsed
4370
4371 \begin_layout Plain Layout
4372 Theorems (Starred)
4373 \end_layout
4374
4375 \end_inset
4376
4377  module:
4378 \end_layout
4379
4380 \begin_layout Theorem
4381 This is typically used for the statements of major results.
4382  
4383 \end_layout
4384
4385 \begin_layout Corollary*
4386 This is used for statements which follow fairly directly from previous statement
4387 s.
4388  Again, these can be major results.
4389  
4390 \end_layout
4391
4392 \begin_layout Lemma
4393 These are smaller results needed to prove other statements.
4394 \end_layout
4395
4396 \begin_layout Proposition
4397 These are less major results which (hopefully) add to the general theory
4398  being discussed.
4399 \end_layout
4400
4401 \begin_layout Conjecture
4402 These are statements provided without justification, which the author does
4403  not know how to prove, but which seem to be true (to the author, at least).
4404 \end_layout
4405
4406 \begin_layout Definition*
4407 Guess what this is for.
4408  The font is different for this environment than for the previous ones.
4409  
4410 \end_layout
4411
4412 \begin_layout Example*
4413 Used for examples illustrating proven results.
4414 \end_layout
4415
4416 \begin_layout Problem
4417 It's not really known what this is for.
4418  You should figure it out.
4419 \end_layout
4420
4421 \begin_layout Exercise*
4422 Write a description for this one.
4423 \end_layout
4424
4425 \begin_layout Remark
4426 This environment is also a type of theorem, usually a lesser sort of observation.
4427 \end_layout
4428
4429 \begin_layout Claim*
4430 Often used in the course of giving a proof of a larger result.
4431 \end_layout
4432
4433 \begin_layout Case
4434 Generally, these are used to break up long arguments, using specific instances
4435  of some condition.
4436  
4437 \end_layout
4438
4439 \begin_layout Case
4440 The numbering scheme for cases is on its own, not together with other numbered
4441  statements.
4442  
4443 \end_layout
4444
4445 \begin_layout Proof
4446 At the end of this environment, a QED symbol (usually a square, but it can
4447  vary with different styles) is placed.
4448  If you want to have other environments within this one—for example, Case
4449  environments—and have the QED symbol appear only after them, then the other
4450  environments need to be nested within the proof environment.
4451  See the section 
4452 \emph on
4453 Nesting Environments
4454 \emph default
4455  of the 
4456 \emph on
4457 User's Guide
4458 \emph default
4459  for information on nesting.
4460 \end_layout
4461
4462 \begin_layout Standard
4463 And these environments are provided by 
4464 \begin_inset Flex Code
4465 status collapsed
4466
4467 \begin_layout Plain Layout
4468 Theorems (AMS-Extended)
4469 \end_layout
4470
4471 \end_inset
4472
4473 :
4474 \end_layout
4475
4476 \begin_layout Criterion*
4477 A required condition.
4478 \end_layout
4479
4480 \begin_layout Algorithm*
4481 A general procedure to be used.
4482 \end_layout
4483
4484 \begin_layout Axiom*
4485 This is a property or statement taken as true within the system being discussed.
4486 \end_layout
4487
4488 \begin_layout Condition*
4489 Sometimes used to state a condition assumed within the present context of
4490  discussion.
4491 \end_layout
4492
4493 \begin_layout Note*
4494 Similar to a Remark.
4495 \end_layout
4496
4497 \begin_layout Notation*
4498 Used for the explanation of, yes, notation.
4499 \end_layout
4500
4501 \begin_layout Summary
4502 Do we really need to tell you? 
4503 \end_layout
4504
4505 \begin_layout Acknowledgement*
4506 Acknowledgement.
4507 \end_layout
4508
4509 \begin_layout Conclusion*
4510 Sometimes used at the end of a long train of argument.
4511 \end_layout
4512
4513 \begin_layout Fact
4514 Used in a way similar to Proposition, though perhaps lower on the scale.
4515 \end_layout
4516
4517 \begin_layout Standard
4518 In addition, the AMS classes automatically provide the AMS \SpecialChar LaTeX
4519  and AMS fonts
4520  packages.
4521  They need to be available on your system in order to use these environments.
4522 \end_layout
4523
4524 \begin_layout Section
4525 AGU journals (
4526 \family sans
4527 aguplus
4528 \family default
4529 )
4530 \end_layout
4531
4532 \begin_layout Standard
4533 by 
4534 \shape smallcaps
4535 Martin Vermeer
4536 \end_layout
4537
4538 \begin_layout Subsection
4539 Description
4540 \end_layout
4541
4542 \begin_layout Standard
4543 These are the layout files for some of the journals of the American Geophysical
4544  Society.
4545  It is assumed that you have both the AGU's own class files and AGUplus
4546  installed (everything to be found at
4547 \begin_inset Flex URL
4548 status collapsed
4549
4550 \begin_layout Plain Layout
4551
4552 http://publications.agu.org/files/2013/08/AGU-LaTeX.zip
4553 \end_layout
4554
4555 \end_inset
4556
4557 ).
4558 \end_layout
4559
4560 \begin_layout Subsection
4561 New styles
4562 \end_layout
4563
4564 \begin_layout Standard
4565 Redefined are 
4566 \family sans
4567 Paragraph
4568 \family default
4569
4570 \family sans
4571 Paragraph*
4572 \family default
4573 .
4574  They are still called this in the \SpecialChar LyX
4575  GUI, though their \SpecialChar LaTeX
4576  equivalents in the
4577  AGU classes are 
4578 \family sans
4579 Subsubsubsection
4580 \family default
4581  and 
4582 \family sans
4583 Subsubsubsection*
4584 \family default
4585 .
4586 \end_layout
4587
4588 \begin_layout Standard
4589 Newly defined styles are 
4590 \family sans
4591 Left_Header
4592 \family default
4593
4594 \family sans
4595 Right_Header
4596 \family default
4597
4598 \family sans
4599 Received
4600 \family default
4601
4602 \family sans
4603 Revised
4604 \family default
4605
4606 \family sans
4607 Accepted
4608 \family default
4609
4610 \family sans
4611 CCC
4612 \family default
4613
4614 \family sans
4615 PaperId
4616 \family default
4617
4618 \family sans
4619 AuthorAddr
4620 \family default
4621
4622 \family sans
4623 SlugComment
4624 \family default
4625 .
4626  These are mostly manuscript attributes and defined in the AGU class documentati
4627 on.
4628 \end_layout
4629
4630 \begin_layout Standard
4631 I suspect this is still badly incomplete.
4632 \end_layout
4633
4634 \begin_layout Subsection
4635 New floats
4636 \end_layout
4637
4638 \begin_layout Standard
4639
4640 \family sans
4641 Planotable
4642 \family default
4643  and 
4644 \family sans
4645 Plate
4646 \family default
4647 .
4648  We also have a new 
4649 \family sans
4650 Table_Caption
4651 \family default
4652 .
4653 \end_layout
4654
4655 \begin_layout Subsection
4656 Supported journals
4657 \end_layout
4658
4659 \begin_layout Itemize
4660
4661 \emph on
4662 Journal of Geophysical Research
4663 \emph default
4664
4665 \family typewriter
4666 jgrga.layout
4667 \family default
4668  — Martin Vermeer
4669 \end_layout
4670
4671 \begin_layout Standard
4672 Add your own, it isn't so hard! Look at the 
4673 \family typewriter
4674 jgrga.layout
4675 \family default
4676  example and 
4677 \family typewriter
4678 aguplus.inc
4679 \family default
4680 .
4681 \end_layout
4682
4683 \begin_layout Subsection
4684 Bugs and things to remember
4685 \end_layout
4686
4687 \begin_layout Standard
4688 In order to use the new layouts, you must remember to do the following for
4689  a new document:
4690 \end_layout
4691
4692 \begin_layout Enumerate
4693
4694 \emph on
4695 Turn off babel
4696 \emph default
4697 .
4698  This can be done in the 
4699 \family sans
4700 Layout\SpecialChar menuseparator
4701 Document
4702 \family default
4703  or 
4704 \family sans
4705 Document\SpecialChar menuseparator
4706 Settings
4707 \family default
4708  menu item.
4709  (AGU articles are always in English, right? So 
4710 \emph on
4711 don't
4712 \emph default
4713  choose a language.)
4714 \end_layout
4715
4716 \begin_layout Enumerate
4717 Enter 
4718 \family typewriter
4719 jgrga
4720 \family default
4721  into the document's 
4722 \family sans
4723 Extra Options
4724 \family default
4725  field.
4726  (Yes, this is a bug.)
4727 \end_layout
4728
4729 \begin_layout Enumerate
4730 Make sure you use the 
4731 \family typewriter
4732 agu.bst
4733 \family default
4734  bibliography style, by entering 
4735 \family sans
4736 agu
4737 \family default
4738  into the second field of the Bib\SpecialChar TeX
4739  inset.
4740  None of the standard styles will do.
4741 \end_layout
4742
4743 \begin_layout Section
4744 Broadway
4745 \end_layout
4746
4747 \begin_layout Standard
4748 by 
4749 \shape smallcaps
4750 Garst Reese
4751 \end_layout
4752
4753 \begin_layout Subsection
4754 Introduction
4755 \end_layout
4756
4757 \begin_layout Standard
4758 Broadway is for writing plays.
4759  The format is more decorative than Hollywood, and much less standardized.
4760  This format should be suitable for workshops.
4761 \end_layout
4762
4763 \begin_layout Subsection
4764 Special problems
4765 \end_layout
4766
4767 \begin_layout Standard
4768 The same as in Hollywood.
4769 \end_layout
4770
4771 \begin_layout Subsection
4772 Special features
4773 \end_layout
4774
4775 \begin_layout Standard
4776 Insert the 
4777 \family sans
4778 Speaker
4779 \family default
4780  names as labels then cross-reference the label to insert the name.
4781  The cross-reference dialog will show the current cast of characters.
4782 \end_layout
4783
4784 \begin_layout Subsection
4785 Paper size and Margins
4786 \end_layout
4787
4788 \begin_layout Standard
4789 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
4790 \end_layout
4791
4792 \begin_layout Subsection
4793 Environments
4794 \end_layout
4795
4796 \begin_layout Standard
4797 The following environments are available.
4798  You can use broadway.bind to get the bind keys shown at the right.
4799 \end_layout
4800
4801 \begin_layout Itemize
4802
4803 \family sans
4804 Standard
4805 \begin_inset Newline newline
4806 \end_inset
4807
4808
4809 \family default
4810 You should not have to use this, but it is here for anything that does not
4811  fit otherwise.
4812 \end_layout
4813
4814 \begin_layout Itemize
4815
4816 \family sans
4817 Narrative
4818 \begin_inset space \hfill{}
4819 \end_inset
4820
4821 M-z n
4822 \begin_inset Newline newline
4823 \end_inset
4824
4825
4826 \family default
4827 Used to describe stage setting and the action.
4828  First use of speaker names in all CAPs.
4829 \end_layout
4830
4831 \begin_layout Itemize
4832
4833 \family sans
4834 ACT
4835 \begin_inset space \hfill{}
4836 \end_inset
4837
4838 M-z a
4839 \begin_inset Newline newline
4840 \end_inset
4841
4842
4843 \family default
4844 Automatically numbered.
4845  On screen it will be arabic, but will print as Roman.
4846 \end_layout
4847
4848 \begin_layout Itemize
4849
4850 \family sans
4851 ACT*
4852 \begin_inset space \hfill{}
4853 \end_inset
4854
4855 M-z S at
4856 \begin_inset Newline newline
4857 \end_inset
4858
4859
4860 \family default
4861 Subtitle for 
4862 \family sans
4863 ACT.
4864
4865 \family default
4866  It is just centered text.
4867 \end_layout
4868
4869 \begin_layout Itemize
4870
4871 \family sans
4872 SCENE
4873 \begin_inset space \hfill{}
4874 \end_inset
4875
4876 M-z S-S
4877 \begin_inset Newline newline
4878 \end_inset
4879
4880
4881 \family default
4882 Not automatically numbered.
4883  You supply the number.
4884  This is because I couldn't figure out how.
4885 \end_layout
4886
4887 \begin_layout Itemize
4888
4889 \family sans
4890 AT_RISE:
4891 \begin_inset space \hfill{}
4892 \end_inset
4893
4894 M-z S-R
4895 \begin_inset Newline newline
4896 \end_inset
4897
4898
4899 \family default
4900 A special case of Narrative to describe the setting and action as the curtain
4901  rises.
4902 \end_layout
4903
4904 \begin_layout Itemize
4905
4906 \family sans
4907 Speaker
4908 \begin_inset space \hfill{}
4909 \end_inset
4910
4911 M-z s
4912 \begin_inset Newline newline
4913 \end_inset
4914
4915
4916 \family default
4917 The speaker's (actor's) title, centered in all CAPS.
4918 \end_layout
4919
4920 \begin_layout Itemize
4921
4922 \family sans
4923 Parenthetical
4924 \begin_inset space \hfill{}
4925 \end_inset
4926
4927 M-z p
4928 \begin_inset Newline newline
4929 \end_inset
4930
4931
4932 \family default
4933 Instructions to the speaker.
4934  The parentheses are automatically inserted.
4935  The ( will appear on screen, but both will be in the printed play.
4936  This environment is only used within 
4937 \family sans
4938 Dialogue
4939 \family default
4940 .
4941 \end_layout
4942
4943 \begin_layout Itemize
4944
4945 \family sans
4946 Dialogue
4947 \begin_inset space \hfill{}
4948 \end_inset
4949
4950 M-z d
4951 \begin_inset Newline newline
4952 \end_inset
4953
4954
4955 \family default
4956 What the Speaker says.
4957 \end_layout
4958
4959 \begin_layout Itemize
4960
4961 \family sans
4962 CURTAIN
4963 \begin_inset space \hfill{}
4964 \end_inset
4965
4966 M-z S-C
4967 \begin_inset Newline newline
4968 \end_inset
4969
4970
4971 \family default
4972 The curtain comes down.
4973 \end_layout
4974
4975 \begin_layout Itemize
4976
4977 \family sans
4978 Title
4979 \begin_inset space \hfill{}
4980 \end_inset
4981
4982 M-z S-T
4983 \end_layout
4984
4985 \begin_layout Itemize
4986
4987 \family sans
4988 Author
4989 \begin_inset space \hfill{}
4990 \end_inset
4991
4992 M-z S-A
4993 \end_layout
4994
4995 \begin_layout Itemize
4996
4997 \family sans
4998 Right_Address
4999 \begin_inset space \hfill{}
5000 \end_inset
5001
5002 M-z r
5003 \end_layout
5004
5005 \begin_layout Standard
5006 Hello there.
5007 \end_layout
5008
5009 \begin_layout Section
5010 Dinbrief
5011 \end_layout
5012
5013 \begin_layout Standard
5014 The document class 
5015 \family sans
5016 dinbrief
5017 \family default
5018  can be used to type letters according to German conventions.
5019  A template file is included in 
5020 \family typewriter
5021 .../lyx/share/templates
5022 \family default
5023  for you to use as a starting point.
5024 \end_layout
5025
5026 \begin_layout Section
5027 EGS journals (
5028 \family sans
5029 egs
5030 \family default
5031 )
5032 \end_layout
5033
5034 \begin_layout Standard
5035 by 
5036 \shape smallcaps
5037 Martin Vermeer
5038 \end_layout
5039
5040 \begin_layout Subsection
5041 Description
5042 \end_layout
5043
5044 \begin_layout Standard
5045 This is the layout file for the European Geophysical Society journals.
5046  The needed 
5047 \family typewriter
5048 egs.cls
5049 \family default
5050  can be downloaded from the web site of the EGS under 
5051 \begin_inset Flex URL
5052 status collapsed
5053
5054 \begin_layout Plain Layout
5055
5056 www.copernicus.org
5057 \end_layout
5058
5059 \end_inset
5060
5061 .
5062 \end_layout
5063
5064 \begin_layout Subsection
5065 New styles
5066 \end_layout
5067
5068 \begin_layout Standard
5069
5070 \family sans
5071 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
5072  Accepted
5073 \family default
5074
5075 \family sans
5076 Offsets
5077 \family default
5078 .
5079  The current layout file is unfortunately very unmodular and would benefit
5080  from using the various 
5081 \family typewriter
5082 std*.inc
5083 \family default
5084  file inclusions.
5085 \end_layout
5086
5087 \begin_layout Section
5088 Elsevier Journals
5089 \end_layout
5090
5091 \begin_layout Standard
5092 See the \SpecialChar LyX
5093  template file 
5094 \family typewriter
5095 elsarticle.lyx
5096 \family default
5097 .
5098  It contains all infos you need.
5099 \end_layout
5100
5101 \begin_layout Section
5102 Foils [aka 
5103 \family sans
5104 Foil\SpecialChar TeX
5105
5106 \family default
5107 ]
5108 \begin_inset CommandInset label
5109 LatexCommand label
5110 name "sec:foiltex"
5111
5112 \end_inset
5113
5114
5115 \end_layout
5116
5117 \begin_layout Standard
5118 by 
5119 \noun on
5120 Allan Rae
5121 \end_layout
5122
5123 \begin_layout Subsection
5124 Introduction
5125 \end_layout
5126
5127 \begin_layout Standard
5128 This section describes how to use \SpecialChar LyX
5129  to make slides for overhead projectors.
5130  There are two document classes that can do this: the default slides class
5131  and the 
5132 \family sans
5133 Foil\SpecialChar TeX
5134
5135 \family default
5136  slides class.
5137  This section documents the latter.
5138 \end_layout
5139
5140 \begin_layout Standard
5141 I'm going to say this again, nice and clear, so that there's no misunderstanding
5142 :
5143 \end_layout
5144
5145 \begin_layout Standard
5146 \begin_inset VSpace bigskip
5147 \end_inset
5148
5149
5150 \end_layout
5151
5152 \begin_layout Standard
5153 \align center
5154
5155 \size large
5156 This section documents the class 
5157 \begin_inset Quotes eld
5158 \end_inset
5159
5160
5161 \family sans
5162 FoilTeX
5163 \family default
5164
5165 \begin_inset Quotes erd
5166 \end_inset
5167
5168  
5169 \emph on
5170 only.
5171 \end_layout
5172
5173 \begin_layout Standard
5174 \begin_inset VSpace bigskip
5175 \end_inset
5176
5177
5178 \end_layout
5179
5180 \begin_layout Standard
5181 If you're looking for the documentation for 
5182 \begin_inset Quotes eld
5183 \end_inset
5184
5185
5186 \family sans
5187 slides (default)
5188 \family default
5189
5190 \begin_inset Quotes erd
5191 \end_inset
5192
5193 , check out section
5194 \begin_inset space ~
5195 \end_inset
5196
5197
5198 \begin_inset CommandInset ref
5199 LatexCommand ref
5200 reference "sec:slitex"
5201
5202 \end_inset
5203
5204 .
5205  If your machine doesn't have the 
5206 \family sans
5207 foils
5208 \family default
5209  class 
5210 \family sans
5211 FoilTeX
5212 \family default
5213  installed, you'll probably have to use the default 
5214 \family sans
5215 slides
5216 \family default
5217  class, which isn't quite as good as 
5218 \family sans
5219 foils.
5220 \end_layout
5221
5222 \begin_layout Standard
5223 The 
5224 \family sans
5225 foils
5226 \family default
5227  class is designed for use with version
5228 \begin_inset space ~
5229 \end_inset
5230
5231 2.1 of the 
5232 \family sans
5233 foils.cls
5234 \family default
5235  \SpecialChar LaTeX
5236  class file which is now an integral part of \SpecialChar LaTeX2e
5237 .
5238 \end_layout
5239
5240 \begin_layout Subsection
5241 Getting Started
5242 \end_layout
5243
5244 \begin_layout Standard
5245 Obviously, to use this document class, you need to select 
5246 \family sans
5247 FoilTeX
5248 \family default
5249  from the 
5250 \family sans
5251 Class
5252 \family default
5253  entry in the 
5254 \family sans
5255 Document
5256 \begin_inset space ~
5257 \end_inset
5258
5259 Layout
5260 \family default
5261  dialog.
5262  There are some settings in the 
5263 \family sans
5264 Document
5265 \begin_inset space ~
5266 \end_inset
5267
5268 Layout
5269 \family default
5270  dialog that you should know about that are specific to this class:
5271 \end_layout
5272
5273 \begin_layout Itemize
5274 Don't change the options 
5275 \family sans
5276 Sides
5277 \family default
5278  and 
5279 \family sans
5280 Columns
5281 \family default
5282  on the 
5283 \family sans
5284 Document
5285 \begin_inset space ~
5286 \end_inset
5287
5288 Layout
5289 \family default
5290  dialog.
5291  They're ignored by the 
5292 \family sans
5293 foils
5294 \family default
5295  class.
5296 \end_layout
5297
5298 \begin_layout Itemize
5299 The default font size is 20
5300 \begin_inset space \thinspace{}
5301 \end_inset
5302
5303 pt with the other options being 17
5304 \begin_inset space \thinspace{}
5305 \end_inset
5306
5307 pt, 25
5308 \begin_inset space \thinspace{}
5309 \end_inset
5310
5311 pt and 30
5312 \begin_inset space \thinspace{}
5313 \end_inset
5314
5315 pt.
5316 \end_layout
5317
5318 \begin_layout Itemize
5319 The default font is 
5320 \family sans
5321 sans
5322 \family default
5323  
5324 \family sans
5325 serif
5326 \family default
5327  but all math equations are still typeset in the usual roman font.
5328 \end_layout
5329
5330 \begin_layout Itemize
5331
5332 \family sans
5333 Foil\SpecialChar TeX
5334
5335 \family default
5336  supports A4 and Letter paper sizes as well as a special size for working
5337  with 35
5338 \begin_inset space \thinspace{}
5339 \end_inset
5340
5341 mm slides.
5342  It doesn't support A5, B5, legal or executive paper sizes.
5343 \end_layout
5344
5345 \begin_layout Itemize
5346 Don't bother changing the 
5347 \family sans
5348 Float Placement
5349 \family default
5350  settings because they are ignored anyway.
5351  All floats appear where they are defined in the text.
5352 \end_layout
5353
5354 \begin_layout Itemize
5355 The 
5356 \family sans
5357 Pagestyle
5358 \family default
5359  setting behaves a bit differently for this class.
5360  
5361 \family sans
5362 Foil\SpecialChar TeX
5363
5364 \family default
5365  provides extensive footer and header capabilities including a user-defined
5366  logo.
5367  See section
5368 \begin_inset space ~
5369 \end_inset
5370
5371
5372 \begin_inset CommandInset ref
5373 LatexCommand ref
5374 reference "sec:foilfoot"
5375
5376 \end_inset
5377
5378  for more details.
5379  The title page is treated differently to all other pages in the document
5380  and is 
5381 \emph on
5382 always
5383 \emph default
5384  unnumbered and 
5385 \emph on
5386 always
5387 \emph default
5388  has the logo centered at the bottom of the page (if one is defined).
5389  The possible page style choices and what they do are as follows:
5390 \begin_inset Separator latexpar
5391 \end_inset
5392
5393
5394 \end_layout
5395
5396 \begin_deeper
5397 \begin_layout Labeling
5398 \labelwidthstring MMMMMMM
5399
5400 \family sans
5401 \series bold
5402 empty
5403 \family default
5404 \series default
5405  The final output contains no page numbers, or other headers or footers
5406  (except footnotes of course).
5407  
5408 \end_layout
5409
5410 \begin_layout Labeling
5411 \labelwidthstring MMMMMMM
5412
5413 \family sans
5414 \series bold
5415 plain
5416 \family default
5417 \series default
5418  The final output contains page numbers centered at the bottom of the page.
5419  No other headings or footers (other than footnotes).
5420 \end_layout
5421
5422 \begin_layout Labeling
5423 \labelwidthstring MMMMMMM
5424
5425 \series bold
5426 foilheadings
5427 \series default
5428  Page numbers in lower right corner.
5429  Additional headers and footers are also shown.
5430  This is also the default.
5431 \end_layout
5432
5433 \begin_layout Labeling
5434 \labelwidthstring MMMMMMM
5435
5436 \series bold
5437 fancy
5438 \series default
5439  Gives you access to the 
5440 \family sans
5441 fancyheadings
5442 \family default
5443  package although its use with 
5444 \family sans
5445 Foil\SpecialChar TeX
5446
5447 \family default
5448  is discouraged by the writer of the 
5449 \family sans
5450 Foil\SpecialChar TeX
5451
5452 \family default
5453  package because of some potential page layout clashes.
5454 \end_layout
5455
5456 \end_deeper
5457 \begin_layout Subsubsection
5458 Extra Options
5459 \end_layout
5460
5461 \begin_layout Standard
5462 The following options may be used in the extra class options in the 
5463 \family sans
5464 Document\SpecialChar menuseparator
5465 Settings
5466 \family default
5467  dialog.
5468 \end_layout
5469
5470 \begin_layout Labeling
5471 \labelwidthstring MMMMMMx
5472
5473 \series bold
5474 35mmSlide
5475 \series default
5476  This sets up the page layout for 7.33
5477 \begin_inset space \thinspace{}
5478 \end_inset
5479
5480 in by 11
5481 \begin_inset space \thinspace{}
5482 \end_inset
5483
5484 in paper, which is about the same aspect ratio as a 35
5485 \begin_inset space \thinspace{}
5486 \end_inset
5487
5488 mm slide, making it a bit easier to work with this medium.
5489 \end_layout
5490
5491 \begin_layout Labeling
5492 \labelwidthstring MMMMMMx
5493
5494 \series bold
5495 headrule
5496 \series default
5497  Places a rule across the page below the header on every page except the
5498  title page.
5499 \end_layout
5500
5501 \begin_layout Labeling
5502 \labelwidthstring MMMMMMx
5503
5504 \series bold
5505 footrule
5506 \series default
5507  Places a rule across the page above the footer on every page except the
5508  title page.
5509 \end_layout
5510
5511 \begin_layout Labeling
5512 \labelwidthstring MMMMMMx
5513
5514 \series bold
5515 dvips
5516 \series default
5517  This is automatically set each time you create a new 
5518 \family sans
5519 foils
5520 \family default
5521  document.
5522  This option tells 
5523 \family sans
5524 Foil\SpecialChar TeX
5525
5526 \family default
5527  to use the dvips driver to rotate those pages that are set as landscape
5528  foils.
5529 \end_layout
5530
5531 \begin_layout Labeling
5532 \labelwidthstring MMMMMMx
5533
5534 \series bold
5535 landscape
5536 \series default
5537  Simply changes the page dimensions to those of a landscape page but doesn't
5538  do any rotation.
5539  Thus if you use this option you need to use an external program to rotate
5540  each page or feed your paper through your printer as landscape.
5541  Note that this option effectively reverses the roles of the 
5542 \family sans
5543 Foilhead
5544 \family default
5545  and 
5546 \family sans
5547 Rotatefoilhead
5548 \family default
5549  environments (don't worry these are described in the next section).
5550 \end_layout
5551
5552 \begin_layout Labeling
5553 \labelwidthstring MMMMMMx
5554
5555 \series bold
5556 leqno
5557 \series default
5558  Equation numbers on the left.
5559 \end_layout
5560
5561 \begin_layout Labeling
5562 \labelwidthstring MMMMMMx
5563
5564 \series bold
5565 fleqn
5566 \series default
5567  Flush-left equations.
5568 \end_layout
5569
5570 \begin_layout Subsection
5571 Supported Environments
5572 \end_layout
5573
5574 \begin_layout Standard
5575 Most of the environments commonly supported in other classes are also supported
5576  by the 
5577 \family sans
5578 foils
5579 \family default
5580  class.
5581  There are several additional environments provided by 
5582 \family sans
5583 Foil\SpecialChar TeX
5584
5585 \family default
5586  as well as a couple added by \SpecialChar LyX
5587 .
5588  The following environments are shared with other classes:
5589 \end_layout
5590
5591 \begin_layout Standard
5592 \begin_inset Flex Multiple Columns
5593 status open
5594
5595 \begin_layout Itemize
5596
5597 \family sans
5598 Standard
5599 \end_layout
5600
5601 \begin_layout Itemize
5602
5603 \family sans
5604 Itemize
5605 \end_layout
5606
5607 \begin_layout Itemize
5608
5609 \family sans
5610 Enumerate
5611 \end_layout
5612
5613 \begin_layout Itemize
5614
5615 \family sans
5616 Description
5617 \end_layout
5618
5619 \begin_layout Itemize
5620
5621 \family sans
5622 List
5623 \end_layout
5624
5625 \begin_layout Itemize
5626
5627 \family sans
5628 \SpecialChar LyX
5629 -Code
5630 \end_layout
5631
5632 \begin_layout Itemize
5633
5634 \family sans
5635 Verse
5636 \end_layout
5637
5638 \begin_layout Itemize
5639
5640 \family sans
5641 Quote
5642 \end_layout
5643
5644 \begin_layout Itemize
5645
5646 \family sans
5647 Quotation
5648 \end_layout
5649
5650 \begin_layout Itemize
5651
5652 \family sans
5653 Title
5654 \end_layout
5655
5656 \begin_layout Itemize
5657
5658 \family sans
5659 Author
5660 \end_layout
5661
5662 \begin_layout Itemize
5663
5664 \family sans
5665 Date
5666 \end_layout
5667
5668 \begin_layout Itemize
5669
5670 \family sans
5671 Abstract
5672 \end_layout
5673
5674 \begin_layout Itemize
5675
5676 \family sans
5677 Bibliography
5678 \end_layout
5679
5680 \begin_layout Itemize
5681
5682 \family sans
5683 Address
5684 \end_layout
5685
5686 \begin_layout Itemize
5687
5688 \family sans
5689 RightAddress
5690 \end_layout
5691
5692 \begin_layout Itemize
5693
5694 \family sans
5695 Caption
5696 \end_layout
5697
5698 \begin_layout Itemize
5699
5700 \family sans
5701 Comment
5702 \end_layout
5703
5704 \end_inset
5705
5706
5707 \end_layout
5708
5709 \begin_layout Standard
5710 That is, all the major environments apart from the sectioning environments.
5711  Since foils are essentially self-contained sections, with a title and body,
5712  
5713 \family sans
5714 Foil\SpecialChar TeX
5715
5716 \family default
5717  provides specific commands for starting new foils and these are:
5718 \end_layout
5719
5720 \begin_layout Itemize
5721
5722 \family sans
5723 Foilhead
5724 \end_layout
5725
5726 \begin_layout Itemize
5727
5728 \family sans
5729 Rotatefoilhead
5730 \end_layout
5731
5732 \begin_layout Standard
5733 \SpecialChar LyX
5734  also provides slightly modified versions of these two environments called:
5735 \end_layout
5736
5737 \begin_layout Itemize
5738
5739 \family sans
5740 ShortFoilhead
5741 \end_layout
5742
5743 \begin_layout Itemize
5744
5745 \family sans
5746 ShortRotatefoilhead
5747 \end_layout
5748
5749 \begin_layout Standard
5750 and the differences will be explained in the next section.
5751 \end_layout
5752
5753 \begin_layout Standard
5754 Since foils are often used in presenting ideas or new theorems and such
5755  
5756 \family sans
5757 Foil\SpecialChar TeX
5758
5759 \family default
5760  also provides a comprehensive box of goodies for presenting them:
5761 \end_layout
5762
5763 \begin_layout Standard
5764 \begin_inset Flex Multiple Columns
5765 status open
5766
5767 \begin_layout Itemize
5768
5769 \family sans
5770 Theorem
5771 \end_layout
5772
5773 \begin_layout Itemize
5774
5775 \family sans
5776 Lemma
5777 \end_layout
5778
5779 \begin_layout Itemize
5780
5781 \family sans
5782 Corollary
5783 \end_layout
5784
5785 \begin_layout Itemize
5786
5787 \family sans
5788 Proposition
5789 \end_layout
5790
5791 \begin_layout Itemize
5792
5793 \family sans
5794 Definition
5795 \end_layout
5796
5797 \begin_layout Itemize
5798
5799 \family sans
5800 Proof
5801 \end_layout
5802
5803 \begin_layout Itemize
5804
5805 \family sans
5806 Theorem*
5807 \end_layout
5808
5809 \begin_layout Itemize
5810
5811 \family sans
5812 Lemma*
5813 \end_layout
5814
5815 \begin_layout Itemize
5816
5817 \family sans
5818 Corollary*
5819 \end_layout
5820
5821 \begin_layout Itemize
5822
5823 \family sans
5824 Proposition*
5825 \end_layout
5826
5827 \begin_layout Itemize
5828
5829 \family sans
5830 Definition*
5831 \end_layout
5832
5833 \end_inset
5834
5835
5836 \end_layout
5837
5838 \begin_layout Standard
5839 The starred versions are unnumbered while the unstarred versions are numbered.
5840  There are also two list environments added by \SpecialChar LyX
5841  and these are:
5842 \end_layout
5843
5844 \begin_layout Itemize
5845
5846 \family sans
5847 TickList
5848 \end_layout
5849
5850 \begin_layout Itemize
5851
5852 \family sans
5853 CrossList
5854 \end_layout
5855
5856 \begin_layout Standard
5857
5858 \family sans
5859 Foil\SpecialChar TeX
5860
5861 \family default
5862  provides some powerful header and footer capabilities that are best set
5863  in the preamble although they may be set at any point in a document.
5864  If you want to change these settings in your document the best place to
5865  do so is at the very top of a foil, i.
5866 \begin_inset space \thinspace{}
5867 \end_inset
5868
5869 e.
5870 \emph on
5871
5872 \begin_inset space \space{}
5873 \end_inset
5874
5875
5876 \emph default
5877 straight after the foilhead.
5878 \end_layout
5879
5880 \begin_layout Standard
5881 For this purpose, the following command styles are provided [
5882 \shape smallcaps
5883 Martin Vermeer
5884 \shape default
5885 ]:
5886 \end_layout
5887
5888 \begin_layout Standard
5889 \begin_inset Flex Multiple Columns
5890 status open
5891
5892 \begin_layout Itemize
5893
5894 \family sans
5895 My
5896 \begin_inset space ~
5897 \end_inset
5898
5899 Logo
5900 \end_layout
5901
5902 \begin_layout Itemize
5903
5904 \family sans
5905 Restriction
5906 \end_layout
5907
5908 \begin_layout Itemize
5909
5910 \family sans
5911 Right
5912 \begin_inset space ~
5913 \end_inset
5914
5915 Footer
5916 \end_layout
5917
5918 \begin_layout Itemize
5919
5920 \family sans
5921 Right
5922 \begin_inset space ~
5923 \end_inset
5924
5925 Header
5926 \end_layout
5927
5928 \begin_layout Itemize
5929
5930 \family sans
5931 Left
5932 \begin_inset space ~
5933 \end_inset
5934
5935 Header
5936 \family default
5937
5938 \begin_inset Separator latexpar
5939 \end_inset
5940
5941
5942 \end_layout
5943
5944 \begin_deeper
5945 \begin_layout Plain Layout
5946 \begin_inset space ~
5947 \end_inset
5948
5949
5950 \end_layout
5951
5952 \end_deeper
5953 \end_inset
5954
5955
5956 \end_layout
5957
5958 \begin_layout Standard
5959 There are also a few commands provided by 
5960 \family sans
5961 Foil\SpecialChar TeX
5962
5963 \family default
5964  that aren't directly supported by \SpecialChar LyX
5965  but I'll tell you what they do and how
5966  to use them in section
5967 \begin_inset space ~
5968 \end_inset
5969
5970
5971 \begin_inset CommandInset ref
5972 LatexCommand ref
5973 reference "sec:unsuppfoils"
5974
5975 \end_inset
5976
5977 .
5978 \end_layout
5979
5980 \begin_layout Subsection
5981 Building a Set of Foils
5982 \end_layout
5983
5984 \begin_layout Standard
5985 This section will give a simple introduction to using the different environments
5986  to build a set of foils.
5987  If you want to see an example set of foils, take a look at the 
5988 \family typewriter
5989 Foils.lyx
5990 \family default
5991  file you find in \SpecialChar LyX
5992 's 
5993 \family typewriter
5994 examples
5995 \family default
5996  folder.
5997 \end_layout
5998
5999 \begin_layout Subsubsection
6000 Give It a Title Page
6001 \end_layout
6002
6003 \begin_layout Standard
6004 Unlike other classes that provide 
6005 \family sans
6006 Title
6007 \family default
6008
6009 \family sans
6010 Author
6011 \family default
6012
6013 \family sans
6014 Date
6015 \family default
6016  and 
6017 \family sans
6018 Abstract
6019 \family default
6020  environments, 
6021 \family sans
6022 foils
6023 \family default
6024  creates the title on a page of its own.
6025  If you leave out the 
6026 \family sans
6027 Date
6028 \family default
6029  environment \SpecialChar LaTeX
6030  will substitute the current date (every time you regenerate
6031  the output).
6032 \end_layout
6033
6034 \begin_layout Subsubsection
6035 Start a New Foil
6036 \end_layout
6037
6038 \begin_layout Standard
6039 As I mentioned earlier, there are four ways of starting a new foil.
6040  For portrait foils you should use 
6041 \family sans
6042 Foilhead
6043 \family default
6044  or 
6045 \family sans
6046 ShortFoilhead.
6047
6048 \family default
6049  The difference between these two environments is the amount of space between
6050  the title of the foil (the foilhead) and the body of the foil.
6051 \end_layout
6052
6053 \begin_layout Standard
6054 Landscape foils are generated using the 
6055 \family sans
6056 Rotatefoilhead
6057 \family default
6058  and 
6059 \family sans
6060 ShortRotatefoilhead
6061 \family default
6062  environments.
6063  Again the only difference is the spacing between foilhead and body.
6064  Both of the short versions have 0.5
6065 \begin_inset space ~
6066 \end_inset
6067
6068 inches less separation between the foilhead and the body.
6069  
6070 \end_layout
6071
6072 \begin_layout Standard
6073 One problem with the support for landscape foils is the requirement that
6074  you have to use the 
6075 \family typewriter
6076 dvips
6077 \family default
6078  driver to generate the PostScript output otherwise the foils won't be rotated.
6079  It is possible to get landscape foils even if you haven't got the 
6080 \family typewriter
6081 dvips
6082 \family default
6083  driver provided you can feed your foils sideways through your printer ;-)
6084 \end_layout
6085
6086 \begin_layout Subsubsection
6087 Theorems, Lemmas, Proofs and more
6088 \end_layout
6089
6090 \begin_layout Standard
6091 Due to a small bug in \SpecialChar LyX
6092  you can't have two of the same type of these environments
6093  directly following each other.
6094  They must be separated by something.
6095  If you try, you will just be extending the previous environment as if you
6096  had merged the two environments together.
6097  So, how do you get around this problem? The simplest option is to insert
6098  some text between the two environments or add a 
6099 \family sans
6100 \SpecialChar LaTeX
6101
6102 \family default
6103  environment between the two with just a 
6104 \begin_inset Quotes eld
6105 \end_inset
6106
6107
6108 \family typewriter
6109 %
6110 \family default
6111
6112 \begin_inset Quotes erd
6113 \end_inset
6114
6115  in it.
6116  This will force \SpecialChar LyX
6117  to produce two separate environments and hence the correct
6118  \SpecialChar LaTeX
6119  output.
6120  An example is provided in the example file included with the \SpecialChar LyX
6121  distribution.
6122  Remember, this problem only occurs if you are trying to place two of the
6123  same type of theorem-like environments one directly after the other.
6124 \end_layout
6125
6126 \begin_layout Subsubsection
6127 Lists
6128 \end_layout
6129
6130 \begin_layout Standard
6131 You get all the commonly supported list styles found in other classes as
6132  well as two new ones.
6133  I'll only describe the new ones here.
6134  If you want to find out more about the other list environments check out
6135  the 
6136 \emph on
6137 User's Guide.
6138
6139 \emph default
6140  If you intend to use itemized lists you might also want to read about the
6141  
6142 \family sans
6143 Itemize
6144 \begin_inset space ~
6145 \end_inset
6146
6147 Bullet
6148 \begin_inset space ~
6149 \end_inset
6150
6151 Selection
6152 \family default
6153  dialog described above in section
6154 \begin_inset space ~
6155 \end_inset
6156
6157
6158 \begin_inset CommandInset ref
6159 LatexCommand ref
6160 reference "sec:bullet"
6161
6162 \end_inset
6163
6164 .
6165 \end_layout
6166
6167 \begin_layout Standard
6168 The two new list styles, 
6169 \family sans
6170 TickList
6171 \family default
6172  and 
6173 \family sans
6174 CrossList
6175 \family default
6176 , are designed to make it easier for you to create lists of do's and don'ts
6177  or right and wrong by providing dedicated environments that use a tick
6178  or a cross as the label of the list.
6179  These lists are in fact dedicated variants of the 
6180 \family sans
6181 Itemize
6182 \family default
6183  environment.
6184  They do however require that you have the 
6185 \family typewriter
6186 psnfss
6187 \family default
6188  packages installed.
6189 \end_layout
6190
6191 \begin_layout Subsubsection
6192 Figures and Tables
6193 \end_layout
6194
6195 \begin_layout Standard
6196
6197 \family sans
6198 Foil\SpecialChar TeX
6199
6200 \family default
6201  redefines the floating tables and figures so that they appear exactly where
6202  they are in the text rather than pushing them to the top of the page or
6203  to some user specified location.
6204  In fact if you change the float placement settings they are simply ignored.
6205 \end_layout
6206
6207 \begin_layout Subsubsection
6208 Page Headers and Footers
6209 \begin_inset CommandInset label
6210 LatexCommand label
6211 name "sec:foilfoot"
6212
6213 \end_inset
6214
6215
6216 \end_layout
6217
6218 \begin_layout Standard
6219
6220 \family sans
6221 My
6222 \begin_inset space ~
6223 \end_inset
6224
6225 Logo
6226 \family default
6227  and 
6228 \family sans
6229 Restriction
6230 \family default
6231  are two commands used to control the left-footer text string.
6232  The first is meant to allow you to include a graphic logo on your foils
6233  and defaults to 
6234 \begin_inset Quotes eld
6235 \end_inset
6236
6237 -Typeset by 
6238 \family sans
6239 Foil\SpecialChar TeX
6240
6241 \family default
6242 -
6243 \begin_inset Quotes erd
6244 \end_inset
6245
6246 .
6247  While the second is meant to provide a classification for the audience,
6248  
6249 \emph on
6250 e.
6251 \begin_inset space \thinspace{}
6252 \end_inset
6253
6254 g.
6255 \emph default
6256
6257 \begin_inset space \space{}
6258 \end_inset
6259
6260 Confidential.
6261  It is empty by default.
6262 \end_layout
6263
6264 \begin_layout Standard
6265 The remaining page corners can be filled by 
6266 \family sans
6267 Right
6268 \begin_inset space ~
6269 \end_inset
6270
6271 Footer
6272 \family default
6273  (which defaults to page numbers), 
6274 \family sans
6275 Right
6276 \begin_inset space ~
6277 \end_inset
6278
6279 Header
6280 \family default
6281  (top right) and 
6282 \family sans
6283 Left
6284 \begin_inset space ~
6285 \end_inset
6286
6287 Header
6288 \family default
6289  (top left).
6290 \end_layout
6291
6292 \begin_layout Subsection
6293 Unsupported 
6294 \family sans
6295 Foil\SpecialChar TeX
6296
6297 \family default
6298  Goodies
6299 \begin_inset CommandInset label
6300 LatexCommand label
6301 name "sec:unsuppfoils"
6302
6303 \end_inset
6304
6305
6306 \end_layout
6307
6308 \begin_layout Standard
6309 All the commands mentioned below need to be set in a 
6310 \family sans
6311 \SpecialChar LaTeX
6312
6313 \family default
6314  environment or as 
6315 \family sans
6316 \SpecialChar TeX
6317
6318 \family default
6319  within another environment.
6320 \end_layout
6321
6322 \begin_layout Subsubsection
6323 Lengths
6324 \end_layout
6325
6326 \begin_layout Standard
6327 All lengths are adjusted using the 
6328 \family typewriter
6329
6330 \backslash
6331 setlength{
6332 \family default
6333 \emph on
6334 lengthname
6335 \family typewriter
6336 \emph default
6337 }{
6338 \family default
6339 \emph on
6340 newlength
6341 \family typewriter
6342 \emph default
6343 }
6344 \family default
6345  command.
6346  Where 
6347 \emph on
6348 lengthname
6349 \emph default
6350  should be replaced by the name given to the length you want to change and
6351  
6352 \emph on
6353 newlength
6354 \emph default
6355  is the length value.
6356  All lengths should be specified in units of length such as inches (
6357 \family typewriter
6358 in
6359 \family default
6360 ), millimeters (
6361 \family typewriter
6362 mm
6363 \family default
6364 ) or points (
6365 \family typewriter
6366 pt
6367 \family default
6368 ) or relative to some document or font-based length such as 
6369 \family typewriter
6370
6371 \backslash
6372 textwidth
6373 \family default
6374 .
6375  
6376 \end_layout
6377
6378 \begin_layout Standard
6379 It's possible to change the spacing between a foilhead and the body of the
6380  foil by adjusting the length specified by 
6381 \family typewriter
6382
6383 \backslash
6384 foilheadskip
6385 \family default
6386 .
6387  For example, to make 
6388 \emph on
6389 all
6390 \emph default
6391  foilheads 0.5
6392 \begin_inset space \space{}
6393 \end_inset
6394
6395 in closer to their bodies put the following in the preamble: 
6396 \family typewriter
6397
6398 \backslash
6399 setlength{
6400 \backslash
6401 foilheadskip}{-0.5in}
6402 \end_layout
6403
6404 \begin_layout Standard
6405 The spacings around floats can be adjusted by setting these lengths:
6406 \end_layout
6407
6408 \begin_layout Labeling
6409 \labelwidthstring MMMMMMMMMMM
6410
6411 \family typewriter
6412
6413 \backslash
6414 abovefloatskip
6415 \family default
6416  Separation between the text and the top of the float
6417 \end_layout
6418
6419 \begin_layout Labeling
6420 \labelwidthstring MMMMMMMMMMM
6421
6422 \family typewriter
6423
6424 \backslash
6425 abovecaptionskip
6426 \family default
6427  Separation between the float and the caption
6428 \end_layout
6429
6430 \begin_layout Labeling
6431 \labelwidthstring MMMMMMMMMMM
6432
6433 \family typewriter
6434
6435 \backslash
6436 belowcaptionskip
6437 \family default
6438  Separation between the caption and the following text
6439 \end_layout
6440
6441 \begin_layout Labeling
6442 \labelwidthstring MMMMMMMMMMM
6443
6444 \family typewriter
6445
6446 \backslash
6447 captionwidth
6448 \family default
6449  You can make the captions narrower than the surrounding text by adjusting
6450  this length.
6451  Best done relative to 
6452 \family typewriter
6453
6454 \backslash
6455 textwidth
6456 \family default
6457 .
6458 \end_layout
6459
6460 \begin_layout Standard
6461 There are also several title page related lengths that you may find useful
6462  if you have a long title or several authors:
6463 \end_layout
6464
6465 \begin_layout Labeling
6466 \labelwidthstring MMMMMMMMMMM
6467
6468 \family typewriter
6469
6470 \backslash
6471 abovetitleskip
6472 \family default
6473  Separation from headers to 
6474 \family sans
6475 Title
6476 \end_layout
6477
6478 \begin_layout Labeling
6479 \labelwidthstring MMMMMMMMMMM
6480
6481 \family typewriter
6482
6483 \backslash
6484 titleauthorskip
6485 \family default
6486  between 
6487 \family sans
6488 Title
6489 \family default
6490  and 
6491 \family sans
6492 Author
6493 \family default
6494  environments
6495 \end_layout
6496
6497 \begin_layout Labeling
6498 \labelwidthstring MMMMMMMMMMM
6499
6500 \family typewriter
6501
6502 \backslash
6503 authorauthorskip
6504 \family default
6505  between multiple 
6506 \family sans
6507 Author
6508 \family default
6509  lines
6510 \end_layout
6511
6512 \begin_layout Labeling
6513 \labelwidthstring MMMMMMMMMMM
6514
6515 \family typewriter
6516
6517 \backslash
6518 authordateskip
6519 \family default
6520  between the 
6521 \family sans
6522 Author
6523 \family default
6524  and the 
6525 \family sans
6526 Date
6527 \end_layout
6528
6529 \begin_layout Labeling
6530 \labelwidthstring MMMMMMMMMMM
6531
6532 \family typewriter
6533
6534 \backslash
6535 dateabstractskip
6536 \family default
6537  between the 
6538 \family sans
6539 Date
6540 \family default
6541  and the 
6542 \family sans
6543 Abstract
6544 \end_layout
6545
6546 \begin_layout Standard
6547 The last length related command affects all the list environments.
6548  If you place 
6549 \family typewriter
6550
6551 \backslash
6552 zerolistvertdimens
6553 \family default
6554  
6555 \emph on
6556 inside
6557 \emph default
6558  a list environment then all the vertical spacing between the list items
6559  is removed.
6560  Note that this is a command not a length so it doesn't require 
6561 \family typewriter
6562
6563 \backslash
6564 setlength
6565 \family default
6566  like the stuff mentioned above.
6567 \end_layout
6568
6569 \begin_layout Subsubsection
6570 Headers and Footers
6571 \end_layout
6572
6573 \begin_layout Standard
6574 The 
6575 \family typewriter
6576
6577 \backslash
6578 LogoOn
6579 \family default
6580  and 
6581 \family typewriter
6582
6583 \backslash
6584 LogoOff
6585 \family default
6586  commands control whether the logo in the 
6587 \family sans
6588 MyLogo
6589 \family default
6590  definition appear on a given page.
6591  If you put 
6592 \family typewriter
6593
6594 \backslash
6595 LogoOff
6596 \family default
6597  in the preamble then none of the foils will have the logo on them.
6598  If you don't want the logo on a particular page place the 
6599 \family typewriter
6600
6601 \backslash
6602 LogoOff
6603 \family default
6604  directly after the foilhead of that page and the 
6605 \family typewriter
6606
6607 \backslash
6608 LogoOn
6609 \family default
6610  directly after the next foilhead.
6611 \end_layout
6612
6613 \begin_layout Standard
6614 If you decide to use the 
6615 \family sans
6616 fancy
6617 \family default
6618  page style setting in the 
6619 \family sans
6620 Document
6621 \begin_inset space ~
6622 \end_inset
6623
6624 Layout
6625 \family default
6626  dialog you should probably add 
6627 \family typewriter
6628
6629 \backslash
6630 let
6631 \backslash
6632 headwidth
6633 \backslash
6634 textwidth
6635 \family default
6636  to your preamble so headers and footers on landscape pages are correctly
6637  placed when rotated.
6638  This is due to some clashes between the page layouts provided by the 
6639 \family sans
6640 fancyheadings
6641 \family default
6642  package and the 
6643 \family sans
6644 foils
6645 \family default
6646  class.
6647 \end_layout
6648
6649 \begin_layout Section
6650 Hollywood (Hollywood spec scripts)
6651 \end_layout
6652
6653 \begin_layout Standard
6654 by 
6655 \shape smallcaps
6656 Garst Reese
6657 \end_layout
6658
6659 \begin_layout Subsection
6660 Introduction
6661 \end_layout
6662
6663 \begin_layout Standard
6664 Getting the format of a Hollywood script right is a 
6665 \begin_inset Quotes eld
6666 \end_inset
6667
6668 rite of passage.
6669 \begin_inset Quotes erd
6670 \end_inset
6671
6672  It is designed to make the readers focus on content and to be easy and
6673  familiar for the actors to read.
6674  Each page of a script should be one minute of film.
6675  Nothing goes in a script that you cannot see or hear on screen.
6676  The courier 12 pt font should be used throughout.
6677  No italics.
6678 \end_layout
6679
6680 \begin_layout Subsection
6681 Special problems
6682 \end_layout
6683
6684 \begin_layout Standard
6685 Speakers' lines should NEVER break in mid-sentence.
6686  If a speaker's lines continue over a page break, repeat the 
6687 \family sans
6688 Speaker
6689 \family default
6690  title followed by (Cont'd).
6691 \end_layout
6692
6693 \begin_layout Subsection
6694 Special features
6695 \end_layout
6696
6697 \begin_layout Standard
6698 Insert the 
6699 \family sans
6700 Speaker
6701 \family default
6702  names as labels then cross-reference the label to insert the name.
6703  The cross-reference dialog will show the current cast of characters.
6704  You can use this to insert the speaker name in narratives also.
6705 \end_layout
6706
6707 \begin_layout Subsection
6708 Paper size and Margins
6709 \end_layout
6710
6711 \begin_layout Standard
6712 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
6713 \end_layout
6714
6715 \begin_layout Subsection
6716 Environments
6717 \end_layout
6718
6719 \begin_layout Standard
6720 The following environments are available.
6721  You can use hollywood.bind to get the bind keys shown at the right.
6722 \end_layout
6723
6724 \begin_layout Itemize
6725
6726 \family sans
6727 Standard
6728 \begin_inset Newline newline
6729 \end_inset
6730
6731
6732 \family default
6733 Used where nothing else works.
6734  Try to avoid it.
6735 \end_layout
6736
6737 \begin_layout Itemize
6738
6739 \family sans
6740 FADE_IN
6741 \family default
6742 :
6743 \begin_inset space \hfill{}
6744 \end_inset
6745
6746
6747 \family sans
6748 M-z S-I
6749 \family default
6750
6751 \begin_inset Newline newline
6752 \end_inset
6753
6754 Usually followed by something like 
6755 \begin_inset Quotes eld
6756 \end_inset
6757
6758 on Sally waking up.
6759 \begin_inset Quotes erd
6760 \end_inset
6761
6762
6763 \end_layout
6764
6765 \begin_layout Itemize
6766
6767 \family sans
6768 INT:
6769 \begin_inset space \hfill{}
6770 \end_inset
6771
6772 M-z i
6773 \begin_inset Newline newline
6774 \end_inset
6775
6776
6777 \family default
6778 Introduces a new INTERIOR camera set-up.
6779  Always followed by DAY or NIGHT, or something similar to define the lighting
6780  required.
6781  Everthing on this line in CAPS.
6782 \end_layout
6783
6784 \begin_layout Itemize
6785
6786 \family sans
6787 EXT:
6788 \begin_inset space \hfill{}
6789 \end_inset
6790
6791 M-z e
6792 \begin_inset Newline newline
6793 \end_inset
6794
6795
6796 \family default
6797 Introduces a new EXTERIOR camera set-up.
6798  Everthing on this line in CAPS.
6799 \end_layout
6800
6801 \begin_layout Itemize
6802
6803 \family sans
6804 Speaker
6805 \begin_inset space \hfill{}
6806 \end_inset
6807
6808 M-z s
6809 \begin_inset Newline newline
6810 \end_inset
6811
6812
6813 \family default
6814 The character speaking.
6815 \end_layout
6816
6817 \begin_layout Itemize
6818
6819 \family sans
6820 Parenthetical
6821 \begin_inset space \hfill{}
6822 \end_inset
6823
6824 M-z p
6825 \begin_inset Newline newline
6826 \end_inset
6827
6828
6829 \family default
6830 Instructions to the speaker.
6831  The () are automatically inserted, but only the ( will show in \SpecialChar LyX
6832 .
6833  Both will be printed.
6834 \end_layout
6835
6836 \begin_layout Itemize
6837
6838 \family sans
6839 Dialogue
6840 \begin_inset space \hfill{}
6841 \end_inset
6842
6843 M-z d
6844 \begin_inset Newline newline
6845 \end_inset
6846
6847
6848 \family default
6849 What the 
6850 \family sans
6851 Speaker
6852 \family default
6853  says.
6854 \end_layout
6855
6856 \begin_layout Itemize
6857
6858 \family sans
6859 Transition
6860 \begin_inset space \hfill{}
6861 \end_inset
6862
6863 M-z t
6864 \begin_inset Newline newline
6865 \end_inset
6866
6867
6868 \family default
6869 Camera movement instruction.
6870  e.
6871 \begin_inset space \thinspace{}
6872 \end_inset
6873
6874 g.
6875 \begin_inset space \space{}
6876 \end_inset
6877
6878 CUT TO:
6879 \end_layout
6880
6881 \begin_layout Itemize
6882
6883 \family sans
6884 FADE OUT:
6885 \begin_inset space \hfill{}
6886 \end_inset
6887
6888 M-z S-I
6889 \end_layout
6890
6891 \begin_layout Itemize
6892
6893 \family sans
6894 Author
6895 \begin_inset space \hfill{}
6896 \end_inset
6897
6898 M-z S-A
6899 \end_layout
6900
6901 \begin_layout Itemize
6902
6903 \family sans
6904 Title
6905 \begin_inset space \hfill{}
6906 \end_inset
6907
6908 M-z S-T
6909 \end_layout
6910
6911 \begin_layout Itemize
6912
6913 \family sans
6914 Right_Address
6915 \begin_inset space \hfill{}
6916 \end_inset
6917
6918 M-z r
6919 \end_layout
6920
6921 \begin_layout Subsection
6922 Script jargon
6923 \end_layout
6924
6925 \begin_layout Itemize
6926 (O.S) — off screen
6927 \end_layout
6928
6929 \begin_layout Itemize
6930 (V.0) — voice over
6931 \end_layout
6932
6933 \begin_layout Itemize
6934 b.
6935 \begin_inset space \thinspace{}
6936 \end_inset
6937
6938 g.
6939  — background
6940 \end_layout
6941
6942 \begin_layout Itemize
6943 C.U.
6944  — close-up
6945 \end_layout
6946
6947 \begin_layout Itemize
6948 PAN — camera movement
6949 \end_layout
6950
6951 \begin_layout Itemize
6952 INSERT — cut to close-up of
6953 \end_layout
6954
6955 \begin_layout Section
6956 ijmpc and ijmpd
6957 \end_layout
6958
6959 \begin_layout Standard
6960 by 
6961 \noun on
6962 Panayotis Papasotiriou
6963 \end_layout
6964
6965 \begin_layout Subsection
6966 Overview
6967 \end_layout
6968
6969 \begin_layout Standard
6970 The ijmpc package is a set of macros that facilitates electronic manuscript
6971  submission to the 
6972 \emph on
6973 International Journal of Modern Physics C
6974 \emph default
6975 .
6976  Similarly, the ijmpd package is for creating manuscripts to be submitted
6977  to the 
6978 \emph on
6979 International Journal of Modern Physics D
6980 \emph default
6981 .
6982  Both journals are published by World Scientific.
6983  The corresponding document classes are named 
6984 \family typewriter
6985 ws-ijmpc.cls
6986 \family default
6987  and 
6988 \family typewriter
6989 ws-ijmpd.cls
6990 \family default
6991 , respectively.
6992  These files, together with instructions for the authors, can be downloaded
6993  from the sites 
6994 \begin_inset Flex URL
6995 status collapsed
6996
6997 \begin_layout Plain Layout
6998
6999 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
7000 \end_layout
7001
7002 \end_inset
7003
7004  and 
7005 \begin_inset Flex URL
7006 status collapsed
7007
7008 \begin_layout Plain Layout
7009
7010 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
7011 \end_layout
7012
7013 \end_inset
7014
7015 .
7016  Both packages are modified versions of the standard 
7017 \begin_inset Quotes eld
7018 \end_inset
7019
7020 article
7021 \begin_inset Quotes erd
7022 \end_inset
7023
7024  package, and they are almost (but not exactly) identical.
7025  Most of their features are supported by \SpecialChar LyX
7026 .
7027  I have used \SpecialChar LyX
7028  successfully to write articles submitted to both journals
7029  without any problem.
7030 \end_layout
7031
7032 \begin_layout Subsection
7033 Writing a paper
7034 \end_layout
7035
7036 \begin_layout Standard
7037 As usual, the easiest way to write a paper is to start with a template.
7038  Click on 
7039 \family sans
7040 File\SpecialChar menuseparator
7041 New from
7042 \family default
7043  
7044 \family sans
7045 Template
7046 \family default
7047 , then choose the 
7048 \family typewriter
7049 ijmpc.lyx
7050 \family default
7051  or 
7052 \family typewriter
7053 ijmpd.lyx
7054 \family default
7055  template.
7056  This will give an (almost) empty document that includes the most common
7057  fields found in a manuscript.
7058  Simply overwrite the existing text (including the brackets, 
7059 \family typewriter
7060 <>
7061 \family default
7062 ) with your text.
7063  You should keep in mind the following remarks.
7064 \end_layout
7065
7066 \begin_layout Enumerate
7067 \SpecialChar LyX
7068  won't let you change the font size and the page style of the document,
7069  because such modifications are not allowed by both packages.
7070 \end_layout
7071
7072 \begin_layout Enumerate
7073 The language of the document should not be changed.
7074  Before previewing your paper, be sure that the babel package is not used.
7075  To do this, click on 
7076 \family sans
7077 Tools\SpecialChar menuseparator
7078 Preferences
7079 \family default
7080 , select the 
7081 \family sans
7082 Lang Opts
7083 \family default
7084  tab, deselect the 
7085 \family sans
7086 Use babel
7087 \family default
7088  checkbox in the language settings, and click on 
7089 \family sans
7090 Apply
7091 \family default
7092  (or 
7093 \family sans
7094 Save
7095 \family default
7096 , if you wish to make this change permanent).
7097 \end_layout
7098
7099 \begin_layout Enumerate
7100 The 
7101 \begin_inset Quotes eld
7102 \end_inset
7103
7104 Keywords
7105 \begin_inset Quotes erd
7106 \end_inset
7107
7108  style must be used to define keywords.
7109 \end_layout
7110
7111 \begin_layout Enumerate
7112 The ijmpc package provides a style named 
7113 \begin_inset Quotes eld
7114 \end_inset
7115
7116 Classification Codes
7117 \begin_inset Quotes erd
7118 \end_inset
7119
7120 , which can be used to define classification codes, such as PACS numbers.
7121  Note that this facility is not supported by the ijmpd package.
7122 \end_layout
7123
7124 \begin_layout Enumerate
7125 Several new environments are available: 
7126 \begin_inset Quotes eld
7127 \end_inset
7128
7129 Definition
7130 \begin_inset Quotes erd
7131 \end_inset
7132
7133
7134 \begin_inset Quotes eld
7135 \end_inset
7136
7137 Step
7138 \begin_inset Quotes erd
7139 \end_inset
7140
7141
7142 \begin_inset Quotes eld
7143 \end_inset
7144
7145 Example
7146 \begin_inset Quotes erd
7147 \end_inset
7148
7149
7150 \begin_inset Quotes eld
7151 \end_inset
7152
7153 Remark
7154 \begin_inset Quotes erd
7155 \end_inset
7156
7157
7158 \begin_inset Quotes eld
7159 \end_inset
7160
7161 Notation
7162 \begin_inset Quotes erd
7163 \end_inset
7164
7165
7166 \begin_inset Quotes eld
7167 \end_inset
7168
7169 Theorem
7170 \begin_inset Quotes erd
7171 \end_inset
7172
7173
7174 \begin_inset Quotes eld
7175 \end_inset
7176
7177 Proof
7178 \begin_inset Quotes erd
7179 \end_inset
7180
7181
7182 \begin_inset Quotes eld
7183 \end_inset
7184
7185 Corollary
7186 \begin_inset Quotes erd
7187 \end_inset
7188
7189
7190 \begin_inset Quotes eld
7191 \end_inset
7192
7193 Lemma
7194 \begin_inset Quotes erd
7195 \end_inset
7196
7197
7198 \begin_inset Quotes eld
7199 \end_inset
7200
7201 Proposition
7202 \begin_inset Quotes erd
7203 \end_inset
7204
7205
7206 \begin_inset Quotes eld
7207 \end_inset
7208
7209 Prop
7210 \begin_inset Quotes erd
7211 \end_inset
7212
7213
7214 \begin_inset Quotes eld
7215 \end_inset
7216
7217 Question
7218 \begin_inset Quotes erd
7219 \end_inset
7220
7221
7222 \begin_inset Quotes eld
7223 \end_inset
7224
7225 Claim
7226 \begin_inset Quotes erd
7227 \end_inset
7228
7229 , and 
7230 \begin_inset Quotes eld
7231 \end_inset
7232
7233 Conjecture
7234 \begin_inset Quotes erd
7235 \end_inset
7236
7237 .
7238  Their use is more or less obvious.
7239  \SpecialChar LyX
7240  supports all these environments; it will use the proper label, text style,
7241  and numbering scheme for each of them.
7242 \end_layout
7243
7244 \begin_layout Enumerate
7245 Both packages use basic citations; the natbib package should not be used.
7246  In \SpecialChar LyX
7247 , citation references are shown as usual; in the output, citations are
7248  shown as superscripts.
7249  If you want to use a citation as normal text, you should use the 
7250 \family typewriter
7251 refcite
7252 \family default
7253  command, e.
7254 \begin_inset space \thinspace{}
7255 \end_inset
7256
7257 g.
7258 \begin_inset space \space{}
7259 \end_inset
7260
7261
7262 \begin_inset Quotes eld
7263 \end_inset
7264
7265 See Ref.
7266 \begin_inset space \space{}
7267 \end_inset
7268
7269
7270 \family typewriter
7271
7272 \backslash
7273 refcite{key}
7274 \family default
7275
7276 \begin_inset Quotes erd
7277 \end_inset
7278
7279 .
7280 \end_layout
7281
7282 \begin_layout Enumerate
7283 There is no 
7284 \begin_inset Quotes eld
7285 \end_inset
7286
7287 Acknowledgments
7288 \begin_inset Quotes erd
7289 \end_inset
7290
7291  section in both packages.
7292  To put acknowledgments, just use the 
7293 \begin_inset Quotes eld
7294 \end_inset
7295
7296 Section*
7297 \begin_inset Quotes erd
7298 \end_inset
7299
7300  environment.
7301 \end_layout
7302
7303 \begin_layout Enumerate
7304 Appendices may be added to the paper, 
7305 \emph on
7306 after
7307 \emph default
7308  the Acknowledgments and 
7309 \shape italic
7310 before
7311 \shape default
7312  the References.
7313  \SpecialChar LyX
7314  provides a special environment, called 
7315 \begin_inset Quotes eld
7316 \end_inset
7317
7318 Appendices Section
7319 \begin_inset Quotes erd
7320 \end_inset
7321
7322  which marks the beginning of the appendices.
7323  This environment should be left blank; it just sends a \SpecialChar LaTeX
7324  command, but nothing
7325  is really printed.
7326  In \SpecialChar LyX
7327 , the word 
7328 \begin_inset Quotes eld
7329 \end_inset
7330
7331 Appendix
7332 \begin_inset Quotes erd
7333 \end_inset
7334
7335  is printed with blue letters, as a signal that all sections after that
7336  point are appendices.
7337  To write an appendix, use the 
7338 \begin_inset Quotes eld
7339 \end_inset
7340
7341 Appendix
7342 \begin_inset Quotes erd
7343 \end_inset
7344
7345  environment.
7346  \SpecialChar LyX
7347  will number each appendix with capital letters, as required by both journals.
7348  Note that 
7349 \begin_inset Quotes eld
7350 \end_inset
7351
7352 Appendices Section
7353 \begin_inset Quotes erd
7354 \end_inset
7355
7356  
7357 \emph on
7358 must
7359 \emph default
7360  be present before the first appendix; if not, all appendices will be numbered
7361  as normal sections in the output.
7362 \end_layout
7363
7364 \begin_layout Enumerate
7365 The ijmpc and the ijmpd packages use the 
7366 \family typewriter
7367 tbl
7368 \family default
7369  command to implement table captions.
7370  As a result, a table created by \SpecialChar LyX
7371  is printed correctly, but its caption
7372  is ignored.
7373  However, you can use some \SpecialChar TeX
7374  code to overcome this problem, so that captions
7375  are printed as expected.
7376  To do so, create a float table as usual, remove the caption, and replace
7377  it with the \SpecialChar TeX
7378  code 
7379 \family typewriter
7380
7381 \backslash
7382 tbl{
7383 \emph on
7384 your table caption
7385 \emph default
7386 }{
7387 \family default
7388  (sic); you must also the \SpecialChar TeX
7389  code 
7390 \family typewriter
7391 }
7392 \family default
7393  immediately after the tabular material.
7394  Study the example table included in the template files to see how this
7395  trick is implemented.
7396  Alternatively, If you need table captions, you should implement the whole
7397  table float in a 
7398 \family typewriter
7399 .tex
7400 \family default
7401  file, then include this file to the \SpecialChar LyX
7402  document (
7403 \family sans
7404 Insert\SpecialChar menuseparator
7405 File\SpecialChar menuseparator
7406 Child
7407 \begin_inset space ~
7408 \end_inset
7409
7410 Document
7411 \family default
7412 ).
7413  Details on how to create a table float can be found in the files 
7414 \family typewriter
7415 ws-ijmpc.tex
7416 \family default
7417  and 
7418 \family typewriter
7419 ws-ijmpd.tex
7420 \family default
7421 , included in the corresponding packages.
7422 \end_layout
7423
7424 \begin_layout Subsection
7425 Preparing a paper for submission
7426 \end_layout
7427
7428 \begin_layout Standard
7429 Before you submit your paper you must export the \SpecialChar LyX
7430  document as a \SpecialChar LaTeX
7431  file (
7432 \family sans
7433 File\SpecialChar menuseparator
7434 Export\SpecialChar menuseparator
7435 \SpecialChar LaTeX
7436
7437 \family default
7438 )
7439 \begin_inset Foot
7440 status open
7441
7442 \begin_layout Plain Layout
7443 Actually you have the choice between \SpecialChar LaTeX
7444  (plain) and pdflatex.
7445  If you intend to use pdflatex to prepare the paper, you should use the
7446  pdflatex option so that included graphics are converted to PDF format,
7447  ready for use by pdflatex.
7448 \end_layout
7449
7450 \end_inset
7451
7452 , then make the following changes to the resulting 
7453 \family typewriter
7454 .tex
7455 \family default
7456  file.
7457 \end_layout
7458
7459 \begin_layout Enumerate
7460 Remove the comment lines before the 
7461 \family typewriter
7462
7463 \backslash
7464 documentclass
7465 \family default
7466  command.
7467 \end_layout
7468
7469 \begin_layout Enumerate
7470 Remove everything between (and including) the 
7471 \family typewriter
7472
7473 \backslash
7474 makeatletter
7475 \family default
7476  and 
7477 \family typewriter
7478
7479 \backslash
7480 makeatother
7481 \family default
7482  commands, except for any commands you specifically put into the \SpecialChar LaTeX
7483  preamble.
7484 \end_layout
7485
7486 \begin_layout Standard
7487 The modified 
7488 \family typewriter
7489 .tex
7490 \family default
7491  file should be saved and processed through \SpecialChar LaTeX
7492  as many times as necessary.
7493  You may also want to check the resulting 
7494 \family typewriter
7495 .dvi
7496 \family default
7497  document.
7498 \end_layout
7499
7500 \begin_layout Subsection
7501 Use of \SpecialChar TeX
7502  code
7503 \end_layout
7504
7505 \begin_layout Standard
7506 The use of \SpecialChar TeX
7507  code is reduced to two commands, which must be placed at the
7508  top of the document.
7509  If you started writing your paper by using the 
7510 \family typewriter
7511 ijmpc.lyx
7512 \family default
7513  or the 
7514 \family typewriter
7515 ijmpd.lyx
7516 \family default
7517  template, the \SpecialChar TeX
7518  code needed is already in its place; you usually don't need
7519  to delete it.
7520  You may only modify the first \SpecialChar TeX
7521  code to specify the information printed
7522  to the top of odd and even pages (authors' names and short paper's title,
7523  respectively).
7524  This \SpecialChar TeX
7525  code must have the form 
7526 \family typewriter
7527
7528 \backslash
7529 markboth{Authors' Names}{Short Paper's Title}
7530 \family default
7531 .
7532 \end_layout
7533
7534 \begin_layout Section
7535 iopart
7536 \end_layout
7537
7538 \begin_layout Standard
7539 by 
7540 \noun on
7541 Uwe Stöhr
7542 \end_layout
7543
7544 \begin_layout Subsection
7545 Overview
7546 \end_layout
7547
7548 \begin_layout Standard
7549 The iopart package provides a document class to create electronic manuscript
7550  submission to the journals published by the Institute of Physics.
7551  Instructions for the authors how to create a paper using the iopart class
7552  can be downloaded together with the iopart package from the site 
7553 \begin_inset Flex URL
7554 status collapsed
7555
7556 \begin_layout Plain Layout
7557
7558 ftp://ftp.iop.org/pub/journals/latex2e
7559 \end_layout
7560
7561 \end_inset
7562
7563 .
7564 \end_layout
7565
7566 \begin_layout Subsection
7567 Writing a paper
7568 \end_layout
7569
7570 \begin_layout Standard
7571 The easiest way to write a paper is to start with the file 
7572 \emph on
7573 IOP-article.lyx
7574 \emph default
7575  that is available in \SpecialChar LyX
7576 's examples files folder.
7577  Open this file, save it under a new name, and start writing.
7578  The example file explains how to use the special text environments.
7579  Here are the most important advices:
7580 \end_layout
7581
7582 \begin_layout Itemize
7583 To be able to compile your document to a PDF, PS, or DVI, ensure that the
7584  two options 
7585 \family sans
7586 Use AMS math package
7587 \family default
7588  in the document settings under 
7589 \family sans
7590 Math Options
7591 \family default
7592  are not used!
7593 \end_layout
7594
7595 \begin_layout Itemize
7596
7597 \size normal
7598 The title environment defines the kind of your paper.
7599  So use one of the following environments for the title:
7600 \size default
7601
7602 \begin_inset Separator latexpar
7603 \end_inset
7604
7605
7606 \end_layout
7607
7608 \begin_deeper
7609 \begin_layout Itemize
7610
7611 \family sans
7612 \size normal
7613 Title
7614 \family default
7615  for a Paper
7616 \end_layout
7617
7618 \begin_layout Itemize
7619
7620 \family sans
7621 \size normal
7622 Review
7623 \family default
7624  for a Review
7625 \end_layout
7626
7627 \begin_layout Itemize
7628
7629 \family sans
7630 \size normal
7631 Topical
7632 \family default
7633  for a Topical review
7634 \end_layout
7635
7636 \begin_layout Itemize
7637
7638 \family sans
7639 \size normal
7640 Comment
7641 \family default
7642  for a Comment
7643 \end_layout
7644
7645 \begin_layout Itemize
7646
7647 \family sans
7648 \size normal
7649 Note
7650 \family default
7651  for a Note
7652 \end_layout
7653
7654 \begin_layout Itemize
7655
7656 \family sans
7657 \size normal
7658 Paper
7659 \family default
7660  for a Paper (same as Title)
7661 \end_layout
7662
7663 \begin_layout Itemize
7664
7665 \family sans
7666 \size normal
7667 Prelim
7668 \family default
7669  for a Preliminary communication
7670 \end_layout
7671
7672 \begin_layout Itemize
7673
7674 \family sans
7675 \size normal
7676 Rapid
7677 \family default
7678  for a Rapid communication
7679 \end_layout
7680
7681 \begin_layout Itemize
7682
7683 \family sans
7684 \size normal
7685 Letter
7686 \family default
7687  for a Letter to the editor
7688 \end_layout
7689
7690 \end_deeper
7691 \begin_layout Itemize
7692
7693 \size normal
7694 All title environments except of 
7695 \family sans
7696 Letter
7697 \family default
7698  can have an optional short title.
7699 \end_layout
7700
7701 \begin_layout Itemize
7702 There is a general title environment 
7703 \family sans
7704 Article
7705 \family default
7706  which is not directly supported by the \SpecialChar LyX
7707 .
7708  This can be used as \SpecialChar TeX
7709  code when your document doesn't fit into one of the
7710  other title types.
7711 \end_layout
7712
7713 \begin_layout Standard
7714 For more informations like hints for special table and formula formatting,
7715  look at the IOP author guidelines.
7716 \end_layout
7717
7718 \begin_layout Section
7719 Kluwer
7720 \end_layout
7721
7722 \begin_layout Standard
7723 by 
7724 \noun on
7725 Panayotis Papasotiriou
7726 \end_layout
7727
7728 \begin_layout Subsection
7729 Overview
7730 \end_layout
7731
7732 \begin_layout Standard
7733 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
7734  that facilitates electronic manuscript submission to the journals they
7735  publish.
7736  Most known of them (at least in my domain of interest) are 
7737 \emph on
7738 Astrophysics and Space Science
7739 \emph default
7740  and 
7741 \emph on
7742 Solar Physics
7743 \emph default
7744 , but there are many others (see a complete list at 
7745 \begin_inset Flex URL
7746 status open
7747
7748 \begin_layout Plain Layout
7749
7750 http://www.wkap.nl/jrnllist.htm/JRNLHOME
7751 \end_layout
7752
7753 \end_inset
7754
7755 ).
7756  The Kluwer package may be downloaded from the site 
7757 \begin_inset Flex URL
7758 status collapsed
7759
7760 \begin_layout Plain Layout
7761
7762 http://www.wkap.nl/kaphtml.htm/STYLEFILES
7763 \end_layout
7764
7765 \end_inset
7766
7767 .
7768  A complete user guide is contained in that package (but it can also be
7769  downloaded separately).
7770 \end_layout
7771
7772 \begin_layout Standard
7773 \SpecialChar LyX
7774  supports many features of the package but not everything.
7775  However, the \SpecialChar TeX
7776  code needed is reduced to some 
7777 \begin_inset Quotes eld
7778 \end_inset
7779
7780 peculiar
7781 \begin_inset Quotes erd
7782 \end_inset
7783
7784  commands of the package (see
7785 \begin_inset space ~
7786 \end_inset
7787
7788
7789 \begin_inset CommandInset ref
7790 LatexCommand ref
7791 reference "subsec:kluwer_peculiarities"
7792
7793 \end_inset
7794
7795 ).
7796  I have recently used \SpecialChar LyX
7797  to write an article submitted to the 
7798 \emph on
7799 Astrophysics and Space Science
7800 \emph default
7801  without any problem.
7802 \end_layout
7803
7804 \begin_layout Subsection
7805 Writing a paper
7806 \end_layout
7807
7808 \begin_layout Standard
7809 The easiest way to write a paper is to start with the Kluwer template file.
7810  Click on 
7811 \family sans
7812 File\SpecialChar menuseparator
7813 New from
7814 \family default
7815  
7816 \family sans
7817 Template
7818 \family default
7819 , then choose the 
7820 \family typewriter
7821 kluwer.lyx
7822 \family default
7823  template.
7824  This will give an (almost) empty document that includes the most common
7825  fields found in a manuscript and a short description of their use.
7826  As in most templates, simply overwrite the existing text (including the
7827  brackets, 
7828 \family typewriter
7829 <>
7830 \family default
7831 ) with the correct information.
7832 \end_layout
7833
7834 \begin_layout Subsection
7835 Preparing a paper for submission
7836 \end_layout
7837
7838 \begin_layout Standard
7839 As in the AAS\SpecialChar TeX
7840  package, before you submit your paper to a journal you must
7841  
7842 \begin_inset Quotes eld
7843 \end_inset
7844
7845 postprocess
7846 \begin_inset Quotes erd
7847 \end_inset
7848
7849  it as follows.
7850 \end_layout
7851
7852 \begin_layout Enumerate
7853 Export your paper as a \SpecialChar LaTeX
7854  file.
7855  To do this, click on 
7856 \family sans
7857 File\SpecialChar menuseparator
7858 Export\SpecialChar menuseparator
7859 \SpecialChar LaTeX
7860
7861 \family default
7862 .
7863  
7864 \end_layout
7865
7866 \begin_layout Enumerate
7867 Edit the resulting 
7868 \family typewriter
7869 .tex
7870 \family default
7871  file with a text editor and make the following changes
7872 \begin_inset Separator latexpar
7873 \end_inset
7874
7875
7876 \end_layout
7877
7878 \begin_deeper
7879 \begin_layout Enumerate
7880 remove the comment lines before the 
7881 \family typewriter
7882
7883 \backslash
7884 documentclass
7885 \family default
7886  command,
7887 \end_layout
7888
7889 \begin_layout Enumerate
7890 remove everything between (and including) the 
7891 \family typewriter
7892
7893 \backslash
7894 makeatletter
7895 \family default
7896  and 
7897 \family typewriter
7898
7899 \backslash
7900 makeatother
7901 \family default
7902  commands, except for any commands you specifically put into the \SpecialChar LaTeX
7903  preamble.
7904 \end_layout
7905
7906 \begin_layout Standard
7907 Save the resulting 
7908 \family typewriter
7909 .tex
7910 \family default
7911  file.
7912 \end_layout
7913
7914 \end_deeper
7915 \begin_layout Enumerate
7916 Run the 
7917 \family typewriter
7918 .tex
7919 \family default
7920  file through \SpecialChar LaTeX
7921  as many times as necessary (usually up to three).
7922 \end_layout
7923
7924 \begin_layout Enumerate
7925 View the resulting 
7926 \family typewriter
7927 .dvi
7928 \family default
7929  document using, e.
7930 \begin_inset space \thinspace{}
7931 \end_inset
7932
7933 g.
7934 \begin_inset space \space{}
7935 \end_inset
7936
7937
7938 \family sans
7939 xdvi
7940 \family default
7941 , and check if everything is OK (it should, if you didn't make any mistake).
7942 \end_layout
7943
7944 \begin_layout Subsection
7945 \begin_inset Quotes eld
7946 \end_inset
7947
7948 Peculiarities
7949 \begin_inset Quotes erd
7950 \end_inset
7951
7952  of the Kluwer package
7953 \begin_inset CommandInset label
7954 LatexCommand label
7955 name "subsec:kluwer_peculiarities"
7956
7957 \end_inset
7958
7959
7960 \end_layout
7961
7962 \begin_layout Standard
7963 The Kluwer package has the following 
7964 \begin_inset Quotes eld
7965 \end_inset
7966
7967 peculiarities
7968 \begin_inset Quotes erd
7969 \end_inset
7970
7971 .
7972 \end_layout
7973
7974 \begin_layout Enumerate
7975 It is possible to write multiple articles in the same \SpecialChar LaTeX
7976  file
7977 \begin_inset Foot
7978 status collapsed
7979
7980 \begin_layout Plain Layout
7981 I can't imagine any good reason to do this.
7982 \end_layout
7983
7984 \end_inset
7985
7986 .
7987  Each article must be included in the environment 
7988 \begin_inset Quotes eld
7989 \end_inset
7990
7991 article
7992 \begin_inset Quotes erd
7993 \end_inset
7994
7995 .
7996  Unfortunately, this environment cannot be omitted, even if you write just
7997  one article.
7998  Therefore, each article starts with the command 
7999 \family typewriter
8000
8001 \backslash
8002 begin{article}
8003 \family default
8004  and, obviously, ends with the command 
8005 \family typewriter
8006
8007 \backslash
8008 end{article}
8009 \family default
8010 .
8011  Although this can be implemented in \SpecialChar LyX
8012 , I didn't included it, since it looks
8013  ugly and can confuse the novice user.
8014  Therefore, you need to enter them directly and mark them as \SpecialChar LaTeX
8015  code (the
8016  well-known 
8017 \begin_inset Quotes eld
8018 \end_inset
8019
8020 \SpecialChar TeX
8021  code
8022 \begin_inset Quotes erd
8023 \end_inset
8024
8025 ).
8026 \end_layout
8027
8028 \begin_layout Enumerate
8029 Information given at the beginning of the article (i.
8030 \begin_inset space \thinspace{}
8031 \end_inset
8032
8033 e.
8034 \begin_inset space \space{}
8035 \end_inset
8036
8037 title, subtitle, author, institution, running title, running author, abstract
8038  and keywords) must be included in an environment called 
8039 \begin_inset Quotes eld
8040 \end_inset
8041
8042 opening
8043 \begin_inset Quotes erd
8044 \end_inset
8045
8046 .
8047  This is not implemented in \SpecialChar LyX
8048 , so you must enter title, subtitle etc.
8049 \begin_inset space ~
8050 \end_inset
8051
8052 between two \SpecialChar TeX
8053  code lines (
8054 \family typewriter
8055
8056 \backslash
8057 begin{opening}
8058 \family default
8059  and 
8060 \family typewriter
8061
8062 \backslash
8063 end{opening}
8064 \family default
8065 ).
8066 \end_layout
8067
8068 \begin_layout Enumerate
8069 According to the user manual, the label of each bibliography item must be
8070  written as 
8071 \family typewriter
8072
8073 \backslash
8074 protect
8075 \backslash
8076 citeauthoryear{
8077 \family default
8078 \emph on
8079 author(s)
8080 \family typewriter
8081 \emph default
8082 }{
8083 \family default
8084 \emph on
8085 year
8086 \family typewriter
8087 \emph default
8088 }
8089 \family default
8090 .
8091 \end_layout
8092
8093 \begin_layout Standard
8094 The 
8095 \family typewriter
8096 kluwer.lyx
8097 \family default
8098  template takes care of all these 
8099 \begin_inset Quotes eld
8100 \end_inset
8101
8102 peculiarities
8103 \begin_inset Quotes erd
8104 \end_inset
8105
8106 .
8107  If you start a new paper using this template you don't need to do anything
8108  special.
8109  Just 
8110 \end_layout
8111
8112 \begin_layout Enumerate
8113 don't delete the \SpecialChar TeX
8114  code included in the template, and
8115 \end_layout
8116
8117 \begin_layout Enumerate
8118 copy the example bibliography item included in the template and modify it
8119  as necessary to enter new bibliography items.
8120 \end_layout
8121
8122 \begin_layout Section
8123 Koma-Script
8124 \end_layout
8125
8126 \begin_layout Standard
8127 by 
8128 \noun on
8129 Bernd Rellermeyer
8130 \end_layout
8131
8132 \begin_layout Subsection
8133 Overview
8134 \end_layout
8135
8136 \begin_layout Standard
8137 The \SpecialChar LyX
8138  document classes 
8139 \emph on
8140 article (koma-script)
8141 \emph default
8142
8143 \emph on
8144 report (koma-script)
8145 \emph default
8146
8147 \emph on
8148 book
8149 \emph default
8150  
8151 \emph on
8152 (koma-script)
8153 \emph default
8154 , and 
8155 \emph on
8156 letter
8157 \emph default
8158  
8159 \emph on
8160 (koma-script)
8161 \emph default
8162  correspond to the \SpecialChar LaTeX
8163  document classes 
8164 \family typewriter
8165 scrartcl.cls
8166 \family default
8167
8168 \family typewriter
8169 scrreprt.cls
8170 \family default
8171
8172 \family typewriter
8173 scrbook.cls
8174 \family default
8175 , and 
8176 \family typewriter
8177 scrlettr.cls
8178 \family default
8179 , resp.
8180 \begin_inset space ~
8181 \end_inset
8182
8183 of the Koma-Script family.
8184  They are replacements for the standard document classes 
8185 \family typewriter
8186 article.cls
8187 \family default
8188
8189 \family typewriter
8190 report.cls
8191 \family default
8192
8193 \family typewriter
8194 book.cls
8195 \family default
8196  and 
8197 \family typewriter
8198 letter.cls
8199 \family default
8200 , resp., and fit better to European typography conventions in a number of
8201  points.
8202 \end_layout
8203
8204 \begin_layout Itemize
8205 Standard character size is 11pt in 
8206 \emph on
8207 article (koma-script)
8208 \emph default
8209
8210 \emph on
8211 report (koma-script)
8212 \emph default
8213 , and 
8214 \emph on
8215 book (koma-script)
8216 \emph default
8217 , and 12pt in 
8218 \emph on
8219 letter (koma-script)
8220 \emph default
8221 .
8222 \end_layout
8223
8224 \begin_layout Itemize
8225 Headings, labels of the description environment, and a number of elements
8226  of the 
8227 \emph on
8228 letter (koma-script)
8229 \emph default
8230  document class are set in a bold sans serif font.
8231 \begin_inset Foot
8232 status collapsed
8233
8234 \begin_layout Plain Layout
8235 There is a big difference between the bold sans serif old cm fonts and new
8236  ec fonts, especially in the appearance of headings.
8237  In comparison, the ec bold sans serif fonts look a bit thin.
8238  Here the \SpecialChar LaTeX
8239  package 
8240 \family typewriter
8241 cmsd.sty by
8242 \family default
8243  
8244 \shape smallcaps
8245 Walter Schmidt
8246 \shape default
8247  helps to produce the 
8248 \begin_inset Quotes eld
8249 \end_inset
8250
8251 usual
8252 \begin_inset Quotes erd
8253 \end_inset
8254
8255  appearance when using the ec fonts.
8256 \end_layout
8257
8258 \end_inset
8259
8260  The numbering of chapter headings is made in the same way as the numbering
8261  of section headings, that is without the extra line 
8262 \begin_inset Quotes eld
8263 \end_inset
8264
8265 Chapter\SpecialChar ldots
8266
8267 \begin_inset Quotes erd
8268 \end_inset
8269
8270 .
8271  In addition, the appearance of the headings can be modified by using a
8272  number of options (in \SpecialChar LyX
8273  to be entered in the field 
8274 \family sans
8275 Extra
8276 \begin_inset space ~
8277 \end_inset
8278
8279 Options
8280 \family default
8281  of the dialog 
8282 \family sans
8283 Layout\SpecialChar menuseparator
8284 Document
8285 \family default
8286 ).
8287  
8288 \end_layout
8289
8290 \begin_layout Itemize
8291 The main means in the Koma-Script document classes to design the type area
8292  are the options 
8293 \family sans
8294 BCOR
8295 \family default
8296  and 
8297 \family sans
8298 DIV
8299 \family default
8300  (in \SpecialChar LyX
8301  to be entered in the extra class options field in the dialog 
8302 \family sans
8303 Document\SpecialChar menuseparator
8304 Settings
8305 \family default
8306 ).
8307  They make a clearer modification of page margins possible as do the options
8308  of the dialog 
8309 \family sans
8310 Document\SpecialChar menuseparator
8311 Settings
8312 \family default
8313 .
8314  
8315 \end_layout
8316
8317 \begin_layout Itemize
8318 The \SpecialChar LaTeX
8319  document classes of the Koma-Script family define a number of additional
8320  commands.
8321  Those part of it which makes sense in \SpecialChar LyX
8322  is implemented in corresponding
8323  paragraph types.
8324 \end_layout
8325
8326 \begin_layout Standard
8327 Detailed descriptions of the \SpecialChar LaTeX
8328  document classes of the Koma-Script family
8329  can be found in the Koma-Script documentation 
8330 \emph on
8331 scrguide
8332 \emph default
8333  (German) and 
8334 \emph on
8335 scrguien
8336 \emph default
8337  (English).
8338 \end_layout
8339
8340 \begin_layout Subsection
8341 article (koma-script), report (koma-script), and book (koma-script)
8342 \end_layout
8343
8344 \begin_layout Standard
8345 The document classes 
8346 \emph on
8347 article (koma-script)
8348 \emph default
8349
8350 \emph on
8351 report (koma-script)
8352 \emph default
8353 , and 
8354 \emph on
8355 book
8356 \emph default
8357  
8358 \emph on
8359 (koma-script)
8360 \emph default
8361  are implemented in the layout files 
8362 \family typewriter
8363 scrartcl.layout
8364 \family default
8365
8366 \family typewriter
8367 scrreprt.layout
8368 \family default
8369 , and 
8370 \family typewriter
8371 scrbook.layout
8372 \family default
8373 , resp.
8374  They contain all the paragraph types of the corresponding standard document
8375  classes 
8376 \emph on
8377 article
8378 \emph default
8379
8380 \emph on
8381 report
8382 \emph default
8383 , and 
8384 \emph on
8385 book
8386 \emph default
8387 , resp., partly modified, with the exception of the \SpecialChar LyX
8388  specific 
8389 \family sans
8390 List
8391 \family default
8392 -type, which is replaced by the new 
8393 \family sans
8394 Labeling
8395 \family default
8396 -type having the same functionality.
8397  Beside the 
8398 \family sans
8399 Labeling
8400 \family default
8401 -Type there is a number of new paragraph types added.
8402  They are 
8403 \emph on
8404 not
8405 \emph default
8406  part of 
8407 \emph on
8408 letter (koma-script)
8409 \emph default
8410 .
8411 \end_layout
8412
8413 \begin_layout Itemize
8414
8415 \family sans
8416 Addpart, Addchap
8417 \family default
8418
8419 \family sans
8420 Addsec
8421 \family default
8422 : are equivalents to 
8423 \family sans
8424 Part*, Chapter*
8425 \family default
8426  and 
8427 \family sans
8428 Section*
8429 \family default
8430 , resp., additionally inserting an entry in the table of contents.
8431  
8432 \family sans
8433 Addpart
8434 \family default
8435  and 
8436 \family sans
8437 Addchap
8438 \family default
8439  are not contained in 
8440 \emph on
8441 article (koma-script)
8442 \emph default
8443 .
8444 \end_layout
8445
8446 \begin_layout Itemize
8447
8448 \family sans
8449 Addchap*
8450 \family default
8451
8452 \family sans
8453 Addsec*
8454 \family default
8455 : behave exactly as 
8456 \family sans
8457 Addchap
8458 \family default
8459  and 
8460 \family sans
8461 Addsec
8462 \family default
8463 , resp., additionally clearing running heads.
8464  
8465 \family sans
8466 Addchap*
8467 \family default
8468  is not contained in 
8469 \emph on
8470 article (koma-script)
8471 \emph default
8472 .
8473 \begin_inset Foot
8474 status collapsed
8475
8476 \begin_layout Plain Layout
8477 There is also an 
8478 \family typewriter
8479
8480 \backslash
8481 addpart*
8482 \family default
8483  command in 
8484 \emph on
8485 book (koma-script)
8486 \emph default
8487  and in 
8488 \emph on
8489 report (koma-script)
8490 \emph default
8491 , but since this is identical to 
8492 \family sans
8493 Part*
8494 \family default
8495 , is has not been implemented in \SpecialChar LyX
8496 .
8497 \end_layout
8498
8499 \end_inset
8500
8501
8502 \end_layout
8503
8504 \begin_layout Itemize
8505
8506 \family sans
8507 Minisec
8508 \family default
8509 : generates a heading directly above the following paragraph in the standard
8510  character size without affecting the structure of the document.
8511 \end_layout
8512
8513 \begin_layout Itemize
8514
8515 \family sans
8516 Captionabove
8517 \family default
8518  and 
8519 \family sans
8520 Captionbelow
8521 \family default
8522  are special captions which respect the different space settings needed
8523  for captions placed above or below an element (if you follow strict typographic
8524  rules, you might want to place table captions always above the table).
8525  You can also use the class option 
8526 \family typewriter
8527 tablecaptionsabove
8528 \family default
8529 , which will switch 
8530 \family sans
8531 caption
8532 \family default
8533  to 
8534 \family sans
8535 captionabove
8536 \family default
8537  for tables and 
8538 \family sans
8539 captionbelow
8540 \family default
8541  for figures.
8542  You need at least Koma-Script version 2.8q to use this.
8543 \end_layout
8544
8545 \begin_layout Itemize
8546
8547 \family sans
8548 Dictum
8549 \family default
8550 : can be used to set a bonmot, e.
8551 \begin_inset space \thinspace{}
8552 \end_inset
8553
8554 g.
8555 \begin_inset space \space{}
8556 \end_inset
8557
8558 at the beginning of a chapter.
8559  If you use the optional argument (
8560 \family sans
8561 Insert\SpecialChar menuseparator
8562 Short
8563 \begin_inset space ~
8564 \end_inset
8565
8566 Title
8567 \family default
8568 ), you can insert the dictum's author there.
8569  Dictum and author are separated by a line.
8570  You need at least Koma-Script version 2.8q to use this.
8571  
8572 \family sans
8573 Dictum
8574 \family default
8575  is not contained in 
8576 \emph on
8577 article (koma-script)
8578 \emph default
8579 .
8580 \end_layout
8581
8582 \begin_layout Standard
8583 The following types, together with the standard types 
8584 \family sans
8585 Title
8586 \family default
8587
8588 \family sans
8589 Author
8590 \family default
8591 , and 
8592 \family sans
8593 Date
8594 \family default
8595 , form the title area of the document.
8596  They must be entered ahead of the first 
8597 \begin_inset Quotes eld
8598 \end_inset
8599
8600 ordinary
8601 \begin_inset Quotes erd
8602 \end_inset
8603
8604  paragraph.
8605 \begin_inset Foot
8606 status collapsed
8607
8608 \begin_layout Plain Layout
8609 The corresponding \SpecialChar LaTeX
8610  commands must appear before the 
8611 \family typewriter
8612
8613 \backslash
8614 maketitle
8615 \family default
8616  command.
8617 \end_layout
8618
8619 \end_inset
8620
8621  When such a type is used more than once, the latter usage overwrites the
8622  former one, that means, for every type only the latest usage is valid.
8623  The order of the different types however has, like 
8624 \family sans
8625 Title
8626 \family default
8627
8628 \family sans
8629 Author
8630 \family default
8631 , and 
8632 \family sans
8633 Date
8634 \family default
8635 , no effect on the appearance of the produced document.
8636 \end_layout
8637
8638 \begin_layout Itemize
8639
8640 \family sans
8641 Subject
8642 \family default
8643 : produces a centered paragraph above the ordinary title (
8644 \family sans
8645 Title
8646 \family default
8647
8648 \family sans
8649 Author
8650 \family default
8651
8652 \family sans
8653 Date
8654 \family default
8655 ) for the subject of the document.
8656 \end_layout
8657
8658 \begin_layout Itemize
8659
8660 \family sans
8661 Publishers
8662 \family default
8663 : produces a centered paragraph below the ordinary title (
8664 \family sans
8665 Title
8666 \family default
8667
8668 \family sans
8669 Author
8670 \family default
8671
8672 \family sans
8673 Date
8674 \family default
8675 ) for the publishers' name.
8676 \end_layout
8677
8678 \begin_layout Itemize
8679
8680 \family sans
8681 Dedication
8682 \family default
8683 : in 
8684 \emph on
8685 report (koma-script)
8686 \emph default
8687  and 
8688 \emph on
8689 book (koma-script)
8690 \emph default
8691  produces a centered paragraph on its own page behind the title page, or
8692  in 
8693 \emph on
8694 article (koma-script)
8695 \emph default
8696  produces a centered paragraph below the ordinary title (
8697 \family sans
8698 Title
8699 \family default
8700
8701 \family sans
8702 Author
8703 \family default
8704
8705 \family sans
8706 Date
8707 \family default
8708
8709 \family sans
8710 Publishers
8711 \family default
8712 ) for a dedication.
8713 \end_layout
8714
8715 \begin_layout Itemize
8716
8717 \family sans
8718 Titlehead
8719 \family default
8720 : produces a left aligned paragraph above the ordinary title (
8721 \family sans
8722 Title
8723 \family default
8724
8725 \family sans
8726 Author
8727 \family default
8728
8729 \family sans
8730 Date
8731 \family default
8732
8733 \family sans
8734 Subject
8735 \family default
8736 ) for a document`s head.
8737 \end_layout
8738
8739 \begin_layout Itemize
8740
8741 \family sans
8742 Uppertitleback
8743 \family default
8744 : produces in a double-sided print in 
8745 \emph on
8746 report (koma-script)
8747 \emph default
8748  and 
8749 \emph on
8750 book (koma-script)
8751 \emph default
8752  a left-aligned paragraph at the top of the title page`s back or has no
8753  effect in a single-sided print or in 
8754 \emph on
8755 article (koma-script)
8756 \emph default
8757 .
8758 \end_layout
8759
8760 \begin_layout Itemize
8761
8762 \family sans
8763 Lowertitleback
8764 \family default
8765 : produces in a double-sided print in 
8766 \emph on
8767 report (koma-script)
8768 \emph default
8769  and 
8770 \emph on
8771 book (koma-script)
8772 \emph default
8773  a left-aligned paragraph at the bottom of the title page`s back or has
8774  no effect in a single-sided print or in 
8775 \emph on
8776 article (koma-script)
8777 \emph default
8778 .
8779 \end_layout
8780
8781 \begin_layout Itemize
8782
8783 \family sans
8784 Extratitle
8785 \family default
8786 : produces a special 
8787 \begin_inset Quotes eld
8788 \end_inset
8789
8790 dirty
8791 \begin_inset Quotes erd
8792 \end_inset
8793
8794  page ahead of the actual document containing a paragraph without special
8795  formatting.
8796 \end_layout
8797
8798 \begin_layout Standard
8799 The layout files for the document classes 
8800 \emph on
8801 article (koma-script)
8802 \emph default
8803
8804 \emph on
8805 report (koma-script)
8806 \emph default
8807 , and 
8808 \emph on
8809 book (koma-script)
8810 \emph default
8811  do include the file 
8812 \family typewriter
8813 scrmacros.inc
8814 \family default
8815 .
8816  This is thought of as a place to define your own types.
8817  Copy scrmacros
8818 \family typewriter
8819 .inc
8820 \family default
8821  in your personal layout directory and edit the file!
8822 \end_layout
8823
8824 \begin_layout Subsection
8825 letter (koma-script)
8826 \end_layout
8827
8828 \begin_layout Standard
8829 \noindent
8830 The document class 
8831 \emph on
8832 letter (koma-script)
8833 \emph default
8834  is implemented in the layout file 
8835 \family typewriter
8836 scrlettr.layout
8837 \family default
8838 .
8839  It contains all the paragraph types of the corresponding standard document
8840  class 
8841 \emph on
8842 letter
8843 \emph default
8844 , partly modified, with the exception of the \SpecialChar LyX
8845  specific types 
8846 \family sans
8847 \SpecialChar LyX
8848 -Code
8849 \family default
8850  and 
8851 \family sans
8852 Comment
8853 \family default
8854  and the 
8855 \family sans
8856 List
8857 \family default
8858  type, which is replaced by the new 
8859 \family sans
8860 Labeling
8861 \family default
8862  type.
8863  In addition, it contains, in contrast to the standard document class, the
8864  standard types 
8865 \family sans
8866 \SpecialChar LaTeX
8867
8868 \family default
8869
8870 \family sans
8871 Quotation
8872 \family default
8873
8874 \family sans
8875 Quote
8876 \family default
8877 , and 
8878 \family sans
8879 Verse
8880 \family default
8881 .
8882  Furthermore, there are a number of new letter specific types.
8883 \end_layout
8884
8885 \begin_layout Standard
8886 The appearance of the letter produced by this document class can be controlled
8887  by a number of \SpecialChar LaTeX
8888  commands, which you can put in the \SpecialChar LaTeX
8889  preamble.
8890 \begin_inset Foot
8891 status collapsed
8892
8893 \begin_layout Plain Layout
8894 For example, the standard appearance of the letter`s heading, consisting
8895  of name and address, is quite self-willed.
8896  An 
8897 \begin_inset Quotes eld
8898 \end_inset
8899
8900 ordinary
8901 \begin_inset Quotes erd
8902 \end_inset
8903
8904  heading is produced by the following \SpecialChar LaTeX
8905  commands in the preamble:
8906 \end_layout
8907
8908 \begin_layout LyX-Code
8909
8910 \backslash
8911 firsthead{
8912 \backslash
8913 parbox[b]{
8914 \backslash
8915 textwidth}
8916 \end_layout
8917
8918 \begin_layout LyX-Code
8919   {
8920 \backslash
8921 ignorespaces 
8922 \backslash
8923 fromname
8924 \backslash
8925
8926 \backslash
8927  
8928 \backslash
8929 ignorespaces 
8930 \backslash
8931 fromaddress}} 
8932 \end_layout
8933
8934 \begin_layout LyX-Code
8935
8936 \backslash
8937 nexthead{
8938 \backslash
8939 parbox[b]{
8940 \backslash
8941 textwidth}
8942 \end_layout
8943
8944 \begin_layout LyX-Code
8945   {
8946 \backslash
8947 ignorespaces 
8948 \backslash
8949 fromname 
8950 \backslash
8951 hfill 
8952 \backslash
8953 ignorespaces 
8954 \backslash
8955 pagename
8956 \backslash
8957  
8958 \backslash
8959 thepage}}
8960 \end_layout
8961
8962 \end_inset
8963
8964  A detailed German description of such \SpecialChar LaTeX
8965  commands can be found in the Koma-Script
8966  documentation 
8967 \emph on
8968 scrguide
8969 \emph default
8970 .
8971  With it, the letter's author can produce his personal letter layout.
8972 \end_layout
8973
8974 \begin_layout Standard
8975 The types 
8976 \family sans
8977 Letter
8978 \family default
8979  and 
8980 \family sans
8981 Opening
8982 \family default
8983  define the beginning of the letter and must be used in every letter.
8984  To emphasize them in the \SpecialChar LyX
8985  document class, they are marked with the letter
8986  
8987 \shape italic
8988 L
8989 \shape default
8990  or 
8991 \shape italic
8992 O
8993 \shape default
8994 , resp.
8995 \begin_inset space ~
8996 \end_inset
8997
8998 in the left margin.
8999  It is possible to write any number of letters in one file.
9000  An 
9001 \family sans
9002 Opening
9003 \family default
9004  type produces a new letter using the same addressee and a 
9005 \family sans
9006 Letter
9007 \family default
9008  type produces a new addressee.
9009  The types 
9010 \family sans
9011 Closing
9012 \family default
9013
9014 \family sans
9015 PS
9016 \family default
9017
9018 \family sans
9019 CC
9020 \family default
9021 , and 
9022 \family sans
9023 Encl
9024 \family default
9025  are ordinary paragraph types and can also be used several times in one
9026  and the same letter.
9027 \end_layout
9028
9029 \begin_layout Itemize
9030
9031 \family sans
9032 Letter
9033 \family default
9034 : produces a paragraph for the addressee and implicitly defines the beginning
9035  of the letter.
9036 \end_layout
9037
9038 \begin_layout Itemize
9039
9040 \family sans
9041 Opening
9042 \family default
9043 : produces a paragraph for the form of address and implicitly produces a
9044  new letter.
9045 \end_layout
9046
9047 \begin_layout Itemize
9048
9049 \family sans
9050 Closing
9051 \family default
9052 : produces a paragraph for a close.
9053 \end_layout
9054
9055 \begin_layout Itemize
9056
9057 \family sans
9058 PS
9059 \family default
9060 : produces a paragraph for a postscript.
9061 \end_layout
9062
9063 \begin_layout Itemize
9064
9065 \family sans
9066 CC
9067 \family default
9068 : produces a paragraph for a distribution list.
9069 \end_layout
9070
9071 \begin_layout Itemize
9072
9073 \family sans
9074 Encl
9075 \family default
9076 : produces a paragraph for enclosures.
9077 \end_layout
9078
9079 \begin_layout Standard
9080 The types 
9081 \family sans
9082 Name
9083 \family default
9084
9085 \family sans
9086 Signature
9087 \family default
9088
9089 \family sans
9090 Address
9091 \family default
9092
9093 \family sans
9094 Telephone
9095 \family default
9096
9097 \family sans
9098 Place
9099 \family default
9100
9101 \family sans
9102 Backaddress
9103 \family default
9104
9105 \family sans
9106 Specialmail
9107 \family default
9108
9109 \family sans
9110 Location
9111 \family default
9112
9113 \family sans
9114 Title
9115 \family default
9116 , and 
9117 \family sans
9118 Subject
9119 \family default
9120  are input types provided with a label to enter information, which will
9121  be processed by the document class.
9122 \begin_inset Foot
9123 status open
9124
9125 \begin_layout Plain Layout
9126 It could be seen as a matter of inconsequence, that the types 
9127 \family sans
9128 Letter
9129 \family default
9130  and 
9131 \family sans
9132 Opening
9133 \family default
9134  described above are not such input types as well.
9135  Because of the special meaning of those types, however, I have implemented
9136  them as ordinary paragraph types with a one letter mark in the left margin.
9137  Moreover, it would affect my feeling of symmetry, if the 
9138 \family sans
9139 Opening
9140 \family default
9141  type and the 
9142 \family sans
9143 Closing
9144 \family default
9145  type had such a serious different appearance.
9146 \end_layout
9147
9148 \end_inset
9149
9150  The types must be used ahead of the corresponding 
9151 \family sans
9152 Opening
9153 \family default
9154  type.
9155 \end_layout
9156
9157 \begin_layout Standard
9158 An implementation of these types in a WYSIWYG fashion does not seem to make
9159  sense, because the real appearance of the produced letter does not only
9160  depend on the usage of the particular type, but also on other factors.
9161  For example, a signature entered in the 
9162 \family sans
9163 Signature
9164 \family default
9165  type will in the standard behavior appear in the produced letter only,
9166  when in the same letter also a 
9167 \family sans
9168 Closing
9169 \family default
9170  type is used.
9171  The entered value of the 
9172 \family sans
9173 Telephone
9174 \family default
9175  type will in the standard behavior not appear in the produced letter at
9176  all.
9177  The possibility to design the letter`s heading freely is already indicated
9178  in a footnote above.
9179 \end_layout
9180
9181 \begin_layout Standard
9182 The input types can also be used as empty paragraphs.
9183  This makes sense e.
9184 \begin_inset space \thinspace{}
9185 \end_inset
9186
9187 g.
9188 \begin_inset space \space{}
9189 \end_inset
9190
9191 for the 
9192 \family sans
9193 Signature
9194 \family default
9195  type.
9196  If the 
9197 \family sans
9198 Signature
9199 \family default
9200  type is not used at all, in the standard behavior the value of the 
9201 \family sans
9202 Name
9203 \family default
9204  type is used as signature, whereas if an empty 
9205 \family sans
9206 Signature
9207 \family default
9208  type is used, no signature value is defined.
9209 \end_layout
9210
9211 \begin_layout Standard
9212 By using the input types it is possible to write a letter template, containing
9213  filled input types with your personal dates (name, address, etc.) and empty
9214  input types for other dates you want to enter.
9215 \end_layout
9216
9217 \begin_layout Itemize
9218
9219 \family sans
9220 Name
9221 \family default
9222 : sender's name, in the standard behavior appears as a centered paragraph
9223  in small caps in the letter`s heading.
9224 \end_layout
9225
9226 \begin_layout Itemize
9227
9228 \family sans
9229 Signature
9230 \family default
9231 : sender's signature, in the standard behavior appears below the 
9232 \family sans
9233 Closing
9234 \family default
9235  type.
9236  If no 
9237 \family sans
9238 Signature
9239 \family default
9240  type is used, the value of the 
9241 \family sans
9242 Name
9243 \family default
9244  type appears instead.
9245 \end_layout
9246
9247 \begin_layout Itemize
9248
9249 \family sans
9250 Address
9251 \family default
9252 : sender's address, in the standard behavior appears in a centered paragraph
9253  in the letter`s heading below the sender's name.
9254 \end_layout
9255
9256 \begin_layout Itemize
9257
9258 \family sans
9259 Telephone
9260 \family default
9261 : sender's telephone number, in the standard behavior only sets the \SpecialChar LaTeX
9262  variable
9263  
9264 \family typewriter
9265
9266 \backslash
9267 telephonenum
9268 \family default
9269 .
9270 \end_layout
9271
9272 \begin_layout Itemize
9273
9274 \family sans
9275 Place
9276 \family default
9277 : place of the letter`s making.
9278 \end_layout
9279
9280 \begin_layout Itemize
9281
9282 \family sans
9283 Date
9284 \family default
9285 : date of the letter`s making.
9286  
9287 \family sans
9288 Place
9289 \family default
9290  and 
9291 \family sans
9292 Date
9293 \family default
9294 , in the standard behavior, produce the place and the date in a right-aligned
9295  line below the addressee's field.
9296  If an empty 
9297 \family sans
9298 Date
9299 \family default
9300  type is used, neither place nor date appear, independent of the value of
9301  the 
9302 \family sans
9303 Place
9304 \family default
9305  type.
9306  If no 
9307 \family sans
9308 Date
9309 \family default
9310  type is used, the date of the letter `s production is used.
9311 \end_layout
9312
9313 \begin_layout Itemize
9314
9315 \family sans
9316 Backaddress
9317 \family default
9318 : sender`s back address, in the standard behavior appears above the addressee's
9319  field in a small sans serif font.
9320 \end_layout
9321
9322 \begin_layout Itemize
9323
9324 \family sans
9325 Specialmail
9326 \family default
9327 : special mail information, in the standard behavior appears underlined
9328  above the addressee's field below the back address.
9329 \end_layout
9330
9331 \begin_layout Itemize
9332
9333 \family sans
9334 Location
9335 \family default
9336 : additional information, in the standard behavior appears on right side
9337  below the addressee`s field.
9338 \end_layout
9339
9340 \begin_layout Itemize
9341
9342 \family sans
9343 Title
9344 \family default
9345 : the letter's title, in the standard behavior appears in a big, bold, sans
9346  serif font above the subject.
9347 \end_layout
9348
9349 \begin_layout Itemize
9350
9351 \family sans
9352 Subject
9353 \family default
9354 : the letter's subject, in the standard behavior appears in a bold font
9355  above the 
9356 \family sans
9357 Opening
9358 \family default
9359  paragraph.
9360 \end_layout
9361
9362 \begin_layout Standard
9363 The types 
9364 \family sans
9365 Yourref
9366 \family default
9367
9368 \family sans
9369 Yourmail
9370 \family default
9371
9372 \family sans
9373 Myref
9374 \family default
9375
9376 \family sans
9377 Customer
9378 \family default
9379 , and 
9380 \family sans
9381 Invoice
9382 \family default
9383  produce a business letter like line above the 
9384 \family sans
9385 Title
9386 \family default
9387  line containing the fields 
9388 \begin_inset Quotes eld
9389 \end_inset
9390
9391 Your ref.
9392 \begin_inset Quotes erd
9393 \end_inset
9394
9395
9396 \begin_inset Quotes eld
9397 \end_inset
9398
9399 Your letter of
9400 \begin_inset Quotes erd
9401 \end_inset
9402
9403
9404 \begin_inset Quotes eld
9405 \end_inset
9406
9407 Our ref.
9408 \begin_inset Quotes erd
9409 \end_inset
9410
9411
9412 \begin_inset Quotes eld
9413 \end_inset
9414
9415 Customer no.
9416 \begin_inset Quotes erd
9417 \end_inset
9418
9419
9420 \begin_inset Quotes eld
9421 \end_inset
9422
9423 Invoice no.
9424 \begin_inset Quotes erd
9425 \end_inset
9426
9427 , and 
9428 \begin_inset Quotes eld
9429 \end_inset
9430
9431 Date
9432 \begin_inset Quotes erd
9433 \end_inset
9434
9435 .
9436  For the date field, the value of the 
9437 \family sans
9438 Date
9439 \family default
9440  type is used.
9441  If one of these 
9442 \begin_inset Quotes eld
9443 \end_inset
9444
9445 business letter types
9446 \begin_inset Quotes erd
9447 \end_inset
9448
9449  is used, the value of the 
9450 \family sans
9451 Place
9452 \family default
9453  type however does not appear, but only the \SpecialChar LaTeX
9454  variable 
9455 \family typewriter
9456
9457 \backslash
9458 fromplace
9459 \family default
9460  is set.
9461  The ordinary output of place and date in a right-aligned line below the
9462  addressee`s field is suppressed.
9463  The types are implemented as input types provided with a label and must
9464  be used ahead of the corresponding 
9465 \family sans
9466 Opening
9467 \family default
9468  type.
9469 \end_layout
9470
9471 \begin_layout Itemize
9472
9473 \family sans
9474 Yourref
9475 \family default
9476 : Your ref.
9477 \end_layout
9478
9479 \begin_layout Itemize
9480
9481 \family sans
9482 Yourmail
9483 \family default
9484 : Your letter of.
9485 \end_layout
9486
9487 \begin_layout Itemize
9488
9489 \family sans
9490 Myref
9491 \family default
9492 : Our ref.
9493 \end_layout
9494
9495 \begin_layout Itemize
9496
9497 \family sans
9498 Customer
9499 \family default
9500 : Customer no.
9501 \end_layout
9502
9503 \begin_layout Itemize
9504
9505 \family sans
9506 Invoice
9507 \family default
9508 : Invoice no.
9509 \end_layout
9510
9511 \begin_layout Subsection
9512 The new letter class: letter (koma-script v.2)
9513 \end_layout
9514
9515 \begin_layout Standard
9516 by 
9517 \noun on
9518 Jürgen Spitzmüller
9519 \end_layout
9520
9521 \begin_layout Standard
9522 \begin_inset VSpace medskip
9523 \end_inset
9524
9525
9526 \end_layout
9527
9528 \begin_layout Standard
9529 \noindent
9530 Koma-Script version 2.8 has introduced a new letter class 
9531 \family typewriter
9532 scrlttr2
9533 \family default
9534  which supersedes the now unsupported 
9535 \family typewriter
9536 scrlettr
9537 \family default
9538 .
9539  It has — on the \SpecialChar LaTeX
9540  side — a completely new interface and is not compatible
9541  with the old class.
9542  Therefore, \SpecialChar LyX
9543  supports both, though it is recommended you use the new class.
9544 \end_layout
9545
9546 \begin_layout Standard
9547 This class covers the same functionality as 
9548 \emph on
9549 letter (koma-script),
9550 \emph default
9551  and a few more.
9552  The basic items are 
9553 \family sans
9554 Address
9555 \family default
9556  (receiver's address, same as 
9557 \family sans
9558 Letter
9559 \family default
9560  in the old layout), 
9561 \family sans
9562 Opening
9563 \family default
9564 , and 
9565 \family sans
9566 Closing
9567 \family default
9568 .
9569  
9570 \family sans
9571 NextAddress
9572 \family default
9573  will start a new letter (i.
9574 \begin_inset space \thinspace{}
9575 \end_inset
9576
9577 e.
9578 \begin_inset space \space{}
9579 \end_inset
9580
9581 you can write several letters per document).
9582  New elements are sender's 
9583 \family sans
9584 E-Mail
9585 \family default
9586
9587 \family sans
9588 URL
9589 \family default
9590
9591 \family sans
9592 Fax
9593 \family default
9594
9595 \family sans
9596 Bank
9597 \family default
9598  and the possibility to use a 
9599 \family sans
9600 Logo
9601 \family default
9602  (via 
9603 \family sans
9604 Insert\SpecialChar menuseparator
9605 Graphics
9606 \family default
9607 ) in the header.
9608 \end_layout
9609
9610 \begin_layout Standard
9611 The biggest improvement is, though, that the letter's layout is configurable
9612  to meet almost any needs.
9613  This can be done via the preamble or with a special style file (Letter
9614  Class Option, extension 
9615 \family typewriter
9616 *.lco
9617 \family default
9618 ), that will be read in as a class option.
9619 \begin_inset Foot
9620 status collapsed
9621
9622 \begin_layout Plain Layout
9623 The KOMA package comes with some default 
9624 \family typewriter
9625 *.lco
9626 \family default
9627  files.
9628  There is, for instance, a 
9629 \family typewriter
9630 DIN.lco
9631 \family default
9632  file that follows german typesetting rules, or a 
9633 \family typewriter
9634 KOMAold.lco
9635 \family default
9636  that provides the default layout of the old 
9637 \family typewriter
9638 scrlettr
9639 \family default
9640  class.
9641  The latter can be loaded with the class option 
9642 \family typewriter
9643 KOMAold
9644 \family default
9645 , inserted via the 
9646 \family sans
9647 Layout\SpecialChar menuseparator
9648 Document\SpecialChar menuseparator
9649 Extra Options
9650 \family default
9651  field.
9652 \end_layout
9653
9654 \end_inset
9655
9656  Have a look at the 
9657 \emph on
9658 koma-letter2
9659 \emph default
9660  template that is included in \SpecialChar LyX
9661  for examples.
9662  A detailed description is to be found in the Koma-Script documentation
9663  (
9664 \emph on
9665 scrguide
9666 \emph default
9667 ).
9668 \end_layout
9669
9670 \begin_layout Subsection
9671 Problems
9672 \end_layout
9673
9674 \begin_layout Standard
9675 Visualizing the Koma-Script document classes in \SpecialChar LyX
9676 , the \SpecialChar LyX
9677  internals cause some
9678  problems.
9679 \end_layout
9680
9681 \begin_layout Itemize
9682 The chapter number of a 
9683 \family sans
9684 Chapter
9685 \family default
9686  type appears on a line of its own above the chapter heading instead of
9687  appearing in the same line ahead of it.
9688  The cause for that is the \SpecialChar LyX
9689  internal behavior for the labeltype 
9690 \family sans
9691 Counter_Chapter
9692 \family default
9693  in the layout file.
9694 \end_layout
9695
9696 \begin_layout Itemize
9697 The headings of the types 
9698 \family sans
9699 Addchap
9700 \family default
9701  and 
9702 \family sans
9703 Addsec
9704 \family default
9705  are only put in the 
9706 \begin_inset Quotes eld
9707 \end_inset
9708
9709 true
9710 \begin_inset Quotes erd
9711 \end_inset
9712
9713  \SpecialChar LaTeX
9714  table of contents, but not in the \SpecialChar LyX
9715  table of contents (
9716 \family sans
9717 Document\SpecialChar menuseparator
9718 Table
9719 \begin_inset space ~
9720 \end_inset
9721
9722 of
9723 \begin_inset space ~
9724 \end_inset
9725
9726 Contents
9727 \family default
9728 ).
9729 \end_layout
9730
9731 \begin_layout Itemize
9732 The paragraphs in a 
9733 \emph on
9734 letter
9735 \emph default
9736  document class appear in a skip separation mode, not indented.
9737  This is the standard behavior, no special \SpecialChar LaTeX
9738  commands are needed for that.
9739  But in the 
9740 \family sans
9741 Document\SpecialChar menuseparator
9742 Settings
9743 \family default
9744  dialog the corresponding radio button indicates 
9745 \family sans
9746 Indent
9747 \family default
9748 .
9749  A 
9750 \family sans
9751 Skip
9752 \family default
9753  value always has the effect that extra \SpecialChar LaTeX
9754  commands are inserted in the document
9755  to produce the gap, which is not what is wanted in this case.
9756 \end_layout
9757
9758 \begin_layout Section
9759 Memoir
9760 \end_layout
9761
9762 \begin_layout Standard
9763 By 
9764 \noun on
9765 Jürgen Spitzmüller
9766 \end_layout
9767
9768 \begin_layout Subsection
9769 Overview
9770 \end_layout
9771
9772 \begin_layout Standard
9773 Memoir is a very powerful and constantly evolving class.
9774  It has been designed with regard to fictional and non-fictional literature.
9775  Its aim is to let the user have maximum control over the typesetting of
9776  his document.
9777  Memoir is based on the standard book class, but it can also emulate the
9778  article class (see below).
9779 \end_layout
9780
9781 \begin_layout Standard
9782 Peter Wilson, the developer of Memoir, is known as the author of lots of
9783  useful packages in the \SpecialChar LaTeX
9784  world.
9785  Most of them have been merged with Memoir.
9786  Therefore, it is much easier to layout the table of contents, appendices,
9787  chapter designs and such.
9788  \SpecialChar LyX
9789 , though, does not support all of these goodies natively.
9790  Some of them might be added to forthcoming releases
9791 \begin_inset Foot
9792 status collapsed
9793
9794 \begin_layout Plain Layout
9795 You are invited to send suggestions to 
9796 \begin_inset Flex URL
9797 status collapsed
9798
9799 \begin_layout Plain Layout
9800
9801 lyx-devel@lists.lyx.org
9802 \end_layout
9803
9804 \end_inset
9805
9806 .
9807 \end_layout
9808
9809 \end_inset
9810
9811 , lots will probably never be supported, due to the limitations of \SpecialChar LyX
9812 's framework.
9813  Of course you can still use all features with the help of some native \SpecialChar LaTeX
9814
9815  commands (\SpecialChar TeX
9816  code
9817 \begin_inset Foot
9818 status collapsed
9819
9820 \begin_layout Plain Layout
9821 Cf.
9822 \begin_inset ERT
9823 status collapsed
9824
9825 \begin_layout Plain Layout
9826
9827
9828 \backslash
9829  
9830 \end_layout
9831
9832 \end_inset
9833
9834 section
9835 \begin_inset space ~
9836 \end_inset
9837
9838
9839 \begin_inset CommandInset ref
9840 LatexCommand ref
9841 reference "sec:Inserting-TeX-Code"
9842
9843 \end_inset
9844
9845  for details.
9846 \end_layout
9847
9848 \end_inset
9849
9850 ).
9851  In this section, we can only list those features that are natively supported
9852  by \SpecialChar LyX
9853 .
9854  For detailed descriptions (and for the rest of features) we recommend you
9855  have a look at the detailed manual of the Memoir class
9856 \begin_inset Foot
9857 status collapsed
9858
9859 \begin_layout Plain Layout
9860 Cf.
9861 \begin_inset ERT
9862 status collapsed
9863
9864 \begin_layout Plain Layout
9865
9866
9867 \backslash
9868  
9869 \end_layout
9870
9871 \end_inset
9872
9873
9874 \begin_inset Flex URL
9875 status collapsed
9876
9877 \begin_layout Plain Layout
9878
9879 CTAN:/macros/latex/memoir/memman.pdf
9880 \end_layout
9881
9882 \end_inset
9883
9884 .
9885 \end_layout
9886
9887 \end_inset
9888
9889 , which is not only a user guide for the class, but also both a comprehensive
9890  description on good typesetting and a superb example for good typesetting
9891  itself.
9892 \end_layout
9893
9894 \begin_layout Subsection
9895 Basic features and restrictions
9896 \end_layout
9897
9898 \begin_layout Standard
9899 Memoir supports basically all features of the standard book classes.
9900  There are, however, some differences, as follows:
9901 \end_layout
9902
9903 \begin_layout Description
9904 Font
9905 \begin_inset space ~
9906 \end_inset
9907
9908 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
9909 \end_layout
9910
9911 \begin_layout Description
9912 Page
9913 \begin_inset space ~
9914 \end_inset
9915
9916 style: The fancy page style is not supported, due to a command clash between
9917  Memoir and the fancyhdr package (they both define a command with the same
9918  name, which confuses \SpecialChar LaTeX
9919 ).
9920  Instead, Memoir comes with a number of its own page styles (see 
9921 \family sans
9922 Layout\SpecialChar menuseparator
9923 Document\SpecialChar menuseparator
9924 Page
9925 \begin_inset space ~
9926 \end_inset
9927
9928 Style
9929 \family default
9930 ).
9931  If you want to use these for the chapter pages, you have to use the command
9932  
9933 \family typewriter
9934
9935 \backslash
9936 chapterstyle
9937 \family default
9938  in the main text or in preamble (e.
9939 \begin_inset space \thinspace{}
9940 \end_inset
9941
9942 g.
9943 \begin_inset space \space{}
9944 \end_inset
9945
9946
9947 \family typewriter
9948
9949 \backslash
9950 chapterstyle{companion}
9951 \family default
9952 ).
9953 \end_layout
9954
9955 \begin_layout Description
9956 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
9957  optional argument in the standard classes.
9958  With this, you can specify an alternative version of the title for the
9959  table of contents and the headers (for instance, if the title is too long).
9960  In \SpecialChar LyX
9961 , you can do this via 
9962 \family sans
9963 Insert\SpecialChar menuseparator
9964 Short
9965 \begin_inset space ~
9966 \end_inset
9967
9968 Title
9969 \family default
9970  at the beginning of a chapter/section.
9971  Memoir features a second optional argument and thus separates the table
9972  of contents from the header.
9973  You can define three variants of a title with this: one for the main text,
9974  one for the table of contents, and one for the headers.
9975  Simply insert two optional arguments if you need this feature, the first
9976  one containing the short title for the Table of Contents, the second one
9977  containing an alternative short title for the headers.
9978 \end_layout
9979
9980 \begin_layout Description
9981 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
9982  of contents, the list of figures and the list of table start a new page
9983  automatically.
9984  Memoir does not follow this route.
9985  You have to insert a page break yourself, if you want to have one.
9986 \end_layout
9987
9988 \begin_layout Description
9989 Titlepage: For some unknown reason, Memoir uses pagination on the title
9990  page (in the standard classes, title pages are 
9991 \begin_inset Quotes eld
9992 \end_inset
9993
9994 empty
9995 \begin_inset Quotes erd
9996 \end_inset
9997
9998 ).
9999  If you want an empty title page, type 
10000 \family typewriter
10001
10002 \backslash
10003 aliaspagestyle{title}{empty}
10004 \family default
10005  in the preamble.
10006 \end_layout
10007
10008 \begin_layout Description
10009 Article: With the class option 
10010 \emph on
10011 article
10012 \emph default
10013  (to be inserted in 
10014 \family sans
10015 Layout\SpecialChar menuseparator
10016 Document\SpecialChar menuseparator
10017 Extra
10018 \begin_inset space ~
10019 \end_inset
10020
10021 Options
10022 \family default
10023 ), you can emulate article style.
10024  That is, counters (footnotes, figures, tables etc.) will not be reset on
10025  new chapters, chapters don't start a new page (but are—in contrary to 
10026 \begin_inset Quotes eld
10027 \end_inset
10028
10029 real
10030 \begin_inset Quotes erd
10031 \end_inset
10032
10033  article classes—still allowed), parts, though, use their own page, as in
10034  book.
10035 \end_layout
10036
10037 \begin_layout Description
10038 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
10039  font commands, which have been used in the old \SpecialChar LaTeX
10040  version 2.09 (e.
10041 \begin_inset space \thinspace{}
10042 \end_inset
10043
10044 g.
10045 \begin_inset space \space{}
10046 \end_inset
10047
10048
10049 \family typewriter
10050
10051 \backslash
10052 rm
10053 \family default
10054
10055 \family typewriter
10056
10057 \backslash
10058 it
10059 \family default
10060 ).
10061  It produces an error and stops \SpecialChar LaTeX
10062  whenever such a command appears.
10063  The class option 
10064 \emph on
10065 oldfontcommands
10066 \emph default
10067  reallows the commands and spits out warnings instead (which does at least
10068  not stop \SpecialChar LaTeX
10069 ).
10070  Since a lot of packages and particularly Bib\SpecialChar TeX
10071  style files are still using
10072  those commands, we have decided to use this option by default.
10073 \end_layout
10074
10075 \begin_layout Subsection
10076 Extra features
10077 \end_layout
10078
10079 \begin_layout Standard
10080 We will only describe the features supported by \SpecialChar LyX
10081  (which is not much currently).
10082  Please consult the Memoir manual
10083 \begin_inset Foot
10084 status collapsed
10085
10086 \begin_layout Plain Layout
10087 Cf.
10088 \begin_inset ERT
10089 status collapsed
10090
10091 \begin_layout Plain Layout
10092
10093
10094 \backslash
10095  
10096 \end_layout
10097
10098 \end_inset
10099
10100
10101 \begin_inset Flex URL
10102 status collapsed
10103
10104 \begin_layout Plain Layout
10105
10106 CTAN:/macros/latex/memoir/memman.pdf
10107 \end_layout
10108
10109 \end_inset
10110
10111 .
10112 \end_layout
10113
10114 \end_inset
10115
10116  for details.
10117 \end_layout
10118
10119 \begin_layout Description
10120 Abstract: You may wonder why an abstract is an extra feature.
10121  Well, it is in book class.
10122  Usually books don't have abstracts.
10123  Memoir, however, has.
10124  You can use it wherever and how often you like.
10125 \end_layout
10126
10127 \begin_layout Description
10128 Chapterprecis: You may know this older typesetting style: The contents of
10129  a chapter are summarized below the title and also in the table of contents
10130  (e.
10131 \begin_inset space \thinspace{}
10132 \end_inset
10133
10134 g.
10135 \begin_inset space \space{}
10136 \end_inset
10137
10138
10139 \emph on
10140 Our hero arrives in Troia; he loses some friends; he finds others
10141 \emph default
10142 ).
10143  Chapterprecis does exactly this.
10144  It is therefore only sensible below a chapter.
10145 \end_layout
10146
10147 \begin_layout Description
10148 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
10149  The epigraph environment provides an elegant way of typesetting such a
10150  motto.
10151  The motto itself (text) and its author (source) are divided by a short
10152  line.
10153  Unfortunately, we have to fool \SpecialChar LyX
10154  a bit here again, since the environment
10155  needs two arguments (text and source).
10156  In this case, we have to use curly brackets (in \SpecialChar TeX
10157  mode) between the two
10158  arguments: 
10159 \emph on
10160 <smart slogan>
10161 \emph default
10162  
10163 \family typewriter
10164 }{
10165 \family default
10166  
10167 \emph on
10168 <author of the slogan>.
10169 \end_layout
10170
10171 \begin_layout Description
10172 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
10173  complex figurative poems).
10174  \SpecialChar LyX
10175  can only support a few of them.
10176  One is poemtitle, which is a centered title for poems, which will also
10177  be added to the table of contents (verse is the standard environment for
10178  poems.
10179  Memoir has some enhanced versions of verse, but you need to use \SpecialChar TeX
10180  code,
10181  because they have to be nested inside regular verse environments, which
10182  is not possible with \SpecialChar LyX
10183 ).
10184 \end_layout
10185
10186 \begin_layout Description
10187 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
10188 \end_layout
10189
10190 \begin_layout Section
10191 Article (mwart), book (mwbk) and report (mwrep)
10192 \begin_inset Argument status
10193 status collapsed
10194
10195 \begin_layout Plain Layout
10196 The 
10197 \family typewriter
10198 mw
10199 \family default
10200  Classes
10201 \end_layout
10202
10203 \end_inset
10204
10205
10206 \end_layout
10207
10208 \begin_layout Standard
10209 by 
10210 \noun on
10211 Tomasz Luczak
10212 \end_layout
10213
10214 \begin_layout Standard
10215 The \SpecialChar LyX
10216  document classes 
10217 \emph on
10218 article (mwart)
10219 \emph default
10220
10221 \emph on
10222 report (mwrep)
10223 \emph default
10224  and 
10225 \emph on
10226 book
10227 \emph default
10228  
10229 \emph on
10230 (mwbk)
10231 \emph default
10232  correspond to the \SpecialChar LaTeX
10233  document classes 
10234 \family typewriter
10235 mwart.cls
10236 \family default
10237
10238 \family typewriter
10239 mwrep.cls
10240 \family default
10241  and 
10242 \family typewriter
10243 mwbk.cls
10244 \family default
10245 , resp.
10246  They are replacements for the standard document classes 
10247 \family typewriter
10248 article.cls
10249 \family default
10250
10251 \family typewriter
10252 report.cls
10253 \family default
10254  and 
10255 \family typewriter
10256 book.cls
10257 \family default
10258 , resp., and fit better to Polish typography conventions in a number of points.
10259  
10260 \end_layout
10261
10262 \begin_layout Standard
10263 Basic differences:
10264 \end_layout
10265
10266 \begin_layout Itemize
10267 Unnumbered titles (with star, e.
10268 \begin_inset space \thinspace{}
10269 \end_inset
10270
10271 g.
10272 \begin_inset space \space{}
10273 \end_inset
10274
10275
10276 \family sans
10277 Section*
10278 \family default
10279 ) are added into table of contents,
10280 \end_layout
10281
10282 \begin_layout Itemize
10283 Additional page styles:
10284 \begin_inset Separator latexpar
10285 \end_inset
10286
10287
10288 \end_layout
10289
10290 \begin_deeper
10291 \begin_layout Description
10292 uheadings header with separated lines,
10293 \end_layout
10294
10295 \begin_layout Description
10296 myheadings custom header, contents headers via commands: 
10297 \family typewriter
10298
10299 \backslash
10300 markright
10301 \family default
10302  and 
10303 \family typewriter
10304
10305 \backslash
10306 markboth
10307 \family default
10308 ,
10309 \end_layout
10310
10311 \begin_layout Description
10312 myuheadings custom header with separated lines,
10313 \end_layout
10314
10315 \begin_layout Description
10316 outer page number is placed on outer side of page
10317 \end_layout
10318
10319 \end_deeper
10320 \begin_layout Itemize
10321 Options 
10322 \begin_inset Separator latexpar
10323 \end_inset
10324
10325
10326 \end_layout
10327
10328 \begin_deeper
10329 \begin_layout Description
10330 rmheadings serif titles — default,
10331 \end_layout
10332
10333 \begin_layout Description
10334 sfheadings sansserif titles,
10335 \end_layout
10336
10337 \begin_layout Description
10338 authortitle on title page first placed is author next title — default,
10339 \end_layout
10340
10341 \begin_layout Description
10342 titleauthor on title page first placed is title next author,
10343 \end_layout
10344
10345 \begin_layout Description
10346 withmarginpar reserve place on page for margins.
10347 \end_layout
10348
10349 \end_deeper
10350 \begin_layout Section
10351 Paper
10352 \end_layout
10353
10354 \begin_layout Standard
10355 The document class 
10356 \family sans
10357 paper
10358 \family default
10359  provides an alternative to the standard 
10360 \family sans
10361 article
10362 \family default
10363  class.
10364  It provides similar functionality, but you might prefer this layout with
10365  sans serif sections, headings, and more.
10366 \end_layout
10367
10368 \begin_layout Section
10369 Rev\SpecialChar TeX
10370 4
10371 \end_layout
10372
10373 \begin_layout Standard
10374 by 
10375 \noun on
10376 Amir Karger
10377 \end_layout
10378
10379 \begin_layout Standard
10380 \begin_inset VSpace bigskip
10381 \end_inset
10382
10383
10384 \end_layout
10385
10386 \begin_layout Standard
10387 \noindent
10388 The 
10389 \family sans
10390 Revtex
10391 \begin_inset space ~
10392 \end_inset
10393
10394 4
10395 \family default
10396  textclass works with the American Physical Sociey's Rev\SpecialChar TeX
10397  4.0 (the 
10398 \begin_inset Formula $\beta$
10399 \end_inset
10400
10401  release of May, 1999) class.
10402 \end_layout
10403
10404 \begin_layout Standard
10405 \SpecialChar LyX
10406  has a 
10407 \family sans
10408 Revtex
10409 \family default
10410  textclass, which works with Rev\SpecialChar TeX
10411  3.1.
10412  However, v3.1 is basically obsolete, as it works with \SpecialChar LaTeX
10413  2.09.
10414  That means that it doesn't interact very well with \SpecialChar LyX
10415 , which requires \SpecialChar LaTeX2e
10416 , although
10417  it has been kludged to work.
10418  Since Rev\SpecialChar TeX
10419  4.0 has been designed to work much more cleanly with \SpecialChar LaTeX2e
10420 , \SpecialChar LyX
10421  with the
10422  
10423 \family sans
10424 Rev\SpecialChar TeX
10425
10426 \begin_inset space ~
10427 \end_inset
10428
10429 4
10430 \family default
10431  textclass should also be pretty easy to use.
10432 \end_layout
10433
10434 \begin_layout Standard
10435 These documents are supposed to be used in 
10436 \emph on
10437 addition
10438 \emph default
10439  to the Rev\SpecialChar TeX
10440  4.0 documents, so we don't describe any of the special Rev\SpecialChar TeX
10441  macros,
10442  and assume you'll know what to put in the preamble if necessary.
10443 \end_layout
10444
10445 \begin_layout Subsection
10446 Installation
10447 \end_layout
10448
10449 \begin_layout Standard
10450 All you need to do is install Rev\SpecialChar TeX
10451  4, as described in the package's README
10452  file.
10453  The package can be found at The Rev\SpecialChar TeX
10454  4 Web Site 
10455 \begin_inset Flex URL
10456 status collapsed
10457
10458 \begin_layout Plain Layout
10459
10460 http://publish.aps.org/revtex4/
10461 \end_layout
10462
10463 \end_inset
10464
10465 .
10466  Install it somewhere that \SpecialChar LaTeX
10467  can see it.
10468  Test it by trying to \SpecialChar LaTeX
10469  a short Rev\SpecialChar TeX
10470  4 document in some random directory (i.
10471 \begin_inset space \thinspace{}
10472 \end_inset
10473
10474 e.
10475 \begin_inset space \space{}
10476 \end_inset
10477
10478 not the directory where you installed the class file.) Then, if you reconfigure
10479  \SpecialChar LyX
10480 , it will find the class file and let you use the Rev\SpecialChar TeX
10481 4 textclass.
10482 \end_layout
10483
10484 \begin_layout Standard
10485 Probably the easiest way to get started is either to import a Rev\SpecialChar TeX
10486  4 document
10487  using 
10488 \family typewriter
10489 tex2lyx
10490 \family default
10491 , or to use the 
10492 \family sans
10493 Revtex
10494 \begin_inset space ~
10495 \end_inset
10496
10497 4
10498 \family default
10499  template, found in the templates directory.
10500 \end_layout
10501
10502 \begin_layout Subsection
10503 Preamble Matter
10504 \end_layout
10505
10506 \begin_layout Standard
10507 Optional arguments to 
10508 \family typewriter
10509
10510 \backslash
10511 documentclass
10512 \family default
10513 , like 
10514 \begin_inset Quotes eld
10515 \end_inset
10516
10517 preprint
10518 \begin_inset Quotes erd
10519 \end_inset
10520
10521  and 
10522 \begin_inset Quotes eld
10523 \end_inset
10524
10525 aps
10526 \begin_inset Quotes erd
10527 \end_inset
10528
10529 , go in the 
10530 \family sans
10531 Extra
10532 \begin_inset space ~
10533 \end_inset
10534
10535 Options
10536 \family default
10537  field in the 
10538 \family sans
10539 Document
10540 \begin_inset space ~
10541 \end_inset
10542
10543 Layout
10544 \family default
10545  dialog, as usual.
10546  Remember that in Rev\SpecialChar TeX
10547 , at least one optional argument is required! 
10548 \end_layout
10549
10550 \begin_layout Standard
10551 Other preamble matter, like 
10552 \family typewriter
10553
10554 \backslash
10555 draft
10556 \family default
10557  etc.
10558 \begin_inset space ~
10559 \end_inset
10560
10561 goes in the 
10562 \family sans
10563 \SpecialChar LaTeX
10564
10565 \begin_inset space ~
10566 \end_inset
10567
10568 Preamble
10569 \family default
10570  dialog, also as usual.
10571 \end_layout
10572
10573 \begin_layout Subsection
10574 Layouts
10575 \end_layout
10576
10577 \begin_layout Standard
10578 The layouts basically correspond to the commands in Rev\SpecialChar TeX
10579 4.0.
10580  For example, the Email layout corresponds to 
10581 \family typewriter
10582
10583 \backslash
10584 email{}
10585 \family default
10586 .
10587  Note that (at least as of Rev\SpecialChar TeX
10588  4.0 Beta), the 
10589 \family sans
10590 Address
10591 \family default
10592  and 
10593 \family sans
10594 Affiliation
10595 \family default
10596  layouts are exactly equivalent, so you shouldn't need to use both.
10597 \begin_inset Foot
10598 status collapsed
10599
10600 \begin_layout Plain Layout
10601 In case you're curious, both were included so that 
10602 \family typewriter
10603 tex2lyx
10604 \family default
10605  would be able to translate both 
10606 \family typewriter
10607
10608 \backslash
10609 address
10610 \family default
10611  and 
10612 \family typewriter
10613
10614 \backslash
10615 affiliation
10616 \family default
10617 .
10618 \end_layout
10619
10620 \end_inset
10621
10622
10623 \end_layout
10624
10625 \begin_layout Subsection
10626 Important Notes
10627 \end_layout
10628
10629 \begin_layout Standard
10630 There are a couple of important unique aspects of Rev\SpecialChar TeX
10631  4 which might cause
10632  bugs that will be even more confusing in \SpecialChar LyX
10633 .
10634 \end_layout
10635
10636 \begin_layout Standard
10637 In Rev\SpecialChar TeX
10638 , the 
10639 \family typewriter
10640
10641 \backslash
10642 thanks
10643 \family default
10644  command goes 
10645 \emph on
10646 outside
10647 \emph default
10648  the 
10649 \family typewriter
10650
10651 \backslash
10652 author
10653 \family default
10654  command.
10655  The \SpecialChar LyX
10656  equivalent is that there is a separate Thanks layout.
10657  Do 
10658 \emph on
10659 not
10660 \emph default
10661  write footnotes in the 
10662 \family sans
10663 Author
10664 \family default
10665  layout, or weird things may happen.
10666  See the Rev\SpecialChar TeX
10667  4 documentation for more details.
10668 \end_layout
10669
10670 \begin_layout Standard
10671 Also, the 
10672 \family sans
10673 Author
10674 \begin_inset space ~
10675 \end_inset
10676
10677 Email
10678 \family default
10679
10680 \family sans
10681 Author
10682 \begin_inset space ~
10683 \end_inset
10684
10685 URL
10686 \family default
10687 , and 
10688 \family sans
10689 Thanks
10690 \family default
10691  layouts must be placed 
10692 \emph on
10693 in between
10694 \emph default
10695  the 
10696 \family sans
10697 Author
10698 \family default
10699  layout and the corresponding 
10700 \family sans
10701 Address
10702 \family default
10703  (or equivalent 
10704 \family sans
10705 Affiliation
10706 \family default
10707 ) layout.
10708  If you put the 
10709 \family sans
10710 Thanks
10711 \family default
10712  after the 
10713 \family sans
10714 Address
10715 \family default
10716 , the \SpecialChar LaTeX
10717  won't compile.
10718 \end_layout
10719
10720 \begin_layout Subsection
10721 Drawbacks
10722 \end_layout
10723
10724 \begin_layout Standard
10725 The main problem with this layout is that you can't use the optional arguments
10726  to layouts like Email and Title.
10727  (The problem is not unique to this layout; you can't use optional arguments
10728  to the Section layouts either.) This means that after you export that file
10729  to \SpecialChar LaTeX
10730  (which you'll need to do eventually to send it in to APS), you'll need
10731  to edit the \SpecialChar LaTeX
10732  file with a text editor to add the optional arguments to set,
10733  e.
10734 \begin_inset space \thinspace{}
10735 \end_inset
10736
10737 g.
10738 \begin_inset space \space{}
10739 \end_inset
10740
10741 the running title for the page headers.
10742  Lacking these layouts makes the 
10743 \family typewriter
10744
10745 \backslash
10746 altaffiliation
10747 \family default
10748  (and the equivalent 
10749 \family typewriter
10750
10751 \backslash
10752 altaddress
10753 \family default
10754 ) useless, so the corresponding layouts don't exist, and will have to be
10755  added by hand.
10756 \begin_inset Foot
10757 status collapsed
10758
10759 \begin_layout Plain Layout
10760
10761 \emph on
10762 Note from JMarc:
10763 \emph default
10764  actually, \SpecialChar LyX
10765  1.3.0 supports some forms of optional arguments, but this layout
10766  has not been updated yet to take advantage of it.
10767 \end_layout
10768
10769 \end_inset
10770
10771  
10772 \end_layout
10773
10774 \begin_layout Section
10775 Springer Journals (
10776 \family sans
10777 svjour
10778 \family default
10779 )
10780 \end_layout
10781
10782 \begin_layout Standard
10783 by 
10784 \noun on
10785 Martin Vermeer
10786 \end_layout
10787
10788 \begin_layout Subsection
10789 Description
10790 \end_layout
10791
10792 \begin_layout Standard
10793 These are the layout files for some of the journal formats used by Springer
10794  Verlag and listed on 
10795 \begin_inset Flex URL
10796 status collapsed
10797
10798 \begin_layout Plain Layout
10799
10800 http://www.springer.de/author/tex/help-journals.html
10801 \end_layout
10802
10803 \end_inset
10804
10805 , where you should also go to fetch the class files (yes, these are \SpecialChar LaTeX2e
10806  now!).
10807  It is a modular system: the things common to all journals are implemented
10808  in 
10809 \family typewriter
10810 svjour.inc
10811 \family default
10812 , which journal-specific layout files (such as, e.
10813 \begin_inset space \thinspace{}
10814 \end_inset
10815
10816 g.
10817 \begin_inset space \space{}
10818 \end_inset
10819
10820
10821 \family typewriter
10822 svjog.layout
10823 \family default
10824  for Journal of Geodesy) can include.
10825 \end_layout
10826
10827 \begin_layout Standard
10828 This means that implementing support for any other Springer journal on this
10829  list is as simple as writing your own 
10830 \family typewriter
10831 sv
10832 \family default
10833 <myjournal>
10834 \family typewriter
10835 .layout
10836 \family default
10837  file following the outline given in 
10838 \family typewriter
10839 svjog.layout
10840 \family default
10841 .
10842  
10843 \end_layout
10844
10845 \begin_layout Standard
10846 It is reasonably well tested only for the Journal of Geodesy.
10847  
10848 \family typewriter
10849 svjour
10850 \family default
10851  and 
10852 \family typewriter
10853 svjog
10854 \family default
10855  come with the standard \SpecialChar LyX
10856  distribution.
10857  Install the relevant class file (downloaded from Springer) in a proper
10858  directory, reconfigure \SpecialChar LaTeX
10859  (in the te\SpecialChar TeX
10860  case by running 
10861 \family typewriter
10862 texhash
10863 \family default
10864 , as root if necessary — doesn't \SpecialChar LyX
10865  take care of this?), reconfigure \SpecialChar LyX
10866  and
10867  it should work.
10868 \end_layout
10869
10870 \begin_layout Subsection
10871 New styles
10872 \end_layout
10873
10874 \begin_layout Standard
10875 A large number of theorem-like styles — 
10876 \family sans
10877 Claim, Conjecture,
10878 \family default
10879  
10880 \family sans
10881 \SpecialChar ldots
10882 Theorem
10883 \family default
10884 .
10885 \end_layout
10886
10887 \begin_layout Standard
10888
10889 \family sans
10890 Headnote, Dedication, Subtitle, Running_\SpecialChar LaTeX
10891 _Title, Author_Running, Institute,
10892  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
10893 \family default
10894 .
10895  See the Springer class file documentation for details.
10896 \end_layout
10897
10898 \begin_layout Subsection
10899 Supported journals
10900 \end_layout
10901
10902 \begin_layout Itemize
10903
10904 \emph on
10905 Journal of Geodesy
10906 \emph default
10907
10908 \family typewriter
10909 svjog.layout
10910 \family default
10911  — Martin Vermeer
10912 \end_layout
10913
10914 \begin_layout Itemize
10915
10916 \emph on
10917 Probability Theory and Related Fields
10918 \emph default
10919
10920 \family typewriter
10921 svprobth.layout
10922 \family default
10923  — Jean-Marc Lasgouttes
10924 \end_layout
10925
10926 \begin_layout Standard
10927 Add your own, it isn't so hard!
10928 \end_layout
10929
10930 \begin_layout Subsection
10931 Credits
10932 \end_layout
10933
10934 \begin_layout Standard
10935 These files are partly based on the older 
10936 \family typewriter
10937 ejour2.layout
10938 \family default
10939 , which was again based on a tinkered-with version of an old \SpecialChar LaTeX
10940  2.09 style
10941  file from Springer.
10942  All this, and the 
10943 \family typewriter
10944 ejour2
10945 \family default
10946  layout, are now defunct.
10947  Jean-Marc Lasgouttes helped out big in making me find my way around the
10948  \SpecialChar LyX
10949  layout file mechanism.
10950 \end_layout
10951
10952 \begin_layout Subsection
10953 Bugs
10954 \end_layout
10955
10956 \begin_layout Standard
10957 Probably.
10958  But probably less than in the old hacked-\SpecialChar LaTeX
10959  
10960 \family typewriter
10961 ejour2
10962 \family default
10963 .
10964 \end_layout
10965
10966 \begin_layout Standard
10967 Limitations e.
10968 \begin_inset space \thinspace{}
10969 \end_inset
10970
10971 g.: does not display the number for theorem-like layouts, just #.
10972 \end_layout
10973
10974 \begin_layout Section
10975 Slides [aka 
10976 \noun on
10977 Sli\SpecialChar TeX
10978
10979 \noun default
10980 ]
10981 \begin_inset CommandInset label
10982 LatexCommand label
10983 name "sec:slitex"
10984
10985 \end_inset
10986
10987
10988 \end_layout
10989
10990 \begin_layout Standard
10991 by 
10992 \noun on
10993 John Weiss
10994 \noun default
10995  
10996 \end_layout
10997
10998 \begin_layout Subsection
10999 Introduction
11000 \end_layout
11001
11002 \begin_layout Standard
11003 This section describes how to use \SpecialChar LyX
11004  to make slides for overhead projectors.
11005  There are two document classes that can do this: the default slides class
11006  and the 
11007 \family sans
11008 Foil\SpecialChar TeX
11009
11010 \family default
11011  slides class.
11012  This section documents the former.
11013 \end_layout
11014
11015 \begin_layout Standard
11016 I'm going to say this again, nice and clear, so that there's no misunderstanding
11017 :
11018 \end_layout
11019
11020 \begin_layout Standard
11021 \begin_inset VSpace bigskip
11022 \end_inset
11023
11024
11025 \end_layout
11026
11027 \begin_layout Standard
11028 \align center
11029
11030 \size large
11031 This section documents the class 
11032 \begin_inset Quotes eld
11033 \end_inset
11034
11035
11036 \family sans
11037 slides (default)
11038 \family default
11039
11040 \begin_inset Quotes erd
11041 \end_inset
11042
11043  
11044 \emph on
11045 only.
11046 \end_layout
11047
11048 \begin_layout Standard
11049 \begin_inset VSpace bigskip
11050 \end_inset
11051
11052
11053 \end_layout
11054
11055 \begin_layout Standard
11056 If you're looking for the documentation for 
11057 \begin_inset Quotes eld
11058 \end_inset
11059
11060
11061 \family sans
11062 slides (Foil\SpecialChar TeX
11063 )
11064 \family default
11065
11066 \begin_inset Quotes erd
11067 \end_inset
11068
11069 , check out section
11070 \begin_inset space ~
11071 \end_inset
11072
11073
11074 \begin_inset CommandInset ref
11075 LatexCommand ref
11076 reference "sec:foiltex"
11077
11078 \end_inset
11079
11080 .
11081  The 
11082 \family sans
11083 foils
11084 \family default
11085  class [
11086 \begin_inset Quotes eld
11087 \end_inset
11088
11089
11090 \family sans
11091 slides (Foil\SpecialChar TeX
11092 )
11093 \family default
11094
11095 \begin_inset Quotes erd
11096 \end_inset
11097
11098 ] is actually somewhat better than the default 
11099 \family sans
11100 slides
11101 \family default
11102  class,
11103 \begin_inset Foot
11104 status collapsed
11105
11106 \begin_layout Plain Layout
11107 \SpecialChar ldots
11108 or so I've been told repeatedly by its advocates.
11109  Having never used it, I have no idea if this claim is true or not.
11110 \end_layout
11111
11112 \end_inset
11113
11114  which this section documents.
11115 \end_layout
11116
11117 \begin_layout Standard
11118 This class is the \SpecialChar LaTeX2e
11119  improvement of the old 
11120 \noun on
11121 Sli\SpecialChar TeX
11122
11123 \noun default
11124  package.
11125  Every \SpecialChar LaTeX2e
11126  distribution includes this class [which I'll just refer to as 
11127 \begin_inset Quotes eld
11128 \end_inset
11129
11130
11131 \family sans
11132 slides
11133 \family default
11134
11135 \begin_inset Quotes erd
11136 \end_inset
11137
11138  from now on], so you're bound to have it.
11139  As I noted earlier, there are other classes, such as 
11140 \family sans
11141 foils
11142 \family default
11143 , which also produce slides for overhead projectors and do a better job
11144  at it.
11145  However, there are some things which 
11146 \family sans
11147 slides
11148 \family default
11149  can do which the others can't, such as generate overlays.
11150  Read on to learn more!
11151 \end_layout
11152
11153 \begin_layout Subsection
11154 Getting Started
11155 \begin_inset CommandInset label
11156 LatexCommand label
11157 name "sec:slidesetup"
11158
11159 \end_inset
11160
11161
11162 \end_layout
11163
11164 \begin_layout Standard
11165 Obviously, to use this document class, you need to select 
11166 \begin_inset Quotes eld
11167 \end_inset
11168
11169
11170 \family sans
11171 slides (default)
11172 \family default
11173
11174 \begin_inset Quotes erd
11175 \end_inset
11176
11177  from the class list in the 
11178 \family sans
11179 Document\SpecialChar menuseparator
11180 Settings
11181 \family default
11182  dialog.
11183  There are some other special things you should know about this class:
11184 \end_layout
11185
11186 \begin_layout Itemize
11187 Don't bother changing the options 
11188 \family sans
11189 Sides and Columns
11190 \family default
11191 .
11192  They're not supported by the 
11193 \family sans
11194 slides
11195 \family default
11196  class, anyways.
11197 \end_layout
11198
11199 \begin_layout Itemize
11200 The option 
11201 \family sans
11202 Page
11203 \begin_inset space ~
11204 \end_inset
11205
11206 style
11207 \family default
11208  behaves a bit differently for this class.
11209  The possible choices and what they do are as follows:
11210 \begin_inset Separator latexpar
11211 \end_inset
11212
11213
11214 \end_layout
11215
11216 \begin_deeper
11217 \begin_layout Description
11218
11219 \family sans
11220 plain
11221 \family default
11222  The final output contains page numbers in the lower right corner.
11223 \end_layout
11224
11225 \begin_layout Description
11226
11227 \family sans
11228 headings
11229 \family default
11230  Like 
11231 \family sans
11232 plain
11233 \family default
11234 , but also prints out any time markers you've put in.
11235  This is the default.
11236 \end_layout
11237
11238 \begin_layout Description
11239
11240 \family sans
11241 empty
11242 \family default
11243  The final output contains no page numbers, time markers, or alignment markers.
11244 \end_layout
11245
11246 \end_deeper
11247 \begin_layout Itemize
11248 The 
11249 \family sans
11250 slides
11251 \family default
11252  class has an extra option: 
11253 \family typewriter
11254 clock
11255 \family default
11256 .
11257  To use it, put 
11258 \begin_inset Quotes eld
11259 \end_inset
11260
11261
11262 \family typewriter
11263 clock
11264 \family default
11265
11266 \begin_inset Quotes erd
11267 \end_inset
11268
11269  in the extra class options.
11270 \begin_inset Separator latexpar
11271 \end_inset
11272
11273
11274 \end_layout
11275
11276 \begin_deeper
11277 \begin_layout Standard
11278 Using this options allows you to add time markers to 
11279 \family sans
11280 Note
11281 \family default
11282 s.
11283  See section
11284 \begin_inset space ~
11285 \end_inset
11286
11287
11288 \begin_inset CommandInset ref
11289 LatexCommand ref
11290 reference "sec:slideNote"
11291
11292 \end_inset
11293
11294  for more details.
11295 \end_layout
11296
11297 \end_deeper
11298 \begin_layout Standard
11299 You can also use the template file 
11300 \begin_inset Quotes eld
11301 \end_inset
11302
11303
11304 \family typewriter
11305 slides.lyx
11306 \family default
11307
11308 \begin_inset Quotes erd
11309 \end_inset
11310
11311  to automatically set up a document to use the 
11312 \family sans
11313 slides
11314 \family default
11315  class [using 
11316 \family sans
11317 File\SpecialChar menuseparator
11318 New
11319 \begin_inset space ~
11320 \end_inset
11321
11322 from
11323 \begin_inset space ~
11324 \end_inset
11325
11326 Template
11327 \family default
11328  to open your new document].
11329  The template file also contains some examples of the special paragraph
11330  environments used by this class.
11331  I'll describe those next.
11332 \end_layout
11333
11334 \begin_layout Subsection
11335 Paragraph Environments
11336 \end_layout
11337
11338 \begin_layout Subsubsection
11339 Supported Environments
11340 \end_layout
11341
11342 \begin_layout Standard
11343 The first thing you'll notice when you start up a new 
11344 \family sans
11345 slides
11346 \family default
11347  document is the font size and type: it's the equivalent of the size 
11348 \begin_inset Quotes eld
11349 \end_inset
11350
11351
11352 \family sans
11353 Largest
11354 \family default
11355
11356 \begin_inset Quotes erd
11357 \end_inset
11358
11359  in the 
11360 \family sans
11361 Sans
11362 \begin_inset space ~
11363 \end_inset
11364
11365 Serif
11366 \family default
11367  font.
11368  This is also what's used in the output.
11369  Think of this as a 
11370 \begin_inset Quotes eld
11371 \end_inset
11372
11373 visual cue
11374 \begin_inset Quotes erd
11375 \end_inset
11376
11377  to remind you that this is a slide.
11378  Your final slides will use a larger font; ergo, you'll have less space.
11379  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
11380 \end_layout
11381
11382 \begin_layout Standard
11383 The next thing that becomes obvious is the changes to the paragraph environment
11384  pull-down box [at the far-left end of the toolbar].
11385  Most of the paragraph environments you're used to seeing are missing.
11386  There are also five new ones.
11387  That's because the 
11388 \family sans
11389 slides
11390 \family default
11391  class itself only supports certain paragraph environments:
11392 \end_layout
11393
11394 \begin_layout Itemize
11395
11396 \family sans
11397 Standard
11398 \end_layout
11399
11400 \begin_layout Itemize
11401
11402 \family sans
11403 Itemize
11404 \end_layout
11405
11406 \begin_layout Itemize
11407
11408 \family sans
11409 Enumerate
11410 \end_layout
11411
11412 \begin_layout Itemize
11413
11414 \family sans
11415 Description
11416 \end_layout
11417
11418 \begin_layout Itemize
11419
11420 \family sans
11421 List
11422 \end_layout
11423
11424 \begin_layout Itemize
11425
11426 \family sans
11427 Quotation
11428 \end_layout
11429
11430 \begin_layout Itemize
11431
11432 \family sans
11433 Quote
11434 \end_layout
11435
11436 \begin_layout Itemize
11437
11438 \family sans
11439 Verse
11440 \end_layout
11441
11442 \begin_layout Itemize
11443
11444 \family sans
11445 Caption
11446 \end_layout
11447
11448 \begin_layout Itemize
11449
11450 \family sans
11451 \SpecialChar LyX
11452 -Code
11453 \end_layout
11454
11455 \begin_layout Itemize
11456
11457 \family sans
11458 Comment
11459 \end_layout
11460
11461 \begin_layout Standard
11462 All of the other standard environments, including the section-heading environmen
11463 ts, aren't used in the 
11464 \family sans
11465 slides
11466 \family default
11467  class.
11468 \end_layout
11469
11470 \begin_layout Standard
11471 On the other hand, you'll notice the following new environments:
11472 \end_layout
11473
11474 \begin_layout Itemize
11475
11476 \family sans
11477 Slide
11478 \end_layout
11479
11480 \begin_layout Itemize
11481
11482 \family sans
11483 Overlay
11484 \end_layout
11485
11486 \begin_layout Itemize
11487
11488 \family sans
11489 Note
11490 \end_layout
11491
11492 \begin_layout Itemize
11493
11494 \family sans
11495 InvisibleText
11496 \end_layout
11497
11498 \begin_layout Itemize
11499
11500 \family sans
11501 VisibleText
11502 \end_layout
11503
11504 \begin_layout Standard
11505 These five are kind of quirky, due to a 
11506 \begin_inset Quotes eld
11507 \end_inset
11508
11509 feature
11510 \begin_inset Quotes erd
11511 \end_inset
11512
11513  in \SpecialChar LyX
11514 .
11515  You see, \SpecialChar LyX
11516  doesn't permit you to nest any other paragraph environment into
11517  an empty environment.
11518  Now, that's fine and dandy, but it means that you wouldn't be able to start
11519  a slide with anything except plain text.
11520  To deal with this, I've performed a little 
11521 \begin_inset Quotes eld
11522 \end_inset
11523
11524 \SpecialChar LaTeX
11525  magic.
11526 \begin_inset Quotes erd
11527 \end_inset
11528
11529  
11530 \end_layout
11531
11532 \begin_layout Subsubsection
11533 Quirks of the New Environments
11534 \begin_inset CommandInset label
11535 LatexCommand label
11536 name "sec:slideQuirk"
11537
11538 \end_inset
11539
11540
11541 \end_layout
11542
11543 \begin_layout Standard
11544 All five of the new paragraph environments are somewhat quirky due to inherent
11545  limitiations in the current version of \SpecialChar LyX
11546 .
11547  As I just mentioned, \SpecialChar LyX
11548  forbids environments that begin with another environment.
11549  To get around this, the 
11550 \family sans
11551 Slide
11552 \family default
11553  environment isn't a paragraph environment as described in the 
11554 \emph on
11555 User's Guide
11556 \emph default
11557 .
11558  
11559 \end_layout
11560
11561 \begin_layout Standard
11562 You should consider 
11563 \family sans
11564 Slide
11565 \family default
11566
11567 \family sans
11568 Overlay
11569 \family default
11570 , and 
11571 \family sans
11572 Note
11573 \family default
11574  to be 
11575 \begin_inset Quotes eld
11576 \end_inset
11577
11578 pseudo-environments.
11579 \begin_inset Quotes erd
11580 \end_inset
11581
11582  They look like a section heading or a 
11583 \begin_inset Quotes eld
11584 \end_inset
11585
11586
11587 \family sans
11588 Caption
11589 \family default
11590 ,
11591 \begin_inset Quotes erd
11592 \end_inset
11593
11594  but really begin a [and, if necessary, end the previous] paragraph environment.
11595  Likewise, treat 
11596 \family sans
11597 InvisibleText
11598 \family default
11599  and 
11600 \family sans
11601 VisibleText
11602 \family default
11603  as 
11604 \begin_inset Quotes eld
11605 \end_inset
11606
11607 pseudo-commands.
11608 \begin_inset Quotes erd
11609 \end_inset
11610
11611  These two perform some action.
11612 \end_layout
11613
11614 \begin_layout Standard
11615 A common feature of all five environments, 
11616 \family sans
11617 Slide
11618 \family default
11619
11620 \family sans
11621 Overlay
11622 \family default
11623
11624 \family sans
11625 Note
11626 \family default
11627
11628 \family sans
11629 InvisibleText
11630 \family default
11631  and 
11632 \family sans
11633 VisibleText
11634 \family default
11635 , is a rather long-ish label.
11636  The text following this label — ordinarily the contents of the paragraph
11637  environment — is utterly irrelevant for 
11638 \family sans
11639 Slide
11640 \family default
11641
11642 \family sans
11643 Overlay
11644 \family default
11645
11646 \family sans
11647 Note
11648 \family default
11649
11650 \family sans
11651 InvisibleText
11652 \family default
11653  and 
11654 \family sans
11655 VisibleText
11656 \family default
11657 .
11658  \SpecialChar LyX
11659  completely ignores it.
11660  In fact, you can leave these five environments completely empty.
11661  
11662 \end_layout
11663
11664 \begin_layout Standard
11665 While you don't 
11666 \emph on
11667 have
11668 \emph default
11669  to put any text after the rather long-ish label, you might want to.
11670  This could be a short description of the contents of the 
11671 \family sans
11672 Slide
11673 \family default
11674 , for example.
11675  In that case, enter your descriptive comment and hit 
11676 \family sans
11677 Return
11678 \family default
11679  as you normally would.
11680 \end_layout
11681
11682 \begin_layout Standard
11683 If, on the other hand, you don't want to enter any descriptive text, you'll
11684  hit another \SpecialChar LyX
11685  quirk.
11686  \SpecialChar LyX
11687 , like nature, abhors a vacuum, and will not let you start a new paragraph
11688  environment until you put something in the old one.
11689  So, do this:
11690 \end_layout
11691
11692 \begin_layout Itemize
11693 Start entering the text that will 
11694 \emph on
11695 follow
11696 \emph default
11697  the new 
11698 \family sans
11699 Slide
11700 \family default
11701
11702 \family sans
11703 Overlay
11704 \family default
11705
11706 \family sans
11707 Note
11708 \family default
11709
11710 \family sans
11711 InvisibleText
11712 \family default
11713  or 
11714 \family sans
11715 VisibleText
11716 \family default
11717 .
11718  
11719 \end_layout
11720
11721 \begin_layout Itemize
11722 Now move to the beginning of that paragraph.
11723  
11724 \end_layout
11725
11726 \begin_layout Itemize
11727 Next, hit 
11728 \family sans
11729 Return
11730 \family default
11731 .
11732  
11733 \end_layout
11734
11735 \begin_layout Itemize
11736 Finally, change this new, empty paragraph to a 
11737 \family sans
11738 Slide
11739 \family default
11740
11741 \family sans
11742 Overlay
11743 \family default
11744
11745 \family sans
11746 Note
11747 \family default
11748
11749 \family sans
11750 InvisibleText
11751 \family default
11752  or 
11753 \family sans
11754 VisibleText
11755 \family default
11756 .
11757  
11758 \end_layout
11759
11760 \begin_layout Standard
11761 Some future version of \SpecialChar LyX
11762  will, hopefully, resolve this quirkiness\SpecialChar ldots
11763
11764 \end_layout
11765
11766 \begin_layout Subsection
11767 Making a Presentation with 
11768 \family sans
11769 Slide
11770 \family default
11771
11772 \family sans
11773 Overlay
11774 \family default
11775  and 
11776 \family sans
11777 Note
11778 \end_layout
11779
11780 \begin_layout Subsubsection
11781 Using the 
11782 \family sans
11783 Slide
11784 \family default
11785  Environment
11786 \end_layout
11787
11788 \begin_layout Standard
11789 If you're expecting this section to teach you how to actually make a presentatio
11790 n, you'll be sorely disappointed.
11791  Naturally, I'll describe all of the ways the 
11792 \family sans
11793 slides
11794 \family default
11795  class can assist you in preparing the materials for a presentation.
11796  Filling in the contents, however, is up to you.
11797  [Then again, that 
11798 \emph on
11799 is
11800 \emph default
11801  the \SpecialChar LyX
11802  philosophy.]
11803 \end_layout
11804
11805 \begin_layout Standard
11806 Choosing the 
11807 \family sans
11808 Slide
11809 \family default
11810  environment [in the manner described in section
11811 \begin_inset space ~
11812 \end_inset
11813
11814
11815 \begin_inset CommandInset ref
11816 LatexCommand ref
11817 reference "sec:slideQuirk"
11818
11819 \end_inset
11820
11821 ] tells \SpecialChar LyX
11822  to begin a new slide [duh].
11823  The label for this environment/
11824 \begin_inset Quotes erd
11825 \end_inset
11826
11827 pseudo-command
11828 \begin_inset Quotes erd
11829 \end_inset
11830
11831  is an 
11832 \begin_inset Quotes eld
11833 \end_inset
11834
11835 ASCII line,
11836 \begin_inset Quotes erd
11837 \end_inset
11838
11839  in cool blue, followed by the label, 
11840 \begin_inset Quotes eld
11841 \end_inset
11842
11843 NewSlide:
11844 \begin_inset Quotes erd
11845 \end_inset
11846
11847 .
11848  Any text or paragraph environments that follow this one go on the new slide.
11849  It's that simple.
11850 \end_layout
11851
11852 \begin_layout Standard
11853 Slides are probably the only time you'll need to forcibly end pages in \SpecialChar LyX
11854
11855  (this can be specified in the 
11856 \family sans
11857 Paragraph Layout
11858 \family default
11859  dialog).
11860  In fact, you'll want to, once you finish entering the contents of one slide.
11861  If you've entered more text than can physically fit on a slide, the extra
11862  overflows onto a new slide.
11863  I don't recommend doing this, however, since the overflow slide won't have
11864  any page number on it.
11865  Furthermore, it may interfere with any 
11866 \family sans
11867 Overlay
11868 \family default
11869  you've made to accompany the oversized 
11870 \family sans
11871 Slide
11872 \family default
11873 .
11874 \end_layout
11875
11876 \begin_layout Standard
11877 The 
11878 \family sans
11879 Overlay
11880 \family default
11881  and 
11882 \family sans
11883 Note
11884 \family default
11885  environments work the same way as the 
11886 \family sans
11887 Slide
11888 \family default
11889  environment.
11890  They both create an 
11891 \begin_inset Quotes eld
11892 \end_inset
11893
11894 ASCII line
11895 \begin_inset Quotes erd
11896 \end_inset
11897
11898  followed by a label [
11899 \begin_inset Quotes eld
11900 \end_inset
11901
11902 NewOverlay:
11903 \begin_inset Quotes erd
11904 \end_inset
11905
11906  and 
11907 \begin_inset Quotes eld
11908 \end_inset
11909
11910 NewNote:
11911 \begin_inset Quotes erd
11912 \end_inset
11913
11914 , respectively].
11915  The color is a stunning magenta instead of blue, and the 
11916 \begin_inset Quotes eld
11917 \end_inset
11918
11919 ASCII line
11920 \begin_inset Quotes erd
11921 \end_inset
11922
11923  will look different, in style and in length.
11924  The label fonts of all three also differ from one another.
11925 \end_layout
11926
11927 \begin_layout Standard
11928 As with a 
11929 \family sans
11930 Slide
11931 \family default
11932 , if the contents of a 
11933 \family sans
11934 Note
11935 \family default
11936  or 
11937 \family sans
11938 Overlay
11939 \family default
11940  exceed the physical size of a slide or sheet of paper, the extra will overflow
11941  onto a new sheet.
11942  Again, you should avoid this.
11943  It defeats the whole purpose of 
11944 \family sans
11945 Note
11946 \family default
11947 s and 
11948 \family sans
11949 Overlay
11950 \family default
11951 s.
11952 \end_layout
11953
11954 \begin_layout Subsubsection
11955 Using 
11956 \family sans
11957 Overlay
11958 \family default
11959  with 
11960 \family sans
11961 Slide
11962 \end_layout
11963
11964 \begin_layout Standard
11965 The idea behind an 
11966 \family sans
11967 Overlay
11968 \family default
11969  is a slide that sits atop another slide.
11970  Perhaps you wish to discuss a figure on the main 
11971 \family sans
11972 Slide
11973 \family default
11974  before displaying the text associated with it.
11975  One way to accomplish this is tape a flap of dark paper over the part of
11976  the 
11977 \family sans
11978 Slide
11979 \family default
11980  you want to display later.
11981  This method fails, however, if you wish to overlap one graph with another,
11982  for example.
11983  You would then have to fumble while speaking to align the two separate,
11984  overlapping 
11985 \family sans
11986 Slide
11987 \family default
11988 s to align the two graphs.
11989  The use of an 
11990 \family sans
11991 Overlay
11992 \family default
11993  environment in both cases makes life much easier.
11994 \end_layout
11995
11996 \begin_layout Standard
11997 Each 
11998 \family sans
11999 Overlay
12000 \family default
12001  receives the page number of its 
12002 \begin_inset Quotes eld
12003 \end_inset
12004
12005 parent
12006 \begin_inset Quotes erd
12007 \end_inset
12008
12009  
12010 \family sans
12011 Slide
12012 \family default
12013 , appended by 
12014 \begin_inset Quotes eld
12015 \end_inset
12016
12017
12018 \family typewriter
12019 -a
12020 \family default
12021
12022 \begin_inset Quotes erd
12023 \end_inset
12024
12025 .
12026 \begin_inset Foot
12027 status collapsed
12028
12029 \begin_layout Plain Layout
12030 Presumably, mutliple 
12031 \family sans
12032 Overlay
12033 \family default
12034 s would have 
12035 \begin_inset Quotes eld
12036 \end_inset
12037
12038
12039 \family typewriter
12040 -a
12041 \family default
12042
12043 \begin_inset Quotes erd
12044 \end_inset
12045
12046
12047 \begin_inset Quotes eld
12048 \end_inset
12049
12050
12051 \family typewriter
12052 -b
12053 \family default
12054
12055 \begin_inset Quotes erd
12056 \end_inset
12057
12058
12059 \begin_inset Quotes eld
12060 \end_inset
12061
12062
12063 \family typewriter
12064 -c
12065 \family default
12066
12067 \begin_inset Quotes erd
12068 \end_inset
12069
12070 , etc.
12071 \begin_inset space ~
12072 \end_inset
12073
12074 appended to the page number of the parent 
12075 \family sans
12076 Slide
12077 \family default
12078 .
12079  
12080 \end_layout
12081
12082 \end_inset
12083
12084  Clearly, you want the contents of both the 
12085 \family sans
12086 Slide
12087 \family default
12088  and the 
12089 \family sans
12090 Overlay
12091 \family default
12092  to each fit on a single physical slide! You should probably consider an
12093  
12094 \family sans
12095 Overlay
12096 \family default
12097  as 
12098 \begin_inset Quotes eld
12099 \end_inset
12100
12101 part of
12102 \begin_inset Quotes erd
12103 \end_inset
12104
12105  a 
12106 \family sans
12107 Slide
12108 \family default
12109 .
12110  Indeed, the \SpecialChar LyX
12111  
12112 \family sans
12113 slides
12114 \family default
12115  class provides a visual cue for this: the label at the start of an 
12116 \family sans
12117 Overlay
12118 \family default
12119  is shorter than that at the start of a 
12120 \family sans
12121 Slide
12122 \family default
12123 .
12124  Lastly, when you generate printable output, you'll find alignment markers
12125  in all four corners of both the 
12126 \family sans
12127 Overlay
12128 \family default
12129  page and its parent 
12130 \family sans
12131 Slide
12132 \family default
12133 .
12134  These will assist you in lining up the two physical slides.
12135 \end_layout
12136
12137 \begin_layout Standard
12138 The major problem in overlaying two slides is aligning the contents of the
12139  two transparencies.
12140  How much space should you leave for that graph on the second slide? Worse
12141  still, what if you want a graph and a sentence on second slide, but there
12142  is text on the main transparency that goes in between them? You could try
12143  and insert vertical space of the right size.
12144  The better way is to use 
12145 \family sans
12146 InvisibleText
12147 \family default
12148  and 
12149 \family sans
12150 VisibleText
12151 \family default
12152 .
12153 \end_layout
12154
12155 \begin_layout Standard
12156 As their names imply, 
12157 \family sans
12158 InvisibleText
12159 \family default
12160  and 
12161 \family sans
12162 VisibleText
12163 \family default
12164  are two command-like paragraph environments that make all subsequent text
12165  invisible and visible, respectively.
12166  Note from section
12167 \begin_inset space ~
12168 \end_inset
12169
12170
12171 \begin_inset CommandInset ref
12172 LatexCommand ref
12173 reference "sec:slideQuirk"
12174
12175 \end_inset
12176
12177  that you don't place anything 
12178 \emph on
12179 into
12180 \emph default
12181  these two environments, however.
12182  When you create an 
12183 \family sans
12184 InvisibleText
12185 \family default
12186 , it inserts a centered, sky-blue label into the page reading 
12187 \begin_inset Quotes eld
12188 \end_inset
12189
12190 <Invisible Text Follows>
12191 \begin_inset Quotes erd
12192 \end_inset
12193
12194 .
12195  For paragraphs following this label, the parts of the 
12196 \family sans
12197 Slide
12198 \family default
12199  [or 
12200 \family sans
12201 Overlay
12202 \family default
12203 ; it doesn't matter which] where they would be contain instead blank space.
12204  
12205 \end_layout
12206
12207 \begin_layout Standard
12208 For 
12209 \family sans
12210 VisibleText
12211 \family default
12212 , the corresponding centered label is 
12213 \begin_inset Quotes eld
12214 \end_inset
12215
12216 <Visible Text Follows>
12217 \begin_inset Quotes erd
12218 \end_inset
12219
12220  in blazing green.
12221  Paragraphs following this label behave normally.
12222  Note that the beginning of a new 
12223 \family sans
12224 Slide
12225 \family default
12226
12227 \family sans
12228 Overlay
12229 \family default
12230 , or 
12231 \family sans
12232 Note
12233 \family default
12234  automatically shuts off an 
12235 \family sans
12236 InvisibleText
12237 \family default
12238 .
12239  It's therefore not necessary to use 
12240 \family sans
12241 VisibleText
12242 \family default
12243  at the end of a 
12244 \family sans
12245 Slide
12246 \family default
12247 .
12248 \end_layout
12249
12250 \begin_layout Standard
12251 By now, it should be obvious how to create overlay transparencies using
12252  the proper combination of 
12253 \family sans
12254 InvisibleText
12255 \family default
12256  and 
12257 \family sans
12258 VisibleText
12259 \family default
12260  on a 
12261 \family sans
12262 Slide
12263 \family default
12264  and 
12265 \family sans
12266 Overlay
12267 \family default
12268 :
12269 \end_layout
12270
12271 \begin_layout Enumerate
12272 Create a 
12273 \family sans
12274 Slide
12275 \family default
12276 , including everything that will appear on it, whether on the main slide
12277  or on the 
12278 \family sans
12279 Overlay
12280 \family default
12281 .
12282 \end_layout
12283
12284 \begin_layout Enumerate
12285 Before each figure or paragraph that will appear only on the 
12286 \family sans
12287 Overlay
12288 \family default
12289 , insert an 
12290 \family sans
12291 InvisibleText
12292 \family default
12293  environment.
12294  If necessary, insert a 
12295 \family sans
12296 VisibleText
12297 \family default
12298  environment after the 
12299 \family sans
12300 Overlay
12301 \family default
12302 -only text.
12303 \end_layout
12304
12305 \begin_layout Enumerate
12306 Start an 
12307 \family sans
12308 Overlay
12309 \family default
12310  immediately following the 
12311 \family sans
12312 Slide
12313 \family default
12314 .
12315 \end_layout
12316
12317 \begin_layout Enumerate
12318 Copy the contents of this 
12319 \family sans
12320 Slide
12321 \family default
12322  into the 
12323 \family sans
12324 Overlay
12325 \family default
12326 .
12327 \end_layout
12328
12329 \begin_layout Enumerate
12330 Within the 
12331 \family sans
12332 Overlay
12333 \family default
12334 , change all of the 
12335 \family sans
12336 InvisibleText
12337 \family default
12338  lines to 
12339 \family sans
12340 VisibleText
12341 \family default
12342  and vice-versa.
12343 \end_layout
12344
12345 \begin_layout Standard
12346 That's it.
12347  You've just made an 
12348 \family sans
12349 Overlay
12350 \family default
12351 .
12352 \end_layout
12353
12354 \begin_layout Standard
12355 There's one problem with the way I've designed the \SpecialChar LyX
12356  
12357 \family sans
12358 slides
12359 \family default
12360  class: you can't make text in the middle of a paragraph invisible, nor
12361  make text in the middle of an invisible paragraph visible again.
12362  To accomplish this feat, you'll need to use some inlined \SpecialChar LaTeX
12363  codes.
12364 \begin_inset Foot
12365 status collapsed
12366
12367 \begin_layout Plain Layout
12368 The commands of interest are: 
12369 \end_layout
12370
12371 \begin_layout Itemize
12372
12373 \family typewriter
12374 {
12375 \backslash
12376 invisible \SpecialChar ldots
12377  }
12378 \end_layout
12379
12380 \begin_layout Itemize
12381
12382 \family typewriter
12383 {
12384 \backslash
12385 visible \SpecialChar ldots
12386  }
12387 \end_layout
12388
12389 \begin_layout Plain Layout
12390 \SpecialChar ldots
12391 and need to be marked as \SpecialChar TeX
12392 .
12393  The text whose 
12394 \begin_inset Quotes eld
12395 \end_inset
12396
12397 visibility
12398 \begin_inset Quotes erd
12399 \end_inset
12400
12401  you wish to change goes in between the brackets [and after the 
12402 \family typewriter
12403
12404 \backslash
12405 invisible
12406 \family default
12407  or 
12408 \family typewriter
12409
12410 \backslash
12411 visible
12412 \family default
12413  command].
12414  If you don't know how to mark text as \SpecialChar TeX
12415 , see the appropriate section of
12416  the 
12417 \emph on
12418 User's Guide
12419 \emph default
12420 .
12421 \end_layout
12422
12423 \end_inset
12424
12425
12426 \end_layout
12427
12428 \begin_layout Subsubsection
12429 Using 
12430 \family sans
12431 Note
12432 \family default
12433  with 
12434 \family sans
12435 Slide
12436 \family default
12437
12438 \begin_inset CommandInset label
12439 LatexCommand label
12440 name "sec:slideNote"
12441
12442 \end_inset
12443
12444
12445 \end_layout
12446
12447 \begin_layout Standard
12448 Like an 
12449 \family sans
12450 Overlay
12451 \family default
12452 , a 
12453 \family sans
12454 Note
12455 \family default
12456  is associated with a 
12457 \begin_inset Quotes eld
12458 \end_inset
12459
12460 parent
12461 \begin_inset Quotes erd
12462 \end_inset
12463
12464  
12465 \family sans
12466 Slide
12467 \family default
12468 .
12469  Here, too, the \SpecialChar LyX
12470  
12471 \family sans
12472 slides
12473 \family default
12474  class provides visual cues.
12475  The label for a 
12476 \family sans
12477 Note
12478 \family default
12479  is shorter than that of a 
12480 \family sans
12481 Slide
12482 \family default
12483  [yet longer than that of an 
12484 \family sans
12485 Overlay
12486 \family default
12487 ] and, like the label of an 
12488 \family sans
12489 Overlay
12490 \family default
12491  is shockingly magenta.
12492  Additionally, the printed 
12493 \family sans
12494 Note
12495 \family default
12496  has the page number of its 
12497 \begin_inset Quotes eld
12498 \end_inset
12499
12500 parent
12501 \begin_inset Quotes erd
12502 \end_inset
12503
12504  
12505 \family sans
12506 Slide
12507 \family default
12508 , appended by 
12509 \begin_inset Quotes eld
12510 \end_inset
12511
12512
12513 \family typewriter
12514 -
12515 \family default
12516 1
12517 \begin_inset Quotes erd
12518 \end_inset
12519
12520
12521 \begin_inset Quotes eld
12522 \end_inset
12523
12524
12525 \family typewriter
12526 -
12527 \family default
12528 2
12529 \begin_inset Quotes erd
12530 \end_inset
12531
12532
12533 \begin_inset Quotes eld
12534 \end_inset
12535
12536
12537 \family typewriter
12538 -
12539 \family default
12540 3
12541 \begin_inset Quotes erd
12542 \end_inset
12543
12544 , etc.
12545  You can have multiple 
12546 \family sans
12547 Note
12548 \family default
12549 s associated with a single 
12550 \family sans
12551 Slide
12552 \family default
12553 , and, as with 
12554 \family sans
12555 Slide
12556 \family default
12557  and 
12558 \family sans
12559 Overlay
12560 \family default
12561 , you'll probably want to break up long 
12562 \family sans
12563 Note
12564 \family default
12565 s so that they fit on a single sheet of paper.
12566 \end_layout
12567
12568 \begin_layout Standard
12569 The purpose of a 
12570 \family sans
12571 Note
12572 \family default
12573  is obvious: it contains anything additional you might want to say about
12574  a 
12575 \family sans
12576 Slide
12577 \family default
12578 .
12579  It could also be used as a sheet of reminders for a particular 
12580 \family sans
12581 Slide
12582 \family default
12583 .
12584  In the case of the latter, you might want to make use of time markers.
12585  Currently, the \SpecialChar LyX
12586  
12587 \family sans
12588 slides
12589 \family default
12590  class has no 
12591 \begin_inset Quotes eld
12592 \end_inset
12593
12594 native
12595 \begin_inset Quotes erd
12596 \end_inset
12597
12598  support for time markers, a 
12599 \noun on
12600 Sli\SpecialChar TeX
12601
12602 \noun default
12603  feature.
12604  So, you'll have to resort to using the \SpecialChar LaTeX
12605  codes.
12606 \end_layout
12607
12608 \begin_layout Standard
12609 To use time markers, you'll need to specify the extra class option 
12610 \begin_inset Quotes eld
12611 \end_inset
12612
12613
12614 \family typewriter
12615 clock
12616 \family default
12617
12618 \begin_inset Quotes erd
12619 \end_inset
12620
12621  [see section
12622 \begin_inset space ~
12623 \end_inset
12624
12625
12626 \begin_inset CommandInset ref
12627 LatexCommand ref
12628 reference "sec:slidesetup"
12629
12630 \end_inset
12631
12632 ].
12633  This option turns on timing marks, which will appear in the lower-left-hand
12634  corner of every 
12635 \family sans
12636 Note
12637 \family default
12638  you generate.
12639  To set what appears in the time marker, you use the \SpecialChar LaTeX
12640  commands 
12641 \begin_inset Quotes eld
12642 \end_inset
12643
12644
12645 \family typewriter
12646
12647 \backslash
12648 settime{}
12649 \family default
12650
12651 \begin_inset Quotes erd
12652 \end_inset
12653
12654  and 
12655 \begin_inset Quotes eld
12656 \end_inset
12657
12658
12659 \family typewriter
12660
12661 \backslash
12662 addtime{}
12663 \family default
12664
12665 \begin_inset Quotes erd
12666 \end_inset
12667
12668 .
12669  The arguments of both commands are time measured in seconds.
12670  
12671 \begin_inset Quotes eld
12672 \end_inset
12673
12674
12675 \family typewriter
12676
12677 \backslash
12678 settime{}
12679 \family default
12680
12681 \begin_inset Quotes erd
12682 \end_inset
12683
12684  sets the time marker to a given time.
12685  
12686 \begin_inset Quotes eld
12687 \end_inset
12688
12689
12690 \family typewriter
12691
12692 \backslash
12693 addtime{}
12694 \family default
12695
12696 \begin_inset Quotes erd
12697 \end_inset
12698
12699  increments the time marker by the specified amount.
12700  Using time markers and 
12701 \family sans
12702 Note
12703 \family default
12704 s in this fashion, you can remind yourself how much time to spend on a particula
12705
12706 \family sans
12707 Slide
12708 \family default
12709 .
12710 \end_layout
12711
12712 \begin_layout Standard
12713 There's one last feature to describe.
12714  Clearly, you'd like to print out all of your 
12715 \family sans
12716 Slide
12717 \family default
12718 s and 
12719 \family sans
12720 Overlay
12721 \family default
12722 s on transparencies while printing all of your 
12723 \family sans
12724 Note
12725 \family default
12726 s on plain paper.
12727  However, a 
12728 \family sans
12729 Note
12730 \family default
12731  
12732 \emph on
12733 must
12734 \emph default
12735  follow the 
12736 \family sans
12737 Slide
12738 \family default
12739  with which it is associated.
12740  What's a person to do?
12741 \end_layout
12742
12743 \begin_layout Standard
12744 Luckily, there are two \SpecialChar LaTeX
12745  commands that allow you to select what to print
12746  out.
12747  Both must be placed into the preamble of your document.
12748  The command 
12749 \begin_inset Quotes eld
12750 \end_inset
12751
12752
12753 \family typewriter
12754
12755 \backslash
12756 onlyslides{
12757 \backslash
12758 slides}
12759 \family default
12760
12761 \begin_inset Quotes erd
12762 \end_inset
12763
12764  will cause the output to contain only the 
12765 \family sans
12766 Slide
12767 \family default
12768 s and 
12769 \family sans
12770 Overlay
12771 \family default
12772 s.
12773  Correspondingly, the command 
12774 \begin_inset Quotes eld
12775 \end_inset
12776
12777
12778 \family typewriter
12779
12780 \backslash
12781 onlynotes{
12782 \backslash
12783 notes}
12784 \family default
12785
12786 \begin_inset Quotes erd
12787 \end_inset
12788
12789  prevents the output of anything but 
12790 \family sans
12791 Note
12792 \family default
12793 s.
12794  I'd advise placing both commands in the preamble and initially comment
12795  both out.
12796  You can then preview your entire presentation as you write.
12797  When you're done writing, you can then uncomment one of the two to select
12798  what you want to print.
12799  I like to uncomment 
12800 \begin_inset Quotes eld
12801 \end_inset
12802
12803
12804 \family typewriter
12805
12806 \backslash
12807 onlyslides{
12808 \backslash
12809 slides}
12810 \family default
12811
12812 \begin_inset Quotes erd
12813 \end_inset
12814
12815  , print to a file with 
12816 \begin_inset Quotes eld
12817 \end_inset
12818
12819
12820 \family typewriter
12821 -slides
12822 \family default
12823
12824 \begin_inset Quotes erd
12825 \end_inset
12826
12827  in its name, comment it back out, then uncomment 
12828 \begin_inset Quotes eld
12829 \end_inset
12830
12831
12832 \family typewriter
12833
12834 \backslash
12835 onlynotes{
12836 \backslash
12837 notes}
12838 \family default
12839
12840 \begin_inset Quotes erd
12841 \end_inset
12842
12843  and print to a 
12844 \begin_inset Quotes eld
12845 \end_inset
12846
12847
12848 \family typewriter
12849 *-notes.ps
12850 \family default
12851
12852 \begin_inset Quotes erd
12853 \end_inset
12854
12855  file.
12856  I can then send either file to a printer, loading transparencies or plain
12857  paper as appropriate.
12858 \end_layout
12859
12860 \begin_layout Standard
12861 You can also provide other arguments to the 
12862 \begin_inset Quotes eld
12863 \end_inset
12864
12865
12866 \family typewriter
12867
12868 \backslash
12869 onlyslides{}
12870 \family default
12871
12872 \begin_inset Quotes erd
12873 \end_inset
12874
12875  and 
12876 \begin_inset Quotes eld
12877 \end_inset
12878
12879
12880 \family typewriter
12881
12882 \backslash
12883 onlynotes{}
12884 \family default
12885
12886 \begin_inset Quotes erd
12887 \end_inset
12888
12889  commands.
12890  See a good \SpecialChar LaTeX
12891  book for details.
12892 \end_layout
12893
12894 \begin_layout Subsection
12895 The 
12896 \family sans
12897 slides
12898 \family default
12899  Class Template File
12900 \end_layout
12901
12902 \begin_layout Standard
12903 I have also provided a template file, 
12904 \begin_inset Quotes eld
12905 \end_inset
12906
12907
12908 \family typewriter
12909 slides.lyx
12910 \family default
12911
12912 \begin_inset Quotes erd
12913 \end_inset
12914
12915 , with the 
12916 \family sans
12917 slides
12918 \family default
12919  class.
12920  To use it, begin your new presentation with 
12921 \family sans
12922 File\SpecialChar menuseparator
12923 New
12924 \begin_inset space ~
12925 \end_inset
12926
12927 from
12928 \begin_inset space ~
12929 \end_inset
12930
12931 Template
12932 \family default
12933 .
12934  Your new \SpecialChar LyX
12935  presentation file will contain an example 
12936 \family sans
12937 Slide
12938 \family default
12939  – 
12940 \family sans
12941 Overlay
12942 \family default
12943  – 
12944 \family sans
12945 Note
12946 \family default
12947  triplet.
12948  The 
12949 \family sans
12950 Slide
12951 \family default
12952  and 
12953 \family sans
12954 Overlay
12955 \family default
12956  additionally contain an example of the use of 
12957 \family sans
12958 InvisibleText
12959 \family default
12960  and 
12961 \family sans
12962 VisibleText
12963 \family default
12964 .
12965  Lastly, the preamble will contain:
12966 \end_layout
12967
12968 \begin_layout LyX-Code
12969 % Uncomment to print out only slides and overlays
12970 \end_layout
12971
12972 \begin_layout LyX-Code
12973 %
12974 \end_layout
12975
12976 \begin_layout LyX-Code
12977 %
12978 \backslash
12979 onlyslides{
12980 \backslash
12981 slides}
12982 \begin_inset Newline newline
12983 \end_inset
12984
12985  
12986 \end_layout
12987
12988 \begin_layout LyX-Code
12989 % Uncomment to print out only notes
12990 \end_layout
12991
12992 \begin_layout LyX-Code
12993 %
12994 \end_layout
12995
12996 \begin_layout LyX-Code
12997 %
12998 \backslash
12999 onlynotes{
13000 \backslash
13001 notes}
13002 \end_layout
13003
13004 \begin_layout Standard
13005 One final thing: I created this class to support the \SpecialChar LaTeX2e
13006  
13007 \begin_inset Quotes eld
13008 \end_inset
13009
13010
13011 \noun on
13012 Sli\SpecialChar TeX
13013
13014 \noun default
13015  emulation
13016 \begin_inset Quotes erd
13017 \end_inset
13018
13019  class, one of the built-in \SpecialChar LaTeX2e
13020  classes.
13021  Neither I nor the rest of the \SpecialChar LyX
13022  Team endorse or oppose the use of this built-in
13023  slide class.
13024  It's here if you want it or need it.
13025  There exist other \SpecialChar LaTeX2e
13026  classes for creating presentations, such as the 
13027 \family sans
13028 Foils
13029 \family default
13030  class [see section
13031 \begin_inset space ~
13032 \end_inset
13033
13034
13035 \begin_inset CommandInset ref
13036 LatexCommand ref
13037 reference "sec:foiltex"
13038
13039 \end_inset
13040
13041 ] or the 
13042 \begin_inset Quotes eld
13043 \end_inset
13044
13045
13046 \family typewriter
13047 seminar
13048 \family default
13049
13050 \begin_inset Quotes erd
13051 \end_inset
13052
13053  package [present on some \SpecialChar TeX
13054  distributions].
13055  The latter is not yet supported under \SpecialChar LyX
13056 .
13057 \begin_inset Foot
13058 status collapsed
13059
13060 \begin_layout Plain Layout
13061 Perhaps you can take on the task\SpecialChar ldots
13062
13063 \end_layout
13064
13065 \end_inset
13066
13067  I know nothing about these other classes.
13068  Try them out to see what sort of alternative they provide.
13069 \end_layout
13070
13071 \begin_layout Chapter
13072
13073 \change_inserted 893223064 1464851900
13074 Modules
13075 \end_layout
13076
13077 \begin_layout Standard
13078
13079 \change_inserted 893223064 1464851910
13080 This is a holder for prepared text.
13081 \end_layout
13082
13083 \begin_layout Chapter
13084
13085 \change_inserted 893223064 1464851939
13086 Page layout
13087 \end_layout
13088
13089 \begin_layout Standard
13090
13091 \change_inserted 893223064 1464851945
13092 This is a holder for prepared text.
13093 \end_layout
13094
13095 \begin_layout Section
13096 Special features
13097 \end_layout
13098
13099 \begin_layout Standard
13100 You can do everything with \SpecialChar LyX
13101  that you can do with \SpecialChar LaTeX
13102 .
13103  However, \SpecialChar LyX
13104  cannot support every \SpecialChar LaTeX
13105  feature directly.
13106  But you can always use \SpecialChar TeX
13107  Code.
13108  This chapter shows you some more special things you might want to use.
13109  For other special things you can do with figures, tables, floats, boxes
13110  and notes, have a look at the 
13111 \emph on
13112 Embedded
13113 \begin_inset space ~
13114 \end_inset
13115
13116 Objects
13117 \emph default
13118  manual.
13119 \end_layout
13120
13121 \begin_layout Section
13122 Fancy Headers and Footers
13123 \end_layout
13124
13125 \begin_layout Standard
13126 The default page layout is rather plain; for an 
13127 \begin_inset Flex Code
13128 status collapsed
13129
13130 \begin_layout Plain Layout
13131 article
13132 \end_layout
13133
13134 \end_inset
13135
13136  document class, all you get is a centered page number at the bottom of
13137  the page.
13138  This document uses KOMA-script's book class, so it appears to be a bit
13139  fancier.
13140  But to really put on a show, you need to set the document page style to
13141  
13142 \begin_inset Quotes eld
13143 \end_inset
13144
13145 fancy
13146 \begin_inset Quotes erd
13147 \end_inset
13148
13149 , as mentioned in the 
13150 \emph on
13151 User Guide
13152 \emph default
13153 .
13154  This section describes the \SpecialChar LaTeX
13155  code you need to insert in your \SpecialChar LaTeX
13156  preamble in
13157  order to get the desired effects.
13158 \end_layout
13159
13160 \begin_layout Standard
13161 For more information on fancy headers, see the 
13162 \begin_inset Flex Code
13163 status collapsed
13164
13165 \begin_layout Plain Layout
13166 fancyhdr
13167 \end_layout
13168
13169 \end_inset
13170
13171  package documentation.
13172  (
13173 \begin_inset Flex URL
13174 status collapsed
13175
13176 \begin_layout Plain Layout
13177
13178 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
13179 \end_layout
13180
13181 \end_inset
13182
13183 )
13184 \end_layout
13185
13186 \begin_layout Standard
13187 The page header is divided into three fields, not surprisingly labeled 
13188 \begin_inset Quotes eld
13189 \end_inset
13190
13191 left
13192 \begin_inset Quotes erd
13193 \end_inset
13194
13195
13196 \begin_inset Quotes eld
13197 \end_inset
13198
13199 center
13200 \begin_inset Quotes erd
13201 \end_inset
13202
13203 , and 
13204 \begin_inset Quotes eld
13205 \end_inset
13206
13207 right
13208 \begin_inset Quotes erd
13209 \end_inset
13210
13211 .
13212  The footer is also divided into these three fields.
13213  The \SpecialChar LaTeX
13214  commands to set these fields in the simplest manner are 
13215 \begin_inset Flex Code
13216 status collapsed
13217
13218 \begin_layout Plain Layout
13219
13220 \backslash
13221 lhead
13222 \end_layout
13223
13224 \end_inset
13225
13226
13227 \begin_inset Flex Code
13228 status collapsed
13229
13230 \begin_layout Plain Layout
13231
13232 \backslash
13233 chead
13234 \end_layout
13235
13236 \end_inset
13237
13238
13239 \begin_inset Flex Code
13240 status collapsed
13241
13242 \begin_layout Plain Layout
13243
13244 \backslash
13245 rhead
13246 \end_layout
13247
13248 \end_inset
13249
13250
13251 \begin_inset Flex Code
13252 status collapsed
13253
13254 \begin_layout Plain Layout
13255
13256 \backslash
13257 lfoot
13258 \end_layout
13259
13260 \end_inset
13261
13262 , etc.
13263  Suppose you wish to put your name in the upper left hand corner of each
13264  page.
13265  Simply insert the following command in the preamble: 
13266 \end_layout
13267
13268 \begin_layout Standard
13269
13270 \family typewriter
13271
13272 \backslash
13273 lhead{John Q.
13274  DocWriter}
13275 \end_layout
13276
13277 \begin_layout Standard
13278 You will now see your name in the upper left.
13279  If a field has a default entry that you would like to get rid of (often
13280  the page number appears in the central footer) simply include a command
13281  with a blank argument, e.
13282 \begin_inset space \thinspace{}
13283 \end_inset
13284
13285 g.:
13286 \end_layout
13287
13288 \begin_layout Standard
13289
13290 \family typewriter
13291
13292 \backslash
13293 cfoot{}
13294 \end_layout
13295
13296 \begin_layout Standard
13297 Let's get really fancy: lets put the section number with the word 
13298 \begin_inset Quotes eld
13299 \end_inset
13300
13301 Section
13302 \begin_inset Quotes erd
13303 \end_inset
13304
13305  (e.
13306 \begin_inset space \thinspace{}
13307 \end_inset
13308
13309 g.
13310 \begin_inset space \space{}
13311 \end_inset
13312
13313 Section 3) in the upper left, the page number (e.
13314 \begin_inset space \thinspace{}
13315 \end_inset
13316
13317 g.
13318 \begin_inset space \space{}
13319 \end_inset
13320
13321 Page 4) in the upper right, your name in the lower left, and the date in
13322  the lower right.
13323  The following commands should now appear in the preamble:
13324 \end_layout
13325
13326 \begin_layout Standard
13327
13328 \family typewriter
13329
13330 \backslash
13331 lhead{Section 
13332 \backslash
13333 thesection}
13334 \end_layout
13335
13336 \begin_layout Standard
13337
13338 \family typewriter
13339
13340 \backslash
13341 chead{}
13342 \end_layout
13343
13344 \begin_layout Standard
13345
13346 \family typewriter
13347
13348 \backslash
13349 rhead{Page 
13350 \backslash
13351 thepage}
13352 \end_layout
13353
13354 \begin_layout Standard
13355
13356 \family typewriter
13357
13358 \backslash
13359 lfoot{John Q.
13360  DocWriter}
13361 \end_layout
13362
13363 \begin_layout Standard
13364
13365 \family typewriter
13366
13367 \backslash
13368 cfoot{}
13369 \end_layout
13370
13371 \begin_layout Standard
13372
13373 \family typewriter
13374
13375 \backslash
13376 rfoot{
13377 \backslash
13378 today}
13379 \end_layout
13380
13381 \begin_layout Standard
13382 The commands 
13383 \begin_inset Flex Code
13384 status collapsed
13385
13386 \begin_layout Plain Layout
13387
13388 \backslash
13389 thesection
13390 \end_layout
13391
13392 \end_inset
13393
13394  and 
13395 \begin_inset Flex Code
13396 status collapsed
13397
13398 \begin_layout Plain Layout
13399
13400 \backslash
13401 thepage
13402 \end_layout
13403
13404 \end_inset
13405
13406  access \SpecialChar LaTeX
13407 's section and page counters, and so print out the current section
13408  and page numbers.
13409  
13410 \begin_inset Flex Code
13411 status collapsed
13412
13413 \begin_layout Plain Layout
13414
13415 \backslash
13416 today
13417 \end_layout
13418
13419 \end_inset
13420
13421  simply prints out today's date.
13422 \end_layout
13423
13424 \begin_layout Standard
13425 The thicknesses of the horizontal rules drawn beneath the header and above
13426  the footer can also be modified.
13427  If you don't want one of the rules, set its thickness to 0.
13428  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
13429  Use commands
13430 \family typewriter
13431  
13432 \family default
13433 like 
13434 \begin_inset Flex Code
13435 status collapsed
13436
13437 \begin_layout Plain Layout
13438
13439 \backslash
13440 renewcommand{
13441 \backslash
13442 headrulewidth}{0.4pt}
13443 \end_layout
13444
13445 \end_inset
13446
13447  and 
13448 \begin_inset Flex Code
13449 status collapsed
13450
13451 \begin_layout Plain Layout
13452
13453 \backslash
13454 renewcommand{
13455 \backslash
13456 footrulewidth}{0.4pt}
13457 \end_layout
13458
13459 \end_inset
13460
13461  to set the thicknesses.
13462 \end_layout
13463
13464 \begin_layout Standard
13465 You can switch the header/footer settings on and off for individual pages
13466  using commands like 
13467 \begin_inset Flex Code
13468 status collapsed
13469
13470 \begin_layout Plain Layout
13471
13472 \backslash
13473 thispagestyle{empty}
13474 \end_layout
13475
13476 \end_inset
13477
13478
13479 \begin_inset Flex Code
13480 status collapsed
13481
13482 \begin_layout Plain Layout
13483
13484 \backslash
13485 thispagestyle{plain}
13486 \end_layout
13487
13488 \end_inset
13489
13490 , and 
13491 \begin_inset Flex Code
13492 status collapsed
13493
13494 \begin_layout Plain Layout
13495
13496 \backslash
13497 thispagestyle{fancy}
13498 \end_layout
13499
13500 \end_inset
13501
13502 .
13503  Simply insert them in the text on the page you want changed and mark them
13504  as \SpecialChar TeX
13505  code.
13506  In fact, title pages are marked as plain by default, while following pages
13507  are marked fancy when using the global fancy setting.
13508 \end_layout
13509
13510 \begin_layout Standard
13511 As a final example, it is possible to include an image in the header or
13512  footer.
13513  Suppose you want to put a company logo in the upper lefthand corner.
13514  You might try something like
13515 \end_layout
13516
13517 \begin_layout Standard
13518
13519 \family typewriter
13520
13521 \backslash
13522 lhead{
13523 \backslash
13524 resizebox{1in}{!}{
13525 \backslash
13526 includegraphics{logo.eps}}}
13527 \end_layout
13528
13529 \begin_layout Standard
13530 \noindent
13531 (you may need to preface this with 
13532 \begin_inset Flex Code
13533 status collapsed
13534
13535 \begin_layout Plain Layout
13536 \noindent
13537
13538 \backslash
13539 usepackage{graphics}
13540 \end_layout
13541
13542 \end_inset
13543
13544  if you don't include graphics elsewhere in your document).
13545 \end_layout
13546
13547 \begin_layout Section
13548 Multiple Text Columns
13549 \end_layout
13550
13551 \begin_layout Standard
13552 This feature is independent of the option 
13553 \family sans
13554 Two-column document
13555 \family default
13556  in the document settings under 
13557 \family sans
13558 Text Layout
13559 \family default
13560 .
13561  If you want to have 2
13562 \begin_inset space ~
13563 \end_inset
13564
13565 columns for the whole document, it is recommended to use the 
13566 \family sans
13567 Two-column document
13568 \family default
13569  option.
13570  For all other cases use this feature.
13571 \end_layout
13572
13573 \begin_layout Standard
13574 To use multiple text columns in your document, you have to load the module
13575  
13576 \family sans
13577 Multiple Columns
13578 \family default
13579  (menu 
13580 \family sans
13581 Document\SpecialChar menuseparator
13582 Settings\SpecialChar menuseparator
13583 Modules
13584 \family default
13585 ) and must have the \SpecialChar LaTeX
13586 -package 
13587 \series bold
13588 multicol
13589 \series default
13590  installed.
13591 \end_layout
13592
13593 \begin_layout Standard
13594 Footnotes within multiple columns will be placed at the bottom of the page
13595  and not under each column.
13596  Within the different columns you can use everything, with the limitation
13597  that for floats you need to use the float option 
13598 \family sans
13599 Span columns
13600 \family default
13601 .
13602 \end_layout
13603
13604 \begin_layout Subsection
13605 Basics
13606 \end_layout
13607
13608 \begin_layout Standard
13609 If you want to have 2
13610 \begin_inset space ~
13611 \end_inset
13612
13613 columns in your text, insert a multicolumn inset via the menu 
13614 \family sans
13615 Insert\SpecialChar menuseparator
13616 Custom
13617 \begin_inset space ~
13618 \end_inset
13619
13620 Insets\SpecialChar menuseparator
13621 Multiple
13622 \begin_inset space ~
13623 \end_inset
13624
13625 Columns
13626 \family default
13627  where the columns should start.
13628  Write all text that should be printed in 2
13629 \begin_inset space ~
13630 \end_inset
13631
13632 columns into this inset.
13633 \end_layout
13634
13635 \begin_layout Standard
13636 Here is an example:
13637 \end_layout
13638
13639 \begin_layout Standard
13640 \noindent
13641 \begin_inset Flex Multiple Columns
13642 status open
13643
13644 \begin_layout Plain Layout
13645 \noindent
13646
13647 \series bold
13648 \size small
13649 The Adventure of the Empty House
13650 \series default
13651
13652 \begin_inset Newline newline
13653 \end_inset
13654
13655 by Sir Arthur Conan Doyle
13656 \end_layout
13657
13658 \begin_layout Plain Layout
13659
13660 \size small
13661 It was in the spring of the year 1894 that all London was interested, and
13662  the fashionable world dismayed, by the murder of the Honourable Ronald
13663  Adair under most unusual and inexplicable circumstances.
13664  The public has already learned those particulars of the crime which came
13665  out in the police investigation, but a good deal was suppressed upon that
13666  occasion, since the case for the prosecution was so overwhelmingly strong
13667  that it was not necessary to bring forward all the facts.
13668  Only now, at the end of nearly ten years, am I allowed to supply those
13669  missing links which make up the whole of that remarkable chain.
13670  The crime was of interest in itself, but that interest was as nothing to
13671  me compared to the inconceivable sequel, which afforded me the greatest
13672  shock and surprise of any event in my adventurous life.
13673  Even now, after this long interval, I find myself thrilling as I think
13674  of it, and feeling once more that sudden flood of joy, amazement, and increduli
13675 ty which utterly submerged my mind.
13676  Let me say to that public, which has shown some interest in those glimpses
13677  which I have occasionally given them of the thoughts and actions of a very
13678  remarkable man, that they are not to blame me if I have not shared my knowledge
13679  with them, for I should have considered it my first duty to do so, had
13680  I not been barred by a positive prohibition from his own lips, which was
13681  only withdrawn upon the third of last month.
13682 \end_layout
13683
13684 \end_inset
13685
13686
13687 \end_layout
13688
13689 \begin_layout Standard
13690 To get 3 or more columns, set the cursor into the multicolumn inset and
13691  use the menu 
13692 \family sans
13693 Insert\SpecialChar menuseparator
13694 Number
13695 \begin_inset space ~
13696 \end_inset
13697
13698 of
13699 \begin_inset space ~
13700 \end_inset
13701
13702 Columns
13703 \family default
13704 .
13705  The number of the desired columns is written into that inset (for 3
13706 \begin_inset space ~
13707 \end_inset
13708
13709 columns write 
13710 \begin_inset Quotes eld
13711 \end_inset
13712
13713 3
13714 \begin_inset Quotes erd
13715 \end_inset
13716
13717 ).
13718 \begin_inset Newline newline
13719 \end_inset
13720
13721 Here is an example with 3
13722 \begin_inset space ~
13723 \end_inset
13724
13725 columns:
13726 \end_layout
13727
13728 \begin_layout Standard
13729 \begin_inset Flex Multiple Columns
13730 status open
13731
13732 \begin_layout Plain Layout
13733
13734 \size footnotesize
13735 \begin_inset Argument 1
13736 status open
13737
13738 \begin_layout Plain Layout
13739 3
13740 \end_layout
13741
13742 \end_inset
13743
13744 It can be imagined that my close intimacy with Sherlock Holmes had interested
13745  me deeply in crime, and that after his disappearance I never failed to
13746  read with care the various problems which came before the public.
13747  And I even attempted, more than once, for my own private satisfaction,
13748  to employ his methods in their solution, though with indifferent success.
13749  There was none, however, which appealed to me like this tragedy of Ronald
13750  Adair.
13751  As I read the evidence at the inquest, which led up to a verdict of willful
13752  murder against some person or persons unknown, I realized more clearly
13753  than I had ever done the loss which the community had sustained by the
13754  death of Sherlock Holmes.
13755  There were points about this strange business which would, I was sure,
13756  have specially appealed to him, and the efforts of the police would have
13757  been supplemented, or more probably anticipated, by the trained observation
13758  and the alert mind of the first criminal agent in Europe.
13759  All day, as I drove upon my round, I turned over the case in my mind and
13760  found no explanation which appeared to me to be adequate.
13761  At the risk of telling a twice-told tale, I will recapitulate the facts
13762  as they were known to the public at the conclusion of the inquest.
13763 \end_layout
13764
13765 \end_inset
13766
13767
13768 \end_layout
13769
13770 \begin_layout Standard
13771 You can have up to 10
13772 \begin_inset space ~
13773 \end_inset
13774
13775 columns if you want to, but that might not be very pleasant for the readers
13776  of your document.
13777 \end_layout
13778
13779 \begin_layout Standard
13780 \begin_inset Newpage newpage
13781 \end_inset
13782
13783
13784 \end_layout
13785
13786 \begin_layout Subsection
13787 Columns inside Columns
13788 \end_layout
13789
13790 \begin_layout Standard
13791 You can also have columns inside columns:
13792 \end_layout
13793
13794 \begin_layout Standard
13795 \begin_inset Flex Multiple Columns
13796 status open
13797
13798 \begin_layout Plain Layout
13799
13800 \size footnotesize
13801 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
13802  at that time governor of one of the Australian colonies.
13803  Adair's mother had returned from Australia to undergo the operation for
13804  cataract, and she, her son Ronald, and her daughter Hilda were living together
13805  at 427 Park Lane.
13806 \end_layout
13807
13808 \begin_layout Plain Layout
13809 \begin_inset Flex Multiple Columns
13810 status open
13811
13812 \begin_layout Plain Layout
13813
13814 \size footnotesize
13815 The youth moved in the best society–had, so far as was known, no enemies
13816  and no particular vices.
13817  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
13818  had been broken off by mutual consent some months before, and there was
13819  no sign that it had left any very profound feeling behind it.
13820  For the rest {sic} the man's life moved in a narrow and conventional circle,
13821  for his habits were quiet and his nature unemotional.
13822  Yet it was upon this easy-going young aristocrat that death came, in most
13823  strange and unexpected form, between the hours of ten and eleven-twenty
13824  on the night of March 30, 1894.
13825 \end_layout
13826
13827 \end_inset
13828
13829
13830 \end_layout
13831
13832 \begin_layout Plain Layout
13833
13834 \size footnotesize
13835 Ronald Adair was fond of cards–playing continually, but never for such stakes
13836  as would hurt him.
13837  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
13838  It was shown that, after dinner on the day of his death, he had played
13839  a rubber of whist at the latter club.
13840  He had also played there in the afternoon.
13841
13842 \size default
13843  
13844 \size footnotesize
13845 The evidence of those who had played with him– Mr.
13846  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
13847  and that there was a fairly equal fall of the cards.
13848  Adair might have lost five pounds, but not more.
13849  His fortune was a considerable one, and such a loss could not in any way
13850  affect him.
13851  He had played nearly every day at one club or other, but he was a cautious
13852  player, and usually rose a winner.
13853  It came out in evidence that, in partnership with Colonel Moran, he had
13854  actually won as much as four hundred and twenty pounds in a sitting, some
13855  weeks before, from Godfrey Milner and Lord Balmoral.
13856  So much for his recent history as it came out at the inquest.
13857 \end_layout
13858
13859 \end_inset
13860
13861
13862 \end_layout
13863
13864 \begin_layout Subsection
13865 Advanced Examples
13866 \end_layout
13867
13868 \begin_layout Standard
13869 The examples in this section show some more special features of multiple
13870  columns.
13871 \end_layout
13872
13873 \begin_layout Standard
13874 For more features of multiple columns, have a look at the documentation
13875  of the \SpecialChar LaTeX
13876 -package 
13877 \series bold
13878 multicol
13879 \series default
13880
13881 \begin_inset CommandInset citation
13882 LatexCommand cite
13883 key "multicol"
13884
13885 \end_inset
13886
13887 .
13888 \end_layout
13889
13890 \begin_layout Subsubsection
13891 Preface
13892 \end_layout
13893
13894 \begin_layout Standard
13895 To add a preface text for multiple columns, set the cursor into the multicolumn
13896  inset and use the menu 
13897 \family sans
13898 Insert\SpecialChar menuseparator
13899 Preface
13900 \family default
13901 .
13902  Write your preface text into that inset.
13903 \begin_inset Newline newline
13904 \end_inset
13905
13906 This is an example with some preface text:
13907 \end_layout
13908
13909 \begin_layout Standard
13910 \begin_inset VSpace bigskip
13911 \end_inset
13912
13913
13914 \end_layout
13915
13916 \begin_layout Standard
13917 \begin_inset Flex Multiple Columns
13918 status open
13919
13920 \begin_layout Plain Layout
13921 \begin_inset Argument 2
13922 status open
13923
13924 \begin_layout Plain Layout
13925 And the story continues and continues and continues and continues\SpecialChar ldots
13926
13927 \end_layout
13928
13929 \end_inset
13930
13931
13932 \size small
13933 On the evening of the crime, he returned from the club exactly at ten.
13934  His mother and sister were out spending the evening with a relation.
13935  The servant deposed that she heard him enter the front room on the second
13936  floor, generally used as his sitting-room.
13937  She had lit a fire there, and as it smoked she had opened the window.
13938  No sound was heard from the room until eleven-twenty, the hour of the return
13939  of Lady Maynooth and her daughter.
13940  Desiring to say good-night, she attempted to enter her son's room.
13941  The door was locked on the inside, and no answer could be got to their
13942  cries and knocking.
13943  Help was obtained, and the door forced.
13944  The unfortunate young man was found lying near the table.
13945  His head had been horribly mutilated by an expanding revolver bullet, but
13946  no weapon of any sort was to be found in the room.
13947 \end_layout
13948
13949 \end_inset
13950
13951
13952 \end_layout
13953
13954 \begin_layout Standard
13955 You can also use a section heading as the preface if you use a section command
13956  as \SpecialChar TeX
13957  Code.
13958  For example the command
13959 \end_layout
13960
13961 \begin_layout Standard
13962
13963 \series bold
13964
13965 \backslash
13966 subsection{subsection title}
13967 \end_layout
13968
13969 \begin_layout Standard
13970 creates a subsection.
13971  In this example the preface is a subsubsection:
13972 \end_layout
13973
13974 \begin_layout Standard
13975 \begin_inset Flex Multiple Columns
13976 status open
13977
13978 \begin_layout Plain Layout
13979 \begin_inset Argument 2
13980 status open
13981
13982 \begin_layout Plain Layout
13983 \begin_inset ERT
13984 status collapsed
13985
13986 \begin_layout Plain Layout
13987
13988
13989 \backslash
13990 subsubsection{
13991 \end_layout
13992
13993 \end_inset
13994
13995 This is a subsubsection heading as a preface
13996 \begin_inset ERT
13997 status collapsed
13998
13999 \begin_layout Plain Layout
14000
14001 }
14002 \end_layout
14003
14004 \end_inset
14005
14006
14007 \end_layout
14008
14009 \end_inset
14010
14011
14012 \size small
14013 A minute examination of the circumstances served only to make the case more
14014  complex.
14015  In the first place, no reason could be given why the young man should have
14016  fastened the door upon the inside.
14017  There was the possibility that the murderer had done this, and had afterwards
14018  escaped by the window.
14019  The drop was at least twenty feet, however, and a bed of crocuses in full
14020  bloom lay beneath.
14021  Neither the flowers nor the earth showed any sign of having been disturbed,
14022  nor were there any marks upon the narrow strip of grass which separated
14023  the house from the road.
14024  Apparently, therefore, it was the young man himself who had fastened the
14025  door.
14026  But how did he come by his death? No one could have climbed up to the window
14027  without leaving traces.
14028  Suppose a man had fired through the window, he would indeed be a remarkable
14029  shot who could with a revolver inflict so deadly a wound.
14030  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
14031  a hundred yards of the house.
14032  No one had heard a shot.
14033 \end_layout
14034
14035 \end_inset
14036
14037
14038 \end_layout
14039
14040 \begin_layout Standard
14041 If there is less vertical space than 6
14042 \begin_inset space ~
14043 \end_inset
14044
14045 text lines is left on the page at the beginning of the multiple columns,
14046  a page break will be inserted before the multiple columns.
14047  Depending on the number of lines of the preface text, you might want to
14048  change this space.
14049  This is done by setting the cursor into the mulitcolumn inset behind the
14050  preface (if there is any) and using the menu 
14051 \family sans
14052 Insert\SpecialChar menuseparator
14053 Space
14054 \begin_inset space ~
14055 \end_inset
14056
14057 Before
14058 \begin_inset space ~
14059 \end_inset
14060
14061 Page
14062 \begin_inset space ~
14063 \end_inset
14064
14065 Break
14066 \family default
14067 .
14068  Insert into that inset the amount of space like e.
14069 \begin_inset space \thinspace{}
14070 \end_inset
14071
14072 g.
14073 \begin_inset space \space{}
14074 \end_inset
14075
14076
14077 \begin_inset Quotes eld
14078 \end_inset
14079
14080 5cm
14081 \begin_inset Quotes erd
14082 \end_inset
14083
14084 .
14085 \begin_inset Newline newline
14086 \end_inset
14087
14088 In this example the space is set to 7
14089 \begin_inset space ~
14090 \end_inset
14091
14092 text lines by using 
14093 \begin_inset Quotes eld
14094 \end_inset
14095
14096 7
14097 \backslash
14098 baselineskip
14099 \begin_inset Quotes erd
14100 \end_inset
14101
14102  (where the command 
14103 \series bold
14104
14105 \backslash
14106 baselineskip
14107 \series default
14108  needs to be inserted as \SpecialChar TeX
14109  code):
14110 \end_layout
14111
14112 \begin_layout Standard
14113 \begin_inset Flex Multiple Columns
14114 status open
14115
14116 \begin_layout Plain Layout
14117 \begin_inset Argument 3
14118 status open
14119
14120 \begin_layout Plain Layout
14121 7
14122 \begin_inset ERT
14123 status collapsed
14124
14125 \begin_layout Plain Layout
14126
14127
14128 \backslash
14129 baselineskip
14130 \end_layout
14131
14132 \end_inset
14133
14134
14135 \end_layout
14136
14137 \end_inset
14138
14139
14140 \size small
14141 On the evening of the crime, he returned from the club exactly at ten.
14142  His mother and sister were out spending the evening with a relation.
14143  The servant deposed that she heard him enter the front room on the second
14144  floor, generally used as his sitting-room.
14145  She had lit a fire there, and as it smoked she had opened the window.
14146  No sound was heard from the room until eleven-twenty, the hour of the return
14147  of Lady Maynooth and her daughter.
14148  Desiring to say good-night, she attempted to enter her son's room.
14149  The door was locked on the inside, and no answer could be got to their
14150  cries and knocking.
14151  Help was obtained, and the door forced.
14152  The unfortunate young man was found lying near the table.
14153  His head had been horribly mutilated by an expanding revolver bullet, but
14154  no weapon of any sort was to be found in the room.
14155 \end_layout
14156
14157 \end_inset
14158
14159
14160 \end_layout
14161
14162 \begin_layout Subsubsection
14163 Surrounding Space
14164 \end_layout
14165
14166 \begin_layout Standard
14167 The amount of space before and after multiple columns can be changed by
14168  changing the length 
14169 \series bold
14170
14171 \backslash
14172 multicolsep
14173 \series default
14174 .
14175  For example the command
14176 \end_layout
14177
14178 \begin_layout Standard
14179
14180 \series bold
14181
14182 \backslash
14183 setlength{
14184 \backslash
14185 multicolsep}{3cm}
14186 \end_layout
14187
14188 \begin_layout Standard
14189 in \SpecialChar TeX
14190  Code changes its value to 3
14191 \begin_inset space \thinspace{}
14192 \end_inset
14193
14194 cm.
14195  The change must be made before the multiple columns' start.
14196  The predefined value is 13
14197 \begin_inset space \thinspace{}
14198 \end_inset
14199
14200 pt.
14201 \end_layout
14202
14203 \begin_layout Standard
14204 For this example 
14205 \series bold
14206
14207 \backslash
14208 multicolsep
14209 \series default
14210  was set to 2.5
14211 \begin_inset space \thinspace{}
14212 \end_inset
14213
14214 cm:
14215 \end_layout
14216
14217 \begin_layout Standard
14218 \begin_inset ERT
14219 status open
14220
14221 \begin_layout Plain Layout
14222
14223
14224 \backslash
14225 setlength{
14226 \backslash
14227 multicolsep}{2.5cm}
14228 \end_layout
14229
14230 \end_inset
14231
14232
14233 \end_layout
14234
14235 \begin_layout Standard
14236 \begin_inset Flex Multiple Columns
14237 status open
14238
14239 \begin_layout Plain Layout
14240
14241 \size small
14242 All day I turned these facts over in my mind, endeavouring to hit upon some
14243  theory which could reconcile them all, and to find that line of least resistanc
14244 e which my poor friend had declared to be the starting-point of every investigat
14245 ion.
14246  I confess that I made little progress.
14247  In the evening I strolled across the Park, and found myself about six o'clock
14248  at the Oxford Street end of Park Lane.
14249  A group of loafers upon the pavements, all staring up at a particular window,
14250  directed me to the house which I had come to see.
14251  A tall, thin man with coloured glasses, whom I strongly suspected of being
14252  a plain-clothes detective, was pointing out some theory of his own, while
14253  the others crowded round to listen to what he said.
14254  I got as near him as I could, but his observations seemed to me to be absurd,
14255  so I withdrew again in some disgust.
14256  As I did so I struck against an elderly, deformed man, who had been behind
14257  me, and I knocked down several books which he was carrying.
14258 \end_layout
14259
14260 \end_inset
14261
14262
14263 \end_layout
14264
14265 \begin_layout Standard
14266 \begin_inset Note Greyedout
14267 status open
14268
14269 \begin_layout Plain Layout
14270
14271 \series bold
14272 Note:
14273 \series default
14274  The values you set with 
14275 \series bold
14276
14277 \backslash
14278 setlength
14279 \series default
14280  will be used for all following multiple columns until you change them again.
14281 \end_layout
14282
14283 \end_inset
14284
14285
14286 \end_layout
14287
14288 \begin_layout Standard
14289 \begin_inset ERT
14290 status collapsed
14291
14292 \begin_layout Plain Layout
14293
14294
14295 \backslash
14296 setlength{
14297 \backslash
14298 multicolsep}{13pt}
14299 \end_layout
14300
14301 \end_inset
14302
14303
14304 \begin_inset Note Note
14305 status collapsed
14306
14307 \begin_layout Plain Layout
14308 go back to the default
14309 \end_layout
14310
14311 \end_inset
14312
14313
14314 \end_layout
14315
14316 \begin_layout Standard
14317 \begin_inset Newpage newpage
14318 \end_inset
14319
14320
14321 \end_layout
14322
14323 \begin_layout Subsubsection
14324 Column Breaks
14325 \end_layout
14326
14327 \begin_layout Standard
14328 A column break can be forced by inserting the command 
14329 \series bold
14330
14331 \backslash
14332 columnbreak{}
14333 \series default
14334  as \SpecialChar TeX
14335  Code to that position in the text where the column should be broken.
14336  Note that this leads in most cases to whitespace in the text.
14337 \begin_inset Newline newline
14338 \end_inset
14339
14340 Here is an example:
14341 \end_layout
14342
14343 \begin_layout Standard
14344 \begin_inset Flex Multiple Columns
14345 status open
14346
14347 \begin_layout Plain Layout
14348
14349 \size small
14350 \begin_inset Quotes eld
14351 \end_inset
14352
14353 You're surprised to see me, sir,
14354 \begin_inset Quotes erd
14355 \end_inset
14356
14357  said he, in a strange, croaking voice.
14358 \end_layout
14359
14360 \begin_layout Plain Layout
14361
14362 \size small
14363 I acknowledged that I was.
14364 \end_layout
14365
14366 \begin_layout Plain Layout
14367
14368 \size small
14369 \begin_inset Quotes eld
14370 \end_inset
14371
14372 Well, I've a conscience, sir, and when I chanced to see you go into this
14373  house, as I came hobbling after you, I thought to myself, I'll just step
14374  in and see that kind gentleman, and tell him that if I was a bit gruff
14375  in my manner there was not any harm meant, and that I am much obliged to
14376  him for picking up my books.
14377 \begin_inset Quotes erd
14378 \end_inset
14379
14380
14381 \end_layout
14382
14383 \begin_layout Plain Layout
14384
14385 \size small
14386 \begin_inset Quotes eld
14387 \end_inset
14388
14389 You make too much of a trifle,
14390 \begin_inset Quotes erd
14391 \end_inset
14392
14393  said I.
14394  
14395 \begin_inset Quotes eld
14396 \end_inset
14397
14398 May I ask how you knew who I was?
14399 \begin_inset Quotes erd
14400 \end_inset
14401
14402  AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED.
14403 \begin_inset ERT
14404 status collapsed
14405
14406 \begin_layout Plain Layout
14407
14408
14409 \backslash
14410 columnbreak{}
14411 \end_layout
14412
14413 \end_inset
14414
14415
14416 \end_layout
14417
14418 \begin_layout Plain Layout
14419
14420 \size small
14421 \begin_inset Quotes eld
14422 \end_inset
14423
14424 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
14425  you'll find my little bookshop at the corner of Church Street, and very
14426  happy to see you, I am sure.
14427  Maybe you collect yourself, sir.
14428  Here's 
14429 \noun on
14430 British
14431 \begin_inset space ~
14432 \end_inset
14433
14434 Birds
14435 \noun default
14436 , and 
14437 \noun on
14438 Catullus
14439 \noun default
14440 , and 
14441 \noun on
14442 The Holy War
14443 \noun default
14444 –a bargain, every one of them.
14445  With five volumes you could just fill that gap on that second shelf.
14446  It looks untidy, does it not, sir?
14447 \begin_inset Quotes erd
14448 \end_inset
14449
14450
14451 \end_layout
14452
14453 \end_inset
14454
14455
14456 \end_layout
14457
14458 \begin_layout Subsubsection
14459 Column Separation
14460 \end_layout
14461
14462 \begin_layout Standard
14463 The width of the columns is automatically calculated, but you can modify
14464  the space between the columns.
14465  This is done by changing the length 
14466 \series bold
14467
14468 \backslash
14469 columnsep
14470 \series default
14471 .
14472  Its predefined value is 10
14473 \begin_inset space \thinspace{}
14474 \end_inset
14475
14476 pt.
14477  Here is an example where 
14478 \series bold
14479
14480 \backslash
14481 columnsep
14482 \series default
14483  is set to 3
14484 \begin_inset space \thinspace{}
14485 \end_inset
14486
14487 cm:
14488 \end_layout
14489
14490 \begin_layout Standard
14491 \begin_inset ERT
14492 status open
14493
14494 \begin_layout Plain Layout
14495
14496
14497 \backslash
14498 setlength{
14499 \backslash
14500 columnsep}{3cm}
14501 \end_layout
14502
14503 \end_inset
14504
14505
14506 \end_layout
14507
14508 \begin_layout Standard
14509 \begin_inset Flex Multiple Columns
14510 status open
14511
14512 \begin_layout Plain Layout
14513
14514 \size small
14515 My observations of No.
14516 \begin_inset space \space{}
14517 \end_inset
14518
14519 427 Park Lane did little to clear up the problem in which I was interested.
14520  The house was separated from the street by a low wall and railing, the
14521  whole not more than five feet high.
14522  It was perfectly easy, therefore, for anyone to get into the garden, but
14523  the window was entirely inaccessible, since there was no water pipe or
14524  anything which could help the most active man to climb it.
14525  More puzzled than ever, I retraced my steps to Kensington.
14526  I had not been in my study five minutes when the maid entered to say that
14527  a person desired to see me.
14528  To my astonishment it was none other than my strange old book collector,
14529  his sharp, wizened face peering out from a frame of white hair, and his
14530  precious volumes, a dozen of them at least, wedged under his right arm.
14531 \end_layout
14532
14533 \end_inset
14534
14535
14536 \end_layout
14537
14538 \begin_layout Standard
14539 \begin_inset ERT
14540 status collapsed
14541
14542 \begin_layout Plain Layout
14543
14544
14545 \backslash
14546 setlength{
14547 \backslash
14548 columnsep}{10pt}
14549 \end_layout
14550
14551 \end_inset
14552
14553
14554 \begin_inset Note Note
14555 status collapsed
14556
14557 \begin_layout Plain Layout
14558 go back to the default
14559 \end_layout
14560
14561 \end_inset
14562
14563
14564 \end_layout
14565
14566 \begin_layout Subsubsection
14567 Vertical Lines
14568 \end_layout
14569
14570 \begin_layout Standard
14571 Between the columns a rule with a width of the length 
14572 \series bold
14573
14574 \backslash
14575 columnseprule
14576 \series default
14577  is placed.
14578  If this rule width is set to 0
14579 \begin_inset space \thinspace{}
14580 \end_inset
14581
14582 pt (this is the default), the rule is suppressed.
14583  In the following example the rule is 2
14584 \begin_inset space \thinspace{}
14585 \end_inset
14586
14587 pt wide:
14588 \end_layout
14589
14590 \begin_layout Standard
14591 \begin_inset ERT
14592 status open
14593
14594 \begin_layout Plain Layout
14595
14596
14597 \backslash
14598 setlength{
14599 \backslash
14600 columnseprule}{2pt}
14601 \end_layout
14602
14603 \end_inset
14604
14605
14606 \end_layout
14607
14608 \begin_layout Standard
14609 \begin_inset Flex Multiple Columns
14610 status open
14611
14612 \begin_layout Plain Layout
14613
14614 \size small
14615 \begin_inset Quotes eld
14616 \end_inset
14617
14618 You're surprised to see me, sir,
14619 \begin_inset Quotes erd
14620 \end_inset
14621
14622  said he, in a strange, croaking voice.
14623 \end_layout
14624
14625 \begin_layout Plain Layout
14626
14627 \size small
14628 I acknowledged that I was.
14629 \end_layout
14630
14631 \begin_layout Plain Layout
14632
14633 \size small
14634 \begin_inset Quotes eld
14635 \end_inset
14636
14637 Well, I've a conscience, sir, and when I chanced to see you go into this
14638  house, as I came hobbling after you, I thought to myself, I'll just step
14639  in and see that kind gentleman, and tell him that if I was a bit gruff
14640  in my manner there was not any harm meant, and that I am much obliged to
14641  him for picking up my books.
14642 \begin_inset Quotes erd
14643 \end_inset
14644
14645
14646 \end_layout
14647
14648 \begin_layout Plain Layout
14649
14650 \size small
14651 \begin_inset Quotes eld
14652 \end_inset
14653
14654 You make too much of a trifle,
14655 \begin_inset Quotes erd
14656 \end_inset
14657
14658  said I.
14659  
14660 \begin_inset Quotes eld
14661 \end_inset
14662
14663 May I ask how you knew who I was?
14664 \begin_inset Quotes erd
14665 \end_inset
14666
14667
14668 \end_layout
14669
14670 \begin_layout Plain Layout
14671
14672 \size small
14673 \begin_inset Quotes eld
14674 \end_inset
14675
14676 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
14677  you'll find my little bookshop at the corner of Church Street, and very
14678  happy to see you, I am sure.
14679  Maybe you collect yourself, sir.
14680  Here's 
14681 \noun on
14682 British
14683 \begin_inset space ~
14684 \end_inset
14685
14686 Birds
14687 \noun default
14688 , and 
14689 \noun on
14690 Catullus
14691 \noun default
14692 , and 
14693 \noun on
14694 The Holy War
14695 \noun default
14696 –a bargain, every one of them.
14697  With five volumes you could just fill that gap on that second shelf.
14698  It looks untidy, does it not, sir?
14699 \begin_inset Quotes erd
14700 \end_inset
14701
14702
14703 \end_layout
14704
14705 \end_inset
14706
14707
14708 \end_layout
14709
14710 \begin_layout Standard
14711 \begin_inset VSpace defskip
14712 \end_inset
14713
14714
14715 \end_layout
14716
14717 \begin_layout Standard
14718 The rule can be colored by redefining the command 
14719 \series bold
14720
14721 \backslash
14722 columnseprulecolor
14723 \series default
14724 .
14725  This is done by inserting the command
14726 \begin_inset Newline newline
14727 \end_inset
14728
14729
14730 \series bold
14731
14732 \backslash
14733 renewcommand{
14734 \backslash
14735 columnseprulecolor}{
14736 \backslash
14737 color{red}}
14738 \series default
14739
14740 \begin_inset Newline newline
14741 \end_inset
14742
14743 as \SpecialChar TeX
14744  Code before the multicolumn inset.
14745  Replace 
14746 \series bold
14747 red
14748 \series default
14749  in this command by a color of your choice.
14750  You can use all pre- and self-defined colors.
14751  See the 
14752 \emph on
14753 EmbeddedObjects
14754 \emph default
14755  manual, section 
14756 \emph on
14757 Colored
14758 \begin_inset space ~
14759 \end_inset
14760
14761 Tables
14762 \emph default
14763  for more information about pre- and self-defined colors.
14764  To go back to the default color insert the command
14765 \begin_inset Newline newline
14766 \end_inset
14767
14768
14769 \series bold
14770
14771 \backslash
14772 renewcommand{
14773 \backslash
14774 columnseprulecolor}{
14775 \backslash
14776 normalcolor}
14777 \series default
14778
14779 \begin_inset Newline newline
14780 \end_inset
14781
14782 Here is the example with a cyan rule and 1
14783 \begin_inset space \thinspace{}
14784 \end_inset
14785
14786 cm column separation:
14787 \end_layout
14788
14789 \begin_layout Standard
14790 \begin_inset ERT
14791 status open
14792
14793 \begin_layout Plain Layout
14794
14795
14796 \backslash
14797 setlength{
14798 \backslash
14799 columnsep}{1cm}
14800 \end_layout
14801
14802 \begin_layout Plain Layout
14803
14804
14805 \backslash
14806 renewcommand{
14807 \backslash
14808 columnseprulecolor}{
14809 \backslash
14810 color{cyan}}
14811 \end_layout
14812
14813 \end_inset
14814
14815
14816 \end_layout
14817
14818 \begin_layout Standard
14819 \begin_inset Flex Multiple Columns
14820 status open
14821
14822 \begin_layout Plain Layout
14823
14824 \size small
14825 \begin_inset Quotes eld
14826 \end_inset
14827
14828 You're surprised to see me, sir,
14829 \begin_inset Quotes erd
14830 \end_inset
14831
14832  said he, in a strange, croaking voice.
14833 \end_layout
14834
14835 \begin_layout Plain Layout
14836
14837 \size small
14838 I acknowledged that I was.
14839 \end_layout
14840
14841 \begin_layout Plain Layout
14842
14843 \size small
14844 \begin_inset Quotes eld
14845 \end_inset
14846
14847 Well, I've a conscience, sir, and when I chanced to see you go into this
14848  house, as I came hobbling after you, I thought to myself, I'll just step
14849  in and see that kind gentleman, and tell him that if I was a bit gruff
14850  in my manner there was not any harm meant, and that I am much obliged to
14851  him for picking up my books.
14852 \begin_inset Quotes erd
14853 \end_inset
14854
14855
14856 \end_layout
14857
14858 \begin_layout Plain Layout
14859
14860 \size small
14861 \begin_inset Quotes eld
14862 \end_inset
14863
14864 You make too much of a trifle,
14865 \begin_inset Quotes erd
14866 \end_inset
14867
14868  said I.
14869  
14870 \begin_inset Quotes eld
14871 \end_inset
14872
14873 May I ask how you knew who I was?
14874 \begin_inset Quotes erd
14875 \end_inset
14876
14877
14878 \end_layout
14879
14880 \begin_layout Plain Layout
14881
14882 \size small
14883 \begin_inset Quotes eld
14884 \end_inset
14885
14886 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
14887  you'll find my little bookshop at the corner of Church Street, and very
14888  happy to see you, I am sure.
14889  Maybe you collect yourself, sir.
14890  Here's 
14891 \noun on
14892 British
14893 \begin_inset space ~
14894 \end_inset
14895
14896 Birds
14897 \noun default
14898 , and 
14899 \noun on
14900 Catullus
14901 \noun default
14902 , and 
14903 \noun on
14904 The Holy War
14905 \noun default
14906 –a bargain, every one of them.
14907  With five volumes you could just fill that gap on that second shelf.
14908  It looks untidy, does it not, sir?
14909 \begin_inset Quotes erd
14910 \end_inset
14911
14912
14913 \end_layout
14914
14915 \end_inset
14916
14917
14918 \end_layout
14919
14920 \begin_layout Standard
14921 \begin_inset ERT
14922 status collapsed
14923
14924 \begin_layout Plain Layout
14925
14926
14927 \backslash
14928 setlength{
14929 \backslash
14930 columnseprule}{0pt}
14931 \end_layout
14932
14933 \begin_layout Plain Layout
14934
14935
14936 \backslash
14937 renewcommand{
14938 \backslash
14939 columnseprulecolor}{
14940 \backslash
14941 normalcolor}
14942 \end_layout
14943
14944 \end_inset
14945
14946
14947 \begin_inset Note Note
14948 status collapsed
14949
14950 \begin_layout Plain Layout
14951 go back to the default
14952 \end_layout
14953
14954 \end_inset
14955
14956
14957 \end_layout
14958
14959 \begin_layout Chapter
14960
14961 \change_inserted 893223064 1464852301
14962 Text formatting
14963 \end_layout
14964
14965 \begin_layout Section
14966 Non-standard Paragraph Shapes
14967 \end_layout
14968
14969 \begin_layout Standard
14970 \noindent
14971 \SpecialChar LaTeX
14972  as well as any other text processor uses by default rectangular paragraphs.
14973  For special cases like for example posters, invitation cards or poems you
14974  can modify the paragraph shape to one of your choice.
14975  This can be done by using the \SpecialChar LaTeX
14976 -package 
14977 \series bold
14978 shapepar
14979 \series default
14980  which is loaded by using in the document settings the module 
14981 \family sans
14982 Custom paragraph shapes
14983 \family default
14984 .
14985 \end_layout
14986
14987 \begin_layout Subsection
14988 Predefined shapes
14989 \end_layout
14990
14991 \begin_layout Standard
14992
14993 \series bold
14994 shapepar
14995 \series default
14996  provides the following shapes:
14997 \end_layout
14998
14999 \begin_layout Standard
15000 \begin_inset Tabular
15001 <lyxtabular version="3" rows="13" columns="3">
15002 <features booktabs="true" islongtable="true" longtabularalignment="center">
15003 <column alignment="center" valignment="middle" width="16col%">
15004 <column alignment="center" valignment="middle" width="40col%">
15005 <column alignment="center" valignment="middle" width="35col%">
15006 <row endhead="true">
15007 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
15008 \begin_inset Text
15009
15010 \begin_layout Plain Layout
15011 Name
15012 \end_layout
15013
15014 \end_inset
15015 </cell>
15016 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
15017 \begin_inset Text
15018
15019 \begin_layout Plain Layout
15020 Description
15021 \end_layout
15022
15023 \end_inset
15024 </cell>
15025 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
15026 \begin_inset Text
15027
15028 \begin_layout Plain Layout
15029 Annotation
15030 \end_layout
15031
15032 \end_inset
15033 </cell>
15034 </row>
15035 <row>
15036 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15037 \begin_inset Text
15038
15039 \begin_layout Plain Layout
15040 CDlabel
15041 \end_layout
15042
15043 \end_inset
15044 </cell>
15045 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15046 \begin_inset Text
15047
15048 \begin_layout Plain Layout
15049 Circle with circular hole (in the size of a CD/DVD)
15050 \end_layout
15051
15052 \end_inset
15053 </cell>
15054 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15055 \begin_inset Text
15056
15057 \begin_layout Plain Layout
15058 Cannot be scaled, take care there is not too much text
15059 \end_layout
15060
15061 \end_inset
15062 </cell>
15063 </row>
15064 <row>
15065 <cell alignment="center" valignment="top" topline="true" usebox="none">
15066 \begin_inset Text
15067
15068 \begin_layout Plain Layout
15069 Circle
15070 \end_layout
15071
15072 \end_inset
15073 </cell>
15074 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15075 \begin_inset Text
15076
15077 \begin_layout Plain Layout
15078 Circle
15079 \end_layout
15080
15081 \end_inset
15082 </cell>
15083 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15084 \begin_inset Text
15085
15086 \begin_layout Plain Layout
15087 Fragile, calculation might fail
15088 \end_layout
15089
15090 \end_inset
15091 </cell>
15092 </row>
15093 <row>
15094 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15095 \begin_inset Text
15096
15097 \begin_layout Plain Layout
15098 Diamond
15099 \end_layout
15100
15101 \end_inset
15102 </cell>
15103 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15104 \begin_inset Text
15105
15106 \begin_layout Plain Layout
15107 Rhomboid (symbolizing a 
15108 \begin_inset Quotes eld
15109 \end_inset
15110
15111 diamond
15112 \begin_inset Quotes erd
15113 \end_inset
15114
15115 )
15116 \end_layout
15117
15118 \end_inset
15119 </cell>
15120 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15121 \begin_inset Text
15122
15123 \begin_layout Plain Layout
15124 -
15125 \end_layout
15126
15127 \end_inset
15128 </cell>
15129 </row>
15130 <row>
15131 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15132 \begin_inset Text
15133
15134 \begin_layout Plain Layout
15135 Heart
15136 \end_layout
15137
15138 \end_inset
15139 </cell>
15140 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15141 \begin_inset Text
15142
15143 \begin_layout Plain Layout
15144 Heart-like shape
15145 \end_layout
15146
15147 \end_inset
15148 </cell>
15149 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15150 \begin_inset Text
15151
15152 \begin_layout Plain Layout
15153 -
15154 \end_layout
15155
15156 \end_inset
15157 </cell>
15158 </row>
15159 <row>
15160 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15161 \begin_inset Text
15162
15163 \begin_layout Plain Layout
15164 Hexagon
15165 \end_layout
15166
15167 \end_inset
15168 </cell>
15169 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15170 \begin_inset Text
15171
15172 \begin_layout Plain Layout
15173 Hexagon
15174 \end_layout
15175
15176 \end_inset
15177 </cell>
15178 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15179 \begin_inset Text
15180
15181 \begin_layout Plain Layout
15182 -
15183 \end_layout
15184
15185 \end_inset
15186 </cell>
15187 </row>
15188 <row>
15189 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15190 \begin_inset Text
15191
15192 \begin_layout Plain Layout
15193 Nut
15194 \end_layout
15195
15196 \end_inset
15197 </cell>
15198 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15199 \begin_inset Text
15200
15201 \begin_layout Plain Layout
15202 Nut for bolt (hexagon with circular hole)
15203 \end_layout
15204
15205 \end_inset
15206 </cell>
15207 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15208 \begin_inset Text
15209
15210 \begin_layout Plain Layout
15211 -
15212 \end_layout
15213
15214 \end_inset
15215 </cell>
15216 </row>
15217 <row>
15218 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15219 \begin_inset Text
15220
15221 \begin_layout Plain Layout
15222 Square
15223 \end_layout
15224
15225 \end_inset
15226 </cell>
15227 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15228 \begin_inset Text
15229
15230 \begin_layout Plain Layout
15231 Square
15232 \end_layout
15233
15234 \end_inset
15235 </cell>
15236 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15237 \begin_inset Text
15238
15239 \begin_layout Plain Layout
15240 -
15241 \end_layout
15242
15243 \end_inset
15244 </cell>
15245 </row>
15246 <row>
15247 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
15248 \begin_inset Text
15249
15250 \begin_layout Plain Layout
15251 Star
15252 \end_layout
15253
15254 \end_inset
15255 </cell>
15256 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
15257 \begin_inset Text
15258
15259 \begin_layout Plain Layout
15260 Five-point star
15261 \end_layout
15262
15263 \end_inset
15264 </cell>
15265 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
15266 \begin_inset Text
15267
15268 \begin_layout Plain Layout
15269 -
15270 \end_layout
15271
15272 \end_inset
15273 </cell>
15274 </row>
15275 <row>
15276 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15277 \begin_inset Text
15278
15279 \begin_layout Plain Layout
15280 Candle
15281 \end_layout
15282
15283 \end_inset
15284 </cell>
15285 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15286 \begin_inset Text
15287
15288 \begin_layout Plain Layout
15289 Burning candle
15290 \end_layout
15291
15292 \end_inset
15293 </cell>
15294 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15295 \begin_inset Text
15296
15297 \begin_layout Plain Layout
15298 -
15299 \end_layout
15300
15301 \end_inset
15302 </cell>
15303 </row>
15304 <row>
15305 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15306 \begin_inset Text
15307
15308 \begin_layout Plain Layout
15309 Drop down/up
15310 \end_layout
15311
15312 \end_inset
15313 </cell>
15314 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15315 \begin_inset Text
15316
15317 \begin_layout Plain Layout
15318 Normal/reversed rain drop
15319 \end_layout
15320
15321 \end_inset
15322 </cell>
15323 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15324 \begin_inset Text
15325
15326 \begin_layout Plain Layout
15327 Fragile, calculation might fail
15328 \end_layout
15329
15330 \end_inset
15331 </cell>
15332 </row>
15333 <row>
15334 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15335 \begin_inset Text
15336
15337 \begin_layout Plain Layout
15338 \SpecialChar TeX
15339
15340 \end_layout
15341
15342 \end_inset
15343 </cell>
15344 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15345 \begin_inset Text
15346
15347 \begin_layout Plain Layout
15348 The \SpecialChar TeX
15349  logo
15350 \end_layout
15351
15352 \end_inset
15353 </cell>
15354 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15355 \begin_inset Text
15356
15357 \begin_layout Plain Layout
15358 -
15359 \end_layout
15360
15361 \end_inset
15362 </cell>
15363 </row>
15364 <row>
15365 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
15366 \begin_inset Text
15367
15368 \begin_layout Plain Layout
15369 Triangle up/down/
15370 \begin_inset Newline newline
15371 \end_inset
15372
15373 left/right
15374 \end_layout
15375
15376 \end_inset
15377 </cell>
15378 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
15379 \begin_inset Text
15380
15381 \begin_layout Plain Layout
15382 Triangles in different orientations
15383 \end_layout
15384
15385 \end_inset
15386 </cell>
15387 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
15388 \begin_inset Text
15389
15390 \begin_layout Plain Layout
15391 -
15392 \end_layout
15393
15394 \end_inset
15395 </cell>
15396 </row>
15397 </lyxtabular>
15398
15399 \end_inset
15400
15401
15402 \end_layout
15403
15404 \begin_layout Standard
15405 To use a shape for your paragraph, simply select it in \SpecialChar LyX
15406 's pull-down box
15407  for environments in the toolbar.
15408 \end_layout
15409
15410 \begin_layout Standard
15411 \begin_inset Newpage newpage
15412 \end_inset
15413
15414
15415 \end_layout
15416
15417 \begin_layout Standard
15418 Here is an example paragraph in the shape of a nut:
15419 \end_layout
15420
15421 \begin_layout Standard
15422 \begin_inset VSpace bigskip
15423 \end_inset
15424
15425
15426 \end_layout
15427
15428 \begin_layout Nut
15429
15430 \lang latin
15431 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15432  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15433  voluptua.
15434  At vero eos et accusam et justo duo dolores et ea rebum.
15435  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15436  sit amet.
15437  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15438  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15439  voluptua.
15440 \end_layout
15441
15442 \begin_layout Standard
15443 \begin_inset VSpace bigskip
15444 \end_inset
15445
15446
15447 \end_layout
15448
15449 \begin_layout Standard
15450 \begin_inset Note Greyedout
15451 status open
15452
15453 \begin_layout Plain Layout
15454
15455 \series bold
15456 Note
15457 \series default
15458 : shapepar paragraphs cannot run over a page break.
15459 \end_layout
15460
15461 \end_inset
15462
15463
15464 \end_layout
15465
15466 \begin_layout Standard
15467 \begin_inset VSpace bigskip
15468 \end_inset
15469
15470
15471 \end_layout
15472
15473 \begin_layout Standard
15474
15475 \series bold
15476 shapepar
15477 \series default
15478  takes care that the shape will always be preserved, no matter how much
15479  text is in the paragraph.
15480  Therefore the paragraph size changes with the amount of contained text.
15481  This can lead to paragraph sizes exceeding the page margins.
15482  To demonstrate the size scaling, here is the same example paragraph but
15483  with twice as much text:
15484 \end_layout
15485
15486 \begin_layout Standard
15487 \begin_inset Newpage newpage
15488 \end_inset
15489
15490
15491 \end_layout
15492
15493 \begin_layout Nut
15494
15495 \lang latin
15496 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15497  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15498  voluptua.
15499  At vero eos et accusam et justo duo dolores et ea rebum.
15500  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15501  sit amet.
15502  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15503  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15504  voluptua.
15505  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15506  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15507  voluptua.
15508  At vero eos et accusam et justo duo dolores et ea rebum.
15509  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15510  sit amet.
15511  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15512  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15513  voluptua.
15514 \end_layout
15515
15516 \begin_layout Standard
15517 \begin_inset VSpace bigskip
15518 \end_inset
15519
15520
15521 \end_layout
15522
15523 \begin_layout Standard
15524 An exception is the shape 
15525 \family sans
15526 CDlabel
15527 \family default
15528 .
15529  It cannot be scaled because it must fit the size of a CD/DVD.
15530  Therefore the amount of text that fits into the shape is limited.
15531 \begin_inset Newline newline
15532 \end_inset
15533
15534 The 
15535 \family sans
15536 drop
15537 \family default
15538  shapes and the 
15539 \family sans
15540 circle
15541 \family default
15542  shape are fragile, meaning that the calculation of their size can fail,
15543  depending on the amount of text.
15544  You will then get the \SpecialChar LaTeX
15545  error 
15546 \begin_inset Quotes eld
15547 \end_inset
15548
15549 Arithmetic overflow
15550 \begin_inset Quotes erd
15551 \end_inset
15552
15553 .
15554  In this case one can try to remove or add some text; if nothing works one
15555  has to use another shape.
15556 \end_layout
15557
15558 \begin_layout Standard
15559 \begin_inset VSpace bigskip
15560 \end_inset
15561
15562
15563 \end_layout
15564
15565 \begin_layout Standard
15566 For shapes with tips you will maybe see that \SpecialChar LaTeX
15567 's hyphenation routine fails
15568  for text in the tips.
15569  Therefore it is often necessary to add hyphenation points 
15570 \family sans
15571 (
15572 \begin_inset Info
15573 type  "shortcut"
15574 arg   "specialchar-insert hyphenation"
15575 \end_inset
15576
15577
15578 \family default
15579 ) to the corresponding text parts.
15580 \end_layout
15581
15582 \begin_layout Standard
15583 \begin_inset VSpace bigskip
15584 \end_inset
15585
15586
15587 \end_layout
15588
15589 \begin_layout Standard
15590 Shapepar paragraphs are either always centered or placed on the page so
15591  that their left border touches the left page margin.
15592  You can therefore not use the paragraph dialog to align such paragraphs.
15593  A solution is to put the paragraph into a minipage or parbox and align
15594  the box.
15595  The problem is hereby to find the right width for the box.
15596  Because if it is too wide and you center the box, the paragraph is not
15597  centered too because it sticks at the left side of the box.
15598  So you might have to play a bit with the width until it fits.
15599  Here are two heart-shaped paragraphs, the first one is not aligned, the
15600  second one is right-aligned:
15601 \end_layout
15602
15603 \begin_layout Standard
15604 \begin_inset Newpage newpage
15605 \end_inset
15606
15607
15608 \end_layout
15609
15610 \begin_layout Heart
15611 \noindent
15612
15613 \lang latin
15614 Lo\SpecialChar softhyphen
15615 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15616  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15617  voluptua.
15618  At vero eos et accusam et justo duo dolores et ea rebum.
15619  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15620  sit amet.
15621 \end_layout
15622
15623 \begin_layout Standard
15624 \begin_inset VSpace bigskip
15625 \end_inset
15626
15627
15628 \end_layout
15629
15630 \begin_layout Standard
15631 \noindent
15632 \align right
15633 \begin_inset Box Frameless
15634 position "t"
15635 hor_pos "c"
15636 has_inner_box 1
15637 inner_pos "t"
15638 use_parbox 1
15639 use_makebox 0
15640 width "42col%"
15641 special "none"
15642 height "1in"
15643 height_special "totalheight"
15644 thickness "0.4pt"
15645 separation "3pt"
15646 shadowsize "4pt"
15647 framecolor "black"
15648 backgroundcolor "none"
15649 status open
15650
15651 \begin_layout Heart
15652 \noindent
15653
15654 \lang latin
15655 Lo\SpecialChar softhyphen
15656 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15657  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15658  voluptua.
15659  At vero eos et accusam et justo duo dolores et ea rebum.
15660  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15661  sit amet.
15662 \end_layout
15663
15664 \end_inset
15665
15666
15667 \end_layout
15668
15669 \begin_layout Subsection
15670 Custom shapes
15671 \end_layout
15672
15673 \begin_layout Standard
15674 You can define any shape you want.
15675  Doing this manually is a lot of work because every coordinate must be specified.
15676  But there is a way to let the computer calculate the coordinates:
15677 \end_layout
15678
15679 \begin_layout Enumerate
15680 Install the program 
15681 \begin_inset CommandInset href
15682 LatexCommand href
15683 name "Jpgfdraw"
15684 target "http://www.ctan.org/tex-archive/graphics/jpgfdraw"
15685
15686 \end_inset
15687
15688 .
15689 \end_layout
15690
15691 \begin_layout Enumerate
15692 In 
15693 \family sans
15694 Jpgfdraw
15695 \family default
15696  go to the menu 
15697 \family sans
15698 TeX/LaTeX\SpecialChar menuseparator
15699 Settings\SpecialChar menuseparator
15700 Set Normal Size
15701 \family default
15702  and select the font size you are using in your document.
15703  For example this document uses the size 12
15704 \begin_inset space \thinspace{}
15705 \end_inset
15706
15707 pt.
15708 \end_layout
15709
15710 \begin_layout Enumerate
15711 Draw a shape.
15712 \end_layout
15713
15714 \begin_layout Enumerate
15715 Use the menu 
15716 \family sans
15717 TeX/LaTeX\SpecialChar menuseparator
15718 Shapepar
15719 \family default
15720  to export the shape to coordinates.
15721  In the appearing dialog use either the outline of your shape for the coordinate
15722 s or the path itself.
15723 \begin_inset Foot
15724 status collapsed
15725
15726 \begin_layout Plain Layout
15727 For more information see 
15728 \begin_inset CommandInset href
15729 LatexCommand href
15730 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
15731
15732 \end_inset
15733
15734
15735 \end_layout
15736
15737 \end_inset
15738
15739
15740 \end_layout
15741
15742 \begin_layout Standard
15743 The coordinates are written into a \SpecialChar TeX
15744  file.
15745  To use it for your \SpecialChar LyX
15746  document
15747 \end_layout
15748
15749 \begin_layout Enumerate
15750 Place the cursor before the first character of your paragraph (or into a
15751  new empty one).
15752 \end_layout
15753
15754 \begin_layout Enumerate
15755 Open in \SpecialChar LyX
15756  the menu 
15757 \family sans
15758 Insert\SpecialChar menuseparator
15759 File\SpecialChar menuseparator
15760 Child
15761 \begin_inset space ~
15762 \end_inset
15763
15764 Document
15765 \family default
15766 , select the file and use 
15767 \family sans
15768 Input
15769 \family default
15770  as 
15771 \family sans
15772 Include Type.
15773 \end_layout
15774
15775 \begin_layout Standard
15776 \begin_inset VSpace defskip
15777 \end_inset
15778
15779
15780 \end_layout
15781
15782 \begin_layout Standard
15783 \begin_inset Note Greyedout
15784 status open
15785
15786 \begin_layout Plain Layout
15787
15788 \series bold
15789 Note
15790 \series default
15791 : The changed shape only applies to the current paragraph; everything is
15792  reset to normal for the next paragraph.
15793  Therefore the shape definition file must be input into every paragraph
15794  with the desired shape.
15795 \end_layout
15796
15797 \end_inset
15798
15799
15800 \end_layout
15801
15802 \begin_layout Standard
15803 \begin_inset VSpace bigskip
15804 \end_inset
15805
15806
15807 \end_layout
15808
15809 \begin_layout Standard
15810 Here is an example:
15811 \end_layout
15812
15813 \begin_layout Standard
15814 \begin_inset VSpace bigskip
15815 \end_inset
15816
15817
15818 \end_layout
15819
15820 \begin_layout Standard
15821 \begin_inset CommandInset include
15822 LatexCommand input
15823 filename "/usr/share/lyx/doc/SpecialParagraphShape.tex"
15824
15825 \end_inset
15826
15827
15828 \lang latin
15829 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15830  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15831  voluptua.
15832  At vero eos et accusam et justo duo dolores et ea rebum.
15833  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15834  sit amet.
15835  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15836  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15837  voluptua.
15838 \end_layout
15839
15840 \begin_layout Standard
15841 \begin_inset VSpace bigskip
15842 \end_inset
15843
15844
15845 \end_layout
15846
15847 \begin_layout Standard
15848
15849 \series bold
15850 A tip:
15851 \series default
15852  to draw complexer shapes in 
15853 \family sans
15854 Jpgfdraw
15855 \family default
15856  you can draw the shape in a program of your choice and import the resulting
15857  image to 
15858 \family sans
15859 Jpgfdraw
15860 \family default
15861 .
15862  Then you only need to draw a line or spline along the outline of the image.
15863 \end_layout
15864
15865 \begin_layout Standard
15866 \begin_inset VSpace bigskip
15867 \end_inset
15868
15869
15870 \end_layout
15871
15872 \begin_layout Standard
15873 The module 
15874 \family sans
15875 Custom paragraph shapes
15876 \family default
15877  also provides the two commands 
15878 \family sans
15879 shapepar
15880 \family default
15881  and 
15882 \family sans
15883 Shapepar
15884 \family default
15885  which can be used to define custom shapes coordinate by coordinate.
15886 \begin_inset Foot
15887 status collapsed
15888
15889 \begin_layout Plain Layout
15890 These commands are internally used for all shapes described here.
15891 \end_layout
15892
15893 \end_inset
15894
15895  For information how these styles are used and about further customization
15896  possibilities, have a look at the documentation of the package 
15897 \series bold
15898 shapepar
15899 \series default
15900
15901 \begin_inset CommandInset citation
15902 LatexCommand cite
15903 key "shapepar"
15904
15905 \end_inset
15906
15907 .
15908 \end_layout
15909
15910 \begin_layout Bibliography
15911 \begin_inset CommandInset bibitem
15912 LatexCommand bibitem
15913 key "multicol"
15914
15915 \end_inset
15916
15917 Documentation of the \SpecialChar LaTeX
15918 -package 
15919 \begin_inset CommandInset href
15920 LatexCommand href
15921 name "multicol"
15922 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
15923
15924 \end_inset
15925
15926
15927 \end_layout
15928
15929 \begin_layout Bibliography
15930 \begin_inset CommandInset bibitem
15931 LatexCommand bibitem
15932 key "shapepar"
15933
15934 \end_inset
15935
15936 Documentation of the \SpecialChar LaTeX
15937 -package 
15938 \begin_inset CommandInset href
15939 LatexCommand href
15940 name "shapepar"
15941 target "http://mirrors.ctan.org/macros/latex/contrib/shapepar/shapepar.pdf"
15942
15943 \end_inset
15944
15945
15946 \end_layout
15947
15948 \begin_layout Chapter
15949
15950 \change_inserted 893223064 1464852414
15951 Bibliographic databases
15952 \change_deleted 893223064 1464852406
15953 Supplemental Tools
15954 \change_unchanged
15955
15956 \end_layout
15957
15958 \begin_layout Section
15959 Customizing Bibliographies with Bib\SpecialChar TeX
15960
15961 \end_layout
15962
15963 \begin_layout Standard
15964 The most basic information about how to use Bib\SpecialChar TeX
15965  with \SpecialChar LyX
15966  is contained in the
15967  section 
15968 \emph on
15969 Bibliography databases (Bib\SpecialChar TeX
15970 )
15971 \emph default
15972  of the 
15973 \emph on
15974 User's Guide
15975 \emph default
15976 .
15977  The following subsections explain special bibliography features supported
15978  by \SpecialChar LyX
15979 .
15980 \end_layout
15981
15982 \begin_layout Subsection
15983 Alternative Citation Styles
15984 \end_layout
15985
15986 \begin_layout Standard
15987 Standard Bib\SpecialChar TeX
15988  uses numbers (e.
15989 \begin_inset space \thinspace{}
15990 \end_inset
15991
15992 g.
15993 \begin_inset space \space{}
15994 \end_inset
15995
15996
15997 \begin_inset Quotes eld
15998 \end_inset
15999
16000 [12]
16001 \begin_inset Quotes erd
16002 \end_inset
16003
16004 ) to refer to a cited work.
16005  However, in many scientific disciplines, other citation styles are in use.
16006  The most common one is the author-year style (e.
16007 \begin_inset space \thinspace{}
16008 \end_inset
16009
16010 g.
16011 \begin_inset space \space{}
16012 \end_inset
16013
16014
16015 \begin_inset Quotes eld
16016 \end_inset
16017
16018 Knuth 1984a
16019 \begin_inset Quotes erd
16020 \end_inset
16021
16022 ).
16023  \SpecialChar LyX
16024  supports two packages that provide this style, 
16025 \begin_inset Flex Code
16026 status collapsed
16027
16028 \begin_layout Plain Layout
16029 natbib
16030 \end_layout
16031
16032 \end_inset
16033
16034  and 
16035 \begin_inset Flex Code
16036 status collapsed
16037
16038 \begin_layout Plain Layout
16039 jurabib
16040 \end_layout
16041
16042 \end_inset
16043
16044 .
16045  Both packages have their pros and cons, which cannot be listed in detail.
16046  If you only want to have simple author-year (or author-numerical) style,
16047  or if you want to use one of the countless style files for 
16048 \begin_inset Flex Code
16049 status collapsed
16050
16051 \begin_layout Plain Layout
16052 natbib
16053 \end_layout
16054
16055 \end_inset
16056
16057 , then the established 
16058 \begin_inset Flex Code
16059 status collapsed
16060
16061 \begin_layout Plain Layout
16062 natbib
16063 \end_layout
16064
16065 \end_inset
16066
16067  package is probably your choice.
16068  If you need special features like short title references, ibidem etc., you
16069  might consider the 
16070 \begin_inset Flex Code
16071 status collapsed
16072
16073 \begin_layout Plain Layout
16074 jurabib
16075 \end_layout
16076
16077 \end_inset
16078
16079  package.
16080 \end_layout
16081
16082 \begin_layout Standard
16083 The handling of both packages in \SpecialChar LyX
16084  is basically the same.
16085  Go to 
16086 \begin_inset Flex Noun
16087 status collapsed
16088
16089 \begin_layout Plain Layout
16090 Document\SpecialChar menuseparator
16091 Settings
16092 \end_layout
16093
16094 \end_inset
16095
16096  and select under 
16097 \begin_inset Flex Noun
16098 status collapsed
16099
16100 \begin_layout Plain Layout
16101 Bibliography
16102 \end_layout
16103
16104 \end_inset
16105
16106  the option 
16107 \begin_inset Flex Noun
16108 status collapsed
16109
16110 \begin_layout Plain Layout
16111 Natbib
16112 \end_layout
16113
16114 \end_inset
16115
16116  or 
16117 \begin_inset Flex Noun
16118 status collapsed
16119
16120 \begin_layout Plain Layout
16121 Jurabib
16122 \end_layout
16123
16124 \end_inset
16125
16126 .
16127  With both packages, you will get some extra features in the citation dialog
16128  and you can select the style of the reference (
16129 \begin_inset Quotes eld
16130 \end_inset
16131
16132 Knuth 1984
16133 \begin_inset Quotes erd
16134 \end_inset
16135
16136
16137 \begin_inset Quotes eld
16138 \end_inset
16139
16140 Knuth (1984)
16141 \begin_inset Quotes erd
16142 \end_inset
16143
16144
16145 \begin_inset Quotes eld
16146 \end_inset
16147
16148 Knuth, 1984
16149 \begin_inset Quotes erd
16150 \end_inset
16151
16152
16153 \begin_inset Quotes eld
16154 \end_inset
16155
16156 1984
16157 \begin_inset Quotes erd
16158 \end_inset
16159
16160  etc.).
16161  Note that both packages need specifically designed style files.
16162  They both ship their own, but there are lots of additional style files,
16163  and there is even an interactive style file builder
16164 \begin_inset Foot
16165 status collapsed
16166
16167 \begin_layout Plain Layout
16168 See 
16169 \begin_inset Flex URL
16170 status open
16171
16172 \begin_layout Plain Layout
16173
16174 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
16175 \end_layout
16176
16177 \end_inset
16178
16179
16180 \end_layout
16181
16182 \end_inset
16183
16184  for 
16185 \begin_inset Flex Code
16186 status collapsed
16187
16188 \begin_layout Plain Layout
16189 natbib
16190 \end_layout
16191
16192 \end_inset
16193
16194 .
16195 \end_layout
16196
16197 \begin_layout Subsection
16198 Sectioned Bibliographies
16199 \end_layout
16200
16201 \begin_layout Standard
16202 Sometimes you might need to divide your bibliography into several sections.
16203  If you are for instance a historian, the possibility to separate sources
16204  and scientific works is most likely a 
16205 \begin_inset Quotes eld
16206 \end_inset
16207
16208 must have
16209 \begin_inset Quotes erd
16210 \end_inset
16211
16212 .
16213  Unfortunately, Bib\SpecialChar TeX
16214  itself does not allow you to do this.
16215  But with the help of some \SpecialChar LaTeX
16216  packages, Bib\SpecialChar TeX
16217  can be extended to fit your needs.
16218 \end_layout
16219
16220 \begin_layout Standard
16221 \SpecialChar LyX
16222  provides native support for one of these packages, 
16223 \family typewriter
16224 bibtopic
16225 \family default
16226 .
16227 \begin_inset Foot
16228 status collapsed
16229
16230 \begin_layout Plain Layout
16231 Available from 
16232 \begin_inset Flex URL
16233 status open
16234
16235 \begin_layout Plain Layout
16236
16237 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
16238 \end_layout
16239
16240 \end_inset
16241
16242
16243 \end_layout
16244
16245 \end_inset
16246
16247  The advantage of this package (compared to other packages like 
16248 \family typewriter
16249 multibib
16250 \family default
16251 ) is that you don't need to define new citation commands.
16252  Instead, you need to prepare different bibliographic databases which include
16253  the entries for the different sections of the bibliography.
16254  For example: If you want to divide your bibliography into the sections
16255  
16256 \begin_inset Quotes eld
16257 \end_inset
16258
16259 Sources
16260 \begin_inset Quotes erd
16261 \end_inset
16262
16263  and 
16264 \begin_inset Quotes eld
16265 \end_inset
16266
16267 Scientific works
16268 \begin_inset Quotes erd
16269 \end_inset
16270
16271 , you first need to create two bibliographic databases, e.
16272 \begin_inset space \thinspace{}
16273 \end_inset
16274
16275 g.
16276 \begin_inset space \space{}
16277 \end_inset
16278
16279
16280 \begin_inset Flex Code
16281 status collapsed
16282
16283 \begin_layout Plain Layout
16284 sources.bib
16285 \end_layout
16286
16287 \end_inset
16288
16289  and 
16290 \begin_inset Flex Code
16291 status collapsed
16292
16293 \begin_layout Plain Layout
16294 scientific.bib
16295 \end_layout
16296
16297 \end_inset
16298
16299 .
16300  
16301 \end_layout
16302
16303 \begin_layout Standard
16304 Go to 
16305 \begin_inset Flex Noun
16306 status collapsed
16307
16308 \begin_layout Plain Layout
16309 Document\SpecialChar menuseparator
16310 Settings
16311 \end_layout
16312
16313 \end_inset
16314
16315  and check under 
16316 \begin_inset Flex Noun
16317 status collapsed
16318
16319 \begin_layout Plain Layout
16320 Bibliography
16321 \end_layout
16322
16323 \end_inset
16324
16325  the option 
16326 \begin_inset Flex Noun
16327 status collapsed
16328
16329 \begin_layout Plain Layout
16330 Sectioned bibliography
16331 \end_layout
16332
16333 \end_inset
16334
16335 .
16336  Now you can insert multiple Bib\SpecialChar TeX
16337  bibliographies, one for each section of
16338  your bibliography.
16339  Returning to our example: Insert the Bib\SpecialChar TeX
16340  bibliography 
16341 \begin_inset Flex Code
16342 status collapsed
16343
16344 \begin_layout Plain Layout
16345 sources.bib
16346 \end_layout
16347
16348 \end_inset
16349
16350  and a second one for the database 
16351 \begin_inset Flex Code
16352 status collapsed
16353
16354 \begin_layout Plain Layout
16355 scientific.bib
16356 \end_layout
16357
16358 \end_inset
16359
16360 .
16361  You are free to use the same or different styles for each section.
16362  Additionally, you can choose if the bibliography section should contain
16363  
16364 \begin_inset Quotes eld
16365 \end_inset
16366
16367 all cited references
16368 \begin_inset Quotes erd
16369 \end_inset
16370
16371  of the specified database(s) (which is the default), 
16372 \begin_inset Quotes eld
16373 \end_inset
16374
16375 all uncited references
16376 \begin_inset Quotes erd
16377 \end_inset
16378
16379  or even 
16380 \begin_inset Quotes eld
16381 \end_inset
16382
16383 all references
16384 \begin_inset Quotes erd
16385 \end_inset
16386
16387 .
16388  This might be useful if you would like to separate your bibliography into
16389  three sections: 
16390 \begin_inset Quotes eld
16391 \end_inset
16392
16393 Cited sources
16394 \begin_inset Quotes erd
16395 \end_inset
16396
16397
16398 \begin_inset Quotes eld
16399 \end_inset
16400
16401 Uncited sources
16402 \begin_inset Quotes erd
16403 \end_inset
16404
16405 , and 
16406 \begin_inset Quotes eld
16407 \end_inset
16408
16409 Scientific works
16410 \begin_inset Quotes erd
16411 \end_inset
16412
16413 .
16414  The titles for the sections can be added as ordinary sections or subsections.
16415  Since 
16416 \begin_inset Flex Code
16417 status collapsed
16418
16419 \begin_layout Plain Layout
16420 bibtopic
16421 \end_layout
16422
16423 \end_inset
16424
16425  removes the bibliography title, you have to manually re-add that, too (as
16426  a chapter* or section*, for instance).
16427 \end_layout
16428
16429 \begin_layout Subsection
16430 Multiple Bibliographies
16431 \end_layout
16432
16433 \begin_layout Standard
16434 Multiple bibliographies, e.
16435 \begin_inset space \thinspace{}
16436 \end_inset
16437
16438 g.
16439 \begin_inset space \space{}
16440 \end_inset
16441
16442 a bibliography for each section or chapter of the document, are not supported
16443  by Bib\SpecialChar TeX
16444  itself.
16445  But the 
16446 \begin_inset Flex Code
16447 status collapsed
16448
16449 \begin_layout Plain Layout
16450 bibtopic
16451 \end_layout
16452
16453 \end_inset
16454
16455  package, which is used for the creation of sectioned bibliographies in
16456  \SpecialChar LyX
16457  (see the previous section), provides an easy way to solve this task, if
16458  you are willing to use some 
16459 \begin_inset Flex Noun
16460 status collapsed
16461
16462 \begin_layout Plain Layout
16463 \SpecialChar TeX
16464  Code
16465 \end_layout
16466
16467 \end_inset
16468
16469  (see section
16470 \begin_inset space ~
16471 \end_inset
16472
16473
16474 \begin_inset CommandInset ref
16475 LatexCommand ref
16476 reference "sec:Inserting-TeX-Code"
16477
16478 \end_inset
16479
16480 ).
16481 \begin_inset Foot
16482 status collapsed
16483
16484 \begin_layout Plain Layout
16485 An alternative approach is to use the 
16486 \begin_inset Flex Code
16487 status collapsed
16488
16489 \begin_layout Plain Layout
16490 chapterbib
16491 \end_layout
16492
16493 \end_inset
16494
16495  or 
16496 \begin_inset Flex Code
16497 status collapsed
16498
16499 \begin_layout Plain Layout
16500 bibunits
16501 \end_layout
16502
16503 \end_inset
16504
16505  package, respectively.
16506 \end_layout
16507
16508 \end_inset
16509
16510
16511 \end_layout
16512
16513 \begin_layout Standard
16514 First go to 
16515 \begin_inset Flex Noun
16516 status collapsed
16517
16518 \begin_layout Plain Layout
16519 Document\SpecialChar menuseparator
16520 Settings
16521 \end_layout
16522
16523 \end_inset
16524
16525  and under 
16526 \begin_inset Flex Noun
16527 status collapsed
16528
16529 \begin_layout Plain Layout
16530 Bibliography
16531 \end_layout
16532
16533 \end_inset
16534
16535  check 
16536 \begin_inset Flex Noun
16537 status collapsed
16538
16539 \begin_layout Plain Layout
16540 Sectioned bibliography
16541 \end_layout
16542
16543 \end_inset
16544
16545 .
16546  In the document, you have to enclose the sections, which shall contain
16547  their own bibliography (including the Bib\SpecialChar TeX
16548  bibliography itself), between
16549  
16550 \begin_inset Flex Code
16551 status collapsed
16552
16553 \begin_layout Plain Layout
16554
16555 \backslash
16556 begin{btUnit}
16557 \end_layout
16558
16559 \end_inset
16560
16561  and 
16562 \begin_inset Flex Code
16563 status collapsed
16564
16565 \begin_layout Plain Layout
16566
16567 \backslash
16568 end{btUnit}
16569 \end_layout
16570
16571 \end_inset
16572
16573  (those commands have to be inserted as \SpecialChar TeX
16574  code).
16575  The bibliography will contain all references that have been cited in the
16576  current 
16577 \begin_inset Flex Code
16578 status collapsed
16579
16580 \begin_layout Plain Layout
16581 btUnit
16582 \end_layout
16583
16584 \end_inset
16585
16586 .
16587  
16588 \series bold
16589 Note:
16590 \series default
16591  If you are using this approach, then every citation reference has to be
16592  inside some 
16593 \begin_inset Flex Code
16594 status collapsed
16595
16596 \begin_layout Plain Layout
16597 btUnit
16598 \end_layout
16599
16600 \end_inset
16601
16602 .
16603  Also, the 
16604 \begin_inset Flex Code
16605 status collapsed
16606
16607 \begin_layout Plain Layout
16608 btUnit
16609 \end_layout
16610
16611 \end_inset
16612
16613 s cannot be nested.
16614 \end_layout
16615
16616 \begin_layout Chapter
16617 Multipart Documents
16618 \end_layout
16619
16620 \begin_layout Section
16621 General Operation
16622 \end_layout
16623
16624 \begin_layout Standard
16625 When you are working on a large file with many sections, it is often convenient
16626  to break up the document into several files, or perhaps you have something
16627  where a table may change from time to time, but the preceding text does
16628  not.
16629  In these cases, you should seriously consider using multipart documents.
16630  For example, scientific papers often have five major sections: the introduction
16631 , observations, results, discussion, and conclusion.
16632  Each of these could be its own separate \SpecialChar LyX
16633  file, with one 
16634 \begin_inset Quotes eld
16635 \end_inset
16636
16637 master
16638 \begin_inset Quotes erd
16639 \end_inset
16640
16641  file which contains the title, authors, abstract, references, etc., plus
16642  the five included files.
16643  It is important to note that each of these files is a full \SpecialChar LyX
16644  file which
16645  can be formatted and printed on its own, as well as included in a master
16646  file.
16647  Each of these files must have the same document class, however—don't attempt
16648  to mix book classes with article classes.
16649  You may also include \SpecialChar LaTeX
16650  files; however, these files must not have their own
16651  preamble (i.
16652 \begin_inset space \thinspace{}
16653 \end_inset
16654
16655 e.
16656 \begin_inset space \space{}
16657 \end_inset
16658
16659 everything up to and including the 
16660 \begin_inset Flex Code
16661 status collapsed
16662
16663 \begin_layout Plain Layout
16664
16665 \backslash
16666 begin{document}
16667 \end_layout
16668
16669 \end_inset
16670
16671  line as well as the 
16672 \begin_inset Flex Code
16673 status collapsed
16674
16675 \begin_layout Plain Layout
16676
16677 \backslash
16678 end{document}
16679 \end_layout
16680
16681 \end_inset
16682
16683  line must be deleted) or else errors will be generated when you try to
16684  make a DVI file.
16685 \end_layout
16686
16687 \begin_layout Standard
16688 \SpecialChar LyX
16689  allows you to include files quite easily with 
16690 \begin_inset Flex Noun
16691 status collapsed
16692
16693 \begin_layout Plain Layout
16694 Insert\SpecialChar menuseparator
16695 ChiId
16696 \begin_inset space ~
16697 \end_inset
16698
16699 Document
16700 \end_layout
16701
16702 \end_inset
16703
16704 .
16705  When you click on this selection a small box is inserted into the file
16706  at the current cursor location.
16707  Clicking on the box raises a dialog which allows you to select the file
16708  to be included, and the method of its inclusion.
16709  
16710 \end_layout
16711
16712 \begin_layout Standard
16713 The file selection box should by now be obvious.
16714  The three inclusion methods are 
16715 \begin_inset Quotes eld
16716 \end_inset
16717
16718 include
16719 \begin_inset Quotes erd
16720 \end_inset
16721
16722
16723 \begin_inset Quotes eld
16724 \end_inset
16725
16726 input
16727 \begin_inset Quotes erd
16728 \end_inset
16729
16730 , and 
16731 \begin_inset Quotes eld
16732 \end_inset
16733
16734 verbatim
16735 \begin_inset Quotes erd
16736 \end_inset
16737
16738 .
16739  The difference between 
16740 \begin_inset Quotes eld
16741 \end_inset
16742
16743 include
16744 \begin_inset Quotes erd
16745 \end_inset
16746
16747  and 
16748 \begin_inset Quotes eld
16749 \end_inset
16750
16751 input
16752 \begin_inset Quotes erd
16753 \end_inset
16754
16755  is really only meaningful to \SpecialChar LaTeX
16756 perts, but the practical difference is that
16757  files that are 
16758 \begin_inset Quotes eld
16759 \end_inset
16760
16761 included
16762 \begin_inset Quotes erd
16763 \end_inset
16764
16765  are typeset beginning on a new page, while files that are 
16766 \begin_inset Quotes eld
16767 \end_inset
16768
16769 inputted
16770 \begin_inset Quotes erd
16771 \end_inset
16772
16773  are typeset starting on the current page.
16774 \end_layout
16775
16776 \begin_layout Standard
16777 Generally, the master file is converted into a full \SpecialChar LaTeX
16778  file before typesetting,
16779  while the included files are converted to \SpecialChar LaTeX
16780  files that do not have all the
16781  preamble information.
16782 \end_layout
16783
16784 \begin_layout Standard
16785
16786 \begin_inset Quotes eld
16787 \end_inset
16788
16789 verbatim
16790 \begin_inset Quotes erd
16791 \end_inset
16792
16793  included file allows you to include a file typeset exactly as it appears
16794  in the file, i.
16795 \begin_inset space \thinspace{}
16796 \end_inset
16797
16798 e.
16799 \begin_inset space \space{}
16800 \end_inset
16801
16802 in 
16803 \begin_inset Flex Code
16804 status collapsed
16805
16806 \begin_layout Plain Layout
16807 verbatim
16808 \end_layout
16809
16810 \end_inset
16811
16812  mode, with the characters set in a fixed-width typewriter font.
16813  Normally, spaces in this file are invisible, though two consecutive spaces
16814  are conserved, unlike \SpecialChar LyX
16815 's normal treatment of spaces.
16816  However, setting the 
16817 \begin_inset Flex Noun
16818 status collapsed
16819
16820 \begin_layout Plain Layout
16821 Mark
16822 \begin_inset space ~
16823 \end_inset
16824
16825 spaces
16826 \begin_inset space ~
16827 \end_inset
16828
16829 in
16830 \begin_inset space ~
16831 \end_inset
16832
16833 output
16834 \end_layout
16835
16836 \end_inset
16837
16838  checkbox typesets a mark to unambiguously define the presence of a space.
16839  
16840 \end_layout
16841
16842 \begin_layout Section
16843 Cross-References Between Files
16844 \end_layout
16845
16846 \begin_layout Standard
16847 \begin_inset Box Shadowbox
16848 position "t"
16849 hor_pos "c"
16850 has_inner_box 1
16851 inner_pos "t"
16852 use_parbox 0
16853 use_makebox 0
16854 width "100col%"
16855 special "none"
16856 height "1in"
16857 height_special "totalheight"
16858 thickness "0.4pt"
16859 separation "3pt"
16860 shadowsize "4pt"
16861 framecolor "black"
16862 backgroundcolor "none"
16863 status open
16864
16865 \begin_layout Plain Layout
16866 This section is somewhat out of date.
16867  Need to describe default master documents and how children are opened when
16868  the master is.
16869  [[FIXME]]
16870 \end_layout
16871
16872 \end_inset
16873
16874
16875 \end_layout
16876
16877 \begin_layout Standard
16878 It is possible to set up cross-references between the different files.
16879  First, open all the files in question: let's call them A and B in a two
16880  file example, where B is included in A.
16881  Let's say you insert a label in A, then want to reference it in B.
16882  Open the cross-reference dialog whilst in document B, and you can select
16883  the 
16884 \begin_inset Quotes eld
16885 \end_inset
16886
16887 buffer
16888 \begin_inset Quotes erd
16889 \end_inset
16890
16891  to use.
16892 \end_layout
16893
16894 \begin_layout Section
16895 Bibliography Lists in all Subdocuments
16896 \end_layout
16897
16898 \begin_layout Standard
16899 \begin_inset Box Frameless
16900 position "t"
16901 hor_pos "c"
16902 has_inner_box 1
16903 inner_pos "t"
16904 use_parbox 0
16905 use_makebox 0
16906 width "100col%"
16907 special "none"
16908 height "1in"
16909 height_special "totalheight"
16910 thickness "0.4pt"
16911 separation "3pt"
16912 shadowsize "4pt"
16913 framecolor "black"
16914 backgroundcolor "none"
16915 status open
16916
16917 \begin_layout Plain Layout
16918 This section also needs updating.
16919  There is now material about this on the wiki, and it could be copied here.
16920 \end_layout
16921
16922 \end_inset
16923
16924
16925 \end_layout
16926
16927 \begin_layout Standard
16928 Copy the bibliography list with all entries to all subdocuments and transform
16929  them to a comment.
16930  This way \SpecialChar LyX
16931  will find the 
16932 \begin_inset Flex Code
16933 status collapsed
16934
16935 \begin_layout Plain Layout
16936 .bib
16937 \end_layout
16938
16939 \end_inset
16940
16941 -files and you can easily insert references without making the bibliography
16942  list visible.
16943 \end_layout
16944
16945 \begin_layout Standard
16946 As the bibliography list is in a comment, \SpecialChar LaTeX
16947  won't use it and the references
16948  will look like this: [?], instead of like this: [1].
16949  One solution is to use the \SpecialChar LaTeX
16950 -package 
16951 \begin_inset Flex Code
16952 status collapsed
16953
16954 \begin_layout Plain Layout
16955 comment
16956 \end_layout
16957
16958 \end_inset
16959
16960  that will only include comments by processing the files separately.
16961  To do this, add in the \SpecialChar LaTeX
16962  preamble of every subdocument the following:
16963 \end_layout
16964
16965 \begin_layout LyX-Code
16966
16967 \backslash
16968 usepackage{comment}
16969 \end_layout
16970
16971 \begin_layout LyX-Code
16972
16973 \backslash
16974 includecomment{comment}
16975 \end_layout
16976
16977 \begin_layout Standard
16978 See also 
16979 \begin_inset Flex URL
16980 status collapsed
16981
16982 \begin_layout Plain Layout
16983
16984 http://wiki.lyx.org/FAQ/Unsorted#toc31
16985 \end_layout
16986
16987 \end_inset
16988
16989 .
16990 \end_layout
16991
16992 \begin_layout Section
16993 Itemize Bullet Selection
16994 \begin_inset CommandInset label
16995 LatexCommand label
16996 name "sec:bullet"
16997
16998 \end_inset
16999
17000
17001 \end_layout
17002
17003 \begin_layout Standard
17004 by
17005 \noun on
17006  Allan Rae
17007 \end_layout
17008
17009 \begin_layout Subsection
17010 Introduction
17011 \end_layout
17012
17013 \begin_layout Standard
17014 \SpecialChar LyX
17015  provides 216 bullet shapes that can be accessed from a simple dialog.
17016  Using this dialog you can easily specify what bullet shape to use at each
17017  level of an itemized list.
17018  These settings are document-wide so you won't be able to specify different
17019  sets of bullets for different paragraphs.
17020 \begin_inset Foot
17021 status collapsed
17022
17023 \begin_layout Plain Layout
17024 Well, actually you can but you'll have to do it by hand.
17025 \end_layout
17026
17027 \end_inset
17028
17029
17030 \end_layout
17031
17032 \begin_layout Subsection
17033 How it looks
17034 \end_layout
17035
17036 \begin_layout Standard
17037 Open the dialog by selecting the 
17038 \begin_inset Flex Noun
17039 status collapsed
17040
17041 \begin_layout Plain Layout
17042 Document\SpecialChar menuseparator
17043 Settings
17044 \end_layout
17045
17046 \end_inset
17047
17048  menu item and then select the 
17049 \begin_inset Flex Noun
17050 status collapsed
17051
17052 \begin_layout Plain Layout
17053 Bullets
17054 \end_layout
17055
17056 \end_inset
17057
17058  tab.
17059 \end_layout
17060
17061 \begin_layout Standard
17062 The dialog provides you with a table of bullet shapes.
17063  A column of buttons on the left of the table provides access to the six
17064  different panels of bullet shapes.
17065  The row of buttons across the top is used to select which bullet depth
17066  you are changing.
17067  A text entry under the table shows the currently selected bullet shape's
17068  \SpecialChar LaTeX
17069  equivalent and this can be edited if desired.
17070  If you do modify the text you will also need to specify any needed packages
17071  in the \SpecialChar LaTeX
17072  preamble.
17073 \end_layout
17074
17075 \begin_layout Standard
17076 The six panels are divided up by the packages they require.
17077  The following table shows the mappings from button name to \SpecialChar LaTeX
17078  package.
17079 \begin_inset Separator latexpar
17080 \end_inset
17081
17082
17083 \end_layout
17084
17085 \begin_layout Standard
17086 \align center
17087 \begin_inset Tabular
17088 <lyxtabular version="3" rows="7" columns="2">
17089 <features tabularvalignment="middle">
17090 <column alignment="center" valignment="top" width="0pt">
17091 <column alignment="center" valignment="top" width="0pt">
17092 <row>
17093 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
17094 \begin_inset Text
17095
17096 \begin_layout Plain Layout
17097
17098 \family roman
17099 \series medium
17100 \shape up
17101 \size normal
17102 \emph off
17103 \bar no
17104 \noun off
17105 \color none
17106 Button
17107 \end_layout
17108
17109 \end_inset
17110 </cell>
17111 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
17112 \begin_inset Text
17113
17114 \begin_layout Plain Layout
17115
17116 \family roman
17117 \series medium
17118 \shape up
17119 \size normal
17120 \emph off
17121 \bar no
17122 \noun off
17123 \color none
17124 Packages Required
17125 \end_layout
17126
17127 \end_inset
17128 </cell>
17129 </row>
17130 <row>
17131 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
17132 \begin_inset Text
17133
17134 \begin_layout Plain Layout
17135
17136 \family sans
17137 \series medium
17138 \shape up
17139 \size normal
17140 \emph off
17141 \bar no
17142 \noun off
17143 \color none
17144 Standard
17145 \end_layout
17146
17147 \end_inset
17148 </cell>
17149 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
17150 \begin_inset Text
17151
17152 \begin_layout Plain Layout
17153
17154 \series medium
17155 \shape up
17156 \size normal
17157 \emph off
17158 \bar no
17159 \noun off
17160 \color none
17161 base \SpecialChar LaTeX
17162
17163 \end_layout
17164
17165 \end_inset
17166 </cell>
17167 </row>
17168 <row>
17169 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
17170 \begin_inset Text
17171
17172 \begin_layout Plain Layout
17173
17174 \family sans
17175 \series medium
17176 \shape up
17177 \size normal
17178 \emph off
17179 \bar no
17180 \noun off
17181 \color none
17182 Maths
17183 \end_layout
17184
17185 \end_inset
17186 </cell>
17187 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
17188 \begin_inset Text
17189
17190 \begin_layout Plain Layout
17191
17192 \family typewriter
17193 \series medium
17194 \shape up
17195 \size normal
17196 \emph off
17197 \bar no
17198 \noun off
17199 \color none
17200 amssymb.sty
17201 \end_layout
17202
17203 \end_inset
17204 </cell>
17205 </row>
17206 <row>
17207 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
17208 \begin_inset Text
17209
17210 \begin_layout Plain Layout
17211
17212 \family sans
17213 \series medium
17214 \shape up
17215 \size normal
17216 \emph off
17217 \bar no
17218 \noun off
17219 \color none
17220 Ding1
17221 \end_layout
17222
17223 \end_inset
17224 </cell>
17225 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
17226 \begin_inset Text
17227
17228 \begin_layout Plain Layout
17229
17230 \family typewriter
17231 \series medium
17232 \shape up
17233 \size normal
17234 \emph off
17235 \bar no
17236 \noun off
17237 \color none
17238 pifont.sty
17239 \end_layout
17240
17241 \end_inset
17242 </cell>
17243 </row>
17244 <row>
17245 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
17246 \begin_inset Text
17247
17248 \begin_layout Plain Layout
17249
17250 \family sans
17251 \series medium
17252 \shape up
17253 \size normal
17254 \emph off
17255 \bar no
17256 \noun off
17257 \color none
17258 Ding2
17259 \end_layout
17260
17261 \end_inset
17262 </cell>
17263 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
17264 \begin_inset Text
17265
17266 \begin_layout Plain Layout
17267
17268 \family typewriter
17269 \series medium
17270 \shape up
17271 \size normal
17272 \emph off
17273 \bar no
17274 \noun off
17275 \color none
17276 pifont.sty
17277 \end_layout
17278
17279 \end_inset
17280 </cell>
17281 </row>
17282 <row>
17283 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
17284 \begin_inset Text
17285
17286 \begin_layout Plain Layout
17287
17288 \family sans
17289 \series medium
17290 \shape up
17291 \size normal
17292 \emph off
17293 \bar no
17294 \noun off
17295 \color none
17296 Ding3
17297 \end_layout
17298
17299 \end_inset
17300 </cell>
17301 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
17302 \begin_inset Text
17303
17304 \begin_layout Plain Layout
17305
17306 \family typewriter
17307 \series medium
17308 \shape up
17309 \size normal
17310 \emph off
17311 \bar no
17312 \noun off
17313 \color none
17314 pifont.sty
17315 \end_layout
17316
17317 \end_inset
17318 </cell>
17319 </row>
17320 <row>
17321 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
17322 \begin_inset Text
17323
17324 \begin_layout Plain Layout
17325
17326 \family sans
17327 \series medium
17328 \shape up
17329 \size normal
17330 \emph off
17331 \bar no
17332 \noun off
17333 \color none
17334 Ding4
17335 \end_layout
17336
17337 \end_inset
17338 </cell>
17339 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
17340 \begin_inset Text
17341
17342 \begin_layout Plain Layout
17343
17344 \family typewriter
17345 \series medium
17346 \shape up
17347 \size normal
17348 \emph off
17349 \bar no
17350 \noun off
17351 \color none
17352 pifont.sty
17353 \end_layout
17354
17355 \end_inset
17356 </cell>
17357 </row>
17358 </lyxtabular>
17359
17360 \end_inset
17361
17362
17363 \end_layout
17364
17365 \begin_layout Standard
17366 \SpecialChar LyX
17367  doesn't stop you using bullets from packages you don't have.
17368  If you get errors from \SpecialChar LaTeX
17369  when you try to view or print the file, then it
17370  is likely you are missing a package.
17371 \begin_inset Foot
17372 status collapsed
17373
17374 \begin_layout Plain Layout
17375 \SpecialChar LyX
17376  doesn't restrict your use since you may be editing locally and exporting
17377  elsewhere.
17378 \end_layout
17379
17380 \end_inset
17381
17382
17383 \end_layout
17384
17385 \begin_layout Subsection
17386 How to use it
17387 \end_layout
17388
17389 \begin_layout Standard
17390 Select which bullet depth you want to change then select the bullet shape
17391  and size.
17392  Any changes will not be visible in \SpecialChar LyX
17393 , but are visible when viewing the document.
17394 \end_layout
17395
17396 \begin_layout Standard
17397 You can reset a bullet shape to the default simply by clicking your right
17398  mouse button on the appropriate bullet depth button.
17399 \begin_inset Foot
17400 status collapsed
17401
17402 \begin_layout Plain Layout
17403 If you 
17404 \emph on
17405 really
17406 \emph default
17407  want to have multiple sets of paragraphs with different sets of bullets
17408  in each, then you're going to have to get your hands dirty with \SpecialChar TeX
17409  code.
17410  The bullet selection dialog can help though because it provides you with
17411  the \SpecialChar LaTeX
17412  code for a wide range of bullet shapes.
17413  To make your own custom paragraphs you have the following options:
17414 \end_layout
17415
17416 \begin_layout Plain Layout
17417 \begin_inset ERT
17418 status open
17419
17420 \begin_layout Plain Layout
17421
17422
17423 \backslash
17424 let
17425 \backslash
17426 savelabelitemi=
17427 \backslash
17428 labelitemi
17429 \end_layout
17430
17431 \end_inset
17432
17433
17434 \end_layout
17435
17436 \begin_layout Plain Layout
17437 \begin_inset ERT
17438 status open
17439
17440 \begin_layout Plain Layout
17441
17442
17443 \backslash
17444 renewcommand
17445 \backslash
17446 labelitemi[0]{
17447 \backslash
17448 small
17449 \backslash
17450 (
17451 \backslash
17452 sharp
17453 \backslash
17454 )}
17455 \end_layout
17456
17457 \end_inset
17458
17459
17460 \end_layout
17461
17462 \begin_layout Itemize
17463 Use the \SpecialChar LaTeX
17464  command 
17465 \begin_inset Flex Code
17466 status collapsed
17467
17468 \begin_layout Plain Layout
17469
17470 \backslash
17471 renewcommand{}{}
17472 \end_layout
17473
17474 \end_inset
17475
17476  to specify a new bullet shape for a given depth.
17477  You'll also need to save the current bullet shape so you can restore it
17478  again afterwards.
17479  In this itemized list the following \SpecialChar LaTeX
17480  code was used to change the bullet
17481  used for the first depth.
17482 \begin_inset Separator latexpar
17483 \end_inset
17484
17485
17486 \end_layout
17487
17488 \begin_deeper
17489 \begin_layout LyX-Code
17490
17491 \backslash
17492 let
17493 \backslash
17494 savelabelitemi=
17495 \backslash
17496 labelitemi 
17497 \end_layout
17498
17499 \begin_layout LyX-Code
17500
17501 \backslash
17502 renewcommand
17503 \backslash
17504 labelitemi[0]{
17505 \backslash
17506 small
17507 \backslash
17508 (
17509 \backslash
17510 sharp
17511 \backslash
17512 )}
17513 \end_layout
17514
17515 \end_deeper
17516 \begin_layout Itemize
17517 Note that the itemize depth is specified in Roman numerals as part of the
17518  
17519 \family typewriter
17520
17521 \backslash
17522 labelitem
17523 \family default
17524  command.
17525 \end_layout
17526
17527 \begin_layout Itemize
17528 \begin_inset ERT
17529 status open
17530
17531 \begin_layout Plain Layout
17532
17533 [
17534 \backslash
17535 (
17536 \backslash
17537 star
17538 \backslash
17539 )]
17540 \end_layout
17541
17542 \end_inset
17543
17544  Specify each individual entry by starting each item with the bullet shape
17545  enclosed in square brackets and set as 
17546 \begin_inset Flex Noun
17547 status collapsed
17548
17549 \begin_layout Plain Layout
17550 \SpecialChar TeX
17551  Code
17552 \end_layout
17553
17554 \end_inset
17555
17556 .
17557  For example, this item was started with 
17558 \begin_inset Flex Code
17559 status collapsed
17560
17561 \begin_layout Plain Layout
17562 [
17563 \backslash
17564 (
17565 \backslash
17566 star
17567 \backslash
17568 )]
17569 \end_layout
17570
17571 \end_inset
17572
17573 .
17574 \end_layout
17575
17576 \begin_layout Plain Layout
17577 \begin_inset ERT
17578 status open
17579
17580 \begin_layout Plain Layout
17581
17582
17583 \backslash
17584 renewcommand
17585 \backslash
17586 labelitemi[0]{
17587 \backslash
17588 savelabelitemi}
17589 \end_layout
17590
17591 \end_inset
17592
17593
17594 \end_layout
17595
17596 \begin_layout Plain Layout
17597 You'll also need to revert the labelitem back to its previous setting for
17598  the global bullet shape settings to remain in effect.
17599  The way used here was:
17600 \end_layout
17601
17602 \begin_layout LyX-Code
17603
17604 \backslash
17605 renewcommand
17606 \backslash
17607 labelitemi[0]{
17608 \backslash
17609 savelabelitemi}
17610 \end_layout
17611
17612 \end_inset
17613
17614
17615 \end_layout
17616
17617 \begin_layout Chapter
17618 \SpecialChar LyX
17619  Features needing Extra Software
17620 \end_layout
17621
17622 \begin_layout Section
17623 Checking \SpecialChar TeX
17624
17625 \end_layout
17626
17627 \begin_layout Standard
17628 by 
17629 \noun on
17630 Asger Alstrup
17631 \end_layout
17632
17633 \begin_layout Subsection
17634 Introduction
17635 \end_layout
17636
17637 \begin_layout Standard
17638 If you have the 
17639 \family typewriter
17640 chktex
17641 \family default
17642  program installed
17643 \begin_inset Foot
17644 status collapsed
17645
17646 \begin_layout Plain Layout
17647
17648 \family typewriter
17649 chktex
17650 \family default
17651  is not yet available when you are using the \SpecialChar LaTeX
17652  distribution MiK\SpecialChar TeX
17653 .
17654 \end_layout
17655
17656 \end_inset
17657
17658 , you'll find in the 
17659 \family sans
17660 Tools
17661 \family default
17662  menu the entry: 
17663 \family sans
17664 Check
17665 \begin_inset space ~
17666 \end_inset
17667
17668 TeX
17669 \family default
17670 .
17671  You can get 
17672 \family typewriter
17673 chktex
17674 \family default
17675  from CTAN,
17676 \begin_inset Newline newline
17677 \end_inset
17678
17679
17680 \begin_inset CommandInset href
17681 LatexCommand href
17682 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17683
17684 \end_inset
17685
17686 .
17687 \end_layout
17688
17689 \begin_layout Standard
17690 The 
17691 \family sans
17692 Chk\SpecialChar TeX
17693
17694 \family default
17695  package is a program that was written by 
17696 \begin_inset Flex Noun
17697 status collapsed
17698
17699 \begin_layout Plain Layout
17700 Jens T.
17701 \begin_inset space ~
17702 \end_inset
17703
17704 Berger Thielemann
17705 \end_layout
17706
17707 \end_inset
17708
17709  in frustration because some constructs in \SpecialChar LaTeX
17710  are sometimes non-intuitive,
17711  and easy to forget.
17712  The program runs over your \SpecialChar LaTeX
17713  file, checks the integrity of the file, and
17714  flags some common errors.
17715  In other technical words, it is 
17716 \family typewriter
17717 lint
17718 \family default
17719  for \SpecialChar LaTeX
17720 .
17721 \end_layout
17722
17723 \begin_layout Standard
17724 Well, what is a syntax checker doing in \SpecialChar LyX
17725  which is supposed to produce correct
17726  \SpecialChar LaTeX
17727  anyways? The answer is simple: Just as 
17728 \family typewriter
17729 Lint
17730 \family default
17731  not only checks the 
17732 \emph on
17733 syntax
17734 \emph default
17735  of C programs, but also does 
17736 \emph on
17737 semantic
17738 \emph default
17739  checks for type-errors, 
17740 \family sans
17741 Chk\SpecialChar TeX
17742
17743 \family default
17744  catches some common 
17745 \emph on
17746 typographic
17747 \emph default
17748  errors, in addition to the syntactical ones.
17749  Specifically, 
17750 \family sans
17751 Chk\SpecialChar TeX
17752
17753 \family default
17754  is capable of detecting several common errors, such as
17755 \end_layout
17756
17757 \begin_layout Itemize
17758 Ellipsis detection:
17759 \begin_inset Newline newline
17760 \end_inset
17761
17762 Use \SpecialChar ldots
17763  instead of ...
17764 \end_layout
17765
17766 \begin_layout Itemize
17767 No space in front of/after parenthesis:
17768 \begin_inset Newline newline
17769 \end_inset
17770
17771 ( wrong spacing )
17772 \end_layout
17773
17774 \begin_layout Itemize
17775 Enforcement of normal space after common abbreviations:
17776 \begin_inset Newline newline
17777 \end_inset
17778
17779 e.
17780 \begin_inset space \thinspace{}
17781 \end_inset
17782
17783 g.
17784 \begin_inset space \space{}
17785 \end_inset
17786
17787 is too wide spacing.
17788 \end_layout
17789
17790 \begin_layout Itemize
17791 Enforcement of end-of-sentence space when the last sentence ends with a
17792  capital letter:
17793 \begin_inset Newline newline
17794 \end_inset
17795
17796 This is a TEST.
17797  And this is wrong spacing.
17798 \end_layout
17799
17800 \begin_layout Itemize
17801 Space in front of labels and similar commands:
17802 \begin_inset Newline newline
17803 \end_inset
17804
17805 The label should stick right up to the text to avoid falling to a wrong
17806  page.
17807  
17808 \begin_inset CommandInset label
17809 LatexCommand label
17810 name "sec:chktex"
17811
17812 \end_inset
17813
17814  
17815 \begin_inset Foot
17816 status collapsed
17817
17818 \begin_layout Plain Layout
17819 This footnote is in danger of falling off to a wrong page
17820 \end_layout
17821
17822 \end_inset
17823
17824  The label is separated too much.
17825 \end_layout
17826
17827 \begin_layout Itemize
17828 Space in front of references, instead of hard spaces:
17829 \begin_inset Newline newline
17830 \end_inset
17831
17832 If you have bad luck, the text will break right between the referenced text
17833  and reference number, and that's a pity.
17834  See section 
17835 \begin_inset CommandInset ref
17836 LatexCommand ref
17837 reference "sec:chktex"
17838
17839 \end_inset
17840
17841 .
17842 \end_layout
17843
17844 \begin_layout Itemize
17845 Use of 
17846 \begin_inset Quotes eld
17847 \end_inset
17848
17849 x
17850 \begin_inset Quotes erd
17851 \end_inset
17852
17853  instead of 
17854 \begin_inset Formula $\times$
17855 \end_inset
17856
17857  between numbers:
17858 \begin_inset Newline newline
17859 \end_inset
17860
17861 2x2 looks cheap compared to 
17862 \begin_inset Formula $2\times2$
17863 \end_inset
17864
17865 .
17866 \end_layout
17867
17868 \begin_layout Standard
17869 and more \SpecialChar ldots
17870  It is an invaluable tool when you are 
17871 \begin_inset Quotes eld
17872 \end_inset
17873
17874 finishing up
17875 \begin_inset Quotes erd
17876 \end_inset
17877
17878  your document before printing, and you should run it right after the obligatory
17879  spelling check, and before you go fine tuning the typesetting.
17880 \end_layout
17881
17882 \begin_layout Subsection
17883 How to use it
17884 \end_layout
17885
17886 \begin_layout Standard
17887 If you have the program installed, usage is as simple as choosing 
17888 \family sans
17889 Tools\SpecialChar menuseparator
17890 Check
17891 \begin_inset space ~
17892 \end_inset
17893
17894 TeX
17895 \family default
17896 .
17897  This will make \SpecialChar LyX
17898  generate a \SpecialChar LaTeX
17899  file of your document, start 
17900 \family sans
17901 Chk\SpecialChar TeX
17902
17903 \family default
17904  to check it, and then make \SpecialChar LyX
17905  insert 
17906 \begin_inset Quotes eld
17907 \end_inset
17908
17909 error boxes
17910 \begin_inset Quotes erd
17911 \end_inset
17912
17913  with the warnings from 
17914 \family sans
17915 Chk\SpecialChar TeX
17916
17917 \family default
17918 , if there were any.
17919  The warnings will be placed close to the point of the mistake, and you
17920  can quickly find them by using the 
17921 \family sans
17922 Navigate\SpecialChar menuseparator
17923 Error
17924 \family default
17925  menu item, or the shortcut key 
17926 \family sans
17927 C-g
17928 \family default
17929  from the default 
17930 \family typewriter
17931 cua
17932 \family default
17933  bind file.
17934  Open the error boxes by clicking on them with the mouse, or use the shortcut
17935  key 
17936 \family sans
17937 C-i
17938 \family default
17939  from 
17940 \family typewriter
17941 cua
17942 \family default
17943  bindings, or the corresponding 
17944 \family sans
17945 C-o
17946 \family default
17947  for the alternate 
17948 \family typewriter
17949 emacs
17950 \family default
17951  bind file.
17952  Read the warning and correct the mistake, if it is a mistake.
17953  If you have trouble understanding what the warning is about, you can safely
17954  ignore it.
17955  Remember that there is a hidden layer between the document on screen and
17956  the technical details in invoking 
17957 \family sans
17958 Chk\SpecialChar TeX
17959
17960 \family default
17961 , and this gap can make some warnings seem arcane or just plain silly.
17962 \end_layout
17963
17964 \begin_layout Standard
17965 This document is an excellent testing bed for the feature, and it should
17966  provide quite a few warnings for you to fiddle with.
17967  Since computers are only so smart, expect most of the warnings to be false
17968  alarms, though.
17969 \end_layout
17970
17971 \begin_layout Subsection
17972 How to fine tune it
17973 \end_layout
17974
17975 \begin_layout Standard
17976 Sometimes, you'll find that 
17977 \family sans
17978 Chk\SpecialChar TeX
17979
17980 \family default
17981  makes more noise than suits your mood.
17982  Then you can choose not to use it, wait until your mood changes, or try
17983  to customize 
17984 \family sans
17985 Chk\SpecialChar TeX
17986
17987 \family default
17988  to get better along with you.
17989 \end_layout
17990
17991 \begin_layout Standard
17992 Although 
17993 \family sans
17994 Chk\SpecialChar TeX
17995
17996 \family default
17997  
17998 \emph on
17999 is
18000 \emph default
18001  very configurable and extensible, you should not expect to solve all problems
18002  with 
18003 \family sans
18004 Chk\SpecialChar TeX
18005
18006 \family default
18007  in \SpecialChar LyX
18008  this way.
18009  Since \SpecialChar LyX
18010  has to generate a somewhat special \SpecialChar LaTeX
18011  file to be able to match the
18012  line numbers from the 
18013 \family sans
18014 Chk\SpecialChar TeX
18015
18016 \family default
18017  output
18018 \begin_inset Foot
18019 status collapsed
18020
18021 \begin_layout Plain Layout
18022 You can inspect the specific output from 
18023 \family sans
18024 chktex
18025 \family default
18026  by using 
18027 \family sans
18028 Document\SpecialChar menuseparator
18029 \SpecialChar LaTeX
18030
18031 \begin_inset space ~
18032 \end_inset
18033
18034 Log
18035 \family default
18036  right after a 
18037 \family sans
18038 chktex
18039 \family default
18040  run.
18041 \end_layout
18042
18043 \end_inset
18044
18045  to the internal document structure, some of the warnings will not appear
18046  correctly.
18047  There are two things you can do about this:
18048 \end_layout
18049
18050 \begin_layout Itemize
18051 Fine tune the 
18052 \family sans
18053 Chk\SpecialChar TeX
18054
18055 \family default
18056  invocation command line in 
18057 \begin_inset Flex Noun
18058 status collapsed
18059
18060 \begin_layout Plain Layout
18061 Tools\SpecialChar menuseparator
18062 Preferences\SpecialChar menuseparator
18063 Output\SpecialChar menuseparator
18064 LaTeX\SpecialChar menuseparator
18065 CheckTeX command
18066 \end_layout
18067
18068 \end_inset
18069
18070 , or the global 
18071 \family sans
18072 Chk\SpecialChar TeX
18073
18074 \family default
18075  installation configuration file (usually with the file 
18076 \family typewriter
18077 chktexrc
18078 \family default
18079 ).
18080  See below to learn what warnings can be enabled and disabled on the command
18081  line.
18082 \end_layout
18083
18084 \begin_layout Itemize
18085 Export your document as a raw \SpecialChar LaTeX
18086  file using 
18087 \family sans
18088 File\SpecialChar menuseparator
18089 Export\SpecialChar menuseparator
18090 \SpecialChar LaTeX
18091
18092 \family default
18093  and run 
18094 \family typewriter
18095 chktex
18096 \family default
18097  manually on that.
18098  Invoked in this way, it can be a hassle to find the corresponding place
18099  in the document inside \SpecialChar LyX
18100 , but with a little patience, you should be able
18101  to do it.
18102 \end_layout
18103
18104 \begin_layout Standard
18105 Here follows the warning messages that can be enabled and disabled in 
18106 \family sans
18107 Preferences
18108 \family default
18109 .
18110  Use 
18111 \family typewriter
18112 -n#
18113 \family default
18114  to disable a warning, and 
18115 \family typewriter
18116 -w#
18117 \family default
18118  to enable a warning.
18119  The emphasized entries are disabled by default, because the default is
18120  "
18121 \family typewriter
18122 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18123 \family default
18124 ".
18125 \end_layout
18126
18127 \begin_layout Standard
18128 Notice that you should only use the options that enable and disable warnings,
18129  because \SpecialChar LyX
18130  relies on some of the other command line parameters to be set
18131  in a specific way to have a chance to communicate with 
18132 \family typewriter
18133 chktex
18134 \family default
18135 .
18136 \end_layout
18137
18138 \begin_layout Enumerate
18139
18140 \size small
18141 \emph on
18142 Command terminated with space.
18143 \end_layout
18144
18145 \begin_layout Enumerate
18146
18147 \size small
18148 Non-breaking space (
18149 \begin_inset Quotes eld
18150 \end_inset
18151
18152
18153 \family typewriter
18154 ~
18155 \family default
18156
18157 \begin_inset Quotes erd
18158 \end_inset
18159
18160 ) should have been used.
18161 \end_layout
18162
18163 \begin_layout Enumerate
18164
18165 \size small
18166 \emph on
18167 You should enclose the previous parenthesis with 
18168 \begin_inset Quotes eld
18169 \end_inset
18170
18171
18172 \family typewriter
18173 {}
18174 \family default
18175
18176 \begin_inset Quotes erd
18177 \end_inset
18178
18179 .
18180 \end_layout
18181
18182 \begin_layout Enumerate
18183
18184 \size small
18185 Italic correction (
18186 \begin_inset Quotes eld
18187 \end_inset
18188
18189
18190 \family typewriter
18191
18192 \backslash
18193 /
18194 \family default
18195
18196 \begin_inset Quotes erd
18197 \end_inset
18198
18199 ) found in non-italic buffer.
18200 \end_layout
18201
18202 \begin_layout Enumerate
18203
18204 \size small
18205 Italic correction (
18206 \begin_inset Quotes eld
18207 \end_inset
18208
18209
18210 \family typewriter
18211
18212 \backslash
18213 /
18214 \family default
18215
18216 \begin_inset Quotes erd
18217 \end_inset
18218
18219 ) found more than once.
18220 \end_layout
18221
18222 \begin_layout Enumerate
18223
18224 \size small
18225 \emph on
18226 No italic correction (
18227 \begin_inset Quotes eld
18228 \end_inset
18229
18230
18231 \family typewriter
18232
18233 \backslash
18234 /
18235 \family default
18236
18237 \begin_inset Quotes erd
18238 \end_inset
18239
18240 ) found.
18241 \end_layout
18242
18243 \begin_layout Enumerate
18244
18245 \size small
18246 Accent command 
18247 \begin_inset Quotes eld
18248 \end_inset
18249
18250
18251 \family typewriter
18252 cmd
18253 \family default
18254
18255 \begin_inset Quotes erd
18256 \end_inset
18257
18258  needs use of 
18259 \begin_inset Quotes eld
18260 \end_inset
18261
18262
18263 \family typewriter
18264 cmd
18265 \family default
18266
18267 \begin_inset Quotes erd
18268 \end_inset
18269
18270 .
18271 \end_layout
18272
18273 \begin_layout Enumerate
18274
18275 \size small
18276 Wrong length of dash may have been used.
18277 \end_layout
18278
18279 \begin_layout Enumerate
18280
18281 \size small
18282 \emph on
18283 \begin_inset Quotes eld
18284 \end_inset
18285
18286
18287 \family typewriter
18288 %s
18289 \family default
18290
18291 \begin_inset Quotes erd
18292 \end_inset
18293
18294  expected, found 
18295 \begin_inset Quotes eld
18296 \end_inset
18297
18298
18299 \family typewriter
18300 %s
18301 \family default
18302
18303 \begin_inset Quotes erd
18304 \end_inset
18305
18306 .
18307 \end_layout
18308
18309 \begin_layout Enumerate
18310
18311 \size small
18312 Solo 
18313 \begin_inset Quotes eld
18314 \end_inset
18315
18316
18317 \family typewriter
18318 %s
18319 \family default
18320
18321 \begin_inset Quotes erd
18322 \end_inset
18323
18324  found.
18325 \end_layout
18326
18327 \begin_layout Enumerate
18328
18329 \size small
18330 You should use 
18331 \begin_inset Quotes eld
18332 \end_inset
18333
18334
18335 \family typewriter
18336 %s
18337 \family default
18338
18339 \begin_inset Quotes erd
18340 \end_inset
18341
18342  to achieve an ellipsis.
18343 \end_layout
18344
18345 \begin_layout Enumerate
18346
18347 \size small
18348 Inter-word spacing (
18349 \begin_inset Quotes eld
18350 \end_inset
18351
18352
18353 \family typewriter
18354
18355 \backslash
18356
18357 \family default
18358  
18359 \begin_inset Quotes eld
18360 \end_inset
18361
18362 ) should perhaps be used.
18363 \end_layout
18364
18365 \begin_layout Enumerate
18366
18367 \size small
18368 Inter-sentence spacing (
18369 \begin_inset Quotes eld
18370 \end_inset
18371
18372
18373 \family typewriter
18374
18375 \backslash
18376 @
18377 \family default
18378
18379 \begin_inset Quotes erd
18380 \end_inset
18381
18382 ) should perhaps be used.
18383 \end_layout
18384
18385 \begin_layout Enumerate
18386
18387 \size small
18388 Could not find argument for command.
18389 \end_layout
18390
18391 \begin_layout Enumerate
18392
18393 \size small
18394 No match found for 
18395 \begin_inset Quotes eld
18396 \end_inset
18397
18398
18399 \family typewriter
18400 %s
18401 \family default
18402
18403 \begin_inset Quotes erd
18404 \end_inset
18405
18406 .
18407 \end_layout
18408
18409 \begin_layout Enumerate
18410
18411 \size small
18412 Math mode still on at end of \SpecialChar LaTeX
18413  file.
18414 \end_layout
18415
18416 \begin_layout Enumerate
18417
18418 \size small
18419 Number of 
18420 \begin_inset Quotes eld
18421 \end_inset
18422
18423
18424 \family typewriter
18425 char
18426 \family default
18427
18428 \begin_inset Quotes erd
18429 \end_inset
18430
18431  doesn't match the number of 
18432 \begin_inset Quotes eld
18433 \end_inset
18434
18435
18436 \family typewriter
18437 char
18438 \family default
18439
18440 \begin_inset Quotes erd
18441 \end_inset
18442
18443 .
18444 \end_layout
18445
18446 \begin_layout Enumerate
18447
18448 \size small
18449 You should use either 
18450 \family typewriter
18451
18452 \begin_inset Quotes eld
18453 \end_inset
18454
18455
18456 \family default
18457  or 
18458 \family typewriter
18459
18460 \begin_inset Quotes erd
18461 \end_inset
18462
18463
18464 \family default
18465  as an alternative to 
18466 \begin_inset Quotes eld
18467 \end_inset
18468
18469
18470 \family typewriter
18471 "
18472 \family default
18473
18474 \begin_inset Quotes erd
18475 \end_inset
18476
18477 .
18478 \end_layout
18479
18480 \begin_layout Enumerate
18481
18482 \size small
18483 You should use "
18484 \family typewriter
18485 '
18486 \family default
18487 " (ASCII 39) instead of "
18488 \family typewriter
18489 ´
18490 \family default
18491 " (ASCII 180).
18492 \end_layout
18493
18494 \begin_layout Enumerate
18495
18496 \size small
18497 User-specified pattern found.
18498 \end_layout
18499
18500 \begin_layout Enumerate
18501
18502 \size small
18503 This command might not be intended.
18504 \end_layout
18505
18506 \begin_layout Enumerate
18507
18508 \size small
18509 \emph on
18510 Comment displayed.
18511 \end_layout
18512
18513 \begin_layout Enumerate
18514
18515 \size small
18516 Either 
18517 \family typewriter
18518 ''
18519 \backslash
18520 ,'
18521 \family default
18522  or 
18523 \family typewriter
18524 '
18525 \backslash
18526 ,''
18527 \family default
18528  will look better.
18529 \end_layout
18530
18531 \begin_layout Enumerate
18532
18533 \size small
18534 Delete this space to maintain correct page references.
18535 \end_layout
18536
18537 \begin_layout Enumerate
18538
18539 \size small
18540 \emph on
18541 You might wish to put this between a pair of 
18542 \begin_inset Quotes eld
18543 \end_inset
18544
18545
18546 \family typewriter
18547 {}
18548 \family default
18549
18550 \begin_inset Quotes erd
18551 \end_inset
18552
18553 .
18554 \end_layout
18555
18556 \begin_layout Enumerate
18557
18558 \size small
18559 You ought to remove spaces in front of punctuation.
18560 \end_layout
18561
18562 \begin_layout Enumerate
18563
18564 \size small
18565 Could not execute \SpecialChar LaTeX
18566  command.
18567 \end_layout
18568
18569 \begin_layout Enumerate
18570
18571 \size small
18572 Don't use 
18573 \family typewriter
18574
18575 \backslash
18576 /
18577 \family default
18578  in front of small punctuation.
18579 \end_layout
18580
18581 \begin_layout Enumerate
18582
18583 \family typewriter
18584 \size small
18585 $
18586 \backslash
18587 times$
18588 \family default
18589  may look prettier here.
18590 \end_layout
18591
18592 \begin_layout Enumerate
18593
18594 \size small
18595 \emph on
18596 Multiple spaces detected in output.
18597 \end_layout
18598
18599 \begin_layout Enumerate
18600
18601 \size small
18602 This text may be ignored.
18603 \end_layout
18604
18605 \begin_layout Enumerate
18606
18607 \size small
18608 Use 
18609 \family typewriter
18610
18611 \begin_inset Quotes eld
18612 \end_inset
18613
18614
18615 \family default
18616  to begin quotation, not 
18617 \family typewriter
18618 '
18619 \family default
18620 .
18621 \end_layout
18622
18623 \begin_layout Enumerate
18624
18625 \size small
18626 Use 
18627 \family typewriter
18628 '
18629 \family default
18630  to end quotation, not 
18631 \family typewriter
18632
18633 \begin_inset Quotes eld
18634 \end_inset
18635
18636
18637 \family default
18638 .
18639 \end_layout
18640
18641 \begin_layout Enumerate
18642
18643 \size small
18644 Don't mix quotes.
18645 \end_layout
18646
18647 \begin_layout Enumerate
18648
18649 \size small
18650 You should perhaps use 
18651 \begin_inset Quotes eld
18652 \end_inset
18653
18654
18655 \family typewriter
18656 cmd
18657 \family default
18658
18659 \begin_inset Quotes erd
18660 \end_inset
18661
18662  instead.
18663 \end_layout
18664
18665 \begin_layout Enumerate
18666
18667 \size small
18668 You should put a space in front of/after parenthesis.
18669 \end_layout
18670
18671 \begin_layout Enumerate
18672
18673 \size small
18674 You should avoid spaces in front of/after parenthesis.
18675 \end_layout
18676
18677 \begin_layout Enumerate
18678
18679 \size small
18680 \emph on
18681 You should not use punctuation in front of/after quotes.
18682 \end_layout
18683
18684 \begin_layout Enumerate
18685
18686 \size small
18687 Double space found.
18688 \end_layout
18689
18690 \begin_layout Enumerate
18691
18692 \size small
18693 You should put punctuation outside inner/inside display math mode.
18694 \end_layout
18695
18696 \begin_layout Enumerate
18697
18698 \size small
18699 You ought to not use primitive \SpecialChar TeX
18700  in \SpecialChar LaTeX
18701  code.
18702 \end_layout
18703
18704 \begin_layout Enumerate
18705
18706 \size small
18707 You should remove spaces in front of 
18708 \begin_inset Quotes eld
18709 \end_inset
18710
18711
18712 \family typewriter
18713 %s
18714 \family default
18715
18716 \begin_inset Quotes erd
18717 \end_inset
18718
18719
18720 \end_layout
18721
18722 \begin_layout Enumerate
18723
18724 \size small
18725 \begin_inset Quotes eld
18726 \end_inset
18727
18728
18729 \family typewriter
18730 %s
18731 \family default
18732
18733 \begin_inset Quotes erd
18734 \end_inset
18735
18736  is normally not followed by 
18737 \begin_inset Quotes eld
18738 \end_inset
18739
18740
18741 \family typewriter
18742 %c
18743 \family default
18744
18745 \begin_inset Quotes erd
18746 \end_inset
18747
18748 .
18749 \end_layout
18750
18751 \begin_layout Standard
18752 In later versions of \SpecialChar LyX
18753 , we hope to provide a more complete interface to this
18754  tool (and it's smaller cousin 
18755 \family typewriter
18756 lacheck
18757 \family default
18758 ) to exploit the full power of it.
18759  But it's not exactly useless as it is now: go try it on one of your existing
18760  documents of a certain length and be surprised.
18761 \end_layout
18762
18763 \begin_layout Section
18764 Version Control in \SpecialChar LyX
18765
18766 \end_layout
18767
18768 \begin_layout Standard
18769 by
18770 \noun on
18771  Lars Gullik Bjønnes 
18772 \noun default
18773 and 
18774 \noun on
18775 Pavel Sanda
18776 \end_layout
18777
18778 \begin_layout Subsection
18779 Introduction
18780 \end_layout
18781
18782 \begin_layout Standard
18783 \SpecialChar LyX
18784  supports some of the most basic RCS/CVS/SVN/GIT commands.
18785  If you need something a bit more sophisticated you will have to do that
18786  manually in a terminal.
18787 \end_layout
18788
18789 \begin_layout Standard
18790 Also note that CVS support is not as good as subversion support so we advise
18791  using SVN instead.
18792  A good place to start learning Subversion is SVN Book
18793 \begin_inset Foot
18794 status collapsed
18795
18796 \begin_layout Plain Layout
18797 \begin_inset CommandInset href
18798 LatexCommand href
18799 target "http://svnbook.red-bean.com/"
18800
18801 \end_inset
18802
18803
18804 \end_layout
18805
18806 \end_inset
18807
18808 .
18809  In the case of RCS you should read 
18810 \begin_inset Quotes eld
18811 \end_inset
18812
18813 rcsintro
18814 \begin_inset Quotes erd
18815 \end_inset
18816
18817  (a man file, read it with 
18818 \family typewriter
18819 man rcsintro
18820 \family default
18821 ).
18822  This file describes all the basic features of RCS.
18823  You should especially notice the comment about a RCS directory, and the
18824  notion of a master RCS file (the file ending in 
18825 \family typewriter
18826 ,v
18827 \family default
18828 ).
18829 \end_layout
18830
18831 \begin_layout Standard
18832 Before you begin to use the version control features in \SpecialChar LyX
18833 , you should be
18834  familiar with RCS/CVS/SVN/GIT usage.
18835  The implementation in \SpecialChar LyX
18836  assumes a recent version of the GNU RCS or CVS/SVN
18837  package — no guarantees are made for older versions.
18838  Most of the log messages are not currently displayed after operations —
18839  you can check them in the Messages pane if unsure.
18840  Regular users of version control will appreciate VC toolbar, which can
18841  be enabled via 
18842 \family sans
18843 View\SpecialChar menuseparator
18844 Toolbars\SpecialChar menuseparator
18845 Version
18846 \begin_inset space ~
18847 \end_inset
18848
18849 Control
18850 \family default
18851 .
18852 \end_layout
18853
18854 \begin_layout Standard
18855 For introducing your own external commands consult vc-command in the manual
18856  of \SpecialChar LyX
18857  functions.
18858 \end_layout
18859
18860 \begin_layout Standard
18861 It is strongly recommended to store documents in uncompressed format if
18862  using version control (uncheck 
18863 \family sans
18864 Document\SpecialChar menuseparator
18865 Compressed
18866 \family default
18867  if it is checked): Uncompressed LyX documents are text files and therefore
18868  for merging two different versions by version control systems.
18869  Compressed LyX documents are binary files, which cannot be merged by version
18870  control systems.
18871 \end_layout
18872
18873 \begin_layout Subsection
18874 RCS commands in \SpecialChar LyX
18875
18876 \end_layout
18877
18878 \begin_layout Standard
18879 The following sections describe the RCS commands supported by \SpecialChar LyX
18880 .
18881  You can find them in the 
18882 \family sans
18883 File\SpecialChar menuseparator
18884 Version
18885 \begin_inset space ~
18886 \end_inset
18887
18888 Control
18889 \family default
18890  submenu.
18891  \SpecialChar LyX
18892  was tested against RCS 5.7/5.8.
18893 \end_layout
18894
18895 \begin_layout Subsubsection
18896
18897 \family sans
18898 Register
18899 \end_layout
18900
18901 \begin_layout Standard
18902 If your document is not under revision control, this is the only item shown
18903  in the menu.
18904  And if it is under revision control, the 
18905 \family sans
18906 Register
18907 \family default
18908  item is not visible.
18909  
18910 \end_layout
18911
18912 \begin_layout Standard
18913 This command registers your document with RCS (unless you are under the
18914  directory managed by CVS)\SpecialChar endofsentence
18915  You are asked interactively to supply an initial
18916  description of the document.
18917  The document is now set in Read-Only mode and you have to 
18918 \family sans
18919 Check
18920 \begin_inset space ~
18921 \end_inset
18922
18923 Out
18924 \begin_inset space ~
18925 \end_inset
18926
18927 For
18928 \begin_inset space ~
18929 \end_inset
18930
18931 Edit
18932 \family default
18933 , before making any changes to it.
18934  A document under revision control has a 
18935 \begin_inset Quotes eld
18936 \end_inset
18937
18938 [RCS:<version> <locker>]
18939 \begin_inset Quotes erd
18940 \end_inset
18941
18942  item tagged to the filename in the minibuffer.
18943 \end_layout
18944
18945 \begin_layout Standard
18946 RCS command that is run: 
18947 \family typewriter
18948 ci -q -u -i -t-"<initial description>" <file-name>
18949 \end_layout
18950
18951 \begin_layout Standard
18952 Read 
18953 \family typewriter
18954 man ci
18955 \family default
18956  to understand the switches.
18957  
18958 \end_layout
18959
18960 \begin_layout Subsubsection
18961
18962 \family sans
18963 Check In Changes
18964 \end_layout
18965
18966 \begin_layout Standard
18967 When you are finished editing a file, you check in your changes.
18968  When you do this, you are asked for a description of the changes.
18969  This is stored in the history log.
18970  The version number is bumped, your changes are applied to the master RCS
18971  file, the document is unlocked and set to Read-Only mode.
18972 \end_layout
18973
18974 \begin_layout Standard
18975 RCS command: 
18976 \family typewriter
18977 ci -q -u -m"<description>" <file-name>
18978 \end_layout
18979
18980 \begin_layout Subsubsection
18981
18982 \family sans
18983 Check Out For Edit
18984 \end_layout
18985
18986 \begin_layout Standard
18987 By doing this you lock the document so that only you can edit it.
18988  This will also make the document Read-Write only for you.
18989  You will usually continue editing for a while and when you are finished
18990  you check in your changes.
18991  The status line is changed to reflect that you have locked the file.
18992 \end_layout
18993
18994 \begin_layout Standard
18995 RCS command: 
18996 \family typewriter
18997 co -q -l <file-name>
18998 \end_layout
18999
19000 \begin_layout Subsubsection
19001
19002 \family sans
19003 Revert To Repository Version
19004 \end_layout
19005
19006 \begin_layout Standard
19007 This will discard all changes made to the document since the last check
19008  in.
19009  You get a warning before changes are discarded.
19010 \end_layout
19011
19012 \begin_layout Standard
19013 RCS command: 
19014 \family typewriter
19015 co -f -u<version> <file-name>
19016 \end_layout
19017
19018 \begin_layout Subsubsection
19019
19020 \family sans
19021 Copy
19022 \end_layout
19023
19024 \begin_layout Standard
19025 This will create a copy of the current document.
19026  Since RCS does not support copy operations natively, the version history
19027  is not preserved, and the copy is added as a new file.
19028  It requires a clean document without any changes since the last checkin.
19029  You are asked for a file name and a description of the copy operation.
19030  After that the copy is created, both locally and in the repository.
19031  If the parent directories of the copied and original document differ, all
19032  relative paths of included files of the copy are adjusted (like in 
19033 \family sans
19034 File\SpecialChar menuseparator
19035 Save As
19036 \family default
19037 \SpecialChar ldots
19038 ).
19039  Finally, the copy is loaded instead of the original document.
19040 \end_layout
19041
19042 \begin_layout Labeling
19043 \labelwidthstring 00.00.0000
19044 RCS
19045 \begin_inset space ~
19046 \end_inset
19047
19048 commands: 
19049 \begin_inset space ~
19050 \end_inset
19051
19052
19053 \begin_inset Newline newline
19054 \end_inset
19055
19056 Copy 
19057 \begin_inset Flex Code
19058 status collapsed
19059
19060 \begin_layout Plain Layout
19061
19062 \family typewriter
19063 \begin_inset Quotes eld
19064 \end_inset
19065
19066 <file-name>
19067 \begin_inset Quotes erd
19068 \end_inset
19069
19070
19071 \end_layout
19072
19073 \end_inset
19074
19075  to 
19076 \begin_inset Flex Code
19077 status collapsed
19078
19079 \begin_layout Plain Layout
19080
19081 \family typewriter
19082 \begin_inset Quotes eld
19083 \end_inset
19084
19085 <new-file-name>
19086 \begin_inset Quotes erd
19087 \end_inset
19088
19089
19090 \end_layout
19091
19092 \end_inset
19093
19094
19095 \begin_inset Newline newline
19096 \end_inset
19097
19098
19099 \begin_inset Flex Code
19100 status collapsed
19101
19102 \begin_layout Plain Layout
19103 ci -q -u 
19104 \family typewriter
19105 -i 
19106 \begin_inset Quotes eld
19107 \end_inset
19108
19109 <new-file-name>
19110 \begin_inset Quotes erd
19111 \end_inset
19112
19113
19114 \end_layout
19115
19116 \end_inset
19117
19118
19119 \end_layout
19120
19121 \begin_layout Subsubsection
19122
19123 \family sans
19124 Undo Last Checkin
19125 \end_layout
19126
19127 \begin_layout Standard
19128 This makes as if the last check in never happened.
19129  No changes are made to the document loaded into \SpecialChar LyX
19130 , but the last version
19131  is removed from the master RCS file.
19132 \end_layout
19133
19134 \begin_layout Standard
19135 RCS command: 
19136 \family typewriter
19137 rcs -o<version> <file-name>
19138 \end_layout
19139
19140 \begin_layout Subsubsection
19141
19142 \family sans
19143 Show History
19144 \end_layout
19145
19146 \begin_layout Standard
19147 This shows the complete history of the RCS document.
19148  The output of 
19149 \family typewriter
19150 rlog <file-name>
19151 \family default
19152  is shown in a browser.
19153  See 
19154 \family typewriter
19155 man rlog
19156 \family default
19157  for more info.
19158 \end_layout
19159
19160 \begin_layout Subsubsection
19161 Revision info
19162 \end_layout
19163
19164 \begin_layout Standard
19165 \SpecialChar LyX
19166  supports RCS version number, author name, date and time of last commit.
19167  All those are extracted from 
19168 \family typewriter
19169 rlog -r <file-name>
19170 \family default
19171 .
19172  See 
19173 \begin_inset CommandInset ref
19174 LatexCommand ref
19175 reference "subsec:VCS-Revision-Information"
19176
19177 \end_inset
19178
19179  for details.
19180 \end_layout
19181
19182 \begin_layout Subsection
19183 CVS commands in \SpecialChar LyX
19184
19185 \end_layout
19186
19187 \begin_layout Standard
19188 A subset of CVS operations is supported by \SpecialChar LyX
19189 .
19190  You can find the commands in the 
19191 \family sans
19192 File\SpecialChar menuseparator
19193 Version
19194 \begin_inset space ~
19195 \end_inset
19196
19197 Control
19198 \family default
19199  submenu.
19200  The version control system SVN is more powerful, so please use it instead
19201  of CVS if possible.
19202 \end_layout
19203
19204 \begin_layout Subsubsection
19205
19206 \family sans
19207 General CVS usage
19208 \end_layout
19209
19210 \begin_layout Standard
19211 If you start from scratch with CVS you have to create your repository and
19212  checkout the working copy with external tools.
19213  If you're using a client-server setup you may need to login before doing
19214  the first repository checkout.
19215 \end_layout
19216
19217 \begin_layout Standard
19218 If your documents are under revision control and others are using the same
19219  repository problems arise when different changes to the same document at
19220  the same location happen.
19221  Standard CVS repositories don't operate with a file locking mechanism.
19222  This may be surprising, but conflicts only occur if people disagree on
19223  the proper content of the same part of a document.
19224  So, if co-workers are used to communicate regularly, these conflicts occur
19225  rarely.
19226  If they don't communicate they have a fundamental problem anyway.
19227  Nevertheless some people like to work with so called 
19228 \begin_inset Quotes eld
19229 \end_inset
19230
19231 reserved checkouts
19232 \begin_inset Quotes erd
19233 \end_inset
19234
19235 .
19236  If they do so the working copy of all files is readonly when checked out
19237  first and the user starts editing after using a special command to make
19238  the working copy writable.
19239  When the changes are checked in the working copy returns to readonly state.
19240  With \SpecialChar LyX
19241  one has to edit the 
19242 \begin_inset Flex Code
19243 status collapsed
19244
19245 \begin_layout Plain Layout
19246 .cvsrc
19247 \end_layout
19248
19249 \end_inset
19250
19251  file and add the line 
19252 \begin_inset Flex Code
19253 status collapsed
19254
19255 \begin_layout Plain Layout
19256 cvs -r
19257 \end_layout
19258
19259 \end_inset
19260
19261  to work with reserved checkouts.
19262  The benefit is the possibility to see who is using a writable copy of some
19263  document.
19264  It's not guaranteed only one user makes a copy writable.
19265 \end_layout
19266
19267 \begin_layout Standard
19268 \SpecialChar LyX
19269  tries to guess if you're using reserved or non-reserved checkouts.
19270  If your working copy is readonly or it is writable and an additional copy
19271  of your document exists in the CVS/Base sub-directory a reserved otherwise
19272  a non-reserved checkout is assumed.
19273  When a reserved checkout is detected you have to use 
19274 \begin_inset Flex Noun
19275 status collapsed
19276
19277 \begin_layout Plain Layout
19278 Check Out
19279 \end_layout
19280
19281 \end_inset
19282
19283  to make your working copy writable if it's readonly.
19284  After doing so the 
19285 \begin_inset Flex Noun
19286 status collapsed
19287
19288 \begin_layout Plain Layout
19289 Check In
19290 \end_layout
19291
19292 \end_inset
19293
19294  operation is possible and that makes your working copy readonly again after
19295  transferring your changes to the repository.
19296 \end_layout
19297
19298 \begin_layout Standard
19299 More information about CVS can be found here 
19300 \begin_inset Flex URL
19301 status collapsed
19302
19303 \begin_layout Plain Layout
19304
19305 http://www.nongnu.org/cvs
19306 \end_layout
19307
19308 \end_inset
19309
19310  and here 
19311 \begin_inset Flex URL
19312 status collapsed
19313
19314 \begin_layout Plain Layout
19315
19316 http://ximbiot.com/cvs
19317 \end_layout
19318
19319 \end_inset
19320
19321 .
19322 \end_layout
19323
19324 \begin_layout Standard
19325 Read 
19326 \family typewriter
19327 man cvs
19328 \family default
19329  to understand the sub-commands and the switches mentioned below.
19330 \end_layout
19331
19332 \begin_layout Subsubsection
19333
19334 \family sans
19335 Register
19336 \end_layout
19337
19338 \begin_layout Standard
19339 If your document is not under revision control, this is the only item shown
19340  in the menu.
19341  And if it is under revision control, the 
19342 \family sans
19343 Register
19344 \family default
19345  item is not visible.
19346  
19347 \end_layout
19348
19349 \begin_layout Standard
19350 This command registers in CVS your document 
19351 \begin_inset Flex Strong
19352 status collapsed
19353
19354 \begin_layout Plain Layout
19355
19356 \emph on
19357 only
19358 \end_layout
19359
19360 \end_inset
19361
19362  in the case you have already the documents directory under CVS control
19363  (in particular 
19364 \family typewriter
19365 CVS/Entries
19366 \family default
19367  file exists).
19368  This means you have to create or checkout the archive by yourself using
19369  external tools.
19370  (In case you forget that step \SpecialChar LyX
19371  registers the document with RCS.)
19372 \end_layout
19373
19374 \begin_layout Standard
19375 Then you are asked interactively to supply an initial description of the
19376  document.
19377  Don't forget that registered file is not yet checked in.
19378 \end_layout
19379
19380 \begin_layout Standard
19381 CVS command that is run: 
19382 \family typewriter
19383 cvs -q add -m"<entered message>" "<file-name>"
19384 \end_layout
19385
19386 \begin_layout Standard
19387 The term 
19388 \family typewriter
19389 "<file-name>"
19390 \family default
19391  above and for all other CVS commands is an abbreviation for 
19392 \begin_inset Quotes eld
19393 \end_inset
19394
19395 change the current working directory to file location and use the file name
19396  without path component as argument
19397 \begin_inset Quotes erd
19398 \end_inset
19399
19400 .
19401 \end_layout
19402
19403 \begin_layout Subsubsection
19404
19405 \family sans
19406 Check In Changes
19407 \end_layout
19408
19409 \begin_layout Standard
19410 When you are finished editing a file, you commit your changes.
19411  When you do this and you had changed the document, you are asked for a
19412  description of the changes.
19413  After that changes are written to the repository.
19414  In case you didn't change the document and a reserved checkout is detected
19415  the reservation made on 
19416 \begin_inset Flex Noun
19417 status collapsed
19418
19419 \begin_layout Plain Layout
19420 Check Out
19421 \end_layout
19422
19423 \end_inset
19424
19425  is undone.
19426 \end_layout
19427
19428 \begin_layout Labeling
19429 \labelwidthstring 00.00.0000
19430 CVS
19431 \begin_inset space ~
19432 \end_inset
19433
19434 command: 
19435 \begin_inset space ~
19436 \end_inset
19437
19438
19439 \begin_inset Newline newline
19440 \end_inset
19441
19442
19443 \begin_inset Flex Code
19444 status collapsed
19445
19446 \begin_layout Plain Layout
19447 cvs 
19448 \family typewriter
19449 -q commit -m"<description>" "<file-name>"
19450 \end_layout
19451
19452 \end_inset
19453
19454  or
19455 \begin_inset Newline newline
19456 \end_inset
19457
19458
19459 \begin_inset Flex Code
19460 status collapsed
19461
19462 \begin_layout Plain Layout
19463 cvs -q unedit 
19464 \family typewriter
19465 "<file-name>"
19466 \end_layout
19467
19468 \end_inset
19469
19470
19471 \end_layout
19472
19473 \begin_layout Subsubsection
19474
19475 \family sans
19476 Check Out Changes
19477 \end_layout
19478
19479 \begin_layout Standard
19480 When you are sharing a repository with others, you may have to incorporate
19481  their changes into your working copy.
19482 \end_layout
19483
19484 \begin_layout Standard
19485 CVS command: 
19486 \family typewriter
19487 cvs -q update "<file-name>"
19488 \end_layout
19489
19490 \begin_layout Standard
19491 If a readonly checkout is detected the working copy is made writable and
19492  reserved.
19493 \end_layout
19494
19495 \begin_layout Standard
19496 CVS command: 
19497 \family typewriter
19498 cvs -q edit "<file-name>"
19499 \end_layout
19500
19501 \begin_layout Subsubsection
19502
19503 \family sans
19504 Revert To Repository Version
19505 \end_layout
19506
19507 \begin_layout Standard
19508 This will discard all changes made to the document since the last check
19509  in.
19510  You get a warning before changes are discarded.
19511  Firstly the file is deleted, secondly CVS update command is run.
19512 \end_layout
19513
19514 \begin_layout Standard
19515 CVS command: 
19516 \family typewriter
19517 cvs -q update "<file-name>"
19518 \end_layout
19519
19520 \begin_layout Standard
19521 If a reserved checkout is detected and the working copy has no changes only
19522  the reservation is undone.
19523 \end_layout
19524
19525 \begin_layout Standard
19526 CVS command: 
19527 \family typewriter
19528 cvs -q unedit "<file-name>"
19529 \end_layout
19530
19531 \begin_layout Subsubsection
19532
19533 \family sans
19534 Copy
19535 \end_layout
19536
19537 \begin_layout Standard
19538 This will create a copy of the current document.
19539  Since CVS does not support copy operations natively, the version history
19540  is not preserved, and the copy is added as a new file.
19541  It requires a clean document without any changes since the last checkin.
19542  You are asked for a file name and a description of the copy operation.
19543  After that the copy is created, both locally and in the repository.
19544  If the parent directories of the copied and original document differ, all
19545  relative paths of included files of the copy are adjusted (like in 
19546 \family sans
19547 File\SpecialChar menuseparator
19548 Save As
19549 \family default
19550 \SpecialChar ldots
19551 ).
19552  Finally, the copy is loaded instead of the original document.
19553 \end_layout
19554
19555 \begin_layout Labeling
19556 \labelwidthstring 00.00.0000
19557 CVS
19558 \begin_inset space ~
19559 \end_inset
19560
19561 commands: 
19562 \begin_inset space ~
19563 \end_inset
19564
19565
19566 \begin_inset Newline newline
19567 \end_inset
19568
19569 Copy 
19570 \begin_inset Flex Code
19571 status collapsed
19572
19573 \begin_layout Plain Layout
19574
19575 \family typewriter
19576 \begin_inset Quotes eld
19577 \end_inset
19578
19579 <file-name>
19580 \begin_inset Quotes erd
19581 \end_inset
19582
19583
19584 \end_layout
19585
19586 \end_inset
19587
19588  to 
19589 \begin_inset Flex Code
19590 status collapsed
19591
19592 \begin_layout Plain Layout
19593
19594 \family typewriter
19595 \begin_inset Quotes eld
19596 \end_inset
19597
19598 <new-file-name>
19599 \begin_inset Quotes erd
19600 \end_inset
19601
19602
19603 \end_layout
19604
19605 \end_inset
19606
19607
19608 \begin_inset Newline newline
19609 \end_inset
19610
19611
19612 \begin_inset Flex Code
19613 status collapsed
19614
19615 \begin_layout Plain Layout
19616 cvs -q add 
19617 \family typewriter
19618
19619 \begin_inset Quotes eld
19620 \end_inset
19621
19622 <new-file-name>
19623 \begin_inset Quotes erd
19624 \end_inset
19625
19626
19627 \end_layout
19628
19629 \end_inset
19630
19631
19632 \end_layout
19633
19634 \begin_layout Subsubsection
19635
19636 \family sans
19637 Rename
19638 \end_layout
19639
19640 \begin_layout Standard
19641 This will rename the current document.
19642  Since CVS does not support rename operations natively, the version history
19643  is not preserved, the renamed document is added as a new file, and the
19644  original document is deleted.
19645  It requires a clean document without any changes since the last checkin.
19646  You are asked for a file name and a description of the rename operation.
19647  After that the document is renamed, both locally and in the repository.
19648  If the parent directories of the new and old file names differ, all relative
19649  paths of included files are adjusted (like in 
19650 \family sans
19651 File\SpecialChar menuseparator
19652 Save As
19653 \family default
19654 \SpecialChar ldots
19655 ).
19656  Finally, the document is reloaded using the new name.
19657 \end_layout
19658
19659 \begin_layout Labeling
19660 \labelwidthstring 00.00.0000
19661 CVS
19662 \begin_inset space ~
19663 \end_inset
19664
19665 commands: 
19666 \begin_inset space ~
19667 \end_inset
19668
19669
19670 \begin_inset Newline newline
19671 \end_inset
19672
19673 Rename 
19674 \begin_inset Flex Code
19675 status collapsed
19676
19677 \begin_layout Plain Layout
19678
19679 \family typewriter
19680 \begin_inset Quotes eld
19681 \end_inset
19682
19683 <file-name>
19684 \begin_inset Quotes erd
19685 \end_inset
19686
19687
19688 \end_layout
19689
19690 \end_inset
19691
19692  to 
19693 \begin_inset Flex Code
19694 status collapsed
19695
19696 \begin_layout Plain Layout
19697
19698 \family typewriter
19699 \begin_inset Quotes eld
19700 \end_inset
19701
19702 <new-file-name>
19703 \begin_inset Quotes erd
19704 \end_inset
19705
19706
19707 \end_layout
19708
19709 \end_inset
19710
19711
19712 \begin_inset Newline newline
19713 \end_inset
19714
19715
19716 \begin_inset Flex Code
19717 status collapsed
19718
19719 \begin_layout Plain Layout
19720 cvs -q add 
19721 \family typewriter
19722
19723 \begin_inset Quotes eld
19724 \end_inset
19725
19726 <new-file-name>
19727 \begin_inset Quotes erd
19728 \end_inset
19729
19730
19731 \end_layout
19732
19733 \end_inset
19734
19735
19736 \begin_inset Newline newline
19737 \end_inset
19738
19739
19740 \begin_inset Flex Code
19741 status collapsed
19742
19743 \begin_layout Plain Layout
19744 cvs -q remove 
19745 \family typewriter
19746
19747 \begin_inset Quotes eld
19748 \end_inset
19749
19750 <file-name>
19751 \begin_inset Quotes erd
19752 \end_inset
19753
19754
19755 \end_layout
19756
19757 \end_inset
19758
19759
19760 \end_layout
19761
19762 \begin_layout Subsubsection
19763 Update of the local directory checkout from repository
19764 \end_layout
19765
19766 \begin_layout Standard
19767 Once your documents gets more complex, containing sub-documents and pictures,
19768  including external 
19769 \begin_inset Flex Code
19770 status collapsed
19771
19772 \begin_layout Plain Layout
19773 .tex
19774 \end_layout
19775
19776 \end_inset
19777
19778  files and so on using version control becomes more complicated.
19779  \SpecialChar LyX
19780  supports updating the whole tree in which resides the document.
19781  This become especially useful once you cooperate with people which neither
19782  have detailed knowledge about CVS usage nor they have ambition to commit
19783  additional material to the repository.
19784  You have to organize the files structure so that all external files are
19785  in the same directory or subdirectories of the document.
19786  It's good practice anyway to store multipart documents in an extra directory.
19787 \end_layout
19788
19789 \begin_layout Standard
19790 The 
19791 \begin_inset Flex Code
19792 status collapsed
19793
19794 \begin_layout Plain Layout
19795 Update local directory from repository
19796 \end_layout
19797
19798 \end_inset
19799
19800  command updates the whole directory.
19801  If local changes are detected user is warned before update starts.
19802  In case of merge conflicts both versions of the conflicting document parts
19803  are placed in the final document.
19804  You have to review and correct the result of the merge.
19805  You'll find the conflicts enclosed in pairs of 
19806 \begin_inset Flex Code
19807 status collapsed
19808
19809 \begin_layout Plain Layout
19810 <<<<<<<
19811 \end_layout
19812
19813 \end_inset
19814
19815  and 
19816 \begin_inset Flex Code
19817 status collapsed
19818
19819 \begin_layout Plain Layout
19820 >>>>>>>
19821 \end_layout
19822
19823 \end_inset
19824
19825  separated by 
19826 \begin_inset Flex Code
19827 status collapsed
19828
19829 \begin_layout Plain Layout
19830 =======
19831 \end_layout
19832
19833 \end_inset
19834
19835 .
19836  The first part is your version as before the update operation with the
19837  document name prepended.
19838  The second one is the repository version with the version number after
19839  the sequence of 
19840 \begin_inset Flex Code
19841 status collapsed
19842
19843 \begin_layout Plain Layout
19844 >
19845 \end_layout
19846
19847 \end_inset
19848
19849  signs.
19850 \end_layout
19851
19852 \begin_layout Labeling
19853 \labelwidthstring 00.00.0000
19854 CVS
19855 \begin_inset space ~
19856 \end_inset
19857
19858 commands: 
19859 \begin_inset space ~
19860 \end_inset
19861
19862
19863 \begin_inset Newline newline
19864 \end_inset
19865
19866
19867 \begin_inset Flex Code
19868 status collapsed
19869
19870 \begin_layout Plain Layout
19871 cd $path; cvs diff 
19872 \family typewriter
19873 "."
19874 \end_layout
19875
19876 \end_inset
19877
19878  (Ask if changes are detected.)
19879 \begin_inset Newline newline
19880 \end_inset
19881
19882
19883 \begin_inset Flex Code
19884 status collapsed
19885
19886 \begin_layout Plain Layout
19887 cd $path; cvs -q update 
19888 \family typewriter
19889 "."
19890 \end_layout
19891
19892 \end_inset
19893
19894
19895 \end_layout
19896
19897 \begin_layout Standard
19898 where 
19899 \begin_inset Flex Code
19900 status collapsed
19901
19902 \begin_layout Plain Layout
19903 $path
19904 \end_layout
19905
19906 \end_inset
19907
19908  stands for the path to the document.
19909 \end_layout
19910
19911 \begin_layout Subsubsection
19912
19913 \family sans
19914 Show History
19915 \end_layout
19916
19917 \begin_layout Standard
19918 This shows the complete history of the CVS document.
19919  The output of 
19920 \family typewriter
19921 cvs log "<file-name>"
19922 \family default
19923  is shown in a browser.
19924 \end_layout
19925
19926 \begin_layout Subsubsection
19927 Revision info
19928 \end_layout
19929
19930 \begin_layout Standard
19931 \SpecialChar LyX
19932  supports CVS version number, author name, date and time of last commit.
19933  All those are extracted from 
19934 \family typewriter
19935 cvs log -r <file-name>
19936 \family default
19937 .
19938  See 
19939 \begin_inset CommandInset ref
19940 LatexCommand ref
19941 reference "subsec:VCS-Revision-Information"
19942
19943 \end_inset
19944
19945  for details.
19946 \end_layout
19947
19948 \begin_layout Subsection
19949 SVN commands in \SpecialChar LyX
19950
19951 \end_layout
19952
19953 \begin_layout Standard
19954 SVN is now partially supported by \SpecialChar LyX
19955 .
19956  You can find the commands in the 
19957 \family sans
19958 File\SpecialChar menuseparator
19959 Version
19960 \begin_inset space ~
19961 \end_inset
19962
19963 Control
19964 \family default
19965  submenu.
19966  Please note that if you use password protected access to repository via
19967  ssh, you will be asked in terminal window.
19968  \SpecialChar LyX
19969  was tested against SVN 1.5, 1.6, 1.7 and 1.8
19970 \begin_inset Foot
19971 status open
19972
19973 \begin_layout Plain Layout
19974 Most of the commands will work with 1.4 too, see 
19975 \begin_inset CommandInset ref
19976 LatexCommand ref
19977 reference "subsec:SVN-Repo-Update"
19978
19979 \end_inset
19980
19981 .
19982  There seems to be currently unresolved permissions problem under SVN 1.8
19983  with reverting changes when file is locked.
19984 \end_layout
19985
19986 \end_inset
19987
19988
19989 \end_layout
19990
19991 \begin_layout Subsubsection
19992
19993 \family sans
19994 Register
19995 \end_layout
19996
19997 \begin_layout Standard
19998 If your document is not under revision control, this is the only item shown
19999  in the menu.
20000  And if it is under revision control, the 
20001 \family sans
20002 Register
20003 \family default
20004  item is not visible.
20005 \end_layout
20006
20007 \begin_layout Standard
20008 This command registers in SVN your document ONLY in case you have already
20009  the documents directory under SVN control (in particular 
20010 \family typewriter
20011 .svn/entries
20012 \family default
20013  file exists).
20014  This means you have to checkout the archive by yourself.
20015 \end_layout
20016
20017 \begin_layout Standard
20018 Then you are asked interactively to supply an initial description of the
20019  document.
20020  Don't forget that registered file is not yet commited.
20021 \end_layout
20022
20023 \begin_layout Standard
20024 SVN command that is run: 
20025 \family typewriter
20026 svn add -q 
20027 \begin_inset Quotes eld
20028 \end_inset
20029
20030 <file-name>
20031 \begin_inset Quotes erd
20032 \end_inset
20033
20034
20035 \end_layout
20036
20037 \begin_layout Standard
20038 Read 
20039 \family typewriter
20040 man svn
20041 \family default
20042  to understand the switches.
20043 \end_layout
20044
20045 \begin_layout Subsubsection
20046
20047 \family sans
20048 Check In Changes
20049 \end_layout
20050
20051 \begin_layout Standard
20052 When you are finished editing a file, you commit your changes.
20053  When you do this, you are asked for a description of the changes.
20054  After that changes are commited.
20055 \end_layout
20056
20057 \begin_layout Standard
20058 SVN command:
20059 \begin_inset Foot
20060 status collapsed
20061
20062 \begin_layout Plain Layout
20063 In case locking is not enabled.
20064  See Section 
20065 \begin_inset CommandInset ref
20066 LatexCommand ref
20067 reference "subsec:SVN-File-Locking"
20068
20069 \end_inset
20070
20071 .
20072 \end_layout
20073
20074 \end_inset
20075
20076  
20077 \family typewriter
20078 svn commit -q -m"<description>" <file-name>
20079 \end_layout
20080
20081 \begin_layout Subsubsection
20082
20083 \family sans
20084 Check Out For Edit
20085 \end_layout
20086
20087 \begin_layout Standard
20088 Updates the changes of this file from the repository.
20089  Be sure you understand SVN merging and conflicts resolving before using
20090  this function, because all conflicts has to be resolved manually by you!
20091 \end_layout
20092
20093 \begin_layout Standard
20094 SVN command:
20095 \begin_inset Foot
20096 status collapsed
20097
20098 \begin_layout Plain Layout
20099 Ditto.
20100 \end_layout
20101
20102 \end_inset
20103
20104  
20105 \family typewriter
20106 svn update --non-interactive 
20107 \begin_inset Quotes eld
20108 \end_inset
20109
20110 <file-name>
20111 \begin_inset Quotes erd
20112 \end_inset
20113
20114
20115 \end_layout
20116
20117 \begin_layout Subsubsection
20118
20119 \family sans
20120 Revert To Repository Version
20121 \end_layout
20122
20123 \begin_layout Standard
20124 This will discard all changes made to the document since the last check
20125  in.
20126  You get a warning before changes are discarded.
20127 \end_layout
20128
20129 \begin_layout Standard
20130 SVN command: 
20131 \family typewriter
20132 svn revert -q 
20133 \begin_inset Quotes eld
20134 \end_inset
20135
20136 <file-name>
20137 \begin_inset Quotes erd
20138 \end_inset
20139
20140
20141 \end_layout
20142
20143 \begin_layout Subsubsection
20144
20145 \family sans
20146 Copy
20147 \end_layout
20148
20149 \begin_layout Standard
20150 This will create a copy of the current document including the version history.
20151  It requires a clean document without any changes since the last checkin.
20152  You are asked for a file name and a description of the copy operation.
20153  After that the copy is created, both locally and in the repository.
20154  If the parent directories of the copied and original document differ, all
20155  relative paths of included files of the copy are adjusted (like in 
20156 \family sans
20157 File\SpecialChar menuseparator
20158 Save As
20159 \family default
20160 \SpecialChar ldots
20161 ).
20162  Finally, the copy is loaded instead of the original document.
20163 \end_layout
20164
20165 \begin_layout Labeling
20166 \labelwidthstring 00.00.0000
20167 SVN
20168 \begin_inset space ~
20169 \end_inset
20170
20171 commands: 
20172 \begin_inset space ~
20173 \end_inset
20174
20175
20176 \begin_inset Newline newline
20177 \end_inset
20178
20179
20180 \begin_inset Flex Code
20181 status collapsed
20182
20183 \begin_layout Plain Layout
20184 svn copy -q 
20185 \family typewriter
20186
20187 \begin_inset Quotes eld
20188 \end_inset
20189
20190 <file-name>
20191 \begin_inset Quotes erd
20192 \end_inset
20193
20194  
20195 \begin_inset Quotes eld
20196 \end_inset
20197
20198 <new-file-name>
20199 \begin_inset Quotes erd
20200 \end_inset
20201
20202
20203 \end_layout
20204
20205 \end_inset
20206
20207
20208 \begin_inset Newline newline
20209 \end_inset
20210
20211
20212 \begin_inset Flex Code
20213 status collapsed
20214
20215 \begin_layout Plain Layout
20216 svn commit
20217 \end_layout
20218
20219 \end_inset
20220
20221
20222 \end_layout
20223
20224 \begin_layout Subsubsection
20225
20226 \family sans
20227 Rename
20228 \end_layout
20229
20230 \begin_layout Standard
20231 This will rename the current document including the version history.
20232  It requires a clean document without any changes since the last checkin.
20233  You are asked for a file name and a description of the rename operation.
20234  After that the document is renamed, both locally and in the repository.
20235  If the parent directories of the new and old file names differ, all relative
20236  paths of included files are adjusted (like in 
20237 \family sans
20238 File\SpecialChar menuseparator
20239 Save As
20240 \family default
20241 \SpecialChar ldots
20242 ).
20243  Finally, the document is reloaded using the new name.
20244 \end_layout
20245
20246 \begin_layout Labeling
20247 \labelwidthstring 00.00.0000
20248 SVN
20249 \begin_inset space ~
20250 \end_inset
20251
20252 commands: 
20253 \begin_inset space ~
20254 \end_inset
20255
20256
20257 \begin_inset Newline newline
20258 \end_inset
20259
20260
20261 \begin_inset Flex Code
20262 status collapsed
20263
20264 \begin_layout Plain Layout
20265 svn move -q 
20266 \family typewriter
20267
20268 \begin_inset Quotes eld
20269 \end_inset
20270
20271 <file-name>
20272 \begin_inset Quotes erd
20273 \end_inset
20274
20275  
20276 \begin_inset Quotes eld
20277 \end_inset
20278
20279 <new-file-name>
20280 \begin_inset Quotes erd
20281 \end_inset
20282
20283
20284 \end_layout
20285
20286 \end_inset
20287
20288
20289 \begin_inset Newline newline
20290 \end_inset
20291
20292
20293 \begin_inset Flex Code
20294 status collapsed
20295
20296 \begin_layout Plain Layout
20297 svn commit
20298 \end_layout
20299
20300 \end_inset
20301
20302
20303 \end_layout
20304
20305 \begin_layout Subsubsection
20306 \begin_inset CommandInset label
20307 LatexCommand label
20308 name "subsec:SVN-Repo-Update"
20309
20310 \end_inset
20311
20312 Update of the local directory checkout from repository
20313 \begin_inset Foot
20314 status collapsed
20315
20316 \begin_layout Plain Layout
20317 Note that this command will work only with subversion 
20318 \begin_inset Formula $\geqq1.5$
20319 \end_inset
20320
20321
20322 \end_layout
20323
20324 \end_inset
20325
20326
20327 \end_layout
20328
20329 \begin_layout Standard
20330 All the commands above have one shortcomming - they deal with the current
20331  document only.
20332  Once your document contains pictures, includes external 
20333 \begin_inset Flex Code
20334 status collapsed
20335
20336 \begin_layout Plain Layout
20337 .tex
20338 \end_layout
20339
20340 \end_inset
20341
20342  files and so on administration becomes more complicated.
20343  \SpecialChar LyX
20344  now supports updating the whole tree in which resides the document
20345 \begin_inset Foot
20346 status collapsed
20347
20348 \begin_layout Plain Layout
20349 One need to organize the files structure so that all external files are
20350  in the same directory or subdirectories of the document.
20351  
20352 \end_layout
20353
20354 \end_inset
20355
20356 .
20357  This become especially useful once you cooperate with people which neither
20358  know about subversion management nor they have ambition to commit additional
20359  material to the repository.
20360  
20361 \end_layout
20362
20363 \begin_layout Standard
20364 \begin_inset Flex Code
20365 status collapsed
20366
20367 \begin_layout Plain Layout
20368 Update local directory from repository
20369 \end_layout
20370
20371 \end_inset
20372
20373  command updates the whole directory and in case of merge conflicts local
20374  version of the files are left, so no unintended data loss occurs.
20375  If local changes are detected user is warned before update starts.
20376 \end_layout
20377
20378 \begin_layout Labeling
20379 \labelwidthstring 00.00.0000
20380 SVN
20381 \begin_inset space ~
20382 \end_inset
20383
20384 commands: 
20385 \begin_inset space ~
20386 \end_inset
20387
20388
20389 \begin_inset Newline newline
20390 \end_inset
20391
20392
20393 \begin_inset Flex Code
20394 status collapsed
20395
20396 \begin_layout Plain Layout
20397 svn diff $path
20398 \end_layout
20399
20400 \end_inset
20401
20402  (Ask if changes are detected.)
20403 \begin_inset Newline newline
20404 \end_inset
20405
20406
20407 \begin_inset Flex Code
20408 status collapsed
20409
20410 \begin_layout Plain Layout
20411 svn update –accept mine-full $path
20412 \end_layout
20413
20414 \end_inset
20415
20416
20417 \end_layout
20418
20419 \begin_layout Standard
20420 where 
20421 \begin_inset Flex Code
20422 status collapsed
20423
20424 \begin_layout Plain Layout
20425 $path
20426 \end_layout
20427
20428 \end_inset
20429
20430  stands for the path to the document.
20431 \end_layout
20432
20433 \begin_layout Subsubsection
20434
20435 \family sans
20436 Show History
20437 \end_layout
20438
20439 \begin_layout Standard
20440 This shows the complete history of the SVN document.
20441  The output of 
20442 \family typewriter
20443 svn log 
20444 \begin_inset Quotes eld
20445 \end_inset
20446
20447 <file-name>
20448 \begin_inset Quotes erd
20449 \end_inset
20450
20451
20452 \family default
20453  is shown in a browser.
20454 \end_layout
20455
20456 \begin_layout Subsubsection
20457 File Locking
20458 \begin_inset CommandInset label
20459 LatexCommand label
20460 name "subsec:SVN-File-Locking"
20461
20462 \end_inset
20463
20464
20465 \end_layout
20466
20467 \begin_layout Standard
20468 The file exchange through various revision control systems brings the problem
20469  of merge conflicts in case two different users try to edit the same (parts
20470  of) document.
20471  When such a conflict happens it needs manual resolving and one reasonable
20472  alternative is to provide some kind of locking mechanism, which guarantees
20473  that only one user is allowed to edit file at the given time.
20474 \end_layout
20475
20476 \begin_layout Standard
20477 SVN has two such mechanisms to provide mutual exclusivity for file access
20478  - locks and automatic setting of write permissions (see sec.
20479  
20480 \begin_inset CommandInset ref
20481 LatexCommand ref
20482 reference "subsec:Automatical-Locking-Property"
20483
20484 \end_inset
20485
20486 ) based on 
20487 \begin_inset Flex Code
20488 status collapsed
20489
20490 \begin_layout Plain Layout
20491 svn:needs-lock
20492 \end_layout
20493
20494 \end_inset
20495
20496  file svn property
20497 \begin_inset Foot
20498 status open
20499
20500 \begin_layout Plain Layout
20501 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20502 \end_layout
20503
20504 \end_inset
20505
20506 .
20507  If this property is detected for a given document \SpecialChar LyX
20508  starts to use SVN locks
20509  for document editing automatically and the whole check-in/out mechanism
20510  switches to the same regimen as for RCS.
20511  This in particular means there are two different modes of file use in \SpecialChar LyX
20512 :
20513 \end_layout
20514
20515 \begin_layout Itemize
20516 Unlocked state.
20517  The loaded file is in the read-only mode.
20518  For editing on needs to check-out.
20519  
20520 \emph on
20521 Check-out
20522 \emph default
20523  consists of updating from the repository and gaining write lock.
20524  If the lock is not possible to obtain, we remain in unlocked state.
20525 \end_layout
20526
20527 \begin_layout Itemize
20528 Locked state.
20529  The loaded file is in the 'normal' edit mode.
20530  No other user is allowed to edit the file.
20531  
20532 \emph on
20533 Check-in
20534 \emph default
20535  consists of commiting changes and releasing write-lock.
20536  If no changes have been made to the document, no commit will be produced
20537 \begin_inset Foot
20538 status collapsed
20539
20540 \begin_layout Plain Layout
20541 Don't be puzzled by the fact that you will be asked for commit message anyway.
20542 \end_layout
20543
20544 \end_inset
20545
20546  and only the write-lock will be released.
20547 \end_layout
20548
20549 \begin_layout Standard
20550 SVN commands:
20551 \end_layout
20552
20553 \begin_layout Labeling
20554 \labelwidthstring 00.00.0000
20555 Check-in:
20556 \family typewriter
20557  svn commit -q -m"<description>" "<file-name>"
20558 \begin_inset Newline newline
20559 \end_inset
20560
20561 svn unlock "<file-name>"
20562 \end_layout
20563
20564 \begin_layout Labeling
20565 \labelwidthstring 00.00.0000
20566 Check-out: 
20567 \family typewriter
20568 svn update "<file-name>"
20569 \begin_inset Newline newline
20570 \end_inset
20571
20572 svn lock "<file-name>"
20573 \end_layout
20574
20575 \begin_layout Subsubsection
20576
20577 \family typewriter
20578 \begin_inset CommandInset label
20579 LatexCommand label
20580 name "subsec:Automatical-Locking-Property"
20581
20582 \end_inset
20583
20584
20585 \family default
20586 Automatic Locking Property
20587 \end_layout
20588
20589 \begin_layout Standard
20590 The above mentioned automatic setting of write permissions of the .lyx file
20591  can be set through
20592 \family sans
20593  File\SpecialChar menuseparator
20594 Version
20595 \begin_inset space ~
20596 \end_inset
20597
20598 Control\SpecialChar menuseparator
20599 Toggle locking property
20600 \family default
20601 .
20602  This command is active only when the file is not locked on the svn server
20603  (i.e.
20604  you need to check-out before proceeding).
20605 \end_layout
20606
20607 \begin_layout Labeling
20608 \labelwidthstring 00.00.0000
20609 SVN
20610 \begin_inset space ~
20611 \end_inset
20612
20613 commands:
20614 \end_layout
20615
20616 \begin_layout Labeling
20617 \labelwidthstring 00.00.0000
20618 Set:
20619 \family typewriter
20620  svn propset svn:needs-lock ON "<file-name>"
20621 \end_layout
20622
20623 \begin_layout Labeling
20624 \labelwidthstring 00.00.0000
20625 Unset: 
20626 \family typewriter
20627 svn propdel svn:needs-lock "<file-name>"
20628 \end_layout
20629
20630 \begin_layout Subsubsection
20631 \begin_inset CommandInset label
20632 LatexCommand label
20633 name "subsec:VCS-Revision-Information"
20634
20635 \end_inset
20636
20637 Revision Information in Documents
20638 \end_layout
20639
20640 \begin_layout Standard
20641 There are more possibilities how to activate revision information in our
20642  document.
20643 \end_layout
20644
20645 \begin_layout Itemize
20646 \SpecialChar LyX
20647  supports directly:
20648 \begin_inset Separator latexpar
20649 \end_inset
20650
20651
20652 \end_layout
20653
20654 \begin_deeper
20655 \begin_layout Itemize
20656 tree revision information (
20657 \begin_inset Flex Code
20658 status collapsed
20659
20660 \begin_layout Plain Layout
20661 vcs-tree-revision
20662 \end_layout
20663
20664 \end_inset
20665
20666 ).
20667  The result is the output of the 
20668 \begin_inset Flex Code
20669 status collapsed
20670
20671 \begin_layout Plain Layout
20672 svnversion
20673 \end_layout
20674
20675 \end_inset
20676
20677  command, the following table gives you an idea, how to read the results.
20678 \end_layout
20679
20680 \begin_layout Standard
20681 \align center
20682 \begin_inset Tabular
20683 <lyxtabular version="3" rows="6" columns="2">
20684 <features tabularvalignment="middle">
20685 <column alignment="center" valignment="top">
20686 <column alignment="center" valignment="top">
20687 <row>
20688 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20689 \begin_inset Text
20690
20691 \begin_layout Plain Layout
20692 Output
20693 \end_layout
20694
20695 \end_inset
20696 </cell>
20697 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20698 \begin_inset Text
20699
20700 \begin_layout Plain Layout
20701 Meaning
20702 \end_layout
20703
20704 \end_inset
20705 </cell>
20706 </row>
20707 <row>
20708 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20709 \begin_inset Text
20710
20711 \begin_layout Plain Layout
20712 4123:4168
20713 \end_layout
20714
20715 \end_inset
20716 </cell>
20717 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20718 \begin_inset Text
20719
20720 \begin_layout Plain Layout
20721 mixed revision working copy
20722 \end_layout
20723
20724 \end_inset
20725 </cell>
20726 </row>
20727 <row>
20728 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20729 \begin_inset Text
20730
20731 \begin_layout Plain Layout
20732 4168M
20733 \end_layout
20734
20735 \end_inset
20736 </cell>
20737 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20738 \begin_inset Text
20739
20740 \begin_layout Plain Layout
20741 modified working copy
20742 \end_layout
20743
20744 \end_inset
20745 </cell>
20746 </row>
20747 <row>
20748 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20749 \begin_inset Text
20750
20751 \begin_layout Plain Layout
20752 4123S
20753 \end_layout
20754
20755 \end_inset
20756 </cell>
20757 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20758 \begin_inset Text
20759
20760 \begin_layout Plain Layout
20761 switched working copy
20762 \end_layout
20763
20764 \end_inset
20765 </cell>
20766 </row>
20767 <row>
20768 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20769 \begin_inset Text
20770
20771 \begin_layout Plain Layout
20772 4123P
20773 \end_layout
20774
20775 \end_inset
20776 </cell>
20777 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20778 \begin_inset Text
20779
20780 \begin_layout Plain Layout
20781 partial working copy, from a sparse checkout
20782 \end_layout
20783
20784 \end_inset
20785 </cell>
20786 </row>
20787 <row>
20788 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20789 \begin_inset Text
20790
20791 \begin_layout Plain Layout
20792 4123:4168MS
20793 \end_layout
20794
20795 \end_inset
20796 </cell>
20797 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20798 \begin_inset Text
20799
20800 \begin_layout Plain Layout
20801 mixed revision, modified, switched working copy
20802 \end_layout
20803
20804 \end_inset
20805 </cell>
20806 </row>
20807 </lyxtabular>
20808
20809 \end_inset
20810
20811
20812 \end_layout
20813
20814 \begin_layout Itemize
20815 file revision information.
20816  The result comes from parsing the output of 
20817 \begin_inset Flex Code
20818 status collapsed
20819
20820 \begin_layout Plain Layout
20821 svn
20822 \begin_inset space ~
20823 \end_inset
20824
20825 info
20826 \begin_inset space ~
20827 \end_inset
20828
20829 –xml
20830 \begin_inset space ~
20831 \end_inset
20832
20833 file.lyx
20834 \end_layout
20835
20836 \end_inset
20837
20838 .
20839  Supported flags are:
20840 \begin_inset Separator latexpar
20841 \end_inset
20842
20843
20844 \end_layout
20845
20846 \begin_deeper
20847 \begin_layout Itemize
20848 version number of the last commit (
20849 \begin_inset Flex Code
20850 status collapsed
20851
20852 \begin_layout Plain Layout
20853 vcs-revision
20854 \end_layout
20855
20856 \end_inset
20857
20858 )
20859 \end_layout
20860
20861 \begin_layout Itemize
20862 author of the last commit (
20863 \begin_inset Flex Code
20864 status collapsed
20865
20866 \begin_layout Plain Layout
20867 vcs-author
20868 \end_layout
20869
20870 \end_inset
20871
20872 )
20873 \end_layout
20874
20875 \begin_layout Itemize
20876 date of the last commit (
20877 \begin_inset Flex Code
20878 status collapsed
20879
20880 \begin_layout Plain Layout
20881 vcs-date
20882 \end_layout
20883
20884 \end_inset
20885
20886 )
20887 \end_layout
20888
20889 \begin_layout Itemize
20890 time of the last commit (
20891 \begin_inset Flex Code
20892 status collapsed
20893
20894 \begin_layout Plain Layout
20895 vcs-time
20896 \end_layout
20897
20898 \end_inset
20899
20900 )
20901 \end_layout
20902
20903 \end_deeper
20904 \begin_layout Standard
20905 You can obtain this info via InsetInfo (e.g.
20906  
20907 \begin_inset Flex Code
20908 status collapsed
20909
20910 \begin_layout Plain Layout
20911 info-insert buffer vcs-date
20912 \end_layout
20913
20914 \end_inset
20915
20916 ).
20917  The information will be available only when you have the file stored under
20918  svn managment (i.e.
20919  the 
20920 \begin_inset Flex Code
20921 status collapsed
20922
20923 \begin_layout Plain Layout
20924 .svn
20925 \end_layout
20926
20927 \end_inset
20928
20929  directory is available with your document).
20930 \end_layout
20931
20932 \end_deeper
20933 \begin_layout Itemize
20934 Another—a hacking one—possibility is to use svn keywords
20935 \begin_inset Foot
20936 status collapsed
20937
20938 \begin_layout Plain Layout
20939 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20940 \end_layout
20941
20942 \end_inset
20943
20944 .
20945  In short – you set file keywords property (e.g.
20946  
20947 \family sans
20948 svn propset svn:keywords 'Rev' file.lyx
20949 \family default
20950 ) and then paste keyword \SpecialChar TeX
20951  code
20952 \begin_inset Foot
20953 status collapsed
20954
20955 \begin_layout Plain Layout
20956 This is an easy way how to ensure that \SpecialChar LyX
20957  won't break the line in the middle
20958  of keyword tag.
20959 \end_layout
20960
20961 \end_inset
20962
20963  tag in your document (e.g.
20964  
20965 \begin_inset ERT
20966 status open
20967
20968 \begin_layout Plain Layout
20969
20970 $Rev$
20971 \end_layout
20972
20973 \end_inset
20974
20975 ).
20976  This way svn client will automatically substitute revision number (e.g.
20977  
20978 \begin_inset ERT
20979 status open
20980
20981 \begin_layout Plain Layout
20982
20983 $Rev: 59 $
20984 \end_layout
20985
20986 \end_inset
20987
20988 ) after each update and commit.
20989  There are more problems with this approach.
20990  Firstly, the '$' character is used in \SpecialChar TeX
20991  world for math equations, so any
20992  occurence of math formula 
20993 \begin_inset Formula $Rev$
20994 \end_inset
20995
20996  become 
20997 \begin_inset Formula $Rev:59$
20998 \end_inset
20999
21000  in your \SpecialChar LyX
21001  document.
21002  Similarly for other keywords like Id, Date, Author, etc.
21003  Secondly svn output is dependent on your locales, so its very easy that
21004  svn would produce some problematic strings once Date is used.
21005  Thirdly you get the whole 'Rev: 59' string in your document instead of
21006  the plain number.
21007  Until subversion implements user's custom keywords it will be hard to use
21008  this approach reliably or let \SpecialChar LyX
21009  to support it directly.
21010 \end_layout
21011
21012 \begin_layout Subsection
21013 SVN and Windows Environment
21014 \end_layout
21015
21016 \begin_layout Quote
21017 My inclination is to say that if the user cannot figure out the command
21018  line operations on their own fairly quickly, they would be well advised
21019  to use TortoiseSVN.
21020  —P.
21021  A.
21022  Rubin
21023 \end_layout
21024
21025 \begin_layout Subsubsection
21026 Preparation
21027 \end_layout
21028
21029 \begin_layout Standard
21030 In addition to installing \SpecialChar LyX
21031 , and having access to a Subversion repository,
21032  the user will need to install the Subversion client program.
21033  A Windows installer for the client program is available from 
21034 \begin_inset CommandInset href
21035 LatexCommand href
21036 name "CollabNet"
21037 target "http://www.collab.net/nonav/downloads/subversion/"
21038
21039 \end_inset
21040
21041 .
21042  The user may also want to install 
21043 \begin_inset CommandInset href
21044 LatexCommand href
21045 name "TortoiseSVN"
21046 target "http://tortoisesvn.tigris.org/"
21047
21048 \end_inset
21049
21050 , which integrates Subversion operations into the context (rightclick) menu
21051  of Windows Explorer.
21052  Operations done outside \SpecialChar LyX
21053  will typically be more convenient using the Explorer
21054  context menu.
21055  Note that TortoiseSVN is not a replacement for the client program, which
21056  is what \SpecialChar LyX
21057  itself will use.
21058 \end_layout
21059
21060 \begin_layout Subsubsection
21061 Bringing a document under Subversion control
21062 \end_layout
21063
21064 \begin_layout Standard
21065 Before a \SpecialChar LyX
21066  document can be brought under version control in Subversion, its
21067  parent directory needs to be under version control.
21068  If the document is being added to a project already in the repository,
21069  this is accomplished by checking the project out to the directory where
21070  the new document will be placed.
21071  If the project itself is not yet under version control (for instance, if
21072  this document starts a new project), the directory must be imported into
21073  the repository.
21074  This is done outside \SpecialChar LyX
21075 .
21076  Both import and checkout are easily accomplished from the Explorer context
21077  menu using TortoiseSVN, or alternatively can be done using the command
21078  line client at a DOS prompt.
21079  The procedure for importing the project using TortoiseSVN is described
21080  below, assuming an existing repository and a new project being started
21081  in 
21082 \family typewriter
21083 C:
21084 \backslash
21085 new project
21086 \family default
21087 .
21088  For information on using the Subversion client program, run 
21089 \family typewriter
21090 svn --help 
21091 \family default
21092 in a DOS shell.
21093 \end_layout
21094
21095 \begin_layout Enumerate
21096 Locate 
21097 \family typewriter
21098 C:
21099 \backslash
21100 new project 
21101 \family default
21102 in Windows Explorer, right click it, and select 
21103 \family sans
21104 TortoiseSVN\SpecialChar menuseparator
21105 Repo-browser
21106 \family default
21107 .
21108  If necessary, adjust the URL for the repository, then click OK.
21109 \end_layout
21110
21111 \begin_layout Enumerate
21112 Right click the level of the repository under which you want to place the
21113  new project folder (typically the top level) and click 
21114 \family sans
21115 Create folder
21116 \family default
21117  Supply a name for the project folder and click OK.
21118  Add a message for the log file if desired, then click OK again.
21119  The new project folder should appear in the repository.
21120  Finally, click OK again to exit the repository browser.
21121 \end_layout
21122
21123 \begin_layout Enumerate
21124 Once again right click 
21125 \family typewriter
21126 C:
21127 \backslash
21128 new project
21129 \family default
21130 , this time selecting SVN Checkout\SpecialChar ldots
21131  Select the URL of the project folder
21132  you just created in the repository, and set the checkout directory to 
21133 \family typewriter
21134 C:
21135 \backslash
21136 new project.
21137
21138 \family default
21139  Click OK.
21140  You will be warned about a non-empty folder; click OK to proceed.
21141  You should now have a 
21142 \family typewriter
21143 .svn
21144 \family default
21145  directory under 
21146 \family typewriter
21147 C:
21148 \backslash
21149 new project.
21150 \end_layout
21151
21152 \begin_layout Enumerate
21153 Create or open your document in \SpecialChar LyX
21154  and click 
21155 \family sans
21156 File\SpecialChar menuseparator
21157 Version
21158 \begin_inset space ~
21159 \end_inset
21160
21161 Control\SpecialChar menuseparator
21162 Register.
21163  
21164 \family default
21165 Add a log message and click OK to commit the document to version control.
21166 \end_layout
21167
21168 \begin_layout Standard
21169 From this point onward, you should have full functionality in the 
21170 \family sans
21171 File\SpecialChar menuseparator
21172 Version
21173 \begin_inset space ~
21174 \end_inset
21175
21176 Control
21177 \family default
21178  menu.
21179  You also have the option of checking the document in and out, viewing its
21180  history, etc.
21181  using the TortoiseSVN context menu in Windows Explorer or the Subversion
21182  client program from a command prompt.
21183 \end_layout
21184
21185 \begin_layout Subsubsection
21186 SSH tunnel used with SVN under Windows
21187 \end_layout
21188
21189 \begin_layout Standard
21190 Compared with Linux setting up an svn client to communicate over ssh under
21191  Windows is a rather troublesome task.
21192  We will at least offer some hints how to setup the client side but prior
21193  knowledge about ssh and the Windows command line is needed, also be prepared
21194  for a great deal of frustration\SpecialChar ldots
21195
21196 \end_layout
21197
21198 \begin_layout Enumerate
21199 Get an svn client for windows, as described in the previous sections.
21200  When it is a fresh install run some svn command (e.g.
21201  
21202 \begin_inset Flex Code
21203 status collapsed
21204
21205 \begin_layout Plain Layout
21206 svn –version
21207 \end_layout
21208
21209 \end_inset
21210
21211 ) to create config files, which you will need to change later on.
21212 \end_layout
21213
21214 \begin_layout Enumerate
21215 Choose an ssh client for Windows.
21216  There are several possibilities, we will use the one from Putty tools
21217 \begin_inset Foot
21218 status collapsed
21219
21220 \begin_layout Plain Layout
21221 \begin_inset Flex URL
21222 status collapsed
21223
21224 \begin_layout Plain Layout
21225
21226 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21227 \end_layout
21228
21229 \end_inset
21230
21231
21232 \end_layout
21233
21234 \end_inset
21235
21236 .
21237  You will need to set the connection up so that the client doesn't ask for
21238  any password from you.
21239  To keep things easy we will use only keys without any additional password
21240  protection etc.
21241 \begin_inset Separator latexpar
21242 \end_inset
21243
21244
21245 \end_layout
21246
21247 \begin_deeper
21248 \begin_layout Enumerate
21249 Generate keys by 
21250 \begin_inset Flex Code
21251 status collapsed
21252
21253 \begin_layout Plain Layout
21254 puttygen
21255 \end_layout
21256
21257 \end_inset
21258
21259 .
21260  Save your private .ppk key file and put the public one on the server side.
21261  If the SVN server runs on Linux, note that the format of the public key
21262  is not compatible with Linux openssh and you will need to direcly copy-paste
21263  the key from the “
21264 \emph on
21265 Public key for pasting into OpenSSH authorized_keys file
21266 \emph default
21267 :” edit field into the server's 
21268 \begin_inset Flex Code
21269 status collapsed
21270
21271 \begin_layout Plain Layout
21272 ~/.ssh/authorized_keys
21273 \end_layout
21274
21275 \end_inset
21276
21277  / 
21278 \begin_inset Flex Code
21279 status collapsed
21280
21281 \begin_layout Plain Layout
21282 authorized_keys2
21283 \end_layout
21284
21285 \end_inset
21286
21287  file.
21288 \end_layout
21289
21290 \begin_layout Enumerate
21291 Get the Putty's 
21292 \begin_inset Flex Code
21293 status collapsed
21294
21295 \begin_layout Plain Layout
21296 plink
21297 \end_layout
21298
21299 \end_inset
21300
21301 .
21302  In the SVN config file
21303 \begin_inset Foot
21304 status collapsed
21305
21306 \begin_layout Plain Layout
21307 Exact path depends on Windows version, usually somewhere around 
21308 \begin_inset Flex Code
21309 status collapsed
21310
21311 \begin_layout Plain Layout
21312 c:
21313 \backslash
21314 Documents and Settings
21315 \backslash
21316 user
21317 \backslash
21318 Application Data
21319 \backslash
21320 Subversion
21321 \backslash
21322 config
21323 \end_layout
21324
21325 \end_inset
21326
21327  / 
21328 \begin_inset Flex Code
21329 status collapsed
21330
21331 \begin_layout Plain Layout
21332 AppData
21333 \backslash
21334 Roaming
21335 \backslash
21336 Subversion
21337 \end_layout
21338
21339 \end_inset
21340
21341 .
21342 \end_layout
21343
21344 \end_inset
21345
21346 , section [tunnels], setup ssh command, e.g.
21347  
21348 \begin_inset Flex Code
21349 status collapsed
21350
21351 \begin_layout Plain Layout
21352 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21353 \end_layout
21354
21355 \end_inset
21356
21357 .
21358 \begin_inset Foot
21359 status collapsed
21360
21361 \begin_layout Plain Layout
21362 It will usually take a lot of time to get exact command right and it depends
21363  on many things.
21364  For example do not have some remote server saved as a default session in
21365  Putty etc.
21366  If things fail, try to connect via plink without SVN first.
21367 \end_layout
21368
21369 \end_inset
21370
21371
21372 \end_layout
21373
21374 \end_deeper
21375 \begin_layout Enumerate
21376 Checkout the SVN archive, e.
21377 \begin_inset space \thinspace{}
21378 \end_inset
21379
21380 g.
21381 \begin_inset Newline newline
21382 \end_inset
21383
21384
21385 \begin_inset Flex Code
21386 status collapsed
21387
21388 \begin_layout Plain Layout
21389 svn co svn+ssh://user@server/repository_path
21390 \end_layout
21391
21392 \end_inset
21393
21394 .
21395 \end_layout
21396
21397 \begin_layout Subsubsection
21398 End-of-Line Conversions
21399 \end_layout
21400
21401 \begin_layout Standard
21402 When the collaborators are mixing Linux and Windows environments, \SpecialChar LyX
21403  will
21404  use different line endings inside the .lyx files.
21405  This is not a problem as far as \SpecialChar LyX
21406  functionality is concerned, but the commit
21407  diffs will be huge and merge-conflicts prone.
21408  Fortunately SVN itself knows
21409 \begin_inset Foot
21410 status collapsed
21411
21412 \begin_layout Plain Layout
21413 \begin_inset Flex URL
21414 status collapsed
21415
21416 \begin_layout Plain Layout
21417
21418 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21419 \end_layout
21420
21421 \end_inset
21422
21423
21424 \end_layout
21425
21426 \end_inset
21427
21428  how to deal with CR/LF problems when switching .lyx files to the 
21429 \begin_inset Flex Code
21430 status collapsed
21431
21432 \begin_layout Plain Layout
21433 native
21434 \end_layout
21435
21436 \end_inset
21437
21438  mode.
21439 \begin_inset Foot
21440 status collapsed
21441
21442 \begin_layout Plain Layout
21443 For the lazy guys: 
21444 \begin_inset Flex Code
21445 status collapsed
21446
21447 \begin_layout Plain Layout
21448 svn propset svn:eol-style native FILE_NAME
21449 \end_layout
21450
21451 \end_inset
21452
21453
21454 \end_layout
21455
21456 \end_inset
21457
21458
21459 \end_layout
21460
21461 \begin_layout Subsection
21462 GIT commands in \SpecialChar LyX
21463
21464 \end_layout
21465
21466 \begin_layout Standard
21467 A minimal subset of GIT commands is now supported by \SpecialChar LyX
21468 .
21469  You can find the commands in the 
21470 \family sans
21471 File\SpecialChar menuseparator
21472 Version
21473 \begin_inset space ~
21474 \end_inset
21475
21476 Control
21477 \family default
21478  submenu.
21479  Please note that if you use password protected access to repository via
21480  ssh, you will be asked in terminal window.
21481  \SpecialChar LyX
21482  was tested against GIT 1.7.
21483 \begin_inset Foot
21484 status open
21485
21486 \begin_layout Plain Layout
21487 Windows users please note that you need to ensure that git is on the path.
21488  This can be set from within \SpecialChar LyX
21489  at 
21490 \family sans
21491 Tools\SpecialChar menuseparator
21492 Preferences\SpecialChar menuseparator
21493 Paths\SpecialChar menuseparator
21494 PATH prefix
21495 \family default
21496 .
21497 \end_layout
21498
21499 \end_inset
21500
21501
21502 \end_layout
21503
21504 \begin_layout Standard
21505 One big difference of GIT and the other supported version control systems
21506  is the distributed nature of GIT: With traditional version control systems
21507  there is one central server which hosts the repository.
21508  Users commit their changes to the server, and get updates made by other
21509  users from it.
21510  With GIT, users commit to a local repository.
21511  The local repository can be synchronized with one or more remote repositories
21512  using the 
21513 \begin_inset Flex Code
21514 status collapsed
21515
21516 \begin_layout Plain Layout
21517 pull
21518 \end_layout
21519
21520 \end_inset
21521
21522  and 
21523 \begin_inset Flex Code
21524 status collapsed
21525
21526 \begin_layout Plain Layout
21527 push
21528 \end_layout
21529
21530 \end_inset
21531
21532  GIT commands.
21533  \SpecialChar LyX
21534  does not interact in any way with remote GIT repositories.
21535  It works exclusively with the local repository in a very similar way as
21536  with a central CVS or SVN repository.
21537  If you use remote GIT repositories you need to do the 
21538 \begin_inset Flex Code
21539 status collapsed
21540
21541 \begin_layout Plain Layout
21542 pull
21543 \end_layout
21544
21545 \end_inset
21546
21547  and 
21548 \begin_inset Flex Code
21549 status collapsed
21550
21551 \begin_layout Plain Layout
21552 push
21553 \end_layout
21554
21555 \end_inset
21556
21557  operations with your favourite GIT client.
21558 \end_layout
21559
21560 \begin_layout Subsubsection
21561
21562 \family sans
21563 Register
21564 \end_layout
21565
21566 \begin_layout Standard
21567 If your document is not under revision control, this is the only item shown
21568  in the menu.
21569  And if it is under revision control, the 
21570 \family sans
21571 Register
21572 \family default
21573  item is not visible.
21574 \end_layout
21575
21576 \begin_layout Standard
21577 This command registers in GIT your document ONLY in case you have already
21578  the documents directory under GIT control (in particular 
21579 \family typewriter
21580 .git/index
21581 \family default
21582  file exists).
21583  This means you have to checkout the archive by yourself.
21584 \end_layout
21585
21586 \begin_layout Standard
21587 Then you are asked interactively to supply an initial description of the
21588  document.
21589  Don't forget that registered file is not yet commited.
21590 \end_layout
21591
21592 \begin_layout Standard
21593 GIT command that is run: 
21594 \family typewriter
21595 git add 
21596 \begin_inset Quotes eld
21597 \end_inset
21598
21599 <file-name>
21600 \begin_inset Quotes erd
21601 \end_inset
21602
21603
21604 \end_layout
21605
21606 \begin_layout Standard
21607 Read 
21608 \family typewriter
21609 man git
21610 \family default
21611  to understand the switches.
21612 \end_layout
21613
21614 \begin_layout Subsubsection
21615
21616 \family sans
21617 Check In Changes
21618 \end_layout
21619
21620 \begin_layout Standard
21621 When you are finished editing a file, you commit your changes.
21622  When you do this, you are asked for a description of the changes.
21623  After that changes are commited.
21624 \end_layout
21625
21626 \begin_layout Standard
21627 GIT command: 
21628 \family typewriter
21629 git commit -q -m"<description>" <file-name>
21630 \end_layout
21631
21632 \begin_layout Subsubsection
21633
21634 \family sans
21635 Revert To Repository Version
21636 \end_layout
21637
21638 \begin_layout Standard
21639 This will discard all changes made to the document since the last check
21640  in.
21641  You get a warning before changes are discarded.
21642 \end_layout
21643
21644 \begin_layout Standard
21645 GIT command: 
21646 \family typewriter
21647 git checkout -q 
21648 \begin_inset Quotes eld
21649 \end_inset
21650
21651 <file-name>
21652 \begin_inset Quotes erd
21653 \end_inset
21654
21655
21656 \end_layout
21657
21658 \begin_layout Subsubsection
21659
21660 \family sans
21661 Rename
21662 \end_layout
21663
21664 \begin_layout Standard
21665 This will rename the current document including the version history.
21666  It requires a clean document without any changes since the last checkin.
21667  You are asked for a file name and a description of the rename operation.
21668  After that the document is renamed, both locally and in the repository.
21669  If the parent directories of the new and old file names differ, all relative
21670  paths of included files are adjusted (like in 
21671 \family sans
21672 File\SpecialChar menuseparator
21673 Save As
21674 \family default
21675 \SpecialChar ldots
21676 ).
21677  Finally, the document is reloaded using the new name.
21678 \end_layout
21679
21680 \begin_layout Labeling
21681 \labelwidthstring 00.00.0000
21682 GIT
21683 \begin_inset space ~
21684 \end_inset
21685
21686 commands: 
21687 \begin_inset space ~
21688 \end_inset
21689
21690
21691 \begin_inset Newline newline
21692 \end_inset
21693
21694
21695 \begin_inset Flex Code
21696 status collapsed
21697
21698 \begin_layout Plain Layout
21699 git mv 
21700 \family typewriter
21701
21702 \begin_inset Quotes eld
21703 \end_inset
21704
21705 <file-name>
21706 \begin_inset Quotes erd
21707 \end_inset
21708
21709  
21710 \begin_inset Quotes eld
21711 \end_inset
21712
21713 <new-file-name>
21714 \begin_inset Quotes erd
21715 \end_inset
21716
21717
21718 \end_layout
21719
21720 \end_inset
21721
21722
21723 \begin_inset Newline newline
21724 \end_inset
21725
21726
21727 \begin_inset Flex Code
21728 status collapsed
21729
21730 \begin_layout Plain Layout
21731 git commit
21732 \end_layout
21733
21734 \end_inset
21735
21736
21737 \end_layout
21738
21739 \begin_layout Subsubsection
21740
21741 \family sans
21742 Show History
21743 \end_layout
21744
21745 \begin_layout Standard
21746 This shows the complete history of the GIT document.
21747  The output of 
21748 \family typewriter
21749 git log 
21750 \begin_inset Quotes eld
21751 \end_inset
21752
21753 <file-name>
21754 \begin_inset Quotes erd
21755 \end_inset
21756
21757
21758 \family default
21759  is shown in a browser.
21760 \end_layout
21761
21762 \begin_layout Subsubsection
21763 Version Info
21764 \end_layout
21765
21766 \begin_layout Standard
21767 \SpecialChar LyX
21768  supports GIT hash number of the last commit to the file, author name, date
21769  and time of last commit.
21770  All those are extracted from 
21771 \family typewriter
21772 git log -n 1 --pretty=format:%H%n%an%n%ai
21773 \family default
21774 .
21775  Tree version information is obtained via 
21776 \family typewriter
21777 git describe --abbrev --dirty --long
21778 \family default
21779 .
21780  See 
21781 \begin_inset CommandInset ref
21782 LatexCommand ref
21783 reference "subsec:VCS-Revision-Information"
21784
21785 \end_inset
21786
21787  for other details.
21788 \end_layout
21789
21790 \begin_layout Subsection
21791 Further tuning
21792 \end_layout
21793
21794 \begin_layout Standard
21795 With the recent addition of the vc-command function \SpecialChar LyX
21796  power users are allowed
21797  to create their own commands for revision control.
21798 \end_layout
21799
21800 \begin_layout Standard
21801 As an example you can see how two TortoiseSVN commands could be integrated
21802  directly:
21803 \end_layout
21804
21805 \begin_layout Description
21806 Commit: 
21807 \begin_inset Flex Code
21808 status collapsed
21809
21810 \begin_layout Plain Layout
21811 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21812 \end_layout
21813
21814 \end_inset
21815
21816
21817 \end_layout
21818
21819 \begin_layout Description
21820 Revert: 
21821 \begin_inset Flex Code
21822 status collapsed
21823
21824 \begin_layout Plain Layout
21825 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21826 \end_layout
21827
21828 \end_inset
21829
21830
21831 \end_layout
21832
21833 \begin_layout Subsection
21834 Version control and Document comparison
21835 \end_layout
21836
21837 \begin_layout Standard
21838 One of the typical uses of version control is to inspect the changes between
21839  revisions, usually by creating 
21840 \begin_inset Flex Code
21841 status collapsed
21842
21843 \begin_layout Plain Layout
21844 diff
21845 \end_layout
21846
21847 \end_inset
21848
21849  dumps.
21850  While this is useful for plain text files, it is much less useful in the
21851  case of \SpecialChar LyX
21852  files, which have more a complicated structure.
21853  Hence we provide binding to the Document comparison feature.
21854  There are two ways of calling this feature - either by direct call of 
21855 \begin_inset Flex Code
21856 status collapsed
21857
21858 \begin_layout Plain Layout
21859 VC_COMPARE
21860 \end_layout
21861
21862 \end_inset
21863
21864  \SpecialChar LyX
21865  function (for details see \SpecialChar LyX
21866  functions manual) or by icon/menu item 
21867 \begin_inset Flex Noun
21868 status collapsed
21869
21870 \begin_layout Plain Layout
21871 Compare with older revision...
21872 \end_layout
21873
21874 \end_inset
21875
21876 .
21877  One can either compare two chosen revisions of the document or he can simply
21878  compare the current version of edited text with older revisions (where
21879  '
21880 \begin_inset Flex Noun
21881 status collapsed
21882
21883 \begin_layout Plain Layout
21884 0
21885 \end_layout
21886
21887 \end_inset
21888
21889 ' revisions back means comparison of the edited file with last commited
21890  revision).
21891  
21892 \end_layout
21893
21894 \begin_layout Standard
21895 This feature is supported for SVN and RCS though due to the more complicated
21896  versioning scheme of RCS there is a constraint – when addressing the revisions
21897  in dialog, numbers always point to the last number in RCS revision number,
21898  i.e.
21899  '35' in '1.2.35'.
21900  We don't currently support GIT addressing of revisions, one can just compare
21901  edited document with its revision X steps backs, where X is addressed as
21902  HEAD~X.
21903 \end_layout
21904
21905 \begin_layout Section
21906 Literate Programming
21907 \end_layout
21908
21909 \begin_layout Standard
21910 Updated by 
21911 \noun on
21912 Kayvan Sylvan 
21913 \noun default
21914 (kayvan@sylvan.com)
21915 \noun on
21916
21917 \noun default
21918 original documentation written by 
21919 \noun on
21920 Edmar Wienskoski Jr.
21921
21922 \noun default
21923  (edmar-w-jr@technologist.com)
21924 \end_layout
21925
21926 \begin_layout Subsection
21927 Introduction
21928 \end_layout
21929
21930 \begin_layout Standard
21931 The main purpose of this documentation is to show you how to use \SpecialChar LyX
21932  for literate
21933  programming, where it is assumed that you are familiar with this programming
21934  technique, and know what 
21935 \begin_inset Quotes eld
21936 \end_inset
21937
21938 tangling
21939 \begin_inset Quotes erd
21940 \end_inset
21941
21942  and 
21943 \begin_inset Quotes eld
21944 \end_inset
21945
21946 weaving
21947 \begin_inset Quotes erd
21948 \end_inset
21949
21950  means.
21951  If that is not the case, please follow the web links provided in the following
21952  sections.
21953  There is a lot of good documentation out there covering old development
21954  history to the latest tools tips.
21955 \end_layout
21956
21957 \begin_layout Standard
21958 It is also assumed that you are familiar with \SpecialChar LyX
21959  itself to a point that you
21960  are comfortable changing your \SpecialChar LyX
21961  preferences, and X resources file.
21962  If that is not the case please refer to other \SpecialChar LyX
21963  documentation to cover your
21964  specific needs.
21965 \end_layout
21966
21967 \begin_layout Subsection
21968 Literate Programming
21969 \end_layout
21970
21971 \begin_layout Standard
21972 From the Literate Programming FAQ: 
21973 \end_layout
21974
21975 \begin_layout Quotation
21976 Literate programming is the combination of documentation and source together
21977  in a fashion suited for reading by human beings.
21978  In fact, literate programs should be enjoyable reading, even inviting!
21979  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21980  and documentation in a single file.
21981  Literate programming tools then parse the file to produce either readable
21982  documentation or compilable source.
21983  The WEB style of literate programming was created by D.
21984 \begin_inset space \thinspace{}
21985 \end_inset
21986
21987 E.
21988  Knuth during the development of his \SpecialChar TeX
21989  typesetting software.
21990  
21991 \end_layout
21992
21993 \begin_layout Standard
21994 Another excerpt says:
21995 \end_layout
21996
21997 \begin_layout Quotation
21998
21999 \emph on
22000 How is literate programming different from verbose commenting?
22001 \end_layout
22002
22003 \begin_layout Quotation
22004 There are three distinguishing characteristics.
22005  In order of importance, they are: 
22006 \begin_inset Separator latexpar
22007 \end_inset
22008
22009
22010 \end_layout
22011
22012 \begin_deeper
22013 \begin_layout Itemize
22014 flexible order of elaboration 
22015 \end_layout
22016
22017 \begin_layout Itemize
22018 automatic support for browsing 
22019 \end_layout
22020
22021 \begin_layout Itemize
22022 typeset documentation, especially diagrams and mathematics 
22023 \end_layout
22024
22025 \end_deeper
22026 \begin_layout Standard
22027 Now that I sparked your curiosity, take a look in the references.
22028 \end_layout
22029
22030 \begin_layout Subsubsection
22031 References
22032 \end_layout
22033
22034 \begin_layout Standard
22035 The complete Literate Programming FAQ can be found at:
22036 \end_layout
22037
22038 \begin_layout Quote
22039 Literate Programming FAQ 
22040 \begin_inset Flex URL
22041 status collapsed
22042
22043 \begin_layout Plain Layout
22044
22045 http://www.literateprogramming.com/lpfaq.pdf
22046 \end_layout
22047
22048 \end_inset
22049
22050
22051 \end_layout
22052
22053 \begin_layout Standard
22054 The FAQ lists 23 (twenty three!) different literate programming tools.
22055  Where some are specialized or 
22056 \begin_inset Quotes eld
22057 \end_inset
22058
22059 tailored
22060 \begin_inset Quotes erd
22061 \end_inset
22062
22063  for particular programming languages, while other have general scope.
22064  I selected 
22065 \noun on
22066 Noweb
22067 \noun default
22068  for my own use for several reasons:
22069 \end_layout
22070
22071 \begin_layout Itemize
22072 It can generate the documentation either in \SpecialChar LaTeX
22073  or HTML.
22074 \end_layout
22075
22076 \begin_layout Itemize
22077 It has a open architecture, i.
22078 \begin_inset space \thinspace{}
22079 \end_inset
22080
22081 e.
22082 \begin_inset space \space{}
22083 \end_inset
22084
22085 it is easy to plug in new filters and to perform special processing that
22086  you may need.
22087  
22088 \end_layout
22089
22090 \begin_layout Itemize
22091 There is a good selection of filters available already (the HTML is one
22092  of them).
22093 \end_layout
22094
22095 \begin_layout Itemize
22096 It is free.
22097 \end_layout
22098
22099 \begin_layout Standard
22100 The Noweb web page can be found at: 
22101 \end_layout
22102
22103 \begin_layout Quote
22104 Noweb home page 
22105 \begin_inset Flex URL
22106 status collapsed
22107
22108 \begin_layout Plain Layout
22109
22110 http://www.cs.virginia.edu/~nr/noweb/
22111 \end_layout
22112
22113 \end_inset
22114
22115
22116 \end_layout
22117
22118 \begin_layout Standard
22119 Starting from there you can reach many other interesting links and even
22120  some literate program examples.
22121 \end_layout
22122
22123 \begin_layout Subsection
22124 \SpecialChar LyX
22125  and Literate Programming with Noweb
22126 \end_layout
22127
22128 \begin_layout Standard
22129 The \SpecialChar LyX
22130  support for Literate Programming is provided by using the generic \SpecialChar LyX
22131
22132  converters mechanism.
22133  This support is provided in a 
22134 \begin_inset Quotes eld
22135 \end_inset
22136
22137 Noweb independent
22138 \begin_inset Quotes erd
22139 \end_inset
22140
22141  way, i.
22142 \begin_inset space \thinspace{}
22143 \end_inset
22144
22145 e.
22146 \begin_inset space \space{}
22147 \end_inset
22148
22149 you will be able to use this new \SpecialChar LyX
22150  feature with some other literate programming
22151  tool of your choice by just changing your \SpecialChar LyX
22152  preferences.
22153 \end_layout
22154
22155 \begin_layout Subsubsection
22156 Generating documents and code (weaving and tangling)
22157 \end_layout
22158
22159 \begin_layout Paragraph
22160 Using the noweb module
22161 \end_layout
22162
22163 \begin_layout Standard
22164 If you have installed Noweb and \SpecialChar LyX
22165  successfully, whenever you open a new document,
22166  after you have chosen its document class, use the Document->Settings menu
22167  to add the 
22168 \begin_inset Quotes eld
22169 \end_inset
22170
22171 noweb
22172 \begin_inset Quotes erd
22173 \end_inset
22174
22175  module.
22176  If Noweb is correctly installed, when you click on the 
22177 \begin_inset Quotes eld
22178 \end_inset
22179
22180 Modules
22181 \begin_inset Quotes erd
22182 \end_inset
22183
22184  link, you will see the 
22185 \begin_inset Quotes eld
22186 \end_inset
22187
22188 noweb
22189 \begin_inset Quotes erd
22190 \end_inset
22191
22192  module in the available list and you can add it to your document.
22193 \end_layout
22194
22195 \begin_layout Paragraph
22196 Typing code in
22197 \end_layout
22198
22199 \begin_layout Standard
22200 \SpecialChar LyX
22201  enables you to write code with a layout named 
22202 \begin_inset Flex Noun
22203 status collapsed
22204
22205 \begin_layout Plain Layout
22206 Chunk
22207 \end_layout
22208
22209 \end_inset
22210
22211 .
22212  Noweb delimits chunks like this:
22213 \end_layout
22214
22215 \begin_layout LyX-Code
22216 <<My code>>=
22217 \end_layout
22218
22219 \begin_layout LyX-Code
22220   code
22221 \end_layout
22222
22223 \begin_layout LyX-Code
22224   more code
22225 \end_layout
22226
22227 \begin_layout LyX-Code
22228   even more code
22229 \end_layout
22230
22231 \begin_layout LyX-Code
22232   @
22233 \end_layout
22234
22235 \begin_layout Standard
22236 The problem is that whatever is written in between the << and the 
22237 \family typewriter
22238 @
22239 \family default
22240  must be taken literally, i.
22241 \begin_inset space \thinspace{}
22242 \end_inset
22243
22244 e.
22245 \begin_inset space \space{}
22246 \end_inset
22247
22248 \SpecialChar LyX
22249  should be prevented from making any special interpretation of what has
22250  been written.
22251  This is also handled by 
22252 \begin_inset Flex Noun
22253 status collapsed
22254
22255 \begin_layout Plain Layout
22256 Chunk
22257 \end_layout
22258
22259 \end_inset
22260
22261 , that works like a normal paragraph but has a free spacing capability.
22262 \end_layout
22263
22264 \begin_layout Standard
22265 As a special note, you can also use the 
22266 \begin_inset Quotes eld
22267 \end_inset
22268
22269 %def
22270 \begin_inset Quotes erd
22271 \end_inset
22272
22273  construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
22274 rence:
22275 \end_layout
22276
22277 \begin_layout LyX-Code
22278 <<My chunk>>=
22279 \end_layout
22280
22281 \begin_layout LyX-Code
22282 def some_function(args):
22283 \end_layout
22284
22285 \begin_layout LyX-Code
22286    "This is the doc string for this function."
22287 \end_layout
22288
22289 \begin_layout LyX-Code
22290    print "My args: ", args
22291 \end_layout
22292
22293 \begin_layout LyX-Code
22294 @ %def some_function
22295 \end_layout
22296
22297 \begin_layout Standard
22298 For an example of this usage and the resulting cross-reference output, look
22299  at the Literate python program in 
22300 \emph on
22301 LIBDIR/examples/listerrors.lyx
22302 \emph default
22303  which should make this all clear.
22304 \end_layout
22305
22306 \begin_layout Paragraph
22307 Generating the documentation
22308 \end_layout
22309
22310 \begin_layout Standard
22311 At this point you already have a new document file with a proper document
22312  class, and with some code and text on it.
22313  How do I print it? The answer is simple, you select 
22314 \family sans
22315 View\SpecialChar menuseparator
22316 DVI,
22317 \family default
22318  etc.
22319  Just like you would do for a plain document.
22320  No special procedure is required.
22321 \end_layout
22322
22323 \begin_layout Standard
22324 To help orientate you, I will now explain what happens inside \SpecialChar LyX
22325 :
22326 \end_layout
22327
22328 \begin_layout Enumerate
22329 When the 
22330 \family sans
22331 Update\SpecialChar menuseparator
22332 DVI
22333 \family default
22334  menu option is chosen, a \SpecialChar LaTeX
22335  file is generated.
22336  
22337 \begin_inset Separator latexpar
22338 \end_inset
22339
22340
22341 \end_layout
22342
22343 \begin_deeper
22344 \begin_layout Standard
22345 If the document is of any literate class the generated file will be named
22346  with an extension name defined by the 
22347 \begin_inset Quotes eld
22348 \end_inset
22349
22350 literate
22351 \begin_inset Quotes erd
22352 \end_inset
22353
22354  format (defined in the Preferences panel), otherwise the file will have
22355  the usual 
22356 \family typewriter
22357 .tex
22358 \family default
22359  extension.
22360 \end_layout
22361
22362 \end_deeper
22363 \begin_layout Enumerate
22364 Note that the only difference so far is in the name of the file, no special
22365  processing is required by \SpecialChar LyX
22366 .
22367  Given that you formatted the code using the 
22368 \begin_inset Flex Noun
22369 status collapsed
22370
22371 \begin_layout Plain Layout
22372 Chunk
22373 \end_layout
22374
22375 \end_inset
22376
22377  layout that, by itself, takes care of the business.
22378 \end_layout
22379
22380 \begin_layout Enumerate
22381 If the document is of any literate class \SpecialChar LyX
22382  will then use the internal \SpecialChar LyX
22383  to
22384  Noweb converter, followed by the Noweb to \SpecialChar LaTeX
22385  converter
22386 \begin_inset Foot
22387 status collapsed
22388
22389 \begin_layout Plain Layout
22390 The converters are defined in the 
22391 \family sans
22392 Tools\SpecialChar menuseparator
22393 Preferences
22394 \family default
22395  panel, under the 
22396 \begin_inset Quotes eld
22397 \end_inset
22398
22399 Conversion
22400 \begin_inset Quotes erd
22401 \end_inset
22402
22403  tab.
22404  See section 
22405 \emph on
22406 Converters
22407 \emph default
22408  of the 
22409 \emph on
22410 Customization
22411 \emph default
22412  manual for general information about converters.
22413 \end_layout
22414
22415 \end_inset
22416
22417  to generate the \SpecialChar LaTeX
22418  file.
22419 \begin_inset Separator latexpar
22420 \end_inset
22421
22422
22423 \end_layout
22424
22425 \begin_deeper
22426 \begin_layout Standard
22427 Otherwise it will just skip this step.
22428 \end_layout
22429
22430 \end_deeper
22431 \begin_layout Enumerate
22432 Finally, \SpecialChar LaTeX
22433  is invoked and the regular post processing continues as in a plain
22434  document.
22435 \end_layout
22436
22437 \begin_layout Standard
22438 Independence from a particular 
22439 \begin_inset Quotes eld
22440 \end_inset
22441
22442 literate tool
22443 \begin_inset Quotes erd
22444 \end_inset
22445
22446  is easily achieved by changing the commands that are run by the various
22447  converters.
22448 \end_layout
22449
22450 \begin_layout Paragraph
22451 Generating the code
22452 \end_layout
22453
22454 \begin_layout Standard
22455 When the build menu option is chosen or the corresponding button in the
22456  toolbar is pressed, a \SpecialChar LaTeX
22457  file is generated just like step 1 above.
22458  Next, \SpecialChar LyX
22459  invokes the 
22460 \family typewriter
22461 Noweb->Program
22462 \family default
22463  converter.
22464  This converter needs to be defined by the user and is not installed by
22465  default, though the Program format is.
22466  This converter (like any other converter) will have two parts:
22467 \end_layout
22468
22469 \begin_layout Enumerate
22470 The converter program itself.
22471  This program performs the conversion from the one format to the other (in
22472  this case, from the Noweb format to the Program pseudo-format).
22473 \end_layout
22474
22475 \begin_layout Enumerate
22476 The error log parser.
22477  This is a program whose sole purpose is to rewrite error messages in a
22478  format that \SpecialChar LyX
22479  understands.
22480  This makes it possible for \SpecialChar LyX
22481  to place error boxes in the right places in
22482  the file buffer.
22483 \end_layout
22484
22485 \begin_layout Standard
22486 The first part, the 
22487 \begin_inset Quotes eld
22488 \end_inset
22489
22490 Converter
22491 \begin_inset Quotes erd
22492 \end_inset
22493
22494  setting, should be set to
22495 \begin_inset Newline newline
22496 \end_inset
22497
22498
22499 \begin_inset Quotes eld
22500 \end_inset
22501
22502
22503 \family typewriter
22504 build-script $$i
22505 \family default
22506  $$r
22507 \begin_inset Quotes erd
22508 \end_inset
22509
22510 .
22511 \begin_inset Newline newline
22512 \end_inset
22513
22514 This basically means that \SpecialChar LyX
22515  will call 
22516 \begin_inset Quotes eld
22517 \end_inset
22518
22519 build-script
22520 \begin_inset Quotes erd
22521 \end_inset
22522
22523  (a program or script) with the name of the Noweb file (normally a file
22524  in the \SpecialChar LyX
22525  temp directory) and the directory path of the original \SpecialChar LyX
22526  file.
22527  
22528 \end_layout
22529
22530 \begin_layout Standard
22531 This is an implementation of 
22532 \begin_inset Quotes eld
22533 \end_inset
22534
22535 build-script
22536 \begin_inset Quotes erd
22537 \end_inset
22538
22539  that you can place in a directory on your path:
22540 \end_layout
22541
22542 \begin_layout Standard
22543 \begin_inset VSpace defskip
22544 \end_inset
22545
22546
22547 \end_layout
22548
22549 \begin_layout Standard
22550 \begin_inset Newpage pagebreak
22551 \end_inset
22552
22553
22554 \end_layout
22555
22556 \begin_layout Standard
22557
22558 \family sans
22559 #!/bin/sh
22560 \end_layout
22561
22562 \begin_layout Standard
22563
22564 \family sans
22565 #
22566 \end_layout
22567
22568 \begin_layout Standard
22569
22570 \family sans
22571 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
22572 \end_layout
22573
22574 \begin_layout Standard
22575 \begin_inset VSpace defskip
22576 \end_inset
22577
22578
22579 \end_layout
22580
22581 \begin_layout Standard
22582 The next part of the converter setting is the 
22583 \begin_inset Quotes eld
22584 \end_inset
22585
22586 Flags
22587 \begin_inset Quotes erd
22588 \end_inset
22589
22590  which is to be set to
22591 \begin_inset Newline newline
22592 \end_inset
22593
22594
22595 \begin_inset Quotes eld
22596 \end_inset
22597
22598
22599 \family typewriter
22600 parselog=$$s/scripts/listerrors
22601 \family default
22602
22603 \begin_inset Quotes erd
22604 \end_inset
22605
22606 .
22607 \begin_inset Newline newline
22608 \end_inset
22609
22610 This will run any errors that are generated by the 
22611 \begin_inset Quotes eld
22612 \end_inset
22613
22614 build-script
22615 \begin_inset Quotes erd
22616 \end_inset
22617
22618  process through the 
22619 \begin_inset Quotes eld
22620 \end_inset
22621
22622 listerrors
22623 \begin_inset Quotes erd
22624 \end_inset
22625
22626  program.
22627 \end_layout
22628
22629 \begin_layout Standard
22630 The build will normally take place in \SpecialChar LyX
22631 's temporary directory, so the files
22632  produced by the conversion will be in that directory.
22633  \SpecialChar LyX
22634  will copy out what it regards as the `main' file, but the 
22635 \family typewriter
22636 Noweb->Program
22637 \family default
22638  conversion may produce several files, and so most of these would then be
22639  deleted when \SpecialChar LyX
22640  was closed.
22641  This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
22642  the build-script chunk can place the generated files in that location.
22643 \end_layout
22644
22645 \begin_layout Paragraph
22646 Build instructions in the document
22647 \end_layout
22648
22649 \begin_layout Standard
22650 The last piece of the integration between \SpecialChar LyX
22651  and noweb is the 
22652 \begin_inset Quotes eld
22653 \end_inset
22654
22655 build-script
22656 \begin_inset Quotes erd
22657 \end_inset
22658
22659  chunk.
22660  Generally, the instructions for building your program should be embedded
22661  in a chunk of its own.
22662  The noweb-specific 
22663 \begin_inset Quotes eld
22664 \end_inset
22665
22666 build-script
22667 \begin_inset Quotes erd
22668 \end_inset
22669
22670  above uses the notangle command to look for this chunk (called 
22671 \begin_inset Quotes eld
22672 \end_inset
22673
22674 build-script
22675 \begin_inset Quotes erd
22676 \end_inset
22677
22678 ) and runs its contents through 
22679 \begin_inset Quotes eld
22680 \end_inset
22681
22682 sh
22683 \begin_inset Quotes erd
22684 \end_inset
22685
22686 .
22687 \end_layout
22688
22689 \begin_layout Standard
22690 Typically, such a chunk would look something like this:
22691 \end_layout
22692
22693 \begin_layout LyX-Code
22694 <<build-script>>=
22695 \end_layout
22696
22697 \begin_layout LyX-Code
22698 #!/bin/sh
22699 \begin_inset Newline newline
22700 \end_inset
22701
22702 if [ -z "${NOWEB_SOURCE}" ]
22703 \begin_inset Newline newline
22704 \end_inset
22705
22706 then
22707 \end_layout
22708
22709 \begin_layout LyX-Code
22710 NOWEB_SOURCE=myfile.nw
22711 \begin_inset Newline newline
22712 \end_inset
22713
22714 fi
22715 \begin_inset Newline newline
22716 \end_inset
22717
22718 [...
22719  code to extract files ...
22720  use NOWEB_OUTPUT_DIR here ...]
22721 \begin_inset Newline newline
22722 \end_inset
22723
22724 [...
22725  code to compile files ...]
22726 \begin_inset Newline newline
22727 \end_inset
22728
22729 @
22730 \end_layout
22731
22732 \begin_layout Standard
22733 Look in 
22734 \emph on
22735 LIBDIR/examples/listerrors.lyx
22736 \emph default
22737  or in 
22738 \emph on
22739 LIBDIR/examples/Literate.lyx
22740 \emph default
22741  which implement two versions of the 
22742 \begin_inset Quotes eld
22743 \end_inset
22744
22745 listerrors
22746 \begin_inset Quotes erd
22747 \end_inset
22748
22749  program for some illustrations of how all of these pieces go together or
22750  in 
22751 \emph on
22752 LIBDIR/examples/noweb2lyx.lyx.
22753
22754 \emph default
22755  Interestingly, these three files show off the language-indepence of the
22756  \SpecialChar LyX
22757  literate programming support since they are written in Python, C and Perl
22758  respectively.
22759 \end_layout
22760
22761 \begin_layout Subsubsection
22762 Configuring \SpecialChar LyX
22763
22764 \end_layout
22765
22766 \begin_layout Standard
22767 All the Literate Programming support is configured by the 
22768 \family sans
22769 Tools\SpecialChar menuseparator
22770 Preferences
22771 \family default
22772  panel in the 
22773 \begin_inset Quotes eld
22774 \end_inset
22775
22776 File Handling
22777 \begin_inset Quotes erd
22778 \end_inset
22779
22780  tab.
22781  The important parts are:
22782 \end_layout
22783
22784 \begin_layout Description
22785 the
22786 \begin_inset space ~
22787 \end_inset
22788
22789
22790 \begin_inset Quotes eld
22791 \end_inset
22792
22793 NoWeb
22794 \begin_inset Quotes erd
22795 \end_inset
22796
22797
22798 \begin_inset space ~
22799 \end_inset
22800
22801 format Set up via the File Formats tab, this is where the Noweb-specific
22802  pieces are set up.
22803  The 
22804 \family sans
22805 GUI Name
22806 \family default
22807  is set to 
22808 \family typewriter
22809 NoWeb
22810 \family default
22811 , the file extension is set to 
22812 \family typewriter
22813 .nw
22814 \family default
22815 .
22816  This tells \SpecialChar LyX
22817  to create a file with a 
22818 \family typewriter
22819 .nw
22820 \family default
22821  extension in the first step of the conversion process.
22822 \end_layout
22823
22824 \begin_layout Description
22825 the
22826 \begin_inset space ~
22827 \end_inset
22828
22829
22830 \family sans
22831 Program
22832 \family default
22833
22834 \begin_inset space ~
22835 \end_inset
22836
22837 format This is an empty format whose sole purpose is to be the endpoint
22838  of a conversion (which then allows us to set up a converter for it).
22839 \end_layout
22840
22841 \begin_layout Description
22842
22843 \family sans
22844 NoWeb
22845 \family default
22846 ->
22847 \family sans
22848 \SpecialChar LaTeX
22849
22850 \family default
22851  This converter performs the 
22852 \begin_inset Quotes eld
22853 \end_inset
22854
22855 weaving
22856 \begin_inset Quotes erd
22857 \end_inset
22858
22859  of the literate document.
22860  For Noweb, it is set to 
22861 \begin_inset Quotes eld
22862 \end_inset
22863
22864
22865 \family typewriter
22866 noweave -delay -index $$i > $$o
22867 \family default
22868
22869 \begin_inset Quotes erd
22870 \end_inset
22871
22872
22873 \end_layout
22874
22875 \begin_layout Description
22876
22877 \family sans
22878 NoWeb
22879 \family default
22880 ->
22881 \family sans
22882 Program
22883 \family default
22884  This performs the 
22885 \begin_inset Quotes eld
22886 \end_inset
22887
22888 tangling step
22889 \begin_inset Quotes erd
22890 \end_inset
22891
22892 .
22893  As stated above, the Converter is set to 
22894 \begin_inset Quotes eld
22895 \end_inset
22896
22897
22898 \family typewriter
22899 build-script $$i
22900 \family default
22901  $$r
22902 \begin_inset Quotes erd
22903 \end_inset
22904
22905 , with Flags set to
22906 \begin_inset Newline newline
22907 \end_inset
22908
22909
22910 \begin_inset Quotes eld
22911 \end_inset
22912
22913
22914 \family typewriter
22915 parselog=$$s/scripts/listerrors
22916 \family default
22917
22918 \begin_inset Quotes erd
22919 \end_inset
22920
22921 .
22922 \end_layout
22923
22924 \begin_layout Subsubsection
22925 Debug extensions
22926 \end_layout
22927
22928 \begin_layout Standard
22929 There is also a new function implemented in the \SpecialChar LyX
22930  server, the 
22931 \begin_inset Quotes eld
22932 \end_inset
22933
22934 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22935  
22936 \end_layout
22937
22938 \begin_layout Standard
22939 When debugging code with ddd/gdb, it is possible to invoke a text editor
22940  at the current execution position with a single key stroke.
22941  The default ddd configuration for that is shift-ctrl-V.
22942  It happens that you can define the editor command line invocation in ddd
22943  by accessing the 
22944 \family sans
22945 Edit\SpecialChar menuseparator
22946 Preferences\SpecialChar menuseparator
22947 Helpers
22948 \family default
22949  dialog and changing the "Edit Sources" entry.
22950 \end_layout
22951
22952 \begin_layout Standard
22953 I take advantage of the newly created \SpecialChar LyX
22954  server function and this ddd feature,
22955  and set 
22956 \begin_inset Quotes eld
22957 \end_inset
22958
22959 Edit Sources
22960 \begin_inset Quotes erd
22961 \end_inset
22962
22963  to:
22964 \end_layout
22965
22966 \begin_layout Standard
22967 \begin_inset VSpace defskip
22968 \end_inset
22969
22970
22971 \end_layout
22972
22973 \begin_layout Standard
22974
22975 \family sans
22976 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22977 \end_layout
22978
22979 \begin_layout Standard
22980 \begin_inset VSpace defskip
22981 \end_inset
22982
22983
22984 \end_layout
22985
22986 \begin_layout Standard
22987 With this, whenever you are using ddd and find a point in the program that
22988  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22989  ddd will forward this information to \SpecialChar LyX
22990  through the \SpecialChar LyX
22991  server and then the
22992  \SpecialChar LyX
22993  window will show the same file with the cursor at the same position ddd
22994  was pointing to.
22995  No more guessing or long scrolling to locate a point in the program back
22996  from debugging !
22997 \end_layout
22998
22999 \begin_layout Standard
23000 Note however that you must enable the \SpecialChar LyX
23001  server to get this feature working
23002  (it is disabled by default).
23003  You can enable it in 
23004 \family sans
23005 Preferences
23006 \family default
23007  (tabs 
23008 \family sans
23009 Inputs
23010 \family default
23011
23012 \family sans
23013 Paths
23014 \family default
23015 ) by entering in the 
23016 \family sans
23017 \SpecialChar LyX
23018 server pipe
23019 \family default
23020  a path like 
23021 \begin_inset Quotes eld
23022 \end_inset
23023
23024
23025 \family typewriter
23026 /home/<your-home-directory>/.lyx/lyxpipe
23027 \family default
23028
23029 \begin_inset Quotes erd
23030 \end_inset
23031
23032
23033 \end_layout
23034
23035 \begin_layout Standard
23036 Read the \SpecialChar LyX
23037  server documentation in the 
23038 \emph on
23039 Customization Manual
23040 \emph default
23041  for further information.
23042 \end_layout
23043
23044 \begin_layout Subsubsection
23045 Toolbar extensions
23046 \end_layout
23047
23048 \begin_layout Standard
23049 There are six new buttons that can be added to your \SpecialChar LyX
23050  toolbar.
23051  Five of these buttons are short cuts to layout styles: 
23052 \family sans
23053 Standard
23054 \family default
23055
23056 \family sans
23057 Section
23058 \family default
23059
23060 \family sans
23061 \SpecialChar LaTeX
23062
23063 \family default
23064
23065 \family sans
23066 \SpecialChar LyX
23067 -Code
23068 \family default
23069 , and 
23070 \family sans
23071 Chunk
23072 \family default
23073 .
23074  The last one is a short cut to the 
23075 \begin_inset Quotes eld
23076 \end_inset
23077
23078 Build Program
23079 \begin_inset Quotes erd
23080 \end_inset
23081
23082  File menu entry.
23083  
23084 \end_layout
23085
23086 \begin_layout Standard
23087 \SpecialChar LyX
23088  has a range of buttons that are available for tool bar customization.
23089  In my toolbar I like to combine the six short cuts above with two more:
23090  One for 
23091 \family sans
23092 Document
23093 \family default
23094 \SpecialChar menuseparator
23095
23096 \family sans
23097 Update
23098 \family default
23099 \SpecialChar menuseparator
23100
23101 \family sans
23102 DVI
23103 \family default
23104  and the other for 
23105 \family sans
23106 Document\SpecialChar menuseparator
23107 View\SpecialChar menuseparator
23108 DVI
23109 \family default
23110  File menu entries.
23111  Here is how it looks like:
23112 \end_layout
23113
23114 \begin_layout LyX-Code
23115 Toolbar
23116 \end_layout
23117
23118 \begin_layout LyX-Code
23119   Layouts
23120 \end_layout
23121
23122 \begin_layout LyX-Code
23123   Icon "layout Standard"
23124 \end_layout
23125
23126 \begin_layout LyX-Code
23127   Icon "layout Section"
23128 \end_layout
23129
23130 \begin_layout LyX-Code
23131   Icon "layout \SpecialChar LaTeX
23132 "
23133 \end_layout
23134
23135 \begin_layout LyX-Code
23136   Icon "layout \SpecialChar LyX
23137 -Code"
23138 \end_layout
23139
23140 \begin_layout LyX-Code
23141   Icon "layout Chunk"
23142 \end_layout
23143
23144 \begin_layout LyX-Code
23145   Separator
23146 \end_layout
23147
23148 \begin_layout LyX-Code
23149   Icon "buffer-view"
23150 \end_layout
23151
23152 \begin_layout LyX-Code
23153   Icon "buffer-typeset"
23154 \end_layout
23155
23156 \begin_layout LyX-Code
23157   Icon "build-program"
23158 \end_layout
23159
23160 \begin_layout LyX-Code
23161   Separator
23162 \end_layout
23163
23164 \begin_layout LyX-Code
23165 .
23166 \end_layout
23167
23168 \begin_layout LyX-Code
23169 .
23170 \end_layout
23171
23172 \begin_layout LyX-Code
23173 .
23174 \end_layout
23175
23176 \begin_layout LyX-Code
23177 End
23178 \end_layout
23179
23180 \begin_layout Subsubsection
23181 Colors customization
23182 \end_layout
23183
23184 \begin_layout Standard
23185 There are a number of colors in \SpecialChar LyX
23186  that can be customized in 
23187 \family sans
23188 Preferences
23189 \family default
23190 .
23191  One of the things that bothers people is the \SpecialChar LaTeX
23192  font color.
23193  The default color is red, since the chunks uses \SpecialChar LaTeX
23194  font, and there is a lot
23195  of chunks in literate documents, you may get tired of seeing everything
23196  in red.
23197  You can change it by going to the tabs 
23198 \family sans
23199 Look&Feel
23200 \family default
23201
23202 \family sans
23203 Colors.
23204 \end_layout
23205
23206 \begin_layout Standard
23207 The next thing is the visible presence of the newline character in the screen.
23208  You can choose the color of this particular character and make it blend
23209  in the background.
23210  I recommend you choosing a color that is close to the background but not
23211  equal, that way you still can see it is there, but it is not bothering
23212  you anymore.
23213 \end_layout
23214
23215 \begin_layout Subsection
23216 \SpecialChar LyX
23217  and knitr/Sweave
23218 \end_layout
23219
23220 \begin_layout Standard
23221 Support for 
23222 \family sans
23223 knitr
23224 \family default
23225  and 
23226 \family sans
23227 Sweave
23228 \family default
23229  is documented in the 
23230 \emph on
23231 knitr.lyx
23232 \emph default
23233  example file and in the Sweave manual (menu 
23234 \family sans
23235 Help\SpecialChar menuseparator
23236 Specific Manuals
23237 \family default
23238 ).
23239 \end_layout
23240
23241 \begin_layout Chapter
23242 \SpecialChar LyX
23243  Archives
23244 \end_layout
23245
23246 \begin_layout Standard
23247 Users sometimes need to be able to 
23248 \begin_inset Quotes eld
23249 \end_inset
23250
23251 bundle
23252 \begin_inset Quotes erd
23253 \end_inset
23254
23255  a \SpecialChar LyX
23256  file together with all the images (and other files) on which it depends,
23257  either for sending to a publisher or for sharing with a co-author.
23258  \SpecialChar LyX
23259  2.0 includes a Python script (
23260 \begin_inset Flex Code
23261 status collapsed
23262
23263 \begin_layout Plain Layout
23264 lyxpak.py
23265 \end_layout
23266
23267 \end_inset
23268
23269 ) that automates this process.
23270  To use it, you must have either the 
23271 \begin_inset Flex Code
23272 status collapsed
23273
23274 \begin_layout Plain Layout
23275 zipfile
23276 \end_layout
23277
23278 \end_inset
23279
23280  or 
23281 \begin_inset Flex Code
23282 status collapsed
23283
23284 \begin_layout Plain Layout
23285 tarfile
23286 \end_layout
23287
23288 \end_inset
23289
23290  python modules installed on your system.
23291  By default, the script prefers the 
23292 \begin_inset Flex Code
23293 status collapsed
23294
23295 \begin_layout Plain Layout
23296 gzip
23297 \end_layout
23298
23299 \end_inset
23300
23301 -compressed 
23302 \begin_inset Flex Code
23303 status collapsed
23304
23305 \begin_layout Plain Layout
23306 tar
23307 \end_layout
23308
23309 \end_inset
23310
23311  format on Unix-like systems and the 
23312 \begin_inset Flex Code
23313 status collapsed
23314
23315 \begin_layout Plain Layout
23316 zip
23317 \end_layout
23318
23319 \end_inset
23320
23321  format on Windows.
23322 \end_layout
23323
23324 \begin_layout Standard
23325 \SpecialChar LyX
23326 's configuration process will set the script up to export a `\SpecialChar LyX
23327  Archive',
23328  and this format will then be available under 
23329 \begin_inset Flex Code
23330 status collapsed
23331
23332 \begin_layout Plain Layout
23333 File\SpecialChar menuseparator
23334 Export
23335 \end_layout
23336
23337 \end_inset
23338
23339 .
23340 \end_layout
23341
23342 \begin_layout Standard
23343 Independently of the platform, the generation of a particular archive format
23344  can be forced by adding either the 
23345 \begin_inset Flex Code
23346 status collapsed
23347
23348 \begin_layout Plain Layout
23349 -t
23350 \end_layout
23351
23352 \end_inset
23353
23354  (for the 
23355 \begin_inset Flex Code
23356 status collapsed
23357
23358 \begin_layout Plain Layout
23359 tar
23360 \end_layout
23361
23362 \end_inset
23363
23364  format) or 
23365 \begin_inset Flex Code
23366 status collapsed
23367
23368 \begin_layout Plain Layout
23369 -z
23370 \end_layout
23371
23372 \end_inset
23373
23374  (for the 
23375 \begin_inset Flex Code
23376 status collapsed
23377
23378 \begin_layout Plain Layout
23379 zip
23380 \end_layout
23381
23382 \end_inset
23383
23384  format) switch to the 
23385 \begin_inset Flex Code
23386 status collapsed
23387
23388 \begin_layout Plain Layout
23389 \SpecialChar LyX
23390 \SpecialChar menuseparator
23391 \SpecialChar LyX
23392  Archive
23393 \end_layout
23394
23395 \end_inset
23396
23397  converter in 
23398 \begin_inset Flex Code
23399 status collapsed
23400
23401 \begin_layout Plain Layout
23402 Tools\SpecialChar menuseparator
23403 Preferences\SpecialChar menuseparator
23404 File Handling\SpecialChar menuseparator
23405 Converters
23406 \end_layout
23407
23408 \end_inset
23409
23410 .
23411  (Make sure you add the switch after the script name, not before it.)
23412 \end_layout
23413
23414 \begin_layout Chapter
23415 \SpecialChar LyX
23416  and the World Wide Web
23417 \end_layout
23418
23419 \begin_layout Standard
23420 \SpecialChar LyX
23421  has long supported the export of documents to various web-friendly formats,
23422  such as HTML.
23423  Before verson 2.0, however, HTML export was always accomplished by the use
23424  of external converters.
23425 \begin_inset Foot
23426 status collapsed
23427
23428 \begin_layout Plain Layout
23429 For details on the use of external converters with \SpecialChar LyX
23430 , see the 
23431 \emph on
23432 Converters
23433 \emph default
23434  section of the Customization manual.
23435 \end_layout
23436
23437 \end_inset
23438
23439  These fall into two large groups: there are converters that use \SpecialChar LaTeX
23440  as an
23441  intermediate format, such as 
23442 \begin_inset Flex Code
23443 status collapsed
23444
23445 \begin_layout Plain Layout
23446 htlatex
23447 \end_layout
23448
23449 \end_inset
23450
23451
23452 \begin_inset Flex Code
23453 status collapsed
23454
23455 \begin_layout Plain Layout
23456 html2latex
23457 \end_layout
23458
23459 \end_inset
23460
23461 , and 
23462 \begin_inset Flex Code
23463 status collapsed
23464
23465 \begin_layout Plain Layout
23466 plastex
23467 \end_layout
23468
23469 \end_inset
23470
23471 , relying upon \SpecialChar LyX
23472  to produce the \SpecialChar LaTeX
23473 ; and there is a converter that works directly
23474  on \SpecialChar LyX
23475  files, 
23476 \begin_inset Flex Code
23477 status collapsed
23478
23479 \begin_layout Plain Layout
23480 e\SpecialChar LyX
23481 er
23482 \end_layout
23483
23484 \end_inset
23485
23486 .
23487  All of these have different advantages and disadvantages.
23488  
23489 \end_layout
23490
23491 \begin_layout Standard
23492 The \SpecialChar LaTeX
23493 -based converters have the advantage that, in principle, they know everythin
23494 g about the exported document that \SpecialChar LaTeX
23495  does.
23496  Such converters do not care, for example, if a certain block of code was
23497  produced by \SpecialChar LyX
23498  or was Evil Red Text.
23499  These converters know about 
23500 \begin_inset Flex Code
23501 status collapsed
23502
23503 \begin_layout Plain Layout
23504 aux
23505 \end_layout
23506
23507 \end_inset
23508
23509  files, counters, and references, and can often make use of the 
23510 \begin_inset Flex Code
23511 status collapsed
23512
23513 \begin_layout Plain Layout
23514 bbl
23515 \end_layout
23516
23517 \end_inset
23518
23519  files generated by Bib\SpecialChar TeX
23520 .
23521  On the other hand, \SpecialChar LaTeX
23522  is a very hard language to parse—it is sometimes said
23523  that only \SpecialChar TeX
23524  itself understands \SpecialChar TeX
23525 —and \SpecialChar LaTeX
23526 -based converters will often choke on
23527  what seem to be quite simple constructs; complex ones can throw them completely
23528 , and as of this writing, for example, the 
23529 \emph on
23530 Embedded Objects
23531 \emph default
23532  manual will not export with 
23533 \begin_inset Flex Code
23534 status collapsed
23535
23536 \begin_layout Plain Layout
23537 htlatex
23538 \end_layout
23539
23540 \end_inset
23541
23542 , though the others will.
23543  The other issue concerns how math is handled.
23544  These converters typically convert the formulae into little pictures that
23545  are then linked from the HTML document.
23546  Since these are actually generated by \SpecialChar LaTeX
23547 , they are accurate.
23548  But they do not scale well, and just getting them to look as if they are
23549  actually meant to be in your document—so that the font sizes seem to be
23550  roughly the same—can be a challenge.
23551 \end_layout
23552
23553 \begin_layout Standard
23554 Alex Fernandez's 
23555 \begin_inset Flex Code
23556 status collapsed
23557
23558 \begin_layout Plain Layout
23559 e\SpecialChar LyX
23560 er
23561 \end_layout
23562
23563 \end_inset
23564
23565  (
23566 \begin_inset CommandInset href
23567 LatexCommand href
23568 name "http://elyxer.nongnu.org/"
23569 target "http://elyxer.nongnu.org/"
23570
23571 \end_inset
23572
23573 ) solves some of these problems.
23574  In particular, the formulae it produces scale perfectly, since it renders
23575  math using a combination of HTML and CSS rather than converting the formulae
23576  to images.
23577  But even moderately complex formula are rendered less well than with 
23578 \begin_inset Flex Code
23579 status collapsed
23580
23581 \begin_layout Plain Layout
23582 htlatex
23583 \end_layout
23584
23585 \end_inset
23586
23587 ; this reflects the limitations of HTML.
23588 \begin_inset Foot
23589 status collapsed
23590
23591 \begin_layout Plain Layout
23592 That said, 
23593 \begin_inset Flex Code
23594 status collapsed
23595
23596 \begin_layout Plain Layout
23597 e\SpecialChar LyX
23598 er
23599 \end_layout
23600
23601 \end_inset
23602
23603  can also use jsMath and MathJax for equations, but this setting is only
23604  available globally and requires one to have access to a server that runs
23605  the backend.
23606 \end_layout
23607
23608 \end_inset
23609
23610  More importantly (as of version 1.1.1, at least), 
23611 \begin_inset Flex Code
23612 status collapsed
23613
23614 \begin_layout Plain Layout
23615 e\SpecialChar LyX
23616 er
23617 \end_layout
23618
23619 \end_inset
23620
23621  has limited support for math macros and no support for user-defined paragraph
23622  or character styles.
23623  These limitations make 
23624 \begin_inset Flex Code
23625 status collapsed
23626
23627 \begin_layout Plain Layout
23628 e\SpecialChar LyX
23629 er
23630 \end_layout
23631
23632 \end_inset
23633
23634  unsuitable for many of the documents \SpecialChar LyX
23635  users produce.
23636  In principle, of course, these problems could be solved, but the \SpecialChar LyX
23637  developers
23638  have decided to follow a different path and have made \SpecialChar LyX
23639  itself capable of
23640  writing XHTML, just as it is capable of writing \SpecialChar LaTeX
23641 , DocBook, and plaintext.
23642 \end_layout
23643
23644 \begin_layout Standard
23645 As of this writing, XHTML output remains under development and should probably
23646  be regarded as 
23647 \begin_inset Quotes eld
23648 \end_inset
23649
23650 experimental
23651 \begin_inset Quotes erd
23652 \end_inset
23653
23654 .
23655 \begin_inset Foot
23656 status collapsed
23657
23658 \begin_layout Plain Layout
23659 The file 
23660 \begin_inset Flex Code
23661 status collapsed
23662
23663 \begin_layout Plain Layout
23664 development/HTML.notes
23665 \end_layout
23666
23667 \end_inset
23668
23669 , which can be found in the \SpecialChar LyX
23670  source tree or 
23671 \begin_inset CommandInset href
23672 LatexCommand href
23673 name "accessed online"
23674 target "http://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
23675
23676 \end_inset
23677
23678 , usually contains up-to-date information about the state of XHTML output.
23679  See also the list of XHTML bugs on 
23680 \begin_inset CommandInset href
23681 LatexCommand href
23682 name "the bug tracker"
23683 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"
23684
23685 \end_inset
23686
23687 .
23688 \end_layout
23689
23690 \end_inset
23691
23692  Still, the developers have chosen this approach because it has several
23693  potential advantages over the other two.
23694 \end_layout
23695
23696 \begin_layout Standard
23697 These advantages are primarily due to the fact that the XHTML output routines,
23698  since they are part of \SpecialChar LyX
23699 , know everything \SpecialChar LyX
23700  knows about the document being
23701  exported.
23702 \begin_inset Foot
23703 status collapsed
23704
23705 \begin_layout Plain Layout
23706 Another advantage is that, since these routines are internal to \SpecialChar LyX
23707 , they are
23708  immune to changes in \SpecialChar LyX
23709 's file format, or to changes in the semantics of
23710  existing insets.
23711 \end_layout
23712
23713 \end_inset
23714
23715  So they know about the table of contents (as displayed in the outline),
23716  about the counters associated with different paragraph styles, and about
23717  user-defined styles.
23718  The XHTML output routines know what \SpecialChar LyX
23719  knows about internationalization,
23720  too, so they will output 
23721 \begin_inset Quotes eld
23722 \end_inset
23723
23724 Chapter 1
23725 \begin_inset Quotes erd
23726 \end_inset
23727
23728  or 
23729 \begin_inset Quotes eld
23730 \end_inset
23731
23732
23733 \lang ngerman
23734 Kapitel
23735 \lang english
23736  1
23737 \begin_inset Quotes erd
23738 \end_inset
23739
23740 , depending upon the language in effect at the time.
23741  
23742 \end_layout
23743
23744 \begin_layout Standard
23745 Quite generally, the output routines know what \SpecialChar LyX
23746  knows about document layout,
23747  that is, about how the document is to be rendered on screen.
23748  We use this information when we output the document as XHTML.
23749  In particular, \SpecialChar LyX
23750  
23751 \emph on
23752 automatically
23753 \emph default
23754  generates CSS style information corresponding to the layout information
23755  it uses to render the document on screen: if section headings are supposed
23756  to be sans-serif and bold as seen in \SpecialChar LyX
23757 , then (by default) they will be sans-seri
23758 f and bold when viewed in a web browser, too.
23759  And this is true not just for pre-defined styles, like Section, but for
23760  any style, including user-defined styles.
23761  Indeed, the XHTML output routines make no distinction between user-defined
23762  paragraph and character styles and \SpecialChar LyX
23763 's own pre-defined styles: in each case,
23764  everything \SpecialChar LyX
23765  knows about the styles is contained in the layout files.
23766  And much the same is true as regards pre-defined textual insets, such as
23767  footnotes, and various custom insets.
23768  
23769 \end_layout
23770
23771 \begin_layout Standard
23772 The result is that XHTML output can be customized and extended in exactly
23773  the same way \SpecialChar LaTeX
23774  output can be customized and extended: through layout files
23775  and modules.
23776  See chapter five of the 
23777 \emph on
23778 Customization 
23779 \emph default
23780 manual for the details.
23781 \end_layout
23782
23783 \begin_layout Standard
23784 The remainder of this chapter contains more detailed information on XHTML
23785  output, its limitations, and ways to work around those limitations.
23786 \end_layout
23787
23788 \begin_layout Section
23789 Math Output in XHTML
23790 \end_layout
23791
23792 \begin_layout Standard
23793 \SpecialChar LyX
23794  offers four choices for how math is rendered.
23795  These have various advantages and disadvantages:
23796 \end_layout
23797
23798 \begin_layout Itemize
23799 MathML
23800 \begin_inset Newline newline
23801 \end_inset
23802
23803 MathML is a dialect of XML designed specifically for mathematics on the
23804  web, and it typically renders very well in browsers that support it.
23805  The disadvantage is that not all browsers support MathML, and support is
23806  not complete even in the Gecko-based browsers, such as Firefox.
23807 \begin_inset Newline newline
23808 \end_inset
23809
23810 If \SpecialChar LyX
23811  is unable to render a formula as MathML—for example, if the formula
23812  uses the 
23813 \begin_inset Flex Code
23814 status collapsed
23815
23816 \begin_layout Plain Layout
23817 xymatrix
23818 \end_layout
23819
23820 \end_inset
23821
23822  package or ERT—then it will instead output the formula as an image.
23823  
23824 \end_layout
23825
23826 \begin_layout Itemize
23827 HTML
23828 \begin_inset Newline newline
23829 \end_inset
23830
23831 As mentioned above, 
23832 \begin_inset Flex Code
23833 status collapsed
23834
23835 \begin_layout Plain Layout
23836 elyxer
23837 \end_layout
23838
23839 \end_inset
23840
23841  outputs math as HTML, styled by CSS.
23842 \begin_inset Foot
23843 status collapsed
23844
23845 \begin_layout Plain Layout
23846 \SpecialChar LyX
23847  has borrowed some of the CSS for its HTML output from 
23848 \begin_inset Flex Code
23849 status collapsed
23850
23851 \begin_layout Plain Layout
23852 elyxer
23853 \end_layout
23854
23855 \end_inset
23856
23857 .
23858 \end_layout
23859
23860 \end_inset
23861
23862  For simple formulae, this can work quite well, though with more complicated
23863  formulae it tends to break down.
23864  Still, this method has the advantage that it is very widely supported and
23865  so it may be appropriate for documents that contain only a little, fairly
23866  simple math.
23867 \begin_inset Newline newline
23868 \end_inset
23869
23870 If Lyx is unable to render a formula as HTML—for example, if the formula
23871  uses the 
23872 \begin_inset Flex Code
23873 status collapsed
23874
23875 \begin_layout Plain Layout
23876 xymatrix
23877 \end_layout
23878
23879 \end_inset
23880
23881  package or ERT—then it will instead output the formula as an image.
23882  
23883 \end_layout
23884
23885 \begin_layout Itemize
23886 Images
23887 \begin_inset Newline newline
23888 \end_inset
23889
23890 Like 
23891 \begin_inset Flex Code
23892 status collapsed
23893
23894 \begin_layout Plain Layout
23895 htlatex
23896 \end_layout
23897
23898 \end_inset
23899
23900 , \SpecialChar LyX
23901  will output formulae as images, the very same images, in fact, that are
23902  used for instant preview.
23903 \begin_inset Foot
23904 status collapsed
23905
23906 \begin_layout Plain Layout
23907 Instant preview does 
23908 \emph on
23909 not 
23910 \emph default
23911 have to be on for images to be output, however.
23912 \end_layout
23913
23914 \end_inset
23915
23916  The advantage to this method is that the images are simply generated by
23917  \SpecialChar LaTeX
23918 , so they are very accurate.
23919  The disadvantage, as mentioned earlier, is that these are bitmapped images,
23920  so they do not scale terribly well, and one cannot copy them, etc.
23921  (As of this writing, there are also problems about equation numbering.
23922  See 
23923 \begin_inset CommandInset href
23924 LatexCommand href
23925 name "bug 6894"
23926 target "http://www.lyx.org/trac/ticket/6894"
23927
23928 \end_inset
23929
23930 .)
23931 \begin_inset Newline newline
23932 \end_inset
23933
23934 The size of the images can be controlled by setting the 
23935 \begin_inset Quotes eld
23936 \end_inset
23937
23938 Math Images Scaling
23939 \begin_inset Quotes erd
23940 \end_inset
23941
23942  parameter under 
23943 \begin_inset Flex Noun
23944 status collapsed
23945
23946 \begin_layout Plain Layout
23947 Document\SpecialChar menuseparator
23948 Settings\SpecialChar menuseparator
23949 Output
23950 \end_layout
23951
23952 \end_inset
23953
23954 .
23955 \begin_inset Foot
23956 status collapsed
23957
23958 \begin_layout Plain Layout
23959 For those who want to know, this controls the resolution of the image in
23960  dots per inch and is based upon a default of 75 dpi.
23961 \end_layout
23962
23963 \end_inset
23964
23965
23966 \begin_inset Newline newline
23967 \end_inset
23968
23969 If \SpecialChar LyX
23970  for some reason fails to create an image for a formula (e.g., if a required
23971  \SpecialChar LaTeX
23972  package is not installed), then it will fall back to outputing the raw
23973  \SpecialChar LaTeX
23974 .
23975 \end_layout
23976
23977 \begin_layout Itemize
23978 \SpecialChar LaTeX
23979
23980 \begin_inset Newline newline
23981 \end_inset
23982
23983 Finally, \SpecialChar LyX
23984  will happily output math as \SpecialChar LaTeX
23985 .
23986  As well as being the output of last resort, this method can be used with
23987  such tools as 
23988 \begin_inset CommandInset href
23989 LatexCommand href
23990 name "jsMath"
23991 target "http://www.math.union.edu/~dpvc/jsMath/"
23992
23993 \end_inset
23994
23995 , which uses JavaScript to render \SpecialChar LaTeX
23996  embedded in HTML documents.
23997  \SpecialChar LyX
23998  wraps the \SpecialChar LaTeX
23999  in either a 
24000 \begin_inset Flex Code
24001 status collapsed
24002
24003 \begin_layout Plain Layout
24004 span
24005 \end_layout
24006
24007 \end_inset
24008
24009  (for inline formulas) or 
24010 \begin_inset Flex Code
24011 status collapsed
24012
24013 \begin_layout Plain Layout
24014 div
24015 \end_layout
24016
24017 \end_inset
24018
24019  (for displayed formulas) with 
24020 \begin_inset Flex Code
24021 status collapsed
24022
24023 \begin_layout Plain Layout
24024 class='math'
24025 \end_layout
24026
24027 \end_inset
24028
24029 , as is required for jsMath.
24030 \end_layout
24031
24032 \begin_layout Standard
24033 One of these output methods must be selected under 
24034 \begin_inset Flex Noun
24035 status collapsed
24036
24037 \begin_layout Plain Layout
24038 Document\SpecialChar menuseparator
24039 Settings\SpecialChar menuseparator
24040 Output
24041 \end_layout
24042
24043 \end_inset
24044
24045 .
24046  By default, \SpecialChar LyX
24047  outputs MathML.
24048  This is a document-wide setting, therefore.
24049 \end_layout
24050
24051 \begin_layout Standard
24052 Eventually, \SpecialChar LyX
24053  will offer the user the option to select an alternate output
24054  method for a particular inset, say, one that isn't being rendered very
24055  well by MathML.
24056 \begin_inset Foot
24057 status collapsed
24058
24059 \begin_layout Plain Layout
24060 That said, since \SpecialChar LyX
24061  falls back to images if the inset contains ERT, then one
24062  can force output as an image by putting some harmless ERT into the math,
24063  for example: 
24064 \begin_inset Formula $a=b\relax$
24065 \end_inset
24066
24067 .
24068 \end_layout
24069
24070 \end_inset
24071
24072
24073 \end_layout
24074
24075 \begin_layout Section
24076 Bibliography and Citations
24077 \end_layout
24078
24079 \begin_layout Standard
24080 XHTML output fully supports bibliographies and citations.
24081  
24082 \end_layout
24083
24084 \begin_layout Standard
24085 Citation labels are generated by the same machinery that generates \SpecialChar LyX
24086 's on-screen
24087  labels, so the labels will look in the output much as they do in \SpecialChar LyX
24088 , though
24089  better.
24090  If you are using numerical citations, then \SpecialChar LyX
24091  will output numerical labels,
24092  such as [1] or [17], rather than simply showing the citation key in square
24093  brackets, as it does on-screen.
24094  If you are using author-year citations, then \SpecialChar LyX
24095  will add lowercase letters
24096  to the years, just as Bib\SpecialChar TeX
24097  does, if it finds more than one citation for
24098  a given author-year combination.
24099  The labels will be printed with the bibliography entries.
24100  Note that there is, at present, no way to customize the appearance of the
24101  labels, for example, to choose between square brackets and parentheses.
24102 \end_layout
24103
24104 \begin_layout Standard
24105 Bibliography output is handled by the same machinery that handles the presentati
24106 on of reference information in the citation dialog, so you will see in the
24107  XHTML output pretty much what you would see if you were to look at a given
24108  entry in the citation dialog.
24109  The formatting can be customized in your layout file or, preferably, in
24110  a module.
24111  See the 
24112 \emph on
24113 Customization
24114 \emph default
24115  manual for the details.
24116 \end_layout
24117
24118 \begin_layout Standard
24119 The main defect at present is that cross-referenced information is printed
24120  with every entry with which it is associated.
24121  So you can see things like this:
24122 \end_layout
24123
24124 \begin_layout Quote
24125 Jason Stanley, 
24126 \begin_inset Quotes eld
24127 \end_inset
24128
24129 Context and Logical Form
24130 \begin_inset Quotes erd
24131 \end_inset
24132
24133 , in 
24134 \emph on
24135 Language in Context: Selected Essays
24136 \emph default
24137  (Oxford: Oxford University Press, 2007), pp.
24138  30–68.
24139 \end_layout
24140
24141 \begin_layout Quote
24142 Jason Stanley, 
24143 \begin_inset Quotes eld
24144 \end_inset
24145
24146 Semantics in Context
24147 \begin_inset Quotes erd
24148 \end_inset
24149
24150 , in 
24151 \emph on
24152 Language in Context: Selected Essays
24153 \emph default
24154  (Oxford: Oxford University Press, 2007), pp.
24155  201–30.
24156 \end_layout
24157
24158 \begin_layout Standard
24159 This should be fixed before long.
24160 \end_layout
24161
24162 \begin_layout Standard
24163 There is no support at present for sectioned bibliographies.
24164  If you have multiple bibliographies, then \SpecialChar LyX
24165  will print the same bibliography
24166  over and over.
24167 \end_layout
24168
24169 \begin_layout Section
24170 Indexes
24171 \end_layout
24172
24173 \begin_layout Standard
24174 \SpecialChar LyX
24175  will happily export indexes as XHTML, but with certain limitations at the
24176  moment.
24177 \end_layout
24178
24179 \begin_layout Standard
24180 Index export will be most reliable when you do not attempt to use the fancy
24181  constructs that are described in the section on indexes in the 
24182 \emph on
24183 User's Guide
24184 \emph default
24185 .
24186 \begin_inset Foot
24187 status collapsed
24188
24189 \begin_layout Plain Layout
24190 The main issue here is that \SpecialChar LyX
24191  itself does not really handle these.
24192  It just lets you enter what you would have to enter in raw \SpecialChar LaTeX
24193 .
24194 \end_layout
24195
24196 \end_inset
24197
24198  We'll describe how they are handled using the subsection headings from
24199  that section.
24200 \end_layout
24201
24202 \begin_layout Itemize
24203 Grouping Index Entries (aka, sub-entries): \SpecialChar LyX
24204  makes an effort to support these,
24205  but the entries must be separated by 
24206 \begin_inset Quotes eld
24207 \end_inset
24208
24209  ! 
24210 \begin_inset Quotes erd
24211 \end_inset
24212
24213 , that is, there must be spaces around the exclamation point.
24214  This is because it is otherwise too difficult to check for escaped exclamation
24215  points, ones in math, and so forth.
24216 \end_layout
24217
24218 \begin_layout Itemize
24219 Page Ranges: There is no support at all for page ranges, since these make
24220  no sense with XHMTL.
24221  Instead, you will just get two index entries, one at either end.
24222 \end_layout
24223
24224 \begin_layout Itemize
24225 Cross-referencing: There is no support for cross-referencing.
24226  If \SpecialChar LyX
24227  finds an entry containing the 
24228 \begin_inset Quotes eld
24229 \end_inset
24230
24231 |see\SpecialChar ldots
24232
24233 \begin_inset Quotes erd
24234 \end_inset
24235
24236  construct, it is just dropped, and the rest is treated as an ordinary index
24237  entry.
24238 \end_layout
24239
24240 \begin_layout Itemize
24241 Index Entry Order: \SpecialChar LyX
24242  does support attempts to fix the sorting order.
24243  It will take what is before the first `@' it finds and use that for sorting,
24244  taking what follows the first `@' to be the actual entry.
24245  At present, \SpecialChar LyX
24246  does not check for escaped `@', so do not try to index email
24247  addresses.
24248 \end_layout
24249
24250 \begin_layout Itemize
24251 Index Entry Layout: You can format entries by using the text style dialog,
24252  or by using any other method available within \SpecialChar LyX
24253  itself.
24254  There is no support for constructs like: 
24255 \begin_inset Quotes eld
24256 \end_inset
24257
24258 entry|textbf
24259 \begin_inset Quotes erd
24260 \end_inset
24261
24262 .
24263  Indeed, if \SpecialChar LyX
24264  finds a pipe symbol, `|', in an entry, it will delete it and
24265  everything that follows it.
24266 \end_layout
24267
24268 \begin_layout Itemize
24269 Multiple Indexes: There is no support for multiple indexes.
24270  Rather, all index entries will be printed as one large index.
24271  To avoid our printing several versions of the index, we print only the
24272  main index, so make sure you have one.
24273 \end_layout
24274
24275 \begin_layout Section
24276 Nomenclature and Glossary
24277 \end_layout
24278
24279 \begin_layout Standard
24280 There is at present no support for glossaries.
24281  Adding it would be fairly trivial, and welcome.
24282 \end_layout
24283
24284 \begin_layout Chapter
24285 The \SpecialChar LyX
24286  Server
24287 \end_layout
24288
24289 \begin_layout Section
24290 Introduction
24291 \end_layout
24292
24293 \begin_layout Standard
24294 The `\SpecialChar LyX
24295  server' allows other programs to talk to \SpecialChar LyX
24296 , invoke \SpecialChar LyX
24297  commands, and retrieve
24298  information about the \SpecialChar LyX
24299  internal state.
24300  This is only intended for advanced users, but they should find it useful.
24301  It is by writing to the \SpecialChar LyX
24302  server, for example, that bibliography managers,
24303  such as JabRef, are able to 
24304 \begin_inset Quotes eld
24305 \end_inset
24306
24307 push
24308 \begin_inset Quotes erd
24309 \end_inset
24310
24311  citations to \SpecialChar LyX
24312 .
24313 \end_layout
24314
24315 \begin_layout Section
24316 Starting the \SpecialChar LyX
24317  Server
24318 \end_layout
24319
24320 \begin_layout Standard
24321 The \SpecialChar LyX
24322  server works through the use of a pair of named pipes.
24323  These are usually located in 
24324 \begin_inset Flex Code
24325 status collapsed
24326
24327 \begin_layout Plain Layout
24328 UserDir
24329 \end_layout
24330
24331 \end_inset
24332
24333 , (except on Windows, where 
24334 \emph on
24335 local
24336 \emph default
24337  named pipes are special objects located in 
24338 \begin_inset Flex Code
24339 status collapsed
24340
24341 \begin_layout Plain Layout
24342
24343 \backslash
24344
24345 \backslash
24346 .
24347 \backslash
24348 pipe
24349 \end_layout
24350
24351 \end_inset
24352
24353 ) and have the names 
24354 \begin_inset Quotes eld
24355 \end_inset
24356
24357
24358 \begin_inset Flex Code
24359 status collapsed
24360
24361 \begin_layout Plain Layout
24362 lyxpipe.in
24363 \end_layout
24364
24365 \end_inset
24366
24367
24368 \begin_inset Quotes erd
24369 \end_inset
24370
24371  and 
24372 \begin_inset Quotes eld
24373 \end_inset
24374
24375
24376 \begin_inset Flex Code
24377 status collapsed
24378
24379 \begin_layout Plain Layout
24380 lyxpipe.out
24381 \end_layout
24382
24383 \end_inset
24384
24385
24386 \begin_inset Quotes erd
24387 \end_inset
24388
24389 .
24390  External programs write into 
24391 \begin_inset Flex Code
24392 status collapsed
24393
24394 \begin_layout Plain Layout
24395 lyxpipe.in
24396 \end_layout
24397
24398 \end_inset
24399
24400  and read back data from 
24401 \begin_inset Flex Code
24402 status collapsed
24403
24404 \begin_layout Plain Layout
24405 lyxpipe.out
24406 \end_layout
24407
24408 \end_inset
24409
24410 .
24411  The stem of the pipe names can be defined in the 
24412 \begin_inset Flex Noun
24413 status collapsed
24414
24415 \begin_layout Plain Layout
24416 Tools\SpecialChar menuseparator
24417 Preferences
24418 \end_layout
24419
24420 \end_inset
24421
24422  dialog, for example 
24423 \begin_inset Flex Code
24424 status collapsed
24425
24426 \begin_layout Plain Layout
24427 "/home/myhome/lyxpipe"
24428 \end_layout
24429
24430 \end_inset
24431
24432 , or 
24433 \begin_inset Flex Code
24434 status collapsed
24435
24436 \begin_layout Plain Layout
24437 "
24438 \backslash
24439
24440 \backslash
24441 .
24442 \backslash
24443 pipe
24444 \backslash
24445 lyxpipe"
24446 \end_layout
24447
24448 \end_inset
24449
24450  on Windows (where any working path instead of lyxpipe can be used, for
24451  example 
24452 \begin_inset Flex Code
24453 status collapsed
24454
24455 \begin_layout Plain Layout
24456 "
24457 \backslash
24458
24459 \backslash
24460 .
24461 \backslash
24462 pipe
24463 \backslash
24464 my
24465 \backslash
24466 lyx
24467 \backslash
24468 pipe"
24469 \end_layout
24470
24471 \end_inset
24472
24473  would also work).
24474  You 
24475 \emph on
24476 must
24477 \emph default
24478  configure this manually in order for the server to start.
24479 \end_layout
24480
24481 \begin_layout Standard
24482 \SpecialChar LyX
24483  will add the '
24484 \begin_inset Flex Code
24485 status collapsed
24486
24487 \begin_layout Plain Layout
24488 .in
24489 \end_layout
24490
24491 \end_inset
24492
24493 ' and '
24494 \begin_inset Flex Code
24495 status collapsed
24496
24497 \begin_layout Plain Layout
24498 .out
24499 \end_layout
24500
24501 \end_inset
24502
24503 ' to create the pipes.
24504  If one of the pipes already exists, \SpecialChar LyX
24505  will assume that another \SpecialChar LyX
24506  process
24507  is already running and will not start the server.
24508  On POSIX (Unix like) systems, if for some other reason, an unused 
24509 \begin_inset Quotes eld
24510 \end_inset
24511
24512 stale
24513 \begin_inset Quotes erd
24514 \end_inset
24515
24516  pipe is left in existence when \SpecialChar LyX
24517  closes, then \SpecialChar LyX
24518  will try to delete it.
24519  If this fails for some reason, you will need to delete the pipes manually
24520  and then restart \SpecialChar LyX
24521 .
24522  On Windows, pipes are deleted by the OS on program termination or crash,
24523  so 
24524 \begin_inset Quotes eld
24525 \end_inset
24526
24527 stale
24528 \begin_inset Quotes erd
24529 \end_inset
24530
24531  pipes should not be possible.
24532 \end_layout
24533
24534 \begin_layout Standard
24535 To have several \SpecialChar LyX
24536  processes with servers at the same time, you have to use
24537  different configurations, perhaps by using separate user directories, each
24538  with its own 
24539 \begin_inset Flex Code
24540 status collapsed
24541
24542 \begin_layout Plain Layout
24543 preferences
24544 \end_layout
24545
24546 \end_inset
24547
24548  file, for each process.
24549 \end_layout
24550
24551 \begin_layout Standard
24552 If you are developing a client program, you might find it useful to enable
24553  debugging information from the \SpecialChar LyX
24554  server.
24555  Do this by starting \SpecialChar LyX
24556  as 
24557 \begin_inset Flex Code
24558 status collapsed
24559
24560 \begin_layout Plain Layout
24561 lyx -dbg lyxserver
24562 \end_layout
24563
24564 \end_inset
24565
24566 .
24567 \end_layout
24568
24569 \begin_layout Standard
24570 You can find a complete example client written in C++ in the source distribution
24571  as 
24572 \begin_inset Flex Code
24573 status collapsed
24574
24575 \begin_layout Plain Layout
24576 development/lyxserver/server_monitor.cpp
24577 \end_layout
24578
24579 \end_inset
24580
24581 .
24582 \end_layout
24583
24584 \begin_layout Standard
24585 Another useful tool is the command-line based client found in 
24586 \begin_inset Flex Code
24587 status collapsed
24588
24589 \begin_layout Plain Layout
24590 src/client/lyxclient
24591 \end_layout
24592
24593 \end_inset
24594
24595 .
24596 \end_layout
24597
24598 \begin_layout Section
24599 Normal communication
24600 \end_layout
24601
24602 \begin_layout Standard
24603 To issue a \SpecialChar LyX
24604  call, the client writes a line of ASCII text into the input
24605  pipe.
24606  This line has the following format:
24607 \end_layout
24608
24609 \begin_layout Quote
24610 LYXCMD:
24611 \emph on
24612 clientname
24613 \emph default
24614 :
24615 \emph on
24616 function
24617 \emph default
24618 :
24619 \emph on
24620 argument
24621 \end_layout
24622
24623 \begin_layout Description
24624 clientname is a name that the client can choose arbitrarily.
24625  Its only use is that \SpecialChar LyX
24626  will echo it if it sends an answer—so a client can
24627  dispatch results from different requesters.
24628 \end_layout
24629
24630 \begin_layout Description
24631 function is the function you want \SpecialChar LyX
24632  to perform.
24633  It is the same as the commands you'd use in the minibuffer.
24634 \end_layout
24635
24636 \begin_layout Description
24637 argument is an optional argument which is meaningful only to some functions
24638  (for instance, the 
24639 \begin_inset Quotes eld
24640 \end_inset
24641
24642 self-insert
24643 \begin_inset Quotes erd
24644 \end_inset
24645
24646  LFUN will insert the argument as text at the cursor position).
24647 \end_layout
24648
24649 \begin_layout Standard
24650 The answer from \SpecialChar LyX
24651  will arrive in the output pipe and be of the form
24652 \end_layout
24653
24654 \begin_layout Quote
24655 INFO:
24656 \emph on
24657 clientname
24658 \emph default
24659 :
24660 \emph on
24661 function
24662 \emph default
24663 :
24664 \emph on
24665 data
24666 \end_layout
24667
24668 \begin_layout Standard
24669 where 
24670 \emph on
24671 clientname
24672 \emph default
24673  and 
24674 \emph on
24675 function
24676 \emph default
24677  are just echoed from the command request, while 
24678 \emph on
24679 data
24680 \emph default
24681  is more or less useful information filled according to how the command
24682  execution worked out.
24683  Some commands, such as 
24684 \begin_inset Quotes eld
24685 \end_inset
24686
24687 font-state
24688 \begin_inset Quotes erd
24689 \end_inset
24690
24691 , will return information about the internal state of \SpecialChar LyX
24692 , while other will
24693  return an empty data-response.
24694  This means that the command execution went fine.
24695 \end_layout
24696
24697 \begin_layout Standard
24698 In case of errors, the response from \SpecialChar LyX
24699  will have this form
24700 \end_layout
24701
24702 \begin_layout Quote
24703 ERROR:
24704 \emph on
24705 clientname
24706 \emph default
24707 :
24708 \emph on
24709 function
24710 \emph default
24711 :
24712 \emph on
24713 error message
24714 \end_layout
24715
24716 \begin_layout Standard
24717 where the 
24718 \emph on
24719 error message
24720 \emph default
24721  should contain an explanation of why the command failed.
24722 \end_layout
24723
24724 \begin_layout Standard
24725 Examples:
24726 \end_layout
24727
24728 \begin_layout LyX-Code
24729 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
24730 \begin_inset Newline newline
24731 \end_inset
24732
24733 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
24734 \begin_inset Newline newline
24735 \end_inset
24736
24737 read a <~/.lyxpipe.out
24738 \begin_inset Newline newline
24739 \end_inset
24740
24741 echo $a
24742 \end_layout
24743
24744 \begin_layout Subsection
24745 AppleScript (Mac OS X)
24746 \end_layout
24747
24748 \begin_layout Standard
24749 Since \SpecialChar LyX
24750  2.1, \SpecialChar LyX
24751  supports basic interactions with AppleScript for normal communicatio
24752 n through the command run.
24753  This command takes a direct argument (the 
24754 \series bold
24755 function
24756 \series default
24757  to perform) and an optional argument.
24758  It either returns the output of the function or triggers an error with
24759  the error message and code.
24760 \end_layout
24761
24762 \begin_layout Standard
24763 Example:
24764 \end_layout
24765
24766 \begin_layout LyX-Code
24767 tell application "\SpecialChar LyX
24768 "
24769 \end_layout
24770
24771 \begin_layout LyX-Code
24772   try
24773 \end_layout
24774
24775 \begin_layout LyX-Code
24776     -- Stores the current file name into f
24777 \end_layout
24778
24779 \begin_layout LyX-Code
24780     set f to (run "server-get-filename" with argument "")
24781 \end_layout
24782
24783 \begin_layout LyX-Code
24784     on error the error_message number the error_number
24785 \end_layout
24786
24787 \begin_layout LyX-Code
24788       display dialog "Error: " & the error_number & ".
24789  " ¬
24790 \end_layout
24791
24792 \begin_layout LyX-Code
24793               & the error_message buttons {"OK"} default button 1
24794 \end_layout
24795
24796 \begin_layout LyX-Code
24797   end try
24798 \end_layout
24799
24800 \begin_layout LyX-Code
24801 end tell
24802 \end_layout
24803
24804 \begin_layout Section
24805 Notification
24806 \end_layout
24807
24808 \begin_layout Standard
24809 \SpecialChar LyX
24810  can notify clients of events going on asynchronously.
24811  Currently it will only do this if the user binds a key sequence with the
24812  function 
24813 \begin_inset Quotes eld
24814 \end_inset
24815
24816 notify
24817 \begin_inset Quotes erd
24818 \end_inset
24819
24820 .
24821  The format of the string \SpecialChar LyX
24822  sends is as follows:
24823 \end_layout
24824
24825 \begin_layout Quote
24826 \begin_inset Flex Code
24827 status collapsed
24828
24829 \begin_layout Plain Layout
24830 NOTIFY:
24831 \end_layout
24832
24833 \end_inset
24834
24835
24836 \emph on
24837 key-sequence
24838 \end_layout
24839
24840 \begin_layout Standard
24841 where 
24842 \emph on
24843 key-sequence
24844 \emph default
24845  is the printed representation of the key sequence that was actually typed
24846  by the user.
24847 \end_layout
24848
24849 \begin_layout Standard
24850 This mechanism can be used to extend \SpecialChar LyX
24851 's command set and implement macros.
24852  Bind some key sequence to 
24853 \begin_inset Quotes eld
24854 \end_inset
24855
24856 notify
24857 \begin_inset Quotes erd
24858 \end_inset
24859
24860 .
24861  Then start a client that listens on the output pipe, dispatches the command
24862  according to the sequence, and starts a function that may use \SpecialChar LyX
24863  calls and
24864  \SpecialChar LyX
24865  requests to issue a command or a series of commands to \SpecialChar LyX
24866 .
24867 \end_layout
24868
24869 \begin_layout Section
24870 The simple \SpecialChar LyX
24871  Server Protocol
24872 \end_layout
24873
24874 \begin_layout Standard
24875 \SpecialChar LyX
24876  implements a simple protocol that can be used for session management.
24877  All messages are of the form
24878 \end_layout
24879
24880 \begin_layout Quote
24881 LYXSRV:
24882 \emph on
24883 clientname
24884 \emph default
24885 :
24886 \emph on
24887 protocol message
24888 \end_layout
24889
24890 \begin_layout Standard
24891 where 
24892 \emph on
24893 protocol message
24894 \emph default
24895  can be 
24896 \begin_inset Quotes eld
24897 \end_inset
24898
24899 hello
24900 \begin_inset Quotes erd
24901 \end_inset
24902
24903  or 
24904 \begin_inset Quotes eld
24905 \end_inset
24906
24907 bye
24908 \begin_inset Quotes erd
24909 \end_inset
24910
24911 .
24912  If 
24913 \begin_inset Quotes eld
24914 \end_inset
24915
24916 hello
24917 \begin_inset Quotes erd
24918 \end_inset
24919
24920  is received from a client, \SpecialChar LyX
24921  will report back to inform the client that
24922  it's listening to it's messages, while 
24923 \begin_inset Quotes eld
24924 \end_inset
24925
24926 bye
24927 \begin_inset Quotes erd
24928 \end_inset
24929
24930  sent from \SpecialChar LyX
24931  will inform clients that \SpecialChar LyX
24932  is closing.
24933 \end_layout
24934
24935 \begin_layout Section
24936 Reverse DVI/PDF search
24937 \end_layout
24938
24939 \begin_layout Standard
24940 Some DVI/PDF viewers
24941 \begin_inset Foot
24942 status collapsed
24943
24944 \begin_layout Plain Layout
24945 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
24946  Qpdfview on Unix, Skim on Mac OSX and SumatraPDF on Windows.
24947 \end_layout
24948
24949 \end_inset
24950
24951  provide 
24952 \emph on
24953 reverse search
24954 \emph default
24955  facility (also called 
24956 \emph on
24957 inverse search
24958 \emph default
24959 ).
24960  This means that you can tell \SpecialChar LyX
24961  to put the cursor to a specific line in the
24962  document by clicking at the respective position in the DVI/PDF output.
24963  To achieve this, the viewer must be able to communicate with \SpecialChar LyX
24964 .
24965  This is done via the \SpecialChar LyX
24966  server either by using the named pipe (
24967 \emph on
24968 lyxpipe
24969 \emph default
24970 ), or the UNIX domain socket (
24971 \emph on
24972 lyxsocket
24973 \emph default
24974 ) that \SpecialChar LyX
24975  creates in its temporary directory (this is the way the 
24976 \begin_inset Flex Code
24977 status collapsed
24978
24979 \begin_layout Plain Layout
24980 lyxclient
24981 \end_layout
24982
24983 \end_inset
24984
24985  program communicates with \SpecialChar LyX
24986 ).
24987  In some cases, you need a helper script that mediates between the viewer
24988  and \SpecialChar LyX
24989 , in others, the viewer can communicate with \SpecialChar LyX
24990  directly.
24991  This depends on the selected viewer and on your operating system.
24992  The same applies to the way viewers need to be configured and the way the
24993  reverse search is actually performed.
24994  In what follows, we will thus describe how to setup reverse search for
24995  specific viewers.
24996  Before we turn to this, though, we will explain what needs to be done generally
24997  to enable reverse search in the DVI/PDF output.
24998 \end_layout
24999
25000 \begin_layout Subsection
25001 Automatic setup
25002 \begin_inset CommandInset label
25003 LatexCommand label
25004 name "subsec:rev-search"
25005
25006 \end_inset
25007
25008
25009 \end_layout
25010
25011 \begin_layout Standard
25012 In most cases \SpecialChar LyX
25013  will do the work for you by enabling the option 
25014 \begin_inset Flex Noun
25015 status collapsed
25016
25017 \begin_layout Plain Layout
25018 Synchronize with Output
25019 \end_layout
25020
25021 \end_inset
25022
25023  in the menu 
25024 \begin_inset Flex Noun
25025 status collapsed
25026
25027 \begin_layout Plain Layout
25028 Document\SpecialChar menuseparator
25029 Settings\SpecialChar menuseparator
25030 Output
25031 \end_layout
25032
25033 \end_inset
25034
25035 .
25036  In such a case \SpecialChar LyX
25037  will automatically insert the necessary Sync\SpecialChar TeX
25038  macro (for
25039  PDF) or load the srcltx package (for DVI) respectively.
25040  This option can be easily reached also on 
25041 \begin_inset Flex Code
25042 status collapsed
25043
25044 \begin_layout Plain Layout
25045 View/Update
25046 \end_layout
25047
25048 \end_inset
25049
25050  Toolbar.
25051 \end_layout
25052
25053 \begin_layout Standard
25054 If you need a different setting, you can select or input a custom macro
25055  from the drop down box just below 
25056 \begin_inset Flex Noun
25057 status collapsed
25058
25059 \begin_layout Plain Layout
25060 Document\SpecialChar menuseparator
25061 Settings\SpecialChar menuseparator
25062 Output\SpecialChar menuseparator
25063 Synchronize with Output
25064 \end_layout
25065
25066 \end_inset
25067
25068 .
25069 \end_layout
25070
25071 \begin_layout Standard
25072 Note that the method 
25073 \begin_inset Flex Code
25074 status collapsed
25075
25076 \begin_layout Plain Layout
25077
25078 \backslash
25079 synctex=1
25080 \end_layout
25081
25082 \end_inset
25083
25084  enables gzip compression.
25085  If your viewer does not support it, you should instead use 
25086 \begin_inset Flex Code
25087 status collapsed
25088
25089 \begin_layout Plain Layout
25090
25091 \backslash
25092 synctex=-1
25093 \end_layout
25094
25095 \end_inset
25096
25097 .
25098 \end_layout
25099
25100 \begin_layout Standard
25101 Please also note that including the 
25102 \begin_inset Flex Code
25103 status collapsed
25104
25105 \begin_layout Plain Layout
25106 srcltx
25107 \end_layout
25108
25109 \end_inset
25110
25111  package or 
25112 \begin_inset Flex Code
25113 status collapsed
25114
25115 \begin_layout Plain Layout
25116 src-specials
25117 \end_layout
25118
25119 \end_inset
25120
25121  sometimes has an undesired impact on the typesetting.
25122  Thus, you should switch output synchronization off for the final typesetting
25123  if you use the 
25124 \begin_inset Flex Code
25125 status collapsed
25126
25127 \begin_layout Plain Layout
25128 srcltx
25129 \end_layout
25130
25131 \end_inset
25132
25133  package or 
25134 \begin_inset Flex Code
25135 status collapsed
25136
25137 \begin_layout Plain Layout
25138 src-specials
25139 \end_layout
25140
25141 \end_inset
25142
25143 .
25144  
25145 \end_layout
25146
25147 \begin_layout Standard
25148 In case you need some more special settings that are not covered by the
25149  automatic settings, read the next section about how to set up output synchroniz
25150 ation manually.
25151  If the automatic setup suits your needs, you can readily jump to section
25152 \begin_inset space ~
25153 \end_inset
25154
25155
25156 \begin_inset CommandInset ref
25157 LatexCommand ref
25158 reference "subsec:configuring-viewers"
25159
25160 \end_inset
25161
25162 , where the necessary configuration steps in your viewer – needed both with
25163  the automatic and the manual setup – are described.
25164 \end_layout
25165
25166 \begin_layout Subsection
25167 Manual setup
25168 \end_layout
25169
25170 \begin_layout Standard
25171 \SpecialChar LaTeX
25172  provides several different methods for reverse search.
25173  Some are built-in in the 
25174 \begin_inset Flex Code
25175 status collapsed
25176
25177 \begin_layout Plain Layout
25178 latex/pdflatex
25179 \end_layout
25180
25181 \end_inset
25182
25183  program, some are provided by external packages.
25184  Your choice depends on whether your \SpecialChar LaTeX
25185  distribution already provides a given
25186  method (the built-in methods are rather new) and whether your viewer can
25187  cope with it.
25188  The available methods are described in the following.
25189 \end_layout
25190
25191 \begin_layout Subsubsection*
25192 Built-in DVI-search via src-specials (DVI only) 
25193 \end_layout
25194
25195 \begin_layout Standard
25196 This method provides the DVI file with the necessary information for reverse
25197  search.
25198  It is available in \SpecialChar LaTeX
25199  since quite some time (any somewhat recent \SpecialChar LaTeX
25200  distribution
25201  should include it), and it works reliably.
25202  To enable it, change the 
25203 \begin_inset Flex Noun
25204 status collapsed
25205
25206 \begin_layout Plain Layout
25207 La
25208 \family sans
25209 TeX
25210 \family default
25211  (plain)->DVI
25212 \end_layout
25213
25214 \end_inset
25215
25216  or 
25217 \begin_inset Flex Noun
25218 status collapsed
25219
25220 \begin_layout Plain Layout
25221 La
25222 \family sans
25223 TeX
25224 \family default
25225  (plain)->DraftDVI
25226 \end_layout
25227
25228 \end_inset
25229
25230  converter in 
25231 \begin_inset Flex Noun
25232 status collapsed
25233
25234 \begin_layout Plain Layout
25235 Preferences\SpecialChar menuseparator
25236 File Handling\SpecialChar menuseparator
25237 Converters
25238 \end_layout
25239
25240 \end_inset
25241
25242  to 
25243 \begin_inset Flex Code
25244 status collapsed
25245
25246 \begin_layout Plain Layout
25247 latex -src-specials $$i
25248 \end_layout
25249
25250 \end_inset
25251
25252 .
25253  If this doesn't work, check if your \SpecialChar TeX
25254  engine needs different options (the
25255  syntax might differ in some distributions).
25256 \end_layout
25257
25258 \begin_layout Subsubsection*
25259 External Packages (PDFSync and scrltx) 
25260 \end_layout
25261
25262 \begin_layout Standard
25263 The packages 
25264 \emph on
25265 pdfsync
25266 \emph default
25267  and 
25268 \emph on
25269 scrltx
25270 \emph default
25271  provide reverse search facility for PDF output (via pdflatex) and DVI output,
25272  respectively.
25273  In order to enable it, load the packages in the \SpecialChar LyX
25274  preamble: 
25275 \end_layout
25276
25277 \begin_layout Itemize
25278 \begin_inset Flex Code
25279 status collapsed
25280
25281 \begin_layout Plain Layout
25282
25283 \backslash
25284 usepackage{pdfsync}
25285 \end_layout
25286
25287 \end_inset
25288
25289  for reverse PDF search,
25290 \end_layout
25291
25292 \begin_layout Itemize
25293 \begin_inset Flex Code
25294 status collapsed
25295
25296 \begin_layout Plain Layout
25297
25298 \backslash
25299 usepackage[active]{srcltx}
25300 \end_layout
25301
25302 \end_inset
25303
25304  for reverse DVI search.
25305 \end_layout
25306
25307 \begin_layout Standard
25308 If you want to be able to perform both DVI and PDF reverse searches, you
25309  can also insert in the preamble the following lines
25310 \end_layout
25311
25312 \begin_layout LyX-Code
25313
25314 \backslash
25315 usepackage{ifpdf}
25316 \begin_inset Newline newline
25317 \end_inset
25318
25319
25320 \backslash
25321 ifpdf
25322 \begin_inset Newline newline
25323 \end_inset
25324
25325   
25326 \backslash
25327 usepackage{pdfsync}
25328 \begin_inset Newline newline
25329 \end_inset
25330
25331
25332 \backslash
25333 else
25334 \begin_inset Newline newline
25335 \end_inset
25336
25337   
25338 \backslash
25339 usepackage[active]{srcltx}
25340 \begin_inset Newline newline
25341 \end_inset
25342
25343
25344 \backslash
25345 fi
25346 \end_layout
25347
25348 \begin_layout Standard
25349 This way, you can preview the file as either DVI or PDF (pdflatex) and the
25350  right package will be used.
25351 \end_layout
25352
25353 \begin_layout Standard
25354 Note that PDFSync might affect the output layout of your document.
25355  It is therefore advised to disable PDFsync for final documents.
25356 \end_layout
25357
25358 \begin_layout Subsubsection*
25359 Built-in reverse search via Sync\SpecialChar TeX
25360  (DVI and PDF) 
25361 \end_layout
25362
25363 \begin_layout Standard
25364 Recent versions of 
25365 \begin_inset Flex Code
25366 status collapsed
25367
25368 \begin_layout Plain Layout
25369 (pdf)latex
25370 \end_layout
25371
25372 \end_inset
25373
25374  have built-in support for both PDF and DVI reverse search.
25375  This so-called 
25376 \emph on
25377 Sync\SpecialChar TeX
25378
25379 \emph default
25380  facility is basically the result of the integration of the PDFSync package
25381  to the pdftex program and its merge with the 
25382 \emph on
25383 scr-specials
25384 \emph default
25385  approach.
25386  You need at least \SpecialChar TeX
25387 Live 2008 or a recent Mik\SpecialChar TeX
25388  distribution in order to use
25389  it.
25390 \begin_inset Foot
25391 status collapsed
25392
25393 \begin_layout Plain Layout
25394 For some reason, Mik\SpecialChar TeX
25395  does not understand/obey the command \SpecialChar LyX
25396  inserts into
25397  the preamble when you check the "Enable Forward/Reverse Search" button
25398  in the toolbar and does not generate the necessary info.
25399 \end_layout
25400
25401 \begin_layout Plain Layout
25402 The generation of the required info can be forced by changing the converter
25403  "\SpecialChar LaTeX
25404  (pdflatex) -> PDF (pdflatex)" in Preferences->File handling->Converters
25405  from the default "pdflatex $$i" to "pdflatex -synctex=1 $$i" (i.e., by adding
25406  the -synctex=1 switch).
25407 \end_layout
25408
25409 \end_inset
25410
25411  Also note that only a few PDF viewers (Okular and Qpdfview on Unix, Skim
25412  on the Mac, SumatraPDF on Windows) already provide Sync\SpecialChar TeX
25413  support.
25414 \end_layout
25415
25416 \begin_layout Standard
25417 To enable Sync\SpecialChar TeX
25418  for DVI output, change the 
25419 \begin_inset Flex Noun
25420 status collapsed
25421
25422 \begin_layout Plain Layout
25423 La
25424 \family sans
25425 TeX
25426 \family default
25427  (plain) -> DVI
25428 \end_layout
25429
25430 \end_inset
25431
25432  or 
25433 \begin_inset Flex Noun
25434 status collapsed
25435
25436 \begin_layout Plain Layout
25437 La
25438 \family sans
25439 TeX
25440 \family default
25441  (plain) -> DraftDVI
25442 \end_layout
25443
25444 \end_inset
25445
25446  converter in 
25447 \begin_inset Flex Noun
25448 status collapsed
25449
25450 \begin_layout Plain Layout
25451 Preferences\SpecialChar menuseparator
25452 File Handling\SpecialChar menuseparator
25453 Converters
25454 \end_layout
25455
25456 \end_inset
25457
25458  to 
25459 \begin_inset Flex Code
25460 status collapsed
25461
25462 \begin_layout Plain Layout
25463 latex -synctex=1 $$i
25464 \end_layout
25465
25466 \end_inset
25467
25468 , and for PDF output, change the 
25469 \begin_inset Flex Noun
25470 status collapsed
25471
25472 \begin_layout Plain Layout
25473 La
25474 \family sans
25475 TeX
25476 \family default
25477  (pdflatex) -> PDF (pdflatex)
25478 \end_layout
25479
25480 \end_inset
25481
25482  or converter to 
25483 \begin_inset Flex Code
25484 status collapsed
25485
25486 \begin_layout Plain Layout
25487 pdflatex -synctex=1 $$i
25488 \end_layout
25489
25490 \end_inset
25491
25492 .
25493  Check the documentation of your viewer whether the viewer needs to be configure
25494 d for the use with Sync\SpecialChar TeX
25495 .
25496 \begin_inset Foot
25497 status collapsed
25498
25499 \begin_layout Plain Layout
25500 Note that the option 
25501 \begin_inset Flex Code
25502 status collapsed
25503
25504 \begin_layout Plain Layout
25505 -synctex=1
25506 \end_layout
25507
25508 \end_inset
25509
25510  option enables gzip compression.
25511  If your viewer does not support it, you should instead use 
25512 \begin_inset Flex Code
25513 status collapsed
25514
25515 \begin_layout Plain Layout
25516 -synctex=-1
25517 \end_layout
25518
25519 \end_inset
25520
25521 .
25522 \end_layout
25523
25524 \end_inset
25525
25526
25527 \end_layout
25528
25529 \begin_layout Subsection
25530 Configuring and using specific viewers
25531 \begin_inset CommandInset label
25532 LatexCommand label
25533 name "subsec:configuring-viewers"
25534
25535 \end_inset
25536
25537
25538 \end_layout
25539
25540 \begin_layout Subsubsection*
25541 Xdvi (all platforms)
25542 \end_layout
25543
25544 \begin_layout Standard
25545 If you use 
25546 \begin_inset Flex Code
25547 status collapsed
25548
25549 \begin_layout Plain Layout
25550 xdvi
25551 \end_layout
25552
25553 \end_inset
25554
25555 , you don't need to do anything else for performing a reverse DVI search,
25556  as \SpecialChar LyX
25557  already provides the necessary hooks for automatically using the 
25558 \begin_inset Flex Code
25559 status collapsed
25560
25561 \begin_layout Plain Layout
25562 lyxclient
25563 \end_layout
25564
25565 \end_inset
25566
25567  program.
25568  Just setup your document as described above (reverse search is triggered
25569  by Ctrl-click or Alt-click on Mac OSX, respectively).
25570 \end_layout
25571
25572 \begin_layout Standard
25573 However, if for whatever reason you want to use the named pipe instead of
25574  the socket for communicating with \SpecialChar LyX
25575 , simply change the DVI viewer in 
25576 \begin_inset Flex Noun
25577 status collapsed
25578
25579 \begin_layout Plain Layout
25580 Preferences\SpecialChar menuseparator
25581 File Handling\SpecialChar menuseparator
25582 File formats
25583 \end_layout
25584
25585 \end_inset
25586
25587  to
25588 \begin_inset Foot
25589 status collapsed
25590
25591 \begin_layout Plain Layout
25592 On Mac OSX you have to use 
25593 \begin_inset Flex Code
25594 status collapsed
25595
25596 \begin_layout Plain Layout
25597 DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l"
25598 \end_layout
25599
25600 \end_inset
25601
25602
25603 \end_layout
25604
25605 \end_inset
25606
25607  
25608 \begin_inset Flex Code
25609 status collapsed
25610
25611 \begin_layout Plain Layout
25612 xdvi -editor "lyxeditor.sh %f %l"
25613 \end_layout
25614
25615 \end_inset
25616
25617 , where 
25618 \begin_inset Flex Code
25619 status collapsed
25620
25621 \begin_layout Plain Layout
25622 lyxeditor.sh
25623 \end_layout
25624
25625 \end_inset
25626
25627  is a suitable script.
25628  For example, a minimal shell script is the following one:
25629 \end_layout
25630
25631 \begin_layout LyX-Code
25632 #!/bin/sh
25633 \begin_inset Newline newline
25634 \end_inset
25635
25636 LYXPIPE="/path/to/lyxpipe"
25637 \begin_inset Newline newline
25638 \end_inset
25639
25640 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
25641 \begin_inset Newline newline
25642 \end_inset
25643
25644 echo "$COMMAND" > "${LYXPIPE}".in || exit
25645 \begin_inset Newline newline
25646 \end_inset
25647
25648 read TMP < "${LYXPIPE}".out || exit
25649 \end_layout
25650
25651 \begin_layout Standard
25652 where 
25653 \begin_inset Flex Code
25654 status collapsed
25655
25656 \begin_layout Plain Layout
25657 /path/to/lyxpipe
25658 \end_layout
25659
25660 \end_inset
25661
25662  is the Ly
25663 \begin_inset ERT
25664 status collapsed
25665
25666 \begin_layout Plain Layout
25667
25668 {}
25669 \end_layout
25670
25671 \end_inset
25672
25673 XServer pipe path specified in 
25674 \begin_inset Flex Noun
25675 status collapsed
25676
25677 \begin_layout Plain Layout
25678 Preferences\SpecialChar menuseparator
25679 Paths
25680 \end_layout
25681
25682 \end_inset
25683
25684 .
25685 \begin_inset Foot
25686 status collapsed
25687
25688 \begin_layout Plain Layout
25689 In the 
25690 \begin_inset Flex Code
25691 status collapsed
25692
25693 \begin_layout Plain Layout
25694 development/tools
25695 \end_layout
25696
25697 \end_inset
25698
25699  folder of a source distribution you can find a 
25700 \begin_inset Flex Code
25701 status collapsed
25702
25703 \begin_layout Plain Layout
25704 lyxeditor
25705 \end_layout
25706
25707 \end_inset
25708
25709  script which is able to locate the 
25710 \emph on
25711 lyxpipe
25712 \emph default
25713  based on your preferences.
25714 \end_layout
25715
25716 \end_inset
25717
25718
25719 \end_layout
25720
25721 \begin_layout Subsubsection*
25722 MacDviX (Mac OSX)
25723 \end_layout
25724
25725 \begin_layout Standard
25726 At the end of 
25727 \begin_inset Flex Code
25728 status collapsed
25729
25730 \begin_layout Plain Layout
25731 /Applications/MacDviX_Folder/calleditor.script
25732 \end_layout
25733
25734 \end_inset
25735
25736 , add the following lines:
25737 \end_layout
25738
25739 \begin_layout LyX-Code
25740 /Applications/Ly
25741 \begin_inset ERT
25742 status collapsed
25743
25744 \begin_layout Plain Layout
25745
25746 {}
25747 \end_layout
25748
25749 \end_inset
25750
25751 X.app/Contents/MacOS/lyxeditor "$2" $1
25752 \begin_inset Newline newline
25753 \end_inset
25754
25755 exit 1
25756 \end_layout
25757
25758 \begin_layout Standard
25759 Modify the lines accordingly if you install \SpecialChar LyX
25760  somewhere else than in the
25761  Applications folder.
25762 \end_layout
25763
25764 \begin_layout Standard
25765 Reverse search is triggered by Alt-click (OPTION-click).
25766 \end_layout
25767
25768 \begin_layout Subsubsection*
25769 Skim (Mac OSX)
25770 \end_layout
25771
25772 \begin_layout Standard
25773 Enter 
25774 \begin_inset Flex Code
25775 status collapsed
25776
25777 \begin_layout Plain Layout
25778 open -a Skim.app $$i
25779 \end_layout
25780
25781 \end_inset
25782
25783  to the viewer setting in 
25784 \begin_inset Flex Noun
25785 status collapsed
25786
25787 \begin_layout Plain Layout
25788 Preferences\SpecialChar menuseparator
25789 File Handling\SpecialChar menuseparator
25790 File formats\SpecialChar menuseparator
25791 PDF (pdflatex)
25792 \end_layout
25793
25794 \end_inset
25795
25796 , and then in 
25797 \begin_inset Flex Noun
25798 status collapsed
25799
25800 \begin_layout Plain Layout
25801 Skim\SpecialChar menuseparator
25802 Preferences\SpecialChar menuseparator
25803 Sync
25804 \end_layout
25805
25806 \end_inset
25807
25808  choose 
25809 \begin_inset Flex Noun
25810 status collapsed
25811
25812 \begin_layout Plain Layout
25813 custom
25814 \end_layout
25815
25816 \end_inset
25817
25818  preset and enter command 
25819 \begin_inset Flex Noun
25820 status collapsed
25821
25822 \begin_layout Plain Layout
25823 /Applications/\SpecialChar LyX
25824 .app/Contents/MacOS/lyxeditor
25825 \end_layout
25826
25827 \end_inset
25828
25829 .
25830 \end_layout
25831
25832 \begin_layout Standard
25833 Reverse search is triggered by COMMAND-SHIFT-click
25834 \end_layout
25835
25836 \begin_layout Subsubsection*
25837 Okular (KDE)
25838 \end_layout
25839
25840 \begin_layout Standard
25841 Go to 
25842 \begin_inset Flex Noun
25843 status collapsed
25844
25845 \begin_layout Plain Layout
25846 Settings\SpecialChar menuseparator
25847 Configure Okular\SpecialChar menuseparator
25848 Editor
25849 \end_layout
25850
25851 \end_inset
25852
25853 , select 
25854 \begin_inset Quotes eld
25855 \end_inset
25856
25857 Custom Text Editor
25858 \begin_inset Quotes erd
25859 \end_inset
25860
25861  and add the command 
25862 \begin_inset Flex Code
25863 status collapsed
25864
25865 \begin_layout Plain Layout
25866 lyxclient -g %f %l
25867 \end_layout
25868
25869 \end_inset
25870
25871 .
25872 \end_layout
25873
25874 \begin_layout Standard
25875 Reverse search is triggered by SHIFT-click.
25876 \end_layout
25877
25878 \begin_layout Subsubsection*
25879 Qpdfview (Unix)
25880 \end_layout
25881
25882 \begin_layout Standard
25883 Qpdfview supports Sync\SpecialChar TeX
25884  since version 0.3.5.
25885  Go to 
25886 \begin_inset Flex Noun
25887 status collapsed
25888
25889 \begin_layout Plain Layout
25890 Edit\SpecialChar menuseparator
25891 Settings\SpecialChar menuseparator
25892 Behavior
25893 \end_layout
25894
25895 \end_inset
25896
25897 , click on the input field of the 
25898 \begin_inset Quotes eld
25899 \end_inset
25900
25901 Source editor
25902 \begin_inset Quotes erd
25903 \end_inset
25904
25905  item and add the command 
25906 \begin_inset Flex Code
25907 status collapsed
25908
25909 \begin_layout Plain Layout
25910 lyxclient -g %1 %2
25911 \end_layout
25912
25913 \end_inset
25914
25915 .
25916 \end_layout
25917
25918 \begin_layout Standard
25919 Reverse search is triggered by double-click.
25920 \end_layout
25921
25922 \begin_layout Subsubsection*
25923 YAP (Windows)
25924 \end_layout
25925
25926 \begin_layout Standard
25927 Launch yap, choose its 
25928 \begin_inset Flex Noun
25929 status collapsed
25930
25931 \begin_layout Plain Layout
25932 View\SpecialChar menuseparator
25933 Options
25934 \end_layout
25935
25936 \end_inset
25937
25938  menu and select the 
25939 \begin_inset Quotes eld
25940 \end_inset
25941
25942 Inverse DVI Search
25943 \begin_inset Quotes erd
25944 \end_inset
25945
25946  tab.
25947  Click on the 
25948 \begin_inset Quotes eld
25949 \end_inset
25950
25951 New\SpecialChar ldots
25952
25953 \begin_inset Quotes erd
25954 \end_inset
25955
25956  button and, in the window that opens, enter 
25957 \begin_inset Quotes eld
25958 \end_inset
25959
25960 \SpecialChar LyX
25961  Editor
25962 \begin_inset Quotes erd
25963 \end_inset
25964
25965  (or any other name you like) in the 
25966 \begin_inset Quotes eld
25967 \end_inset
25968
25969 Name:
25970 \begin_inset Quotes erd
25971 \end_inset
25972
25973  field.
25974  Now click on the button labeled 
25975 \begin_inset Quotes eld
25976 \end_inset
25977
25978 \SpecialChar ldots
25979
25980 \begin_inset Quotes erd
25981 \end_inset
25982
25983  to open a file dialog and navigate to the directory containing the batch
25984  file 
25985 \begin_inset Flex Code
25986 status collapsed
25987
25988 \begin_layout Plain Layout
25989 lyxeditor.bat
25990 \end_layout
25991
25992 \end_inset
25993
25994  (see below).
25995  Select 
25996 \begin_inset Flex Code
25997 status collapsed
25998
25999 \begin_layout Plain Layout
26000 lyxeditor.bat
26001 \end_layout
26002
26003 \end_inset
26004
26005  and then specify the program arguments as 
26006 \begin_inset Flex Code
26007 status collapsed
26008
26009 \begin_layout Plain Layout
26010 %f %l
26011 \end_layout
26012
26013 \end_inset
26014
26015 .
26016  The 
26017 \begin_inset Flex Code
26018 status collapsed
26019
26020 \begin_layout Plain Layout
26021 lyxeditor.bat
26022 \end_layout
26023
26024 \end_inset
26025
26026  wrapper is used for communicating with \SpecialChar LyX
26027  through the 
26028 \emph on
26029 lyxpipe
26030 \emph default
26031  and is as follows:
26032 \end_layout
26033
26034 \begin_layout LyX-Code
26035 @echo off
26036 \begin_inset Newline newline
26037 \end_inset
26038
26039 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
26040 \backslash
26041
26042 \backslash
26043 .
26044 \backslash
26045 pipe
26046 \backslash
26047 lyxpipe.in
26048 \begin_inset Newline newline
26049 \end_inset
26050
26051 type 
26052 \backslash
26053
26054 \backslash
26055 .
26056 \backslash
26057 pipe
26058 \backslash
26059 lyxpipe.out
26060 \end_layout
26061
26062 \begin_layout Standard
26063 Make sure that the \SpecialChar LyX
26064 Server pipe path you specified in \SpecialChar LyX
26065  is 
26066 \begin_inset Flex Code
26067 status collapsed
26068
26069 \begin_layout Plain Layout
26070
26071 \backslash
26072
26073 \backslash
26074 .
26075 \backslash
26076 pipe
26077 \backslash
26078 lyxpipe
26079 \end_layout
26080
26081 \end_inset
26082
26083 , otherwise change the 
26084 \begin_inset Flex Code
26085 status collapsed
26086
26087 \begin_layout Plain Layout
26088 lyxeditor.bat
26089 \end_layout
26090
26091 \end_inset
26092
26093  wrapper accordingly.
26094 \end_layout
26095
26096 \begin_layout Standard
26097 In yap, reverse search is triggered by double-click.
26098 \end_layout
26099
26100 \begin_layout Subsubsection*
26101 SumatraPDF (Windows)
26102 \end_layout
26103
26104 \begin_layout Standard
26105 In order to use SumatraPDF for inverse search, enter 
26106 \begin_inset Flex Code
26107 status collapsed
26108
26109 \begin_layout Plain Layout
26110 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
26111 \end_layout
26112
26113 \end_inset
26114
26115  in the viewer setting in 
26116 \begin_inset Flex Noun
26117 status collapsed
26118
26119 \begin_layout Plain Layout
26120 Preferences\SpecialChar menuseparator
26121 File Handling\SpecialChar menuseparator
26122 File formats\SpecialChar menuseparator
26123 PDF (pdflatex)
26124 \end_layout
26125
26126 \end_inset
26127
26128 , where 
26129 \begin_inset Flex Code
26130 status collapsed
26131
26132 \begin_layout Plain Layout
26133 lyxeditor.bat
26134 \end_layout
26135
26136 \end_inset
26137
26138  is the previous wrapper.
26139  If SumatraPDF.exe is not in your command PATH, use its full file name.
26140 \end_layout
26141
26142 \begin_layout Standard
26143 Reverse search is triggered by double-click.
26144 \end_layout
26145
26146 \begin_layout Subsubsection*
26147 YAP (Cygwin)
26148 \end_layout
26149
26150 \begin_layout Standard
26151 First of all, make sure that yap is your default DVI viewer in the Windows
26152  environment, then launch it, choose its 
26153 \begin_inset Flex Noun
26154 status collapsed
26155
26156 \begin_layout Plain Layout
26157 View\SpecialChar menuseparator
26158 Options
26159 \end_layout
26160
26161 \end_inset
26162
26163  menu and select the 
26164 \begin_inset Quotes eld
26165 \end_inset
26166
26167 Inverse DVI Search
26168 \begin_inset Quotes erd
26169 \end_inset
26170
26171  tab.
26172  Click on the 
26173 \begin_inset Quotes eld
26174 \end_inset
26175
26176 New\SpecialChar ldots
26177
26178 \begin_inset Quotes erd
26179 \end_inset
26180
26181  button and, in the window that opens, enter 
26182 \begin_inset Quotes eld
26183 \end_inset
26184
26185 \SpecialChar LyX
26186  Editor
26187 \begin_inset Quotes erd
26188 \end_inset
26189
26190  (or any other name you like) in the 
26191 \begin_inset Quotes eld
26192 \end_inset
26193
26194 Name:
26195 \begin_inset Quotes erd
26196 \end_inset
26197
26198  field.
26199  Now click on the button labeled 
26200 \begin_inset Quotes eld
26201 \end_inset
26202
26203 \SpecialChar ldots
26204
26205 \begin_inset Quotes erd
26206 \end_inset
26207
26208  to open a file dialog and navigate to the directory containing the 
26209 \begin_inset Flex Code
26210 status collapsed
26211
26212 \begin_layout Plain Layout
26213 lyxeditor.exe
26214 \end_layout
26215
26216 \end_inset
26217
26218  program (which is installed by default on Cygwin along with the \SpecialChar LyX
26219  executable).
26220  Select 
26221 \begin_inset Flex Code
26222 status collapsed
26223
26224 \begin_layout Plain Layout
26225 lyxeditor.exe
26226 \end_layout
26227
26228 \end_inset
26229
26230  and then specify the program arguments as 
26231 \begin_inset Flex Code
26232 status collapsed
26233
26234 \begin_layout Plain Layout
26235 -g %f %l
26236 \end_layout
26237
26238 \end_inset
26239
26240 .
26241  In this way, you will be using the 
26242 \emph on
26243 lyxsocket
26244 \emph default
26245  for communicating with \SpecialChar LyX
26246 .
26247  If, for whatever reason, you want to use the 
26248 \emph on
26249 lyxpipe
26250 \emph default
26251 , omit the 
26252 \begin_inset Flex Code
26253 status collapsed
26254
26255 \begin_layout Plain Layout
26256 -g
26257 \end_layout
26258
26259 \end_inset
26260
26261  option and be sure to specify the \SpecialChar LyX
26262 Server pipe path in the \SpecialChar LyX
26263  preferences.
26264 \end_layout
26265
26266 \begin_layout Standard
26267 In yap, reverse search is triggered by double-click.
26268 \end_layout
26269
26270 \begin_layout Subsubsection*
26271 SumatraPDF (Cygwin)
26272 \end_layout
26273
26274 \begin_layout Standard
26275 In order to use SumatraPDF for inverse search, enter 
26276 \begin_inset Flex Code
26277 status collapsed
26278
26279 \begin_layout Plain Layout
26280 SumatraPDF -inverse-search "lyxeditor -g %f %l"
26281 \end_layout
26282
26283 \end_inset
26284
26285  in the viewer setting in 
26286 \begin_inset Flex Noun
26287 status collapsed
26288
26289 \begin_layout Plain Layout
26290 Preferences\SpecialChar menuseparator
26291 File Handling\SpecialChar menuseparator
26292 File formats\SpecialChar menuseparator
26293 PDF (pdflatex)
26294 \end_layout
26295
26296 \end_inset
26297
26298 .
26299  If SumatraPDF.exe is not in your command PATH, use its full posix path.
26300  The 
26301 \begin_inset Flex Code
26302 status collapsed
26303
26304 \begin_layout Plain Layout
26305 -g
26306 \end_layout
26307
26308 \end_inset
26309
26310  enables communication via the 
26311 \emph on
26312 lyxsocket
26313 \emph default
26314 .
26315  Again, omit the 
26316 \begin_inset Flex Code
26317 status collapsed
26318
26319 \begin_layout Plain Layout
26320 -g
26321 \end_layout
26322
26323 \end_inset
26324
26325  option if you want to use the 
26326 \emph on
26327 lyxpipe
26328 \emph default
26329 , and be sure to specify the \SpecialChar LyX
26330 Server pipe path in the \SpecialChar LyX
26331  preferences.
26332 \end_layout
26333
26334 \begin_layout Standard
26335 Reverse search is triggered by double-click.
26336 \end_layout
26337
26338 \begin_layout Section
26339 Forward search
26340 \end_layout
26341
26342 \begin_layout Standard
26343 Forward search is, as the name implies, in a sense the 
26344 \begin_inset Quotes eld
26345 \end_inset
26346
26347 opposite
26348 \begin_inset Quotes erd
26349 \end_inset
26350
26351  of reverse search.
26352  It allows you to let the viewer jump to a given position from within \SpecialChar LyX
26353 .
26354  If forward search is set up (as described in what follows), you can put
26355  the cursor anywhere in your \SpecialChar LyX
26356  document, and hit 
26357 \begin_inset Flex Noun
26358 status collapsed
26359
26360 \begin_layout Plain Layout
26361 Navigate\SpecialChar menuseparator
26362 Forward search
26363 \end_layout
26364
26365 \end_inset
26366
26367  (or select 
26368 \begin_inset Flex Noun
26369 status collapsed
26370
26371 \begin_layout Plain Layout
26372 Forward search
26373 \end_layout
26374
26375 \end_inset
26376
26377  in the context menu via right mouse click), and then the viewer will jump
26378  to that position as well.
26379  This implies, of course, that your viewer supports this function.
26380 \end_layout
26381
26382 \begin_layout Standard
26383 To make forward search possible, you first need to provide the generated
26384  output PDF/DVI file with additional information about the \SpecialChar TeX
26385  sources.
26386  This can be done via the methods described in the section 
26387 \begin_inset CommandInset ref
26388 LatexCommand ref
26389 reference "subsec:rev-search"
26390
26391 \end_inset
26392
26393 .
26394 \end_layout
26395
26396 \begin_layout Standard
26397 Additionally, you need to configure \SpecialChar LyX
26398  for using your viewers in 
26399 \begin_inset Flex Noun
26400 status collapsed
26401
26402 \begin_layout Plain Layout
26403 Tools\SpecialChar menuseparator
26404 Preferences\SpecialChar menuseparator
26405 Output\SpecialChar menuseparator
26406 General
26407 \end_layout
26408
26409 \end_inset
26410
26411 .
26412  We provide a range of tested configurations for some viewers, which you
26413  can select from the drop down list.
26414  If none of these configurations suits you, you have to find out and enter
26415  a suitable configuration yourself.
26416  The definition syntax uses the following placeholders:
26417 \end_layout
26418
26419 \begin_layout Itemize
26420 \noindent
26421 \begin_inset Flex Code
26422 status collapsed
26423
26424 \begin_layout Plain Layout
26425 $$n
26426 \end_layout
26427
26428 \end_inset
26429
26430 : row number
26431 \end_layout
26432
26433 \begin_layout Itemize
26434 \noindent
26435 \begin_inset Flex Code
26436 status collapsed
26437
26438 \begin_layout Plain Layout
26439 $$t
26440 \end_layout
26441
26442 \end_inset
26443
26444 : name of the (temporary) exported .tex file (without path)
26445 \end_layout
26446
26447 \begin_layout Itemize
26448 \noindent
26449 \begin_inset Flex Code
26450 status collapsed
26451
26452 \begin_layout Plain Layout
26453 $$f
26454 \end_layout
26455
26456 \end_inset
26457
26458 : name of the (temporary) exported .tex file (including path)
26459 \end_layout
26460
26461 \begin_layout Itemize
26462 \noindent
26463 \begin_inset Flex Code
26464 status collapsed
26465
26466 \begin_layout Plain Layout
26467 $$o
26468 \end_layout
26469
26470 \end_inset
26471
26472 : name of the exported output file (either dvi or pdf, depending on which
26473  one exists in the temporary directory)
26474 \end_layout
26475
26476 \begin_layout Standard
26477 Note that only some of the viewers provide full forward search functionality,
26478  among them yap, xdvi, okular
26479 \begin_inset Foot
26480 status collapsed
26481
26482 \begin_layout Plain Layout
26483 You might want to set 
26484 \begin_inset Flex Code
26485 status collapsed
26486
26487 \begin_layout Plain Layout
26488 okular –unique
26489 \end_layout
26490
26491 \end_inset
26492
26493  in 
26494 \begin_inset Flex Noun
26495 status collapsed
26496
26497 \begin_layout Plain Layout
26498 Tools\SpecialChar menuseparator
26499 Preferences\SpecialChar menuseparator
26500 File Handling\SpecialChar menuseparator
26501 File
26502 \begin_inset space ~
26503 \end_inset
26504
26505 Formats
26506 \end_layout
26507
26508 \end_inset
26509
26510
26511 \end_layout
26512
26513 \end_inset
26514
26515 , qpdfview and SumatraPDF
26516 \begin_inset Foot
26517 status collapsed
26518
26519 \begin_layout Plain Layout
26520 SumatraPDF can also use DDE commands through the external program CMCDDE
26521  — downloadable from 
26522 \begin_inset CommandInset href
26523 LatexCommand href
26524 target "http://www.istri.fr/spip/zip/CMCDDE.zip"
26525
26526 \end_inset
26527
26528
26529 \end_layout
26530
26531 \end_inset
26532
26533 .
26534  While many of the widespread PDF viewers (most notably Adobe Reader) do
26535  not support forward search at all, some other viewers – e.
26536 \begin_inset space \thinspace{}
26537 \end_inset
26538
26539 g.
26540  evince and xpdf – allow at least to reload the document and jump to a specific
26541  page of the file, so you can at least navigate 
26542 \begin_inset Quotes eld
26543 \end_inset
26544
26545 near
26546 \begin_inset Quotes erd
26547 \end_inset
26548
26549 .
26550  This latter functionality is provided by an external call of synctex (see
26551  the predefined example configurations).
26552  
26553 \end_layout
26554
26555 \begin_layout Standard
26556 Forward search works both with DVI and PDF output.
26557  \SpecialChar LyX
26558  simply checks which preview format you have used before (i.
26559 \begin_inset space \thinspace{}
26560 \end_inset
26561
26562 e., which format is already there in the temporary directory) and chooses
26563  the appropriate configuration for the respective format.
26564 \end_layout
26565
26566 \end_body
26567 \end_document