]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
6f40700e3c01729156be7b216a7df96a422a1f55
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.3 created this file. For more info see http://www.lyx.org/
2 \lyxformat 544
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 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 \use_dash_ligatures true
57 \graphics default
58 \default_output_format pdf2
59 \output_sync 0
60 \bibtex_command default
61 \index_command default
62 \paperfontsize 12
63 \spacing single
64 \use_hyperref true
65 \pdf_title "LyX's Additional Features manual"
66 \pdf_author "LyX Team"
67 \pdf_subject "LyX's additional features documentation"
68 \pdf_keywords "LyX, Documentation, Additional"
69 \pdf_bookmarks true
70 \pdf_bookmarksnumbered true
71 \pdf_bookmarksopen false
72 \pdf_bookmarksopenlevel 1
73 \pdf_breaklinks false
74 \pdf_pdfborder false
75 \pdf_colorlinks true
76 \pdf_backref false
77 \pdf_pdfusetitle false
78 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
79 \papersize a4paper
80 \use_geometry false
81 \use_package amsmath 1
82 \use_package amssymb 1
83 \use_package cancel 0
84 \use_package esint 0
85 \use_package mathdots 1
86 \use_package mathtools 0
87 \use_package mhchem 1
88 \use_package stackrel 0
89 \use_package stmaryrd 0
90 \use_package undertilde 0
91 \cite_engine basic
92 \cite_engine_type default
93 \biblio_style plain
94 \use_bibtopic false
95 \use_indices false
96 \paperorientation portrait
97 \suppress_date false
98 \justification true
99 \use_refstyle 0
100 \use_minted 0
101 \notefontcolor #0000ff
102 \index Index
103 \shortcut idx
104 \color #008000
105 \end_index
106 \secnumdepth 3
107 \tocdepth 3
108 \paragraph_separation indent
109 \paragraph_indentation default
110 \is_math_indent 1
111 \math_indentation default
112 \math_numbering_side default
113 \quotes_style english
114 \dynamic_quotes 0
115 \papercolumns 1
116 \papersides 2
117 \paperpagestyle headings
118 \tracking_changes true
119 \output_changes false
120 \html_math_output 0
121 \html_css_as_file 0
122 \html_be_strict true
123 \author -712698321 "Jürgen Spitzmüller"
124 \end_header
125
126 \begin_body
127
128 \begin_layout Title
129 Additional \SpecialChar LyX
130  Features
131 \end_layout
132
133 \begin_layout Subtitle
134 Version 2.3.x
135 \end_layout
136
137 \begin_layout Author
138 by the \SpecialChar LyX
139  Team
140 \begin_inset Foot
141 status collapsed
142
143 \begin_layout Plain Layout
144 \noindent
145 Principal maintainer of this file is
146 \noun on
147  Richard Heck
148 \noun default
149 .
150  If you have comments or error corrections, please send them to the \SpecialChar LyX
151  Documentati
152 on mailing list, 
153 \begin_inset Flex Code
154 status collapsed
155
156 \begin_layout Plain Layout
157 \noindent
158 <lyx-docs@lists.lyx.org>
159 \end_layout
160
161 \end_inset
162
163 .
164 \end_layout
165
166 \end_inset
167
168
169 \end_layout
170
171 \begin_layout Standard
172 \begin_inset CommandInset toc
173 LatexCommand tableofcontents
174
175 \end_inset
176
177
178 \end_layout
179
180 \begin_layout Chapter
181 Introduction
182 \end_layout
183
184 \begin_layout Standard
185 This manual is essentially Part II of the 
186 \emph on
187 User's Guide\SpecialChar endofsentence
188
189 \emph default
190  The reason for separating the two documents is simple: the 
191 \emph on
192 User's Guide
193 \emph default
194  is already quite lengthy, and it contains information on all of the basic
195  features one needs to know in order to prepare most documents.
196  However, the \SpecialChar LyX
197  Team has worked to make \SpecialChar LyX
198  extensible through various configuration
199  files and external packages.
200  That means that if you want to support the Fizzwizzle \SpecialChar LaTeX
201  package, you can
202  create a layout file (or module) for it without having to alter \SpecialChar LyX
203  itself.
204  We've already had contributions of several new features this way, and some
205  of them are documented here.
206  There are also some more `advanced' features, such as how to control the
207  presentation of bibliographies and how to work with multi-part documents,
208  that are not covered in the 
209 \emph on
210 User's Guide
211 \emph default
212  and are discussed here.
213 \end_layout
214
215 \begin_layout Standard
216 This manual also documents some special features, like fax support, version
217  control, and SGML support, which require additional software to work properly.
218  There is also a chapter on \SpecialChar LyX
219 's support for HTML.
220  And lastly, there's a chapter of \SpecialChar LaTeX
221  tools and tips, things you can use to
222  spruce up your documents by directly using the powerful features of \SpecialChar LaTeX
223 .
224  After all, \SpecialChar LyX
225  
226 \emph on
227 is
228 \emph default
229  only WYSIWYM and will only ever interface to some, not all, \SpecialChar LaTeX
230  features.
231 \end_layout
232
233 \begin_layout Standard
234 If you haven't read the 
235 \emph on
236 Introduction
237 \emph default
238  yet, you are definitely in the wrong manual.
239  The 
240 \emph on
241 Introduction
242 \emph default
243  is the first place to go, since it describes the notation and format of
244  all of the manuals.
245  You should also be thoroughly familiar with the 
246 \emph on
247 User's Guide
248 \emph default
249  and all of the basic features of \SpecialChar LyX
250  before attempting to read this one.
251 \end_layout
252
253 \begin_layout Standard
254 Since many of the topics in this manual depend heavily on \SpecialChar LyX
255 's interaction
256  with \SpecialChar LaTeX
257 , this first chapter covers the inner workings of \SpecialChar LyX
258  and how to direct
259  \SpecialChar LyX
260  to generate exactly the \SpecialChar LaTeX
261  code you want.
262  It is obviously for more seasoned \SpecialChar LyX
263  users.
264 \end_layout
265
266 \begin_layout Chapter
267 \SpecialChar LyX
268  and \SpecialChar LaTeX
269
270 \end_layout
271
272 \begin_layout Section
273 How \SpecialChar LyX
274  Uses \SpecialChar LaTeX
275
276 \end_layout
277
278 \begin_layout Standard
279 This chapter is for both \SpecialChar TeX
280 -nicians and the \SpecialChar LaTeX
281 -curious.
282  In it, we'll explain how \SpecialChar LyX
283  and \SpecialChar LaTeX
284  work together to produce printable output.
285  This is the only place in any of the manuals where we assume you know something
286  about \SpecialChar LaTeX
287 .
288 \end_layout
289
290 \begin_layout Standard
291 At one time, \SpecialChar LyX
292  was called a 
293 \begin_inset Quotes eld
294 \end_inset
295
296 WYSIWYM frontend to \SpecialChar LaTeX
297 ,
298 \begin_inset Quotes erd
299 \end_inset
300
301  but that's no longer true.
302  There are frontends to \SpecialChar LaTeX
303  out there.
304 \begin_inset Foot
305 status collapsed
306
307 \begin_layout Plain Layout
308 Some familar ones are \SpecialChar TeX
309 maker and kile, on Linux, and \SpecialChar TeX
310 shop, OSX.
311  There are also the \SpecialChar LaTeX
312  modes for vi and emacs, of course.
313 \end_layout
314
315 \end_inset
316
317  These are basically text editors with the ability to run \SpecialChar LaTeX
318  and mark any
319  errors in the file you're editing.
320  Although \SpecialChar LyX
321  
322 \emph on
323 is
324 \emph default
325  an editor, and it 
326 \emph on
327 does
328 \emph default
329  run \SpecialChar LaTeX
330 , and it also indicates errors in the file, it also does much, much
331  more.
332  For one thing, you don't need to know \SpecialChar LaTeX
333  to use \SpecialChar LyX
334  effectively.
335  And \SpecialChar LyX
336  has added its own extensions to \SpecialChar LaTeX
337 .
338  Try the following sometime: select 
339 \begin_inset Flex Noun
340 status collapsed
341
342 \begin_layout Plain Layout
343 Export\SpecialChar menuseparator
344 LaTeX
345 \end_layout
346
347 \end_inset
348
349  from the 
350 \begin_inset Flex Noun
351 status collapsed
352
353 \begin_layout Plain Layout
354 File
355 \end_layout
356
357 \end_inset
358
359  menu (or 
360 \begin_inset Flex Noun
361 status collapsed
362
363 \begin_layout Plain Layout
364 View\SpecialChar menuseparator
365 Source
366 \begin_inset space ~
367 \end_inset
368
369 Pane
370 \end_layout
371
372 \end_inset
373
374 ), then look at the preamble of the resulting 
375 \begin_inset Flex Code
376 status collapsed
377
378 \begin_layout Plain Layout
379 .tex
380 \end_layout
381
382 \end_inset
383
384  file.
385  You'll notice a variety of new macros defined specifically by \SpecialChar LyX
386 .
387  These macros are defined automatically, according to the features you use
388  in the document.
389 \end_layout
390
391 \begin_layout Standard
392 There are several commands that automatically invoke \SpecialChar LaTeX
393 .
394  They are:
395 \end_layout
396
397 \begin_layout Itemize
398 \begin_inset Flex Noun
399 status collapsed
400
401 \begin_layout Plain Layout
402 Document\SpecialChar menuseparator
403 View
404 \end_layout
405
406 \end_inset
407
408
409 \end_layout
410
411 \begin_layout Itemize
412 \begin_inset Flex Noun
413 status collapsed
414
415 \begin_layout Plain Layout
416 Document\SpecialChar menuseparator
417 Update
418 \end_layout
419
420 \end_inset
421
422
423 \end_layout
424
425 \begin_layout Standard
426 They will only invoke \SpecialChar LaTeX
427  if the file has changed since the last time \SpecialChar LaTeX
428  was
429  run.
430  
431 \end_layout
432
433 \begin_layout Standard
434 When \SpecialChar LyX
435  runs \SpecialChar LaTeX
436  on the file you're editing, it performs these steps:
437 \end_layout
438
439 \begin_layout Enumerate
440 Convert the document to \SpecialChar LaTeX
441  and save to a file with the extension 
442 \begin_inset Flex Code
443 status collapsed
444
445 \begin_layout Plain Layout
446 .tex
447 \end_layout
448
449 \end_inset
450
451  in place of 
452 \begin_inset Flex Code
453 status collapsed
454
455 \begin_layout Plain Layout
456 .lyx
457 \end_layout
458
459 \end_inset
460
461 .
462 \end_layout
463
464 \begin_layout Enumerate
465 Run \SpecialChar LaTeX
466  on the 
467 \begin_inset Flex Code
468 status collapsed
469
470 \begin_layout Plain Layout
471 .tex
472 \end_layout
473
474 \end_inset
475
476  file (maybe several times), and run any other commands (such as 
477 \begin_inset Flex Code
478 status collapsed
479
480 \begin_layout Plain Layout
481 bibtex
482 \end_layout
483
484 \end_inset
485
486  or 
487 \begin_inset Flex Code
488 status collapsed
489
490 \begin_layout Plain Layout
491 makeindex
492 \end_layout
493
494 \end_inset
495
496 ) needed to compile the \SpecialChar LaTeX
497  file.
498 \end_layout
499
500 \begin_layout Enumerate
501 If there are any errors, show the error log.
502 \end_layout
503
504 \begin_layout Standard
505 If you have run \SpecialChar LaTeX
506  using 
507 \begin_inset Flex Noun
508 status collapsed
509
510 \begin_layout Plain Layout
511 View\SpecialChar menuseparator
512 DVI
513 \end_layout
514
515 \end_inset
516
517 , \SpecialChar LyX
518  then runs a DVI viewer to display the DVI-file.
519  If you have used 
520 \begin_inset Flex Noun
521 status collapsed
522
523 \begin_layout Plain Layout
524 View\SpecialChar menuseparator
525 PostScript
526 \end_layout
527
528 \end_inset
529
530 , \SpecialChar LyX
531  performs further steps:
532 \end_layout
533
534 \begin_layout Itemize
535 Run 
536 \begin_inset Flex Code
537 status collapsed
538
539 \begin_layout Plain Layout
540 dvips
541 \end_layout
542
543 \end_inset
544
545  to convert the DVI file to PostScript.
546 \end_layout
547
548 \begin_layout Itemize
549 Run a PostScript viewer, such as 
550 \begin_inset Flex Code
551 status collapsed
552
553 \begin_layout Plain Layout
554 ghostview
555 \end_layout
556
557 \end_inset
558
559 , to display the PostScript file.
560 \end_layout
561
562 \begin_layout Standard
563 \SpecialChar LyX
564  does similar things when viewing, or exporting, other formats.
565 \end_layout
566
567 \begin_layout Section
568 Translating \SpecialChar LaTeX
569  files into \SpecialChar LyX
570
571 \end_layout
572
573 \begin_layout Standard
574 You can import a \SpecialChar LaTeX
575  file into \SpecialChar LyX
576  by using the 
577 \begin_inset Flex Noun
578 status collapsed
579
580 \begin_layout Plain Layout
581 File\SpecialChar menuseparator
582 Import\SpecialChar menuseparator
583 LaTeX
584 \end_layout
585
586 \end_inset
587
588  command in \SpecialChar LyX
589 .
590  This will call a program named 
591 \begin_inset Flex Code
592 status collapsed
593
594 \begin_layout Plain Layout
595 tex2lyx
596 \end_layout
597
598 \end_inset
599
600  which will create a file 
601 \begin_inset Flex Code
602 status collapsed
603
604 \begin_layout Plain Layout
605 foo.lyx
606 \end_layout
607
608 \end_inset
609
610  from the file 
611 \begin_inset Flex Code
612 status collapsed
613
614 \begin_layout Plain Layout
615 foo.tex
616 \end_layout
617
618 \end_inset
619
620 .
621  \SpecialChar LyX
622  will then open that file.
623 \begin_inset Foot
624 status collapsed
625
626 \begin_layout Plain Layout
627 \begin_inset Flex Code
628 status collapsed
629
630 \begin_layout Plain Layout
631 tex2lyx
632 \end_layout
633
634 \end_inset
635
636  can also be run from the command line, of course.
637 \end_layout
638
639 \end_inset
640
641
642 \end_layout
643
644 \begin_layout Standard
645 \begin_inset Flex Code
646 status collapsed
647
648 \begin_layout Plain Layout
649 tex2lyx
650 \end_layout
651
652 \end_inset
653
654  will translate most legal \SpecialChar LaTeX
655 , but not everything.
656  It will put things it doesn't understand into \SpecialChar TeX
657  code, so after translating
658  a file with 
659 \begin_inset Flex Code
660 status collapsed
661
662 \begin_layout Plain Layout
663 tex2lyx
664 \end_layout
665
666 \end_inset
667
668 , you can look for \SpecialChar TeX
669  code and hand-edit it until it looks right.
670 \end_layout
671
672 \begin_layout Standard
673 If you don't know what \SpecialChar TeX
674  code is, read the next section.
675 \end_layout
676
677 \begin_layout Section
678 \begin_inset CommandInset label
679 LatexCommand label
680 name "sec:Inserting-TeX-Code"
681
682 \end_inset
683
684 Inserting \SpecialChar TeX
685  Code into \SpecialChar LyX
686  Documents 
687 \end_layout
688
689 \begin_layout Standard
690 Anything you can do in \SpecialChar LaTeX
691  you can do in \SpecialChar LyX
692 , for a very simple reason: You can
693  always insert \SpecialChar TeX
694  code into any \SpecialChar LyX
695  document.
696  \SpecialChar LyX
697  cannot, and will never be able to, display every possible \SpecialChar LaTeX
698  construct.
699  If ever you need to insert \SpecialChar LaTeX
700  commands into your \SpecialChar LyX
701  document, you can use the
702  
703 \begin_inset Flex Code
704 status collapsed
705
706 \begin_layout Plain Layout
707 \SpecialChar TeX
708  Code
709 \end_layout
710
711 \end_inset
712
713  box, which you can insert into your document with 
714 \begin_inset Flex Noun
715 status collapsed
716
717 \begin_layout Plain Layout
718 Insert\SpecialChar menuseparator
719
720 \family sans
721 TeX
722 \family default
723  Code
724 \end_layout
725
726 \end_inset
727
728  or the keyboard shortcut 
729 \begin_inset Info
730 type  "shortcut"
731 arg   "ert-insert"
732 \end_inset
733
734 .
735 \end_layout
736
737 \begin_layout Standard
738 Here's an example of inserting \SpecialChar LaTeX
739  commands in a \SpecialChar LyX
740  document.
741  The code looks like this:
742 \end_layout
743
744 \begin_layout LyX-Code
745
746 \backslash
747 begin{tabular}{ll}
748 \begin_inset Newline newline
749 \end_inset
750
751
752 \backslash
753 begin{minipage}{5cm}
754 \begin_inset Newline newline
755 \end_inset
756
757 This is an example of a minipage environment.
758  You 
759 \begin_inset Newline newline
760 \end_inset
761
762 can put nearly everything in it, even (non-floating) 
763 \begin_inset Newline newline
764 \end_inset
765
766 figures and tables.
767  
768 \begin_inset Newline newline
769 \end_inset
770
771
772 \backslash
773 end{minipage}
774 \begin_inset Newline newline
775 \end_inset
776
777 &
778 \begin_inset Newline newline
779 \end_inset
780
781
782 \backslash
783 begin{minipage}{5cm}
784 \begin_inset Newline newline
785 \end_inset
786
787
788 \backslash
789 begin{verbatim}
790 \begin_inset Newline newline
791 \end_inset
792
793
794 \backslash
795 begin{minipage}{5cm}
796 \begin_inset Newline newline
797 \end_inset
798
799 This ...
800  
801 \begin_inset Newline newline
802 \end_inset
803
804
805 \backslash
806 end{minipage}
807 \begin_inset Newline newline
808 \end_inset
809
810
811 \backslash
812 end{verbatim}
813 \begin_inset Newline newline
814 \end_inset
815
816
817 \backslash
818 end{minipage}
819 \begin_inset Newline newline
820 \end_inset
821
822
823 \backslash
824 end{tabular}
825 \end_layout
826
827 \begin_layout LyX-Code
828
829 \end_layout
830
831 \begin_layout Standard
832 The 
833 \begin_inset Flex Code
834 status collapsed
835
836 \begin_layout Plain Layout
837 \SpecialChar TeX
838  Code
839 \end_layout
840
841 \end_inset
842
843  box containing this text is directly after this paragraph.
844  Those of you reading the manual in \SpecialChar LyX
845  will only see the \SpecialChar TeX
846  code inset.
847  Those reading a printed version of the manuals will see the actual results:
848 \begin_inset VSpace bigskip
849 \end_inset
850
851
852 \end_layout
853
854 \begin_layout Standard
855 \begin_inset ERT
856 status open
857
858 \begin_layout Plain Layout
859
860
861 \backslash
862 begin{tabular}{ll}
863 \end_layout
864
865 \begin_layout Plain Layout
866
867
868 \backslash
869 begin{minipage}{5cm}
870 \end_layout
871
872 \begin_layout Plain Layout
873
874 This is an example of a minipage environment.
875  You can put nearly everything in it, even (non-floating) figures and tables.
876  
877 \end_layout
878
879 \begin_layout Plain Layout
880
881
882 \backslash
883 end{minipage}
884 \end_layout
885
886 \begin_layout Plain Layout
887
888 &
889 \end_layout
890
891 \begin_layout Plain Layout
892
893
894 \backslash
895 begin{minipage}{5cm}
896 \end_layout
897
898 \begin_layout Plain Layout
899
900
901 \backslash
902 begin{verbatim}
903 \end_layout
904
905 \begin_layout Plain Layout
906
907
908 \backslash
909 begin{minipage}{5cm}
910 \end_layout
911
912 \begin_layout Plain Layout
913
914 This ...
915  
916 \end_layout
917
918 \begin_layout Plain Layout
919
920
921 \backslash
922 end{minipage}
923 \end_layout
924
925 \begin_layout Plain Layout
926
927
928 \backslash
929 end{verbatim}
930 \end_layout
931
932 \begin_layout Plain Layout
933
934
935 \backslash
936 end{minipage}
937 \end_layout
938
939 \begin_layout Plain Layout
940
941
942 \backslash
943 end{tabular}
944 \end_layout
945
946 \end_inset
947
948
949 \begin_inset VSpace bigskip
950 \end_inset
951
952
953 \end_layout
954
955 \begin_layout Standard
956 In addition to using \SpecialChar TeX
957  code, you can also create a separate file containing
958  some complex \SpecialChar LaTeX
959  structure and then use 
960 \begin_inset Flex Noun
961 status collapsed
962
963 \begin_layout Plain Layout
964 Insert\SpecialChar menuseparator
965 Child
966 \begin_inset space ~
967 \end_inset
968
969 Document
970 \end_layout
971
972 \end_inset
973
974  to include your file (you should select the type 
975 \begin_inset Flex Code
976 status collapsed
977
978 \begin_layout Plain Layout
979 Input
980 \end_layout
981
982 \end_inset
983
984 ).
985  We recommend that you only do this if you have a 
986 \begin_inset Flex Code
987 status collapsed
988
989 \begin_layout Plain Layout
990 .tex
991 \end_layout
992
993 \end_inset
994
995  file which you 
996 \emph on
997 know
998 \emph default
999  works already.
1000  Otherwise, you'll have a big job tracking down \SpecialChar LaTeX
1001  errors.
1002 \end_layout
1003
1004 \begin_layout Standard
1005 There are a few last points to emphasize:
1006 \end_layout
1007
1008 \begin_layout Itemize
1009 \SpecialChar LyX
1010  
1011 \emph on
1012 does not
1013 \emph default
1014  check if your \SpecialChar LaTeX
1015  code is correct.
1016 \end_layout
1017
1018 \begin_layout Itemize
1019 Beware of reinventing the wheel.
1020 \end_layout
1021
1022 \begin_layout Standard
1023 On that last point, \SpecialChar LyX
1024  does have quite a few features tucked into it, and
1025  more are coming.
1026  Be sure to check the manuals to make sure that \SpecialChar LyX
1027  doesn't have such-and-such
1028  feature before you decide you have to do it by hand.
1029  Moreover, there are numerous \SpecialChar LaTeX
1030  packages out there to do all sorts of things,
1031  from labels to envelopes to fancy multipage tables.
1032  Check out 
1033 \begin_inset CommandInset href
1034 LatexCommand href
1035 name "CTAN"
1036 target "http://www.ctan.org/"
1037 literal "false"
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 \end_layout
2160
2161 \begin_deeper
2162 \begin_layout Enumerate
2163 rescale the figure so it fits.
2164 \end_layout
2165
2166 \begin_layout Enumerate
2167 trim down the table so it fits.
2168 \end_layout
2169
2170 \end_deeper
2171 \begin_layout Enumerate
2172 If something else is wrong with the output, and you didn't try to pull anything
2173  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2174 \end_layout
2175
2176 \begin_layout Standard
2177 If all this doesn't help—well, then 
2178 \emph on
2179 perhaps
2180 \emph default
2181  you might have found a bug in \SpecialChar LyX
2182 \SpecialChar ldots
2183 .
2184 \end_layout
2185
2186 \begin_layout Chapter
2187 Supplemental Tools
2188 \end_layout
2189
2190 \begin_layout Section
2191 Customizing Bibliographies with Bib\SpecialChar TeX
2192  or Biblatex
2193 \end_layout
2194
2195 \begin_layout Standard
2196 The most basic information about how to use Bib\SpecialChar TeX
2197  or 
2198 \family sans
2199 Biblatex
2200 \family default
2201  with \SpecialChar LyX
2202  is contained in the section 
2203 \emph on
2204 Bibliography databases
2205 \emph default
2206  of the 
2207 \emph on
2208 User's Guide
2209 \emph default
2210 .
2211  The following subsections explain special bibliography features supported
2212  by \SpecialChar LyX
2213 .
2214 \end_layout
2215
2216 \begin_layout Subsection
2217 Alternative Citation Styles
2218 \end_layout
2219
2220 \begin_layout Standard
2221 Standard Bib\SpecialChar TeX
2222  uses numbers (e.
2223 \begin_inset space \thinspace{}
2224 \end_inset
2225
2226 g.
2227 \begin_inset space \space{}
2228 \end_inset
2229
2230
2231 \begin_inset Quotes eld
2232 \end_inset
2233
2234 [12]
2235 \begin_inset Quotes erd
2236 \end_inset
2237
2238 ) to refer to a cited work.
2239  However, in many scientific disciplines, other citation styles are in use.
2240  The most common one is the author-year style (e.
2241 \begin_inset space \thinspace{}
2242 \end_inset
2243
2244 g.
2245 \begin_inset space \space{}
2246 \end_inset
2247
2248
2249 \begin_inset Quotes eld
2250 \end_inset
2251
2252 Knuth 1984a
2253 \begin_inset Quotes erd
2254 \end_inset
2255
2256 ).
2257  \SpecialChar LyX
2258  supports three packages that provide this style, 
2259 \begin_inset Flex Code
2260 status collapsed
2261
2262 \begin_layout Plain Layout
2263 biblatex
2264 \end_layout
2265
2266 \end_inset
2267
2268
2269 \begin_inset Flex Code
2270 status collapsed
2271
2272 \begin_layout Plain Layout
2273 natbib
2274 \end_layout
2275
2276 \end_inset
2277
2278 , and 
2279 \begin_inset Flex Code
2280 status collapsed
2281
2282 \begin_layout Plain Layout
2283 jurabib
2284 \end_layout
2285
2286 \end_inset
2287
2288 .
2289  Each of these packages has their pros and cons, which cannot be listed
2290  in detail.
2291  If you only want to have simple author-year (or author-numerical) style,
2292  or if you want to use one of the countless style files for 
2293 \begin_inset Flex Code
2294 status collapsed
2295
2296 \begin_layout Plain Layout
2297 natbib
2298 \end_layout
2299
2300 \end_inset
2301
2302 , then the established 
2303 \begin_inset Flex Code
2304 status collapsed
2305
2306 \begin_layout Plain Layout
2307 natbib
2308 \end_layout
2309
2310 \end_inset
2311
2312  package is probably your choice.
2313  If you look for specific citation styles common in law studies, you might
2314  consider the 
2315 \begin_inset Flex Code
2316 status collapsed
2317
2318 \begin_layout Plain Layout
2319 jurabib
2320 \end_layout
2321
2322 \end_inset
2323
2324  package.
2325  If you want to have full control over the formatting or look for advanced
2326  features such as ibidem, footnote citations, full title citations, advanced
2327  date formats (such as 400 BC) or full localization to other languages than
2328  English, you should definitely consider 
2329 \begin_inset Flex Code
2330 status collapsed
2331
2332 \begin_layout Plain Layout
2333 biblatex
2334 \end_layout
2335
2336 \end_inset
2337
2338 , which exceeds all other packages in terms of features, but is also quite
2339  heavy and more resource-hungry.
2340 \end_layout
2341
2342 \begin_layout Standard
2343 The handling of these packages in \SpecialChar LyX
2344  is basically the same.
2345  Go to 
2346 \begin_inset Flex Noun
2347 status collapsed
2348
2349 \begin_layout Plain Layout
2350 Document\SpecialChar menuseparator
2351 Settings
2352 \end_layout
2353
2354 \end_inset
2355
2356  and select under 
2357 \begin_inset Flex Noun
2358 status collapsed
2359
2360 \begin_layout Plain Layout
2361 Bibliography
2362 \end_layout
2363
2364 \end_inset
2365
2366  the 
2367 \begin_inset Flex Noun
2368 status collapsed
2369
2370 \begin_layout Plain Layout
2371 Style Format
2372 \end_layout
2373
2374 \end_inset
2375
2376  
2377 \begin_inset Flex Noun
2378 status collapsed
2379
2380 \begin_layout Plain Layout
2381 Biblatex
2382 \end_layout
2383
2384 \end_inset
2385
2386
2387 \begin_inset Flex Noun
2388 status collapsed
2389
2390 \begin_layout Plain Layout
2391 Biblatex (Natbib mode)
2392 \end_layout
2393
2394 \end_inset
2395
2396
2397 \begin_inset Flex Noun
2398 status collapsed
2399
2400 \begin_layout Plain Layout
2401 Natbib (BibTeX)
2402 \end_layout
2403
2404 \end_inset
2405
2406  or 
2407 \begin_inset Flex Noun
2408 status collapsed
2409
2410 \begin_layout Plain Layout
2411 Jurabib (BibTeX)
2412 \end_layout
2413
2414 \end_inset
2415
2416  (see sec.
2417 \begin_inset space ~
2418 \end_inset
2419
2420 6.5.3 in the User's Guide for more information on these choices).
2421  With all these packages, you will get some extra features in the citation
2422  dialog and you can select the style of the reference (
2423 \begin_inset Quotes eld
2424 \end_inset
2425
2426 Knuth 1984
2427 \begin_inset Quotes erd
2428 \end_inset
2429
2430
2431 \begin_inset Quotes eld
2432 \end_inset
2433
2434 Knuth (1984)
2435 \begin_inset Quotes erd
2436 \end_inset
2437
2438
2439 \begin_inset Quotes eld
2440 \end_inset
2441
2442 Knuth, 1984
2443 \begin_inset Quotes erd
2444 \end_inset
2445
2446
2447 \begin_inset Quotes eld
2448 \end_inset
2449
2450 1984
2451 \begin_inset Quotes erd
2452 \end_inset
2453
2454  etc.).
2455  Note that either package needs specifically designed style files.
2456  They all ship their own, but there are lots of additional style files,
2457  and there is even an interactive style file builder
2458 \begin_inset Foot
2459 status collapsed
2460
2461 \begin_layout Plain Layout
2462 See 
2463 \begin_inset Flex URL
2464 status open
2465
2466 \begin_layout Plain Layout
2467
2468 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2469 \end_layout
2470
2471 \end_inset
2472
2473
2474 \end_layout
2475
2476 \end_inset
2477
2478  for 
2479 \begin_inset Flex Code
2480 status collapsed
2481
2482 \begin_layout Plain Layout
2483 natbib
2484 \end_layout
2485
2486 \end_inset
2487
2488 .
2489 \end_layout
2490
2491 \begin_layout Subsection
2492 Subdivided Bibliographies
2493 \end_layout
2494
2495 \begin_layout Standard
2496 Sometimes you might need to divide your bibliography into several sections.
2497  If you are for instance a historian, the possibility to separate sources
2498  and scientific works is most likely a 
2499 \begin_inset Quotes eld
2500 \end_inset
2501
2502 must have
2503 \begin_inset Quotes erd
2504 \end_inset
2505
2506 .
2507  Unfortunately, Bib\SpecialChar TeX
2508  itself does not allow you to do this.
2509  But with the help of some \SpecialChar LaTeX
2510  packages, Bib\SpecialChar TeX
2511  can be extended to fit your needs.
2512 \end_layout
2513
2514 \begin_layout Standard
2515 \SpecialChar LyX
2516  provides native support for one of these packages, 
2517 \family typewriter
2518 bibtopic
2519 \family default
2520 .
2521 \begin_inset Foot
2522 status collapsed
2523
2524 \begin_layout Plain Layout
2525 Available from 
2526 \begin_inset Flex URL
2527 status open
2528
2529 \begin_layout Plain Layout
2530
2531 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2532 \end_layout
2533
2534 \end_inset
2535
2536
2537 \end_layout
2538
2539 \end_inset
2540
2541  The advantage of this package (compared to other packages such as 
2542 \family typewriter
2543 multibib
2544 \family default
2545 ) is that you don't need to define new citation commands.
2546  Instead, you need to prepare different bibliographic databases which include
2547  the entries for the different sections of the bibliography.
2548  For example: If you want to divide your bibliography into the sections
2549  
2550 \begin_inset Quotes eld
2551 \end_inset
2552
2553 Sources
2554 \begin_inset Quotes erd
2555 \end_inset
2556
2557  and 
2558 \begin_inset Quotes eld
2559 \end_inset
2560
2561 Scientific works
2562 \begin_inset Quotes erd
2563 \end_inset
2564
2565 , you first need to create two bibliographic databases, e.
2566 \begin_inset space \thinspace{}
2567 \end_inset
2568
2569 g.
2570 \begin_inset space \space{}
2571 \end_inset
2572
2573
2574 \begin_inset Flex Code
2575 status collapsed
2576
2577 \begin_layout Plain Layout
2578 sources.bib
2579 \end_layout
2580
2581 \end_inset
2582
2583  and 
2584 \begin_inset Flex Code
2585 status collapsed
2586
2587 \begin_layout Plain Layout
2588 scientific.bib
2589 \end_layout
2590
2591 \end_inset
2592
2593 .
2594  
2595 \end_layout
2596
2597 \begin_layout Standard
2598 Go to 
2599 \begin_inset Flex Noun
2600 status collapsed
2601
2602 \begin_layout Plain Layout
2603 Document\SpecialChar menuseparator
2604 Settings
2605 \end_layout
2606
2607 \end_inset
2608
2609  and check under 
2610 \begin_inset Flex Noun
2611 status collapsed
2612
2613 \begin_layout Plain Layout
2614 Bibliography
2615 \end_layout
2616
2617 \end_inset
2618
2619  the option 
2620 \begin_inset Flex Noun
2621 status collapsed
2622
2623 \begin_layout Plain Layout
2624 Subdivided bibliography
2625 \end_layout
2626
2627 \end_inset
2628
2629 .
2630  Now you can insert multiple Bib\SpecialChar TeX
2631  bibliographies, one for each section of
2632  your bibliography.
2633  Returning to our example: Insert the Bib\SpecialChar TeX
2634  bibliography 
2635 \begin_inset Flex Code
2636 status collapsed
2637
2638 \begin_layout Plain Layout
2639 sources.bib
2640 \end_layout
2641
2642 \end_inset
2643
2644  and a second one for the database 
2645 \begin_inset Flex Code
2646 status collapsed
2647
2648 \begin_layout Plain Layout
2649 scientific.bib
2650 \end_layout
2651
2652 \end_inset
2653
2654 .
2655  You are free to use the same or different styles for each section.
2656  Additionally, you can choose if the bibliography section should contain
2657  
2658 \begin_inset Quotes eld
2659 \end_inset
2660
2661 all cited references
2662 \begin_inset Quotes erd
2663 \end_inset
2664
2665  of the specified database(s) (which is the default), 
2666 \begin_inset Quotes eld
2667 \end_inset
2668
2669 all uncited references
2670 \begin_inset Quotes erd
2671 \end_inset
2672
2673  or even 
2674 \begin_inset Quotes eld
2675 \end_inset
2676
2677 all references
2678 \begin_inset Quotes erd
2679 \end_inset
2680
2681 .
2682  This might be useful if you would like to separate your bibliography into
2683  three sections: 
2684 \begin_inset Quotes eld
2685 \end_inset
2686
2687 Cited sources
2688 \begin_inset Quotes erd
2689 \end_inset
2690
2691
2692 \begin_inset Quotes eld
2693 \end_inset
2694
2695 Uncited sources
2696 \begin_inset Quotes erd
2697 \end_inset
2698
2699 , and 
2700 \begin_inset Quotes eld
2701 \end_inset
2702
2703 Scientific works
2704 \begin_inset Quotes erd
2705 \end_inset
2706
2707 .
2708  The titles for the sections can be added as ordinary sections or subsections.
2709  Since 
2710 \begin_inset Flex Code
2711 status collapsed
2712
2713 \begin_layout Plain Layout
2714 bibtopic
2715 \end_layout
2716
2717 \end_inset
2718
2719  removes the bibliography title, you have to manually re-add that, too (as
2720  a chapter* or section*, for instance).
2721 \end_layout
2722
2723 \begin_layout Standard
2724 With 
2725 \family sans
2726 Biblatex
2727 \family default
2728 , the procedure is a bit different.
2729  Since 
2730 \family typewriter
2731 bibtopic
2732 \family default
2733  does not work with 
2734 \family sans
2735 Biblatex
2736 \family default
2737 , the aforementioned 
2738 \begin_inset Flex Noun
2739 status collapsed
2740
2741 \begin_layout Plain Layout
2742 Subdivided bibliography
2743 \end_layout
2744
2745 \end_inset
2746
2747  option is disabled if you use 
2748 \family sans
2749 Biblatex
2750 \family default
2751 .
2752  However, 
2753 \family sans
2754 Biblatex
2755 \family default
2756  provides its own means to generate subdivided bibliographies.
2757  You can either add keywords to bibliography entries via the 
2758 \begin_inset Flex Code
2759 status collapsed
2760
2761 \begin_layout Plain Layout
2762 keywords
2763 \end_layout
2764
2765 \end_inset
2766
2767  entry option and then filter bibliography sections by keyword (by adding
2768  
2769 \begin_inset Flex Code
2770 status collapsed
2771
2772 \begin_layout Plain Layout
2773 keyword=mykeyword
2774 \end_layout
2775
2776 \end_inset
2777
2778  to the 
2779 \begin_inset Flex Noun
2780 status collapsed
2781
2782 \begin_layout Plain Layout
2783 Options
2784 \end_layout
2785
2786 \end_inset
2787
2788  field of the dialog that opens if you right-click on the 
2789 \begin_inset Flex Noun
2790 status collapsed
2791
2792 \begin_layout Plain Layout
2793 Biblatex Generated Bibliography
2794 \end_layout
2795
2796 \end_inset
2797
2798  button), or you can filter by entry types (such as 
2799 \emph on
2800 book
2801 \emph default
2802  or 
2803 \emph on
2804 article
2805 \emph default
2806 ) by entering e.
2807 \begin_inset space \thinspace{}
2808 \end_inset
2809
2810 g.
2811  
2812 \begin_inset Flex Code
2813 status collapsed
2814
2815 \begin_layout Plain Layout
2816 type=book
2817 \end_layout
2818
2819 \end_inset
2820
2821  or 
2822 \begin_inset Flex Code
2823 status collapsed
2824
2825 \begin_layout Plain Layout
2826 nottype=collection
2827 \end_layout
2828
2829 \end_inset
2830
2831  to the mentioned 
2832 \begin_inset Flex Noun
2833 status collapsed
2834
2835 \begin_layout Plain Layout
2836 Options
2837 \end_layout
2838
2839 \end_inset
2840
2841  field, or you can create so-called 
2842 \begin_inset Quotes eld
2843 \end_inset
2844
2845 Bibliography Categories
2846 \begin_inset Quotes erd
2847 \end_inset
2848
2849  to which you can assign individual entries.
2850  Please refer to the Biblatex manual, section 
2851 \emph on
2852 Subdivided Bibliographies
2853 \emph default
2854 , for details.
2855 \end_layout
2856
2857 \begin_layout Subsection
2858 Multiple Bibliographies
2859 \end_layout
2860
2861 \begin_layout Standard
2862 Multiple bibliographies, e.
2863 \begin_inset space \thinspace{}
2864 \end_inset
2865
2866 g.
2867 \begin_inset space \space{}
2868 \end_inset
2869
2870 a bibliography for each part, chapter, section, subsection or child (sub-documen
2871 t) of the document, are also supported by \SpecialChar LyX
2872 .
2873  In order to enable it, go to 
2874 \begin_inset Flex Noun
2875 status collapsed
2876
2877 \begin_layout Plain Layout
2878 Document\SpecialChar menuseparator
2879 Settings\SpecialChar menuseparator
2880 Bibliography
2881 \end_layout
2882
2883 \end_inset
2884
2885  and select the relevant unit (e.
2886 \begin_inset space \thinspace{}
2887 \end_inset
2888
2889 g., 
2890 \begin_inset Quotes eld
2891 \end_inset
2892
2893 per section
2894 \begin_inset Quotes erd
2895 \end_inset
2896
2897 ) in the 
2898 \begin_inset Flex Noun
2899 status collapsed
2900
2901 \begin_layout Plain Layout
2902 Multiple Bibliographies
2903 \end_layout
2904
2905 \end_inset
2906
2907  combo box.
2908  Then add a Bib(la)\SpecialChar TeX
2909  bibliography to each unit (e.
2910 \begin_inset space \thinspace{}
2911 \end_inset
2912
2913 g., section) of your document.
2914  In the output, a separate bibliography, containing only the references
2915  done in the current unit is generated.
2916 \end_layout
2917
2918 \begin_layout Standard
2919 If you use Bib\SpecialChar TeX
2920 , either the 
2921 \begin_inset Flex Code
2922 status collapsed
2923
2924 \begin_layout Plain Layout
2925 chapterbib
2926 \end_layout
2927
2928 \end_inset
2929
2930  of the 
2931 \begin_inset Flex Code
2932 status collapsed
2933
2934 \begin_layout Plain Layout
2935 bibtopic
2936 \end_layout
2937
2938 \end_inset
2939
2940  package is used to create multiple bibliographies.
2941  The former package is used if you select 
2942 \begin_inset Quotes eld
2943 \end_inset
2944
2945 per child document
2946 \begin_inset Quotes erd
2947 \end_inset
2948
2949  and do 
2950 \emph on
2951 not
2952 \emph default
2953  check 
2954 \begin_inset Flex Noun
2955 status collapsed
2956
2957 \begin_layout Plain Layout
2958 Sectioned Bibliography
2959 \end_layout
2960
2961 \end_inset
2962
2963 .
2964  In all other cases, 
2965 \begin_inset Flex Code
2966 status collapsed
2967
2968 \begin_layout Plain Layout
2969 bibtopic
2970 \end_layout
2971
2972 \end_inset
2973
2974  is used.
2975 \begin_inset Foot
2976 status collapsed
2977
2978 \begin_layout Plain Layout
2979 An alternative approach, if you are willing to use some 
2980 \begin_inset Flex Noun
2981 status collapsed
2982
2983 \begin_layout Plain Layout
2984 \SpecialChar TeX
2985  Code
2986 \end_layout
2987
2988 \end_inset
2989
2990  (see section
2991 \begin_inset space ~
2992 \end_inset
2993
2994
2995 \begin_inset CommandInset ref
2996 LatexCommand ref
2997 reference "sec:Inserting-TeX-Code"
2998
2999 \end_inset
3000
3001 ), is to use the 
3002 \begin_inset Flex Code
3003 status collapsed
3004
3005 \begin_layout Plain Layout
3006 bibunits
3007 \end_layout
3008
3009 \end_inset
3010
3011  package.
3012 \end_layout
3013
3014 \end_inset
3015
3016  If 
3017 \begin_inset Flex Code
3018 status collapsed
3019
3020 \begin_layout Plain Layout
3021 bibtopic
3022 \end_layout
3023
3024 \end_inset
3025
3026  is used, \SpecialChar LyX
3027  encloses the specified units in 
3028 \begin_inset Flex Code
3029 status collapsed
3030
3031 \begin_layout Plain Layout
3032 bibtopic
3033 \end_layout
3034
3035 \end_inset
3036
3037 's 
3038 \begin_inset Flex Code
3039 status collapsed
3040
3041 \begin_layout Plain Layout
3042
3043 \backslash
3044 begin{btUnit}
3045 \end_layout
3046
3047 \end_inset
3048
3049  and 
3050 \begin_inset Flex Code
3051 status collapsed
3052
3053 \begin_layout Plain Layout
3054
3055 \backslash
3056 end{btUnit}
3057 \end_layout
3058
3059 \end_inset
3060
3061  in order to create the units.
3062  Note that this approach has some limitations.
3063  First, every citation reference has to be inside some 
3064 \begin_inset Flex Code
3065 status collapsed
3066
3067 \begin_layout Plain Layout
3068 btUnit
3069 \end_layout
3070
3071 \end_inset
3072
3073 .
3074  So citations outside a defined unit (e.
3075 \begin_inset space \thinspace{}
3076 \end_inset
3077
3078 g., before the first section if you use 
3079 \begin_inset Quotes eld
3080 \end_inset
3081
3082 by section
3083 \begin_inset Quotes erd
3084 \end_inset
3085
3086 ) will appear as 
3087 \begin_inset Quotes eld
3088 \end_inset
3089
3090 ???
3091 \begin_inset Quotes erd
3092 \end_inset
3093
3094 .
3095  You can also create your own units by entering 
3096 \begin_inset Flex Code
3097 status collapsed
3098
3099 \begin_layout Plain Layout
3100
3101 \backslash
3102 begin{btUnit}
3103 \end_layout
3104
3105 \end_inset
3106
3107  and 
3108 \begin_inset Flex Code
3109 status collapsed
3110
3111 \begin_layout Plain Layout
3112
3113 \backslash
3114 end{btUnit}
3115 \end_layout
3116
3117 \end_inset
3118
3119  as \SpecialChar TeX
3120  code (for instance to work around the mentioned limitation).
3121  Note, though, that 
3122 \begin_inset Flex Code
3123 status collapsed
3124
3125 \begin_layout Plain Layout
3126 btUnit
3127 \end_layout
3128
3129 \end_inset
3130
3131 s cannot be nested.
3132  A second limitation is that 
3133 \begin_inset Flex Code
3134 status collapsed
3135
3136 \begin_layout Plain Layout
3137 bibtopic
3138 \end_layout
3139
3140 \end_inset
3141
3142  always processes all references of a bibliography database, even if they
3143  are not cited.
3144  This can result in odd labels (e.
3145 \begin_inset space \thinspace{}
3146 \end_inset
3147
3148 g.
3149  
3150 \begin_inset Quotes eld
3151 \end_inset
3152
3153 Miller 2014b
3154 \begin_inset Quotes erd
3155 \end_inset
3156
3157  if two works of this author from 2014 are in the database, even if only
3158  one is cited).
3159 \end_layout
3160
3161 \begin_layout Standard
3162 If you use 
3163 \family sans
3164 Biblatex
3165 \family default
3166 , the 
3167 \begin_inset Flex Code
3168 status collapsed
3169
3170 \begin_layout Plain Layout
3171 refsection
3172 \end_layout
3173
3174 \end_inset
3175
3176  option is used instead.
3177  If you need specific units, you can start them with the \SpecialChar TeX
3178  code 
3179 \begin_inset Flex Code
3180 status collapsed
3181
3182 \begin_layout Plain Layout
3183
3184 \backslash
3185 newrefsection
3186 \end_layout
3187
3188 \end_inset
3189
3190  or 
3191 \begin_inset Flex Code
3192 status collapsed
3193
3194 \begin_layout Plain Layout
3195
3196 \backslash
3197 newrefsegment
3198 \end_layout
3199
3200 \end_inset
3201
3202 , respectively.
3203  If you also want to control the end of the unit, use the environment 
3204 \begin_inset Flex Code
3205 status collapsed
3206
3207 \begin_layout Plain Layout
3208
3209 \backslash
3210 begin{refsection}
3211 \end_layout
3212
3213 \end_inset
3214
3215  \SpecialChar ldots
3216  
3217 \begin_inset Flex Code
3218 status collapsed
3219
3220 \begin_layout Plain Layout
3221
3222 \backslash
3223 end{refsection}
3224 \end_layout
3225
3226 \end_inset
3227
3228  instead.
3229  Note, though, that 
3230 \begin_inset Flex Code
3231 status collapsed
3232
3233 \begin_layout Plain Layout
3234 refsection
3235 \end_layout
3236
3237 \end_inset
3238
3239 s cannot be nested.
3240  In addition to the individual bibliography of the current unit, 
3241 \family sans
3242 Biblatex
3243 \family default
3244  also provides an easy way to output all bibliographies, subsequently, at
3245  one place (e.
3246 \begin_inset space \thinspace{}
3247 \end_inset
3248
3249 g., at the end of the document).
3250  Select 
3251 \begin_inset Quotes eld
3252 \end_inset
3253
3254 all reference units
3255 \begin_inset Quotes erd
3256 \end_inset
3257
3258  from the Content combo box of the Bib(la)TeX inset dialog in order to achieve
3259  this.
3260  Please refer to the 
3261 \family sans
3262 Biblatex
3263 \family default
3264  manual for more information on this topic.
3265 \end_layout
3266
3267 \begin_layout Section
3268 Multipart Documents
3269 \end_layout
3270
3271 \begin_layout Subsection
3272 General Operation
3273 \end_layout
3274
3275 \begin_layout Standard
3276 When you are working on a large file with many sections, it is often convenient
3277  to break up the document into several files, or perhaps you have something
3278  where a table may change from time to time, but the preceding text does
3279  not.
3280  In these cases, you should seriously consider using multipart documents.
3281  For example, scientific papers often have five major sections: the introduction
3282 , observations, results, discussion, and conclusion.
3283  Each of these could be its own separate \SpecialChar LyX
3284  file, with one 
3285 \begin_inset Quotes eld
3286 \end_inset
3287
3288 master
3289 \begin_inset Quotes erd
3290 \end_inset
3291
3292  file which contains the title, authors, abstract, references, etc., plus
3293  the five included files.
3294  It is important to note that each of these files is a full \SpecialChar LyX
3295  file which
3296  can be formatted and printed on its own, as well as included in a master
3297  file.
3298  Each of these files must have the same document class, however—don't attempt
3299  to mix book classes with article classes.
3300  You may also include \SpecialChar LaTeX
3301  files; however, these files must not have their own
3302  preamble (i.
3303 \begin_inset space \thinspace{}
3304 \end_inset
3305
3306 e.
3307 \begin_inset space \space{}
3308 \end_inset
3309
3310 everything up to and including the 
3311 \begin_inset Flex Code
3312 status collapsed
3313
3314 \begin_layout Plain Layout
3315
3316 \backslash
3317 begin{document}
3318 \end_layout
3319
3320 \end_inset
3321
3322  line as well as the 
3323 \begin_inset Flex Code
3324 status collapsed
3325
3326 \begin_layout Plain Layout
3327
3328 \backslash
3329 end{document}
3330 \end_layout
3331
3332 \end_inset
3333
3334  line must be deleted) or else errors will be generated when you try to
3335  make a DVI file.
3336 \end_layout
3337
3338 \begin_layout Standard
3339 \SpecialChar LyX
3340  allows you to include files quite easily with 
3341 \begin_inset Flex Noun
3342 status collapsed
3343
3344 \begin_layout Plain Layout
3345 Insert\SpecialChar menuseparator
3346 ChiId
3347 \begin_inset space ~
3348 \end_inset
3349
3350 Document
3351 \end_layout
3352
3353 \end_inset
3354
3355 .
3356  When you click on this selection a small box is inserted into the file
3357  at the current cursor location.
3358  Clicking on the box raises a dialog which allows you to select the file
3359  to be included, and the method of its inclusion.
3360  
3361 \end_layout
3362
3363 \begin_layout Standard
3364 The file selection box should by now be obvious.
3365  The three inclusion methods are 
3366 \begin_inset Quotes eld
3367 \end_inset
3368
3369 include
3370 \begin_inset Quotes erd
3371 \end_inset
3372
3373
3374 \begin_inset Quotes eld
3375 \end_inset
3376
3377 input
3378 \begin_inset Quotes erd
3379 \end_inset
3380
3381 , and 
3382 \begin_inset Quotes eld
3383 \end_inset
3384
3385 verbatim
3386 \begin_inset Quotes erd
3387 \end_inset
3388
3389 .
3390  The difference between 
3391 \begin_inset Quotes eld
3392 \end_inset
3393
3394 include
3395 \begin_inset Quotes erd
3396 \end_inset
3397
3398  and 
3399 \begin_inset Quotes eld
3400 \end_inset
3401
3402 input
3403 \begin_inset Quotes erd
3404 \end_inset
3405
3406  is really only meaningful to \SpecialChar LaTeX
3407 perts, but the practical difference is that
3408  files that are 
3409 \begin_inset Quotes eld
3410 \end_inset
3411
3412 included
3413 \begin_inset Quotes erd
3414 \end_inset
3415
3416  are typeset beginning on a new page, while files that are 
3417 \begin_inset Quotes eld
3418 \end_inset
3419
3420 inputted
3421 \begin_inset Quotes erd
3422 \end_inset
3423
3424  are typeset starting on the current page.
3425 \end_layout
3426
3427 \begin_layout Standard
3428 Generally, the master file is converted into a full \SpecialChar LaTeX
3429  file before typesetting,
3430  while the included files are converted to \SpecialChar LaTeX
3431  files that do not have all the
3432  preamble information.
3433 \end_layout
3434
3435 \begin_layout Standard
3436
3437 \begin_inset Quotes eld
3438 \end_inset
3439
3440 verbatim
3441 \begin_inset Quotes erd
3442 \end_inset
3443
3444  included file allows you to include a file typeset exactly as it appears
3445  in the file, i.
3446 \begin_inset space \thinspace{}
3447 \end_inset
3448
3449 e.
3450 \begin_inset space \space{}
3451 \end_inset
3452
3453 in 
3454 \begin_inset Flex Code
3455 status collapsed
3456
3457 \begin_layout Plain Layout
3458 verbatim
3459 \end_layout
3460
3461 \end_inset
3462
3463  mode, with the characters set in a fixed-width typewriter font.
3464  Normally, spaces in this file are invisible, though two consecutive spaces
3465  are conserved, unlike \SpecialChar LyX
3466 's normal treatment of spaces.
3467  However, setting the 
3468 \begin_inset Flex Noun
3469 status collapsed
3470
3471 \begin_layout Plain Layout
3472 Mark
3473 \begin_inset space ~
3474 \end_inset
3475
3476 spaces
3477 \begin_inset space ~
3478 \end_inset
3479
3480 in
3481 \begin_inset space ~
3482 \end_inset
3483
3484 output
3485 \end_layout
3486
3487 \end_inset
3488
3489  checkbox typesets a mark to unambiguously define the presence of a space.
3490  
3491 \end_layout
3492
3493 \begin_layout Subsection
3494 Cross-References Between Files
3495 \end_layout
3496
3497 \begin_layout Standard
3498 \begin_inset Box Shadowbox
3499 position "t"
3500 hor_pos "c"
3501 has_inner_box 1
3502 inner_pos "t"
3503 use_parbox 0
3504 use_makebox 0
3505 width "100col%"
3506 special "none"
3507 height "1in"
3508 height_special "totalheight"
3509 thickness "0.4pt"
3510 separation "3pt"
3511 shadowsize "4pt"
3512 framecolor "black"
3513 backgroundcolor "none"
3514 status open
3515
3516 \begin_layout Plain Layout
3517 This section is somewhat out of date.
3518  Need to describe default master documents and how children are opened when
3519  the master is.
3520  [[FIXME]]
3521 \end_layout
3522
3523 \end_inset
3524
3525
3526 \end_layout
3527
3528 \begin_layout Standard
3529 It is possible to set up cross-references between the different files.
3530  First, open all the files in question: let's call them A and B in a two
3531  file example, where B is included in A.
3532  Let's say you insert a label in A, then want to reference it in B.
3533  Open the cross-reference dialog whilst in document B, and you can select
3534  the 
3535 \begin_inset Quotes eld
3536 \end_inset
3537
3538 buffer
3539 \begin_inset Quotes erd
3540 \end_inset
3541
3542  to use.
3543 \end_layout
3544
3545 \begin_layout Subsection
3546 Bibliography Lists in all Subdocuments
3547 \end_layout
3548
3549 \begin_layout Standard
3550 \begin_inset Box Frameless
3551 position "t"
3552 hor_pos "c"
3553 has_inner_box 1
3554 inner_pos "t"
3555 use_parbox 0
3556 use_makebox 0
3557 width "100col%"
3558 special "none"
3559 height "1in"
3560 height_special "totalheight"
3561 thickness "0.4pt"
3562 separation "3pt"
3563 shadowsize "4pt"
3564 framecolor "black"
3565 backgroundcolor "none"
3566 status open
3567
3568 \begin_layout Plain Layout
3569 This section also needs updating.
3570  There is now material about this on the wiki, and it could be copied here.
3571 \end_layout
3572
3573 \end_inset
3574
3575
3576 \end_layout
3577
3578 \begin_layout Standard
3579 Copy the bibliography list with all entries to all subdocuments and transform
3580  them to a comment.
3581  This way \SpecialChar LyX
3582  will find the 
3583 \begin_inset Flex Code
3584 status collapsed
3585
3586 \begin_layout Plain Layout
3587 .bib
3588 \end_layout
3589
3590 \end_inset
3591
3592 -files and you can easily insert references without making the bibliography
3593  list visible.
3594 \end_layout
3595
3596 \begin_layout Standard
3597 As the bibliography list is in a comment, \SpecialChar LaTeX
3598  won't use it and the references
3599  will look like this: [?], instead of like this: [1].
3600  One solution is to use the \SpecialChar LaTeX
3601 -package 
3602 \begin_inset Flex Code
3603 status collapsed
3604
3605 \begin_layout Plain Layout
3606 comment
3607 \end_layout
3608
3609 \end_inset
3610
3611  that will only include comments by processing the files separately.
3612  To do this, add in the \SpecialChar LaTeX
3613  preamble of every subdocument the following:
3614 \end_layout
3615
3616 \begin_layout LyX-Code
3617
3618 \backslash
3619 usepackage{comment}
3620 \end_layout
3621
3622 \begin_layout LyX-Code
3623
3624 \backslash
3625 includecomment{comment}
3626 \end_layout
3627
3628 \begin_layout Standard
3629 See also 
3630 \begin_inset Flex URL
3631 status collapsed
3632
3633 \begin_layout Plain Layout
3634
3635 http://wiki.lyx.org/FAQ/Unsorted#toc31
3636 \end_layout
3637
3638 \end_inset
3639
3640 .
3641 \end_layout
3642
3643 \begin_layout Section
3644 \SpecialChar LyX
3645  Archives
3646 \end_layout
3647
3648 \begin_layout Standard
3649 Users sometimes need to be able to 
3650 \begin_inset Quotes eld
3651 \end_inset
3652
3653 bundle
3654 \begin_inset Quotes erd
3655 \end_inset
3656
3657  a \SpecialChar LyX
3658  file together with all the images (and other files) on which it depends,
3659  either for sending to a publisher or for sharing with a co-author.
3660  \SpecialChar LyX
3661  2.0 includes a Python script (
3662 \begin_inset Flex Code
3663 status collapsed
3664
3665 \begin_layout Plain Layout
3666 lyxpak.py
3667 \end_layout
3668
3669 \end_inset
3670
3671 ) that automates this process.
3672  To use it, you must have either the 
3673 \begin_inset Flex Code
3674 status collapsed
3675
3676 \begin_layout Plain Layout
3677 zipfile
3678 \end_layout
3679
3680 \end_inset
3681
3682  or 
3683 \begin_inset Flex Code
3684 status collapsed
3685
3686 \begin_layout Plain Layout
3687 tarfile
3688 \end_layout
3689
3690 \end_inset
3691
3692  python modules installed on your system.
3693  By default, the script prefers the 
3694 \begin_inset Flex Code
3695 status collapsed
3696
3697 \begin_layout Plain Layout
3698 gzip
3699 \end_layout
3700
3701 \end_inset
3702
3703 -compressed 
3704 \begin_inset Flex Code
3705 status collapsed
3706
3707 \begin_layout Plain Layout
3708 tar
3709 \end_layout
3710
3711 \end_inset
3712
3713  format on Unix-like systems and the 
3714 \begin_inset Flex Code
3715 status collapsed
3716
3717 \begin_layout Plain Layout
3718 zip
3719 \end_layout
3720
3721 \end_inset
3722
3723  format on Windows.
3724 \end_layout
3725
3726 \begin_layout Standard
3727 \SpecialChar LyX
3728 's configuration process will set the script up to export a `\SpecialChar LyX
3729  Archive',
3730  and this format will then be available under 
3731 \begin_inset Flex Code
3732 status collapsed
3733
3734 \begin_layout Plain Layout
3735 File\SpecialChar menuseparator
3736 Export
3737 \end_layout
3738
3739 \end_inset
3740
3741 .
3742 \end_layout
3743
3744 \begin_layout Standard
3745 Independently of the platform, the generation of a particular archive format
3746  can be forced by adding either the 
3747 \begin_inset Flex Code
3748 status collapsed
3749
3750 \begin_layout Plain Layout
3751 -t
3752 \end_layout
3753
3754 \end_inset
3755
3756  (for the 
3757 \begin_inset Flex Code
3758 status collapsed
3759
3760 \begin_layout Plain Layout
3761 tar
3762 \end_layout
3763
3764 \end_inset
3765
3766  format) or 
3767 \begin_inset Flex Code
3768 status collapsed
3769
3770 \begin_layout Plain Layout
3771 -z
3772 \end_layout
3773
3774 \end_inset
3775
3776  (for the 
3777 \begin_inset Flex Code
3778 status collapsed
3779
3780 \begin_layout Plain Layout
3781 zip
3782 \end_layout
3783
3784 \end_inset
3785
3786  format) switch to the 
3787 \begin_inset Flex Code
3788 status collapsed
3789
3790 \begin_layout Plain Layout
3791 \SpecialChar LyX
3792 \SpecialChar menuseparator
3793 \SpecialChar LyX
3794  Archive
3795 \end_layout
3796
3797 \end_inset
3798
3799  converter in 
3800 \begin_inset Flex Code
3801 status collapsed
3802
3803 \begin_layout Plain Layout
3804 Tools\SpecialChar menuseparator
3805 Preferences\SpecialChar menuseparator
3806 File Handling\SpecialChar menuseparator
3807 Converters
3808 \end_layout
3809
3810 \end_inset
3811
3812 .
3813  (Make sure you add the switch after the script name, not before it.)
3814 \end_layout
3815
3816 \begin_layout Section
3817 Fancy Headers and Footers
3818 \end_layout
3819
3820 \begin_layout Standard
3821 The default page layout is rather plain; for an 
3822 \begin_inset Flex Code
3823 status collapsed
3824
3825 \begin_layout Plain Layout
3826 article
3827 \end_layout
3828
3829 \end_inset
3830
3831  document class, all you get is a centered page number at the bottom of
3832  the page.
3833  This document uses KOMA-script's book class, so it appears to be a bit
3834  fancier.
3835  But to really put on a show, you need to set the document page style to
3836  
3837 \begin_inset Quotes eld
3838 \end_inset
3839
3840 fancy
3841 \begin_inset Quotes erd
3842 \end_inset
3843
3844 , as mentioned in the 
3845 \emph on
3846 User Guide
3847 \emph default
3848 .
3849  This section describes the \SpecialChar LaTeX
3850  code you need to insert in your \SpecialChar LaTeX
3851  preamble in
3852  order to get the desired effects.
3853 \end_layout
3854
3855 \begin_layout Standard
3856 For more information on fancy headers, see the 
3857 \begin_inset Flex Code
3858 status collapsed
3859
3860 \begin_layout Plain Layout
3861 fancyhdr
3862 \end_layout
3863
3864 \end_inset
3865
3866  package documentation.
3867  (
3868 \begin_inset Flex URL
3869 status collapsed
3870
3871 \begin_layout Plain Layout
3872
3873 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3874 \end_layout
3875
3876 \end_inset
3877
3878 )
3879 \end_layout
3880
3881 \begin_layout Standard
3882 The page header is divided into three fields, not surprisingly labeled 
3883 \begin_inset Quotes eld
3884 \end_inset
3885
3886 left
3887 \begin_inset Quotes erd
3888 \end_inset
3889
3890
3891 \begin_inset Quotes eld
3892 \end_inset
3893
3894 center
3895 \begin_inset Quotes erd
3896 \end_inset
3897
3898 , and 
3899 \begin_inset Quotes eld
3900 \end_inset
3901
3902 right
3903 \begin_inset Quotes erd
3904 \end_inset
3905
3906 .
3907  The footer is also divided into these three fields.
3908  The \SpecialChar LaTeX
3909  commands to set these fields in the simplest manner are 
3910 \begin_inset Flex Code
3911 status collapsed
3912
3913 \begin_layout Plain Layout
3914
3915 \backslash
3916 lhead
3917 \end_layout
3918
3919 \end_inset
3920
3921
3922 \begin_inset Flex Code
3923 status collapsed
3924
3925 \begin_layout Plain Layout
3926
3927 \backslash
3928 chead
3929 \end_layout
3930
3931 \end_inset
3932
3933
3934 \begin_inset Flex Code
3935 status collapsed
3936
3937 \begin_layout Plain Layout
3938
3939 \backslash
3940 rhead
3941 \end_layout
3942
3943 \end_inset
3944
3945
3946 \begin_inset Flex Code
3947 status collapsed
3948
3949 \begin_layout Plain Layout
3950
3951 \backslash
3952 lfoot
3953 \end_layout
3954
3955 \end_inset
3956
3957 , etc.
3958  Suppose you wish to put your name in the upper left hand corner of each
3959  page.
3960  Simply insert the following command in the preamble: 
3961 \end_layout
3962
3963 \begin_layout Standard
3964
3965 \family typewriter
3966
3967 \backslash
3968 lhead{John Q.
3969  DocWriter}
3970 \end_layout
3971
3972 \begin_layout Standard
3973 You will now see your name in the upper left.
3974  If a field has a default entry that you would like to get rid of (often
3975  the page number appears in the central footer) simply include a command
3976  with a blank argument, e.
3977 \begin_inset space \thinspace{}
3978 \end_inset
3979
3980 g.:
3981 \end_layout
3982
3983 \begin_layout Standard
3984
3985 \family typewriter
3986
3987 \backslash
3988 cfoot{}
3989 \end_layout
3990
3991 \begin_layout Standard
3992 Let's get really fancy: lets put the section number with the word 
3993 \begin_inset Quotes eld
3994 \end_inset
3995
3996 Section
3997 \begin_inset Quotes erd
3998 \end_inset
3999
4000  (e.
4001 \begin_inset space \thinspace{}
4002 \end_inset
4003
4004 g.
4005 \begin_inset space \space{}
4006 \end_inset
4007
4008 Section 3) in the upper left, the page number (e.
4009 \begin_inset space \thinspace{}
4010 \end_inset
4011
4012 g.
4013 \begin_inset space \space{}
4014 \end_inset
4015
4016 Page 4) in the upper right, your name in the lower left, and the date in
4017  the lower right.
4018  The following commands should now appear in the preamble:
4019 \end_layout
4020
4021 \begin_layout Standard
4022
4023 \family typewriter
4024
4025 \backslash
4026 lhead{Section 
4027 \backslash
4028 thesection}
4029 \end_layout
4030
4031 \begin_layout Standard
4032
4033 \family typewriter
4034
4035 \backslash
4036 chead{}
4037 \end_layout
4038
4039 \begin_layout Standard
4040
4041 \family typewriter
4042
4043 \backslash
4044 rhead{Page 
4045 \backslash
4046 thepage}
4047 \end_layout
4048
4049 \begin_layout Standard
4050
4051 \family typewriter
4052
4053 \backslash
4054 lfoot{John Q.
4055  DocWriter}
4056 \end_layout
4057
4058 \begin_layout Standard
4059
4060 \family typewriter
4061
4062 \backslash
4063 cfoot{}
4064 \end_layout
4065
4066 \begin_layout Standard
4067
4068 \family typewriter
4069
4070 \backslash
4071 rfoot{
4072 \backslash
4073 today}
4074 \end_layout
4075
4076 \begin_layout Standard
4077 The commands 
4078 \begin_inset Flex Code
4079 status collapsed
4080
4081 \begin_layout Plain Layout
4082
4083 \backslash
4084 thesection
4085 \end_layout
4086
4087 \end_inset
4088
4089  and 
4090 \begin_inset Flex Code
4091 status collapsed
4092
4093 \begin_layout Plain Layout
4094
4095 \backslash
4096 thepage
4097 \end_layout
4098
4099 \end_inset
4100
4101  access \SpecialChar LaTeX
4102 's section and page counters, and so print out the current section
4103  and page numbers.
4104  
4105 \begin_inset Flex Code
4106 status collapsed
4107
4108 \begin_layout Plain Layout
4109
4110 \backslash
4111 today
4112 \end_layout
4113
4114 \end_inset
4115
4116  simply prints out today's date.
4117 \end_layout
4118
4119 \begin_layout Standard
4120 The thicknesses of the horizontal rules drawn beneath the header and above
4121  the footer can also be modified.
4122  If you don't want one of the rules, set its thickness to 0.
4123  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
4124  Use commands
4125 \family typewriter
4126  
4127 \family default
4128 like 
4129 \begin_inset Flex Code
4130 status collapsed
4131
4132 \begin_layout Plain Layout
4133
4134 \backslash
4135 renewcommand{
4136 \backslash
4137 headrulewidth}{0.4pt}
4138 \end_layout
4139
4140 \end_inset
4141
4142  and 
4143 \begin_inset Flex Code
4144 status collapsed
4145
4146 \begin_layout Plain Layout
4147
4148 \backslash
4149 renewcommand{
4150 \backslash
4151 footrulewidth}{0.4pt}
4152 \end_layout
4153
4154 \end_inset
4155
4156  to set the thicknesses.
4157 \end_layout
4158
4159 \begin_layout Standard
4160 You can switch the header/footer settings on and off for individual pages
4161  using commands like 
4162 \begin_inset Flex Code
4163 status collapsed
4164
4165 \begin_layout Plain Layout
4166
4167 \backslash
4168 thispagestyle{empty}
4169 \end_layout
4170
4171 \end_inset
4172
4173
4174 \begin_inset Flex Code
4175 status collapsed
4176
4177 \begin_layout Plain Layout
4178
4179 \backslash
4180 thispagestyle{plain}
4181 \end_layout
4182
4183 \end_inset
4184
4185 , and 
4186 \begin_inset Flex Code
4187 status collapsed
4188
4189 \begin_layout Plain Layout
4190
4191 \backslash
4192 thispagestyle{fancy}
4193 \end_layout
4194
4195 \end_inset
4196
4197 .
4198  Simply insert them in the text on the page you want changed and mark them
4199  as \SpecialChar TeX
4200  code.
4201  In fact, title pages are marked as plain by default, while following pages
4202  are marked fancy when using the global fancy setting.
4203 \end_layout
4204
4205 \begin_layout Standard
4206 As a final example, it is possible to include an image in the header or
4207  footer.
4208  Suppose you want to put a company logo in the upper lefthand corner.
4209  You might try something like
4210 \end_layout
4211
4212 \begin_layout Standard
4213
4214 \family typewriter
4215
4216 \backslash
4217 lhead{
4218 \backslash
4219 resizebox{1in}{!}{
4220 \backslash
4221 includegraphics{logo.eps}}}
4222 \end_layout
4223
4224 \begin_layout Standard
4225 \noindent
4226 (you may need to preface this with 
4227 \begin_inset Flex Code
4228 status collapsed
4229
4230 \begin_layout Plain Layout
4231 \noindent
4232
4233 \backslash
4234 usepackage{graphics}
4235 \end_layout
4236
4237 \end_inset
4238
4239  if you don't include graphics elsewhere in your document).
4240 \end_layout
4241
4242 \begin_layout Section
4243 Itemize Bullet Selection
4244 \begin_inset CommandInset label
4245 LatexCommand label
4246 name "sec:bullet"
4247
4248 \end_inset
4249
4250
4251 \end_layout
4252
4253 \begin_layout Standard
4254 by
4255 \noun on
4256  Allan Rae
4257 \end_layout
4258
4259 \begin_layout Subsection
4260 Introduction
4261 \end_layout
4262
4263 \begin_layout Standard
4264 \SpecialChar LyX
4265  provides 216 bullet shapes that can be accessed from a simple dialog.
4266  Using this dialog you can easily specify what bullet shape to use at each
4267  level of an itemized list.
4268  These settings are document-wide so you won't be able to specify different
4269  sets of bullets for different paragraphs.
4270 \begin_inset Foot
4271 status collapsed
4272
4273 \begin_layout Plain Layout
4274 Well, actually you can but you'll have to do it by hand.
4275 \end_layout
4276
4277 \end_inset
4278
4279
4280 \end_layout
4281
4282 \begin_layout Subsection
4283 How it looks
4284 \end_layout
4285
4286 \begin_layout Standard
4287 Open the dialog by selecting the 
4288 \begin_inset Flex Noun
4289 status collapsed
4290
4291 \begin_layout Plain Layout
4292 Document\SpecialChar menuseparator
4293 Settings
4294 \end_layout
4295
4296 \end_inset
4297
4298  menu item and then select the 
4299 \begin_inset Flex Noun
4300 status collapsed
4301
4302 \begin_layout Plain Layout
4303 Bullets
4304 \end_layout
4305
4306 \end_inset
4307
4308  tab.
4309 \end_layout
4310
4311 \begin_layout Standard
4312 The dialog provides you with a table of bullet shapes.
4313  A column of buttons on the left of the table provides access to the six
4314  different panels of bullet shapes.
4315  The row of buttons across the top is used to select which bullet depth
4316  you are changing.
4317  A text entry under the table shows the currently selected bullet shape's
4318  \SpecialChar LaTeX
4319  equivalent and this can be edited if desired.
4320  If you do modify the text you will also need to specify any needed packages
4321  in the \SpecialChar LaTeX
4322  preamble.
4323 \end_layout
4324
4325 \begin_layout Standard
4326 The six panels are divided up by the packages they require.
4327  The following table shows the mappings from button name to \SpecialChar LaTeX
4328  package.
4329 \end_layout
4330
4331 \begin_layout Standard
4332 \align center
4333 \begin_inset Tabular
4334 <lyxtabular version="3" rows="7" columns="2">
4335 <features tabularvalignment="middle">
4336 <column alignment="center" valignment="top" width="0pt">
4337 <column alignment="center" valignment="top" width="0pt">
4338 <row>
4339 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4340 \begin_inset Text
4341
4342 \begin_layout Plain Layout
4343
4344 \family roman
4345 \series medium
4346 \shape up
4347 \size normal
4348 \emph off
4349 \bar no
4350 \noun off
4351 \color none
4352 Button
4353 \end_layout
4354
4355 \end_inset
4356 </cell>
4357 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4358 \begin_inset Text
4359
4360 \begin_layout Plain Layout
4361
4362 \family roman
4363 \series medium
4364 \shape up
4365 \size normal
4366 \emph off
4367 \bar no
4368 \noun off
4369 \color none
4370 Packages Required
4371 \end_layout
4372
4373 \end_inset
4374 </cell>
4375 </row>
4376 <row>
4377 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4378 \begin_inset Text
4379
4380 \begin_layout Plain Layout
4381
4382 \family sans
4383 \series medium
4384 \shape up
4385 \size normal
4386 \emph off
4387 \bar no
4388 \noun off
4389 \color none
4390 Standard
4391 \end_layout
4392
4393 \end_inset
4394 </cell>
4395 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4396 \begin_inset Text
4397
4398 \begin_layout Plain Layout
4399
4400 \series medium
4401 \shape up
4402 \size normal
4403 \emph off
4404 \bar no
4405 \noun off
4406 \color none
4407 base \SpecialChar LaTeX
4408
4409 \end_layout
4410
4411 \end_inset
4412 </cell>
4413 </row>
4414 <row>
4415 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4416 \begin_inset Text
4417
4418 \begin_layout Plain Layout
4419
4420 \family sans
4421 \series medium
4422 \shape up
4423 \size normal
4424 \emph off
4425 \bar no
4426 \noun off
4427 \color none
4428 Maths
4429 \end_layout
4430
4431 \end_inset
4432 </cell>
4433 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4434 \begin_inset Text
4435
4436 \begin_layout Plain Layout
4437
4438 \family typewriter
4439 \series medium
4440 \shape up
4441 \size normal
4442 \emph off
4443 \bar no
4444 \noun off
4445 \color none
4446 amssymb.sty
4447 \end_layout
4448
4449 \end_inset
4450 </cell>
4451 </row>
4452 <row>
4453 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4454 \begin_inset Text
4455
4456 \begin_layout Plain Layout
4457
4458 \family sans
4459 \series medium
4460 \shape up
4461 \size normal
4462 \emph off
4463 \bar no
4464 \noun off
4465 \color none
4466 Ding1
4467 \end_layout
4468
4469 \end_inset
4470 </cell>
4471 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4472 \begin_inset Text
4473
4474 \begin_layout Plain Layout
4475
4476 \family typewriter
4477 \series medium
4478 \shape up
4479 \size normal
4480 \emph off
4481 \bar no
4482 \noun off
4483 \color none
4484 pifont.sty
4485 \end_layout
4486
4487 \end_inset
4488 </cell>
4489 </row>
4490 <row>
4491 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4492 \begin_inset Text
4493
4494 \begin_layout Plain Layout
4495
4496 \family sans
4497 \series medium
4498 \shape up
4499 \size normal
4500 \emph off
4501 \bar no
4502 \noun off
4503 \color none
4504 Ding2
4505 \end_layout
4506
4507 \end_inset
4508 </cell>
4509 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4510 \begin_inset Text
4511
4512 \begin_layout Plain Layout
4513
4514 \family typewriter
4515 \series medium
4516 \shape up
4517 \size normal
4518 \emph off
4519 \bar no
4520 \noun off
4521 \color none
4522 pifont.sty
4523 \end_layout
4524
4525 \end_inset
4526 </cell>
4527 </row>
4528 <row>
4529 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4530 \begin_inset Text
4531
4532 \begin_layout Plain Layout
4533
4534 \family sans
4535 \series medium
4536 \shape up
4537 \size normal
4538 \emph off
4539 \bar no
4540 \noun off
4541 \color none
4542 Ding3
4543 \end_layout
4544
4545 \end_inset
4546 </cell>
4547 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4548 \begin_inset Text
4549
4550 \begin_layout Plain Layout
4551
4552 \family typewriter
4553 \series medium
4554 \shape up
4555 \size normal
4556 \emph off
4557 \bar no
4558 \noun off
4559 \color none
4560 pifont.sty
4561 \end_layout
4562
4563 \end_inset
4564 </cell>
4565 </row>
4566 <row>
4567 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4568 \begin_inset Text
4569
4570 \begin_layout Plain Layout
4571
4572 \family sans
4573 \series medium
4574 \shape up
4575 \size normal
4576 \emph off
4577 \bar no
4578 \noun off
4579 \color none
4580 Ding4
4581 \end_layout
4582
4583 \end_inset
4584 </cell>
4585 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4586 \begin_inset Text
4587
4588 \begin_layout Plain Layout
4589
4590 \family typewriter
4591 \series medium
4592 \shape up
4593 \size normal
4594 \emph off
4595 \bar no
4596 \noun off
4597 \color none
4598 pifont.sty
4599 \end_layout
4600
4601 \end_inset
4602 </cell>
4603 </row>
4604 </lyxtabular>
4605
4606 \end_inset
4607
4608
4609 \end_layout
4610
4611 \begin_layout Standard
4612 \SpecialChar LyX
4613  doesn't stop you using bullets from packages you don't have.
4614  If you get errors from \SpecialChar LaTeX
4615  when you try to view or print the file, then it
4616  is likely you are missing a package.
4617 \begin_inset Foot
4618 status collapsed
4619
4620 \begin_layout Plain Layout
4621 \SpecialChar LyX
4622  doesn't restrict your use since you may be editing locally and exporting
4623  elsewhere.
4624 \end_layout
4625
4626 \end_inset
4627
4628
4629 \end_layout
4630
4631 \begin_layout Subsection
4632 How to use it
4633 \end_layout
4634
4635 \begin_layout Standard
4636 Select which bullet depth you want to change then select the bullet shape
4637  and size.
4638  Any changes will not be visible in \SpecialChar LyX
4639 , but are visible when viewing the document.
4640 \end_layout
4641
4642 \begin_layout Standard
4643 You can reset a bullet shape to the default simply by clicking your right
4644  mouse button on the appropriate bullet depth button.
4645 \begin_inset Foot
4646 status collapsed
4647
4648 \begin_layout Plain Layout
4649 If you 
4650 \emph on
4651 really
4652 \emph default
4653  want to have multiple sets of paragraphs with different sets of bullets
4654  in each, then you're going to have to get your hands dirty with \SpecialChar TeX
4655  code.
4656  The bullet selection dialog can help though because it provides you with
4657  the \SpecialChar LaTeX
4658  code for a wide range of bullet shapes.
4659  To make your own custom paragraphs you have the following options:
4660 \end_layout
4661
4662 \begin_layout Plain Layout
4663 \begin_inset ERT
4664 status open
4665
4666 \begin_layout Plain Layout
4667
4668
4669 \backslash
4670 let
4671 \backslash
4672 savelabelitemi=
4673 \backslash
4674 labelitemi
4675 \end_layout
4676
4677 \end_inset
4678
4679
4680 \end_layout
4681
4682 \begin_layout Plain Layout
4683 \begin_inset ERT
4684 status open
4685
4686 \begin_layout Plain Layout
4687
4688
4689 \backslash
4690 renewcommand
4691 \backslash
4692 labelitemi[0]{
4693 \backslash
4694 small
4695 \backslash
4696 (
4697 \backslash
4698 sharp
4699 \backslash
4700 )}
4701 \end_layout
4702
4703 \end_inset
4704
4705
4706 \end_layout
4707
4708 \begin_layout Itemize
4709 Use the \SpecialChar LaTeX
4710  command 
4711 \begin_inset Flex Code
4712 status collapsed
4713
4714 \begin_layout Plain Layout
4715
4716 \backslash
4717 renewcommand{}{}
4718 \end_layout
4719
4720 \end_inset
4721
4722  to specify a new bullet shape for a given depth.
4723  You'll also need to save the current bullet shape so you can restore it
4724  again afterwards.
4725  In this itemized list the following \SpecialChar LaTeX
4726  code was used to change the bullet
4727  used for the first depth.
4728 \end_layout
4729
4730 \begin_deeper
4731 \begin_layout LyX-Code
4732
4733 \backslash
4734 let
4735 \backslash
4736 savelabelitemi=
4737 \backslash
4738 labelitemi 
4739 \end_layout
4740
4741 \begin_layout LyX-Code
4742
4743 \backslash
4744 renewcommand
4745 \backslash
4746 labelitemi[0]{
4747 \backslash
4748 small
4749 \backslash
4750 (
4751 \backslash
4752 sharp
4753 \backslash
4754 )}
4755 \end_layout
4756
4757 \end_deeper
4758 \begin_layout Itemize
4759 Note that the itemize depth is specified in Roman numerals as part of the
4760  
4761 \family typewriter
4762
4763 \backslash
4764 labelitem
4765 \family default
4766  command.
4767 \end_layout
4768
4769 \begin_layout Itemize
4770 \begin_inset ERT
4771 status open
4772
4773 \begin_layout Plain Layout
4774
4775 [
4776 \backslash
4777 (
4778 \backslash
4779 star
4780 \backslash
4781 )]
4782 \end_layout
4783
4784 \end_inset
4785
4786  Specify each individual entry by starting each item with the bullet shape
4787  enclosed in square brackets and set as 
4788 \begin_inset Flex Noun
4789 status collapsed
4790
4791 \begin_layout Plain Layout
4792 \SpecialChar TeX
4793  Code
4794 \end_layout
4795
4796 \end_inset
4797
4798 .
4799  For example, this item was started with 
4800 \begin_inset Flex Code
4801 status collapsed
4802
4803 \begin_layout Plain Layout
4804 [
4805 \backslash
4806 (
4807 \backslash
4808 star
4809 \backslash
4810 )]
4811 \end_layout
4812
4813 \end_inset
4814
4815 .
4816 \end_layout
4817
4818 \begin_layout Plain Layout
4819 \begin_inset ERT
4820 status open
4821
4822 \begin_layout Plain Layout
4823
4824
4825 \backslash
4826 renewcommand
4827 \backslash
4828 labelitemi[0]{
4829 \backslash
4830 savelabelitemi}
4831 \end_layout
4832
4833 \end_inset
4834
4835
4836 \end_layout
4837
4838 \begin_layout Plain Layout
4839 You'll also need to revert the labelitem back to its previous setting for
4840  the global bullet shape settings to remain in effect.
4841  The way used here was:
4842 \end_layout
4843
4844 \begin_layout LyX-Code
4845
4846 \backslash
4847 renewcommand
4848 \backslash
4849 labelitemi[0]{
4850 \backslash
4851 savelabelitemi}
4852 \end_layout
4853
4854 \end_inset
4855
4856
4857 \end_layout
4858
4859 \begin_layout Chapter
4860 \SpecialChar LyX
4861  and the World Wide Web
4862 \end_layout
4863
4864 \begin_layout Standard
4865 \SpecialChar LyX
4866  has long supported the export of documents to various web-friendly formats,
4867  such as HTML.
4868  Before verson 2.0, however, HTML export was always accomplished by the use
4869  of external converters.
4870 \begin_inset Foot
4871 status collapsed
4872
4873 \begin_layout Plain Layout
4874 For details on the use of external converters with \SpecialChar LyX
4875 , see the 
4876 \emph on
4877 Converters
4878 \emph default
4879  section of the Customization manual.
4880 \end_layout
4881
4882 \end_inset
4883
4884  These fall into two large groups: there are converters that use \SpecialChar LaTeX
4885  as an
4886  intermediate format, such as 
4887 \begin_inset Flex Code
4888 status collapsed
4889
4890 \begin_layout Plain Layout
4891 htlatex
4892 \end_layout
4893
4894 \end_inset
4895
4896
4897 \begin_inset Flex Code
4898 status collapsed
4899
4900 \begin_layout Plain Layout
4901 html2latex
4902 \end_layout
4903
4904 \end_inset
4905
4906 , and 
4907 \begin_inset Flex Code
4908 status collapsed
4909
4910 \begin_layout Plain Layout
4911 plastex
4912 \end_layout
4913
4914 \end_inset
4915
4916 , relying upon \SpecialChar LyX
4917  to produce the \SpecialChar LaTeX
4918 ; and there is a converter that works directly
4919  on \SpecialChar LyX
4920  files, 
4921 \begin_inset Flex Code
4922 status collapsed
4923
4924 \begin_layout Plain Layout
4925 e\SpecialChar LyX
4926 er
4927 \end_layout
4928
4929 \end_inset
4930
4931 .
4932  All of these have different advantages and disadvantages.
4933  
4934 \end_layout
4935
4936 \begin_layout Standard
4937 The \SpecialChar LaTeX
4938 -based converters have the advantage that, in principle, they know everythin
4939 g about the exported document that \SpecialChar LaTeX
4940  does.
4941  Such converters do not care, for example, if a certain block of code was
4942  produced by \SpecialChar LyX
4943  or was Evil Red Text.
4944  These converters know about 
4945 \begin_inset Flex Code
4946 status collapsed
4947
4948 \begin_layout Plain Layout
4949 aux
4950 \end_layout
4951
4952 \end_inset
4953
4954  files, counters, and references, and can often make use of the 
4955 \begin_inset Flex Code
4956 status collapsed
4957
4958 \begin_layout Plain Layout
4959 bbl
4960 \end_layout
4961
4962 \end_inset
4963
4964  files generated by Bib\SpecialChar TeX
4965 .
4966  On the other hand, \SpecialChar LaTeX
4967  is a very hard language to parse—it is sometimes said
4968  that only \SpecialChar TeX
4969  itself understands \SpecialChar TeX
4970 —and \SpecialChar LaTeX
4971 -based converters will often choke on
4972  what seem to be quite simple constructs; complex ones can throw them completely
4973 , and as of this writing, for example, the 
4974 \emph on
4975 Embedded Objects
4976 \emph default
4977  manual will not export with 
4978 \begin_inset Flex Code
4979 status collapsed
4980
4981 \begin_layout Plain Layout
4982 htlatex
4983 \end_layout
4984
4985 \end_inset
4986
4987 , though the others will.
4988  The other issue concerns how math is handled.
4989  These converters typically convert the formulae into little pictures that
4990  are then linked from the HTML document.
4991  Since these are actually generated by \SpecialChar LaTeX
4992 , they are accurate.
4993  But they do not scale well, and just getting them to look as if they are
4994  actually meant to be in your document—so that the font sizes seem to be
4995  roughly the same—can be a challenge.
4996 \end_layout
4997
4998 \begin_layout Standard
4999 Alex Fernandez's 
5000 \begin_inset Flex Code
5001 status collapsed
5002
5003 \begin_layout Plain Layout
5004 e\SpecialChar LyX
5005 er
5006 \end_layout
5007
5008 \end_inset
5009
5010  (
5011 \begin_inset CommandInset href
5012 LatexCommand href
5013 name "http://elyxer.nongnu.org/"
5014 target "http://elyxer.nongnu.org/"
5015 literal "false"
5016
5017 \end_inset
5018
5019 ) solves some of these problems.
5020  In particular, the formulae it produces scale perfectly, since it renders
5021  math using a combination of HTML and CSS rather than converting the formulae
5022  to images.
5023  But even moderately complex formula are rendered less well than with 
5024 \begin_inset Flex Code
5025 status collapsed
5026
5027 \begin_layout Plain Layout
5028 htlatex
5029 \end_layout
5030
5031 \end_inset
5032
5033 ; this reflects the limitations of HTML.
5034 \begin_inset Foot
5035 status collapsed
5036
5037 \begin_layout Plain Layout
5038 That said, 
5039 \begin_inset Flex Code
5040 status collapsed
5041
5042 \begin_layout Plain Layout
5043 e\SpecialChar LyX
5044 er
5045 \end_layout
5046
5047 \end_inset
5048
5049  can also use jsMath and MathJax for equations, but this setting is only
5050  available globally and requires one to have access to a server that runs
5051  the backend.
5052 \end_layout
5053
5054 \end_inset
5055
5056  More importantly (as of version 1.1.1, at least), 
5057 \begin_inset Flex Code
5058 status collapsed
5059
5060 \begin_layout Plain Layout
5061 e\SpecialChar LyX
5062 er
5063 \end_layout
5064
5065 \end_inset
5066
5067  has limited support for math macros and no support for user-defined paragraph
5068  or character styles.
5069  These limitations make 
5070 \begin_inset Flex Code
5071 status collapsed
5072
5073 \begin_layout Plain Layout
5074 e\SpecialChar LyX
5075 er
5076 \end_layout
5077
5078 \end_inset
5079
5080  unsuitable for many of the documents \SpecialChar LyX
5081  users produce.
5082  In principle, of course, these problems could be solved, but the \SpecialChar LyX
5083  developers
5084  have decided to follow a different path and have made \SpecialChar LyX
5085  itself capable of
5086  writing XHTML, just as it is capable of writing \SpecialChar LaTeX
5087 , DocBook, and plaintext.
5088 \end_layout
5089
5090 \begin_layout Standard
5091 As of this writing, XHTML output remains under development and should probably
5092  be regarded as 
5093 \begin_inset Quotes eld
5094 \end_inset
5095
5096 experimental
5097 \begin_inset Quotes erd
5098 \end_inset
5099
5100 .
5101 \begin_inset Foot
5102 status collapsed
5103
5104 \begin_layout Plain Layout
5105 The file 
5106 \begin_inset Flex Code
5107 status collapsed
5108
5109 \begin_layout Plain Layout
5110 development/HTML.notes
5111 \end_layout
5112
5113 \end_inset
5114
5115 , which can be found in the \SpecialChar LyX
5116  source tree or 
5117 \begin_inset CommandInset href
5118 LatexCommand href
5119 name "accessed online"
5120 target "http://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
5121 literal "false"
5122
5123 \end_inset
5124
5125 , usually contains up-to-date information about the state of XHTML output.
5126  See also the list of XHTML bugs on 
5127 \begin_inset CommandInset href
5128 LatexCommand href
5129 name "the bug tracker"
5130 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"
5131 literal "false"
5132
5133 \end_inset
5134
5135 .
5136 \end_layout
5137
5138 \end_inset
5139
5140  Still, the developers have chosen this approach because it has several
5141  potential advantages over the other two.
5142 \end_layout
5143
5144 \begin_layout Standard
5145 These advantages are primarily due to the fact that the XHTML output routines,
5146  since they are part of \SpecialChar LyX
5147 , know everything \SpecialChar LyX
5148  knows about the document being
5149  exported.
5150 \begin_inset Foot
5151 status collapsed
5152
5153 \begin_layout Plain Layout
5154 Another advantage is that, since these routines are internal to \SpecialChar LyX
5155 , they are
5156  immune to changes in \SpecialChar LyX
5157 's file format, or to changes in the semantics of
5158  existing insets.
5159 \end_layout
5160
5161 \end_inset
5162
5163  So they know about the table of contents (as displayed in the outline),
5164  about the counters associated with different paragraph styles, and about
5165  user-defined styles.
5166  The XHTML output routines know what \SpecialChar LyX
5167  knows about internationalization,
5168  too, so they will output 
5169 \begin_inset Quotes eld
5170 \end_inset
5171
5172 Chapter 1
5173 \begin_inset Quotes erd
5174 \end_inset
5175
5176  or 
5177 \begin_inset Quotes eld
5178 \end_inset
5179
5180
5181 \lang ngerman
5182 Kapitel
5183 \lang english
5184  1
5185 \begin_inset Quotes erd
5186 \end_inset
5187
5188 , depending upon the language in effect at the time.
5189  
5190 \end_layout
5191
5192 \begin_layout Standard
5193 Quite generally, the output routines know what \SpecialChar LyX
5194  knows about document layout,
5195  that is, about how the document is to be rendered on screen.
5196  We use this information when we output the document as XHTML.
5197  In particular, \SpecialChar LyX
5198  
5199 \emph on
5200 automatically
5201 \emph default
5202  generates CSS style information corresponding to the layout information
5203  it uses to render the document on screen: if section headings are supposed
5204  to be sans-serif and bold as seen in \SpecialChar LyX
5205 , then (by default) they will be sans-seri
5206 f and bold when viewed in a web browser, too.
5207  And this is true not just for pre-defined styles, like Section, but for
5208  any style, including user-defined styles.
5209  Indeed, the XHTML output routines make no distinction between user-defined
5210  paragraph and character styles and \SpecialChar LyX
5211 's own pre-defined styles: in each case,
5212  everything \SpecialChar LyX
5213  knows about the styles is contained in the layout files.
5214  And much the same is true as regards pre-defined textual insets, such as
5215  footnotes, and various custom insets.
5216  
5217 \end_layout
5218
5219 \begin_layout Standard
5220 The result is that XHTML output can be customized and extended in exactly
5221  the same way \SpecialChar LaTeX
5222  output can be customized and extended: through layout files
5223  and modules.
5224  See chapter five of the 
5225 \emph on
5226 Customization 
5227 \emph default
5228 manual for the details.
5229 \end_layout
5230
5231 \begin_layout Standard
5232 The remainder of this chapter contains more detailed information on XHTML
5233  output, its limitations, and ways to work around those limitations.
5234 \end_layout
5235
5236 \begin_layout Section
5237 Math Output in XHTML
5238 \end_layout
5239
5240 \begin_layout Standard
5241 \SpecialChar LyX
5242  offers four choices for how math is rendered.
5243  These have various advantages and disadvantages:
5244 \end_layout
5245
5246 \begin_layout Itemize
5247 MathML
5248 \begin_inset Newline newline
5249 \end_inset
5250
5251 MathML is a dialect of XML designed specifically for mathematics on the
5252  web, and it typically renders very well in browsers that support it.
5253  The disadvantage is that not all browsers support MathML, and support is
5254  not complete even in the Gecko-based browsers, such as Firefox.
5255 \begin_inset Newline newline
5256 \end_inset
5257
5258 If \SpecialChar LyX
5259  is unable to render a formula as MathML—for example, if the formula
5260  uses the 
5261 \begin_inset Flex Code
5262 status collapsed
5263
5264 \begin_layout Plain Layout
5265 xymatrix
5266 \end_layout
5267
5268 \end_inset
5269
5270  package or ERT—then it will instead output the formula as an image.
5271  
5272 \end_layout
5273
5274 \begin_layout Itemize
5275 HTML
5276 \begin_inset Newline newline
5277 \end_inset
5278
5279 As mentioned above, 
5280 \begin_inset Flex Code
5281 status collapsed
5282
5283 \begin_layout Plain Layout
5284 elyxer
5285 \end_layout
5286
5287 \end_inset
5288
5289  outputs math as HTML, styled by CSS.
5290 \begin_inset Foot
5291 status collapsed
5292
5293 \begin_layout Plain Layout
5294 \SpecialChar LyX
5295  has borrowed some of the CSS for its HTML output from 
5296 \begin_inset Flex Code
5297 status collapsed
5298
5299 \begin_layout Plain Layout
5300 elyxer
5301 \end_layout
5302
5303 \end_inset
5304
5305 .
5306 \end_layout
5307
5308 \end_inset
5309
5310  For simple formulae, this can work quite well, though with more complicated
5311  formulae it tends to break down.
5312  Still, this method has the advantage that it is very widely supported and
5313  so it may be appropriate for documents that contain only a little, fairly
5314  simple math.
5315 \begin_inset Newline newline
5316 \end_inset
5317
5318 If Lyx is unable to render a formula as HTML—for example, if the formula
5319  uses the 
5320 \begin_inset Flex Code
5321 status collapsed
5322
5323 \begin_layout Plain Layout
5324 xymatrix
5325 \end_layout
5326
5327 \end_inset
5328
5329  package or ERT—then it will instead output the formula as an image.
5330  
5331 \end_layout
5332
5333 \begin_layout Itemize
5334 Images
5335 \begin_inset Newline newline
5336 \end_inset
5337
5338 Like 
5339 \begin_inset Flex Code
5340 status collapsed
5341
5342 \begin_layout Plain Layout
5343 htlatex
5344 \end_layout
5345
5346 \end_inset
5347
5348 , \SpecialChar LyX
5349  will output formulae as images, the very same images, in fact, that are
5350  used for instant preview.
5351 \begin_inset Foot
5352 status collapsed
5353
5354 \begin_layout Plain Layout
5355 Instant preview does 
5356 \emph on
5357 not 
5358 \emph default
5359 have to be on for images to be output, however.
5360 \end_layout
5361
5362 \end_inset
5363
5364  The advantage to this method is that the images are simply generated by
5365  \SpecialChar LaTeX
5366 , so they are very accurate.
5367  The disadvantage, as mentioned earlier, is that these are bitmapped images,
5368  so they do not scale terribly well, and one cannot copy them, etc.
5369  (As of this writing, there are also problems about equation numbering.
5370  See 
5371 \begin_inset CommandInset href
5372 LatexCommand href
5373 name "bug 6894"
5374 target "http://www.lyx.org/trac/ticket/6894"
5375 literal "false"
5376
5377 \end_inset
5378
5379 .)
5380 \begin_inset Newline newline
5381 \end_inset
5382
5383 The size of the images can be controlled by setting the 
5384 \begin_inset Quotes eld
5385 \end_inset
5386
5387 Math Images Scaling
5388 \begin_inset Quotes erd
5389 \end_inset
5390
5391  parameter under 
5392 \begin_inset Flex Noun
5393 status collapsed
5394
5395 \begin_layout Plain Layout
5396 Document\SpecialChar menuseparator
5397 Settings\SpecialChar menuseparator
5398 Output
5399 \end_layout
5400
5401 \end_inset
5402
5403 .
5404 \begin_inset Foot
5405 status collapsed
5406
5407 \begin_layout Plain Layout
5408 For those who want to know, this controls the resolution of the image in
5409  dots per inch and is based upon a default of 75 dpi.
5410 \end_layout
5411
5412 \end_inset
5413
5414
5415 \begin_inset Newline newline
5416 \end_inset
5417
5418 If \SpecialChar LyX
5419  for some reason fails to create an image for a formula (e.g., if a required
5420  \SpecialChar LaTeX
5421  package is not installed), then it will fall back to outputing the raw
5422  \SpecialChar LaTeX
5423 .
5424 \end_layout
5425
5426 \begin_layout Itemize
5427 \SpecialChar LaTeX
5428
5429 \begin_inset Newline newline
5430 \end_inset
5431
5432 Finally, \SpecialChar LyX
5433  will happily output math as \SpecialChar LaTeX
5434 .
5435  As well as being the output of last resort, this method can be used with
5436  such tools as 
5437 \begin_inset CommandInset href
5438 LatexCommand href
5439 name "jsMath"
5440 target "http://www.math.union.edu/~dpvc/jsMath/"
5441 literal "false"
5442
5443 \end_inset
5444
5445 , which uses JavaScript to render \SpecialChar LaTeX
5446  embedded in HTML documents.
5447  \SpecialChar LyX
5448  wraps the \SpecialChar LaTeX
5449  in either a 
5450 \begin_inset Flex Code
5451 status collapsed
5452
5453 \begin_layout Plain Layout
5454 span
5455 \end_layout
5456
5457 \end_inset
5458
5459  (for inline formulas) or 
5460 \begin_inset Flex Code
5461 status collapsed
5462
5463 \begin_layout Plain Layout
5464 div
5465 \end_layout
5466
5467 \end_inset
5468
5469  (for displayed formulas) with 
5470 \begin_inset Flex Code
5471 status collapsed
5472
5473 \begin_layout Plain Layout
5474 class='math'
5475 \end_layout
5476
5477 \end_inset
5478
5479 , as is required for jsMath.
5480 \end_layout
5481
5482 \begin_layout Standard
5483 One of these output methods must be selected under 
5484 \begin_inset Flex Noun
5485 status collapsed
5486
5487 \begin_layout Plain Layout
5488 Document\SpecialChar menuseparator
5489 Settings\SpecialChar menuseparator
5490 Output
5491 \end_layout
5492
5493 \end_inset
5494
5495 .
5496  By default, \SpecialChar LyX
5497  outputs MathML.
5498  This is a document-wide setting, therefore.
5499 \end_layout
5500
5501 \begin_layout Standard
5502 Eventually, \SpecialChar LyX
5503  will offer the user the option to select an alternate output
5504  method for a particular inset, say, one that isn't being rendered very
5505  well by MathML.
5506 \begin_inset Foot
5507 status collapsed
5508
5509 \begin_layout Plain Layout
5510 That said, since \SpecialChar LyX
5511  falls back to images if the inset contains ERT, then one
5512  can force output as an image by putting some harmless ERT into the math,
5513  for example: 
5514 \begin_inset Formula $a=b\relax$
5515 \end_inset
5516
5517 .
5518 \end_layout
5519
5520 \end_inset
5521
5522
5523 \end_layout
5524
5525 \begin_layout Section
5526 Bibliography and Citations
5527 \end_layout
5528
5529 \begin_layout Standard
5530 XHTML output fully supports bibliographies and citations.
5531  
5532 \end_layout
5533
5534 \begin_layout Standard
5535 Citation labels are generated by the same machinery that generates \SpecialChar LyX
5536 's on-screen
5537  labels, so the labels will look in the output much as they do in \SpecialChar LyX
5538 , though
5539  better.
5540  If you are using numerical citations, then \SpecialChar LyX
5541  will output numerical labels,
5542  such as [1] or [17], rather than simply showing the citation key in square
5543  brackets, as it does on-screen.
5544  If you are using author-year citations, then \SpecialChar LyX
5545  will add lowercase letters
5546  to the years, just as Bib\SpecialChar TeX
5547  does, if it finds more than one citation for
5548  a given author-year combination.
5549  The labels will be printed with the bibliography entries.
5550  Note that there is, at present, no way to customize the appearance of the
5551  labels, for example, to choose between square brackets and parentheses.
5552 \end_layout
5553
5554 \begin_layout Standard
5555 Bibliography output is handled by the same machinery that handles the presentati
5556 on of reference information in the citation dialog, so you will see in the
5557  XHTML output pretty much what you would see if you were to look at a given
5558  entry in the citation dialog.
5559  The formatting can be customized in your layout file or, preferably, in
5560  a module.
5561  See the 
5562 \emph on
5563 Customization
5564 \emph default
5565  manual for the details.
5566 \end_layout
5567
5568 \begin_layout Standard
5569 The main defect at present is that cross-referenced information is printed
5570  with every entry with which it is associated.
5571  So you can see things like this:
5572 \end_layout
5573
5574 \begin_layout Quote
5575 Jason Stanley, 
5576 \begin_inset Quotes eld
5577 \end_inset
5578
5579 Context and Logical Form
5580 \begin_inset Quotes erd
5581 \end_inset
5582
5583 , in 
5584 \emph on
5585 Language in Context: Selected Essays
5586 \emph default
5587  (Oxford: Oxford University Press, 2007), pp.
5588  30–68.
5589 \end_layout
5590
5591 \begin_layout Quote
5592 Jason Stanley, 
5593 \begin_inset Quotes eld
5594 \end_inset
5595
5596 Semantics in Context
5597 \begin_inset Quotes erd
5598 \end_inset
5599
5600 , in 
5601 \emph on
5602 Language in Context: Selected Essays
5603 \emph default
5604  (Oxford: Oxford University Press, 2007), pp.
5605  201–30.
5606 \end_layout
5607
5608 \begin_layout Standard
5609 This should be fixed before long.
5610 \end_layout
5611
5612 \begin_layout Standard
5613 There is no support at present for sectioned bibliographies.
5614  If you have multiple bibliographies, then \SpecialChar LyX
5615  will print the same bibliography
5616  over and over.
5617 \end_layout
5618
5619 \begin_layout Section
5620 Indexes
5621 \end_layout
5622
5623 \begin_layout Standard
5624 \SpecialChar LyX
5625  will happily export indexes as XHTML, but with certain limitations at the
5626  moment.
5627 \end_layout
5628
5629 \begin_layout Standard
5630 Index export will be most reliable when you do not attempt to use the fancy
5631  constructs that are described in the section on indexes in the 
5632 \emph on
5633 User's Guide
5634 \emph default
5635 .
5636 \begin_inset Foot
5637 status collapsed
5638
5639 \begin_layout Plain Layout
5640 The main issue here is that \SpecialChar LyX
5641  itself does not really handle these.
5642  It just lets you enter what you would have to enter in raw \SpecialChar LaTeX
5643 .
5644 \end_layout
5645
5646 \end_inset
5647
5648  We'll describe how they are handled using the subsection headings from
5649  that section.
5650 \end_layout
5651
5652 \begin_layout Itemize
5653 Grouping Index Entries (aka, sub-entries): \SpecialChar LyX
5654  makes an effort to support these,
5655  but the entries must be separated by 
5656 \begin_inset Quotes eld
5657 \end_inset
5658
5659  ! 
5660 \begin_inset Quotes erd
5661 \end_inset
5662
5663 , that is, there must be spaces around the exclamation point.
5664  This is because it is otherwise too difficult to check for escaped exclamation
5665  points, ones in math, and so forth.
5666 \end_layout
5667
5668 \begin_layout Itemize
5669 Page Ranges: There is no support at all for page ranges, since these make
5670  no sense with XHMTL.
5671  Instead, you will just get two index entries, one at either end.
5672 \end_layout
5673
5674 \begin_layout Itemize
5675 Cross-referencing: There is no support for cross-referencing.
5676  If \SpecialChar LyX
5677  finds an entry containing the 
5678 \begin_inset Quotes eld
5679 \end_inset
5680
5681 |see\SpecialChar ldots
5682
5683 \begin_inset Quotes erd
5684 \end_inset
5685
5686  construct, it is just dropped, and the rest is treated as an ordinary index
5687  entry.
5688 \end_layout
5689
5690 \begin_layout Itemize
5691 Index Entry Order: \SpecialChar LyX
5692  does support attempts to fix the sorting order.
5693  It will take what is before the first `@' it finds and use that for sorting,
5694  taking what follows the first `@' to be the actual entry.
5695  At present, \SpecialChar LyX
5696  does not check for escaped `@', so do not try to index email
5697  addresses.
5698 \end_layout
5699
5700 \begin_layout Itemize
5701 Index Entry Layout: You can format entries by using the text style dialog,
5702  or by using any other method available within \SpecialChar LyX
5703  itself.
5704  There is no support for constructs like: 
5705 \begin_inset Quotes eld
5706 \end_inset
5707
5708 entry|textbf
5709 \begin_inset Quotes erd
5710 \end_inset
5711
5712 .
5713  Indeed, if \SpecialChar LyX
5714  finds a pipe symbol, `|', in an entry, it will delete it and
5715  everything that follows it.
5716 \end_layout
5717
5718 \begin_layout Itemize
5719 Multiple Indexes: There is no support for multiple indexes.
5720  Rather, all index entries will be printed as one large index.
5721  To avoid our printing several versions of the index, we print only the
5722  main index, so make sure you have one.
5723 \end_layout
5724
5725 \begin_layout Section
5726 Nomenclature and Glossary
5727 \end_layout
5728
5729 \begin_layout Standard
5730 There is at present no support for glossaries.
5731  Adding it would be fairly trivial, and welcome.
5732 \end_layout
5733
5734 \begin_layout Chapter
5735 The \SpecialChar LyX
5736  Server
5737 \end_layout
5738
5739 \begin_layout Section
5740 Introduction
5741 \end_layout
5742
5743 \begin_layout Standard
5744 The `\SpecialChar LyX
5745  server' allows other programs to talk to \SpecialChar LyX
5746 , invoke \SpecialChar LyX
5747  commands, and retrieve
5748  information about the \SpecialChar LyX
5749  internal state.
5750  This is only intended for advanced users, but they should find it useful.
5751  It is by writing to the \SpecialChar LyX
5752  server, for example, that bibliography managers,
5753  such as JabRef, are able to 
5754 \begin_inset Quotes eld
5755 \end_inset
5756
5757 push
5758 \begin_inset Quotes erd
5759 \end_inset
5760
5761  citations to \SpecialChar LyX
5762 .
5763 \end_layout
5764
5765 \begin_layout Section
5766 Starting the \SpecialChar LyX
5767  Server
5768 \end_layout
5769
5770 \begin_layout Standard
5771 The \SpecialChar LyX
5772  server works through the use of a pair of named pipes.
5773  These are usually located in 
5774 \begin_inset Flex Code
5775 status collapsed
5776
5777 \begin_layout Plain Layout
5778 UserDir
5779 \end_layout
5780
5781 \end_inset
5782
5783 , (except on Windows, where 
5784 \emph on
5785 local
5786 \emph default
5787  named pipes are special objects located in 
5788 \begin_inset Flex Code
5789 status collapsed
5790
5791 \begin_layout Plain Layout
5792
5793 \backslash
5794
5795 \backslash
5796 .
5797 \backslash
5798 pipe
5799 \end_layout
5800
5801 \end_inset
5802
5803 ) and have the names 
5804 \begin_inset Quotes eld
5805 \end_inset
5806
5807
5808 \begin_inset Flex Code
5809 status collapsed
5810
5811 \begin_layout Plain Layout
5812 lyxpipe.in
5813 \end_layout
5814
5815 \end_inset
5816
5817
5818 \begin_inset Quotes erd
5819 \end_inset
5820
5821  and 
5822 \begin_inset Quotes eld
5823 \end_inset
5824
5825
5826 \begin_inset Flex Code
5827 status collapsed
5828
5829 \begin_layout Plain Layout
5830 lyxpipe.out
5831 \end_layout
5832
5833 \end_inset
5834
5835
5836 \begin_inset Quotes erd
5837 \end_inset
5838
5839 .
5840  External programs write into 
5841 \begin_inset Flex Code
5842 status collapsed
5843
5844 \begin_layout Plain Layout
5845 lyxpipe.in
5846 \end_layout
5847
5848 \end_inset
5849
5850  and read back data from 
5851 \begin_inset Flex Code
5852 status collapsed
5853
5854 \begin_layout Plain Layout
5855 lyxpipe.out
5856 \end_layout
5857
5858 \end_inset
5859
5860 .
5861  The stem of the pipe names can be defined in the 
5862 \begin_inset Flex Noun
5863 status collapsed
5864
5865 \begin_layout Plain Layout
5866 Tools\SpecialChar menuseparator
5867 Preferences
5868 \end_layout
5869
5870 \end_inset
5871
5872  dialog, for example 
5873 \begin_inset Flex Code
5874 status collapsed
5875
5876 \begin_layout Plain Layout
5877 "/home/myhome/lyxpipe"
5878 \end_layout
5879
5880 \end_inset
5881
5882 , or 
5883 \begin_inset Flex Code
5884 status collapsed
5885
5886 \begin_layout Plain Layout
5887 "
5888 \backslash
5889
5890 \backslash
5891 .
5892 \backslash
5893 pipe
5894 \backslash
5895 lyxpipe"
5896 \end_layout
5897
5898 \end_inset
5899
5900  on Windows (where any working path instead of lyxpipe can be used, for
5901  example 
5902 \begin_inset Flex Code
5903 status collapsed
5904
5905 \begin_layout Plain Layout
5906 "
5907 \backslash
5908
5909 \backslash
5910 .
5911 \backslash
5912 pipe
5913 \backslash
5914 my
5915 \backslash
5916 lyx
5917 \backslash
5918 pipe"
5919 \end_layout
5920
5921 \end_inset
5922
5923  would also work).
5924  You 
5925 \emph on
5926 must
5927 \emph default
5928  configure this manually in order for the server to start.
5929 \end_layout
5930
5931 \begin_layout Standard
5932 \SpecialChar LyX
5933  will add the '
5934 \begin_inset Flex Code
5935 status collapsed
5936
5937 \begin_layout Plain Layout
5938 .in
5939 \end_layout
5940
5941 \end_inset
5942
5943 ' and '
5944 \begin_inset Flex Code
5945 status collapsed
5946
5947 \begin_layout Plain Layout
5948 .out
5949 \end_layout
5950
5951 \end_inset
5952
5953 ' to create the pipes.
5954  If one of the pipes already exists, \SpecialChar LyX
5955  will assume that another \SpecialChar LyX
5956  process
5957  is already running and will not start the server.
5958  On POSIX (Unix like) systems, if for some other reason, an unused 
5959 \begin_inset Quotes eld
5960 \end_inset
5961
5962 stale
5963 \begin_inset Quotes erd
5964 \end_inset
5965
5966  pipe is left in existence when \SpecialChar LyX
5967  closes, then \SpecialChar LyX
5968  will try to delete it.
5969  If this fails for some reason, you will need to delete the pipes manually
5970  and then restart \SpecialChar LyX
5971 .
5972  On Windows, pipes are deleted by the OS on program termination or crash,
5973  so 
5974 \begin_inset Quotes eld
5975 \end_inset
5976
5977 stale
5978 \begin_inset Quotes erd
5979 \end_inset
5980
5981  pipes should not be possible.
5982 \end_layout
5983
5984 \begin_layout Standard
5985 To have several \SpecialChar LyX
5986  processes with servers at the same time, you have to use
5987  different configurations, perhaps by using separate user directories, each
5988  with its own 
5989 \begin_inset Flex Code
5990 status collapsed
5991
5992 \begin_layout Plain Layout
5993 preferences
5994 \end_layout
5995
5996 \end_inset
5997
5998  file, for each process.
5999 \end_layout
6000
6001 \begin_layout Standard
6002 If you are developing a client program, you might find it useful to enable
6003  debugging information from the \SpecialChar LyX
6004  server.
6005  Do this by starting \SpecialChar LyX
6006  as 
6007 \begin_inset Flex Code
6008 status collapsed
6009
6010 \begin_layout Plain Layout
6011 lyx -dbg lyxserver
6012 \end_layout
6013
6014 \end_inset
6015
6016 .
6017 \end_layout
6018
6019 \begin_layout Standard
6020 You can find a complete example client written in C++ in the source distribution
6021  as 
6022 \begin_inset Flex Code
6023 status collapsed
6024
6025 \begin_layout Plain Layout
6026 development/lyxserver/server_monitor.cpp
6027 \end_layout
6028
6029 \end_inset
6030
6031 .
6032 \end_layout
6033
6034 \begin_layout Standard
6035 Another useful tool is the command-line based client found in 
6036 \begin_inset Flex Code
6037 status collapsed
6038
6039 \begin_layout Plain Layout
6040 src/client/lyxclient
6041 \end_layout
6042
6043 \end_inset
6044
6045 .
6046 \end_layout
6047
6048 \begin_layout Section
6049 Normal communication
6050 \end_layout
6051
6052 \begin_layout Standard
6053 To issue a \SpecialChar LyX
6054  call, the client writes a line of ASCII text into the input
6055  pipe.
6056  This line has the following format:
6057 \end_layout
6058
6059 \begin_layout Quote
6060 LYXCMD:
6061 \emph on
6062 clientname
6063 \emph default
6064 :
6065 \emph on
6066 function
6067 \emph default
6068 :
6069 \emph on
6070 argument
6071 \end_layout
6072
6073 \begin_layout Description
6074 clientname is a name that the client can choose arbitrarily.
6075  Its only use is that \SpecialChar LyX
6076  will echo it if it sends an answer—so a client can
6077  dispatch results from different requesters.
6078 \end_layout
6079
6080 \begin_layout Description
6081 function is the function you want \SpecialChar LyX
6082  to perform.
6083  It is the same as the commands you'd use in the minibuffer.
6084 \end_layout
6085
6086 \begin_layout Description
6087 argument is an optional argument which is meaningful only to some functions
6088  (for instance, the 
6089 \begin_inset Quotes eld
6090 \end_inset
6091
6092 self-insert
6093 \begin_inset Quotes erd
6094 \end_inset
6095
6096  LFUN will insert the argument as text at the cursor position).
6097 \end_layout
6098
6099 \begin_layout Standard
6100 The answer from \SpecialChar LyX
6101  will arrive in the output pipe and be of the form
6102 \end_layout
6103
6104 \begin_layout Quote
6105 INFO:
6106 \emph on
6107 clientname
6108 \emph default
6109 :
6110 \emph on
6111 function
6112 \emph default
6113 :
6114 \emph on
6115 data
6116 \end_layout
6117
6118 \begin_layout Standard
6119 where 
6120 \emph on
6121 clientname
6122 \emph default
6123  and 
6124 \emph on
6125 function
6126 \emph default
6127  are just echoed from the command request, while 
6128 \emph on
6129 data
6130 \emph default
6131  is more or less useful information filled according to how the command
6132  execution worked out.
6133  Some commands, such as 
6134 \begin_inset Quotes eld
6135 \end_inset
6136
6137 font-state
6138 \begin_inset Quotes erd
6139 \end_inset
6140
6141 , will return information about the internal state of \SpecialChar LyX
6142 , while other will
6143  return an empty data-response.
6144  This means that the command execution went fine.
6145 \end_layout
6146
6147 \begin_layout Standard
6148 In case of errors, the response from \SpecialChar LyX
6149  will have this form
6150 \end_layout
6151
6152 \begin_layout Quote
6153 ERROR:
6154 \emph on
6155 clientname
6156 \emph default
6157 :
6158 \emph on
6159 function
6160 \emph default
6161 :
6162 \emph on
6163 error message
6164 \end_layout
6165
6166 \begin_layout Standard
6167 where the 
6168 \emph on
6169 error message
6170 \emph default
6171  should contain an explanation of why the command failed.
6172 \end_layout
6173
6174 \begin_layout Standard
6175 Examples:
6176 \end_layout
6177
6178 \begin_layout LyX-Code
6179 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
6180 \begin_inset Newline newline
6181 \end_inset
6182
6183 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
6184 \begin_inset Newline newline
6185 \end_inset
6186
6187 read a <~/.lyxpipe.out
6188 \begin_inset Newline newline
6189 \end_inset
6190
6191 echo $a
6192 \end_layout
6193
6194 \begin_layout Subsection
6195 AppleScript (Mac OS X)
6196 \end_layout
6197
6198 \begin_layout Standard
6199 Since \SpecialChar LyX
6200  2.1, \SpecialChar LyX
6201  supports basic interactions with AppleScript for normal communicatio
6202 n through the command run.
6203  This command takes a direct argument (the 
6204 \series bold
6205 function
6206 \series default
6207  to perform) and an optional argument.
6208  It either returns the output of the function or triggers an error with
6209  the error message and code.
6210 \end_layout
6211
6212 \begin_layout Standard
6213 Example:
6214 \end_layout
6215
6216 \begin_layout LyX-Code
6217 tell application "\SpecialChar LyX
6218 "
6219 \end_layout
6220
6221 \begin_layout LyX-Code
6222   try
6223 \end_layout
6224
6225 \begin_layout LyX-Code
6226     -- Stores the current file name into f
6227 \end_layout
6228
6229 \begin_layout LyX-Code
6230     set f to (run "server-get-filename" with argument "")
6231 \end_layout
6232
6233 \begin_layout LyX-Code
6234     on error the error_message number the error_number
6235 \end_layout
6236
6237 \begin_layout LyX-Code
6238       display dialog "Error: " & the error_number & ".
6239  " ¬
6240 \end_layout
6241
6242 \begin_layout LyX-Code
6243               & the error_message buttons {"OK"} default button 1
6244 \end_layout
6245
6246 \begin_layout LyX-Code
6247   end try
6248 \end_layout
6249
6250 \begin_layout LyX-Code
6251 end tell
6252 \end_layout
6253
6254 \begin_layout Section
6255 Notification
6256 \end_layout
6257
6258 \begin_layout Standard
6259 \SpecialChar LyX
6260  can notify clients of events going on asynchronously.
6261  Currently it will only do this if the user binds a key sequence with the
6262  function 
6263 \begin_inset Quotes eld
6264 \end_inset
6265
6266 notify
6267 \begin_inset Quotes erd
6268 \end_inset
6269
6270 .
6271  The format of the string \SpecialChar LyX
6272  sends is as follows:
6273 \end_layout
6274
6275 \begin_layout Quote
6276 \begin_inset Flex Code
6277 status collapsed
6278
6279 \begin_layout Plain Layout
6280 NOTIFY:
6281 \end_layout
6282
6283 \end_inset
6284
6285
6286 \emph on
6287 key-sequence
6288 \end_layout
6289
6290 \begin_layout Standard
6291 where 
6292 \emph on
6293 key-sequence
6294 \emph default
6295  is the printed representation of the key sequence that was actually typed
6296  by the user.
6297 \end_layout
6298
6299 \begin_layout Standard
6300 This mechanism can be used to extend \SpecialChar LyX
6301 's command set and implement macros.
6302  Bind some key sequence to 
6303 \begin_inset Quotes eld
6304 \end_inset
6305
6306 notify
6307 \begin_inset Quotes erd
6308 \end_inset
6309
6310 .
6311  Then start a client that listens on the output pipe, dispatches the command
6312  according to the sequence, and starts a function that may use \SpecialChar LyX
6313  calls and
6314  \SpecialChar LyX
6315  requests to issue a command or a series of commands to \SpecialChar LyX
6316 .
6317 \end_layout
6318
6319 \begin_layout Section
6320 The simple \SpecialChar LyX
6321  Server Protocol
6322 \end_layout
6323
6324 \begin_layout Standard
6325 \SpecialChar LyX
6326  implements a simple protocol that can be used for session management.
6327  All messages are of the form
6328 \end_layout
6329
6330 \begin_layout Quote
6331 LYXSRV:
6332 \emph on
6333 clientname
6334 \emph default
6335 :
6336 \emph on
6337 protocol message
6338 \end_layout
6339
6340 \begin_layout Standard
6341 where 
6342 \emph on
6343 protocol message
6344 \emph default
6345  can be 
6346 \begin_inset Quotes eld
6347 \end_inset
6348
6349 hello
6350 \begin_inset Quotes erd
6351 \end_inset
6352
6353  or 
6354 \begin_inset Quotes eld
6355 \end_inset
6356
6357 bye
6358 \begin_inset Quotes erd
6359 \end_inset
6360
6361 .
6362  If 
6363 \begin_inset Quotes eld
6364 \end_inset
6365
6366 hello
6367 \begin_inset Quotes erd
6368 \end_inset
6369
6370  is received from a client, \SpecialChar LyX
6371  will report back to inform the client that
6372  it's listening to it's messages, while 
6373 \begin_inset Quotes eld
6374 \end_inset
6375
6376 bye
6377 \begin_inset Quotes erd
6378 \end_inset
6379
6380  sent from \SpecialChar LyX
6381  will inform clients that \SpecialChar LyX
6382  is closing.
6383 \end_layout
6384
6385 \begin_layout Section
6386 Reverse DVI/PDF search
6387 \end_layout
6388
6389 \begin_layout Standard
6390 Some DVI/PDF viewers
6391 \begin_inset Foot
6392 status collapsed
6393
6394 \begin_layout Plain Layout
6395 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
6396  Qpdfview on Unix, Skim on Mac OSX and SumatraPDF on Windows.
6397 \end_layout
6398
6399 \end_inset
6400
6401  provide 
6402 \emph on
6403 reverse search
6404 \emph default
6405  facility (also called 
6406 \emph on
6407 inverse search
6408 \emph default
6409 ).
6410  This means that you can tell \SpecialChar LyX
6411  to put the cursor to a specific line in the
6412  document by clicking at the respective position in the DVI/PDF output.
6413  To achieve this, the viewer must be able to communicate with \SpecialChar LyX
6414 .
6415  This is done via the \SpecialChar LyX
6416  server either by using the named pipe (
6417 \emph on
6418 lyxpipe
6419 \emph default
6420 ), or the UNIX domain socket (
6421 \emph on
6422 lyxsocket
6423 \emph default
6424 ) that \SpecialChar LyX
6425  creates in its temporary directory (this is the way the 
6426 \begin_inset Flex Code
6427 status collapsed
6428
6429 \begin_layout Plain Layout
6430 lyxclient
6431 \end_layout
6432
6433 \end_inset
6434
6435  program communicates with \SpecialChar LyX
6436 ).
6437  In some cases, you need a helper script that mediates between the viewer
6438  and \SpecialChar LyX
6439 , in others, the viewer can communicate with \SpecialChar LyX
6440  directly.
6441  This depends on the selected viewer and on your operating system.
6442  The same applies to the way viewers need to be configured and the way the
6443  reverse search is actually performed.
6444  In what follows, we will thus describe how to setup reverse search for
6445  specific viewers.
6446  Before we turn to this, though, we will explain what needs to be done generally
6447  to enable reverse search in the DVI/PDF output.
6448 \end_layout
6449
6450 \begin_layout Subsection
6451 Automatic setup
6452 \begin_inset CommandInset label
6453 LatexCommand label
6454 name "subsec:rev-search"
6455
6456 \end_inset
6457
6458
6459 \end_layout
6460
6461 \begin_layout Standard
6462 In most cases \SpecialChar LyX
6463  will do the work for you by enabling the option 
6464 \begin_inset Flex Noun
6465 status collapsed
6466
6467 \begin_layout Plain Layout
6468 Synchronize with Output
6469 \end_layout
6470
6471 \end_inset
6472
6473  in the menu 
6474 \begin_inset Flex Noun
6475 status collapsed
6476
6477 \begin_layout Plain Layout
6478 Document\SpecialChar menuseparator
6479 Settings\SpecialChar menuseparator
6480 Output
6481 \end_layout
6482
6483 \end_inset
6484
6485 .
6486  In such a case \SpecialChar LyX
6487  will automatically insert the necessary Sync\SpecialChar TeX
6488  macro (for
6489  PDF) or load the srcltx package (for DVI) respectively.
6490  This option can be easily reached also on 
6491 \begin_inset Flex Code
6492 status collapsed
6493
6494 \begin_layout Plain Layout
6495 View/Update
6496 \end_layout
6497
6498 \end_inset
6499
6500  Toolbar.
6501 \end_layout
6502
6503 \begin_layout Standard
6504 If you need a different setting, you can select or input a custom macro
6505  from the drop down box just below 
6506 \begin_inset Flex Noun
6507 status collapsed
6508
6509 \begin_layout Plain Layout
6510 Document\SpecialChar menuseparator
6511 Settings\SpecialChar menuseparator
6512 Output\SpecialChar menuseparator
6513 Synchronize with Output
6514 \end_layout
6515
6516 \end_inset
6517
6518 .
6519 \end_layout
6520
6521 \begin_layout Standard
6522 Note that the method 
6523 \begin_inset Flex Code
6524 status collapsed
6525
6526 \begin_layout Plain Layout
6527
6528 \backslash
6529 synctex=1
6530 \end_layout
6531
6532 \end_inset
6533
6534  enables gzip compression.
6535  If your viewer does not support it, you should instead use 
6536 \begin_inset Flex Code
6537 status collapsed
6538
6539 \begin_layout Plain Layout
6540
6541 \backslash
6542 synctex=-1
6543 \end_layout
6544
6545 \end_inset
6546
6547 .
6548 \end_layout
6549
6550 \begin_layout Standard
6551 Please also note that including the 
6552 \begin_inset Flex Code
6553 status collapsed
6554
6555 \begin_layout Plain Layout
6556 srcltx
6557 \end_layout
6558
6559 \end_inset
6560
6561  package or 
6562 \begin_inset Flex Code
6563 status collapsed
6564
6565 \begin_layout Plain Layout
6566 src-specials
6567 \end_layout
6568
6569 \end_inset
6570
6571  sometimes has an undesired impact on the typesetting.
6572  Thus, you should switch output synchronization off for the final typesetting
6573  if you use the 
6574 \begin_inset Flex Code
6575 status collapsed
6576
6577 \begin_layout Plain Layout
6578 srcltx
6579 \end_layout
6580
6581 \end_inset
6582
6583  package or 
6584 \begin_inset Flex Code
6585 status collapsed
6586
6587 \begin_layout Plain Layout
6588 src-specials
6589 \end_layout
6590
6591 \end_inset
6592
6593 .
6594  
6595 \end_layout
6596
6597 \begin_layout Standard
6598 In case you need some more special settings that are not covered by the
6599  automatic settings, read the next section about how to set up output synchroniz
6600 ation manually.
6601  If the automatic setup suits your needs, you can readily jump to section
6602 \begin_inset space ~
6603 \end_inset
6604
6605
6606 \begin_inset CommandInset ref
6607 LatexCommand ref
6608 reference "subsec:configuring-viewers"
6609
6610 \end_inset
6611
6612 , where the necessary configuration steps in your viewer – needed both with
6613  the automatic and the manual setup – are described.
6614 \end_layout
6615
6616 \begin_layout Subsection
6617 Manual setup
6618 \end_layout
6619
6620 \begin_layout Standard
6621 \SpecialChar LaTeX
6622  provides several different methods for reverse search.
6623  Some are built-in in the 
6624 \begin_inset Flex Code
6625 status collapsed
6626
6627 \begin_layout Plain Layout
6628 latex/pdflatex
6629 \end_layout
6630
6631 \end_inset
6632
6633  program, some are provided by external packages.
6634  Your choice depends on whether your \SpecialChar LaTeX
6635  distribution already provides a given
6636  method (the built-in methods are rather new) and whether your viewer can
6637  cope with it.
6638  The available methods are described in the following.
6639 \end_layout
6640
6641 \begin_layout Subsubsection*
6642 Built-in DVI-search via src-specials (DVI only) 
6643 \end_layout
6644
6645 \begin_layout Standard
6646 This method provides the DVI file with the necessary information for reverse
6647  search.
6648  It is available in \SpecialChar LaTeX
6649  since quite some time (any somewhat recent \SpecialChar LaTeX
6650  distribution
6651  should include it), and it works reliably.
6652  To enable it, change the 
6653 \begin_inset Flex Noun
6654 status collapsed
6655
6656 \begin_layout Plain Layout
6657 La
6658 \family sans
6659 TeX
6660 \family default
6661  (plain)->DVI
6662 \end_layout
6663
6664 \end_inset
6665
6666  or 
6667 \begin_inset Flex Noun
6668 status collapsed
6669
6670 \begin_layout Plain Layout
6671 La
6672 \family sans
6673 TeX
6674 \family default
6675  (plain)->DraftDVI
6676 \end_layout
6677
6678 \end_inset
6679
6680  converter in 
6681 \begin_inset Flex Noun
6682 status collapsed
6683
6684 \begin_layout Plain Layout
6685 Preferences\SpecialChar menuseparator
6686 File Handling\SpecialChar menuseparator
6687 Converters
6688 \end_layout
6689
6690 \end_inset
6691
6692  to 
6693 \begin_inset Flex Code
6694 status collapsed
6695
6696 \begin_layout Plain Layout
6697 latex -src-specials $$i
6698 \end_layout
6699
6700 \end_inset
6701
6702 .
6703  If this doesn't work, check if your \SpecialChar TeX
6704  engine needs different options (the
6705  syntax might differ in some distributions).
6706 \end_layout
6707
6708 \begin_layout Subsubsection*
6709 External Packages (PDFSync and scrltx) 
6710 \end_layout
6711
6712 \begin_layout Standard
6713 The packages 
6714 \emph on
6715 pdfsync
6716 \emph default
6717  and 
6718 \emph on
6719 scrltx
6720 \emph default
6721  provide reverse search facility for PDF output (via pdflatex) and DVI output,
6722  respectively.
6723  In order to enable it, load the packages in the \SpecialChar LyX
6724  preamble: 
6725 \end_layout
6726
6727 \begin_layout Itemize
6728 \begin_inset Flex Code
6729 status collapsed
6730
6731 \begin_layout Plain Layout
6732
6733 \backslash
6734 usepackage{pdfsync}
6735 \end_layout
6736
6737 \end_inset
6738
6739  for reverse PDF search,
6740 \end_layout
6741
6742 \begin_layout Itemize
6743 \begin_inset Flex Code
6744 status collapsed
6745
6746 \begin_layout Plain Layout
6747
6748 \backslash
6749 usepackage[active]{srcltx}
6750 \end_layout
6751
6752 \end_inset
6753
6754  for reverse DVI search.
6755 \end_layout
6756
6757 \begin_layout Standard
6758 If you want to be able to perform both DVI and PDF reverse searches, you
6759  can also insert in the preamble the following lines
6760 \end_layout
6761
6762 \begin_layout LyX-Code
6763
6764 \backslash
6765 usepackage{ifpdf}
6766 \begin_inset Newline newline
6767 \end_inset
6768
6769
6770 \backslash
6771 ifpdf
6772 \begin_inset Newline newline
6773 \end_inset
6774
6775   
6776 \backslash
6777 usepackage{pdfsync}
6778 \begin_inset Newline newline
6779 \end_inset
6780
6781
6782 \backslash
6783 else
6784 \begin_inset Newline newline
6785 \end_inset
6786
6787   
6788 \backslash
6789 usepackage[active]{srcltx}
6790 \begin_inset Newline newline
6791 \end_inset
6792
6793
6794 \backslash
6795 fi
6796 \end_layout
6797
6798 \begin_layout Standard
6799 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6800  right package will be used.
6801 \end_layout
6802
6803 \begin_layout Standard
6804 Note that PDFSync might affect the output layout of your document.
6805  It is therefore advised to disable PDFsync for final documents.
6806 \end_layout
6807
6808 \begin_layout Subsubsection*
6809 Built-in reverse search via Sync\SpecialChar TeX
6810  (DVI and PDF) 
6811 \end_layout
6812
6813 \begin_layout Standard
6814 Recent versions of 
6815 \begin_inset Flex Code
6816 status collapsed
6817
6818 \begin_layout Plain Layout
6819 (pdf)latex
6820 \end_layout
6821
6822 \end_inset
6823
6824  have built-in support for both PDF and DVI reverse search.
6825  This so-called 
6826 \emph on
6827 Sync\SpecialChar TeX
6828
6829 \emph default
6830  facility is basically the result of the integration of the PDFSync package
6831  to the pdftex program and its merge with the 
6832 \emph on
6833 scr-specials
6834 \emph default
6835  approach.
6836  You need at least \SpecialChar TeX
6837 Live 2008 or a recent Mik\SpecialChar TeX
6838  distribution in order to use
6839  it.
6840 \begin_inset Foot
6841 status collapsed
6842
6843 \begin_layout Plain Layout
6844 For some reason, Mik\SpecialChar TeX
6845  does not understand/obey the command \SpecialChar LyX
6846  inserts into
6847  the preamble when you check the "Enable Forward/Reverse Search" button
6848  in the toolbar and does not generate the necessary info.
6849 \end_layout
6850
6851 \begin_layout Plain Layout
6852 The generation of the required info can be forced by changing the converter
6853  "\SpecialChar LaTeX
6854  (pdflatex) -> PDF (pdflatex)" in Preferences->File handling->Converters
6855  from the default "pdflatex $$i" to "pdflatex -synctex=1 $$i" (i.e., by adding
6856  the -synctex=1 switch).
6857 \end_layout
6858
6859 \end_inset
6860
6861  Also note that only a few PDF viewers (Okular and Qpdfview on Unix, Skim
6862  on the Mac, SumatraPDF on Windows) already provide Sync\SpecialChar TeX
6863  support.
6864 \end_layout
6865
6866 \begin_layout Standard
6867 To enable Sync\SpecialChar TeX
6868  for DVI output, change the 
6869 \begin_inset Flex Noun
6870 status collapsed
6871
6872 \begin_layout Plain Layout
6873 La
6874 \family sans
6875 TeX
6876 \family default
6877  (plain) -> DVI
6878 \end_layout
6879
6880 \end_inset
6881
6882  or 
6883 \begin_inset Flex Noun
6884 status collapsed
6885
6886 \begin_layout Plain Layout
6887 La
6888 \family sans
6889 TeX
6890 \family default
6891  (plain) -> DraftDVI
6892 \end_layout
6893
6894 \end_inset
6895
6896  converter in 
6897 \begin_inset Flex Noun
6898 status collapsed
6899
6900 \begin_layout Plain Layout
6901 Preferences\SpecialChar menuseparator
6902 File Handling\SpecialChar menuseparator
6903 Converters
6904 \end_layout
6905
6906 \end_inset
6907
6908  to 
6909 \begin_inset Flex Code
6910 status collapsed
6911
6912 \begin_layout Plain Layout
6913 latex -synctex=1 $$i
6914 \end_layout
6915
6916 \end_inset
6917
6918 , and for PDF output, change the 
6919 \begin_inset Flex Noun
6920 status collapsed
6921
6922 \begin_layout Plain Layout
6923 La
6924 \family sans
6925 TeX
6926 \family default
6927  (pdflatex) -> PDF (pdflatex)
6928 \end_layout
6929
6930 \end_inset
6931
6932  or converter to 
6933 \begin_inset Flex Code
6934 status collapsed
6935
6936 \begin_layout Plain Layout
6937 pdflatex -synctex=1 $$i
6938 \end_layout
6939
6940 \end_inset
6941
6942 .
6943  Check the documentation of your viewer whether the viewer needs to be configure
6944 d for the use with Sync\SpecialChar TeX
6945 .
6946 \begin_inset Foot
6947 status collapsed
6948
6949 \begin_layout Plain Layout
6950 Note that the option 
6951 \begin_inset Flex Code
6952 status collapsed
6953
6954 \begin_layout Plain Layout
6955 -synctex=1
6956 \end_layout
6957
6958 \end_inset
6959
6960  option enables gzip compression.
6961  If your viewer does not support it, you should instead use 
6962 \begin_inset Flex Code
6963 status collapsed
6964
6965 \begin_layout Plain Layout
6966 -synctex=-1
6967 \end_layout
6968
6969 \end_inset
6970
6971 .
6972 \end_layout
6973
6974 \end_inset
6975
6976
6977 \end_layout
6978
6979 \begin_layout Subsection
6980 Configuring and using specific viewers
6981 \begin_inset CommandInset label
6982 LatexCommand label
6983 name "subsec:configuring-viewers"
6984
6985 \end_inset
6986
6987
6988 \end_layout
6989
6990 \begin_layout Subsubsection*
6991 Xdvi (all platforms)
6992 \end_layout
6993
6994 \begin_layout Standard
6995 If you use 
6996 \begin_inset Flex Code
6997 status collapsed
6998
6999 \begin_layout Plain Layout
7000 xdvi
7001 \end_layout
7002
7003 \end_inset
7004
7005 , you don't need to do anything else for performing a reverse DVI search,
7006  as \SpecialChar LyX
7007  already provides the necessary hooks for automatically using the 
7008 \begin_inset Flex Code
7009 status collapsed
7010
7011 \begin_layout Plain Layout
7012 lyxclient
7013 \end_layout
7014
7015 \end_inset
7016
7017  program.
7018  Just setup your document as described above (reverse search is triggered
7019  by Ctrl-click or Alt-click on Mac OSX, respectively).
7020 \end_layout
7021
7022 \begin_layout Standard
7023 However, if for whatever reason you want to use the named pipe instead of
7024  the socket for communicating with \SpecialChar LyX
7025 , simply change the DVI viewer in 
7026 \begin_inset Flex Noun
7027 status collapsed
7028
7029 \begin_layout Plain Layout
7030 Preferences\SpecialChar menuseparator
7031 File Handling\SpecialChar menuseparator
7032 File formats
7033 \end_layout
7034
7035 \end_inset
7036
7037  to
7038 \begin_inset Foot
7039 status collapsed
7040
7041 \begin_layout Plain Layout
7042 On Mac OSX you have to use 
7043 \begin_inset Flex Code
7044 status collapsed
7045
7046 \begin_layout Plain Layout
7047 DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l"
7048 \end_layout
7049
7050 \end_inset
7051
7052
7053 \end_layout
7054
7055 \end_inset
7056
7057  
7058 \begin_inset Flex Code
7059 status collapsed
7060
7061 \begin_layout Plain Layout
7062 xdvi -editor "lyxeditor.sh %f %l"
7063 \end_layout
7064
7065 \end_inset
7066
7067 , where 
7068 \begin_inset Flex Code
7069 status collapsed
7070
7071 \begin_layout Plain Layout
7072 lyxeditor.sh
7073 \end_layout
7074
7075 \end_inset
7076
7077  is a suitable script.
7078  For example, a minimal shell script is the following one:
7079 \end_layout
7080
7081 \begin_layout LyX-Code
7082 #!/bin/sh
7083 \begin_inset Newline newline
7084 \end_inset
7085
7086 LYXPIPE="/path/to/lyxpipe"
7087 \begin_inset Newline newline
7088 \end_inset
7089
7090 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
7091 \begin_inset Newline newline
7092 \end_inset
7093
7094 echo "$COMMAND" > "${LYXPIPE}".in || exit
7095 \begin_inset Newline newline
7096 \end_inset
7097
7098 read TMP < "${LYXPIPE}".out || exit
7099 \end_layout
7100
7101 \begin_layout Standard
7102 where 
7103 \begin_inset Flex Code
7104 status collapsed
7105
7106 \begin_layout Plain Layout
7107 /path/to/lyxpipe
7108 \end_layout
7109
7110 \end_inset
7111
7112  is the LyXServer pipe path specified in 
7113 \begin_inset Flex Noun
7114 status collapsed
7115
7116 \begin_layout Plain Layout
7117 Preferences\SpecialChar menuseparator
7118 Paths
7119 \end_layout
7120
7121 \end_inset
7122
7123 .
7124 \begin_inset Foot
7125 status collapsed
7126
7127 \begin_layout Plain Layout
7128 In the 
7129 \begin_inset Flex Code
7130 status collapsed
7131
7132 \begin_layout Plain Layout
7133 development/tools
7134 \end_layout
7135
7136 \end_inset
7137
7138  folder of a source distribution you can find a 
7139 \begin_inset Flex Code
7140 status collapsed
7141
7142 \begin_layout Plain Layout
7143 lyxeditor
7144 \end_layout
7145
7146 \end_inset
7147
7148  script which is able to locate the 
7149 \emph on
7150 lyxpipe
7151 \emph default
7152  based on your preferences.
7153 \end_layout
7154
7155 \end_inset
7156
7157
7158 \end_layout
7159
7160 \begin_layout Subsubsection*
7161 MacDviX (Mac OSX)
7162 \end_layout
7163
7164 \begin_layout Standard
7165 At the end of 
7166 \begin_inset Flex Code
7167 status collapsed
7168
7169 \begin_layout Plain Layout
7170 /Applications/MacDviX_Folder/calleditor.script
7171 \end_layout
7172
7173 \end_inset
7174
7175 , add the following lines:
7176 \end_layout
7177
7178 \begin_layout LyX-Code
7179 /Applications/LyX.app/Contents/MacOS/lyxeditor "$2" $1
7180 \begin_inset Newline newline
7181 \end_inset
7182
7183 exit 1
7184 \end_layout
7185
7186 \begin_layout Standard
7187 Modify the lines accordingly if you install \SpecialChar LyX
7188  somewhere else than in the
7189  Applications folder.
7190 \end_layout
7191
7192 \begin_layout Standard
7193 Reverse search is triggered by Alt-click (OPTION-click).
7194 \end_layout
7195
7196 \begin_layout Subsubsection*
7197 Skim (Mac OSX)
7198 \end_layout
7199
7200 \begin_layout Standard
7201 Enter 
7202 \begin_inset Flex Code
7203 status collapsed
7204
7205 \begin_layout Plain Layout
7206 open -a Skim.app $$i
7207 \end_layout
7208
7209 \end_inset
7210
7211  to the viewer setting in 
7212 \begin_inset Flex Noun
7213 status collapsed
7214
7215 \begin_layout Plain Layout
7216 Preferences\SpecialChar menuseparator
7217 File Handling\SpecialChar menuseparator
7218 File formats\SpecialChar menuseparator
7219 PDF (pdflatex)
7220 \end_layout
7221
7222 \end_inset
7223
7224 , and then in 
7225 \begin_inset Flex Noun
7226 status collapsed
7227
7228 \begin_layout Plain Layout
7229 Skim\SpecialChar menuseparator
7230 Preferences\SpecialChar menuseparator
7231 Sync
7232 \end_layout
7233
7234 \end_inset
7235
7236  choose 
7237 \begin_inset Flex Noun
7238 status collapsed
7239
7240 \begin_layout Plain Layout
7241 custom
7242 \end_layout
7243
7244 \end_inset
7245
7246  preset and enter command 
7247 \begin_inset Flex Noun
7248 status collapsed
7249
7250 \begin_layout Plain Layout
7251 /Applications/\SpecialChar LyX
7252 .app/Contents/MacOS/lyxeditor
7253 \end_layout
7254
7255 \end_inset
7256
7257 .
7258 \end_layout
7259
7260 \begin_layout Standard
7261 Reverse search is triggered by COMMAND-SHIFT-click
7262 \end_layout
7263
7264 \begin_layout Subsubsection*
7265
7266 \change_inserted -712698321 1500278482
7267 Evince (GNOME)
7268 \end_layout
7269
7270 \begin_layout Standard
7271
7272 \change_inserted -712698321 1500278679
7273 Reverse search with evince does not work out of the box, but it can be achieved
7274  by means of some third party helper scripts.
7275  Please refer to 
7276 \begin_inset CommandInset href
7277 LatexCommand href
7278 target "http://wiki.lyx.org/LyX/SyncTeX"
7279 literal "false"
7280
7281 \end_inset
7282
7283  for details.
7284 \end_layout
7285
7286 \begin_layout Subsubsection*
7287 Okular (KDE)
7288 \end_layout
7289
7290 \begin_layout Standard
7291 Go to 
7292 \begin_inset Flex Noun
7293 status collapsed
7294
7295 \begin_layout Plain Layout
7296 Settings\SpecialChar menuseparator
7297 Configure Okular\SpecialChar menuseparator
7298 Editor
7299 \end_layout
7300
7301 \end_inset
7302
7303 , select 
7304 \begin_inset Quotes eld
7305 \end_inset
7306
7307 Custom Text Editor
7308 \begin_inset Quotes erd
7309 \end_inset
7310
7311  and add the command 
7312 \begin_inset Flex Code
7313 status collapsed
7314
7315 \begin_layout Plain Layout
7316 lyxclient -g %f %l
7317 \end_layout
7318
7319 \end_inset
7320
7321 .
7322 \end_layout
7323
7324 \begin_layout Standard
7325 Reverse search is triggered by SHIFT-click.
7326 \end_layout
7327
7328 \begin_layout Subsubsection*
7329 Qpdfview (Unix)
7330 \end_layout
7331
7332 \begin_layout Standard
7333 Qpdfview supports Sync\SpecialChar TeX
7334  since version 0.3.5.
7335  Go to 
7336 \begin_inset Flex Noun
7337 status collapsed
7338
7339 \begin_layout Plain Layout
7340 Edit\SpecialChar menuseparator
7341 Settings\SpecialChar menuseparator
7342 Behavior
7343 \end_layout
7344
7345 \end_inset
7346
7347 , click on the input field of the 
7348 \begin_inset Quotes eld
7349 \end_inset
7350
7351 Source editor
7352 \begin_inset Quotes erd
7353 \end_inset
7354
7355  item and add the command 
7356 \begin_inset Flex Code
7357 status collapsed
7358
7359 \begin_layout Plain Layout
7360 lyxclient -g %1 %2
7361 \end_layout
7362
7363 \end_inset
7364
7365 .
7366 \end_layout
7367
7368 \begin_layout Standard
7369 Reverse search is triggered by double-click or, in more recent versions,
7370  by context menu.
7371 \end_layout
7372
7373 \begin_layout Subsubsection*
7374 YAP (Windows)
7375 \end_layout
7376
7377 \begin_layout Standard
7378 Launch yap, choose its 
7379 \begin_inset Flex Noun
7380 status collapsed
7381
7382 \begin_layout Plain Layout
7383 View\SpecialChar menuseparator
7384 Options
7385 \end_layout
7386
7387 \end_inset
7388
7389  menu and select the 
7390 \begin_inset Quotes eld
7391 \end_inset
7392
7393 Inverse DVI Search
7394 \begin_inset Quotes erd
7395 \end_inset
7396
7397  tab.
7398  Click on the 
7399 \begin_inset Quotes eld
7400 \end_inset
7401
7402 New\SpecialChar ldots
7403
7404 \begin_inset Quotes erd
7405 \end_inset
7406
7407  button and, in the window that opens, enter 
7408 \begin_inset Quotes eld
7409 \end_inset
7410
7411 \SpecialChar LyX
7412  Editor
7413 \begin_inset Quotes erd
7414 \end_inset
7415
7416  (or any other name you like) in the 
7417 \begin_inset Quotes eld
7418 \end_inset
7419
7420 Name:
7421 \begin_inset Quotes erd
7422 \end_inset
7423
7424  field.
7425  Now click on the button labeled 
7426 \begin_inset Quotes eld
7427 \end_inset
7428
7429 \SpecialChar ldots
7430
7431 \begin_inset Quotes erd
7432 \end_inset
7433
7434  to open a file dialog and navigate to the directory containing the batch
7435  file 
7436 \begin_inset Flex Code
7437 status collapsed
7438
7439 \begin_layout Plain Layout
7440 lyxeditor.bat
7441 \end_layout
7442
7443 \end_inset
7444
7445  (see below).
7446  Select 
7447 \begin_inset Flex Code
7448 status collapsed
7449
7450 \begin_layout Plain Layout
7451 lyxeditor.bat
7452 \end_layout
7453
7454 \end_inset
7455
7456  and then specify the program arguments as 
7457 \begin_inset Flex Code
7458 status collapsed
7459
7460 \begin_layout Plain Layout
7461 %f %l
7462 \end_layout
7463
7464 \end_inset
7465
7466 .
7467  The 
7468 \begin_inset Flex Code
7469 status collapsed
7470
7471 \begin_layout Plain Layout
7472 lyxeditor.bat
7473 \end_layout
7474
7475 \end_inset
7476
7477  wrapper is used for communicating with \SpecialChar LyX
7478  through the 
7479 \emph on
7480 lyxpipe
7481 \emph default
7482  and is as follows:
7483 \end_layout
7484
7485 \begin_layout LyX-Code
7486 @echo off
7487 \begin_inset Newline newline
7488 \end_inset
7489
7490 echo LYXCMD:revdvi:server-goto-file-row:
7491 \change_inserted -712698321 1500887411
7492 ~
7493 \change_unchanged
7494 %1 %2> 
7495 \backslash
7496
7497 \backslash
7498 .
7499 \backslash
7500 pipe
7501 \backslash
7502 lyxpipe.in
7503 \begin_inset Newline newline
7504 \end_inset
7505
7506 type 
7507 \backslash
7508
7509 \backslash
7510 .
7511 \backslash
7512 pipe
7513 \backslash
7514 lyxpipe.out
7515 \end_layout
7516
7517 \begin_layout Standard
7518 Make sure that the \SpecialChar LyX
7519 Server pipe path you specified in \SpecialChar LyX
7520  is 
7521 \begin_inset Flex Code
7522 status collapsed
7523
7524 \begin_layout Plain Layout
7525
7526 \backslash
7527
7528 \backslash
7529 .
7530 \backslash
7531 pipe
7532 \backslash
7533 lyxpipe
7534 \end_layout
7535
7536 \end_inset
7537
7538 , otherwise change the 
7539 \begin_inset Flex Code
7540 status collapsed
7541
7542 \begin_layout Plain Layout
7543 lyxeditor.bat
7544 \end_layout
7545
7546 \end_inset
7547
7548  wrapper accordingly.
7549 \end_layout
7550
7551 \begin_layout Standard
7552 In yap, reverse search is triggered by double-click.
7553 \end_layout
7554
7555 \begin_layout Subsubsection*
7556 SumatraPDF (Windows)
7557 \end_layout
7558
7559 \begin_layout Standard
7560 In order to use SumatraPDF for inverse search, enter 
7561 \begin_inset Flex Code
7562 status collapsed
7563
7564 \begin_layout Plain Layout
7565 SumatraPDF -inverse-search 
7566 \change_inserted -712698321 1500887421
7567 "
7568 \change_unchanged
7569 "lyxeditor.bat 
7570 \change_inserted -712698321 1500887423
7571 "
7572 \change_unchanged
7573 %f
7574 \change_inserted -712698321 1500887424
7575 "
7576 \change_unchanged
7577  %l
7578 \change_inserted -712698321 1500887426
7579 "
7580 \change_unchanged
7581 "
7582 \end_layout
7583
7584 \end_inset
7585
7586  in the viewer setting in 
7587 \begin_inset Flex Noun
7588 status collapsed
7589
7590 \begin_layout Plain Layout
7591 Preferences\SpecialChar menuseparator
7592 File Handling\SpecialChar menuseparator
7593 File formats\SpecialChar menuseparator
7594 PDF (pdflatex)
7595 \end_layout
7596
7597 \end_inset
7598
7599 , where 
7600 \begin_inset Flex Code
7601 status collapsed
7602
7603 \begin_layout Plain Layout
7604 lyxeditor.bat
7605 \end_layout
7606
7607 \end_inset
7608
7609  is the previous wrapper.
7610  If SumatraPDF.exe is not in your command PATH, use its full file name.
7611 \end_layout
7612
7613 \begin_layout Standard
7614 Reverse search is triggered by double-click.
7615 \end_layout
7616
7617 \begin_layout Subsubsection*
7618 YAP (Cygwin)
7619 \end_layout
7620
7621 \begin_layout Standard
7622 First of all, make sure that yap is your default DVI viewer in the Windows
7623  environment, then launch it, choose its 
7624 \begin_inset Flex Noun
7625 status collapsed
7626
7627 \begin_layout Plain Layout
7628 View\SpecialChar menuseparator
7629 Options
7630 \end_layout
7631
7632 \end_inset
7633
7634  menu and select the 
7635 \begin_inset Quotes eld
7636 \end_inset
7637
7638 Inverse DVI Search
7639 \begin_inset Quotes erd
7640 \end_inset
7641
7642  tab.
7643  Click on the 
7644 \begin_inset Quotes eld
7645 \end_inset
7646
7647 New\SpecialChar ldots
7648
7649 \begin_inset Quotes erd
7650 \end_inset
7651
7652  button and, in the window that opens, enter 
7653 \begin_inset Quotes eld
7654 \end_inset
7655
7656 \SpecialChar LyX
7657  Editor
7658 \begin_inset Quotes erd
7659 \end_inset
7660
7661  (or any other name you like) in the 
7662 \begin_inset Quotes eld
7663 \end_inset
7664
7665 Name:
7666 \begin_inset Quotes erd
7667 \end_inset
7668
7669  field.
7670  Now click on the button labeled 
7671 \begin_inset Quotes eld
7672 \end_inset
7673
7674 \SpecialChar ldots
7675
7676 \begin_inset Quotes erd
7677 \end_inset
7678
7679  to open a file dialog and navigate to the directory containing the 
7680 \begin_inset Flex Code
7681 status collapsed
7682
7683 \begin_layout Plain Layout
7684 lyxeditor.exe
7685 \end_layout
7686
7687 \end_inset
7688
7689  program (which is installed by default on Cygwin along with the \SpecialChar LyX
7690  executable).
7691  Select 
7692 \begin_inset Flex Code
7693 status collapsed
7694
7695 \begin_layout Plain Layout
7696 lyxeditor.exe
7697 \end_layout
7698
7699 \end_inset
7700
7701  and then specify the program arguments as 
7702 \begin_inset Flex Code
7703 status collapsed
7704
7705 \begin_layout Plain Layout
7706 -g %f %l
7707 \end_layout
7708
7709 \end_inset
7710
7711 .
7712  In this way, you will be using the 
7713 \emph on
7714 lyxsocket
7715 \emph default
7716  for communicating with \SpecialChar LyX
7717 .
7718  If, for whatever reason, you want to use the 
7719 \emph on
7720 lyxpipe
7721 \emph default
7722 , omit the 
7723 \begin_inset Flex Code
7724 status collapsed
7725
7726 \begin_layout Plain Layout
7727 -g
7728 \end_layout
7729
7730 \end_inset
7731
7732  option and be sure to specify the \SpecialChar LyX
7733 Server pipe path in the \SpecialChar LyX
7734  preferences.
7735 \end_layout
7736
7737 \begin_layout Standard
7738 In yap, reverse search is triggered by double-click.
7739 \end_layout
7740
7741 \begin_layout Subsubsection*
7742 SumatraPDF (Cygwin)
7743 \end_layout
7744
7745 \begin_layout Standard
7746 In order to use SumatraPDF for inverse search, enter 
7747 \begin_inset Flex Code
7748 status collapsed
7749
7750 \begin_layout Plain Layout
7751 SumatraPDF -inverse-search "lyxeditor -g %f %l"
7752 \end_layout
7753
7754 \end_inset
7755
7756  in the viewer setting in 
7757 \begin_inset Flex Noun
7758 status collapsed
7759
7760 \begin_layout Plain Layout
7761 Preferences\SpecialChar menuseparator
7762 File Handling\SpecialChar menuseparator
7763 File formats\SpecialChar menuseparator
7764 PDF (pdflatex)
7765 \end_layout
7766
7767 \end_inset
7768
7769 .
7770  If SumatraPDF.exe is not in your command PATH, use its full posix path.
7771  The 
7772 \begin_inset Flex Code
7773 status collapsed
7774
7775 \begin_layout Plain Layout
7776 -g
7777 \end_layout
7778
7779 \end_inset
7780
7781  enables communication via the 
7782 \emph on
7783 lyxsocket
7784 \emph default
7785 .
7786  Again, omit the 
7787 \begin_inset Flex Code
7788 status collapsed
7789
7790 \begin_layout Plain Layout
7791 -g
7792 \end_layout
7793
7794 \end_inset
7795
7796  option if you want to use the 
7797 \emph on
7798 lyxpipe
7799 \emph default
7800 , and be sure to specify the \SpecialChar LyX
7801 Server pipe path in the \SpecialChar LyX
7802  preferences.
7803 \end_layout
7804
7805 \begin_layout Standard
7806 Reverse search is triggered by double-click.
7807 \end_layout
7808
7809 \begin_layout Section
7810 Forward search
7811 \end_layout
7812
7813 \begin_layout Standard
7814 Forward search is, as the name implies, in a sense the 
7815 \begin_inset Quotes eld
7816 \end_inset
7817
7818 opposite
7819 \begin_inset Quotes erd
7820 \end_inset
7821
7822  of reverse search.
7823  It allows you to let the viewer jump to a given position from within \SpecialChar LyX
7824 .
7825  If forward search is set up (as described in what follows), you can put
7826  the cursor anywhere in your \SpecialChar LyX
7827  document, and hit 
7828 \begin_inset Flex Noun
7829 status collapsed
7830
7831 \begin_layout Plain Layout
7832 Navigate\SpecialChar menuseparator
7833 Forward search
7834 \end_layout
7835
7836 \end_inset
7837
7838  (or select 
7839 \begin_inset Flex Noun
7840 status collapsed
7841
7842 \begin_layout Plain Layout
7843 Forward search
7844 \end_layout
7845
7846 \end_inset
7847
7848  in the context menu via right mouse click), and then the viewer will jump
7849  to that position as well.
7850  This implies, of course, that your viewer supports this function.
7851 \end_layout
7852
7853 \begin_layout Standard
7854 To make forward search possible, you first need to provide the generated
7855  output PDF/DVI file with additional information about the \SpecialChar TeX
7856  sources.
7857  This can be done via the methods described in the section 
7858 \begin_inset CommandInset ref
7859 LatexCommand ref
7860 reference "subsec:rev-search"
7861
7862 \end_inset
7863
7864 .
7865 \end_layout
7866
7867 \begin_layout Standard
7868 Additionally, you need to configure \SpecialChar LyX
7869  for using your viewers in 
7870 \begin_inset Flex Noun
7871 status collapsed
7872
7873 \begin_layout Plain Layout
7874 Tools\SpecialChar menuseparator
7875 Preferences\SpecialChar menuseparator
7876 Output\SpecialChar menuseparator
7877 General
7878 \end_layout
7879
7880 \end_inset
7881
7882 .
7883  We provide a range of tested configurations for some viewers, which you
7884  can select from the drop down list.
7885  If none of these configurations suits you, you have to find out and enter
7886  a suitable configuration yourself.
7887  The definition syntax uses the following placeholders:
7888 \end_layout
7889
7890 \begin_layout Itemize
7891 \noindent
7892 \begin_inset Flex Code
7893 status collapsed
7894
7895 \begin_layout Plain Layout
7896 $$n
7897 \end_layout
7898
7899 \end_inset
7900
7901 : row number
7902 \end_layout
7903
7904 \begin_layout Itemize
7905 \noindent
7906 \begin_inset Flex Code
7907 status collapsed
7908
7909 \begin_layout Plain Layout
7910 $$t
7911 \end_layout
7912
7913 \end_inset
7914
7915 : name of the (temporary) exported .tex file (without path)
7916 \end_layout
7917
7918 \begin_layout Itemize
7919 \noindent
7920 \begin_inset Flex Code
7921 status collapsed
7922
7923 \begin_layout Plain Layout
7924 $$f
7925 \end_layout
7926
7927 \end_inset
7928
7929 : name of the (temporary) exported .tex file (including path)
7930 \end_layout
7931
7932 \begin_layout Itemize
7933 \noindent
7934 \begin_inset Flex Code
7935 status collapsed
7936
7937 \begin_layout Plain Layout
7938 $$o
7939 \end_layout
7940
7941 \end_inset
7942
7943 : name of the exported output file (either dvi or pdf, depending on which
7944  one exists in the temporary directory)
7945 \end_layout
7946
7947 \begin_layout Standard
7948 Note that only some of the viewers provide full 
7949 \change_inserted -712698321 1500279079
7950 and usable 
7951 \change_unchanged
7952 forward search functionality
7953 \change_inserted -712698321 1500278927
7954  out of the box
7955 \change_unchanged
7956 , among them yap, xdvi, okular
7957 \begin_inset Foot
7958 status collapsed
7959
7960 \begin_layout Plain Layout
7961 You might want to set 
7962 \begin_inset Flex Code
7963 status collapsed
7964
7965 \begin_layout Plain Layout
7966 okular –unique
7967 \end_layout
7968
7969 \end_inset
7970
7971  in 
7972 \begin_inset Flex Noun
7973 status collapsed
7974
7975 \begin_layout Plain Layout
7976 Tools\SpecialChar menuseparator
7977 Preferences\SpecialChar menuseparator
7978 File Handling\SpecialChar menuseparator
7979 File
7980 \begin_inset space ~
7981 \end_inset
7982
7983 Formats
7984 \end_layout
7985
7986 \end_inset
7987
7988
7989 \end_layout
7990
7991 \end_inset
7992
7993 , qpdfview
7994 \change_inserted -712698321 1500278795
7995 ,
7996 \change_unchanged
7997  and SumatraPDF
7998 \begin_inset Foot
7999 status collapsed
8000
8001 \begin_layout Plain Layout
8002 SumatraPDF can also use DDE commands through the external program CMCDDE
8003  — downloadable from 
8004 \begin_inset CommandInset href
8005 LatexCommand href
8006 target "http://www.istri.fr/spip/zip/CMCDDE.zip"
8007 literal "false"
8008
8009 \end_inset
8010
8011
8012 \end_layout
8013
8014 \end_inset
8015
8016 .
8017  
8018 \change_inserted -712698321 1500279294
8019 Others, such as evince
8020 \begin_inset Foot
8021 status collapsed
8022
8023 \begin_layout Plain Layout
8024 \paragraph_spacing single
8025
8026 \change_inserted -712698321 1500278873
8027 Forward search with evince can be achieved by means of third party helper
8028  scripts.
8029  Please refer to 
8030 \begin_inset CommandInset href
8031 LatexCommand href
8032 target "http://wiki.lyx.org/LyX/SyncTeX"
8033 literal "false"
8034
8035 \end_inset
8036
8037  for details.
8038 \change_unchanged
8039
8040 \end_layout
8041
8042 \end_inset
8043
8044 , require some extra tools in order to use forward search.
8045  
8046 \change_unchanged
8047 While many of the widespread PDF viewers (most notably Adobe Reader) do
8048  not support forward search at all, some other viewers – e.
8049 \begin_inset space \thinspace{}
8050 \end_inset
8051
8052 g.
8053  
8054 \change_deleted -712698321 1500278769
8055 evince and
8056 \change_unchanged
8057  xpdf – allow at least to reload the document and jump to a specific page
8058  of the file, so you can at least navigate 
8059 \begin_inset Quotes eld
8060 \end_inset
8061
8062 near
8063 \begin_inset Quotes erd
8064 \end_inset
8065
8066 .
8067  This latter functionality is provided by an external call of synctex (see
8068  the predefined example configurations).
8069  
8070 \end_layout
8071
8072 \begin_layout Standard
8073 Forward search works both with DVI and PDF output.
8074  \SpecialChar LyX
8075  simply checks which preview format you have used before (i.
8076 \begin_inset space \thinspace{}
8077 \end_inset
8078
8079 e., which format is already there in the temporary directory) and chooses
8080  the appropriate configuration for the respective format.
8081 \end_layout
8082
8083 \begin_layout Chapter
8084 Special Document Classes
8085 \end_layout
8086
8087 \begin_layout Section
8088 A&A Paper
8089 \end_layout
8090
8091 \begin_layout Standard
8092 by 
8093 \noun on
8094 Peter Sütterlin
8095 \end_layout
8096
8097 \begin_layout Subsection
8098 Introduction
8099 \end_layout
8100
8101 \begin_layout Standard
8102 This section describes how \SpecialChar LyX
8103  can be used to write articles for submission
8104  to the scientific journal 
8105 \emph on
8106 Astronomy and Astrophysics
8107 \emph default
8108  (
8109 \begin_inset Flex URL
8110 status collapsed
8111
8112 \begin_layout Plain Layout
8113
8114 http://www.edpsciences.fr/aa/
8115 \end_layout
8116
8117 \end_inset
8118
8119 ) using Version 5.01 of the document class 
8120 \family typewriter
8121 aa.cls
8122 \family default
8123 .
8124  This package can be downloaded from the ftp site
8125 \end_layout
8126
8127 \begin_layout Standard
8128 \begin_inset VSpace medskip
8129 \end_inset
8130
8131
8132 \end_layout
8133
8134 \begin_layout Standard
8135 \align center
8136 \begin_inset Flex URL
8137 status collapsed
8138
8139 \begin_layout Plain Layout
8140
8141 ftp://ftp.edpsciences.org/pub/aa/readme.html
8142 \end_layout
8143
8144 \end_inset
8145
8146
8147 \end_layout
8148
8149 \begin_layout Standard
8150 \begin_inset VSpace medskip
8151 \end_inset
8152
8153
8154 \end_layout
8155
8156 \begin_layout Standard
8157 A manual comes together with that package, and this text is not meant to
8158  replace the original manual but is merely a short guide in how to realize
8159  the correct form of your paper.
8160  
8161 \end_layout
8162
8163 \begin_layout Standard
8164 Please note that the publisher of the journal was changed from Springer
8165  to EDP Sciences starting January 1, 2001.
8166  That change involved also some slight changes to the style files, namely
8167  the removal of the thesaurus command.
8168  The \SpecialChar LyX
8169  class aa supports the newest version of these style files, V 5.01.
8170  If you have an older version installed, please upgrade.
8171  For compatibility, the old (version 4) layout has been kept as 
8172 \family sans
8173 article (A&A V4)
8174 \family default
8175 .
8176  Please refer to the comments in 
8177 \family typewriter
8178 \SpecialChar LyX
8179 Dir/layouts/aapaper.layout
8180 \family default
8181 .
8182 \end_layout
8183
8184 \begin_layout Subsection
8185 Getting started
8186 \end_layout
8187
8188 \begin_layout Standard
8189 It is recommended you start from the example template distributed with \SpecialChar LyX
8190 .
8191  If you are not using a template, note the following settings:
8192 \end_layout
8193
8194 \begin_layout Itemize
8195 Select 
8196 \family sans
8197 article (A&A)
8198 \family default
8199  in the 
8200 \family sans
8201 Document\SpecialChar menuseparator
8202 Settings
8203 \family default
8204  dialog (OK, that one was obvious).
8205 \end_layout
8206
8207 \begin_layout Itemize
8208 Don't change the option 
8209 \family sans
8210 Page
8211 \begin_inset space ~
8212 \end_inset
8213
8214 style
8215 \family default
8216 : Leave it set to 
8217 \family sans
8218 default
8219 \family default
8220 .
8221  The whole layout is done by the macros, you shouldn't change anything.
8222 \end_layout
8223
8224 \begin_layout Subsection
8225 The header block
8226 \end_layout
8227
8228 \begin_layout Standard
8229 First thing to enter is the header information.
8230  It consists of seven entries, of which some are optional.
8231  They are
8232 \end_layout
8233
8234 \begin_layout Itemize
8235
8236 \family sans
8237 Title
8238 \family default
8239 : [required] 
8240 \end_layout
8241
8242 \begin_layout Itemize
8243
8244 \family sans
8245 Subtitle
8246 \family default
8247 : [optional] 
8248 \end_layout
8249
8250 \begin_layout Itemize
8251
8252 \family sans
8253 Author
8254 \family default
8255 : [required]
8256 \end_layout
8257
8258 \begin_layout Itemize
8259
8260 \family sans
8261 Address
8262 \family default
8263 : [required]
8264 \end_layout
8265
8266 \begin_layout Itemize
8267
8268 \family sans
8269 Offprints
8270 \family default
8271 : [optional] if more than one author: whom to contact for offprint requests.
8272 \end_layout
8273
8274 \begin_layout Itemize
8275
8276 \family sans
8277 Mail
8278 \family default
8279 : [optional] mail address for contacts.
8280 \end_layout
8281
8282 \begin_layout Itemize
8283
8284 \family sans
8285 Date
8286 \family default
8287 : [required].
8288  Suggested format is 
8289 \family typewriter
8290 Received: <date>; Accepted <date> 
8291 \end_layout
8292
8293 \begin_layout Standard
8294 There is no need to issue the 
8295 \family typewriter
8296
8297 \backslash
8298 maketitle
8299 \family default
8300  command, this is done automatically by \SpecialChar LyX
8301  when the header is finished.
8302  Although the order of the single header entries doesn't matter it is advised
8303  to keep the above sequence, just to get the best optics and meets the layout
8304  of the real document.
8305 \end_layout
8306
8307 \begin_layout Standard
8308 If you want to place footnotes in the header block, e.
8309 \begin_inset space \thinspace{}
8310 \end_inset
8311
8312 g.
8313 \begin_inset space \space{}
8314 \end_inset
8315
8316 to state your present address, just use the standard footnote via the menu
8317  
8318 \family sans
8319 Insert\SpecialChar menuseparator
8320 Footnote.
8321
8322 \family default
8323  \SpecialChar LyX
8324  will automagically use the term 
8325 \family typewriter
8326
8327 \backslash
8328 thanks{}
8329 \family default
8330  in that case.
8331 \end_layout
8332
8333 \begin_layout Standard
8334 In addition to these topics, the macros use three additional \SpecialChar LaTeX
8335  commands that
8336  have no counterpart in \SpecialChar LyX
8337 :
8338 \end_layout
8339
8340 \begin_layout Itemize
8341
8342 \family typewriter
8343
8344 \backslash
8345 and
8346 \family default
8347  to separate different names for more than one author and institute, respectivel
8348 y.
8349 \end_layout
8350
8351 \begin_layout Itemize
8352
8353 \family typewriter
8354
8355 \backslash
8356 inst{<nr>}
8357 \family default
8358 to mark corresponding author/institute pairs.
8359  The institutes are numbered sequentially as they appear in the 
8360 \family sans
8361 Address
8362 \family default
8363  field, so you have to put a marker to each author.
8364 \end_layout
8365
8366 \begin_layout Itemize
8367
8368 \family typewriter
8369
8370 \backslash
8371 email{address}
8372 \family default
8373  to supply an email address for fast contact.
8374 \end_layout
8375
8376 \begin_layout Standard
8377 In all cases, the appropriate command has to be entered in \SpecialChar LyX
8378  and marked as
8379  \SpecialChar LaTeX
8380  code.
8381  See the examples.
8382  
8383 \end_layout
8384
8385 \begin_layout Subsection
8386 The abstract
8387 \end_layout
8388
8389 \begin_layout Standard
8390 The abstract should immediately follow the header block.
8391  With version 5 the abstract environment was changed to a command, and there
8392  is now a resctriction to only one paragraph.
8393  In addition, it should contain an entry with the keywords.
8394  This is not yet implemented for \SpecialChar LyX
8395 , therefore you have to enter the \SpecialChar LaTeX
8396  command
8397  
8398 \family typewriter
8399
8400 \backslash
8401 keywords{}
8402 \family default
8403  by hand and mark it as \SpecialChar LaTeX
8404  code.
8405  Refer to the example paper.
8406 \end_layout
8407
8408 \begin_layout Subsection
8409 Supported environments
8410 \end_layout
8411
8412 \begin_layout Standard
8413 The A&A paper layout supports the following environments for structuring
8414  your text:
8415 \end_layout
8416
8417 \begin_layout Itemize
8418
8419 \family sans
8420 Standard
8421 \end_layout
8422
8423 \begin_layout Itemize
8424
8425 \family sans
8426 Section
8427 \end_layout
8428
8429 \begin_layout Itemize
8430
8431 \family sans
8432 Subsection
8433 \end_layout
8434
8435 \begin_layout Itemize
8436
8437 \family sans
8438 Subsubsection
8439 \end_layout
8440
8441 \begin_layout Itemize
8442
8443 \family sans
8444 Itemize
8445 \end_layout
8446
8447 \begin_layout Itemize
8448
8449 \family sans
8450 Enumerate
8451 \end_layout
8452
8453 \begin_layout Itemize
8454
8455 \family sans
8456 Description
8457 \end_layout
8458
8459 \begin_layout Itemize
8460
8461 \family sans
8462 Caption
8463 \end_layout
8464
8465 \begin_layout Itemize
8466
8467 \family sans
8468 Abstract
8469 \end_layout
8470
8471 \begin_layout Itemize
8472
8473 \family sans
8474 Acknowledgment
8475 \end_layout
8476
8477 \begin_layout Itemize
8478
8479 \family sans
8480 Bibliography
8481 \end_layout
8482
8483 \begin_layout Itemize
8484
8485 \family sans
8486 \SpecialChar LaTeX
8487
8488 \end_layout
8489
8490 \begin_layout Subsection
8491 Commands not supported by \SpecialChar LyX
8492
8493 \end_layout
8494
8495 \begin_layout Standard
8496 Some commands are not yet supported by the 
8497 \family sans
8498 paper (A&A)
8499 \family default
8500  layout for \SpecialChar LyX
8501 .
8502  Some have already been mentioned.
8503  For the sake of completeness, they are listed all together here:
8504 \end_layout
8505
8506 \begin_layout Itemize
8507
8508 \family typewriter
8509
8510 \backslash
8511 and
8512 \end_layout
8513
8514 \begin_layout Itemize
8515
8516 \family typewriter
8517
8518 \backslash
8519 email
8520 \end_layout
8521
8522 \begin_layout Itemize
8523
8524 \family typewriter
8525
8526 \backslash
8527 appendix
8528 \end_layout
8529
8530 \begin_layout Itemize
8531
8532 \family typewriter
8533
8534 \backslash
8535 authorrunning
8536 \end_layout
8537
8538 \begin_layout Itemize
8539
8540 \family typewriter
8541
8542 \backslash
8543 inst{}
8544 \end_layout
8545
8546 \begin_layout Itemize
8547
8548 \family typewriter
8549
8550 \backslash
8551 keywords{}
8552 \end_layout
8553
8554 \begin_layout Itemize
8555
8556 \family typewriter
8557
8558 \backslash
8559 object{}
8560 \end_layout
8561
8562 \begin_layout Itemize
8563
8564 \family typewriter
8565
8566 \backslash
8567 titlerunning{}
8568 \end_layout
8569
8570 \begin_layout Standard
8571 If you want to use any of these commands, you have to enter them yourself.
8572  
8573 \series bold
8574 Do not forget to mark them as \SpecialChar LaTeX
8575  code!
8576 \end_layout
8577
8578 \begin_layout Subsection
8579 Figure and Table Floats
8580 \end_layout
8581
8582 \begin_layout Standard
8583 \SpecialChar LyX
8584  provides support for the necessary float environments 
8585 \family sans
8586 figure, figure*, table
8587 \family default
8588  and 
8589 \family sans
8590 table*
8591 \family default
8592 , therefore we won't tell much about it here.
8593  Refer to the 
8594 \emph on
8595 User's
8596 \begin_inset space ~
8597 \end_inset
8598
8599 Guide
8600 \emph default
8601 .
8602  Just remember that tables should be left-aligned.
8603  For that, select the table and change the alignment in 
8604 \family sans
8605 Edit\SpecialChar menuseparator
8606 Paragraph
8607 \begin_inset space ~
8608 \end_inset
8609
8610 Settings.
8611 \end_layout
8612
8613 \begin_layout Standard
8614 There is only one special thing: the figures with caption besides the figure.
8615  To create such a figure, you have to do the following:
8616 \end_layout
8617
8618 \begin_layout Enumerate
8619 Create a wide figure float: 
8620 \family sans
8621 Insert\SpecialChar menuseparator
8622 Float\SpecialChar menuseparator
8623 Figure
8624 \family default
8625 , then right click in the figure and select 
8626 \family sans
8627 Span
8628 \begin_inset space ~
8629 \end_inset
8630
8631 columns
8632 \family default
8633 .
8634 \end_layout
8635
8636 \begin_layout Enumerate
8637 Enter your caption text.
8638 \end_layout
8639
8640 \begin_layout Enumerate
8641 Press 
8642 \family sans
8643 Return
8644 \family default
8645  to move the cursor above the caption.
8646 \end_layout
8647
8648 \begin_layout Enumerate
8649 Insert your figure
8650 \end_layout
8651
8652 \begin_layout Enumerate
8653 Position the cursor behind the figure and insert a horizontal fill: 
8654 \family sans
8655 Insert\SpecialChar menuseparator
8656 Special
8657 \begin_inset space ~
8658 \end_inset
8659
8660 Character\SpecialChar menuseparator
8661 Horizontal
8662 \begin_inset space ~
8663 \end_inset
8664
8665 Fill
8666 \family default
8667 .
8668 \end_layout
8669
8670 \begin_layout Enumerate
8671 Switch to \SpecialChar LaTeX
8672  mode: 
8673 \family sans
8674 M-c
8675 \begin_inset space ~
8676 \end_inset
8677
8678 t
8679 \family default
8680 .
8681 \end_layout
8682
8683 \begin_layout Enumerate
8684 Enter 
8685 \family typewriter
8686
8687 \backslash
8688 parbox[b]{55mm}{
8689 \family default
8690 .
8691  
8692 \series bold
8693 Do not close the brace!
8694 \end_layout
8695
8696 \begin_layout Enumerate
8697 Position the cursor behind the caption text, switch to \SpecialChar LaTeX
8698  mode and insert
8699  the closing brace: 
8700 \family sans
8701 M-c
8702 \begin_inset space ~
8703 \end_inset
8704
8705 t
8706 \family default
8707  
8708 \family typewriter
8709 }
8710 \family default
8711 .
8712 \end_layout
8713
8714 \begin_layout Standard
8715 Also, refer to the figures in the example paper.
8716 \end_layout
8717
8718 \begin_layout Subsection
8719 Referee layout
8720 \end_layout
8721
8722 \begin_layout Standard
8723 For submission, the paper has to be formated in a special double-spacing
8724  layout.
8725  For this purpose, you have to give the option 
8726 \family typewriter
8727 referee
8728 \family default
8729  to the documentclass.
8730  This must be done using the extra class options field in the 
8731 \family sans
8732 Document\SpecialChar menuseparator
8733 Settings
8734 \family default
8735  dialog.
8736  Just enter the string 
8737 \family typewriter
8738 referee
8739 \family default
8740  there.
8741 \end_layout
8742
8743 \begin_layout Subsection
8744 The example paper
8745 \end_layout
8746
8747 \begin_layout Standard
8748 The 
8749 \family sans
8750 Examples
8751 \family default
8752  directory contains an example paper written with \SpecialChar LyX
8753 .
8754  It is the example paper from the original macro package, translated to
8755  \SpecialChar LyX
8756 .
8757  Use it for inspiration, and compare the original \SpecialChar LaTeX
8758  code with \SpecialChar LyX
8759  way of writing.
8760 \end_layout
8761
8762 \begin_layout Section
8763 AAS\SpecialChar TeX
8764
8765 \end_layout
8766
8767 \begin_layout Standard
8768 by 
8769 \noun on
8770 Mike Ressler
8771 \end_layout
8772
8773 \begin_layout Subsection
8774 Introduction
8775 \end_layout
8776
8777 \begin_layout Standard
8778 AAS\SpecialChar TeX
8779  is a set of macros produced by the American Astronomical Society to
8780  facilitate electronic manuscript submission to the three journals they
8781  publish: the Astrophysical Journal (including the Letters and Supplement),
8782  the Astronomical Journal, and the Publications of the Astronomical Society
8783  of the Pacific.
8784  \SpecialChar LyX
8785  has proven to be an excellent tool for generating these documents, especially
8786  given its equation, citation, and figure handling capabilities.
8787  \SpecialChar LyX
8788  requires version 5.0 (or higher) of these macros; preferably 5.2, which
8789  is the version described here, or higher.
8790  Versions prior to 5.0 are intended for use with \SpecialChar LaTeX
8791 2.09 and are fundamentally
8792  incompatible with \SpecialChar LyX
8793 .
8794  The AAS\SpecialChar TeX
8795  package may be downloaded from the AAS\SpecialChar TeX
8796  Web site
8797 \end_layout
8798
8799 \begin_layout Standard
8800 \begin_inset VSpace medskip
8801 \end_inset
8802
8803
8804 \end_layout
8805
8806 \begin_layout Standard
8807 \align center
8808 \begin_inset Flex URL
8809 status collapsed
8810
8811 \begin_layout Plain Layout
8812
8813 https://aas.org/aastex/aastex-downloads
8814 \end_layout
8815
8816 \end_inset
8817
8818
8819 \end_layout
8820
8821 \begin_layout Standard
8822 \begin_inset VSpace medskip
8823 \end_inset
8824
8825
8826 \end_layout
8827
8828 \begin_layout Standard
8829 A complete user guide is contained in that package and you should familiarize
8830  yourself with it thoroughly before embarking on writing a paper in \SpecialChar LyX
8831 .
8832  \SpecialChar LyX
8833  will not reduce the need to figure out all the AAS\SpecialChar TeX
8834  commands, it will only
8835  reduce the drudgery of typing everything in.
8836  It is your responsibility to ensure that the final exported \SpecialChar LaTeX
8837  document conforms
8838  completely to the requirements of the journal to which you are submitting
8839  your paper.
8840 \end_layout
8841
8842 \begin_layout Subsection
8843 Starting a New Paper
8844 \end_layout
8845
8846 \begin_layout Standard
8847 I strongly suggest that you start with the AAS\SpecialChar TeX
8848  template file.
8849  Click on 
8850 \family sans
8851 File\SpecialChar menuseparator
8852 New from
8853 \family default
8854  
8855 \family sans
8856 Template
8857 \family default
8858 , enter the new file name, then choose the 
8859 \family typewriter
8860 aastex.lyx
8861 \family default
8862  template.
8863  This will show the most common fields found in a manuscript.
8864  Simply overwrite the existing text (including the brackets, 
8865 \family typewriter
8866 <>
8867 \family default
8868 ) with the correct information.
8869  Many of the AAS\SpecialChar TeX
8870  commands and environments can be implemented directly in
8871  \SpecialChar LyX
8872 , but some cannot: most noticeably 
8873 \family typewriter
8874
8875 \backslash
8876 altaffilmark
8877 \family default
8878  and 
8879 \family typewriter
8880
8881 \backslash
8882 altaffiltext
8883 \family default
8884 , which should stick out like a sore thumb if you actually just opened the
8885  template file.
8886  For commands such as these, the \SpecialChar LaTeX
8887  code must be entered directly and marked
8888  as such.
8889  Such commands are referred to as \SpecialChar TeX
8890  code, or Evil Red Text.
8891  I tried to minimize the amount of \SpecialChar TeX
8892  code needed in an AAS\SpecialChar TeX
8893  document, but
8894  there is still a bit more required than any of us would like.
8895 \end_layout
8896
8897 \begin_layout Subsection
8898 Finishing Your Paper
8899 \end_layout
8900
8901 \begin_layout Standard
8902 When the paper is finished to your satisfaction and previews/prints correctly,
8903  there are a few 
8904 \begin_inset Quotes eld
8905 \end_inset
8906
8907 postprocessing
8908 \begin_inset Quotes erd
8909 \end_inset
8910
8911  actions which need to be done before you submit it to the journals.
8912  
8913 \end_layout
8914
8915 \begin_layout Enumerate
8916 Export your paper as a \SpecialChar LaTeX
8917  file (
8918 \family sans
8919 File\SpecialChar menuseparator
8920 Export\SpecialChar menuseparator
8921 \SpecialChar LaTeX
8922
8923 \family default
8924 ).
8925  
8926 \end_layout
8927
8928 \begin_layout Enumerate
8929 Edit the resulting 
8930 \family typewriter
8931 .tex
8932 \family default
8933  file with your favorite text editor
8934 \end_layout
8935
8936 \begin_deeper
8937 \begin_layout Enumerate
8938 remove the comment lines before the 
8939 \family typewriter
8940
8941 \backslash
8942 documentclass
8943 \family default
8944  command
8945 \end_layout
8946
8947 \begin_layout Enumerate
8948 remove the 
8949 \family typewriter
8950
8951 \backslash
8952 usepackage...{fontenc}
8953 \family default
8954  line if it appears (usually just after 
8955 \family typewriter
8956
8957 \backslash
8958 documentclass
8959 \family default
8960 }; also remove the 
8961 \family typewriter
8962
8963 \backslash
8964 secnumdepth
8965 \family default
8966  line if it appears.
8967 \end_layout
8968
8969 \begin_layout Enumerate
8970 remove everything between (and including) the 
8971 \family typewriter
8972
8973 \backslash
8974 makeatletter
8975 \family default
8976  and 
8977 \family typewriter
8978
8979 \backslash
8980 makeatother
8981 \family default
8982  commands, except for any commands you specifically put into the \SpecialChar LaTeX
8983  preamble
8984  (which should appear immediately after the 
8985 \begin_inset Quotes eld
8986 \end_inset
8987
8988 User specified \SpecialChar LaTeX
8989  commands
8990 \begin_inset Quotes erd
8991 \end_inset
8992
8993  comment in the 
8994 \family typewriter
8995 .tex
8996 \family default
8997  file).
8998 \end_layout
8999
9000 \end_deeper
9001 \begin_layout Enumerate
9002 Run the resulting file through \SpecialChar LaTeX
9003  to make sure it still processes correctly.
9004 \end_layout
9005
9006 \begin_layout Enumerate
9007 Reread the journal requirements to make sure your filenames and formats
9008  are correct.
9009 \end_layout
9010
9011 \begin_layout Enumerate
9012 Submit it.
9013 \end_layout
9014
9015 \begin_layout Subsection
9016 Comments On Specific Commands
9017 \end_layout
9018
9019 \begin_layout Standard
9020 I will not describe the detailed usage of the individual AAS\SpecialChar TeX
9021  commands: the
9022  AAS\SpecialChar TeX
9023  User Guide (
9024 \family typewriter
9025 aasguide.tex
9026 \family default
9027 ) gives a good description of each.
9028  Thus it's probably easiest for me to go down the list as found in the guide
9029  and offer comments where necessary.
9030  So let's begin \SpecialChar ldots
9031
9032 \end_layout
9033
9034 \begin_layout Subsubsection
9035 Things that work as expected
9036 \end_layout
9037
9038 \begin_layout Standard
9039 Because they work as you might expect, I simply list them and the section
9040  they are found in: 
9041 \family typewriter
9042
9043 \backslash
9044 documentclass
9045 \family default
9046  (2.1.1), 
9047 \family typewriter
9048
9049 \backslash
9050 begin{document}
9051 \family default
9052  (2.2), 
9053 \family typewriter
9054
9055 \backslash
9056 title
9057 \family default
9058  (2.3), 
9059 \family typewriter
9060
9061 \backslash
9062 author
9063 \family default
9064  (2.3), 
9065 \family typewriter
9066
9067 \backslash
9068 affil
9069 \family default
9070  (2.3), 
9071 \family typewriter
9072
9073 \backslash
9074 abstract
9075 \family default
9076  (2.4), 
9077 \family typewriter
9078
9079 \backslash
9080 keywords
9081 \family default
9082  (2.5), 
9083 \family typewriter
9084
9085 \backslash
9086 section
9087 \family default
9088  (2.7), 
9089 \family typewriter
9090
9091 \backslash
9092 subsection
9093 \family default
9094  (2.7), 
9095 \family typewriter
9096
9097 \backslash
9098 subsubsection
9099 \family default
9100  (2.7), 
9101 \family typewriter
9102
9103 \backslash
9104 paragraph
9105 \family default
9106  (2.7), 
9107 \family typewriter
9108
9109 \backslash
9110 facility
9111 \family default
9112  (2.10), 
9113 \family typewriter
9114
9115 \backslash
9116 begin{displaymath}
9117 \family default
9118  (2.12), 
9119 \family typewriter
9120
9121 \backslash
9122 begin{equation}
9123 \family default
9124  (2.12), 
9125 \family typewriter
9126
9127 \backslash
9128 begin{eqnarray}
9129 \family default
9130  (2.12), 
9131 \family typewriter
9132
9133 \backslash
9134 begin{mathletters}
9135 \family default
9136  (2.12), 
9137 \family typewriter
9138
9139 \backslash
9140 begin{thebibliography}
9141 \family default
9142  (2.13.1), 
9143 \family typewriter
9144
9145 \backslash
9146 bibitem
9147 \family default
9148  (2.13.2), all the cite commands and their variations (2.13.2), the generic
9149  graphicx figure commands (2.14.1), 
9150 \family typewriter
9151
9152 \backslash
9153 begin{table}
9154 \family default
9155  (2.15.4), 
9156 \family typewriter
9157
9158 \backslash
9159 begin{tabular}
9160 \family default
9161  (2.15.4), 
9162 \family typewriter
9163
9164 \backslash
9165 caption
9166 \family default
9167  (2.15.4), 
9168 \family typewriter
9169
9170 \backslash
9171 label
9172 \family default
9173  (2.15.4, amongst other places), 
9174 \family typewriter
9175
9176 \backslash
9177 tablerefs
9178 \family default
9179  (2.15.5), 
9180 \family typewriter
9181
9182 \backslash
9183 tablecomments
9184 \family default
9185  (2.15.5), 
9186 \family typewriter
9187
9188 \backslash
9189 url
9190 \family default
9191  (2.17.4), 
9192 \family typewriter
9193
9194 \backslash
9195 end{document}
9196 \family default
9197  (2.18).
9198 \end_layout
9199
9200 \begin_layout Standard
9201 The following style options also work correctly: 
9202 \family typewriter
9203 longabstract
9204 \family default
9205  (2.4), 
9206 \family typewriter
9207 preprint
9208 \family default
9209  (3.2.1), 
9210 \family typewriter
9211 preprint2
9212 \family default
9213  (3.2.2), 
9214 \family typewriter
9215 eqsecnum
9216 \family default
9217  (3.3), 
9218 \family typewriter
9219 flushrt
9220 \family default
9221  (3.4).
9222  Simply put them in the 
9223 \family sans
9224 Options
9225 \family default
9226  box in 
9227 \family sans
9228 Layout\SpecialChar menuseparator
9229 Document
9230 \family default
9231 .
9232 \end_layout
9233
9234 \begin_layout Subsubsection
9235 Things that work, but require more comment
9236 \end_layout
9237
9238 \begin_layout Standard
9239 The following items work, but require a little more discussion:
9240 \end_layout
9241
9242 \begin_layout Itemize
9243 These items are reserved for use by the journal editors, but you can put
9244  them into the \SpecialChar LaTeX
9245  preamble if you feel compelled to do so: 
9246 \family typewriter
9247
9248 \backslash
9249 received
9250 \family default
9251
9252 \family typewriter
9253
9254 \backslash
9255 revised
9256 \family default
9257
9258 \family typewriter
9259
9260 \backslash
9261 accepted
9262 \family default
9263
9264 \family typewriter
9265
9266 \backslash
9267 ccc
9268 \family default
9269
9270 \family typewriter
9271
9272 \backslash
9273 cpright
9274 \family default
9275  (all from 2.1.3)
9276 \end_layout
9277
9278 \begin_layout Itemize
9279 These items may be placed in the \SpecialChar LaTeX
9280  preamble, and are included as blanks in
9281  the template file: 
9282 \family typewriter
9283
9284 \backslash
9285 slugcomment
9286 \family default
9287  (2.1.4), 
9288 \family typewriter
9289
9290 \backslash
9291 shorttitle
9292 \family default
9293  (2.1.5), 
9294 \family typewriter
9295
9296 \backslash
9297 shortauthors
9298 \family default
9299  (2.1.5)
9300 \end_layout
9301
9302 \begin_layout Itemize
9303
9304 \family typewriter
9305
9306 \backslash
9307 email
9308 \family default
9309  (2.3) – can only be used 
9310 \begin_inset Quotes eld
9311 \end_inset
9312
9313 standalone
9314 \begin_inset Quotes erd
9315 \end_inset
9316
9317 , not in the middle of a paragraph.
9318  Use \SpecialChar TeX
9319  code if you need to embed it.
9320 \end_layout
9321
9322 \begin_layout Itemize
9323
9324 \family typewriter
9325
9326 \backslash
9327 and
9328 \family default
9329  (2.3) – will have extra {} after it.
9330  This should not cause an error.
9331 \end_layout
9332
9333 \begin_layout Itemize
9334
9335 \family typewriter
9336
9337 \backslash
9338 notetoeditor
9339 \family default
9340  (2.6) – can only be used 
9341 \begin_inset Quotes eld
9342 \end_inset
9343
9344 standalone
9345 \begin_inset Quotes erd
9346 \end_inset
9347
9348 , not in the middle of a paragraph.
9349  Use \SpecialChar TeX
9350  code if you need to embed it.
9351 \end_layout
9352
9353 \begin_layout Itemize
9354
9355 \family typewriter
9356
9357 \backslash
9358 placetable
9359 \family default
9360  (2.8) – can't insert a cross-reference tag, you must type the tag name by
9361  hand
9362 \end_layout
9363
9364 \begin_layout Itemize
9365
9366 \family typewriter
9367
9368 \backslash
9369 placefigure
9370 \family default
9371  (2.8) – same as for 
9372 \family typewriter
9373
9374 \backslash
9375 placetable
9376 \end_layout
9377
9378 \begin_layout Itemize
9379
9380 \family typewriter
9381
9382 \backslash
9383 acknowledgements
9384 \family default
9385  (2.9) – will have extra {} after it.
9386  This should not cause an error.
9387 \end_layout
9388
9389 \begin_layout Itemize
9390
9391 \family typewriter
9392
9393 \backslash
9394 appendix
9395 \family default
9396  (2.11) – will have extra {} after it.
9397  This should not cause an error.
9398 \end_layout
9399
9400 \begin_layout Itemize
9401
9402 \family typewriter
9403
9404 \backslash
9405 figcaption
9406 \family default
9407  (2.14.2) – you can insert an optional filename argument by placing the cursor
9408  at the beginning of the text and selecting 
9409 \family sans
9410 Insert\SpecialChar menuseparator
9411 Short Title
9412 \family default
9413 .
9414  
9415 \begin_inset Quotes eld
9416 \end_inset
9417
9418 Short Title
9419 \begin_inset Quotes erd
9420 \end_inset
9421
9422  inserts an optional argument of the type needed by 
9423 \family typewriter
9424
9425 \backslash
9426 figcaption
9427 \family default
9428 .
9429  Hopefully it will be renamed someday.
9430 \end_layout
9431
9432 \begin_layout Itemize
9433
9434 \family typewriter
9435
9436 \backslash
9437 objectname
9438 \family default
9439  (2.17.1) – same as 
9440 \family typewriter
9441
9442 \backslash
9443 figcaption
9444 \family default
9445  for the catalog ID optional parameter
9446 \end_layout
9447
9448 \begin_layout Itemize
9449
9450 \family typewriter
9451
9452 \backslash
9453 dataset
9454 \family default
9455  (2.17.1) – same as 
9456 \family typewriter
9457
9458 \backslash
9459 figcaption
9460 \family default
9461  for the catalog ID optional parameter
9462 \end_layout
9463
9464 \begin_layout Subsubsection
9465 Things not implemented, use \SpecialChar TeX
9466  code
9467 \end_layout
9468
9469 \begin_layout Standard
9470
9471 \family typewriter
9472
9473 \backslash
9474 altaffilmark
9475 \family default
9476  (2.3), 
9477 \family typewriter
9478
9479 \backslash
9480 altaffiltext
9481 \family default
9482  (2.3), 
9483 \family typewriter
9484
9485 \backslash
9486 eqnum
9487 \family default
9488  (2.12), 
9489 \family typewriter
9490
9491 \backslash
9492 setcounter{equation}
9493 \family default
9494  (2.12), Journal name abbreviations (2.13.4), 
9495 \family typewriter
9496
9497 \backslash
9498 figurenum
9499 \family default
9500  (2.14.1), 
9501 \family typewriter
9502
9503 \backslash
9504 epsscale
9505 \family default
9506  (2.14.1), 
9507 \family typewriter
9508
9509 \backslash
9510 plotone
9511 \family default
9512  (2.14.1), 
9513 \family typewriter
9514
9515 \backslash
9516 plottwo
9517 \family default
9518  (2.14.1), 
9519 \family typewriter
9520
9521 \backslash
9522 tablenum
9523 \family default
9524  (2.15.4), 
9525 \family typewriter
9526
9527 \backslash
9528 tableline
9529 \family default
9530  (2.15.4, insert it as the first element in the lefthand cell after where
9531  you want it.
9532  Don't use any of \SpecialChar LyX
9533 's rules in the table), 
9534 \family typewriter
9535
9536 \backslash
9537 tablenotemark
9538 \family default
9539  (2.15.5), 
9540 \family typewriter
9541
9542 \backslash
9543 tablenotetext
9544 \family default
9545  (2.15.5), much of Misc (2.17, except 
9546 \family typewriter
9547
9548 \backslash
9549 objectname
9550 \family default
9551
9552 \family typewriter
9553
9554 \backslash
9555 dataset
9556 \family default
9557
9558 \family typewriter
9559
9560 \backslash
9561 url
9562 \family default
9563 , and 
9564 \family typewriter
9565
9566 \backslash
9567 email
9568 \family default
9569 ; see above), 
9570 \family typewriter
9571
9572 \backslash
9573 singlespace
9574 \family default
9575  (3.1), 
9576 \family typewriter
9577
9578 \backslash
9579 doublespace
9580 \family default
9581  (3.1), 
9582 \family typewriter
9583
9584 \backslash
9585 onecolumn
9586 \family default
9587  (3.2), 
9588 \family typewriter
9589
9590 \backslash
9591 twocolumn
9592 \family default
9593  (3.2)
9594 \end_layout
9595
9596 \begin_layout Subsubsection
9597 Things that cannot be implemented
9598 \end_layout
9599
9600 \begin_layout Standard
9601 \SpecialChar ldots
9602  at least in any meaningful sort of way, so I suggest ignoring them.
9603  They are the references environment (2.13.3), and the deluxetable environment
9604  (2.15).
9605  If you really, really need to use deluxetable, I suggest editing it in
9606  a separate file with a text editor, then using 
9607 \family sans
9608 Insert\SpecialChar menuseparator
9609 Child
9610 \begin_inset space ~
9611 \end_inset
9612
9613 Document
9614 \family default
9615  to include it in your \SpecialChar LyX
9616  document.
9617  See the 
9618 \family typewriter
9619 aas_sample.lyx
9620 \family default
9621  file to see an example of this.
9622 \end_layout
9623
9624 \begin_layout Subsection
9625 FAQs, Tips, Tricks, and Other Ruminations
9626 \end_layout
9627
9628 \begin_layout Subsubsection
9629 Getting \SpecialChar LyX
9630  and AAS\SpecialChar TeX
9631  to cooperate
9632 \end_layout
9633
9634 \begin_layout Standard
9635 It can be a bit tricky to get \SpecialChar LyX
9636  to recognize a new layout and document class.
9637  When all else fails, do this:
9638 \end_layout
9639
9640 \begin_layout Enumerate
9641 Make certain that \SpecialChar LaTeX
9642  can find AAS\SpecialChar TeX
9643 .
9644  Copy sample.tex (and perhaps table.tex) from the AAS\SpecialChar TeX
9645  distribution into a
9646  directory completely unrelated to \SpecialChar LaTeX
9647  or AAS\SpecialChar TeX
9648  and run \SpecialChar LaTeX
9649  on 
9650 \family typewriter
9651 sample.tex
9652 \family default
9653 .
9654 \end_layout
9655
9656 \begin_layout Enumerate
9657 Make certain that 
9658 \family typewriter
9659 aastex.layout
9660 \family default
9661  appears in \SpecialChar LyX
9662 's 
9663 \family typewriter
9664 layouts
9665 \family default
9666  folder
9667 \end_layout
9668
9669 \begin_layout Enumerate
9670 Rerun 
9671 \family sans
9672 Tools\SpecialChar menuseparator
9673 Reconfigure
9674 \family default
9675  in \SpecialChar LyX
9676 , then restart \SpecialChar LyX
9677 .
9678 \end_layout
9679
9680 \begin_layout Enumerate
9681 Open a regular new file, not from a template.
9682  Does AAS\SpecialChar TeX
9683  appear in the class list in 
9684 \family sans
9685 Document\SpecialChar menuseparator
9686 Settings
9687 \family default
9688 ?
9689 \end_layout
9690
9691 \begin_layout Standard
9692 If you get a warning from an existing AAS\SpecialChar TeX
9693  document about not being able
9694  to find the AAS\SpecialChar TeX
9695  layout or a message about 
9696 \begin_inset Quotes eld
9697 \end_inset
9698
9699 You should not mix title layouts with normal ones
9700 \begin_inset Quotes erd
9701 \end_inset
9702
9703 , things haven't been installed correctly.
9704 \end_layout
9705
9706 \begin_layout Subsubsection
9707 \SpecialChar LaTeX
9708  error processing a table 
9709 \end_layout
9710
9711 \begin_layout Standard
9712 \SpecialChar LyX
9713 , by default, attempts to center the table caption/title.
9714  This seems to produce a bad interaction in AAS\SpecialChar TeX
9715  so you should click somewhere
9716  in the caption/title, then select 
9717 \family sans
9718 Edit\SpecialChar menuseparator
9719 Paragraph
9720 \begin_inset space ~
9721 \end_inset
9722
9723 Settings
9724 \family default
9725 , then set the 
9726 \family sans
9727 Alignment
9728 \family default
9729  to 
9730 \family sans
9731 Block
9732 \family default
9733 .
9734  This took care of it for me.
9735 \end_layout
9736
9737 \begin_layout Subsubsection
9738 References
9739 \end_layout
9740
9741 \begin_layout Standard
9742 A couple of things: 1) I have noticed some funny spacing in the reference
9743  entries in the text.
9744  When you enter the bibliography item data, make sure their is 
9745 \emph on
9746 no
9747 \emph default
9748  space between the last author and the parenthesis setting off the year;
9749  
9750 \emph on
9751 e.
9752 \begin_inset space \thinspace{}
9753 \end_inset
9754
9755 g.
9756 \begin_inset space \space{}
9757 \end_inset
9758
9759
9760 \emph default
9761 type 
9762 \family typewriter
9763 Ressler(1992)
9764 \family default
9765 , not 
9766 \family typewriter
9767 Ressler (1992)
9768 \family default
9769 .
9770  2) Entering the references at all is not obvious.
9771  The easiest thing is to start typing your first reference at the end of
9772  the document, then mark it as type 
9773 \family sans
9774 References
9775 \family default
9776 .
9777  That will put a small gray box in front of what you just typed.
9778  Click on the box to fill in the rest of the information.
9779  For new references, go to the end of an existing reference and press return.
9780  That will create a new line with its own box, etc.
9781 \end_layout
9782
9783 \begin_layout Subsubsection
9784 Including EPS files
9785 \end_layout
9786
9787 \begin_layout Standard
9788 Even though AAS\SpecialChar TeX
9789  provides its own figure commands (
9790 \family typewriter
9791
9792 \backslash
9793 plotone
9794 \family default
9795 , for example), I much prefer \SpecialChar LaTeX
9796 's standard figure commands (with the default
9797  graphicx).
9798  You can insert the 
9799 \family typewriter
9800
9801 \backslash
9802 plotone
9803 \family default
9804 , etc.
9805 \begin_inset space ~
9806 \end_inset
9807
9808 commands as \SpecialChar TeX
9809  code into a Figure Float box if you desire, but I never have
9810  much luck getting the layout right.
9811  With the standard graphics, \SpecialChar LyX
9812  will insert a 
9813 \family typewriter
9814
9815 \backslash
9816 usepackage{graphicx}
9817 \family default
9818  command into the \SpecialChar LaTeX
9819  preamble and handle the figures in the standard \SpecialChar LaTeX2e
9820  way,
9821  interspersing the figures in the text.
9822  I believe ApJ accepts figures exactly this way now; AJ might still use
9823  the 
9824 \begin_inset Quotes eld
9825 \end_inset
9826
9827 stack everything at the end
9828 \begin_inset Quotes erd
9829 \end_inset
9830
9831  technique.
9832 \end_layout
9833
9834 \begin_layout Subsubsection
9835 Things I could have done, but didn't
9836 \end_layout
9837
9838 \begin_layout Standard
9839 There are a few 
9840 \begin_inset Quotes eld
9841 \end_inset
9842
9843 pretty
9844 \begin_inset Quotes erd
9845 \end_inset
9846
9847  things I could have implemented, but chose not to.
9848  For instance, I saw no point in double-spacing the text in the \SpecialChar LyX
9849  window,
9850  even though it is double-spaced in the paper manuscript.
9851  Also, I chose not to make separate layouts for the preprint and preprint2
9852  styles.
9853  Since I assume you will spend most of your time in the plain manuscript
9854  mode anyway, I decided not to chew up more disk space with this.
9855  
9856 \end_layout
9857
9858 \begin_layout Subsection
9859 Final Caveat
9860 \end_layout
9861
9862 \begin_layout Standard
9863 Your mileage may vary.
9864  I've now had papers published by both ApJ and AJ that have had 98% of the
9865  effort done in \SpecialChar LyX
9866 ; the last 2% was the \SpecialChar LaTeX
9867  post-processing and a few cleanups.
9868  I have had no trouble with the submission process, and I'm sure the journals
9869  were never aware that there might be a difference.
9870  So, go forth and publish!
9871 \end_layout
9872
9873 \begin_layout Section
9874 AMS \SpecialChar LaTeX
9875
9876 \end_layout
9877
9878 \begin_layout Standard
9879 by 
9880 \noun on
9881 David Johnson
9882 \noun default
9883 ; updated by 
9884 \noun on
9885 Richard Heck
9886 \end_layout
9887
9888 \begin_layout Standard
9889 \begin_inset VSpace bigskip
9890 \end_inset
9891
9892
9893 \end_layout
9894
9895 \begin_layout Standard
9896 \noindent
9897 The AMS \SpecialChar LaTeX
9898  layouts are set up to conform to suggested styles for mathematical
9899  papers to be submitted to American Mathematical Society publications.
9900  The layouts are not tailored to a specific journal, but easily can be.
9901  You should refer to the AMS documentation for specific instructions for
9902  each journal (usually it will entail only changing a single line in the
9903  \SpecialChar TeX
9904  output).
9905  That documentation is available on the Web at 
9906 \begin_inset Flex URL
9907 status open
9908
9909 \begin_layout Plain Layout
9910
9911 http://www.ams.org
9912 \end_layout
9913
9914 \end_inset
9915
9916  or by ftp at 
9917 \begin_inset Flex URL
9918 status open
9919
9920 \begin_layout Plain Layout
9921
9922 ftp://ftp.ams.org/pub/tex/amslatex/
9923 \end_layout
9924
9925 \end_inset
9926
9927 .
9928  These layouts are appropriate, and useful, for any mathematical writing.
9929  
9930 \end_layout
9931
9932 \begin_layout Standard
9933 There are two basic AMS \SpecialChar LaTeX
9934  layouts: 
9935 \end_layout
9936
9937 \begin_layout Itemize
9938 amsart: The standard AMS article format.
9939 \end_layout
9940
9941 \begin_layout Itemize
9942 amsbook: the standard AMS book (really, monograph) format.
9943  
9944 \end_layout
9945
9946 \begin_layout Standard
9947 The layouts themselves contain only the minimum necessary to use the AMS
9948  classes.
9949  They do not, in particular, contain any of the `theorem' environments used
9950  for setting theorems, lemmas, and the like.
9951  These are contained, instead, in the 
9952 \begin_inset Flex Code
9953 status collapsed
9954
9955 \begin_layout Plain Layout
9956 Theorems (AMS)
9957 \end_layout
9958
9959 \end_inset
9960
9961  module, which is loaded by default when you select one of the AMS classes.
9962  (It can also be used with other classes and can be removed, if you would
9963  rather use something else.) Less commonly used environments are in the 
9964 \begin_inset Flex Code
9965 status collapsed
9966
9967 \begin_layout Plain Layout
9968 Theorems (AMS-Extended)
9969 \end_layout
9970
9971 \end_inset
9972
9973  module, which must be loaded manually.
9974 \end_layout
9975
9976 \begin_layout Standard
9977 By default, theorems and the like are numbered consecutively throughout
9978  the document, but this may be modified by loading the module 
9979 \begin_inset Flex Code
9980 status collapsed
9981
9982 \begin_layout Plain Layout
9983 Theorems (Order by Section)
9984 \end_layout
9985
9986 \end_inset
9987
9988  or, if you are using 
9989 \begin_inset Flex Code
9990 status collapsed
9991
9992 \begin_layout Plain Layout
9993 book (AMS)
9994 \end_layout
9995
9996 \end_inset
9997
9998 , the module 
9999 \begin_inset Flex Code
10000 status collapsed
10001
10002 \begin_layout Plain Layout
10003 Theorems (Order by Chapter)
10004 \end_layout
10005
10006 \end_inset
10007
10008 .
10009  These will number the results as 
10010 \begin_inset Formula $n.m$
10011 \end_inset
10012
10013 , where the first number refers to the section (or chapter) and the second
10014  refers to the total number of results so far in that section (or chapter).
10015  Many environments are also available unnumbered.
10016  These are indicated by an asterisk at the end.
10017  If you happen to want 
10018 \emph on
10019 only
10020 \emph default
10021  unnumbered results, the module 
10022 \begin_inset Flex Code
10023 status collapsed
10024
10025 \begin_layout Plain Layout
10026 Theorems (Starred)
10027 \end_layout
10028
10029 \end_inset
10030
10031  provides that option.
10032 \end_layout
10033
10034 \begin_layout Standard
10035 Note that these modules do not 
10036 \emph on
10037 have
10038 \emph default
10039  to be used with the AMS classes.
10040  It is perfectly possible to use the 
10041 \begin_inset Flex Code
10042 status collapsed
10043
10044 \begin_layout Plain Layout
10045 Theorems (AMS)
10046 \end_layout
10047
10048 \end_inset
10049
10050  module, and the others mentioned, with other classes, such as 
10051 \begin_inset Flex Code
10052 status collapsed
10053
10054 \begin_layout Plain Layout
10055 article
10056 \end_layout
10057
10058 \end_inset
10059
10060
10061 \begin_inset Flex Code
10062 status collapsed
10063
10064 \begin_layout Plain Layout
10065 report
10066 \end_layout
10067
10068 \end_inset
10069
10070
10071 \begin_inset Flex Code
10072 status collapsed
10073
10074 \begin_layout Plain Layout
10075 book (KOMA-script)
10076 \end_layout
10077
10078 \end_inset
10079
10080 , and so forth.
10081 \end_layout
10082
10083 \begin_layout Subsection
10084 What these layouts provide
10085 \end_layout
10086
10087 \begin_layout Standard
10088 There is a long list of included environments provided by these layouts.
10089  In AMS-\SpecialChar LaTeX
10090 , there is, in fact, an opportunity to define an unlimited variety
10091  of `theorem' environments.
10092  However, the AMS recommends the environments that are available in \SpecialChar LyX
10093 .
10094  
10095 \end_layout
10096
10097 \begin_layout Standard
10098 The following environments—as well as the standard environments, such as
10099  
10100 \begin_inset Flex Noun
10101 status collapsed
10102
10103 \begin_layout Plain Layout
10104 section
10105 \end_layout
10106
10107 \end_inset
10108
10109
10110 \begin_inset Flex Noun
10111 status collapsed
10112
10113 \begin_layout Plain Layout
10114 bibliography
10115 \end_layout
10116
10117 \end_inset
10118
10119
10120 \begin_inset Flex Noun
10121 status collapsed
10122
10123 \begin_layout Plain Layout
10124 title
10125 \end_layout
10126
10127 \end_inset
10128
10129
10130 \begin_inset Flex Noun
10131 status collapsed
10132
10133 \begin_layout Plain Layout
10134 author
10135 \end_layout
10136
10137 \end_inset
10138
10139 , and 
10140 \begin_inset Flex Noun
10141 status collapsed
10142
10143 \begin_layout Plain Layout
10144 date
10145 \end_layout
10146
10147 \end_inset
10148
10149 —are provided by 
10150 \begin_inset Flex Code
10151 status collapsed
10152
10153 \begin_layout Plain Layout
10154 article (AMS)
10155 \end_layout
10156
10157 \end_inset
10158
10159  and 
10160 \begin_inset Flex Code
10161 status collapsed
10162
10163 \begin_layout Plain Layout
10164 book (AMS)
10165 \end_layout
10166
10167 \end_inset
10168
10169 :
10170 \end_layout
10171
10172 \begin_layout Description
10173 Address This should be the author's permanent address.
10174 \end_layout
10175
10176 \begin_layout Description
10177 Current
10178 \begin_inset space ~
10179 \end_inset
10180
10181 Address This should be the author's temporary address at the time of submission,
10182  if different from the Address.
10183 \end_layout
10184
10185 \begin_layout Description
10186 Email Author's e-mail address
10187 \end_layout
10188
10189 \begin_layout Description
10190 URL Author's Web address, if desired.
10191 \end_layout
10192
10193 \begin_layout Description
10194 Keywords Key words or phrases used to identify specific topics discussed
10195  in the paper.
10196 \end_layout
10197
10198 \begin_layout Description
10199 Subjectclass These refer to the AMS Subject Classifications, published and
10200  described in 
10201 \emph on
10202 Mathematical Reviews
10203 \emph default
10204 .
10205  These are also available online at the AMS cites listed above.
10206 \end_layout
10207
10208 \begin_layout Description
10209 Thanks
10210 \end_layout
10211
10212 \begin_layout Description
10213 Dedicatory
10214 \end_layout
10215
10216 \begin_layout Description
10217 Translator
10218 \end_layout
10219
10220 \begin_layout Standard
10221 The following environments are provided by both the 
10222 \begin_inset Flex Code
10223 status collapsed
10224
10225 \begin_layout Plain Layout
10226 Theorems
10227 \end_layout
10228
10229 \end_inset
10230
10231  and 
10232 \begin_inset Flex Code
10233 status collapsed
10234
10235 \begin_layout Plain Layout
10236 Theorems (AMS)
10237 \end_layout
10238
10239 \end_inset
10240
10241  modules, in the latter case in both starred (unnumbered) and unstarred
10242  (numbered) versions.
10243  These same environments are provided only in the starred versions by the
10244  
10245 \begin_inset Flex Code
10246 status collapsed
10247
10248 \begin_layout Plain Layout
10249 Theorems (Starred)
10250 \end_layout
10251
10252 \end_inset
10253
10254  module:
10255 \end_layout
10256
10257 \begin_layout Theorem
10258 This is typically used for the statements of major results.
10259  
10260 \end_layout
10261
10262 \begin_layout Corollary*
10263 This is used for statements which follow fairly directly from previous statement
10264 s.
10265  Again, these can be major results.
10266  
10267 \end_layout
10268
10269 \begin_layout Lemma
10270 These are smaller results needed to prove other statements.
10271 \end_layout
10272
10273 \begin_layout Proposition
10274 These are less major results which (hopefully) add to the general theory
10275  being discussed.
10276 \end_layout
10277
10278 \begin_layout Conjecture
10279 These are statements provided without justification, which the author does
10280  not know how to prove, but which seem to be true (to the author, at least).
10281 \end_layout
10282
10283 \begin_layout Definition*
10284 Guess what this is for.
10285  The font is different for this environment than for the previous ones.
10286  
10287 \end_layout
10288
10289 \begin_layout Example*
10290 Used for examples illustrating proven results.
10291 \end_layout
10292
10293 \begin_layout Problem
10294 It's not really known what this is for.
10295  You should figure it out.
10296 \end_layout
10297
10298 \begin_layout Exercise*
10299 Write a description for this one.
10300 \end_layout
10301
10302 \begin_layout Remark
10303 This environment is also a type of theorem, usually a lesser sort of observation.
10304 \end_layout
10305
10306 \begin_layout Claim*
10307 Often used in the course of giving a proof of a larger result.
10308 \end_layout
10309
10310 \begin_layout Case
10311 Generally, these are used to break up long arguments, using specific instances
10312  of some condition.
10313  
10314 \end_layout
10315
10316 \begin_layout Case
10317 The numbering scheme for cases is on its own, not together with other numbered
10318  statements.
10319  
10320 \end_layout
10321
10322 \begin_layout Proof
10323 At the end of this environment, a QED symbol (usually a square, but it can
10324  vary with different styles) is placed.
10325  If you want to have other environments within this one—for example, Case
10326  environments—and have the QED symbol appear only after them, then the other
10327  environments need to be nested within the proof environment.
10328  See the section 
10329 \emph on
10330 Nesting Environments
10331 \emph default
10332  of the 
10333 \emph on
10334 User's Guide
10335 \emph default
10336  for information on nesting.
10337 \end_layout
10338
10339 \begin_layout Standard
10340 And these environments are provided by 
10341 \begin_inset Flex Code
10342 status collapsed
10343
10344 \begin_layout Plain Layout
10345 Theorems (AMS-Extended)
10346 \end_layout
10347
10348 \end_inset
10349
10350 :
10351 \end_layout
10352
10353 \begin_layout Criterion*
10354 A required condition.
10355 \end_layout
10356
10357 \begin_layout Algorithm*
10358 A general procedure to be used.
10359 \end_layout
10360
10361 \begin_layout Axiom*
10362 This is a property or statement taken as true within the system being discussed.
10363 \end_layout
10364
10365 \begin_layout Condition*
10366 Sometimes used to state a condition assumed within the present context of
10367  discussion.
10368 \end_layout
10369
10370 \begin_layout Note*
10371 Similar to a Remark.
10372 \end_layout
10373
10374 \begin_layout Notation*
10375 Used for the explanation of, yes, notation.
10376 \end_layout
10377
10378 \begin_layout Summary
10379 Do we really need to tell you? 
10380 \end_layout
10381
10382 \begin_layout Acknowledgement*
10383 Acknowledgement.
10384 \end_layout
10385
10386 \begin_layout Conclusion*
10387 Sometimes used at the end of a long train of argument.
10388 \end_layout
10389
10390 \begin_layout Fact
10391 Used in a way similar to Proposition, though perhaps lower on the scale.
10392 \end_layout
10393
10394 \begin_layout Standard
10395 In addition, the AMS classes automatically provide the AMS \SpecialChar LaTeX
10396  and AMS fonts
10397  packages.
10398  They need to be available on your system in order to use these environments.
10399 \end_layout
10400
10401 \begin_layout Section
10402 AGU journals (
10403 \family sans
10404 aguplus
10405 \family default
10406 )
10407 \end_layout
10408
10409 \begin_layout Standard
10410 by 
10411 \shape smallcaps
10412 Martin Vermeer
10413 \end_layout
10414
10415 \begin_layout Subsection
10416 Description
10417 \end_layout
10418
10419 \begin_layout Standard
10420 These are the layout files for some of the journals of the American Geophysical
10421  Society.
10422  It is assumed that you have both the AGU's own class files and AGUplus
10423  installed (everything to be found at
10424 \begin_inset Flex URL
10425 status collapsed
10426
10427 \begin_layout Plain Layout
10428
10429 http://publications.agu.org/files/2013/08/AGU-LaTeX.zip
10430 \end_layout
10431
10432 \end_inset
10433
10434 ).
10435 \end_layout
10436
10437 \begin_layout Subsection
10438 New styles
10439 \end_layout
10440
10441 \begin_layout Standard
10442 Redefined are 
10443 \family sans
10444 Paragraph
10445 \family default
10446
10447 \family sans
10448 Paragraph*
10449 \family default
10450 .
10451  They are still called this in the \SpecialChar LyX
10452  GUI, though their \SpecialChar LaTeX
10453  equivalents in the
10454  AGU classes are 
10455 \family sans
10456 Subsubsubsection
10457 \family default
10458  and 
10459 \family sans
10460 Subsubsubsection*
10461 \family default
10462 .
10463 \end_layout
10464
10465 \begin_layout Standard
10466 Newly defined styles are 
10467 \family sans
10468 Left_Header
10469 \family default
10470
10471 \family sans
10472 Right_Header
10473 \family default
10474
10475 \family sans
10476 Received
10477 \family default
10478
10479 \family sans
10480 Revised
10481 \family default
10482
10483 \family sans
10484 Accepted
10485 \family default
10486
10487 \family sans
10488 CCC
10489 \family default
10490
10491 \family sans
10492 PaperId
10493 \family default
10494
10495 \family sans
10496 AuthorAddr
10497 \family default
10498
10499 \family sans
10500 SlugComment
10501 \family default
10502 .
10503  These are mostly manuscript attributes and defined in the AGU class documentati
10504 on.
10505 \end_layout
10506
10507 \begin_layout Standard
10508 I suspect this is still badly incomplete.
10509 \end_layout
10510
10511 \begin_layout Subsection
10512 New floats
10513 \end_layout
10514
10515 \begin_layout Standard
10516
10517 \family sans
10518 Planotable
10519 \family default
10520  and 
10521 \family sans
10522 Plate
10523 \family default
10524 .
10525  We also have a new 
10526 \family sans
10527 Table_Caption
10528 \family default
10529 .
10530 \end_layout
10531
10532 \begin_layout Subsection
10533 Supported journals
10534 \end_layout
10535
10536 \begin_layout Itemize
10537
10538 \emph on
10539 Journal of Geophysical Research
10540 \emph default
10541
10542 \family typewriter
10543 jgrga.layout
10544 \family default
10545  — Martin Vermeer
10546 \end_layout
10547
10548 \begin_layout Standard
10549 Add your own, it isn't so hard! Look at the 
10550 \family typewriter
10551 jgrga.layout
10552 \family default
10553  example and 
10554 \family typewriter
10555 aguplus.inc
10556 \family default
10557 .
10558 \end_layout
10559
10560 \begin_layout Subsection
10561 Bugs and things to remember
10562 \end_layout
10563
10564 \begin_layout Standard
10565 In order to use the new layouts, you must remember to do the following for
10566  a new document:
10567 \end_layout
10568
10569 \begin_layout Enumerate
10570
10571 \emph on
10572 Turn off babel
10573 \emph default
10574 .
10575  This can be done in the 
10576 \family sans
10577 Layout\SpecialChar menuseparator
10578 Document
10579 \family default
10580  or 
10581 \family sans
10582 Document\SpecialChar menuseparator
10583 Settings
10584 \family default
10585  menu item.
10586  (AGU articles are always in English, right? So 
10587 \emph on
10588 don't
10589 \emph default
10590  choose a language.)
10591 \end_layout
10592
10593 \begin_layout Enumerate
10594 Enter 
10595 \family typewriter
10596 jgrga
10597 \family default
10598  into the document's 
10599 \family sans
10600 Extra Options
10601 \family default
10602  field.
10603  (Yes, this is a bug.)
10604 \end_layout
10605
10606 \begin_layout Enumerate
10607 Make sure you use the 
10608 \family typewriter
10609 agu.bst
10610 \family default
10611  bibliography style, by entering 
10612 \family sans
10613 agu
10614 \family default
10615  into the second field of the Bib\SpecialChar TeX
10616  inset.
10617  None of the standard styles will do.
10618 \end_layout
10619
10620 \begin_layout Section
10621 Broadway
10622 \end_layout
10623
10624 \begin_layout Standard
10625 by 
10626 \shape smallcaps
10627 Garst Reese
10628 \end_layout
10629
10630 \begin_layout Subsection
10631 Introduction
10632 \end_layout
10633
10634 \begin_layout Standard
10635 Broadway is for writing plays.
10636  The format is more decorative than Hollywood, and much less standardized.
10637  This format should be suitable for workshops.
10638 \end_layout
10639
10640 \begin_layout Subsection
10641 Special problems
10642 \end_layout
10643
10644 \begin_layout Standard
10645 The same as in Hollywood.
10646 \end_layout
10647
10648 \begin_layout Subsection
10649 Special features
10650 \end_layout
10651
10652 \begin_layout Standard
10653 Insert the 
10654 \family sans
10655 Speaker
10656 \family default
10657  names as labels then cross-reference the label to insert the name.
10658  The cross-reference dialog will show the current cast of characters.
10659 \end_layout
10660
10661 \begin_layout Subsection
10662 Paper size and Margins
10663 \end_layout
10664
10665 \begin_layout Standard
10666 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
10667 \end_layout
10668
10669 \begin_layout Subsection
10670 Environments
10671 \end_layout
10672
10673 \begin_layout Standard
10674 The following environments are available.
10675  You can use broadway.bind to get the bind keys shown at the right.
10676 \end_layout
10677
10678 \begin_layout Itemize
10679
10680 \family sans
10681 Standard
10682 \begin_inset Newline newline
10683 \end_inset
10684
10685
10686 \family default
10687 You should not have to use this, but it is here for anything that does not
10688  fit otherwise.
10689 \end_layout
10690
10691 \begin_layout Itemize
10692
10693 \family sans
10694 Narrative
10695 \begin_inset space \hfill{}
10696 \end_inset
10697
10698 M-z n
10699 \begin_inset Newline newline
10700 \end_inset
10701
10702
10703 \family default
10704 Used to describe stage setting and the action.
10705  First use of speaker names in all CAPs.
10706 \end_layout
10707
10708 \begin_layout Itemize
10709
10710 \family sans
10711 ACT
10712 \begin_inset space \hfill{}
10713 \end_inset
10714
10715 M-z a
10716 \begin_inset Newline newline
10717 \end_inset
10718
10719
10720 \family default
10721 Automatically numbered.
10722  On screen it will be arabic, but will print as Roman.
10723 \end_layout
10724
10725 \begin_layout Itemize
10726
10727 \family sans
10728 ACT*
10729 \begin_inset space \hfill{}
10730 \end_inset
10731
10732 M-z S at
10733 \begin_inset Newline newline
10734 \end_inset
10735
10736
10737 \family default
10738 Subtitle for 
10739 \family sans
10740 ACT.
10741
10742 \family default
10743  It is just centered text.
10744 \end_layout
10745
10746 \begin_layout Itemize
10747
10748 \family sans
10749 SCENE
10750 \begin_inset space \hfill{}
10751 \end_inset
10752
10753 M-z S-S
10754 \begin_inset Newline newline
10755 \end_inset
10756
10757
10758 \family default
10759 Not automatically numbered.
10760  You supply the number.
10761  This is because I couldn't figure out how.
10762 \end_layout
10763
10764 \begin_layout Itemize
10765
10766 \family sans
10767 AT_RISE:
10768 \begin_inset space \hfill{}
10769 \end_inset
10770
10771 M-z S-R
10772 \begin_inset Newline newline
10773 \end_inset
10774
10775
10776 \family default
10777 A special case of Narrative to describe the setting and action as the curtain
10778  rises.
10779 \end_layout
10780
10781 \begin_layout Itemize
10782
10783 \family sans
10784 Speaker
10785 \begin_inset space \hfill{}
10786 \end_inset
10787
10788 M-z s
10789 \begin_inset Newline newline
10790 \end_inset
10791
10792
10793 \family default
10794 The speaker's (actor's) title, centered in all CAPS.
10795 \end_layout
10796
10797 \begin_layout Itemize
10798
10799 \family sans
10800 Parenthetical
10801 \begin_inset space \hfill{}
10802 \end_inset
10803
10804 M-z p
10805 \begin_inset Newline newline
10806 \end_inset
10807
10808
10809 \family default
10810 Instructions to the speaker.
10811  The parentheses are automatically inserted.
10812  The ( will appear on screen, but both will be in the printed play.
10813  This environment is only used within 
10814 \family sans
10815 Dialogue
10816 \family default
10817 .
10818 \end_layout
10819
10820 \begin_layout Itemize
10821
10822 \family sans
10823 Dialogue
10824 \begin_inset space \hfill{}
10825 \end_inset
10826
10827 M-z d
10828 \begin_inset Newline newline
10829 \end_inset
10830
10831
10832 \family default
10833 What the Speaker says.
10834 \end_layout
10835
10836 \begin_layout Itemize
10837
10838 \family sans
10839 CURTAIN
10840 \begin_inset space \hfill{}
10841 \end_inset
10842
10843 M-z S-C
10844 \begin_inset Newline newline
10845 \end_inset
10846
10847
10848 \family default
10849 The curtain comes down.
10850 \end_layout
10851
10852 \begin_layout Itemize
10853
10854 \family sans
10855 Title
10856 \begin_inset space \hfill{}
10857 \end_inset
10858
10859 M-z S-T
10860 \end_layout
10861
10862 \begin_layout Itemize
10863
10864 \family sans
10865 Author
10866 \begin_inset space \hfill{}
10867 \end_inset
10868
10869 M-z S-A
10870 \end_layout
10871
10872 \begin_layout Itemize
10873
10874 \family sans
10875 Right_Address
10876 \begin_inset space \hfill{}
10877 \end_inset
10878
10879 M-z r
10880 \end_layout
10881
10882 \begin_layout Standard
10883 Hello there.
10884 \end_layout
10885
10886 \begin_layout Section
10887 Dinbrief
10888 \end_layout
10889
10890 \begin_layout Standard
10891 The document class 
10892 \family sans
10893 dinbrief
10894 \family default
10895  can be used to type letters according to German conventions.
10896  A template file is included in 
10897 \family typewriter
10898 .../lyx/share/templates
10899 \family default
10900  for you to use as a starting point.
10901 \end_layout
10902
10903 \begin_layout Section
10904 EGS journals (
10905 \family sans
10906 egs
10907 \family default
10908 )
10909 \end_layout
10910
10911 \begin_layout Standard
10912 by 
10913 \shape smallcaps
10914 Martin Vermeer
10915 \end_layout
10916
10917 \begin_layout Subsection
10918 Description
10919 \end_layout
10920
10921 \begin_layout Standard
10922 This is the layout file for the European Geophysical Society journals.
10923  The needed 
10924 \family typewriter
10925 egs.cls
10926 \family default
10927  can be downloaded from the web site of the EGS under 
10928 \begin_inset Flex URL
10929 status collapsed
10930
10931 \begin_layout Plain Layout
10932
10933 www.copernicus.org
10934 \end_layout
10935
10936 \end_inset
10937
10938 .
10939 \end_layout
10940
10941 \begin_layout Subsection
10942 New styles
10943 \end_layout
10944
10945 \begin_layout Standard
10946
10947 \family sans
10948 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
10949  Accepted
10950 \family default
10951
10952 \family sans
10953 Offsets
10954 \family default
10955 .
10956  The current layout file is unfortunately very unmodular and would benefit
10957  from using the various 
10958 \family typewriter
10959 std*.inc
10960 \family default
10961  file inclusions.
10962 \end_layout
10963
10964 \begin_layout Section
10965 Elsevier Journals
10966 \end_layout
10967
10968 \begin_layout Standard
10969 See the \SpecialChar LyX
10970  template file 
10971 \family typewriter
10972 elsarticle.lyx
10973 \family default
10974 .
10975  It contains all infos you need.
10976 \end_layout
10977
10978 \begin_layout Section
10979 Foils [aka 
10980 \family sans
10981 Foil\SpecialChar TeX
10982
10983 \family default
10984 ]
10985 \begin_inset CommandInset label
10986 LatexCommand label
10987 name "sec:foiltex"
10988
10989 \end_inset
10990
10991
10992 \end_layout
10993
10994 \begin_layout Standard
10995 by 
10996 \noun on
10997 Allan Rae
10998 \end_layout
10999
11000 \begin_layout Subsection
11001 Introduction
11002 \end_layout
11003
11004 \begin_layout Standard
11005 This section describes how to use \SpecialChar LyX
11006  to make slides for overhead projectors.
11007  There are two document classes that can do this: the default slides class
11008  and the 
11009 \family sans
11010 Foil\SpecialChar TeX
11011
11012 \family default
11013  slides class.
11014  This section documents the latter.
11015 \end_layout
11016
11017 \begin_layout Standard
11018 I'm going to say this again, nice and clear, so that there's no misunderstanding
11019 :
11020 \end_layout
11021
11022 \begin_layout Standard
11023 \begin_inset VSpace bigskip
11024 \end_inset
11025
11026
11027 \end_layout
11028
11029 \begin_layout Standard
11030 \align center
11031
11032 \size large
11033 This section documents the class 
11034 \begin_inset Quotes eld
11035 \end_inset
11036
11037
11038 \family sans
11039 FoilTeX
11040 \family default
11041
11042 \begin_inset Quotes erd
11043 \end_inset
11044
11045  
11046 \emph on
11047 only.
11048 \end_layout
11049
11050 \begin_layout Standard
11051 \begin_inset VSpace bigskip
11052 \end_inset
11053
11054
11055 \end_layout
11056
11057 \begin_layout Standard
11058 If you're looking for the documentation for 
11059 \begin_inset Quotes eld
11060 \end_inset
11061
11062
11063 \family sans
11064 slides (default)
11065 \family default
11066
11067 \begin_inset Quotes erd
11068 \end_inset
11069
11070 , check out section
11071 \begin_inset space ~
11072 \end_inset
11073
11074
11075 \begin_inset CommandInset ref
11076 LatexCommand ref
11077 reference "sec:slitex"
11078
11079 \end_inset
11080
11081 .
11082  If your machine doesn't have the 
11083 \family sans
11084 foils
11085 \family default
11086  class 
11087 \family sans
11088 FoilTeX
11089 \family default
11090  installed, you'll probably have to use the default 
11091 \family sans
11092 slides
11093 \family default
11094  class, which isn't quite as good as 
11095 \family sans
11096 foils.
11097 \end_layout
11098
11099 \begin_layout Standard
11100 The 
11101 \family sans
11102 foils
11103 \family default
11104  class is designed for use with version
11105 \begin_inset space ~
11106 \end_inset
11107
11108 2.1 of the 
11109 \family sans
11110 foils.cls
11111 \family default
11112  \SpecialChar LaTeX
11113  class file which is now an integral part of \SpecialChar LaTeX2e
11114 .
11115 \end_layout
11116
11117 \begin_layout Subsection
11118 Getting Started
11119 \end_layout
11120
11121 \begin_layout Standard
11122 Obviously, to use this document class, you need to select 
11123 \family sans
11124 FoilTeX
11125 \family default
11126  from the 
11127 \family sans
11128 Class
11129 \family default
11130  entry in the 
11131 \family sans
11132 Document
11133 \begin_inset space ~
11134 \end_inset
11135
11136 Layout
11137 \family default
11138  dialog.
11139  There are some settings in the 
11140 \family sans
11141 Document
11142 \begin_inset space ~
11143 \end_inset
11144
11145 Layout
11146 \family default
11147  dialog that you should know about that are specific to this class:
11148 \end_layout
11149
11150 \begin_layout Itemize
11151 Don't change the options 
11152 \family sans
11153 Sides
11154 \family default
11155  and 
11156 \family sans
11157 Columns
11158 \family default
11159  on the 
11160 \family sans
11161 Document
11162 \begin_inset space ~
11163 \end_inset
11164
11165 Layout
11166 \family default
11167  dialog.
11168  They're ignored by the 
11169 \family sans
11170 foils
11171 \family default
11172  class.
11173 \end_layout
11174
11175 \begin_layout Itemize
11176 The default font size is 20
11177 \begin_inset space \thinspace{}
11178 \end_inset
11179
11180 pt with the other options being 17
11181 \begin_inset space \thinspace{}
11182 \end_inset
11183
11184 pt, 25
11185 \begin_inset space \thinspace{}
11186 \end_inset
11187
11188 pt and 30
11189 \begin_inset space \thinspace{}
11190 \end_inset
11191
11192 pt.
11193 \end_layout
11194
11195 \begin_layout Itemize
11196 The default font is 
11197 \family sans
11198 sans
11199 \family default
11200  
11201 \family sans
11202 serif
11203 \family default
11204  but all math equations are still typeset in the usual roman font.
11205 \end_layout
11206
11207 \begin_layout Itemize
11208
11209 \family sans
11210 Foil\SpecialChar TeX
11211
11212 \family default
11213  supports A4 and Letter paper sizes as well as a special size for working
11214  with 35
11215 \begin_inset space \thinspace{}
11216 \end_inset
11217
11218 mm slides.
11219  It doesn't support A5, B5, legal or executive paper sizes.
11220 \end_layout
11221
11222 \begin_layout Itemize
11223 Don't bother changing the 
11224 \family sans
11225 Float Placement
11226 \family default
11227  settings because they are ignored anyway.
11228  All floats appear where they are defined in the text.
11229 \end_layout
11230
11231 \begin_layout Itemize
11232 The 
11233 \family sans
11234 Pagestyle
11235 \family default
11236  setting behaves a bit differently for this class.
11237  
11238 \family sans
11239 Foil\SpecialChar TeX
11240
11241 \family default
11242  provides extensive footer and header capabilities including a user-defined
11243  logo.
11244  See section
11245 \begin_inset space ~
11246 \end_inset
11247
11248
11249 \begin_inset CommandInset ref
11250 LatexCommand ref
11251 reference "sec:foilfoot"
11252
11253 \end_inset
11254
11255  for more details.
11256  The title page is treated differently to all other pages in the document
11257  and is 
11258 \emph on
11259 always
11260 \emph default
11261  unnumbered and 
11262 \emph on
11263 always
11264 \emph default
11265  has the logo centered at the bottom of the page (if one is defined).
11266  The possible page style choices and what they do are as follows:
11267 \end_layout
11268
11269 \begin_deeper
11270 \begin_layout Labeling
11271 \labelwidthstring MMMMMMM
11272
11273 \family sans
11274 \series bold
11275 empty
11276 \family default
11277 \series default
11278  The final output contains no page numbers, or other headers or footers
11279  (except footnotes of course).
11280  
11281 \end_layout
11282
11283 \begin_layout Labeling
11284 \labelwidthstring MMMMMMM
11285
11286 \family sans
11287 \series bold
11288 plain
11289 \family default
11290 \series default
11291  The final output contains page numbers centered at the bottom of the page.
11292  No other headings or footers (other than footnotes).
11293 \end_layout
11294
11295 \begin_layout Labeling
11296 \labelwidthstring MMMMMMM
11297
11298 \series bold
11299 foilheadings
11300 \series default
11301  Page numbers in lower right corner.
11302  Additional headers and footers are also shown.
11303  This is also the default.
11304 \end_layout
11305
11306 \begin_layout Labeling
11307 \labelwidthstring MMMMMMM
11308
11309 \series bold
11310 fancy
11311 \series default
11312  Gives you access to the 
11313 \family sans
11314 fancyheadings
11315 \family default
11316  package although its use with 
11317 \family sans
11318 Foil\SpecialChar TeX
11319
11320 \family default
11321  is discouraged by the writer of the 
11322 \family sans
11323 Foil\SpecialChar TeX
11324
11325 \family default
11326  package because of some potential page layout clashes.
11327 \end_layout
11328
11329 \end_deeper
11330 \begin_layout Subsubsection
11331 Extra Options
11332 \end_layout
11333
11334 \begin_layout Standard
11335 The following options may be used in the extra class options in the 
11336 \family sans
11337 Document\SpecialChar menuseparator
11338 Settings
11339 \family default
11340  dialog.
11341 \end_layout
11342
11343 \begin_layout Labeling
11344 \labelwidthstring MMMMMMx
11345
11346 \series bold
11347 35mmSlide
11348 \series default
11349  This sets up the page layout for 7.33
11350 \begin_inset space \thinspace{}
11351 \end_inset
11352
11353 in by 11
11354 \begin_inset space \thinspace{}
11355 \end_inset
11356
11357 in paper, which is about the same aspect ratio as a 35
11358 \begin_inset space \thinspace{}
11359 \end_inset
11360
11361 mm slide, making it a bit easier to work with this medium.
11362 \end_layout
11363
11364 \begin_layout Labeling
11365 \labelwidthstring MMMMMMx
11366
11367 \series bold
11368 headrule
11369 \series default
11370  Places a rule across the page below the header on every page except the
11371  title page.
11372 \end_layout
11373
11374 \begin_layout Labeling
11375 \labelwidthstring MMMMMMx
11376
11377 \series bold
11378 footrule
11379 \series default
11380  Places a rule across the page above the footer on every page except the
11381  title page.
11382 \end_layout
11383
11384 \begin_layout Labeling
11385 \labelwidthstring MMMMMMx
11386
11387 \series bold
11388 dvips
11389 \series default
11390  This is automatically set each time you create a new 
11391 \family sans
11392 foils
11393 \family default
11394  document.
11395  This option tells 
11396 \family sans
11397 Foil\SpecialChar TeX
11398
11399 \family default
11400  to use the dvips driver to rotate those pages that are set as landscape
11401  foils.
11402 \end_layout
11403
11404 \begin_layout Labeling
11405 \labelwidthstring MMMMMMx
11406
11407 \series bold
11408 landscape
11409 \series default
11410  Simply changes the page dimensions to those of a landscape page but doesn't
11411  do any rotation.
11412  Thus if you use this option you need to use an external program to rotate
11413  each page or feed your paper through your printer as landscape.
11414  Note that this option effectively reverses the roles of the 
11415 \family sans
11416 Foilhead
11417 \family default
11418  and 
11419 \family sans
11420 Rotatefoilhead
11421 \family default
11422  environments (don't worry these are described in the next section).
11423 \end_layout
11424
11425 \begin_layout Labeling
11426 \labelwidthstring MMMMMMx
11427
11428 \series bold
11429 leqno
11430 \series default
11431  Equation numbers on the left.
11432 \end_layout
11433
11434 \begin_layout Labeling
11435 \labelwidthstring MMMMMMx
11436
11437 \series bold
11438 fleqn
11439 \series default
11440  Flush-left equations.
11441 \end_layout
11442
11443 \begin_layout Subsection
11444 Supported Environments
11445 \end_layout
11446
11447 \begin_layout Standard
11448 Most of the environments commonly supported in other classes are also supported
11449  by the 
11450 \family sans
11451 foils
11452 \family default
11453  class.
11454  There are several additional environments provided by 
11455 \family sans
11456 Foil\SpecialChar TeX
11457
11458 \family default
11459  as well as a couple added by \SpecialChar LyX
11460 .
11461  The following environments are shared with other classes:
11462 \end_layout
11463
11464 \begin_layout Standard
11465 \begin_inset Flex Multiple Columns
11466 status open
11467
11468 \begin_layout Itemize
11469
11470 \family sans
11471 Standard
11472 \end_layout
11473
11474 \begin_layout Itemize
11475
11476 \family sans
11477 Itemize
11478 \end_layout
11479
11480 \begin_layout Itemize
11481
11482 \family sans
11483 Enumerate
11484 \end_layout
11485
11486 \begin_layout Itemize
11487
11488 \family sans
11489 Description
11490 \end_layout
11491
11492 \begin_layout Itemize
11493
11494 \family sans
11495 List
11496 \end_layout
11497
11498 \begin_layout Itemize
11499
11500 \family sans
11501 \SpecialChar LyX
11502 -Code
11503 \end_layout
11504
11505 \begin_layout Itemize
11506
11507 \family sans
11508 Verse
11509 \end_layout
11510
11511 \begin_layout Itemize
11512
11513 \family sans
11514 Quote
11515 \end_layout
11516
11517 \begin_layout Itemize
11518
11519 \family sans
11520 Quotation
11521 \end_layout
11522
11523 \begin_layout Itemize
11524
11525 \family sans
11526 Title
11527 \end_layout
11528
11529 \begin_layout Itemize
11530
11531 \family sans
11532 Author
11533 \end_layout
11534
11535 \begin_layout Itemize
11536
11537 \family sans
11538 Date
11539 \end_layout
11540
11541 \begin_layout Itemize
11542
11543 \family sans
11544 Abstract
11545 \end_layout
11546
11547 \begin_layout Itemize
11548
11549 \family sans
11550 Bibliography
11551 \end_layout
11552
11553 \begin_layout Itemize
11554
11555 \family sans
11556 Address
11557 \end_layout
11558
11559 \begin_layout Itemize
11560
11561 \family sans
11562 RightAddress
11563 \end_layout
11564
11565 \begin_layout Itemize
11566
11567 \family sans
11568 Caption
11569 \end_layout
11570
11571 \begin_layout Itemize
11572
11573 \family sans
11574 Comment
11575 \end_layout
11576
11577 \end_inset
11578
11579
11580 \end_layout
11581
11582 \begin_layout Standard
11583 That is, all the major environments apart from the sectioning environments.
11584  Since foils are essentially self-contained sections, with a title and body,
11585  
11586 \family sans
11587 Foil\SpecialChar TeX
11588
11589 \family default
11590  provides specific commands for starting new foils and these are:
11591 \end_layout
11592
11593 \begin_layout Itemize
11594
11595 \family sans
11596 Foilhead
11597 \end_layout
11598
11599 \begin_layout Itemize
11600
11601 \family sans
11602 Rotatefoilhead
11603 \end_layout
11604
11605 \begin_layout Standard
11606 \SpecialChar LyX
11607  also provides slightly modified versions of these two environments called:
11608 \end_layout
11609
11610 \begin_layout Itemize
11611
11612 \family sans
11613 ShortFoilhead
11614 \end_layout
11615
11616 \begin_layout Itemize
11617
11618 \family sans
11619 ShortRotatefoilhead
11620 \end_layout
11621
11622 \begin_layout Standard
11623 and the differences will be explained in the next section.
11624 \end_layout
11625
11626 \begin_layout Standard
11627 Since foils are often used in presenting ideas or new theorems and such
11628  
11629 \family sans
11630 Foil\SpecialChar TeX
11631
11632 \family default
11633  also provides a comprehensive box of goodies for presenting them:
11634 \end_layout
11635
11636 \begin_layout Standard
11637 \begin_inset Flex Multiple Columns
11638 status open
11639
11640 \begin_layout Itemize
11641
11642 \family sans
11643 Theorem
11644 \end_layout
11645
11646 \begin_layout Itemize
11647
11648 \family sans
11649 Lemma
11650 \end_layout
11651
11652 \begin_layout Itemize
11653
11654 \family sans
11655 Corollary
11656 \end_layout
11657
11658 \begin_layout Itemize
11659
11660 \family sans
11661 Proposition
11662 \end_layout
11663
11664 \begin_layout Itemize
11665
11666 \family sans
11667 Definition
11668 \end_layout
11669
11670 \begin_layout Itemize
11671
11672 \family sans
11673 Proof
11674 \end_layout
11675
11676 \begin_layout Itemize
11677
11678 \family sans
11679 Theorem*
11680 \end_layout
11681
11682 \begin_layout Itemize
11683
11684 \family sans
11685 Lemma*
11686 \end_layout
11687
11688 \begin_layout Itemize
11689
11690 \family sans
11691 Corollary*
11692 \end_layout
11693
11694 \begin_layout Itemize
11695
11696 \family sans
11697 Proposition*
11698 \end_layout
11699
11700 \begin_layout Itemize
11701
11702 \family sans
11703 Definition*
11704 \end_layout
11705
11706 \end_inset
11707
11708
11709 \end_layout
11710
11711 \begin_layout Standard
11712 The starred versions are unnumbered while the unstarred versions are numbered.
11713  There are also two list environments added by \SpecialChar LyX
11714  and these are:
11715 \end_layout
11716
11717 \begin_layout Itemize
11718
11719 \family sans
11720 TickList
11721 \end_layout
11722
11723 \begin_layout Itemize
11724
11725 \family sans
11726 CrossList
11727 \end_layout
11728
11729 \begin_layout Standard
11730
11731 \family sans
11732 Foil\SpecialChar TeX
11733
11734 \family default
11735  provides some powerful header and footer capabilities that are best set
11736  in the preamble although they may be set at any point in a document.
11737  If you want to change these settings in your document the best place to
11738  do so is at the very top of a foil, i.
11739 \begin_inset space \thinspace{}
11740 \end_inset
11741
11742 e.
11743 \emph on
11744
11745 \begin_inset space \space{}
11746 \end_inset
11747
11748
11749 \emph default
11750 straight after the foilhead.
11751 \end_layout
11752
11753 \begin_layout Standard
11754 For this purpose, the following command styles are provided [
11755 \shape smallcaps
11756 Martin Vermeer
11757 \shape default
11758 ]:
11759 \end_layout
11760
11761 \begin_layout Standard
11762 \begin_inset Flex Multiple Columns
11763 status open
11764
11765 \begin_layout Itemize
11766
11767 \family sans
11768 My
11769 \begin_inset space ~
11770 \end_inset
11771
11772 Logo
11773 \end_layout
11774
11775 \begin_layout Itemize
11776
11777 \family sans
11778 Restriction
11779 \end_layout
11780
11781 \begin_layout Itemize
11782
11783 \family sans
11784 Right
11785 \begin_inset space ~
11786 \end_inset
11787
11788 Footer
11789 \end_layout
11790
11791 \begin_layout Itemize
11792
11793 \family sans
11794 Right
11795 \begin_inset space ~
11796 \end_inset
11797
11798 Header
11799 \end_layout
11800
11801 \begin_layout Itemize
11802
11803 \family sans
11804 Left
11805 \begin_inset space ~
11806 \end_inset
11807
11808 Header
11809 \end_layout
11810
11811 \begin_deeper
11812 \begin_layout Plain Layout
11813 \begin_inset space ~
11814 \end_inset
11815
11816
11817 \end_layout
11818
11819 \end_deeper
11820 \end_inset
11821
11822
11823 \end_layout
11824
11825 \begin_layout Standard
11826 There are also a few commands provided by 
11827 \family sans
11828 Foil\SpecialChar TeX
11829
11830 \family default
11831  that aren't directly supported by \SpecialChar LyX
11832  but I'll tell you what they do and how
11833  to use them in section
11834 \begin_inset space ~
11835 \end_inset
11836
11837
11838 \begin_inset CommandInset ref
11839 LatexCommand ref
11840 reference "sec:unsuppfoils"
11841
11842 \end_inset
11843
11844 .
11845 \end_layout
11846
11847 \begin_layout Subsection
11848 Building a Set of Foils
11849 \end_layout
11850
11851 \begin_layout Standard
11852 This section will give a simple introduction to using the different environments
11853  to build a set of foils.
11854  If you want to see an example set of foils, take a look at the 
11855 \family typewriter
11856 Foils.lyx
11857 \family default
11858  file you find in \SpecialChar LyX
11859 's 
11860 \family typewriter
11861 examples
11862 \family default
11863  folder.
11864 \end_layout
11865
11866 \begin_layout Subsubsection
11867 Give It a Title Page
11868 \end_layout
11869
11870 \begin_layout Standard
11871 Unlike other classes that provide 
11872 \family sans
11873 Title
11874 \family default
11875
11876 \family sans
11877 Author
11878 \family default
11879
11880 \family sans
11881 Date
11882 \family default
11883  and 
11884 \family sans
11885 Abstract
11886 \family default
11887  environments, 
11888 \family sans
11889 foils
11890 \family default
11891  creates the title on a page of its own.
11892  If you leave out the 
11893 \family sans
11894 Date
11895 \family default
11896  environment \SpecialChar LaTeX
11897  will substitute the current date (every time you regenerate
11898  the output).
11899 \end_layout
11900
11901 \begin_layout Subsubsection
11902 Start a New Foil
11903 \end_layout
11904
11905 \begin_layout Standard
11906 As I mentioned earlier, there are four ways of starting a new foil.
11907  For portrait foils you should use 
11908 \family sans
11909 Foilhead
11910 \family default
11911  or 
11912 \family sans
11913 ShortFoilhead.
11914
11915 \family default
11916  The difference between these two environments is the amount of space between
11917  the title of the foil (the foilhead) and the body of the foil.
11918 \end_layout
11919
11920 \begin_layout Standard
11921 Landscape foils are generated using the 
11922 \family sans
11923 Rotatefoilhead
11924 \family default
11925  and 
11926 \family sans
11927 ShortRotatefoilhead
11928 \family default
11929  environments.
11930  Again the only difference is the spacing between foilhead and body.
11931  Both of the short versions have 0.5
11932 \begin_inset space ~
11933 \end_inset
11934
11935 inches less separation between the foilhead and the body.
11936  
11937 \end_layout
11938
11939 \begin_layout Standard
11940 One problem with the support for landscape foils is the requirement that
11941  you have to use the 
11942 \family typewriter
11943 dvips
11944 \family default
11945  driver to generate the PostScript output otherwise the foils won't be rotated.
11946  It is possible to get landscape foils even if you haven't got the 
11947 \family typewriter
11948 dvips
11949 \family default
11950  driver provided you can feed your foils sideways through your printer ;-)
11951 \end_layout
11952
11953 \begin_layout Subsubsection
11954 Theorems, Lemmas, Proofs and more
11955 \end_layout
11956
11957 \begin_layout Standard
11958 Due to a small bug in \SpecialChar LyX
11959  you can't have two of the same type of these environments
11960  directly following each other.
11961  They must be separated by something.
11962  If you try, you will just be extending the previous environment as if you
11963  had merged the two environments together.
11964  So, how do you get around this problem? The simplest option is to insert
11965  some text between the two environments or add a 
11966 \family sans
11967 \SpecialChar LaTeX
11968
11969 \family default
11970  environment between the two with just a 
11971 \begin_inset Quotes eld
11972 \end_inset
11973
11974
11975 \family typewriter
11976 %
11977 \family default
11978
11979 \begin_inset Quotes erd
11980 \end_inset
11981
11982  in it.
11983  This will force \SpecialChar LyX
11984  to produce two separate environments and hence the correct
11985  \SpecialChar LaTeX
11986  output.
11987  An example is provided in the example file included with the \SpecialChar LyX
11988  distribution.
11989  Remember, this problem only occurs if you are trying to place two of the
11990  same type of theorem-like environments one directly after the other.
11991 \end_layout
11992
11993 \begin_layout Subsubsection
11994 Lists
11995 \end_layout
11996
11997 \begin_layout Standard
11998 You get all the commonly supported list styles found in other classes as
11999  well as two new ones.
12000  I'll only describe the new ones here.
12001  If you want to find out more about the other list environments check out
12002  the 
12003 \emph on
12004 User's Guide.
12005
12006 \emph default
12007  If you intend to use itemized lists you might also want to read about the
12008  
12009 \family sans
12010 Itemize
12011 \begin_inset space ~
12012 \end_inset
12013
12014 Bullet
12015 \begin_inset space ~
12016 \end_inset
12017
12018 Selection
12019 \family default
12020  dialog described above in section
12021 \begin_inset space ~
12022 \end_inset
12023
12024
12025 \begin_inset CommandInset ref
12026 LatexCommand ref
12027 reference "sec:bullet"
12028
12029 \end_inset
12030
12031 .
12032 \end_layout
12033
12034 \begin_layout Standard
12035 The two new list styles, 
12036 \family sans
12037 TickList
12038 \family default
12039  and 
12040 \family sans
12041 CrossList
12042 \family default
12043 , are designed to make it easier for you to create lists of do's and don'ts
12044  or right and wrong by providing dedicated environments that use a tick
12045  or a cross as the label of the list.
12046  These lists are in fact dedicated variants of the 
12047 \family sans
12048 Itemize
12049 \family default
12050  environment.
12051  They do however require that you have the 
12052 \family typewriter
12053 psnfss
12054 \family default
12055  packages installed.
12056 \end_layout
12057
12058 \begin_layout Subsubsection
12059 Figures and Tables
12060 \end_layout
12061
12062 \begin_layout Standard
12063
12064 \family sans
12065 Foil\SpecialChar TeX
12066
12067 \family default
12068  redefines the floating tables and figures so that they appear exactly where
12069  they are in the text rather than pushing them to the top of the page or
12070  to some user specified location.
12071  In fact if you change the float placement settings they are simply ignored.
12072 \end_layout
12073
12074 \begin_layout Subsubsection
12075 Page Headers and Footers
12076 \begin_inset CommandInset label
12077 LatexCommand label
12078 name "sec:foilfoot"
12079
12080 \end_inset
12081
12082
12083 \end_layout
12084
12085 \begin_layout Standard
12086
12087 \family sans
12088 My
12089 \begin_inset space ~
12090 \end_inset
12091
12092 Logo
12093 \family default
12094  and 
12095 \family sans
12096 Restriction
12097 \family default
12098  are two commands used to control the left-footer text string.
12099  The first is meant to allow you to include a graphic logo on your foils
12100  and defaults to 
12101 \begin_inset Quotes eld
12102 \end_inset
12103
12104 -Typeset by 
12105 \family sans
12106 Foil\SpecialChar TeX
12107
12108 \family default
12109 -
12110 \begin_inset Quotes erd
12111 \end_inset
12112
12113 .
12114  While the second is meant to provide a classification for the audience,
12115  
12116 \emph on
12117 e.
12118 \begin_inset space \thinspace{}
12119 \end_inset
12120
12121 g.
12122 \emph default
12123
12124 \begin_inset space \space{}
12125 \end_inset
12126
12127 Confidential.
12128  It is empty by default.
12129 \end_layout
12130
12131 \begin_layout Standard
12132 The remaining page corners can be filled by 
12133 \family sans
12134 Right
12135 \begin_inset space ~
12136 \end_inset
12137
12138 Footer
12139 \family default
12140  (which defaults to page numbers), 
12141 \family sans
12142 Right
12143 \begin_inset space ~
12144 \end_inset
12145
12146 Header
12147 \family default
12148  (top right) and 
12149 \family sans
12150 Left
12151 \begin_inset space ~
12152 \end_inset
12153
12154 Header
12155 \family default
12156  (top left).
12157 \end_layout
12158
12159 \begin_layout Subsection
12160 Unsupported 
12161 \family sans
12162 Foil\SpecialChar TeX
12163
12164 \family default
12165  Goodies
12166 \begin_inset CommandInset label
12167 LatexCommand label
12168 name "sec:unsuppfoils"
12169
12170 \end_inset
12171
12172
12173 \end_layout
12174
12175 \begin_layout Standard
12176 All the commands mentioned below need to be set in a 
12177 \family sans
12178 \SpecialChar LaTeX
12179
12180 \family default
12181  environment or as 
12182 \family sans
12183 \SpecialChar TeX
12184
12185 \family default
12186  within another environment.
12187 \end_layout
12188
12189 \begin_layout Subsubsection
12190 Lengths
12191 \end_layout
12192
12193 \begin_layout Standard
12194 All lengths are adjusted using the 
12195 \family typewriter
12196
12197 \backslash
12198 setlength{
12199 \family default
12200 \emph on
12201 lengthname
12202 \family typewriter
12203 \emph default
12204 }{
12205 \family default
12206 \emph on
12207 newlength
12208 \family typewriter
12209 \emph default
12210 }
12211 \family default
12212  command.
12213  Where 
12214 \emph on
12215 lengthname
12216 \emph default
12217  should be replaced by the name given to the length you want to change and
12218  
12219 \emph on
12220 newlength
12221 \emph default
12222  is the length value.
12223  All lengths should be specified in units of length such as inches (
12224 \family typewriter
12225 in
12226 \family default
12227 ), millimeters (
12228 \family typewriter
12229 mm
12230 \family default
12231 ) or points (
12232 \family typewriter
12233 pt
12234 \family default
12235 ) or relative to some document or font-based length such as 
12236 \family typewriter
12237
12238 \backslash
12239 textwidth
12240 \family default
12241 .
12242  
12243 \end_layout
12244
12245 \begin_layout Standard
12246 It's possible to change the spacing between a foilhead and the body of the
12247  foil by adjusting the length specified by 
12248 \family typewriter
12249
12250 \backslash
12251 foilheadskip
12252 \family default
12253 .
12254  For example, to make 
12255 \emph on
12256 all
12257 \emph default
12258  foilheads 0.5
12259 \begin_inset space \space{}
12260 \end_inset
12261
12262 in closer to their bodies put the following in the preamble: 
12263 \family typewriter
12264
12265 \backslash
12266 setlength{
12267 \backslash
12268 foilheadskip}{-0.5in}
12269 \end_layout
12270
12271 \begin_layout Standard
12272 The spacings around floats can be adjusted by setting these lengths:
12273 \end_layout
12274
12275 \begin_layout Labeling
12276 \labelwidthstring MMMMMMMMMMM
12277
12278 \family typewriter
12279
12280 \backslash
12281 abovefloatskip
12282 \family default
12283  Separation between the text and the top of the float
12284 \end_layout
12285
12286 \begin_layout Labeling
12287 \labelwidthstring MMMMMMMMMMM
12288
12289 \family typewriter
12290
12291 \backslash
12292 abovecaptionskip
12293 \family default
12294  Separation between the float and the caption
12295 \end_layout
12296
12297 \begin_layout Labeling
12298 \labelwidthstring MMMMMMMMMMM
12299
12300 \family typewriter
12301
12302 \backslash
12303 belowcaptionskip
12304 \family default
12305  Separation between the caption and the following text
12306 \end_layout
12307
12308 \begin_layout Labeling
12309 \labelwidthstring MMMMMMMMMMM
12310
12311 \family typewriter
12312
12313 \backslash
12314 captionwidth
12315 \family default
12316  You can make the captions narrower than the surrounding text by adjusting
12317  this length.
12318  Best done relative to 
12319 \family typewriter
12320
12321 \backslash
12322 textwidth
12323 \family default
12324 .
12325 \end_layout
12326
12327 \begin_layout Standard
12328 There are also several title page related lengths that you may find useful
12329  if you have a long title or several authors:
12330 \end_layout
12331
12332 \begin_layout Labeling
12333 \labelwidthstring MMMMMMMMMMM
12334
12335 \family typewriter
12336
12337 \backslash
12338 abovetitleskip
12339 \family default
12340  Separation from headers to 
12341 \family sans
12342 Title
12343 \end_layout
12344
12345 \begin_layout Labeling
12346 \labelwidthstring MMMMMMMMMMM
12347
12348 \family typewriter
12349
12350 \backslash
12351 titleauthorskip
12352 \family default
12353  between 
12354 \family sans
12355 Title
12356 \family default
12357  and 
12358 \family sans
12359 Author
12360 \family default
12361  environments
12362 \end_layout
12363
12364 \begin_layout Labeling
12365 \labelwidthstring MMMMMMMMMMM
12366
12367 \family typewriter
12368
12369 \backslash
12370 authorauthorskip
12371 \family default
12372  between multiple 
12373 \family sans
12374 Author
12375 \family default
12376  lines
12377 \end_layout
12378
12379 \begin_layout Labeling
12380 \labelwidthstring MMMMMMMMMMM
12381
12382 \family typewriter
12383
12384 \backslash
12385 authordateskip
12386 \family default
12387  between the 
12388 \family sans
12389 Author
12390 \family default
12391  and the 
12392 \family sans
12393 Date
12394 \end_layout
12395
12396 \begin_layout Labeling
12397 \labelwidthstring MMMMMMMMMMM
12398
12399 \family typewriter
12400
12401 \backslash
12402 dateabstractskip
12403 \family default
12404  between the 
12405 \family sans
12406 Date
12407 \family default
12408  and the 
12409 \family sans
12410 Abstract
12411 \end_layout
12412
12413 \begin_layout Standard
12414 The last length related command affects all the list environments.
12415  If you place 
12416 \family typewriter
12417
12418 \backslash
12419 zerolistvertdimens
12420 \family default
12421  
12422 \emph on
12423 inside
12424 \emph default
12425  a list environment then all the vertical spacing between the list items
12426  is removed.
12427  Note that this is a command not a length so it doesn't require 
12428 \family typewriter
12429
12430 \backslash
12431 setlength
12432 \family default
12433  like the stuff mentioned above.
12434 \end_layout
12435
12436 \begin_layout Subsubsection
12437 Headers and Footers
12438 \end_layout
12439
12440 \begin_layout Standard
12441 The 
12442 \family typewriter
12443
12444 \backslash
12445 LogoOn
12446 \family default
12447  and 
12448 \family typewriter
12449
12450 \backslash
12451 LogoOff
12452 \family default
12453  commands control whether the logo in the 
12454 \family sans
12455 MyLogo
12456 \family default
12457  definition appear on a given page.
12458  If you put 
12459 \family typewriter
12460
12461 \backslash
12462 LogoOff
12463 \family default
12464  in the preamble then none of the foils will have the logo on them.
12465  If you don't want the logo on a particular page place the 
12466 \family typewriter
12467
12468 \backslash
12469 LogoOff
12470 \family default
12471  directly after the foilhead of that page and the 
12472 \family typewriter
12473
12474 \backslash
12475 LogoOn
12476 \family default
12477  directly after the next foilhead.
12478 \end_layout
12479
12480 \begin_layout Standard
12481 If you decide to use the 
12482 \family sans
12483 fancy
12484 \family default
12485  page style setting in the 
12486 \family sans
12487 Document
12488 \begin_inset space ~
12489 \end_inset
12490
12491 Layout
12492 \family default
12493  dialog you should probably add 
12494 \family typewriter
12495
12496 \backslash
12497 let
12498 \backslash
12499 headwidth
12500 \backslash
12501 textwidth
12502 \family default
12503  to your preamble so headers and footers on landscape pages are correctly
12504  placed when rotated.
12505  This is due to some clashes between the page layouts provided by the 
12506 \family sans
12507 fancyheadings
12508 \family default
12509  package and the 
12510 \family sans
12511 foils
12512 \family default
12513  class.
12514 \end_layout
12515
12516 \begin_layout Section
12517 Hollywood (Hollywood spec scripts)
12518 \end_layout
12519
12520 \begin_layout Standard
12521 by 
12522 \shape smallcaps
12523 Garst Reese
12524 \end_layout
12525
12526 \begin_layout Subsection
12527 Introduction
12528 \end_layout
12529
12530 \begin_layout Standard
12531 Getting the format of a Hollywood script right is a 
12532 \begin_inset Quotes eld
12533 \end_inset
12534
12535 rite of passage.
12536 \begin_inset Quotes erd
12537 \end_inset
12538
12539  It is designed to make the readers focus on content and to be easy and
12540  familiar for the actors to read.
12541  Each page of a script should be one minute of film.
12542  Nothing goes in a script that you cannot see or hear on screen.
12543  The courier 12 pt font should be used throughout.
12544  No italics.
12545 \end_layout
12546
12547 \begin_layout Subsection
12548 Special problems
12549 \end_layout
12550
12551 \begin_layout Standard
12552 Speakers' lines should NEVER break in mid-sentence.
12553  If a speaker's lines continue over a page break, repeat the 
12554 \family sans
12555 Speaker
12556 \family default
12557  title followed by (Cont'd).
12558 \end_layout
12559
12560 \begin_layout Subsection
12561 Special features
12562 \end_layout
12563
12564 \begin_layout Standard
12565 Insert the 
12566 \family sans
12567 Speaker
12568 \family default
12569  names as labels then cross-reference the label to insert the name.
12570  The cross-reference dialog will show the current cast of characters.
12571  You can use this to insert the speaker name in narratives also.
12572 \end_layout
12573
12574 \begin_layout Subsection
12575 Paper size and Margins
12576 \end_layout
12577
12578 \begin_layout Standard
12579 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
12580 \end_layout
12581
12582 \begin_layout Subsection
12583 Environments
12584 \end_layout
12585
12586 \begin_layout Standard
12587 The following environments are available.
12588  You can use hollywood.bind to get the bind keys shown at the right.
12589 \end_layout
12590
12591 \begin_layout Itemize
12592
12593 \family sans
12594 Standard
12595 \begin_inset Newline newline
12596 \end_inset
12597
12598
12599 \family default
12600 Used where nothing else works.
12601  Try to avoid it.
12602 \end_layout
12603
12604 \begin_layout Itemize
12605
12606 \family sans
12607 FADE_IN
12608 \family default
12609 :
12610 \begin_inset space \hfill{}
12611 \end_inset
12612
12613
12614 \family sans
12615 M-z S-I
12616 \family default
12617
12618 \begin_inset Newline newline
12619 \end_inset
12620
12621 Usually followed by something like 
12622 \begin_inset Quotes eld
12623 \end_inset
12624
12625 on Sally waking up.
12626 \begin_inset Quotes erd
12627 \end_inset
12628
12629
12630 \end_layout
12631
12632 \begin_layout Itemize
12633
12634 \family sans
12635 INT:
12636 \begin_inset space \hfill{}
12637 \end_inset
12638
12639 M-z i
12640 \begin_inset Newline newline
12641 \end_inset
12642
12643
12644 \family default
12645 Introduces a new INTERIOR camera set-up.
12646  Always followed by DAY or NIGHT, or something similar to define the lighting
12647  required.
12648  Everthing on this line in CAPS.
12649 \end_layout
12650
12651 \begin_layout Itemize
12652
12653 \family sans
12654 EXT:
12655 \begin_inset space \hfill{}
12656 \end_inset
12657
12658 M-z e
12659 \begin_inset Newline newline
12660 \end_inset
12661
12662
12663 \family default
12664 Introduces a new EXTERIOR camera set-up.
12665  Everthing on this line in CAPS.
12666 \end_layout
12667
12668 \begin_layout Itemize
12669
12670 \family sans
12671 Speaker
12672 \begin_inset space \hfill{}
12673 \end_inset
12674
12675 M-z s
12676 \begin_inset Newline newline
12677 \end_inset
12678
12679
12680 \family default
12681 The character speaking.
12682 \end_layout
12683
12684 \begin_layout Itemize
12685
12686 \family sans
12687 Parenthetical
12688 \begin_inset space \hfill{}
12689 \end_inset
12690
12691 M-z p
12692 \begin_inset Newline newline
12693 \end_inset
12694
12695
12696 \family default
12697 Instructions to the speaker.
12698  The () are automatically inserted, but only the ( will show in \SpecialChar LyX
12699 .
12700  Both will be printed.
12701 \end_layout
12702
12703 \begin_layout Itemize
12704
12705 \family sans
12706 Dialogue
12707 \begin_inset space \hfill{}
12708 \end_inset
12709
12710 M-z d
12711 \begin_inset Newline newline
12712 \end_inset
12713
12714
12715 \family default
12716 What the 
12717 \family sans
12718 Speaker
12719 \family default
12720  says.
12721 \end_layout
12722
12723 \begin_layout Itemize
12724
12725 \family sans
12726 Transition
12727 \begin_inset space \hfill{}
12728 \end_inset
12729
12730 M-z t
12731 \begin_inset Newline newline
12732 \end_inset
12733
12734
12735 \family default
12736 Camera movement instruction.
12737  e.
12738 \begin_inset space \thinspace{}
12739 \end_inset
12740
12741 g.
12742 \begin_inset space \space{}
12743 \end_inset
12744
12745 CUT TO:
12746 \end_layout
12747
12748 \begin_layout Itemize
12749
12750 \family sans
12751 FADE OUT:
12752 \begin_inset space \hfill{}
12753 \end_inset
12754
12755 M-z S-I
12756 \end_layout
12757
12758 \begin_layout Itemize
12759
12760 \family sans
12761 Author
12762 \begin_inset space \hfill{}
12763 \end_inset
12764
12765 M-z S-A
12766 \end_layout
12767
12768 \begin_layout Itemize
12769
12770 \family sans
12771 Title
12772 \begin_inset space \hfill{}
12773 \end_inset
12774
12775 M-z S-T
12776 \end_layout
12777
12778 \begin_layout Itemize
12779
12780 \family sans
12781 Right_Address
12782 \begin_inset space \hfill{}
12783 \end_inset
12784
12785 M-z r
12786 \end_layout
12787
12788 \begin_layout Subsection
12789 Script jargon
12790 \end_layout
12791
12792 \begin_layout Itemize
12793 (O.S) — off screen
12794 \end_layout
12795
12796 \begin_layout Itemize
12797 (V.0) — voice over
12798 \end_layout
12799
12800 \begin_layout Itemize
12801 b.
12802 \begin_inset space \thinspace{}
12803 \end_inset
12804
12805 g.
12806  — background
12807 \end_layout
12808
12809 \begin_layout Itemize
12810 C.U.
12811  — close-up
12812 \end_layout
12813
12814 \begin_layout Itemize
12815 PAN — camera movement
12816 \end_layout
12817
12818 \begin_layout Itemize
12819 INSERT — cut to close-up of
12820 \end_layout
12821
12822 \begin_layout Section
12823 ijmpc and ijmpd
12824 \end_layout
12825
12826 \begin_layout Standard
12827 by 
12828 \noun on
12829 Panayotis Papasotiriou
12830 \end_layout
12831
12832 \begin_layout Subsection
12833 Overview
12834 \end_layout
12835
12836 \begin_layout Standard
12837 The ijmpc package is a set of macros that facilitates electronic manuscript
12838  submission to the 
12839 \emph on
12840 International Journal of Modern Physics C
12841 \emph default
12842 .
12843  Similarly, the ijmpd package is for creating manuscripts to be submitted
12844  to the 
12845 \emph on
12846 International Journal of Modern Physics D
12847 \emph default
12848 .
12849  Both journals are published by World Scientific.
12850  The corresponding document classes are named 
12851 \family typewriter
12852 ws-ijmpc.cls
12853 \family default
12854  and 
12855 \family typewriter
12856 ws-ijmpd.cls
12857 \family default
12858 , respectively.
12859  These files, together with instructions for the authors, can be downloaded
12860  from the sites 
12861 \begin_inset Flex URL
12862 status collapsed
12863
12864 \begin_layout Plain Layout
12865
12866 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
12867 \end_layout
12868
12869 \end_inset
12870
12871  and 
12872 \begin_inset Flex URL
12873 status collapsed
12874
12875 \begin_layout Plain Layout
12876
12877 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
12878 \end_layout
12879
12880 \end_inset
12881
12882 .
12883  Both packages are modified versions of the standard 
12884 \begin_inset Quotes eld
12885 \end_inset
12886
12887 article
12888 \begin_inset Quotes erd
12889 \end_inset
12890
12891  package, and they are almost (but not exactly) identical.
12892  Most of their features are supported by \SpecialChar LyX
12893 .
12894  I have used \SpecialChar LyX
12895  successfully to write articles submitted to both journals
12896  without any problem.
12897 \end_layout
12898
12899 \begin_layout Subsection
12900 Writing a paper
12901 \end_layout
12902
12903 \begin_layout Standard
12904 As usual, the easiest way to write a paper is to start with a template.
12905  Click on 
12906 \family sans
12907 File\SpecialChar menuseparator
12908 New from
12909 \family default
12910  
12911 \family sans
12912 Template
12913 \family default
12914 , then choose the 
12915 \family typewriter
12916 ijmpc.lyx
12917 \family default
12918  or 
12919 \family typewriter
12920 ijmpd.lyx
12921 \family default
12922  template.
12923  This will give an (almost) empty document that includes the most common
12924  fields found in a manuscript.
12925  Simply overwrite the existing text (including the brackets, 
12926 \family typewriter
12927 <>
12928 \family default
12929 ) with your text.
12930  You should keep in mind the following remarks.
12931 \end_layout
12932
12933 \begin_layout Enumerate
12934 \SpecialChar LyX
12935  won't let you change the font size and the page style of the document,
12936  because such modifications are not allowed by both packages.
12937 \end_layout
12938
12939 \begin_layout Enumerate
12940 The language of the document should not be changed.
12941  Before previewing your paper, be sure that the babel package is not used.
12942  To do this, click on 
12943 \family sans
12944 Tools\SpecialChar menuseparator
12945 Preferences
12946 \family default
12947 , select the 
12948 \family sans
12949 Lang Opts
12950 \family default
12951  tab, deselect the 
12952 \family sans
12953 Use babel
12954 \family default
12955  checkbox in the language settings, and click on 
12956 \family sans
12957 Apply
12958 \family default
12959  (or 
12960 \family sans
12961 Save
12962 \family default
12963 , if you wish to make this change permanent).
12964 \end_layout
12965
12966 \begin_layout Enumerate
12967 The 
12968 \begin_inset Quotes eld
12969 \end_inset
12970
12971 Keywords
12972 \begin_inset Quotes erd
12973 \end_inset
12974
12975  style must be used to define keywords.
12976 \end_layout
12977
12978 \begin_layout Enumerate
12979 The ijmpc package provides a style named 
12980 \begin_inset Quotes eld
12981 \end_inset
12982
12983 Classification Codes
12984 \begin_inset Quotes erd
12985 \end_inset
12986
12987 , which can be used to define classification codes, such as PACS numbers.
12988  Note that this facility is not supported by the ijmpd package.
12989 \end_layout
12990
12991 \begin_layout Enumerate
12992 Several new environments are available: 
12993 \begin_inset Quotes eld
12994 \end_inset
12995
12996 Definition
12997 \begin_inset Quotes erd
12998 \end_inset
12999
13000
13001 \begin_inset Quotes eld
13002 \end_inset
13003
13004 Step
13005 \begin_inset Quotes erd
13006 \end_inset
13007
13008
13009 \begin_inset Quotes eld
13010 \end_inset
13011
13012 Example
13013 \begin_inset Quotes erd
13014 \end_inset
13015
13016
13017 \begin_inset Quotes eld
13018 \end_inset
13019
13020 Remark
13021 \begin_inset Quotes erd
13022 \end_inset
13023
13024
13025 \begin_inset Quotes eld
13026 \end_inset
13027
13028 Notation
13029 \begin_inset Quotes erd
13030 \end_inset
13031
13032
13033 \begin_inset Quotes eld
13034 \end_inset
13035
13036 Theorem
13037 \begin_inset Quotes erd
13038 \end_inset
13039
13040
13041 \begin_inset Quotes eld
13042 \end_inset
13043
13044 Proof
13045 \begin_inset Quotes erd
13046 \end_inset
13047
13048
13049 \begin_inset Quotes eld
13050 \end_inset
13051
13052 Corollary
13053 \begin_inset Quotes erd
13054 \end_inset
13055
13056
13057 \begin_inset Quotes eld
13058 \end_inset
13059
13060 Lemma
13061 \begin_inset Quotes erd
13062 \end_inset
13063
13064
13065 \begin_inset Quotes eld
13066 \end_inset
13067
13068 Proposition
13069 \begin_inset Quotes erd
13070 \end_inset
13071
13072
13073 \begin_inset Quotes eld
13074 \end_inset
13075
13076 Prop
13077 \begin_inset Quotes erd
13078 \end_inset
13079
13080
13081 \begin_inset Quotes eld
13082 \end_inset
13083
13084 Question
13085 \begin_inset Quotes erd
13086 \end_inset
13087
13088
13089 \begin_inset Quotes eld
13090 \end_inset
13091
13092 Claim
13093 \begin_inset Quotes erd
13094 \end_inset
13095
13096 , and 
13097 \begin_inset Quotes eld
13098 \end_inset
13099
13100 Conjecture
13101 \begin_inset Quotes erd
13102 \end_inset
13103
13104 .
13105  Their use is more or less obvious.
13106  \SpecialChar LyX
13107  supports all these environments; it will use the proper label, text style,
13108  and numbering scheme for each of them.
13109 \end_layout
13110
13111 \begin_layout Enumerate
13112 Both packages use basic citations; the natbib package should not be used.
13113  In \SpecialChar LyX
13114 , citation references are shown as usual; in the output, citations are
13115  shown as superscripts.
13116  If you want to use a citation as normal text, you should use the 
13117 \family typewriter
13118 refcite
13119 \family default
13120  command, e.
13121 \begin_inset space \thinspace{}
13122 \end_inset
13123
13124 g.
13125 \begin_inset space \space{}
13126 \end_inset
13127
13128
13129 \begin_inset Quotes eld
13130 \end_inset
13131
13132 See Ref.
13133 \begin_inset space \space{}
13134 \end_inset
13135
13136
13137 \family typewriter
13138
13139 \backslash
13140 refcite{key}
13141 \family default
13142
13143 \begin_inset Quotes erd
13144 \end_inset
13145
13146 .
13147 \end_layout
13148
13149 \begin_layout Enumerate
13150 There is no 
13151 \begin_inset Quotes eld
13152 \end_inset
13153
13154 Acknowledgments
13155 \begin_inset Quotes erd
13156 \end_inset
13157
13158  section in both packages.
13159  To put acknowledgments, just use the 
13160 \begin_inset Quotes eld
13161 \end_inset
13162
13163 Section*
13164 \begin_inset Quotes erd
13165 \end_inset
13166
13167  environment.
13168 \end_layout
13169
13170 \begin_layout Enumerate
13171 Appendices may be added to the paper, 
13172 \emph on
13173 after
13174 \emph default
13175  the Acknowledgments and 
13176 \shape italic
13177 before
13178 \shape default
13179  the References.
13180  \SpecialChar LyX
13181  provides a special environment, called 
13182 \begin_inset Quotes eld
13183 \end_inset
13184
13185 Appendices Section
13186 \begin_inset Quotes erd
13187 \end_inset
13188
13189  which marks the beginning of the appendices.
13190  This environment should be left blank; it just sends a \SpecialChar LaTeX
13191  command, but nothing
13192  is really printed.
13193  In \SpecialChar LyX
13194 , the word 
13195 \begin_inset Quotes eld
13196 \end_inset
13197
13198 Appendix
13199 \begin_inset Quotes erd
13200 \end_inset
13201
13202  is printed with blue letters, as a signal that all sections after that
13203  point are appendices.
13204  To write an appendix, use the 
13205 \begin_inset Quotes eld
13206 \end_inset
13207
13208 Appendix
13209 \begin_inset Quotes erd
13210 \end_inset
13211
13212  environment.
13213  \SpecialChar LyX
13214  will number each appendix with capital letters, as required by both journals.
13215  Note that 
13216 \begin_inset Quotes eld
13217 \end_inset
13218
13219 Appendices Section
13220 \begin_inset Quotes erd
13221 \end_inset
13222
13223  
13224 \emph on
13225 must
13226 \emph default
13227  be present before the first appendix; if not, all appendices will be numbered
13228  as normal sections in the output.
13229 \end_layout
13230
13231 \begin_layout Enumerate
13232 The ijmpc and the ijmpd packages use the 
13233 \family typewriter
13234 tbl
13235 \family default
13236  command to implement table captions.
13237  As a result, a table created by \SpecialChar LyX
13238  is printed correctly, but its caption
13239  is ignored.
13240  However, you can use some \SpecialChar TeX
13241  code to overcome this problem, so that captions
13242  are printed as expected.
13243  To do so, create a float table as usual, remove the caption, and replace
13244  it with the \SpecialChar TeX
13245  code 
13246 \family typewriter
13247
13248 \backslash
13249 tbl{
13250 \emph on
13251 your table caption
13252 \emph default
13253 }{
13254 \family default
13255  (sic); you must also the \SpecialChar TeX
13256  code 
13257 \family typewriter
13258 }
13259 \family default
13260  immediately after the tabular material.
13261  Study the example table included in the template files to see how this
13262  trick is implemented.
13263  Alternatively, If you need table captions, you should implement the whole
13264  table float in a 
13265 \family typewriter
13266 .tex
13267 \family default
13268  file, then include this file to the \SpecialChar LyX
13269  document (
13270 \family sans
13271 Insert\SpecialChar menuseparator
13272 File\SpecialChar menuseparator
13273 Child
13274 \begin_inset space ~
13275 \end_inset
13276
13277 Document
13278 \family default
13279 ).
13280  Details on how to create a table float can be found in the files 
13281 \family typewriter
13282 ws-ijmpc.tex
13283 \family default
13284  and 
13285 \family typewriter
13286 ws-ijmpd.tex
13287 \family default
13288 , included in the corresponding packages.
13289 \end_layout
13290
13291 \begin_layout Subsection
13292 Preparing a paper for submission
13293 \end_layout
13294
13295 \begin_layout Standard
13296 Before you submit your paper you must export the \SpecialChar LyX
13297  document as a \SpecialChar LaTeX
13298  file (
13299 \family sans
13300 File\SpecialChar menuseparator
13301 Export\SpecialChar menuseparator
13302 \SpecialChar LaTeX
13303
13304 \family default
13305 )
13306 \begin_inset Foot
13307 status open
13308
13309 \begin_layout Plain Layout
13310 Actually you have the choice between \SpecialChar LaTeX
13311  (plain) and pdflatex.
13312  If you intend to use pdflatex to prepare the paper, you should use the
13313  pdflatex option so that included graphics are converted to PDF format,
13314  ready for use by pdflatex.
13315 \end_layout
13316
13317 \end_inset
13318
13319 , then make the following changes to the resulting 
13320 \family typewriter
13321 .tex
13322 \family default
13323  file.
13324 \end_layout
13325
13326 \begin_layout Enumerate
13327 Remove the comment lines before the 
13328 \family typewriter
13329
13330 \backslash
13331 documentclass
13332 \family default
13333  command.
13334 \end_layout
13335
13336 \begin_layout Enumerate
13337 Remove everything between (and including) the 
13338 \family typewriter
13339
13340 \backslash
13341 makeatletter
13342 \family default
13343  and 
13344 \family typewriter
13345
13346 \backslash
13347 makeatother
13348 \family default
13349  commands, except for any commands you specifically put into the \SpecialChar LaTeX
13350  preamble.
13351 \end_layout
13352
13353 \begin_layout Standard
13354 The modified 
13355 \family typewriter
13356 .tex
13357 \family default
13358  file should be saved and processed through \SpecialChar LaTeX
13359  as many times as necessary.
13360  You may also want to check the resulting 
13361 \family typewriter
13362 .dvi
13363 \family default
13364  document.
13365 \end_layout
13366
13367 \begin_layout Subsection
13368 Use of \SpecialChar TeX
13369  code
13370 \end_layout
13371
13372 \begin_layout Standard
13373 The use of \SpecialChar TeX
13374  code is reduced to two commands, which must be placed at the
13375  top of the document.
13376  If you started writing your paper by using the 
13377 \family typewriter
13378 ijmpc.lyx
13379 \family default
13380  or the 
13381 \family typewriter
13382 ijmpd.lyx
13383 \family default
13384  template, the \SpecialChar TeX
13385  code needed is already in its place; you usually don't need
13386  to delete it.
13387  You may only modify the first \SpecialChar TeX
13388  code to specify the information printed
13389  to the top of odd and even pages (authors' names and short paper's title,
13390  respectively).
13391  This \SpecialChar TeX
13392  code must have the form 
13393 \family typewriter
13394
13395 \backslash
13396 markboth{Authors' Names}{Short Paper's Title}
13397 \family default
13398 .
13399 \end_layout
13400
13401 \begin_layout Section
13402 iopart
13403 \end_layout
13404
13405 \begin_layout Standard
13406 by 
13407 \noun on
13408 Uwe Stöhr
13409 \end_layout
13410
13411 \begin_layout Subsection
13412 Overview
13413 \end_layout
13414
13415 \begin_layout Standard
13416 The iopart package provides a document class to create electronic manuscript
13417  submission to the journals published by the Institute of Physics.
13418  Instructions for the authors how to create a paper using the iopart class
13419  can be downloaded together with the iopart package from the site 
13420 \begin_inset Flex URL
13421 status collapsed
13422
13423 \begin_layout Plain Layout
13424
13425 ftp://ftp.iop.org/pub/journals/latex2e
13426 \end_layout
13427
13428 \end_inset
13429
13430 .
13431 \end_layout
13432
13433 \begin_layout Subsection
13434 Writing a paper
13435 \end_layout
13436
13437 \begin_layout Standard
13438 The easiest way to write a paper is to start with the file 
13439 \emph on
13440 IOP-article.lyx
13441 \emph default
13442  that is available in \SpecialChar LyX
13443 's examples files folder.
13444  Open this file, save it under a new name, and start writing.
13445  The example file explains how to use the special text environments.
13446  Here are the most important advices:
13447 \end_layout
13448
13449 \begin_layout Itemize
13450 To be able to compile your document to a PDF, PS, or DVI, ensure that the
13451  two options 
13452 \family sans
13453 Use AMS math package
13454 \family default
13455  in the document settings under 
13456 \family sans
13457 Math Options
13458 \family default
13459  are not used!
13460 \end_layout
13461
13462 \begin_layout Itemize
13463
13464 \size normal
13465 The title environment defines the kind of your paper.
13466  So use one of the following environments for the title:
13467 \end_layout
13468
13469 \begin_deeper
13470 \begin_layout Itemize
13471
13472 \family sans
13473 \size normal
13474 Title
13475 \family default
13476  for a Paper
13477 \end_layout
13478
13479 \begin_layout Itemize
13480
13481 \family sans
13482 \size normal
13483 Review
13484 \family default
13485  for a Review
13486 \end_layout
13487
13488 \begin_layout Itemize
13489
13490 \family sans
13491 \size normal
13492 Topical
13493 \family default
13494  for a Topical review
13495 \end_layout
13496
13497 \begin_layout Itemize
13498
13499 \family sans
13500 \size normal
13501 Comment
13502 \family default
13503  for a Comment
13504 \end_layout
13505
13506 \begin_layout Itemize
13507
13508 \family sans
13509 \size normal
13510 Note
13511 \family default
13512  for a Note
13513 \end_layout
13514
13515 \begin_layout Itemize
13516
13517 \family sans
13518 \size normal
13519 Paper
13520 \family default
13521  for a Paper (same as Title)
13522 \end_layout
13523
13524 \begin_layout Itemize
13525
13526 \family sans
13527 \size normal
13528 Prelim
13529 \family default
13530  for a Preliminary communication
13531 \end_layout
13532
13533 \begin_layout Itemize
13534
13535 \family sans
13536 \size normal
13537 Rapid
13538 \family default
13539  for a Rapid communication
13540 \end_layout
13541
13542 \begin_layout Itemize
13543
13544 \family sans
13545 \size normal
13546 Letter
13547 \family default
13548  for a Letter to the editor
13549 \end_layout
13550
13551 \end_deeper
13552 \begin_layout Itemize
13553
13554 \size normal
13555 All title environments except of 
13556 \family sans
13557 Letter
13558 \family default
13559  can have an optional short title.
13560 \end_layout
13561
13562 \begin_layout Itemize
13563 There is a general title environment 
13564 \family sans
13565 Article
13566 \family default
13567  which is not directly supported by the \SpecialChar LyX
13568 .
13569  This can be used as \SpecialChar TeX
13570  code when your document doesn't fit into one of the
13571  other title types.
13572 \end_layout
13573
13574 \begin_layout Standard
13575 For more informations like hints for special table and formula formatting,
13576  look at the IOP author guidelines.
13577 \end_layout
13578
13579 \begin_layout Section
13580 Kluwer
13581 \end_layout
13582
13583 \begin_layout Standard
13584 by 
13585 \noun on
13586 Panayotis Papasotiriou
13587 \end_layout
13588
13589 \begin_layout Subsection
13590 Overview
13591 \end_layout
13592
13593 \begin_layout Standard
13594 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
13595  that facilitates electronic manuscript submission to the journals they
13596  publish.
13597  Most known of them (at least in my domain of interest) are 
13598 \emph on
13599 Astrophysics and Space Science
13600 \emph default
13601  and 
13602 \emph on
13603 Solar Physics
13604 \emph default
13605 , but there are many others (see a complete list at 
13606 \begin_inset Flex URL
13607 status open
13608
13609 \begin_layout Plain Layout
13610
13611 http://www.wkap.nl/jrnllist.htm/JRNLHOME
13612 \end_layout
13613
13614 \end_inset
13615
13616 ).
13617  The Kluwer package may be downloaded from the site 
13618 \begin_inset Flex URL
13619 status collapsed
13620
13621 \begin_layout Plain Layout
13622
13623 http://www.wkap.nl/kaphtml.htm/STYLEFILES
13624 \end_layout
13625
13626 \end_inset
13627
13628 .
13629  A complete user guide is contained in that package (but it can also be
13630  downloaded separately).
13631 \end_layout
13632
13633 \begin_layout Standard
13634 \SpecialChar LyX
13635  supports many features of the package but not everything.
13636  However, the \SpecialChar TeX
13637  code needed is reduced to some 
13638 \begin_inset Quotes eld
13639 \end_inset
13640
13641 peculiar
13642 \begin_inset Quotes erd
13643 \end_inset
13644
13645  commands of the package (see
13646 \begin_inset space ~
13647 \end_inset
13648
13649
13650 \begin_inset CommandInset ref
13651 LatexCommand ref
13652 reference "subsec:kluwer_peculiarities"
13653
13654 \end_inset
13655
13656 ).
13657  I have recently used \SpecialChar LyX
13658  to write an article submitted to the 
13659 \emph on
13660 Astrophysics and Space Science
13661 \emph default
13662  without any problem.
13663 \end_layout
13664
13665 \begin_layout Subsection
13666 Writing a paper
13667 \end_layout
13668
13669 \begin_layout Standard
13670 The easiest way to write a paper is to start with the Kluwer template file.
13671  Click on 
13672 \family sans
13673 File\SpecialChar menuseparator
13674 New from
13675 \family default
13676  
13677 \family sans
13678 Template
13679 \family default
13680 , then choose the 
13681 \family typewriter
13682 kluwer.lyx
13683 \family default
13684  template.
13685  This will give an (almost) empty document that includes the most common
13686  fields found in a manuscript and a short description of their use.
13687  As in most templates, simply overwrite the existing text (including the
13688  brackets, 
13689 \family typewriter
13690 <>
13691 \family default
13692 ) with the correct information.
13693 \end_layout
13694
13695 \begin_layout Subsection
13696 Preparing a paper for submission
13697 \end_layout
13698
13699 \begin_layout Standard
13700 As in the AAS\SpecialChar TeX
13701  package, before you submit your paper to a journal you must
13702  
13703 \begin_inset Quotes eld
13704 \end_inset
13705
13706 postprocess
13707 \begin_inset Quotes erd
13708 \end_inset
13709
13710  it as follows.
13711 \end_layout
13712
13713 \begin_layout Enumerate
13714 Export your paper as a \SpecialChar LaTeX
13715  file.
13716  To do this, click on 
13717 \family sans
13718 File\SpecialChar menuseparator
13719 Export\SpecialChar menuseparator
13720 \SpecialChar LaTeX
13721
13722 \family default
13723 .
13724  
13725 \end_layout
13726
13727 \begin_layout Enumerate
13728 Edit the resulting 
13729 \family typewriter
13730 .tex
13731 \family default
13732  file with a text editor and make the following changes
13733 \end_layout
13734
13735 \begin_deeper
13736 \begin_layout Enumerate
13737 remove the comment lines before the 
13738 \family typewriter
13739
13740 \backslash
13741 documentclass
13742 \family default
13743  command,
13744 \end_layout
13745
13746 \begin_layout Enumerate
13747 remove everything between (and including) the 
13748 \family typewriter
13749
13750 \backslash
13751 makeatletter
13752 \family default
13753  and 
13754 \family typewriter
13755
13756 \backslash
13757 makeatother
13758 \family default
13759  commands, except for any commands you specifically put into the \SpecialChar LaTeX
13760  preamble.
13761 \end_layout
13762
13763 \begin_layout Standard
13764 Save the resulting 
13765 \family typewriter
13766 .tex
13767 \family default
13768  file.
13769 \end_layout
13770
13771 \end_deeper
13772 \begin_layout Enumerate
13773 Run the 
13774 \family typewriter
13775 .tex
13776 \family default
13777  file through \SpecialChar LaTeX
13778  as many times as necessary (usually up to three).
13779 \end_layout
13780
13781 \begin_layout Enumerate
13782 View the resulting 
13783 \family typewriter
13784 .dvi
13785 \family default
13786  document using, e.
13787 \begin_inset space \thinspace{}
13788 \end_inset
13789
13790 g.
13791 \begin_inset space \space{}
13792 \end_inset
13793
13794
13795 \family sans
13796 xdvi
13797 \family default
13798 , and check if everything is OK (it should, if you didn't make any mistake).
13799 \end_layout
13800
13801 \begin_layout Subsection
13802 \begin_inset Quotes eld
13803 \end_inset
13804
13805 Peculiarities
13806 \begin_inset Quotes erd
13807 \end_inset
13808
13809  of the Kluwer package
13810 \begin_inset CommandInset label
13811 LatexCommand label
13812 name "subsec:kluwer_peculiarities"
13813
13814 \end_inset
13815
13816
13817 \end_layout
13818
13819 \begin_layout Standard
13820 The Kluwer package has the following 
13821 \begin_inset Quotes eld
13822 \end_inset
13823
13824 peculiarities
13825 \begin_inset Quotes erd
13826 \end_inset
13827
13828 .
13829 \end_layout
13830
13831 \begin_layout Enumerate
13832 It is possible to write multiple articles in the same \SpecialChar LaTeX
13833  file
13834 \begin_inset Foot
13835 status collapsed
13836
13837 \begin_layout Plain Layout
13838 I can't imagine any good reason to do this.
13839 \end_layout
13840
13841 \end_inset
13842
13843 .
13844  Each article must be included in the environment 
13845 \begin_inset Quotes eld
13846 \end_inset
13847
13848 article
13849 \begin_inset Quotes erd
13850 \end_inset
13851
13852 .
13853  Unfortunately, this environment cannot be omitted, even if you write just
13854  one article.
13855  Therefore, each article starts with the command 
13856 \family typewriter
13857
13858 \backslash
13859 begin{article}
13860 \family default
13861  and, obviously, ends with the command 
13862 \family typewriter
13863
13864 \backslash
13865 end{article}
13866 \family default
13867 .
13868  Although this can be implemented in \SpecialChar LyX
13869 , I didn't included it, since it looks
13870  ugly and can confuse the novice user.
13871  Therefore, you need to enter them directly and mark them as \SpecialChar LaTeX
13872  code (the
13873  well-known 
13874 \begin_inset Quotes eld
13875 \end_inset
13876
13877 \SpecialChar TeX
13878  code
13879 \begin_inset Quotes erd
13880 \end_inset
13881
13882 ).
13883 \end_layout
13884
13885 \begin_layout Enumerate
13886 Information given at the beginning of the article (i.
13887 \begin_inset space \thinspace{}
13888 \end_inset
13889
13890 e.
13891 \begin_inset space \space{}
13892 \end_inset
13893
13894 title, subtitle, author, institution, running title, running author, abstract
13895  and keywords) must be included in an environment called 
13896 \begin_inset Quotes eld
13897 \end_inset
13898
13899 opening
13900 \begin_inset Quotes erd
13901 \end_inset
13902
13903 .
13904  This is not implemented in \SpecialChar LyX
13905 , so you must enter title, subtitle etc.
13906 \begin_inset space ~
13907 \end_inset
13908
13909 between two \SpecialChar TeX
13910  code lines (
13911 \family typewriter
13912
13913 \backslash
13914 begin{opening}
13915 \family default
13916  and 
13917 \family typewriter
13918
13919 \backslash
13920 end{opening}
13921 \family default
13922 ).
13923 \end_layout
13924
13925 \begin_layout Enumerate
13926 According to the user manual, the label of each bibliography item must be
13927  written as 
13928 \family typewriter
13929
13930 \backslash
13931 protect
13932 \backslash
13933 citeauthoryear{
13934 \family default
13935 \emph on
13936 author(s)
13937 \family typewriter
13938 \emph default
13939 }{
13940 \family default
13941 \emph on
13942 year
13943 \family typewriter
13944 \emph default
13945 }
13946 \family default
13947 .
13948 \end_layout
13949
13950 \begin_layout Standard
13951 The 
13952 \family typewriter
13953 kluwer.lyx
13954 \family default
13955  template takes care of all these 
13956 \begin_inset Quotes eld
13957 \end_inset
13958
13959 peculiarities
13960 \begin_inset Quotes erd
13961 \end_inset
13962
13963 .
13964  If you start a new paper using this template you don't need to do anything
13965  special.
13966  Just 
13967 \end_layout
13968
13969 \begin_layout Enumerate
13970 don't delete the \SpecialChar TeX
13971  code included in the template, and
13972 \end_layout
13973
13974 \begin_layout Enumerate
13975 copy the example bibliography item included in the template and modify it
13976  as necessary to enter new bibliography items.
13977 \end_layout
13978
13979 \begin_layout Section
13980 Koma-Script
13981 \end_layout
13982
13983 \begin_layout Standard
13984 by 
13985 \noun on
13986 Bernd Rellermeyer
13987 \end_layout
13988
13989 \begin_layout Subsection
13990 Overview
13991 \end_layout
13992
13993 \begin_layout Standard
13994 The \SpecialChar LyX
13995  document classes 
13996 \emph on
13997 article (koma-script)
13998 \emph default
13999
14000 \emph on
14001 report (koma-script)
14002 \emph default
14003
14004 \emph on
14005 book
14006 \emph default
14007  
14008 \emph on
14009 (koma-script)
14010 \emph default
14011 , and 
14012 \emph on
14013 letter
14014 \emph default
14015  
14016 \emph on
14017 (koma-script)
14018 \emph default
14019  correspond to the \SpecialChar LaTeX
14020  document classes 
14021 \family typewriter
14022 scrartcl.cls
14023 \family default
14024
14025 \family typewriter
14026 scrreprt.cls
14027 \family default
14028
14029 \family typewriter
14030 scrbook.cls
14031 \family default
14032 , and 
14033 \family typewriter
14034 scrlettr.cls
14035 \family default
14036 , resp.
14037 \begin_inset space ~
14038 \end_inset
14039
14040 of the Koma-Script family.
14041  They are replacements for the standard document classes 
14042 \family typewriter
14043 article.cls
14044 \family default
14045
14046 \family typewriter
14047 report.cls
14048 \family default
14049
14050 \family typewriter
14051 book.cls
14052 \family default
14053  and 
14054 \family typewriter
14055 letter.cls
14056 \family default
14057 , resp., and fit better to European typography conventions in a number of
14058  points.
14059 \end_layout
14060
14061 \begin_layout Itemize
14062 Standard character size is 11pt in 
14063 \emph on
14064 article (koma-script)
14065 \emph default
14066
14067 \emph on
14068 report (koma-script)
14069 \emph default
14070 , and 
14071 \emph on
14072 book (koma-script)
14073 \emph default
14074 , and 12pt in 
14075 \emph on
14076 letter (koma-script)
14077 \emph default
14078 .
14079 \end_layout
14080
14081 \begin_layout Itemize
14082 Headings, labels of the description environment, and a number of elements
14083  of the 
14084 \emph on
14085 letter (koma-script)
14086 \emph default
14087  document class are set in a bold sans serif font.
14088 \begin_inset Foot
14089 status collapsed
14090
14091 \begin_layout Plain Layout
14092 There is a big difference between the bold sans serif old cm fonts and new
14093  ec fonts, especially in the appearance of headings.
14094  In comparison, the ec bold sans serif fonts look a bit thin.
14095  Here the \SpecialChar LaTeX
14096  package 
14097 \family typewriter
14098 cmsd.sty by
14099 \family default
14100  
14101 \shape smallcaps
14102 Walter Schmidt
14103 \shape default
14104  helps to produce the 
14105 \begin_inset Quotes eld
14106 \end_inset
14107
14108 usual
14109 \begin_inset Quotes erd
14110 \end_inset
14111
14112  appearance when using the ec fonts.
14113 \end_layout
14114
14115 \end_inset
14116
14117  The numbering of chapter headings is made in the same way as the numbering
14118  of section headings, that is without the extra line 
14119 \begin_inset Quotes eld
14120 \end_inset
14121
14122 Chapter\SpecialChar ldots
14123
14124 \begin_inset Quotes erd
14125 \end_inset
14126
14127 .
14128  In addition, the appearance of the headings can be modified by using a
14129  number of options (in \SpecialChar LyX
14130  to be entered in the field 
14131 \family sans
14132 Extra
14133 \begin_inset space ~
14134 \end_inset
14135
14136 Options
14137 \family default
14138  of the dialog 
14139 \family sans
14140 Layout\SpecialChar menuseparator
14141 Document
14142 \family default
14143 ).
14144  
14145 \end_layout
14146
14147 \begin_layout Itemize
14148 The main means in the Koma-Script document classes to design the type area
14149  are the options 
14150 \family sans
14151 BCOR
14152 \family default
14153  and 
14154 \family sans
14155 DIV
14156 \family default
14157  (in \SpecialChar LyX
14158  to be entered in the extra class options field in the dialog 
14159 \family sans
14160 Document\SpecialChar menuseparator
14161 Settings
14162 \family default
14163 ).
14164  They make a clearer modification of page margins possible as do the options
14165  of the dialog 
14166 \family sans
14167 Document\SpecialChar menuseparator
14168 Settings
14169 \family default
14170 .
14171  
14172 \end_layout
14173
14174 \begin_layout Itemize
14175 The \SpecialChar LaTeX
14176  document classes of the Koma-Script family define a number of additional
14177  commands.
14178  Those part of it which makes sense in \SpecialChar LyX
14179  is implemented in corresponding
14180  paragraph types.
14181 \end_layout
14182
14183 \begin_layout Standard
14184 Detailed descriptions of the \SpecialChar LaTeX
14185  document classes of the Koma-Script family
14186  can be found in the Koma-Script documentation 
14187 \emph on
14188 scrguide
14189 \emph default
14190  (German) and 
14191 \emph on
14192 scrguien
14193 \emph default
14194  (English).
14195 \end_layout
14196
14197 \begin_layout Subsection
14198 article (koma-script), report (koma-script), and book (koma-script)
14199 \end_layout
14200
14201 \begin_layout Standard
14202 The document classes 
14203 \emph on
14204 article (koma-script)
14205 \emph default
14206
14207 \emph on
14208 report (koma-script)
14209 \emph default
14210 , and 
14211 \emph on
14212 book
14213 \emph default
14214  
14215 \emph on
14216 (koma-script)
14217 \emph default
14218  are implemented in the layout files 
14219 \family typewriter
14220 scrartcl.layout
14221 \family default
14222
14223 \family typewriter
14224 scrreprt.layout
14225 \family default
14226 , and 
14227 \family typewriter
14228 scrbook.layout
14229 \family default
14230 , resp.
14231  They contain all the paragraph types of the corresponding standard document
14232  classes 
14233 \emph on
14234 article
14235 \emph default
14236
14237 \emph on
14238 report
14239 \emph default
14240 , and 
14241 \emph on
14242 book
14243 \emph default
14244 , resp., partly modified, with the exception of the \SpecialChar LyX
14245  specific 
14246 \family sans
14247 List
14248 \family default
14249 -type, which is replaced by the new 
14250 \family sans
14251 Labeling
14252 \family default
14253 -type having the same functionality.
14254  Beside the 
14255 \family sans
14256 Labeling
14257 \family default
14258 -Type there is a number of new paragraph types added.
14259  They are 
14260 \emph on
14261 not
14262 \emph default
14263  part of 
14264 \emph on
14265 letter (koma-script)
14266 \emph default
14267 .
14268 \end_layout
14269
14270 \begin_layout Itemize
14271
14272 \family sans
14273 Addpart, Addchap
14274 \family default
14275
14276 \family sans
14277 Addsec
14278 \family default
14279 : are equivalents to 
14280 \family sans
14281 Part*, Chapter*
14282 \family default
14283  and 
14284 \family sans
14285 Section*
14286 \family default
14287 , resp., additionally inserting an entry in the table of contents.
14288  
14289 \family sans
14290 Addpart
14291 \family default
14292  and 
14293 \family sans
14294 Addchap
14295 \family default
14296  are not contained in 
14297 \emph on
14298 article (koma-script)
14299 \emph default
14300 .
14301 \end_layout
14302
14303 \begin_layout Itemize
14304
14305 \family sans
14306 Addchap*
14307 \family default
14308
14309 \family sans
14310 Addsec*
14311 \family default
14312 : behave exactly as 
14313 \family sans
14314 Addchap
14315 \family default
14316  and 
14317 \family sans
14318 Addsec
14319 \family default
14320 , resp., additionally clearing running heads.
14321  
14322 \family sans
14323 Addchap*
14324 \family default
14325  is not contained in 
14326 \emph on
14327 article (koma-script)
14328 \emph default
14329 .
14330 \begin_inset Foot
14331 status collapsed
14332
14333 \begin_layout Plain Layout
14334 There is also an 
14335 \family typewriter
14336
14337 \backslash
14338 addpart*
14339 \family default
14340  command in 
14341 \emph on
14342 book (koma-script)
14343 \emph default
14344  and in 
14345 \emph on
14346 report (koma-script)
14347 \emph default
14348 , but since this is identical to 
14349 \family sans
14350 Part*
14351 \family default
14352 , is has not been implemented in \SpecialChar LyX
14353 .
14354 \end_layout
14355
14356 \end_inset
14357
14358
14359 \end_layout
14360
14361 \begin_layout Itemize
14362
14363 \family sans
14364 Minisec
14365 \family default
14366 : generates a heading directly above the following paragraph in the standard
14367  character size without affecting the structure of the document.
14368 \end_layout
14369
14370 \begin_layout Itemize
14371
14372 \family sans
14373 Captionabove
14374 \family default
14375  and 
14376 \family sans
14377 Captionbelow
14378 \family default
14379  are special captions which respect the different space settings needed
14380  for captions placed above or below an element (if you follow strict typographic
14381  rules, you might want to place table captions always above the table).
14382  You can also use the class option 
14383 \family typewriter
14384 tablecaptionsabove
14385 \family default
14386 , which will switch 
14387 \family sans
14388 caption
14389 \family default
14390  to 
14391 \family sans
14392 captionabove
14393 \family default
14394  for tables and 
14395 \family sans
14396 captionbelow
14397 \family default
14398  for figures.
14399  You need at least Koma-Script version 2.8q to use this.
14400 \end_layout
14401
14402 \begin_layout Itemize
14403
14404 \family sans
14405 Dictum
14406 \family default
14407 : can be used to set a bonmot, e.
14408 \begin_inset space \thinspace{}
14409 \end_inset
14410
14411 g.
14412 \begin_inset space \space{}
14413 \end_inset
14414
14415 at the beginning of a chapter.
14416  If you use the optional argument (
14417 \family sans
14418 Insert\SpecialChar menuseparator
14419 Short
14420 \begin_inset space ~
14421 \end_inset
14422
14423 Title
14424 \family default
14425 ), you can insert the dictum's author there.
14426  Dictum and author are separated by a line.
14427  You need at least Koma-Script version 2.8q to use this.
14428  
14429 \family sans
14430 Dictum
14431 \family default
14432  is not contained in 
14433 \emph on
14434 article (koma-script)
14435 \emph default
14436 .
14437 \end_layout
14438
14439 \begin_layout Standard
14440 The following types, together with the standard types 
14441 \family sans
14442 Title
14443 \family default
14444
14445 \family sans
14446 Author
14447 \family default
14448 , and 
14449 \family sans
14450 Date
14451 \family default
14452 , form the title area of the document.
14453  They must be entered ahead of the first 
14454 \begin_inset Quotes eld
14455 \end_inset
14456
14457 ordinary
14458 \begin_inset Quotes erd
14459 \end_inset
14460
14461  paragraph.
14462 \begin_inset Foot
14463 status collapsed
14464
14465 \begin_layout Plain Layout
14466 The corresponding \SpecialChar LaTeX
14467  commands must appear before the 
14468 \family typewriter
14469
14470 \backslash
14471 maketitle
14472 \family default
14473  command.
14474 \end_layout
14475
14476 \end_inset
14477
14478  When such a type is used more than once, the latter usage overwrites the
14479  former one, that means, for every type only the latest usage is valid.
14480  The order of the different types however has, like 
14481 \family sans
14482 Title
14483 \family default
14484
14485 \family sans
14486 Author
14487 \family default
14488 , and 
14489 \family sans
14490 Date
14491 \family default
14492 , no effect on the appearance of the produced document.
14493 \end_layout
14494
14495 \begin_layout Itemize
14496
14497 \family sans
14498 Subject
14499 \family default
14500 : produces a centered paragraph above the ordinary title (
14501 \family sans
14502 Title
14503 \family default
14504
14505 \family sans
14506 Author
14507 \family default
14508
14509 \family sans
14510 Date
14511 \family default
14512 ) for the subject of the document.
14513 \end_layout
14514
14515 \begin_layout Itemize
14516
14517 \family sans
14518 Publishers
14519 \family default
14520 : produces a centered paragraph below the ordinary title (
14521 \family sans
14522 Title
14523 \family default
14524
14525 \family sans
14526 Author
14527 \family default
14528
14529 \family sans
14530 Date
14531 \family default
14532 ) for the publishers' name.
14533 \end_layout
14534
14535 \begin_layout Itemize
14536
14537 \family sans
14538 Dedication
14539 \family default
14540 : in 
14541 \emph on
14542 report (koma-script)
14543 \emph default
14544  and 
14545 \emph on
14546 book (koma-script)
14547 \emph default
14548  produces a centered paragraph on its own page behind the title page, or
14549  in 
14550 \emph on
14551 article (koma-script)
14552 \emph default
14553  produces a centered paragraph below the ordinary title (
14554 \family sans
14555 Title
14556 \family default
14557
14558 \family sans
14559 Author
14560 \family default
14561
14562 \family sans
14563 Date
14564 \family default
14565
14566 \family sans
14567 Publishers
14568 \family default
14569 ) for a dedication.
14570 \end_layout
14571
14572 \begin_layout Itemize
14573
14574 \family sans
14575 Titlehead
14576 \family default
14577 : produces a left aligned paragraph above the ordinary title (
14578 \family sans
14579 Title
14580 \family default
14581
14582 \family sans
14583 Author
14584 \family default
14585
14586 \family sans
14587 Date
14588 \family default
14589
14590 \family sans
14591 Subject
14592 \family default
14593 ) for a document`s head.
14594 \end_layout
14595
14596 \begin_layout Itemize
14597
14598 \family sans
14599 Uppertitleback
14600 \family default
14601 : produces in a double-sided print in 
14602 \emph on
14603 report (koma-script)
14604 \emph default
14605  and 
14606 \emph on
14607 book (koma-script)
14608 \emph default
14609  a left-aligned paragraph at the top of the title page`s back or has no
14610  effect in a single-sided print or in 
14611 \emph on
14612 article (koma-script)
14613 \emph default
14614 .
14615 \end_layout
14616
14617 \begin_layout Itemize
14618
14619 \family sans
14620 Lowertitleback
14621 \family default
14622 : produces in a double-sided print in 
14623 \emph on
14624 report (koma-script)
14625 \emph default
14626  and 
14627 \emph on
14628 book (koma-script)
14629 \emph default
14630  a left-aligned paragraph at the bottom of the title page`s back or has
14631  no effect in a single-sided print or in 
14632 \emph on
14633 article (koma-script)
14634 \emph default
14635 .
14636 \end_layout
14637
14638 \begin_layout Itemize
14639
14640 \family sans
14641 Extratitle
14642 \family default
14643 : produces a special 
14644 \begin_inset Quotes eld
14645 \end_inset
14646
14647 dirty
14648 \begin_inset Quotes erd
14649 \end_inset
14650
14651  page ahead of the actual document containing a paragraph without special
14652  formatting.
14653 \end_layout
14654
14655 \begin_layout Standard
14656 The layout files for the document classes 
14657 \emph on
14658 article (koma-script)
14659 \emph default
14660
14661 \emph on
14662 report (koma-script)
14663 \emph default
14664 , and 
14665 \emph on
14666 book (koma-script)
14667 \emph default
14668  do include the file 
14669 \family typewriter
14670 scrmacros.inc
14671 \family default
14672 .
14673  This is thought of as a place to define your own types.
14674  Copy scrmacros
14675 \family typewriter
14676 .inc
14677 \family default
14678  in your personal layout directory and edit the file!
14679 \end_layout
14680
14681 \begin_layout Subsection
14682 letter (koma-script)
14683 \end_layout
14684
14685 \begin_layout Standard
14686 \noindent
14687 The document class 
14688 \emph on
14689 letter (koma-script)
14690 \emph default
14691  is implemented in the layout file 
14692 \family typewriter
14693 scrlettr.layout
14694 \family default
14695 .
14696  It contains all the paragraph types of the corresponding standard document
14697  class 
14698 \emph on
14699 letter
14700 \emph default
14701 , partly modified, with the exception of the \SpecialChar LyX
14702  specific types 
14703 \family sans
14704 \SpecialChar LyX
14705 -Code
14706 \family default
14707  and 
14708 \family sans
14709 Comment
14710 \family default
14711  and the 
14712 \family sans
14713 List
14714 \family default
14715  type, which is replaced by the new 
14716 \family sans
14717 Labeling
14718 \family default
14719  type.
14720  In addition, it contains, in contrast to the standard document class, the
14721  standard types 
14722 \family sans
14723 \SpecialChar LaTeX
14724
14725 \family default
14726
14727 \family sans
14728 Quotation
14729 \family default
14730
14731 \family sans
14732 Quote
14733 \family default
14734 , and 
14735 \family sans
14736 Verse
14737 \family default
14738 .
14739  Furthermore, there are a number of new letter specific types.
14740 \end_layout
14741
14742 \begin_layout Standard
14743 The appearance of the letter produced by this document class can be controlled
14744  by a number of \SpecialChar LaTeX
14745  commands, which you can put in the \SpecialChar LaTeX
14746  preamble.
14747 \begin_inset Foot
14748 status collapsed
14749
14750 \begin_layout Plain Layout
14751 For example, the standard appearance of the letter`s heading, consisting
14752  of name and address, is quite self-willed.
14753  An 
14754 \begin_inset Quotes eld
14755 \end_inset
14756
14757 ordinary
14758 \begin_inset Quotes erd
14759 \end_inset
14760
14761  heading is produced by the following \SpecialChar LaTeX
14762  commands in the preamble:
14763 \end_layout
14764
14765 \begin_layout LyX-Code
14766
14767 \backslash
14768 firsthead{
14769 \backslash
14770 parbox[b]{
14771 \backslash
14772 textwidth}
14773 \end_layout
14774
14775 \begin_layout LyX-Code
14776   {
14777 \backslash
14778 ignorespaces 
14779 \backslash
14780 fromname
14781 \backslash
14782
14783 \backslash
14784  
14785 \backslash
14786 ignorespaces 
14787 \backslash
14788 fromaddress}} 
14789 \end_layout
14790
14791 \begin_layout LyX-Code
14792
14793 \backslash
14794 nexthead{
14795 \backslash
14796 parbox[b]{
14797 \backslash
14798 textwidth}
14799 \end_layout
14800
14801 \begin_layout LyX-Code
14802   {
14803 \backslash
14804 ignorespaces 
14805 \backslash
14806 fromname 
14807 \backslash
14808 hfill 
14809 \backslash
14810 ignorespaces 
14811 \backslash
14812 pagename
14813 \backslash
14814  
14815 \backslash
14816 thepage}}
14817 \end_layout
14818
14819 \end_inset
14820
14821  A detailed German description of such \SpecialChar LaTeX
14822  commands can be found in the Koma-Script
14823  documentation 
14824 \emph on
14825 scrguide
14826 \emph default
14827 .
14828  With it, the letter's author can produce his personal letter layout.
14829 \end_layout
14830
14831 \begin_layout Standard
14832 The types 
14833 \family sans
14834 Letter
14835 \family default
14836  and 
14837 \family sans
14838 Opening
14839 \family default
14840  define the beginning of the letter and must be used in every letter.
14841  To emphasize them in the \SpecialChar LyX
14842  document class, they are marked with the letter
14843  
14844 \shape italic
14845 L
14846 \shape default
14847  or 
14848 \shape italic
14849 O
14850 \shape default
14851 , resp.
14852 \begin_inset space ~
14853 \end_inset
14854
14855 in the left margin.
14856  It is possible to write any number of letters in one file.
14857  An 
14858 \family sans
14859 Opening
14860 \family default
14861  type produces a new letter using the same addressee and a 
14862 \family sans
14863 Letter
14864 \family default
14865  type produces a new addressee.
14866  The types 
14867 \family sans
14868 Closing
14869 \family default
14870
14871 \family sans
14872 PS
14873 \family default
14874
14875 \family sans
14876 CC
14877 \family default
14878 , and 
14879 \family sans
14880 Encl
14881 \family default
14882  are ordinary paragraph types and can also be used several times in one
14883  and the same letter.
14884 \end_layout
14885
14886 \begin_layout Itemize
14887
14888 \family sans
14889 Letter
14890 \family default
14891 : produces a paragraph for the addressee and implicitly defines the beginning
14892  of the letter.
14893 \end_layout
14894
14895 \begin_layout Itemize
14896
14897 \family sans
14898 Opening
14899 \family default
14900 : produces a paragraph for the form of address and implicitly produces a
14901  new letter.
14902 \end_layout
14903
14904 \begin_layout Itemize
14905
14906 \family sans
14907 Closing
14908 \family default
14909 : produces a paragraph for a close.
14910 \end_layout
14911
14912 \begin_layout Itemize
14913
14914 \family sans
14915 PS
14916 \family default
14917 : produces a paragraph for a postscript.
14918 \end_layout
14919
14920 \begin_layout Itemize
14921
14922 \family sans
14923 CC
14924 \family default
14925 : produces a paragraph for a distribution list.
14926 \end_layout
14927
14928 \begin_layout Itemize
14929
14930 \family sans
14931 Encl
14932 \family default
14933 : produces a paragraph for enclosures.
14934 \end_layout
14935
14936 \begin_layout Standard
14937 The types 
14938 \family sans
14939 Name
14940 \family default
14941
14942 \family sans
14943 Signature
14944 \family default
14945
14946 \family sans
14947 Address
14948 \family default
14949
14950 \family sans
14951 Telephone
14952 \family default
14953
14954 \family sans
14955 Place
14956 \family default
14957
14958 \family sans
14959 Backaddress
14960 \family default
14961
14962 \family sans
14963 Specialmail
14964 \family default
14965
14966 \family sans
14967 Location
14968 \family default
14969
14970 \family sans
14971 Title
14972 \family default
14973 , and 
14974 \family sans
14975 Subject
14976 \family default
14977  are input types provided with a label to enter information, which will
14978  be processed by the document class.
14979 \begin_inset Foot
14980 status open
14981
14982 \begin_layout Plain Layout
14983 It could be seen as a matter of inconsequence, that the types 
14984 \family sans
14985 Letter
14986 \family default
14987  and 
14988 \family sans
14989 Opening
14990 \family default
14991  described above are not such input types as well.
14992  Because of the special meaning of those types, however, I have implemented
14993  them as ordinary paragraph types with a one letter mark in the left margin.
14994  Moreover, it would affect my feeling of symmetry, if the 
14995 \family sans
14996 Opening
14997 \family default
14998  type and the 
14999 \family sans
15000 Closing
15001 \family default
15002  type had such a serious different appearance.
15003 \end_layout
15004
15005 \end_inset
15006
15007  The types must be used ahead of the corresponding 
15008 \family sans
15009 Opening
15010 \family default
15011  type.
15012 \end_layout
15013
15014 \begin_layout Standard
15015 An implementation of these types in a WYSIWYG fashion does not seem to make
15016  sense, because the real appearance of the produced letter does not only
15017  depend on the usage of the particular type, but also on other factors.
15018  For example, a signature entered in the 
15019 \family sans
15020 Signature
15021 \family default
15022  type will in the standard behavior appear in the produced letter only,
15023  when in the same letter also a 
15024 \family sans
15025 Closing
15026 \family default
15027  type is used.
15028  The entered value of the 
15029 \family sans
15030 Telephone
15031 \family default
15032  type will in the standard behavior not appear in the produced letter at
15033  all.
15034  The possibility to design the letter`s heading freely is already indicated
15035  in a footnote above.
15036 \end_layout
15037
15038 \begin_layout Standard
15039 The input types can also be used as empty paragraphs.
15040  This makes sense e.
15041 \begin_inset space \thinspace{}
15042 \end_inset
15043
15044 g.
15045 \begin_inset space \space{}
15046 \end_inset
15047
15048 for the 
15049 \family sans
15050 Signature
15051 \family default
15052  type.
15053  If the 
15054 \family sans
15055 Signature
15056 \family default
15057  type is not used at all, in the standard behavior the value of the 
15058 \family sans
15059 Name
15060 \family default
15061  type is used as signature, whereas if an empty 
15062 \family sans
15063 Signature
15064 \family default
15065  type is used, no signature value is defined.
15066 \end_layout
15067
15068 \begin_layout Standard
15069 By using the input types it is possible to write a letter template, containing
15070  filled input types with your personal dates (name, address, etc.) and empty
15071  input types for other dates you want to enter.
15072 \end_layout
15073
15074 \begin_layout Itemize
15075
15076 \family sans
15077 Name
15078 \family default
15079 : sender's name, in the standard behavior appears as a centered paragraph
15080  in small caps in the letter`s heading.
15081 \end_layout
15082
15083 \begin_layout Itemize
15084
15085 \family sans
15086 Signature
15087 \family default
15088 : sender's signature, in the standard behavior appears below the 
15089 \family sans
15090 Closing
15091 \family default
15092  type.
15093  If no 
15094 \family sans
15095 Signature
15096 \family default
15097  type is used, the value of the 
15098 \family sans
15099 Name
15100 \family default
15101  type appears instead.
15102 \end_layout
15103
15104 \begin_layout Itemize
15105
15106 \family sans
15107 Address
15108 \family default
15109 : sender's address, in the standard behavior appears in a centered paragraph
15110  in the letter`s heading below the sender's name.
15111 \end_layout
15112
15113 \begin_layout Itemize
15114
15115 \family sans
15116 Telephone
15117 \family default
15118 : sender's telephone number, in the standard behavior only sets the \SpecialChar LaTeX
15119  variable
15120  
15121 \family typewriter
15122
15123 \backslash
15124 telephonenum
15125 \family default
15126 .
15127 \end_layout
15128
15129 \begin_layout Itemize
15130
15131 \family sans
15132 Place
15133 \family default
15134 : place of the letter`s making.
15135 \end_layout
15136
15137 \begin_layout Itemize
15138
15139 \family sans
15140 Date
15141 \family default
15142 : date of the letter`s making.
15143  
15144 \family sans
15145 Place
15146 \family default
15147  and 
15148 \family sans
15149 Date
15150 \family default
15151 , in the standard behavior, produce the place and the date in a right-aligned
15152  line below the addressee's field.
15153  If an empty 
15154 \family sans
15155 Date
15156 \family default
15157  type is used, neither place nor date appear, independent of the value of
15158  the 
15159 \family sans
15160 Place
15161 \family default
15162  type.
15163  If no 
15164 \family sans
15165 Date
15166 \family default
15167  type is used, the date of the letter `s production is used.
15168 \end_layout
15169
15170 \begin_layout Itemize
15171
15172 \family sans
15173 Backaddress
15174 \family default
15175 : sender`s back address, in the standard behavior appears above the addressee's
15176  field in a small sans serif font.
15177 \end_layout
15178
15179 \begin_layout Itemize
15180
15181 \family sans
15182 Specialmail
15183 \family default
15184 : special mail information, in the standard behavior appears underlined
15185  above the addressee's field below the back address.
15186 \end_layout
15187
15188 \begin_layout Itemize
15189
15190 \family sans
15191 Location
15192 \family default
15193 : additional information, in the standard behavior appears on right side
15194  below the addressee`s field.
15195 \end_layout
15196
15197 \begin_layout Itemize
15198
15199 \family sans
15200 Title
15201 \family default
15202 : the letter's title, in the standard behavior appears in a big, bold, sans
15203  serif font above the subject.
15204 \end_layout
15205
15206 \begin_layout Itemize
15207
15208 \family sans
15209 Subject
15210 \family default
15211 : the letter's subject, in the standard behavior appears in a bold font
15212  above the 
15213 \family sans
15214 Opening
15215 \family default
15216  paragraph.
15217 \end_layout
15218
15219 \begin_layout Standard
15220 The types 
15221 \family sans
15222 Yourref
15223 \family default
15224
15225 \family sans
15226 Yourmail
15227 \family default
15228
15229 \family sans
15230 Myref
15231 \family default
15232
15233 \family sans
15234 Customer
15235 \family default
15236 , and 
15237 \family sans
15238 Invoice
15239 \family default
15240  produce a business letter like line above the 
15241 \family sans
15242 Title
15243 \family default
15244  line containing the fields 
15245 \begin_inset Quotes eld
15246 \end_inset
15247
15248 Your ref.
15249 \begin_inset Quotes erd
15250 \end_inset
15251
15252
15253 \begin_inset Quotes eld
15254 \end_inset
15255
15256 Your letter of
15257 \begin_inset Quotes erd
15258 \end_inset
15259
15260
15261 \begin_inset Quotes eld
15262 \end_inset
15263
15264 Our ref.
15265 \begin_inset Quotes erd
15266 \end_inset
15267
15268
15269 \begin_inset Quotes eld
15270 \end_inset
15271
15272 Customer no.
15273 \begin_inset Quotes erd
15274 \end_inset
15275
15276
15277 \begin_inset Quotes eld
15278 \end_inset
15279
15280 Invoice no.
15281 \begin_inset Quotes erd
15282 \end_inset
15283
15284 , and 
15285 \begin_inset Quotes eld
15286 \end_inset
15287
15288 Date
15289 \begin_inset Quotes erd
15290 \end_inset
15291
15292 .
15293  For the date field, the value of the 
15294 \family sans
15295 Date
15296 \family default
15297  type is used.
15298  If one of these 
15299 \begin_inset Quotes eld
15300 \end_inset
15301
15302 business letter types
15303 \begin_inset Quotes erd
15304 \end_inset
15305
15306  is used, the value of the 
15307 \family sans
15308 Place
15309 \family default
15310  type however does not appear, but only the \SpecialChar LaTeX
15311  variable 
15312 \family typewriter
15313
15314 \backslash
15315 fromplace
15316 \family default
15317  is set.
15318  The ordinary output of place and date in a right-aligned line below the
15319  addressee`s field is suppressed.
15320  The types are implemented as input types provided with a label and must
15321  be used ahead of the corresponding 
15322 \family sans
15323 Opening
15324 \family default
15325  type.
15326 \end_layout
15327
15328 \begin_layout Itemize
15329
15330 \family sans
15331 Yourref
15332 \family default
15333 : Your ref.
15334 \end_layout
15335
15336 \begin_layout Itemize
15337
15338 \family sans
15339 Yourmail
15340 \family default
15341 : Your letter of.
15342 \end_layout
15343
15344 \begin_layout Itemize
15345
15346 \family sans
15347 Myref
15348 \family default
15349 : Our ref.
15350 \end_layout
15351
15352 \begin_layout Itemize
15353
15354 \family sans
15355 Customer
15356 \family default
15357 : Customer no.
15358 \end_layout
15359
15360 \begin_layout Itemize
15361
15362 \family sans
15363 Invoice
15364 \family default
15365 : Invoice no.
15366 \end_layout
15367
15368 \begin_layout Subsection
15369 The new letter class: letter (koma-script v.2)
15370 \end_layout
15371
15372 \begin_layout Standard
15373 by 
15374 \noun on
15375 Jürgen Spitzmüller
15376 \end_layout
15377
15378 \begin_layout Standard
15379 \begin_inset VSpace medskip
15380 \end_inset
15381
15382
15383 \end_layout
15384
15385 \begin_layout Standard
15386 \noindent
15387 Koma-Script version 2.8 has introduced a new letter class 
15388 \family typewriter
15389 scrlttr2
15390 \family default
15391  which supersedes the now unsupported 
15392 \family typewriter
15393 scrlettr
15394 \family default
15395 .
15396  It has — on the \SpecialChar LaTeX
15397  side — a completely new interface and is not compatible
15398  with the old class.
15399  Therefore, \SpecialChar LyX
15400  supports both, though it is recommended you use the new class.
15401 \end_layout
15402
15403 \begin_layout Standard
15404 This class covers the same functionality as 
15405 \emph on
15406 letter (koma-script),
15407 \emph default
15408  and a few more.
15409  The basic items are 
15410 \family sans
15411 Address
15412 \family default
15413  (receiver's address, same as 
15414 \family sans
15415 Letter
15416 \family default
15417  in the old layout), 
15418 \family sans
15419 Opening
15420 \family default
15421 , and 
15422 \family sans
15423 Closing
15424 \family default
15425 .
15426  
15427 \family sans
15428 NextAddress
15429 \family default
15430  will start a new letter (i.
15431 \begin_inset space \thinspace{}
15432 \end_inset
15433
15434 e.
15435 \begin_inset space \space{}
15436 \end_inset
15437
15438 you can write several letters per document).
15439  New elements are sender's 
15440 \family sans
15441 E-Mail
15442 \family default
15443
15444 \family sans
15445 URL
15446 \family default
15447
15448 \family sans
15449 Fax
15450 \family default
15451
15452 \family sans
15453 Bank
15454 \family default
15455  and the possibility to use a 
15456 \family sans
15457 Logo
15458 \family default
15459  (via 
15460 \family sans
15461 Insert\SpecialChar menuseparator
15462 Graphics
15463 \family default
15464 ) in the header.
15465 \end_layout
15466
15467 \begin_layout Standard
15468 The biggest improvement is, though, that the letter's layout is configurable
15469  to meet almost any needs.
15470  This can be done via the preamble or with a special style file (Letter
15471  Class Option, extension 
15472 \family typewriter
15473 *.lco
15474 \family default
15475 ), that will be read in as a class option.
15476 \begin_inset Foot
15477 status collapsed
15478
15479 \begin_layout Plain Layout
15480 The KOMA package comes with some default 
15481 \family typewriter
15482 *.lco
15483 \family default
15484  files.
15485  There is, for instance, a 
15486 \family typewriter
15487 DIN.lco
15488 \family default
15489  file that follows german typesetting rules, or a 
15490 \family typewriter
15491 KOMAold.lco
15492 \family default
15493  that provides the default layout of the old 
15494 \family typewriter
15495 scrlettr
15496 \family default
15497  class.
15498  The latter can be loaded with the class option 
15499 \family typewriter
15500 KOMAold
15501 \family default
15502 , inserted via the 
15503 \family sans
15504 Layout\SpecialChar menuseparator
15505 Document\SpecialChar menuseparator
15506 Extra Options
15507 \family default
15508  field.
15509 \end_layout
15510
15511 \end_inset
15512
15513  Have a look at the 
15514 \emph on
15515 koma-letter2
15516 \emph default
15517  template that is included in \SpecialChar LyX
15518  for examples.
15519  A detailed description is to be found in the Koma-Script documentation
15520  (
15521 \emph on
15522 scrguide
15523 \emph default
15524 ).
15525 \end_layout
15526
15527 \begin_layout Subsection
15528 Problems
15529 \end_layout
15530
15531 \begin_layout Standard
15532 Visualizing the Koma-Script document classes in \SpecialChar LyX
15533 , the \SpecialChar LyX
15534  internals cause some
15535  problems.
15536 \end_layout
15537
15538 \begin_layout Itemize
15539 The chapter number of a 
15540 \family sans
15541 Chapter
15542 \family default
15543  type appears on a line of its own above the chapter heading instead of
15544  appearing in the same line ahead of it.
15545  The cause for that is the \SpecialChar LyX
15546  internal behavior for the labeltype 
15547 \family sans
15548 Counter_Chapter
15549 \family default
15550  in the layout file.
15551 \end_layout
15552
15553 \begin_layout Itemize
15554 The headings of the types 
15555 \family sans
15556 Addchap
15557 \family default
15558  and 
15559 \family sans
15560 Addsec
15561 \family default
15562  are only put in the 
15563 \begin_inset Quotes eld
15564 \end_inset
15565
15566 true
15567 \begin_inset Quotes erd
15568 \end_inset
15569
15570  \SpecialChar LaTeX
15571  table of contents, but not in the \SpecialChar LyX
15572  table of contents (
15573 \family sans
15574 Document\SpecialChar menuseparator
15575 Table
15576 \begin_inset space ~
15577 \end_inset
15578
15579 of
15580 \begin_inset space ~
15581 \end_inset
15582
15583 Contents
15584 \family default
15585 ).
15586 \end_layout
15587
15588 \begin_layout Itemize
15589 The paragraphs in a 
15590 \emph on
15591 letter
15592 \emph default
15593  document class appear in a skip separation mode, not indented.
15594  This is the standard behavior, no special \SpecialChar LaTeX
15595  commands are needed for that.
15596  But in the 
15597 \family sans
15598 Document\SpecialChar menuseparator
15599 Settings
15600 \family default
15601  dialog the corresponding radio button indicates 
15602 \family sans
15603 Indent
15604 \family default
15605 .
15606  A 
15607 \family sans
15608 Skip
15609 \family default
15610  value always has the effect that extra \SpecialChar LaTeX
15611  commands are inserted in the document
15612  to produce the gap, which is not what is wanted in this case.
15613 \end_layout
15614
15615 \begin_layout Section
15616 Memoir
15617 \end_layout
15618
15619 \begin_layout Standard
15620 By 
15621 \noun on
15622 Jürgen Spitzmüller
15623 \end_layout
15624
15625 \begin_layout Subsection
15626 Overview
15627 \end_layout
15628
15629 \begin_layout Standard
15630 Memoir is a very powerful and constantly evolving class.
15631  It has been designed with regard to fictional and non-fictional literature.
15632  Its aim is to let the user have maximum control over the typesetting of
15633  his document.
15634  Memoir is based on the standard book class, but it can also emulate the
15635  article class (see below).
15636 \end_layout
15637
15638 \begin_layout Standard
15639 Peter Wilson, the developer of Memoir, is known as the author of lots of
15640  useful packages in the \SpecialChar LaTeX
15641  world.
15642  Most of them have been merged with Memoir.
15643  Therefore, it is much easier to layout the table of contents, appendices,
15644  chapter designs and such.
15645  \SpecialChar LyX
15646 , though, does not support all of these goodies natively.
15647  Some of them might be added to forthcoming releases
15648 \begin_inset Foot
15649 status collapsed
15650
15651 \begin_layout Plain Layout
15652 You are invited to send suggestions to 
15653 \begin_inset Flex URL
15654 status collapsed
15655
15656 \begin_layout Plain Layout
15657
15658 lyx-devel@lists.lyx.org
15659 \end_layout
15660
15661 \end_inset
15662
15663 .
15664 \end_layout
15665
15666 \end_inset
15667
15668 , lots will probably never be supported, due to the limitations of \SpecialChar LyX
15669 's framework.
15670  Of course you can still use all features with the help of some native \SpecialChar LaTeX
15671
15672  commands (\SpecialChar TeX
15673  code
15674 \begin_inset Foot
15675 status collapsed
15676
15677 \begin_layout Plain Layout
15678 Cf.
15679 \begin_inset ERT
15680 status collapsed
15681
15682 \begin_layout Plain Layout
15683
15684
15685 \backslash
15686  
15687 \end_layout
15688
15689 \end_inset
15690
15691 section
15692 \begin_inset space ~
15693 \end_inset
15694
15695
15696 \begin_inset CommandInset ref
15697 LatexCommand ref
15698 reference "sec:Inserting-TeX-Code"
15699
15700 \end_inset
15701
15702  for details.
15703 \end_layout
15704
15705 \end_inset
15706
15707 ).
15708  In this section, we can only list those features that are natively supported
15709  by \SpecialChar LyX
15710 .
15711  For detailed descriptions (and for the rest of features) we recommend you
15712  have a look at the detailed manual of the Memoir class
15713 \begin_inset Foot
15714 status collapsed
15715
15716 \begin_layout Plain Layout
15717 Cf.
15718 \begin_inset ERT
15719 status collapsed
15720
15721 \begin_layout Plain Layout
15722
15723
15724 \backslash
15725  
15726 \end_layout
15727
15728 \end_inset
15729
15730
15731 \begin_inset Flex URL
15732 status collapsed
15733
15734 \begin_layout Plain Layout
15735
15736 CTAN:/macros/latex/memoir/memman.pdf
15737 \end_layout
15738
15739 \end_inset
15740
15741 .
15742 \end_layout
15743
15744 \end_inset
15745
15746 , which is not only a user guide for the class, but also both a comprehensive
15747  description on good typesetting and a superb example for good typesetting
15748  itself.
15749 \end_layout
15750
15751 \begin_layout Subsection
15752 Basic features and restrictions
15753 \end_layout
15754
15755 \begin_layout Standard
15756 Memoir supports basically all features of the standard book classes.
15757  There are, however, some differences, as follows:
15758 \end_layout
15759
15760 \begin_layout Description
15761 Font
15762 \begin_inset space ~
15763 \end_inset
15764
15765 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
15766 \end_layout
15767
15768 \begin_layout Description
15769 Page
15770 \begin_inset space ~
15771 \end_inset
15772
15773 style: The fancy page style is not supported, due to a command clash between
15774  Memoir and the fancyhdr package (they both define a command with the same
15775  name, which confuses \SpecialChar LaTeX
15776 ).
15777  Instead, Memoir comes with a number of its own page styles (see 
15778 \family sans
15779 Layout\SpecialChar menuseparator
15780 Document\SpecialChar menuseparator
15781 Page
15782 \begin_inset space ~
15783 \end_inset
15784
15785 Style
15786 \family default
15787 ).
15788  If you want to use these for the chapter pages, you have to use the command
15789  
15790 \family typewriter
15791
15792 \backslash
15793 chapterstyle
15794 \family default
15795  in the main text or in preamble (e.
15796 \begin_inset space \thinspace{}
15797 \end_inset
15798
15799 g.
15800 \begin_inset space \space{}
15801 \end_inset
15802
15803
15804 \family typewriter
15805
15806 \backslash
15807 chapterstyle{companion}
15808 \family default
15809 ).
15810 \end_layout
15811
15812 \begin_layout Description
15813 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
15814  optional argument in the standard classes.
15815  With this, you can specify an alternative version of the title for the
15816  table of contents and the headers (for instance, if the title is too long).
15817  In \SpecialChar LyX
15818 , you can do this via 
15819 \family sans
15820 Insert\SpecialChar menuseparator
15821 Short
15822 \begin_inset space ~
15823 \end_inset
15824
15825 Title
15826 \family default
15827  at the beginning of a chapter/section.
15828  Memoir features a second optional argument and thus separates the table
15829  of contents from the header.
15830  You can define three variants of a title with this: one for the main text,
15831  one for the table of contents, and one for the headers.
15832  Simply insert two optional arguments if you need this feature, the first
15833  one containing the short title for the Table of Contents, the second one
15834  containing an alternative short title for the headers.
15835 \end_layout
15836
15837 \begin_layout Description
15838 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
15839  of contents, the list of figures and the list of table start a new page
15840  automatically.
15841  Memoir does not follow this route.
15842  You have to insert a page break yourself, if you want to have one.
15843 \end_layout
15844
15845 \begin_layout Description
15846 Titlepage: For some unknown reason, Memoir uses pagination on the title
15847  page (in the standard classes, title pages are 
15848 \begin_inset Quotes eld
15849 \end_inset
15850
15851 empty
15852 \begin_inset Quotes erd
15853 \end_inset
15854
15855 ).
15856  If you want an empty title page, type 
15857 \family typewriter
15858
15859 \backslash
15860 aliaspagestyle{title}{empty}
15861 \family default
15862  in the preamble.
15863 \end_layout
15864
15865 \begin_layout Description
15866 Article: With the class option 
15867 \emph on
15868 article
15869 \emph default
15870  (to be inserted in 
15871 \family sans
15872 Layout\SpecialChar menuseparator
15873 Document\SpecialChar menuseparator
15874 Extra
15875 \begin_inset space ~
15876 \end_inset
15877
15878 Options
15879 \family default
15880 ), you can emulate article style.
15881  That is, counters (footnotes, figures, tables etc.) will not be reset on
15882  new chapters, chapters don't start a new page (but are—in contrary to 
15883 \begin_inset Quotes eld
15884 \end_inset
15885
15886 real
15887 \begin_inset Quotes erd
15888 \end_inset
15889
15890  article classes—still allowed), parts, though, use their own page, as in
15891  book.
15892 \end_layout
15893
15894 \begin_layout Description
15895 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
15896  font commands, which have been used in the old \SpecialChar LaTeX
15897  version 2.09 (e.
15898 \begin_inset space \thinspace{}
15899 \end_inset
15900
15901 g.
15902 \begin_inset space \space{}
15903 \end_inset
15904
15905
15906 \family typewriter
15907
15908 \backslash
15909 rm
15910 \family default
15911
15912 \family typewriter
15913
15914 \backslash
15915 it
15916 \family default
15917 ).
15918  It produces an error and stops \SpecialChar LaTeX
15919  whenever such a command appears.
15920  The class option 
15921 \emph on
15922 oldfontcommands
15923 \emph default
15924  reallows the commands and spits out warnings instead (which does at least
15925  not stop \SpecialChar LaTeX
15926 ).
15927  Since a lot of packages and particularly Bib\SpecialChar TeX
15928  style files are still using
15929  those commands, we have decided to use this option by default.
15930 \end_layout
15931
15932 \begin_layout Subsection
15933 Extra features
15934 \end_layout
15935
15936 \begin_layout Standard
15937 We will only describe the features supported by \SpecialChar LyX
15938  (which is not much currently).
15939  Please consult the Memoir manual
15940 \begin_inset Foot
15941 status collapsed
15942
15943 \begin_layout Plain Layout
15944 Cf.
15945 \begin_inset ERT
15946 status collapsed
15947
15948 \begin_layout Plain Layout
15949
15950
15951 \backslash
15952  
15953 \end_layout
15954
15955 \end_inset
15956
15957
15958 \begin_inset Flex URL
15959 status collapsed
15960
15961 \begin_layout Plain Layout
15962
15963 CTAN:/macros/latex/memoir/memman.pdf
15964 \end_layout
15965
15966 \end_inset
15967
15968 .
15969 \end_layout
15970
15971 \end_inset
15972
15973  for details.
15974 \end_layout
15975
15976 \begin_layout Description
15977 Abstract: You may wonder why an abstract is an extra feature.
15978  Well, it is in book class.
15979  Usually books don't have abstracts.
15980  Memoir, however, has.
15981  You can use it wherever and how often you like.
15982 \end_layout
15983
15984 \begin_layout Description
15985 Chapterprecis: You may know this older typesetting style: The contents of
15986  a chapter are summarized below the title and also in the table of contents
15987  (e.
15988 \begin_inset space \thinspace{}
15989 \end_inset
15990
15991 g.
15992 \begin_inset space \space{}
15993 \end_inset
15994
15995
15996 \emph on
15997 Our hero arrives in Troia; he loses some friends; he finds others
15998 \emph default
15999 ).
16000  Chapterprecis does exactly this.
16001  It is therefore only sensible below a chapter.
16002 \end_layout
16003
16004 \begin_layout Description
16005 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
16006  The epigraph environment provides an elegant way of typesetting such a
16007  motto.
16008  The motto itself (text) and its author (source) are divided by a short
16009  line.
16010  Unfortunately, we have to fool \SpecialChar LyX
16011  a bit here again, since the environment
16012  needs two arguments (text and source).
16013  In this case, we have to use curly brackets (in \SpecialChar TeX
16014  mode) between the two
16015  arguments: 
16016 \emph on
16017 <smart slogan>
16018 \emph default
16019  
16020 \family typewriter
16021 }{
16022 \family default
16023  
16024 \emph on
16025 <author of the slogan>.
16026 \end_layout
16027
16028 \begin_layout Description
16029 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
16030  complex figurative poems).
16031  \SpecialChar LyX
16032  can only support a few of them.
16033  One is poemtitle, which is a centered title for poems, which will also
16034  be added to the table of contents (verse is the standard environment for
16035  poems.
16036  Memoir has some enhanced versions of verse, but you need to use \SpecialChar TeX
16037  code,
16038  because they have to be nested inside regular verse environments, which
16039  is not possible with \SpecialChar LyX
16040 ).
16041 \end_layout
16042
16043 \begin_layout Description
16044 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
16045 \end_layout
16046
16047 \begin_layout Section
16048 Article (mwart), book (mwbk) and report (mwrep)
16049 \begin_inset Argument status
16050 status collapsed
16051
16052 \begin_layout Plain Layout
16053 The 
16054 \family typewriter
16055 mw
16056 \family default
16057  Classes
16058 \end_layout
16059
16060 \end_inset
16061
16062
16063 \end_layout
16064
16065 \begin_layout Standard
16066 by 
16067 \noun on
16068 Tomasz Luczak
16069 \end_layout
16070
16071 \begin_layout Standard
16072 The \SpecialChar LyX
16073  document classes 
16074 \emph on
16075 article (mwart)
16076 \emph default
16077
16078 \emph on
16079 report (mwrep)
16080 \emph default
16081  and 
16082 \emph on
16083 book
16084 \emph default
16085  
16086 \emph on
16087 (mwbk)
16088 \emph default
16089  correspond to the \SpecialChar LaTeX
16090  document classes 
16091 \family typewriter
16092 mwart.cls
16093 \family default
16094
16095 \family typewriter
16096 mwrep.cls
16097 \family default
16098  and 
16099 \family typewriter
16100 mwbk.cls
16101 \family default
16102 , resp.
16103  They are replacements for the standard document classes 
16104 \family typewriter
16105 article.cls
16106 \family default
16107
16108 \family typewriter
16109 report.cls
16110 \family default
16111  and 
16112 \family typewriter
16113 book.cls
16114 \family default
16115 , resp., and fit better to Polish typography conventions in a number of points.
16116  
16117 \end_layout
16118
16119 \begin_layout Standard
16120 Basic differences:
16121 \end_layout
16122
16123 \begin_layout Itemize
16124 Unnumbered titles (with star, e.
16125 \begin_inset space \thinspace{}
16126 \end_inset
16127
16128 g.
16129 \begin_inset space \space{}
16130 \end_inset
16131
16132
16133 \family sans
16134 Section*
16135 \family default
16136 ) are added into table of contents,
16137 \end_layout
16138
16139 \begin_layout Itemize
16140 Additional page styles:
16141 \end_layout
16142
16143 \begin_deeper
16144 \begin_layout Description
16145 uheadings header with separated lines,
16146 \end_layout
16147
16148 \begin_layout Description
16149 myheadings custom header, contents headers via commands: 
16150 \family typewriter
16151
16152 \backslash
16153 markright
16154 \family default
16155  and 
16156 \family typewriter
16157
16158 \backslash
16159 markboth
16160 \family default
16161 ,
16162 \end_layout
16163
16164 \begin_layout Description
16165 myuheadings custom header with separated lines,
16166 \end_layout
16167
16168 \begin_layout Description
16169 outer page number is placed on outer side of page
16170 \end_layout
16171
16172 \end_deeper
16173 \begin_layout Itemize
16174 Options 
16175 \end_layout
16176
16177 \begin_deeper
16178 \begin_layout Description
16179 rmheadings serif titles — default,
16180 \end_layout
16181
16182 \begin_layout Description
16183 sfheadings sansserif titles,
16184 \end_layout
16185
16186 \begin_layout Description
16187 authortitle on title page first placed is author next title — default,
16188 \end_layout
16189
16190 \begin_layout Description
16191 titleauthor on title page first placed is title next author,
16192 \end_layout
16193
16194 \begin_layout Description
16195 withmarginpar reserve place on page for margins.
16196 \end_layout
16197
16198 \end_deeper
16199 \begin_layout Section
16200 Paper
16201 \end_layout
16202
16203 \begin_layout Standard
16204 The document class 
16205 \family sans
16206 paper
16207 \family default
16208  provides an alternative to the standard 
16209 \family sans
16210 article
16211 \family default
16212  class.
16213  It provides similar functionality, but you might prefer this layout with
16214  sans serif sections, headings, and more.
16215 \end_layout
16216
16217 \begin_layout Section
16218 Rev\SpecialChar TeX
16219 4
16220 \end_layout
16221
16222 \begin_layout Standard
16223 by 
16224 \noun on
16225 Amir Karger
16226 \end_layout
16227
16228 \begin_layout Standard
16229 \begin_inset VSpace bigskip
16230 \end_inset
16231
16232
16233 \end_layout
16234
16235 \begin_layout Standard
16236 \noindent
16237 The 
16238 \family sans
16239 Revtex
16240 \begin_inset space ~
16241 \end_inset
16242
16243 4
16244 \family default
16245  textclass works with the American Physical Sociey's Rev\SpecialChar TeX
16246  4.0 (the 
16247 \begin_inset Formula $\beta$
16248 \end_inset
16249
16250  release of May, 1999) class.
16251 \end_layout
16252
16253 \begin_layout Standard
16254 \SpecialChar LyX
16255  has a 
16256 \family sans
16257 Revtex
16258 \family default
16259  textclass, which works with Rev\SpecialChar TeX
16260  3.1.
16261  However, v3.1 is basically obsolete, as it works with \SpecialChar LaTeX
16262  2.09.
16263  That means that it doesn't interact very well with \SpecialChar LyX
16264 , which requires \SpecialChar LaTeX2e
16265 , although
16266  it has been kludged to work.
16267  Since Rev\SpecialChar TeX
16268  4.0 has been designed to work much more cleanly with \SpecialChar LaTeX2e
16269 , \SpecialChar LyX
16270  with the
16271  
16272 \family sans
16273 Rev\SpecialChar TeX
16274
16275 \begin_inset space ~
16276 \end_inset
16277
16278 4
16279 \family default
16280  textclass should also be pretty easy to use.
16281 \end_layout
16282
16283 \begin_layout Standard
16284 These documents are supposed to be used in 
16285 \emph on
16286 addition
16287 \emph default
16288  to the Rev\SpecialChar TeX
16289  4.0 documents, so we don't describe any of the special Rev\SpecialChar TeX
16290  macros,
16291  and assume you'll know what to put in the preamble if necessary.
16292 \end_layout
16293
16294 \begin_layout Subsection
16295 Installation
16296 \end_layout
16297
16298 \begin_layout Standard
16299 All you need to do is install Rev\SpecialChar TeX
16300  4, as described in the package's README
16301  file.
16302  The package can be found at The Rev\SpecialChar TeX
16303  4 Web Site 
16304 \begin_inset Flex URL
16305 status collapsed
16306
16307 \begin_layout Plain Layout
16308
16309 http://publish.aps.org/revtex4/
16310 \end_layout
16311
16312 \end_inset
16313
16314 .
16315  Install it somewhere that \SpecialChar LaTeX
16316  can see it.
16317  Test it by trying to \SpecialChar LaTeX
16318  a short Rev\SpecialChar TeX
16319  4 document in some random directory (i.
16320 \begin_inset space \thinspace{}
16321 \end_inset
16322
16323 e.
16324 \begin_inset space \space{}
16325 \end_inset
16326
16327 not the directory where you installed the class file.) Then, if you reconfigure
16328  \SpecialChar LyX
16329 , it will find the class file and let you use the Rev\SpecialChar TeX
16330 4 textclass.
16331 \end_layout
16332
16333 \begin_layout Standard
16334 Probably the easiest way to get started is either to import a Rev\SpecialChar TeX
16335  4 document
16336  using 
16337 \family typewriter
16338 tex2lyx
16339 \family default
16340 , or to use the 
16341 \family sans
16342 Revtex
16343 \begin_inset space ~
16344 \end_inset
16345
16346 4
16347 \family default
16348  template, found in the templates directory.
16349 \end_layout
16350
16351 \begin_layout Subsection
16352 Preamble Matter
16353 \end_layout
16354
16355 \begin_layout Standard
16356 Optional arguments to 
16357 \family typewriter
16358
16359 \backslash
16360 documentclass
16361 \family default
16362 , like 
16363 \begin_inset Quotes eld
16364 \end_inset
16365
16366 preprint
16367 \begin_inset Quotes erd
16368 \end_inset
16369
16370  and 
16371 \begin_inset Quotes eld
16372 \end_inset
16373
16374 aps
16375 \begin_inset Quotes erd
16376 \end_inset
16377
16378 , go in the 
16379 \family sans
16380 Extra
16381 \begin_inset space ~
16382 \end_inset
16383
16384 Options
16385 \family default
16386  field in the 
16387 \family sans
16388 Document
16389 \begin_inset space ~
16390 \end_inset
16391
16392 Layout
16393 \family default
16394  dialog, as usual.
16395  Remember that in Rev\SpecialChar TeX
16396 , at least one optional argument is required! 
16397 \end_layout
16398
16399 \begin_layout Standard
16400 Other preamble matter, like 
16401 \family typewriter
16402
16403 \backslash
16404 draft
16405 \family default
16406  etc.
16407 \begin_inset space ~
16408 \end_inset
16409
16410 goes in the 
16411 \family sans
16412 \SpecialChar LaTeX
16413
16414 \begin_inset space ~
16415 \end_inset
16416
16417 Preamble
16418 \family default
16419  dialog, also as usual.
16420 \end_layout
16421
16422 \begin_layout Subsection
16423 Layouts
16424 \end_layout
16425
16426 \begin_layout Standard
16427 The layouts basically correspond to the commands in Rev\SpecialChar TeX
16428 4.0.
16429  For example, the Email layout corresponds to 
16430 \family typewriter
16431
16432 \backslash
16433 email{}
16434 \family default
16435 .
16436  Note that (at least as of Rev\SpecialChar TeX
16437  4.0 Beta), the 
16438 \family sans
16439 Address
16440 \family default
16441  and 
16442 \family sans
16443 Affiliation
16444 \family default
16445  layouts are exactly equivalent, so you shouldn't need to use both.
16446 \begin_inset Foot
16447 status collapsed
16448
16449 \begin_layout Plain Layout
16450 In case you're curious, both were included so that 
16451 \family typewriter
16452 tex2lyx
16453 \family default
16454  would be able to translate both 
16455 \family typewriter
16456
16457 \backslash
16458 address
16459 \family default
16460  and 
16461 \family typewriter
16462
16463 \backslash
16464 affiliation
16465 \family default
16466 .
16467 \end_layout
16468
16469 \end_inset
16470
16471
16472 \end_layout
16473
16474 \begin_layout Subsection
16475 Important Notes
16476 \end_layout
16477
16478 \begin_layout Standard
16479 There are a couple of important unique aspects of Rev\SpecialChar TeX
16480  4 which might cause
16481  bugs that will be even more confusing in \SpecialChar LyX
16482 .
16483 \end_layout
16484
16485 \begin_layout Standard
16486 In Rev\SpecialChar TeX
16487 , the 
16488 \family typewriter
16489
16490 \backslash
16491 thanks
16492 \family default
16493  command goes 
16494 \emph on
16495 outside
16496 \emph default
16497  the 
16498 \family typewriter
16499
16500 \backslash
16501 author
16502 \family default
16503  command.
16504  The \SpecialChar LyX
16505  equivalent is that there is a separate Thanks layout.
16506  Do 
16507 \emph on
16508 not
16509 \emph default
16510  write footnotes in the 
16511 \family sans
16512 Author
16513 \family default
16514  layout, or weird things may happen.
16515  See the Rev\SpecialChar TeX
16516  4 documentation for more details.
16517 \end_layout
16518
16519 \begin_layout Standard
16520 Also, the 
16521 \family sans
16522 Author
16523 \begin_inset space ~
16524 \end_inset
16525
16526 Email
16527 \family default
16528
16529 \family sans
16530 Author
16531 \begin_inset space ~
16532 \end_inset
16533
16534 URL
16535 \family default
16536 , and 
16537 \family sans
16538 Thanks
16539 \family default
16540  layouts must be placed 
16541 \emph on
16542 in between
16543 \emph default
16544  the 
16545 \family sans
16546 Author
16547 \family default
16548  layout and the corresponding 
16549 \family sans
16550 Address
16551 \family default
16552  (or equivalent 
16553 \family sans
16554 Affiliation
16555 \family default
16556 ) layout.
16557  If you put the 
16558 \family sans
16559 Thanks
16560 \family default
16561  after the 
16562 \family sans
16563 Address
16564 \family default
16565 , the \SpecialChar LaTeX
16566  won't compile.
16567 \end_layout
16568
16569 \begin_layout Subsection
16570 Drawbacks
16571 \end_layout
16572
16573 \begin_layout Standard
16574 The main problem with this layout is that you can't use the optional arguments
16575  to layouts like Email and Title.
16576  (The problem is not unique to this layout; you can't use optional arguments
16577  to the Section layouts either.) This means that after you export that file
16578  to \SpecialChar LaTeX
16579  (which you'll need to do eventually to send it in to APS), you'll need
16580  to edit the \SpecialChar LaTeX
16581  file with a text editor to add the optional arguments to set,
16582  e.
16583 \begin_inset space \thinspace{}
16584 \end_inset
16585
16586 g.
16587 \begin_inset space \space{}
16588 \end_inset
16589
16590 the running title for the page headers.
16591  Lacking these layouts makes the 
16592 \family typewriter
16593
16594 \backslash
16595 altaffiliation
16596 \family default
16597  (and the equivalent 
16598 \family typewriter
16599
16600 \backslash
16601 altaddress
16602 \family default
16603 ) useless, so the corresponding layouts don't exist, and will have to be
16604  added by hand.
16605 \begin_inset Foot
16606 status collapsed
16607
16608 \begin_layout Plain Layout
16609
16610 \emph on
16611 Note from JMarc:
16612 \emph default
16613  actually, \SpecialChar LyX
16614  1.3.0 supports some forms of optional arguments, but this layout
16615  has not been updated yet to take advantage of it.
16616 \end_layout
16617
16618 \end_inset
16619
16620  
16621 \end_layout
16622
16623 \begin_layout Section
16624 Springer Journals (
16625 \family sans
16626 svjour
16627 \family default
16628 )
16629 \end_layout
16630
16631 \begin_layout Standard
16632 by 
16633 \noun on
16634 Martin Vermeer
16635 \end_layout
16636
16637 \begin_layout Subsection
16638 Description
16639 \end_layout
16640
16641 \begin_layout Standard
16642 These are the layout files for some of the journal formats used by Springer
16643  Verlag and listed on 
16644 \begin_inset Flex URL
16645 status collapsed
16646
16647 \begin_layout Plain Layout
16648
16649 http://www.springer.de/author/tex/help-journals.html
16650 \end_layout
16651
16652 \end_inset
16653
16654 , where you should also go to fetch the class files (yes, these are \SpecialChar LaTeX2e
16655  now!).
16656  It is a modular system: the things common to all journals are implemented
16657  in 
16658 \family typewriter
16659 svjour.inc
16660 \family default
16661 , which journal-specific layout files (such as, e.
16662 \begin_inset space \thinspace{}
16663 \end_inset
16664
16665 g.
16666 \begin_inset space \space{}
16667 \end_inset
16668
16669
16670 \family typewriter
16671 svjog.layout
16672 \family default
16673  for Journal of Geodesy) can include.
16674 \end_layout
16675
16676 \begin_layout Standard
16677 This means that implementing support for any other Springer journal on this
16678  list is as simple as writing your own 
16679 \family typewriter
16680 sv
16681 \family default
16682 <myjournal>
16683 \family typewriter
16684 .layout
16685 \family default
16686  file following the outline given in 
16687 \family typewriter
16688 svjog.layout
16689 \family default
16690 .
16691  
16692 \end_layout
16693
16694 \begin_layout Standard
16695 It is reasonably well tested only for the Journal of Geodesy.
16696  
16697 \family typewriter
16698 svjour
16699 \family default
16700  and 
16701 \family typewriter
16702 svjog
16703 \family default
16704  come with the standard \SpecialChar LyX
16705  distribution.
16706  Install the relevant class file (downloaded from Springer) in a proper
16707  directory, reconfigure \SpecialChar LaTeX
16708  (in the te\SpecialChar TeX
16709  case by running 
16710 \family typewriter
16711 texhash
16712 \family default
16713 , as root if necessary — doesn't \SpecialChar LyX
16714  take care of this?), reconfigure \SpecialChar LyX
16715  and
16716  it should work.
16717 \end_layout
16718
16719 \begin_layout Subsection
16720 New styles
16721 \end_layout
16722
16723 \begin_layout Standard
16724 A large number of theorem-like styles — 
16725 \family sans
16726 Claim, Conjecture,
16727 \family default
16728  
16729 \family sans
16730 \SpecialChar ldots
16731 Theorem
16732 \family default
16733 .
16734 \end_layout
16735
16736 \begin_layout Standard
16737
16738 \family sans
16739 Headnote, Dedication, Subtitle, Running_\SpecialChar LaTeX
16740 _Title, Author_Running, Institute,
16741  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
16742 \family default
16743 .
16744  See the Springer class file documentation for details.
16745 \end_layout
16746
16747 \begin_layout Subsection
16748 Supported journals
16749 \end_layout
16750
16751 \begin_layout Itemize
16752
16753 \emph on
16754 Journal of Geodesy
16755 \emph default
16756
16757 \family typewriter
16758 svjog.layout
16759 \family default
16760  — Martin Vermeer
16761 \end_layout
16762
16763 \begin_layout Itemize
16764
16765 \emph on
16766 Probability Theory and Related Fields
16767 \emph default
16768
16769 \family typewriter
16770 svprobth.layout
16771 \family default
16772  — Jean-Marc Lasgouttes
16773 \end_layout
16774
16775 \begin_layout Standard
16776 Add your own, it isn't so hard!
16777 \end_layout
16778
16779 \begin_layout Subsection
16780 Credits
16781 \end_layout
16782
16783 \begin_layout Standard
16784 These files are partly based on the older 
16785 \family typewriter
16786 ejour2.layout
16787 \family default
16788 , which was again based on a tinkered-with version of an old \SpecialChar LaTeX
16789  2.09 style
16790  file from Springer.
16791  All this, and the 
16792 \family typewriter
16793 ejour2
16794 \family default
16795  layout, are now defunct.
16796  Jean-Marc Lasgouttes helped out big in making me find my way around the
16797  \SpecialChar LyX
16798  layout file mechanism.
16799 \end_layout
16800
16801 \begin_layout Subsection
16802 Bugs
16803 \end_layout
16804
16805 \begin_layout Standard
16806 Probably.
16807  But probably less than in the old hacked-\SpecialChar LaTeX
16808  
16809 \family typewriter
16810 ejour2
16811 \family default
16812 .
16813 \end_layout
16814
16815 \begin_layout Standard
16816 Limitations e.
16817 \begin_inset space \thinspace{}
16818 \end_inset
16819
16820 g.: does not display the number for theorem-like layouts, just #.
16821 \end_layout
16822
16823 \begin_layout Section
16824 Slides [aka 
16825 \noun on
16826 Sli\SpecialChar TeX
16827
16828 \noun default
16829 ]
16830 \begin_inset CommandInset label
16831 LatexCommand label
16832 name "sec:slitex"
16833
16834 \end_inset
16835
16836
16837 \end_layout
16838
16839 \begin_layout Standard
16840 by 
16841 \noun on
16842 John Weiss
16843 \noun default
16844  
16845 \end_layout
16846
16847 \begin_layout Subsection
16848 Introduction
16849 \end_layout
16850
16851 \begin_layout Standard
16852 This section describes how to use \SpecialChar LyX
16853  to make slides for overhead projectors.
16854  There are two document classes that can do this: the default slides class
16855  and the 
16856 \family sans
16857 Foil\SpecialChar TeX
16858
16859 \family default
16860  slides class.
16861  This section documents the former.
16862 \end_layout
16863
16864 \begin_layout Standard
16865 I'm going to say this again, nice and clear, so that there's no misunderstanding
16866 :
16867 \end_layout
16868
16869 \begin_layout Standard
16870 \begin_inset VSpace bigskip
16871 \end_inset
16872
16873
16874 \end_layout
16875
16876 \begin_layout Standard
16877 \align center
16878
16879 \size large
16880 This section documents the class 
16881 \begin_inset Quotes eld
16882 \end_inset
16883
16884
16885 \family sans
16886 slides (default)
16887 \family default
16888
16889 \begin_inset Quotes erd
16890 \end_inset
16891
16892  
16893 \emph on
16894 only.
16895 \end_layout
16896
16897 \begin_layout Standard
16898 \begin_inset VSpace bigskip
16899 \end_inset
16900
16901
16902 \end_layout
16903
16904 \begin_layout Standard
16905 If you're looking for the documentation for 
16906 \begin_inset Quotes eld
16907 \end_inset
16908
16909
16910 \family sans
16911 slides (Foil\SpecialChar TeX
16912 )
16913 \family default
16914
16915 \begin_inset Quotes erd
16916 \end_inset
16917
16918 , check out section
16919 \begin_inset space ~
16920 \end_inset
16921
16922
16923 \begin_inset CommandInset ref
16924 LatexCommand ref
16925 reference "sec:foiltex"
16926
16927 \end_inset
16928
16929 .
16930  The 
16931 \family sans
16932 foils
16933 \family default
16934  class [
16935 \begin_inset Quotes eld
16936 \end_inset
16937
16938
16939 \family sans
16940 slides (Foil\SpecialChar TeX
16941 )
16942 \family default
16943
16944 \begin_inset Quotes erd
16945 \end_inset
16946
16947 ] is actually somewhat better than the default 
16948 \family sans
16949 slides
16950 \family default
16951  class,
16952 \begin_inset Foot
16953 status collapsed
16954
16955 \begin_layout Plain Layout
16956 \SpecialChar ldots
16957 or so I've been told repeatedly by its advocates.
16958  Having never used it, I have no idea if this claim is true or not.
16959 \end_layout
16960
16961 \end_inset
16962
16963  which this section documents.
16964 \end_layout
16965
16966 \begin_layout Standard
16967 This class is the \SpecialChar LaTeX2e
16968  improvement of the old 
16969 \noun on
16970 Sli\SpecialChar TeX
16971
16972 \noun default
16973  package.
16974  Every \SpecialChar LaTeX2e
16975  distribution includes this class [which I'll just refer to as 
16976 \begin_inset Quotes eld
16977 \end_inset
16978
16979
16980 \family sans
16981 slides
16982 \family default
16983
16984 \begin_inset Quotes erd
16985 \end_inset
16986
16987  from now on], so you're bound to have it.
16988  As I noted earlier, there are other classes, such as 
16989 \family sans
16990 foils
16991 \family default
16992 , which also produce slides for overhead projectors and do a better job
16993  at it.
16994  However, there are some things which 
16995 \family sans
16996 slides
16997 \family default
16998  can do which the others can't, such as generate overlays.
16999  Read on to learn more!
17000 \end_layout
17001
17002 \begin_layout Subsection
17003 Getting Started
17004 \begin_inset CommandInset label
17005 LatexCommand label
17006 name "sec:slidesetup"
17007
17008 \end_inset
17009
17010
17011 \end_layout
17012
17013 \begin_layout Standard
17014 Obviously, to use this document class, you need to select 
17015 \begin_inset Quotes eld
17016 \end_inset
17017
17018
17019 \family sans
17020 slides (default)
17021 \family default
17022
17023 \begin_inset Quotes erd
17024 \end_inset
17025
17026  from the class list in the 
17027 \family sans
17028 Document\SpecialChar menuseparator
17029 Settings
17030 \family default
17031  dialog.
17032  There are some other special things you should know about this class:
17033 \end_layout
17034
17035 \begin_layout Itemize
17036 Don't bother changing the options 
17037 \family sans
17038 Sides and Columns
17039 \family default
17040 .
17041  They're not supported by the 
17042 \family sans
17043 slides
17044 \family default
17045  class, anyways.
17046 \end_layout
17047
17048 \begin_layout Itemize
17049 The option 
17050 \family sans
17051 Page
17052 \begin_inset space ~
17053 \end_inset
17054
17055 style
17056 \family default
17057  behaves a bit differently for this class.
17058  The possible choices and what they do are as follows:
17059 \end_layout
17060
17061 \begin_deeper
17062 \begin_layout Description
17063
17064 \family sans
17065 plain
17066 \family default
17067  The final output contains page numbers in the lower right corner.
17068 \end_layout
17069
17070 \begin_layout Description
17071
17072 \family sans
17073 headings
17074 \family default
17075  Like 
17076 \family sans
17077 plain
17078 \family default
17079 , but also prints out any time markers you've put in.
17080  This is the default.
17081 \end_layout
17082
17083 \begin_layout Description
17084
17085 \family sans
17086 empty
17087 \family default
17088  The final output contains no page numbers, time markers, or alignment markers.
17089 \end_layout
17090
17091 \end_deeper
17092 \begin_layout Itemize
17093 The 
17094 \family sans
17095 slides
17096 \family default
17097  class has an extra option: 
17098 \family typewriter
17099 clock
17100 \family default
17101 .
17102  To use it, put 
17103 \begin_inset Quotes eld
17104 \end_inset
17105
17106
17107 \family typewriter
17108 clock
17109 \family default
17110
17111 \begin_inset Quotes erd
17112 \end_inset
17113
17114  in the extra class options.
17115 \end_layout
17116
17117 \begin_deeper
17118 \begin_layout Standard
17119 Using this options allows you to add time markers to 
17120 \family sans
17121 Note
17122 \family default
17123 s.
17124  See section
17125 \begin_inset space ~
17126 \end_inset
17127
17128
17129 \begin_inset CommandInset ref
17130 LatexCommand ref
17131 reference "sec:slideNote"
17132
17133 \end_inset
17134
17135  for more details.
17136 \end_layout
17137
17138 \end_deeper
17139 \begin_layout Standard
17140 You can also use the template file 
17141 \begin_inset Quotes eld
17142 \end_inset
17143
17144
17145 \family typewriter
17146 slides.lyx
17147 \family default
17148
17149 \begin_inset Quotes erd
17150 \end_inset
17151
17152  to automatically set up a document to use the 
17153 \family sans
17154 slides
17155 \family default
17156  class [using 
17157 \family sans
17158 File\SpecialChar menuseparator
17159 New
17160 \begin_inset space ~
17161 \end_inset
17162
17163 from
17164 \begin_inset space ~
17165 \end_inset
17166
17167 Template
17168 \family default
17169  to open your new document].
17170  The template file also contains some examples of the special paragraph
17171  environments used by this class.
17172  I'll describe those next.
17173 \end_layout
17174
17175 \begin_layout Subsection
17176 Paragraph Environments
17177 \end_layout
17178
17179 \begin_layout Subsubsection
17180 Supported Environments
17181 \end_layout
17182
17183 \begin_layout Standard
17184 The first thing you'll notice when you start up a new 
17185 \family sans
17186 slides
17187 \family default
17188  document is the font size and type: it's the equivalent of the size 
17189 \begin_inset Quotes eld
17190 \end_inset
17191
17192
17193 \family sans
17194 Largest
17195 \family default
17196
17197 \begin_inset Quotes erd
17198 \end_inset
17199
17200  in the 
17201 \family sans
17202 Sans
17203 \begin_inset space ~
17204 \end_inset
17205
17206 Serif
17207 \family default
17208  font.
17209  This is also what's used in the output.
17210  Think of this as a 
17211 \begin_inset Quotes eld
17212 \end_inset
17213
17214 visual cue
17215 \begin_inset Quotes erd
17216 \end_inset
17217
17218  to remind you that this is a slide.
17219  Your final slides will use a larger font; ergo, you'll have less space.
17220  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
17221 \end_layout
17222
17223 \begin_layout Standard
17224 The next thing that becomes obvious is the changes to the paragraph environment
17225  pull-down box [at the far-left end of the toolbar].
17226  Most of the paragraph environments you're used to seeing are missing.
17227  There are also five new ones.
17228  That's because the 
17229 \family sans
17230 slides
17231 \family default
17232  class itself only supports certain paragraph environments:
17233 \end_layout
17234
17235 \begin_layout Itemize
17236
17237 \family sans
17238 Standard
17239 \end_layout
17240
17241 \begin_layout Itemize
17242
17243 \family sans
17244 Itemize
17245 \end_layout
17246
17247 \begin_layout Itemize
17248
17249 \family sans
17250 Enumerate
17251 \end_layout
17252
17253 \begin_layout Itemize
17254
17255 \family sans
17256 Description
17257 \end_layout
17258
17259 \begin_layout Itemize
17260
17261 \family sans
17262 List
17263 \end_layout
17264
17265 \begin_layout Itemize
17266
17267 \family sans
17268 Quotation
17269 \end_layout
17270
17271 \begin_layout Itemize
17272
17273 \family sans
17274 Quote
17275 \end_layout
17276
17277 \begin_layout Itemize
17278
17279 \family sans
17280 Verse
17281 \end_layout
17282
17283 \begin_layout Itemize
17284
17285 \family sans
17286 Caption
17287 \end_layout
17288
17289 \begin_layout Itemize
17290
17291 \family sans
17292 \SpecialChar LyX
17293 -Code
17294 \end_layout
17295
17296 \begin_layout Itemize
17297
17298 \family sans
17299 Comment
17300 \end_layout
17301
17302 \begin_layout Standard
17303 All of the other standard environments, including the section-heading environmen
17304 ts, aren't used in the 
17305 \family sans
17306 slides
17307 \family default
17308  class.
17309 \end_layout
17310
17311 \begin_layout Standard
17312 On the other hand, you'll notice the following new environments:
17313 \end_layout
17314
17315 \begin_layout Itemize
17316
17317 \family sans
17318 Slide
17319 \end_layout
17320
17321 \begin_layout Itemize
17322
17323 \family sans
17324 Overlay
17325 \end_layout
17326
17327 \begin_layout Itemize
17328
17329 \family sans
17330 Note
17331 \end_layout
17332
17333 \begin_layout Itemize
17334
17335 \family sans
17336 InvisibleText
17337 \end_layout
17338
17339 \begin_layout Itemize
17340
17341 \family sans
17342 VisibleText
17343 \end_layout
17344
17345 \begin_layout Standard
17346 These five are kind of quirky, due to a 
17347 \begin_inset Quotes eld
17348 \end_inset
17349
17350 feature
17351 \begin_inset Quotes erd
17352 \end_inset
17353
17354  in \SpecialChar LyX
17355 .
17356  You see, \SpecialChar LyX
17357  doesn't permit you to nest any other paragraph environment into
17358  an empty environment.
17359  Now, that's fine and dandy, but it means that you wouldn't be able to start
17360  a slide with anything except plain text.
17361  To deal with this, I've performed a little 
17362 \begin_inset Quotes eld
17363 \end_inset
17364
17365 \SpecialChar LaTeX
17366  magic.
17367 \begin_inset Quotes erd
17368 \end_inset
17369
17370  
17371 \end_layout
17372
17373 \begin_layout Subsubsection
17374 Quirks of the New Environments
17375 \begin_inset CommandInset label
17376 LatexCommand label
17377 name "sec:slideQuirk"
17378
17379 \end_inset
17380
17381
17382 \end_layout
17383
17384 \begin_layout Standard
17385 All five of the new paragraph environments are somewhat quirky due to inherent
17386  limitiations in the current version of \SpecialChar LyX
17387 .
17388  As I just mentioned, \SpecialChar LyX
17389  forbids environments that begin with another environment.
17390  To get around this, the 
17391 \family sans
17392 Slide
17393 \family default
17394  environment isn't a paragraph environment as described in the 
17395 \emph on
17396 User's Guide
17397 \emph default
17398 .
17399  
17400 \end_layout
17401
17402 \begin_layout Standard
17403 You should consider 
17404 \family sans
17405 Slide
17406 \family default
17407
17408 \family sans
17409 Overlay
17410 \family default
17411 , and 
17412 \family sans
17413 Note
17414 \family default
17415  to be 
17416 \begin_inset Quotes eld
17417 \end_inset
17418
17419 pseudo-environments.
17420 \begin_inset Quotes erd
17421 \end_inset
17422
17423  They look like a section heading or a 
17424 \begin_inset Quotes eld
17425 \end_inset
17426
17427
17428 \family sans
17429 Caption
17430 \family default
17431 ,
17432 \begin_inset Quotes erd
17433 \end_inset
17434
17435  but really begin a [and, if necessary, end the previous] paragraph environment.
17436  Likewise, treat 
17437 \family sans
17438 InvisibleText
17439 \family default
17440  and 
17441 \family sans
17442 VisibleText
17443 \family default
17444  as 
17445 \begin_inset Quotes eld
17446 \end_inset
17447
17448 pseudo-commands.
17449 \begin_inset Quotes erd
17450 \end_inset
17451
17452  These two perform some action.
17453 \end_layout
17454
17455 \begin_layout Standard
17456 A common feature of all five environments, 
17457 \family sans
17458 Slide
17459 \family default
17460
17461 \family sans
17462 Overlay
17463 \family default
17464
17465 \family sans
17466 Note
17467 \family default
17468
17469 \family sans
17470 InvisibleText
17471 \family default
17472  and 
17473 \family sans
17474 VisibleText
17475 \family default
17476 , is a rather long-ish label.
17477  The text following this label — ordinarily the contents of the paragraph
17478  environment — is utterly irrelevant for 
17479 \family sans
17480 Slide
17481 \family default
17482
17483 \family sans
17484 Overlay
17485 \family default
17486
17487 \family sans
17488 Note
17489 \family default
17490
17491 \family sans
17492 InvisibleText
17493 \family default
17494  and 
17495 \family sans
17496 VisibleText
17497 \family default
17498 .
17499  \SpecialChar LyX
17500  completely ignores it.
17501  In fact, you can leave these five environments completely empty.
17502  
17503 \end_layout
17504
17505 \begin_layout Standard
17506 While you don't 
17507 \emph on
17508 have
17509 \emph default
17510  to put any text after the rather long-ish label, you might want to.
17511  This could be a short description of the contents of the 
17512 \family sans
17513 Slide
17514 \family default
17515 , for example.
17516  In that case, enter your descriptive comment and hit 
17517 \family sans
17518 Return
17519 \family default
17520  as you normally would.
17521 \end_layout
17522
17523 \begin_layout Standard
17524 If, on the other hand, you don't want to enter any descriptive text, you'll
17525  hit another \SpecialChar LyX
17526  quirk.
17527  \SpecialChar LyX
17528 , like nature, abhors a vacuum, and will not let you start a new paragraph
17529  environment until you put something in the old one.
17530  So, do this:
17531 \end_layout
17532
17533 \begin_layout Itemize
17534 Start entering the text that will 
17535 \emph on
17536 follow
17537 \emph default
17538  the new 
17539 \family sans
17540 Slide
17541 \family default
17542
17543 \family sans
17544 Overlay
17545 \family default
17546
17547 \family sans
17548 Note
17549 \family default
17550
17551 \family sans
17552 InvisibleText
17553 \family default
17554  or 
17555 \family sans
17556 VisibleText
17557 \family default
17558 .
17559  
17560 \end_layout
17561
17562 \begin_layout Itemize
17563 Now move to the beginning of that paragraph.
17564  
17565 \end_layout
17566
17567 \begin_layout Itemize
17568 Next, hit 
17569 \family sans
17570 Return
17571 \family default
17572 .
17573  
17574 \end_layout
17575
17576 \begin_layout Itemize
17577 Finally, change this new, empty paragraph to a 
17578 \family sans
17579 Slide
17580 \family default
17581
17582 \family sans
17583 Overlay
17584 \family default
17585
17586 \family sans
17587 Note
17588 \family default
17589
17590 \family sans
17591 InvisibleText
17592 \family default
17593  or 
17594 \family sans
17595 VisibleText
17596 \family default
17597 .
17598  
17599 \end_layout
17600
17601 \begin_layout Standard
17602 Some future version of \SpecialChar LyX
17603  will, hopefully, resolve this quirkiness\SpecialChar ldots
17604
17605 \end_layout
17606
17607 \begin_layout Subsection
17608 Making a Presentation with 
17609 \family sans
17610 Slide
17611 \family default
17612
17613 \family sans
17614 Overlay
17615 \family default
17616  and 
17617 \family sans
17618 Note
17619 \end_layout
17620
17621 \begin_layout Subsubsection
17622 Using the 
17623 \family sans
17624 Slide
17625 \family default
17626  Environment
17627 \end_layout
17628
17629 \begin_layout Standard
17630 If you're expecting this section to teach you how to actually make a presentatio
17631 n, you'll be sorely disappointed.
17632  Naturally, I'll describe all of the ways the 
17633 \family sans
17634 slides
17635 \family default
17636  class can assist you in preparing the materials for a presentation.
17637  Filling in the contents, however, is up to you.
17638  [Then again, that 
17639 \emph on
17640 is
17641 \emph default
17642  the \SpecialChar LyX
17643  philosophy.]
17644 \end_layout
17645
17646 \begin_layout Standard
17647 Choosing the 
17648 \family sans
17649 Slide
17650 \family default
17651  environment [in the manner described in section
17652 \begin_inset space ~
17653 \end_inset
17654
17655
17656 \begin_inset CommandInset ref
17657 LatexCommand ref
17658 reference "sec:slideQuirk"
17659
17660 \end_inset
17661
17662 ] tells \SpecialChar LyX
17663  to begin a new slide [duh].
17664  The label for this environment/
17665 \begin_inset Quotes erd
17666 \end_inset
17667
17668 pseudo-command
17669 \begin_inset Quotes erd
17670 \end_inset
17671
17672  is an 
17673 \begin_inset Quotes eld
17674 \end_inset
17675
17676 ASCII line,
17677 \begin_inset Quotes erd
17678 \end_inset
17679
17680  in cool blue, followed by the label, 
17681 \begin_inset Quotes eld
17682 \end_inset
17683
17684 NewSlide:
17685 \begin_inset Quotes erd
17686 \end_inset
17687
17688 .
17689  Any text or paragraph environments that follow this one go on the new slide.
17690  It's that simple.
17691 \end_layout
17692
17693 \begin_layout Standard
17694 Slides are probably the only time you'll need to forcibly end pages in \SpecialChar LyX
17695
17696  (this can be specified in the 
17697 \family sans
17698 Paragraph Layout
17699 \family default
17700  dialog).
17701  In fact, you'll want to, once you finish entering the contents of one slide.
17702  If you've entered more text than can physically fit on a slide, the extra
17703  overflows onto a new slide.
17704  I don't recommend doing this, however, since the overflow slide won't have
17705  any page number on it.
17706  Furthermore, it may interfere with any 
17707 \family sans
17708 Overlay
17709 \family default
17710  you've made to accompany the oversized 
17711 \family sans
17712 Slide
17713 \family default
17714 .
17715 \end_layout
17716
17717 \begin_layout Standard
17718 The 
17719 \family sans
17720 Overlay
17721 \family default
17722  and 
17723 \family sans
17724 Note
17725 \family default
17726  environments work the same way as the 
17727 \family sans
17728 Slide
17729 \family default
17730  environment.
17731  They both create an 
17732 \begin_inset Quotes eld
17733 \end_inset
17734
17735 ASCII line
17736 \begin_inset Quotes erd
17737 \end_inset
17738
17739  followed by a label [
17740 \begin_inset Quotes eld
17741 \end_inset
17742
17743 NewOverlay:
17744 \begin_inset Quotes erd
17745 \end_inset
17746
17747  and 
17748 \begin_inset Quotes eld
17749 \end_inset
17750
17751 NewNote:
17752 \begin_inset Quotes erd
17753 \end_inset
17754
17755 , respectively].
17756  The color is a stunning magenta instead of blue, and the 
17757 \begin_inset Quotes eld
17758 \end_inset
17759
17760 ASCII line
17761 \begin_inset Quotes erd
17762 \end_inset
17763
17764  will look different, in style and in length.
17765  The label fonts of all three also differ from one another.
17766 \end_layout
17767
17768 \begin_layout Standard
17769 As with a 
17770 \family sans
17771 Slide
17772 \family default
17773 , if the contents of a 
17774 \family sans
17775 Note
17776 \family default
17777  or 
17778 \family sans
17779 Overlay
17780 \family default
17781  exceed the physical size of a slide or sheet of paper, the extra will overflow
17782  onto a new sheet.
17783  Again, you should avoid this.
17784  It defeats the whole purpose of 
17785 \family sans
17786 Note
17787 \family default
17788 s and 
17789 \family sans
17790 Overlay
17791 \family default
17792 s.
17793 \end_layout
17794
17795 \begin_layout Subsubsection
17796 Using 
17797 \family sans
17798 Overlay
17799 \family default
17800  with 
17801 \family sans
17802 Slide
17803 \end_layout
17804
17805 \begin_layout Standard
17806 The idea behind an 
17807 \family sans
17808 Overlay
17809 \family default
17810  is a slide that sits atop another slide.
17811  Perhaps you wish to discuss a figure on the main 
17812 \family sans
17813 Slide
17814 \family default
17815  before displaying the text associated with it.
17816  One way to accomplish this is tape a flap of dark paper over the part of
17817  the 
17818 \family sans
17819 Slide
17820 \family default
17821  you want to display later.
17822  This method fails, however, if you wish to overlap one graph with another,
17823  for example.
17824  You would then have to fumble while speaking to align the two separate,
17825  overlapping 
17826 \family sans
17827 Slide
17828 \family default
17829 s to align the two graphs.
17830  The use of an 
17831 \family sans
17832 Overlay
17833 \family default
17834  environment in both cases makes life much easier.
17835 \end_layout
17836
17837 \begin_layout Standard
17838 Each 
17839 \family sans
17840 Overlay
17841 \family default
17842  receives the page number of its 
17843 \begin_inset Quotes eld
17844 \end_inset
17845
17846 parent
17847 \begin_inset Quotes erd
17848 \end_inset
17849
17850  
17851 \family sans
17852 Slide
17853 \family default
17854 , appended by 
17855 \begin_inset Quotes eld
17856 \end_inset
17857
17858
17859 \family typewriter
17860 -a
17861 \family default
17862
17863 \begin_inset Quotes erd
17864 \end_inset
17865
17866 .
17867 \begin_inset Foot
17868 status collapsed
17869
17870 \begin_layout Plain Layout
17871 Presumably, mutliple 
17872 \family sans
17873 Overlay
17874 \family default
17875 s would have 
17876 \begin_inset Quotes eld
17877 \end_inset
17878
17879
17880 \family typewriter
17881 -a
17882 \family default
17883
17884 \begin_inset Quotes erd
17885 \end_inset
17886
17887
17888 \begin_inset Quotes eld
17889 \end_inset
17890
17891
17892 \family typewriter
17893 -b
17894 \family default
17895
17896 \begin_inset Quotes erd
17897 \end_inset
17898
17899
17900 \begin_inset Quotes eld
17901 \end_inset
17902
17903
17904 \family typewriter
17905 -c
17906 \family default
17907
17908 \begin_inset Quotes erd
17909 \end_inset
17910
17911 , etc.
17912 \begin_inset space ~
17913 \end_inset
17914
17915 appended to the page number of the parent 
17916 \family sans
17917 Slide
17918 \family default
17919 .
17920  
17921 \end_layout
17922
17923 \end_inset
17924
17925  Clearly, you want the contents of both the 
17926 \family sans
17927 Slide
17928 \family default
17929  and the 
17930 \family sans
17931 Overlay
17932 \family default
17933  to each fit on a single physical slide! You should probably consider an
17934  
17935 \family sans
17936 Overlay
17937 \family default
17938  as 
17939 \begin_inset Quotes eld
17940 \end_inset
17941
17942 part of
17943 \begin_inset Quotes erd
17944 \end_inset
17945
17946  a 
17947 \family sans
17948 Slide
17949 \family default
17950 .
17951  Indeed, the \SpecialChar LyX
17952  
17953 \family sans
17954 slides
17955 \family default
17956  class provides a visual cue for this: the label at the start of an 
17957 \family sans
17958 Overlay
17959 \family default
17960  is shorter than that at the start of a 
17961 \family sans
17962 Slide
17963 \family default
17964 .
17965  Lastly, when you generate printable output, you'll find alignment markers
17966  in all four corners of both the 
17967 \family sans
17968 Overlay
17969 \family default
17970  page and its parent 
17971 \family sans
17972 Slide
17973 \family default
17974 .
17975  These will assist you in lining up the two physical slides.
17976 \end_layout
17977
17978 \begin_layout Standard
17979 The major problem in overlaying two slides is aligning the contents of the
17980  two transparencies.
17981  How much space should you leave for that graph on the second slide? Worse
17982  still, what if you want a graph and a sentence on second slide, but there
17983  is text on the main transparency that goes in between them? You could try
17984  and insert vertical space of the right size.
17985  The better way is to use 
17986 \family sans
17987 InvisibleText
17988 \family default
17989  and 
17990 \family sans
17991 VisibleText
17992 \family default
17993 .
17994 \end_layout
17995
17996 \begin_layout Standard
17997 As their names imply, 
17998 \family sans
17999 InvisibleText
18000 \family default
18001  and 
18002 \family sans
18003 VisibleText
18004 \family default
18005  are two command-like paragraph environments that make all subsequent text
18006  invisible and visible, respectively.
18007  Note from section
18008 \begin_inset space ~
18009 \end_inset
18010
18011
18012 \begin_inset CommandInset ref
18013 LatexCommand ref
18014 reference "sec:slideQuirk"
18015
18016 \end_inset
18017
18018  that you don't place anything 
18019 \emph on
18020 into
18021 \emph default
18022  these two environments, however.
18023  When you create an 
18024 \family sans
18025 InvisibleText
18026 \family default
18027 , it inserts a centered, sky-blue label into the page reading 
18028 \begin_inset Quotes eld
18029 \end_inset
18030
18031 <Invisible Text Follows>
18032 \begin_inset Quotes erd
18033 \end_inset
18034
18035 .
18036  For paragraphs following this label, the parts of the 
18037 \family sans
18038 Slide
18039 \family default
18040  [or 
18041 \family sans
18042 Overlay
18043 \family default
18044 ; it doesn't matter which] where they would be contain instead blank space.
18045  
18046 \end_layout
18047
18048 \begin_layout Standard
18049 For 
18050 \family sans
18051 VisibleText
18052 \family default
18053 , the corresponding centered label is 
18054 \begin_inset Quotes eld
18055 \end_inset
18056
18057 <Visible Text Follows>
18058 \begin_inset Quotes erd
18059 \end_inset
18060
18061  in blazing green.
18062  Paragraphs following this label behave normally.
18063  Note that the beginning of a new 
18064 \family sans
18065 Slide
18066 \family default
18067
18068 \family sans
18069 Overlay
18070 \family default
18071 , or 
18072 \family sans
18073 Note
18074 \family default
18075  automatically shuts off an 
18076 \family sans
18077 InvisibleText
18078 \family default
18079 .
18080  It's therefore not necessary to use 
18081 \family sans
18082 VisibleText
18083 \family default
18084  at the end of a 
18085 \family sans
18086 Slide
18087 \family default
18088 .
18089 \end_layout
18090
18091 \begin_layout Standard
18092 By now, it should be obvious how to create overlay transparencies using
18093  the proper combination of 
18094 \family sans
18095 InvisibleText
18096 \family default
18097  and 
18098 \family sans
18099 VisibleText
18100 \family default
18101  on a 
18102 \family sans
18103 Slide
18104 \family default
18105  and 
18106 \family sans
18107 Overlay
18108 \family default
18109 :
18110 \end_layout
18111
18112 \begin_layout Enumerate
18113 Create a 
18114 \family sans
18115 Slide
18116 \family default
18117 , including everything that will appear on it, whether on the main slide
18118  or on the 
18119 \family sans
18120 Overlay
18121 \family default
18122 .
18123 \end_layout
18124
18125 \begin_layout Enumerate
18126 Before each figure or paragraph that will appear only on the 
18127 \family sans
18128 Overlay
18129 \family default
18130 , insert an 
18131 \family sans
18132 InvisibleText
18133 \family default
18134  environment.
18135  If necessary, insert a 
18136 \family sans
18137 VisibleText
18138 \family default
18139  environment after the 
18140 \family sans
18141 Overlay
18142 \family default
18143 -only text.
18144 \end_layout
18145
18146 \begin_layout Enumerate
18147 Start an 
18148 \family sans
18149 Overlay
18150 \family default
18151  immediately following the 
18152 \family sans
18153 Slide
18154 \family default
18155 .
18156 \end_layout
18157
18158 \begin_layout Enumerate
18159 Copy the contents of this 
18160 \family sans
18161 Slide
18162 \family default
18163  into the 
18164 \family sans
18165 Overlay
18166 \family default
18167 .
18168 \end_layout
18169
18170 \begin_layout Enumerate
18171 Within the 
18172 \family sans
18173 Overlay
18174 \family default
18175 , change all of the 
18176 \family sans
18177 InvisibleText
18178 \family default
18179  lines to 
18180 \family sans
18181 VisibleText
18182 \family default
18183  and vice-versa.
18184 \end_layout
18185
18186 \begin_layout Standard
18187 That's it.
18188  You've just made an 
18189 \family sans
18190 Overlay
18191 \family default
18192 .
18193 \end_layout
18194
18195 \begin_layout Standard
18196 There's one problem with the way I've designed the \SpecialChar LyX
18197  
18198 \family sans
18199 slides
18200 \family default
18201  class: you can't make text in the middle of a paragraph invisible, nor
18202  make text in the middle of an invisible paragraph visible again.
18203  To accomplish this feat, you'll need to use some inlined \SpecialChar LaTeX
18204  codes.
18205 \begin_inset Foot
18206 status collapsed
18207
18208 \begin_layout Plain Layout
18209 The commands of interest are: 
18210 \end_layout
18211
18212 \begin_layout Itemize
18213
18214 \family typewriter
18215 {
18216 \backslash
18217 invisible \SpecialChar ldots
18218  }
18219 \end_layout
18220
18221 \begin_layout Itemize
18222
18223 \family typewriter
18224 {
18225 \backslash
18226 visible \SpecialChar ldots
18227  }
18228 \end_layout
18229
18230 \begin_layout Plain Layout
18231 \SpecialChar ldots
18232 and need to be marked as \SpecialChar TeX
18233 .
18234  The text whose 
18235 \begin_inset Quotes eld
18236 \end_inset
18237
18238 visibility
18239 \begin_inset Quotes erd
18240 \end_inset
18241
18242  you wish to change goes in between the brackets [and after the 
18243 \family typewriter
18244
18245 \backslash
18246 invisible
18247 \family default
18248  or 
18249 \family typewriter
18250
18251 \backslash
18252 visible
18253 \family default
18254  command].
18255  If you don't know how to mark text as \SpecialChar TeX
18256 , see the appropriate section of
18257  the 
18258 \emph on
18259 User's Guide
18260 \emph default
18261 .
18262 \end_layout
18263
18264 \end_inset
18265
18266
18267 \end_layout
18268
18269 \begin_layout Subsubsection
18270 Using 
18271 \family sans
18272 Note
18273 \family default
18274  with 
18275 \family sans
18276 Slide
18277 \family default
18278
18279 \begin_inset CommandInset label
18280 LatexCommand label
18281 name "sec:slideNote"
18282
18283 \end_inset
18284
18285
18286 \end_layout
18287
18288 \begin_layout Standard
18289 Like an 
18290 \family sans
18291 Overlay
18292 \family default
18293 , a 
18294 \family sans
18295 Note
18296 \family default
18297  is associated with a 
18298 \begin_inset Quotes eld
18299 \end_inset
18300
18301 parent
18302 \begin_inset Quotes erd
18303 \end_inset
18304
18305  
18306 \family sans
18307 Slide
18308 \family default
18309 .
18310  Here, too, the \SpecialChar LyX
18311  
18312 \family sans
18313 slides
18314 \family default
18315  class provides visual cues.
18316  The label for a 
18317 \family sans
18318 Note
18319 \family default
18320  is shorter than that of a 
18321 \family sans
18322 Slide
18323 \family default
18324  [yet longer than that of an 
18325 \family sans
18326 Overlay
18327 \family default
18328 ] and, like the label of an 
18329 \family sans
18330 Overlay
18331 \family default
18332  is shockingly magenta.
18333  Additionally, the printed 
18334 \family sans
18335 Note
18336 \family default
18337  has the page number of its 
18338 \begin_inset Quotes eld
18339 \end_inset
18340
18341 parent
18342 \begin_inset Quotes erd
18343 \end_inset
18344
18345  
18346 \family sans
18347 Slide
18348 \family default
18349 , appended by 
18350 \begin_inset Quotes eld
18351 \end_inset
18352
18353
18354 \family typewriter
18355 -
18356 \family default
18357 1
18358 \begin_inset Quotes erd
18359 \end_inset
18360
18361
18362 \begin_inset Quotes eld
18363 \end_inset
18364
18365
18366 \family typewriter
18367 -
18368 \family default
18369 2
18370 \begin_inset Quotes erd
18371 \end_inset
18372
18373
18374 \begin_inset Quotes eld
18375 \end_inset
18376
18377
18378 \family typewriter
18379 -
18380 \family default
18381 3
18382 \begin_inset Quotes erd
18383 \end_inset
18384
18385 , etc.
18386  You can have multiple 
18387 \family sans
18388 Note
18389 \family default
18390 s associated with a single 
18391 \family sans
18392 Slide
18393 \family default
18394 , and, as with 
18395 \family sans
18396 Slide
18397 \family default
18398  and 
18399 \family sans
18400 Overlay
18401 \family default
18402 , you'll probably want to break up long 
18403 \family sans
18404 Note
18405 \family default
18406 s so that they fit on a single sheet of paper.
18407 \end_layout
18408
18409 \begin_layout Standard
18410 The purpose of a 
18411 \family sans
18412 Note
18413 \family default
18414  is obvious: it contains anything additional you might want to say about
18415  a 
18416 \family sans
18417 Slide
18418 \family default
18419 .
18420  It could also be used as a sheet of reminders for a particular 
18421 \family sans
18422 Slide
18423 \family default
18424 .
18425  In the case of the latter, you might want to make use of time markers.
18426  Currently, the \SpecialChar LyX
18427  
18428 \family sans
18429 slides
18430 \family default
18431  class has no 
18432 \begin_inset Quotes eld
18433 \end_inset
18434
18435 native
18436 \begin_inset Quotes erd
18437 \end_inset
18438
18439  support for time markers, a 
18440 \noun on
18441 Sli\SpecialChar TeX
18442
18443 \noun default
18444  feature.
18445  So, you'll have to resort to using the \SpecialChar LaTeX
18446  codes.
18447 \end_layout
18448
18449 \begin_layout Standard
18450 To use time markers, you'll need to specify the extra class option 
18451 \begin_inset Quotes eld
18452 \end_inset
18453
18454
18455 \family typewriter
18456 clock
18457 \family default
18458
18459 \begin_inset Quotes erd
18460 \end_inset
18461
18462  [see section
18463 \begin_inset space ~
18464 \end_inset
18465
18466
18467 \begin_inset CommandInset ref
18468 LatexCommand ref
18469 reference "sec:slidesetup"
18470
18471 \end_inset
18472
18473 ].
18474  This option turns on timing marks, which will appear in the lower-left-hand
18475  corner of every 
18476 \family sans
18477 Note
18478 \family default
18479  you generate.
18480  To set what appears in the time marker, you use the \SpecialChar LaTeX
18481  commands 
18482 \begin_inset Quotes eld
18483 \end_inset
18484
18485
18486 \family typewriter
18487
18488 \backslash
18489 settime{}
18490 \family default
18491
18492 \begin_inset Quotes erd
18493 \end_inset
18494
18495  and 
18496 \begin_inset Quotes eld
18497 \end_inset
18498
18499
18500 \family typewriter
18501
18502 \backslash
18503 addtime{}
18504 \family default
18505
18506 \begin_inset Quotes erd
18507 \end_inset
18508
18509 .
18510  The arguments of both commands are time measured in seconds.
18511  
18512 \begin_inset Quotes eld
18513 \end_inset
18514
18515
18516 \family typewriter
18517
18518 \backslash
18519 settime{}
18520 \family default
18521
18522 \begin_inset Quotes erd
18523 \end_inset
18524
18525  sets the time marker to a given time.
18526  
18527 \begin_inset Quotes eld
18528 \end_inset
18529
18530
18531 \family typewriter
18532
18533 \backslash
18534 addtime{}
18535 \family default
18536
18537 \begin_inset Quotes erd
18538 \end_inset
18539
18540  increments the time marker by the specified amount.
18541  Using time markers and 
18542 \family sans
18543 Note
18544 \family default
18545 s in this fashion, you can remind yourself how much time to spend on a particula
18546
18547 \family sans
18548 Slide
18549 \family default
18550 .
18551 \end_layout
18552
18553 \begin_layout Standard
18554 There's one last feature to describe.
18555  Clearly, you'd like to print out all of your 
18556 \family sans
18557 Slide
18558 \family default
18559 s and 
18560 \family sans
18561 Overlay
18562 \family default
18563 s on transparencies while printing all of your 
18564 \family sans
18565 Note
18566 \family default
18567 s on plain paper.
18568  However, a 
18569 \family sans
18570 Note
18571 \family default
18572  
18573 \emph on
18574 must
18575 \emph default
18576  follow the 
18577 \family sans
18578 Slide
18579 \family default
18580  with which it is associated.
18581  What's a person to do?
18582 \end_layout
18583
18584 \begin_layout Standard
18585 Luckily, there are two \SpecialChar LaTeX
18586  commands that allow you to select what to print
18587  out.
18588  Both must be placed into the preamble of your document.
18589  The command 
18590 \begin_inset Quotes eld
18591 \end_inset
18592
18593
18594 \family typewriter
18595
18596 \backslash
18597 onlyslides{
18598 \backslash
18599 slides}
18600 \family default
18601
18602 \begin_inset Quotes erd
18603 \end_inset
18604
18605  will cause the output to contain only the 
18606 \family sans
18607 Slide
18608 \family default
18609 s and 
18610 \family sans
18611 Overlay
18612 \family default
18613 s.
18614  Correspondingly, the command 
18615 \begin_inset Quotes eld
18616 \end_inset
18617
18618
18619 \family typewriter
18620
18621 \backslash
18622 onlynotes{
18623 \backslash
18624 notes}
18625 \family default
18626
18627 \begin_inset Quotes erd
18628 \end_inset
18629
18630  prevents the output of anything but 
18631 \family sans
18632 Note
18633 \family default
18634 s.
18635  I'd advise placing both commands in the preamble and initially comment
18636  both out.
18637  You can then preview your entire presentation as you write.
18638  When you're done writing, you can then uncomment one of the two to select
18639  what you want to print.
18640  I like to uncomment 
18641 \begin_inset Quotes eld
18642 \end_inset
18643
18644
18645 \family typewriter
18646
18647 \backslash
18648 onlyslides{
18649 \backslash
18650 slides}
18651 \family default
18652
18653 \begin_inset Quotes erd
18654 \end_inset
18655
18656  , print to a file with 
18657 \begin_inset Quotes eld
18658 \end_inset
18659
18660
18661 \family typewriter
18662 -slides
18663 \family default
18664
18665 \begin_inset Quotes erd
18666 \end_inset
18667
18668  in its name, comment it back out, then uncomment 
18669 \begin_inset Quotes eld
18670 \end_inset
18671
18672
18673 \family typewriter
18674
18675 \backslash
18676 onlynotes{
18677 \backslash
18678 notes}
18679 \family default
18680
18681 \begin_inset Quotes erd
18682 \end_inset
18683
18684  and print to a 
18685 \begin_inset Quotes eld
18686 \end_inset
18687
18688
18689 \family typewriter
18690 *-notes.ps
18691 \family default
18692
18693 \begin_inset Quotes erd
18694 \end_inset
18695
18696  file.
18697  I can then send either file to a printer, loading transparencies or plain
18698  paper as appropriate.
18699 \end_layout
18700
18701 \begin_layout Standard
18702 You can also provide other arguments to the 
18703 \begin_inset Quotes eld
18704 \end_inset
18705
18706
18707 \family typewriter
18708
18709 \backslash
18710 onlyslides{}
18711 \family default
18712
18713 \begin_inset Quotes erd
18714 \end_inset
18715
18716  and 
18717 \begin_inset Quotes eld
18718 \end_inset
18719
18720
18721 \family typewriter
18722
18723 \backslash
18724 onlynotes{}
18725 \family default
18726
18727 \begin_inset Quotes erd
18728 \end_inset
18729
18730  commands.
18731  See a good \SpecialChar LaTeX
18732  book for details.
18733 \end_layout
18734
18735 \begin_layout Subsection
18736 The 
18737 \family sans
18738 slides
18739 \family default
18740  Class Template File
18741 \end_layout
18742
18743 \begin_layout Standard
18744 I have also provided a template file, 
18745 \begin_inset Quotes eld
18746 \end_inset
18747
18748
18749 \family typewriter
18750 slides.lyx
18751 \family default
18752
18753 \begin_inset Quotes erd
18754 \end_inset
18755
18756 , with the 
18757 \family sans
18758 slides
18759 \family default
18760  class.
18761  To use it, begin your new presentation with 
18762 \family sans
18763 File\SpecialChar menuseparator
18764 New
18765 \begin_inset space ~
18766 \end_inset
18767
18768 from
18769 \begin_inset space ~
18770 \end_inset
18771
18772 Template
18773 \family default
18774 .
18775  Your new \SpecialChar LyX
18776  presentation file will contain an example 
18777 \family sans
18778 Slide
18779 \family default
18780  – 
18781 \family sans
18782 Overlay
18783 \family default
18784  – 
18785 \family sans
18786 Note
18787 \family default
18788  triplet.
18789  The 
18790 \family sans
18791 Slide
18792 \family default
18793  and 
18794 \family sans
18795 Overlay
18796 \family default
18797  additionally contain an example of the use of 
18798 \family sans
18799 InvisibleText
18800 \family default
18801  and 
18802 \family sans
18803 VisibleText
18804 \family default
18805 .
18806  Lastly, the preamble will contain:
18807 \end_layout
18808
18809 \begin_layout LyX-Code
18810 % Uncomment to print out only slides and overlays
18811 \end_layout
18812
18813 \begin_layout LyX-Code
18814 %
18815 \end_layout
18816
18817 \begin_layout LyX-Code
18818 %
18819 \backslash
18820 onlyslides{
18821 \backslash
18822 slides}
18823 \begin_inset Newline newline
18824 \end_inset
18825
18826  
18827 \end_layout
18828
18829 \begin_layout LyX-Code
18830 % Uncomment to print out only notes
18831 \end_layout
18832
18833 \begin_layout LyX-Code
18834 %
18835 \end_layout
18836
18837 \begin_layout LyX-Code
18838 %
18839 \backslash
18840 onlynotes{
18841 \backslash
18842 notes}
18843 \end_layout
18844
18845 \begin_layout Standard
18846 One final thing: I created this class to support the \SpecialChar LaTeX2e
18847  
18848 \begin_inset Quotes eld
18849 \end_inset
18850
18851
18852 \noun on
18853 Sli\SpecialChar TeX
18854
18855 \noun default
18856  emulation
18857 \begin_inset Quotes erd
18858 \end_inset
18859
18860  class, one of the built-in \SpecialChar LaTeX2e
18861  classes.
18862  Neither I nor the rest of the \SpecialChar LyX
18863  Team endorse or oppose the use of this built-in
18864  slide class.
18865  It's here if you want it or need it.
18866  There exist other \SpecialChar LaTeX2e
18867  classes for creating presentations, such as the 
18868 \family sans
18869 Foils
18870 \family default
18871  class [see section
18872 \begin_inset space ~
18873 \end_inset
18874
18875
18876 \begin_inset CommandInset ref
18877 LatexCommand ref
18878 reference "sec:foiltex"
18879
18880 \end_inset
18881
18882 ] or the 
18883 \begin_inset Quotes eld
18884 \end_inset
18885
18886
18887 \family typewriter
18888 seminar
18889 \family default
18890
18891 \begin_inset Quotes erd
18892 \end_inset
18893
18894  package [present on some \SpecialChar TeX
18895  distributions].
18896  The latter is not yet supported under \SpecialChar LyX
18897 .
18898 \begin_inset Foot
18899 status collapsed
18900
18901 \begin_layout Plain Layout
18902 Perhaps you can take on the task\SpecialChar ldots
18903
18904 \end_layout
18905
18906 \end_inset
18907
18908  I know nothing about these other classes.
18909  Try them out to see what sort of alternative they provide.
18910 \end_layout
18911
18912 \begin_layout Chapter
18913 \SpecialChar LyX
18914  Features needing Extra Software
18915 \end_layout
18916
18917 \begin_layout Section
18918 Checking \SpecialChar TeX
18919
18920 \end_layout
18921
18922 \begin_layout Standard
18923 by 
18924 \noun on
18925 Asger Alstrup
18926 \end_layout
18927
18928 \begin_layout Subsection
18929 Introduction
18930 \end_layout
18931
18932 \begin_layout Standard
18933 If you have the 
18934 \family typewriter
18935 chktex
18936 \family default
18937  program installed
18938 \begin_inset Foot
18939 status collapsed
18940
18941 \begin_layout Plain Layout
18942
18943 \family typewriter
18944 chktex
18945 \family default
18946  is not yet available when you are using the \SpecialChar LaTeX
18947  distribution MiK\SpecialChar TeX
18948 .
18949 \end_layout
18950
18951 \end_inset
18952
18953 , you'll find in the 
18954 \family sans
18955 Tools
18956 \family default
18957  menu the entry: 
18958 \family sans
18959 Check
18960 \begin_inset space ~
18961 \end_inset
18962
18963 TeX
18964 \family default
18965 .
18966  You can get 
18967 \family typewriter
18968 chktex
18969 \family default
18970  from CTAN,
18971 \begin_inset Newline newline
18972 \end_inset
18973
18974
18975 \begin_inset CommandInset href
18976 LatexCommand href
18977 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
18978 literal "false"
18979
18980 \end_inset
18981
18982 .
18983 \end_layout
18984
18985 \begin_layout Standard
18986 The 
18987 \family sans
18988 Chk\SpecialChar TeX
18989
18990 \family default
18991  package is a program that was written by 
18992 \begin_inset Flex Noun
18993 status collapsed
18994
18995 \begin_layout Plain Layout
18996 Jens T.
18997 \begin_inset space ~
18998 \end_inset
18999
19000 Berger Thielemann
19001 \end_layout
19002
19003 \end_inset
19004
19005  in frustration because some constructs in \SpecialChar LaTeX
19006  are sometimes non-intuitive,
19007  and easy to forget.
19008  The program runs over your \SpecialChar LaTeX
19009  file, checks the integrity of the file, and
19010  flags some common errors.
19011  In other technical words, it is 
19012 \family typewriter
19013 lint
19014 \family default
19015  for \SpecialChar LaTeX
19016 .
19017 \end_layout
19018
19019 \begin_layout Standard
19020 Well, what is a syntax checker doing in \SpecialChar LyX
19021  which is supposed to produce correct
19022  \SpecialChar LaTeX
19023  anyways? The answer is simple: Just as 
19024 \family typewriter
19025 Lint
19026 \family default
19027  not only checks the 
19028 \emph on
19029 syntax
19030 \emph default
19031  of C programs, but also does 
19032 \emph on
19033 semantic
19034 \emph default
19035  checks for type-errors, 
19036 \family sans
19037 Chk\SpecialChar TeX
19038
19039 \family default
19040  catches some common 
19041 \emph on
19042 typographic
19043 \emph default
19044  errors, in addition to the syntactical ones.
19045  Specifically, 
19046 \family sans
19047 Chk\SpecialChar TeX
19048
19049 \family default
19050  is capable of detecting several common errors, such as
19051 \end_layout
19052
19053 \begin_layout Itemize
19054 Ellipsis detection:
19055 \begin_inset Newline newline
19056 \end_inset
19057
19058 Use \SpecialChar ldots
19059  instead of ...
19060 \end_layout
19061
19062 \begin_layout Itemize
19063 No space in front of/after parenthesis:
19064 \begin_inset Newline newline
19065 \end_inset
19066
19067 ( wrong spacing )
19068 \end_layout
19069
19070 \begin_layout Itemize
19071 Enforcement of normal space after common abbreviations:
19072 \begin_inset Newline newline
19073 \end_inset
19074
19075 e.
19076 \begin_inset space \thinspace{}
19077 \end_inset
19078
19079 g.
19080 \begin_inset space \space{}
19081 \end_inset
19082
19083 is too wide spacing.
19084 \end_layout
19085
19086 \begin_layout Itemize
19087 Enforcement of end-of-sentence space when the last sentence ends with a
19088  capital letter:
19089 \begin_inset Newline newline
19090 \end_inset
19091
19092 This is a TEST.
19093  And this is wrong spacing.
19094 \end_layout
19095
19096 \begin_layout Itemize
19097 Space in front of labels and similar commands:
19098 \begin_inset Newline newline
19099 \end_inset
19100
19101 The label should stick right up to the text to avoid falling to a wrong
19102  page.
19103  
19104 \begin_inset CommandInset label
19105 LatexCommand label
19106 name "sec:chktex"
19107
19108 \end_inset
19109
19110  
19111 \begin_inset Foot
19112 status collapsed
19113
19114 \begin_layout Plain Layout
19115 This footnote is in danger of falling off to a wrong page
19116 \end_layout
19117
19118 \end_inset
19119
19120  The label is separated too much.
19121 \end_layout
19122
19123 \begin_layout Itemize
19124 Space in front of references, instead of hard spaces:
19125 \begin_inset Newline newline
19126 \end_inset
19127
19128 If you have bad luck, the text will break right between the referenced text
19129  and reference number, and that's a pity.
19130  See section 
19131 \begin_inset CommandInset ref
19132 LatexCommand ref
19133 reference "sec:chktex"
19134
19135 \end_inset
19136
19137 .
19138 \end_layout
19139
19140 \begin_layout Itemize
19141 Use of 
19142 \begin_inset Quotes eld
19143 \end_inset
19144
19145 x
19146 \begin_inset Quotes erd
19147 \end_inset
19148
19149  instead of 
19150 \begin_inset Formula $\times$
19151 \end_inset
19152
19153  between numbers:
19154 \begin_inset Newline newline
19155 \end_inset
19156
19157 2x2 looks cheap compared to 
19158 \begin_inset Formula $2\times2$
19159 \end_inset
19160
19161 .
19162 \end_layout
19163
19164 \begin_layout Standard
19165 and more \SpecialChar ldots
19166  It is an invaluable tool when you are 
19167 \begin_inset Quotes eld
19168 \end_inset
19169
19170 finishing up
19171 \begin_inset Quotes erd
19172 \end_inset
19173
19174  your document before printing, and you should run it right after the obligatory
19175  spelling check, and before you go fine tuning the typesetting.
19176 \end_layout
19177
19178 \begin_layout Subsection
19179 How to use it
19180 \end_layout
19181
19182 \begin_layout Standard
19183 If you have the program installed, usage is as simple as choosing 
19184 \family sans
19185 Tools\SpecialChar menuseparator
19186 Check
19187 \begin_inset space ~
19188 \end_inset
19189
19190 TeX
19191 \family default
19192 .
19193  This will make \SpecialChar LyX
19194  generate a \SpecialChar LaTeX
19195  file of your document, start 
19196 \family sans
19197 Chk\SpecialChar TeX
19198
19199 \family default
19200  to check it, and then make \SpecialChar LyX
19201  insert 
19202 \begin_inset Quotes eld
19203 \end_inset
19204
19205 error boxes
19206 \begin_inset Quotes erd
19207 \end_inset
19208
19209  with the warnings from 
19210 \family sans
19211 Chk\SpecialChar TeX
19212
19213 \family default
19214 , if there were any.
19215  The warnings will be placed close to the point of the mistake, and you
19216  can quickly find them by using the 
19217 \family sans
19218 Navigate\SpecialChar menuseparator
19219 Error
19220 \family default
19221  menu item, or the shortcut key 
19222 \family sans
19223 C-g
19224 \family default
19225  from the default 
19226 \family typewriter
19227 cua
19228 \family default
19229  bind file.
19230  Open the error boxes by clicking on them with the mouse, or use the shortcut
19231  key 
19232 \family sans
19233 C-i
19234 \family default
19235  from 
19236 \family typewriter
19237 cua
19238 \family default
19239  bindings, or the corresponding 
19240 \family sans
19241 C-o
19242 \family default
19243  for the alternate 
19244 \family typewriter
19245 emacs
19246 \family default
19247  bind file.
19248  Read the warning and correct the mistake, if it is a mistake.
19249  If you have trouble understanding what the warning is about, you can safely
19250  ignore it.
19251  Remember that there is a hidden layer between the document on screen and
19252  the technical details in invoking 
19253 \family sans
19254 Chk\SpecialChar TeX
19255
19256 \family default
19257 , and this gap can make some warnings seem arcane or just plain silly.
19258 \end_layout
19259
19260 \begin_layout Standard
19261 This document is an excellent testing bed for the feature, and it should
19262  provide quite a few warnings for you to fiddle with.
19263  Since computers are only so smart, expect most of the warnings to be false
19264  alarms, though.
19265 \end_layout
19266
19267 \begin_layout Subsection
19268 How to fine tune it
19269 \end_layout
19270
19271 \begin_layout Standard
19272 Sometimes, you'll find that 
19273 \family sans
19274 Chk\SpecialChar TeX
19275
19276 \family default
19277  makes more noise than suits your mood.
19278  Then you can choose not to use it, wait until your mood changes, or try
19279  to customize 
19280 \family sans
19281 Chk\SpecialChar TeX
19282
19283 \family default
19284  to get better along with you.
19285 \end_layout
19286
19287 \begin_layout Standard
19288 Although 
19289 \family sans
19290 Chk\SpecialChar TeX
19291
19292 \family default
19293  
19294 \emph on
19295 is
19296 \emph default
19297  very configurable and extensible, you should not expect to solve all problems
19298  with 
19299 \family sans
19300 Chk\SpecialChar TeX
19301
19302 \family default
19303  in \SpecialChar LyX
19304  this way.
19305  Since \SpecialChar LyX
19306  has to generate a somewhat special \SpecialChar LaTeX
19307  file to be able to match the
19308  line numbers from the 
19309 \family sans
19310 Chk\SpecialChar TeX
19311
19312 \family default
19313  output
19314 \begin_inset Foot
19315 status collapsed
19316
19317 \begin_layout Plain Layout
19318 You can inspect the specific output from 
19319 \family sans
19320 chktex
19321 \family default
19322  by using 
19323 \family sans
19324 Document\SpecialChar menuseparator
19325 \SpecialChar LaTeX
19326
19327 \begin_inset space ~
19328 \end_inset
19329
19330 Log
19331 \family default
19332  right after a 
19333 \family sans
19334 chktex
19335 \family default
19336  run.
19337 \end_layout
19338
19339 \end_inset
19340
19341  to the internal document structure, some of the warnings will not appear
19342  correctly.
19343  There are two things you can do about this:
19344 \end_layout
19345
19346 \begin_layout Itemize
19347 Fine tune the 
19348 \family sans
19349 Chk\SpecialChar TeX
19350
19351 \family default
19352  invocation command line in 
19353 \begin_inset Flex Noun
19354 status collapsed
19355
19356 \begin_layout Plain Layout
19357 Tools\SpecialChar menuseparator
19358 Preferences\SpecialChar menuseparator
19359 Output\SpecialChar menuseparator
19360 LaTeX\SpecialChar menuseparator
19361 CheckTeX command
19362 \end_layout
19363
19364 \end_inset
19365
19366 , or the global 
19367 \family sans
19368 Chk\SpecialChar TeX
19369
19370 \family default
19371  installation configuration file (usually with the file 
19372 \family typewriter
19373 chktexrc
19374 \family default
19375 ).
19376  See below to learn what warnings can be enabled and disabled on the command
19377  line.
19378 \end_layout
19379
19380 \begin_layout Itemize
19381 Export your document as a raw \SpecialChar LaTeX
19382  file using 
19383 \family sans
19384 File\SpecialChar menuseparator
19385 Export\SpecialChar menuseparator
19386 \SpecialChar LaTeX
19387
19388 \family default
19389  and run 
19390 \family typewriter
19391 chktex
19392 \family default
19393  manually on that.
19394  Invoked in this way, it can be a hassle to find the corresponding place
19395  in the document inside \SpecialChar LyX
19396 , but with a little patience, you should be able
19397  to do it.
19398 \end_layout
19399
19400 \begin_layout Standard
19401 Here follows the warning messages that can be enabled and disabled in 
19402 \family sans
19403 Preferences
19404 \family default
19405 .
19406  Use 
19407 \family typewriter
19408 -n#
19409 \family default
19410  to disable a warning, and 
19411 \family typewriter
19412 -w#
19413 \family default
19414  to enable a warning.
19415  The emphasized entries are disabled by default, because the default is
19416  "
19417 \family typewriter
19418 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
19419 \family default
19420 ".
19421 \end_layout
19422
19423 \begin_layout Standard
19424 Notice that you should only use the options that enable and disable warnings,
19425  because \SpecialChar LyX
19426  relies on some of the other command line parameters to be set
19427  in a specific way to have a chance to communicate with 
19428 \family typewriter
19429 chktex
19430 \family default
19431 .
19432 \end_layout
19433
19434 \begin_layout Enumerate
19435
19436 \size small
19437 \emph on
19438 Command terminated with space.
19439 \end_layout
19440
19441 \begin_layout Enumerate
19442
19443 \size small
19444 Non-breaking space (
19445 \begin_inset Quotes eld
19446 \end_inset
19447
19448
19449 \family typewriter
19450 ~
19451 \family default
19452
19453 \begin_inset Quotes erd
19454 \end_inset
19455
19456 ) should have been used.
19457 \end_layout
19458
19459 \begin_layout Enumerate
19460
19461 \size small
19462 \emph on
19463 You should enclose the previous parenthesis with 
19464 \begin_inset Quotes eld
19465 \end_inset
19466
19467
19468 \family typewriter
19469 {}
19470 \family default
19471
19472 \begin_inset Quotes erd
19473 \end_inset
19474
19475 .
19476 \end_layout
19477
19478 \begin_layout Enumerate
19479
19480 \size small
19481 Italic correction (
19482 \begin_inset Quotes eld
19483 \end_inset
19484
19485
19486 \family typewriter
19487
19488 \backslash
19489 /
19490 \family default
19491
19492 \begin_inset Quotes erd
19493 \end_inset
19494
19495 ) found in non-italic buffer.
19496 \end_layout
19497
19498 \begin_layout Enumerate
19499
19500 \size small
19501 Italic correction (
19502 \begin_inset Quotes eld
19503 \end_inset
19504
19505
19506 \family typewriter
19507
19508 \backslash
19509 /
19510 \family default
19511
19512 \begin_inset Quotes erd
19513 \end_inset
19514
19515 ) found more than once.
19516 \end_layout
19517
19518 \begin_layout Enumerate
19519
19520 \size small
19521 \emph on
19522 No italic correction (
19523 \begin_inset Quotes eld
19524 \end_inset
19525
19526
19527 \family typewriter
19528
19529 \backslash
19530 /
19531 \family default
19532
19533 \begin_inset Quotes erd
19534 \end_inset
19535
19536 ) found.
19537 \end_layout
19538
19539 \begin_layout Enumerate
19540
19541 \size small
19542 Accent command 
19543 \begin_inset Quotes eld
19544 \end_inset
19545
19546
19547 \family typewriter
19548 cmd
19549 \family default
19550
19551 \begin_inset Quotes erd
19552 \end_inset
19553
19554  needs use of 
19555 \begin_inset Quotes eld
19556 \end_inset
19557
19558
19559 \family typewriter
19560 cmd
19561 \family default
19562
19563 \begin_inset Quotes erd
19564 \end_inset
19565
19566 .
19567 \end_layout
19568
19569 \begin_layout Enumerate
19570
19571 \size small
19572 Wrong length of dash may have been used.
19573 \end_layout
19574
19575 \begin_layout Enumerate
19576
19577 \size small
19578 \emph on
19579 \begin_inset Quotes eld
19580 \end_inset
19581
19582
19583 \family typewriter
19584 %s
19585 \family default
19586
19587 \begin_inset Quotes erd
19588 \end_inset
19589
19590  expected, found 
19591 \begin_inset Quotes eld
19592 \end_inset
19593
19594
19595 \family typewriter
19596 %s
19597 \family default
19598
19599 \begin_inset Quotes erd
19600 \end_inset
19601
19602 .
19603 \end_layout
19604
19605 \begin_layout Enumerate
19606
19607 \size small
19608 Solo 
19609 \begin_inset Quotes eld
19610 \end_inset
19611
19612
19613 \family typewriter
19614 %s
19615 \family default
19616
19617 \begin_inset Quotes erd
19618 \end_inset
19619
19620  found.
19621 \end_layout
19622
19623 \begin_layout Enumerate
19624
19625 \size small
19626 You should use 
19627 \begin_inset Quotes eld
19628 \end_inset
19629
19630
19631 \family typewriter
19632 %s
19633 \family default
19634
19635 \begin_inset Quotes erd
19636 \end_inset
19637
19638  to achieve an ellipsis.
19639 \end_layout
19640
19641 \begin_layout Enumerate
19642
19643 \size small
19644 Inter-word spacing (
19645 \begin_inset Quotes eld
19646 \end_inset
19647
19648
19649 \family typewriter
19650
19651 \backslash
19652
19653 \family default
19654  
19655 \begin_inset Quotes eld
19656 \end_inset
19657
19658 ) should perhaps be used.
19659 \end_layout
19660
19661 \begin_layout Enumerate
19662
19663 \size small
19664 Inter-sentence spacing (
19665 \begin_inset Quotes eld
19666 \end_inset
19667
19668
19669 \family typewriter
19670
19671 \backslash
19672 @
19673 \family default
19674
19675 \begin_inset Quotes erd
19676 \end_inset
19677
19678 ) should perhaps be used.
19679 \end_layout
19680
19681 \begin_layout Enumerate
19682
19683 \size small
19684 Could not find argument for command.
19685 \end_layout
19686
19687 \begin_layout Enumerate
19688
19689 \size small
19690 No match found for 
19691 \begin_inset Quotes eld
19692 \end_inset
19693
19694
19695 \family typewriter
19696 %s
19697 \family default
19698
19699 \begin_inset Quotes erd
19700 \end_inset
19701
19702 .
19703 \end_layout
19704
19705 \begin_layout Enumerate
19706
19707 \size small
19708 Math mode still on at end of \SpecialChar LaTeX
19709  file.
19710 \end_layout
19711
19712 \begin_layout Enumerate
19713
19714 \size small
19715 Number of 
19716 \begin_inset Quotes eld
19717 \end_inset
19718
19719
19720 \family typewriter
19721 char
19722 \family default
19723
19724 \begin_inset Quotes erd
19725 \end_inset
19726
19727  doesn't match the number of 
19728 \begin_inset Quotes eld
19729 \end_inset
19730
19731
19732 \family typewriter
19733 char
19734 \family default
19735
19736 \begin_inset Quotes erd
19737 \end_inset
19738
19739 .
19740 \end_layout
19741
19742 \begin_layout Enumerate
19743
19744 \size small
19745 You should use either 
19746 \family typewriter
19747
19748 \begin_inset Quotes eld
19749 \end_inset
19750
19751
19752 \family default
19753  or 
19754 \family typewriter
19755
19756 \begin_inset Quotes erd
19757 \end_inset
19758
19759
19760 \family default
19761  as an alternative to 
19762 \begin_inset Quotes eld
19763 \end_inset
19764
19765
19766 \family typewriter
19767 "
19768 \family default
19769
19770 \begin_inset Quotes erd
19771 \end_inset
19772
19773 .
19774 \end_layout
19775
19776 \begin_layout Enumerate
19777
19778 \size small
19779 You should use "
19780 \family typewriter
19781 '
19782 \family default
19783 " (ASCII 39) instead of "
19784 \family typewriter
19785 ´
19786 \family default
19787 " (ASCII 180).
19788 \end_layout
19789
19790 \begin_layout Enumerate
19791
19792 \size small
19793 User-specified pattern found.
19794 \end_layout
19795
19796 \begin_layout Enumerate
19797
19798 \size small
19799 This command might not be intended.
19800 \end_layout
19801
19802 \begin_layout Enumerate
19803
19804 \size small
19805 \emph on
19806 Comment displayed.
19807 \end_layout
19808
19809 \begin_layout Enumerate
19810
19811 \size small
19812 Either 
19813 \family typewriter
19814 ''
19815 \backslash
19816 ,'
19817 \family default
19818  or 
19819 \family typewriter
19820 '
19821 \backslash
19822 ,''
19823 \family default
19824  will look better.
19825 \end_layout
19826
19827 \begin_layout Enumerate
19828
19829 \size small
19830 Delete this space to maintain correct page references.
19831 \end_layout
19832
19833 \begin_layout Enumerate
19834
19835 \size small
19836 \emph on
19837 You might wish to put this between a pair of 
19838 \begin_inset Quotes eld
19839 \end_inset
19840
19841
19842 \family typewriter
19843 {}
19844 \family default
19845
19846 \begin_inset Quotes erd
19847 \end_inset
19848
19849 .
19850 \end_layout
19851
19852 \begin_layout Enumerate
19853
19854 \size small
19855 You ought to remove spaces in front of punctuation.
19856 \end_layout
19857
19858 \begin_layout Enumerate
19859
19860 \size small
19861 Could not execute \SpecialChar LaTeX
19862  command.
19863 \end_layout
19864
19865 \begin_layout Enumerate
19866
19867 \size small
19868 Don't use 
19869 \family typewriter
19870
19871 \backslash
19872 /
19873 \family default
19874  in front of small punctuation.
19875 \end_layout
19876
19877 \begin_layout Enumerate
19878
19879 \family typewriter
19880 \size small
19881 $
19882 \backslash
19883 times$
19884 \family default
19885  may look prettier here.
19886 \end_layout
19887
19888 \begin_layout Enumerate
19889
19890 \size small
19891 \emph on
19892 Multiple spaces detected in output.
19893 \end_layout
19894
19895 \begin_layout Enumerate
19896
19897 \size small
19898 This text may be ignored.
19899 \end_layout
19900
19901 \begin_layout Enumerate
19902
19903 \size small
19904 Use 
19905 \family typewriter
19906
19907 \begin_inset Quotes eld
19908 \end_inset
19909
19910
19911 \family default
19912  to begin quotation, not 
19913 \family typewriter
19914 '
19915 \family default
19916 .
19917 \end_layout
19918
19919 \begin_layout Enumerate
19920
19921 \size small
19922 Use 
19923 \family typewriter
19924 '
19925 \family default
19926  to end quotation, not 
19927 \family typewriter
19928
19929 \begin_inset Quotes eld
19930 \end_inset
19931
19932
19933 \family default
19934 .
19935 \end_layout
19936
19937 \begin_layout Enumerate
19938
19939 \size small
19940 Don't mix quotes.
19941 \end_layout
19942
19943 \begin_layout Enumerate
19944
19945 \size small
19946 You should perhaps use 
19947 \begin_inset Quotes eld
19948 \end_inset
19949
19950
19951 \family typewriter
19952 cmd
19953 \family default
19954
19955 \begin_inset Quotes erd
19956 \end_inset
19957
19958  instead.
19959 \end_layout
19960
19961 \begin_layout Enumerate
19962
19963 \size small
19964 You should put a space in front of/after parenthesis.
19965 \end_layout
19966
19967 \begin_layout Enumerate
19968
19969 \size small
19970 You should avoid spaces in front of/after parenthesis.
19971 \end_layout
19972
19973 \begin_layout Enumerate
19974
19975 \size small
19976 \emph on
19977 You should not use punctuation in front of/after quotes.
19978 \end_layout
19979
19980 \begin_layout Enumerate
19981
19982 \size small
19983 Double space found.
19984 \end_layout
19985
19986 \begin_layout Enumerate
19987
19988 \size small
19989 You should put punctuation outside inner/inside display math mode.
19990 \end_layout
19991
19992 \begin_layout Enumerate
19993
19994 \size small
19995 You ought to not use primitive \SpecialChar TeX
19996  in \SpecialChar LaTeX
19997  code.
19998 \end_layout
19999
20000 \begin_layout Enumerate
20001
20002 \size small
20003 You should remove spaces in front of 
20004 \begin_inset Quotes eld
20005 \end_inset
20006
20007
20008 \family typewriter
20009 %s
20010 \family default
20011
20012 \begin_inset Quotes erd
20013 \end_inset
20014
20015
20016 \end_layout
20017
20018 \begin_layout Enumerate
20019
20020 \size small
20021 \begin_inset Quotes eld
20022 \end_inset
20023
20024
20025 \family typewriter
20026 %s
20027 \family default
20028
20029 \begin_inset Quotes erd
20030 \end_inset
20031
20032  is normally not followed by 
20033 \begin_inset Quotes eld
20034 \end_inset
20035
20036
20037 \family typewriter
20038 %c
20039 \family default
20040
20041 \begin_inset Quotes erd
20042 \end_inset
20043
20044 .
20045 \end_layout
20046
20047 \begin_layout Standard
20048 In later versions of \SpecialChar LyX
20049 , we hope to provide a more complete interface to this
20050  tool (and it's smaller cousin 
20051 \family typewriter
20052 lacheck
20053 \family default
20054 ) to exploit the full power of it.
20055  But it's not exactly useless as it is now: go try it on one of your existing
20056  documents of a certain length and be surprised.
20057 \end_layout
20058
20059 \begin_layout Section
20060 Version Control in \SpecialChar LyX
20061
20062 \end_layout
20063
20064 \begin_layout Standard
20065 by
20066 \noun on
20067  Lars Gullik Bjønnes 
20068 \noun default
20069 and 
20070 \noun on
20071 Pavel Sanda
20072 \end_layout
20073
20074 \begin_layout Subsection
20075 Introduction
20076 \end_layout
20077
20078 \begin_layout Standard
20079 \SpecialChar LyX
20080  supports some of the most basic RCS/CVS/SVN/GIT commands.
20081  If you need something a bit more sophisticated you will have to do that
20082  manually in a terminal.
20083 \end_layout
20084
20085 \begin_layout Standard
20086 Also note that CVS support is not as good as subversion support so we advise
20087  using SVN instead.
20088  A good place to start learning Subversion is SVN Book
20089 \begin_inset Foot
20090 status collapsed
20091
20092 \begin_layout Plain Layout
20093 \begin_inset CommandInset href
20094 LatexCommand href
20095 target "http://svnbook.red-bean.com/"
20096 literal "false"
20097
20098 \end_inset
20099
20100
20101 \end_layout
20102
20103 \end_inset
20104
20105 .
20106  In the case of RCS you should read 
20107 \begin_inset Quotes eld
20108 \end_inset
20109
20110 rcsintro
20111 \begin_inset Quotes erd
20112 \end_inset
20113
20114  (a man file, read it with 
20115 \family typewriter
20116 man rcsintro
20117 \family default
20118 ).
20119  This file describes all the basic features of RCS.
20120  You should especially notice the comment about a RCS directory, and the
20121  notion of a master RCS file (the file ending in 
20122 \family typewriter
20123 ,v
20124 \family default
20125 ).
20126 \end_layout
20127
20128 \begin_layout Standard
20129 Before you begin to use the version control features in \SpecialChar LyX
20130 , you should be
20131  familiar with RCS/CVS/SVN/GIT usage.
20132  The implementation in \SpecialChar LyX
20133  assumes a recent version of the GNU RCS or CVS/SVN
20134  package — no guarantees are made for older versions.
20135  Most of the log messages are not currently displayed after operations —
20136  you can check them in the Messages pane if unsure.
20137  Regular users of version control will appreciate VC toolbar, which can
20138  be enabled via 
20139 \family sans
20140 View\SpecialChar menuseparator
20141 Toolbars\SpecialChar menuseparator
20142 Version
20143 \begin_inset space ~
20144 \end_inset
20145
20146 Control
20147 \family default
20148 .
20149 \end_layout
20150
20151 \begin_layout Standard
20152 For introducing your own external commands consult vc-command in the manual
20153  of \SpecialChar LyX
20154  functions.
20155 \end_layout
20156
20157 \begin_layout Standard
20158 It is strongly recommended to store documents in uncompressed format if
20159  using version control (uncheck 
20160 \family sans
20161 Document\SpecialChar menuseparator
20162 Compressed
20163 \family default
20164  if it is checked): Uncompressed LyX documents are text files and therefore
20165  for merging two different versions by version control systems.
20166  Compressed LyX documents are binary files, which cannot be merged by version
20167  control systems.
20168 \end_layout
20169
20170 \begin_layout Subsection
20171 RCS commands in \SpecialChar LyX
20172
20173 \end_layout
20174
20175 \begin_layout Standard
20176 The following sections describe the RCS commands supported by \SpecialChar LyX
20177 .
20178  You can find them in the 
20179 \family sans
20180 File\SpecialChar menuseparator
20181 Version
20182 \begin_inset space ~
20183 \end_inset
20184
20185 Control
20186 \family default
20187  submenu.
20188  \SpecialChar LyX
20189  was tested against RCS 5.7/5.8.
20190 \end_layout
20191
20192 \begin_layout Subsubsection
20193
20194 \family sans
20195 Register
20196 \end_layout
20197
20198 \begin_layout Standard
20199 If your document is not under revision control, this is the only item shown
20200  in the menu.
20201  And if it is under revision control, the 
20202 \family sans
20203 Register
20204 \family default
20205  item is not visible.
20206  
20207 \end_layout
20208
20209 \begin_layout Standard
20210 This command registers your document with RCS (unless you are under the
20211  directory managed by CVS)\SpecialChar endofsentence
20212  You are asked interactively to supply an initial
20213  description of the document.
20214  The document is now set in Read-Only mode and you have to 
20215 \family sans
20216 Check
20217 \begin_inset space ~
20218 \end_inset
20219
20220 Out
20221 \begin_inset space ~
20222 \end_inset
20223
20224 For
20225 \begin_inset space ~
20226 \end_inset
20227
20228 Edit
20229 \family default
20230 , before making any changes to it.
20231  A document under revision control has a 
20232 \begin_inset Quotes eld
20233 \end_inset
20234
20235 [RCS:<version> <locker>]
20236 \begin_inset Quotes erd
20237 \end_inset
20238
20239  item tagged to the filename in the minibuffer.
20240 \end_layout
20241
20242 \begin_layout Standard
20243 RCS command that is run: 
20244 \family typewriter
20245 ci -q -u -i -t-"<initial description>" <file-name>
20246 \end_layout
20247
20248 \begin_layout Standard
20249 Read 
20250 \family typewriter
20251 man ci
20252 \family default
20253  to understand the switches.
20254  
20255 \end_layout
20256
20257 \begin_layout Subsubsection
20258
20259 \family sans
20260 Check In Changes
20261 \end_layout
20262
20263 \begin_layout Standard
20264 When you are finished editing a file, you check in your changes.
20265  When you do this, you are asked for a description of the changes.
20266  This is stored in the history log.
20267  The version number is bumped, your changes are applied to the master RCS
20268  file, the document is unlocked and set to Read-Only mode.
20269 \end_layout
20270
20271 \begin_layout Standard
20272 RCS command: 
20273 \family typewriter
20274 ci -q -u -m"<description>" <file-name>
20275 \end_layout
20276
20277 \begin_layout Subsubsection
20278
20279 \family sans
20280 Check Out For Edit
20281 \end_layout
20282
20283 \begin_layout Standard
20284 By doing this you lock the document so that only you can edit it.
20285  This will also make the document Read-Write only for you.
20286  You will usually continue editing for a while and when you are finished
20287  you check in your changes.
20288  The status line is changed to reflect that you have locked the file.
20289 \end_layout
20290
20291 \begin_layout Standard
20292 RCS command: 
20293 \family typewriter
20294 co -q -l <file-name>
20295 \end_layout
20296
20297 \begin_layout Subsubsection
20298
20299 \family sans
20300 Revert To Repository Version
20301 \end_layout
20302
20303 \begin_layout Standard
20304 This will discard all changes made to the document since the last check
20305  in.
20306  You get a warning before changes are discarded.
20307 \end_layout
20308
20309 \begin_layout Standard
20310 RCS command: 
20311 \family typewriter
20312 co -f -u<version> <file-name>
20313 \end_layout
20314
20315 \begin_layout Subsubsection
20316
20317 \family sans
20318 Copy
20319 \end_layout
20320
20321 \begin_layout Standard
20322 This will create a copy of the current document.
20323  Since RCS does not support copy operations natively, the version history
20324  is not preserved, and the copy is added as a new file.
20325  It requires a clean document without any changes since the last checkin.
20326  You are asked for a file name and a description of the copy operation.
20327  After that the copy is created, both locally and in the repository.
20328  If the parent directories of the copied and original document differ, all
20329  relative paths of included files of the copy are adjusted (like in 
20330 \family sans
20331 File\SpecialChar menuseparator
20332 Save As
20333 \family default
20334 \SpecialChar ldots
20335 ).
20336  Finally, the copy is loaded instead of the original document.
20337 \end_layout
20338
20339 \begin_layout Labeling
20340 \labelwidthstring 00.00.0000
20341 RCS
20342 \begin_inset space ~
20343 \end_inset
20344
20345 commands: 
20346 \begin_inset space ~
20347 \end_inset
20348
20349
20350 \begin_inset Newline newline
20351 \end_inset
20352
20353 Copy 
20354 \begin_inset Flex Code
20355 status collapsed
20356
20357 \begin_layout Plain Layout
20358
20359 \family typewriter
20360 \begin_inset Quotes eld
20361 \end_inset
20362
20363 <file-name>
20364 \begin_inset Quotes erd
20365 \end_inset
20366
20367
20368 \end_layout
20369
20370 \end_inset
20371
20372  to 
20373 \begin_inset Flex Code
20374 status collapsed
20375
20376 \begin_layout Plain Layout
20377
20378 \family typewriter
20379 \begin_inset Quotes eld
20380 \end_inset
20381
20382 <new-file-name>
20383 \begin_inset Quotes erd
20384 \end_inset
20385
20386
20387 \end_layout
20388
20389 \end_inset
20390
20391
20392 \begin_inset Newline newline
20393 \end_inset
20394
20395
20396 \begin_inset Flex Code
20397 status collapsed
20398
20399 \begin_layout Plain Layout
20400 ci -q -u 
20401 \family typewriter
20402 -i 
20403 \begin_inset Quotes eld
20404 \end_inset
20405
20406 <new-file-name>
20407 \begin_inset Quotes erd
20408 \end_inset
20409
20410
20411 \end_layout
20412
20413 \end_inset
20414
20415
20416 \end_layout
20417
20418 \begin_layout Subsubsection
20419
20420 \family sans
20421 Undo Last Checkin
20422 \end_layout
20423
20424 \begin_layout Standard
20425 This makes as if the last check in never happened.
20426  No changes are made to the document loaded into \SpecialChar LyX
20427 , but the last version
20428  is removed from the master RCS file.
20429 \end_layout
20430
20431 \begin_layout Standard
20432 RCS command: 
20433 \family typewriter
20434 rcs -o<version> <file-name>
20435 \end_layout
20436
20437 \begin_layout Subsubsection
20438
20439 \family sans
20440 Show History
20441 \end_layout
20442
20443 \begin_layout Standard
20444 This shows the complete history of the RCS document.
20445  The output of 
20446 \family typewriter
20447 rlog <file-name>
20448 \family default
20449  is shown in a browser.
20450  See 
20451 \family typewriter
20452 man rlog
20453 \family default
20454  for more info.
20455 \end_layout
20456
20457 \begin_layout Subsubsection
20458 Revision info
20459 \end_layout
20460
20461 \begin_layout Standard
20462 \SpecialChar LyX
20463  supports RCS version number, author name, date and time of last commit.
20464  All those are extracted from 
20465 \family typewriter
20466 rlog -r <file-name>
20467 \family default
20468 .
20469  See 
20470 \begin_inset CommandInset ref
20471 LatexCommand ref
20472 reference "subsec:VCS-Revision-Information"
20473
20474 \end_inset
20475
20476  for details.
20477 \end_layout
20478
20479 \begin_layout Subsection
20480 CVS commands in \SpecialChar LyX
20481
20482 \end_layout
20483
20484 \begin_layout Standard
20485 A subset of CVS operations is supported by \SpecialChar LyX
20486 .
20487  You can find the commands in the 
20488 \family sans
20489 File\SpecialChar menuseparator
20490 Version
20491 \begin_inset space ~
20492 \end_inset
20493
20494 Control
20495 \family default
20496  submenu.
20497  The version control system SVN is more powerful, so please use it instead
20498  of CVS if possible.
20499 \end_layout
20500
20501 \begin_layout Subsubsection
20502
20503 \family sans
20504 General CVS usage
20505 \end_layout
20506
20507 \begin_layout Standard
20508 If you start from scratch with CVS you have to create your repository and
20509  checkout the working copy with external tools.
20510  If you're using a client-server setup you may need to login before doing
20511  the first repository checkout.
20512 \end_layout
20513
20514 \begin_layout Standard
20515 If your documents are under revision control and others are using the same
20516  repository problems arise when different changes to the same document at
20517  the same location happen.
20518  Standard CVS repositories don't operate with a file locking mechanism.
20519  This may be surprising, but conflicts only occur if people disagree on
20520  the proper content of the same part of a document.
20521  So, if co-workers are used to communicate regularly, these conflicts occur
20522  rarely.
20523  If they don't communicate they have a fundamental problem anyway.
20524  Nevertheless some people like to work with so called 
20525 \begin_inset Quotes eld
20526 \end_inset
20527
20528 reserved checkouts
20529 \begin_inset Quotes erd
20530 \end_inset
20531
20532 .
20533  If they do so the working copy of all files is readonly when checked out
20534  first and the user starts editing after using a special command to make
20535  the working copy writable.
20536  When the changes are checked in the working copy returns to readonly state.
20537  With \SpecialChar LyX
20538  one has to edit the 
20539 \begin_inset Flex Code
20540 status collapsed
20541
20542 \begin_layout Plain Layout
20543 .cvsrc
20544 \end_layout
20545
20546 \end_inset
20547
20548  file and add the line 
20549 \begin_inset Flex Code
20550 status collapsed
20551
20552 \begin_layout Plain Layout
20553 cvs -r
20554 \end_layout
20555
20556 \end_inset
20557
20558  to work with reserved checkouts.
20559  The benefit is the possibility to see who is using a writable copy of some
20560  document.
20561  It's not guaranteed only one user makes a copy writable.
20562 \end_layout
20563
20564 \begin_layout Standard
20565 \SpecialChar LyX
20566  tries to guess if you're using reserved or non-reserved checkouts.
20567  If your working copy is readonly or it is writable and an additional copy
20568  of your document exists in the CVS/Base sub-directory a reserved otherwise
20569  a non-reserved checkout is assumed.
20570  When a reserved checkout is detected you have to use 
20571 \begin_inset Flex Noun
20572 status collapsed
20573
20574 \begin_layout Plain Layout
20575 Check Out
20576 \end_layout
20577
20578 \end_inset
20579
20580  to make your working copy writable if it's readonly.
20581  After doing so the 
20582 \begin_inset Flex Noun
20583 status collapsed
20584
20585 \begin_layout Plain Layout
20586 Check In
20587 \end_layout
20588
20589 \end_inset
20590
20591  operation is possible and that makes your working copy readonly again after
20592  transferring your changes to the repository.
20593 \end_layout
20594
20595 \begin_layout Standard
20596 More information about CVS can be found here 
20597 \begin_inset Flex URL
20598 status collapsed
20599
20600 \begin_layout Plain Layout
20601
20602 http://www.nongnu.org/cvs
20603 \end_layout
20604
20605 \end_inset
20606
20607  and here 
20608 \begin_inset Flex URL
20609 status collapsed
20610
20611 \begin_layout Plain Layout
20612
20613 http://ximbiot.com/cvs
20614 \end_layout
20615
20616 \end_inset
20617
20618 .
20619 \end_layout
20620
20621 \begin_layout Standard
20622 Read 
20623 \family typewriter
20624 man cvs
20625 \family default
20626  to understand the sub-commands and the switches mentioned below.
20627 \end_layout
20628
20629 \begin_layout Subsubsection
20630
20631 \family sans
20632 Register
20633 \end_layout
20634
20635 \begin_layout Standard
20636 If your document is not under revision control, this is the only item shown
20637  in the menu.
20638  And if it is under revision control, the 
20639 \family sans
20640 Register
20641 \family default
20642  item is not visible.
20643  
20644 \end_layout
20645
20646 \begin_layout Standard
20647 This command registers in CVS your document 
20648 \begin_inset Flex Strong
20649 status collapsed
20650
20651 \begin_layout Plain Layout
20652
20653 \emph on
20654 only
20655 \end_layout
20656
20657 \end_inset
20658
20659  in the case you have already the documents directory under CVS control
20660  (in particular 
20661 \family typewriter
20662 CVS/Entries
20663 \family default
20664  file exists).
20665  This means you have to create or checkout the archive by yourself using
20666  external tools.
20667  (In case you forget that step \SpecialChar LyX
20668  registers the document with RCS.)
20669 \end_layout
20670
20671 \begin_layout Standard
20672 Then you are asked interactively to supply an initial description of the
20673  document.
20674  Don't forget that registered file is not yet checked in.
20675 \end_layout
20676
20677 \begin_layout Standard
20678 CVS command that is run: 
20679 \family typewriter
20680 cvs -q add -m"<entered message>" "<file-name>"
20681 \end_layout
20682
20683 \begin_layout Standard
20684 The term 
20685 \family typewriter
20686 "<file-name>"
20687 \family default
20688  above and for all other CVS commands is an abbreviation for 
20689 \begin_inset Quotes eld
20690 \end_inset
20691
20692 change the current working directory to file location and use the file name
20693  without path component as argument
20694 \begin_inset Quotes erd
20695 \end_inset
20696
20697 .
20698 \end_layout
20699
20700 \begin_layout Subsubsection
20701
20702 \family sans
20703 Check In Changes
20704 \end_layout
20705
20706 \begin_layout Standard
20707 When you are finished editing a file, you commit your changes.
20708  When you do this and you had changed the document, you are asked for a
20709  description of the changes.
20710  After that changes are written to the repository.
20711  In case you didn't change the document and a reserved checkout is detected
20712  the reservation made on 
20713 \begin_inset Flex Noun
20714 status collapsed
20715
20716 \begin_layout Plain Layout
20717 Check Out
20718 \end_layout
20719
20720 \end_inset
20721
20722  is undone.
20723 \end_layout
20724
20725 \begin_layout Labeling
20726 \labelwidthstring 00.00.0000
20727 CVS
20728 \begin_inset space ~
20729 \end_inset
20730
20731 command: 
20732 \begin_inset space ~
20733 \end_inset
20734
20735
20736 \begin_inset Newline newline
20737 \end_inset
20738
20739
20740 \begin_inset Flex Code
20741 status collapsed
20742
20743 \begin_layout Plain Layout
20744 cvs 
20745 \family typewriter
20746 -q commit -m"<description>" "<file-name>"
20747 \end_layout
20748
20749 \end_inset
20750
20751  or
20752 \begin_inset Newline newline
20753 \end_inset
20754
20755
20756 \begin_inset Flex Code
20757 status collapsed
20758
20759 \begin_layout Plain Layout
20760 cvs -q unedit 
20761 \family typewriter
20762 "<file-name>"
20763 \end_layout
20764
20765 \end_inset
20766
20767
20768 \end_layout
20769
20770 \begin_layout Subsubsection
20771
20772 \family sans
20773 Check Out Changes
20774 \end_layout
20775
20776 \begin_layout Standard
20777 When you are sharing a repository with others, you may have to incorporate
20778  their changes into your working copy.
20779 \end_layout
20780
20781 \begin_layout Standard
20782 CVS command: 
20783 \family typewriter
20784 cvs -q update "<file-name>"
20785 \end_layout
20786
20787 \begin_layout Standard
20788 If a readonly checkout is detected the working copy is made writable and
20789  reserved.
20790 \end_layout
20791
20792 \begin_layout Standard
20793 CVS command: 
20794 \family typewriter
20795 cvs -q edit "<file-name>"
20796 \end_layout
20797
20798 \begin_layout Subsubsection
20799
20800 \family sans
20801 Revert To Repository Version
20802 \end_layout
20803
20804 \begin_layout Standard
20805 This will discard all changes made to the document since the last check
20806  in.
20807  You get a warning before changes are discarded.
20808  Firstly the file is deleted, secondly CVS update command is run.
20809 \end_layout
20810
20811 \begin_layout Standard
20812 CVS command: 
20813 \family typewriter
20814 cvs -q update "<file-name>"
20815 \end_layout
20816
20817 \begin_layout Standard
20818 If a reserved checkout is detected and the working copy has no changes only
20819  the reservation is undone.
20820 \end_layout
20821
20822 \begin_layout Standard
20823 CVS command: 
20824 \family typewriter
20825 cvs -q unedit "<file-name>"
20826 \end_layout
20827
20828 \begin_layout Subsubsection
20829
20830 \family sans
20831 Copy
20832 \end_layout
20833
20834 \begin_layout Standard
20835 This will create a copy of the current document.
20836  Since CVS does not support copy operations natively, the version history
20837  is not preserved, and the copy is added as a new file.
20838  It requires a clean document without any changes since the last checkin.
20839  You are asked for a file name and a description of the copy operation.
20840  After that the copy is created, both locally and in the repository.
20841  If the parent directories of the copied and original document differ, all
20842  relative paths of included files of the copy are adjusted (like in 
20843 \family sans
20844 File\SpecialChar menuseparator
20845 Save As
20846 \family default
20847 \SpecialChar ldots
20848 ).
20849  Finally, the copy is loaded instead of the original document.
20850 \end_layout
20851
20852 \begin_layout Labeling
20853 \labelwidthstring 00.00.0000
20854 CVS
20855 \begin_inset space ~
20856 \end_inset
20857
20858 commands: 
20859 \begin_inset space ~
20860 \end_inset
20861
20862
20863 \begin_inset Newline newline
20864 \end_inset
20865
20866 Copy 
20867 \begin_inset Flex Code
20868 status collapsed
20869
20870 \begin_layout Plain Layout
20871
20872 \family typewriter
20873 \begin_inset Quotes eld
20874 \end_inset
20875
20876 <file-name>
20877 \begin_inset Quotes erd
20878 \end_inset
20879
20880
20881 \end_layout
20882
20883 \end_inset
20884
20885  to 
20886 \begin_inset Flex Code
20887 status collapsed
20888
20889 \begin_layout Plain Layout
20890
20891 \family typewriter
20892 \begin_inset Quotes eld
20893 \end_inset
20894
20895 <new-file-name>
20896 \begin_inset Quotes erd
20897 \end_inset
20898
20899
20900 \end_layout
20901
20902 \end_inset
20903
20904
20905 \begin_inset Newline newline
20906 \end_inset
20907
20908
20909 \begin_inset Flex Code
20910 status collapsed
20911
20912 \begin_layout Plain Layout
20913 cvs -q add 
20914 \family typewriter
20915
20916 \begin_inset Quotes eld
20917 \end_inset
20918
20919 <new-file-name>
20920 \begin_inset Quotes erd
20921 \end_inset
20922
20923
20924 \end_layout
20925
20926 \end_inset
20927
20928
20929 \end_layout
20930
20931 \begin_layout Subsubsection
20932
20933 \family sans
20934 Rename
20935 \end_layout
20936
20937 \begin_layout Standard
20938 This will rename the current document.
20939  Since CVS does not support rename operations natively, the version history
20940  is not preserved, the renamed document is added as a new file, and the
20941  original document is deleted.
20942  It requires a clean document without any changes since the last checkin.
20943  You are asked for a file name and a description of the rename operation.
20944  After that the document is renamed, both locally and in the repository.
20945  If the parent directories of the new and old file names differ, all relative
20946  paths of included files are adjusted (like in 
20947 \family sans
20948 File\SpecialChar menuseparator
20949 Save As
20950 \family default
20951 \SpecialChar ldots
20952 ).
20953  Finally, the document is reloaded using the new name.
20954 \end_layout
20955
20956 \begin_layout Labeling
20957 \labelwidthstring 00.00.0000
20958 CVS
20959 \begin_inset space ~
20960 \end_inset
20961
20962 commands: 
20963 \begin_inset space ~
20964 \end_inset
20965
20966
20967 \begin_inset Newline newline
20968 \end_inset
20969
20970 Rename 
20971 \begin_inset Flex Code
20972 status collapsed
20973
20974 \begin_layout Plain Layout
20975
20976 \family typewriter
20977 \begin_inset Quotes eld
20978 \end_inset
20979
20980 <file-name>
20981 \begin_inset Quotes erd
20982 \end_inset
20983
20984
20985 \end_layout
20986
20987 \end_inset
20988
20989  to 
20990 \begin_inset Flex Code
20991 status collapsed
20992
20993 \begin_layout Plain Layout
20994
20995 \family typewriter
20996 \begin_inset Quotes eld
20997 \end_inset
20998
20999 <new-file-name>
21000 \begin_inset Quotes erd
21001 \end_inset
21002
21003
21004 \end_layout
21005
21006 \end_inset
21007
21008
21009 \begin_inset Newline newline
21010 \end_inset
21011
21012
21013 \begin_inset Flex Code
21014 status collapsed
21015
21016 \begin_layout Plain Layout
21017 cvs -q add 
21018 \family typewriter
21019
21020 \begin_inset Quotes eld
21021 \end_inset
21022
21023 <new-file-name>
21024 \begin_inset Quotes erd
21025 \end_inset
21026
21027
21028 \end_layout
21029
21030 \end_inset
21031
21032
21033 \begin_inset Newline newline
21034 \end_inset
21035
21036
21037 \begin_inset Flex Code
21038 status collapsed
21039
21040 \begin_layout Plain Layout
21041 cvs -q remove 
21042 \family typewriter
21043
21044 \begin_inset Quotes eld
21045 \end_inset
21046
21047 <file-name>
21048 \begin_inset Quotes erd
21049 \end_inset
21050
21051
21052 \end_layout
21053
21054 \end_inset
21055
21056
21057 \end_layout
21058
21059 \begin_layout Subsubsection
21060 Update of the local directory checkout from repository
21061 \end_layout
21062
21063 \begin_layout Standard
21064 Once your documents gets more complex, containing sub-documents and pictures,
21065  including external 
21066 \begin_inset Flex Code
21067 status collapsed
21068
21069 \begin_layout Plain Layout
21070 .tex
21071 \end_layout
21072
21073 \end_inset
21074
21075  files and so on using version control becomes more complicated.
21076  \SpecialChar LyX
21077  supports updating the whole tree in which resides the document.
21078  This become especially useful once you cooperate with people which neither
21079  have detailed knowledge about CVS usage nor they have ambition to commit
21080  additional material to the repository.
21081  You have to organize the files structure so that all external files are
21082  in the same directory or subdirectories of the document.
21083  It's good practice anyway to store multipart documents in an extra directory.
21084 \end_layout
21085
21086 \begin_layout Standard
21087 The 
21088 \begin_inset Flex Code
21089 status collapsed
21090
21091 \begin_layout Plain Layout
21092 Update local directory from repository
21093 \end_layout
21094
21095 \end_inset
21096
21097  command updates the whole directory.
21098  If local changes are detected user is warned before update starts.
21099  In case of merge conflicts both versions of the conflicting document parts
21100  are placed in the final document.
21101  You have to review and correct the result of the merge.
21102  You'll find the conflicts enclosed in pairs of 
21103 \begin_inset Flex Code
21104 status collapsed
21105
21106 \begin_layout Plain Layout
21107 <<<<<<<
21108 \end_layout
21109
21110 \end_inset
21111
21112  and 
21113 \begin_inset Flex Code
21114 status collapsed
21115
21116 \begin_layout Plain Layout
21117 >>>>>>>
21118 \end_layout
21119
21120 \end_inset
21121
21122  separated by 
21123 \begin_inset Flex Code
21124 status collapsed
21125
21126 \begin_layout Plain Layout
21127 =======
21128 \end_layout
21129
21130 \end_inset
21131
21132 .
21133  The first part is your version as before the update operation with the
21134  document name prepended.
21135  The second one is the repository version with the version number after
21136  the sequence of 
21137 \begin_inset Flex Code
21138 status collapsed
21139
21140 \begin_layout Plain Layout
21141 >
21142 \end_layout
21143
21144 \end_inset
21145
21146  signs.
21147 \end_layout
21148
21149 \begin_layout Labeling
21150 \labelwidthstring 00.00.0000
21151 CVS
21152 \begin_inset space ~
21153 \end_inset
21154
21155 commands: 
21156 \begin_inset space ~
21157 \end_inset
21158
21159
21160 \begin_inset Newline newline
21161 \end_inset
21162
21163
21164 \begin_inset Flex Code
21165 status collapsed
21166
21167 \begin_layout Plain Layout
21168 cd $path; cvs diff 
21169 \family typewriter
21170 "."
21171 \end_layout
21172
21173 \end_inset
21174
21175  (Ask if changes are detected.)
21176 \begin_inset Newline newline
21177 \end_inset
21178
21179
21180 \begin_inset Flex Code
21181 status collapsed
21182
21183 \begin_layout Plain Layout
21184 cd $path; cvs -q update 
21185 \family typewriter
21186 "."
21187 \end_layout
21188
21189 \end_inset
21190
21191
21192 \end_layout
21193
21194 \begin_layout Standard
21195 where 
21196 \begin_inset Flex Code
21197 status collapsed
21198
21199 \begin_layout Plain Layout
21200 $path
21201 \end_layout
21202
21203 \end_inset
21204
21205  stands for the path to the document.
21206 \end_layout
21207
21208 \begin_layout Subsubsection
21209
21210 \family sans
21211 Show History
21212 \end_layout
21213
21214 \begin_layout Standard
21215 This shows the complete history of the CVS document.
21216  The output of 
21217 \family typewriter
21218 cvs log "<file-name>"
21219 \family default
21220  is shown in a browser.
21221 \end_layout
21222
21223 \begin_layout Subsubsection
21224 Revision info
21225 \end_layout
21226
21227 \begin_layout Standard
21228 \SpecialChar LyX
21229  supports CVS version number, author name, date and time of last commit.
21230  All those are extracted from 
21231 \family typewriter
21232 cvs log -r <file-name>
21233 \family default
21234 .
21235  See 
21236 \begin_inset CommandInset ref
21237 LatexCommand ref
21238 reference "subsec:VCS-Revision-Information"
21239
21240 \end_inset
21241
21242  for details.
21243 \end_layout
21244
21245 \begin_layout Subsection
21246 SVN commands in \SpecialChar LyX
21247
21248 \end_layout
21249
21250 \begin_layout Standard
21251 SVN is now partially supported by \SpecialChar LyX
21252 .
21253  You can find the commands in the 
21254 \family sans
21255 File\SpecialChar menuseparator
21256 Version
21257 \begin_inset space ~
21258 \end_inset
21259
21260 Control
21261 \family default
21262  submenu.
21263  Please note that if you use password protected access to repository via
21264  ssh, you will be asked in terminal window.
21265  \SpecialChar LyX
21266  was tested against SVN 1.5, 1.6, 1.7 and 1.8
21267 \begin_inset Foot
21268 status open
21269
21270 \begin_layout Plain Layout
21271 Most of the commands will work with 1.4 too, see 
21272 \begin_inset CommandInset ref
21273 LatexCommand ref
21274 reference "subsec:SVN-Repo-Update"
21275
21276 \end_inset
21277
21278 .
21279  There seems to be currently unresolved permissions problem under SVN 1.8
21280  with reverting changes when file is locked.
21281 \end_layout
21282
21283 \end_inset
21284
21285
21286 \end_layout
21287
21288 \begin_layout Subsubsection
21289
21290 \family sans
21291 Register
21292 \end_layout
21293
21294 \begin_layout Standard
21295 If your document is not under revision control, this is the only item shown
21296  in the menu.
21297  And if it is under revision control, the 
21298 \family sans
21299 Register
21300 \family default
21301  item is not visible.
21302 \end_layout
21303
21304 \begin_layout Standard
21305 This command registers in SVN your document ONLY in case you have already
21306  the documents directory under SVN control (in particular 
21307 \family typewriter
21308 .svn/entries
21309 \family default
21310  file exists).
21311  This means you have to checkout the archive by yourself.
21312 \end_layout
21313
21314 \begin_layout Standard
21315 Then you are asked interactively to supply an initial description of the
21316  document.
21317  Don't forget that registered file is not yet commited.
21318 \end_layout
21319
21320 \begin_layout Standard
21321 SVN command that is run: 
21322 \family typewriter
21323 svn add -q 
21324 \begin_inset Quotes eld
21325 \end_inset
21326
21327 <file-name>
21328 \begin_inset Quotes erd
21329 \end_inset
21330
21331
21332 \end_layout
21333
21334 \begin_layout Standard
21335 Read 
21336 \family typewriter
21337 man svn
21338 \family default
21339  to understand the switches.
21340 \end_layout
21341
21342 \begin_layout Subsubsection
21343
21344 \family sans
21345 Check In Changes
21346 \end_layout
21347
21348 \begin_layout Standard
21349 When you are finished editing a file, you commit your changes.
21350  When you do this, you are asked for a description of the changes.
21351  After that changes are commited.
21352 \end_layout
21353
21354 \begin_layout Standard
21355 SVN command:
21356 \begin_inset Foot
21357 status collapsed
21358
21359 \begin_layout Plain Layout
21360 In case locking is not enabled.
21361  See Section 
21362 \begin_inset CommandInset ref
21363 LatexCommand ref
21364 reference "subsec:SVN-File-Locking"
21365
21366 \end_inset
21367
21368 .
21369 \end_layout
21370
21371 \end_inset
21372
21373  
21374 \family typewriter
21375 svn commit -q -m"<description>" <file-name>
21376 \end_layout
21377
21378 \begin_layout Subsubsection
21379
21380 \family sans
21381 Check Out For Edit
21382 \end_layout
21383
21384 \begin_layout Standard
21385 Updates the changes of this file from the repository.
21386  Be sure you understand SVN merging and conflicts resolving before using
21387  this function, because all conflicts has to be resolved manually by you!
21388 \end_layout
21389
21390 \begin_layout Standard
21391 SVN command:
21392 \begin_inset Foot
21393 status collapsed
21394
21395 \begin_layout Plain Layout
21396 Ditto.
21397 \end_layout
21398
21399 \end_inset
21400
21401  
21402 \family typewriter
21403 svn update --non-interactive 
21404 \begin_inset Quotes eld
21405 \end_inset
21406
21407 <file-name>
21408 \begin_inset Quotes erd
21409 \end_inset
21410
21411
21412 \end_layout
21413
21414 \begin_layout Subsubsection
21415
21416 \family sans
21417 Revert To Repository Version
21418 \end_layout
21419
21420 \begin_layout Standard
21421 This will discard all changes made to the document since the last check
21422  in.
21423  You get a warning before changes are discarded.
21424 \end_layout
21425
21426 \begin_layout Standard
21427 SVN command: 
21428 \family typewriter
21429 svn revert -q 
21430 \begin_inset Quotes eld
21431 \end_inset
21432
21433 <file-name>
21434 \begin_inset Quotes erd
21435 \end_inset
21436
21437
21438 \end_layout
21439
21440 \begin_layout Subsubsection
21441
21442 \family sans
21443 Copy
21444 \end_layout
21445
21446 \begin_layout Standard
21447 This will create a copy of the current document including the version history.
21448  It requires a clean document without any changes since the last checkin.
21449  You are asked for a file name and a description of the copy operation.
21450  After that the copy is created, both locally and in the repository.
21451  If the parent directories of the copied and original document differ, all
21452  relative paths of included files of the copy are adjusted (like in 
21453 \family sans
21454 File\SpecialChar menuseparator
21455 Save As
21456 \family default
21457 \SpecialChar ldots
21458 ).
21459  Finally, the copy is loaded instead of the original document.
21460 \end_layout
21461
21462 \begin_layout Labeling
21463 \labelwidthstring 00.00.0000
21464 SVN
21465 \begin_inset space ~
21466 \end_inset
21467
21468 commands: 
21469 \begin_inset space ~
21470 \end_inset
21471
21472
21473 \begin_inset Newline newline
21474 \end_inset
21475
21476
21477 \begin_inset Flex Code
21478 status collapsed
21479
21480 \begin_layout Plain Layout
21481 svn copy -q 
21482 \family typewriter
21483
21484 \begin_inset Quotes eld
21485 \end_inset
21486
21487 <file-name>
21488 \begin_inset Quotes erd
21489 \end_inset
21490
21491  
21492 \begin_inset Quotes eld
21493 \end_inset
21494
21495 <new-file-name>
21496 \begin_inset Quotes erd
21497 \end_inset
21498
21499
21500 \end_layout
21501
21502 \end_inset
21503
21504
21505 \begin_inset Newline newline
21506 \end_inset
21507
21508
21509 \begin_inset Flex Code
21510 status collapsed
21511
21512 \begin_layout Plain Layout
21513 svn commit
21514 \end_layout
21515
21516 \end_inset
21517
21518
21519 \end_layout
21520
21521 \begin_layout Subsubsection
21522
21523 \family sans
21524 Rename
21525 \end_layout
21526
21527 \begin_layout Standard
21528 This will rename the current document including the version history.
21529  It requires a clean document without any changes since the last checkin.
21530  You are asked for a file name and a description of the rename operation.
21531  After that the document is renamed, both locally and in the repository.
21532  If the parent directories of the new and old file names differ, all relative
21533  paths of included files are adjusted (like in 
21534 \family sans
21535 File\SpecialChar menuseparator
21536 Save As
21537 \family default
21538 \SpecialChar ldots
21539 ).
21540  Finally, the document is reloaded using the new name.
21541 \end_layout
21542
21543 \begin_layout Labeling
21544 \labelwidthstring 00.00.0000
21545 SVN
21546 \begin_inset space ~
21547 \end_inset
21548
21549 commands: 
21550 \begin_inset space ~
21551 \end_inset
21552
21553
21554 \begin_inset Newline newline
21555 \end_inset
21556
21557
21558 \begin_inset Flex Code
21559 status collapsed
21560
21561 \begin_layout Plain Layout
21562 svn move -q 
21563 \family typewriter
21564
21565 \begin_inset Quotes eld
21566 \end_inset
21567
21568 <file-name>
21569 \begin_inset Quotes erd
21570 \end_inset
21571
21572  
21573 \begin_inset Quotes eld
21574 \end_inset
21575
21576 <new-file-name>
21577 \begin_inset Quotes erd
21578 \end_inset
21579
21580
21581 \end_layout
21582
21583 \end_inset
21584
21585
21586 \begin_inset Newline newline
21587 \end_inset
21588
21589
21590 \begin_inset Flex Code
21591 status collapsed
21592
21593 \begin_layout Plain Layout
21594 svn commit
21595 \end_layout
21596
21597 \end_inset
21598
21599
21600 \end_layout
21601
21602 \begin_layout Subsubsection
21603 \begin_inset CommandInset label
21604 LatexCommand label
21605 name "subsec:SVN-Repo-Update"
21606
21607 \end_inset
21608
21609 Update of the local directory checkout from repository
21610 \begin_inset Foot
21611 status collapsed
21612
21613 \begin_layout Plain Layout
21614 Note that this command will work only with subversion 
21615 \begin_inset Formula $\geqq1.5$
21616 \end_inset
21617
21618
21619 \end_layout
21620
21621 \end_inset
21622
21623
21624 \end_layout
21625
21626 \begin_layout Standard
21627 All the commands above have one shortcomming - they deal with the current
21628  document only.
21629  Once your document contains pictures, includes external 
21630 \begin_inset Flex Code
21631 status collapsed
21632
21633 \begin_layout Plain Layout
21634 .tex
21635 \end_layout
21636
21637 \end_inset
21638
21639  files and so on administration becomes more complicated.
21640  \SpecialChar LyX
21641  now supports updating the whole tree in which resides the document
21642 \begin_inset Foot
21643 status collapsed
21644
21645 \begin_layout Plain Layout
21646 One need to organize the files structure so that all external files are
21647  in the same directory or subdirectories of the document.
21648  
21649 \end_layout
21650
21651 \end_inset
21652
21653 .
21654  This become especially useful once you cooperate with people which neither
21655  know about subversion management nor they have ambition to commit additional
21656  material to the repository.
21657  
21658 \end_layout
21659
21660 \begin_layout Standard
21661 \begin_inset Flex Code
21662 status collapsed
21663
21664 \begin_layout Plain Layout
21665 Update local directory from repository
21666 \end_layout
21667
21668 \end_inset
21669
21670  command updates the whole directory and in case of merge conflicts local
21671  version of the files are left, so no unintended data loss occurs.
21672  If local changes are detected user is warned before update starts.
21673 \end_layout
21674
21675 \begin_layout Labeling
21676 \labelwidthstring 00.00.0000
21677 SVN
21678 \begin_inset space ~
21679 \end_inset
21680
21681 commands: 
21682 \begin_inset space ~
21683 \end_inset
21684
21685
21686 \begin_inset Newline newline
21687 \end_inset
21688
21689
21690 \begin_inset Flex Code
21691 status collapsed
21692
21693 \begin_layout Plain Layout
21694 svn diff $path
21695 \end_layout
21696
21697 \end_inset
21698
21699  (Ask if changes are detected.)
21700 \begin_inset Newline newline
21701 \end_inset
21702
21703
21704 \begin_inset Flex Code
21705 status collapsed
21706
21707 \begin_layout Plain Layout
21708 svn update –accept mine-full $path
21709 \end_layout
21710
21711 \end_inset
21712
21713
21714 \end_layout
21715
21716 \begin_layout Standard
21717 where 
21718 \begin_inset Flex Code
21719 status collapsed
21720
21721 \begin_layout Plain Layout
21722 $path
21723 \end_layout
21724
21725 \end_inset
21726
21727  stands for the path to the document.
21728 \end_layout
21729
21730 \begin_layout Subsubsection
21731
21732 \family sans
21733 Show History
21734 \end_layout
21735
21736 \begin_layout Standard
21737 This shows the complete history of the SVN document.
21738  The output of 
21739 \family typewriter
21740 svn log 
21741 \begin_inset Quotes eld
21742 \end_inset
21743
21744 <file-name>
21745 \begin_inset Quotes erd
21746 \end_inset
21747
21748
21749 \family default
21750  is shown in a browser.
21751 \end_layout
21752
21753 \begin_layout Subsubsection
21754 File Locking
21755 \begin_inset CommandInset label
21756 LatexCommand label
21757 name "subsec:SVN-File-Locking"
21758
21759 \end_inset
21760
21761
21762 \end_layout
21763
21764 \begin_layout Standard
21765 The file exchange through various revision control systems brings the problem
21766  of merge conflicts in case two different users try to edit the same (parts
21767  of) document.
21768  When such a conflict happens it needs manual resolving and one reasonable
21769  alternative is to provide some kind of locking mechanism, which guarantees
21770  that only one user is allowed to edit file at the given time.
21771 \end_layout
21772
21773 \begin_layout Standard
21774 SVN has two such mechanisms to provide mutual exclusivity for file access
21775  - locks and automatic setting of write permissions (see sec.
21776  
21777 \begin_inset CommandInset ref
21778 LatexCommand ref
21779 reference "subsec:Automatical-Locking-Property"
21780
21781 \end_inset
21782
21783 ) based on 
21784 \begin_inset Flex Code
21785 status collapsed
21786
21787 \begin_layout Plain Layout
21788 svn:needs-lock
21789 \end_layout
21790
21791 \end_inset
21792
21793  file svn property
21794 \begin_inset Foot
21795 status open
21796
21797 \begin_layout Plain Layout
21798 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
21799 \end_layout
21800
21801 \end_inset
21802
21803 .
21804  If this property is detected for a given document \SpecialChar LyX
21805  starts to use SVN locks
21806  for document editing automatically and the whole check-in/out mechanism
21807  switches to the same regimen as for RCS.
21808  This in particular means there are two different modes of file use in \SpecialChar LyX
21809 :
21810 \end_layout
21811
21812 \begin_layout Itemize
21813 Unlocked state.
21814  The loaded file is in the read-only mode.
21815  For editing on needs to check-out.
21816  
21817 \emph on
21818 Check-out
21819 \emph default
21820  consists of updating from the repository and gaining write lock.
21821  If the lock is not possible to obtain, we remain in unlocked state.
21822 \end_layout
21823
21824 \begin_layout Itemize
21825 Locked state.
21826  The loaded file is in the 'normal' edit mode.
21827  No other user is allowed to edit the file.
21828  
21829 \emph on
21830 Check-in
21831 \emph default
21832  consists of commiting changes and releasing write-lock.
21833  If no changes have been made to the document, no commit will be produced
21834 \begin_inset Foot
21835 status collapsed
21836
21837 \begin_layout Plain Layout
21838 Don't be puzzled by the fact that you will be asked for commit message anyway.
21839 \end_layout
21840
21841 \end_inset
21842
21843  and only the write-lock will be released.
21844 \end_layout
21845
21846 \begin_layout Standard
21847 SVN commands:
21848 \end_layout
21849
21850 \begin_layout Labeling
21851 \labelwidthstring 00.00.0000
21852 Check-in:
21853 \family typewriter
21854  svn commit -q -m"<description>" "<file-name>"
21855 \begin_inset Newline newline
21856 \end_inset
21857
21858 svn unlock "<file-name>"
21859 \end_layout
21860
21861 \begin_layout Labeling
21862 \labelwidthstring 00.00.0000
21863 Check-out: 
21864 \family typewriter
21865 svn update "<file-name>"
21866 \begin_inset Newline newline
21867 \end_inset
21868
21869 svn lock "<file-name>"
21870 \end_layout
21871
21872 \begin_layout Subsubsection
21873
21874 \family typewriter
21875 \begin_inset CommandInset label
21876 LatexCommand label
21877 name "subsec:Automatical-Locking-Property"
21878
21879 \end_inset
21880
21881
21882 \family default
21883 Automatic Locking Property
21884 \end_layout
21885
21886 \begin_layout Standard
21887 The above mentioned automatic setting of write permissions of the .lyx file
21888  can be set through
21889 \family sans
21890  File\SpecialChar menuseparator
21891 Version
21892 \begin_inset space ~
21893 \end_inset
21894
21895 Control\SpecialChar menuseparator
21896 Toggle locking property
21897 \family default
21898 .
21899  This command is active only when the file is not locked on the svn server
21900  (i.e.
21901  you need to check-out before proceeding).
21902 \end_layout
21903
21904 \begin_layout Labeling
21905 \labelwidthstring 00.00.0000
21906 SVN
21907 \begin_inset space ~
21908 \end_inset
21909
21910 commands:
21911 \end_layout
21912
21913 \begin_layout Labeling
21914 \labelwidthstring 00.00.0000
21915 Set:
21916 \family typewriter
21917  svn propset svn:needs-lock ON "<file-name>"
21918 \end_layout
21919
21920 \begin_layout Labeling
21921 \labelwidthstring 00.00.0000
21922 Unset: 
21923 \family typewriter
21924 svn propdel svn:needs-lock "<file-name>"
21925 \end_layout
21926
21927 \begin_layout Subsubsection
21928 \begin_inset CommandInset label
21929 LatexCommand label
21930 name "subsec:VCS-Revision-Information"
21931
21932 \end_inset
21933
21934 Revision Information in Documents
21935 \end_layout
21936
21937 \begin_layout Standard
21938 There are more possibilities how to activate revision information in our
21939  document.
21940 \end_layout
21941
21942 \begin_layout Itemize
21943 \SpecialChar LyX
21944  supports directly:
21945 \end_layout
21946
21947 \begin_deeper
21948 \begin_layout Itemize
21949 tree revision information (
21950 \begin_inset Flex Code
21951 status collapsed
21952
21953 \begin_layout Plain Layout
21954 vcs-tree-revision
21955 \end_layout
21956
21957 \end_inset
21958
21959 ).
21960  The result is the output of the 
21961 \begin_inset Flex Code
21962 status collapsed
21963
21964 \begin_layout Plain Layout
21965 svnversion
21966 \end_layout
21967
21968 \end_inset
21969
21970  command, the following table gives you an idea, how to read the results.
21971 \end_layout
21972
21973 \begin_layout Standard
21974 \align center
21975 \begin_inset Tabular
21976 <lyxtabular version="3" rows="6" columns="2">
21977 <features tabularvalignment="middle">
21978 <column alignment="center" valignment="top">
21979 <column alignment="center" valignment="top">
21980 <row>
21981 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
21982 \begin_inset Text
21983
21984 \begin_layout Plain Layout
21985 Output
21986 \end_layout
21987
21988 \end_inset
21989 </cell>
21990 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
21991 \begin_inset Text
21992
21993 \begin_layout Plain Layout
21994 Meaning
21995 \end_layout
21996
21997 \end_inset
21998 </cell>
21999 </row>
22000 <row>
22001 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
22002 \begin_inset Text
22003
22004 \begin_layout Plain Layout
22005 4123:4168
22006 \end_layout
22007
22008 \end_inset
22009 </cell>
22010 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
22011 \begin_inset Text
22012
22013 \begin_layout Plain Layout
22014 mixed revision working copy
22015 \end_layout
22016
22017 \end_inset
22018 </cell>
22019 </row>
22020 <row>
22021 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
22022 \begin_inset Text
22023
22024 \begin_layout Plain Layout
22025 4168M
22026 \end_layout
22027
22028 \end_inset
22029 </cell>
22030 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
22031 \begin_inset Text
22032
22033 \begin_layout Plain Layout
22034 modified working copy
22035 \end_layout
22036
22037 \end_inset
22038 </cell>
22039 </row>
22040 <row>
22041 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
22042 \begin_inset Text
22043
22044 \begin_layout Plain Layout
22045 4123S
22046 \end_layout
22047
22048 \end_inset
22049 </cell>
22050 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
22051 \begin_inset Text
22052
22053 \begin_layout Plain Layout
22054 switched working copy
22055 \end_layout
22056
22057 \end_inset
22058 </cell>
22059 </row>
22060 <row>
22061 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
22062 \begin_inset Text
22063
22064 \begin_layout Plain Layout
22065 4123P
22066 \end_layout
22067
22068 \end_inset
22069 </cell>
22070 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
22071 \begin_inset Text
22072
22073 \begin_layout Plain Layout
22074 partial working copy, from a sparse checkout
22075 \end_layout
22076
22077 \end_inset
22078 </cell>
22079 </row>
22080 <row>
22081 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
22082 \begin_inset Text
22083
22084 \begin_layout Plain Layout
22085 4123:4168MS
22086 \end_layout
22087
22088 \end_inset
22089 </cell>
22090 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
22091 \begin_inset Text
22092
22093 \begin_layout Plain Layout
22094 mixed revision, modified, switched working copy
22095 \end_layout
22096
22097 \end_inset
22098 </cell>
22099 </row>
22100 </lyxtabular>
22101
22102 \end_inset
22103
22104
22105 \end_layout
22106
22107 \begin_layout Itemize
22108 file revision information.
22109  The result comes from parsing the output of 
22110 \begin_inset Flex Code
22111 status collapsed
22112
22113 \begin_layout Plain Layout
22114 svn
22115 \begin_inset space ~
22116 \end_inset
22117
22118 info
22119 \begin_inset space ~
22120 \end_inset
22121
22122 –xml
22123 \begin_inset space ~
22124 \end_inset
22125
22126 file.lyx
22127 \end_layout
22128
22129 \end_inset
22130
22131 .
22132  Supported flags are:
22133 \end_layout
22134
22135 \begin_deeper
22136 \begin_layout Itemize
22137 version number of the last commit (
22138 \begin_inset Flex Code
22139 status collapsed
22140
22141 \begin_layout Plain Layout
22142 vcs-revision
22143 \end_layout
22144
22145 \end_inset
22146
22147 )
22148 \end_layout
22149
22150 \begin_layout Itemize
22151 author of the last commit (
22152 \begin_inset Flex Code
22153 status collapsed
22154
22155 \begin_layout Plain Layout
22156 vcs-author
22157 \end_layout
22158
22159 \end_inset
22160
22161 )
22162 \end_layout
22163
22164 \begin_layout Itemize
22165 date of the last commit (
22166 \begin_inset Flex Code
22167 status collapsed
22168
22169 \begin_layout Plain Layout
22170 vcs-date
22171 \end_layout
22172
22173 \end_inset
22174
22175 )
22176 \end_layout
22177
22178 \begin_layout Itemize
22179 time of the last commit (
22180 \begin_inset Flex Code
22181 status collapsed
22182
22183 \begin_layout Plain Layout
22184 vcs-time
22185 \end_layout
22186
22187 \end_inset
22188
22189 )
22190 \end_layout
22191
22192 \end_deeper
22193 \begin_layout Standard
22194 You can obtain this info via InsetInfo (e.g.
22195  
22196 \begin_inset Flex Code
22197 status collapsed
22198
22199 \begin_layout Plain Layout
22200 info-insert buffer vcs-date
22201 \end_layout
22202
22203 \end_inset
22204
22205 ).
22206  The information will be available only when you have the file stored under
22207  svn managment (i.e.
22208  the 
22209 \begin_inset Flex Code
22210 status collapsed
22211
22212 \begin_layout Plain Layout
22213 .svn
22214 \end_layout
22215
22216 \end_inset
22217
22218  directory is available with your document).
22219 \end_layout
22220
22221 \end_deeper
22222 \begin_layout Itemize
22223 Another—a hacking one—possibility is to use svn keywords
22224 \begin_inset Foot
22225 status collapsed
22226
22227 \begin_layout Plain Layout
22228 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
22229 \end_layout
22230
22231 \end_inset
22232
22233 .
22234  In short – you set file keywords property (e.g.
22235  
22236 \family sans
22237 svn propset svn:keywords 'Rev' file.lyx
22238 \family default
22239 ) and then paste keyword \SpecialChar TeX
22240  code
22241 \begin_inset Foot
22242 status collapsed
22243
22244 \begin_layout Plain Layout
22245 This is an easy way how to ensure that \SpecialChar LyX
22246  won't break the line in the middle
22247  of keyword tag.
22248 \end_layout
22249
22250 \end_inset
22251
22252  tag in your document (e.g.
22253  
22254 \begin_inset ERT
22255 status open
22256
22257 \begin_layout Plain Layout
22258
22259 $Rev$
22260 \end_layout
22261
22262 \end_inset
22263
22264 ).
22265  This way svn client will automatically substitute revision number (e.g.
22266  
22267 \begin_inset ERT
22268 status open
22269
22270 \begin_layout Plain Layout
22271
22272 $Rev: 59 $
22273 \end_layout
22274
22275 \end_inset
22276
22277 ) after each update and commit.
22278  There are more problems with this approach.
22279  Firstly, the '$' character is used in \SpecialChar TeX
22280  world for math equations, so any
22281  occurence of math formula 
22282 \begin_inset Formula $Rev$
22283 \end_inset
22284
22285  become 
22286 \begin_inset Formula $Rev:59$
22287 \end_inset
22288
22289  in your \SpecialChar LyX
22290  document.
22291  Similarly for other keywords like Id, Date, Author, etc.
22292  Secondly svn output is dependent on your locales, so its very easy that
22293  svn would produce some problematic strings once Date is used.
22294  Thirdly you get the whole 'Rev: 59' string in your document instead of
22295  the plain number.
22296  Until subversion implements user's custom keywords it will be hard to use
22297  this approach reliably or let \SpecialChar LyX
22298  to support it directly.
22299 \end_layout
22300
22301 \begin_layout Subsection
22302 SVN and Windows Environment
22303 \end_layout
22304
22305 \begin_layout Quote
22306 My inclination is to say that if the user cannot figure out the command
22307  line operations on their own fairly quickly, they would be well advised
22308  to use TortoiseSVN.
22309  —P.
22310  A.
22311  Rubin
22312 \end_layout
22313
22314 \begin_layout Subsubsection
22315 Preparation
22316 \end_layout
22317
22318 \begin_layout Standard
22319 In addition to installing \SpecialChar LyX
22320 , and having access to a Subversion repository,
22321  the user will need to install the Subversion client program.
22322  A Windows installer for the client program is available from 
22323 \begin_inset CommandInset href
22324 LatexCommand href
22325 name "CollabNet"
22326 target "http://www.collab.net/nonav/downloads/subversion/"
22327 literal "false"
22328
22329 \end_inset
22330
22331 .
22332  The user may also want to install 
22333 \begin_inset CommandInset href
22334 LatexCommand href
22335 name "TortoiseSVN"
22336 target "http://tortoisesvn.tigris.org/"
22337 literal "false"
22338
22339 \end_inset
22340
22341 , which integrates Subversion operations into the context (rightclick) menu
22342  of Windows Explorer.
22343  Operations done outside \SpecialChar LyX
22344  will typically be more convenient using the Explorer
22345  context menu.
22346  Note that TortoiseSVN is not a replacement for the client program, which
22347  is what \SpecialChar LyX
22348  itself will use.
22349 \end_layout
22350
22351 \begin_layout Subsubsection
22352 Bringing a document under Subversion control
22353 \end_layout
22354
22355 \begin_layout Standard
22356 Before a \SpecialChar LyX
22357  document can be brought under version control in Subversion, its
22358  parent directory needs to be under version control.
22359  If the document is being added to a project already in the repository,
22360  this is accomplished by checking the project out to the directory where
22361  the new document will be placed.
22362  If the project itself is not yet under version control (for instance, if
22363  this document starts a new project), the directory must be imported into
22364  the repository.
22365  This is done outside \SpecialChar LyX
22366 .
22367  Both import and checkout are easily accomplished from the Explorer context
22368  menu using TortoiseSVN, or alternatively can be done using the command
22369  line client at a DOS prompt.
22370  The procedure for importing the project using TortoiseSVN is described
22371  below, assuming an existing repository and a new project being started
22372  in 
22373 \family typewriter
22374 C:
22375 \backslash
22376 new project
22377 \family default
22378 .
22379  For information on using the Subversion client program, run 
22380 \family typewriter
22381 svn --help 
22382 \family default
22383 in a DOS shell.
22384 \end_layout
22385
22386 \begin_layout Enumerate
22387 Locate 
22388 \family typewriter
22389 C:
22390 \backslash
22391 new project 
22392 \family default
22393 in Windows Explorer, right click it, and select 
22394 \family sans
22395 TortoiseSVN\SpecialChar menuseparator
22396 Repo-browser
22397 \family default
22398 .
22399  If necessary, adjust the URL for the repository, then click OK.
22400 \end_layout
22401
22402 \begin_layout Enumerate
22403 Right click the level of the repository under which you want to place the
22404  new project folder (typically the top level) and click 
22405 \family sans
22406 Create folder
22407 \family default
22408  Supply a name for the project folder and click OK.
22409  Add a message for the log file if desired, then click OK again.
22410  The new project folder should appear in the repository.
22411  Finally, click OK again to exit the repository browser.
22412 \end_layout
22413
22414 \begin_layout Enumerate
22415 Once again right click 
22416 \family typewriter
22417 C:
22418 \backslash
22419 new project
22420 \family default
22421 , this time selecting SVN Checkout\SpecialChar ldots
22422  Select the URL of the project folder
22423  you just created in the repository, and set the checkout directory to 
22424 \family typewriter
22425 C:
22426 \backslash
22427 new project.
22428
22429 \family default
22430  Click OK.
22431  You will be warned about a non-empty folder; click OK to proceed.
22432  You should now have a 
22433 \family typewriter
22434 .svn
22435 \family default
22436  directory under 
22437 \family typewriter
22438 C:
22439 \backslash
22440 new project.
22441 \end_layout
22442
22443 \begin_layout Enumerate
22444 Create or open your document in \SpecialChar LyX
22445  and click 
22446 \family sans
22447 File\SpecialChar menuseparator
22448 Version
22449 \begin_inset space ~
22450 \end_inset
22451
22452 Control\SpecialChar menuseparator
22453 Register.
22454  
22455 \family default
22456 Add a log message and click OK to commit the document to version control.
22457 \end_layout
22458
22459 \begin_layout Standard
22460 From this point onward, you should have full functionality in the 
22461 \family sans
22462 File\SpecialChar menuseparator
22463 Version
22464 \begin_inset space ~
22465 \end_inset
22466
22467 Control
22468 \family default
22469  menu.
22470  You also have the option of checking the document in and out, viewing its
22471  history, etc.
22472  using the TortoiseSVN context menu in Windows Explorer or the Subversion
22473  client program from a command prompt.
22474 \end_layout
22475
22476 \begin_layout Subsubsection
22477 SSH tunnel used with SVN under Windows
22478 \end_layout
22479
22480 \begin_layout Standard
22481 Compared with Linux setting up an svn client to communicate over ssh under
22482  Windows is a rather troublesome task.
22483  We will at least offer some hints how to setup the client side but prior
22484  knowledge about ssh and the Windows command line is needed, also be prepared
22485  for a great deal of frustration\SpecialChar ldots
22486
22487 \end_layout
22488
22489 \begin_layout Enumerate
22490 Get an svn client for windows, as described in the previous sections.
22491  When it is a fresh install run some svn command (e.g.
22492  
22493 \begin_inset Flex Code
22494 status collapsed
22495
22496 \begin_layout Plain Layout
22497 svn –version
22498 \end_layout
22499
22500 \end_inset
22501
22502 ) to create config files, which you will need to change later on.
22503 \end_layout
22504
22505 \begin_layout Enumerate
22506 Choose an ssh client for Windows.
22507  There are several possibilities, we will use the one from Putty tools
22508 \begin_inset Foot
22509 status collapsed
22510
22511 \begin_layout Plain Layout
22512 \begin_inset Flex URL
22513 status collapsed
22514
22515 \begin_layout Plain Layout
22516
22517 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
22518 \end_layout
22519
22520 \end_inset
22521
22522
22523 \end_layout
22524
22525 \end_inset
22526
22527 .
22528  You will need to set the connection up so that the client doesn't ask for
22529  any password from you.
22530  To keep things easy we will use only keys without any additional password
22531  protection etc.
22532 \end_layout
22533
22534 \begin_deeper
22535 \begin_layout Enumerate
22536 Generate keys by 
22537 \begin_inset Flex Code
22538 status collapsed
22539
22540 \begin_layout Plain Layout
22541 puttygen
22542 \end_layout
22543
22544 \end_inset
22545
22546 .
22547  Save your private .ppk key file and put the public one on the server side.
22548  If the SVN server runs on Linux, note that the format of the public key
22549  is not compatible with Linux openssh and you will need to direcly copy-paste
22550  the key from the “
22551 \emph on
22552 Public key for pasting into OpenSSH authorized_keys file
22553 \emph default
22554 :” edit field into the server's 
22555 \begin_inset Flex Code
22556 status collapsed
22557
22558 \begin_layout Plain Layout
22559 ~/.ssh/authorized_keys
22560 \end_layout
22561
22562 \end_inset
22563
22564  / 
22565 \begin_inset Flex Code
22566 status collapsed
22567
22568 \begin_layout Plain Layout
22569 authorized_keys2
22570 \end_layout
22571
22572 \end_inset
22573
22574  file.
22575 \end_layout
22576
22577 \begin_layout Enumerate
22578 Get the Putty's 
22579 \begin_inset Flex Code
22580 status collapsed
22581
22582 \begin_layout Plain Layout
22583 plink
22584 \end_layout
22585
22586 \end_inset
22587
22588 .
22589  In the SVN config file
22590 \begin_inset Foot
22591 status collapsed
22592
22593 \begin_layout Plain Layout
22594 Exact path depends on Windows version, usually somewhere around 
22595 \begin_inset Flex Code
22596 status collapsed
22597
22598 \begin_layout Plain Layout
22599 c:
22600 \backslash
22601 Documents and Settings
22602 \backslash
22603 user
22604 \backslash
22605 Application Data
22606 \backslash
22607 Subversion
22608 \backslash
22609 config
22610 \end_layout
22611
22612 \end_inset
22613
22614  / 
22615 \begin_inset Flex Code
22616 status collapsed
22617
22618 \begin_layout Plain Layout
22619 AppData
22620 \backslash
22621 Roaming
22622 \backslash
22623 Subversion
22624 \end_layout
22625
22626 \end_inset
22627
22628 .
22629 \end_layout
22630
22631 \end_inset
22632
22633 , section [tunnels], setup ssh command, e.g.
22634  
22635 \begin_inset Flex Code
22636 status collapsed
22637
22638 \begin_layout Plain Layout
22639 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
22640 \end_layout
22641
22642 \end_inset
22643
22644 .
22645 \begin_inset Foot
22646 status collapsed
22647
22648 \begin_layout Plain Layout
22649 It will usually take a lot of time to get exact command right and it depends
22650  on many things.
22651  For example do not have some remote server saved as a default session in
22652  Putty etc.
22653  If things fail, try to connect via plink without SVN first.
22654 \end_layout
22655
22656 \end_inset
22657
22658
22659 \end_layout
22660
22661 \end_deeper
22662 \begin_layout Enumerate
22663 Checkout the SVN archive, e.
22664 \begin_inset space \thinspace{}
22665 \end_inset
22666
22667 g.
22668 \begin_inset Newline newline
22669 \end_inset
22670
22671
22672 \begin_inset Flex Code
22673 status collapsed
22674
22675 \begin_layout Plain Layout
22676 svn co svn+ssh://user@server/repository_path
22677 \end_layout
22678
22679 \end_inset
22680
22681 .
22682 \end_layout
22683
22684 \begin_layout Subsubsection
22685 End-of-Line Conversions
22686 \end_layout
22687
22688 \begin_layout Standard
22689 When the collaborators are mixing Linux and Windows environments, \SpecialChar LyX
22690  will
22691  use different line endings inside the .lyx files.
22692  This is not a problem as far as \SpecialChar LyX
22693  functionality is concerned, but the commit
22694  diffs will be huge and merge-conflicts prone.
22695  Fortunately SVN itself knows
22696 \begin_inset Foot
22697 status collapsed
22698
22699 \begin_layout Plain Layout
22700 \begin_inset Flex URL
22701 status collapsed
22702
22703 \begin_layout Plain Layout
22704
22705 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
22706 \end_layout
22707
22708 \end_inset
22709
22710
22711 \end_layout
22712
22713 \end_inset
22714
22715  how to deal with CR/LF problems when switching .lyx files to the 
22716 \begin_inset Flex Code
22717 status collapsed
22718
22719 \begin_layout Plain Layout
22720 native
22721 \end_layout
22722
22723 \end_inset
22724
22725  mode.
22726 \begin_inset Foot
22727 status collapsed
22728
22729 \begin_layout Plain Layout
22730 For the lazy guys: 
22731 \begin_inset Flex Code
22732 status collapsed
22733
22734 \begin_layout Plain Layout
22735 svn propset svn:eol-style native FILE_NAME
22736 \end_layout
22737
22738 \end_inset
22739
22740
22741 \end_layout
22742
22743 \end_inset
22744
22745
22746 \end_layout
22747
22748 \begin_layout Subsection
22749 GIT commands in \SpecialChar LyX
22750
22751 \end_layout
22752
22753 \begin_layout Standard
22754 A minimal subset of GIT commands is now supported by \SpecialChar LyX
22755 .
22756  You can find the commands in the 
22757 \family sans
22758 File\SpecialChar menuseparator
22759 Version
22760 \begin_inset space ~
22761 \end_inset
22762
22763 Control
22764 \family default
22765  submenu.
22766  Please note that if you use password protected access to repository via
22767  ssh, you will be asked in terminal window.
22768  \SpecialChar LyX
22769  was tested against GIT 1.7.
22770 \begin_inset Foot
22771 status open
22772
22773 \begin_layout Plain Layout
22774 Windows users please note that you need to ensure that git is on the path.
22775  This can be set from within \SpecialChar LyX
22776  at 
22777 \family sans
22778 Tools\SpecialChar menuseparator
22779 Preferences\SpecialChar menuseparator
22780 Paths\SpecialChar menuseparator
22781 PATH prefix
22782 \family default
22783 .
22784 \end_layout
22785
22786 \end_inset
22787
22788
22789 \end_layout
22790
22791 \begin_layout Standard
22792 One big difference of GIT and the other supported version control systems
22793  is the distributed nature of GIT: With traditional version control systems
22794  there is one central server which hosts the repository.
22795  Users commit their changes to the server, and get updates made by other
22796  users from it.
22797  With GIT, users commit to a local repository.
22798  The local repository can be synchronized with one or more remote repositories
22799  using the 
22800 \begin_inset Flex Code
22801 status collapsed
22802
22803 \begin_layout Plain Layout
22804 pull
22805 \end_layout
22806
22807 \end_inset
22808
22809  and 
22810 \begin_inset Flex Code
22811 status collapsed
22812
22813 \begin_layout Plain Layout
22814 push
22815 \end_layout
22816
22817 \end_inset
22818
22819  GIT commands.
22820  \SpecialChar LyX
22821  does not interact in any way with remote GIT repositories.
22822  It works exclusively with the local repository in a very similar way as
22823  with a central CVS or SVN repository.
22824  If you use remote GIT repositories you need to do the 
22825 \begin_inset Flex Code
22826 status collapsed
22827
22828 \begin_layout Plain Layout
22829 pull
22830 \end_layout
22831
22832 \end_inset
22833
22834  and 
22835 \begin_inset Flex Code
22836 status collapsed
22837
22838 \begin_layout Plain Layout
22839 push
22840 \end_layout
22841
22842 \end_inset
22843
22844  operations with your favourite GIT client.
22845 \end_layout
22846
22847 \begin_layout Subsubsection
22848
22849 \family sans
22850 Register
22851 \end_layout
22852
22853 \begin_layout Standard
22854 If your document is not under revision control, this is the only item shown
22855  in the menu.
22856  And if it is under revision control, the 
22857 \family sans
22858 Register
22859 \family default
22860  item is not visible.
22861 \end_layout
22862
22863 \begin_layout Standard
22864 This command registers in GIT your document ONLY in case you have already
22865  the documents directory under GIT control (in particular 
22866 \family typewriter
22867 .git/index
22868 \family default
22869  file exists).
22870  This means you have to checkout the archive by yourself.
22871 \end_layout
22872
22873 \begin_layout Standard
22874 Then you are asked interactively to supply an initial description of the
22875  document.
22876  Don't forget that registered file is not yet commited.
22877 \end_layout
22878
22879 \begin_layout Standard
22880 GIT command that is run: 
22881 \family typewriter
22882 git add 
22883 \begin_inset Quotes eld
22884 \end_inset
22885
22886 <file-name>
22887 \begin_inset Quotes erd
22888 \end_inset
22889
22890
22891 \end_layout
22892
22893 \begin_layout Standard
22894 Read 
22895 \family typewriter
22896 man git
22897 \family default
22898  to understand the switches.
22899 \end_layout
22900
22901 \begin_layout Subsubsection
22902
22903 \family sans
22904 Check In Changes
22905 \end_layout
22906
22907 \begin_layout Standard
22908 When you are finished editing a file, you commit your changes.
22909  When you do this, you are asked for a description of the changes.
22910  After that changes are commited.
22911 \end_layout
22912
22913 \begin_layout Standard
22914 GIT command: 
22915 \family typewriter
22916 git commit -q -m"<description>" <file-name>
22917 \end_layout
22918
22919 \begin_layout Subsubsection
22920
22921 \family sans
22922 Revert To Repository Version
22923 \end_layout
22924
22925 \begin_layout Standard
22926 This will discard all changes made to the document since the last check
22927  in.
22928  You get a warning before changes are discarded.
22929 \end_layout
22930
22931 \begin_layout Standard
22932 GIT command: 
22933 \family typewriter
22934 git checkout -q 
22935 \begin_inset Quotes eld
22936 \end_inset
22937
22938 <file-name>
22939 \begin_inset Quotes erd
22940 \end_inset
22941
22942
22943 \end_layout
22944
22945 \begin_layout Subsubsection
22946
22947 \family sans
22948 Rename
22949 \end_layout
22950
22951 \begin_layout Standard
22952 This will rename the current document including the version history.
22953  It requires a clean document without any changes since the last checkin.
22954  You are asked for a file name and a description of the rename operation.
22955  After that the document is renamed, both locally and in the repository.
22956  If the parent directories of the new and old file names differ, all relative
22957  paths of included files are adjusted (like in 
22958 \family sans
22959 File\SpecialChar menuseparator
22960 Save As
22961 \family default
22962 \SpecialChar ldots
22963 ).
22964  Finally, the document is reloaded using the new name.
22965 \end_layout
22966
22967 \begin_layout Labeling
22968 \labelwidthstring 00.00.0000
22969 GIT
22970 \begin_inset space ~
22971 \end_inset
22972
22973 commands: 
22974 \begin_inset space ~
22975 \end_inset
22976
22977
22978 \begin_inset Newline newline
22979 \end_inset
22980
22981
22982 \begin_inset Flex Code
22983 status collapsed
22984
22985 \begin_layout Plain Layout
22986 git mv 
22987 \family typewriter
22988
22989 \begin_inset Quotes eld
22990 \end_inset
22991
22992 <file-name>
22993 \begin_inset Quotes erd
22994 \end_inset
22995
22996  
22997 \begin_inset Quotes eld
22998 \end_inset
22999
23000 <new-file-name>
23001 \begin_inset Quotes erd
23002 \end_inset
23003
23004
23005 \end_layout
23006
23007 \end_inset
23008
23009
23010 \begin_inset Newline newline
23011 \end_inset
23012
23013
23014 \begin_inset Flex Code
23015 status collapsed
23016
23017 \begin_layout Plain Layout
23018 git commit
23019 \end_layout
23020
23021 \end_inset
23022
23023
23024 \end_layout
23025
23026 \begin_layout Subsubsection
23027
23028 \family sans
23029 Show History
23030 \end_layout
23031
23032 \begin_layout Standard
23033 This shows the complete history of the GIT document.
23034  The output of 
23035 \family typewriter
23036 git log 
23037 \begin_inset Quotes eld
23038 \end_inset
23039
23040 <file-name>
23041 \begin_inset Quotes erd
23042 \end_inset
23043
23044
23045 \family default
23046  is shown in a browser.
23047 \end_layout
23048
23049 \begin_layout Subsubsection
23050 Version Info
23051 \end_layout
23052
23053 \begin_layout Standard
23054 \SpecialChar LyX
23055  supports GIT hash number of the last commit to the file, author name, date
23056  and time of last commit.
23057  All those are extracted from 
23058 \family typewriter
23059 git log -n 1 --pretty=format:%H%n%an%n%ai
23060 \family default
23061 .
23062  Tree version information is obtained via 
23063 \family typewriter
23064 git describe --abbrev --dirty --long
23065 \family default
23066 .
23067  See 
23068 \begin_inset CommandInset ref
23069 LatexCommand ref
23070 reference "subsec:VCS-Revision-Information"
23071
23072 \end_inset
23073
23074  for other details.
23075 \end_layout
23076
23077 \begin_layout Subsection
23078 Further tuning
23079 \end_layout
23080
23081 \begin_layout Standard
23082 With the recent addition of the vc-command function \SpecialChar LyX
23083  power users are allowed
23084  to create their own commands for revision control.
23085 \end_layout
23086
23087 \begin_layout Standard
23088 As an example you can see how two TortoiseSVN commands could be integrated
23089  directly:
23090 \end_layout
23091
23092 \begin_layout Description
23093 Commit: 
23094 \begin_inset Flex Code
23095 status collapsed
23096
23097 \begin_layout Plain Layout
23098 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
23099 \end_layout
23100
23101 \end_inset
23102
23103
23104 \end_layout
23105
23106 \begin_layout Description
23107 Revert: 
23108 \begin_inset Flex Code
23109 status collapsed
23110
23111 \begin_layout Plain Layout
23112 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
23113 \end_layout
23114
23115 \end_inset
23116
23117
23118 \end_layout
23119
23120 \begin_layout Subsection
23121 Version control and Document comparison
23122 \end_layout
23123
23124 \begin_layout Standard
23125 One of the typical uses of version control is to inspect the changes between
23126  revisions, usually by creating 
23127 \begin_inset Flex Code
23128 status collapsed
23129
23130 \begin_layout Plain Layout
23131 diff
23132 \end_layout
23133
23134 \end_inset
23135
23136  dumps.
23137  While this is useful for plain text files, it is much less useful in the
23138  case of \SpecialChar LyX
23139  files, which have more a complicated structure.
23140  Hence we provide binding to the Document comparison feature.
23141  There are two ways of calling this feature - either by direct call of 
23142 \begin_inset Flex Code
23143 status collapsed
23144
23145 \begin_layout Plain Layout
23146 VC_COMPARE
23147 \end_layout
23148
23149 \end_inset
23150
23151  \SpecialChar LyX
23152  function (for details see \SpecialChar LyX
23153  functions manual) or by icon/menu item 
23154 \begin_inset Flex Noun
23155 status collapsed
23156
23157 \begin_layout Plain Layout
23158 Compare with older revision...
23159 \end_layout
23160
23161 \end_inset
23162
23163 .
23164  One can either compare two chosen revisions of the document or he can simply
23165  compare the current version of edited text with older revisions (where
23166  '
23167 \begin_inset Flex Noun
23168 status collapsed
23169
23170 \begin_layout Plain Layout
23171 0
23172 \end_layout
23173
23174 \end_inset
23175
23176 ' revisions back means comparison of the edited file with last commited
23177  revision).
23178  
23179 \end_layout
23180
23181 \begin_layout Standard
23182 This feature is supported for SVN and RCS though due to the more complicated
23183  versioning scheme of RCS there is a constraint – when addressing the revisions
23184  in dialog, numbers always point to the last number in RCS revision number,
23185  i.e.
23186  '35' in '1.2.35'.
23187  We don't currently support GIT addressing of revisions, one can just compare
23188  edited document with its revision X steps backs, where X is addressed as
23189  HEAD~X.
23190 \end_layout
23191
23192 \begin_layout Section
23193 Literate Programming
23194 \end_layout
23195
23196 \begin_layout Standard
23197 Updated by 
23198 \noun on
23199 Kayvan Sylvan 
23200 \noun default
23201 (kayvan@sylvan.com)
23202 \noun on
23203
23204 \noun default
23205 original documentation written by 
23206 \noun on
23207 Edmar Wienskoski Jr.
23208
23209 \noun default
23210  (edmar-w-jr@technologist.com)
23211 \end_layout
23212
23213 \begin_layout Subsection
23214 Introduction
23215 \end_layout
23216
23217 \begin_layout Standard
23218 The main purpose of this documentation is to show you how to use \SpecialChar LyX
23219  for literate
23220  programming, where it is assumed that you are familiar with this programming
23221  technique, and know what 
23222 \begin_inset Quotes eld
23223 \end_inset
23224
23225 tangling
23226 \begin_inset Quotes erd
23227 \end_inset
23228
23229  and 
23230 \begin_inset Quotes eld
23231 \end_inset
23232
23233 weaving
23234 \begin_inset Quotes erd
23235 \end_inset
23236
23237  means.
23238  If that is not the case, please follow the web links provided in the following
23239  sections.
23240  There is a lot of good documentation out there covering old development
23241  history to the latest tools tips.
23242 \end_layout
23243
23244 \begin_layout Standard
23245 It is also assumed that you are familiar with \SpecialChar LyX
23246  itself to a point that you
23247  are comfortable changing your \SpecialChar LyX
23248  preferences, and X resources file.
23249  If that is not the case please refer to other \SpecialChar LyX
23250  documentation to cover your
23251  specific needs.
23252 \end_layout
23253
23254 \begin_layout Subsection
23255 Literate Programming
23256 \end_layout
23257
23258 \begin_layout Standard
23259 From the Literate Programming FAQ: 
23260 \end_layout
23261
23262 \begin_layout Quotation
23263 Literate programming is the combination of documentation and source together
23264  in a fashion suited for reading by human beings.
23265  In fact, literate programs should be enjoyable reading, even inviting!
23266  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
23267  and documentation in a single file.
23268  Literate programming tools then parse the file to produce either readable
23269  documentation or compilable source.
23270  The WEB style of literate programming was created by D.
23271 \begin_inset space \thinspace{}
23272 \end_inset
23273
23274 E.
23275  Knuth during the development of his \SpecialChar TeX
23276  typesetting software.
23277  
23278 \end_layout
23279
23280 \begin_layout Standard
23281 Another excerpt says:
23282 \end_layout
23283
23284 \begin_layout Quotation
23285
23286 \emph on
23287 How is literate programming different from verbose commenting?
23288 \end_layout
23289
23290 \begin_layout Quotation
23291 There are three distinguishing characteristics.
23292  In order of importance, they are: 
23293 \end_layout
23294
23295 \begin_deeper
23296 \begin_layout Itemize
23297 flexible order of elaboration 
23298 \end_layout
23299
23300 \begin_layout Itemize
23301 automatic support for browsing 
23302 \end_layout
23303
23304 \begin_layout Itemize
23305 typeset documentation, especially diagrams and mathematics 
23306 \end_layout
23307
23308 \end_deeper
23309 \begin_layout Standard
23310 Now that I sparked your curiosity, take a look in the references.
23311 \end_layout
23312
23313 \begin_layout Subsubsection
23314 References
23315 \end_layout
23316
23317 \begin_layout Standard
23318 The complete Literate Programming FAQ can be found at:
23319 \end_layout
23320
23321 \begin_layout Quote
23322 Literate Programming FAQ 
23323 \begin_inset Flex URL
23324 status collapsed
23325
23326 \begin_layout Plain Layout
23327
23328 http://www.literateprogramming.com/lpfaq.pdf
23329 \end_layout
23330
23331 \end_inset
23332
23333
23334 \end_layout
23335
23336 \begin_layout Standard
23337 The FAQ lists 23 (twenty three!) different literate programming tools.
23338  Where some are specialized or 
23339 \begin_inset Quotes eld
23340 \end_inset
23341
23342 tailored
23343 \begin_inset Quotes erd
23344 \end_inset
23345
23346  for particular programming languages, while other have general scope.
23347  I selected 
23348 \noun on
23349 Noweb
23350 \noun default
23351  for my own use for several reasons:
23352 \end_layout
23353
23354 \begin_layout Itemize
23355 It can generate the documentation either in \SpecialChar LaTeX
23356  or HTML.
23357 \end_layout
23358
23359 \begin_layout Itemize
23360 It has a open architecture, i.
23361 \begin_inset space \thinspace{}
23362 \end_inset
23363
23364 e.
23365 \begin_inset space \space{}
23366 \end_inset
23367
23368 it is easy to plug in new filters and to perform special processing that
23369  you may need.
23370  
23371 \end_layout
23372
23373 \begin_layout Itemize
23374 There is a good selection of filters available already (the HTML is one
23375  of them).
23376 \end_layout
23377
23378 \begin_layout Itemize
23379 It is free.
23380 \end_layout
23381
23382 \begin_layout Standard
23383 The Noweb web page can be found at: 
23384 \end_layout
23385
23386 \begin_layout Quote
23387 Noweb home page 
23388 \begin_inset Flex URL
23389 status collapsed
23390
23391 \begin_layout Plain Layout
23392
23393 http://www.cs.virginia.edu/~nr/noweb/
23394 \end_layout
23395
23396 \end_inset
23397
23398
23399 \end_layout
23400
23401 \begin_layout Standard
23402 Starting from there you can reach many other interesting links and even
23403  some literate program examples.
23404 \end_layout
23405
23406 \begin_layout Subsection
23407 \SpecialChar LyX
23408  and Literate Programming with Noweb
23409 \end_layout
23410
23411 \begin_layout Standard
23412 The \SpecialChar LyX
23413  support for Literate Programming is provided by using the generic \SpecialChar LyX
23414
23415  converters mechanism.
23416  This support is provided in a 
23417 \begin_inset Quotes eld
23418 \end_inset
23419
23420 Noweb independent
23421 \begin_inset Quotes erd
23422 \end_inset
23423
23424  way, i.
23425 \begin_inset space \thinspace{}
23426 \end_inset
23427
23428 e.
23429 \begin_inset space \space{}
23430 \end_inset
23431
23432 you will be able to use this new \SpecialChar LyX
23433  feature with some other literate programming
23434  tool of your choice by just changing your \SpecialChar LyX
23435  preferences.
23436 \end_layout
23437
23438 \begin_layout Subsubsection
23439 Generating documents and code (weaving and tangling)
23440 \end_layout
23441
23442 \begin_layout Paragraph
23443 Using the noweb module
23444 \end_layout
23445
23446 \begin_layout Standard
23447 If you have installed Noweb and \SpecialChar LyX
23448  successfully, whenever you open a new document,
23449  after you have chosen its document class, use the Document->Settings menu
23450  to add the 
23451 \begin_inset Quotes eld
23452 \end_inset
23453
23454 noweb
23455 \begin_inset Quotes erd
23456 \end_inset
23457
23458  module.
23459  If Noweb is correctly installed, when you click on the 
23460 \begin_inset Quotes eld
23461 \end_inset
23462
23463 Modules
23464 \begin_inset Quotes erd
23465 \end_inset
23466
23467  link, you will see the 
23468 \begin_inset Quotes eld
23469 \end_inset
23470
23471 noweb
23472 \begin_inset Quotes erd
23473 \end_inset
23474
23475  module in the available list and you can add it to your document.
23476 \end_layout
23477
23478 \begin_layout Paragraph
23479 Typing code in
23480 \end_layout
23481
23482 \begin_layout Standard
23483 \SpecialChar LyX
23484  enables you to write code with a layout named 
23485 \begin_inset Flex Noun
23486 status collapsed
23487
23488 \begin_layout Plain Layout
23489 Chunk
23490 \end_layout
23491
23492 \end_inset
23493
23494 .
23495  Noweb delimits chunks like this:
23496 \end_layout
23497
23498 \begin_layout LyX-Code
23499 <<My code>>=
23500 \end_layout
23501
23502 \begin_layout LyX-Code
23503   code
23504 \end_layout
23505
23506 \begin_layout LyX-Code
23507   more code
23508 \end_layout
23509
23510 \begin_layout LyX-Code
23511   even more code
23512 \end_layout
23513
23514 \begin_layout LyX-Code
23515   @
23516 \end_layout
23517
23518 \begin_layout Standard
23519 The problem is that whatever is written in between the << and the 
23520 \family typewriter
23521 @
23522 \family default
23523  must be taken literally, i.
23524 \begin_inset space \thinspace{}
23525 \end_inset
23526
23527 e.
23528 \begin_inset space \space{}
23529 \end_inset
23530
23531 \SpecialChar LyX
23532  should be prevented from making any special interpretation of what has
23533  been written.
23534  This is also handled by 
23535 \begin_inset Flex Noun
23536 status collapsed
23537
23538 \begin_layout Plain Layout
23539 Chunk
23540 \end_layout
23541
23542 \end_inset
23543
23544 , that works like a normal paragraph but has a free spacing capability.
23545 \end_layout
23546
23547 \begin_layout Standard
23548 As a special note, you can also use the 
23549 \begin_inset Quotes eld
23550 \end_inset
23551
23552 %def
23553 \begin_inset Quotes erd
23554 \end_inset
23555
23556  construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
23557 rence:
23558 \end_layout
23559
23560 \begin_layout LyX-Code
23561 <<My chunk>>=
23562 \end_layout
23563
23564 \begin_layout LyX-Code
23565 def some_function(args):
23566 \end_layout
23567
23568 \begin_layout LyX-Code
23569    "This is the doc string for this function."
23570 \end_layout
23571
23572 \begin_layout LyX-Code
23573    print "My args: ", args
23574 \end_layout
23575
23576 \begin_layout LyX-Code
23577 @ %def some_function
23578 \end_layout
23579
23580 \begin_layout Standard
23581 For an example of this usage and the resulting cross-reference output, look
23582  at the Literate python program in 
23583 \emph on
23584 LIBDIR/examples/listerrors.lyx
23585 \emph default
23586  which should make this all clear.
23587 \end_layout
23588
23589 \begin_layout Paragraph
23590 Generating the documentation
23591 \end_layout
23592
23593 \begin_layout Standard
23594 At this point you already have a new document file with a proper document
23595  class, and with some code and text on it.
23596  How do I print it? The answer is simple, you select 
23597 \family sans
23598 View\SpecialChar menuseparator
23599 DVI,
23600 \family default
23601  etc.
23602  Just like you would do for a plain document.
23603  No special procedure is required.
23604 \end_layout
23605
23606 \begin_layout Standard
23607 To help orientate you, I will now explain what happens inside \SpecialChar LyX
23608 :
23609 \end_layout
23610
23611 \begin_layout Enumerate
23612 When the 
23613 \family sans
23614 Update\SpecialChar menuseparator
23615 DVI
23616 \family default
23617  menu option is chosen, a \SpecialChar LaTeX
23618  file is generated.
23619  
23620 \end_layout
23621
23622 \begin_deeper
23623 \begin_layout Standard
23624 If the document is of any literate class the generated file will be named
23625  with an extension name defined by the 
23626 \begin_inset Quotes eld
23627 \end_inset
23628
23629 literate
23630 \begin_inset Quotes erd
23631 \end_inset
23632
23633  format (defined in the Preferences panel), otherwise the file will have
23634  the usual 
23635 \family typewriter
23636 .tex
23637 \family default
23638  extension.
23639 \end_layout
23640
23641 \end_deeper
23642 \begin_layout Enumerate
23643 Note that the only difference so far is in the name of the file, no special
23644  processing is required by \SpecialChar LyX
23645 .
23646  Given that you formatted the code using the 
23647 \begin_inset Flex Noun
23648 status collapsed
23649
23650 \begin_layout Plain Layout
23651 Chunk
23652 \end_layout
23653
23654 \end_inset
23655
23656  layout that, by itself, takes care of the business.
23657 \end_layout
23658
23659 \begin_layout Enumerate
23660 If the document is of any literate class \SpecialChar LyX
23661  will then use the internal \SpecialChar LyX
23662  to
23663  Noweb converter, followed by the Noweb to \SpecialChar LaTeX
23664  converter
23665 \begin_inset Foot
23666 status collapsed
23667
23668 \begin_layout Plain Layout
23669 The converters are defined in the 
23670 \family sans
23671 Tools\SpecialChar menuseparator
23672 Preferences
23673 \family default
23674  panel, under the 
23675 \begin_inset Quotes eld
23676 \end_inset
23677
23678 Conversion
23679 \begin_inset Quotes erd
23680 \end_inset
23681
23682  tab.
23683  See section 
23684 \emph on
23685 Converters
23686 \emph default
23687  of the 
23688 \emph on
23689 Customization
23690 \emph default
23691  manual for general information about converters.
23692 \end_layout
23693
23694 \end_inset
23695
23696  to generate the \SpecialChar LaTeX
23697  file.
23698 \end_layout
23699
23700 \begin_deeper
23701 \begin_layout Standard
23702 Otherwise it will just skip this step.
23703 \end_layout
23704
23705 \end_deeper
23706 \begin_layout Enumerate
23707 Finally, \SpecialChar LaTeX
23708  is invoked and the regular post processing continues as in a plain
23709  document.
23710 \end_layout
23711
23712 \begin_layout Standard
23713 Independence from a particular 
23714 \begin_inset Quotes eld
23715 \end_inset
23716
23717 literate tool
23718 \begin_inset Quotes erd
23719 \end_inset
23720
23721  is easily achieved by changing the commands that are run by the various
23722  converters.
23723 \end_layout
23724
23725 \begin_layout Paragraph
23726 Generating the code
23727 \end_layout
23728
23729 \begin_layout Standard
23730 When the build menu option is chosen or the corresponding button in the
23731  toolbar is pressed, a \SpecialChar LaTeX
23732  file is generated just like step 1 above.
23733  Next, \SpecialChar LyX
23734  invokes the 
23735 \family typewriter
23736 Noweb->Program
23737 \family default
23738  converter.
23739  This converter needs to be defined by the user and is not installed by
23740  default, though the Program format is.
23741  This converter (like any other converter) will have two parts:
23742 \end_layout
23743
23744 \begin_layout Enumerate
23745 The converter program itself.
23746  This program performs the conversion from the one format to the other (in
23747  this case, from the Noweb format to the Program pseudo-format).
23748 \end_layout
23749
23750 \begin_layout Enumerate
23751 The error log parser.
23752  This is a program whose sole purpose is to rewrite error messages in a
23753  format that \SpecialChar LyX
23754  understands.
23755  This makes it possible for \SpecialChar LyX
23756  to place error boxes in the right places in
23757  the file buffer.
23758 \end_layout
23759
23760 \begin_layout Standard
23761 The first part, the 
23762 \begin_inset Quotes eld
23763 \end_inset
23764
23765 Converter
23766 \begin_inset Quotes erd
23767 \end_inset
23768
23769  setting, should be set to
23770 \begin_inset Newline newline
23771 \end_inset
23772
23773
23774 \begin_inset Quotes eld
23775 \end_inset
23776
23777
23778 \family typewriter
23779 build-script $$i
23780 \family default
23781  $$r
23782 \begin_inset Quotes erd
23783 \end_inset
23784
23785 .
23786 \begin_inset Newline newline
23787 \end_inset
23788
23789 This basically means that \SpecialChar LyX
23790  will call 
23791 \begin_inset Quotes eld
23792 \end_inset
23793
23794 build-script
23795 \begin_inset Quotes erd
23796 \end_inset
23797
23798  (a program or script) with the name of the Noweb file (normally a file
23799  in the \SpecialChar LyX
23800  temp directory) and the directory path of the original \SpecialChar LyX
23801  file.
23802  
23803 \end_layout
23804
23805 \begin_layout Standard
23806 This is an implementation of 
23807 \begin_inset Quotes eld
23808 \end_inset
23809
23810 build-script
23811 \begin_inset Quotes erd
23812 \end_inset
23813
23814  that you can place in a directory on your path:
23815 \end_layout
23816
23817 \begin_layout Standard
23818 \begin_inset VSpace defskip
23819 \end_inset
23820
23821
23822 \end_layout
23823
23824 \begin_layout Standard
23825 \begin_inset Newpage pagebreak
23826 \end_inset
23827
23828
23829 \end_layout
23830
23831 \begin_layout Standard
23832
23833 \family sans
23834 #!/bin/sh
23835 \end_layout
23836
23837 \begin_layout Standard
23838
23839 \family sans
23840 #
23841 \end_layout
23842
23843 \begin_layout Standard
23844
23845 \family sans
23846 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
23847 \end_layout
23848
23849 \begin_layout Standard
23850 \begin_inset VSpace defskip
23851 \end_inset
23852
23853
23854 \end_layout
23855
23856 \begin_layout Standard
23857 The next part of the converter setting is the 
23858 \begin_inset Quotes eld
23859 \end_inset
23860
23861 Flags
23862 \begin_inset Quotes erd
23863 \end_inset
23864
23865  which is to be set to
23866 \begin_inset Newline newline
23867 \end_inset
23868
23869
23870 \begin_inset Quotes eld
23871 \end_inset
23872
23873
23874 \family typewriter
23875 parselog=$$s/scripts/listerrors
23876 \family default
23877
23878 \begin_inset Quotes erd
23879 \end_inset
23880
23881 .
23882 \begin_inset Newline newline
23883 \end_inset
23884
23885 This will run any errors that are generated by the 
23886 \begin_inset Quotes eld
23887 \end_inset
23888
23889 build-script
23890 \begin_inset Quotes erd
23891 \end_inset
23892
23893  process through the 
23894 \begin_inset Quotes eld
23895 \end_inset
23896
23897 listerrors
23898 \begin_inset Quotes erd
23899 \end_inset
23900
23901  program.
23902 \end_layout
23903
23904 \begin_layout Standard
23905 The build will normally take place in \SpecialChar LyX
23906 's temporary directory, so the files
23907  produced by the conversion will be in that directory.
23908  \SpecialChar LyX
23909  will copy out what it regards as the `main' file, but the 
23910 \family typewriter
23911 Noweb->Program
23912 \family default
23913  conversion may produce several files, and so most of these would then be
23914  deleted when \SpecialChar LyX
23915  was closed.
23916  This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
23917  the build-script chunk can place the generated files in that location.
23918 \end_layout
23919
23920 \begin_layout Paragraph
23921 Build instructions in the document
23922 \end_layout
23923
23924 \begin_layout Standard
23925 The last piece of the integration between \SpecialChar LyX
23926  and noweb is the 
23927 \begin_inset Quotes eld
23928 \end_inset
23929
23930 build-script
23931 \begin_inset Quotes erd
23932 \end_inset
23933
23934  chunk.
23935  Generally, the instructions for building your program should be embedded
23936  in a chunk of its own.
23937  The noweb-specific 
23938 \begin_inset Quotes eld
23939 \end_inset
23940
23941 build-script
23942 \begin_inset Quotes erd
23943 \end_inset
23944
23945  above uses the notangle command to look for this chunk (called 
23946 \begin_inset Quotes eld
23947 \end_inset
23948
23949 build-script
23950 \begin_inset Quotes erd
23951 \end_inset
23952
23953 ) and runs its contents through 
23954 \begin_inset Quotes eld
23955 \end_inset
23956
23957 sh
23958 \begin_inset Quotes erd
23959 \end_inset
23960
23961 .
23962 \end_layout
23963
23964 \begin_layout Standard
23965 Typically, such a chunk would look something like this:
23966 \end_layout
23967
23968 \begin_layout LyX-Code
23969 <<build-script>>=
23970 \end_layout
23971
23972 \begin_layout LyX-Code
23973 #!/bin/sh
23974 \begin_inset Newline newline
23975 \end_inset
23976
23977 if [ -z "${NOWEB_SOURCE}" ]
23978 \begin_inset Newline newline
23979 \end_inset
23980
23981 then
23982 \end_layout
23983
23984 \begin_layout LyX-Code
23985 NOWEB_SOURCE=myfile.nw
23986 \begin_inset Newline newline
23987 \end_inset
23988
23989 fi
23990 \begin_inset Newline newline
23991 \end_inset
23992
23993 [...
23994  code to extract files ...
23995  use NOWEB_OUTPUT_DIR here ...]
23996 \begin_inset Newline newline
23997 \end_inset
23998
23999 [...
24000  code to compile files ...]
24001 \begin_inset Newline newline
24002 \end_inset
24003
24004 @
24005 \end_layout
24006
24007 \begin_layout Standard
24008 Look in 
24009 \emph on
24010 LIBDIR/examples/listerrors.lyx
24011 \emph default
24012  or in 
24013 \emph on
24014 LIBDIR/examples/Literate.lyx
24015 \emph default
24016  which implement two versions of the 
24017 \begin_inset Quotes eld
24018 \end_inset
24019
24020 listerrors
24021 \begin_inset Quotes erd
24022 \end_inset
24023
24024  program for some illustrations of how all of these pieces go together or
24025  in 
24026 \emph on
24027 LIBDIR/examples/noweb2lyx.lyx.
24028
24029 \emph default
24030  Interestingly, these three files show off the language-indepence of the
24031  \SpecialChar LyX
24032  literate programming support since they are written in Python, C and Perl
24033  respectively.
24034 \end_layout
24035
24036 \begin_layout Subsubsection
24037 Configuring \SpecialChar LyX
24038
24039 \end_layout
24040
24041 \begin_layout Standard
24042 All the Literate Programming support is configured by the 
24043 \family sans
24044 Tools\SpecialChar menuseparator
24045 Preferences
24046 \family default
24047  panel in the 
24048 \begin_inset Quotes eld
24049 \end_inset
24050
24051 File Handling
24052 \begin_inset Quotes erd
24053 \end_inset
24054
24055  tab.
24056  The important parts are:
24057 \end_layout
24058
24059 \begin_layout Description
24060 the
24061 \begin_inset space ~
24062 \end_inset
24063
24064
24065 \begin_inset Quotes eld
24066 \end_inset
24067
24068 NoWeb
24069 \begin_inset Quotes erd
24070 \end_inset
24071
24072
24073 \begin_inset space ~
24074 \end_inset
24075
24076 format Set up via the File Formats tab, this is where the Noweb-specific
24077  pieces are set up.
24078  The 
24079 \family sans
24080 GUI Name
24081 \family default
24082  is set to 
24083 \family typewriter
24084 NoWeb
24085 \family default
24086 , the file extension is set to 
24087 \family typewriter
24088 .nw
24089 \family default
24090 .
24091  This tells \SpecialChar LyX
24092  to create a file with a 
24093 \family typewriter
24094 .nw
24095 \family default
24096  extension in the first step of the conversion process.
24097 \end_layout
24098
24099 \begin_layout Description
24100 the
24101 \begin_inset space ~
24102 \end_inset
24103
24104
24105 \family sans
24106 Program
24107 \family default
24108
24109 \begin_inset space ~
24110 \end_inset
24111
24112 format This is an empty format whose sole purpose is to be the endpoint
24113  of a conversion (which then allows us to set up a converter for it).
24114 \end_layout
24115
24116 \begin_layout Description
24117
24118 \family sans
24119 NoWeb
24120 \family default
24121 ->
24122 \family sans
24123 \SpecialChar LaTeX
24124
24125 \family default
24126  This converter performs the 
24127 \begin_inset Quotes eld
24128 \end_inset
24129
24130 weaving
24131 \begin_inset Quotes erd
24132 \end_inset
24133
24134  of the literate document.
24135  For Noweb, it is set to 
24136 \begin_inset Quotes eld
24137 \end_inset
24138
24139
24140 \family typewriter
24141 noweave -delay -index $$i > $$o
24142 \family default
24143
24144 \begin_inset Quotes erd
24145 \end_inset
24146
24147
24148 \end_layout
24149
24150 \begin_layout Description
24151
24152 \family sans
24153 NoWeb
24154 \family default
24155 ->
24156 \family sans
24157 Program
24158 \family default
24159  This performs the 
24160 \begin_inset Quotes eld
24161 \end_inset
24162
24163 tangling step
24164 \begin_inset Quotes erd
24165 \end_inset
24166
24167 .
24168  As stated above, the Converter is set to 
24169 \begin_inset Quotes eld
24170 \end_inset
24171
24172
24173 \family typewriter
24174 build-script $$i
24175 \family default
24176  $$r
24177 \begin_inset Quotes erd
24178 \end_inset
24179
24180 , with Flags set to
24181 \begin_inset Newline newline
24182 \end_inset
24183
24184
24185 \begin_inset Quotes eld
24186 \end_inset
24187
24188
24189 \family typewriter
24190 parselog=$$s/scripts/listerrors
24191 \family default
24192
24193 \begin_inset Quotes erd
24194 \end_inset
24195
24196 .
24197 \end_layout
24198
24199 \begin_layout Subsubsection
24200 Debug extensions
24201 \end_layout
24202
24203 \begin_layout Standard
24204 There is also a new function implemented in the \SpecialChar LyX
24205  server, the 
24206 \begin_inset Quotes eld
24207 \end_inset
24208
24209 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
24210  
24211 \end_layout
24212
24213 \begin_layout Standard
24214 When debugging code with ddd/gdb, it is possible to invoke a text editor
24215  at the current execution position with a single key stroke.
24216  The default ddd configuration for that is shift-ctrl-V.
24217  It happens that you can define the editor command line invocation in ddd
24218  by accessing the 
24219 \family sans
24220 Edit\SpecialChar menuseparator
24221 Preferences\SpecialChar menuseparator
24222 Helpers
24223 \family default
24224  dialog and changing the "Edit Sources" entry.
24225 \end_layout
24226
24227 \begin_layout Standard
24228 I take advantage of the newly created \SpecialChar LyX
24229  server function and this ddd feature,
24230  and set 
24231 \begin_inset Quotes eld
24232 \end_inset
24233
24234 Edit Sources
24235 \begin_inset Quotes erd
24236 \end_inset
24237
24238  to:
24239 \end_layout
24240
24241 \begin_layout Standard
24242 \begin_inset VSpace defskip
24243 \end_inset
24244
24245
24246 \end_layout
24247
24248 \begin_layout Standard
24249
24250 \family sans
24251 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
24252 \end_layout
24253
24254 \begin_layout Standard
24255 \begin_inset VSpace defskip
24256 \end_inset
24257
24258
24259 \end_layout
24260
24261 \begin_layout Standard
24262 With this, whenever you are using ddd and find a point in the program that
24263  you want to edit, you just press shift-ctrl-V (in the ddd window), and
24264  ddd will forward this information to \SpecialChar LyX
24265  through the \SpecialChar LyX
24266  server and then the
24267  \SpecialChar LyX
24268  window will show the same file with the cursor at the same position ddd
24269  was pointing to.
24270  No more guessing or long scrolling to locate a point in the program back
24271  from debugging !
24272 \end_layout
24273
24274 \begin_layout Standard
24275 Note however that you must enable the \SpecialChar LyX
24276  server to get this feature working
24277  (it is disabled by default).
24278  You can enable it in 
24279 \family sans
24280 Preferences
24281 \family default
24282  (tabs 
24283 \family sans
24284 Inputs
24285 \family default
24286
24287 \family sans
24288 Paths
24289 \family default
24290 ) by entering in the 
24291 \family sans
24292 \SpecialChar LyX
24293 server pipe
24294 \family default
24295  a path like 
24296 \begin_inset Quotes eld
24297 \end_inset
24298
24299
24300 \family typewriter
24301 /home/<your-home-directory>/.lyx/lyxpipe
24302 \family default
24303
24304 \begin_inset Quotes erd
24305 \end_inset
24306
24307
24308 \end_layout
24309
24310 \begin_layout Standard
24311 Read the \SpecialChar LyX
24312  server documentation in the 
24313 \emph on
24314 Customization Manual
24315 \emph default
24316  for further information.
24317 \end_layout
24318
24319 \begin_layout Subsubsection
24320 Toolbar extensions
24321 \end_layout
24322
24323 \begin_layout Standard
24324 There are six new buttons that can be added to your \SpecialChar LyX
24325  toolbar.
24326  Five of these buttons are short cuts to layout styles: 
24327 \family sans
24328 Standard
24329 \family default
24330
24331 \family sans
24332 Section
24333 \family default
24334
24335 \family sans
24336 \SpecialChar LaTeX
24337
24338 \family default
24339
24340 \family sans
24341 \SpecialChar LyX
24342 -Code
24343 \family default
24344 , and 
24345 \family sans
24346 Chunk
24347 \family default
24348 .
24349  The last one is a short cut to the 
24350 \begin_inset Quotes eld
24351 \end_inset
24352
24353 Build Program
24354 \begin_inset Quotes erd
24355 \end_inset
24356
24357  File menu entry.
24358  
24359 \end_layout
24360
24361 \begin_layout Standard
24362 \SpecialChar LyX
24363  has a range of buttons that are available for tool bar customization.
24364  In my toolbar I like to combine the six short cuts above with two more:
24365  One for 
24366 \family sans
24367 Document
24368 \family default
24369 \SpecialChar menuseparator
24370
24371 \family sans
24372 Update
24373 \family default
24374 \SpecialChar menuseparator
24375
24376 \family sans
24377 DVI
24378 \family default
24379  and the other for 
24380 \family sans
24381 Document\SpecialChar menuseparator
24382 View\SpecialChar menuseparator
24383 DVI
24384 \family default
24385  File menu entries.
24386  Here is how it looks like:
24387 \end_layout
24388
24389 \begin_layout LyX-Code
24390 Toolbar
24391 \end_layout
24392
24393 \begin_layout LyX-Code
24394   Layouts
24395 \end_layout
24396
24397 \begin_layout LyX-Code
24398   Icon "layout Standard"
24399 \end_layout
24400
24401 \begin_layout LyX-Code
24402   Icon "layout Section"
24403 \end_layout
24404
24405 \begin_layout LyX-Code
24406   Icon "layout \SpecialChar LaTeX
24407 "
24408 \end_layout
24409
24410 \begin_layout LyX-Code
24411   Icon "layout \SpecialChar LyX
24412 -Code"
24413 \end_layout
24414
24415 \begin_layout LyX-Code
24416   Icon "layout Chunk"
24417 \end_layout
24418
24419 \begin_layout LyX-Code
24420   Separator
24421 \end_layout
24422
24423 \begin_layout LyX-Code
24424   Icon "buffer-view"
24425 \end_layout
24426
24427 \begin_layout LyX-Code
24428   Icon "buffer-typeset"
24429 \end_layout
24430
24431 \begin_layout LyX-Code
24432   Icon "build-program"
24433 \end_layout
24434
24435 \begin_layout LyX-Code
24436   Separator
24437 \end_layout
24438
24439 \begin_layout LyX-Code
24440 .
24441 \end_layout
24442
24443 \begin_layout LyX-Code
24444 .
24445 \end_layout
24446
24447 \begin_layout LyX-Code
24448 .
24449 \end_layout
24450
24451 \begin_layout LyX-Code
24452 End
24453 \end_layout
24454
24455 \begin_layout Subsubsection
24456 Colors customization
24457 \end_layout
24458
24459 \begin_layout Standard
24460 There are a number of colors in \SpecialChar LyX
24461  that can be customized in 
24462 \family sans
24463 Preferences
24464 \family default
24465 .
24466  One of the things that bothers people is the \SpecialChar LaTeX
24467  font color.
24468  The default color is red, since the chunks uses \SpecialChar LaTeX
24469  font, and there is a lot
24470  of chunks in literate documents, you may get tired of seeing everything
24471  in red.
24472  You can change it by going to the tabs 
24473 \family sans
24474 Look&Feel
24475 \family default
24476
24477 \family sans
24478 Colors.
24479 \end_layout
24480
24481 \begin_layout Standard
24482 The next thing is the visible presence of the newline character in the screen.
24483  You can choose the color of this particular character and make it blend
24484  in the background.
24485  I recommend you choosing a color that is close to the background but not
24486  equal, that way you still can see it is there, but it is not bothering
24487  you anymore.
24488 \end_layout
24489
24490 \begin_layout Subsection
24491 \SpecialChar LyX
24492  and knitr/Sweave
24493 \end_layout
24494
24495 \begin_layout Standard
24496 Support for 
24497 \family sans
24498 knitr
24499 \family default
24500  and 
24501 \family sans
24502 Sweave
24503 \family default
24504  is documented in the 
24505 \emph on
24506 knitr.lyx
24507 \emph default
24508  example file and in the Sweave manual (menu 
24509 \family sans
24510 Help\SpecialChar menuseparator
24511 Specific Manuals
24512 \family default
24513 ).
24514 \end_layout
24515
24516 \begin_layout Chapter
24517 Special features
24518 \end_layout
24519
24520 \begin_layout Standard
24521 You can do everything with \SpecialChar LyX
24522  that you can do with \SpecialChar LaTeX
24523 .
24524  However, \SpecialChar LyX
24525  cannot support every \SpecialChar LaTeX
24526  feature directly.
24527  But you can always use \SpecialChar TeX
24528  Code.
24529  This chapter shows you some more special things you might want to use.
24530  For other special things you can do with figures, tables, floats, boxes
24531  and notes, have a look at the 
24532 \emph on
24533 Embedded
24534 \begin_inset space ~
24535 \end_inset
24536
24537 Objects
24538 \emph default
24539  manual.
24540 \end_layout
24541
24542 \begin_layout Section
24543 Multiple Text Columns
24544 \end_layout
24545
24546 \begin_layout Standard
24547 This feature is independent of the option 
24548 \family sans
24549 Two-column document
24550 \family default
24551  in the document settings under 
24552 \family sans
24553 Text Layout
24554 \family default
24555 .
24556  If you want to have 2
24557 \begin_inset space ~
24558 \end_inset
24559
24560 columns for the whole document, it is recommended to use the 
24561 \family sans
24562 Two-column document
24563 \family default
24564  option.
24565  For all other cases use this feature.
24566 \end_layout
24567
24568 \begin_layout Standard
24569 To use multiple text columns in your document, you have to load the module
24570  
24571 \family sans
24572 Multiple Columns
24573 \family default
24574  (menu 
24575 \family sans
24576 Document\SpecialChar menuseparator
24577 Settings\SpecialChar menuseparator
24578 Modules
24579 \family default
24580 ) and must have the \SpecialChar LaTeX
24581 -package 
24582 \series bold
24583 multicol
24584 \series default
24585  installed.
24586 \end_layout
24587
24588 \begin_layout Standard
24589 Footnotes within multiple columns will be placed at the bottom of the page
24590  and not under each column.
24591  Within the different columns you can use everything, with the limitation
24592  that for floats you need to use the float option 
24593 \family sans
24594 Span columns
24595 \family default
24596 .
24597 \end_layout
24598
24599 \begin_layout Subsection
24600 Basics
24601 \end_layout
24602
24603 \begin_layout Standard
24604 If you want to have 2
24605 \begin_inset space ~
24606 \end_inset
24607
24608 columns in your text, insert a multicolumn inset via the menu 
24609 \family sans
24610 Insert\SpecialChar menuseparator
24611 Custom
24612 \begin_inset space ~
24613 \end_inset
24614
24615 Insets\SpecialChar menuseparator
24616 Multiple
24617 \begin_inset space ~
24618 \end_inset
24619
24620 Columns
24621 \family default
24622  where the columns should start.
24623  Write all text that should be printed in 2
24624 \begin_inset space ~
24625 \end_inset
24626
24627 columns into this inset.
24628 \end_layout
24629
24630 \begin_layout Standard
24631 Here is an example:
24632 \end_layout
24633
24634 \begin_layout Standard
24635 \noindent
24636 \begin_inset Flex Multiple Columns
24637 status open
24638
24639 \begin_layout Plain Layout
24640 \noindent
24641
24642 \series bold
24643 \size small
24644 The Adventure of the Empty House
24645 \series default
24646
24647 \begin_inset Newline newline
24648 \end_inset
24649
24650 by Sir Arthur Conan Doyle
24651 \end_layout
24652
24653 \begin_layout Plain Layout
24654
24655 \size small
24656 It was in the spring of the year 1894 that all London was interested, and
24657  the fashionable world dismayed, by the murder of the Honourable Ronald
24658  Adair under most unusual and inexplicable circumstances.
24659  The public has already learned those particulars of the crime which came
24660  out in the police investigation, but a good deal was suppressed upon that
24661  occasion, since the case for the prosecution was so overwhelmingly strong
24662  that it was not necessary to bring forward all the facts.
24663  Only now, at the end of nearly ten years, am I allowed to supply those
24664  missing links which make up the whole of that remarkable chain.
24665  The crime was of interest in itself, but that interest was as nothing to
24666  me compared to the inconceivable sequel, which afforded me the greatest
24667  shock and surprise of any event in my adventurous life.
24668  Even now, after this long interval, I find myself thrilling as I think
24669  of it, and feeling once more that sudden flood of joy, amazement, and increduli
24670 ty which utterly submerged my mind.
24671  Let me say to that public, which has shown some interest in those glimpses
24672  which I have occasionally given them of the thoughts and actions of a very
24673  remarkable man, that they are not to blame me if I have not shared my knowledge
24674  with them, for I should have considered it my first duty to do so, had
24675  I not been barred by a positive prohibition from his own lips, which was
24676  only withdrawn upon the third of last month.
24677 \end_layout
24678
24679 \end_inset
24680
24681
24682 \end_layout
24683
24684 \begin_layout Standard
24685 To get 3 or more columns, set the cursor into the multicolumn inset and
24686  use the menu 
24687 \family sans
24688 Insert\SpecialChar menuseparator
24689 Number
24690 \begin_inset space ~
24691 \end_inset
24692
24693 of
24694 \begin_inset space ~
24695 \end_inset
24696
24697 Columns
24698 \family default
24699 .
24700  The number of the desired columns is written into that inset (for 3
24701 \begin_inset space ~
24702 \end_inset
24703
24704 columns write 
24705 \begin_inset Quotes eld
24706 \end_inset
24707
24708 3
24709 \begin_inset Quotes erd
24710 \end_inset
24711
24712 ).
24713 \begin_inset Newline newline
24714 \end_inset
24715
24716 Here is an example with 3
24717 \begin_inset space ~
24718 \end_inset
24719
24720 columns:
24721 \end_layout
24722
24723 \begin_layout Standard
24724 \begin_inset Flex Multiple Columns
24725 status open
24726
24727 \begin_layout Plain Layout
24728
24729 \size footnotesize
24730 \begin_inset Argument 1
24731 status open
24732
24733 \begin_layout Plain Layout
24734 3
24735 \end_layout
24736
24737 \end_inset
24738
24739 It can be imagined that my close intimacy with Sherlock Holmes had interested
24740  me deeply in crime, and that after his disappearance I never failed to
24741  read with care the various problems which came before the public.
24742  And I even attempted, more than once, for my own private satisfaction,
24743  to employ his methods in their solution, though with indifferent success.
24744  There was none, however, which appealed to me like this tragedy of Ronald
24745  Adair.
24746  As I read the evidence at the inquest, which led up to a verdict of willful
24747  murder against some person or persons unknown, I realized more clearly
24748  than I had ever done the loss which the community had sustained by the
24749  death of Sherlock Holmes.
24750  There were points about this strange business which would, I was sure,
24751  have specially appealed to him, and the efforts of the police would have
24752  been supplemented, or more probably anticipated, by the trained observation
24753  and the alert mind of the first criminal agent in Europe.
24754  All day, as I drove upon my round, I turned over the case in my mind and
24755  found no explanation which appeared to me to be adequate.
24756  At the risk of telling a twice-told tale, I will recapitulate the facts
24757  as they were known to the public at the conclusion of the inquest.
24758 \end_layout
24759
24760 \end_inset
24761
24762
24763 \end_layout
24764
24765 \begin_layout Standard
24766 You can have up to 10
24767 \begin_inset space ~
24768 \end_inset
24769
24770 columns if you want to, but that might not be very pleasant for the readers
24771  of your document.
24772 \end_layout
24773
24774 \begin_layout Standard
24775 \begin_inset Newpage newpage
24776 \end_inset
24777
24778
24779 \end_layout
24780
24781 \begin_layout Subsection
24782 Columns inside Columns
24783 \end_layout
24784
24785 \begin_layout Standard
24786 You can also have columns inside columns:
24787 \end_layout
24788
24789 \begin_layout Standard
24790 \begin_inset Flex Multiple Columns
24791 status open
24792
24793 \begin_layout Plain Layout
24794
24795 \size footnotesize
24796 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
24797  at that time governor of one of the Australian colonies.
24798  Adair's mother had returned from Australia to undergo the operation for
24799  cataract, and she, her son Ronald, and her daughter Hilda were living together
24800  at 427 Park Lane.
24801 \end_layout
24802
24803 \begin_layout Plain Layout
24804 \begin_inset Flex Multiple Columns
24805 status open
24806
24807 \begin_layout Plain Layout
24808
24809 \size footnotesize
24810 The youth moved in the best society–had, so far as was known, no enemies
24811  and no particular vices.
24812  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
24813  had been broken off by mutual consent some months before, and there was
24814  no sign that it had left any very profound feeling behind it.
24815  For the rest {sic} the man's life moved in a narrow and conventional circle,
24816  for his habits were quiet and his nature unemotional.
24817  Yet it was upon this easy-going young aristocrat that death came, in most
24818  strange and unexpected form, between the hours of ten and eleven-twenty
24819  on the night of March 30, 1894.
24820 \end_layout
24821
24822 \end_inset
24823
24824
24825 \end_layout
24826
24827 \begin_layout Plain Layout
24828
24829 \size footnotesize
24830 Ronald Adair was fond of cards–playing continually, but never for such stakes
24831  as would hurt him.
24832  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
24833  It was shown that, after dinner on the day of his death, he had played
24834  a rubber of whist at the latter club.
24835  He had also played there in the afternoon.
24836
24837 \size default
24838  
24839 \size footnotesize
24840 The evidence of those who had played with him– Mr.
24841  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
24842  and that there was a fairly equal fall of the cards.
24843  Adair might have lost five pounds, but not more.
24844  His fortune was a considerable one, and such a loss could not in any way
24845  affect him.
24846  He had played nearly every day at one club or other, but he was a cautious
24847  player, and usually rose a winner.
24848  It came out in evidence that, in partnership with Colonel Moran, he had
24849  actually won as much as four hundred and twenty pounds in a sitting, some
24850  weeks before, from Godfrey Milner and Lord Balmoral.
24851  So much for his recent history as it came out at the inquest.
24852 \end_layout
24853
24854 \end_inset
24855
24856
24857 \end_layout
24858
24859 \begin_layout Subsection
24860 Advanced Examples
24861 \end_layout
24862
24863 \begin_layout Standard
24864 The examples in this section show some more special features of multiple
24865  columns.
24866 \end_layout
24867
24868 \begin_layout Standard
24869 For more features of multiple columns, have a look at the documentation
24870  of the \SpecialChar LaTeX
24871 -package 
24872 \series bold
24873 multicol
24874 \series default
24875
24876 \begin_inset CommandInset citation
24877 LatexCommand cite
24878 key "multicol"
24879 literal "true"
24880
24881 \end_inset
24882
24883 .
24884 \end_layout
24885
24886 \begin_layout Subsubsection
24887 Preface
24888 \end_layout
24889
24890 \begin_layout Standard
24891 To add a preface text for multiple columns, set the cursor into the multicolumn
24892  inset and use the menu 
24893 \family sans
24894 Insert\SpecialChar menuseparator
24895 Preface
24896 \family default
24897 .
24898  Write your preface text into that inset.
24899 \begin_inset Newline newline
24900 \end_inset
24901
24902 This is an example with some preface text:
24903 \end_layout
24904
24905 \begin_layout Standard
24906 \begin_inset VSpace bigskip
24907 \end_inset
24908
24909
24910 \end_layout
24911
24912 \begin_layout Standard
24913 \begin_inset Flex Multiple Columns
24914 status open
24915
24916 \begin_layout Plain Layout
24917 \begin_inset Argument 2
24918 status open
24919
24920 \begin_layout Plain Layout
24921 And the story continues and continues and continues and continues\SpecialChar ldots
24922
24923 \end_layout
24924
24925 \end_inset
24926
24927
24928 \size small
24929 On the evening of the crime, he returned from the club exactly at ten.
24930  His mother and sister were out spending the evening with a relation.
24931  The servant deposed that she heard him enter the front room on the second
24932  floor, generally used as his sitting-room.
24933  She had lit a fire there, and as it smoked she had opened the window.
24934  No sound was heard from the room until eleven-twenty, the hour of the return
24935  of Lady Maynooth and her daughter.
24936  Desiring to say good-night, she attempted to enter her son's room.
24937  The door was locked on the inside, and no answer could be got to their
24938  cries and knocking.
24939  Help was obtained, and the door forced.
24940  The unfortunate young man was found lying near the table.
24941  His head had been horribly mutilated by an expanding revolver bullet, but
24942  no weapon of any sort was to be found in the room.
24943 \end_layout
24944
24945 \end_inset
24946
24947
24948 \end_layout
24949
24950 \begin_layout Standard
24951 You can also use a section heading as the preface if you use a section command
24952  as \SpecialChar TeX
24953  Code.
24954  For example the command
24955 \end_layout
24956
24957 \begin_layout Standard
24958
24959 \series bold
24960
24961 \backslash
24962 subsection{subsection title}
24963 \end_layout
24964
24965 \begin_layout Standard
24966 creates a subsection.
24967  In this example the preface is a subsubsection:
24968 \end_layout
24969
24970 \begin_layout Standard
24971 \begin_inset Flex Multiple Columns
24972 status open
24973
24974 \begin_layout Plain Layout
24975 \begin_inset Argument 2
24976 status open
24977
24978 \begin_layout Plain Layout
24979 \begin_inset ERT
24980 status collapsed
24981
24982 \begin_layout Plain Layout
24983
24984
24985 \backslash
24986 subsubsection{
24987 \end_layout
24988
24989 \end_inset
24990
24991 This is a subsubsection heading as a preface
24992 \begin_inset ERT
24993 status collapsed
24994
24995 \begin_layout Plain Layout
24996
24997 }
24998 \end_layout
24999
25000 \end_inset
25001
25002
25003 \end_layout
25004
25005 \end_inset
25006
25007
25008 \size small
25009 A minute examination of the circumstances served only to make the case more
25010  complex.
25011  In the first place, no reason could be given why the young man should have
25012  fastened the door upon the inside.
25013  There was the possibility that the murderer had done this, and had afterwards
25014  escaped by the window.
25015  The drop was at least twenty feet, however, and a bed of crocuses in full
25016  bloom lay beneath.
25017  Neither the flowers nor the earth showed any sign of having been disturbed,
25018  nor were there any marks upon the narrow strip of grass which separated
25019  the house from the road.
25020  Apparently, therefore, it was the young man himself who had fastened the
25021  door.
25022  But how did he come by his death? No one could have climbed up to the window
25023  without leaving traces.
25024  Suppose a man had fired through the window, he would indeed be a remarkable
25025  shot who could with a revolver inflict so deadly a wound.
25026  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
25027  a hundred yards of the house.
25028  No one had heard a shot.
25029 \end_layout
25030
25031 \end_inset
25032
25033
25034 \end_layout
25035
25036 \begin_layout Standard
25037 If there is less vertical space than 6
25038 \begin_inset space ~
25039 \end_inset
25040
25041 text lines is left on the page at the beginning of the multiple columns,
25042  a page break will be inserted before the multiple columns.
25043  Depending on the number of lines of the preface text, you might want to
25044  change this space.
25045  This is done by setting the cursor into the mulitcolumn inset behind the
25046  preface (if there is any) and using the menu 
25047 \family sans
25048 Insert\SpecialChar menuseparator
25049 Space
25050 \begin_inset space ~
25051 \end_inset
25052
25053 Before
25054 \begin_inset space ~
25055 \end_inset
25056
25057 Page
25058 \begin_inset space ~
25059 \end_inset
25060
25061 Break
25062 \family default
25063 .
25064  Insert into that inset the amount of space like e.
25065 \begin_inset space \thinspace{}
25066 \end_inset
25067
25068 g.
25069 \begin_inset space \space{}
25070 \end_inset
25071
25072
25073 \begin_inset Quotes eld
25074 \end_inset
25075
25076 5cm
25077 \begin_inset Quotes erd
25078 \end_inset
25079
25080 .
25081 \begin_inset Newline newline
25082 \end_inset
25083
25084 In this example the space is set to 7
25085 \begin_inset space ~
25086 \end_inset
25087
25088 text lines by using 
25089 \begin_inset Quotes eld
25090 \end_inset
25091
25092 7
25093 \backslash
25094 baselineskip
25095 \begin_inset Quotes erd
25096 \end_inset
25097
25098  (where the command 
25099 \series bold
25100
25101 \backslash
25102 baselineskip
25103 \series default
25104  needs to be inserted as \SpecialChar TeX
25105  code):
25106 \end_layout
25107
25108 \begin_layout Standard
25109 \begin_inset Flex Multiple Columns
25110 status open
25111
25112 \begin_layout Plain Layout
25113 \begin_inset Argument 3
25114 status open
25115
25116 \begin_layout Plain Layout
25117 7
25118 \begin_inset ERT
25119 status collapsed
25120
25121 \begin_layout Plain Layout
25122
25123
25124 \backslash
25125 baselineskip
25126 \end_layout
25127
25128 \end_inset
25129
25130
25131 \end_layout
25132
25133 \end_inset
25134
25135
25136 \size small
25137 On the evening of the crime, he returned from the club exactly at ten.
25138  His mother and sister were out spending the evening with a relation.
25139  The servant deposed that she heard him enter the front room on the second
25140  floor, generally used as his sitting-room.
25141  She had lit a fire there, and as it smoked she had opened the window.
25142  No sound was heard from the room until eleven-twenty, the hour of the return
25143  of Lady Maynooth and her daughter.
25144  Desiring to say good-night, she attempted to enter her son's room.
25145  The door was locked on the inside, and no answer could be got to their
25146  cries and knocking.
25147  Help was obtained, and the door forced.
25148  The unfortunate young man was found lying near the table.
25149  His head had been horribly mutilated by an expanding revolver bullet, but
25150  no weapon of any sort was to be found in the room.
25151 \end_layout
25152
25153 \end_inset
25154
25155
25156 \end_layout
25157
25158 \begin_layout Subsubsection
25159 Surrounding Space
25160 \end_layout
25161
25162 \begin_layout Standard
25163 The amount of space before and after multiple columns can be changed by
25164  changing the length 
25165 \series bold
25166
25167 \backslash
25168 multicolsep
25169 \series default
25170 .
25171  For example the command
25172 \end_layout
25173
25174 \begin_layout Standard
25175
25176 \series bold
25177
25178 \backslash
25179 setlength{
25180 \backslash
25181 multicolsep}{3cm}
25182 \end_layout
25183
25184 \begin_layout Standard
25185 in \SpecialChar TeX
25186  Code changes its value to 3
25187 \begin_inset space \thinspace{}
25188 \end_inset
25189
25190 cm.
25191  The change must be made before the multiple columns' start.
25192  The predefined value is 13
25193 \begin_inset space \thinspace{}
25194 \end_inset
25195
25196 pt.
25197 \end_layout
25198
25199 \begin_layout Standard
25200 For this example 
25201 \series bold
25202
25203 \backslash
25204 multicolsep
25205 \series default
25206  was set to 2.5
25207 \begin_inset space \thinspace{}
25208 \end_inset
25209
25210 cm:
25211 \end_layout
25212
25213 \begin_layout Standard
25214 \begin_inset ERT
25215 status open
25216
25217 \begin_layout Plain Layout
25218
25219
25220 \backslash
25221 setlength{
25222 \backslash
25223 multicolsep}{2.5cm}
25224 \end_layout
25225
25226 \end_inset
25227
25228
25229 \end_layout
25230
25231 \begin_layout Standard
25232 \begin_inset Flex Multiple Columns
25233 status open
25234
25235 \begin_layout Plain Layout
25236
25237 \size small
25238 All day I turned these facts over in my mind, endeavouring to hit upon some
25239  theory which could reconcile them all, and to find that line of least resistanc
25240 e which my poor friend had declared to be the starting-point of every investigat
25241 ion.
25242  I confess that I made little progress.
25243  In the evening I strolled across the Park, and found myself about six o'clock
25244  at the Oxford Street end of Park Lane.
25245  A group of loafers upon the pavements, all staring up at a particular window,
25246  directed me to the house which I had come to see.
25247  A tall, thin man with coloured glasses, whom I strongly suspected of being
25248  a plain-clothes detective, was pointing out some theory of his own, while
25249  the others crowded round to listen to what he said.
25250  I got as near him as I could, but his observations seemed to me to be absurd,
25251  so I withdrew again in some disgust.
25252  As I did so I struck against an elderly, deformed man, who had been behind
25253  me, and I knocked down several books which he was carrying.
25254 \end_layout
25255
25256 \end_inset
25257
25258
25259 \end_layout
25260
25261 \begin_layout Standard
25262 \begin_inset Note Greyedout
25263 status open
25264
25265 \begin_layout Plain Layout
25266
25267 \series bold
25268 Note:
25269 \series default
25270  The values you set with 
25271 \series bold
25272
25273 \backslash
25274 setlength
25275 \series default
25276  will be used for all following multiple columns until you change them again.
25277 \end_layout
25278
25279 \end_inset
25280
25281
25282 \end_layout
25283
25284 \begin_layout Standard
25285 \begin_inset ERT
25286 status collapsed
25287
25288 \begin_layout Plain Layout
25289
25290
25291 \backslash
25292 setlength{
25293 \backslash
25294 multicolsep}{13pt}
25295 \end_layout
25296
25297 \end_inset
25298
25299
25300 \begin_inset Note Note
25301 status collapsed
25302
25303 \begin_layout Plain Layout
25304 go back to the default
25305 \end_layout
25306
25307 \end_inset
25308
25309
25310 \end_layout
25311
25312 \begin_layout Standard
25313 \begin_inset Newpage newpage
25314 \end_inset
25315
25316
25317 \end_layout
25318
25319 \begin_layout Subsubsection
25320 Column Breaks
25321 \end_layout
25322
25323 \begin_layout Standard
25324 A column break can be forced by inserting the command 
25325 \series bold
25326
25327 \backslash
25328 columnbreak{}
25329 \series default
25330  as \SpecialChar TeX
25331  Code to that position in the text where the column should be broken.
25332  Note that this leads in most cases to whitespace in the text.
25333 \begin_inset Newline newline
25334 \end_inset
25335
25336 Here is an example:
25337 \end_layout
25338
25339 \begin_layout Standard
25340 \begin_inset Flex Multiple Columns
25341 status open
25342
25343 \begin_layout Plain Layout
25344
25345 \size small
25346 \begin_inset Quotes eld
25347 \end_inset
25348
25349 You're surprised to see me, sir,
25350 \begin_inset Quotes erd
25351 \end_inset
25352
25353  said he, in a strange, croaking voice.
25354 \end_layout
25355
25356 \begin_layout Plain Layout
25357
25358 \size small
25359 I acknowledged that I was.
25360 \end_layout
25361
25362 \begin_layout Plain Layout
25363
25364 \size small
25365 \begin_inset Quotes eld
25366 \end_inset
25367
25368 Well, I've a conscience, sir, and when I chanced to see you go into this
25369  house, as I came hobbling after you, I thought to myself, I'll just step
25370  in and see that kind gentleman, and tell him that if I was a bit gruff
25371  in my manner there was not any harm meant, and that I am much obliged to
25372  him for picking up my books.
25373 \begin_inset Quotes erd
25374 \end_inset
25375
25376
25377 \end_layout
25378
25379 \begin_layout Plain Layout
25380
25381 \size small
25382 \begin_inset Quotes eld
25383 \end_inset
25384
25385 You make too much of a trifle,
25386 \begin_inset Quotes erd
25387 \end_inset
25388
25389  said I.
25390  
25391 \begin_inset Quotes eld
25392 \end_inset
25393
25394 May I ask how you knew who I was?
25395 \begin_inset Quotes erd
25396 \end_inset
25397
25398  AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED.
25399 \begin_inset ERT
25400 status collapsed
25401
25402 \begin_layout Plain Layout
25403
25404
25405 \backslash
25406 columnbreak{}
25407 \end_layout
25408
25409 \end_inset
25410
25411
25412 \end_layout
25413
25414 \begin_layout Plain Layout
25415
25416 \size small
25417 \begin_inset Quotes eld
25418 \end_inset
25419
25420 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
25421  you'll find my little bookshop at the corner of Church Street, and very
25422  happy to see you, I am sure.
25423  Maybe you collect yourself, sir.
25424  Here's 
25425 \noun on
25426 British
25427 \begin_inset space ~
25428 \end_inset
25429
25430 Birds
25431 \noun default
25432 , and 
25433 \noun on
25434 Catullus
25435 \noun default
25436 , and 
25437 \noun on
25438 The Holy War
25439 \noun default
25440 –a bargain, every one of them.
25441  With five volumes you could just fill that gap on that second shelf.
25442  It looks untidy, does it not, sir?
25443 \begin_inset Quotes erd
25444 \end_inset
25445
25446
25447 \end_layout
25448
25449 \end_inset
25450
25451
25452 \end_layout
25453
25454 \begin_layout Subsubsection
25455 Column Separation
25456 \end_layout
25457
25458 \begin_layout Standard
25459 The width of the columns is automatically calculated, but you can modify
25460  the space between the columns.
25461  This is done by changing the length 
25462 \series bold
25463
25464 \backslash
25465 columnsep
25466 \series default
25467 .
25468  Its predefined value is 10
25469 \begin_inset space \thinspace{}
25470 \end_inset
25471
25472 pt.
25473  Here is an example where 
25474 \series bold
25475
25476 \backslash
25477 columnsep
25478 \series default
25479  is set to 3
25480 \begin_inset space \thinspace{}
25481 \end_inset
25482
25483 cm:
25484 \end_layout
25485
25486 \begin_layout Standard
25487 \begin_inset ERT
25488 status open
25489
25490 \begin_layout Plain Layout
25491
25492
25493 \backslash
25494 setlength{
25495 \backslash
25496 columnsep}{3cm}
25497 \end_layout
25498
25499 \end_inset
25500
25501
25502 \end_layout
25503
25504 \begin_layout Standard
25505 \begin_inset Flex Multiple Columns
25506 status open
25507
25508 \begin_layout Plain Layout
25509
25510 \size small
25511 My observations of No.
25512 \begin_inset space \space{}
25513 \end_inset
25514
25515 427 Park Lane did little to clear up the problem in which I was interested.
25516  The house was separated from the street by a low wall and railing, the
25517  whole not more than five feet high.
25518  It was perfectly easy, therefore, for anyone to get into the garden, but
25519  the window was entirely inaccessible, since there was no water pipe or
25520  anything which could help the most active man to climb it.
25521  More puzzled than ever, I retraced my steps to Kensington.
25522  I had not been in my study five minutes when the maid entered to say that
25523  a person desired to see me.
25524  To my astonishment it was none other than my strange old book collector,
25525  his sharp, wizened face peering out from a frame of white hair, and his
25526  precious volumes, a dozen of them at least, wedged under his right arm.
25527 \end_layout
25528
25529 \end_inset
25530
25531
25532 \end_layout
25533
25534 \begin_layout Standard
25535 \begin_inset ERT
25536 status collapsed
25537
25538 \begin_layout Plain Layout
25539
25540
25541 \backslash
25542 setlength{
25543 \backslash
25544 columnsep}{10pt}
25545 \end_layout
25546
25547 \end_inset
25548
25549
25550 \begin_inset Note Note
25551 status collapsed
25552
25553 \begin_layout Plain Layout
25554 go back to the default
25555 \end_layout
25556
25557 \end_inset
25558
25559
25560 \end_layout
25561
25562 \begin_layout Subsubsection
25563 Vertical Lines
25564 \end_layout
25565
25566 \begin_layout Standard
25567 Between the columns a rule with a width of the length 
25568 \series bold
25569
25570 \backslash
25571 columnseprule
25572 \series default
25573  is placed.
25574  If this rule width is set to 0
25575 \begin_inset space \thinspace{}
25576 \end_inset
25577
25578 pt (this is the default), the rule is suppressed.
25579  In the following example the rule is 2
25580 \begin_inset space \thinspace{}
25581 \end_inset
25582
25583 pt wide:
25584 \end_layout
25585
25586 \begin_layout Standard
25587 \begin_inset ERT
25588 status open
25589
25590 \begin_layout Plain Layout
25591
25592
25593 \backslash
25594 setlength{
25595 \backslash
25596 columnseprule}{2pt}
25597 \end_layout
25598
25599 \end_inset
25600
25601
25602 \end_layout
25603
25604 \begin_layout Standard
25605 \begin_inset Flex Multiple Columns
25606 status open
25607
25608 \begin_layout Plain Layout
25609
25610 \size small
25611 \begin_inset Quotes eld
25612 \end_inset
25613
25614 You're surprised to see me, sir,
25615 \begin_inset Quotes erd
25616 \end_inset
25617
25618  said he, in a strange, croaking voice.
25619 \end_layout
25620
25621 \begin_layout Plain Layout
25622
25623 \size small
25624 I acknowledged that I was.
25625 \end_layout
25626
25627 \begin_layout Plain Layout
25628
25629 \size small
25630 \begin_inset Quotes eld
25631 \end_inset
25632
25633 Well, I've a conscience, sir, and when I chanced to see you go into this
25634  house, as I came hobbling after you, I thought to myself, I'll just step
25635  in and see that kind gentleman, and tell him that if I was a bit gruff
25636  in my manner there was not any harm meant, and that I am much obliged to
25637  him for picking up my books.
25638 \begin_inset Quotes erd
25639 \end_inset
25640
25641
25642 \end_layout
25643
25644 \begin_layout Plain Layout
25645
25646 \size small
25647 \begin_inset Quotes eld
25648 \end_inset
25649
25650 You make too much of a trifle,
25651 \begin_inset Quotes erd
25652 \end_inset
25653
25654  said I.
25655  
25656 \begin_inset Quotes eld
25657 \end_inset
25658
25659 May I ask how you knew who I was?
25660 \begin_inset Quotes erd
25661 \end_inset
25662
25663
25664 \end_layout
25665
25666 \begin_layout Plain Layout
25667
25668 \size small
25669 \begin_inset Quotes eld
25670 \end_inset
25671
25672 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
25673  you'll find my little bookshop at the corner of Church Street, and very
25674  happy to see you, I am sure.
25675  Maybe you collect yourself, sir.
25676  Here's 
25677 \noun on
25678 British
25679 \begin_inset space ~
25680 \end_inset
25681
25682 Birds
25683 \noun default
25684 , and 
25685 \noun on
25686 Catullus
25687 \noun default
25688 , and 
25689 \noun on
25690 The Holy War
25691 \noun default
25692 –a bargain, every one of them.
25693  With five volumes you could just fill that gap on that second shelf.
25694  It looks untidy, does it not, sir?
25695 \begin_inset Quotes erd
25696 \end_inset
25697
25698
25699 \end_layout
25700
25701 \end_inset
25702
25703
25704 \end_layout
25705
25706 \begin_layout Standard
25707 \begin_inset VSpace defskip
25708 \end_inset
25709
25710
25711 \end_layout
25712
25713 \begin_layout Standard
25714 The rule can be colored by redefining the command 
25715 \series bold
25716
25717 \backslash
25718 columnseprulecolor
25719 \series default
25720 .
25721  This is done by inserting the command
25722 \begin_inset Newline newline
25723 \end_inset
25724
25725
25726 \series bold
25727
25728 \backslash
25729 renewcommand{
25730 \backslash
25731 columnseprulecolor}{
25732 \backslash
25733 color{red}}
25734 \series default
25735
25736 \begin_inset Newline newline
25737 \end_inset
25738
25739 as \SpecialChar TeX
25740  Code before the multicolumn inset.
25741  Replace 
25742 \series bold
25743 red
25744 \series default
25745  in this command by a color of your choice.
25746  You can use all pre- and self-defined colors.
25747  See the 
25748 \emph on
25749 EmbeddedObjects
25750 \emph default
25751  manual, section 
25752 \emph on
25753 Colored
25754 \begin_inset space ~
25755 \end_inset
25756
25757 Tables
25758 \emph default
25759  for more information about pre- and self-defined colors.
25760  To go back to the default color insert the command
25761 \begin_inset Newline newline
25762 \end_inset
25763
25764
25765 \series bold
25766
25767 \backslash
25768 renewcommand{
25769 \backslash
25770 columnseprulecolor}{
25771 \backslash
25772 normalcolor}
25773 \series default
25774
25775 \begin_inset Newline newline
25776 \end_inset
25777
25778 Here is the example with a cyan rule and 1
25779 \begin_inset space \thinspace{}
25780 \end_inset
25781
25782 cm column separation:
25783 \end_layout
25784
25785 \begin_layout Standard
25786 \begin_inset ERT
25787 status open
25788
25789 \begin_layout Plain Layout
25790
25791
25792 \backslash
25793 setlength{
25794 \backslash
25795 columnsep}{1cm}
25796 \end_layout
25797
25798 \begin_layout Plain Layout
25799
25800
25801 \backslash
25802 renewcommand{
25803 \backslash
25804 columnseprulecolor}{
25805 \backslash
25806 color{cyan}}
25807 \end_layout
25808
25809 \end_inset
25810
25811
25812 \end_layout
25813
25814 \begin_layout Standard
25815 \begin_inset Flex Multiple Columns
25816 status open
25817
25818 \begin_layout Plain Layout
25819
25820 \size small
25821 \begin_inset Quotes eld
25822 \end_inset
25823
25824 You're surprised to see me, sir,
25825 \begin_inset Quotes erd
25826 \end_inset
25827
25828  said he, in a strange, croaking voice.
25829 \end_layout
25830
25831 \begin_layout Plain Layout
25832
25833 \size small
25834 I acknowledged that I was.
25835 \end_layout
25836
25837 \begin_layout Plain Layout
25838
25839 \size small
25840 \begin_inset Quotes eld
25841 \end_inset
25842
25843 Well, I've a conscience, sir, and when I chanced to see you go into this
25844  house, as I came hobbling after you, I thought to myself, I'll just step
25845  in and see that kind gentleman, and tell him that if I was a bit gruff
25846  in my manner there was not any harm meant, and that I am much obliged to
25847  him for picking up my books.
25848 \begin_inset Quotes erd
25849 \end_inset
25850
25851
25852 \end_layout
25853
25854 \begin_layout Plain Layout
25855
25856 \size small
25857 \begin_inset Quotes eld
25858 \end_inset
25859
25860 You make too much of a trifle,
25861 \begin_inset Quotes erd
25862 \end_inset
25863
25864  said I.
25865  
25866 \begin_inset Quotes eld
25867 \end_inset
25868
25869 May I ask how you knew who I was?
25870 \begin_inset Quotes erd
25871 \end_inset
25872
25873
25874 \end_layout
25875
25876 \begin_layout Plain Layout
25877
25878 \size small
25879 \begin_inset Quotes eld
25880 \end_inset
25881
25882 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
25883  you'll find my little bookshop at the corner of Church Street, and very
25884  happy to see you, I am sure.
25885  Maybe you collect yourself, sir.
25886  Here's 
25887 \noun on
25888 British
25889 \begin_inset space ~
25890 \end_inset
25891
25892 Birds
25893 \noun default
25894 , and 
25895 \noun on
25896 Catullus
25897 \noun default
25898 , and 
25899 \noun on
25900 The Holy War
25901 \noun default
25902 –a bargain, every one of them.
25903  With five volumes you could just fill that gap on that second shelf.
25904  It looks untidy, does it not, sir?
25905 \begin_inset Quotes erd
25906 \end_inset
25907
25908
25909 \end_layout
25910
25911 \end_inset
25912
25913
25914 \end_layout
25915
25916 \begin_layout Standard
25917 \begin_inset ERT
25918 status collapsed
25919
25920 \begin_layout Plain Layout
25921
25922
25923 \backslash
25924 setlength{
25925 \backslash
25926 columnseprule}{0pt}
25927 \end_layout
25928
25929 \begin_layout Plain Layout
25930
25931
25932 \backslash
25933 renewcommand{
25934 \backslash
25935 columnseprulecolor}{
25936 \backslash
25937 normalcolor}
25938 \end_layout
25939
25940 \end_inset
25941
25942
25943 \begin_inset Note Note
25944 status collapsed
25945
25946 \begin_layout Plain Layout
25947 go back to the default
25948 \end_layout
25949
25950 \end_inset
25951
25952
25953 \end_layout
25954
25955 \begin_layout Section
25956 Non-standard Paragraph Shapes
25957 \end_layout
25958
25959 \begin_layout Standard
25960 \noindent
25961 \SpecialChar LaTeX
25962  as well as any other text processor uses by default rectangular paragraphs.
25963  For special cases like for example posters, invitation cards or poems you
25964  can modify the paragraph shape to one of your choice.
25965  This can be done by using the \SpecialChar LaTeX
25966 -package 
25967 \series bold
25968 shapepar
25969 \series default
25970  which is loaded by using in the document settings the module 
25971 \family sans
25972 Custom paragraph shapes
25973 \family default
25974 .
25975 \end_layout
25976
25977 \begin_layout Subsection
25978 Predefined shapes
25979 \end_layout
25980
25981 \begin_layout Standard
25982
25983 \series bold
25984 shapepar
25985 \series default
25986  provides the following shapes:
25987 \end_layout
25988
25989 \begin_layout Standard
25990 \begin_inset Tabular
25991 <lyxtabular version="3" rows="13" columns="3">
25992 <features booktabs="true" islongtable="true" longtabularalignment="center">
25993 <column alignment="center" valignment="middle" width="16col%">
25994 <column alignment="center" valignment="middle" width="40col%">
25995 <column alignment="center" valignment="middle" width="35col%">
25996 <row endhead="true">
25997 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25998 \begin_inset Text
25999
26000 \begin_layout Plain Layout
26001 Name
26002 \end_layout
26003
26004 \end_inset
26005 </cell>
26006 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
26007 \begin_inset Text
26008
26009 \begin_layout Plain Layout
26010 Description
26011 \end_layout
26012
26013 \end_inset
26014 </cell>
26015 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
26016 \begin_inset Text
26017
26018 \begin_layout Plain Layout
26019 Annotation
26020 \end_layout
26021
26022 \end_inset
26023 </cell>
26024 </row>
26025 <row>
26026 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26027 \begin_inset Text
26028
26029 \begin_layout Plain Layout
26030 CDlabel
26031 \end_layout
26032
26033 \end_inset
26034 </cell>
26035 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26036 \begin_inset Text
26037
26038 \begin_layout Plain Layout
26039 Circle with circular hole (in the size of a CD/DVD)
26040 \end_layout
26041
26042 \end_inset
26043 </cell>
26044 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26045 \begin_inset Text
26046
26047 \begin_layout Plain Layout
26048 Cannot be scaled, take care there is not too much text
26049 \end_layout
26050
26051 \end_inset
26052 </cell>
26053 </row>
26054 <row>
26055 <cell alignment="center" valignment="top" topline="true" usebox="none">
26056 \begin_inset Text
26057
26058 \begin_layout Plain Layout
26059 Circle
26060 \end_layout
26061
26062 \end_inset
26063 </cell>
26064 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26065 \begin_inset Text
26066
26067 \begin_layout Plain Layout
26068 Circle
26069 \end_layout
26070
26071 \end_inset
26072 </cell>
26073 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26074 \begin_inset Text
26075
26076 \begin_layout Plain Layout
26077 Fragile, calculation might fail
26078 \end_layout
26079
26080 \end_inset
26081 </cell>
26082 </row>
26083 <row>
26084 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26085 \begin_inset Text
26086
26087 \begin_layout Plain Layout
26088 Diamond
26089 \end_layout
26090
26091 \end_inset
26092 </cell>
26093 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26094 \begin_inset Text
26095
26096 \begin_layout Plain Layout
26097 Rhomboid (symbolizing a 
26098 \begin_inset Quotes eld
26099 \end_inset
26100
26101 diamond
26102 \begin_inset Quotes erd
26103 \end_inset
26104
26105 )
26106 \end_layout
26107
26108 \end_inset
26109 </cell>
26110 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26111 \begin_inset Text
26112
26113 \begin_layout Plain Layout
26114 -
26115 \end_layout
26116
26117 \end_inset
26118 </cell>
26119 </row>
26120 <row>
26121 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26122 \begin_inset Text
26123
26124 \begin_layout Plain Layout
26125 Heart
26126 \end_layout
26127
26128 \end_inset
26129 </cell>
26130 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26131 \begin_inset Text
26132
26133 \begin_layout Plain Layout
26134 Heart-like shape
26135 \end_layout
26136
26137 \end_inset
26138 </cell>
26139 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26140 \begin_inset Text
26141
26142 \begin_layout Plain Layout
26143 -
26144 \end_layout
26145
26146 \end_inset
26147 </cell>
26148 </row>
26149 <row>
26150 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26151 \begin_inset Text
26152
26153 \begin_layout Plain Layout
26154 Hexagon
26155 \end_layout
26156
26157 \end_inset
26158 </cell>
26159 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26160 \begin_inset Text
26161
26162 \begin_layout Plain Layout
26163 Hexagon
26164 \end_layout
26165
26166 \end_inset
26167 </cell>
26168 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26169 \begin_inset Text
26170
26171 \begin_layout Plain Layout
26172 -
26173 \end_layout
26174
26175 \end_inset
26176 </cell>
26177 </row>
26178 <row>
26179 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26180 \begin_inset Text
26181
26182 \begin_layout Plain Layout
26183 Nut
26184 \end_layout
26185
26186 \end_inset
26187 </cell>
26188 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26189 \begin_inset Text
26190
26191 \begin_layout Plain Layout
26192 Nut for bolt (hexagon with circular hole)
26193 \end_layout
26194
26195 \end_inset
26196 </cell>
26197 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26198 \begin_inset Text
26199
26200 \begin_layout Plain Layout
26201 -
26202 \end_layout
26203
26204 \end_inset
26205 </cell>
26206 </row>
26207 <row>
26208 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26209 \begin_inset Text
26210
26211 \begin_layout Plain Layout
26212 Square
26213 \end_layout
26214
26215 \end_inset
26216 </cell>
26217 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26218 \begin_inset Text
26219
26220 \begin_layout Plain Layout
26221 Square
26222 \end_layout
26223
26224 \end_inset
26225 </cell>
26226 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26227 \begin_inset Text
26228
26229 \begin_layout Plain Layout
26230 -
26231 \end_layout
26232
26233 \end_inset
26234 </cell>
26235 </row>
26236 <row>
26237 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
26238 \begin_inset Text
26239
26240 \begin_layout Plain Layout
26241 Star
26242 \end_layout
26243
26244 \end_inset
26245 </cell>
26246 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
26247 \begin_inset Text
26248
26249 \begin_layout Plain Layout
26250 Five-point star
26251 \end_layout
26252
26253 \end_inset
26254 </cell>
26255 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
26256 \begin_inset Text
26257
26258 \begin_layout Plain Layout
26259 -
26260 \end_layout
26261
26262 \end_inset
26263 </cell>
26264 </row>
26265 <row>
26266 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26267 \begin_inset Text
26268
26269 \begin_layout Plain Layout
26270 Candle
26271 \end_layout
26272
26273 \end_inset
26274 </cell>
26275 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26276 \begin_inset Text
26277
26278 \begin_layout Plain Layout
26279 Burning candle
26280 \end_layout
26281
26282 \end_inset
26283 </cell>
26284 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26285 \begin_inset Text
26286
26287 \begin_layout Plain Layout
26288 -
26289 \end_layout
26290
26291 \end_inset
26292 </cell>
26293 </row>
26294 <row>
26295 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26296 \begin_inset Text
26297
26298 \begin_layout Plain Layout
26299 Drop down/up
26300 \end_layout
26301
26302 \end_inset
26303 </cell>
26304 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26305 \begin_inset Text
26306
26307 \begin_layout Plain Layout
26308 Normal/reversed rain drop
26309 \end_layout
26310
26311 \end_inset
26312 </cell>
26313 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26314 \begin_inset Text
26315
26316 \begin_layout Plain Layout
26317 Fragile, calculation might fail
26318 \end_layout
26319
26320 \end_inset
26321 </cell>
26322 </row>
26323 <row>
26324 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26325 \begin_inset Text
26326
26327 \begin_layout Plain Layout
26328 \SpecialChar TeX
26329
26330 \end_layout
26331
26332 \end_inset
26333 </cell>
26334 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26335 \begin_inset Text
26336
26337 \begin_layout Plain Layout
26338 The \SpecialChar TeX
26339  logo
26340 \end_layout
26341
26342 \end_inset
26343 </cell>
26344 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26345 \begin_inset Text
26346
26347 \begin_layout Plain Layout
26348 -
26349 \end_layout
26350
26351 \end_inset
26352 </cell>
26353 </row>
26354 <row>
26355 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
26356 \begin_inset Text
26357
26358 \begin_layout Plain Layout
26359 Triangle up/down/
26360 \begin_inset Newline newline
26361 \end_inset
26362
26363 left/right
26364 \end_layout
26365
26366 \end_inset
26367 </cell>
26368 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
26369 \begin_inset Text
26370
26371 \begin_layout Plain Layout
26372 Triangles in different orientations
26373 \end_layout
26374
26375 \end_inset
26376 </cell>
26377 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
26378 \begin_inset Text
26379
26380 \begin_layout Plain Layout
26381 -
26382 \end_layout
26383
26384 \end_inset
26385 </cell>
26386 </row>
26387 </lyxtabular>
26388
26389 \end_inset
26390
26391
26392 \end_layout
26393
26394 \begin_layout Standard
26395 To use a shape for your paragraph, simply select it in \SpecialChar LyX
26396 's pull-down box
26397  for environments in the toolbar.
26398 \end_layout
26399
26400 \begin_layout Standard
26401 \begin_inset Newpage newpage
26402 \end_inset
26403
26404
26405 \end_layout
26406
26407 \begin_layout Standard
26408 Here is an example paragraph in the shape of a nut:
26409 \end_layout
26410
26411 \begin_layout Standard
26412 \begin_inset VSpace bigskip
26413 \end_inset
26414
26415
26416 \end_layout
26417
26418 \begin_layout Nut
26419
26420 \lang latin
26421 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26422  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26423  voluptua.
26424  At vero eos et accusam et justo duo dolores et ea rebum.
26425  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26426  sit amet.
26427  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26428  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26429  voluptua.
26430 \end_layout
26431
26432 \begin_layout Standard
26433 \begin_inset VSpace bigskip
26434 \end_inset
26435
26436
26437 \end_layout
26438
26439 \begin_layout Standard
26440 \begin_inset Note Greyedout
26441 status open
26442
26443 \begin_layout Plain Layout
26444
26445 \series bold
26446 Note
26447 \series default
26448 : shapepar paragraphs cannot run over a page break.
26449 \end_layout
26450
26451 \end_inset
26452
26453
26454 \end_layout
26455
26456 \begin_layout Standard
26457 \begin_inset VSpace bigskip
26458 \end_inset
26459
26460
26461 \end_layout
26462
26463 \begin_layout Standard
26464
26465 \series bold
26466 shapepar
26467 \series default
26468  takes care that the shape will always be preserved, no matter how much
26469  text is in the paragraph.
26470  Therefore the paragraph size changes with the amount of contained text.
26471  This can lead to paragraph sizes exceeding the page margins.
26472  To demonstrate the size scaling, here is the same example paragraph but
26473  with twice as much text:
26474 \end_layout
26475
26476 \begin_layout Standard
26477 \begin_inset Newpage newpage
26478 \end_inset
26479
26480
26481 \end_layout
26482
26483 \begin_layout Nut
26484
26485 \lang latin
26486 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26487  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26488  voluptua.
26489  At vero eos et accusam et justo duo dolores et ea rebum.
26490  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26491  sit amet.
26492  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26493  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26494  voluptua.
26495  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26496  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26497  voluptua.
26498  At vero eos et accusam et justo duo dolores et ea rebum.
26499  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26500  sit amet.
26501  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26502  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26503  voluptua.
26504 \end_layout
26505
26506 \begin_layout Standard
26507 \begin_inset VSpace bigskip
26508 \end_inset
26509
26510
26511 \end_layout
26512
26513 \begin_layout Standard
26514 An exception is the shape 
26515 \family sans
26516 CDlabel
26517 \family default
26518 .
26519  It cannot be scaled because it must fit the size of a CD/DVD.
26520  Therefore the amount of text that fits into the shape is limited.
26521 \begin_inset Newline newline
26522 \end_inset
26523
26524 The 
26525 \family sans
26526 drop
26527 \family default
26528  shapes and the 
26529 \family sans
26530 circle
26531 \family default
26532  shape are fragile, meaning that the calculation of their size can fail,
26533  depending on the amount of text.
26534  You will then get the \SpecialChar LaTeX
26535  error 
26536 \begin_inset Quotes eld
26537 \end_inset
26538
26539 Arithmetic overflow
26540 \begin_inset Quotes erd
26541 \end_inset
26542
26543 .
26544  In this case one can try to remove or add some text; if nothing works one
26545  has to use another shape.
26546 \end_layout
26547
26548 \begin_layout Standard
26549 \begin_inset VSpace bigskip
26550 \end_inset
26551
26552
26553 \end_layout
26554
26555 \begin_layout Standard
26556 For shapes with tips you will maybe see that \SpecialChar LaTeX
26557 's hyphenation routine fails
26558  for text in the tips.
26559  Therefore it is often necessary to add hyphenation points 
26560 \family sans
26561 (
26562 \begin_inset Info
26563 type  "shortcut"
26564 arg   "specialchar-insert hyphenation"
26565 \end_inset
26566
26567
26568 \family default
26569 ) to the corresponding text parts.
26570 \end_layout
26571
26572 \begin_layout Standard
26573 \begin_inset VSpace bigskip
26574 \end_inset
26575
26576
26577 \end_layout
26578
26579 \begin_layout Standard
26580 Shapepar paragraphs are either always centered or placed on the page so
26581  that their left border touches the left page margin.
26582  You can therefore not use the paragraph dialog to align such paragraphs.
26583  A solution is to put the paragraph into a minipage or parbox and align
26584  the box.
26585  The problem is hereby to find the right width for the box.
26586  Because if it is too wide and you center the box, the paragraph is not
26587  centered too because it sticks at the left side of the box.
26588  So you might have to play a bit with the width until it fits.
26589  Here are two heart-shaped paragraphs, the first one is not aligned, the
26590  second one is right-aligned:
26591 \end_layout
26592
26593 \begin_layout Standard
26594 \begin_inset Newpage newpage
26595 \end_inset
26596
26597
26598 \end_layout
26599
26600 \begin_layout Heart
26601 \noindent
26602
26603 \lang latin
26604 Lo\SpecialChar softhyphen
26605 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26606  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26607  voluptua.
26608  At vero eos et accusam et justo duo dolores et ea rebum.
26609  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26610  sit amet.
26611 \end_layout
26612
26613 \begin_layout Standard
26614 \begin_inset VSpace bigskip
26615 \end_inset
26616
26617
26618 \end_layout
26619
26620 \begin_layout Standard
26621 \noindent
26622 \align right
26623 \begin_inset Box Frameless
26624 position "t"
26625 hor_pos "c"
26626 has_inner_box 1
26627 inner_pos "t"
26628 use_parbox 1
26629 use_makebox 0
26630 width "42col%"
26631 special "none"
26632 height "1in"
26633 height_special "totalheight"
26634 thickness "0.4pt"
26635 separation "3pt"
26636 shadowsize "4pt"
26637 framecolor "black"
26638 backgroundcolor "none"
26639 status open
26640
26641 \begin_layout Heart
26642 \noindent
26643
26644 \lang latin
26645 Lo\SpecialChar softhyphen
26646 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26647  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26648  voluptua.
26649  At vero eos et accusam et justo duo dolores et ea rebum.
26650  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26651  sit amet.
26652 \end_layout
26653
26654 \end_inset
26655
26656
26657 \end_layout
26658
26659 \begin_layout Subsection
26660 Custom shapes
26661 \end_layout
26662
26663 \begin_layout Standard
26664 You can define any shape you want.
26665  Doing this manually is a lot of work because every coordinate must be specified.
26666  But there is a way to let the computer calculate the coordinates:
26667 \end_layout
26668
26669 \begin_layout Enumerate
26670 Install the program 
26671 \begin_inset CommandInset href
26672 LatexCommand href
26673 name "Jpgfdraw"
26674 target "http://www.ctan.org/tex-archive/graphics/jpgfdraw"
26675 literal "false"
26676
26677 \end_inset
26678
26679 .
26680 \end_layout
26681
26682 \begin_layout Enumerate
26683 In 
26684 \family sans
26685 Jpgfdraw
26686 \family default
26687  go to the menu 
26688 \family sans
26689 TeX/LaTeX\SpecialChar menuseparator
26690 Settings\SpecialChar menuseparator
26691 Set Normal Size
26692 \family default
26693  and select the font size you are using in your document.
26694  For example this document uses the size 12
26695 \begin_inset space \thinspace{}
26696 \end_inset
26697
26698 pt.
26699 \end_layout
26700
26701 \begin_layout Enumerate
26702 Draw a shape.
26703 \end_layout
26704
26705 \begin_layout Enumerate
26706 Use the menu 
26707 \family sans
26708 TeX/LaTeX\SpecialChar menuseparator
26709 Shapepar
26710 \family default
26711  to export the shape to coordinates.
26712  In the appearing dialog use either the outline of your shape for the coordinate
26713 s or the path itself.
26714 \begin_inset Foot
26715 status collapsed
26716
26717 \begin_layout Plain Layout
26718 For more information see 
26719 \begin_inset CommandInset href
26720 LatexCommand href
26721 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
26722 literal "false"
26723
26724 \end_inset
26725
26726
26727 \end_layout
26728
26729 \end_inset
26730
26731
26732 \end_layout
26733
26734 \begin_layout Standard
26735 The coordinates are written into a \SpecialChar TeX
26736  file.
26737  To use it for your \SpecialChar LyX
26738  document
26739 \end_layout
26740
26741 \begin_layout Enumerate
26742 Place the cursor before the first character of your paragraph (or into a
26743  new empty one).
26744 \end_layout
26745
26746 \begin_layout Enumerate
26747 Open in \SpecialChar LyX
26748  the menu 
26749 \family sans
26750 Insert\SpecialChar menuseparator
26751 File\SpecialChar menuseparator
26752 Child
26753 \begin_inset space ~
26754 \end_inset
26755
26756 Document
26757 \family default
26758 , select the file and use 
26759 \family sans
26760 Input
26761 \family default
26762  as 
26763 \family sans
26764 Include Type.
26765 \end_layout
26766
26767 \begin_layout Standard
26768 \begin_inset VSpace defskip
26769 \end_inset
26770
26771
26772 \end_layout
26773
26774 \begin_layout Standard
26775 \begin_inset Note Greyedout
26776 status open
26777
26778 \begin_layout Plain Layout
26779
26780 \series bold
26781 Note
26782 \series default
26783 : The changed shape only applies to the current paragraph; everything is
26784  reset to normal for the next paragraph.
26785  Therefore the shape definition file must be input into every paragraph
26786  with the desired shape.
26787 \end_layout
26788
26789 \end_inset
26790
26791
26792 \end_layout
26793
26794 \begin_layout Standard
26795 \begin_inset VSpace bigskip
26796 \end_inset
26797
26798
26799 \end_layout
26800
26801 \begin_layout Standard
26802 Here is an example:
26803 \end_layout
26804
26805 \begin_layout Standard
26806 \begin_inset VSpace bigskip
26807 \end_inset
26808
26809
26810 \end_layout
26811
26812 \begin_layout Standard
26813 \begin_inset CommandInset include
26814 LatexCommand input
26815 filename "SpecialParagraphShape.tex"
26816
26817 \end_inset
26818
26819
26820 \lang latin
26821 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26822  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26823  voluptua.
26824  At vero eos et accusam et justo duo dolores et ea rebum.
26825  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26826  sit amet.
26827  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26828  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26829  voluptua.
26830 \end_layout
26831
26832 \begin_layout Standard
26833 \begin_inset VSpace bigskip
26834 \end_inset
26835
26836
26837 \end_layout
26838
26839 \begin_layout Standard
26840
26841 \series bold
26842 A tip:
26843 \series default
26844  to draw complexer shapes in 
26845 \family sans
26846 Jpgfdraw
26847 \family default
26848  you can draw the shape in a program of your choice and import the resulting
26849  image to 
26850 \family sans
26851 Jpgfdraw
26852 \family default
26853 .
26854  Then you only need to draw a line or spline along the outline of the image.
26855 \end_layout
26856
26857 \begin_layout Standard
26858 \begin_inset VSpace bigskip
26859 \end_inset
26860
26861
26862 \end_layout
26863
26864 \begin_layout Standard
26865 The module 
26866 \family sans
26867 Custom paragraph shapes
26868 \family default
26869  also provides the two commands 
26870 \family sans
26871 shapepar
26872 \family default
26873  and 
26874 \family sans
26875 Shapepar
26876 \family default
26877  which can be used to define custom shapes coordinate by coordinate.
26878 \begin_inset Foot
26879 status collapsed
26880
26881 \begin_layout Plain Layout
26882 These commands are internally used for all shapes described here.
26883 \end_layout
26884
26885 \end_inset
26886
26887  For information how these styles are used and about further customization
26888  possibilities, have a look at the documentation of the package 
26889 \series bold
26890 shapepar
26891 \series default
26892
26893 \begin_inset CommandInset citation
26894 LatexCommand cite
26895 key "shapepar"
26896 literal "true"
26897
26898 \end_inset
26899
26900 .
26901 \end_layout
26902
26903 \begin_layout Bibliography
26904 \begin_inset CommandInset bibitem
26905 LatexCommand bibitem
26906 key "multicol"
26907 literal "true"
26908
26909 \end_inset
26910
26911 Documentation of the \SpecialChar LaTeX
26912 -package 
26913 \begin_inset CommandInset href
26914 LatexCommand href
26915 name "multicol"
26916 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
26917 literal "false"
26918
26919 \end_inset
26920
26921
26922 \end_layout
26923
26924 \begin_layout Bibliography
26925 \begin_inset CommandInset bibitem
26926 LatexCommand bibitem
26927 key "shapepar"
26928 literal "true"
26929
26930 \end_inset
26931
26932 Documentation of the \SpecialChar LaTeX
26933 -package 
26934 \begin_inset CommandInset href
26935 LatexCommand href
26936 name "shapepar"
26937 target "http://mirrors.ctan.org/macros/latex/contrib/shapepar/shapepar.pdf"
26938 literal "false"
26939
26940 \end_inset
26941
26942
26943 \end_layout
26944
26945 \end_body
26946 \end_document