]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
Add some notes on forward/reverse search with evince.
[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:%1 %2> 
7491 \backslash
7492
7493 \backslash
7494 .
7495 \backslash
7496 pipe
7497 \backslash
7498 lyxpipe.in
7499 \begin_inset Newline newline
7500 \end_inset
7501
7502 type 
7503 \backslash
7504
7505 \backslash
7506 .
7507 \backslash
7508 pipe
7509 \backslash
7510 lyxpipe.out
7511 \end_layout
7512
7513 \begin_layout Standard
7514 Make sure that the \SpecialChar LyX
7515 Server pipe path you specified in \SpecialChar LyX
7516  is 
7517 \begin_inset Flex Code
7518 status collapsed
7519
7520 \begin_layout Plain Layout
7521
7522 \backslash
7523
7524 \backslash
7525 .
7526 \backslash
7527 pipe
7528 \backslash
7529 lyxpipe
7530 \end_layout
7531
7532 \end_inset
7533
7534 , otherwise change the 
7535 \begin_inset Flex Code
7536 status collapsed
7537
7538 \begin_layout Plain Layout
7539 lyxeditor.bat
7540 \end_layout
7541
7542 \end_inset
7543
7544  wrapper accordingly.
7545 \end_layout
7546
7547 \begin_layout Standard
7548 In yap, reverse search is triggered by double-click.
7549 \end_layout
7550
7551 \begin_layout Subsubsection*
7552 SumatraPDF (Windows)
7553 \end_layout
7554
7555 \begin_layout Standard
7556 In order to use SumatraPDF for inverse search, enter 
7557 \begin_inset Flex Code
7558 status collapsed
7559
7560 \begin_layout Plain Layout
7561 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
7562 \end_layout
7563
7564 \end_inset
7565
7566  in the viewer setting in 
7567 \begin_inset Flex Noun
7568 status collapsed
7569
7570 \begin_layout Plain Layout
7571 Preferences\SpecialChar menuseparator
7572 File Handling\SpecialChar menuseparator
7573 File formats\SpecialChar menuseparator
7574 PDF (pdflatex)
7575 \end_layout
7576
7577 \end_inset
7578
7579 , where 
7580 \begin_inset Flex Code
7581 status collapsed
7582
7583 \begin_layout Plain Layout
7584 lyxeditor.bat
7585 \end_layout
7586
7587 \end_inset
7588
7589  is the previous wrapper.
7590  If SumatraPDF.exe is not in your command PATH, use its full file name.
7591 \end_layout
7592
7593 \begin_layout Standard
7594 Reverse search is triggered by double-click.
7595 \end_layout
7596
7597 \begin_layout Subsubsection*
7598 YAP (Cygwin)
7599 \end_layout
7600
7601 \begin_layout Standard
7602 First of all, make sure that yap is your default DVI viewer in the Windows
7603  environment, then launch it, choose its 
7604 \begin_inset Flex Noun
7605 status collapsed
7606
7607 \begin_layout Plain Layout
7608 View\SpecialChar menuseparator
7609 Options
7610 \end_layout
7611
7612 \end_inset
7613
7614  menu and select the 
7615 \begin_inset Quotes eld
7616 \end_inset
7617
7618 Inverse DVI Search
7619 \begin_inset Quotes erd
7620 \end_inset
7621
7622  tab.
7623  Click on the 
7624 \begin_inset Quotes eld
7625 \end_inset
7626
7627 New\SpecialChar ldots
7628
7629 \begin_inset Quotes erd
7630 \end_inset
7631
7632  button and, in the window that opens, enter 
7633 \begin_inset Quotes eld
7634 \end_inset
7635
7636 \SpecialChar LyX
7637  Editor
7638 \begin_inset Quotes erd
7639 \end_inset
7640
7641  (or any other name you like) in the 
7642 \begin_inset Quotes eld
7643 \end_inset
7644
7645 Name:
7646 \begin_inset Quotes erd
7647 \end_inset
7648
7649  field.
7650  Now click on the button labeled 
7651 \begin_inset Quotes eld
7652 \end_inset
7653
7654 \SpecialChar ldots
7655
7656 \begin_inset Quotes erd
7657 \end_inset
7658
7659  to open a file dialog and navigate to the directory containing the 
7660 \begin_inset Flex Code
7661 status collapsed
7662
7663 \begin_layout Plain Layout
7664 lyxeditor.exe
7665 \end_layout
7666
7667 \end_inset
7668
7669  program (which is installed by default on Cygwin along with the \SpecialChar LyX
7670  executable).
7671  Select 
7672 \begin_inset Flex Code
7673 status collapsed
7674
7675 \begin_layout Plain Layout
7676 lyxeditor.exe
7677 \end_layout
7678
7679 \end_inset
7680
7681  and then specify the program arguments as 
7682 \begin_inset Flex Code
7683 status collapsed
7684
7685 \begin_layout Plain Layout
7686 -g %f %l
7687 \end_layout
7688
7689 \end_inset
7690
7691 .
7692  In this way, you will be using the 
7693 \emph on
7694 lyxsocket
7695 \emph default
7696  for communicating with \SpecialChar LyX
7697 .
7698  If, for whatever reason, you want to use the 
7699 \emph on
7700 lyxpipe
7701 \emph default
7702 , omit the 
7703 \begin_inset Flex Code
7704 status collapsed
7705
7706 \begin_layout Plain Layout
7707 -g
7708 \end_layout
7709
7710 \end_inset
7711
7712  option and be sure to specify the \SpecialChar LyX
7713 Server pipe path in the \SpecialChar LyX
7714  preferences.
7715 \end_layout
7716
7717 \begin_layout Standard
7718 In yap, reverse search is triggered by double-click.
7719 \end_layout
7720
7721 \begin_layout Subsubsection*
7722 SumatraPDF (Cygwin)
7723 \end_layout
7724
7725 \begin_layout Standard
7726 In order to use SumatraPDF for inverse search, enter 
7727 \begin_inset Flex Code
7728 status collapsed
7729
7730 \begin_layout Plain Layout
7731 SumatraPDF -inverse-search "lyxeditor -g %f %l"
7732 \end_layout
7733
7734 \end_inset
7735
7736  in the viewer setting in 
7737 \begin_inset Flex Noun
7738 status collapsed
7739
7740 \begin_layout Plain Layout
7741 Preferences\SpecialChar menuseparator
7742 File Handling\SpecialChar menuseparator
7743 File formats\SpecialChar menuseparator
7744 PDF (pdflatex)
7745 \end_layout
7746
7747 \end_inset
7748
7749 .
7750  If SumatraPDF.exe is not in your command PATH, use its full posix path.
7751  The 
7752 \begin_inset Flex Code
7753 status collapsed
7754
7755 \begin_layout Plain Layout
7756 -g
7757 \end_layout
7758
7759 \end_inset
7760
7761  enables communication via the 
7762 \emph on
7763 lyxsocket
7764 \emph default
7765 .
7766  Again, omit the 
7767 \begin_inset Flex Code
7768 status collapsed
7769
7770 \begin_layout Plain Layout
7771 -g
7772 \end_layout
7773
7774 \end_inset
7775
7776  option if you want to use the 
7777 \emph on
7778 lyxpipe
7779 \emph default
7780 , and be sure to specify the \SpecialChar LyX
7781 Server pipe path in the \SpecialChar LyX
7782  preferences.
7783 \end_layout
7784
7785 \begin_layout Standard
7786 Reverse search is triggered by double-click.
7787 \end_layout
7788
7789 \begin_layout Section
7790 Forward search
7791 \end_layout
7792
7793 \begin_layout Standard
7794 Forward search is, as the name implies, in a sense the 
7795 \begin_inset Quotes eld
7796 \end_inset
7797
7798 opposite
7799 \begin_inset Quotes erd
7800 \end_inset
7801
7802  of reverse search.
7803  It allows you to let the viewer jump to a given position from within \SpecialChar LyX
7804 .
7805  If forward search is set up (as described in what follows), you can put
7806  the cursor anywhere in your \SpecialChar LyX
7807  document, and hit 
7808 \begin_inset Flex Noun
7809 status collapsed
7810
7811 \begin_layout Plain Layout
7812 Navigate\SpecialChar menuseparator
7813 Forward search
7814 \end_layout
7815
7816 \end_inset
7817
7818  (or select 
7819 \begin_inset Flex Noun
7820 status collapsed
7821
7822 \begin_layout Plain Layout
7823 Forward search
7824 \end_layout
7825
7826 \end_inset
7827
7828  in the context menu via right mouse click), and then the viewer will jump
7829  to that position as well.
7830  This implies, of course, that your viewer supports this function.
7831 \end_layout
7832
7833 \begin_layout Standard
7834 To make forward search possible, you first need to provide the generated
7835  output PDF/DVI file with additional information about the \SpecialChar TeX
7836  sources.
7837  This can be done via the methods described in the section 
7838 \begin_inset CommandInset ref
7839 LatexCommand ref
7840 reference "subsec:rev-search"
7841
7842 \end_inset
7843
7844 .
7845 \end_layout
7846
7847 \begin_layout Standard
7848 Additionally, you need to configure \SpecialChar LyX
7849  for using your viewers in 
7850 \begin_inset Flex Noun
7851 status collapsed
7852
7853 \begin_layout Plain Layout
7854 Tools\SpecialChar menuseparator
7855 Preferences\SpecialChar menuseparator
7856 Output\SpecialChar menuseparator
7857 General
7858 \end_layout
7859
7860 \end_inset
7861
7862 .
7863  We provide a range of tested configurations for some viewers, which you
7864  can select from the drop down list.
7865  If none of these configurations suits you, you have to find out and enter
7866  a suitable configuration yourself.
7867  The definition syntax uses the following placeholders:
7868 \end_layout
7869
7870 \begin_layout Itemize
7871 \noindent
7872 \begin_inset Flex Code
7873 status collapsed
7874
7875 \begin_layout Plain Layout
7876 $$n
7877 \end_layout
7878
7879 \end_inset
7880
7881 : row number
7882 \end_layout
7883
7884 \begin_layout Itemize
7885 \noindent
7886 \begin_inset Flex Code
7887 status collapsed
7888
7889 \begin_layout Plain Layout
7890 $$t
7891 \end_layout
7892
7893 \end_inset
7894
7895 : name of the (temporary) exported .tex file (without path)
7896 \end_layout
7897
7898 \begin_layout Itemize
7899 \noindent
7900 \begin_inset Flex Code
7901 status collapsed
7902
7903 \begin_layout Plain Layout
7904 $$f
7905 \end_layout
7906
7907 \end_inset
7908
7909 : name of the (temporary) exported .tex file (including path)
7910 \end_layout
7911
7912 \begin_layout Itemize
7913 \noindent
7914 \begin_inset Flex Code
7915 status collapsed
7916
7917 \begin_layout Plain Layout
7918 $$o
7919 \end_layout
7920
7921 \end_inset
7922
7923 : name of the exported output file (either dvi or pdf, depending on which
7924  one exists in the temporary directory)
7925 \end_layout
7926
7927 \begin_layout Standard
7928 Note that only some of the viewers provide full 
7929 \change_inserted -712698321 1500279079
7930 and usable 
7931 \change_unchanged
7932 forward search functionality
7933 \change_inserted -712698321 1500278927
7934  out of the box
7935 \change_unchanged
7936 , among them yap, xdvi, okular
7937 \begin_inset Foot
7938 status collapsed
7939
7940 \begin_layout Plain Layout
7941 You might want to set 
7942 \begin_inset Flex Code
7943 status collapsed
7944
7945 \begin_layout Plain Layout
7946 okular –unique
7947 \end_layout
7948
7949 \end_inset
7950
7951  in 
7952 \begin_inset Flex Noun
7953 status collapsed
7954
7955 \begin_layout Plain Layout
7956 Tools\SpecialChar menuseparator
7957 Preferences\SpecialChar menuseparator
7958 File Handling\SpecialChar menuseparator
7959 File
7960 \begin_inset space ~
7961 \end_inset
7962
7963 Formats
7964 \end_layout
7965
7966 \end_inset
7967
7968
7969 \end_layout
7970
7971 \end_inset
7972
7973 , qpdfview
7974 \change_inserted -712698321 1500278795
7975 ,
7976 \change_unchanged
7977  and SumatraPDF
7978 \begin_inset Foot
7979 status collapsed
7980
7981 \begin_layout Plain Layout
7982 SumatraPDF can also use DDE commands through the external program CMCDDE
7983  — downloadable from 
7984 \begin_inset CommandInset href
7985 LatexCommand href
7986 target "http://www.istri.fr/spip/zip/CMCDDE.zip"
7987 literal "false"
7988
7989 \end_inset
7990
7991
7992 \end_layout
7993
7994 \end_inset
7995
7996 .
7997  
7998 \change_inserted -712698321 1500279294
7999 Others, such as evince
8000 \begin_inset Foot
8001 status collapsed
8002
8003 \begin_layout Plain Layout
8004 \paragraph_spacing single
8005
8006 \change_inserted -712698321 1500278873
8007 Forward search with evince can be achieved by means of third party helper
8008  scripts.
8009  Please refer to 
8010 \begin_inset CommandInset href
8011 LatexCommand href
8012 target "http://wiki.lyx.org/LyX/SyncTeX"
8013 literal "false"
8014
8015 \end_inset
8016
8017  for details.
8018 \change_unchanged
8019
8020 \end_layout
8021
8022 \end_inset
8023
8024 , require some extra tools in order to use forward search.
8025  
8026 \change_unchanged
8027 While many of the widespread PDF viewers (most notably Adobe Reader) do
8028  not support forward search at all, some other viewers – e.
8029 \begin_inset space \thinspace{}
8030 \end_inset
8031
8032 g.
8033  
8034 \change_deleted -712698321 1500278769
8035 evince and
8036 \change_unchanged
8037  xpdf – allow at least to reload the document and jump to a specific page
8038  of the file, so you can at least navigate 
8039 \begin_inset Quotes eld
8040 \end_inset
8041
8042 near
8043 \begin_inset Quotes erd
8044 \end_inset
8045
8046 .
8047  This latter functionality is provided by an external call of synctex (see
8048  the predefined example configurations).
8049  
8050 \end_layout
8051
8052 \begin_layout Standard
8053 Forward search works both with DVI and PDF output.
8054  \SpecialChar LyX
8055  simply checks which preview format you have used before (i.
8056 \begin_inset space \thinspace{}
8057 \end_inset
8058
8059 e., which format is already there in the temporary directory) and chooses
8060  the appropriate configuration for the respective format.
8061 \end_layout
8062
8063 \begin_layout Chapter
8064 Special Document Classes
8065 \end_layout
8066
8067 \begin_layout Section
8068 A&A Paper
8069 \end_layout
8070
8071 \begin_layout Standard
8072 by 
8073 \noun on
8074 Peter Sütterlin
8075 \end_layout
8076
8077 \begin_layout Subsection
8078 Introduction
8079 \end_layout
8080
8081 \begin_layout Standard
8082 This section describes how \SpecialChar LyX
8083  can be used to write articles for submission
8084  to the scientific journal 
8085 \emph on
8086 Astronomy and Astrophysics
8087 \emph default
8088  (
8089 \begin_inset Flex URL
8090 status collapsed
8091
8092 \begin_layout Plain Layout
8093
8094 http://www.edpsciences.fr/aa/
8095 \end_layout
8096
8097 \end_inset
8098
8099 ) using Version 5.01 of the document class 
8100 \family typewriter
8101 aa.cls
8102 \family default
8103 .
8104  This package can be downloaded from the ftp site
8105 \end_layout
8106
8107 \begin_layout Standard
8108 \begin_inset VSpace medskip
8109 \end_inset
8110
8111
8112 \end_layout
8113
8114 \begin_layout Standard
8115 \align center
8116 \begin_inset Flex URL
8117 status collapsed
8118
8119 \begin_layout Plain Layout
8120
8121 ftp://ftp.edpsciences.org/pub/aa/readme.html
8122 \end_layout
8123
8124 \end_inset
8125
8126
8127 \end_layout
8128
8129 \begin_layout Standard
8130 \begin_inset VSpace medskip
8131 \end_inset
8132
8133
8134 \end_layout
8135
8136 \begin_layout Standard
8137 A manual comes together with that package, and this text is not meant to
8138  replace the original manual but is merely a short guide in how to realize
8139  the correct form of your paper.
8140  
8141 \end_layout
8142
8143 \begin_layout Standard
8144 Please note that the publisher of the journal was changed from Springer
8145  to EDP Sciences starting January 1, 2001.
8146  That change involved also some slight changes to the style files, namely
8147  the removal of the thesaurus command.
8148  The \SpecialChar LyX
8149  class aa supports the newest version of these style files, V 5.01.
8150  If you have an older version installed, please upgrade.
8151  For compatibility, the old (version 4) layout has been kept as 
8152 \family sans
8153 article (A&A V4)
8154 \family default
8155 .
8156  Please refer to the comments in 
8157 \family typewriter
8158 \SpecialChar LyX
8159 Dir/layouts/aapaper.layout
8160 \family default
8161 .
8162 \end_layout
8163
8164 \begin_layout Subsection
8165 Getting started
8166 \end_layout
8167
8168 \begin_layout Standard
8169 It is recommended you start from the example template distributed with \SpecialChar LyX
8170 .
8171  If you are not using a template, note the following settings:
8172 \end_layout
8173
8174 \begin_layout Itemize
8175 Select 
8176 \family sans
8177 article (A&A)
8178 \family default
8179  in the 
8180 \family sans
8181 Document\SpecialChar menuseparator
8182 Settings
8183 \family default
8184  dialog (OK, that one was obvious).
8185 \end_layout
8186
8187 \begin_layout Itemize
8188 Don't change the option 
8189 \family sans
8190 Page
8191 \begin_inset space ~
8192 \end_inset
8193
8194 style
8195 \family default
8196 : Leave it set to 
8197 \family sans
8198 default
8199 \family default
8200 .
8201  The whole layout is done by the macros, you shouldn't change anything.
8202 \end_layout
8203
8204 \begin_layout Subsection
8205 The header block
8206 \end_layout
8207
8208 \begin_layout Standard
8209 First thing to enter is the header information.
8210  It consists of seven entries, of which some are optional.
8211  They are
8212 \end_layout
8213
8214 \begin_layout Itemize
8215
8216 \family sans
8217 Title
8218 \family default
8219 : [required] 
8220 \end_layout
8221
8222 \begin_layout Itemize
8223
8224 \family sans
8225 Subtitle
8226 \family default
8227 : [optional] 
8228 \end_layout
8229
8230 \begin_layout Itemize
8231
8232 \family sans
8233 Author
8234 \family default
8235 : [required]
8236 \end_layout
8237
8238 \begin_layout Itemize
8239
8240 \family sans
8241 Address
8242 \family default
8243 : [required]
8244 \end_layout
8245
8246 \begin_layout Itemize
8247
8248 \family sans
8249 Offprints
8250 \family default
8251 : [optional] if more than one author: whom to contact for offprint requests.
8252 \end_layout
8253
8254 \begin_layout Itemize
8255
8256 \family sans
8257 Mail
8258 \family default
8259 : [optional] mail address for contacts.
8260 \end_layout
8261
8262 \begin_layout Itemize
8263
8264 \family sans
8265 Date
8266 \family default
8267 : [required].
8268  Suggested format is 
8269 \family typewriter
8270 Received: <date>; Accepted <date> 
8271 \end_layout
8272
8273 \begin_layout Standard
8274 There is no need to issue the 
8275 \family typewriter
8276
8277 \backslash
8278 maketitle
8279 \family default
8280  command, this is done automatically by \SpecialChar LyX
8281  when the header is finished.
8282  Although the order of the single header entries doesn't matter it is advised
8283  to keep the above sequence, just to get the best optics and meets the layout
8284  of the real document.
8285 \end_layout
8286
8287 \begin_layout Standard
8288 If you want to place footnotes in the header block, e.
8289 \begin_inset space \thinspace{}
8290 \end_inset
8291
8292 g.
8293 \begin_inset space \space{}
8294 \end_inset
8295
8296 to state your present address, just use the standard footnote via the menu
8297  
8298 \family sans
8299 Insert\SpecialChar menuseparator
8300 Footnote.
8301
8302 \family default
8303  \SpecialChar LyX
8304  will automagically use the term 
8305 \family typewriter
8306
8307 \backslash
8308 thanks{}
8309 \family default
8310  in that case.
8311 \end_layout
8312
8313 \begin_layout Standard
8314 In addition to these topics, the macros use three additional \SpecialChar LaTeX
8315  commands that
8316  have no counterpart in \SpecialChar LyX
8317 :
8318 \end_layout
8319
8320 \begin_layout Itemize
8321
8322 \family typewriter
8323
8324 \backslash
8325 and
8326 \family default
8327  to separate different names for more than one author and institute, respectivel
8328 y.
8329 \end_layout
8330
8331 \begin_layout Itemize
8332
8333 \family typewriter
8334
8335 \backslash
8336 inst{<nr>}
8337 \family default
8338 to mark corresponding author/institute pairs.
8339  The institutes are numbered sequentially as they appear in the 
8340 \family sans
8341 Address
8342 \family default
8343  field, so you have to put a marker to each author.
8344 \end_layout
8345
8346 \begin_layout Itemize
8347
8348 \family typewriter
8349
8350 \backslash
8351 email{address}
8352 \family default
8353  to supply an email address for fast contact.
8354 \end_layout
8355
8356 \begin_layout Standard
8357 In all cases, the appropriate command has to be entered in \SpecialChar LyX
8358  and marked as
8359  \SpecialChar LaTeX
8360  code.
8361  See the examples.
8362  
8363 \end_layout
8364
8365 \begin_layout Subsection
8366 The abstract
8367 \end_layout
8368
8369 \begin_layout Standard
8370 The abstract should immediately follow the header block.
8371  With version 5 the abstract environment was changed to a command, and there
8372  is now a resctriction to only one paragraph.
8373  In addition, it should contain an entry with the keywords.
8374  This is not yet implemented for \SpecialChar LyX
8375 , therefore you have to enter the \SpecialChar LaTeX
8376  command
8377  
8378 \family typewriter
8379
8380 \backslash
8381 keywords{}
8382 \family default
8383  by hand and mark it as \SpecialChar LaTeX
8384  code.
8385  Refer to the example paper.
8386 \end_layout
8387
8388 \begin_layout Subsection
8389 Supported environments
8390 \end_layout
8391
8392 \begin_layout Standard
8393 The A&A paper layout supports the following environments for structuring
8394  your text:
8395 \end_layout
8396
8397 \begin_layout Itemize
8398
8399 \family sans
8400 Standard
8401 \end_layout
8402
8403 \begin_layout Itemize
8404
8405 \family sans
8406 Section
8407 \end_layout
8408
8409 \begin_layout Itemize
8410
8411 \family sans
8412 Subsection
8413 \end_layout
8414
8415 \begin_layout Itemize
8416
8417 \family sans
8418 Subsubsection
8419 \end_layout
8420
8421 \begin_layout Itemize
8422
8423 \family sans
8424 Itemize
8425 \end_layout
8426
8427 \begin_layout Itemize
8428
8429 \family sans
8430 Enumerate
8431 \end_layout
8432
8433 \begin_layout Itemize
8434
8435 \family sans
8436 Description
8437 \end_layout
8438
8439 \begin_layout Itemize
8440
8441 \family sans
8442 Caption
8443 \end_layout
8444
8445 \begin_layout Itemize
8446
8447 \family sans
8448 Abstract
8449 \end_layout
8450
8451 \begin_layout Itemize
8452
8453 \family sans
8454 Acknowledgment
8455 \end_layout
8456
8457 \begin_layout Itemize
8458
8459 \family sans
8460 Bibliography
8461 \end_layout
8462
8463 \begin_layout Itemize
8464
8465 \family sans
8466 \SpecialChar LaTeX
8467
8468 \end_layout
8469
8470 \begin_layout Subsection
8471 Commands not supported by \SpecialChar LyX
8472
8473 \end_layout
8474
8475 \begin_layout Standard
8476 Some commands are not yet supported by the 
8477 \family sans
8478 paper (A&A)
8479 \family default
8480  layout for \SpecialChar LyX
8481 .
8482  Some have already been mentioned.
8483  For the sake of completeness, they are listed all together here:
8484 \end_layout
8485
8486 \begin_layout Itemize
8487
8488 \family typewriter
8489
8490 \backslash
8491 and
8492 \end_layout
8493
8494 \begin_layout Itemize
8495
8496 \family typewriter
8497
8498 \backslash
8499 email
8500 \end_layout
8501
8502 \begin_layout Itemize
8503
8504 \family typewriter
8505
8506 \backslash
8507 appendix
8508 \end_layout
8509
8510 \begin_layout Itemize
8511
8512 \family typewriter
8513
8514 \backslash
8515 authorrunning
8516 \end_layout
8517
8518 \begin_layout Itemize
8519
8520 \family typewriter
8521
8522 \backslash
8523 inst{}
8524 \end_layout
8525
8526 \begin_layout Itemize
8527
8528 \family typewriter
8529
8530 \backslash
8531 keywords{}
8532 \end_layout
8533
8534 \begin_layout Itemize
8535
8536 \family typewriter
8537
8538 \backslash
8539 object{}
8540 \end_layout
8541
8542 \begin_layout Itemize
8543
8544 \family typewriter
8545
8546 \backslash
8547 titlerunning{}
8548 \end_layout
8549
8550 \begin_layout Standard
8551 If you want to use any of these commands, you have to enter them yourself.
8552  
8553 \series bold
8554 Do not forget to mark them as \SpecialChar LaTeX
8555  code!
8556 \end_layout
8557
8558 \begin_layout Subsection
8559 Figure and Table Floats
8560 \end_layout
8561
8562 \begin_layout Standard
8563 \SpecialChar LyX
8564  provides support for the necessary float environments 
8565 \family sans
8566 figure, figure*, table
8567 \family default
8568  and 
8569 \family sans
8570 table*
8571 \family default
8572 , therefore we won't tell much about it here.
8573  Refer to the 
8574 \emph on
8575 User's
8576 \begin_inset space ~
8577 \end_inset
8578
8579 Guide
8580 \emph default
8581 .
8582  Just remember that tables should be left-aligned.
8583  For that, select the table and change the alignment in 
8584 \family sans
8585 Edit\SpecialChar menuseparator
8586 Paragraph
8587 \begin_inset space ~
8588 \end_inset
8589
8590 Settings.
8591 \end_layout
8592
8593 \begin_layout Standard
8594 There is only one special thing: the figures with caption besides the figure.
8595  To create such a figure, you have to do the following:
8596 \end_layout
8597
8598 \begin_layout Enumerate
8599 Create a wide figure float: 
8600 \family sans
8601 Insert\SpecialChar menuseparator
8602 Float\SpecialChar menuseparator
8603 Figure
8604 \family default
8605 , then right click in the figure and select 
8606 \family sans
8607 Span
8608 \begin_inset space ~
8609 \end_inset
8610
8611 columns
8612 \family default
8613 .
8614 \end_layout
8615
8616 \begin_layout Enumerate
8617 Enter your caption text.
8618 \end_layout
8619
8620 \begin_layout Enumerate
8621 Press 
8622 \family sans
8623 Return
8624 \family default
8625  to move the cursor above the caption.
8626 \end_layout
8627
8628 \begin_layout Enumerate
8629 Insert your figure
8630 \end_layout
8631
8632 \begin_layout Enumerate
8633 Position the cursor behind the figure and insert a horizontal fill: 
8634 \family sans
8635 Insert\SpecialChar menuseparator
8636 Special
8637 \begin_inset space ~
8638 \end_inset
8639
8640 Character\SpecialChar menuseparator
8641 Horizontal
8642 \begin_inset space ~
8643 \end_inset
8644
8645 Fill
8646 \family default
8647 .
8648 \end_layout
8649
8650 \begin_layout Enumerate
8651 Switch to \SpecialChar LaTeX
8652  mode: 
8653 \family sans
8654 M-c
8655 \begin_inset space ~
8656 \end_inset
8657
8658 t
8659 \family default
8660 .
8661 \end_layout
8662
8663 \begin_layout Enumerate
8664 Enter 
8665 \family typewriter
8666
8667 \backslash
8668 parbox[b]{55mm}{
8669 \family default
8670 .
8671  
8672 \series bold
8673 Do not close the brace!
8674 \end_layout
8675
8676 \begin_layout Enumerate
8677 Position the cursor behind the caption text, switch to \SpecialChar LaTeX
8678  mode and insert
8679  the closing brace: 
8680 \family sans
8681 M-c
8682 \begin_inset space ~
8683 \end_inset
8684
8685 t
8686 \family default
8687  
8688 \family typewriter
8689 }
8690 \family default
8691 .
8692 \end_layout
8693
8694 \begin_layout Standard
8695 Also, refer to the figures in the example paper.
8696 \end_layout
8697
8698 \begin_layout Subsection
8699 Referee layout
8700 \end_layout
8701
8702 \begin_layout Standard
8703 For submission, the paper has to be formated in a special double-spacing
8704  layout.
8705  For this purpose, you have to give the option 
8706 \family typewriter
8707 referee
8708 \family default
8709  to the documentclass.
8710  This must be done using the extra class options field in the 
8711 \family sans
8712 Document\SpecialChar menuseparator
8713 Settings
8714 \family default
8715  dialog.
8716  Just enter the string 
8717 \family typewriter
8718 referee
8719 \family default
8720  there.
8721 \end_layout
8722
8723 \begin_layout Subsection
8724 The example paper
8725 \end_layout
8726
8727 \begin_layout Standard
8728 The 
8729 \family sans
8730 Examples
8731 \family default
8732  directory contains an example paper written with \SpecialChar LyX
8733 .
8734  It is the example paper from the original macro package, translated to
8735  \SpecialChar LyX
8736 .
8737  Use it for inspiration, and compare the original \SpecialChar LaTeX
8738  code with \SpecialChar LyX
8739  way of writing.
8740 \end_layout
8741
8742 \begin_layout Section
8743 AAS\SpecialChar TeX
8744
8745 \end_layout
8746
8747 \begin_layout Standard
8748 by 
8749 \noun on
8750 Mike Ressler
8751 \end_layout
8752
8753 \begin_layout Subsection
8754 Introduction
8755 \end_layout
8756
8757 \begin_layout Standard
8758 AAS\SpecialChar TeX
8759  is a set of macros produced by the American Astronomical Society to
8760  facilitate electronic manuscript submission to the three journals they
8761  publish: the Astrophysical Journal (including the Letters and Supplement),
8762  the Astronomical Journal, and the Publications of the Astronomical Society
8763  of the Pacific.
8764  \SpecialChar LyX
8765  has proven to be an excellent tool for generating these documents, especially
8766  given its equation, citation, and figure handling capabilities.
8767  \SpecialChar LyX
8768  requires version 5.0 (or higher) of these macros; preferably 5.2, which
8769  is the version described here, or higher.
8770  Versions prior to 5.0 are intended for use with \SpecialChar LaTeX
8771 2.09 and are fundamentally
8772  incompatible with \SpecialChar LyX
8773 .
8774  The AAS\SpecialChar TeX
8775  package may be downloaded from the AAS\SpecialChar TeX
8776  Web site
8777 \end_layout
8778
8779 \begin_layout Standard
8780 \begin_inset VSpace medskip
8781 \end_inset
8782
8783
8784 \end_layout
8785
8786 \begin_layout Standard
8787 \align center
8788 \begin_inset Flex URL
8789 status collapsed
8790
8791 \begin_layout Plain Layout
8792
8793 https://aas.org/aastex/aastex-downloads
8794 \end_layout
8795
8796 \end_inset
8797
8798
8799 \end_layout
8800
8801 \begin_layout Standard
8802 \begin_inset VSpace medskip
8803 \end_inset
8804
8805
8806 \end_layout
8807
8808 \begin_layout Standard
8809 A complete user guide is contained in that package and you should familiarize
8810  yourself with it thoroughly before embarking on writing a paper in \SpecialChar LyX
8811 .
8812  \SpecialChar LyX
8813  will not reduce the need to figure out all the AAS\SpecialChar TeX
8814  commands, it will only
8815  reduce the drudgery of typing everything in.
8816  It is your responsibility to ensure that the final exported \SpecialChar LaTeX
8817  document conforms
8818  completely to the requirements of the journal to which you are submitting
8819  your paper.
8820 \end_layout
8821
8822 \begin_layout Subsection
8823 Starting a New Paper
8824 \end_layout
8825
8826 \begin_layout Standard
8827 I strongly suggest that you start with the AAS\SpecialChar TeX
8828  template file.
8829  Click on 
8830 \family sans
8831 File\SpecialChar menuseparator
8832 New from
8833 \family default
8834  
8835 \family sans
8836 Template
8837 \family default
8838 , enter the new file name, then choose the 
8839 \family typewriter
8840 aastex.lyx
8841 \family default
8842  template.
8843  This will show the most common fields found in a manuscript.
8844  Simply overwrite the existing text (including the brackets, 
8845 \family typewriter
8846 <>
8847 \family default
8848 ) with the correct information.
8849  Many of the AAS\SpecialChar TeX
8850  commands and environments can be implemented directly in
8851  \SpecialChar LyX
8852 , but some cannot: most noticeably 
8853 \family typewriter
8854
8855 \backslash
8856 altaffilmark
8857 \family default
8858  and 
8859 \family typewriter
8860
8861 \backslash
8862 altaffiltext
8863 \family default
8864 , which should stick out like a sore thumb if you actually just opened the
8865  template file.
8866  For commands such as these, the \SpecialChar LaTeX
8867  code must be entered directly and marked
8868  as such.
8869  Such commands are referred to as \SpecialChar TeX
8870  code, or Evil Red Text.
8871  I tried to minimize the amount of \SpecialChar TeX
8872  code needed in an AAS\SpecialChar TeX
8873  document, but
8874  there is still a bit more required than any of us would like.
8875 \end_layout
8876
8877 \begin_layout Subsection
8878 Finishing Your Paper
8879 \end_layout
8880
8881 \begin_layout Standard
8882 When the paper is finished to your satisfaction and previews/prints correctly,
8883  there are a few 
8884 \begin_inset Quotes eld
8885 \end_inset
8886
8887 postprocessing
8888 \begin_inset Quotes erd
8889 \end_inset
8890
8891  actions which need to be done before you submit it to the journals.
8892  
8893 \end_layout
8894
8895 \begin_layout Enumerate
8896 Export your paper as a \SpecialChar LaTeX
8897  file (
8898 \family sans
8899 File\SpecialChar menuseparator
8900 Export\SpecialChar menuseparator
8901 \SpecialChar LaTeX
8902
8903 \family default
8904 ).
8905  
8906 \end_layout
8907
8908 \begin_layout Enumerate
8909 Edit the resulting 
8910 \family typewriter
8911 .tex
8912 \family default
8913  file with your favorite text editor
8914 \end_layout
8915
8916 \begin_deeper
8917 \begin_layout Enumerate
8918 remove the comment lines before the 
8919 \family typewriter
8920
8921 \backslash
8922 documentclass
8923 \family default
8924  command
8925 \end_layout
8926
8927 \begin_layout Enumerate
8928 remove the 
8929 \family typewriter
8930
8931 \backslash
8932 usepackage...{fontenc}
8933 \family default
8934  line if it appears (usually just after 
8935 \family typewriter
8936
8937 \backslash
8938 documentclass
8939 \family default
8940 }; also remove the 
8941 \family typewriter
8942
8943 \backslash
8944 secnumdepth
8945 \family default
8946  line if it appears.
8947 \end_layout
8948
8949 \begin_layout Enumerate
8950 remove everything between (and including) the 
8951 \family typewriter
8952
8953 \backslash
8954 makeatletter
8955 \family default
8956  and 
8957 \family typewriter
8958
8959 \backslash
8960 makeatother
8961 \family default
8962  commands, except for any commands you specifically put into the \SpecialChar LaTeX
8963  preamble
8964  (which should appear immediately after the 
8965 \begin_inset Quotes eld
8966 \end_inset
8967
8968 User specified \SpecialChar LaTeX
8969  commands
8970 \begin_inset Quotes erd
8971 \end_inset
8972
8973  comment in the 
8974 \family typewriter
8975 .tex
8976 \family default
8977  file).
8978 \end_layout
8979
8980 \end_deeper
8981 \begin_layout Enumerate
8982 Run the resulting file through \SpecialChar LaTeX
8983  to make sure it still processes correctly.
8984 \end_layout
8985
8986 \begin_layout Enumerate
8987 Reread the journal requirements to make sure your filenames and formats
8988  are correct.
8989 \end_layout
8990
8991 \begin_layout Enumerate
8992 Submit it.
8993 \end_layout
8994
8995 \begin_layout Subsection
8996 Comments On Specific Commands
8997 \end_layout
8998
8999 \begin_layout Standard
9000 I will not describe the detailed usage of the individual AAS\SpecialChar TeX
9001  commands: the
9002  AAS\SpecialChar TeX
9003  User Guide (
9004 \family typewriter
9005 aasguide.tex
9006 \family default
9007 ) gives a good description of each.
9008  Thus it's probably easiest for me to go down the list as found in the guide
9009  and offer comments where necessary.
9010  So let's begin \SpecialChar ldots
9011
9012 \end_layout
9013
9014 \begin_layout Subsubsection
9015 Things that work as expected
9016 \end_layout
9017
9018 \begin_layout Standard
9019 Because they work as you might expect, I simply list them and the section
9020  they are found in: 
9021 \family typewriter
9022
9023 \backslash
9024 documentclass
9025 \family default
9026  (2.1.1), 
9027 \family typewriter
9028
9029 \backslash
9030 begin{document}
9031 \family default
9032  (2.2), 
9033 \family typewriter
9034
9035 \backslash
9036 title
9037 \family default
9038  (2.3), 
9039 \family typewriter
9040
9041 \backslash
9042 author
9043 \family default
9044  (2.3), 
9045 \family typewriter
9046
9047 \backslash
9048 affil
9049 \family default
9050  (2.3), 
9051 \family typewriter
9052
9053 \backslash
9054 abstract
9055 \family default
9056  (2.4), 
9057 \family typewriter
9058
9059 \backslash
9060 keywords
9061 \family default
9062  (2.5), 
9063 \family typewriter
9064
9065 \backslash
9066 section
9067 \family default
9068  (2.7), 
9069 \family typewriter
9070
9071 \backslash
9072 subsection
9073 \family default
9074  (2.7), 
9075 \family typewriter
9076
9077 \backslash
9078 subsubsection
9079 \family default
9080  (2.7), 
9081 \family typewriter
9082
9083 \backslash
9084 paragraph
9085 \family default
9086  (2.7), 
9087 \family typewriter
9088
9089 \backslash
9090 facility
9091 \family default
9092  (2.10), 
9093 \family typewriter
9094
9095 \backslash
9096 begin{displaymath}
9097 \family default
9098  (2.12), 
9099 \family typewriter
9100
9101 \backslash
9102 begin{equation}
9103 \family default
9104  (2.12), 
9105 \family typewriter
9106
9107 \backslash
9108 begin{eqnarray}
9109 \family default
9110  (2.12), 
9111 \family typewriter
9112
9113 \backslash
9114 begin{mathletters}
9115 \family default
9116  (2.12), 
9117 \family typewriter
9118
9119 \backslash
9120 begin{thebibliography}
9121 \family default
9122  (2.13.1), 
9123 \family typewriter
9124
9125 \backslash
9126 bibitem
9127 \family default
9128  (2.13.2), all the cite commands and their variations (2.13.2), the generic
9129  graphicx figure commands (2.14.1), 
9130 \family typewriter
9131
9132 \backslash
9133 begin{table}
9134 \family default
9135  (2.15.4), 
9136 \family typewriter
9137
9138 \backslash
9139 begin{tabular}
9140 \family default
9141  (2.15.4), 
9142 \family typewriter
9143
9144 \backslash
9145 caption
9146 \family default
9147  (2.15.4), 
9148 \family typewriter
9149
9150 \backslash
9151 label
9152 \family default
9153  (2.15.4, amongst other places), 
9154 \family typewriter
9155
9156 \backslash
9157 tablerefs
9158 \family default
9159  (2.15.5), 
9160 \family typewriter
9161
9162 \backslash
9163 tablecomments
9164 \family default
9165  (2.15.5), 
9166 \family typewriter
9167
9168 \backslash
9169 url
9170 \family default
9171  (2.17.4), 
9172 \family typewriter
9173
9174 \backslash
9175 end{document}
9176 \family default
9177  (2.18).
9178 \end_layout
9179
9180 \begin_layout Standard
9181 The following style options also work correctly: 
9182 \family typewriter
9183 longabstract
9184 \family default
9185  (2.4), 
9186 \family typewriter
9187 preprint
9188 \family default
9189  (3.2.1), 
9190 \family typewriter
9191 preprint2
9192 \family default
9193  (3.2.2), 
9194 \family typewriter
9195 eqsecnum
9196 \family default
9197  (3.3), 
9198 \family typewriter
9199 flushrt
9200 \family default
9201  (3.4).
9202  Simply put them in the 
9203 \family sans
9204 Options
9205 \family default
9206  box in 
9207 \family sans
9208 Layout\SpecialChar menuseparator
9209 Document
9210 \family default
9211 .
9212 \end_layout
9213
9214 \begin_layout Subsubsection
9215 Things that work, but require more comment
9216 \end_layout
9217
9218 \begin_layout Standard
9219 The following items work, but require a little more discussion:
9220 \end_layout
9221
9222 \begin_layout Itemize
9223 These items are reserved for use by the journal editors, but you can put
9224  them into the \SpecialChar LaTeX
9225  preamble if you feel compelled to do so: 
9226 \family typewriter
9227
9228 \backslash
9229 received
9230 \family default
9231
9232 \family typewriter
9233
9234 \backslash
9235 revised
9236 \family default
9237
9238 \family typewriter
9239
9240 \backslash
9241 accepted
9242 \family default
9243
9244 \family typewriter
9245
9246 \backslash
9247 ccc
9248 \family default
9249
9250 \family typewriter
9251
9252 \backslash
9253 cpright
9254 \family default
9255  (all from 2.1.3)
9256 \end_layout
9257
9258 \begin_layout Itemize
9259 These items may be placed in the \SpecialChar LaTeX
9260  preamble, and are included as blanks in
9261  the template file: 
9262 \family typewriter
9263
9264 \backslash
9265 slugcomment
9266 \family default
9267  (2.1.4), 
9268 \family typewriter
9269
9270 \backslash
9271 shorttitle
9272 \family default
9273  (2.1.5), 
9274 \family typewriter
9275
9276 \backslash
9277 shortauthors
9278 \family default
9279  (2.1.5)
9280 \end_layout
9281
9282 \begin_layout Itemize
9283
9284 \family typewriter
9285
9286 \backslash
9287 email
9288 \family default
9289  (2.3) – can only be used 
9290 \begin_inset Quotes eld
9291 \end_inset
9292
9293 standalone
9294 \begin_inset Quotes erd
9295 \end_inset
9296
9297 , not in the middle of a paragraph.
9298  Use \SpecialChar TeX
9299  code if you need to embed it.
9300 \end_layout
9301
9302 \begin_layout Itemize
9303
9304 \family typewriter
9305
9306 \backslash
9307 and
9308 \family default
9309  (2.3) – will have extra {} after it.
9310  This should not cause an error.
9311 \end_layout
9312
9313 \begin_layout Itemize
9314
9315 \family typewriter
9316
9317 \backslash
9318 notetoeditor
9319 \family default
9320  (2.6) – can only be used 
9321 \begin_inset Quotes eld
9322 \end_inset
9323
9324 standalone
9325 \begin_inset Quotes erd
9326 \end_inset
9327
9328 , not in the middle of a paragraph.
9329  Use \SpecialChar TeX
9330  code if you need to embed it.
9331 \end_layout
9332
9333 \begin_layout Itemize
9334
9335 \family typewriter
9336
9337 \backslash
9338 placetable
9339 \family default
9340  (2.8) – can't insert a cross-reference tag, you must type the tag name by
9341  hand
9342 \end_layout
9343
9344 \begin_layout Itemize
9345
9346 \family typewriter
9347
9348 \backslash
9349 placefigure
9350 \family default
9351  (2.8) – same as for 
9352 \family typewriter
9353
9354 \backslash
9355 placetable
9356 \end_layout
9357
9358 \begin_layout Itemize
9359
9360 \family typewriter
9361
9362 \backslash
9363 acknowledgements
9364 \family default
9365  (2.9) – will have extra {} after it.
9366  This should not cause an error.
9367 \end_layout
9368
9369 \begin_layout Itemize
9370
9371 \family typewriter
9372
9373 \backslash
9374 appendix
9375 \family default
9376  (2.11) – will have extra {} after it.
9377  This should not cause an error.
9378 \end_layout
9379
9380 \begin_layout Itemize
9381
9382 \family typewriter
9383
9384 \backslash
9385 figcaption
9386 \family default
9387  (2.14.2) – you can insert an optional filename argument by placing the cursor
9388  at the beginning of the text and selecting 
9389 \family sans
9390 Insert\SpecialChar menuseparator
9391 Short Title
9392 \family default
9393 .
9394  
9395 \begin_inset Quotes eld
9396 \end_inset
9397
9398 Short Title
9399 \begin_inset Quotes erd
9400 \end_inset
9401
9402  inserts an optional argument of the type needed by 
9403 \family typewriter
9404
9405 \backslash
9406 figcaption
9407 \family default
9408 .
9409  Hopefully it will be renamed someday.
9410 \end_layout
9411
9412 \begin_layout Itemize
9413
9414 \family typewriter
9415
9416 \backslash
9417 objectname
9418 \family default
9419  (2.17.1) – same as 
9420 \family typewriter
9421
9422 \backslash
9423 figcaption
9424 \family default
9425  for the catalog ID optional parameter
9426 \end_layout
9427
9428 \begin_layout Itemize
9429
9430 \family typewriter
9431
9432 \backslash
9433 dataset
9434 \family default
9435  (2.17.1) – same as 
9436 \family typewriter
9437
9438 \backslash
9439 figcaption
9440 \family default
9441  for the catalog ID optional parameter
9442 \end_layout
9443
9444 \begin_layout Subsubsection
9445 Things not implemented, use \SpecialChar TeX
9446  code
9447 \end_layout
9448
9449 \begin_layout Standard
9450
9451 \family typewriter
9452
9453 \backslash
9454 altaffilmark
9455 \family default
9456  (2.3), 
9457 \family typewriter
9458
9459 \backslash
9460 altaffiltext
9461 \family default
9462  (2.3), 
9463 \family typewriter
9464
9465 \backslash
9466 eqnum
9467 \family default
9468  (2.12), 
9469 \family typewriter
9470
9471 \backslash
9472 setcounter{equation}
9473 \family default
9474  (2.12), Journal name abbreviations (2.13.4), 
9475 \family typewriter
9476
9477 \backslash
9478 figurenum
9479 \family default
9480  (2.14.1), 
9481 \family typewriter
9482
9483 \backslash
9484 epsscale
9485 \family default
9486  (2.14.1), 
9487 \family typewriter
9488
9489 \backslash
9490 plotone
9491 \family default
9492  (2.14.1), 
9493 \family typewriter
9494
9495 \backslash
9496 plottwo
9497 \family default
9498  (2.14.1), 
9499 \family typewriter
9500
9501 \backslash
9502 tablenum
9503 \family default
9504  (2.15.4), 
9505 \family typewriter
9506
9507 \backslash
9508 tableline
9509 \family default
9510  (2.15.4, insert it as the first element in the lefthand cell after where
9511  you want it.
9512  Don't use any of \SpecialChar LyX
9513 's rules in the table), 
9514 \family typewriter
9515
9516 \backslash
9517 tablenotemark
9518 \family default
9519  (2.15.5), 
9520 \family typewriter
9521
9522 \backslash
9523 tablenotetext
9524 \family default
9525  (2.15.5), much of Misc (2.17, except 
9526 \family typewriter
9527
9528 \backslash
9529 objectname
9530 \family default
9531
9532 \family typewriter
9533
9534 \backslash
9535 dataset
9536 \family default
9537
9538 \family typewriter
9539
9540 \backslash
9541 url
9542 \family default
9543 , and 
9544 \family typewriter
9545
9546 \backslash
9547 email
9548 \family default
9549 ; see above), 
9550 \family typewriter
9551
9552 \backslash
9553 singlespace
9554 \family default
9555  (3.1), 
9556 \family typewriter
9557
9558 \backslash
9559 doublespace
9560 \family default
9561  (3.1), 
9562 \family typewriter
9563
9564 \backslash
9565 onecolumn
9566 \family default
9567  (3.2), 
9568 \family typewriter
9569
9570 \backslash
9571 twocolumn
9572 \family default
9573  (3.2)
9574 \end_layout
9575
9576 \begin_layout Subsubsection
9577 Things that cannot be implemented
9578 \end_layout
9579
9580 \begin_layout Standard
9581 \SpecialChar ldots
9582  at least in any meaningful sort of way, so I suggest ignoring them.
9583  They are the references environment (2.13.3), and the deluxetable environment
9584  (2.15).
9585  If you really, really need to use deluxetable, I suggest editing it in
9586  a separate file with a text editor, then using 
9587 \family sans
9588 Insert\SpecialChar menuseparator
9589 Child
9590 \begin_inset space ~
9591 \end_inset
9592
9593 Document
9594 \family default
9595  to include it in your \SpecialChar LyX
9596  document.
9597  See the 
9598 \family typewriter
9599 aas_sample.lyx
9600 \family default
9601  file to see an example of this.
9602 \end_layout
9603
9604 \begin_layout Subsection
9605 FAQs, Tips, Tricks, and Other Ruminations
9606 \end_layout
9607
9608 \begin_layout Subsubsection
9609 Getting \SpecialChar LyX
9610  and AAS\SpecialChar TeX
9611  to cooperate
9612 \end_layout
9613
9614 \begin_layout Standard
9615 It can be a bit tricky to get \SpecialChar LyX
9616  to recognize a new layout and document class.
9617  When all else fails, do this:
9618 \end_layout
9619
9620 \begin_layout Enumerate
9621 Make certain that \SpecialChar LaTeX
9622  can find AAS\SpecialChar TeX
9623 .
9624  Copy sample.tex (and perhaps table.tex) from the AAS\SpecialChar TeX
9625  distribution into a
9626  directory completely unrelated to \SpecialChar LaTeX
9627  or AAS\SpecialChar TeX
9628  and run \SpecialChar LaTeX
9629  on 
9630 \family typewriter
9631 sample.tex
9632 \family default
9633 .
9634 \end_layout
9635
9636 \begin_layout Enumerate
9637 Make certain that 
9638 \family typewriter
9639 aastex.layout
9640 \family default
9641  appears in \SpecialChar LyX
9642 's 
9643 \family typewriter
9644 layouts
9645 \family default
9646  folder
9647 \end_layout
9648
9649 \begin_layout Enumerate
9650 Rerun 
9651 \family sans
9652 Tools\SpecialChar menuseparator
9653 Reconfigure
9654 \family default
9655  in \SpecialChar LyX
9656 , then restart \SpecialChar LyX
9657 .
9658 \end_layout
9659
9660 \begin_layout Enumerate
9661 Open a regular new file, not from a template.
9662  Does AAS\SpecialChar TeX
9663  appear in the class list in 
9664 \family sans
9665 Document\SpecialChar menuseparator
9666 Settings
9667 \family default
9668 ?
9669 \end_layout
9670
9671 \begin_layout Standard
9672 If you get a warning from an existing AAS\SpecialChar TeX
9673  document about not being able
9674  to find the AAS\SpecialChar TeX
9675  layout or a message about 
9676 \begin_inset Quotes eld
9677 \end_inset
9678
9679 You should not mix title layouts with normal ones
9680 \begin_inset Quotes erd
9681 \end_inset
9682
9683 , things haven't been installed correctly.
9684 \end_layout
9685
9686 \begin_layout Subsubsection
9687 \SpecialChar LaTeX
9688  error processing a table 
9689 \end_layout
9690
9691 \begin_layout Standard
9692 \SpecialChar LyX
9693 , by default, attempts to center the table caption/title.
9694  This seems to produce a bad interaction in AAS\SpecialChar TeX
9695  so you should click somewhere
9696  in the caption/title, then select 
9697 \family sans
9698 Edit\SpecialChar menuseparator
9699 Paragraph
9700 \begin_inset space ~
9701 \end_inset
9702
9703 Settings
9704 \family default
9705 , then set the 
9706 \family sans
9707 Alignment
9708 \family default
9709  to 
9710 \family sans
9711 Block
9712 \family default
9713 .
9714  This took care of it for me.
9715 \end_layout
9716
9717 \begin_layout Subsubsection
9718 References
9719 \end_layout
9720
9721 \begin_layout Standard
9722 A couple of things: 1) I have noticed some funny spacing in the reference
9723  entries in the text.
9724  When you enter the bibliography item data, make sure their is 
9725 \emph on
9726 no
9727 \emph default
9728  space between the last author and the parenthesis setting off the year;
9729  
9730 \emph on
9731 e.
9732 \begin_inset space \thinspace{}
9733 \end_inset
9734
9735 g.
9736 \begin_inset space \space{}
9737 \end_inset
9738
9739
9740 \emph default
9741 type 
9742 \family typewriter
9743 Ressler(1992)
9744 \family default
9745 , not 
9746 \family typewriter
9747 Ressler (1992)
9748 \family default
9749 .
9750  2) Entering the references at all is not obvious.
9751  The easiest thing is to start typing your first reference at the end of
9752  the document, then mark it as type 
9753 \family sans
9754 References
9755 \family default
9756 .
9757  That will put a small gray box in front of what you just typed.
9758  Click on the box to fill in the rest of the information.
9759  For new references, go to the end of an existing reference and press return.
9760  That will create a new line with its own box, etc.
9761 \end_layout
9762
9763 \begin_layout Subsubsection
9764 Including EPS files
9765 \end_layout
9766
9767 \begin_layout Standard
9768 Even though AAS\SpecialChar TeX
9769  provides its own figure commands (
9770 \family typewriter
9771
9772 \backslash
9773 plotone
9774 \family default
9775 , for example), I much prefer \SpecialChar LaTeX
9776 's standard figure commands (with the default
9777  graphicx).
9778  You can insert the 
9779 \family typewriter
9780
9781 \backslash
9782 plotone
9783 \family default
9784 , etc.
9785 \begin_inset space ~
9786 \end_inset
9787
9788 commands as \SpecialChar TeX
9789  code into a Figure Float box if you desire, but I never have
9790  much luck getting the layout right.
9791  With the standard graphics, \SpecialChar LyX
9792  will insert a 
9793 \family typewriter
9794
9795 \backslash
9796 usepackage{graphicx}
9797 \family default
9798  command into the \SpecialChar LaTeX
9799  preamble and handle the figures in the standard \SpecialChar LaTeX2e
9800  way,
9801  interspersing the figures in the text.
9802  I believe ApJ accepts figures exactly this way now; AJ might still use
9803  the 
9804 \begin_inset Quotes eld
9805 \end_inset
9806
9807 stack everything at the end
9808 \begin_inset Quotes erd
9809 \end_inset
9810
9811  technique.
9812 \end_layout
9813
9814 \begin_layout Subsubsection
9815 Things I could have done, but didn't
9816 \end_layout
9817
9818 \begin_layout Standard
9819 There are a few 
9820 \begin_inset Quotes eld
9821 \end_inset
9822
9823 pretty
9824 \begin_inset Quotes erd
9825 \end_inset
9826
9827  things I could have implemented, but chose not to.
9828  For instance, I saw no point in double-spacing the text in the \SpecialChar LyX
9829  window,
9830  even though it is double-spaced in the paper manuscript.
9831  Also, I chose not to make separate layouts for the preprint and preprint2
9832  styles.
9833  Since I assume you will spend most of your time in the plain manuscript
9834  mode anyway, I decided not to chew up more disk space with this.
9835  
9836 \end_layout
9837
9838 \begin_layout Subsection
9839 Final Caveat
9840 \end_layout
9841
9842 \begin_layout Standard
9843 Your mileage may vary.
9844  I've now had papers published by both ApJ and AJ that have had 98% of the
9845  effort done in \SpecialChar LyX
9846 ; the last 2% was the \SpecialChar LaTeX
9847  post-processing and a few cleanups.
9848  I have had no trouble with the submission process, and I'm sure the journals
9849  were never aware that there might be a difference.
9850  So, go forth and publish!
9851 \end_layout
9852
9853 \begin_layout Section
9854 AMS \SpecialChar LaTeX
9855
9856 \end_layout
9857
9858 \begin_layout Standard
9859 by 
9860 \noun on
9861 David Johnson
9862 \noun default
9863 ; updated by 
9864 \noun on
9865 Richard Heck
9866 \end_layout
9867
9868 \begin_layout Standard
9869 \begin_inset VSpace bigskip
9870 \end_inset
9871
9872
9873 \end_layout
9874
9875 \begin_layout Standard
9876 \noindent
9877 The AMS \SpecialChar LaTeX
9878  layouts are set up to conform to suggested styles for mathematical
9879  papers to be submitted to American Mathematical Society publications.
9880  The layouts are not tailored to a specific journal, but easily can be.
9881  You should refer to the AMS documentation for specific instructions for
9882  each journal (usually it will entail only changing a single line in the
9883  \SpecialChar TeX
9884  output).
9885  That documentation is available on the Web at 
9886 \begin_inset Flex URL
9887 status open
9888
9889 \begin_layout Plain Layout
9890
9891 http://www.ams.org
9892 \end_layout
9893
9894 \end_inset
9895
9896  or by ftp at 
9897 \begin_inset Flex URL
9898 status open
9899
9900 \begin_layout Plain Layout
9901
9902 ftp://ftp.ams.org/pub/tex/amslatex/
9903 \end_layout
9904
9905 \end_inset
9906
9907 .
9908  These layouts are appropriate, and useful, for any mathematical writing.
9909  
9910 \end_layout
9911
9912 \begin_layout Standard
9913 There are two basic AMS \SpecialChar LaTeX
9914  layouts: 
9915 \end_layout
9916
9917 \begin_layout Itemize
9918 amsart: The standard AMS article format.
9919 \end_layout
9920
9921 \begin_layout Itemize
9922 amsbook: the standard AMS book (really, monograph) format.
9923  
9924 \end_layout
9925
9926 \begin_layout Standard
9927 The layouts themselves contain only the minimum necessary to use the AMS
9928  classes.
9929  They do not, in particular, contain any of the `theorem' environments used
9930  for setting theorems, lemmas, and the like.
9931  These are contained, instead, in the 
9932 \begin_inset Flex Code
9933 status collapsed
9934
9935 \begin_layout Plain Layout
9936 Theorems (AMS)
9937 \end_layout
9938
9939 \end_inset
9940
9941  module, which is loaded by default when you select one of the AMS classes.
9942  (It can also be used with other classes and can be removed, if you would
9943  rather use something else.) Less commonly used environments are in the 
9944 \begin_inset Flex Code
9945 status collapsed
9946
9947 \begin_layout Plain Layout
9948 Theorems (AMS-Extended)
9949 \end_layout
9950
9951 \end_inset
9952
9953  module, which must be loaded manually.
9954 \end_layout
9955
9956 \begin_layout Standard
9957 By default, theorems and the like are numbered consecutively throughout
9958  the document, but this may be modified by loading the module 
9959 \begin_inset Flex Code
9960 status collapsed
9961
9962 \begin_layout Plain Layout
9963 Theorems (Order by Section)
9964 \end_layout
9965
9966 \end_inset
9967
9968  or, if you are using 
9969 \begin_inset Flex Code
9970 status collapsed
9971
9972 \begin_layout Plain Layout
9973 book (AMS)
9974 \end_layout
9975
9976 \end_inset
9977
9978 , the module 
9979 \begin_inset Flex Code
9980 status collapsed
9981
9982 \begin_layout Plain Layout
9983 Theorems (Order by Chapter)
9984 \end_layout
9985
9986 \end_inset
9987
9988 .
9989  These will number the results as 
9990 \begin_inset Formula $n.m$
9991 \end_inset
9992
9993 , where the first number refers to the section (or chapter) and the second
9994  refers to the total number of results so far in that section (or chapter).
9995  Many environments are also available unnumbered.
9996  These are indicated by an asterisk at the end.
9997  If you happen to want 
9998 \emph on
9999 only
10000 \emph default
10001  unnumbered results, the module 
10002 \begin_inset Flex Code
10003 status collapsed
10004
10005 \begin_layout Plain Layout
10006 Theorems (Starred)
10007 \end_layout
10008
10009 \end_inset
10010
10011  provides that option.
10012 \end_layout
10013
10014 \begin_layout Standard
10015 Note that these modules do not 
10016 \emph on
10017 have
10018 \emph default
10019  to be used with the AMS classes.
10020  It is perfectly possible to use the 
10021 \begin_inset Flex Code
10022 status collapsed
10023
10024 \begin_layout Plain Layout
10025 Theorems (AMS)
10026 \end_layout
10027
10028 \end_inset
10029
10030  module, and the others mentioned, with other classes, such as 
10031 \begin_inset Flex Code
10032 status collapsed
10033
10034 \begin_layout Plain Layout
10035 article
10036 \end_layout
10037
10038 \end_inset
10039
10040
10041 \begin_inset Flex Code
10042 status collapsed
10043
10044 \begin_layout Plain Layout
10045 report
10046 \end_layout
10047
10048 \end_inset
10049
10050
10051 \begin_inset Flex Code
10052 status collapsed
10053
10054 \begin_layout Plain Layout
10055 book (KOMA-script)
10056 \end_layout
10057
10058 \end_inset
10059
10060 , and so forth.
10061 \end_layout
10062
10063 \begin_layout Subsection
10064 What these layouts provide
10065 \end_layout
10066
10067 \begin_layout Standard
10068 There is a long list of included environments provided by these layouts.
10069  In AMS-\SpecialChar LaTeX
10070 , there is, in fact, an opportunity to define an unlimited variety
10071  of `theorem' environments.
10072  However, the AMS recommends the environments that are available in \SpecialChar LyX
10073 .
10074  
10075 \end_layout
10076
10077 \begin_layout Standard
10078 The following environments—as well as the standard environments, such as
10079  
10080 \begin_inset Flex Noun
10081 status collapsed
10082
10083 \begin_layout Plain Layout
10084 section
10085 \end_layout
10086
10087 \end_inset
10088
10089
10090 \begin_inset Flex Noun
10091 status collapsed
10092
10093 \begin_layout Plain Layout
10094 bibliography
10095 \end_layout
10096
10097 \end_inset
10098
10099
10100 \begin_inset Flex Noun
10101 status collapsed
10102
10103 \begin_layout Plain Layout
10104 title
10105 \end_layout
10106
10107 \end_inset
10108
10109
10110 \begin_inset Flex Noun
10111 status collapsed
10112
10113 \begin_layout Plain Layout
10114 author
10115 \end_layout
10116
10117 \end_inset
10118
10119 , and 
10120 \begin_inset Flex Noun
10121 status collapsed
10122
10123 \begin_layout Plain Layout
10124 date
10125 \end_layout
10126
10127 \end_inset
10128
10129 —are provided by 
10130 \begin_inset Flex Code
10131 status collapsed
10132
10133 \begin_layout Plain Layout
10134 article (AMS)
10135 \end_layout
10136
10137 \end_inset
10138
10139  and 
10140 \begin_inset Flex Code
10141 status collapsed
10142
10143 \begin_layout Plain Layout
10144 book (AMS)
10145 \end_layout
10146
10147 \end_inset
10148
10149 :
10150 \end_layout
10151
10152 \begin_layout Description
10153 Address This should be the author's permanent address.
10154 \end_layout
10155
10156 \begin_layout Description
10157 Current
10158 \begin_inset space ~
10159 \end_inset
10160
10161 Address This should be the author's temporary address at the time of submission,
10162  if different from the Address.
10163 \end_layout
10164
10165 \begin_layout Description
10166 Email Author's e-mail address
10167 \end_layout
10168
10169 \begin_layout Description
10170 URL Author's Web address, if desired.
10171 \end_layout
10172
10173 \begin_layout Description
10174 Keywords Key words or phrases used to identify specific topics discussed
10175  in the paper.
10176 \end_layout
10177
10178 \begin_layout Description
10179 Subjectclass These refer to the AMS Subject Classifications, published and
10180  described in 
10181 \emph on
10182 Mathematical Reviews
10183 \emph default
10184 .
10185  These are also available online at the AMS cites listed above.
10186 \end_layout
10187
10188 \begin_layout Description
10189 Thanks
10190 \end_layout
10191
10192 \begin_layout Description
10193 Dedicatory
10194 \end_layout
10195
10196 \begin_layout Description
10197 Translator
10198 \end_layout
10199
10200 \begin_layout Standard
10201 The following environments are provided by both the 
10202 \begin_inset Flex Code
10203 status collapsed
10204
10205 \begin_layout Plain Layout
10206 Theorems
10207 \end_layout
10208
10209 \end_inset
10210
10211  and 
10212 \begin_inset Flex Code
10213 status collapsed
10214
10215 \begin_layout Plain Layout
10216 Theorems (AMS)
10217 \end_layout
10218
10219 \end_inset
10220
10221  modules, in the latter case in both starred (unnumbered) and unstarred
10222  (numbered) versions.
10223  These same environments are provided only in the starred versions by the
10224  
10225 \begin_inset Flex Code
10226 status collapsed
10227
10228 \begin_layout Plain Layout
10229 Theorems (Starred)
10230 \end_layout
10231
10232 \end_inset
10233
10234  module:
10235 \end_layout
10236
10237 \begin_layout Theorem
10238 This is typically used for the statements of major results.
10239  
10240 \end_layout
10241
10242 \begin_layout Corollary*
10243 This is used for statements which follow fairly directly from previous statement
10244 s.
10245  Again, these can be major results.
10246  
10247 \end_layout
10248
10249 \begin_layout Lemma
10250 These are smaller results needed to prove other statements.
10251 \end_layout
10252
10253 \begin_layout Proposition
10254 These are less major results which (hopefully) add to the general theory
10255  being discussed.
10256 \end_layout
10257
10258 \begin_layout Conjecture
10259 These are statements provided without justification, which the author does
10260  not know how to prove, but which seem to be true (to the author, at least).
10261 \end_layout
10262
10263 \begin_layout Definition*
10264 Guess what this is for.
10265  The font is different for this environment than for the previous ones.
10266  
10267 \end_layout
10268
10269 \begin_layout Example*
10270 Used for examples illustrating proven results.
10271 \end_layout
10272
10273 \begin_layout Problem
10274 It's not really known what this is for.
10275  You should figure it out.
10276 \end_layout
10277
10278 \begin_layout Exercise*
10279 Write a description for this one.
10280 \end_layout
10281
10282 \begin_layout Remark
10283 This environment is also a type of theorem, usually a lesser sort of observation.
10284 \end_layout
10285
10286 \begin_layout Claim*
10287 Often used in the course of giving a proof of a larger result.
10288 \end_layout
10289
10290 \begin_layout Case
10291 Generally, these are used to break up long arguments, using specific instances
10292  of some condition.
10293  
10294 \end_layout
10295
10296 \begin_layout Case
10297 The numbering scheme for cases is on its own, not together with other numbered
10298  statements.
10299  
10300 \end_layout
10301
10302 \begin_layout Proof
10303 At the end of this environment, a QED symbol (usually a square, but it can
10304  vary with different styles) is placed.
10305  If you want to have other environments within this one—for example, Case
10306  environments—and have the QED symbol appear only after them, then the other
10307  environments need to be nested within the proof environment.
10308  See the section 
10309 \emph on
10310 Nesting Environments
10311 \emph default
10312  of the 
10313 \emph on
10314 User's Guide
10315 \emph default
10316  for information on nesting.
10317 \end_layout
10318
10319 \begin_layout Standard
10320 And these environments are provided by 
10321 \begin_inset Flex Code
10322 status collapsed
10323
10324 \begin_layout Plain Layout
10325 Theorems (AMS-Extended)
10326 \end_layout
10327
10328 \end_inset
10329
10330 :
10331 \end_layout
10332
10333 \begin_layout Criterion*
10334 A required condition.
10335 \end_layout
10336
10337 \begin_layout Algorithm*
10338 A general procedure to be used.
10339 \end_layout
10340
10341 \begin_layout Axiom*
10342 This is a property or statement taken as true within the system being discussed.
10343 \end_layout
10344
10345 \begin_layout Condition*
10346 Sometimes used to state a condition assumed within the present context of
10347  discussion.
10348 \end_layout
10349
10350 \begin_layout Note*
10351 Similar to a Remark.
10352 \end_layout
10353
10354 \begin_layout Notation*
10355 Used for the explanation of, yes, notation.
10356 \end_layout
10357
10358 \begin_layout Summary
10359 Do we really need to tell you? 
10360 \end_layout
10361
10362 \begin_layout Acknowledgement*
10363 Acknowledgement.
10364 \end_layout
10365
10366 \begin_layout Conclusion*
10367 Sometimes used at the end of a long train of argument.
10368 \end_layout
10369
10370 \begin_layout Fact
10371 Used in a way similar to Proposition, though perhaps lower on the scale.
10372 \end_layout
10373
10374 \begin_layout Standard
10375 In addition, the AMS classes automatically provide the AMS \SpecialChar LaTeX
10376  and AMS fonts
10377  packages.
10378  They need to be available on your system in order to use these environments.
10379 \end_layout
10380
10381 \begin_layout Section
10382 AGU journals (
10383 \family sans
10384 aguplus
10385 \family default
10386 )
10387 \end_layout
10388
10389 \begin_layout Standard
10390 by 
10391 \shape smallcaps
10392 Martin Vermeer
10393 \end_layout
10394
10395 \begin_layout Subsection
10396 Description
10397 \end_layout
10398
10399 \begin_layout Standard
10400 These are the layout files for some of the journals of the American Geophysical
10401  Society.
10402  It is assumed that you have both the AGU's own class files and AGUplus
10403  installed (everything to be found at
10404 \begin_inset Flex URL
10405 status collapsed
10406
10407 \begin_layout Plain Layout
10408
10409 http://publications.agu.org/files/2013/08/AGU-LaTeX.zip
10410 \end_layout
10411
10412 \end_inset
10413
10414 ).
10415 \end_layout
10416
10417 \begin_layout Subsection
10418 New styles
10419 \end_layout
10420
10421 \begin_layout Standard
10422 Redefined are 
10423 \family sans
10424 Paragraph
10425 \family default
10426
10427 \family sans
10428 Paragraph*
10429 \family default
10430 .
10431  They are still called this in the \SpecialChar LyX
10432  GUI, though their \SpecialChar LaTeX
10433  equivalents in the
10434  AGU classes are 
10435 \family sans
10436 Subsubsubsection
10437 \family default
10438  and 
10439 \family sans
10440 Subsubsubsection*
10441 \family default
10442 .
10443 \end_layout
10444
10445 \begin_layout Standard
10446 Newly defined styles are 
10447 \family sans
10448 Left_Header
10449 \family default
10450
10451 \family sans
10452 Right_Header
10453 \family default
10454
10455 \family sans
10456 Received
10457 \family default
10458
10459 \family sans
10460 Revised
10461 \family default
10462
10463 \family sans
10464 Accepted
10465 \family default
10466
10467 \family sans
10468 CCC
10469 \family default
10470
10471 \family sans
10472 PaperId
10473 \family default
10474
10475 \family sans
10476 AuthorAddr
10477 \family default
10478
10479 \family sans
10480 SlugComment
10481 \family default
10482 .
10483  These are mostly manuscript attributes and defined in the AGU class documentati
10484 on.
10485 \end_layout
10486
10487 \begin_layout Standard
10488 I suspect this is still badly incomplete.
10489 \end_layout
10490
10491 \begin_layout Subsection
10492 New floats
10493 \end_layout
10494
10495 \begin_layout Standard
10496
10497 \family sans
10498 Planotable
10499 \family default
10500  and 
10501 \family sans
10502 Plate
10503 \family default
10504 .
10505  We also have a new 
10506 \family sans
10507 Table_Caption
10508 \family default
10509 .
10510 \end_layout
10511
10512 \begin_layout Subsection
10513 Supported journals
10514 \end_layout
10515
10516 \begin_layout Itemize
10517
10518 \emph on
10519 Journal of Geophysical Research
10520 \emph default
10521
10522 \family typewriter
10523 jgrga.layout
10524 \family default
10525  — Martin Vermeer
10526 \end_layout
10527
10528 \begin_layout Standard
10529 Add your own, it isn't so hard! Look at the 
10530 \family typewriter
10531 jgrga.layout
10532 \family default
10533  example and 
10534 \family typewriter
10535 aguplus.inc
10536 \family default
10537 .
10538 \end_layout
10539
10540 \begin_layout Subsection
10541 Bugs and things to remember
10542 \end_layout
10543
10544 \begin_layout Standard
10545 In order to use the new layouts, you must remember to do the following for
10546  a new document:
10547 \end_layout
10548
10549 \begin_layout Enumerate
10550
10551 \emph on
10552 Turn off babel
10553 \emph default
10554 .
10555  This can be done in the 
10556 \family sans
10557 Layout\SpecialChar menuseparator
10558 Document
10559 \family default
10560  or 
10561 \family sans
10562 Document\SpecialChar menuseparator
10563 Settings
10564 \family default
10565  menu item.
10566  (AGU articles are always in English, right? So 
10567 \emph on
10568 don't
10569 \emph default
10570  choose a language.)
10571 \end_layout
10572
10573 \begin_layout Enumerate
10574 Enter 
10575 \family typewriter
10576 jgrga
10577 \family default
10578  into the document's 
10579 \family sans
10580 Extra Options
10581 \family default
10582  field.
10583  (Yes, this is a bug.)
10584 \end_layout
10585
10586 \begin_layout Enumerate
10587 Make sure you use the 
10588 \family typewriter
10589 agu.bst
10590 \family default
10591  bibliography style, by entering 
10592 \family sans
10593 agu
10594 \family default
10595  into the second field of the Bib\SpecialChar TeX
10596  inset.
10597  None of the standard styles will do.
10598 \end_layout
10599
10600 \begin_layout Section
10601 Broadway
10602 \end_layout
10603
10604 \begin_layout Standard
10605 by 
10606 \shape smallcaps
10607 Garst Reese
10608 \end_layout
10609
10610 \begin_layout Subsection
10611 Introduction
10612 \end_layout
10613
10614 \begin_layout Standard
10615 Broadway is for writing plays.
10616  The format is more decorative than Hollywood, and much less standardized.
10617  This format should be suitable for workshops.
10618 \end_layout
10619
10620 \begin_layout Subsection
10621 Special problems
10622 \end_layout
10623
10624 \begin_layout Standard
10625 The same as in Hollywood.
10626 \end_layout
10627
10628 \begin_layout Subsection
10629 Special features
10630 \end_layout
10631
10632 \begin_layout Standard
10633 Insert the 
10634 \family sans
10635 Speaker
10636 \family default
10637  names as labels then cross-reference the label to insert the name.
10638  The cross-reference dialog will show the current cast of characters.
10639 \end_layout
10640
10641 \begin_layout Subsection
10642 Paper size and Margins
10643 \end_layout
10644
10645 \begin_layout Standard
10646 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
10647 \end_layout
10648
10649 \begin_layout Subsection
10650 Environments
10651 \end_layout
10652
10653 \begin_layout Standard
10654 The following environments are available.
10655  You can use broadway.bind to get the bind keys shown at the right.
10656 \end_layout
10657
10658 \begin_layout Itemize
10659
10660 \family sans
10661 Standard
10662 \begin_inset Newline newline
10663 \end_inset
10664
10665
10666 \family default
10667 You should not have to use this, but it is here for anything that does not
10668  fit otherwise.
10669 \end_layout
10670
10671 \begin_layout Itemize
10672
10673 \family sans
10674 Narrative
10675 \begin_inset space \hfill{}
10676 \end_inset
10677
10678 M-z n
10679 \begin_inset Newline newline
10680 \end_inset
10681
10682
10683 \family default
10684 Used to describe stage setting and the action.
10685  First use of speaker names in all CAPs.
10686 \end_layout
10687
10688 \begin_layout Itemize
10689
10690 \family sans
10691 ACT
10692 \begin_inset space \hfill{}
10693 \end_inset
10694
10695 M-z a
10696 \begin_inset Newline newline
10697 \end_inset
10698
10699
10700 \family default
10701 Automatically numbered.
10702  On screen it will be arabic, but will print as Roman.
10703 \end_layout
10704
10705 \begin_layout Itemize
10706
10707 \family sans
10708 ACT*
10709 \begin_inset space \hfill{}
10710 \end_inset
10711
10712 M-z S at
10713 \begin_inset Newline newline
10714 \end_inset
10715
10716
10717 \family default
10718 Subtitle for 
10719 \family sans
10720 ACT.
10721
10722 \family default
10723  It is just centered text.
10724 \end_layout
10725
10726 \begin_layout Itemize
10727
10728 \family sans
10729 SCENE
10730 \begin_inset space \hfill{}
10731 \end_inset
10732
10733 M-z S-S
10734 \begin_inset Newline newline
10735 \end_inset
10736
10737
10738 \family default
10739 Not automatically numbered.
10740  You supply the number.
10741  This is because I couldn't figure out how.
10742 \end_layout
10743
10744 \begin_layout Itemize
10745
10746 \family sans
10747 AT_RISE:
10748 \begin_inset space \hfill{}
10749 \end_inset
10750
10751 M-z S-R
10752 \begin_inset Newline newline
10753 \end_inset
10754
10755
10756 \family default
10757 A special case of Narrative to describe the setting and action as the curtain
10758  rises.
10759 \end_layout
10760
10761 \begin_layout Itemize
10762
10763 \family sans
10764 Speaker
10765 \begin_inset space \hfill{}
10766 \end_inset
10767
10768 M-z s
10769 \begin_inset Newline newline
10770 \end_inset
10771
10772
10773 \family default
10774 The speaker's (actor's) title, centered in all CAPS.
10775 \end_layout
10776
10777 \begin_layout Itemize
10778
10779 \family sans
10780 Parenthetical
10781 \begin_inset space \hfill{}
10782 \end_inset
10783
10784 M-z p
10785 \begin_inset Newline newline
10786 \end_inset
10787
10788
10789 \family default
10790 Instructions to the speaker.
10791  The parentheses are automatically inserted.
10792  The ( will appear on screen, but both will be in the printed play.
10793  This environment is only used within 
10794 \family sans
10795 Dialogue
10796 \family default
10797 .
10798 \end_layout
10799
10800 \begin_layout Itemize
10801
10802 \family sans
10803 Dialogue
10804 \begin_inset space \hfill{}
10805 \end_inset
10806
10807 M-z d
10808 \begin_inset Newline newline
10809 \end_inset
10810
10811
10812 \family default
10813 What the Speaker says.
10814 \end_layout
10815
10816 \begin_layout Itemize
10817
10818 \family sans
10819 CURTAIN
10820 \begin_inset space \hfill{}
10821 \end_inset
10822
10823 M-z S-C
10824 \begin_inset Newline newline
10825 \end_inset
10826
10827
10828 \family default
10829 The curtain comes down.
10830 \end_layout
10831
10832 \begin_layout Itemize
10833
10834 \family sans
10835 Title
10836 \begin_inset space \hfill{}
10837 \end_inset
10838
10839 M-z S-T
10840 \end_layout
10841
10842 \begin_layout Itemize
10843
10844 \family sans
10845 Author
10846 \begin_inset space \hfill{}
10847 \end_inset
10848
10849 M-z S-A
10850 \end_layout
10851
10852 \begin_layout Itemize
10853
10854 \family sans
10855 Right_Address
10856 \begin_inset space \hfill{}
10857 \end_inset
10858
10859 M-z r
10860 \end_layout
10861
10862 \begin_layout Standard
10863 Hello there.
10864 \end_layout
10865
10866 \begin_layout Section
10867 Dinbrief
10868 \end_layout
10869
10870 \begin_layout Standard
10871 The document class 
10872 \family sans
10873 dinbrief
10874 \family default
10875  can be used to type letters according to German conventions.
10876  A template file is included in 
10877 \family typewriter
10878 .../lyx/share/templates
10879 \family default
10880  for you to use as a starting point.
10881 \end_layout
10882
10883 \begin_layout Section
10884 EGS journals (
10885 \family sans
10886 egs
10887 \family default
10888 )
10889 \end_layout
10890
10891 \begin_layout Standard
10892 by 
10893 \shape smallcaps
10894 Martin Vermeer
10895 \end_layout
10896
10897 \begin_layout Subsection
10898 Description
10899 \end_layout
10900
10901 \begin_layout Standard
10902 This is the layout file for the European Geophysical Society journals.
10903  The needed 
10904 \family typewriter
10905 egs.cls
10906 \family default
10907  can be downloaded from the web site of the EGS under 
10908 \begin_inset Flex URL
10909 status collapsed
10910
10911 \begin_layout Plain Layout
10912
10913 www.copernicus.org
10914 \end_layout
10915
10916 \end_inset
10917
10918 .
10919 \end_layout
10920
10921 \begin_layout Subsection
10922 New styles
10923 \end_layout
10924
10925 \begin_layout Standard
10926
10927 \family sans
10928 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
10929  Accepted
10930 \family default
10931
10932 \family sans
10933 Offsets
10934 \family default
10935 .
10936  The current layout file is unfortunately very unmodular and would benefit
10937  from using the various 
10938 \family typewriter
10939 std*.inc
10940 \family default
10941  file inclusions.
10942 \end_layout
10943
10944 \begin_layout Section
10945 Elsevier Journals
10946 \end_layout
10947
10948 \begin_layout Standard
10949 See the \SpecialChar LyX
10950  template file 
10951 \family typewriter
10952 elsarticle.lyx
10953 \family default
10954 .
10955  It contains all infos you need.
10956 \end_layout
10957
10958 \begin_layout Section
10959 Foils [aka 
10960 \family sans
10961 Foil\SpecialChar TeX
10962
10963 \family default
10964 ]
10965 \begin_inset CommandInset label
10966 LatexCommand label
10967 name "sec:foiltex"
10968
10969 \end_inset
10970
10971
10972 \end_layout
10973
10974 \begin_layout Standard
10975 by 
10976 \noun on
10977 Allan Rae
10978 \end_layout
10979
10980 \begin_layout Subsection
10981 Introduction
10982 \end_layout
10983
10984 \begin_layout Standard
10985 This section describes how to use \SpecialChar LyX
10986  to make slides for overhead projectors.
10987  There are two document classes that can do this: the default slides class
10988  and the 
10989 \family sans
10990 Foil\SpecialChar TeX
10991
10992 \family default
10993  slides class.
10994  This section documents the latter.
10995 \end_layout
10996
10997 \begin_layout Standard
10998 I'm going to say this again, nice and clear, so that there's no misunderstanding
10999 :
11000 \end_layout
11001
11002 \begin_layout Standard
11003 \begin_inset VSpace bigskip
11004 \end_inset
11005
11006
11007 \end_layout
11008
11009 \begin_layout Standard
11010 \align center
11011
11012 \size large
11013 This section documents the class 
11014 \begin_inset Quotes eld
11015 \end_inset
11016
11017
11018 \family sans
11019 FoilTeX
11020 \family default
11021
11022 \begin_inset Quotes erd
11023 \end_inset
11024
11025  
11026 \emph on
11027 only.
11028 \end_layout
11029
11030 \begin_layout Standard
11031 \begin_inset VSpace bigskip
11032 \end_inset
11033
11034
11035 \end_layout
11036
11037 \begin_layout Standard
11038 If you're looking for the documentation for 
11039 \begin_inset Quotes eld
11040 \end_inset
11041
11042
11043 \family sans
11044 slides (default)
11045 \family default
11046
11047 \begin_inset Quotes erd
11048 \end_inset
11049
11050 , check out section
11051 \begin_inset space ~
11052 \end_inset
11053
11054
11055 \begin_inset CommandInset ref
11056 LatexCommand ref
11057 reference "sec:slitex"
11058
11059 \end_inset
11060
11061 .
11062  If your machine doesn't have the 
11063 \family sans
11064 foils
11065 \family default
11066  class 
11067 \family sans
11068 FoilTeX
11069 \family default
11070  installed, you'll probably have to use the default 
11071 \family sans
11072 slides
11073 \family default
11074  class, which isn't quite as good as 
11075 \family sans
11076 foils.
11077 \end_layout
11078
11079 \begin_layout Standard
11080 The 
11081 \family sans
11082 foils
11083 \family default
11084  class is designed for use with version
11085 \begin_inset space ~
11086 \end_inset
11087
11088 2.1 of the 
11089 \family sans
11090 foils.cls
11091 \family default
11092  \SpecialChar LaTeX
11093  class file which is now an integral part of \SpecialChar LaTeX2e
11094 .
11095 \end_layout
11096
11097 \begin_layout Subsection
11098 Getting Started
11099 \end_layout
11100
11101 \begin_layout Standard
11102 Obviously, to use this document class, you need to select 
11103 \family sans
11104 FoilTeX
11105 \family default
11106  from the 
11107 \family sans
11108 Class
11109 \family default
11110  entry in the 
11111 \family sans
11112 Document
11113 \begin_inset space ~
11114 \end_inset
11115
11116 Layout
11117 \family default
11118  dialog.
11119  There are some settings in the 
11120 \family sans
11121 Document
11122 \begin_inset space ~
11123 \end_inset
11124
11125 Layout
11126 \family default
11127  dialog that you should know about that are specific to this class:
11128 \end_layout
11129
11130 \begin_layout Itemize
11131 Don't change the options 
11132 \family sans
11133 Sides
11134 \family default
11135  and 
11136 \family sans
11137 Columns
11138 \family default
11139  on the 
11140 \family sans
11141 Document
11142 \begin_inset space ~
11143 \end_inset
11144
11145 Layout
11146 \family default
11147  dialog.
11148  They're ignored by the 
11149 \family sans
11150 foils
11151 \family default
11152  class.
11153 \end_layout
11154
11155 \begin_layout Itemize
11156 The default font size is 20
11157 \begin_inset space \thinspace{}
11158 \end_inset
11159
11160 pt with the other options being 17
11161 \begin_inset space \thinspace{}
11162 \end_inset
11163
11164 pt, 25
11165 \begin_inset space \thinspace{}
11166 \end_inset
11167
11168 pt and 30
11169 \begin_inset space \thinspace{}
11170 \end_inset
11171
11172 pt.
11173 \end_layout
11174
11175 \begin_layout Itemize
11176 The default font is 
11177 \family sans
11178 sans
11179 \family default
11180  
11181 \family sans
11182 serif
11183 \family default
11184  but all math equations are still typeset in the usual roman font.
11185 \end_layout
11186
11187 \begin_layout Itemize
11188
11189 \family sans
11190 Foil\SpecialChar TeX
11191
11192 \family default
11193  supports A4 and Letter paper sizes as well as a special size for working
11194  with 35
11195 \begin_inset space \thinspace{}
11196 \end_inset
11197
11198 mm slides.
11199  It doesn't support A5, B5, legal or executive paper sizes.
11200 \end_layout
11201
11202 \begin_layout Itemize
11203 Don't bother changing the 
11204 \family sans
11205 Float Placement
11206 \family default
11207  settings because they are ignored anyway.
11208  All floats appear where they are defined in the text.
11209 \end_layout
11210
11211 \begin_layout Itemize
11212 The 
11213 \family sans
11214 Pagestyle
11215 \family default
11216  setting behaves a bit differently for this class.
11217  
11218 \family sans
11219 Foil\SpecialChar TeX
11220
11221 \family default
11222  provides extensive footer and header capabilities including a user-defined
11223  logo.
11224  See section
11225 \begin_inset space ~
11226 \end_inset
11227
11228
11229 \begin_inset CommandInset ref
11230 LatexCommand ref
11231 reference "sec:foilfoot"
11232
11233 \end_inset
11234
11235  for more details.
11236  The title page is treated differently to all other pages in the document
11237  and is 
11238 \emph on
11239 always
11240 \emph default
11241  unnumbered and 
11242 \emph on
11243 always
11244 \emph default
11245  has the logo centered at the bottom of the page (if one is defined).
11246  The possible page style choices and what they do are as follows:
11247 \end_layout
11248
11249 \begin_deeper
11250 \begin_layout Labeling
11251 \labelwidthstring MMMMMMM
11252
11253 \family sans
11254 \series bold
11255 empty
11256 \family default
11257 \series default
11258  The final output contains no page numbers, or other headers or footers
11259  (except footnotes of course).
11260  
11261 \end_layout
11262
11263 \begin_layout Labeling
11264 \labelwidthstring MMMMMMM
11265
11266 \family sans
11267 \series bold
11268 plain
11269 \family default
11270 \series default
11271  The final output contains page numbers centered at the bottom of the page.
11272  No other headings or footers (other than footnotes).
11273 \end_layout
11274
11275 \begin_layout Labeling
11276 \labelwidthstring MMMMMMM
11277
11278 \series bold
11279 foilheadings
11280 \series default
11281  Page numbers in lower right corner.
11282  Additional headers and footers are also shown.
11283  This is also the default.
11284 \end_layout
11285
11286 \begin_layout Labeling
11287 \labelwidthstring MMMMMMM
11288
11289 \series bold
11290 fancy
11291 \series default
11292  Gives you access to the 
11293 \family sans
11294 fancyheadings
11295 \family default
11296  package although its use with 
11297 \family sans
11298 Foil\SpecialChar TeX
11299
11300 \family default
11301  is discouraged by the writer of the 
11302 \family sans
11303 Foil\SpecialChar TeX
11304
11305 \family default
11306  package because of some potential page layout clashes.
11307 \end_layout
11308
11309 \end_deeper
11310 \begin_layout Subsubsection
11311 Extra Options
11312 \end_layout
11313
11314 \begin_layout Standard
11315 The following options may be used in the extra class options in the 
11316 \family sans
11317 Document\SpecialChar menuseparator
11318 Settings
11319 \family default
11320  dialog.
11321 \end_layout
11322
11323 \begin_layout Labeling
11324 \labelwidthstring MMMMMMx
11325
11326 \series bold
11327 35mmSlide
11328 \series default
11329  This sets up the page layout for 7.33
11330 \begin_inset space \thinspace{}
11331 \end_inset
11332
11333 in by 11
11334 \begin_inset space \thinspace{}
11335 \end_inset
11336
11337 in paper, which is about the same aspect ratio as a 35
11338 \begin_inset space \thinspace{}
11339 \end_inset
11340
11341 mm slide, making it a bit easier to work with this medium.
11342 \end_layout
11343
11344 \begin_layout Labeling
11345 \labelwidthstring MMMMMMx
11346
11347 \series bold
11348 headrule
11349 \series default
11350  Places a rule across the page below the header on every page except the
11351  title page.
11352 \end_layout
11353
11354 \begin_layout Labeling
11355 \labelwidthstring MMMMMMx
11356
11357 \series bold
11358 footrule
11359 \series default
11360  Places a rule across the page above the footer on every page except the
11361  title page.
11362 \end_layout
11363
11364 \begin_layout Labeling
11365 \labelwidthstring MMMMMMx
11366
11367 \series bold
11368 dvips
11369 \series default
11370  This is automatically set each time you create a new 
11371 \family sans
11372 foils
11373 \family default
11374  document.
11375  This option tells 
11376 \family sans
11377 Foil\SpecialChar TeX
11378
11379 \family default
11380  to use the dvips driver to rotate those pages that are set as landscape
11381  foils.
11382 \end_layout
11383
11384 \begin_layout Labeling
11385 \labelwidthstring MMMMMMx
11386
11387 \series bold
11388 landscape
11389 \series default
11390  Simply changes the page dimensions to those of a landscape page but doesn't
11391  do any rotation.
11392  Thus if you use this option you need to use an external program to rotate
11393  each page or feed your paper through your printer as landscape.
11394  Note that this option effectively reverses the roles of the 
11395 \family sans
11396 Foilhead
11397 \family default
11398  and 
11399 \family sans
11400 Rotatefoilhead
11401 \family default
11402  environments (don't worry these are described in the next section).
11403 \end_layout
11404
11405 \begin_layout Labeling
11406 \labelwidthstring MMMMMMx
11407
11408 \series bold
11409 leqno
11410 \series default
11411  Equation numbers on the left.
11412 \end_layout
11413
11414 \begin_layout Labeling
11415 \labelwidthstring MMMMMMx
11416
11417 \series bold
11418 fleqn
11419 \series default
11420  Flush-left equations.
11421 \end_layout
11422
11423 \begin_layout Subsection
11424 Supported Environments
11425 \end_layout
11426
11427 \begin_layout Standard
11428 Most of the environments commonly supported in other classes are also supported
11429  by the 
11430 \family sans
11431 foils
11432 \family default
11433  class.
11434  There are several additional environments provided by 
11435 \family sans
11436 Foil\SpecialChar TeX
11437
11438 \family default
11439  as well as a couple added by \SpecialChar LyX
11440 .
11441  The following environments are shared with other classes:
11442 \end_layout
11443
11444 \begin_layout Standard
11445 \begin_inset Flex Multiple Columns
11446 status open
11447
11448 \begin_layout Itemize
11449
11450 \family sans
11451 Standard
11452 \end_layout
11453
11454 \begin_layout Itemize
11455
11456 \family sans
11457 Itemize
11458 \end_layout
11459
11460 \begin_layout Itemize
11461
11462 \family sans
11463 Enumerate
11464 \end_layout
11465
11466 \begin_layout Itemize
11467
11468 \family sans
11469 Description
11470 \end_layout
11471
11472 \begin_layout Itemize
11473
11474 \family sans
11475 List
11476 \end_layout
11477
11478 \begin_layout Itemize
11479
11480 \family sans
11481 \SpecialChar LyX
11482 -Code
11483 \end_layout
11484
11485 \begin_layout Itemize
11486
11487 \family sans
11488 Verse
11489 \end_layout
11490
11491 \begin_layout Itemize
11492
11493 \family sans
11494 Quote
11495 \end_layout
11496
11497 \begin_layout Itemize
11498
11499 \family sans
11500 Quotation
11501 \end_layout
11502
11503 \begin_layout Itemize
11504
11505 \family sans
11506 Title
11507 \end_layout
11508
11509 \begin_layout Itemize
11510
11511 \family sans
11512 Author
11513 \end_layout
11514
11515 \begin_layout Itemize
11516
11517 \family sans
11518 Date
11519 \end_layout
11520
11521 \begin_layout Itemize
11522
11523 \family sans
11524 Abstract
11525 \end_layout
11526
11527 \begin_layout Itemize
11528
11529 \family sans
11530 Bibliography
11531 \end_layout
11532
11533 \begin_layout Itemize
11534
11535 \family sans
11536 Address
11537 \end_layout
11538
11539 \begin_layout Itemize
11540
11541 \family sans
11542 RightAddress
11543 \end_layout
11544
11545 \begin_layout Itemize
11546
11547 \family sans
11548 Caption
11549 \end_layout
11550
11551 \begin_layout Itemize
11552
11553 \family sans
11554 Comment
11555 \end_layout
11556
11557 \end_inset
11558
11559
11560 \end_layout
11561
11562 \begin_layout Standard
11563 That is, all the major environments apart from the sectioning environments.
11564  Since foils are essentially self-contained sections, with a title and body,
11565  
11566 \family sans
11567 Foil\SpecialChar TeX
11568
11569 \family default
11570  provides specific commands for starting new foils and these are:
11571 \end_layout
11572
11573 \begin_layout Itemize
11574
11575 \family sans
11576 Foilhead
11577 \end_layout
11578
11579 \begin_layout Itemize
11580
11581 \family sans
11582 Rotatefoilhead
11583 \end_layout
11584
11585 \begin_layout Standard
11586 \SpecialChar LyX
11587  also provides slightly modified versions of these two environments called:
11588 \end_layout
11589
11590 \begin_layout Itemize
11591
11592 \family sans
11593 ShortFoilhead
11594 \end_layout
11595
11596 \begin_layout Itemize
11597
11598 \family sans
11599 ShortRotatefoilhead
11600 \end_layout
11601
11602 \begin_layout Standard
11603 and the differences will be explained in the next section.
11604 \end_layout
11605
11606 \begin_layout Standard
11607 Since foils are often used in presenting ideas or new theorems and such
11608  
11609 \family sans
11610 Foil\SpecialChar TeX
11611
11612 \family default
11613  also provides a comprehensive box of goodies for presenting them:
11614 \end_layout
11615
11616 \begin_layout Standard
11617 \begin_inset Flex Multiple Columns
11618 status open
11619
11620 \begin_layout Itemize
11621
11622 \family sans
11623 Theorem
11624 \end_layout
11625
11626 \begin_layout Itemize
11627
11628 \family sans
11629 Lemma
11630 \end_layout
11631
11632 \begin_layout Itemize
11633
11634 \family sans
11635 Corollary
11636 \end_layout
11637
11638 \begin_layout Itemize
11639
11640 \family sans
11641 Proposition
11642 \end_layout
11643
11644 \begin_layout Itemize
11645
11646 \family sans
11647 Definition
11648 \end_layout
11649
11650 \begin_layout Itemize
11651
11652 \family sans
11653 Proof
11654 \end_layout
11655
11656 \begin_layout Itemize
11657
11658 \family sans
11659 Theorem*
11660 \end_layout
11661
11662 \begin_layout Itemize
11663
11664 \family sans
11665 Lemma*
11666 \end_layout
11667
11668 \begin_layout Itemize
11669
11670 \family sans
11671 Corollary*
11672 \end_layout
11673
11674 \begin_layout Itemize
11675
11676 \family sans
11677 Proposition*
11678 \end_layout
11679
11680 \begin_layout Itemize
11681
11682 \family sans
11683 Definition*
11684 \end_layout
11685
11686 \end_inset
11687
11688
11689 \end_layout
11690
11691 \begin_layout Standard
11692 The starred versions are unnumbered while the unstarred versions are numbered.
11693  There are also two list environments added by \SpecialChar LyX
11694  and these are:
11695 \end_layout
11696
11697 \begin_layout Itemize
11698
11699 \family sans
11700 TickList
11701 \end_layout
11702
11703 \begin_layout Itemize
11704
11705 \family sans
11706 CrossList
11707 \end_layout
11708
11709 \begin_layout Standard
11710
11711 \family sans
11712 Foil\SpecialChar TeX
11713
11714 \family default
11715  provides some powerful header and footer capabilities that are best set
11716  in the preamble although they may be set at any point in a document.
11717  If you want to change these settings in your document the best place to
11718  do so is at the very top of a foil, i.
11719 \begin_inset space \thinspace{}
11720 \end_inset
11721
11722 e.
11723 \emph on
11724
11725 \begin_inset space \space{}
11726 \end_inset
11727
11728
11729 \emph default
11730 straight after the foilhead.
11731 \end_layout
11732
11733 \begin_layout Standard
11734 For this purpose, the following command styles are provided [
11735 \shape smallcaps
11736 Martin Vermeer
11737 \shape default
11738 ]:
11739 \end_layout
11740
11741 \begin_layout Standard
11742 \begin_inset Flex Multiple Columns
11743 status open
11744
11745 \begin_layout Itemize
11746
11747 \family sans
11748 My
11749 \begin_inset space ~
11750 \end_inset
11751
11752 Logo
11753 \end_layout
11754
11755 \begin_layout Itemize
11756
11757 \family sans
11758 Restriction
11759 \end_layout
11760
11761 \begin_layout Itemize
11762
11763 \family sans
11764 Right
11765 \begin_inset space ~
11766 \end_inset
11767
11768 Footer
11769 \end_layout
11770
11771 \begin_layout Itemize
11772
11773 \family sans
11774 Right
11775 \begin_inset space ~
11776 \end_inset
11777
11778 Header
11779 \end_layout
11780
11781 \begin_layout Itemize
11782
11783 \family sans
11784 Left
11785 \begin_inset space ~
11786 \end_inset
11787
11788 Header
11789 \end_layout
11790
11791 \begin_deeper
11792 \begin_layout Plain Layout
11793 \begin_inset space ~
11794 \end_inset
11795
11796
11797 \end_layout
11798
11799 \end_deeper
11800 \end_inset
11801
11802
11803 \end_layout
11804
11805 \begin_layout Standard
11806 There are also a few commands provided by 
11807 \family sans
11808 Foil\SpecialChar TeX
11809
11810 \family default
11811  that aren't directly supported by \SpecialChar LyX
11812  but I'll tell you what they do and how
11813  to use them in section
11814 \begin_inset space ~
11815 \end_inset
11816
11817
11818 \begin_inset CommandInset ref
11819 LatexCommand ref
11820 reference "sec:unsuppfoils"
11821
11822 \end_inset
11823
11824 .
11825 \end_layout
11826
11827 \begin_layout Subsection
11828 Building a Set of Foils
11829 \end_layout
11830
11831 \begin_layout Standard
11832 This section will give a simple introduction to using the different environments
11833  to build a set of foils.
11834  If you want to see an example set of foils, take a look at the 
11835 \family typewriter
11836 Foils.lyx
11837 \family default
11838  file you find in \SpecialChar LyX
11839 's 
11840 \family typewriter
11841 examples
11842 \family default
11843  folder.
11844 \end_layout
11845
11846 \begin_layout Subsubsection
11847 Give It a Title Page
11848 \end_layout
11849
11850 \begin_layout Standard
11851 Unlike other classes that provide 
11852 \family sans
11853 Title
11854 \family default
11855
11856 \family sans
11857 Author
11858 \family default
11859
11860 \family sans
11861 Date
11862 \family default
11863  and 
11864 \family sans
11865 Abstract
11866 \family default
11867  environments, 
11868 \family sans
11869 foils
11870 \family default
11871  creates the title on a page of its own.
11872  If you leave out the 
11873 \family sans
11874 Date
11875 \family default
11876  environment \SpecialChar LaTeX
11877  will substitute the current date (every time you regenerate
11878  the output).
11879 \end_layout
11880
11881 \begin_layout Subsubsection
11882 Start a New Foil
11883 \end_layout
11884
11885 \begin_layout Standard
11886 As I mentioned earlier, there are four ways of starting a new foil.
11887  For portrait foils you should use 
11888 \family sans
11889 Foilhead
11890 \family default
11891  or 
11892 \family sans
11893 ShortFoilhead.
11894
11895 \family default
11896  The difference between these two environments is the amount of space between
11897  the title of the foil (the foilhead) and the body of the foil.
11898 \end_layout
11899
11900 \begin_layout Standard
11901 Landscape foils are generated using the 
11902 \family sans
11903 Rotatefoilhead
11904 \family default
11905  and 
11906 \family sans
11907 ShortRotatefoilhead
11908 \family default
11909  environments.
11910  Again the only difference is the spacing between foilhead and body.
11911  Both of the short versions have 0.5
11912 \begin_inset space ~
11913 \end_inset
11914
11915 inches less separation between the foilhead and the body.
11916  
11917 \end_layout
11918
11919 \begin_layout Standard
11920 One problem with the support for landscape foils is the requirement that
11921  you have to use the 
11922 \family typewriter
11923 dvips
11924 \family default
11925  driver to generate the PostScript output otherwise the foils won't be rotated.
11926  It is possible to get landscape foils even if you haven't got the 
11927 \family typewriter
11928 dvips
11929 \family default
11930  driver provided you can feed your foils sideways through your printer ;-)
11931 \end_layout
11932
11933 \begin_layout Subsubsection
11934 Theorems, Lemmas, Proofs and more
11935 \end_layout
11936
11937 \begin_layout Standard
11938 Due to a small bug in \SpecialChar LyX
11939  you can't have two of the same type of these environments
11940  directly following each other.
11941  They must be separated by something.
11942  If you try, you will just be extending the previous environment as if you
11943  had merged the two environments together.
11944  So, how do you get around this problem? The simplest option is to insert
11945  some text between the two environments or add a 
11946 \family sans
11947 \SpecialChar LaTeX
11948
11949 \family default
11950  environment between the two with just a 
11951 \begin_inset Quotes eld
11952 \end_inset
11953
11954
11955 \family typewriter
11956 %
11957 \family default
11958
11959 \begin_inset Quotes erd
11960 \end_inset
11961
11962  in it.
11963  This will force \SpecialChar LyX
11964  to produce two separate environments and hence the correct
11965  \SpecialChar LaTeX
11966  output.
11967  An example is provided in the example file included with the \SpecialChar LyX
11968  distribution.
11969  Remember, this problem only occurs if you are trying to place two of the
11970  same type of theorem-like environments one directly after the other.
11971 \end_layout
11972
11973 \begin_layout Subsubsection
11974 Lists
11975 \end_layout
11976
11977 \begin_layout Standard
11978 You get all the commonly supported list styles found in other classes as
11979  well as two new ones.
11980  I'll only describe the new ones here.
11981  If you want to find out more about the other list environments check out
11982  the 
11983 \emph on
11984 User's Guide.
11985
11986 \emph default
11987  If you intend to use itemized lists you might also want to read about the
11988  
11989 \family sans
11990 Itemize
11991 \begin_inset space ~
11992 \end_inset
11993
11994 Bullet
11995 \begin_inset space ~
11996 \end_inset
11997
11998 Selection
11999 \family default
12000  dialog described above in section
12001 \begin_inset space ~
12002 \end_inset
12003
12004
12005 \begin_inset CommandInset ref
12006 LatexCommand ref
12007 reference "sec:bullet"
12008
12009 \end_inset
12010
12011 .
12012 \end_layout
12013
12014 \begin_layout Standard
12015 The two new list styles, 
12016 \family sans
12017 TickList
12018 \family default
12019  and 
12020 \family sans
12021 CrossList
12022 \family default
12023 , are designed to make it easier for you to create lists of do's and don'ts
12024  or right and wrong by providing dedicated environments that use a tick
12025  or a cross as the label of the list.
12026  These lists are in fact dedicated variants of the 
12027 \family sans
12028 Itemize
12029 \family default
12030  environment.
12031  They do however require that you have the 
12032 \family typewriter
12033 psnfss
12034 \family default
12035  packages installed.
12036 \end_layout
12037
12038 \begin_layout Subsubsection
12039 Figures and Tables
12040 \end_layout
12041
12042 \begin_layout Standard
12043
12044 \family sans
12045 Foil\SpecialChar TeX
12046
12047 \family default
12048  redefines the floating tables and figures so that they appear exactly where
12049  they are in the text rather than pushing them to the top of the page or
12050  to some user specified location.
12051  In fact if you change the float placement settings they are simply ignored.
12052 \end_layout
12053
12054 \begin_layout Subsubsection
12055 Page Headers and Footers
12056 \begin_inset CommandInset label
12057 LatexCommand label
12058 name "sec:foilfoot"
12059
12060 \end_inset
12061
12062
12063 \end_layout
12064
12065 \begin_layout Standard
12066
12067 \family sans
12068 My
12069 \begin_inset space ~
12070 \end_inset
12071
12072 Logo
12073 \family default
12074  and 
12075 \family sans
12076 Restriction
12077 \family default
12078  are two commands used to control the left-footer text string.
12079  The first is meant to allow you to include a graphic logo on your foils
12080  and defaults to 
12081 \begin_inset Quotes eld
12082 \end_inset
12083
12084 -Typeset by 
12085 \family sans
12086 Foil\SpecialChar TeX
12087
12088 \family default
12089 -
12090 \begin_inset Quotes erd
12091 \end_inset
12092
12093 .
12094  While the second is meant to provide a classification for the audience,
12095  
12096 \emph on
12097 e.
12098 \begin_inset space \thinspace{}
12099 \end_inset
12100
12101 g.
12102 \emph default
12103
12104 \begin_inset space \space{}
12105 \end_inset
12106
12107 Confidential.
12108  It is empty by default.
12109 \end_layout
12110
12111 \begin_layout Standard
12112 The remaining page corners can be filled by 
12113 \family sans
12114 Right
12115 \begin_inset space ~
12116 \end_inset
12117
12118 Footer
12119 \family default
12120  (which defaults to page numbers), 
12121 \family sans
12122 Right
12123 \begin_inset space ~
12124 \end_inset
12125
12126 Header
12127 \family default
12128  (top right) and 
12129 \family sans
12130 Left
12131 \begin_inset space ~
12132 \end_inset
12133
12134 Header
12135 \family default
12136  (top left).
12137 \end_layout
12138
12139 \begin_layout Subsection
12140 Unsupported 
12141 \family sans
12142 Foil\SpecialChar TeX
12143
12144 \family default
12145  Goodies
12146 \begin_inset CommandInset label
12147 LatexCommand label
12148 name "sec:unsuppfoils"
12149
12150 \end_inset
12151
12152
12153 \end_layout
12154
12155 \begin_layout Standard
12156 All the commands mentioned below need to be set in a 
12157 \family sans
12158 \SpecialChar LaTeX
12159
12160 \family default
12161  environment or as 
12162 \family sans
12163 \SpecialChar TeX
12164
12165 \family default
12166  within another environment.
12167 \end_layout
12168
12169 \begin_layout Subsubsection
12170 Lengths
12171 \end_layout
12172
12173 \begin_layout Standard
12174 All lengths are adjusted using the 
12175 \family typewriter
12176
12177 \backslash
12178 setlength{
12179 \family default
12180 \emph on
12181 lengthname
12182 \family typewriter
12183 \emph default
12184 }{
12185 \family default
12186 \emph on
12187 newlength
12188 \family typewriter
12189 \emph default
12190 }
12191 \family default
12192  command.
12193  Where 
12194 \emph on
12195 lengthname
12196 \emph default
12197  should be replaced by the name given to the length you want to change and
12198  
12199 \emph on
12200 newlength
12201 \emph default
12202  is the length value.
12203  All lengths should be specified in units of length such as inches (
12204 \family typewriter
12205 in
12206 \family default
12207 ), millimeters (
12208 \family typewriter
12209 mm
12210 \family default
12211 ) or points (
12212 \family typewriter
12213 pt
12214 \family default
12215 ) or relative to some document or font-based length such as 
12216 \family typewriter
12217
12218 \backslash
12219 textwidth
12220 \family default
12221 .
12222  
12223 \end_layout
12224
12225 \begin_layout Standard
12226 It's possible to change the spacing between a foilhead and the body of the
12227  foil by adjusting the length specified by 
12228 \family typewriter
12229
12230 \backslash
12231 foilheadskip
12232 \family default
12233 .
12234  For example, to make 
12235 \emph on
12236 all
12237 \emph default
12238  foilheads 0.5
12239 \begin_inset space \space{}
12240 \end_inset
12241
12242 in closer to their bodies put the following in the preamble: 
12243 \family typewriter
12244
12245 \backslash
12246 setlength{
12247 \backslash
12248 foilheadskip}{-0.5in}
12249 \end_layout
12250
12251 \begin_layout Standard
12252 The spacings around floats can be adjusted by setting these lengths:
12253 \end_layout
12254
12255 \begin_layout Labeling
12256 \labelwidthstring MMMMMMMMMMM
12257
12258 \family typewriter
12259
12260 \backslash
12261 abovefloatskip
12262 \family default
12263  Separation between the text and the top of the float
12264 \end_layout
12265
12266 \begin_layout Labeling
12267 \labelwidthstring MMMMMMMMMMM
12268
12269 \family typewriter
12270
12271 \backslash
12272 abovecaptionskip
12273 \family default
12274  Separation between the float and the caption
12275 \end_layout
12276
12277 \begin_layout Labeling
12278 \labelwidthstring MMMMMMMMMMM
12279
12280 \family typewriter
12281
12282 \backslash
12283 belowcaptionskip
12284 \family default
12285  Separation between the caption and the following text
12286 \end_layout
12287
12288 \begin_layout Labeling
12289 \labelwidthstring MMMMMMMMMMM
12290
12291 \family typewriter
12292
12293 \backslash
12294 captionwidth
12295 \family default
12296  You can make the captions narrower than the surrounding text by adjusting
12297  this length.
12298  Best done relative to 
12299 \family typewriter
12300
12301 \backslash
12302 textwidth
12303 \family default
12304 .
12305 \end_layout
12306
12307 \begin_layout Standard
12308 There are also several title page related lengths that you may find useful
12309  if you have a long title or several authors:
12310 \end_layout
12311
12312 \begin_layout Labeling
12313 \labelwidthstring MMMMMMMMMMM
12314
12315 \family typewriter
12316
12317 \backslash
12318 abovetitleskip
12319 \family default
12320  Separation from headers to 
12321 \family sans
12322 Title
12323 \end_layout
12324
12325 \begin_layout Labeling
12326 \labelwidthstring MMMMMMMMMMM
12327
12328 \family typewriter
12329
12330 \backslash
12331 titleauthorskip
12332 \family default
12333  between 
12334 \family sans
12335 Title
12336 \family default
12337  and 
12338 \family sans
12339 Author
12340 \family default
12341  environments
12342 \end_layout
12343
12344 \begin_layout Labeling
12345 \labelwidthstring MMMMMMMMMMM
12346
12347 \family typewriter
12348
12349 \backslash
12350 authorauthorskip
12351 \family default
12352  between multiple 
12353 \family sans
12354 Author
12355 \family default
12356  lines
12357 \end_layout
12358
12359 \begin_layout Labeling
12360 \labelwidthstring MMMMMMMMMMM
12361
12362 \family typewriter
12363
12364 \backslash
12365 authordateskip
12366 \family default
12367  between the 
12368 \family sans
12369 Author
12370 \family default
12371  and the 
12372 \family sans
12373 Date
12374 \end_layout
12375
12376 \begin_layout Labeling
12377 \labelwidthstring MMMMMMMMMMM
12378
12379 \family typewriter
12380
12381 \backslash
12382 dateabstractskip
12383 \family default
12384  between the 
12385 \family sans
12386 Date
12387 \family default
12388  and the 
12389 \family sans
12390 Abstract
12391 \end_layout
12392
12393 \begin_layout Standard
12394 The last length related command affects all the list environments.
12395  If you place 
12396 \family typewriter
12397
12398 \backslash
12399 zerolistvertdimens
12400 \family default
12401  
12402 \emph on
12403 inside
12404 \emph default
12405  a list environment then all the vertical spacing between the list items
12406  is removed.
12407  Note that this is a command not a length so it doesn't require 
12408 \family typewriter
12409
12410 \backslash
12411 setlength
12412 \family default
12413  like the stuff mentioned above.
12414 \end_layout
12415
12416 \begin_layout Subsubsection
12417 Headers and Footers
12418 \end_layout
12419
12420 \begin_layout Standard
12421 The 
12422 \family typewriter
12423
12424 \backslash
12425 LogoOn
12426 \family default
12427  and 
12428 \family typewriter
12429
12430 \backslash
12431 LogoOff
12432 \family default
12433  commands control whether the logo in the 
12434 \family sans
12435 MyLogo
12436 \family default
12437  definition appear on a given page.
12438  If you put 
12439 \family typewriter
12440
12441 \backslash
12442 LogoOff
12443 \family default
12444  in the preamble then none of the foils will have the logo on them.
12445  If you don't want the logo on a particular page place the 
12446 \family typewriter
12447
12448 \backslash
12449 LogoOff
12450 \family default
12451  directly after the foilhead of that page and the 
12452 \family typewriter
12453
12454 \backslash
12455 LogoOn
12456 \family default
12457  directly after the next foilhead.
12458 \end_layout
12459
12460 \begin_layout Standard
12461 If you decide to use the 
12462 \family sans
12463 fancy
12464 \family default
12465  page style setting in the 
12466 \family sans
12467 Document
12468 \begin_inset space ~
12469 \end_inset
12470
12471 Layout
12472 \family default
12473  dialog you should probably add 
12474 \family typewriter
12475
12476 \backslash
12477 let
12478 \backslash
12479 headwidth
12480 \backslash
12481 textwidth
12482 \family default
12483  to your preamble so headers and footers on landscape pages are correctly
12484  placed when rotated.
12485  This is due to some clashes between the page layouts provided by the 
12486 \family sans
12487 fancyheadings
12488 \family default
12489  package and the 
12490 \family sans
12491 foils
12492 \family default
12493  class.
12494 \end_layout
12495
12496 \begin_layout Section
12497 Hollywood (Hollywood spec scripts)
12498 \end_layout
12499
12500 \begin_layout Standard
12501 by 
12502 \shape smallcaps
12503 Garst Reese
12504 \end_layout
12505
12506 \begin_layout Subsection
12507 Introduction
12508 \end_layout
12509
12510 \begin_layout Standard
12511 Getting the format of a Hollywood script right is a 
12512 \begin_inset Quotes eld
12513 \end_inset
12514
12515 rite of passage.
12516 \begin_inset Quotes erd
12517 \end_inset
12518
12519  It is designed to make the readers focus on content and to be easy and
12520  familiar for the actors to read.
12521  Each page of a script should be one minute of film.
12522  Nothing goes in a script that you cannot see or hear on screen.
12523  The courier 12 pt font should be used throughout.
12524  No italics.
12525 \end_layout
12526
12527 \begin_layout Subsection
12528 Special problems
12529 \end_layout
12530
12531 \begin_layout Standard
12532 Speakers' lines should NEVER break in mid-sentence.
12533  If a speaker's lines continue over a page break, repeat the 
12534 \family sans
12535 Speaker
12536 \family default
12537  title followed by (Cont'd).
12538 \end_layout
12539
12540 \begin_layout Subsection
12541 Special features
12542 \end_layout
12543
12544 \begin_layout Standard
12545 Insert the 
12546 \family sans
12547 Speaker
12548 \family default
12549  names as labels then cross-reference the label to insert the name.
12550  The cross-reference dialog will show the current cast of characters.
12551  You can use this to insert the speaker name in narratives also.
12552 \end_layout
12553
12554 \begin_layout Subsection
12555 Paper size and Margins
12556 \end_layout
12557
12558 \begin_layout Standard
12559 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
12560 \end_layout
12561
12562 \begin_layout Subsection
12563 Environments
12564 \end_layout
12565
12566 \begin_layout Standard
12567 The following environments are available.
12568  You can use hollywood.bind to get the bind keys shown at the right.
12569 \end_layout
12570
12571 \begin_layout Itemize
12572
12573 \family sans
12574 Standard
12575 \begin_inset Newline newline
12576 \end_inset
12577
12578
12579 \family default
12580 Used where nothing else works.
12581  Try to avoid it.
12582 \end_layout
12583
12584 \begin_layout Itemize
12585
12586 \family sans
12587 FADE_IN
12588 \family default
12589 :
12590 \begin_inset space \hfill{}
12591 \end_inset
12592
12593
12594 \family sans
12595 M-z S-I
12596 \family default
12597
12598 \begin_inset Newline newline
12599 \end_inset
12600
12601 Usually followed by something like 
12602 \begin_inset Quotes eld
12603 \end_inset
12604
12605 on Sally waking up.
12606 \begin_inset Quotes erd
12607 \end_inset
12608
12609
12610 \end_layout
12611
12612 \begin_layout Itemize
12613
12614 \family sans
12615 INT:
12616 \begin_inset space \hfill{}
12617 \end_inset
12618
12619 M-z i
12620 \begin_inset Newline newline
12621 \end_inset
12622
12623
12624 \family default
12625 Introduces a new INTERIOR camera set-up.
12626  Always followed by DAY or NIGHT, or something similar to define the lighting
12627  required.
12628  Everthing on this line in CAPS.
12629 \end_layout
12630
12631 \begin_layout Itemize
12632
12633 \family sans
12634 EXT:
12635 \begin_inset space \hfill{}
12636 \end_inset
12637
12638 M-z e
12639 \begin_inset Newline newline
12640 \end_inset
12641
12642
12643 \family default
12644 Introduces a new EXTERIOR camera set-up.
12645  Everthing on this line in CAPS.
12646 \end_layout
12647
12648 \begin_layout Itemize
12649
12650 \family sans
12651 Speaker
12652 \begin_inset space \hfill{}
12653 \end_inset
12654
12655 M-z s
12656 \begin_inset Newline newline
12657 \end_inset
12658
12659
12660 \family default
12661 The character speaking.
12662 \end_layout
12663
12664 \begin_layout Itemize
12665
12666 \family sans
12667 Parenthetical
12668 \begin_inset space \hfill{}
12669 \end_inset
12670
12671 M-z p
12672 \begin_inset Newline newline
12673 \end_inset
12674
12675
12676 \family default
12677 Instructions to the speaker.
12678  The () are automatically inserted, but only the ( will show in \SpecialChar LyX
12679 .
12680  Both will be printed.
12681 \end_layout
12682
12683 \begin_layout Itemize
12684
12685 \family sans
12686 Dialogue
12687 \begin_inset space \hfill{}
12688 \end_inset
12689
12690 M-z d
12691 \begin_inset Newline newline
12692 \end_inset
12693
12694
12695 \family default
12696 What the 
12697 \family sans
12698 Speaker
12699 \family default
12700  says.
12701 \end_layout
12702
12703 \begin_layout Itemize
12704
12705 \family sans
12706 Transition
12707 \begin_inset space \hfill{}
12708 \end_inset
12709
12710 M-z t
12711 \begin_inset Newline newline
12712 \end_inset
12713
12714
12715 \family default
12716 Camera movement instruction.
12717  e.
12718 \begin_inset space \thinspace{}
12719 \end_inset
12720
12721 g.
12722 \begin_inset space \space{}
12723 \end_inset
12724
12725 CUT TO:
12726 \end_layout
12727
12728 \begin_layout Itemize
12729
12730 \family sans
12731 FADE OUT:
12732 \begin_inset space \hfill{}
12733 \end_inset
12734
12735 M-z S-I
12736 \end_layout
12737
12738 \begin_layout Itemize
12739
12740 \family sans
12741 Author
12742 \begin_inset space \hfill{}
12743 \end_inset
12744
12745 M-z S-A
12746 \end_layout
12747
12748 \begin_layout Itemize
12749
12750 \family sans
12751 Title
12752 \begin_inset space \hfill{}
12753 \end_inset
12754
12755 M-z S-T
12756 \end_layout
12757
12758 \begin_layout Itemize
12759
12760 \family sans
12761 Right_Address
12762 \begin_inset space \hfill{}
12763 \end_inset
12764
12765 M-z r
12766 \end_layout
12767
12768 \begin_layout Subsection
12769 Script jargon
12770 \end_layout
12771
12772 \begin_layout Itemize
12773 (O.S) — off screen
12774 \end_layout
12775
12776 \begin_layout Itemize
12777 (V.0) — voice over
12778 \end_layout
12779
12780 \begin_layout Itemize
12781 b.
12782 \begin_inset space \thinspace{}
12783 \end_inset
12784
12785 g.
12786  — background
12787 \end_layout
12788
12789 \begin_layout Itemize
12790 C.U.
12791  — close-up
12792 \end_layout
12793
12794 \begin_layout Itemize
12795 PAN — camera movement
12796 \end_layout
12797
12798 \begin_layout Itemize
12799 INSERT — cut to close-up of
12800 \end_layout
12801
12802 \begin_layout Section
12803 ijmpc and ijmpd
12804 \end_layout
12805
12806 \begin_layout Standard
12807 by 
12808 \noun on
12809 Panayotis Papasotiriou
12810 \end_layout
12811
12812 \begin_layout Subsection
12813 Overview
12814 \end_layout
12815
12816 \begin_layout Standard
12817 The ijmpc package is a set of macros that facilitates electronic manuscript
12818  submission to the 
12819 \emph on
12820 International Journal of Modern Physics C
12821 \emph default
12822 .
12823  Similarly, the ijmpd package is for creating manuscripts to be submitted
12824  to the 
12825 \emph on
12826 International Journal of Modern Physics D
12827 \emph default
12828 .
12829  Both journals are published by World Scientific.
12830  The corresponding document classes are named 
12831 \family typewriter
12832 ws-ijmpc.cls
12833 \family default
12834  and 
12835 \family typewriter
12836 ws-ijmpd.cls
12837 \family default
12838 , respectively.
12839  These files, together with instructions for the authors, can be downloaded
12840  from the sites 
12841 \begin_inset Flex URL
12842 status collapsed
12843
12844 \begin_layout Plain Layout
12845
12846 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
12847 \end_layout
12848
12849 \end_inset
12850
12851  and 
12852 \begin_inset Flex URL
12853 status collapsed
12854
12855 \begin_layout Plain Layout
12856
12857 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
12858 \end_layout
12859
12860 \end_inset
12861
12862 .
12863  Both packages are modified versions of the standard 
12864 \begin_inset Quotes eld
12865 \end_inset
12866
12867 article
12868 \begin_inset Quotes erd
12869 \end_inset
12870
12871  package, and they are almost (but not exactly) identical.
12872  Most of their features are supported by \SpecialChar LyX
12873 .
12874  I have used \SpecialChar LyX
12875  successfully to write articles submitted to both journals
12876  without any problem.
12877 \end_layout
12878
12879 \begin_layout Subsection
12880 Writing a paper
12881 \end_layout
12882
12883 \begin_layout Standard
12884 As usual, the easiest way to write a paper is to start with a template.
12885  Click on 
12886 \family sans
12887 File\SpecialChar menuseparator
12888 New from
12889 \family default
12890  
12891 \family sans
12892 Template
12893 \family default
12894 , then choose the 
12895 \family typewriter
12896 ijmpc.lyx
12897 \family default
12898  or 
12899 \family typewriter
12900 ijmpd.lyx
12901 \family default
12902  template.
12903  This will give an (almost) empty document that includes the most common
12904  fields found in a manuscript.
12905  Simply overwrite the existing text (including the brackets, 
12906 \family typewriter
12907 <>
12908 \family default
12909 ) with your text.
12910  You should keep in mind the following remarks.
12911 \end_layout
12912
12913 \begin_layout Enumerate
12914 \SpecialChar LyX
12915  won't let you change the font size and the page style of the document,
12916  because such modifications are not allowed by both packages.
12917 \end_layout
12918
12919 \begin_layout Enumerate
12920 The language of the document should not be changed.
12921  Before previewing your paper, be sure that the babel package is not used.
12922  To do this, click on 
12923 \family sans
12924 Tools\SpecialChar menuseparator
12925 Preferences
12926 \family default
12927 , select the 
12928 \family sans
12929 Lang Opts
12930 \family default
12931  tab, deselect the 
12932 \family sans
12933 Use babel
12934 \family default
12935  checkbox in the language settings, and click on 
12936 \family sans
12937 Apply
12938 \family default
12939  (or 
12940 \family sans
12941 Save
12942 \family default
12943 , if you wish to make this change permanent).
12944 \end_layout
12945
12946 \begin_layout Enumerate
12947 The 
12948 \begin_inset Quotes eld
12949 \end_inset
12950
12951 Keywords
12952 \begin_inset Quotes erd
12953 \end_inset
12954
12955  style must be used to define keywords.
12956 \end_layout
12957
12958 \begin_layout Enumerate
12959 The ijmpc package provides a style named 
12960 \begin_inset Quotes eld
12961 \end_inset
12962
12963 Classification Codes
12964 \begin_inset Quotes erd
12965 \end_inset
12966
12967 , which can be used to define classification codes, such as PACS numbers.
12968  Note that this facility is not supported by the ijmpd package.
12969 \end_layout
12970
12971 \begin_layout Enumerate
12972 Several new environments are available: 
12973 \begin_inset Quotes eld
12974 \end_inset
12975
12976 Definition
12977 \begin_inset Quotes erd
12978 \end_inset
12979
12980
12981 \begin_inset Quotes eld
12982 \end_inset
12983
12984 Step
12985 \begin_inset Quotes erd
12986 \end_inset
12987
12988
12989 \begin_inset Quotes eld
12990 \end_inset
12991
12992 Example
12993 \begin_inset Quotes erd
12994 \end_inset
12995
12996
12997 \begin_inset Quotes eld
12998 \end_inset
12999
13000 Remark
13001 \begin_inset Quotes erd
13002 \end_inset
13003
13004
13005 \begin_inset Quotes eld
13006 \end_inset
13007
13008 Notation
13009 \begin_inset Quotes erd
13010 \end_inset
13011
13012
13013 \begin_inset Quotes eld
13014 \end_inset
13015
13016 Theorem
13017 \begin_inset Quotes erd
13018 \end_inset
13019
13020
13021 \begin_inset Quotes eld
13022 \end_inset
13023
13024 Proof
13025 \begin_inset Quotes erd
13026 \end_inset
13027
13028
13029 \begin_inset Quotes eld
13030 \end_inset
13031
13032 Corollary
13033 \begin_inset Quotes erd
13034 \end_inset
13035
13036
13037 \begin_inset Quotes eld
13038 \end_inset
13039
13040 Lemma
13041 \begin_inset Quotes erd
13042 \end_inset
13043
13044
13045 \begin_inset Quotes eld
13046 \end_inset
13047
13048 Proposition
13049 \begin_inset Quotes erd
13050 \end_inset
13051
13052
13053 \begin_inset Quotes eld
13054 \end_inset
13055
13056 Prop
13057 \begin_inset Quotes erd
13058 \end_inset
13059
13060
13061 \begin_inset Quotes eld
13062 \end_inset
13063
13064 Question
13065 \begin_inset Quotes erd
13066 \end_inset
13067
13068
13069 \begin_inset Quotes eld
13070 \end_inset
13071
13072 Claim
13073 \begin_inset Quotes erd
13074 \end_inset
13075
13076 , and 
13077 \begin_inset Quotes eld
13078 \end_inset
13079
13080 Conjecture
13081 \begin_inset Quotes erd
13082 \end_inset
13083
13084 .
13085  Their use is more or less obvious.
13086  \SpecialChar LyX
13087  supports all these environments; it will use the proper label, text style,
13088  and numbering scheme for each of them.
13089 \end_layout
13090
13091 \begin_layout Enumerate
13092 Both packages use basic citations; the natbib package should not be used.
13093  In \SpecialChar LyX
13094 , citation references are shown as usual; in the output, citations are
13095  shown as superscripts.
13096  If you want to use a citation as normal text, you should use the 
13097 \family typewriter
13098 refcite
13099 \family default
13100  command, e.
13101 \begin_inset space \thinspace{}
13102 \end_inset
13103
13104 g.
13105 \begin_inset space \space{}
13106 \end_inset
13107
13108
13109 \begin_inset Quotes eld
13110 \end_inset
13111
13112 See Ref.
13113 \begin_inset space \space{}
13114 \end_inset
13115
13116
13117 \family typewriter
13118
13119 \backslash
13120 refcite{key}
13121 \family default
13122
13123 \begin_inset Quotes erd
13124 \end_inset
13125
13126 .
13127 \end_layout
13128
13129 \begin_layout Enumerate
13130 There is no 
13131 \begin_inset Quotes eld
13132 \end_inset
13133
13134 Acknowledgments
13135 \begin_inset Quotes erd
13136 \end_inset
13137
13138  section in both packages.
13139  To put acknowledgments, just use the 
13140 \begin_inset Quotes eld
13141 \end_inset
13142
13143 Section*
13144 \begin_inset Quotes erd
13145 \end_inset
13146
13147  environment.
13148 \end_layout
13149
13150 \begin_layout Enumerate
13151 Appendices may be added to the paper, 
13152 \emph on
13153 after
13154 \emph default
13155  the Acknowledgments and 
13156 \shape italic
13157 before
13158 \shape default
13159  the References.
13160  \SpecialChar LyX
13161  provides a special environment, called 
13162 \begin_inset Quotes eld
13163 \end_inset
13164
13165 Appendices Section
13166 \begin_inset Quotes erd
13167 \end_inset
13168
13169  which marks the beginning of the appendices.
13170  This environment should be left blank; it just sends a \SpecialChar LaTeX
13171  command, but nothing
13172  is really printed.
13173  In \SpecialChar LyX
13174 , the word 
13175 \begin_inset Quotes eld
13176 \end_inset
13177
13178 Appendix
13179 \begin_inset Quotes erd
13180 \end_inset
13181
13182  is printed with blue letters, as a signal that all sections after that
13183  point are appendices.
13184  To write an appendix, use the 
13185 \begin_inset Quotes eld
13186 \end_inset
13187
13188 Appendix
13189 \begin_inset Quotes erd
13190 \end_inset
13191
13192  environment.
13193  \SpecialChar LyX
13194  will number each appendix with capital letters, as required by both journals.
13195  Note that 
13196 \begin_inset Quotes eld
13197 \end_inset
13198
13199 Appendices Section
13200 \begin_inset Quotes erd
13201 \end_inset
13202
13203  
13204 \emph on
13205 must
13206 \emph default
13207  be present before the first appendix; if not, all appendices will be numbered
13208  as normal sections in the output.
13209 \end_layout
13210
13211 \begin_layout Enumerate
13212 The ijmpc and the ijmpd packages use the 
13213 \family typewriter
13214 tbl
13215 \family default
13216  command to implement table captions.
13217  As a result, a table created by \SpecialChar LyX
13218  is printed correctly, but its caption
13219  is ignored.
13220  However, you can use some \SpecialChar TeX
13221  code to overcome this problem, so that captions
13222  are printed as expected.
13223  To do so, create a float table as usual, remove the caption, and replace
13224  it with the \SpecialChar TeX
13225  code 
13226 \family typewriter
13227
13228 \backslash
13229 tbl{
13230 \emph on
13231 your table caption
13232 \emph default
13233 }{
13234 \family default
13235  (sic); you must also the \SpecialChar TeX
13236  code 
13237 \family typewriter
13238 }
13239 \family default
13240  immediately after the tabular material.
13241  Study the example table included in the template files to see how this
13242  trick is implemented.
13243  Alternatively, If you need table captions, you should implement the whole
13244  table float in a 
13245 \family typewriter
13246 .tex
13247 \family default
13248  file, then include this file to the \SpecialChar LyX
13249  document (
13250 \family sans
13251 Insert\SpecialChar menuseparator
13252 File\SpecialChar menuseparator
13253 Child
13254 \begin_inset space ~
13255 \end_inset
13256
13257 Document
13258 \family default
13259 ).
13260  Details on how to create a table float can be found in the files 
13261 \family typewriter
13262 ws-ijmpc.tex
13263 \family default
13264  and 
13265 \family typewriter
13266 ws-ijmpd.tex
13267 \family default
13268 , included in the corresponding packages.
13269 \end_layout
13270
13271 \begin_layout Subsection
13272 Preparing a paper for submission
13273 \end_layout
13274
13275 \begin_layout Standard
13276 Before you submit your paper you must export the \SpecialChar LyX
13277  document as a \SpecialChar LaTeX
13278  file (
13279 \family sans
13280 File\SpecialChar menuseparator
13281 Export\SpecialChar menuseparator
13282 \SpecialChar LaTeX
13283
13284 \family default
13285 )
13286 \begin_inset Foot
13287 status open
13288
13289 \begin_layout Plain Layout
13290 Actually you have the choice between \SpecialChar LaTeX
13291  (plain) and pdflatex.
13292  If you intend to use pdflatex to prepare the paper, you should use the
13293  pdflatex option so that included graphics are converted to PDF format,
13294  ready for use by pdflatex.
13295 \end_layout
13296
13297 \end_inset
13298
13299 , then make the following changes to the resulting 
13300 \family typewriter
13301 .tex
13302 \family default
13303  file.
13304 \end_layout
13305
13306 \begin_layout Enumerate
13307 Remove the comment lines before the 
13308 \family typewriter
13309
13310 \backslash
13311 documentclass
13312 \family default
13313  command.
13314 \end_layout
13315
13316 \begin_layout Enumerate
13317 Remove everything between (and including) the 
13318 \family typewriter
13319
13320 \backslash
13321 makeatletter
13322 \family default
13323  and 
13324 \family typewriter
13325
13326 \backslash
13327 makeatother
13328 \family default
13329  commands, except for any commands you specifically put into the \SpecialChar LaTeX
13330  preamble.
13331 \end_layout
13332
13333 \begin_layout Standard
13334 The modified 
13335 \family typewriter
13336 .tex
13337 \family default
13338  file should be saved and processed through \SpecialChar LaTeX
13339  as many times as necessary.
13340  You may also want to check the resulting 
13341 \family typewriter
13342 .dvi
13343 \family default
13344  document.
13345 \end_layout
13346
13347 \begin_layout Subsection
13348 Use of \SpecialChar TeX
13349  code
13350 \end_layout
13351
13352 \begin_layout Standard
13353 The use of \SpecialChar TeX
13354  code is reduced to two commands, which must be placed at the
13355  top of the document.
13356  If you started writing your paper by using the 
13357 \family typewriter
13358 ijmpc.lyx
13359 \family default
13360  or the 
13361 \family typewriter
13362 ijmpd.lyx
13363 \family default
13364  template, the \SpecialChar TeX
13365  code needed is already in its place; you usually don't need
13366  to delete it.
13367  You may only modify the first \SpecialChar TeX
13368  code to specify the information printed
13369  to the top of odd and even pages (authors' names and short paper's title,
13370  respectively).
13371  This \SpecialChar TeX
13372  code must have the form 
13373 \family typewriter
13374
13375 \backslash
13376 markboth{Authors' Names}{Short Paper's Title}
13377 \family default
13378 .
13379 \end_layout
13380
13381 \begin_layout Section
13382 iopart
13383 \end_layout
13384
13385 \begin_layout Standard
13386 by 
13387 \noun on
13388 Uwe Stöhr
13389 \end_layout
13390
13391 \begin_layout Subsection
13392 Overview
13393 \end_layout
13394
13395 \begin_layout Standard
13396 The iopart package provides a document class to create electronic manuscript
13397  submission to the journals published by the Institute of Physics.
13398  Instructions for the authors how to create a paper using the iopart class
13399  can be downloaded together with the iopart package from the site 
13400 \begin_inset Flex URL
13401 status collapsed
13402
13403 \begin_layout Plain Layout
13404
13405 ftp://ftp.iop.org/pub/journals/latex2e
13406 \end_layout
13407
13408 \end_inset
13409
13410 .
13411 \end_layout
13412
13413 \begin_layout Subsection
13414 Writing a paper
13415 \end_layout
13416
13417 \begin_layout Standard
13418 The easiest way to write a paper is to start with the file 
13419 \emph on
13420 IOP-article.lyx
13421 \emph default
13422  that is available in \SpecialChar LyX
13423 's examples files folder.
13424  Open this file, save it under a new name, and start writing.
13425  The example file explains how to use the special text environments.
13426  Here are the most important advices:
13427 \end_layout
13428
13429 \begin_layout Itemize
13430 To be able to compile your document to a PDF, PS, or DVI, ensure that the
13431  two options 
13432 \family sans
13433 Use AMS math package
13434 \family default
13435  in the document settings under 
13436 \family sans
13437 Math Options
13438 \family default
13439  are not used!
13440 \end_layout
13441
13442 \begin_layout Itemize
13443
13444 \size normal
13445 The title environment defines the kind of your paper.
13446  So use one of the following environments for the title:
13447 \end_layout
13448
13449 \begin_deeper
13450 \begin_layout Itemize
13451
13452 \family sans
13453 \size normal
13454 Title
13455 \family default
13456  for a Paper
13457 \end_layout
13458
13459 \begin_layout Itemize
13460
13461 \family sans
13462 \size normal
13463 Review
13464 \family default
13465  for a Review
13466 \end_layout
13467
13468 \begin_layout Itemize
13469
13470 \family sans
13471 \size normal
13472 Topical
13473 \family default
13474  for a Topical review
13475 \end_layout
13476
13477 \begin_layout Itemize
13478
13479 \family sans
13480 \size normal
13481 Comment
13482 \family default
13483  for a Comment
13484 \end_layout
13485
13486 \begin_layout Itemize
13487
13488 \family sans
13489 \size normal
13490 Note
13491 \family default
13492  for a Note
13493 \end_layout
13494
13495 \begin_layout Itemize
13496
13497 \family sans
13498 \size normal
13499 Paper
13500 \family default
13501  for a Paper (same as Title)
13502 \end_layout
13503
13504 \begin_layout Itemize
13505
13506 \family sans
13507 \size normal
13508 Prelim
13509 \family default
13510  for a Preliminary communication
13511 \end_layout
13512
13513 \begin_layout Itemize
13514
13515 \family sans
13516 \size normal
13517 Rapid
13518 \family default
13519  for a Rapid communication
13520 \end_layout
13521
13522 \begin_layout Itemize
13523
13524 \family sans
13525 \size normal
13526 Letter
13527 \family default
13528  for a Letter to the editor
13529 \end_layout
13530
13531 \end_deeper
13532 \begin_layout Itemize
13533
13534 \size normal
13535 All title environments except of 
13536 \family sans
13537 Letter
13538 \family default
13539  can have an optional short title.
13540 \end_layout
13541
13542 \begin_layout Itemize
13543 There is a general title environment 
13544 \family sans
13545 Article
13546 \family default
13547  which is not directly supported by the \SpecialChar LyX
13548 .
13549  This can be used as \SpecialChar TeX
13550  code when your document doesn't fit into one of the
13551  other title types.
13552 \end_layout
13553
13554 \begin_layout Standard
13555 For more informations like hints for special table and formula formatting,
13556  look at the IOP author guidelines.
13557 \end_layout
13558
13559 \begin_layout Section
13560 Kluwer
13561 \end_layout
13562
13563 \begin_layout Standard
13564 by 
13565 \noun on
13566 Panayotis Papasotiriou
13567 \end_layout
13568
13569 \begin_layout Subsection
13570 Overview
13571 \end_layout
13572
13573 \begin_layout Standard
13574 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
13575  that facilitates electronic manuscript submission to the journals they
13576  publish.
13577  Most known of them (at least in my domain of interest) are 
13578 \emph on
13579 Astrophysics and Space Science
13580 \emph default
13581  and 
13582 \emph on
13583 Solar Physics
13584 \emph default
13585 , but there are many others (see a complete list at 
13586 \begin_inset Flex URL
13587 status open
13588
13589 \begin_layout Plain Layout
13590
13591 http://www.wkap.nl/jrnllist.htm/JRNLHOME
13592 \end_layout
13593
13594 \end_inset
13595
13596 ).
13597  The Kluwer package may be downloaded from the site 
13598 \begin_inset Flex URL
13599 status collapsed
13600
13601 \begin_layout Plain Layout
13602
13603 http://www.wkap.nl/kaphtml.htm/STYLEFILES
13604 \end_layout
13605
13606 \end_inset
13607
13608 .
13609  A complete user guide is contained in that package (but it can also be
13610  downloaded separately).
13611 \end_layout
13612
13613 \begin_layout Standard
13614 \SpecialChar LyX
13615  supports many features of the package but not everything.
13616  However, the \SpecialChar TeX
13617  code needed is reduced to some 
13618 \begin_inset Quotes eld
13619 \end_inset
13620
13621 peculiar
13622 \begin_inset Quotes erd
13623 \end_inset
13624
13625  commands of the package (see
13626 \begin_inset space ~
13627 \end_inset
13628
13629
13630 \begin_inset CommandInset ref
13631 LatexCommand ref
13632 reference "subsec:kluwer_peculiarities"
13633
13634 \end_inset
13635
13636 ).
13637  I have recently used \SpecialChar LyX
13638  to write an article submitted to the 
13639 \emph on
13640 Astrophysics and Space Science
13641 \emph default
13642  without any problem.
13643 \end_layout
13644
13645 \begin_layout Subsection
13646 Writing a paper
13647 \end_layout
13648
13649 \begin_layout Standard
13650 The easiest way to write a paper is to start with the Kluwer template file.
13651  Click on 
13652 \family sans
13653 File\SpecialChar menuseparator
13654 New from
13655 \family default
13656  
13657 \family sans
13658 Template
13659 \family default
13660 , then choose the 
13661 \family typewriter
13662 kluwer.lyx
13663 \family default
13664  template.
13665  This will give an (almost) empty document that includes the most common
13666  fields found in a manuscript and a short description of their use.
13667  As in most templates, simply overwrite the existing text (including the
13668  brackets, 
13669 \family typewriter
13670 <>
13671 \family default
13672 ) with the correct information.
13673 \end_layout
13674
13675 \begin_layout Subsection
13676 Preparing a paper for submission
13677 \end_layout
13678
13679 \begin_layout Standard
13680 As in the AAS\SpecialChar TeX
13681  package, before you submit your paper to a journal you must
13682  
13683 \begin_inset Quotes eld
13684 \end_inset
13685
13686 postprocess
13687 \begin_inset Quotes erd
13688 \end_inset
13689
13690  it as follows.
13691 \end_layout
13692
13693 \begin_layout Enumerate
13694 Export your paper as a \SpecialChar LaTeX
13695  file.
13696  To do this, click on 
13697 \family sans
13698 File\SpecialChar menuseparator
13699 Export\SpecialChar menuseparator
13700 \SpecialChar LaTeX
13701
13702 \family default
13703 .
13704  
13705 \end_layout
13706
13707 \begin_layout Enumerate
13708 Edit the resulting 
13709 \family typewriter
13710 .tex
13711 \family default
13712  file with a text editor and make the following changes
13713 \end_layout
13714
13715 \begin_deeper
13716 \begin_layout Enumerate
13717 remove the comment lines before the 
13718 \family typewriter
13719
13720 \backslash
13721 documentclass
13722 \family default
13723  command,
13724 \end_layout
13725
13726 \begin_layout Enumerate
13727 remove everything between (and including) the 
13728 \family typewriter
13729
13730 \backslash
13731 makeatletter
13732 \family default
13733  and 
13734 \family typewriter
13735
13736 \backslash
13737 makeatother
13738 \family default
13739  commands, except for any commands you specifically put into the \SpecialChar LaTeX
13740  preamble.
13741 \end_layout
13742
13743 \begin_layout Standard
13744 Save the resulting 
13745 \family typewriter
13746 .tex
13747 \family default
13748  file.
13749 \end_layout
13750
13751 \end_deeper
13752 \begin_layout Enumerate
13753 Run the 
13754 \family typewriter
13755 .tex
13756 \family default
13757  file through \SpecialChar LaTeX
13758  as many times as necessary (usually up to three).
13759 \end_layout
13760
13761 \begin_layout Enumerate
13762 View the resulting 
13763 \family typewriter
13764 .dvi
13765 \family default
13766  document using, e.
13767 \begin_inset space \thinspace{}
13768 \end_inset
13769
13770 g.
13771 \begin_inset space \space{}
13772 \end_inset
13773
13774
13775 \family sans
13776 xdvi
13777 \family default
13778 , and check if everything is OK (it should, if you didn't make any mistake).
13779 \end_layout
13780
13781 \begin_layout Subsection
13782 \begin_inset Quotes eld
13783 \end_inset
13784
13785 Peculiarities
13786 \begin_inset Quotes erd
13787 \end_inset
13788
13789  of the Kluwer package
13790 \begin_inset CommandInset label
13791 LatexCommand label
13792 name "subsec:kluwer_peculiarities"
13793
13794 \end_inset
13795
13796
13797 \end_layout
13798
13799 \begin_layout Standard
13800 The Kluwer package has the following 
13801 \begin_inset Quotes eld
13802 \end_inset
13803
13804 peculiarities
13805 \begin_inset Quotes erd
13806 \end_inset
13807
13808 .
13809 \end_layout
13810
13811 \begin_layout Enumerate
13812 It is possible to write multiple articles in the same \SpecialChar LaTeX
13813  file
13814 \begin_inset Foot
13815 status collapsed
13816
13817 \begin_layout Plain Layout
13818 I can't imagine any good reason to do this.
13819 \end_layout
13820
13821 \end_inset
13822
13823 .
13824  Each article must be included in the environment 
13825 \begin_inset Quotes eld
13826 \end_inset
13827
13828 article
13829 \begin_inset Quotes erd
13830 \end_inset
13831
13832 .
13833  Unfortunately, this environment cannot be omitted, even if you write just
13834  one article.
13835  Therefore, each article starts with the command 
13836 \family typewriter
13837
13838 \backslash
13839 begin{article}
13840 \family default
13841  and, obviously, ends with the command 
13842 \family typewriter
13843
13844 \backslash
13845 end{article}
13846 \family default
13847 .
13848  Although this can be implemented in \SpecialChar LyX
13849 , I didn't included it, since it looks
13850  ugly and can confuse the novice user.
13851  Therefore, you need to enter them directly and mark them as \SpecialChar LaTeX
13852  code (the
13853  well-known 
13854 \begin_inset Quotes eld
13855 \end_inset
13856
13857 \SpecialChar TeX
13858  code
13859 \begin_inset Quotes erd
13860 \end_inset
13861
13862 ).
13863 \end_layout
13864
13865 \begin_layout Enumerate
13866 Information given at the beginning of the article (i.
13867 \begin_inset space \thinspace{}
13868 \end_inset
13869
13870 e.
13871 \begin_inset space \space{}
13872 \end_inset
13873
13874 title, subtitle, author, institution, running title, running author, abstract
13875  and keywords) must be included in an environment called 
13876 \begin_inset Quotes eld
13877 \end_inset
13878
13879 opening
13880 \begin_inset Quotes erd
13881 \end_inset
13882
13883 .
13884  This is not implemented in \SpecialChar LyX
13885 , so you must enter title, subtitle etc.
13886 \begin_inset space ~
13887 \end_inset
13888
13889 between two \SpecialChar TeX
13890  code lines (
13891 \family typewriter
13892
13893 \backslash
13894 begin{opening}
13895 \family default
13896  and 
13897 \family typewriter
13898
13899 \backslash
13900 end{opening}
13901 \family default
13902 ).
13903 \end_layout
13904
13905 \begin_layout Enumerate
13906 According to the user manual, the label of each bibliography item must be
13907  written as 
13908 \family typewriter
13909
13910 \backslash
13911 protect
13912 \backslash
13913 citeauthoryear{
13914 \family default
13915 \emph on
13916 author(s)
13917 \family typewriter
13918 \emph default
13919 }{
13920 \family default
13921 \emph on
13922 year
13923 \family typewriter
13924 \emph default
13925 }
13926 \family default
13927 .
13928 \end_layout
13929
13930 \begin_layout Standard
13931 The 
13932 \family typewriter
13933 kluwer.lyx
13934 \family default
13935  template takes care of all these 
13936 \begin_inset Quotes eld
13937 \end_inset
13938
13939 peculiarities
13940 \begin_inset Quotes erd
13941 \end_inset
13942
13943 .
13944  If you start a new paper using this template you don't need to do anything
13945  special.
13946  Just 
13947 \end_layout
13948
13949 \begin_layout Enumerate
13950 don't delete the \SpecialChar TeX
13951  code included in the template, and
13952 \end_layout
13953
13954 \begin_layout Enumerate
13955 copy the example bibliography item included in the template and modify it
13956  as necessary to enter new bibliography items.
13957 \end_layout
13958
13959 \begin_layout Section
13960 Koma-Script
13961 \end_layout
13962
13963 \begin_layout Standard
13964 by 
13965 \noun on
13966 Bernd Rellermeyer
13967 \end_layout
13968
13969 \begin_layout Subsection
13970 Overview
13971 \end_layout
13972
13973 \begin_layout Standard
13974 The \SpecialChar LyX
13975  document classes 
13976 \emph on
13977 article (koma-script)
13978 \emph default
13979
13980 \emph on
13981 report (koma-script)
13982 \emph default
13983
13984 \emph on
13985 book
13986 \emph default
13987  
13988 \emph on
13989 (koma-script)
13990 \emph default
13991 , and 
13992 \emph on
13993 letter
13994 \emph default
13995  
13996 \emph on
13997 (koma-script)
13998 \emph default
13999  correspond to the \SpecialChar LaTeX
14000  document classes 
14001 \family typewriter
14002 scrartcl.cls
14003 \family default
14004
14005 \family typewriter
14006 scrreprt.cls
14007 \family default
14008
14009 \family typewriter
14010 scrbook.cls
14011 \family default
14012 , and 
14013 \family typewriter
14014 scrlettr.cls
14015 \family default
14016 , resp.
14017 \begin_inset space ~
14018 \end_inset
14019
14020 of the Koma-Script family.
14021  They are replacements for the standard document classes 
14022 \family typewriter
14023 article.cls
14024 \family default
14025
14026 \family typewriter
14027 report.cls
14028 \family default
14029
14030 \family typewriter
14031 book.cls
14032 \family default
14033  and 
14034 \family typewriter
14035 letter.cls
14036 \family default
14037 , resp., and fit better to European typography conventions in a number of
14038  points.
14039 \end_layout
14040
14041 \begin_layout Itemize
14042 Standard character size is 11pt in 
14043 \emph on
14044 article (koma-script)
14045 \emph default
14046
14047 \emph on
14048 report (koma-script)
14049 \emph default
14050 , and 
14051 \emph on
14052 book (koma-script)
14053 \emph default
14054 , and 12pt in 
14055 \emph on
14056 letter (koma-script)
14057 \emph default
14058 .
14059 \end_layout
14060
14061 \begin_layout Itemize
14062 Headings, labels of the description environment, and a number of elements
14063  of the 
14064 \emph on
14065 letter (koma-script)
14066 \emph default
14067  document class are set in a bold sans serif font.
14068 \begin_inset Foot
14069 status collapsed
14070
14071 \begin_layout Plain Layout
14072 There is a big difference between the bold sans serif old cm fonts and new
14073  ec fonts, especially in the appearance of headings.
14074  In comparison, the ec bold sans serif fonts look a bit thin.
14075  Here the \SpecialChar LaTeX
14076  package 
14077 \family typewriter
14078 cmsd.sty by
14079 \family default
14080  
14081 \shape smallcaps
14082 Walter Schmidt
14083 \shape default
14084  helps to produce the 
14085 \begin_inset Quotes eld
14086 \end_inset
14087
14088 usual
14089 \begin_inset Quotes erd
14090 \end_inset
14091
14092  appearance when using the ec fonts.
14093 \end_layout
14094
14095 \end_inset
14096
14097  The numbering of chapter headings is made in the same way as the numbering
14098  of section headings, that is without the extra line 
14099 \begin_inset Quotes eld
14100 \end_inset
14101
14102 Chapter\SpecialChar ldots
14103
14104 \begin_inset Quotes erd
14105 \end_inset
14106
14107 .
14108  In addition, the appearance of the headings can be modified by using a
14109  number of options (in \SpecialChar LyX
14110  to be entered in the field 
14111 \family sans
14112 Extra
14113 \begin_inset space ~
14114 \end_inset
14115
14116 Options
14117 \family default
14118  of the dialog 
14119 \family sans
14120 Layout\SpecialChar menuseparator
14121 Document
14122 \family default
14123 ).
14124  
14125 \end_layout
14126
14127 \begin_layout Itemize
14128 The main means in the Koma-Script document classes to design the type area
14129  are the options 
14130 \family sans
14131 BCOR
14132 \family default
14133  and 
14134 \family sans
14135 DIV
14136 \family default
14137  (in \SpecialChar LyX
14138  to be entered in the extra class options field in the dialog 
14139 \family sans
14140 Document\SpecialChar menuseparator
14141 Settings
14142 \family default
14143 ).
14144  They make a clearer modification of page margins possible as do the options
14145  of the dialog 
14146 \family sans
14147 Document\SpecialChar menuseparator
14148 Settings
14149 \family default
14150 .
14151  
14152 \end_layout
14153
14154 \begin_layout Itemize
14155 The \SpecialChar LaTeX
14156  document classes of the Koma-Script family define a number of additional
14157  commands.
14158  Those part of it which makes sense in \SpecialChar LyX
14159  is implemented in corresponding
14160  paragraph types.
14161 \end_layout
14162
14163 \begin_layout Standard
14164 Detailed descriptions of the \SpecialChar LaTeX
14165  document classes of the Koma-Script family
14166  can be found in the Koma-Script documentation 
14167 \emph on
14168 scrguide
14169 \emph default
14170  (German) and 
14171 \emph on
14172 scrguien
14173 \emph default
14174  (English).
14175 \end_layout
14176
14177 \begin_layout Subsection
14178 article (koma-script), report (koma-script), and book (koma-script)
14179 \end_layout
14180
14181 \begin_layout Standard
14182 The document classes 
14183 \emph on
14184 article (koma-script)
14185 \emph default
14186
14187 \emph on
14188 report (koma-script)
14189 \emph default
14190 , and 
14191 \emph on
14192 book
14193 \emph default
14194  
14195 \emph on
14196 (koma-script)
14197 \emph default
14198  are implemented in the layout files 
14199 \family typewriter
14200 scrartcl.layout
14201 \family default
14202
14203 \family typewriter
14204 scrreprt.layout
14205 \family default
14206 , and 
14207 \family typewriter
14208 scrbook.layout
14209 \family default
14210 , resp.
14211  They contain all the paragraph types of the corresponding standard document
14212  classes 
14213 \emph on
14214 article
14215 \emph default
14216
14217 \emph on
14218 report
14219 \emph default
14220 , and 
14221 \emph on
14222 book
14223 \emph default
14224 , resp., partly modified, with the exception of the \SpecialChar LyX
14225  specific 
14226 \family sans
14227 List
14228 \family default
14229 -type, which is replaced by the new 
14230 \family sans
14231 Labeling
14232 \family default
14233 -type having the same functionality.
14234  Beside the 
14235 \family sans
14236 Labeling
14237 \family default
14238 -Type there is a number of new paragraph types added.
14239  They are 
14240 \emph on
14241 not
14242 \emph default
14243  part of 
14244 \emph on
14245 letter (koma-script)
14246 \emph default
14247 .
14248 \end_layout
14249
14250 \begin_layout Itemize
14251
14252 \family sans
14253 Addpart, Addchap
14254 \family default
14255
14256 \family sans
14257 Addsec
14258 \family default
14259 : are equivalents to 
14260 \family sans
14261 Part*, Chapter*
14262 \family default
14263  and 
14264 \family sans
14265 Section*
14266 \family default
14267 , resp., additionally inserting an entry in the table of contents.
14268  
14269 \family sans
14270 Addpart
14271 \family default
14272  and 
14273 \family sans
14274 Addchap
14275 \family default
14276  are not contained in 
14277 \emph on
14278 article (koma-script)
14279 \emph default
14280 .
14281 \end_layout
14282
14283 \begin_layout Itemize
14284
14285 \family sans
14286 Addchap*
14287 \family default
14288
14289 \family sans
14290 Addsec*
14291 \family default
14292 : behave exactly as 
14293 \family sans
14294 Addchap
14295 \family default
14296  and 
14297 \family sans
14298 Addsec
14299 \family default
14300 , resp., additionally clearing running heads.
14301  
14302 \family sans
14303 Addchap*
14304 \family default
14305  is not contained in 
14306 \emph on
14307 article (koma-script)
14308 \emph default
14309 .
14310 \begin_inset Foot
14311 status collapsed
14312
14313 \begin_layout Plain Layout
14314 There is also an 
14315 \family typewriter
14316
14317 \backslash
14318 addpart*
14319 \family default
14320  command in 
14321 \emph on
14322 book (koma-script)
14323 \emph default
14324  and in 
14325 \emph on
14326 report (koma-script)
14327 \emph default
14328 , but since this is identical to 
14329 \family sans
14330 Part*
14331 \family default
14332 , is has not been implemented in \SpecialChar LyX
14333 .
14334 \end_layout
14335
14336 \end_inset
14337
14338
14339 \end_layout
14340
14341 \begin_layout Itemize
14342
14343 \family sans
14344 Minisec
14345 \family default
14346 : generates a heading directly above the following paragraph in the standard
14347  character size without affecting the structure of the document.
14348 \end_layout
14349
14350 \begin_layout Itemize
14351
14352 \family sans
14353 Captionabove
14354 \family default
14355  and 
14356 \family sans
14357 Captionbelow
14358 \family default
14359  are special captions which respect the different space settings needed
14360  for captions placed above or below an element (if you follow strict typographic
14361  rules, you might want to place table captions always above the table).
14362  You can also use the class option 
14363 \family typewriter
14364 tablecaptionsabove
14365 \family default
14366 , which will switch 
14367 \family sans
14368 caption
14369 \family default
14370  to 
14371 \family sans
14372 captionabove
14373 \family default
14374  for tables and 
14375 \family sans
14376 captionbelow
14377 \family default
14378  for figures.
14379  You need at least Koma-Script version 2.8q to use this.
14380 \end_layout
14381
14382 \begin_layout Itemize
14383
14384 \family sans
14385 Dictum
14386 \family default
14387 : can be used to set a bonmot, e.
14388 \begin_inset space \thinspace{}
14389 \end_inset
14390
14391 g.
14392 \begin_inset space \space{}
14393 \end_inset
14394
14395 at the beginning of a chapter.
14396  If you use the optional argument (
14397 \family sans
14398 Insert\SpecialChar menuseparator
14399 Short
14400 \begin_inset space ~
14401 \end_inset
14402
14403 Title
14404 \family default
14405 ), you can insert the dictum's author there.
14406  Dictum and author are separated by a line.
14407  You need at least Koma-Script version 2.8q to use this.
14408  
14409 \family sans
14410 Dictum
14411 \family default
14412  is not contained in 
14413 \emph on
14414 article (koma-script)
14415 \emph default
14416 .
14417 \end_layout
14418
14419 \begin_layout Standard
14420 The following types, together with the standard types 
14421 \family sans
14422 Title
14423 \family default
14424
14425 \family sans
14426 Author
14427 \family default
14428 , and 
14429 \family sans
14430 Date
14431 \family default
14432 , form the title area of the document.
14433  They must be entered ahead of the first 
14434 \begin_inset Quotes eld
14435 \end_inset
14436
14437 ordinary
14438 \begin_inset Quotes erd
14439 \end_inset
14440
14441  paragraph.
14442 \begin_inset Foot
14443 status collapsed
14444
14445 \begin_layout Plain Layout
14446 The corresponding \SpecialChar LaTeX
14447  commands must appear before the 
14448 \family typewriter
14449
14450 \backslash
14451 maketitle
14452 \family default
14453  command.
14454 \end_layout
14455
14456 \end_inset
14457
14458  When such a type is used more than once, the latter usage overwrites the
14459  former one, that means, for every type only the latest usage is valid.
14460  The order of the different types however has, like 
14461 \family sans
14462 Title
14463 \family default
14464
14465 \family sans
14466 Author
14467 \family default
14468 , and 
14469 \family sans
14470 Date
14471 \family default
14472 , no effect on the appearance of the produced document.
14473 \end_layout
14474
14475 \begin_layout Itemize
14476
14477 \family sans
14478 Subject
14479 \family default
14480 : produces a centered paragraph above the ordinary title (
14481 \family sans
14482 Title
14483 \family default
14484
14485 \family sans
14486 Author
14487 \family default
14488
14489 \family sans
14490 Date
14491 \family default
14492 ) for the subject of the document.
14493 \end_layout
14494
14495 \begin_layout Itemize
14496
14497 \family sans
14498 Publishers
14499 \family default
14500 : produces a centered paragraph below 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 publishers' name.
14513 \end_layout
14514
14515 \begin_layout Itemize
14516
14517 \family sans
14518 Dedication
14519 \family default
14520 : in 
14521 \emph on
14522 report (koma-script)
14523 \emph default
14524  and 
14525 \emph on
14526 book (koma-script)
14527 \emph default
14528  produces a centered paragraph on its own page behind the title page, or
14529  in 
14530 \emph on
14531 article (koma-script)
14532 \emph default
14533  produces a centered paragraph below the ordinary title (
14534 \family sans
14535 Title
14536 \family default
14537
14538 \family sans
14539 Author
14540 \family default
14541
14542 \family sans
14543 Date
14544 \family default
14545
14546 \family sans
14547 Publishers
14548 \family default
14549 ) for a dedication.
14550 \end_layout
14551
14552 \begin_layout Itemize
14553
14554 \family sans
14555 Titlehead
14556 \family default
14557 : produces a left aligned paragraph above the ordinary title (
14558 \family sans
14559 Title
14560 \family default
14561
14562 \family sans
14563 Author
14564 \family default
14565
14566 \family sans
14567 Date
14568 \family default
14569
14570 \family sans
14571 Subject
14572 \family default
14573 ) for a document`s head.
14574 \end_layout
14575
14576 \begin_layout Itemize
14577
14578 \family sans
14579 Uppertitleback
14580 \family default
14581 : produces in a double-sided print in 
14582 \emph on
14583 report (koma-script)
14584 \emph default
14585  and 
14586 \emph on
14587 book (koma-script)
14588 \emph default
14589  a left-aligned paragraph at the top of the title page`s back or has no
14590  effect in a single-sided print or in 
14591 \emph on
14592 article (koma-script)
14593 \emph default
14594 .
14595 \end_layout
14596
14597 \begin_layout Itemize
14598
14599 \family sans
14600 Lowertitleback
14601 \family default
14602 : produces in a double-sided print in 
14603 \emph on
14604 report (koma-script)
14605 \emph default
14606  and 
14607 \emph on
14608 book (koma-script)
14609 \emph default
14610  a left-aligned paragraph at the bottom of the title page`s back or has
14611  no effect in a single-sided print or in 
14612 \emph on
14613 article (koma-script)
14614 \emph default
14615 .
14616 \end_layout
14617
14618 \begin_layout Itemize
14619
14620 \family sans
14621 Extratitle
14622 \family default
14623 : produces a special 
14624 \begin_inset Quotes eld
14625 \end_inset
14626
14627 dirty
14628 \begin_inset Quotes erd
14629 \end_inset
14630
14631  page ahead of the actual document containing a paragraph without special
14632  formatting.
14633 \end_layout
14634
14635 \begin_layout Standard
14636 The layout files for the document classes 
14637 \emph on
14638 article (koma-script)
14639 \emph default
14640
14641 \emph on
14642 report (koma-script)
14643 \emph default
14644 , and 
14645 \emph on
14646 book (koma-script)
14647 \emph default
14648  do include the file 
14649 \family typewriter
14650 scrmacros.inc
14651 \family default
14652 .
14653  This is thought of as a place to define your own types.
14654  Copy scrmacros
14655 \family typewriter
14656 .inc
14657 \family default
14658  in your personal layout directory and edit the file!
14659 \end_layout
14660
14661 \begin_layout Subsection
14662 letter (koma-script)
14663 \end_layout
14664
14665 \begin_layout Standard
14666 \noindent
14667 The document class 
14668 \emph on
14669 letter (koma-script)
14670 \emph default
14671  is implemented in the layout file 
14672 \family typewriter
14673 scrlettr.layout
14674 \family default
14675 .
14676  It contains all the paragraph types of the corresponding standard document
14677  class 
14678 \emph on
14679 letter
14680 \emph default
14681 , partly modified, with the exception of the \SpecialChar LyX
14682  specific types 
14683 \family sans
14684 \SpecialChar LyX
14685 -Code
14686 \family default
14687  and 
14688 \family sans
14689 Comment
14690 \family default
14691  and the 
14692 \family sans
14693 List
14694 \family default
14695  type, which is replaced by the new 
14696 \family sans
14697 Labeling
14698 \family default
14699  type.
14700  In addition, it contains, in contrast to the standard document class, the
14701  standard types 
14702 \family sans
14703 \SpecialChar LaTeX
14704
14705 \family default
14706
14707 \family sans
14708 Quotation
14709 \family default
14710
14711 \family sans
14712 Quote
14713 \family default
14714 , and 
14715 \family sans
14716 Verse
14717 \family default
14718 .
14719  Furthermore, there are a number of new letter specific types.
14720 \end_layout
14721
14722 \begin_layout Standard
14723 The appearance of the letter produced by this document class can be controlled
14724  by a number of \SpecialChar LaTeX
14725  commands, which you can put in the \SpecialChar LaTeX
14726  preamble.
14727 \begin_inset Foot
14728 status collapsed
14729
14730 \begin_layout Plain Layout
14731 For example, the standard appearance of the letter`s heading, consisting
14732  of name and address, is quite self-willed.
14733  An 
14734 \begin_inset Quotes eld
14735 \end_inset
14736
14737 ordinary
14738 \begin_inset Quotes erd
14739 \end_inset
14740
14741  heading is produced by the following \SpecialChar LaTeX
14742  commands in the preamble:
14743 \end_layout
14744
14745 \begin_layout LyX-Code
14746
14747 \backslash
14748 firsthead{
14749 \backslash
14750 parbox[b]{
14751 \backslash
14752 textwidth}
14753 \end_layout
14754
14755 \begin_layout LyX-Code
14756   {
14757 \backslash
14758 ignorespaces 
14759 \backslash
14760 fromname
14761 \backslash
14762
14763 \backslash
14764  
14765 \backslash
14766 ignorespaces 
14767 \backslash
14768 fromaddress}} 
14769 \end_layout
14770
14771 \begin_layout LyX-Code
14772
14773 \backslash
14774 nexthead{
14775 \backslash
14776 parbox[b]{
14777 \backslash
14778 textwidth}
14779 \end_layout
14780
14781 \begin_layout LyX-Code
14782   {
14783 \backslash
14784 ignorespaces 
14785 \backslash
14786 fromname 
14787 \backslash
14788 hfill 
14789 \backslash
14790 ignorespaces 
14791 \backslash
14792 pagename
14793 \backslash
14794  
14795 \backslash
14796 thepage}}
14797 \end_layout
14798
14799 \end_inset
14800
14801  A detailed German description of such \SpecialChar LaTeX
14802  commands can be found in the Koma-Script
14803  documentation 
14804 \emph on
14805 scrguide
14806 \emph default
14807 .
14808  With it, the letter's author can produce his personal letter layout.
14809 \end_layout
14810
14811 \begin_layout Standard
14812 The types 
14813 \family sans
14814 Letter
14815 \family default
14816  and 
14817 \family sans
14818 Opening
14819 \family default
14820  define the beginning of the letter and must be used in every letter.
14821  To emphasize them in the \SpecialChar LyX
14822  document class, they are marked with the letter
14823  
14824 \shape italic
14825 L
14826 \shape default
14827  or 
14828 \shape italic
14829 O
14830 \shape default
14831 , resp.
14832 \begin_inset space ~
14833 \end_inset
14834
14835 in the left margin.
14836  It is possible to write any number of letters in one file.
14837  An 
14838 \family sans
14839 Opening
14840 \family default
14841  type produces a new letter using the same addressee and a 
14842 \family sans
14843 Letter
14844 \family default
14845  type produces a new addressee.
14846  The types 
14847 \family sans
14848 Closing
14849 \family default
14850
14851 \family sans
14852 PS
14853 \family default
14854
14855 \family sans
14856 CC
14857 \family default
14858 , and 
14859 \family sans
14860 Encl
14861 \family default
14862  are ordinary paragraph types and can also be used several times in one
14863  and the same letter.
14864 \end_layout
14865
14866 \begin_layout Itemize
14867
14868 \family sans
14869 Letter
14870 \family default
14871 : produces a paragraph for the addressee and implicitly defines the beginning
14872  of the letter.
14873 \end_layout
14874
14875 \begin_layout Itemize
14876
14877 \family sans
14878 Opening
14879 \family default
14880 : produces a paragraph for the form of address and implicitly produces a
14881  new letter.
14882 \end_layout
14883
14884 \begin_layout Itemize
14885
14886 \family sans
14887 Closing
14888 \family default
14889 : produces a paragraph for a close.
14890 \end_layout
14891
14892 \begin_layout Itemize
14893
14894 \family sans
14895 PS
14896 \family default
14897 : produces a paragraph for a postscript.
14898 \end_layout
14899
14900 \begin_layout Itemize
14901
14902 \family sans
14903 CC
14904 \family default
14905 : produces a paragraph for a distribution list.
14906 \end_layout
14907
14908 \begin_layout Itemize
14909
14910 \family sans
14911 Encl
14912 \family default
14913 : produces a paragraph for enclosures.
14914 \end_layout
14915
14916 \begin_layout Standard
14917 The types 
14918 \family sans
14919 Name
14920 \family default
14921
14922 \family sans
14923 Signature
14924 \family default
14925
14926 \family sans
14927 Address
14928 \family default
14929
14930 \family sans
14931 Telephone
14932 \family default
14933
14934 \family sans
14935 Place
14936 \family default
14937
14938 \family sans
14939 Backaddress
14940 \family default
14941
14942 \family sans
14943 Specialmail
14944 \family default
14945
14946 \family sans
14947 Location
14948 \family default
14949
14950 \family sans
14951 Title
14952 \family default
14953 , and 
14954 \family sans
14955 Subject
14956 \family default
14957  are input types provided with a label to enter information, which will
14958  be processed by the document class.
14959 \begin_inset Foot
14960 status open
14961
14962 \begin_layout Plain Layout
14963 It could be seen as a matter of inconsequence, that the types 
14964 \family sans
14965 Letter
14966 \family default
14967  and 
14968 \family sans
14969 Opening
14970 \family default
14971  described above are not such input types as well.
14972  Because of the special meaning of those types, however, I have implemented
14973  them as ordinary paragraph types with a one letter mark in the left margin.
14974  Moreover, it would affect my feeling of symmetry, if the 
14975 \family sans
14976 Opening
14977 \family default
14978  type and the 
14979 \family sans
14980 Closing
14981 \family default
14982  type had such a serious different appearance.
14983 \end_layout
14984
14985 \end_inset
14986
14987  The types must be used ahead of the corresponding 
14988 \family sans
14989 Opening
14990 \family default
14991  type.
14992 \end_layout
14993
14994 \begin_layout Standard
14995 An implementation of these types in a WYSIWYG fashion does not seem to make
14996  sense, because the real appearance of the produced letter does not only
14997  depend on the usage of the particular type, but also on other factors.
14998  For example, a signature entered in the 
14999 \family sans
15000 Signature
15001 \family default
15002  type will in the standard behavior appear in the produced letter only,
15003  when in the same letter also a 
15004 \family sans
15005 Closing
15006 \family default
15007  type is used.
15008  The entered value of the 
15009 \family sans
15010 Telephone
15011 \family default
15012  type will in the standard behavior not appear in the produced letter at
15013  all.
15014  The possibility to design the letter`s heading freely is already indicated
15015  in a footnote above.
15016 \end_layout
15017
15018 \begin_layout Standard
15019 The input types can also be used as empty paragraphs.
15020  This makes sense e.
15021 \begin_inset space \thinspace{}
15022 \end_inset
15023
15024 g.
15025 \begin_inset space \space{}
15026 \end_inset
15027
15028 for the 
15029 \family sans
15030 Signature
15031 \family default
15032  type.
15033  If the 
15034 \family sans
15035 Signature
15036 \family default
15037  type is not used at all, in the standard behavior the value of the 
15038 \family sans
15039 Name
15040 \family default
15041  type is used as signature, whereas if an empty 
15042 \family sans
15043 Signature
15044 \family default
15045  type is used, no signature value is defined.
15046 \end_layout
15047
15048 \begin_layout Standard
15049 By using the input types it is possible to write a letter template, containing
15050  filled input types with your personal dates (name, address, etc.) and empty
15051  input types for other dates you want to enter.
15052 \end_layout
15053
15054 \begin_layout Itemize
15055
15056 \family sans
15057 Name
15058 \family default
15059 : sender's name, in the standard behavior appears as a centered paragraph
15060  in small caps in the letter`s heading.
15061 \end_layout
15062
15063 \begin_layout Itemize
15064
15065 \family sans
15066 Signature
15067 \family default
15068 : sender's signature, in the standard behavior appears below the 
15069 \family sans
15070 Closing
15071 \family default
15072  type.
15073  If no 
15074 \family sans
15075 Signature
15076 \family default
15077  type is used, the value of the 
15078 \family sans
15079 Name
15080 \family default
15081  type appears instead.
15082 \end_layout
15083
15084 \begin_layout Itemize
15085
15086 \family sans
15087 Address
15088 \family default
15089 : sender's address, in the standard behavior appears in a centered paragraph
15090  in the letter`s heading below the sender's name.
15091 \end_layout
15092
15093 \begin_layout Itemize
15094
15095 \family sans
15096 Telephone
15097 \family default
15098 : sender's telephone number, in the standard behavior only sets the \SpecialChar LaTeX
15099  variable
15100  
15101 \family typewriter
15102
15103 \backslash
15104 telephonenum
15105 \family default
15106 .
15107 \end_layout
15108
15109 \begin_layout Itemize
15110
15111 \family sans
15112 Place
15113 \family default
15114 : place of the letter`s making.
15115 \end_layout
15116
15117 \begin_layout Itemize
15118
15119 \family sans
15120 Date
15121 \family default
15122 : date of the letter`s making.
15123  
15124 \family sans
15125 Place
15126 \family default
15127  and 
15128 \family sans
15129 Date
15130 \family default
15131 , in the standard behavior, produce the place and the date in a right-aligned
15132  line below the addressee's field.
15133  If an empty 
15134 \family sans
15135 Date
15136 \family default
15137  type is used, neither place nor date appear, independent of the value of
15138  the 
15139 \family sans
15140 Place
15141 \family default
15142  type.
15143  If no 
15144 \family sans
15145 Date
15146 \family default
15147  type is used, the date of the letter `s production is used.
15148 \end_layout
15149
15150 \begin_layout Itemize
15151
15152 \family sans
15153 Backaddress
15154 \family default
15155 : sender`s back address, in the standard behavior appears above the addressee's
15156  field in a small sans serif font.
15157 \end_layout
15158
15159 \begin_layout Itemize
15160
15161 \family sans
15162 Specialmail
15163 \family default
15164 : special mail information, in the standard behavior appears underlined
15165  above the addressee's field below the back address.
15166 \end_layout
15167
15168 \begin_layout Itemize
15169
15170 \family sans
15171 Location
15172 \family default
15173 : additional information, in the standard behavior appears on right side
15174  below the addressee`s field.
15175 \end_layout
15176
15177 \begin_layout Itemize
15178
15179 \family sans
15180 Title
15181 \family default
15182 : the letter's title, in the standard behavior appears in a big, bold, sans
15183  serif font above the subject.
15184 \end_layout
15185
15186 \begin_layout Itemize
15187
15188 \family sans
15189 Subject
15190 \family default
15191 : the letter's subject, in the standard behavior appears in a bold font
15192  above the 
15193 \family sans
15194 Opening
15195 \family default
15196  paragraph.
15197 \end_layout
15198
15199 \begin_layout Standard
15200 The types 
15201 \family sans
15202 Yourref
15203 \family default
15204
15205 \family sans
15206 Yourmail
15207 \family default
15208
15209 \family sans
15210 Myref
15211 \family default
15212
15213 \family sans
15214 Customer
15215 \family default
15216 , and 
15217 \family sans
15218 Invoice
15219 \family default
15220  produce a business letter like line above the 
15221 \family sans
15222 Title
15223 \family default
15224  line containing the fields 
15225 \begin_inset Quotes eld
15226 \end_inset
15227
15228 Your ref.
15229 \begin_inset Quotes erd
15230 \end_inset
15231
15232
15233 \begin_inset Quotes eld
15234 \end_inset
15235
15236 Your letter of
15237 \begin_inset Quotes erd
15238 \end_inset
15239
15240
15241 \begin_inset Quotes eld
15242 \end_inset
15243
15244 Our ref.
15245 \begin_inset Quotes erd
15246 \end_inset
15247
15248
15249 \begin_inset Quotes eld
15250 \end_inset
15251
15252 Customer no.
15253 \begin_inset Quotes erd
15254 \end_inset
15255
15256
15257 \begin_inset Quotes eld
15258 \end_inset
15259
15260 Invoice no.
15261 \begin_inset Quotes erd
15262 \end_inset
15263
15264 , and 
15265 \begin_inset Quotes eld
15266 \end_inset
15267
15268 Date
15269 \begin_inset Quotes erd
15270 \end_inset
15271
15272 .
15273  For the date field, the value of the 
15274 \family sans
15275 Date
15276 \family default
15277  type is used.
15278  If one of these 
15279 \begin_inset Quotes eld
15280 \end_inset
15281
15282 business letter types
15283 \begin_inset Quotes erd
15284 \end_inset
15285
15286  is used, the value of the 
15287 \family sans
15288 Place
15289 \family default
15290  type however does not appear, but only the \SpecialChar LaTeX
15291  variable 
15292 \family typewriter
15293
15294 \backslash
15295 fromplace
15296 \family default
15297  is set.
15298  The ordinary output of place and date in a right-aligned line below the
15299  addressee`s field is suppressed.
15300  The types are implemented as input types provided with a label and must
15301  be used ahead of the corresponding 
15302 \family sans
15303 Opening
15304 \family default
15305  type.
15306 \end_layout
15307
15308 \begin_layout Itemize
15309
15310 \family sans
15311 Yourref
15312 \family default
15313 : Your ref.
15314 \end_layout
15315
15316 \begin_layout Itemize
15317
15318 \family sans
15319 Yourmail
15320 \family default
15321 : Your letter of.
15322 \end_layout
15323
15324 \begin_layout Itemize
15325
15326 \family sans
15327 Myref
15328 \family default
15329 : Our ref.
15330 \end_layout
15331
15332 \begin_layout Itemize
15333
15334 \family sans
15335 Customer
15336 \family default
15337 : Customer no.
15338 \end_layout
15339
15340 \begin_layout Itemize
15341
15342 \family sans
15343 Invoice
15344 \family default
15345 : Invoice no.
15346 \end_layout
15347
15348 \begin_layout Subsection
15349 The new letter class: letter (koma-script v.2)
15350 \end_layout
15351
15352 \begin_layout Standard
15353 by 
15354 \noun on
15355 Jürgen Spitzmüller
15356 \end_layout
15357
15358 \begin_layout Standard
15359 \begin_inset VSpace medskip
15360 \end_inset
15361
15362
15363 \end_layout
15364
15365 \begin_layout Standard
15366 \noindent
15367 Koma-Script version 2.8 has introduced a new letter class 
15368 \family typewriter
15369 scrlttr2
15370 \family default
15371  which supersedes the now unsupported 
15372 \family typewriter
15373 scrlettr
15374 \family default
15375 .
15376  It has — on the \SpecialChar LaTeX
15377  side — a completely new interface and is not compatible
15378  with the old class.
15379  Therefore, \SpecialChar LyX
15380  supports both, though it is recommended you use the new class.
15381 \end_layout
15382
15383 \begin_layout Standard
15384 This class covers the same functionality as 
15385 \emph on
15386 letter (koma-script),
15387 \emph default
15388  and a few more.
15389  The basic items are 
15390 \family sans
15391 Address
15392 \family default
15393  (receiver's address, same as 
15394 \family sans
15395 Letter
15396 \family default
15397  in the old layout), 
15398 \family sans
15399 Opening
15400 \family default
15401 , and 
15402 \family sans
15403 Closing
15404 \family default
15405 .
15406  
15407 \family sans
15408 NextAddress
15409 \family default
15410  will start a new letter (i.
15411 \begin_inset space \thinspace{}
15412 \end_inset
15413
15414 e.
15415 \begin_inset space \space{}
15416 \end_inset
15417
15418 you can write several letters per document).
15419  New elements are sender's 
15420 \family sans
15421 E-Mail
15422 \family default
15423
15424 \family sans
15425 URL
15426 \family default
15427
15428 \family sans
15429 Fax
15430 \family default
15431
15432 \family sans
15433 Bank
15434 \family default
15435  and the possibility to use a 
15436 \family sans
15437 Logo
15438 \family default
15439  (via 
15440 \family sans
15441 Insert\SpecialChar menuseparator
15442 Graphics
15443 \family default
15444 ) in the header.
15445 \end_layout
15446
15447 \begin_layout Standard
15448 The biggest improvement is, though, that the letter's layout is configurable
15449  to meet almost any needs.
15450  This can be done via the preamble or with a special style file (Letter
15451  Class Option, extension 
15452 \family typewriter
15453 *.lco
15454 \family default
15455 ), that will be read in as a class option.
15456 \begin_inset Foot
15457 status collapsed
15458
15459 \begin_layout Plain Layout
15460 The KOMA package comes with some default 
15461 \family typewriter
15462 *.lco
15463 \family default
15464  files.
15465  There is, for instance, a 
15466 \family typewriter
15467 DIN.lco
15468 \family default
15469  file that follows german typesetting rules, or a 
15470 \family typewriter
15471 KOMAold.lco
15472 \family default
15473  that provides the default layout of the old 
15474 \family typewriter
15475 scrlettr
15476 \family default
15477  class.
15478  The latter can be loaded with the class option 
15479 \family typewriter
15480 KOMAold
15481 \family default
15482 , inserted via the 
15483 \family sans
15484 Layout\SpecialChar menuseparator
15485 Document\SpecialChar menuseparator
15486 Extra Options
15487 \family default
15488  field.
15489 \end_layout
15490
15491 \end_inset
15492
15493  Have a look at the 
15494 \emph on
15495 koma-letter2
15496 \emph default
15497  template that is included in \SpecialChar LyX
15498  for examples.
15499  A detailed description is to be found in the Koma-Script documentation
15500  (
15501 \emph on
15502 scrguide
15503 \emph default
15504 ).
15505 \end_layout
15506
15507 \begin_layout Subsection
15508 Problems
15509 \end_layout
15510
15511 \begin_layout Standard
15512 Visualizing the Koma-Script document classes in \SpecialChar LyX
15513 , the \SpecialChar LyX
15514  internals cause some
15515  problems.
15516 \end_layout
15517
15518 \begin_layout Itemize
15519 The chapter number of a 
15520 \family sans
15521 Chapter
15522 \family default
15523  type appears on a line of its own above the chapter heading instead of
15524  appearing in the same line ahead of it.
15525  The cause for that is the \SpecialChar LyX
15526  internal behavior for the labeltype 
15527 \family sans
15528 Counter_Chapter
15529 \family default
15530  in the layout file.
15531 \end_layout
15532
15533 \begin_layout Itemize
15534 The headings of the types 
15535 \family sans
15536 Addchap
15537 \family default
15538  and 
15539 \family sans
15540 Addsec
15541 \family default
15542  are only put in the 
15543 \begin_inset Quotes eld
15544 \end_inset
15545
15546 true
15547 \begin_inset Quotes erd
15548 \end_inset
15549
15550  \SpecialChar LaTeX
15551  table of contents, but not in the \SpecialChar LyX
15552  table of contents (
15553 \family sans
15554 Document\SpecialChar menuseparator
15555 Table
15556 \begin_inset space ~
15557 \end_inset
15558
15559 of
15560 \begin_inset space ~
15561 \end_inset
15562
15563 Contents
15564 \family default
15565 ).
15566 \end_layout
15567
15568 \begin_layout Itemize
15569 The paragraphs in a 
15570 \emph on
15571 letter
15572 \emph default
15573  document class appear in a skip separation mode, not indented.
15574  This is the standard behavior, no special \SpecialChar LaTeX
15575  commands are needed for that.
15576  But in the 
15577 \family sans
15578 Document\SpecialChar menuseparator
15579 Settings
15580 \family default
15581  dialog the corresponding radio button indicates 
15582 \family sans
15583 Indent
15584 \family default
15585 .
15586  A 
15587 \family sans
15588 Skip
15589 \family default
15590  value always has the effect that extra \SpecialChar LaTeX
15591  commands are inserted in the document
15592  to produce the gap, which is not what is wanted in this case.
15593 \end_layout
15594
15595 \begin_layout Section
15596 Memoir
15597 \end_layout
15598
15599 \begin_layout Standard
15600 By 
15601 \noun on
15602 Jürgen Spitzmüller
15603 \end_layout
15604
15605 \begin_layout Subsection
15606 Overview
15607 \end_layout
15608
15609 \begin_layout Standard
15610 Memoir is a very powerful and constantly evolving class.
15611  It has been designed with regard to fictional and non-fictional literature.
15612  Its aim is to let the user have maximum control over the typesetting of
15613  his document.
15614  Memoir is based on the standard book class, but it can also emulate the
15615  article class (see below).
15616 \end_layout
15617
15618 \begin_layout Standard
15619 Peter Wilson, the developer of Memoir, is known as the author of lots of
15620  useful packages in the \SpecialChar LaTeX
15621  world.
15622  Most of them have been merged with Memoir.
15623  Therefore, it is much easier to layout the table of contents, appendices,
15624  chapter designs and such.
15625  \SpecialChar LyX
15626 , though, does not support all of these goodies natively.
15627  Some of them might be added to forthcoming releases
15628 \begin_inset Foot
15629 status collapsed
15630
15631 \begin_layout Plain Layout
15632 You are invited to send suggestions to 
15633 \begin_inset Flex URL
15634 status collapsed
15635
15636 \begin_layout Plain Layout
15637
15638 lyx-devel@lists.lyx.org
15639 \end_layout
15640
15641 \end_inset
15642
15643 .
15644 \end_layout
15645
15646 \end_inset
15647
15648 , lots will probably never be supported, due to the limitations of \SpecialChar LyX
15649 's framework.
15650  Of course you can still use all features with the help of some native \SpecialChar LaTeX
15651
15652  commands (\SpecialChar TeX
15653  code
15654 \begin_inset Foot
15655 status collapsed
15656
15657 \begin_layout Plain Layout
15658 Cf.
15659 \begin_inset ERT
15660 status collapsed
15661
15662 \begin_layout Plain Layout
15663
15664
15665 \backslash
15666  
15667 \end_layout
15668
15669 \end_inset
15670
15671 section
15672 \begin_inset space ~
15673 \end_inset
15674
15675
15676 \begin_inset CommandInset ref
15677 LatexCommand ref
15678 reference "sec:Inserting-TeX-Code"
15679
15680 \end_inset
15681
15682  for details.
15683 \end_layout
15684
15685 \end_inset
15686
15687 ).
15688  In this section, we can only list those features that are natively supported
15689  by \SpecialChar LyX
15690 .
15691  For detailed descriptions (and for the rest of features) we recommend you
15692  have a look at the detailed manual of the Memoir class
15693 \begin_inset Foot
15694 status collapsed
15695
15696 \begin_layout Plain Layout
15697 Cf.
15698 \begin_inset ERT
15699 status collapsed
15700
15701 \begin_layout Plain Layout
15702
15703
15704 \backslash
15705  
15706 \end_layout
15707
15708 \end_inset
15709
15710
15711 \begin_inset Flex URL
15712 status collapsed
15713
15714 \begin_layout Plain Layout
15715
15716 CTAN:/macros/latex/memoir/memman.pdf
15717 \end_layout
15718
15719 \end_inset
15720
15721 .
15722 \end_layout
15723
15724 \end_inset
15725
15726 , which is not only a user guide for the class, but also both a comprehensive
15727  description on good typesetting and a superb example for good typesetting
15728  itself.
15729 \end_layout
15730
15731 \begin_layout Subsection
15732 Basic features and restrictions
15733 \end_layout
15734
15735 \begin_layout Standard
15736 Memoir supports basically all features of the standard book classes.
15737  There are, however, some differences, as follows:
15738 \end_layout
15739
15740 \begin_layout Description
15741 Font
15742 \begin_inset space ~
15743 \end_inset
15744
15745 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
15746 \end_layout
15747
15748 \begin_layout Description
15749 Page
15750 \begin_inset space ~
15751 \end_inset
15752
15753 style: The fancy page style is not supported, due to a command clash between
15754  Memoir and the fancyhdr package (they both define a command with the same
15755  name, which confuses \SpecialChar LaTeX
15756 ).
15757  Instead, Memoir comes with a number of its own page styles (see 
15758 \family sans
15759 Layout\SpecialChar menuseparator
15760 Document\SpecialChar menuseparator
15761 Page
15762 \begin_inset space ~
15763 \end_inset
15764
15765 Style
15766 \family default
15767 ).
15768  If you want to use these for the chapter pages, you have to use the command
15769  
15770 \family typewriter
15771
15772 \backslash
15773 chapterstyle
15774 \family default
15775  in the main text or in preamble (e.
15776 \begin_inset space \thinspace{}
15777 \end_inset
15778
15779 g.
15780 \begin_inset space \space{}
15781 \end_inset
15782
15783
15784 \family typewriter
15785
15786 \backslash
15787 chapterstyle{companion}
15788 \family default
15789 ).
15790 \end_layout
15791
15792 \begin_layout Description
15793 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
15794  optional argument in the standard classes.
15795  With this, you can specify an alternative version of the title for the
15796  table of contents and the headers (for instance, if the title is too long).
15797  In \SpecialChar LyX
15798 , you can do this via 
15799 \family sans
15800 Insert\SpecialChar menuseparator
15801 Short
15802 \begin_inset space ~
15803 \end_inset
15804
15805 Title
15806 \family default
15807  at the beginning of a chapter/section.
15808  Memoir features a second optional argument and thus separates the table
15809  of contents from the header.
15810  You can define three variants of a title with this: one for the main text,
15811  one for the table of contents, and one for the headers.
15812  Simply insert two optional arguments if you need this feature, the first
15813  one containing the short title for the Table of Contents, the second one
15814  containing an alternative short title for the headers.
15815 \end_layout
15816
15817 \begin_layout Description
15818 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
15819  of contents, the list of figures and the list of table start a new page
15820  automatically.
15821  Memoir does not follow this route.
15822  You have to insert a page break yourself, if you want to have one.
15823 \end_layout
15824
15825 \begin_layout Description
15826 Titlepage: For some unknown reason, Memoir uses pagination on the title
15827  page (in the standard classes, title pages are 
15828 \begin_inset Quotes eld
15829 \end_inset
15830
15831 empty
15832 \begin_inset Quotes erd
15833 \end_inset
15834
15835 ).
15836  If you want an empty title page, type 
15837 \family typewriter
15838
15839 \backslash
15840 aliaspagestyle{title}{empty}
15841 \family default
15842  in the preamble.
15843 \end_layout
15844
15845 \begin_layout Description
15846 Article: With the class option 
15847 \emph on
15848 article
15849 \emph default
15850  (to be inserted in 
15851 \family sans
15852 Layout\SpecialChar menuseparator
15853 Document\SpecialChar menuseparator
15854 Extra
15855 \begin_inset space ~
15856 \end_inset
15857
15858 Options
15859 \family default
15860 ), you can emulate article style.
15861  That is, counters (footnotes, figures, tables etc.) will not be reset on
15862  new chapters, chapters don't start a new page (but are—in contrary to 
15863 \begin_inset Quotes eld
15864 \end_inset
15865
15866 real
15867 \begin_inset Quotes erd
15868 \end_inset
15869
15870  article classes—still allowed), parts, though, use their own page, as in
15871  book.
15872 \end_layout
15873
15874 \begin_layout Description
15875 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
15876  font commands, which have been used in the old \SpecialChar LaTeX
15877  version 2.09 (e.
15878 \begin_inset space \thinspace{}
15879 \end_inset
15880
15881 g.
15882 \begin_inset space \space{}
15883 \end_inset
15884
15885
15886 \family typewriter
15887
15888 \backslash
15889 rm
15890 \family default
15891
15892 \family typewriter
15893
15894 \backslash
15895 it
15896 \family default
15897 ).
15898  It produces an error and stops \SpecialChar LaTeX
15899  whenever such a command appears.
15900  The class option 
15901 \emph on
15902 oldfontcommands
15903 \emph default
15904  reallows the commands and spits out warnings instead (which does at least
15905  not stop \SpecialChar LaTeX
15906 ).
15907  Since a lot of packages and particularly Bib\SpecialChar TeX
15908  style files are still using
15909  those commands, we have decided to use this option by default.
15910 \end_layout
15911
15912 \begin_layout Subsection
15913 Extra features
15914 \end_layout
15915
15916 \begin_layout Standard
15917 We will only describe the features supported by \SpecialChar LyX
15918  (which is not much currently).
15919  Please consult the Memoir manual
15920 \begin_inset Foot
15921 status collapsed
15922
15923 \begin_layout Plain Layout
15924 Cf.
15925 \begin_inset ERT
15926 status collapsed
15927
15928 \begin_layout Plain Layout
15929
15930
15931 \backslash
15932  
15933 \end_layout
15934
15935 \end_inset
15936
15937
15938 \begin_inset Flex URL
15939 status collapsed
15940
15941 \begin_layout Plain Layout
15942
15943 CTAN:/macros/latex/memoir/memman.pdf
15944 \end_layout
15945
15946 \end_inset
15947
15948 .
15949 \end_layout
15950
15951 \end_inset
15952
15953  for details.
15954 \end_layout
15955
15956 \begin_layout Description
15957 Abstract: You may wonder why an abstract is an extra feature.
15958  Well, it is in book class.
15959  Usually books don't have abstracts.
15960  Memoir, however, has.
15961  You can use it wherever and how often you like.
15962 \end_layout
15963
15964 \begin_layout Description
15965 Chapterprecis: You may know this older typesetting style: The contents of
15966  a chapter are summarized below the title and also in the table of contents
15967  (e.
15968 \begin_inset space \thinspace{}
15969 \end_inset
15970
15971 g.
15972 \begin_inset space \space{}
15973 \end_inset
15974
15975
15976 \emph on
15977 Our hero arrives in Troia; he loses some friends; he finds others
15978 \emph default
15979 ).
15980  Chapterprecis does exactly this.
15981  It is therefore only sensible below a chapter.
15982 \end_layout
15983
15984 \begin_layout Description
15985 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
15986  The epigraph environment provides an elegant way of typesetting such a
15987  motto.
15988  The motto itself (text) and its author (source) are divided by a short
15989  line.
15990  Unfortunately, we have to fool \SpecialChar LyX
15991  a bit here again, since the environment
15992  needs two arguments (text and source).
15993  In this case, we have to use curly brackets (in \SpecialChar TeX
15994  mode) between the two
15995  arguments: 
15996 \emph on
15997 <smart slogan>
15998 \emph default
15999  
16000 \family typewriter
16001 }{
16002 \family default
16003  
16004 \emph on
16005 <author of the slogan>.
16006 \end_layout
16007
16008 \begin_layout Description
16009 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
16010  complex figurative poems).
16011  \SpecialChar LyX
16012  can only support a few of them.
16013  One is poemtitle, which is a centered title for poems, which will also
16014  be added to the table of contents (verse is the standard environment for
16015  poems.
16016  Memoir has some enhanced versions of verse, but you need to use \SpecialChar TeX
16017  code,
16018  because they have to be nested inside regular verse environments, which
16019  is not possible with \SpecialChar LyX
16020 ).
16021 \end_layout
16022
16023 \begin_layout Description
16024 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
16025 \end_layout
16026
16027 \begin_layout Section
16028 Article (mwart), book (mwbk) and report (mwrep)
16029 \begin_inset Argument status
16030 status collapsed
16031
16032 \begin_layout Plain Layout
16033 The 
16034 \family typewriter
16035 mw
16036 \family default
16037  Classes
16038 \end_layout
16039
16040 \end_inset
16041
16042
16043 \end_layout
16044
16045 \begin_layout Standard
16046 by 
16047 \noun on
16048 Tomasz Luczak
16049 \end_layout
16050
16051 \begin_layout Standard
16052 The \SpecialChar LyX
16053  document classes 
16054 \emph on
16055 article (mwart)
16056 \emph default
16057
16058 \emph on
16059 report (mwrep)
16060 \emph default
16061  and 
16062 \emph on
16063 book
16064 \emph default
16065  
16066 \emph on
16067 (mwbk)
16068 \emph default
16069  correspond to the \SpecialChar LaTeX
16070  document classes 
16071 \family typewriter
16072 mwart.cls
16073 \family default
16074
16075 \family typewriter
16076 mwrep.cls
16077 \family default
16078  and 
16079 \family typewriter
16080 mwbk.cls
16081 \family default
16082 , resp.
16083  They are replacements for the standard document classes 
16084 \family typewriter
16085 article.cls
16086 \family default
16087
16088 \family typewriter
16089 report.cls
16090 \family default
16091  and 
16092 \family typewriter
16093 book.cls
16094 \family default
16095 , resp., and fit better to Polish typography conventions in a number of points.
16096  
16097 \end_layout
16098
16099 \begin_layout Standard
16100 Basic differences:
16101 \end_layout
16102
16103 \begin_layout Itemize
16104 Unnumbered titles (with star, e.
16105 \begin_inset space \thinspace{}
16106 \end_inset
16107
16108 g.
16109 \begin_inset space \space{}
16110 \end_inset
16111
16112
16113 \family sans
16114 Section*
16115 \family default
16116 ) are added into table of contents,
16117 \end_layout
16118
16119 \begin_layout Itemize
16120 Additional page styles:
16121 \end_layout
16122
16123 \begin_deeper
16124 \begin_layout Description
16125 uheadings header with separated lines,
16126 \end_layout
16127
16128 \begin_layout Description
16129 myheadings custom header, contents headers via commands: 
16130 \family typewriter
16131
16132 \backslash
16133 markright
16134 \family default
16135  and 
16136 \family typewriter
16137
16138 \backslash
16139 markboth
16140 \family default
16141 ,
16142 \end_layout
16143
16144 \begin_layout Description
16145 myuheadings custom header with separated lines,
16146 \end_layout
16147
16148 \begin_layout Description
16149 outer page number is placed on outer side of page
16150 \end_layout
16151
16152 \end_deeper
16153 \begin_layout Itemize
16154 Options 
16155 \end_layout
16156
16157 \begin_deeper
16158 \begin_layout Description
16159 rmheadings serif titles — default,
16160 \end_layout
16161
16162 \begin_layout Description
16163 sfheadings sansserif titles,
16164 \end_layout
16165
16166 \begin_layout Description
16167 authortitle on title page first placed is author next title — default,
16168 \end_layout
16169
16170 \begin_layout Description
16171 titleauthor on title page first placed is title next author,
16172 \end_layout
16173
16174 \begin_layout Description
16175 withmarginpar reserve place on page for margins.
16176 \end_layout
16177
16178 \end_deeper
16179 \begin_layout Section
16180 Paper
16181 \end_layout
16182
16183 \begin_layout Standard
16184 The document class 
16185 \family sans
16186 paper
16187 \family default
16188  provides an alternative to the standard 
16189 \family sans
16190 article
16191 \family default
16192  class.
16193  It provides similar functionality, but you might prefer this layout with
16194  sans serif sections, headings, and more.
16195 \end_layout
16196
16197 \begin_layout Section
16198 Rev\SpecialChar TeX
16199 4
16200 \end_layout
16201
16202 \begin_layout Standard
16203 by 
16204 \noun on
16205 Amir Karger
16206 \end_layout
16207
16208 \begin_layout Standard
16209 \begin_inset VSpace bigskip
16210 \end_inset
16211
16212
16213 \end_layout
16214
16215 \begin_layout Standard
16216 \noindent
16217 The 
16218 \family sans
16219 Revtex
16220 \begin_inset space ~
16221 \end_inset
16222
16223 4
16224 \family default
16225  textclass works with the American Physical Sociey's Rev\SpecialChar TeX
16226  4.0 (the 
16227 \begin_inset Formula $\beta$
16228 \end_inset
16229
16230  release of May, 1999) class.
16231 \end_layout
16232
16233 \begin_layout Standard
16234 \SpecialChar LyX
16235  has a 
16236 \family sans
16237 Revtex
16238 \family default
16239  textclass, which works with Rev\SpecialChar TeX
16240  3.1.
16241  However, v3.1 is basically obsolete, as it works with \SpecialChar LaTeX
16242  2.09.
16243  That means that it doesn't interact very well with \SpecialChar LyX
16244 , which requires \SpecialChar LaTeX2e
16245 , although
16246  it has been kludged to work.
16247  Since Rev\SpecialChar TeX
16248  4.0 has been designed to work much more cleanly with \SpecialChar LaTeX2e
16249 , \SpecialChar LyX
16250  with the
16251  
16252 \family sans
16253 Rev\SpecialChar TeX
16254
16255 \begin_inset space ~
16256 \end_inset
16257
16258 4
16259 \family default
16260  textclass should also be pretty easy to use.
16261 \end_layout
16262
16263 \begin_layout Standard
16264 These documents are supposed to be used in 
16265 \emph on
16266 addition
16267 \emph default
16268  to the Rev\SpecialChar TeX
16269  4.0 documents, so we don't describe any of the special Rev\SpecialChar TeX
16270  macros,
16271  and assume you'll know what to put in the preamble if necessary.
16272 \end_layout
16273
16274 \begin_layout Subsection
16275 Installation
16276 \end_layout
16277
16278 \begin_layout Standard
16279 All you need to do is install Rev\SpecialChar TeX
16280  4, as described in the package's README
16281  file.
16282  The package can be found at The Rev\SpecialChar TeX
16283  4 Web Site 
16284 \begin_inset Flex URL
16285 status collapsed
16286
16287 \begin_layout Plain Layout
16288
16289 http://publish.aps.org/revtex4/
16290 \end_layout
16291
16292 \end_inset
16293
16294 .
16295  Install it somewhere that \SpecialChar LaTeX
16296  can see it.
16297  Test it by trying to \SpecialChar LaTeX
16298  a short Rev\SpecialChar TeX
16299  4 document in some random directory (i.
16300 \begin_inset space \thinspace{}
16301 \end_inset
16302
16303 e.
16304 \begin_inset space \space{}
16305 \end_inset
16306
16307 not the directory where you installed the class file.) Then, if you reconfigure
16308  \SpecialChar LyX
16309 , it will find the class file and let you use the Rev\SpecialChar TeX
16310 4 textclass.
16311 \end_layout
16312
16313 \begin_layout Standard
16314 Probably the easiest way to get started is either to import a Rev\SpecialChar TeX
16315  4 document
16316  using 
16317 \family typewriter
16318 tex2lyx
16319 \family default
16320 , or to use the 
16321 \family sans
16322 Revtex
16323 \begin_inset space ~
16324 \end_inset
16325
16326 4
16327 \family default
16328  template, found in the templates directory.
16329 \end_layout
16330
16331 \begin_layout Subsection
16332 Preamble Matter
16333 \end_layout
16334
16335 \begin_layout Standard
16336 Optional arguments to 
16337 \family typewriter
16338
16339 \backslash
16340 documentclass
16341 \family default
16342 , like 
16343 \begin_inset Quotes eld
16344 \end_inset
16345
16346 preprint
16347 \begin_inset Quotes erd
16348 \end_inset
16349
16350  and 
16351 \begin_inset Quotes eld
16352 \end_inset
16353
16354 aps
16355 \begin_inset Quotes erd
16356 \end_inset
16357
16358 , go in the 
16359 \family sans
16360 Extra
16361 \begin_inset space ~
16362 \end_inset
16363
16364 Options
16365 \family default
16366  field in the 
16367 \family sans
16368 Document
16369 \begin_inset space ~
16370 \end_inset
16371
16372 Layout
16373 \family default
16374  dialog, as usual.
16375  Remember that in Rev\SpecialChar TeX
16376 , at least one optional argument is required! 
16377 \end_layout
16378
16379 \begin_layout Standard
16380 Other preamble matter, like 
16381 \family typewriter
16382
16383 \backslash
16384 draft
16385 \family default
16386  etc.
16387 \begin_inset space ~
16388 \end_inset
16389
16390 goes in the 
16391 \family sans
16392 \SpecialChar LaTeX
16393
16394 \begin_inset space ~
16395 \end_inset
16396
16397 Preamble
16398 \family default
16399  dialog, also as usual.
16400 \end_layout
16401
16402 \begin_layout Subsection
16403 Layouts
16404 \end_layout
16405
16406 \begin_layout Standard
16407 The layouts basically correspond to the commands in Rev\SpecialChar TeX
16408 4.0.
16409  For example, the Email layout corresponds to 
16410 \family typewriter
16411
16412 \backslash
16413 email{}
16414 \family default
16415 .
16416  Note that (at least as of Rev\SpecialChar TeX
16417  4.0 Beta), the 
16418 \family sans
16419 Address
16420 \family default
16421  and 
16422 \family sans
16423 Affiliation
16424 \family default
16425  layouts are exactly equivalent, so you shouldn't need to use both.
16426 \begin_inset Foot
16427 status collapsed
16428
16429 \begin_layout Plain Layout
16430 In case you're curious, both were included so that 
16431 \family typewriter
16432 tex2lyx
16433 \family default
16434  would be able to translate both 
16435 \family typewriter
16436
16437 \backslash
16438 address
16439 \family default
16440  and 
16441 \family typewriter
16442
16443 \backslash
16444 affiliation
16445 \family default
16446 .
16447 \end_layout
16448
16449 \end_inset
16450
16451
16452 \end_layout
16453
16454 \begin_layout Subsection
16455 Important Notes
16456 \end_layout
16457
16458 \begin_layout Standard
16459 There are a couple of important unique aspects of Rev\SpecialChar TeX
16460  4 which might cause
16461  bugs that will be even more confusing in \SpecialChar LyX
16462 .
16463 \end_layout
16464
16465 \begin_layout Standard
16466 In Rev\SpecialChar TeX
16467 , the 
16468 \family typewriter
16469
16470 \backslash
16471 thanks
16472 \family default
16473  command goes 
16474 \emph on
16475 outside
16476 \emph default
16477  the 
16478 \family typewriter
16479
16480 \backslash
16481 author
16482 \family default
16483  command.
16484  The \SpecialChar LyX
16485  equivalent is that there is a separate Thanks layout.
16486  Do 
16487 \emph on
16488 not
16489 \emph default
16490  write footnotes in the 
16491 \family sans
16492 Author
16493 \family default
16494  layout, or weird things may happen.
16495  See the Rev\SpecialChar TeX
16496  4 documentation for more details.
16497 \end_layout
16498
16499 \begin_layout Standard
16500 Also, the 
16501 \family sans
16502 Author
16503 \begin_inset space ~
16504 \end_inset
16505
16506 Email
16507 \family default
16508
16509 \family sans
16510 Author
16511 \begin_inset space ~
16512 \end_inset
16513
16514 URL
16515 \family default
16516 , and 
16517 \family sans
16518 Thanks
16519 \family default
16520  layouts must be placed 
16521 \emph on
16522 in between
16523 \emph default
16524  the 
16525 \family sans
16526 Author
16527 \family default
16528  layout and the corresponding 
16529 \family sans
16530 Address
16531 \family default
16532  (or equivalent 
16533 \family sans
16534 Affiliation
16535 \family default
16536 ) layout.
16537  If you put the 
16538 \family sans
16539 Thanks
16540 \family default
16541  after the 
16542 \family sans
16543 Address
16544 \family default
16545 , the \SpecialChar LaTeX
16546  won't compile.
16547 \end_layout
16548
16549 \begin_layout Subsection
16550 Drawbacks
16551 \end_layout
16552
16553 \begin_layout Standard
16554 The main problem with this layout is that you can't use the optional arguments
16555  to layouts like Email and Title.
16556  (The problem is not unique to this layout; you can't use optional arguments
16557  to the Section layouts either.) This means that after you export that file
16558  to \SpecialChar LaTeX
16559  (which you'll need to do eventually to send it in to APS), you'll need
16560  to edit the \SpecialChar LaTeX
16561  file with a text editor to add the optional arguments to set,
16562  e.
16563 \begin_inset space \thinspace{}
16564 \end_inset
16565
16566 g.
16567 \begin_inset space \space{}
16568 \end_inset
16569
16570 the running title for the page headers.
16571  Lacking these layouts makes the 
16572 \family typewriter
16573
16574 \backslash
16575 altaffiliation
16576 \family default
16577  (and the equivalent 
16578 \family typewriter
16579
16580 \backslash
16581 altaddress
16582 \family default
16583 ) useless, so the corresponding layouts don't exist, and will have to be
16584  added by hand.
16585 \begin_inset Foot
16586 status collapsed
16587
16588 \begin_layout Plain Layout
16589
16590 \emph on
16591 Note from JMarc:
16592 \emph default
16593  actually, \SpecialChar LyX
16594  1.3.0 supports some forms of optional arguments, but this layout
16595  has not been updated yet to take advantage of it.
16596 \end_layout
16597
16598 \end_inset
16599
16600  
16601 \end_layout
16602
16603 \begin_layout Section
16604 Springer Journals (
16605 \family sans
16606 svjour
16607 \family default
16608 )
16609 \end_layout
16610
16611 \begin_layout Standard
16612 by 
16613 \noun on
16614 Martin Vermeer
16615 \end_layout
16616
16617 \begin_layout Subsection
16618 Description
16619 \end_layout
16620
16621 \begin_layout Standard
16622 These are the layout files for some of the journal formats used by Springer
16623  Verlag and listed on 
16624 \begin_inset Flex URL
16625 status collapsed
16626
16627 \begin_layout Plain Layout
16628
16629 http://www.springer.de/author/tex/help-journals.html
16630 \end_layout
16631
16632 \end_inset
16633
16634 , where you should also go to fetch the class files (yes, these are \SpecialChar LaTeX2e
16635  now!).
16636  It is a modular system: the things common to all journals are implemented
16637  in 
16638 \family typewriter
16639 svjour.inc
16640 \family default
16641 , which journal-specific layout files (such as, e.
16642 \begin_inset space \thinspace{}
16643 \end_inset
16644
16645 g.
16646 \begin_inset space \space{}
16647 \end_inset
16648
16649
16650 \family typewriter
16651 svjog.layout
16652 \family default
16653  for Journal of Geodesy) can include.
16654 \end_layout
16655
16656 \begin_layout Standard
16657 This means that implementing support for any other Springer journal on this
16658  list is as simple as writing your own 
16659 \family typewriter
16660 sv
16661 \family default
16662 <myjournal>
16663 \family typewriter
16664 .layout
16665 \family default
16666  file following the outline given in 
16667 \family typewriter
16668 svjog.layout
16669 \family default
16670 .
16671  
16672 \end_layout
16673
16674 \begin_layout Standard
16675 It is reasonably well tested only for the Journal of Geodesy.
16676  
16677 \family typewriter
16678 svjour
16679 \family default
16680  and 
16681 \family typewriter
16682 svjog
16683 \family default
16684  come with the standard \SpecialChar LyX
16685  distribution.
16686  Install the relevant class file (downloaded from Springer) in a proper
16687  directory, reconfigure \SpecialChar LaTeX
16688  (in the te\SpecialChar TeX
16689  case by running 
16690 \family typewriter
16691 texhash
16692 \family default
16693 , as root if necessary — doesn't \SpecialChar LyX
16694  take care of this?), reconfigure \SpecialChar LyX
16695  and
16696  it should work.
16697 \end_layout
16698
16699 \begin_layout Subsection
16700 New styles
16701 \end_layout
16702
16703 \begin_layout Standard
16704 A large number of theorem-like styles — 
16705 \family sans
16706 Claim, Conjecture,
16707 \family default
16708  
16709 \family sans
16710 \SpecialChar ldots
16711 Theorem
16712 \family default
16713 .
16714 \end_layout
16715
16716 \begin_layout Standard
16717
16718 \family sans
16719 Headnote, Dedication, Subtitle, Running_\SpecialChar LaTeX
16720 _Title, Author_Running, Institute,
16721  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
16722 \family default
16723 .
16724  See the Springer class file documentation for details.
16725 \end_layout
16726
16727 \begin_layout Subsection
16728 Supported journals
16729 \end_layout
16730
16731 \begin_layout Itemize
16732
16733 \emph on
16734 Journal of Geodesy
16735 \emph default
16736
16737 \family typewriter
16738 svjog.layout
16739 \family default
16740  — Martin Vermeer
16741 \end_layout
16742
16743 \begin_layout Itemize
16744
16745 \emph on
16746 Probability Theory and Related Fields
16747 \emph default
16748
16749 \family typewriter
16750 svprobth.layout
16751 \family default
16752  — Jean-Marc Lasgouttes
16753 \end_layout
16754
16755 \begin_layout Standard
16756 Add your own, it isn't so hard!
16757 \end_layout
16758
16759 \begin_layout Subsection
16760 Credits
16761 \end_layout
16762
16763 \begin_layout Standard
16764 These files are partly based on the older 
16765 \family typewriter
16766 ejour2.layout
16767 \family default
16768 , which was again based on a tinkered-with version of an old \SpecialChar LaTeX
16769  2.09 style
16770  file from Springer.
16771  All this, and the 
16772 \family typewriter
16773 ejour2
16774 \family default
16775  layout, are now defunct.
16776  Jean-Marc Lasgouttes helped out big in making me find my way around the
16777  \SpecialChar LyX
16778  layout file mechanism.
16779 \end_layout
16780
16781 \begin_layout Subsection
16782 Bugs
16783 \end_layout
16784
16785 \begin_layout Standard
16786 Probably.
16787  But probably less than in the old hacked-\SpecialChar LaTeX
16788  
16789 \family typewriter
16790 ejour2
16791 \family default
16792 .
16793 \end_layout
16794
16795 \begin_layout Standard
16796 Limitations e.
16797 \begin_inset space \thinspace{}
16798 \end_inset
16799
16800 g.: does not display the number for theorem-like layouts, just #.
16801 \end_layout
16802
16803 \begin_layout Section
16804 Slides [aka 
16805 \noun on
16806 Sli\SpecialChar TeX
16807
16808 \noun default
16809 ]
16810 \begin_inset CommandInset label
16811 LatexCommand label
16812 name "sec:slitex"
16813
16814 \end_inset
16815
16816
16817 \end_layout
16818
16819 \begin_layout Standard
16820 by 
16821 \noun on
16822 John Weiss
16823 \noun default
16824  
16825 \end_layout
16826
16827 \begin_layout Subsection
16828 Introduction
16829 \end_layout
16830
16831 \begin_layout Standard
16832 This section describes how to use \SpecialChar LyX
16833  to make slides for overhead projectors.
16834  There are two document classes that can do this: the default slides class
16835  and the 
16836 \family sans
16837 Foil\SpecialChar TeX
16838
16839 \family default
16840  slides class.
16841  This section documents the former.
16842 \end_layout
16843
16844 \begin_layout Standard
16845 I'm going to say this again, nice and clear, so that there's no misunderstanding
16846 :
16847 \end_layout
16848
16849 \begin_layout Standard
16850 \begin_inset VSpace bigskip
16851 \end_inset
16852
16853
16854 \end_layout
16855
16856 \begin_layout Standard
16857 \align center
16858
16859 \size large
16860 This section documents the class 
16861 \begin_inset Quotes eld
16862 \end_inset
16863
16864
16865 \family sans
16866 slides (default)
16867 \family default
16868
16869 \begin_inset Quotes erd
16870 \end_inset
16871
16872  
16873 \emph on
16874 only.
16875 \end_layout
16876
16877 \begin_layout Standard
16878 \begin_inset VSpace bigskip
16879 \end_inset
16880
16881
16882 \end_layout
16883
16884 \begin_layout Standard
16885 If you're looking for the documentation for 
16886 \begin_inset Quotes eld
16887 \end_inset
16888
16889
16890 \family sans
16891 slides (Foil\SpecialChar TeX
16892 )
16893 \family default
16894
16895 \begin_inset Quotes erd
16896 \end_inset
16897
16898 , check out section
16899 \begin_inset space ~
16900 \end_inset
16901
16902
16903 \begin_inset CommandInset ref
16904 LatexCommand ref
16905 reference "sec:foiltex"
16906
16907 \end_inset
16908
16909 .
16910  The 
16911 \family sans
16912 foils
16913 \family default
16914  class [
16915 \begin_inset Quotes eld
16916 \end_inset
16917
16918
16919 \family sans
16920 slides (Foil\SpecialChar TeX
16921 )
16922 \family default
16923
16924 \begin_inset Quotes erd
16925 \end_inset
16926
16927 ] is actually somewhat better than the default 
16928 \family sans
16929 slides
16930 \family default
16931  class,
16932 \begin_inset Foot
16933 status collapsed
16934
16935 \begin_layout Plain Layout
16936 \SpecialChar ldots
16937 or so I've been told repeatedly by its advocates.
16938  Having never used it, I have no idea if this claim is true or not.
16939 \end_layout
16940
16941 \end_inset
16942
16943  which this section documents.
16944 \end_layout
16945
16946 \begin_layout Standard
16947 This class is the \SpecialChar LaTeX2e
16948  improvement of the old 
16949 \noun on
16950 Sli\SpecialChar TeX
16951
16952 \noun default
16953  package.
16954  Every \SpecialChar LaTeX2e
16955  distribution includes this class [which I'll just refer to as 
16956 \begin_inset Quotes eld
16957 \end_inset
16958
16959
16960 \family sans
16961 slides
16962 \family default
16963
16964 \begin_inset Quotes erd
16965 \end_inset
16966
16967  from now on], so you're bound to have it.
16968  As I noted earlier, there are other classes, such as 
16969 \family sans
16970 foils
16971 \family default
16972 , which also produce slides for overhead projectors and do a better job
16973  at it.
16974  However, there are some things which 
16975 \family sans
16976 slides
16977 \family default
16978  can do which the others can't, such as generate overlays.
16979  Read on to learn more!
16980 \end_layout
16981
16982 \begin_layout Subsection
16983 Getting Started
16984 \begin_inset CommandInset label
16985 LatexCommand label
16986 name "sec:slidesetup"
16987
16988 \end_inset
16989
16990
16991 \end_layout
16992
16993 \begin_layout Standard
16994 Obviously, to use this document class, you need to select 
16995 \begin_inset Quotes eld
16996 \end_inset
16997
16998
16999 \family sans
17000 slides (default)
17001 \family default
17002
17003 \begin_inset Quotes erd
17004 \end_inset
17005
17006  from the class list in the 
17007 \family sans
17008 Document\SpecialChar menuseparator
17009 Settings
17010 \family default
17011  dialog.
17012  There are some other special things you should know about this class:
17013 \end_layout
17014
17015 \begin_layout Itemize
17016 Don't bother changing the options 
17017 \family sans
17018 Sides and Columns
17019 \family default
17020 .
17021  They're not supported by the 
17022 \family sans
17023 slides
17024 \family default
17025  class, anyways.
17026 \end_layout
17027
17028 \begin_layout Itemize
17029 The option 
17030 \family sans
17031 Page
17032 \begin_inset space ~
17033 \end_inset
17034
17035 style
17036 \family default
17037  behaves a bit differently for this class.
17038  The possible choices and what they do are as follows:
17039 \end_layout
17040
17041 \begin_deeper
17042 \begin_layout Description
17043
17044 \family sans
17045 plain
17046 \family default
17047  The final output contains page numbers in the lower right corner.
17048 \end_layout
17049
17050 \begin_layout Description
17051
17052 \family sans
17053 headings
17054 \family default
17055  Like 
17056 \family sans
17057 plain
17058 \family default
17059 , but also prints out any time markers you've put in.
17060  This is the default.
17061 \end_layout
17062
17063 \begin_layout Description
17064
17065 \family sans
17066 empty
17067 \family default
17068  The final output contains no page numbers, time markers, or alignment markers.
17069 \end_layout
17070
17071 \end_deeper
17072 \begin_layout Itemize
17073 The 
17074 \family sans
17075 slides
17076 \family default
17077  class has an extra option: 
17078 \family typewriter
17079 clock
17080 \family default
17081 .
17082  To use it, put 
17083 \begin_inset Quotes eld
17084 \end_inset
17085
17086
17087 \family typewriter
17088 clock
17089 \family default
17090
17091 \begin_inset Quotes erd
17092 \end_inset
17093
17094  in the extra class options.
17095 \end_layout
17096
17097 \begin_deeper
17098 \begin_layout Standard
17099 Using this options allows you to add time markers to 
17100 \family sans
17101 Note
17102 \family default
17103 s.
17104  See section
17105 \begin_inset space ~
17106 \end_inset
17107
17108
17109 \begin_inset CommandInset ref
17110 LatexCommand ref
17111 reference "sec:slideNote"
17112
17113 \end_inset
17114
17115  for more details.
17116 \end_layout
17117
17118 \end_deeper
17119 \begin_layout Standard
17120 You can also use the template file 
17121 \begin_inset Quotes eld
17122 \end_inset
17123
17124
17125 \family typewriter
17126 slides.lyx
17127 \family default
17128
17129 \begin_inset Quotes erd
17130 \end_inset
17131
17132  to automatically set up a document to use the 
17133 \family sans
17134 slides
17135 \family default
17136  class [using 
17137 \family sans
17138 File\SpecialChar menuseparator
17139 New
17140 \begin_inset space ~
17141 \end_inset
17142
17143 from
17144 \begin_inset space ~
17145 \end_inset
17146
17147 Template
17148 \family default
17149  to open your new document].
17150  The template file also contains some examples of the special paragraph
17151  environments used by this class.
17152  I'll describe those next.
17153 \end_layout
17154
17155 \begin_layout Subsection
17156 Paragraph Environments
17157 \end_layout
17158
17159 \begin_layout Subsubsection
17160 Supported Environments
17161 \end_layout
17162
17163 \begin_layout Standard
17164 The first thing you'll notice when you start up a new 
17165 \family sans
17166 slides
17167 \family default
17168  document is the font size and type: it's the equivalent of the size 
17169 \begin_inset Quotes eld
17170 \end_inset
17171
17172
17173 \family sans
17174 Largest
17175 \family default
17176
17177 \begin_inset Quotes erd
17178 \end_inset
17179
17180  in the 
17181 \family sans
17182 Sans
17183 \begin_inset space ~
17184 \end_inset
17185
17186 Serif
17187 \family default
17188  font.
17189  This is also what's used in the output.
17190  Think of this as a 
17191 \begin_inset Quotes eld
17192 \end_inset
17193
17194 visual cue
17195 \begin_inset Quotes erd
17196 \end_inset
17197
17198  to remind you that this is a slide.
17199  Your final slides will use a larger font; ergo, you'll have less space.
17200  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
17201 \end_layout
17202
17203 \begin_layout Standard
17204 The next thing that becomes obvious is the changes to the paragraph environment
17205  pull-down box [at the far-left end of the toolbar].
17206  Most of the paragraph environments you're used to seeing are missing.
17207  There are also five new ones.
17208  That's because the 
17209 \family sans
17210 slides
17211 \family default
17212  class itself only supports certain paragraph environments:
17213 \end_layout
17214
17215 \begin_layout Itemize
17216
17217 \family sans
17218 Standard
17219 \end_layout
17220
17221 \begin_layout Itemize
17222
17223 \family sans
17224 Itemize
17225 \end_layout
17226
17227 \begin_layout Itemize
17228
17229 \family sans
17230 Enumerate
17231 \end_layout
17232
17233 \begin_layout Itemize
17234
17235 \family sans
17236 Description
17237 \end_layout
17238
17239 \begin_layout Itemize
17240
17241 \family sans
17242 List
17243 \end_layout
17244
17245 \begin_layout Itemize
17246
17247 \family sans
17248 Quotation
17249 \end_layout
17250
17251 \begin_layout Itemize
17252
17253 \family sans
17254 Quote
17255 \end_layout
17256
17257 \begin_layout Itemize
17258
17259 \family sans
17260 Verse
17261 \end_layout
17262
17263 \begin_layout Itemize
17264
17265 \family sans
17266 Caption
17267 \end_layout
17268
17269 \begin_layout Itemize
17270
17271 \family sans
17272 \SpecialChar LyX
17273 -Code
17274 \end_layout
17275
17276 \begin_layout Itemize
17277
17278 \family sans
17279 Comment
17280 \end_layout
17281
17282 \begin_layout Standard
17283 All of the other standard environments, including the section-heading environmen
17284 ts, aren't used in the 
17285 \family sans
17286 slides
17287 \family default
17288  class.
17289 \end_layout
17290
17291 \begin_layout Standard
17292 On the other hand, you'll notice the following new environments:
17293 \end_layout
17294
17295 \begin_layout Itemize
17296
17297 \family sans
17298 Slide
17299 \end_layout
17300
17301 \begin_layout Itemize
17302
17303 \family sans
17304 Overlay
17305 \end_layout
17306
17307 \begin_layout Itemize
17308
17309 \family sans
17310 Note
17311 \end_layout
17312
17313 \begin_layout Itemize
17314
17315 \family sans
17316 InvisibleText
17317 \end_layout
17318
17319 \begin_layout Itemize
17320
17321 \family sans
17322 VisibleText
17323 \end_layout
17324
17325 \begin_layout Standard
17326 These five are kind of quirky, due to a 
17327 \begin_inset Quotes eld
17328 \end_inset
17329
17330 feature
17331 \begin_inset Quotes erd
17332 \end_inset
17333
17334  in \SpecialChar LyX
17335 .
17336  You see, \SpecialChar LyX
17337  doesn't permit you to nest any other paragraph environment into
17338  an empty environment.
17339  Now, that's fine and dandy, but it means that you wouldn't be able to start
17340  a slide with anything except plain text.
17341  To deal with this, I've performed a little 
17342 \begin_inset Quotes eld
17343 \end_inset
17344
17345 \SpecialChar LaTeX
17346  magic.
17347 \begin_inset Quotes erd
17348 \end_inset
17349
17350  
17351 \end_layout
17352
17353 \begin_layout Subsubsection
17354 Quirks of the New Environments
17355 \begin_inset CommandInset label
17356 LatexCommand label
17357 name "sec:slideQuirk"
17358
17359 \end_inset
17360
17361
17362 \end_layout
17363
17364 \begin_layout Standard
17365 All five of the new paragraph environments are somewhat quirky due to inherent
17366  limitiations in the current version of \SpecialChar LyX
17367 .
17368  As I just mentioned, \SpecialChar LyX
17369  forbids environments that begin with another environment.
17370  To get around this, the 
17371 \family sans
17372 Slide
17373 \family default
17374  environment isn't a paragraph environment as described in the 
17375 \emph on
17376 User's Guide
17377 \emph default
17378 .
17379  
17380 \end_layout
17381
17382 \begin_layout Standard
17383 You should consider 
17384 \family sans
17385 Slide
17386 \family default
17387
17388 \family sans
17389 Overlay
17390 \family default
17391 , and 
17392 \family sans
17393 Note
17394 \family default
17395  to be 
17396 \begin_inset Quotes eld
17397 \end_inset
17398
17399 pseudo-environments.
17400 \begin_inset Quotes erd
17401 \end_inset
17402
17403  They look like a section heading or a 
17404 \begin_inset Quotes eld
17405 \end_inset
17406
17407
17408 \family sans
17409 Caption
17410 \family default
17411 ,
17412 \begin_inset Quotes erd
17413 \end_inset
17414
17415  but really begin a [and, if necessary, end the previous] paragraph environment.
17416  Likewise, treat 
17417 \family sans
17418 InvisibleText
17419 \family default
17420  and 
17421 \family sans
17422 VisibleText
17423 \family default
17424  as 
17425 \begin_inset Quotes eld
17426 \end_inset
17427
17428 pseudo-commands.
17429 \begin_inset Quotes erd
17430 \end_inset
17431
17432  These two perform some action.
17433 \end_layout
17434
17435 \begin_layout Standard
17436 A common feature of all five environments, 
17437 \family sans
17438 Slide
17439 \family default
17440
17441 \family sans
17442 Overlay
17443 \family default
17444
17445 \family sans
17446 Note
17447 \family default
17448
17449 \family sans
17450 InvisibleText
17451 \family default
17452  and 
17453 \family sans
17454 VisibleText
17455 \family default
17456 , is a rather long-ish label.
17457  The text following this label — ordinarily the contents of the paragraph
17458  environment — is utterly irrelevant for 
17459 \family sans
17460 Slide
17461 \family default
17462
17463 \family sans
17464 Overlay
17465 \family default
17466
17467 \family sans
17468 Note
17469 \family default
17470
17471 \family sans
17472 InvisibleText
17473 \family default
17474  and 
17475 \family sans
17476 VisibleText
17477 \family default
17478 .
17479  \SpecialChar LyX
17480  completely ignores it.
17481  In fact, you can leave these five environments completely empty.
17482  
17483 \end_layout
17484
17485 \begin_layout Standard
17486 While you don't 
17487 \emph on
17488 have
17489 \emph default
17490  to put any text after the rather long-ish label, you might want to.
17491  This could be a short description of the contents of the 
17492 \family sans
17493 Slide
17494 \family default
17495 , for example.
17496  In that case, enter your descriptive comment and hit 
17497 \family sans
17498 Return
17499 \family default
17500  as you normally would.
17501 \end_layout
17502
17503 \begin_layout Standard
17504 If, on the other hand, you don't want to enter any descriptive text, you'll
17505  hit another \SpecialChar LyX
17506  quirk.
17507  \SpecialChar LyX
17508 , like nature, abhors a vacuum, and will not let you start a new paragraph
17509  environment until you put something in the old one.
17510  So, do this:
17511 \end_layout
17512
17513 \begin_layout Itemize
17514 Start entering the text that will 
17515 \emph on
17516 follow
17517 \emph default
17518  the new 
17519 \family sans
17520 Slide
17521 \family default
17522
17523 \family sans
17524 Overlay
17525 \family default
17526
17527 \family sans
17528 Note
17529 \family default
17530
17531 \family sans
17532 InvisibleText
17533 \family default
17534  or 
17535 \family sans
17536 VisibleText
17537 \family default
17538 .
17539  
17540 \end_layout
17541
17542 \begin_layout Itemize
17543 Now move to the beginning of that paragraph.
17544  
17545 \end_layout
17546
17547 \begin_layout Itemize
17548 Next, hit 
17549 \family sans
17550 Return
17551 \family default
17552 .
17553  
17554 \end_layout
17555
17556 \begin_layout Itemize
17557 Finally, change this new, empty paragraph to a 
17558 \family sans
17559 Slide
17560 \family default
17561
17562 \family sans
17563 Overlay
17564 \family default
17565
17566 \family sans
17567 Note
17568 \family default
17569
17570 \family sans
17571 InvisibleText
17572 \family default
17573  or 
17574 \family sans
17575 VisibleText
17576 \family default
17577 .
17578  
17579 \end_layout
17580
17581 \begin_layout Standard
17582 Some future version of \SpecialChar LyX
17583  will, hopefully, resolve this quirkiness\SpecialChar ldots
17584
17585 \end_layout
17586
17587 \begin_layout Subsection
17588 Making a Presentation with 
17589 \family sans
17590 Slide
17591 \family default
17592
17593 \family sans
17594 Overlay
17595 \family default
17596  and 
17597 \family sans
17598 Note
17599 \end_layout
17600
17601 \begin_layout Subsubsection
17602 Using the 
17603 \family sans
17604 Slide
17605 \family default
17606  Environment
17607 \end_layout
17608
17609 \begin_layout Standard
17610 If you're expecting this section to teach you how to actually make a presentatio
17611 n, you'll be sorely disappointed.
17612  Naturally, I'll describe all of the ways the 
17613 \family sans
17614 slides
17615 \family default
17616  class can assist you in preparing the materials for a presentation.
17617  Filling in the contents, however, is up to you.
17618  [Then again, that 
17619 \emph on
17620 is
17621 \emph default
17622  the \SpecialChar LyX
17623  philosophy.]
17624 \end_layout
17625
17626 \begin_layout Standard
17627 Choosing the 
17628 \family sans
17629 Slide
17630 \family default
17631  environment [in the manner described in section
17632 \begin_inset space ~
17633 \end_inset
17634
17635
17636 \begin_inset CommandInset ref
17637 LatexCommand ref
17638 reference "sec:slideQuirk"
17639
17640 \end_inset
17641
17642 ] tells \SpecialChar LyX
17643  to begin a new slide [duh].
17644  The label for this environment/
17645 \begin_inset Quotes erd
17646 \end_inset
17647
17648 pseudo-command
17649 \begin_inset Quotes erd
17650 \end_inset
17651
17652  is an 
17653 \begin_inset Quotes eld
17654 \end_inset
17655
17656 ASCII line,
17657 \begin_inset Quotes erd
17658 \end_inset
17659
17660  in cool blue, followed by the label, 
17661 \begin_inset Quotes eld
17662 \end_inset
17663
17664 NewSlide:
17665 \begin_inset Quotes erd
17666 \end_inset
17667
17668 .
17669  Any text or paragraph environments that follow this one go on the new slide.
17670  It's that simple.
17671 \end_layout
17672
17673 \begin_layout Standard
17674 Slides are probably the only time you'll need to forcibly end pages in \SpecialChar LyX
17675
17676  (this can be specified in the 
17677 \family sans
17678 Paragraph Layout
17679 \family default
17680  dialog).
17681  In fact, you'll want to, once you finish entering the contents of one slide.
17682  If you've entered more text than can physically fit on a slide, the extra
17683  overflows onto a new slide.
17684  I don't recommend doing this, however, since the overflow slide won't have
17685  any page number on it.
17686  Furthermore, it may interfere with any 
17687 \family sans
17688 Overlay
17689 \family default
17690  you've made to accompany the oversized 
17691 \family sans
17692 Slide
17693 \family default
17694 .
17695 \end_layout
17696
17697 \begin_layout Standard
17698 The 
17699 \family sans
17700 Overlay
17701 \family default
17702  and 
17703 \family sans
17704 Note
17705 \family default
17706  environments work the same way as the 
17707 \family sans
17708 Slide
17709 \family default
17710  environment.
17711  They both create an 
17712 \begin_inset Quotes eld
17713 \end_inset
17714
17715 ASCII line
17716 \begin_inset Quotes erd
17717 \end_inset
17718
17719  followed by a label [
17720 \begin_inset Quotes eld
17721 \end_inset
17722
17723 NewOverlay:
17724 \begin_inset Quotes erd
17725 \end_inset
17726
17727  and 
17728 \begin_inset Quotes eld
17729 \end_inset
17730
17731 NewNote:
17732 \begin_inset Quotes erd
17733 \end_inset
17734
17735 , respectively].
17736  The color is a stunning magenta instead of blue, and the 
17737 \begin_inset Quotes eld
17738 \end_inset
17739
17740 ASCII line
17741 \begin_inset Quotes erd
17742 \end_inset
17743
17744  will look different, in style and in length.
17745  The label fonts of all three also differ from one another.
17746 \end_layout
17747
17748 \begin_layout Standard
17749 As with a 
17750 \family sans
17751 Slide
17752 \family default
17753 , if the contents of a 
17754 \family sans
17755 Note
17756 \family default
17757  or 
17758 \family sans
17759 Overlay
17760 \family default
17761  exceed the physical size of a slide or sheet of paper, the extra will overflow
17762  onto a new sheet.
17763  Again, you should avoid this.
17764  It defeats the whole purpose of 
17765 \family sans
17766 Note
17767 \family default
17768 s and 
17769 \family sans
17770 Overlay
17771 \family default
17772 s.
17773 \end_layout
17774
17775 \begin_layout Subsubsection
17776 Using 
17777 \family sans
17778 Overlay
17779 \family default
17780  with 
17781 \family sans
17782 Slide
17783 \end_layout
17784
17785 \begin_layout Standard
17786 The idea behind an 
17787 \family sans
17788 Overlay
17789 \family default
17790  is a slide that sits atop another slide.
17791  Perhaps you wish to discuss a figure on the main 
17792 \family sans
17793 Slide
17794 \family default
17795  before displaying the text associated with it.
17796  One way to accomplish this is tape a flap of dark paper over the part of
17797  the 
17798 \family sans
17799 Slide
17800 \family default
17801  you want to display later.
17802  This method fails, however, if you wish to overlap one graph with another,
17803  for example.
17804  You would then have to fumble while speaking to align the two separate,
17805  overlapping 
17806 \family sans
17807 Slide
17808 \family default
17809 s to align the two graphs.
17810  The use of an 
17811 \family sans
17812 Overlay
17813 \family default
17814  environment in both cases makes life much easier.
17815 \end_layout
17816
17817 \begin_layout Standard
17818 Each 
17819 \family sans
17820 Overlay
17821 \family default
17822  receives the page number of its 
17823 \begin_inset Quotes eld
17824 \end_inset
17825
17826 parent
17827 \begin_inset Quotes erd
17828 \end_inset
17829
17830  
17831 \family sans
17832 Slide
17833 \family default
17834 , appended by 
17835 \begin_inset Quotes eld
17836 \end_inset
17837
17838
17839 \family typewriter
17840 -a
17841 \family default
17842
17843 \begin_inset Quotes erd
17844 \end_inset
17845
17846 .
17847 \begin_inset Foot
17848 status collapsed
17849
17850 \begin_layout Plain Layout
17851 Presumably, mutliple 
17852 \family sans
17853 Overlay
17854 \family default
17855 s would have 
17856 \begin_inset Quotes eld
17857 \end_inset
17858
17859
17860 \family typewriter
17861 -a
17862 \family default
17863
17864 \begin_inset Quotes erd
17865 \end_inset
17866
17867
17868 \begin_inset Quotes eld
17869 \end_inset
17870
17871
17872 \family typewriter
17873 -b
17874 \family default
17875
17876 \begin_inset Quotes erd
17877 \end_inset
17878
17879
17880 \begin_inset Quotes eld
17881 \end_inset
17882
17883
17884 \family typewriter
17885 -c
17886 \family default
17887
17888 \begin_inset Quotes erd
17889 \end_inset
17890
17891 , etc.
17892 \begin_inset space ~
17893 \end_inset
17894
17895 appended to the page number of the parent 
17896 \family sans
17897 Slide
17898 \family default
17899 .
17900  
17901 \end_layout
17902
17903 \end_inset
17904
17905  Clearly, you want the contents of both the 
17906 \family sans
17907 Slide
17908 \family default
17909  and the 
17910 \family sans
17911 Overlay
17912 \family default
17913  to each fit on a single physical slide! You should probably consider an
17914  
17915 \family sans
17916 Overlay
17917 \family default
17918  as 
17919 \begin_inset Quotes eld
17920 \end_inset
17921
17922 part of
17923 \begin_inset Quotes erd
17924 \end_inset
17925
17926  a 
17927 \family sans
17928 Slide
17929 \family default
17930 .
17931  Indeed, the \SpecialChar LyX
17932  
17933 \family sans
17934 slides
17935 \family default
17936  class provides a visual cue for this: the label at the start of an 
17937 \family sans
17938 Overlay
17939 \family default
17940  is shorter than that at the start of a 
17941 \family sans
17942 Slide
17943 \family default
17944 .
17945  Lastly, when you generate printable output, you'll find alignment markers
17946  in all four corners of both the 
17947 \family sans
17948 Overlay
17949 \family default
17950  page and its parent 
17951 \family sans
17952 Slide
17953 \family default
17954 .
17955  These will assist you in lining up the two physical slides.
17956 \end_layout
17957
17958 \begin_layout Standard
17959 The major problem in overlaying two slides is aligning the contents of the
17960  two transparencies.
17961  How much space should you leave for that graph on the second slide? Worse
17962  still, what if you want a graph and a sentence on second slide, but there
17963  is text on the main transparency that goes in between them? You could try
17964  and insert vertical space of the right size.
17965  The better way is to use 
17966 \family sans
17967 InvisibleText
17968 \family default
17969  and 
17970 \family sans
17971 VisibleText
17972 \family default
17973 .
17974 \end_layout
17975
17976 \begin_layout Standard
17977 As their names imply, 
17978 \family sans
17979 InvisibleText
17980 \family default
17981  and 
17982 \family sans
17983 VisibleText
17984 \family default
17985  are two command-like paragraph environments that make all subsequent text
17986  invisible and visible, respectively.
17987  Note from section
17988 \begin_inset space ~
17989 \end_inset
17990
17991
17992 \begin_inset CommandInset ref
17993 LatexCommand ref
17994 reference "sec:slideQuirk"
17995
17996 \end_inset
17997
17998  that you don't place anything 
17999 \emph on
18000 into
18001 \emph default
18002  these two environments, however.
18003  When you create an 
18004 \family sans
18005 InvisibleText
18006 \family default
18007 , it inserts a centered, sky-blue label into the page reading 
18008 \begin_inset Quotes eld
18009 \end_inset
18010
18011 <Invisible Text Follows>
18012 \begin_inset Quotes erd
18013 \end_inset
18014
18015 .
18016  For paragraphs following this label, the parts of the 
18017 \family sans
18018 Slide
18019 \family default
18020  [or 
18021 \family sans
18022 Overlay
18023 \family default
18024 ; it doesn't matter which] where they would be contain instead blank space.
18025  
18026 \end_layout
18027
18028 \begin_layout Standard
18029 For 
18030 \family sans
18031 VisibleText
18032 \family default
18033 , the corresponding centered label is 
18034 \begin_inset Quotes eld
18035 \end_inset
18036
18037 <Visible Text Follows>
18038 \begin_inset Quotes erd
18039 \end_inset
18040
18041  in blazing green.
18042  Paragraphs following this label behave normally.
18043  Note that the beginning of a new 
18044 \family sans
18045 Slide
18046 \family default
18047
18048 \family sans
18049 Overlay
18050 \family default
18051 , or 
18052 \family sans
18053 Note
18054 \family default
18055  automatically shuts off an 
18056 \family sans
18057 InvisibleText
18058 \family default
18059 .
18060  It's therefore not necessary to use 
18061 \family sans
18062 VisibleText
18063 \family default
18064  at the end of a 
18065 \family sans
18066 Slide
18067 \family default
18068 .
18069 \end_layout
18070
18071 \begin_layout Standard
18072 By now, it should be obvious how to create overlay transparencies using
18073  the proper combination of 
18074 \family sans
18075 InvisibleText
18076 \family default
18077  and 
18078 \family sans
18079 VisibleText
18080 \family default
18081  on a 
18082 \family sans
18083 Slide
18084 \family default
18085  and 
18086 \family sans
18087 Overlay
18088 \family default
18089 :
18090 \end_layout
18091
18092 \begin_layout Enumerate
18093 Create a 
18094 \family sans
18095 Slide
18096 \family default
18097 , including everything that will appear on it, whether on the main slide
18098  or on the 
18099 \family sans
18100 Overlay
18101 \family default
18102 .
18103 \end_layout
18104
18105 \begin_layout Enumerate
18106 Before each figure or paragraph that will appear only on the 
18107 \family sans
18108 Overlay
18109 \family default
18110 , insert an 
18111 \family sans
18112 InvisibleText
18113 \family default
18114  environment.
18115  If necessary, insert a 
18116 \family sans
18117 VisibleText
18118 \family default
18119  environment after the 
18120 \family sans
18121 Overlay
18122 \family default
18123 -only text.
18124 \end_layout
18125
18126 \begin_layout Enumerate
18127 Start an 
18128 \family sans
18129 Overlay
18130 \family default
18131  immediately following the 
18132 \family sans
18133 Slide
18134 \family default
18135 .
18136 \end_layout
18137
18138 \begin_layout Enumerate
18139 Copy the contents of this 
18140 \family sans
18141 Slide
18142 \family default
18143  into the 
18144 \family sans
18145 Overlay
18146 \family default
18147 .
18148 \end_layout
18149
18150 \begin_layout Enumerate
18151 Within the 
18152 \family sans
18153 Overlay
18154 \family default
18155 , change all of the 
18156 \family sans
18157 InvisibleText
18158 \family default
18159  lines to 
18160 \family sans
18161 VisibleText
18162 \family default
18163  and vice-versa.
18164 \end_layout
18165
18166 \begin_layout Standard
18167 That's it.
18168  You've just made an 
18169 \family sans
18170 Overlay
18171 \family default
18172 .
18173 \end_layout
18174
18175 \begin_layout Standard
18176 There's one problem with the way I've designed the \SpecialChar LyX
18177  
18178 \family sans
18179 slides
18180 \family default
18181  class: you can't make text in the middle of a paragraph invisible, nor
18182  make text in the middle of an invisible paragraph visible again.
18183  To accomplish this feat, you'll need to use some inlined \SpecialChar LaTeX
18184  codes.
18185 \begin_inset Foot
18186 status collapsed
18187
18188 \begin_layout Plain Layout
18189 The commands of interest are: 
18190 \end_layout
18191
18192 \begin_layout Itemize
18193
18194 \family typewriter
18195 {
18196 \backslash
18197 invisible \SpecialChar ldots
18198  }
18199 \end_layout
18200
18201 \begin_layout Itemize
18202
18203 \family typewriter
18204 {
18205 \backslash
18206 visible \SpecialChar ldots
18207  }
18208 \end_layout
18209
18210 \begin_layout Plain Layout
18211 \SpecialChar ldots
18212 and need to be marked as \SpecialChar TeX
18213 .
18214  The text whose 
18215 \begin_inset Quotes eld
18216 \end_inset
18217
18218 visibility
18219 \begin_inset Quotes erd
18220 \end_inset
18221
18222  you wish to change goes in between the brackets [and after the 
18223 \family typewriter
18224
18225 \backslash
18226 invisible
18227 \family default
18228  or 
18229 \family typewriter
18230
18231 \backslash
18232 visible
18233 \family default
18234  command].
18235  If you don't know how to mark text as \SpecialChar TeX
18236 , see the appropriate section of
18237  the 
18238 \emph on
18239 User's Guide
18240 \emph default
18241 .
18242 \end_layout
18243
18244 \end_inset
18245
18246
18247 \end_layout
18248
18249 \begin_layout Subsubsection
18250 Using 
18251 \family sans
18252 Note
18253 \family default
18254  with 
18255 \family sans
18256 Slide
18257 \family default
18258
18259 \begin_inset CommandInset label
18260 LatexCommand label
18261 name "sec:slideNote"
18262
18263 \end_inset
18264
18265
18266 \end_layout
18267
18268 \begin_layout Standard
18269 Like an 
18270 \family sans
18271 Overlay
18272 \family default
18273 , a 
18274 \family sans
18275 Note
18276 \family default
18277  is associated with a 
18278 \begin_inset Quotes eld
18279 \end_inset
18280
18281 parent
18282 \begin_inset Quotes erd
18283 \end_inset
18284
18285  
18286 \family sans
18287 Slide
18288 \family default
18289 .
18290  Here, too, the \SpecialChar LyX
18291  
18292 \family sans
18293 slides
18294 \family default
18295  class provides visual cues.
18296  The label for a 
18297 \family sans
18298 Note
18299 \family default
18300  is shorter than that of a 
18301 \family sans
18302 Slide
18303 \family default
18304  [yet longer than that of an 
18305 \family sans
18306 Overlay
18307 \family default
18308 ] and, like the label of an 
18309 \family sans
18310 Overlay
18311 \family default
18312  is shockingly magenta.
18313  Additionally, the printed 
18314 \family sans
18315 Note
18316 \family default
18317  has the page number of its 
18318 \begin_inset Quotes eld
18319 \end_inset
18320
18321 parent
18322 \begin_inset Quotes erd
18323 \end_inset
18324
18325  
18326 \family sans
18327 Slide
18328 \family default
18329 , appended by 
18330 \begin_inset Quotes eld
18331 \end_inset
18332
18333
18334 \family typewriter
18335 -
18336 \family default
18337 1
18338 \begin_inset Quotes erd
18339 \end_inset
18340
18341
18342 \begin_inset Quotes eld
18343 \end_inset
18344
18345
18346 \family typewriter
18347 -
18348 \family default
18349 2
18350 \begin_inset Quotes erd
18351 \end_inset
18352
18353
18354 \begin_inset Quotes eld
18355 \end_inset
18356
18357
18358 \family typewriter
18359 -
18360 \family default
18361 3
18362 \begin_inset Quotes erd
18363 \end_inset
18364
18365 , etc.
18366  You can have multiple 
18367 \family sans
18368 Note
18369 \family default
18370 s associated with a single 
18371 \family sans
18372 Slide
18373 \family default
18374 , and, as with 
18375 \family sans
18376 Slide
18377 \family default
18378  and 
18379 \family sans
18380 Overlay
18381 \family default
18382 , you'll probably want to break up long 
18383 \family sans
18384 Note
18385 \family default
18386 s so that they fit on a single sheet of paper.
18387 \end_layout
18388
18389 \begin_layout Standard
18390 The purpose of a 
18391 \family sans
18392 Note
18393 \family default
18394  is obvious: it contains anything additional you might want to say about
18395  a 
18396 \family sans
18397 Slide
18398 \family default
18399 .
18400  It could also be used as a sheet of reminders for a particular 
18401 \family sans
18402 Slide
18403 \family default
18404 .
18405  In the case of the latter, you might want to make use of time markers.
18406  Currently, the \SpecialChar LyX
18407  
18408 \family sans
18409 slides
18410 \family default
18411  class has no 
18412 \begin_inset Quotes eld
18413 \end_inset
18414
18415 native
18416 \begin_inset Quotes erd
18417 \end_inset
18418
18419  support for time markers, a 
18420 \noun on
18421 Sli\SpecialChar TeX
18422
18423 \noun default
18424  feature.
18425  So, you'll have to resort to using the \SpecialChar LaTeX
18426  codes.
18427 \end_layout
18428
18429 \begin_layout Standard
18430 To use time markers, you'll need to specify the extra class option 
18431 \begin_inset Quotes eld
18432 \end_inset
18433
18434
18435 \family typewriter
18436 clock
18437 \family default
18438
18439 \begin_inset Quotes erd
18440 \end_inset
18441
18442  [see section
18443 \begin_inset space ~
18444 \end_inset
18445
18446
18447 \begin_inset CommandInset ref
18448 LatexCommand ref
18449 reference "sec:slidesetup"
18450
18451 \end_inset
18452
18453 ].
18454  This option turns on timing marks, which will appear in the lower-left-hand
18455  corner of every 
18456 \family sans
18457 Note
18458 \family default
18459  you generate.
18460  To set what appears in the time marker, you use the \SpecialChar LaTeX
18461  commands 
18462 \begin_inset Quotes eld
18463 \end_inset
18464
18465
18466 \family typewriter
18467
18468 \backslash
18469 settime{}
18470 \family default
18471
18472 \begin_inset Quotes erd
18473 \end_inset
18474
18475  and 
18476 \begin_inset Quotes eld
18477 \end_inset
18478
18479
18480 \family typewriter
18481
18482 \backslash
18483 addtime{}
18484 \family default
18485
18486 \begin_inset Quotes erd
18487 \end_inset
18488
18489 .
18490  The arguments of both commands are time measured in seconds.
18491  
18492 \begin_inset Quotes eld
18493 \end_inset
18494
18495
18496 \family typewriter
18497
18498 \backslash
18499 settime{}
18500 \family default
18501
18502 \begin_inset Quotes erd
18503 \end_inset
18504
18505  sets the time marker to a given time.
18506  
18507 \begin_inset Quotes eld
18508 \end_inset
18509
18510
18511 \family typewriter
18512
18513 \backslash
18514 addtime{}
18515 \family default
18516
18517 \begin_inset Quotes erd
18518 \end_inset
18519
18520  increments the time marker by the specified amount.
18521  Using time markers and 
18522 \family sans
18523 Note
18524 \family default
18525 s in this fashion, you can remind yourself how much time to spend on a particula
18526
18527 \family sans
18528 Slide
18529 \family default
18530 .
18531 \end_layout
18532
18533 \begin_layout Standard
18534 There's one last feature to describe.
18535  Clearly, you'd like to print out all of your 
18536 \family sans
18537 Slide
18538 \family default
18539 s and 
18540 \family sans
18541 Overlay
18542 \family default
18543 s on transparencies while printing all of your 
18544 \family sans
18545 Note
18546 \family default
18547 s on plain paper.
18548  However, a 
18549 \family sans
18550 Note
18551 \family default
18552  
18553 \emph on
18554 must
18555 \emph default
18556  follow the 
18557 \family sans
18558 Slide
18559 \family default
18560  with which it is associated.
18561  What's a person to do?
18562 \end_layout
18563
18564 \begin_layout Standard
18565 Luckily, there are two \SpecialChar LaTeX
18566  commands that allow you to select what to print
18567  out.
18568  Both must be placed into the preamble of your document.
18569  The command 
18570 \begin_inset Quotes eld
18571 \end_inset
18572
18573
18574 \family typewriter
18575
18576 \backslash
18577 onlyslides{
18578 \backslash
18579 slides}
18580 \family default
18581
18582 \begin_inset Quotes erd
18583 \end_inset
18584
18585  will cause the output to contain only the 
18586 \family sans
18587 Slide
18588 \family default
18589 s and 
18590 \family sans
18591 Overlay
18592 \family default
18593 s.
18594  Correspondingly, the command 
18595 \begin_inset Quotes eld
18596 \end_inset
18597
18598
18599 \family typewriter
18600
18601 \backslash
18602 onlynotes{
18603 \backslash
18604 notes}
18605 \family default
18606
18607 \begin_inset Quotes erd
18608 \end_inset
18609
18610  prevents the output of anything but 
18611 \family sans
18612 Note
18613 \family default
18614 s.
18615  I'd advise placing both commands in the preamble and initially comment
18616  both out.
18617  You can then preview your entire presentation as you write.
18618  When you're done writing, you can then uncomment one of the two to select
18619  what you want to print.
18620  I like to uncomment 
18621 \begin_inset Quotes eld
18622 \end_inset
18623
18624
18625 \family typewriter
18626
18627 \backslash
18628 onlyslides{
18629 \backslash
18630 slides}
18631 \family default
18632
18633 \begin_inset Quotes erd
18634 \end_inset
18635
18636  , print to a file with 
18637 \begin_inset Quotes eld
18638 \end_inset
18639
18640
18641 \family typewriter
18642 -slides
18643 \family default
18644
18645 \begin_inset Quotes erd
18646 \end_inset
18647
18648  in its name, comment it back out, then uncomment 
18649 \begin_inset Quotes eld
18650 \end_inset
18651
18652
18653 \family typewriter
18654
18655 \backslash
18656 onlynotes{
18657 \backslash
18658 notes}
18659 \family default
18660
18661 \begin_inset Quotes erd
18662 \end_inset
18663
18664  and print to a 
18665 \begin_inset Quotes eld
18666 \end_inset
18667
18668
18669 \family typewriter
18670 *-notes.ps
18671 \family default
18672
18673 \begin_inset Quotes erd
18674 \end_inset
18675
18676  file.
18677  I can then send either file to a printer, loading transparencies or plain
18678  paper as appropriate.
18679 \end_layout
18680
18681 \begin_layout Standard
18682 You can also provide other arguments to the 
18683 \begin_inset Quotes eld
18684 \end_inset
18685
18686
18687 \family typewriter
18688
18689 \backslash
18690 onlyslides{}
18691 \family default
18692
18693 \begin_inset Quotes erd
18694 \end_inset
18695
18696  and 
18697 \begin_inset Quotes eld
18698 \end_inset
18699
18700
18701 \family typewriter
18702
18703 \backslash
18704 onlynotes{}
18705 \family default
18706
18707 \begin_inset Quotes erd
18708 \end_inset
18709
18710  commands.
18711  See a good \SpecialChar LaTeX
18712  book for details.
18713 \end_layout
18714
18715 \begin_layout Subsection
18716 The 
18717 \family sans
18718 slides
18719 \family default
18720  Class Template File
18721 \end_layout
18722
18723 \begin_layout Standard
18724 I have also provided a template file, 
18725 \begin_inset Quotes eld
18726 \end_inset
18727
18728
18729 \family typewriter
18730 slides.lyx
18731 \family default
18732
18733 \begin_inset Quotes erd
18734 \end_inset
18735
18736 , with the 
18737 \family sans
18738 slides
18739 \family default
18740  class.
18741  To use it, begin your new presentation with 
18742 \family sans
18743 File\SpecialChar menuseparator
18744 New
18745 \begin_inset space ~
18746 \end_inset
18747
18748 from
18749 \begin_inset space ~
18750 \end_inset
18751
18752 Template
18753 \family default
18754 .
18755  Your new \SpecialChar LyX
18756  presentation file will contain an example 
18757 \family sans
18758 Slide
18759 \family default
18760  – 
18761 \family sans
18762 Overlay
18763 \family default
18764  – 
18765 \family sans
18766 Note
18767 \family default
18768  triplet.
18769  The 
18770 \family sans
18771 Slide
18772 \family default
18773  and 
18774 \family sans
18775 Overlay
18776 \family default
18777  additionally contain an example of the use of 
18778 \family sans
18779 InvisibleText
18780 \family default
18781  and 
18782 \family sans
18783 VisibleText
18784 \family default
18785 .
18786  Lastly, the preamble will contain:
18787 \end_layout
18788
18789 \begin_layout LyX-Code
18790 % Uncomment to print out only slides and overlays
18791 \end_layout
18792
18793 \begin_layout LyX-Code
18794 %
18795 \end_layout
18796
18797 \begin_layout LyX-Code
18798 %
18799 \backslash
18800 onlyslides{
18801 \backslash
18802 slides}
18803 \begin_inset Newline newline
18804 \end_inset
18805
18806  
18807 \end_layout
18808
18809 \begin_layout LyX-Code
18810 % Uncomment to print out only notes
18811 \end_layout
18812
18813 \begin_layout LyX-Code
18814 %
18815 \end_layout
18816
18817 \begin_layout LyX-Code
18818 %
18819 \backslash
18820 onlynotes{
18821 \backslash
18822 notes}
18823 \end_layout
18824
18825 \begin_layout Standard
18826 One final thing: I created this class to support the \SpecialChar LaTeX2e
18827  
18828 \begin_inset Quotes eld
18829 \end_inset
18830
18831
18832 \noun on
18833 Sli\SpecialChar TeX
18834
18835 \noun default
18836  emulation
18837 \begin_inset Quotes erd
18838 \end_inset
18839
18840  class, one of the built-in \SpecialChar LaTeX2e
18841  classes.
18842  Neither I nor the rest of the \SpecialChar LyX
18843  Team endorse or oppose the use of this built-in
18844  slide class.
18845  It's here if you want it or need it.
18846  There exist other \SpecialChar LaTeX2e
18847  classes for creating presentations, such as the 
18848 \family sans
18849 Foils
18850 \family default
18851  class [see section
18852 \begin_inset space ~
18853 \end_inset
18854
18855
18856 \begin_inset CommandInset ref
18857 LatexCommand ref
18858 reference "sec:foiltex"
18859
18860 \end_inset
18861
18862 ] or the 
18863 \begin_inset Quotes eld
18864 \end_inset
18865
18866
18867 \family typewriter
18868 seminar
18869 \family default
18870
18871 \begin_inset Quotes erd
18872 \end_inset
18873
18874  package [present on some \SpecialChar TeX
18875  distributions].
18876  The latter is not yet supported under \SpecialChar LyX
18877 .
18878 \begin_inset Foot
18879 status collapsed
18880
18881 \begin_layout Plain Layout
18882 Perhaps you can take on the task\SpecialChar ldots
18883
18884 \end_layout
18885
18886 \end_inset
18887
18888  I know nothing about these other classes.
18889  Try them out to see what sort of alternative they provide.
18890 \end_layout
18891
18892 \begin_layout Chapter
18893 \SpecialChar LyX
18894  Features needing Extra Software
18895 \end_layout
18896
18897 \begin_layout Section
18898 Checking \SpecialChar TeX
18899
18900 \end_layout
18901
18902 \begin_layout Standard
18903 by 
18904 \noun on
18905 Asger Alstrup
18906 \end_layout
18907
18908 \begin_layout Subsection
18909 Introduction
18910 \end_layout
18911
18912 \begin_layout Standard
18913 If you have the 
18914 \family typewriter
18915 chktex
18916 \family default
18917  program installed
18918 \begin_inset Foot
18919 status collapsed
18920
18921 \begin_layout Plain Layout
18922
18923 \family typewriter
18924 chktex
18925 \family default
18926  is not yet available when you are using the \SpecialChar LaTeX
18927  distribution MiK\SpecialChar TeX
18928 .
18929 \end_layout
18930
18931 \end_inset
18932
18933 , you'll find in the 
18934 \family sans
18935 Tools
18936 \family default
18937  menu the entry: 
18938 \family sans
18939 Check
18940 \begin_inset space ~
18941 \end_inset
18942
18943 TeX
18944 \family default
18945 .
18946  You can get 
18947 \family typewriter
18948 chktex
18949 \family default
18950  from CTAN,
18951 \begin_inset Newline newline
18952 \end_inset
18953
18954
18955 \begin_inset CommandInset href
18956 LatexCommand href
18957 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
18958 literal "false"
18959
18960 \end_inset
18961
18962 .
18963 \end_layout
18964
18965 \begin_layout Standard
18966 The 
18967 \family sans
18968 Chk\SpecialChar TeX
18969
18970 \family default
18971  package is a program that was written by 
18972 \begin_inset Flex Noun
18973 status collapsed
18974
18975 \begin_layout Plain Layout
18976 Jens T.
18977 \begin_inset space ~
18978 \end_inset
18979
18980 Berger Thielemann
18981 \end_layout
18982
18983 \end_inset
18984
18985  in frustration because some constructs in \SpecialChar LaTeX
18986  are sometimes non-intuitive,
18987  and easy to forget.
18988  The program runs over your \SpecialChar LaTeX
18989  file, checks the integrity of the file, and
18990  flags some common errors.
18991  In other technical words, it is 
18992 \family typewriter
18993 lint
18994 \family default
18995  for \SpecialChar LaTeX
18996 .
18997 \end_layout
18998
18999 \begin_layout Standard
19000 Well, what is a syntax checker doing in \SpecialChar LyX
19001  which is supposed to produce correct
19002  \SpecialChar LaTeX
19003  anyways? The answer is simple: Just as 
19004 \family typewriter
19005 Lint
19006 \family default
19007  not only checks the 
19008 \emph on
19009 syntax
19010 \emph default
19011  of C programs, but also does 
19012 \emph on
19013 semantic
19014 \emph default
19015  checks for type-errors, 
19016 \family sans
19017 Chk\SpecialChar TeX
19018
19019 \family default
19020  catches some common 
19021 \emph on
19022 typographic
19023 \emph default
19024  errors, in addition to the syntactical ones.
19025  Specifically, 
19026 \family sans
19027 Chk\SpecialChar TeX
19028
19029 \family default
19030  is capable of detecting several common errors, such as
19031 \end_layout
19032
19033 \begin_layout Itemize
19034 Ellipsis detection:
19035 \begin_inset Newline newline
19036 \end_inset
19037
19038 Use \SpecialChar ldots
19039  instead of ...
19040 \end_layout
19041
19042 \begin_layout Itemize
19043 No space in front of/after parenthesis:
19044 \begin_inset Newline newline
19045 \end_inset
19046
19047 ( wrong spacing )
19048 \end_layout
19049
19050 \begin_layout Itemize
19051 Enforcement of normal space after common abbreviations:
19052 \begin_inset Newline newline
19053 \end_inset
19054
19055 e.
19056 \begin_inset space \thinspace{}
19057 \end_inset
19058
19059 g.
19060 \begin_inset space \space{}
19061 \end_inset
19062
19063 is too wide spacing.
19064 \end_layout
19065
19066 \begin_layout Itemize
19067 Enforcement of end-of-sentence space when the last sentence ends with a
19068  capital letter:
19069 \begin_inset Newline newline
19070 \end_inset
19071
19072 This is a TEST.
19073  And this is wrong spacing.
19074 \end_layout
19075
19076 \begin_layout Itemize
19077 Space in front of labels and similar commands:
19078 \begin_inset Newline newline
19079 \end_inset
19080
19081 The label should stick right up to the text to avoid falling to a wrong
19082  page.
19083  
19084 \begin_inset CommandInset label
19085 LatexCommand label
19086 name "sec:chktex"
19087
19088 \end_inset
19089
19090  
19091 \begin_inset Foot
19092 status collapsed
19093
19094 \begin_layout Plain Layout
19095 This footnote is in danger of falling off to a wrong page
19096 \end_layout
19097
19098 \end_inset
19099
19100  The label is separated too much.
19101 \end_layout
19102
19103 \begin_layout Itemize
19104 Space in front of references, instead of hard spaces:
19105 \begin_inset Newline newline
19106 \end_inset
19107
19108 If you have bad luck, the text will break right between the referenced text
19109  and reference number, and that's a pity.
19110  See section 
19111 \begin_inset CommandInset ref
19112 LatexCommand ref
19113 reference "sec:chktex"
19114
19115 \end_inset
19116
19117 .
19118 \end_layout
19119
19120 \begin_layout Itemize
19121 Use of 
19122 \begin_inset Quotes eld
19123 \end_inset
19124
19125 x
19126 \begin_inset Quotes erd
19127 \end_inset
19128
19129  instead of 
19130 \begin_inset Formula $\times$
19131 \end_inset
19132
19133  between numbers:
19134 \begin_inset Newline newline
19135 \end_inset
19136
19137 2x2 looks cheap compared to 
19138 \begin_inset Formula $2\times2$
19139 \end_inset
19140
19141 .
19142 \end_layout
19143
19144 \begin_layout Standard
19145 and more \SpecialChar ldots
19146  It is an invaluable tool when you are 
19147 \begin_inset Quotes eld
19148 \end_inset
19149
19150 finishing up
19151 \begin_inset Quotes erd
19152 \end_inset
19153
19154  your document before printing, and you should run it right after the obligatory
19155  spelling check, and before you go fine tuning the typesetting.
19156 \end_layout
19157
19158 \begin_layout Subsection
19159 How to use it
19160 \end_layout
19161
19162 \begin_layout Standard
19163 If you have the program installed, usage is as simple as choosing 
19164 \family sans
19165 Tools\SpecialChar menuseparator
19166 Check
19167 \begin_inset space ~
19168 \end_inset
19169
19170 TeX
19171 \family default
19172 .
19173  This will make \SpecialChar LyX
19174  generate a \SpecialChar LaTeX
19175  file of your document, start 
19176 \family sans
19177 Chk\SpecialChar TeX
19178
19179 \family default
19180  to check it, and then make \SpecialChar LyX
19181  insert 
19182 \begin_inset Quotes eld
19183 \end_inset
19184
19185 error boxes
19186 \begin_inset Quotes erd
19187 \end_inset
19188
19189  with the warnings from 
19190 \family sans
19191 Chk\SpecialChar TeX
19192
19193 \family default
19194 , if there were any.
19195  The warnings will be placed close to the point of the mistake, and you
19196  can quickly find them by using the 
19197 \family sans
19198 Navigate\SpecialChar menuseparator
19199 Error
19200 \family default
19201  menu item, or the shortcut key 
19202 \family sans
19203 C-g
19204 \family default
19205  from the default 
19206 \family typewriter
19207 cua
19208 \family default
19209  bind file.
19210  Open the error boxes by clicking on them with the mouse, or use the shortcut
19211  key 
19212 \family sans
19213 C-i
19214 \family default
19215  from 
19216 \family typewriter
19217 cua
19218 \family default
19219  bindings, or the corresponding 
19220 \family sans
19221 C-o
19222 \family default
19223  for the alternate 
19224 \family typewriter
19225 emacs
19226 \family default
19227  bind file.
19228  Read the warning and correct the mistake, if it is a mistake.
19229  If you have trouble understanding what the warning is about, you can safely
19230  ignore it.
19231  Remember that there is a hidden layer between the document on screen and
19232  the technical details in invoking 
19233 \family sans
19234 Chk\SpecialChar TeX
19235
19236 \family default
19237 , and this gap can make some warnings seem arcane or just plain silly.
19238 \end_layout
19239
19240 \begin_layout Standard
19241 This document is an excellent testing bed for the feature, and it should
19242  provide quite a few warnings for you to fiddle with.
19243  Since computers are only so smart, expect most of the warnings to be false
19244  alarms, though.
19245 \end_layout
19246
19247 \begin_layout Subsection
19248 How to fine tune it
19249 \end_layout
19250
19251 \begin_layout Standard
19252 Sometimes, you'll find that 
19253 \family sans
19254 Chk\SpecialChar TeX
19255
19256 \family default
19257  makes more noise than suits your mood.
19258  Then you can choose not to use it, wait until your mood changes, or try
19259  to customize 
19260 \family sans
19261 Chk\SpecialChar TeX
19262
19263 \family default
19264  to get better along with you.
19265 \end_layout
19266
19267 \begin_layout Standard
19268 Although 
19269 \family sans
19270 Chk\SpecialChar TeX
19271
19272 \family default
19273  
19274 \emph on
19275 is
19276 \emph default
19277  very configurable and extensible, you should not expect to solve all problems
19278  with 
19279 \family sans
19280 Chk\SpecialChar TeX
19281
19282 \family default
19283  in \SpecialChar LyX
19284  this way.
19285  Since \SpecialChar LyX
19286  has to generate a somewhat special \SpecialChar LaTeX
19287  file to be able to match the
19288  line numbers from the 
19289 \family sans
19290 Chk\SpecialChar TeX
19291
19292 \family default
19293  output
19294 \begin_inset Foot
19295 status collapsed
19296
19297 \begin_layout Plain Layout
19298 You can inspect the specific output from 
19299 \family sans
19300 chktex
19301 \family default
19302  by using 
19303 \family sans
19304 Document\SpecialChar menuseparator
19305 \SpecialChar LaTeX
19306
19307 \begin_inset space ~
19308 \end_inset
19309
19310 Log
19311 \family default
19312  right after a 
19313 \family sans
19314 chktex
19315 \family default
19316  run.
19317 \end_layout
19318
19319 \end_inset
19320
19321  to the internal document structure, some of the warnings will not appear
19322  correctly.
19323  There are two things you can do about this:
19324 \end_layout
19325
19326 \begin_layout Itemize
19327 Fine tune the 
19328 \family sans
19329 Chk\SpecialChar TeX
19330
19331 \family default
19332  invocation command line in 
19333 \begin_inset Flex Noun
19334 status collapsed
19335
19336 \begin_layout Plain Layout
19337 Tools\SpecialChar menuseparator
19338 Preferences\SpecialChar menuseparator
19339 Output\SpecialChar menuseparator
19340 LaTeX\SpecialChar menuseparator
19341 CheckTeX command
19342 \end_layout
19343
19344 \end_inset
19345
19346 , or the global 
19347 \family sans
19348 Chk\SpecialChar TeX
19349
19350 \family default
19351  installation configuration file (usually with the file 
19352 \family typewriter
19353 chktexrc
19354 \family default
19355 ).
19356  See below to learn what warnings can be enabled and disabled on the command
19357  line.
19358 \end_layout
19359
19360 \begin_layout Itemize
19361 Export your document as a raw \SpecialChar LaTeX
19362  file using 
19363 \family sans
19364 File\SpecialChar menuseparator
19365 Export\SpecialChar menuseparator
19366 \SpecialChar LaTeX
19367
19368 \family default
19369  and run 
19370 \family typewriter
19371 chktex
19372 \family default
19373  manually on that.
19374  Invoked in this way, it can be a hassle to find the corresponding place
19375  in the document inside \SpecialChar LyX
19376 , but with a little patience, you should be able
19377  to do it.
19378 \end_layout
19379
19380 \begin_layout Standard
19381 Here follows the warning messages that can be enabled and disabled in 
19382 \family sans
19383 Preferences
19384 \family default
19385 .
19386  Use 
19387 \family typewriter
19388 -n#
19389 \family default
19390  to disable a warning, and 
19391 \family typewriter
19392 -w#
19393 \family default
19394  to enable a warning.
19395  The emphasized entries are disabled by default, because the default is
19396  "
19397 \family typewriter
19398 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
19399 \family default
19400 ".
19401 \end_layout
19402
19403 \begin_layout Standard
19404 Notice that you should only use the options that enable and disable warnings,
19405  because \SpecialChar LyX
19406  relies on some of the other command line parameters to be set
19407  in a specific way to have a chance to communicate with 
19408 \family typewriter
19409 chktex
19410 \family default
19411 .
19412 \end_layout
19413
19414 \begin_layout Enumerate
19415
19416 \size small
19417 \emph on
19418 Command terminated with space.
19419 \end_layout
19420
19421 \begin_layout Enumerate
19422
19423 \size small
19424 Non-breaking space (
19425 \begin_inset Quotes eld
19426 \end_inset
19427
19428
19429 \family typewriter
19430 ~
19431 \family default
19432
19433 \begin_inset Quotes erd
19434 \end_inset
19435
19436 ) should have been used.
19437 \end_layout
19438
19439 \begin_layout Enumerate
19440
19441 \size small
19442 \emph on
19443 You should enclose the previous parenthesis with 
19444 \begin_inset Quotes eld
19445 \end_inset
19446
19447
19448 \family typewriter
19449 {}
19450 \family default
19451
19452 \begin_inset Quotes erd
19453 \end_inset
19454
19455 .
19456 \end_layout
19457
19458 \begin_layout Enumerate
19459
19460 \size small
19461 Italic correction (
19462 \begin_inset Quotes eld
19463 \end_inset
19464
19465
19466 \family typewriter
19467
19468 \backslash
19469 /
19470 \family default
19471
19472 \begin_inset Quotes erd
19473 \end_inset
19474
19475 ) found in non-italic buffer.
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 more than once.
19496 \end_layout
19497
19498 \begin_layout Enumerate
19499
19500 \size small
19501 \emph on
19502 No italic correction (
19503 \begin_inset Quotes eld
19504 \end_inset
19505
19506
19507 \family typewriter
19508
19509 \backslash
19510 /
19511 \family default
19512
19513 \begin_inset Quotes erd
19514 \end_inset
19515
19516 ) found.
19517 \end_layout
19518
19519 \begin_layout Enumerate
19520
19521 \size small
19522 Accent command 
19523 \begin_inset Quotes eld
19524 \end_inset
19525
19526
19527 \family typewriter
19528 cmd
19529 \family default
19530
19531 \begin_inset Quotes erd
19532 \end_inset
19533
19534  needs use of 
19535 \begin_inset Quotes eld
19536 \end_inset
19537
19538
19539 \family typewriter
19540 cmd
19541 \family default
19542
19543 \begin_inset Quotes erd
19544 \end_inset
19545
19546 .
19547 \end_layout
19548
19549 \begin_layout Enumerate
19550
19551 \size small
19552 Wrong length of dash may have been used.
19553 \end_layout
19554
19555 \begin_layout Enumerate
19556
19557 \size small
19558 \emph on
19559 \begin_inset Quotes eld
19560 \end_inset
19561
19562
19563 \family typewriter
19564 %s
19565 \family default
19566
19567 \begin_inset Quotes erd
19568 \end_inset
19569
19570  expected, found 
19571 \begin_inset Quotes eld
19572 \end_inset
19573
19574
19575 \family typewriter
19576 %s
19577 \family default
19578
19579 \begin_inset Quotes erd
19580 \end_inset
19581
19582 .
19583 \end_layout
19584
19585 \begin_layout Enumerate
19586
19587 \size small
19588 Solo 
19589 \begin_inset Quotes eld
19590 \end_inset
19591
19592
19593 \family typewriter
19594 %s
19595 \family default
19596
19597 \begin_inset Quotes erd
19598 \end_inset
19599
19600  found.
19601 \end_layout
19602
19603 \begin_layout Enumerate
19604
19605 \size small
19606 You should use 
19607 \begin_inset Quotes eld
19608 \end_inset
19609
19610
19611 \family typewriter
19612 %s
19613 \family default
19614
19615 \begin_inset Quotes erd
19616 \end_inset
19617
19618  to achieve an ellipsis.
19619 \end_layout
19620
19621 \begin_layout Enumerate
19622
19623 \size small
19624 Inter-word spacing (
19625 \begin_inset Quotes eld
19626 \end_inset
19627
19628
19629 \family typewriter
19630
19631 \backslash
19632
19633 \family default
19634  
19635 \begin_inset Quotes eld
19636 \end_inset
19637
19638 ) should perhaps be used.
19639 \end_layout
19640
19641 \begin_layout Enumerate
19642
19643 \size small
19644 Inter-sentence 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 erd
19656 \end_inset
19657
19658 ) should perhaps be used.
19659 \end_layout
19660
19661 \begin_layout Enumerate
19662
19663 \size small
19664 Could not find argument for command.
19665 \end_layout
19666
19667 \begin_layout Enumerate
19668
19669 \size small
19670 No match found for 
19671 \begin_inset Quotes eld
19672 \end_inset
19673
19674
19675 \family typewriter
19676 %s
19677 \family default
19678
19679 \begin_inset Quotes erd
19680 \end_inset
19681
19682 .
19683 \end_layout
19684
19685 \begin_layout Enumerate
19686
19687 \size small
19688 Math mode still on at end of \SpecialChar LaTeX
19689  file.
19690 \end_layout
19691
19692 \begin_layout Enumerate
19693
19694 \size small
19695 Number of 
19696 \begin_inset Quotes eld
19697 \end_inset
19698
19699
19700 \family typewriter
19701 char
19702 \family default
19703
19704 \begin_inset Quotes erd
19705 \end_inset
19706
19707  doesn't match the number of 
19708 \begin_inset Quotes eld
19709 \end_inset
19710
19711
19712 \family typewriter
19713 char
19714 \family default
19715
19716 \begin_inset Quotes erd
19717 \end_inset
19718
19719 .
19720 \end_layout
19721
19722 \begin_layout Enumerate
19723
19724 \size small
19725 You should use either 
19726 \family typewriter
19727
19728 \begin_inset Quotes eld
19729 \end_inset
19730
19731
19732 \family default
19733  or 
19734 \family typewriter
19735
19736 \begin_inset Quotes erd
19737 \end_inset
19738
19739
19740 \family default
19741  as an alternative to 
19742 \begin_inset Quotes eld
19743 \end_inset
19744
19745
19746 \family typewriter
19747 "
19748 \family default
19749
19750 \begin_inset Quotes erd
19751 \end_inset
19752
19753 .
19754 \end_layout
19755
19756 \begin_layout Enumerate
19757
19758 \size small
19759 You should use "
19760 \family typewriter
19761 '
19762 \family default
19763 " (ASCII 39) instead of "
19764 \family typewriter
19765 ´
19766 \family default
19767 " (ASCII 180).
19768 \end_layout
19769
19770 \begin_layout Enumerate
19771
19772 \size small
19773 User-specified pattern found.
19774 \end_layout
19775
19776 \begin_layout Enumerate
19777
19778 \size small
19779 This command might not be intended.
19780 \end_layout
19781
19782 \begin_layout Enumerate
19783
19784 \size small
19785 \emph on
19786 Comment displayed.
19787 \end_layout
19788
19789 \begin_layout Enumerate
19790
19791 \size small
19792 Either 
19793 \family typewriter
19794 ''
19795 \backslash
19796 ,'
19797 \family default
19798  or 
19799 \family typewriter
19800 '
19801 \backslash
19802 ,''
19803 \family default
19804  will look better.
19805 \end_layout
19806
19807 \begin_layout Enumerate
19808
19809 \size small
19810 Delete this space to maintain correct page references.
19811 \end_layout
19812
19813 \begin_layout Enumerate
19814
19815 \size small
19816 \emph on
19817 You might wish to put this between a pair of 
19818 \begin_inset Quotes eld
19819 \end_inset
19820
19821
19822 \family typewriter
19823 {}
19824 \family default
19825
19826 \begin_inset Quotes erd
19827 \end_inset
19828
19829 .
19830 \end_layout
19831
19832 \begin_layout Enumerate
19833
19834 \size small
19835 You ought to remove spaces in front of punctuation.
19836 \end_layout
19837
19838 \begin_layout Enumerate
19839
19840 \size small
19841 Could not execute \SpecialChar LaTeX
19842  command.
19843 \end_layout
19844
19845 \begin_layout Enumerate
19846
19847 \size small
19848 Don't use 
19849 \family typewriter
19850
19851 \backslash
19852 /
19853 \family default
19854  in front of small punctuation.
19855 \end_layout
19856
19857 \begin_layout Enumerate
19858
19859 \family typewriter
19860 \size small
19861 $
19862 \backslash
19863 times$
19864 \family default
19865  may look prettier here.
19866 \end_layout
19867
19868 \begin_layout Enumerate
19869
19870 \size small
19871 \emph on
19872 Multiple spaces detected in output.
19873 \end_layout
19874
19875 \begin_layout Enumerate
19876
19877 \size small
19878 This text may be ignored.
19879 \end_layout
19880
19881 \begin_layout Enumerate
19882
19883 \size small
19884 Use 
19885 \family typewriter
19886
19887 \begin_inset Quotes eld
19888 \end_inset
19889
19890
19891 \family default
19892  to begin quotation, not 
19893 \family typewriter
19894 '
19895 \family default
19896 .
19897 \end_layout
19898
19899 \begin_layout Enumerate
19900
19901 \size small
19902 Use 
19903 \family typewriter
19904 '
19905 \family default
19906  to end quotation, not 
19907 \family typewriter
19908
19909 \begin_inset Quotes eld
19910 \end_inset
19911
19912
19913 \family default
19914 .
19915 \end_layout
19916
19917 \begin_layout Enumerate
19918
19919 \size small
19920 Don't mix quotes.
19921 \end_layout
19922
19923 \begin_layout Enumerate
19924
19925 \size small
19926 You should perhaps use 
19927 \begin_inset Quotes eld
19928 \end_inset
19929
19930
19931 \family typewriter
19932 cmd
19933 \family default
19934
19935 \begin_inset Quotes erd
19936 \end_inset
19937
19938  instead.
19939 \end_layout
19940
19941 \begin_layout Enumerate
19942
19943 \size small
19944 You should put a space in front of/after parenthesis.
19945 \end_layout
19946
19947 \begin_layout Enumerate
19948
19949 \size small
19950 You should avoid spaces in front of/after parenthesis.
19951 \end_layout
19952
19953 \begin_layout Enumerate
19954
19955 \size small
19956 \emph on
19957 You should not use punctuation in front of/after quotes.
19958 \end_layout
19959
19960 \begin_layout Enumerate
19961
19962 \size small
19963 Double space found.
19964 \end_layout
19965
19966 \begin_layout Enumerate
19967
19968 \size small
19969 You should put punctuation outside inner/inside display math mode.
19970 \end_layout
19971
19972 \begin_layout Enumerate
19973
19974 \size small
19975 You ought to not use primitive \SpecialChar TeX
19976  in \SpecialChar LaTeX
19977  code.
19978 \end_layout
19979
19980 \begin_layout Enumerate
19981
19982 \size small
19983 You should remove spaces in front of 
19984 \begin_inset Quotes eld
19985 \end_inset
19986
19987
19988 \family typewriter
19989 %s
19990 \family default
19991
19992 \begin_inset Quotes erd
19993 \end_inset
19994
19995
19996 \end_layout
19997
19998 \begin_layout Enumerate
19999
20000 \size small
20001 \begin_inset Quotes eld
20002 \end_inset
20003
20004
20005 \family typewriter
20006 %s
20007 \family default
20008
20009 \begin_inset Quotes erd
20010 \end_inset
20011
20012  is normally not followed by 
20013 \begin_inset Quotes eld
20014 \end_inset
20015
20016
20017 \family typewriter
20018 %c
20019 \family default
20020
20021 \begin_inset Quotes erd
20022 \end_inset
20023
20024 .
20025 \end_layout
20026
20027 \begin_layout Standard
20028 In later versions of \SpecialChar LyX
20029 , we hope to provide a more complete interface to this
20030  tool (and it's smaller cousin 
20031 \family typewriter
20032 lacheck
20033 \family default
20034 ) to exploit the full power of it.
20035  But it's not exactly useless as it is now: go try it on one of your existing
20036  documents of a certain length and be surprised.
20037 \end_layout
20038
20039 \begin_layout Section
20040 Version Control in \SpecialChar LyX
20041
20042 \end_layout
20043
20044 \begin_layout Standard
20045 by
20046 \noun on
20047  Lars Gullik Bjønnes 
20048 \noun default
20049 and 
20050 \noun on
20051 Pavel Sanda
20052 \end_layout
20053
20054 \begin_layout Subsection
20055 Introduction
20056 \end_layout
20057
20058 \begin_layout Standard
20059 \SpecialChar LyX
20060  supports some of the most basic RCS/CVS/SVN/GIT commands.
20061  If you need something a bit more sophisticated you will have to do that
20062  manually in a terminal.
20063 \end_layout
20064
20065 \begin_layout Standard
20066 Also note that CVS support is not as good as subversion support so we advise
20067  using SVN instead.
20068  A good place to start learning Subversion is SVN Book
20069 \begin_inset Foot
20070 status collapsed
20071
20072 \begin_layout Plain Layout
20073 \begin_inset CommandInset href
20074 LatexCommand href
20075 target "http://svnbook.red-bean.com/"
20076 literal "false"
20077
20078 \end_inset
20079
20080
20081 \end_layout
20082
20083 \end_inset
20084
20085 .
20086  In the case of RCS you should read 
20087 \begin_inset Quotes eld
20088 \end_inset
20089
20090 rcsintro
20091 \begin_inset Quotes erd
20092 \end_inset
20093
20094  (a man file, read it with 
20095 \family typewriter
20096 man rcsintro
20097 \family default
20098 ).
20099  This file describes all the basic features of RCS.
20100  You should especially notice the comment about a RCS directory, and the
20101  notion of a master RCS file (the file ending in 
20102 \family typewriter
20103 ,v
20104 \family default
20105 ).
20106 \end_layout
20107
20108 \begin_layout Standard
20109 Before you begin to use the version control features in \SpecialChar LyX
20110 , you should be
20111  familiar with RCS/CVS/SVN/GIT usage.
20112  The implementation in \SpecialChar LyX
20113  assumes a recent version of the GNU RCS or CVS/SVN
20114  package — no guarantees are made for older versions.
20115  Most of the log messages are not currently displayed after operations —
20116  you can check them in the Messages pane if unsure.
20117  Regular users of version control will appreciate VC toolbar, which can
20118  be enabled via 
20119 \family sans
20120 View\SpecialChar menuseparator
20121 Toolbars\SpecialChar menuseparator
20122 Version
20123 \begin_inset space ~
20124 \end_inset
20125
20126 Control
20127 \family default
20128 .
20129 \end_layout
20130
20131 \begin_layout Standard
20132 For introducing your own external commands consult vc-command in the manual
20133  of \SpecialChar LyX
20134  functions.
20135 \end_layout
20136
20137 \begin_layout Standard
20138 It is strongly recommended to store documents in uncompressed format if
20139  using version control (uncheck 
20140 \family sans
20141 Document\SpecialChar menuseparator
20142 Compressed
20143 \family default
20144  if it is checked): Uncompressed LyX documents are text files and therefore
20145  for merging two different versions by version control systems.
20146  Compressed LyX documents are binary files, which cannot be merged by version
20147  control systems.
20148 \end_layout
20149
20150 \begin_layout Subsection
20151 RCS commands in \SpecialChar LyX
20152
20153 \end_layout
20154
20155 \begin_layout Standard
20156 The following sections describe the RCS commands supported by \SpecialChar LyX
20157 .
20158  You can find them in the 
20159 \family sans
20160 File\SpecialChar menuseparator
20161 Version
20162 \begin_inset space ~
20163 \end_inset
20164
20165 Control
20166 \family default
20167  submenu.
20168  \SpecialChar LyX
20169  was tested against RCS 5.7/5.8.
20170 \end_layout
20171
20172 \begin_layout Subsubsection
20173
20174 \family sans
20175 Register
20176 \end_layout
20177
20178 \begin_layout Standard
20179 If your document is not under revision control, this is the only item shown
20180  in the menu.
20181  And if it is under revision control, the 
20182 \family sans
20183 Register
20184 \family default
20185  item is not visible.
20186  
20187 \end_layout
20188
20189 \begin_layout Standard
20190 This command registers your document with RCS (unless you are under the
20191  directory managed by CVS)\SpecialChar endofsentence
20192  You are asked interactively to supply an initial
20193  description of the document.
20194  The document is now set in Read-Only mode and you have to 
20195 \family sans
20196 Check
20197 \begin_inset space ~
20198 \end_inset
20199
20200 Out
20201 \begin_inset space ~
20202 \end_inset
20203
20204 For
20205 \begin_inset space ~
20206 \end_inset
20207
20208 Edit
20209 \family default
20210 , before making any changes to it.
20211  A document under revision control has a 
20212 \begin_inset Quotes eld
20213 \end_inset
20214
20215 [RCS:<version> <locker>]
20216 \begin_inset Quotes erd
20217 \end_inset
20218
20219  item tagged to the filename in the minibuffer.
20220 \end_layout
20221
20222 \begin_layout Standard
20223 RCS command that is run: 
20224 \family typewriter
20225 ci -q -u -i -t-"<initial description>" <file-name>
20226 \end_layout
20227
20228 \begin_layout Standard
20229 Read 
20230 \family typewriter
20231 man ci
20232 \family default
20233  to understand the switches.
20234  
20235 \end_layout
20236
20237 \begin_layout Subsubsection
20238
20239 \family sans
20240 Check In Changes
20241 \end_layout
20242
20243 \begin_layout Standard
20244 When you are finished editing a file, you check in your changes.
20245  When you do this, you are asked for a description of the changes.
20246  This is stored in the history log.
20247  The version number is bumped, your changes are applied to the master RCS
20248  file, the document is unlocked and set to Read-Only mode.
20249 \end_layout
20250
20251 \begin_layout Standard
20252 RCS command: 
20253 \family typewriter
20254 ci -q -u -m"<description>" <file-name>
20255 \end_layout
20256
20257 \begin_layout Subsubsection
20258
20259 \family sans
20260 Check Out For Edit
20261 \end_layout
20262
20263 \begin_layout Standard
20264 By doing this you lock the document so that only you can edit it.
20265  This will also make the document Read-Write only for you.
20266  You will usually continue editing for a while and when you are finished
20267  you check in your changes.
20268  The status line is changed to reflect that you have locked the file.
20269 \end_layout
20270
20271 \begin_layout Standard
20272 RCS command: 
20273 \family typewriter
20274 co -q -l <file-name>
20275 \end_layout
20276
20277 \begin_layout Subsubsection
20278
20279 \family sans
20280 Revert To Repository Version
20281 \end_layout
20282
20283 \begin_layout Standard
20284 This will discard all changes made to the document since the last check
20285  in.
20286  You get a warning before changes are discarded.
20287 \end_layout
20288
20289 \begin_layout Standard
20290 RCS command: 
20291 \family typewriter
20292 co -f -u<version> <file-name>
20293 \end_layout
20294
20295 \begin_layout Subsubsection
20296
20297 \family sans
20298 Copy
20299 \end_layout
20300
20301 \begin_layout Standard
20302 This will create a copy of the current document.
20303  Since RCS does not support copy operations natively, the version history
20304  is not preserved, and the copy is added as a new file.
20305  It requires a clean document without any changes since the last checkin.
20306  You are asked for a file name and a description of the copy operation.
20307  After that the copy is created, both locally and in the repository.
20308  If the parent directories of the copied and original document differ, all
20309  relative paths of included files of the copy are adjusted (like in 
20310 \family sans
20311 File\SpecialChar menuseparator
20312 Save As
20313 \family default
20314 \SpecialChar ldots
20315 ).
20316  Finally, the copy is loaded instead of the original document.
20317 \end_layout
20318
20319 \begin_layout Labeling
20320 \labelwidthstring 00.00.0000
20321 RCS
20322 \begin_inset space ~
20323 \end_inset
20324
20325 commands: 
20326 \begin_inset space ~
20327 \end_inset
20328
20329
20330 \begin_inset Newline newline
20331 \end_inset
20332
20333 Copy 
20334 \begin_inset Flex Code
20335 status collapsed
20336
20337 \begin_layout Plain Layout
20338
20339 \family typewriter
20340 \begin_inset Quotes eld
20341 \end_inset
20342
20343 <file-name>
20344 \begin_inset Quotes erd
20345 \end_inset
20346
20347
20348 \end_layout
20349
20350 \end_inset
20351
20352  to 
20353 \begin_inset Flex Code
20354 status collapsed
20355
20356 \begin_layout Plain Layout
20357
20358 \family typewriter
20359 \begin_inset Quotes eld
20360 \end_inset
20361
20362 <new-file-name>
20363 \begin_inset Quotes erd
20364 \end_inset
20365
20366
20367 \end_layout
20368
20369 \end_inset
20370
20371
20372 \begin_inset Newline newline
20373 \end_inset
20374
20375
20376 \begin_inset Flex Code
20377 status collapsed
20378
20379 \begin_layout Plain Layout
20380 ci -q -u 
20381 \family typewriter
20382 -i 
20383 \begin_inset Quotes eld
20384 \end_inset
20385
20386 <new-file-name>
20387 \begin_inset Quotes erd
20388 \end_inset
20389
20390
20391 \end_layout
20392
20393 \end_inset
20394
20395
20396 \end_layout
20397
20398 \begin_layout Subsubsection
20399
20400 \family sans
20401 Undo Last Checkin
20402 \end_layout
20403
20404 \begin_layout Standard
20405 This makes as if the last check in never happened.
20406  No changes are made to the document loaded into \SpecialChar LyX
20407 , but the last version
20408  is removed from the master RCS file.
20409 \end_layout
20410
20411 \begin_layout Standard
20412 RCS command: 
20413 \family typewriter
20414 rcs -o<version> <file-name>
20415 \end_layout
20416
20417 \begin_layout Subsubsection
20418
20419 \family sans
20420 Show History
20421 \end_layout
20422
20423 \begin_layout Standard
20424 This shows the complete history of the RCS document.
20425  The output of 
20426 \family typewriter
20427 rlog <file-name>
20428 \family default
20429  is shown in a browser.
20430  See 
20431 \family typewriter
20432 man rlog
20433 \family default
20434  for more info.
20435 \end_layout
20436
20437 \begin_layout Subsubsection
20438 Revision info
20439 \end_layout
20440
20441 \begin_layout Standard
20442 \SpecialChar LyX
20443  supports RCS version number, author name, date and time of last commit.
20444  All those are extracted from 
20445 \family typewriter
20446 rlog -r <file-name>
20447 \family default
20448 .
20449  See 
20450 \begin_inset CommandInset ref
20451 LatexCommand ref
20452 reference "subsec:VCS-Revision-Information"
20453
20454 \end_inset
20455
20456  for details.
20457 \end_layout
20458
20459 \begin_layout Subsection
20460 CVS commands in \SpecialChar LyX
20461
20462 \end_layout
20463
20464 \begin_layout Standard
20465 A subset of CVS operations is supported by \SpecialChar LyX
20466 .
20467  You can find the commands in the 
20468 \family sans
20469 File\SpecialChar menuseparator
20470 Version
20471 \begin_inset space ~
20472 \end_inset
20473
20474 Control
20475 \family default
20476  submenu.
20477  The version control system SVN is more powerful, so please use it instead
20478  of CVS if possible.
20479 \end_layout
20480
20481 \begin_layout Subsubsection
20482
20483 \family sans
20484 General CVS usage
20485 \end_layout
20486
20487 \begin_layout Standard
20488 If you start from scratch with CVS you have to create your repository and
20489  checkout the working copy with external tools.
20490  If you're using a client-server setup you may need to login before doing
20491  the first repository checkout.
20492 \end_layout
20493
20494 \begin_layout Standard
20495 If your documents are under revision control and others are using the same
20496  repository problems arise when different changes to the same document at
20497  the same location happen.
20498  Standard CVS repositories don't operate with a file locking mechanism.
20499  This may be surprising, but conflicts only occur if people disagree on
20500  the proper content of the same part of a document.
20501  So, if co-workers are used to communicate regularly, these conflicts occur
20502  rarely.
20503  If they don't communicate they have a fundamental problem anyway.
20504  Nevertheless some people like to work with so called 
20505 \begin_inset Quotes eld
20506 \end_inset
20507
20508 reserved checkouts
20509 \begin_inset Quotes erd
20510 \end_inset
20511
20512 .
20513  If they do so the working copy of all files is readonly when checked out
20514  first and the user starts editing after using a special command to make
20515  the working copy writable.
20516  When the changes are checked in the working copy returns to readonly state.
20517  With \SpecialChar LyX
20518  one has to edit the 
20519 \begin_inset Flex Code
20520 status collapsed
20521
20522 \begin_layout Plain Layout
20523 .cvsrc
20524 \end_layout
20525
20526 \end_inset
20527
20528  file and add the line 
20529 \begin_inset Flex Code
20530 status collapsed
20531
20532 \begin_layout Plain Layout
20533 cvs -r
20534 \end_layout
20535
20536 \end_inset
20537
20538  to work with reserved checkouts.
20539  The benefit is the possibility to see who is using a writable copy of some
20540  document.
20541  It's not guaranteed only one user makes a copy writable.
20542 \end_layout
20543
20544 \begin_layout Standard
20545 \SpecialChar LyX
20546  tries to guess if you're using reserved or non-reserved checkouts.
20547  If your working copy is readonly or it is writable and an additional copy
20548  of your document exists in the CVS/Base sub-directory a reserved otherwise
20549  a non-reserved checkout is assumed.
20550  When a reserved checkout is detected you have to use 
20551 \begin_inset Flex Noun
20552 status collapsed
20553
20554 \begin_layout Plain Layout
20555 Check Out
20556 \end_layout
20557
20558 \end_inset
20559
20560  to make your working copy writable if it's readonly.
20561  After doing so the 
20562 \begin_inset Flex Noun
20563 status collapsed
20564
20565 \begin_layout Plain Layout
20566 Check In
20567 \end_layout
20568
20569 \end_inset
20570
20571  operation is possible and that makes your working copy readonly again after
20572  transferring your changes to the repository.
20573 \end_layout
20574
20575 \begin_layout Standard
20576 More information about CVS can be found here 
20577 \begin_inset Flex URL
20578 status collapsed
20579
20580 \begin_layout Plain Layout
20581
20582 http://www.nongnu.org/cvs
20583 \end_layout
20584
20585 \end_inset
20586
20587  and here 
20588 \begin_inset Flex URL
20589 status collapsed
20590
20591 \begin_layout Plain Layout
20592
20593 http://ximbiot.com/cvs
20594 \end_layout
20595
20596 \end_inset
20597
20598 .
20599 \end_layout
20600
20601 \begin_layout Standard
20602 Read 
20603 \family typewriter
20604 man cvs
20605 \family default
20606  to understand the sub-commands and the switches mentioned below.
20607 \end_layout
20608
20609 \begin_layout Subsubsection
20610
20611 \family sans
20612 Register
20613 \end_layout
20614
20615 \begin_layout Standard
20616 If your document is not under revision control, this is the only item shown
20617  in the menu.
20618  And if it is under revision control, the 
20619 \family sans
20620 Register
20621 \family default
20622  item is not visible.
20623  
20624 \end_layout
20625
20626 \begin_layout Standard
20627 This command registers in CVS your document 
20628 \begin_inset Flex Strong
20629 status collapsed
20630
20631 \begin_layout Plain Layout
20632
20633 \emph on
20634 only
20635 \end_layout
20636
20637 \end_inset
20638
20639  in the case you have already the documents directory under CVS control
20640  (in particular 
20641 \family typewriter
20642 CVS/Entries
20643 \family default
20644  file exists).
20645  This means you have to create or checkout the archive by yourself using
20646  external tools.
20647  (In case you forget that step \SpecialChar LyX
20648  registers the document with RCS.)
20649 \end_layout
20650
20651 \begin_layout Standard
20652 Then you are asked interactively to supply an initial description of the
20653  document.
20654  Don't forget that registered file is not yet checked in.
20655 \end_layout
20656
20657 \begin_layout Standard
20658 CVS command that is run: 
20659 \family typewriter
20660 cvs -q add -m"<entered message>" "<file-name>"
20661 \end_layout
20662
20663 \begin_layout Standard
20664 The term 
20665 \family typewriter
20666 "<file-name>"
20667 \family default
20668  above and for all other CVS commands is an abbreviation for 
20669 \begin_inset Quotes eld
20670 \end_inset
20671
20672 change the current working directory to file location and use the file name
20673  without path component as argument
20674 \begin_inset Quotes erd
20675 \end_inset
20676
20677 .
20678 \end_layout
20679
20680 \begin_layout Subsubsection
20681
20682 \family sans
20683 Check In Changes
20684 \end_layout
20685
20686 \begin_layout Standard
20687 When you are finished editing a file, you commit your changes.
20688  When you do this and you had changed the document, you are asked for a
20689  description of the changes.
20690  After that changes are written to the repository.
20691  In case you didn't change the document and a reserved checkout is detected
20692  the reservation made on 
20693 \begin_inset Flex Noun
20694 status collapsed
20695
20696 \begin_layout Plain Layout
20697 Check Out
20698 \end_layout
20699
20700 \end_inset
20701
20702  is undone.
20703 \end_layout
20704
20705 \begin_layout Labeling
20706 \labelwidthstring 00.00.0000
20707 CVS
20708 \begin_inset space ~
20709 \end_inset
20710
20711 command: 
20712 \begin_inset space ~
20713 \end_inset
20714
20715
20716 \begin_inset Newline newline
20717 \end_inset
20718
20719
20720 \begin_inset Flex Code
20721 status collapsed
20722
20723 \begin_layout Plain Layout
20724 cvs 
20725 \family typewriter
20726 -q commit -m"<description>" "<file-name>"
20727 \end_layout
20728
20729 \end_inset
20730
20731  or
20732 \begin_inset Newline newline
20733 \end_inset
20734
20735
20736 \begin_inset Flex Code
20737 status collapsed
20738
20739 \begin_layout Plain Layout
20740 cvs -q unedit 
20741 \family typewriter
20742 "<file-name>"
20743 \end_layout
20744
20745 \end_inset
20746
20747
20748 \end_layout
20749
20750 \begin_layout Subsubsection
20751
20752 \family sans
20753 Check Out Changes
20754 \end_layout
20755
20756 \begin_layout Standard
20757 When you are sharing a repository with others, you may have to incorporate
20758  their changes into your working copy.
20759 \end_layout
20760
20761 \begin_layout Standard
20762 CVS command: 
20763 \family typewriter
20764 cvs -q update "<file-name>"
20765 \end_layout
20766
20767 \begin_layout Standard
20768 If a readonly checkout is detected the working copy is made writable and
20769  reserved.
20770 \end_layout
20771
20772 \begin_layout Standard
20773 CVS command: 
20774 \family typewriter
20775 cvs -q edit "<file-name>"
20776 \end_layout
20777
20778 \begin_layout Subsubsection
20779
20780 \family sans
20781 Revert To Repository Version
20782 \end_layout
20783
20784 \begin_layout Standard
20785 This will discard all changes made to the document since the last check
20786  in.
20787  You get a warning before changes are discarded.
20788  Firstly the file is deleted, secondly CVS update command is run.
20789 \end_layout
20790
20791 \begin_layout Standard
20792 CVS command: 
20793 \family typewriter
20794 cvs -q update "<file-name>"
20795 \end_layout
20796
20797 \begin_layout Standard
20798 If a reserved checkout is detected and the working copy has no changes only
20799  the reservation is undone.
20800 \end_layout
20801
20802 \begin_layout Standard
20803 CVS command: 
20804 \family typewriter
20805 cvs -q unedit "<file-name>"
20806 \end_layout
20807
20808 \begin_layout Subsubsection
20809
20810 \family sans
20811 Copy
20812 \end_layout
20813
20814 \begin_layout Standard
20815 This will create a copy of the current document.
20816  Since CVS does not support copy operations natively, the version history
20817  is not preserved, and the copy is added as a new file.
20818  It requires a clean document without any changes since the last checkin.
20819  You are asked for a file name and a description of the copy operation.
20820  After that the copy is created, both locally and in the repository.
20821  If the parent directories of the copied and original document differ, all
20822  relative paths of included files of the copy are adjusted (like in 
20823 \family sans
20824 File\SpecialChar menuseparator
20825 Save As
20826 \family default
20827 \SpecialChar ldots
20828 ).
20829  Finally, the copy is loaded instead of the original document.
20830 \end_layout
20831
20832 \begin_layout Labeling
20833 \labelwidthstring 00.00.0000
20834 CVS
20835 \begin_inset space ~
20836 \end_inset
20837
20838 commands: 
20839 \begin_inset space ~
20840 \end_inset
20841
20842
20843 \begin_inset Newline newline
20844 \end_inset
20845
20846 Copy 
20847 \begin_inset Flex Code
20848 status collapsed
20849
20850 \begin_layout Plain Layout
20851
20852 \family typewriter
20853 \begin_inset Quotes eld
20854 \end_inset
20855
20856 <file-name>
20857 \begin_inset Quotes erd
20858 \end_inset
20859
20860
20861 \end_layout
20862
20863 \end_inset
20864
20865  to 
20866 \begin_inset Flex Code
20867 status collapsed
20868
20869 \begin_layout Plain Layout
20870
20871 \family typewriter
20872 \begin_inset Quotes eld
20873 \end_inset
20874
20875 <new-file-name>
20876 \begin_inset Quotes erd
20877 \end_inset
20878
20879
20880 \end_layout
20881
20882 \end_inset
20883
20884
20885 \begin_inset Newline newline
20886 \end_inset
20887
20888
20889 \begin_inset Flex Code
20890 status collapsed
20891
20892 \begin_layout Plain Layout
20893 cvs -q add 
20894 \family typewriter
20895
20896 \begin_inset Quotes eld
20897 \end_inset
20898
20899 <new-file-name>
20900 \begin_inset Quotes erd
20901 \end_inset
20902
20903
20904 \end_layout
20905
20906 \end_inset
20907
20908
20909 \end_layout
20910
20911 \begin_layout Subsubsection
20912
20913 \family sans
20914 Rename
20915 \end_layout
20916
20917 \begin_layout Standard
20918 This will rename the current document.
20919  Since CVS does not support rename operations natively, the version history
20920  is not preserved, the renamed document is added as a new file, and the
20921  original document is deleted.
20922  It requires a clean document without any changes since the last checkin.
20923  You are asked for a file name and a description of the rename operation.
20924  After that the document is renamed, both locally and in the repository.
20925  If the parent directories of the new and old file names differ, all relative
20926  paths of included files are adjusted (like in 
20927 \family sans
20928 File\SpecialChar menuseparator
20929 Save As
20930 \family default
20931 \SpecialChar ldots
20932 ).
20933  Finally, the document is reloaded using the new name.
20934 \end_layout
20935
20936 \begin_layout Labeling
20937 \labelwidthstring 00.00.0000
20938 CVS
20939 \begin_inset space ~
20940 \end_inset
20941
20942 commands: 
20943 \begin_inset space ~
20944 \end_inset
20945
20946
20947 \begin_inset Newline newline
20948 \end_inset
20949
20950 Rename 
20951 \begin_inset Flex Code
20952 status collapsed
20953
20954 \begin_layout Plain Layout
20955
20956 \family typewriter
20957 \begin_inset Quotes eld
20958 \end_inset
20959
20960 <file-name>
20961 \begin_inset Quotes erd
20962 \end_inset
20963
20964
20965 \end_layout
20966
20967 \end_inset
20968
20969  to 
20970 \begin_inset Flex Code
20971 status collapsed
20972
20973 \begin_layout Plain Layout
20974
20975 \family typewriter
20976 \begin_inset Quotes eld
20977 \end_inset
20978
20979 <new-file-name>
20980 \begin_inset Quotes erd
20981 \end_inset
20982
20983
20984 \end_layout
20985
20986 \end_inset
20987
20988
20989 \begin_inset Newline newline
20990 \end_inset
20991
20992
20993 \begin_inset Flex Code
20994 status collapsed
20995
20996 \begin_layout Plain Layout
20997 cvs -q add 
20998 \family typewriter
20999
21000 \begin_inset Quotes eld
21001 \end_inset
21002
21003 <new-file-name>
21004 \begin_inset Quotes erd
21005 \end_inset
21006
21007
21008 \end_layout
21009
21010 \end_inset
21011
21012
21013 \begin_inset Newline newline
21014 \end_inset
21015
21016
21017 \begin_inset Flex Code
21018 status collapsed
21019
21020 \begin_layout Plain Layout
21021 cvs -q remove 
21022 \family typewriter
21023
21024 \begin_inset Quotes eld
21025 \end_inset
21026
21027 <file-name>
21028 \begin_inset Quotes erd
21029 \end_inset
21030
21031
21032 \end_layout
21033
21034 \end_inset
21035
21036
21037 \end_layout
21038
21039 \begin_layout Subsubsection
21040 Update of the local directory checkout from repository
21041 \end_layout
21042
21043 \begin_layout Standard
21044 Once your documents gets more complex, containing sub-documents and pictures,
21045  including external 
21046 \begin_inset Flex Code
21047 status collapsed
21048
21049 \begin_layout Plain Layout
21050 .tex
21051 \end_layout
21052
21053 \end_inset
21054
21055  files and so on using version control becomes more complicated.
21056  \SpecialChar LyX
21057  supports updating the whole tree in which resides the document.
21058  This become especially useful once you cooperate with people which neither
21059  have detailed knowledge about CVS usage nor they have ambition to commit
21060  additional material to the repository.
21061  You have to organize the files structure so that all external files are
21062  in the same directory or subdirectories of the document.
21063  It's good practice anyway to store multipart documents in an extra directory.
21064 \end_layout
21065
21066 \begin_layout Standard
21067 The 
21068 \begin_inset Flex Code
21069 status collapsed
21070
21071 \begin_layout Plain Layout
21072 Update local directory from repository
21073 \end_layout
21074
21075 \end_inset
21076
21077  command updates the whole directory.
21078  If local changes are detected user is warned before update starts.
21079  In case of merge conflicts both versions of the conflicting document parts
21080  are placed in the final document.
21081  You have to review and correct the result of the merge.
21082  You'll find the conflicts enclosed in pairs of 
21083 \begin_inset Flex Code
21084 status collapsed
21085
21086 \begin_layout Plain Layout
21087 <<<<<<<
21088 \end_layout
21089
21090 \end_inset
21091
21092  and 
21093 \begin_inset Flex Code
21094 status collapsed
21095
21096 \begin_layout Plain Layout
21097 >>>>>>>
21098 \end_layout
21099
21100 \end_inset
21101
21102  separated by 
21103 \begin_inset Flex Code
21104 status collapsed
21105
21106 \begin_layout Plain Layout
21107 =======
21108 \end_layout
21109
21110 \end_inset
21111
21112 .
21113  The first part is your version as before the update operation with the
21114  document name prepended.
21115  The second one is the repository version with the version number after
21116  the sequence of 
21117 \begin_inset Flex Code
21118 status collapsed
21119
21120 \begin_layout Plain Layout
21121 >
21122 \end_layout
21123
21124 \end_inset
21125
21126  signs.
21127 \end_layout
21128
21129 \begin_layout Labeling
21130 \labelwidthstring 00.00.0000
21131 CVS
21132 \begin_inset space ~
21133 \end_inset
21134
21135 commands: 
21136 \begin_inset space ~
21137 \end_inset
21138
21139
21140 \begin_inset Newline newline
21141 \end_inset
21142
21143
21144 \begin_inset Flex Code
21145 status collapsed
21146
21147 \begin_layout Plain Layout
21148 cd $path; cvs diff 
21149 \family typewriter
21150 "."
21151 \end_layout
21152
21153 \end_inset
21154
21155  (Ask if changes are detected.)
21156 \begin_inset Newline newline
21157 \end_inset
21158
21159
21160 \begin_inset Flex Code
21161 status collapsed
21162
21163 \begin_layout Plain Layout
21164 cd $path; cvs -q update 
21165 \family typewriter
21166 "."
21167 \end_layout
21168
21169 \end_inset
21170
21171
21172 \end_layout
21173
21174 \begin_layout Standard
21175 where 
21176 \begin_inset Flex Code
21177 status collapsed
21178
21179 \begin_layout Plain Layout
21180 $path
21181 \end_layout
21182
21183 \end_inset
21184
21185  stands for the path to the document.
21186 \end_layout
21187
21188 \begin_layout Subsubsection
21189
21190 \family sans
21191 Show History
21192 \end_layout
21193
21194 \begin_layout Standard
21195 This shows the complete history of the CVS document.
21196  The output of 
21197 \family typewriter
21198 cvs log "<file-name>"
21199 \family default
21200  is shown in a browser.
21201 \end_layout
21202
21203 \begin_layout Subsubsection
21204 Revision info
21205 \end_layout
21206
21207 \begin_layout Standard
21208 \SpecialChar LyX
21209  supports CVS version number, author name, date and time of last commit.
21210  All those are extracted from 
21211 \family typewriter
21212 cvs log -r <file-name>
21213 \family default
21214 .
21215  See 
21216 \begin_inset CommandInset ref
21217 LatexCommand ref
21218 reference "subsec:VCS-Revision-Information"
21219
21220 \end_inset
21221
21222  for details.
21223 \end_layout
21224
21225 \begin_layout Subsection
21226 SVN commands in \SpecialChar LyX
21227
21228 \end_layout
21229
21230 \begin_layout Standard
21231 SVN is now partially supported by \SpecialChar LyX
21232 .
21233  You can find the commands in the 
21234 \family sans
21235 File\SpecialChar menuseparator
21236 Version
21237 \begin_inset space ~
21238 \end_inset
21239
21240 Control
21241 \family default
21242  submenu.
21243  Please note that if you use password protected access to repository via
21244  ssh, you will be asked in terminal window.
21245  \SpecialChar LyX
21246  was tested against SVN 1.5, 1.6, 1.7 and 1.8
21247 \begin_inset Foot
21248 status open
21249
21250 \begin_layout Plain Layout
21251 Most of the commands will work with 1.4 too, see 
21252 \begin_inset CommandInset ref
21253 LatexCommand ref
21254 reference "subsec:SVN-Repo-Update"
21255
21256 \end_inset
21257
21258 .
21259  There seems to be currently unresolved permissions problem under SVN 1.8
21260  with reverting changes when file is locked.
21261 \end_layout
21262
21263 \end_inset
21264
21265
21266 \end_layout
21267
21268 \begin_layout Subsubsection
21269
21270 \family sans
21271 Register
21272 \end_layout
21273
21274 \begin_layout Standard
21275 If your document is not under revision control, this is the only item shown
21276  in the menu.
21277  And if it is under revision control, the 
21278 \family sans
21279 Register
21280 \family default
21281  item is not visible.
21282 \end_layout
21283
21284 \begin_layout Standard
21285 This command registers in SVN your document ONLY in case you have already
21286  the documents directory under SVN control (in particular 
21287 \family typewriter
21288 .svn/entries
21289 \family default
21290  file exists).
21291  This means you have to checkout the archive by yourself.
21292 \end_layout
21293
21294 \begin_layout Standard
21295 Then you are asked interactively to supply an initial description of the
21296  document.
21297  Don't forget that registered file is not yet commited.
21298 \end_layout
21299
21300 \begin_layout Standard
21301 SVN command that is run: 
21302 \family typewriter
21303 svn add -q 
21304 \begin_inset Quotes eld
21305 \end_inset
21306
21307 <file-name>
21308 \begin_inset Quotes erd
21309 \end_inset
21310
21311
21312 \end_layout
21313
21314 \begin_layout Standard
21315 Read 
21316 \family typewriter
21317 man svn
21318 \family default
21319  to understand the switches.
21320 \end_layout
21321
21322 \begin_layout Subsubsection
21323
21324 \family sans
21325 Check In Changes
21326 \end_layout
21327
21328 \begin_layout Standard
21329 When you are finished editing a file, you commit your changes.
21330  When you do this, you are asked for a description of the changes.
21331  After that changes are commited.
21332 \end_layout
21333
21334 \begin_layout Standard
21335 SVN command:
21336 \begin_inset Foot
21337 status collapsed
21338
21339 \begin_layout Plain Layout
21340 In case locking is not enabled.
21341  See Section 
21342 \begin_inset CommandInset ref
21343 LatexCommand ref
21344 reference "subsec:SVN-File-Locking"
21345
21346 \end_inset
21347
21348 .
21349 \end_layout
21350
21351 \end_inset
21352
21353  
21354 \family typewriter
21355 svn commit -q -m"<description>" <file-name>
21356 \end_layout
21357
21358 \begin_layout Subsubsection
21359
21360 \family sans
21361 Check Out For Edit
21362 \end_layout
21363
21364 \begin_layout Standard
21365 Updates the changes of this file from the repository.
21366  Be sure you understand SVN merging and conflicts resolving before using
21367  this function, because all conflicts has to be resolved manually by you!
21368 \end_layout
21369
21370 \begin_layout Standard
21371 SVN command:
21372 \begin_inset Foot
21373 status collapsed
21374
21375 \begin_layout Plain Layout
21376 Ditto.
21377 \end_layout
21378
21379 \end_inset
21380
21381  
21382 \family typewriter
21383 svn update --non-interactive 
21384 \begin_inset Quotes eld
21385 \end_inset
21386
21387 <file-name>
21388 \begin_inset Quotes erd
21389 \end_inset
21390
21391
21392 \end_layout
21393
21394 \begin_layout Subsubsection
21395
21396 \family sans
21397 Revert To Repository Version
21398 \end_layout
21399
21400 \begin_layout Standard
21401 This will discard all changes made to the document since the last check
21402  in.
21403  You get a warning before changes are discarded.
21404 \end_layout
21405
21406 \begin_layout Standard
21407 SVN command: 
21408 \family typewriter
21409 svn revert -q 
21410 \begin_inset Quotes eld
21411 \end_inset
21412
21413 <file-name>
21414 \begin_inset Quotes erd
21415 \end_inset
21416
21417
21418 \end_layout
21419
21420 \begin_layout Subsubsection
21421
21422 \family sans
21423 Copy
21424 \end_layout
21425
21426 \begin_layout Standard
21427 This will create a copy of the current document including the version history.
21428  It requires a clean document without any changes since the last checkin.
21429  You are asked for a file name and a description of the copy operation.
21430  After that the copy is created, both locally and in the repository.
21431  If the parent directories of the copied and original document differ, all
21432  relative paths of included files of the copy are adjusted (like in 
21433 \family sans
21434 File\SpecialChar menuseparator
21435 Save As
21436 \family default
21437 \SpecialChar ldots
21438 ).
21439  Finally, the copy is loaded instead of the original document.
21440 \end_layout
21441
21442 \begin_layout Labeling
21443 \labelwidthstring 00.00.0000
21444 SVN
21445 \begin_inset space ~
21446 \end_inset
21447
21448 commands: 
21449 \begin_inset space ~
21450 \end_inset
21451
21452
21453 \begin_inset Newline newline
21454 \end_inset
21455
21456
21457 \begin_inset Flex Code
21458 status collapsed
21459
21460 \begin_layout Plain Layout
21461 svn copy -q 
21462 \family typewriter
21463
21464 \begin_inset Quotes eld
21465 \end_inset
21466
21467 <file-name>
21468 \begin_inset Quotes erd
21469 \end_inset
21470
21471  
21472 \begin_inset Quotes eld
21473 \end_inset
21474
21475 <new-file-name>
21476 \begin_inset Quotes erd
21477 \end_inset
21478
21479
21480 \end_layout
21481
21482 \end_inset
21483
21484
21485 \begin_inset Newline newline
21486 \end_inset
21487
21488
21489 \begin_inset Flex Code
21490 status collapsed
21491
21492 \begin_layout Plain Layout
21493 svn commit
21494 \end_layout
21495
21496 \end_inset
21497
21498
21499 \end_layout
21500
21501 \begin_layout Subsubsection
21502
21503 \family sans
21504 Rename
21505 \end_layout
21506
21507 \begin_layout Standard
21508 This will rename the current document including the version history.
21509  It requires a clean document without any changes since the last checkin.
21510  You are asked for a file name and a description of the rename operation.
21511  After that the document is renamed, both locally and in the repository.
21512  If the parent directories of the new and old file names differ, all relative
21513  paths of included files are adjusted (like in 
21514 \family sans
21515 File\SpecialChar menuseparator
21516 Save As
21517 \family default
21518 \SpecialChar ldots
21519 ).
21520  Finally, the document is reloaded using the new name.
21521 \end_layout
21522
21523 \begin_layout Labeling
21524 \labelwidthstring 00.00.0000
21525 SVN
21526 \begin_inset space ~
21527 \end_inset
21528
21529 commands: 
21530 \begin_inset space ~
21531 \end_inset
21532
21533
21534 \begin_inset Newline newline
21535 \end_inset
21536
21537
21538 \begin_inset Flex Code
21539 status collapsed
21540
21541 \begin_layout Plain Layout
21542 svn move -q 
21543 \family typewriter
21544
21545 \begin_inset Quotes eld
21546 \end_inset
21547
21548 <file-name>
21549 \begin_inset Quotes erd
21550 \end_inset
21551
21552  
21553 \begin_inset Quotes eld
21554 \end_inset
21555
21556 <new-file-name>
21557 \begin_inset Quotes erd
21558 \end_inset
21559
21560
21561 \end_layout
21562
21563 \end_inset
21564
21565
21566 \begin_inset Newline newline
21567 \end_inset
21568
21569
21570 \begin_inset Flex Code
21571 status collapsed
21572
21573 \begin_layout Plain Layout
21574 svn commit
21575 \end_layout
21576
21577 \end_inset
21578
21579
21580 \end_layout
21581
21582 \begin_layout Subsubsection
21583 \begin_inset CommandInset label
21584 LatexCommand label
21585 name "subsec:SVN-Repo-Update"
21586
21587 \end_inset
21588
21589 Update of the local directory checkout from repository
21590 \begin_inset Foot
21591 status collapsed
21592
21593 \begin_layout Plain Layout
21594 Note that this command will work only with subversion 
21595 \begin_inset Formula $\geqq1.5$
21596 \end_inset
21597
21598
21599 \end_layout
21600
21601 \end_inset
21602
21603
21604 \end_layout
21605
21606 \begin_layout Standard
21607 All the commands above have one shortcomming - they deal with the current
21608  document only.
21609  Once your document contains pictures, includes external 
21610 \begin_inset Flex Code
21611 status collapsed
21612
21613 \begin_layout Plain Layout
21614 .tex
21615 \end_layout
21616
21617 \end_inset
21618
21619  files and so on administration becomes more complicated.
21620  \SpecialChar LyX
21621  now supports updating the whole tree in which resides the document
21622 \begin_inset Foot
21623 status collapsed
21624
21625 \begin_layout Plain Layout
21626 One need to organize the files structure so that all external files are
21627  in the same directory or subdirectories of the document.
21628  
21629 \end_layout
21630
21631 \end_inset
21632
21633 .
21634  This become especially useful once you cooperate with people which neither
21635  know about subversion management nor they have ambition to commit additional
21636  material to the repository.
21637  
21638 \end_layout
21639
21640 \begin_layout Standard
21641 \begin_inset Flex Code
21642 status collapsed
21643
21644 \begin_layout Plain Layout
21645 Update local directory from repository
21646 \end_layout
21647
21648 \end_inset
21649
21650  command updates the whole directory and in case of merge conflicts local
21651  version of the files are left, so no unintended data loss occurs.
21652  If local changes are detected user is warned before update starts.
21653 \end_layout
21654
21655 \begin_layout Labeling
21656 \labelwidthstring 00.00.0000
21657 SVN
21658 \begin_inset space ~
21659 \end_inset
21660
21661 commands: 
21662 \begin_inset space ~
21663 \end_inset
21664
21665
21666 \begin_inset Newline newline
21667 \end_inset
21668
21669
21670 \begin_inset Flex Code
21671 status collapsed
21672
21673 \begin_layout Plain Layout
21674 svn diff $path
21675 \end_layout
21676
21677 \end_inset
21678
21679  (Ask if changes are detected.)
21680 \begin_inset Newline newline
21681 \end_inset
21682
21683
21684 \begin_inset Flex Code
21685 status collapsed
21686
21687 \begin_layout Plain Layout
21688 svn update –accept mine-full $path
21689 \end_layout
21690
21691 \end_inset
21692
21693
21694 \end_layout
21695
21696 \begin_layout Standard
21697 where 
21698 \begin_inset Flex Code
21699 status collapsed
21700
21701 \begin_layout Plain Layout
21702 $path
21703 \end_layout
21704
21705 \end_inset
21706
21707  stands for the path to the document.
21708 \end_layout
21709
21710 \begin_layout Subsubsection
21711
21712 \family sans
21713 Show History
21714 \end_layout
21715
21716 \begin_layout Standard
21717 This shows the complete history of the SVN document.
21718  The output of 
21719 \family typewriter
21720 svn log 
21721 \begin_inset Quotes eld
21722 \end_inset
21723
21724 <file-name>
21725 \begin_inset Quotes erd
21726 \end_inset
21727
21728
21729 \family default
21730  is shown in a browser.
21731 \end_layout
21732
21733 \begin_layout Subsubsection
21734 File Locking
21735 \begin_inset CommandInset label
21736 LatexCommand label
21737 name "subsec:SVN-File-Locking"
21738
21739 \end_inset
21740
21741
21742 \end_layout
21743
21744 \begin_layout Standard
21745 The file exchange through various revision control systems brings the problem
21746  of merge conflicts in case two different users try to edit the same (parts
21747  of) document.
21748  When such a conflict happens it needs manual resolving and one reasonable
21749  alternative is to provide some kind of locking mechanism, which guarantees
21750  that only one user is allowed to edit file at the given time.
21751 \end_layout
21752
21753 \begin_layout Standard
21754 SVN has two such mechanisms to provide mutual exclusivity for file access
21755  - locks and automatic setting of write permissions (see sec.
21756  
21757 \begin_inset CommandInset ref
21758 LatexCommand ref
21759 reference "subsec:Automatical-Locking-Property"
21760
21761 \end_inset
21762
21763 ) based on 
21764 \begin_inset Flex Code
21765 status collapsed
21766
21767 \begin_layout Plain Layout
21768 svn:needs-lock
21769 \end_layout
21770
21771 \end_inset
21772
21773  file svn property
21774 \begin_inset Foot
21775 status open
21776
21777 \begin_layout Plain Layout
21778 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
21779 \end_layout
21780
21781 \end_inset
21782
21783 .
21784  If this property is detected for a given document \SpecialChar LyX
21785  starts to use SVN locks
21786  for document editing automatically and the whole check-in/out mechanism
21787  switches to the same regimen as for RCS.
21788  This in particular means there are two different modes of file use in \SpecialChar LyX
21789 :
21790 \end_layout
21791
21792 \begin_layout Itemize
21793 Unlocked state.
21794  The loaded file is in the read-only mode.
21795  For editing on needs to check-out.
21796  
21797 \emph on
21798 Check-out
21799 \emph default
21800  consists of updating from the repository and gaining write lock.
21801  If the lock is not possible to obtain, we remain in unlocked state.
21802 \end_layout
21803
21804 \begin_layout Itemize
21805 Locked state.
21806  The loaded file is in the 'normal' edit mode.
21807  No other user is allowed to edit the file.
21808  
21809 \emph on
21810 Check-in
21811 \emph default
21812  consists of commiting changes and releasing write-lock.
21813  If no changes have been made to the document, no commit will be produced
21814 \begin_inset Foot
21815 status collapsed
21816
21817 \begin_layout Plain Layout
21818 Don't be puzzled by the fact that you will be asked for commit message anyway.
21819 \end_layout
21820
21821 \end_inset
21822
21823  and only the write-lock will be released.
21824 \end_layout
21825
21826 \begin_layout Standard
21827 SVN commands:
21828 \end_layout
21829
21830 \begin_layout Labeling
21831 \labelwidthstring 00.00.0000
21832 Check-in:
21833 \family typewriter
21834  svn commit -q -m"<description>" "<file-name>"
21835 \begin_inset Newline newline
21836 \end_inset
21837
21838 svn unlock "<file-name>"
21839 \end_layout
21840
21841 \begin_layout Labeling
21842 \labelwidthstring 00.00.0000
21843 Check-out: 
21844 \family typewriter
21845 svn update "<file-name>"
21846 \begin_inset Newline newline
21847 \end_inset
21848
21849 svn lock "<file-name>"
21850 \end_layout
21851
21852 \begin_layout Subsubsection
21853
21854 \family typewriter
21855 \begin_inset CommandInset label
21856 LatexCommand label
21857 name "subsec:Automatical-Locking-Property"
21858
21859 \end_inset
21860
21861
21862 \family default
21863 Automatic Locking Property
21864 \end_layout
21865
21866 \begin_layout Standard
21867 The above mentioned automatic setting of write permissions of the .lyx file
21868  can be set through
21869 \family sans
21870  File\SpecialChar menuseparator
21871 Version
21872 \begin_inset space ~
21873 \end_inset
21874
21875 Control\SpecialChar menuseparator
21876 Toggle locking property
21877 \family default
21878 .
21879  This command is active only when the file is not locked on the svn server
21880  (i.e.
21881  you need to check-out before proceeding).
21882 \end_layout
21883
21884 \begin_layout Labeling
21885 \labelwidthstring 00.00.0000
21886 SVN
21887 \begin_inset space ~
21888 \end_inset
21889
21890 commands:
21891 \end_layout
21892
21893 \begin_layout Labeling
21894 \labelwidthstring 00.00.0000
21895 Set:
21896 \family typewriter
21897  svn propset svn:needs-lock ON "<file-name>"
21898 \end_layout
21899
21900 \begin_layout Labeling
21901 \labelwidthstring 00.00.0000
21902 Unset: 
21903 \family typewriter
21904 svn propdel svn:needs-lock "<file-name>"
21905 \end_layout
21906
21907 \begin_layout Subsubsection
21908 \begin_inset CommandInset label
21909 LatexCommand label
21910 name "subsec:VCS-Revision-Information"
21911
21912 \end_inset
21913
21914 Revision Information in Documents
21915 \end_layout
21916
21917 \begin_layout Standard
21918 There are more possibilities how to activate revision information in our
21919  document.
21920 \end_layout
21921
21922 \begin_layout Itemize
21923 \SpecialChar LyX
21924  supports directly:
21925 \end_layout
21926
21927 \begin_deeper
21928 \begin_layout Itemize
21929 tree revision information (
21930 \begin_inset Flex Code
21931 status collapsed
21932
21933 \begin_layout Plain Layout
21934 vcs-tree-revision
21935 \end_layout
21936
21937 \end_inset
21938
21939 ).
21940  The result is the output of the 
21941 \begin_inset Flex Code
21942 status collapsed
21943
21944 \begin_layout Plain Layout
21945 svnversion
21946 \end_layout
21947
21948 \end_inset
21949
21950  command, the following table gives you an idea, how to read the results.
21951 \end_layout
21952
21953 \begin_layout Standard
21954 \align center
21955 \begin_inset Tabular
21956 <lyxtabular version="3" rows="6" columns="2">
21957 <features tabularvalignment="middle">
21958 <column alignment="center" valignment="top">
21959 <column alignment="center" valignment="top">
21960 <row>
21961 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
21962 \begin_inset Text
21963
21964 \begin_layout Plain Layout
21965 Output
21966 \end_layout
21967
21968 \end_inset
21969 </cell>
21970 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
21971 \begin_inset Text
21972
21973 \begin_layout Plain Layout
21974 Meaning
21975 \end_layout
21976
21977 \end_inset
21978 </cell>
21979 </row>
21980 <row>
21981 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
21982 \begin_inset Text
21983
21984 \begin_layout Plain Layout
21985 4123:4168
21986 \end_layout
21987
21988 \end_inset
21989 </cell>
21990 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
21991 \begin_inset Text
21992
21993 \begin_layout Plain Layout
21994 mixed revision working copy
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 4168M
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 modified 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 4123S
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 switched 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 4123P
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 partial working copy, from a sparse checkout
22055 \end_layout
22056
22057 \end_inset
22058 </cell>
22059 </row>
22060 <row>
22061 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
22062 \begin_inset Text
22063
22064 \begin_layout Plain Layout
22065 4123:4168MS
22066 \end_layout
22067
22068 \end_inset
22069 </cell>
22070 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
22071 \begin_inset Text
22072
22073 \begin_layout Plain Layout
22074 mixed revision, modified, switched working copy
22075 \end_layout
22076
22077 \end_inset
22078 </cell>
22079 </row>
22080 </lyxtabular>
22081
22082 \end_inset
22083
22084
22085 \end_layout
22086
22087 \begin_layout Itemize
22088 file revision information.
22089  The result comes from parsing the output of 
22090 \begin_inset Flex Code
22091 status collapsed
22092
22093 \begin_layout Plain Layout
22094 svn
22095 \begin_inset space ~
22096 \end_inset
22097
22098 info
22099 \begin_inset space ~
22100 \end_inset
22101
22102 –xml
22103 \begin_inset space ~
22104 \end_inset
22105
22106 file.lyx
22107 \end_layout
22108
22109 \end_inset
22110
22111 .
22112  Supported flags are:
22113 \end_layout
22114
22115 \begin_deeper
22116 \begin_layout Itemize
22117 version number of the last commit (
22118 \begin_inset Flex Code
22119 status collapsed
22120
22121 \begin_layout Plain Layout
22122 vcs-revision
22123 \end_layout
22124
22125 \end_inset
22126
22127 )
22128 \end_layout
22129
22130 \begin_layout Itemize
22131 author of the last commit (
22132 \begin_inset Flex Code
22133 status collapsed
22134
22135 \begin_layout Plain Layout
22136 vcs-author
22137 \end_layout
22138
22139 \end_inset
22140
22141 )
22142 \end_layout
22143
22144 \begin_layout Itemize
22145 date of the last commit (
22146 \begin_inset Flex Code
22147 status collapsed
22148
22149 \begin_layout Plain Layout
22150 vcs-date
22151 \end_layout
22152
22153 \end_inset
22154
22155 )
22156 \end_layout
22157
22158 \begin_layout Itemize
22159 time of the last commit (
22160 \begin_inset Flex Code
22161 status collapsed
22162
22163 \begin_layout Plain Layout
22164 vcs-time
22165 \end_layout
22166
22167 \end_inset
22168
22169 )
22170 \end_layout
22171
22172 \end_deeper
22173 \begin_layout Standard
22174 You can obtain this info via InsetInfo (e.g.
22175  
22176 \begin_inset Flex Code
22177 status collapsed
22178
22179 \begin_layout Plain Layout
22180 info-insert buffer vcs-date
22181 \end_layout
22182
22183 \end_inset
22184
22185 ).
22186  The information will be available only when you have the file stored under
22187  svn managment (i.e.
22188  the 
22189 \begin_inset Flex Code
22190 status collapsed
22191
22192 \begin_layout Plain Layout
22193 .svn
22194 \end_layout
22195
22196 \end_inset
22197
22198  directory is available with your document).
22199 \end_layout
22200
22201 \end_deeper
22202 \begin_layout Itemize
22203 Another—a hacking one—possibility is to use svn keywords
22204 \begin_inset Foot
22205 status collapsed
22206
22207 \begin_layout Plain Layout
22208 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
22209 \end_layout
22210
22211 \end_inset
22212
22213 .
22214  In short – you set file keywords property (e.g.
22215  
22216 \family sans
22217 svn propset svn:keywords 'Rev' file.lyx
22218 \family default
22219 ) and then paste keyword \SpecialChar TeX
22220  code
22221 \begin_inset Foot
22222 status collapsed
22223
22224 \begin_layout Plain Layout
22225 This is an easy way how to ensure that \SpecialChar LyX
22226  won't break the line in the middle
22227  of keyword tag.
22228 \end_layout
22229
22230 \end_inset
22231
22232  tag in your document (e.g.
22233  
22234 \begin_inset ERT
22235 status open
22236
22237 \begin_layout Plain Layout
22238
22239 $Rev$
22240 \end_layout
22241
22242 \end_inset
22243
22244 ).
22245  This way svn client will automatically substitute revision number (e.g.
22246  
22247 \begin_inset ERT
22248 status open
22249
22250 \begin_layout Plain Layout
22251
22252 $Rev: 59 $
22253 \end_layout
22254
22255 \end_inset
22256
22257 ) after each update and commit.
22258  There are more problems with this approach.
22259  Firstly, the '$' character is used in \SpecialChar TeX
22260  world for math equations, so any
22261  occurence of math formula 
22262 \begin_inset Formula $Rev$
22263 \end_inset
22264
22265  become 
22266 \begin_inset Formula $Rev:59$
22267 \end_inset
22268
22269  in your \SpecialChar LyX
22270  document.
22271  Similarly for other keywords like Id, Date, Author, etc.
22272  Secondly svn output is dependent on your locales, so its very easy that
22273  svn would produce some problematic strings once Date is used.
22274  Thirdly you get the whole 'Rev: 59' string in your document instead of
22275  the plain number.
22276  Until subversion implements user's custom keywords it will be hard to use
22277  this approach reliably or let \SpecialChar LyX
22278  to support it directly.
22279 \end_layout
22280
22281 \begin_layout Subsection
22282 SVN and Windows Environment
22283 \end_layout
22284
22285 \begin_layout Quote
22286 My inclination is to say that if the user cannot figure out the command
22287  line operations on their own fairly quickly, they would be well advised
22288  to use TortoiseSVN.
22289  —P.
22290  A.
22291  Rubin
22292 \end_layout
22293
22294 \begin_layout Subsubsection
22295 Preparation
22296 \end_layout
22297
22298 \begin_layout Standard
22299 In addition to installing \SpecialChar LyX
22300 , and having access to a Subversion repository,
22301  the user will need to install the Subversion client program.
22302  A Windows installer for the client program is available from 
22303 \begin_inset CommandInset href
22304 LatexCommand href
22305 name "CollabNet"
22306 target "http://www.collab.net/nonav/downloads/subversion/"
22307 literal "false"
22308
22309 \end_inset
22310
22311 .
22312  The user may also want to install 
22313 \begin_inset CommandInset href
22314 LatexCommand href
22315 name "TortoiseSVN"
22316 target "http://tortoisesvn.tigris.org/"
22317 literal "false"
22318
22319 \end_inset
22320
22321 , which integrates Subversion operations into the context (rightclick) menu
22322  of Windows Explorer.
22323  Operations done outside \SpecialChar LyX
22324  will typically be more convenient using the Explorer
22325  context menu.
22326  Note that TortoiseSVN is not a replacement for the client program, which
22327  is what \SpecialChar LyX
22328  itself will use.
22329 \end_layout
22330
22331 \begin_layout Subsubsection
22332 Bringing a document under Subversion control
22333 \end_layout
22334
22335 \begin_layout Standard
22336 Before a \SpecialChar LyX
22337  document can be brought under version control in Subversion, its
22338  parent directory needs to be under version control.
22339  If the document is being added to a project already in the repository,
22340  this is accomplished by checking the project out to the directory where
22341  the new document will be placed.
22342  If the project itself is not yet under version control (for instance, if
22343  this document starts a new project), the directory must be imported into
22344  the repository.
22345  This is done outside \SpecialChar LyX
22346 .
22347  Both import and checkout are easily accomplished from the Explorer context
22348  menu using TortoiseSVN, or alternatively can be done using the command
22349  line client at a DOS prompt.
22350  The procedure for importing the project using TortoiseSVN is described
22351  below, assuming an existing repository and a new project being started
22352  in 
22353 \family typewriter
22354 C:
22355 \backslash
22356 new project
22357 \family default
22358 .
22359  For information on using the Subversion client program, run 
22360 \family typewriter
22361 svn --help 
22362 \family default
22363 in a DOS shell.
22364 \end_layout
22365
22366 \begin_layout Enumerate
22367 Locate 
22368 \family typewriter
22369 C:
22370 \backslash
22371 new project 
22372 \family default
22373 in Windows Explorer, right click it, and select 
22374 \family sans
22375 TortoiseSVN\SpecialChar menuseparator
22376 Repo-browser
22377 \family default
22378 .
22379  If necessary, adjust the URL for the repository, then click OK.
22380 \end_layout
22381
22382 \begin_layout Enumerate
22383 Right click the level of the repository under which you want to place the
22384  new project folder (typically the top level) and click 
22385 \family sans
22386 Create folder
22387 \family default
22388  Supply a name for the project folder and click OK.
22389  Add a message for the log file if desired, then click OK again.
22390  The new project folder should appear in the repository.
22391  Finally, click OK again to exit the repository browser.
22392 \end_layout
22393
22394 \begin_layout Enumerate
22395 Once again right click 
22396 \family typewriter
22397 C:
22398 \backslash
22399 new project
22400 \family default
22401 , this time selecting SVN Checkout\SpecialChar ldots
22402  Select the URL of the project folder
22403  you just created in the repository, and set the checkout directory to 
22404 \family typewriter
22405 C:
22406 \backslash
22407 new project.
22408
22409 \family default
22410  Click OK.
22411  You will be warned about a non-empty folder; click OK to proceed.
22412  You should now have a 
22413 \family typewriter
22414 .svn
22415 \family default
22416  directory under 
22417 \family typewriter
22418 C:
22419 \backslash
22420 new project.
22421 \end_layout
22422
22423 \begin_layout Enumerate
22424 Create or open your document in \SpecialChar LyX
22425  and click 
22426 \family sans
22427 File\SpecialChar menuseparator
22428 Version
22429 \begin_inset space ~
22430 \end_inset
22431
22432 Control\SpecialChar menuseparator
22433 Register.
22434  
22435 \family default
22436 Add a log message and click OK to commit the document to version control.
22437 \end_layout
22438
22439 \begin_layout Standard
22440 From this point onward, you should have full functionality in the 
22441 \family sans
22442 File\SpecialChar menuseparator
22443 Version
22444 \begin_inset space ~
22445 \end_inset
22446
22447 Control
22448 \family default
22449  menu.
22450  You also have the option of checking the document in and out, viewing its
22451  history, etc.
22452  using the TortoiseSVN context menu in Windows Explorer or the Subversion
22453  client program from a command prompt.
22454 \end_layout
22455
22456 \begin_layout Subsubsection
22457 SSH tunnel used with SVN under Windows
22458 \end_layout
22459
22460 \begin_layout Standard
22461 Compared with Linux setting up an svn client to communicate over ssh under
22462  Windows is a rather troublesome task.
22463  We will at least offer some hints how to setup the client side but prior
22464  knowledge about ssh and the Windows command line is needed, also be prepared
22465  for a great deal of frustration\SpecialChar ldots
22466
22467 \end_layout
22468
22469 \begin_layout Enumerate
22470 Get an svn client for windows, as described in the previous sections.
22471  When it is a fresh install run some svn command (e.g.
22472  
22473 \begin_inset Flex Code
22474 status collapsed
22475
22476 \begin_layout Plain Layout
22477 svn –version
22478 \end_layout
22479
22480 \end_inset
22481
22482 ) to create config files, which you will need to change later on.
22483 \end_layout
22484
22485 \begin_layout Enumerate
22486 Choose an ssh client for Windows.
22487  There are several possibilities, we will use the one from Putty tools
22488 \begin_inset Foot
22489 status collapsed
22490
22491 \begin_layout Plain Layout
22492 \begin_inset Flex URL
22493 status collapsed
22494
22495 \begin_layout Plain Layout
22496
22497 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
22498 \end_layout
22499
22500 \end_inset
22501
22502
22503 \end_layout
22504
22505 \end_inset
22506
22507 .
22508  You will need to set the connection up so that the client doesn't ask for
22509  any password from you.
22510  To keep things easy we will use only keys without any additional password
22511  protection etc.
22512 \end_layout
22513
22514 \begin_deeper
22515 \begin_layout Enumerate
22516 Generate keys by 
22517 \begin_inset Flex Code
22518 status collapsed
22519
22520 \begin_layout Plain Layout
22521 puttygen
22522 \end_layout
22523
22524 \end_inset
22525
22526 .
22527  Save your private .ppk key file and put the public one on the server side.
22528  If the SVN server runs on Linux, note that the format of the public key
22529  is not compatible with Linux openssh and you will need to direcly copy-paste
22530  the key from the “
22531 \emph on
22532 Public key for pasting into OpenSSH authorized_keys file
22533 \emph default
22534 :” edit field into the server's 
22535 \begin_inset Flex Code
22536 status collapsed
22537
22538 \begin_layout Plain Layout
22539 ~/.ssh/authorized_keys
22540 \end_layout
22541
22542 \end_inset
22543
22544  / 
22545 \begin_inset Flex Code
22546 status collapsed
22547
22548 \begin_layout Plain Layout
22549 authorized_keys2
22550 \end_layout
22551
22552 \end_inset
22553
22554  file.
22555 \end_layout
22556
22557 \begin_layout Enumerate
22558 Get the Putty's 
22559 \begin_inset Flex Code
22560 status collapsed
22561
22562 \begin_layout Plain Layout
22563 plink
22564 \end_layout
22565
22566 \end_inset
22567
22568 .
22569  In the SVN config file
22570 \begin_inset Foot
22571 status collapsed
22572
22573 \begin_layout Plain Layout
22574 Exact path depends on Windows version, usually somewhere around 
22575 \begin_inset Flex Code
22576 status collapsed
22577
22578 \begin_layout Plain Layout
22579 c:
22580 \backslash
22581 Documents and Settings
22582 \backslash
22583 user
22584 \backslash
22585 Application Data
22586 \backslash
22587 Subversion
22588 \backslash
22589 config
22590 \end_layout
22591
22592 \end_inset
22593
22594  / 
22595 \begin_inset Flex Code
22596 status collapsed
22597
22598 \begin_layout Plain Layout
22599 AppData
22600 \backslash
22601 Roaming
22602 \backslash
22603 Subversion
22604 \end_layout
22605
22606 \end_inset
22607
22608 .
22609 \end_layout
22610
22611 \end_inset
22612
22613 , section [tunnels], setup ssh command, e.g.
22614  
22615 \begin_inset Flex Code
22616 status collapsed
22617
22618 \begin_layout Plain Layout
22619 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
22620 \end_layout
22621
22622 \end_inset
22623
22624 .
22625 \begin_inset Foot
22626 status collapsed
22627
22628 \begin_layout Plain Layout
22629 It will usually take a lot of time to get exact command right and it depends
22630  on many things.
22631  For example do not have some remote server saved as a default session in
22632  Putty etc.
22633  If things fail, try to connect via plink without SVN first.
22634 \end_layout
22635
22636 \end_inset
22637
22638
22639 \end_layout
22640
22641 \end_deeper
22642 \begin_layout Enumerate
22643 Checkout the SVN archive, e.
22644 \begin_inset space \thinspace{}
22645 \end_inset
22646
22647 g.
22648 \begin_inset Newline newline
22649 \end_inset
22650
22651
22652 \begin_inset Flex Code
22653 status collapsed
22654
22655 \begin_layout Plain Layout
22656 svn co svn+ssh://user@server/repository_path
22657 \end_layout
22658
22659 \end_inset
22660
22661 .
22662 \end_layout
22663
22664 \begin_layout Subsubsection
22665 End-of-Line Conversions
22666 \end_layout
22667
22668 \begin_layout Standard
22669 When the collaborators are mixing Linux and Windows environments, \SpecialChar LyX
22670  will
22671  use different line endings inside the .lyx files.
22672  This is not a problem as far as \SpecialChar LyX
22673  functionality is concerned, but the commit
22674  diffs will be huge and merge-conflicts prone.
22675  Fortunately SVN itself knows
22676 \begin_inset Foot
22677 status collapsed
22678
22679 \begin_layout Plain Layout
22680 \begin_inset Flex URL
22681 status collapsed
22682
22683 \begin_layout Plain Layout
22684
22685 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
22686 \end_layout
22687
22688 \end_inset
22689
22690
22691 \end_layout
22692
22693 \end_inset
22694
22695  how to deal with CR/LF problems when switching .lyx files to the 
22696 \begin_inset Flex Code
22697 status collapsed
22698
22699 \begin_layout Plain Layout
22700 native
22701 \end_layout
22702
22703 \end_inset
22704
22705  mode.
22706 \begin_inset Foot
22707 status collapsed
22708
22709 \begin_layout Plain Layout
22710 For the lazy guys: 
22711 \begin_inset Flex Code
22712 status collapsed
22713
22714 \begin_layout Plain Layout
22715 svn propset svn:eol-style native FILE_NAME
22716 \end_layout
22717
22718 \end_inset
22719
22720
22721 \end_layout
22722
22723 \end_inset
22724
22725
22726 \end_layout
22727
22728 \begin_layout Subsection
22729 GIT commands in \SpecialChar LyX
22730
22731 \end_layout
22732
22733 \begin_layout Standard
22734 A minimal subset of GIT commands is now supported by \SpecialChar LyX
22735 .
22736  You can find the commands in the 
22737 \family sans
22738 File\SpecialChar menuseparator
22739 Version
22740 \begin_inset space ~
22741 \end_inset
22742
22743 Control
22744 \family default
22745  submenu.
22746  Please note that if you use password protected access to repository via
22747  ssh, you will be asked in terminal window.
22748  \SpecialChar LyX
22749  was tested against GIT 1.7.
22750 \begin_inset Foot
22751 status open
22752
22753 \begin_layout Plain Layout
22754 Windows users please note that you need to ensure that git is on the path.
22755  This can be set from within \SpecialChar LyX
22756  at 
22757 \family sans
22758 Tools\SpecialChar menuseparator
22759 Preferences\SpecialChar menuseparator
22760 Paths\SpecialChar menuseparator
22761 PATH prefix
22762 \family default
22763 .
22764 \end_layout
22765
22766 \end_inset
22767
22768
22769 \end_layout
22770
22771 \begin_layout Standard
22772 One big difference of GIT and the other supported version control systems
22773  is the distributed nature of GIT: With traditional version control systems
22774  there is one central server which hosts the repository.
22775  Users commit their changes to the server, and get updates made by other
22776  users from it.
22777  With GIT, users commit to a local repository.
22778  The local repository can be synchronized with one or more remote repositories
22779  using the 
22780 \begin_inset Flex Code
22781 status collapsed
22782
22783 \begin_layout Plain Layout
22784 pull
22785 \end_layout
22786
22787 \end_inset
22788
22789  and 
22790 \begin_inset Flex Code
22791 status collapsed
22792
22793 \begin_layout Plain Layout
22794 push
22795 \end_layout
22796
22797 \end_inset
22798
22799  GIT commands.
22800  \SpecialChar LyX
22801  does not interact in any way with remote GIT repositories.
22802  It works exclusively with the local repository in a very similar way as
22803  with a central CVS or SVN repository.
22804  If you use remote GIT repositories you need to do the 
22805 \begin_inset Flex Code
22806 status collapsed
22807
22808 \begin_layout Plain Layout
22809 pull
22810 \end_layout
22811
22812 \end_inset
22813
22814  and 
22815 \begin_inset Flex Code
22816 status collapsed
22817
22818 \begin_layout Plain Layout
22819 push
22820 \end_layout
22821
22822 \end_inset
22823
22824  operations with your favourite GIT client.
22825 \end_layout
22826
22827 \begin_layout Subsubsection
22828
22829 \family sans
22830 Register
22831 \end_layout
22832
22833 \begin_layout Standard
22834 If your document is not under revision control, this is the only item shown
22835  in the menu.
22836  And if it is under revision control, the 
22837 \family sans
22838 Register
22839 \family default
22840  item is not visible.
22841 \end_layout
22842
22843 \begin_layout Standard
22844 This command registers in GIT your document ONLY in case you have already
22845  the documents directory under GIT control (in particular 
22846 \family typewriter
22847 .git/index
22848 \family default
22849  file exists).
22850  This means you have to checkout the archive by yourself.
22851 \end_layout
22852
22853 \begin_layout Standard
22854 Then you are asked interactively to supply an initial description of the
22855  document.
22856  Don't forget that registered file is not yet commited.
22857 \end_layout
22858
22859 \begin_layout Standard
22860 GIT command that is run: 
22861 \family typewriter
22862 git add 
22863 \begin_inset Quotes eld
22864 \end_inset
22865
22866 <file-name>
22867 \begin_inset Quotes erd
22868 \end_inset
22869
22870
22871 \end_layout
22872
22873 \begin_layout Standard
22874 Read 
22875 \family typewriter
22876 man git
22877 \family default
22878  to understand the switches.
22879 \end_layout
22880
22881 \begin_layout Subsubsection
22882
22883 \family sans
22884 Check In Changes
22885 \end_layout
22886
22887 \begin_layout Standard
22888 When you are finished editing a file, you commit your changes.
22889  When you do this, you are asked for a description of the changes.
22890  After that changes are commited.
22891 \end_layout
22892
22893 \begin_layout Standard
22894 GIT command: 
22895 \family typewriter
22896 git commit -q -m"<description>" <file-name>
22897 \end_layout
22898
22899 \begin_layout Subsubsection
22900
22901 \family sans
22902 Revert To Repository Version
22903 \end_layout
22904
22905 \begin_layout Standard
22906 This will discard all changes made to the document since the last check
22907  in.
22908  You get a warning before changes are discarded.
22909 \end_layout
22910
22911 \begin_layout Standard
22912 GIT command: 
22913 \family typewriter
22914 git checkout -q 
22915 \begin_inset Quotes eld
22916 \end_inset
22917
22918 <file-name>
22919 \begin_inset Quotes erd
22920 \end_inset
22921
22922
22923 \end_layout
22924
22925 \begin_layout Subsubsection
22926
22927 \family sans
22928 Rename
22929 \end_layout
22930
22931 \begin_layout Standard
22932 This will rename the current document including the version history.
22933  It requires a clean document without any changes since the last checkin.
22934  You are asked for a file name and a description of the rename operation.
22935  After that the document is renamed, both locally and in the repository.
22936  If the parent directories of the new and old file names differ, all relative
22937  paths of included files are adjusted (like in 
22938 \family sans
22939 File\SpecialChar menuseparator
22940 Save As
22941 \family default
22942 \SpecialChar ldots
22943 ).
22944  Finally, the document is reloaded using the new name.
22945 \end_layout
22946
22947 \begin_layout Labeling
22948 \labelwidthstring 00.00.0000
22949 GIT
22950 \begin_inset space ~
22951 \end_inset
22952
22953 commands: 
22954 \begin_inset space ~
22955 \end_inset
22956
22957
22958 \begin_inset Newline newline
22959 \end_inset
22960
22961
22962 \begin_inset Flex Code
22963 status collapsed
22964
22965 \begin_layout Plain Layout
22966 git mv 
22967 \family typewriter
22968
22969 \begin_inset Quotes eld
22970 \end_inset
22971
22972 <file-name>
22973 \begin_inset Quotes erd
22974 \end_inset
22975
22976  
22977 \begin_inset Quotes eld
22978 \end_inset
22979
22980 <new-file-name>
22981 \begin_inset Quotes erd
22982 \end_inset
22983
22984
22985 \end_layout
22986
22987 \end_inset
22988
22989
22990 \begin_inset Newline newline
22991 \end_inset
22992
22993
22994 \begin_inset Flex Code
22995 status collapsed
22996
22997 \begin_layout Plain Layout
22998 git commit
22999 \end_layout
23000
23001 \end_inset
23002
23003
23004 \end_layout
23005
23006 \begin_layout Subsubsection
23007
23008 \family sans
23009 Show History
23010 \end_layout
23011
23012 \begin_layout Standard
23013 This shows the complete history of the GIT document.
23014  The output of 
23015 \family typewriter
23016 git log 
23017 \begin_inset Quotes eld
23018 \end_inset
23019
23020 <file-name>
23021 \begin_inset Quotes erd
23022 \end_inset
23023
23024
23025 \family default
23026  is shown in a browser.
23027 \end_layout
23028
23029 \begin_layout Subsubsection
23030 Version Info
23031 \end_layout
23032
23033 \begin_layout Standard
23034 \SpecialChar LyX
23035  supports GIT hash number of the last commit to the file, author name, date
23036  and time of last commit.
23037  All those are extracted from 
23038 \family typewriter
23039 git log -n 1 --pretty=format:%H%n%an%n%ai
23040 \family default
23041 .
23042  Tree version information is obtained via 
23043 \family typewriter
23044 git describe --abbrev --dirty --long
23045 \family default
23046 .
23047  See 
23048 \begin_inset CommandInset ref
23049 LatexCommand ref
23050 reference "subsec:VCS-Revision-Information"
23051
23052 \end_inset
23053
23054  for other details.
23055 \end_layout
23056
23057 \begin_layout Subsection
23058 Further tuning
23059 \end_layout
23060
23061 \begin_layout Standard
23062 With the recent addition of the vc-command function \SpecialChar LyX
23063  power users are allowed
23064  to create their own commands for revision control.
23065 \end_layout
23066
23067 \begin_layout Standard
23068 As an example you can see how two TortoiseSVN commands could be integrated
23069  directly:
23070 \end_layout
23071
23072 \begin_layout Description
23073 Commit: 
23074 \begin_inset Flex Code
23075 status collapsed
23076
23077 \begin_layout Plain Layout
23078 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
23079 \end_layout
23080
23081 \end_inset
23082
23083
23084 \end_layout
23085
23086 \begin_layout Description
23087 Revert: 
23088 \begin_inset Flex Code
23089 status collapsed
23090
23091 \begin_layout Plain Layout
23092 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
23093 \end_layout
23094
23095 \end_inset
23096
23097
23098 \end_layout
23099
23100 \begin_layout Subsection
23101 Version control and Document comparison
23102 \end_layout
23103
23104 \begin_layout Standard
23105 One of the typical uses of version control is to inspect the changes between
23106  revisions, usually by creating 
23107 \begin_inset Flex Code
23108 status collapsed
23109
23110 \begin_layout Plain Layout
23111 diff
23112 \end_layout
23113
23114 \end_inset
23115
23116  dumps.
23117  While this is useful for plain text files, it is much less useful in the
23118  case of \SpecialChar LyX
23119  files, which have more a complicated structure.
23120  Hence we provide binding to the Document comparison feature.
23121  There are two ways of calling this feature - either by direct call of 
23122 \begin_inset Flex Code
23123 status collapsed
23124
23125 \begin_layout Plain Layout
23126 VC_COMPARE
23127 \end_layout
23128
23129 \end_inset
23130
23131  \SpecialChar LyX
23132  function (for details see \SpecialChar LyX
23133  functions manual) or by icon/menu item 
23134 \begin_inset Flex Noun
23135 status collapsed
23136
23137 \begin_layout Plain Layout
23138 Compare with older revision...
23139 \end_layout
23140
23141 \end_inset
23142
23143 .
23144  One can either compare two chosen revisions of the document or he can simply
23145  compare the current version of edited text with older revisions (where
23146  '
23147 \begin_inset Flex Noun
23148 status collapsed
23149
23150 \begin_layout Plain Layout
23151 0
23152 \end_layout
23153
23154 \end_inset
23155
23156 ' revisions back means comparison of the edited file with last commited
23157  revision).
23158  
23159 \end_layout
23160
23161 \begin_layout Standard
23162 This feature is supported for SVN and RCS though due to the more complicated
23163  versioning scheme of RCS there is a constraint – when addressing the revisions
23164  in dialog, numbers always point to the last number in RCS revision number,
23165  i.e.
23166  '35' in '1.2.35'.
23167  We don't currently support GIT addressing of revisions, one can just compare
23168  edited document with its revision X steps backs, where X is addressed as
23169  HEAD~X.
23170 \end_layout
23171
23172 \begin_layout Section
23173 Literate Programming
23174 \end_layout
23175
23176 \begin_layout Standard
23177 Updated by 
23178 \noun on
23179 Kayvan Sylvan 
23180 \noun default
23181 (kayvan@sylvan.com)
23182 \noun on
23183
23184 \noun default
23185 original documentation written by 
23186 \noun on
23187 Edmar Wienskoski Jr.
23188
23189 \noun default
23190  (edmar-w-jr@technologist.com)
23191 \end_layout
23192
23193 \begin_layout Subsection
23194 Introduction
23195 \end_layout
23196
23197 \begin_layout Standard
23198 The main purpose of this documentation is to show you how to use \SpecialChar LyX
23199  for literate
23200  programming, where it is assumed that you are familiar with this programming
23201  technique, and know what 
23202 \begin_inset Quotes eld
23203 \end_inset
23204
23205 tangling
23206 \begin_inset Quotes erd
23207 \end_inset
23208
23209  and 
23210 \begin_inset Quotes eld
23211 \end_inset
23212
23213 weaving
23214 \begin_inset Quotes erd
23215 \end_inset
23216
23217  means.
23218  If that is not the case, please follow the web links provided in the following
23219  sections.
23220  There is a lot of good documentation out there covering old development
23221  history to the latest tools tips.
23222 \end_layout
23223
23224 \begin_layout Standard
23225 It is also assumed that you are familiar with \SpecialChar LyX
23226  itself to a point that you
23227  are comfortable changing your \SpecialChar LyX
23228  preferences, and X resources file.
23229  If that is not the case please refer to other \SpecialChar LyX
23230  documentation to cover your
23231  specific needs.
23232 \end_layout
23233
23234 \begin_layout Subsection
23235 Literate Programming
23236 \end_layout
23237
23238 \begin_layout Standard
23239 From the Literate Programming FAQ: 
23240 \end_layout
23241
23242 \begin_layout Quotation
23243 Literate programming is the combination of documentation and source together
23244  in a fashion suited for reading by human beings.
23245  In fact, literate programs should be enjoyable reading, even inviting!
23246  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
23247  and documentation in a single file.
23248  Literate programming tools then parse the file to produce either readable
23249  documentation or compilable source.
23250  The WEB style of literate programming was created by D.
23251 \begin_inset space \thinspace{}
23252 \end_inset
23253
23254 E.
23255  Knuth during the development of his \SpecialChar TeX
23256  typesetting software.
23257  
23258 \end_layout
23259
23260 \begin_layout Standard
23261 Another excerpt says:
23262 \end_layout
23263
23264 \begin_layout Quotation
23265
23266 \emph on
23267 How is literate programming different from verbose commenting?
23268 \end_layout
23269
23270 \begin_layout Quotation
23271 There are three distinguishing characteristics.
23272  In order of importance, they are: 
23273 \end_layout
23274
23275 \begin_deeper
23276 \begin_layout Itemize
23277 flexible order of elaboration 
23278 \end_layout
23279
23280 \begin_layout Itemize
23281 automatic support for browsing 
23282 \end_layout
23283
23284 \begin_layout Itemize
23285 typeset documentation, especially diagrams and mathematics 
23286 \end_layout
23287
23288 \end_deeper
23289 \begin_layout Standard
23290 Now that I sparked your curiosity, take a look in the references.
23291 \end_layout
23292
23293 \begin_layout Subsubsection
23294 References
23295 \end_layout
23296
23297 \begin_layout Standard
23298 The complete Literate Programming FAQ can be found at:
23299 \end_layout
23300
23301 \begin_layout Quote
23302 Literate Programming FAQ 
23303 \begin_inset Flex URL
23304 status collapsed
23305
23306 \begin_layout Plain Layout
23307
23308 http://www.literateprogramming.com/lpfaq.pdf
23309 \end_layout
23310
23311 \end_inset
23312
23313
23314 \end_layout
23315
23316 \begin_layout Standard
23317 The FAQ lists 23 (twenty three!) different literate programming tools.
23318  Where some are specialized or 
23319 \begin_inset Quotes eld
23320 \end_inset
23321
23322 tailored
23323 \begin_inset Quotes erd
23324 \end_inset
23325
23326  for particular programming languages, while other have general scope.
23327  I selected 
23328 \noun on
23329 Noweb
23330 \noun default
23331  for my own use for several reasons:
23332 \end_layout
23333
23334 \begin_layout Itemize
23335 It can generate the documentation either in \SpecialChar LaTeX
23336  or HTML.
23337 \end_layout
23338
23339 \begin_layout Itemize
23340 It has a open architecture, i.
23341 \begin_inset space \thinspace{}
23342 \end_inset
23343
23344 e.
23345 \begin_inset space \space{}
23346 \end_inset
23347
23348 it is easy to plug in new filters and to perform special processing that
23349  you may need.
23350  
23351 \end_layout
23352
23353 \begin_layout Itemize
23354 There is a good selection of filters available already (the HTML is one
23355  of them).
23356 \end_layout
23357
23358 \begin_layout Itemize
23359 It is free.
23360 \end_layout
23361
23362 \begin_layout Standard
23363 The Noweb web page can be found at: 
23364 \end_layout
23365
23366 \begin_layout Quote
23367 Noweb home page 
23368 \begin_inset Flex URL
23369 status collapsed
23370
23371 \begin_layout Plain Layout
23372
23373 http://www.cs.virginia.edu/~nr/noweb/
23374 \end_layout
23375
23376 \end_inset
23377
23378
23379 \end_layout
23380
23381 \begin_layout Standard
23382 Starting from there you can reach many other interesting links and even
23383  some literate program examples.
23384 \end_layout
23385
23386 \begin_layout Subsection
23387 \SpecialChar LyX
23388  and Literate Programming with Noweb
23389 \end_layout
23390
23391 \begin_layout Standard
23392 The \SpecialChar LyX
23393  support for Literate Programming is provided by using the generic \SpecialChar LyX
23394
23395  converters mechanism.
23396  This support is provided in a 
23397 \begin_inset Quotes eld
23398 \end_inset
23399
23400 Noweb independent
23401 \begin_inset Quotes erd
23402 \end_inset
23403
23404  way, i.
23405 \begin_inset space \thinspace{}
23406 \end_inset
23407
23408 e.
23409 \begin_inset space \space{}
23410 \end_inset
23411
23412 you will be able to use this new \SpecialChar LyX
23413  feature with some other literate programming
23414  tool of your choice by just changing your \SpecialChar LyX
23415  preferences.
23416 \end_layout
23417
23418 \begin_layout Subsubsection
23419 Generating documents and code (weaving and tangling)
23420 \end_layout
23421
23422 \begin_layout Paragraph
23423 Using the noweb module
23424 \end_layout
23425
23426 \begin_layout Standard
23427 If you have installed Noweb and \SpecialChar LyX
23428  successfully, whenever you open a new document,
23429  after you have chosen its document class, use the Document->Settings menu
23430  to add the 
23431 \begin_inset Quotes eld
23432 \end_inset
23433
23434 noweb
23435 \begin_inset Quotes erd
23436 \end_inset
23437
23438  module.
23439  If Noweb is correctly installed, when you click on the 
23440 \begin_inset Quotes eld
23441 \end_inset
23442
23443 Modules
23444 \begin_inset Quotes erd
23445 \end_inset
23446
23447  link, you will see the 
23448 \begin_inset Quotes eld
23449 \end_inset
23450
23451 noweb
23452 \begin_inset Quotes erd
23453 \end_inset
23454
23455  module in the available list and you can add it to your document.
23456 \end_layout
23457
23458 \begin_layout Paragraph
23459 Typing code in
23460 \end_layout
23461
23462 \begin_layout Standard
23463 \SpecialChar LyX
23464  enables you to write code with a layout named 
23465 \begin_inset Flex Noun
23466 status collapsed
23467
23468 \begin_layout Plain Layout
23469 Chunk
23470 \end_layout
23471
23472 \end_inset
23473
23474 .
23475  Noweb delimits chunks like this:
23476 \end_layout
23477
23478 \begin_layout LyX-Code
23479 <<My code>>=
23480 \end_layout
23481
23482 \begin_layout LyX-Code
23483   code
23484 \end_layout
23485
23486 \begin_layout LyX-Code
23487   more code
23488 \end_layout
23489
23490 \begin_layout LyX-Code
23491   even more code
23492 \end_layout
23493
23494 \begin_layout LyX-Code
23495   @
23496 \end_layout
23497
23498 \begin_layout Standard
23499 The problem is that whatever is written in between the << and the 
23500 \family typewriter
23501 @
23502 \family default
23503  must be taken literally, i.
23504 \begin_inset space \thinspace{}
23505 \end_inset
23506
23507 e.
23508 \begin_inset space \space{}
23509 \end_inset
23510
23511 \SpecialChar LyX
23512  should be prevented from making any special interpretation of what has
23513  been written.
23514  This is also handled by 
23515 \begin_inset Flex Noun
23516 status collapsed
23517
23518 \begin_layout Plain Layout
23519 Chunk
23520 \end_layout
23521
23522 \end_inset
23523
23524 , that works like a normal paragraph but has a free spacing capability.
23525 \end_layout
23526
23527 \begin_layout Standard
23528 As a special note, you can also use the 
23529 \begin_inset Quotes eld
23530 \end_inset
23531
23532 %def
23533 \begin_inset Quotes erd
23534 \end_inset
23535
23536  construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
23537 rence:
23538 \end_layout
23539
23540 \begin_layout LyX-Code
23541 <<My chunk>>=
23542 \end_layout
23543
23544 \begin_layout LyX-Code
23545 def some_function(args):
23546 \end_layout
23547
23548 \begin_layout LyX-Code
23549    "This is the doc string for this function."
23550 \end_layout
23551
23552 \begin_layout LyX-Code
23553    print "My args: ", args
23554 \end_layout
23555
23556 \begin_layout LyX-Code
23557 @ %def some_function
23558 \end_layout
23559
23560 \begin_layout Standard
23561 For an example of this usage and the resulting cross-reference output, look
23562  at the Literate python program in 
23563 \emph on
23564 LIBDIR/examples/listerrors.lyx
23565 \emph default
23566  which should make this all clear.
23567 \end_layout
23568
23569 \begin_layout Paragraph
23570 Generating the documentation
23571 \end_layout
23572
23573 \begin_layout Standard
23574 At this point you already have a new document file with a proper document
23575  class, and with some code and text on it.
23576  How do I print it? The answer is simple, you select 
23577 \family sans
23578 View\SpecialChar menuseparator
23579 DVI,
23580 \family default
23581  etc.
23582  Just like you would do for a plain document.
23583  No special procedure is required.
23584 \end_layout
23585
23586 \begin_layout Standard
23587 To help orientate you, I will now explain what happens inside \SpecialChar LyX
23588 :
23589 \end_layout
23590
23591 \begin_layout Enumerate
23592 When the 
23593 \family sans
23594 Update\SpecialChar menuseparator
23595 DVI
23596 \family default
23597  menu option is chosen, a \SpecialChar LaTeX
23598  file is generated.
23599  
23600 \end_layout
23601
23602 \begin_deeper
23603 \begin_layout Standard
23604 If the document is of any literate class the generated file will be named
23605  with an extension name defined by the 
23606 \begin_inset Quotes eld
23607 \end_inset
23608
23609 literate
23610 \begin_inset Quotes erd
23611 \end_inset
23612
23613  format (defined in the Preferences panel), otherwise the file will have
23614  the usual 
23615 \family typewriter
23616 .tex
23617 \family default
23618  extension.
23619 \end_layout
23620
23621 \end_deeper
23622 \begin_layout Enumerate
23623 Note that the only difference so far is in the name of the file, no special
23624  processing is required by \SpecialChar LyX
23625 .
23626  Given that you formatted the code using the 
23627 \begin_inset Flex Noun
23628 status collapsed
23629
23630 \begin_layout Plain Layout
23631 Chunk
23632 \end_layout
23633
23634 \end_inset
23635
23636  layout that, by itself, takes care of the business.
23637 \end_layout
23638
23639 \begin_layout Enumerate
23640 If the document is of any literate class \SpecialChar LyX
23641  will then use the internal \SpecialChar LyX
23642  to
23643  Noweb converter, followed by the Noweb to \SpecialChar LaTeX
23644  converter
23645 \begin_inset Foot
23646 status collapsed
23647
23648 \begin_layout Plain Layout
23649 The converters are defined in the 
23650 \family sans
23651 Tools\SpecialChar menuseparator
23652 Preferences
23653 \family default
23654  panel, under the 
23655 \begin_inset Quotes eld
23656 \end_inset
23657
23658 Conversion
23659 \begin_inset Quotes erd
23660 \end_inset
23661
23662  tab.
23663  See section 
23664 \emph on
23665 Converters
23666 \emph default
23667  of the 
23668 \emph on
23669 Customization
23670 \emph default
23671  manual for general information about converters.
23672 \end_layout
23673
23674 \end_inset
23675
23676  to generate the \SpecialChar LaTeX
23677  file.
23678 \end_layout
23679
23680 \begin_deeper
23681 \begin_layout Standard
23682 Otherwise it will just skip this step.
23683 \end_layout
23684
23685 \end_deeper
23686 \begin_layout Enumerate
23687 Finally, \SpecialChar LaTeX
23688  is invoked and the regular post processing continues as in a plain
23689  document.
23690 \end_layout
23691
23692 \begin_layout Standard
23693 Independence from a particular 
23694 \begin_inset Quotes eld
23695 \end_inset
23696
23697 literate tool
23698 \begin_inset Quotes erd
23699 \end_inset
23700
23701  is easily achieved by changing the commands that are run by the various
23702  converters.
23703 \end_layout
23704
23705 \begin_layout Paragraph
23706 Generating the code
23707 \end_layout
23708
23709 \begin_layout Standard
23710 When the build menu option is chosen or the corresponding button in the
23711  toolbar is pressed, a \SpecialChar LaTeX
23712  file is generated just like step 1 above.
23713  Next, \SpecialChar LyX
23714  invokes the 
23715 \family typewriter
23716 Noweb->Program
23717 \family default
23718  converter.
23719  This converter needs to be defined by the user and is not installed by
23720  default, though the Program format is.
23721  This converter (like any other converter) will have two parts:
23722 \end_layout
23723
23724 \begin_layout Enumerate
23725 The converter program itself.
23726  This program performs the conversion from the one format to the other (in
23727  this case, from the Noweb format to the Program pseudo-format).
23728 \end_layout
23729
23730 \begin_layout Enumerate
23731 The error log parser.
23732  This is a program whose sole purpose is to rewrite error messages in a
23733  format that \SpecialChar LyX
23734  understands.
23735  This makes it possible for \SpecialChar LyX
23736  to place error boxes in the right places in
23737  the file buffer.
23738 \end_layout
23739
23740 \begin_layout Standard
23741 The first part, the 
23742 \begin_inset Quotes eld
23743 \end_inset
23744
23745 Converter
23746 \begin_inset Quotes erd
23747 \end_inset
23748
23749  setting, should be set to
23750 \begin_inset Newline newline
23751 \end_inset
23752
23753
23754 \begin_inset Quotes eld
23755 \end_inset
23756
23757
23758 \family typewriter
23759 build-script $$i
23760 \family default
23761  $$r
23762 \begin_inset Quotes erd
23763 \end_inset
23764
23765 .
23766 \begin_inset Newline newline
23767 \end_inset
23768
23769 This basically means that \SpecialChar LyX
23770  will call 
23771 \begin_inset Quotes eld
23772 \end_inset
23773
23774 build-script
23775 \begin_inset Quotes erd
23776 \end_inset
23777
23778  (a program or script) with the name of the Noweb file (normally a file
23779  in the \SpecialChar LyX
23780  temp directory) and the directory path of the original \SpecialChar LyX
23781  file.
23782  
23783 \end_layout
23784
23785 \begin_layout Standard
23786 This is an implementation of 
23787 \begin_inset Quotes eld
23788 \end_inset
23789
23790 build-script
23791 \begin_inset Quotes erd
23792 \end_inset
23793
23794  that you can place in a directory on your path:
23795 \end_layout
23796
23797 \begin_layout Standard
23798 \begin_inset VSpace defskip
23799 \end_inset
23800
23801
23802 \end_layout
23803
23804 \begin_layout Standard
23805 \begin_inset Newpage pagebreak
23806 \end_inset
23807
23808
23809 \end_layout
23810
23811 \begin_layout Standard
23812
23813 \family sans
23814 #!/bin/sh
23815 \end_layout
23816
23817 \begin_layout Standard
23818
23819 \family sans
23820 #
23821 \end_layout
23822
23823 \begin_layout Standard
23824
23825 \family sans
23826 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
23827 \end_layout
23828
23829 \begin_layout Standard
23830 \begin_inset VSpace defskip
23831 \end_inset
23832
23833
23834 \end_layout
23835
23836 \begin_layout Standard
23837 The next part of the converter setting is the 
23838 \begin_inset Quotes eld
23839 \end_inset
23840
23841 Flags
23842 \begin_inset Quotes erd
23843 \end_inset
23844
23845  which is to be set to
23846 \begin_inset Newline newline
23847 \end_inset
23848
23849
23850 \begin_inset Quotes eld
23851 \end_inset
23852
23853
23854 \family typewriter
23855 parselog=$$s/scripts/listerrors
23856 \family default
23857
23858 \begin_inset Quotes erd
23859 \end_inset
23860
23861 .
23862 \begin_inset Newline newline
23863 \end_inset
23864
23865 This will run any errors that are generated by the 
23866 \begin_inset Quotes eld
23867 \end_inset
23868
23869 build-script
23870 \begin_inset Quotes erd
23871 \end_inset
23872
23873  process through the 
23874 \begin_inset Quotes eld
23875 \end_inset
23876
23877 listerrors
23878 \begin_inset Quotes erd
23879 \end_inset
23880
23881  program.
23882 \end_layout
23883
23884 \begin_layout Standard
23885 The build will normally take place in \SpecialChar LyX
23886 's temporary directory, so the files
23887  produced by the conversion will be in that directory.
23888  \SpecialChar LyX
23889  will copy out what it regards as the `main' file, but the 
23890 \family typewriter
23891 Noweb->Program
23892 \family default
23893  conversion may produce several files, and so most of these would then be
23894  deleted when \SpecialChar LyX
23895  was closed.
23896  This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
23897  the build-script chunk can place the generated files in that location.
23898 \end_layout
23899
23900 \begin_layout Paragraph
23901 Build instructions in the document
23902 \end_layout
23903
23904 \begin_layout Standard
23905 The last piece of the integration between \SpecialChar LyX
23906  and noweb is the 
23907 \begin_inset Quotes eld
23908 \end_inset
23909
23910 build-script
23911 \begin_inset Quotes erd
23912 \end_inset
23913
23914  chunk.
23915  Generally, the instructions for building your program should be embedded
23916  in a chunk of its own.
23917  The noweb-specific 
23918 \begin_inset Quotes eld
23919 \end_inset
23920
23921 build-script
23922 \begin_inset Quotes erd
23923 \end_inset
23924
23925  above uses the notangle command to look for this chunk (called 
23926 \begin_inset Quotes eld
23927 \end_inset
23928
23929 build-script
23930 \begin_inset Quotes erd
23931 \end_inset
23932
23933 ) and runs its contents through 
23934 \begin_inset Quotes eld
23935 \end_inset
23936
23937 sh
23938 \begin_inset Quotes erd
23939 \end_inset
23940
23941 .
23942 \end_layout
23943
23944 \begin_layout Standard
23945 Typically, such a chunk would look something like this:
23946 \end_layout
23947
23948 \begin_layout LyX-Code
23949 <<build-script>>=
23950 \end_layout
23951
23952 \begin_layout LyX-Code
23953 #!/bin/sh
23954 \begin_inset Newline newline
23955 \end_inset
23956
23957 if [ -z "${NOWEB_SOURCE}" ]
23958 \begin_inset Newline newline
23959 \end_inset
23960
23961 then
23962 \end_layout
23963
23964 \begin_layout LyX-Code
23965 NOWEB_SOURCE=myfile.nw
23966 \begin_inset Newline newline
23967 \end_inset
23968
23969 fi
23970 \begin_inset Newline newline
23971 \end_inset
23972
23973 [...
23974  code to extract files ...
23975  use NOWEB_OUTPUT_DIR here ...]
23976 \begin_inset Newline newline
23977 \end_inset
23978
23979 [...
23980  code to compile files ...]
23981 \begin_inset Newline newline
23982 \end_inset
23983
23984 @
23985 \end_layout
23986
23987 \begin_layout Standard
23988 Look in 
23989 \emph on
23990 LIBDIR/examples/listerrors.lyx
23991 \emph default
23992  or in 
23993 \emph on
23994 LIBDIR/examples/Literate.lyx
23995 \emph default
23996  which implement two versions of the 
23997 \begin_inset Quotes eld
23998 \end_inset
23999
24000 listerrors
24001 \begin_inset Quotes erd
24002 \end_inset
24003
24004  program for some illustrations of how all of these pieces go together or
24005  in 
24006 \emph on
24007 LIBDIR/examples/noweb2lyx.lyx.
24008
24009 \emph default
24010  Interestingly, these three files show off the language-indepence of the
24011  \SpecialChar LyX
24012  literate programming support since they are written in Python, C and Perl
24013  respectively.
24014 \end_layout
24015
24016 \begin_layout Subsubsection
24017 Configuring \SpecialChar LyX
24018
24019 \end_layout
24020
24021 \begin_layout Standard
24022 All the Literate Programming support is configured by the 
24023 \family sans
24024 Tools\SpecialChar menuseparator
24025 Preferences
24026 \family default
24027  panel in the 
24028 \begin_inset Quotes eld
24029 \end_inset
24030
24031 File Handling
24032 \begin_inset Quotes erd
24033 \end_inset
24034
24035  tab.
24036  The important parts are:
24037 \end_layout
24038
24039 \begin_layout Description
24040 the
24041 \begin_inset space ~
24042 \end_inset
24043
24044
24045 \begin_inset Quotes eld
24046 \end_inset
24047
24048 NoWeb
24049 \begin_inset Quotes erd
24050 \end_inset
24051
24052
24053 \begin_inset space ~
24054 \end_inset
24055
24056 format Set up via the File Formats tab, this is where the Noweb-specific
24057  pieces are set up.
24058  The 
24059 \family sans
24060 GUI Name
24061 \family default
24062  is set to 
24063 \family typewriter
24064 NoWeb
24065 \family default
24066 , the file extension is set to 
24067 \family typewriter
24068 .nw
24069 \family default
24070 .
24071  This tells \SpecialChar LyX
24072  to create a file with a 
24073 \family typewriter
24074 .nw
24075 \family default
24076  extension in the first step of the conversion process.
24077 \end_layout
24078
24079 \begin_layout Description
24080 the
24081 \begin_inset space ~
24082 \end_inset
24083
24084
24085 \family sans
24086 Program
24087 \family default
24088
24089 \begin_inset space ~
24090 \end_inset
24091
24092 format This is an empty format whose sole purpose is to be the endpoint
24093  of a conversion (which then allows us to set up a converter for it).
24094 \end_layout
24095
24096 \begin_layout Description
24097
24098 \family sans
24099 NoWeb
24100 \family default
24101 ->
24102 \family sans
24103 \SpecialChar LaTeX
24104
24105 \family default
24106  This converter performs the 
24107 \begin_inset Quotes eld
24108 \end_inset
24109
24110 weaving
24111 \begin_inset Quotes erd
24112 \end_inset
24113
24114  of the literate document.
24115  For Noweb, it is set to 
24116 \begin_inset Quotes eld
24117 \end_inset
24118
24119
24120 \family typewriter
24121 noweave -delay -index $$i > $$o
24122 \family default
24123
24124 \begin_inset Quotes erd
24125 \end_inset
24126
24127
24128 \end_layout
24129
24130 \begin_layout Description
24131
24132 \family sans
24133 NoWeb
24134 \family default
24135 ->
24136 \family sans
24137 Program
24138 \family default
24139  This performs the 
24140 \begin_inset Quotes eld
24141 \end_inset
24142
24143 tangling step
24144 \begin_inset Quotes erd
24145 \end_inset
24146
24147 .
24148  As stated above, the Converter is set to 
24149 \begin_inset Quotes eld
24150 \end_inset
24151
24152
24153 \family typewriter
24154 build-script $$i
24155 \family default
24156  $$r
24157 \begin_inset Quotes erd
24158 \end_inset
24159
24160 , with Flags set to
24161 \begin_inset Newline newline
24162 \end_inset
24163
24164
24165 \begin_inset Quotes eld
24166 \end_inset
24167
24168
24169 \family typewriter
24170 parselog=$$s/scripts/listerrors
24171 \family default
24172
24173 \begin_inset Quotes erd
24174 \end_inset
24175
24176 .
24177 \end_layout
24178
24179 \begin_layout Subsubsection
24180 Debug extensions
24181 \end_layout
24182
24183 \begin_layout Standard
24184 There is also a new function implemented in the \SpecialChar LyX
24185  server, the 
24186 \begin_inset Quotes eld
24187 \end_inset
24188
24189 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
24190  
24191 \end_layout
24192
24193 \begin_layout Standard
24194 When debugging code with ddd/gdb, it is possible to invoke a text editor
24195  at the current execution position with a single key stroke.
24196  The default ddd configuration for that is shift-ctrl-V.
24197  It happens that you can define the editor command line invocation in ddd
24198  by accessing the 
24199 \family sans
24200 Edit\SpecialChar menuseparator
24201 Preferences\SpecialChar menuseparator
24202 Helpers
24203 \family default
24204  dialog and changing the "Edit Sources" entry.
24205 \end_layout
24206
24207 \begin_layout Standard
24208 I take advantage of the newly created \SpecialChar LyX
24209  server function and this ddd feature,
24210  and set 
24211 \begin_inset Quotes eld
24212 \end_inset
24213
24214 Edit Sources
24215 \begin_inset Quotes erd
24216 \end_inset
24217
24218  to:
24219 \end_layout
24220
24221 \begin_layout Standard
24222 \begin_inset VSpace defskip
24223 \end_inset
24224
24225
24226 \end_layout
24227
24228 \begin_layout Standard
24229
24230 \family sans
24231 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
24232 \end_layout
24233
24234 \begin_layout Standard
24235 \begin_inset VSpace defskip
24236 \end_inset
24237
24238
24239 \end_layout
24240
24241 \begin_layout Standard
24242 With this, whenever you are using ddd and find a point in the program that
24243  you want to edit, you just press shift-ctrl-V (in the ddd window), and
24244  ddd will forward this information to \SpecialChar LyX
24245  through the \SpecialChar LyX
24246  server and then the
24247  \SpecialChar LyX
24248  window will show the same file with the cursor at the same position ddd
24249  was pointing to.
24250  No more guessing or long scrolling to locate a point in the program back
24251  from debugging !
24252 \end_layout
24253
24254 \begin_layout Standard
24255 Note however that you must enable the \SpecialChar LyX
24256  server to get this feature working
24257  (it is disabled by default).
24258  You can enable it in 
24259 \family sans
24260 Preferences
24261 \family default
24262  (tabs 
24263 \family sans
24264 Inputs
24265 \family default
24266
24267 \family sans
24268 Paths
24269 \family default
24270 ) by entering in the 
24271 \family sans
24272 \SpecialChar LyX
24273 server pipe
24274 \family default
24275  a path like 
24276 \begin_inset Quotes eld
24277 \end_inset
24278
24279
24280 \family typewriter
24281 /home/<your-home-directory>/.lyx/lyxpipe
24282 \family default
24283
24284 \begin_inset Quotes erd
24285 \end_inset
24286
24287
24288 \end_layout
24289
24290 \begin_layout Standard
24291 Read the \SpecialChar LyX
24292  server documentation in the 
24293 \emph on
24294 Customization Manual
24295 \emph default
24296  for further information.
24297 \end_layout
24298
24299 \begin_layout Subsubsection
24300 Toolbar extensions
24301 \end_layout
24302
24303 \begin_layout Standard
24304 There are six new buttons that can be added to your \SpecialChar LyX
24305  toolbar.
24306  Five of these buttons are short cuts to layout styles: 
24307 \family sans
24308 Standard
24309 \family default
24310
24311 \family sans
24312 Section
24313 \family default
24314
24315 \family sans
24316 \SpecialChar LaTeX
24317
24318 \family default
24319
24320 \family sans
24321 \SpecialChar LyX
24322 -Code
24323 \family default
24324 , and 
24325 \family sans
24326 Chunk
24327 \family default
24328 .
24329  The last one is a short cut to the 
24330 \begin_inset Quotes eld
24331 \end_inset
24332
24333 Build Program
24334 \begin_inset Quotes erd
24335 \end_inset
24336
24337  File menu entry.
24338  
24339 \end_layout
24340
24341 \begin_layout Standard
24342 \SpecialChar LyX
24343  has a range of buttons that are available for tool bar customization.
24344  In my toolbar I like to combine the six short cuts above with two more:
24345  One for 
24346 \family sans
24347 Document
24348 \family default
24349 \SpecialChar menuseparator
24350
24351 \family sans
24352 Update
24353 \family default
24354 \SpecialChar menuseparator
24355
24356 \family sans
24357 DVI
24358 \family default
24359  and the other for 
24360 \family sans
24361 Document\SpecialChar menuseparator
24362 View\SpecialChar menuseparator
24363 DVI
24364 \family default
24365  File menu entries.
24366  Here is how it looks like:
24367 \end_layout
24368
24369 \begin_layout LyX-Code
24370 Toolbar
24371 \end_layout
24372
24373 \begin_layout LyX-Code
24374   Layouts
24375 \end_layout
24376
24377 \begin_layout LyX-Code
24378   Icon "layout Standard"
24379 \end_layout
24380
24381 \begin_layout LyX-Code
24382   Icon "layout Section"
24383 \end_layout
24384
24385 \begin_layout LyX-Code
24386   Icon "layout \SpecialChar LaTeX
24387 "
24388 \end_layout
24389
24390 \begin_layout LyX-Code
24391   Icon "layout \SpecialChar LyX
24392 -Code"
24393 \end_layout
24394
24395 \begin_layout LyX-Code
24396   Icon "layout Chunk"
24397 \end_layout
24398
24399 \begin_layout LyX-Code
24400   Separator
24401 \end_layout
24402
24403 \begin_layout LyX-Code
24404   Icon "buffer-view"
24405 \end_layout
24406
24407 \begin_layout LyX-Code
24408   Icon "buffer-typeset"
24409 \end_layout
24410
24411 \begin_layout LyX-Code
24412   Icon "build-program"
24413 \end_layout
24414
24415 \begin_layout LyX-Code
24416   Separator
24417 \end_layout
24418
24419 \begin_layout LyX-Code
24420 .
24421 \end_layout
24422
24423 \begin_layout LyX-Code
24424 .
24425 \end_layout
24426
24427 \begin_layout LyX-Code
24428 .
24429 \end_layout
24430
24431 \begin_layout LyX-Code
24432 End
24433 \end_layout
24434
24435 \begin_layout Subsubsection
24436 Colors customization
24437 \end_layout
24438
24439 \begin_layout Standard
24440 There are a number of colors in \SpecialChar LyX
24441  that can be customized in 
24442 \family sans
24443 Preferences
24444 \family default
24445 .
24446  One of the things that bothers people is the \SpecialChar LaTeX
24447  font color.
24448  The default color is red, since the chunks uses \SpecialChar LaTeX
24449  font, and there is a lot
24450  of chunks in literate documents, you may get tired of seeing everything
24451  in red.
24452  You can change it by going to the tabs 
24453 \family sans
24454 Look&Feel
24455 \family default
24456
24457 \family sans
24458 Colors.
24459 \end_layout
24460
24461 \begin_layout Standard
24462 The next thing is the visible presence of the newline character in the screen.
24463  You can choose the color of this particular character and make it blend
24464  in the background.
24465  I recommend you choosing a color that is close to the background but not
24466  equal, that way you still can see it is there, but it is not bothering
24467  you anymore.
24468 \end_layout
24469
24470 \begin_layout Subsection
24471 \SpecialChar LyX
24472  and knitr/Sweave
24473 \end_layout
24474
24475 \begin_layout Standard
24476 Support for 
24477 \family sans
24478 knitr
24479 \family default
24480  and 
24481 \family sans
24482 Sweave
24483 \family default
24484  is documented in the 
24485 \emph on
24486 knitr.lyx
24487 \emph default
24488  example file and in the Sweave manual (menu 
24489 \family sans
24490 Help\SpecialChar menuseparator
24491 Specific Manuals
24492 \family default
24493 ).
24494 \end_layout
24495
24496 \begin_layout Chapter
24497 Special features
24498 \end_layout
24499
24500 \begin_layout Standard
24501 You can do everything with \SpecialChar LyX
24502  that you can do with \SpecialChar LaTeX
24503 .
24504  However, \SpecialChar LyX
24505  cannot support every \SpecialChar LaTeX
24506  feature directly.
24507  But you can always use \SpecialChar TeX
24508  Code.
24509  This chapter shows you some more special things you might want to use.
24510  For other special things you can do with figures, tables, floats, boxes
24511  and notes, have a look at the 
24512 \emph on
24513 Embedded
24514 \begin_inset space ~
24515 \end_inset
24516
24517 Objects
24518 \emph default
24519  manual.
24520 \end_layout
24521
24522 \begin_layout Section
24523 Multiple Text Columns
24524 \end_layout
24525
24526 \begin_layout Standard
24527 This feature is independent of the option 
24528 \family sans
24529 Two-column document
24530 \family default
24531  in the document settings under 
24532 \family sans
24533 Text Layout
24534 \family default
24535 .
24536  If you want to have 2
24537 \begin_inset space ~
24538 \end_inset
24539
24540 columns for the whole document, it is recommended to use the 
24541 \family sans
24542 Two-column document
24543 \family default
24544  option.
24545  For all other cases use this feature.
24546 \end_layout
24547
24548 \begin_layout Standard
24549 To use multiple text columns in your document, you have to load the module
24550  
24551 \family sans
24552 Multiple Columns
24553 \family default
24554  (menu 
24555 \family sans
24556 Document\SpecialChar menuseparator
24557 Settings\SpecialChar menuseparator
24558 Modules
24559 \family default
24560 ) and must have the \SpecialChar LaTeX
24561 -package 
24562 \series bold
24563 multicol
24564 \series default
24565  installed.
24566 \end_layout
24567
24568 \begin_layout Standard
24569 Footnotes within multiple columns will be placed at the bottom of the page
24570  and not under each column.
24571  Within the different columns you can use everything, with the limitation
24572  that for floats you need to use the float option 
24573 \family sans
24574 Span columns
24575 \family default
24576 .
24577 \end_layout
24578
24579 \begin_layout Subsection
24580 Basics
24581 \end_layout
24582
24583 \begin_layout Standard
24584 If you want to have 2
24585 \begin_inset space ~
24586 \end_inset
24587
24588 columns in your text, insert a multicolumn inset via the menu 
24589 \family sans
24590 Insert\SpecialChar menuseparator
24591 Custom
24592 \begin_inset space ~
24593 \end_inset
24594
24595 Insets\SpecialChar menuseparator
24596 Multiple
24597 \begin_inset space ~
24598 \end_inset
24599
24600 Columns
24601 \family default
24602  where the columns should start.
24603  Write all text that should be printed in 2
24604 \begin_inset space ~
24605 \end_inset
24606
24607 columns into this inset.
24608 \end_layout
24609
24610 \begin_layout Standard
24611 Here is an example:
24612 \end_layout
24613
24614 \begin_layout Standard
24615 \noindent
24616 \begin_inset Flex Multiple Columns
24617 status open
24618
24619 \begin_layout Plain Layout
24620 \noindent
24621
24622 \series bold
24623 \size small
24624 The Adventure of the Empty House
24625 \series default
24626
24627 \begin_inset Newline newline
24628 \end_inset
24629
24630 by Sir Arthur Conan Doyle
24631 \end_layout
24632
24633 \begin_layout Plain Layout
24634
24635 \size small
24636 It was in the spring of the year 1894 that all London was interested, and
24637  the fashionable world dismayed, by the murder of the Honourable Ronald
24638  Adair under most unusual and inexplicable circumstances.
24639  The public has already learned those particulars of the crime which came
24640  out in the police investigation, but a good deal was suppressed upon that
24641  occasion, since the case for the prosecution was so overwhelmingly strong
24642  that it was not necessary to bring forward all the facts.
24643  Only now, at the end of nearly ten years, am I allowed to supply those
24644  missing links which make up the whole of that remarkable chain.
24645  The crime was of interest in itself, but that interest was as nothing to
24646  me compared to the inconceivable sequel, which afforded me the greatest
24647  shock and surprise of any event in my adventurous life.
24648  Even now, after this long interval, I find myself thrilling as I think
24649  of it, and feeling once more that sudden flood of joy, amazement, and increduli
24650 ty which utterly submerged my mind.
24651  Let me say to that public, which has shown some interest in those glimpses
24652  which I have occasionally given them of the thoughts and actions of a very
24653  remarkable man, that they are not to blame me if I have not shared my knowledge
24654  with them, for I should have considered it my first duty to do so, had
24655  I not been barred by a positive prohibition from his own lips, which was
24656  only withdrawn upon the third of last month.
24657 \end_layout
24658
24659 \end_inset
24660
24661
24662 \end_layout
24663
24664 \begin_layout Standard
24665 To get 3 or more columns, set the cursor into the multicolumn inset and
24666  use the menu 
24667 \family sans
24668 Insert\SpecialChar menuseparator
24669 Number
24670 \begin_inset space ~
24671 \end_inset
24672
24673 of
24674 \begin_inset space ~
24675 \end_inset
24676
24677 Columns
24678 \family default
24679 .
24680  The number of the desired columns is written into that inset (for 3
24681 \begin_inset space ~
24682 \end_inset
24683
24684 columns write 
24685 \begin_inset Quotes eld
24686 \end_inset
24687
24688 3
24689 \begin_inset Quotes erd
24690 \end_inset
24691
24692 ).
24693 \begin_inset Newline newline
24694 \end_inset
24695
24696 Here is an example with 3
24697 \begin_inset space ~
24698 \end_inset
24699
24700 columns:
24701 \end_layout
24702
24703 \begin_layout Standard
24704 \begin_inset Flex Multiple Columns
24705 status open
24706
24707 \begin_layout Plain Layout
24708
24709 \size footnotesize
24710 \begin_inset Argument 1
24711 status open
24712
24713 \begin_layout Plain Layout
24714 3
24715 \end_layout
24716
24717 \end_inset
24718
24719 It can be imagined that my close intimacy with Sherlock Holmes had interested
24720  me deeply in crime, and that after his disappearance I never failed to
24721  read with care the various problems which came before the public.
24722  And I even attempted, more than once, for my own private satisfaction,
24723  to employ his methods in their solution, though with indifferent success.
24724  There was none, however, which appealed to me like this tragedy of Ronald
24725  Adair.
24726  As I read the evidence at the inquest, which led up to a verdict of willful
24727  murder against some person or persons unknown, I realized more clearly
24728  than I had ever done the loss which the community had sustained by the
24729  death of Sherlock Holmes.
24730  There were points about this strange business which would, I was sure,
24731  have specially appealed to him, and the efforts of the police would have
24732  been supplemented, or more probably anticipated, by the trained observation
24733  and the alert mind of the first criminal agent in Europe.
24734  All day, as I drove upon my round, I turned over the case in my mind and
24735  found no explanation which appeared to me to be adequate.
24736  At the risk of telling a twice-told tale, I will recapitulate the facts
24737  as they were known to the public at the conclusion of the inquest.
24738 \end_layout
24739
24740 \end_inset
24741
24742
24743 \end_layout
24744
24745 \begin_layout Standard
24746 You can have up to 10
24747 \begin_inset space ~
24748 \end_inset
24749
24750 columns if you want to, but that might not be very pleasant for the readers
24751  of your document.
24752 \end_layout
24753
24754 \begin_layout Standard
24755 \begin_inset Newpage newpage
24756 \end_inset
24757
24758
24759 \end_layout
24760
24761 \begin_layout Subsection
24762 Columns inside Columns
24763 \end_layout
24764
24765 \begin_layout Standard
24766 You can also have columns inside columns:
24767 \end_layout
24768
24769 \begin_layout Standard
24770 \begin_inset Flex Multiple Columns
24771 status open
24772
24773 \begin_layout Plain Layout
24774
24775 \size footnotesize
24776 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
24777  at that time governor of one of the Australian colonies.
24778  Adair's mother had returned from Australia to undergo the operation for
24779  cataract, and she, her son Ronald, and her daughter Hilda were living together
24780  at 427 Park Lane.
24781 \end_layout
24782
24783 \begin_layout Plain Layout
24784 \begin_inset Flex Multiple Columns
24785 status open
24786
24787 \begin_layout Plain Layout
24788
24789 \size footnotesize
24790 The youth moved in the best society–had, so far as was known, no enemies
24791  and no particular vices.
24792  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
24793  had been broken off by mutual consent some months before, and there was
24794  no sign that it had left any very profound feeling behind it.
24795  For the rest {sic} the man's life moved in a narrow and conventional circle,
24796  for his habits were quiet and his nature unemotional.
24797  Yet it was upon this easy-going young aristocrat that death came, in most
24798  strange and unexpected form, between the hours of ten and eleven-twenty
24799  on the night of March 30, 1894.
24800 \end_layout
24801
24802 \end_inset
24803
24804
24805 \end_layout
24806
24807 \begin_layout Plain Layout
24808
24809 \size footnotesize
24810 Ronald Adair was fond of cards–playing continually, but never for such stakes
24811  as would hurt him.
24812  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
24813  It was shown that, after dinner on the day of his death, he had played
24814  a rubber of whist at the latter club.
24815  He had also played there in the afternoon.
24816
24817 \size default
24818  
24819 \size footnotesize
24820 The evidence of those who had played with him– Mr.
24821  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
24822  and that there was a fairly equal fall of the cards.
24823  Adair might have lost five pounds, but not more.
24824  His fortune was a considerable one, and such a loss could not in any way
24825  affect him.
24826  He had played nearly every day at one club or other, but he was a cautious
24827  player, and usually rose a winner.
24828  It came out in evidence that, in partnership with Colonel Moran, he had
24829  actually won as much as four hundred and twenty pounds in a sitting, some
24830  weeks before, from Godfrey Milner and Lord Balmoral.
24831  So much for his recent history as it came out at the inquest.
24832 \end_layout
24833
24834 \end_inset
24835
24836
24837 \end_layout
24838
24839 \begin_layout Subsection
24840 Advanced Examples
24841 \end_layout
24842
24843 \begin_layout Standard
24844 The examples in this section show some more special features of multiple
24845  columns.
24846 \end_layout
24847
24848 \begin_layout Standard
24849 For more features of multiple columns, have a look at the documentation
24850  of the \SpecialChar LaTeX
24851 -package 
24852 \series bold
24853 multicol
24854 \series default
24855
24856 \begin_inset CommandInset citation
24857 LatexCommand cite
24858 key "multicol"
24859 literal "true"
24860
24861 \end_inset
24862
24863 .
24864 \end_layout
24865
24866 \begin_layout Subsubsection
24867 Preface
24868 \end_layout
24869
24870 \begin_layout Standard
24871 To add a preface text for multiple columns, set the cursor into the multicolumn
24872  inset and use the menu 
24873 \family sans
24874 Insert\SpecialChar menuseparator
24875 Preface
24876 \family default
24877 .
24878  Write your preface text into that inset.
24879 \begin_inset Newline newline
24880 \end_inset
24881
24882 This is an example with some preface text:
24883 \end_layout
24884
24885 \begin_layout Standard
24886 \begin_inset VSpace bigskip
24887 \end_inset
24888
24889
24890 \end_layout
24891
24892 \begin_layout Standard
24893 \begin_inset Flex Multiple Columns
24894 status open
24895
24896 \begin_layout Plain Layout
24897 \begin_inset Argument 2
24898 status open
24899
24900 \begin_layout Plain Layout
24901 And the story continues and continues and continues and continues\SpecialChar ldots
24902
24903 \end_layout
24904
24905 \end_inset
24906
24907
24908 \size small
24909 On the evening of the crime, he returned from the club exactly at ten.
24910  His mother and sister were out spending the evening with a relation.
24911  The servant deposed that she heard him enter the front room on the second
24912  floor, generally used as his sitting-room.
24913  She had lit a fire there, and as it smoked she had opened the window.
24914  No sound was heard from the room until eleven-twenty, the hour of the return
24915  of Lady Maynooth and her daughter.
24916  Desiring to say good-night, she attempted to enter her son's room.
24917  The door was locked on the inside, and no answer could be got to their
24918  cries and knocking.
24919  Help was obtained, and the door forced.
24920  The unfortunate young man was found lying near the table.
24921  His head had been horribly mutilated by an expanding revolver bullet, but
24922  no weapon of any sort was to be found in the room.
24923 \end_layout
24924
24925 \end_inset
24926
24927
24928 \end_layout
24929
24930 \begin_layout Standard
24931 You can also use a section heading as the preface if you use a section command
24932  as \SpecialChar TeX
24933  Code.
24934  For example the command
24935 \end_layout
24936
24937 \begin_layout Standard
24938
24939 \series bold
24940
24941 \backslash
24942 subsection{subsection title}
24943 \end_layout
24944
24945 \begin_layout Standard
24946 creates a subsection.
24947  In this example the preface is a subsubsection:
24948 \end_layout
24949
24950 \begin_layout Standard
24951 \begin_inset Flex Multiple Columns
24952 status open
24953
24954 \begin_layout Plain Layout
24955 \begin_inset Argument 2
24956 status open
24957
24958 \begin_layout Plain Layout
24959 \begin_inset ERT
24960 status collapsed
24961
24962 \begin_layout Plain Layout
24963
24964
24965 \backslash
24966 subsubsection{
24967 \end_layout
24968
24969 \end_inset
24970
24971 This is a subsubsection heading as a preface
24972 \begin_inset ERT
24973 status collapsed
24974
24975 \begin_layout Plain Layout
24976
24977 }
24978 \end_layout
24979
24980 \end_inset
24981
24982
24983 \end_layout
24984
24985 \end_inset
24986
24987
24988 \size small
24989 A minute examination of the circumstances served only to make the case more
24990  complex.
24991  In the first place, no reason could be given why the young man should have
24992  fastened the door upon the inside.
24993  There was the possibility that the murderer had done this, and had afterwards
24994  escaped by the window.
24995  The drop was at least twenty feet, however, and a bed of crocuses in full
24996  bloom lay beneath.
24997  Neither the flowers nor the earth showed any sign of having been disturbed,
24998  nor were there any marks upon the narrow strip of grass which separated
24999  the house from the road.
25000  Apparently, therefore, it was the young man himself who had fastened the
25001  door.
25002  But how did he come by his death? No one could have climbed up to the window
25003  without leaving traces.
25004  Suppose a man had fired through the window, he would indeed be a remarkable
25005  shot who could with a revolver inflict so deadly a wound.
25006  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
25007  a hundred yards of the house.
25008  No one had heard a shot.
25009 \end_layout
25010
25011 \end_inset
25012
25013
25014 \end_layout
25015
25016 \begin_layout Standard
25017 If there is less vertical space than 6
25018 \begin_inset space ~
25019 \end_inset
25020
25021 text lines is left on the page at the beginning of the multiple columns,
25022  a page break will be inserted before the multiple columns.
25023  Depending on the number of lines of the preface text, you might want to
25024  change this space.
25025  This is done by setting the cursor into the mulitcolumn inset behind the
25026  preface (if there is any) and using the menu 
25027 \family sans
25028 Insert\SpecialChar menuseparator
25029 Space
25030 \begin_inset space ~
25031 \end_inset
25032
25033 Before
25034 \begin_inset space ~
25035 \end_inset
25036
25037 Page
25038 \begin_inset space ~
25039 \end_inset
25040
25041 Break
25042 \family default
25043 .
25044  Insert into that inset the amount of space like e.
25045 \begin_inset space \thinspace{}
25046 \end_inset
25047
25048 g.
25049 \begin_inset space \space{}
25050 \end_inset
25051
25052
25053 \begin_inset Quotes eld
25054 \end_inset
25055
25056 5cm
25057 \begin_inset Quotes erd
25058 \end_inset
25059
25060 .
25061 \begin_inset Newline newline
25062 \end_inset
25063
25064 In this example the space is set to 7
25065 \begin_inset space ~
25066 \end_inset
25067
25068 text lines by using 
25069 \begin_inset Quotes eld
25070 \end_inset
25071
25072 7
25073 \backslash
25074 baselineskip
25075 \begin_inset Quotes erd
25076 \end_inset
25077
25078  (where the command 
25079 \series bold
25080
25081 \backslash
25082 baselineskip
25083 \series default
25084  needs to be inserted as \SpecialChar TeX
25085  code):
25086 \end_layout
25087
25088 \begin_layout Standard
25089 \begin_inset Flex Multiple Columns
25090 status open
25091
25092 \begin_layout Plain Layout
25093 \begin_inset Argument 3
25094 status open
25095
25096 \begin_layout Plain Layout
25097 7
25098 \begin_inset ERT
25099 status collapsed
25100
25101 \begin_layout Plain Layout
25102
25103
25104 \backslash
25105 baselineskip
25106 \end_layout
25107
25108 \end_inset
25109
25110
25111 \end_layout
25112
25113 \end_inset
25114
25115
25116 \size small
25117 On the evening of the crime, he returned from the club exactly at ten.
25118  His mother and sister were out spending the evening with a relation.
25119  The servant deposed that she heard him enter the front room on the second
25120  floor, generally used as his sitting-room.
25121  She had lit a fire there, and as it smoked she had opened the window.
25122  No sound was heard from the room until eleven-twenty, the hour of the return
25123  of Lady Maynooth and her daughter.
25124  Desiring to say good-night, she attempted to enter her son's room.
25125  The door was locked on the inside, and no answer could be got to their
25126  cries and knocking.
25127  Help was obtained, and the door forced.
25128  The unfortunate young man was found lying near the table.
25129  His head had been horribly mutilated by an expanding revolver bullet, but
25130  no weapon of any sort was to be found in the room.
25131 \end_layout
25132
25133 \end_inset
25134
25135
25136 \end_layout
25137
25138 \begin_layout Subsubsection
25139 Surrounding Space
25140 \end_layout
25141
25142 \begin_layout Standard
25143 The amount of space before and after multiple columns can be changed by
25144  changing the length 
25145 \series bold
25146
25147 \backslash
25148 multicolsep
25149 \series default
25150 .
25151  For example the command
25152 \end_layout
25153
25154 \begin_layout Standard
25155
25156 \series bold
25157
25158 \backslash
25159 setlength{
25160 \backslash
25161 multicolsep}{3cm}
25162 \end_layout
25163
25164 \begin_layout Standard
25165 in \SpecialChar TeX
25166  Code changes its value to 3
25167 \begin_inset space \thinspace{}
25168 \end_inset
25169
25170 cm.
25171  The change must be made before the multiple columns' start.
25172  The predefined value is 13
25173 \begin_inset space \thinspace{}
25174 \end_inset
25175
25176 pt.
25177 \end_layout
25178
25179 \begin_layout Standard
25180 For this example 
25181 \series bold
25182
25183 \backslash
25184 multicolsep
25185 \series default
25186  was set to 2.5
25187 \begin_inset space \thinspace{}
25188 \end_inset
25189
25190 cm:
25191 \end_layout
25192
25193 \begin_layout Standard
25194 \begin_inset ERT
25195 status open
25196
25197 \begin_layout Plain Layout
25198
25199
25200 \backslash
25201 setlength{
25202 \backslash
25203 multicolsep}{2.5cm}
25204 \end_layout
25205
25206 \end_inset
25207
25208
25209 \end_layout
25210
25211 \begin_layout Standard
25212 \begin_inset Flex Multiple Columns
25213 status open
25214
25215 \begin_layout Plain Layout
25216
25217 \size small
25218 All day I turned these facts over in my mind, endeavouring to hit upon some
25219  theory which could reconcile them all, and to find that line of least resistanc
25220 e which my poor friend had declared to be the starting-point of every investigat
25221 ion.
25222  I confess that I made little progress.
25223  In the evening I strolled across the Park, and found myself about six o'clock
25224  at the Oxford Street end of Park Lane.
25225  A group of loafers upon the pavements, all staring up at a particular window,
25226  directed me to the house which I had come to see.
25227  A tall, thin man with coloured glasses, whom I strongly suspected of being
25228  a plain-clothes detective, was pointing out some theory of his own, while
25229  the others crowded round to listen to what he said.
25230  I got as near him as I could, but his observations seemed to me to be absurd,
25231  so I withdrew again in some disgust.
25232  As I did so I struck against an elderly, deformed man, who had been behind
25233  me, and I knocked down several books which he was carrying.
25234 \end_layout
25235
25236 \end_inset
25237
25238
25239 \end_layout
25240
25241 \begin_layout Standard
25242 \begin_inset Note Greyedout
25243 status open
25244
25245 \begin_layout Plain Layout
25246
25247 \series bold
25248 Note:
25249 \series default
25250  The values you set with 
25251 \series bold
25252
25253 \backslash
25254 setlength
25255 \series default
25256  will be used for all following multiple columns until you change them again.
25257 \end_layout
25258
25259 \end_inset
25260
25261
25262 \end_layout
25263
25264 \begin_layout Standard
25265 \begin_inset ERT
25266 status collapsed
25267
25268 \begin_layout Plain Layout
25269
25270
25271 \backslash
25272 setlength{
25273 \backslash
25274 multicolsep}{13pt}
25275 \end_layout
25276
25277 \end_inset
25278
25279
25280 \begin_inset Note Note
25281 status collapsed
25282
25283 \begin_layout Plain Layout
25284 go back to the default
25285 \end_layout
25286
25287 \end_inset
25288
25289
25290 \end_layout
25291
25292 \begin_layout Standard
25293 \begin_inset Newpage newpage
25294 \end_inset
25295
25296
25297 \end_layout
25298
25299 \begin_layout Subsubsection
25300 Column Breaks
25301 \end_layout
25302
25303 \begin_layout Standard
25304 A column break can be forced by inserting the command 
25305 \series bold
25306
25307 \backslash
25308 columnbreak{}
25309 \series default
25310  as \SpecialChar TeX
25311  Code to that position in the text where the column should be broken.
25312  Note that this leads in most cases to whitespace in the text.
25313 \begin_inset Newline newline
25314 \end_inset
25315
25316 Here is an example:
25317 \end_layout
25318
25319 \begin_layout Standard
25320 \begin_inset Flex Multiple Columns
25321 status open
25322
25323 \begin_layout Plain Layout
25324
25325 \size small
25326 \begin_inset Quotes eld
25327 \end_inset
25328
25329 You're surprised to see me, sir,
25330 \begin_inset Quotes erd
25331 \end_inset
25332
25333  said he, in a strange, croaking voice.
25334 \end_layout
25335
25336 \begin_layout Plain Layout
25337
25338 \size small
25339 I acknowledged that I was.
25340 \end_layout
25341
25342 \begin_layout Plain Layout
25343
25344 \size small
25345 \begin_inset Quotes eld
25346 \end_inset
25347
25348 Well, I've a conscience, sir, and when I chanced to see you go into this
25349  house, as I came hobbling after you, I thought to myself, I'll just step
25350  in and see that kind gentleman, and tell him that if I was a bit gruff
25351  in my manner there was not any harm meant, and that I am much obliged to
25352  him for picking up my books.
25353 \begin_inset Quotes erd
25354 \end_inset
25355
25356
25357 \end_layout
25358
25359 \begin_layout Plain Layout
25360
25361 \size small
25362 \begin_inset Quotes eld
25363 \end_inset
25364
25365 You make too much of a trifle,
25366 \begin_inset Quotes erd
25367 \end_inset
25368
25369  said I.
25370  
25371 \begin_inset Quotes eld
25372 \end_inset
25373
25374 May I ask how you knew who I was?
25375 \begin_inset Quotes erd
25376 \end_inset
25377
25378  AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED.
25379 \begin_inset ERT
25380 status collapsed
25381
25382 \begin_layout Plain Layout
25383
25384
25385 \backslash
25386 columnbreak{}
25387 \end_layout
25388
25389 \end_inset
25390
25391
25392 \end_layout
25393
25394 \begin_layout Plain Layout
25395
25396 \size small
25397 \begin_inset Quotes eld
25398 \end_inset
25399
25400 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
25401  you'll find my little bookshop at the corner of Church Street, and very
25402  happy to see you, I am sure.
25403  Maybe you collect yourself, sir.
25404  Here's 
25405 \noun on
25406 British
25407 \begin_inset space ~
25408 \end_inset
25409
25410 Birds
25411 \noun default
25412 , and 
25413 \noun on
25414 Catullus
25415 \noun default
25416 , and 
25417 \noun on
25418 The Holy War
25419 \noun default
25420 –a bargain, every one of them.
25421  With five volumes you could just fill that gap on that second shelf.
25422  It looks untidy, does it not, sir?
25423 \begin_inset Quotes erd
25424 \end_inset
25425
25426
25427 \end_layout
25428
25429 \end_inset
25430
25431
25432 \end_layout
25433
25434 \begin_layout Subsubsection
25435 Column Separation
25436 \end_layout
25437
25438 \begin_layout Standard
25439 The width of the columns is automatically calculated, but you can modify
25440  the space between the columns.
25441  This is done by changing the length 
25442 \series bold
25443
25444 \backslash
25445 columnsep
25446 \series default
25447 .
25448  Its predefined value is 10
25449 \begin_inset space \thinspace{}
25450 \end_inset
25451
25452 pt.
25453  Here is an example where 
25454 \series bold
25455
25456 \backslash
25457 columnsep
25458 \series default
25459  is set to 3
25460 \begin_inset space \thinspace{}
25461 \end_inset
25462
25463 cm:
25464 \end_layout
25465
25466 \begin_layout Standard
25467 \begin_inset ERT
25468 status open
25469
25470 \begin_layout Plain Layout
25471
25472
25473 \backslash
25474 setlength{
25475 \backslash
25476 columnsep}{3cm}
25477 \end_layout
25478
25479 \end_inset
25480
25481
25482 \end_layout
25483
25484 \begin_layout Standard
25485 \begin_inset Flex Multiple Columns
25486 status open
25487
25488 \begin_layout Plain Layout
25489
25490 \size small
25491 My observations of No.
25492 \begin_inset space \space{}
25493 \end_inset
25494
25495 427 Park Lane did little to clear up the problem in which I was interested.
25496  The house was separated from the street by a low wall and railing, the
25497  whole not more than five feet high.
25498  It was perfectly easy, therefore, for anyone to get into the garden, but
25499  the window was entirely inaccessible, since there was no water pipe or
25500  anything which could help the most active man to climb it.
25501  More puzzled than ever, I retraced my steps to Kensington.
25502  I had not been in my study five minutes when the maid entered to say that
25503  a person desired to see me.
25504  To my astonishment it was none other than my strange old book collector,
25505  his sharp, wizened face peering out from a frame of white hair, and his
25506  precious volumes, a dozen of them at least, wedged under his right arm.
25507 \end_layout
25508
25509 \end_inset
25510
25511
25512 \end_layout
25513
25514 \begin_layout Standard
25515 \begin_inset ERT
25516 status collapsed
25517
25518 \begin_layout Plain Layout
25519
25520
25521 \backslash
25522 setlength{
25523 \backslash
25524 columnsep}{10pt}
25525 \end_layout
25526
25527 \end_inset
25528
25529
25530 \begin_inset Note Note
25531 status collapsed
25532
25533 \begin_layout Plain Layout
25534 go back to the default
25535 \end_layout
25536
25537 \end_inset
25538
25539
25540 \end_layout
25541
25542 \begin_layout Subsubsection
25543 Vertical Lines
25544 \end_layout
25545
25546 \begin_layout Standard
25547 Between the columns a rule with a width of the length 
25548 \series bold
25549
25550 \backslash
25551 columnseprule
25552 \series default
25553  is placed.
25554  If this rule width is set to 0
25555 \begin_inset space \thinspace{}
25556 \end_inset
25557
25558 pt (this is the default), the rule is suppressed.
25559  In the following example the rule is 2
25560 \begin_inset space \thinspace{}
25561 \end_inset
25562
25563 pt wide:
25564 \end_layout
25565
25566 \begin_layout Standard
25567 \begin_inset ERT
25568 status open
25569
25570 \begin_layout Plain Layout
25571
25572
25573 \backslash
25574 setlength{
25575 \backslash
25576 columnseprule}{2pt}
25577 \end_layout
25578
25579 \end_inset
25580
25581
25582 \end_layout
25583
25584 \begin_layout Standard
25585 \begin_inset Flex Multiple Columns
25586 status open
25587
25588 \begin_layout Plain Layout
25589
25590 \size small
25591 \begin_inset Quotes eld
25592 \end_inset
25593
25594 You're surprised to see me, sir,
25595 \begin_inset Quotes erd
25596 \end_inset
25597
25598  said he, in a strange, croaking voice.
25599 \end_layout
25600
25601 \begin_layout Plain Layout
25602
25603 \size small
25604 I acknowledged that I was.
25605 \end_layout
25606
25607 \begin_layout Plain Layout
25608
25609 \size small
25610 \begin_inset Quotes eld
25611 \end_inset
25612
25613 Well, I've a conscience, sir, and when I chanced to see you go into this
25614  house, as I came hobbling after you, I thought to myself, I'll just step
25615  in and see that kind gentleman, and tell him that if I was a bit gruff
25616  in my manner there was not any harm meant, and that I am much obliged to
25617  him for picking up my books.
25618 \begin_inset Quotes erd
25619 \end_inset
25620
25621
25622 \end_layout
25623
25624 \begin_layout Plain Layout
25625
25626 \size small
25627 \begin_inset Quotes eld
25628 \end_inset
25629
25630 You make too much of a trifle,
25631 \begin_inset Quotes erd
25632 \end_inset
25633
25634  said I.
25635  
25636 \begin_inset Quotes eld
25637 \end_inset
25638
25639 May I ask how you knew who I was?
25640 \begin_inset Quotes erd
25641 \end_inset
25642
25643
25644 \end_layout
25645
25646 \begin_layout Plain Layout
25647
25648 \size small
25649 \begin_inset Quotes eld
25650 \end_inset
25651
25652 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
25653  you'll find my little bookshop at the corner of Church Street, and very
25654  happy to see you, I am sure.
25655  Maybe you collect yourself, sir.
25656  Here's 
25657 \noun on
25658 British
25659 \begin_inset space ~
25660 \end_inset
25661
25662 Birds
25663 \noun default
25664 , and 
25665 \noun on
25666 Catullus
25667 \noun default
25668 , and 
25669 \noun on
25670 The Holy War
25671 \noun default
25672 –a bargain, every one of them.
25673  With five volumes you could just fill that gap on that second shelf.
25674  It looks untidy, does it not, sir?
25675 \begin_inset Quotes erd
25676 \end_inset
25677
25678
25679 \end_layout
25680
25681 \end_inset
25682
25683
25684 \end_layout
25685
25686 \begin_layout Standard
25687 \begin_inset VSpace defskip
25688 \end_inset
25689
25690
25691 \end_layout
25692
25693 \begin_layout Standard
25694 The rule can be colored by redefining the command 
25695 \series bold
25696
25697 \backslash
25698 columnseprulecolor
25699 \series default
25700 .
25701  This is done by inserting the command
25702 \begin_inset Newline newline
25703 \end_inset
25704
25705
25706 \series bold
25707
25708 \backslash
25709 renewcommand{
25710 \backslash
25711 columnseprulecolor}{
25712 \backslash
25713 color{red}}
25714 \series default
25715
25716 \begin_inset Newline newline
25717 \end_inset
25718
25719 as \SpecialChar TeX
25720  Code before the multicolumn inset.
25721  Replace 
25722 \series bold
25723 red
25724 \series default
25725  in this command by a color of your choice.
25726  You can use all pre- and self-defined colors.
25727  See the 
25728 \emph on
25729 EmbeddedObjects
25730 \emph default
25731  manual, section 
25732 \emph on
25733 Colored
25734 \begin_inset space ~
25735 \end_inset
25736
25737 Tables
25738 \emph default
25739  for more information about pre- and self-defined colors.
25740  To go back to the default color insert the command
25741 \begin_inset Newline newline
25742 \end_inset
25743
25744
25745 \series bold
25746
25747 \backslash
25748 renewcommand{
25749 \backslash
25750 columnseprulecolor}{
25751 \backslash
25752 normalcolor}
25753 \series default
25754
25755 \begin_inset Newline newline
25756 \end_inset
25757
25758 Here is the example with a cyan rule and 1
25759 \begin_inset space \thinspace{}
25760 \end_inset
25761
25762 cm column separation:
25763 \end_layout
25764
25765 \begin_layout Standard
25766 \begin_inset ERT
25767 status open
25768
25769 \begin_layout Plain Layout
25770
25771
25772 \backslash
25773 setlength{
25774 \backslash
25775 columnsep}{1cm}
25776 \end_layout
25777
25778 \begin_layout Plain Layout
25779
25780
25781 \backslash
25782 renewcommand{
25783 \backslash
25784 columnseprulecolor}{
25785 \backslash
25786 color{cyan}}
25787 \end_layout
25788
25789 \end_inset
25790
25791
25792 \end_layout
25793
25794 \begin_layout Standard
25795 \begin_inset Flex Multiple Columns
25796 status open
25797
25798 \begin_layout Plain Layout
25799
25800 \size small
25801 \begin_inset Quotes eld
25802 \end_inset
25803
25804 You're surprised to see me, sir,
25805 \begin_inset Quotes erd
25806 \end_inset
25807
25808  said he, in a strange, croaking voice.
25809 \end_layout
25810
25811 \begin_layout Plain Layout
25812
25813 \size small
25814 I acknowledged that I was.
25815 \end_layout
25816
25817 \begin_layout Plain Layout
25818
25819 \size small
25820 \begin_inset Quotes eld
25821 \end_inset
25822
25823 Well, I've a conscience, sir, and when I chanced to see you go into this
25824  house, as I came hobbling after you, I thought to myself, I'll just step
25825  in and see that kind gentleman, and tell him that if I was a bit gruff
25826  in my manner there was not any harm meant, and that I am much obliged to
25827  him for picking up my books.
25828 \begin_inset Quotes erd
25829 \end_inset
25830
25831
25832 \end_layout
25833
25834 \begin_layout Plain Layout
25835
25836 \size small
25837 \begin_inset Quotes eld
25838 \end_inset
25839
25840 You make too much of a trifle,
25841 \begin_inset Quotes erd
25842 \end_inset
25843
25844  said I.
25845  
25846 \begin_inset Quotes eld
25847 \end_inset
25848
25849 May I ask how you knew who I was?
25850 \begin_inset Quotes erd
25851 \end_inset
25852
25853
25854 \end_layout
25855
25856 \begin_layout Plain Layout
25857
25858 \size small
25859 \begin_inset Quotes eld
25860 \end_inset
25861
25862 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
25863  you'll find my little bookshop at the corner of Church Street, and very
25864  happy to see you, I am sure.
25865  Maybe you collect yourself, sir.
25866  Here's 
25867 \noun on
25868 British
25869 \begin_inset space ~
25870 \end_inset
25871
25872 Birds
25873 \noun default
25874 , and 
25875 \noun on
25876 Catullus
25877 \noun default
25878 , and 
25879 \noun on
25880 The Holy War
25881 \noun default
25882 –a bargain, every one of them.
25883  With five volumes you could just fill that gap on that second shelf.
25884  It looks untidy, does it not, sir?
25885 \begin_inset Quotes erd
25886 \end_inset
25887
25888
25889 \end_layout
25890
25891 \end_inset
25892
25893
25894 \end_layout
25895
25896 \begin_layout Standard
25897 \begin_inset ERT
25898 status collapsed
25899
25900 \begin_layout Plain Layout
25901
25902
25903 \backslash
25904 setlength{
25905 \backslash
25906 columnseprule}{0pt}
25907 \end_layout
25908
25909 \begin_layout Plain Layout
25910
25911
25912 \backslash
25913 renewcommand{
25914 \backslash
25915 columnseprulecolor}{
25916 \backslash
25917 normalcolor}
25918 \end_layout
25919
25920 \end_inset
25921
25922
25923 \begin_inset Note Note
25924 status collapsed
25925
25926 \begin_layout Plain Layout
25927 go back to the default
25928 \end_layout
25929
25930 \end_inset
25931
25932
25933 \end_layout
25934
25935 \begin_layout Section
25936 Non-standard Paragraph Shapes
25937 \end_layout
25938
25939 \begin_layout Standard
25940 \noindent
25941 \SpecialChar LaTeX
25942  as well as any other text processor uses by default rectangular paragraphs.
25943  For special cases like for example posters, invitation cards or poems you
25944  can modify the paragraph shape to one of your choice.
25945  This can be done by using the \SpecialChar LaTeX
25946 -package 
25947 \series bold
25948 shapepar
25949 \series default
25950  which is loaded by using in the document settings the module 
25951 \family sans
25952 Custom paragraph shapes
25953 \family default
25954 .
25955 \end_layout
25956
25957 \begin_layout Subsection
25958 Predefined shapes
25959 \end_layout
25960
25961 \begin_layout Standard
25962
25963 \series bold
25964 shapepar
25965 \series default
25966  provides the following shapes:
25967 \end_layout
25968
25969 \begin_layout Standard
25970 \begin_inset Tabular
25971 <lyxtabular version="3" rows="13" columns="3">
25972 <features booktabs="true" islongtable="true" longtabularalignment="center">
25973 <column alignment="center" valignment="middle" width="16col%">
25974 <column alignment="center" valignment="middle" width="40col%">
25975 <column alignment="center" valignment="middle" width="35col%">
25976 <row endhead="true">
25977 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25978 \begin_inset Text
25979
25980 \begin_layout Plain Layout
25981 Name
25982 \end_layout
25983
25984 \end_inset
25985 </cell>
25986 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25987 \begin_inset Text
25988
25989 \begin_layout Plain Layout
25990 Description
25991 \end_layout
25992
25993 \end_inset
25994 </cell>
25995 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
25996 \begin_inset Text
25997
25998 \begin_layout Plain Layout
25999 Annotation
26000 \end_layout
26001
26002 \end_inset
26003 </cell>
26004 </row>
26005 <row>
26006 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26007 \begin_inset Text
26008
26009 \begin_layout Plain Layout
26010 CDlabel
26011 \end_layout
26012
26013 \end_inset
26014 </cell>
26015 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26016 \begin_inset Text
26017
26018 \begin_layout Plain Layout
26019 Circle with circular hole (in the size of a CD/DVD)
26020 \end_layout
26021
26022 \end_inset
26023 </cell>
26024 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26025 \begin_inset Text
26026
26027 \begin_layout Plain Layout
26028 Cannot be scaled, take care there is not too much text
26029 \end_layout
26030
26031 \end_inset
26032 </cell>
26033 </row>
26034 <row>
26035 <cell alignment="center" valignment="top" topline="true" usebox="none">
26036 \begin_inset Text
26037
26038 \begin_layout Plain Layout
26039 Circle
26040 \end_layout
26041
26042 \end_inset
26043 </cell>
26044 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26045 \begin_inset Text
26046
26047 \begin_layout Plain Layout
26048 Circle
26049 \end_layout
26050
26051 \end_inset
26052 </cell>
26053 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26054 \begin_inset Text
26055
26056 \begin_layout Plain Layout
26057 Fragile, calculation might fail
26058 \end_layout
26059
26060 \end_inset
26061 </cell>
26062 </row>
26063 <row>
26064 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26065 \begin_inset Text
26066
26067 \begin_layout Plain Layout
26068 Diamond
26069 \end_layout
26070
26071 \end_inset
26072 </cell>
26073 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26074 \begin_inset Text
26075
26076 \begin_layout Plain Layout
26077 Rhomboid (symbolizing a 
26078 \begin_inset Quotes eld
26079 \end_inset
26080
26081 diamond
26082 \begin_inset Quotes erd
26083 \end_inset
26084
26085 )
26086 \end_layout
26087
26088 \end_inset
26089 </cell>
26090 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26091 \begin_inset Text
26092
26093 \begin_layout Plain Layout
26094 -
26095 \end_layout
26096
26097 \end_inset
26098 </cell>
26099 </row>
26100 <row>
26101 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26102 \begin_inset Text
26103
26104 \begin_layout Plain Layout
26105 Heart
26106 \end_layout
26107
26108 \end_inset
26109 </cell>
26110 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26111 \begin_inset Text
26112
26113 \begin_layout Plain Layout
26114 Heart-like shape
26115 \end_layout
26116
26117 \end_inset
26118 </cell>
26119 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26120 \begin_inset Text
26121
26122 \begin_layout Plain Layout
26123 -
26124 \end_layout
26125
26126 \end_inset
26127 </cell>
26128 </row>
26129 <row>
26130 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26131 \begin_inset Text
26132
26133 \begin_layout Plain Layout
26134 Hexagon
26135 \end_layout
26136
26137 \end_inset
26138 </cell>
26139 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26140 \begin_inset Text
26141
26142 \begin_layout Plain Layout
26143 Hexagon
26144 \end_layout
26145
26146 \end_inset
26147 </cell>
26148 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26149 \begin_inset Text
26150
26151 \begin_layout Plain Layout
26152 -
26153 \end_layout
26154
26155 \end_inset
26156 </cell>
26157 </row>
26158 <row>
26159 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26160 \begin_inset Text
26161
26162 \begin_layout Plain Layout
26163 Nut
26164 \end_layout
26165
26166 \end_inset
26167 </cell>
26168 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26169 \begin_inset Text
26170
26171 \begin_layout Plain Layout
26172 Nut for bolt (hexagon with circular hole)
26173 \end_layout
26174
26175 \end_inset
26176 </cell>
26177 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26178 \begin_inset Text
26179
26180 \begin_layout Plain Layout
26181 -
26182 \end_layout
26183
26184 \end_inset
26185 </cell>
26186 </row>
26187 <row>
26188 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26189 \begin_inset Text
26190
26191 \begin_layout Plain Layout
26192 Square
26193 \end_layout
26194
26195 \end_inset
26196 </cell>
26197 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26198 \begin_inset Text
26199
26200 \begin_layout Plain Layout
26201 Square
26202 \end_layout
26203
26204 \end_inset
26205 </cell>
26206 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26207 \begin_inset Text
26208
26209 \begin_layout Plain Layout
26210 -
26211 \end_layout
26212
26213 \end_inset
26214 </cell>
26215 </row>
26216 <row>
26217 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
26218 \begin_inset Text
26219
26220 \begin_layout Plain Layout
26221 Star
26222 \end_layout
26223
26224 \end_inset
26225 </cell>
26226 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
26227 \begin_inset Text
26228
26229 \begin_layout Plain Layout
26230 Five-point star
26231 \end_layout
26232
26233 \end_inset
26234 </cell>
26235 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
26236 \begin_inset Text
26237
26238 \begin_layout Plain Layout
26239 -
26240 \end_layout
26241
26242 \end_inset
26243 </cell>
26244 </row>
26245 <row>
26246 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26247 \begin_inset Text
26248
26249 \begin_layout Plain Layout
26250 Candle
26251 \end_layout
26252
26253 \end_inset
26254 </cell>
26255 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26256 \begin_inset Text
26257
26258 \begin_layout Plain Layout
26259 Burning candle
26260 \end_layout
26261
26262 \end_inset
26263 </cell>
26264 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26265 \begin_inset Text
26266
26267 \begin_layout Plain Layout
26268 -
26269 \end_layout
26270
26271 \end_inset
26272 </cell>
26273 </row>
26274 <row>
26275 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26276 \begin_inset Text
26277
26278 \begin_layout Plain Layout
26279 Drop down/up
26280 \end_layout
26281
26282 \end_inset
26283 </cell>
26284 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26285 \begin_inset Text
26286
26287 \begin_layout Plain Layout
26288 Normal/reversed rain drop
26289 \end_layout
26290
26291 \end_inset
26292 </cell>
26293 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26294 \begin_inset Text
26295
26296 \begin_layout Plain Layout
26297 Fragile, calculation might fail
26298 \end_layout
26299
26300 \end_inset
26301 </cell>
26302 </row>
26303 <row>
26304 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26305 \begin_inset Text
26306
26307 \begin_layout Plain Layout
26308 \SpecialChar TeX
26309
26310 \end_layout
26311
26312 \end_inset
26313 </cell>
26314 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26315 \begin_inset Text
26316
26317 \begin_layout Plain Layout
26318 The \SpecialChar TeX
26319  logo
26320 \end_layout
26321
26322 \end_inset
26323 </cell>
26324 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26325 \begin_inset Text
26326
26327 \begin_layout Plain Layout
26328 -
26329 \end_layout
26330
26331 \end_inset
26332 </cell>
26333 </row>
26334 <row>
26335 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
26336 \begin_inset Text
26337
26338 \begin_layout Plain Layout
26339 Triangle up/down/
26340 \begin_inset Newline newline
26341 \end_inset
26342
26343 left/right
26344 \end_layout
26345
26346 \end_inset
26347 </cell>
26348 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
26349 \begin_inset Text
26350
26351 \begin_layout Plain Layout
26352 Triangles in different orientations
26353 \end_layout
26354
26355 \end_inset
26356 </cell>
26357 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
26358 \begin_inset Text
26359
26360 \begin_layout Plain Layout
26361 -
26362 \end_layout
26363
26364 \end_inset
26365 </cell>
26366 </row>
26367 </lyxtabular>
26368
26369 \end_inset
26370
26371
26372 \end_layout
26373
26374 \begin_layout Standard
26375 To use a shape for your paragraph, simply select it in \SpecialChar LyX
26376 's pull-down box
26377  for environments in the toolbar.
26378 \end_layout
26379
26380 \begin_layout Standard
26381 \begin_inset Newpage newpage
26382 \end_inset
26383
26384
26385 \end_layout
26386
26387 \begin_layout Standard
26388 Here is an example paragraph in the shape of a nut:
26389 \end_layout
26390
26391 \begin_layout Standard
26392 \begin_inset VSpace bigskip
26393 \end_inset
26394
26395
26396 \end_layout
26397
26398 \begin_layout Nut
26399
26400 \lang latin
26401 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26402  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26403  voluptua.
26404  At vero eos et accusam et justo duo dolores et ea rebum.
26405  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26406  sit amet.
26407  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26408  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26409  voluptua.
26410 \end_layout
26411
26412 \begin_layout Standard
26413 \begin_inset VSpace bigskip
26414 \end_inset
26415
26416
26417 \end_layout
26418
26419 \begin_layout Standard
26420 \begin_inset Note Greyedout
26421 status open
26422
26423 \begin_layout Plain Layout
26424
26425 \series bold
26426 Note
26427 \series default
26428 : shapepar paragraphs cannot run over a page break.
26429 \end_layout
26430
26431 \end_inset
26432
26433
26434 \end_layout
26435
26436 \begin_layout Standard
26437 \begin_inset VSpace bigskip
26438 \end_inset
26439
26440
26441 \end_layout
26442
26443 \begin_layout Standard
26444
26445 \series bold
26446 shapepar
26447 \series default
26448  takes care that the shape will always be preserved, no matter how much
26449  text is in the paragraph.
26450  Therefore the paragraph size changes with the amount of contained text.
26451  This can lead to paragraph sizes exceeding the page margins.
26452  To demonstrate the size scaling, here is the same example paragraph but
26453  with twice as much text:
26454 \end_layout
26455
26456 \begin_layout Standard
26457 \begin_inset Newpage newpage
26458 \end_inset
26459
26460
26461 \end_layout
26462
26463 \begin_layout Nut
26464
26465 \lang latin
26466 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26467  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26468  voluptua.
26469  At vero eos et accusam et justo duo dolores et ea rebum.
26470  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26471  sit amet.
26472  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26473  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26474  voluptua.
26475  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26476  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26477  voluptua.
26478  At vero eos et accusam et justo duo dolores et ea rebum.
26479  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26480  sit amet.
26481  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26482  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26483  voluptua.
26484 \end_layout
26485
26486 \begin_layout Standard
26487 \begin_inset VSpace bigskip
26488 \end_inset
26489
26490
26491 \end_layout
26492
26493 \begin_layout Standard
26494 An exception is the shape 
26495 \family sans
26496 CDlabel
26497 \family default
26498 .
26499  It cannot be scaled because it must fit the size of a CD/DVD.
26500  Therefore the amount of text that fits into the shape is limited.
26501 \begin_inset Newline newline
26502 \end_inset
26503
26504 The 
26505 \family sans
26506 drop
26507 \family default
26508  shapes and the 
26509 \family sans
26510 circle
26511 \family default
26512  shape are fragile, meaning that the calculation of their size can fail,
26513  depending on the amount of text.
26514  You will then get the \SpecialChar LaTeX
26515  error 
26516 \begin_inset Quotes eld
26517 \end_inset
26518
26519 Arithmetic overflow
26520 \begin_inset Quotes erd
26521 \end_inset
26522
26523 .
26524  In this case one can try to remove or add some text; if nothing works one
26525  has to use another shape.
26526 \end_layout
26527
26528 \begin_layout Standard
26529 \begin_inset VSpace bigskip
26530 \end_inset
26531
26532
26533 \end_layout
26534
26535 \begin_layout Standard
26536 For shapes with tips you will maybe see that \SpecialChar LaTeX
26537 's hyphenation routine fails
26538  for text in the tips.
26539  Therefore it is often necessary to add hyphenation points 
26540 \family sans
26541 (
26542 \begin_inset Info
26543 type  "shortcut"
26544 arg   "specialchar-insert hyphenation"
26545 \end_inset
26546
26547
26548 \family default
26549 ) to the corresponding text parts.
26550 \end_layout
26551
26552 \begin_layout Standard
26553 \begin_inset VSpace bigskip
26554 \end_inset
26555
26556
26557 \end_layout
26558
26559 \begin_layout Standard
26560 Shapepar paragraphs are either always centered or placed on the page so
26561  that their left border touches the left page margin.
26562  You can therefore not use the paragraph dialog to align such paragraphs.
26563  A solution is to put the paragraph into a minipage or parbox and align
26564  the box.
26565  The problem is hereby to find the right width for the box.
26566  Because if it is too wide and you center the box, the paragraph is not
26567  centered too because it sticks at the left side of the box.
26568  So you might have to play a bit with the width until it fits.
26569  Here are two heart-shaped paragraphs, the first one is not aligned, the
26570  second one is right-aligned:
26571 \end_layout
26572
26573 \begin_layout Standard
26574 \begin_inset Newpage newpage
26575 \end_inset
26576
26577
26578 \end_layout
26579
26580 \begin_layout Heart
26581 \noindent
26582
26583 \lang latin
26584 Lo\SpecialChar softhyphen
26585 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26586  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26587  voluptua.
26588  At vero eos et accusam et justo duo dolores et ea rebum.
26589  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26590  sit amet.
26591 \end_layout
26592
26593 \begin_layout Standard
26594 \begin_inset VSpace bigskip
26595 \end_inset
26596
26597
26598 \end_layout
26599
26600 \begin_layout Standard
26601 \noindent
26602 \align right
26603 \begin_inset Box Frameless
26604 position "t"
26605 hor_pos "c"
26606 has_inner_box 1
26607 inner_pos "t"
26608 use_parbox 1
26609 use_makebox 0
26610 width "42col%"
26611 special "none"
26612 height "1in"
26613 height_special "totalheight"
26614 thickness "0.4pt"
26615 separation "3pt"
26616 shadowsize "4pt"
26617 framecolor "black"
26618 backgroundcolor "none"
26619 status open
26620
26621 \begin_layout Heart
26622 \noindent
26623
26624 \lang latin
26625 Lo\SpecialChar softhyphen
26626 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26627  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26628  voluptua.
26629  At vero eos et accusam et justo duo dolores et ea rebum.
26630  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26631  sit amet.
26632 \end_layout
26633
26634 \end_inset
26635
26636
26637 \end_layout
26638
26639 \begin_layout Subsection
26640 Custom shapes
26641 \end_layout
26642
26643 \begin_layout Standard
26644 You can define any shape you want.
26645  Doing this manually is a lot of work because every coordinate must be specified.
26646  But there is a way to let the computer calculate the coordinates:
26647 \end_layout
26648
26649 \begin_layout Enumerate
26650 Install the program 
26651 \begin_inset CommandInset href
26652 LatexCommand href
26653 name "Jpgfdraw"
26654 target "http://www.ctan.org/tex-archive/graphics/jpgfdraw"
26655 literal "false"
26656
26657 \end_inset
26658
26659 .
26660 \end_layout
26661
26662 \begin_layout Enumerate
26663 In 
26664 \family sans
26665 Jpgfdraw
26666 \family default
26667  go to the menu 
26668 \family sans
26669 TeX/LaTeX\SpecialChar menuseparator
26670 Settings\SpecialChar menuseparator
26671 Set Normal Size
26672 \family default
26673  and select the font size you are using in your document.
26674  For example this document uses the size 12
26675 \begin_inset space \thinspace{}
26676 \end_inset
26677
26678 pt.
26679 \end_layout
26680
26681 \begin_layout Enumerate
26682 Draw a shape.
26683 \end_layout
26684
26685 \begin_layout Enumerate
26686 Use the menu 
26687 \family sans
26688 TeX/LaTeX\SpecialChar menuseparator
26689 Shapepar
26690 \family default
26691  to export the shape to coordinates.
26692  In the appearing dialog use either the outline of your shape for the coordinate
26693 s or the path itself.
26694 \begin_inset Foot
26695 status collapsed
26696
26697 \begin_layout Plain Layout
26698 For more information see 
26699 \begin_inset CommandInset href
26700 LatexCommand href
26701 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
26702 literal "false"
26703
26704 \end_inset
26705
26706
26707 \end_layout
26708
26709 \end_inset
26710
26711
26712 \end_layout
26713
26714 \begin_layout Standard
26715 The coordinates are written into a \SpecialChar TeX
26716  file.
26717  To use it for your \SpecialChar LyX
26718  document
26719 \end_layout
26720
26721 \begin_layout Enumerate
26722 Place the cursor before the first character of your paragraph (or into a
26723  new empty one).
26724 \end_layout
26725
26726 \begin_layout Enumerate
26727 Open in \SpecialChar LyX
26728  the menu 
26729 \family sans
26730 Insert\SpecialChar menuseparator
26731 File\SpecialChar menuseparator
26732 Child
26733 \begin_inset space ~
26734 \end_inset
26735
26736 Document
26737 \family default
26738 , select the file and use 
26739 \family sans
26740 Input
26741 \family default
26742  as 
26743 \family sans
26744 Include Type.
26745 \end_layout
26746
26747 \begin_layout Standard
26748 \begin_inset VSpace defskip
26749 \end_inset
26750
26751
26752 \end_layout
26753
26754 \begin_layout Standard
26755 \begin_inset Note Greyedout
26756 status open
26757
26758 \begin_layout Plain Layout
26759
26760 \series bold
26761 Note
26762 \series default
26763 : The changed shape only applies to the current paragraph; everything is
26764  reset to normal for the next paragraph.
26765  Therefore the shape definition file must be input into every paragraph
26766  with the desired shape.
26767 \end_layout
26768
26769 \end_inset
26770
26771
26772 \end_layout
26773
26774 \begin_layout Standard
26775 \begin_inset VSpace bigskip
26776 \end_inset
26777
26778
26779 \end_layout
26780
26781 \begin_layout Standard
26782 Here is an example:
26783 \end_layout
26784
26785 \begin_layout Standard
26786 \begin_inset VSpace bigskip
26787 \end_inset
26788
26789
26790 \end_layout
26791
26792 \begin_layout Standard
26793 \begin_inset CommandInset include
26794 LatexCommand input
26795 filename "SpecialParagraphShape.tex"
26796
26797 \end_inset
26798
26799
26800 \lang latin
26801 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26802  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26803  voluptua.
26804  At vero eos et accusam et justo duo dolores et ea rebum.
26805  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26806  sit amet.
26807  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26808  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26809  voluptua.
26810 \end_layout
26811
26812 \begin_layout Standard
26813 \begin_inset VSpace bigskip
26814 \end_inset
26815
26816
26817 \end_layout
26818
26819 \begin_layout Standard
26820
26821 \series bold
26822 A tip:
26823 \series default
26824  to draw complexer shapes in 
26825 \family sans
26826 Jpgfdraw
26827 \family default
26828  you can draw the shape in a program of your choice and import the resulting
26829  image to 
26830 \family sans
26831 Jpgfdraw
26832 \family default
26833 .
26834  Then you only need to draw a line or spline along the outline of the image.
26835 \end_layout
26836
26837 \begin_layout Standard
26838 \begin_inset VSpace bigskip
26839 \end_inset
26840
26841
26842 \end_layout
26843
26844 \begin_layout Standard
26845 The module 
26846 \family sans
26847 Custom paragraph shapes
26848 \family default
26849  also provides the two commands 
26850 \family sans
26851 shapepar
26852 \family default
26853  and 
26854 \family sans
26855 Shapepar
26856 \family default
26857  which can be used to define custom shapes coordinate by coordinate.
26858 \begin_inset Foot
26859 status collapsed
26860
26861 \begin_layout Plain Layout
26862 These commands are internally used for all shapes described here.
26863 \end_layout
26864
26865 \end_inset
26866
26867  For information how these styles are used and about further customization
26868  possibilities, have a look at the documentation of the package 
26869 \series bold
26870 shapepar
26871 \series default
26872
26873 \begin_inset CommandInset citation
26874 LatexCommand cite
26875 key "shapepar"
26876 literal "true"
26877
26878 \end_inset
26879
26880 .
26881 \end_layout
26882
26883 \begin_layout Bibliography
26884 \begin_inset CommandInset bibitem
26885 LatexCommand bibitem
26886 key "multicol"
26887 literal "true"
26888
26889 \end_inset
26890
26891 Documentation of the \SpecialChar LaTeX
26892 -package 
26893 \begin_inset CommandInset href
26894 LatexCommand href
26895 name "multicol"
26896 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
26897 literal "false"
26898
26899 \end_inset
26900
26901
26902 \end_layout
26903
26904 \begin_layout Bibliography
26905 \begin_inset CommandInset bibitem
26906 LatexCommand bibitem
26907 key "shapepar"
26908 literal "true"
26909
26910 \end_inset
26911
26912 Documentation of the \SpecialChar LaTeX
26913 -package 
26914 \begin_inset CommandInset href
26915 LatexCommand href
26916 name "shapepar"
26917 target "http://mirrors.ctan.org/macros/latex/contrib/shapepar/shapepar.pdf"
26918 literal "false"
26919
26920 \end_inset
26921
26922
26923 \end_layout
26924
26925 \end_body
26926 \end_document