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