]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
3391eaf422fce6f0685387a71a1a98023293ce54
[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  o
2931 \change_deleted -712698321 1501067466
2932 f
2933 \change_inserted -712698321 1501067466
2934 r
2935 \change_unchanged
2936  the 
2937 \begin_inset Flex Code
2938 status collapsed
2939
2940 \begin_layout Plain Layout
2941 bibtopic
2942 \end_layout
2943
2944 \end_inset
2945
2946  package is used to create multiple bibliographies.
2947  The former package is used if you select 
2948 \begin_inset Quotes eld
2949 \end_inset
2950
2951 per child document
2952 \begin_inset Quotes erd
2953 \end_inset
2954
2955  and do 
2956 \emph on
2957 not
2958 \emph default
2959  check 
2960 \begin_inset Flex Noun
2961 status collapsed
2962
2963 \begin_layout Plain Layout
2964 Sectioned Bibliography
2965 \end_layout
2966
2967 \end_inset
2968
2969 .
2970  In all other cases, 
2971 \begin_inset Flex Code
2972 status collapsed
2973
2974 \begin_layout Plain Layout
2975 bibtopic
2976 \end_layout
2977
2978 \end_inset
2979
2980  is used.
2981 \begin_inset Foot
2982 status collapsed
2983
2984 \begin_layout Plain Layout
2985 An alternative approach, if you are willing to use some 
2986 \begin_inset Flex Noun
2987 status collapsed
2988
2989 \begin_layout Plain Layout
2990 \SpecialChar TeX
2991  Code
2992 \end_layout
2993
2994 \end_inset
2995
2996  (see section
2997 \begin_inset space ~
2998 \end_inset
2999
3000
3001 \begin_inset CommandInset ref
3002 LatexCommand ref
3003 reference "sec:Inserting-TeX-Code"
3004
3005 \end_inset
3006
3007 ), is to use the 
3008 \begin_inset Flex Code
3009 status collapsed
3010
3011 \begin_layout Plain Layout
3012 bibunits
3013 \end_layout
3014
3015 \end_inset
3016
3017  package.
3018 \end_layout
3019
3020 \end_inset
3021
3022  If 
3023 \begin_inset Flex Code
3024 status collapsed
3025
3026 \begin_layout Plain Layout
3027 bibtopic
3028 \end_layout
3029
3030 \end_inset
3031
3032  is used, \SpecialChar LyX
3033  encloses the specified units in 
3034 \begin_inset Flex Code
3035 status collapsed
3036
3037 \begin_layout Plain Layout
3038 bibtopic
3039 \end_layout
3040
3041 \end_inset
3042
3043 's 
3044 \begin_inset Flex Code
3045 status collapsed
3046
3047 \begin_layout Plain Layout
3048
3049 \backslash
3050 begin{btUnit}
3051 \end_layout
3052
3053 \end_inset
3054
3055  and 
3056 \begin_inset Flex Code
3057 status collapsed
3058
3059 \begin_layout Plain Layout
3060
3061 \backslash
3062 end{btUnit}
3063 \end_layout
3064
3065 \end_inset
3066
3067  in order to create the units.
3068  Note that this approach has some limitations.
3069  First, every citation reference has to be inside some 
3070 \begin_inset Flex Code
3071 status collapsed
3072
3073 \begin_layout Plain Layout
3074 btUnit
3075 \end_layout
3076
3077 \end_inset
3078
3079 .
3080  So citations outside a defined unit (e.
3081 \begin_inset space \thinspace{}
3082 \end_inset
3083
3084 g., before the first section if you use 
3085 \begin_inset Quotes eld
3086 \end_inset
3087
3088 by section
3089 \begin_inset Quotes erd
3090 \end_inset
3091
3092 ) will appear as 
3093 \begin_inset Quotes eld
3094 \end_inset
3095
3096 ???
3097 \begin_inset Quotes erd
3098 \end_inset
3099
3100 .
3101  You can also create your own units by entering 
3102 \begin_inset Flex Code
3103 status collapsed
3104
3105 \begin_layout Plain Layout
3106
3107 \backslash
3108 begin{btUnit}
3109 \end_layout
3110
3111 \end_inset
3112
3113  and 
3114 \begin_inset Flex Code
3115 status collapsed
3116
3117 \begin_layout Plain Layout
3118
3119 \backslash
3120 end{btUnit}
3121 \end_layout
3122
3123 \end_inset
3124
3125  as \SpecialChar TeX
3126  code (for instance to work around the mentioned limitation).
3127  Note, though, that 
3128 \begin_inset Flex Code
3129 status collapsed
3130
3131 \begin_layout Plain Layout
3132 btUnit
3133 \end_layout
3134
3135 \end_inset
3136
3137 s cannot be nested.
3138  A second limitation is that 
3139 \begin_inset Flex Code
3140 status collapsed
3141
3142 \begin_layout Plain Layout
3143 bibtopic
3144 \end_layout
3145
3146 \end_inset
3147
3148  always processes all references of a bibliography database, even if they
3149  are not cited.
3150  This can result in odd labels (e.
3151 \begin_inset space \thinspace{}
3152 \end_inset
3153
3154 g.
3155  
3156 \begin_inset Quotes eld
3157 \end_inset
3158
3159 Miller 2014b
3160 \begin_inset Quotes erd
3161 \end_inset
3162
3163  if two works of this author from 2014 are in the database, even if only
3164  one is cited).
3165 \end_layout
3166
3167 \begin_layout Standard
3168 If you use 
3169 \family sans
3170 Biblatex
3171 \family default
3172 , the 
3173 \begin_inset Flex Code
3174 status collapsed
3175
3176 \begin_layout Plain Layout
3177 refsection
3178 \end_layout
3179
3180 \end_inset
3181
3182  option is used instead.
3183  If you need specific units, you can start them with the \SpecialChar TeX
3184  code 
3185 \begin_inset Flex Code
3186 status collapsed
3187
3188 \begin_layout Plain Layout
3189
3190 \backslash
3191 newrefsection
3192 \end_layout
3193
3194 \end_inset
3195
3196  or 
3197 \begin_inset Flex Code
3198 status collapsed
3199
3200 \begin_layout Plain Layout
3201
3202 \backslash
3203 newrefsegment
3204 \end_layout
3205
3206 \end_inset
3207
3208 , respectively.
3209  If you also want to control the end of the unit, use the environment 
3210 \begin_inset Flex Code
3211 status collapsed
3212
3213 \begin_layout Plain Layout
3214
3215 \backslash
3216 begin{refsection}
3217 \end_layout
3218
3219 \end_inset
3220
3221  \SpecialChar ldots
3222  
3223 \begin_inset Flex Code
3224 status collapsed
3225
3226 \begin_layout Plain Layout
3227
3228 \backslash
3229 end{refsection}
3230 \end_layout
3231
3232 \end_inset
3233
3234  instead.
3235  Note, though, that 
3236 \begin_inset Flex Code
3237 status collapsed
3238
3239 \begin_layout Plain Layout
3240 refsection
3241 \end_layout
3242
3243 \end_inset
3244
3245 s cannot be nested.
3246  In addition to the individual bibliography of the current unit, 
3247 \family sans
3248 Biblatex
3249 \family default
3250  also provides an easy way to output all bibliographies, subsequently, at
3251  one place (e.
3252 \begin_inset space \thinspace{}
3253 \end_inset
3254
3255 g., at the end of the document).
3256  Select 
3257 \begin_inset Quotes eld
3258 \end_inset
3259
3260 all reference units
3261 \begin_inset Quotes erd
3262 \end_inset
3263
3264  from the Content combo box of the Bib(la)TeX inset dialog in order to achieve
3265  this.
3266  Please refer to the 
3267 \family sans
3268 Biblatex
3269 \family default
3270  manual for more information on this topic.
3271 \end_layout
3272
3273 \begin_layout Section
3274 Multipart Documents
3275 \end_layout
3276
3277 \begin_layout Subsection
3278 General Operation
3279 \end_layout
3280
3281 \begin_layout Standard
3282 When you are working on a large file with many sections, it is often convenient
3283  to break up the document into several files, or perhaps you have something
3284  where a table may change from time to time, but the preceding text does
3285  not.
3286  In these cases, you should seriously consider using multipart documents.
3287  For example, scientific papers often have five major sections: the introduction
3288 , observations, results, discussion, and conclusion.
3289  Each of these could be its own separate \SpecialChar LyX
3290  file, with one 
3291 \begin_inset Quotes eld
3292 \end_inset
3293
3294 master
3295 \begin_inset Quotes erd
3296 \end_inset
3297
3298  file which contains the title, authors, abstract, references, etc., plus
3299  the five included files.
3300  It is important to note that each of these files is a full \SpecialChar LyX
3301  file which
3302  can be formatted and printed on its own, as well as included in a master
3303  file.
3304  Each of these files must have the same document class, however—don't attempt
3305  to mix book classes with article classes.
3306  You may also include \SpecialChar LaTeX
3307  files; however, these files must not have their own
3308  preamble (i.
3309 \begin_inset space \thinspace{}
3310 \end_inset
3311
3312 e.
3313 \begin_inset space \space{}
3314 \end_inset
3315
3316 everything up to and including the 
3317 \begin_inset Flex Code
3318 status collapsed
3319
3320 \begin_layout Plain Layout
3321
3322 \backslash
3323 begin{document}
3324 \end_layout
3325
3326 \end_inset
3327
3328  line as well as the 
3329 \begin_inset Flex Code
3330 status collapsed
3331
3332 \begin_layout Plain Layout
3333
3334 \backslash
3335 end{document}
3336 \end_layout
3337
3338 \end_inset
3339
3340  line must be deleted) or else errors will be generated when you try to
3341  make a DVI file.
3342 \end_layout
3343
3344 \begin_layout Standard
3345 \SpecialChar LyX
3346  allows you to include files quite easily with 
3347 \begin_inset Flex Noun
3348 status collapsed
3349
3350 \begin_layout Plain Layout
3351 Insert\SpecialChar menuseparator
3352 ChiId
3353 \begin_inset space ~
3354 \end_inset
3355
3356 Document
3357 \end_layout
3358
3359 \end_inset
3360
3361 .
3362  When you click on this selection a small box is inserted into the file
3363  at the current cursor location.
3364  Clicking on the box raises a dialog which allows you to select the file
3365  to be included, and the method of its inclusion.
3366  
3367 \end_layout
3368
3369 \begin_layout Standard
3370 The file selection box should by now be obvious.
3371  The three inclusion methods are 
3372 \begin_inset Quotes eld
3373 \end_inset
3374
3375 include
3376 \begin_inset Quotes erd
3377 \end_inset
3378
3379
3380 \begin_inset Quotes eld
3381 \end_inset
3382
3383 input
3384 \begin_inset Quotes erd
3385 \end_inset
3386
3387 , and 
3388 \begin_inset Quotes eld
3389 \end_inset
3390
3391 verbatim
3392 \begin_inset Quotes erd
3393 \end_inset
3394
3395 .
3396  The difference between 
3397 \begin_inset Quotes eld
3398 \end_inset
3399
3400 include
3401 \begin_inset Quotes erd
3402 \end_inset
3403
3404  and 
3405 \begin_inset Quotes eld
3406 \end_inset
3407
3408 input
3409 \begin_inset Quotes erd
3410 \end_inset
3411
3412  is really only meaningful to \SpecialChar LaTeX
3413 perts, but the practical difference is that
3414  files that are 
3415 \begin_inset Quotes eld
3416 \end_inset
3417
3418 included
3419 \begin_inset Quotes erd
3420 \end_inset
3421
3422  are typeset beginning on a new page, while files that are 
3423 \begin_inset Quotes eld
3424 \end_inset
3425
3426 inputted
3427 \begin_inset Quotes erd
3428 \end_inset
3429
3430  are typeset starting on the current page.
3431 \end_layout
3432
3433 \begin_layout Standard
3434 Generally, the master file is converted into a full \SpecialChar LaTeX
3435  file before typesetting,
3436  while the included files are converted to \SpecialChar LaTeX
3437  files that do not have all the
3438  preamble information.
3439 \end_layout
3440
3441 \begin_layout Standard
3442
3443 \begin_inset Quotes eld
3444 \end_inset
3445
3446 verbatim
3447 \begin_inset Quotes erd
3448 \end_inset
3449
3450  included file allows you to include a file typeset exactly as it appears
3451  in the file, i.
3452 \begin_inset space \thinspace{}
3453 \end_inset
3454
3455 e.
3456 \begin_inset space \space{}
3457 \end_inset
3458
3459 in 
3460 \begin_inset Flex Code
3461 status collapsed
3462
3463 \begin_layout Plain Layout
3464 verbatim
3465 \end_layout
3466
3467 \end_inset
3468
3469  mode, with the characters set in a fixed-width typewriter font.
3470  Normally, spaces in this file are invisible, though two consecutive spaces
3471  are conserved, unlike \SpecialChar LyX
3472 's normal treatment of spaces.
3473  However, setting the 
3474 \begin_inset Flex Noun
3475 status collapsed
3476
3477 \begin_layout Plain Layout
3478 Mark
3479 \begin_inset space ~
3480 \end_inset
3481
3482 spaces
3483 \begin_inset space ~
3484 \end_inset
3485
3486 in
3487 \begin_inset space ~
3488 \end_inset
3489
3490 output
3491 \end_layout
3492
3493 \end_inset
3494
3495  checkbox typesets a mark to unambiguously define the presence of a space.
3496  
3497 \end_layout
3498
3499 \begin_layout Subsection
3500 Cross-References Between Files
3501 \end_layout
3502
3503 \begin_layout Standard
3504 \begin_inset Box Shadowbox
3505 position "t"
3506 hor_pos "c"
3507 has_inner_box 1
3508 inner_pos "t"
3509 use_parbox 0
3510 use_makebox 0
3511 width "100col%"
3512 special "none"
3513 height "1in"
3514 height_special "totalheight"
3515 thickness "0.4pt"
3516 separation "3pt"
3517 shadowsize "4pt"
3518 framecolor "black"
3519 backgroundcolor "none"
3520 status open
3521
3522 \begin_layout Plain Layout
3523 This section is somewhat out of date.
3524  Need to describe default master documents and how children are opened when
3525  the master is.
3526  [[FIXME]]
3527 \end_layout
3528
3529 \end_inset
3530
3531
3532 \end_layout
3533
3534 \begin_layout Standard
3535 It is possible to set up cross-references between the different files.
3536  First, open all the files in question: let's call them A and B in a two
3537  file example, where B is included in A.
3538  Let's say you insert a label in A, then want to reference it in B.
3539  Open the cross-reference dialog whilst in document B, and you can select
3540  the 
3541 \begin_inset Quotes eld
3542 \end_inset
3543
3544 buffer
3545 \begin_inset Quotes erd
3546 \end_inset
3547
3548  to use.
3549 \end_layout
3550
3551 \begin_layout Subsection
3552 Bibliography Lists in all Subdocuments
3553 \end_layout
3554
3555 \begin_layout Standard
3556 \begin_inset Box Frameless
3557 position "t"
3558 hor_pos "c"
3559 has_inner_box 1
3560 inner_pos "t"
3561 use_parbox 0
3562 use_makebox 0
3563 width "100col%"
3564 special "none"
3565 height "1in"
3566 height_special "totalheight"
3567 thickness "0.4pt"
3568 separation "3pt"
3569 shadowsize "4pt"
3570 framecolor "black"
3571 backgroundcolor "none"
3572 status open
3573
3574 \begin_layout Plain Layout
3575 This section also needs updating.
3576  There is now material about this on the wiki, and it could be copied here.
3577 \end_layout
3578
3579 \end_inset
3580
3581
3582 \end_layout
3583
3584 \begin_layout Standard
3585 Copy the bibliography list with all entries to all subdocuments and transform
3586  them to a comment.
3587  This way \SpecialChar LyX
3588  will find the 
3589 \begin_inset Flex Code
3590 status collapsed
3591
3592 \begin_layout Plain Layout
3593 .bib
3594 \end_layout
3595
3596 \end_inset
3597
3598 -files and you can easily insert references without making the bibliography
3599  list visible.
3600 \end_layout
3601
3602 \begin_layout Standard
3603 As the bibliography list is in a comment, \SpecialChar LaTeX
3604  won't use it and the references
3605  will look like this: [?], instead of like this: [1].
3606  One solution is to use the \SpecialChar LaTeX
3607 -package 
3608 \begin_inset Flex Code
3609 status collapsed
3610
3611 \begin_layout Plain Layout
3612 comment
3613 \end_layout
3614
3615 \end_inset
3616
3617  that will only include comments by processing the files separately.
3618  To do this, add in the \SpecialChar LaTeX
3619  preamble of every subdocument the following:
3620 \end_layout
3621
3622 \begin_layout LyX-Code
3623
3624 \backslash
3625 usepackage{comment}
3626 \end_layout
3627
3628 \begin_layout LyX-Code
3629
3630 \backslash
3631 includecomment{comment}
3632 \end_layout
3633
3634 \begin_layout Standard
3635 See also 
3636 \begin_inset Flex URL
3637 status collapsed
3638
3639 \begin_layout Plain Layout
3640
3641 http://wiki.lyx.org/FAQ/Unsorted#toc31
3642 \end_layout
3643
3644 \end_inset
3645
3646 .
3647 \end_layout
3648
3649 \begin_layout Section
3650 \SpecialChar LyX
3651  Archives
3652 \end_layout
3653
3654 \begin_layout Standard
3655 Users sometimes need to be able to 
3656 \begin_inset Quotes eld
3657 \end_inset
3658
3659 bundle
3660 \begin_inset Quotes erd
3661 \end_inset
3662
3663  a \SpecialChar LyX
3664  file together with all the images (and other files) on which it depends,
3665  either for sending to a publisher or for sharing with a co-author.
3666  \SpecialChar LyX
3667  2.0 includes a Python script (
3668 \begin_inset Flex Code
3669 status collapsed
3670
3671 \begin_layout Plain Layout
3672 lyxpak.py
3673 \end_layout
3674
3675 \end_inset
3676
3677 ) that automates this process.
3678  To use it, you must have either the 
3679 \begin_inset Flex Code
3680 status collapsed
3681
3682 \begin_layout Plain Layout
3683 zipfile
3684 \end_layout
3685
3686 \end_inset
3687
3688  or 
3689 \begin_inset Flex Code
3690 status collapsed
3691
3692 \begin_layout Plain Layout
3693 tarfile
3694 \end_layout
3695
3696 \end_inset
3697
3698  python modules installed on your system.
3699  By default, the script prefers the 
3700 \begin_inset Flex Code
3701 status collapsed
3702
3703 \begin_layout Plain Layout
3704 gzip
3705 \end_layout
3706
3707 \end_inset
3708
3709 -compressed 
3710 \begin_inset Flex Code
3711 status collapsed
3712
3713 \begin_layout Plain Layout
3714 tar
3715 \end_layout
3716
3717 \end_inset
3718
3719  format on Unix-like systems and the 
3720 \begin_inset Flex Code
3721 status collapsed
3722
3723 \begin_layout Plain Layout
3724 zip
3725 \end_layout
3726
3727 \end_inset
3728
3729  format on Windows.
3730 \end_layout
3731
3732 \begin_layout Standard
3733 \SpecialChar LyX
3734 's configuration process will set the script up to export a `\SpecialChar LyX
3735  Archive',
3736  and this format will then be available under 
3737 \begin_inset Flex Code
3738 status collapsed
3739
3740 \begin_layout Plain Layout
3741 File\SpecialChar menuseparator
3742 Export
3743 \end_layout
3744
3745 \end_inset
3746
3747 .
3748 \end_layout
3749
3750 \begin_layout Standard
3751 Independently of the platform, the generation of a particular archive format
3752  can be forced by adding either the 
3753 \begin_inset Flex Code
3754 status collapsed
3755
3756 \begin_layout Plain Layout
3757 -t
3758 \end_layout
3759
3760 \end_inset
3761
3762  (for the 
3763 \begin_inset Flex Code
3764 status collapsed
3765
3766 \begin_layout Plain Layout
3767 tar
3768 \end_layout
3769
3770 \end_inset
3771
3772  format) or 
3773 \begin_inset Flex Code
3774 status collapsed
3775
3776 \begin_layout Plain Layout
3777 -z
3778 \end_layout
3779
3780 \end_inset
3781
3782  (for the 
3783 \begin_inset Flex Code
3784 status collapsed
3785
3786 \begin_layout Plain Layout
3787 zip
3788 \end_layout
3789
3790 \end_inset
3791
3792  format) switch to the 
3793 \begin_inset Flex Code
3794 status collapsed
3795
3796 \begin_layout Plain Layout
3797 \SpecialChar LyX
3798 \SpecialChar menuseparator
3799 \SpecialChar LyX
3800  Archive
3801 \end_layout
3802
3803 \end_inset
3804
3805  converter in 
3806 \begin_inset Flex Code
3807 status collapsed
3808
3809 \begin_layout Plain Layout
3810 Tools\SpecialChar menuseparator
3811 Preferences\SpecialChar menuseparator
3812 File Handling\SpecialChar menuseparator
3813 Converters
3814 \end_layout
3815
3816 \end_inset
3817
3818 .
3819  (Make sure you add the switch after the script name, not before it.)
3820 \end_layout
3821
3822 \begin_layout Section
3823 Fancy Headers and Footers
3824 \end_layout
3825
3826 \begin_layout Standard
3827 The default page layout is rather plain; for an 
3828 \begin_inset Flex Code
3829 status collapsed
3830
3831 \begin_layout Plain Layout
3832 article
3833 \end_layout
3834
3835 \end_inset
3836
3837  document class, all you get is a centered page number at the bottom of
3838  the page.
3839  This document uses KOMA-script's book class, so it appears to be a bit
3840  fancier.
3841  But to really put on a show, you need to set the document page style to
3842  
3843 \begin_inset Quotes eld
3844 \end_inset
3845
3846 fancy
3847 \begin_inset Quotes erd
3848 \end_inset
3849
3850 , as mentioned in the 
3851 \emph on
3852 User Guide
3853 \emph default
3854 .
3855  This section describes the \SpecialChar LaTeX
3856  code you need to insert in your \SpecialChar LaTeX
3857  preamble in
3858  order to get the desired effects.
3859 \end_layout
3860
3861 \begin_layout Standard
3862 For more information on fancy headers, see the 
3863 \begin_inset Flex Code
3864 status collapsed
3865
3866 \begin_layout Plain Layout
3867 fancyhdr
3868 \end_layout
3869
3870 \end_inset
3871
3872  package documentation.
3873  (
3874 \begin_inset Flex URL
3875 status collapsed
3876
3877 \begin_layout Plain Layout
3878
3879 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3880 \end_layout
3881
3882 \end_inset
3883
3884 )
3885 \end_layout
3886
3887 \begin_layout Standard
3888 The page header is divided into three fields, not surprisingly labeled 
3889 \begin_inset Quotes eld
3890 \end_inset
3891
3892 left
3893 \begin_inset Quotes erd
3894 \end_inset
3895
3896
3897 \begin_inset Quotes eld
3898 \end_inset
3899
3900 center
3901 \begin_inset Quotes erd
3902 \end_inset
3903
3904 , and 
3905 \begin_inset Quotes eld
3906 \end_inset
3907
3908 right
3909 \begin_inset Quotes erd
3910 \end_inset
3911
3912 .
3913  The footer is also divided into these three fields.
3914  The \SpecialChar LaTeX
3915  commands to set these fields in the simplest manner are 
3916 \begin_inset Flex Code
3917 status collapsed
3918
3919 \begin_layout Plain Layout
3920
3921 \backslash
3922 lhead
3923 \end_layout
3924
3925 \end_inset
3926
3927
3928 \begin_inset Flex Code
3929 status collapsed
3930
3931 \begin_layout Plain Layout
3932
3933 \backslash
3934 chead
3935 \end_layout
3936
3937 \end_inset
3938
3939
3940 \begin_inset Flex Code
3941 status collapsed
3942
3943 \begin_layout Plain Layout
3944
3945 \backslash
3946 rhead
3947 \end_layout
3948
3949 \end_inset
3950
3951
3952 \begin_inset Flex Code
3953 status collapsed
3954
3955 \begin_layout Plain Layout
3956
3957 \backslash
3958 lfoot
3959 \end_layout
3960
3961 \end_inset
3962
3963 , etc.
3964  Suppose you wish to put your name in the upper left hand corner of each
3965  page.
3966  Simply insert the following command in the preamble: 
3967 \end_layout
3968
3969 \begin_layout Standard
3970
3971 \family typewriter
3972
3973 \backslash
3974 lhead{John Q.
3975  DocWriter}
3976 \end_layout
3977
3978 \begin_layout Standard
3979 You will now see your name in the upper left.
3980  If a field has a default entry that you would like to get rid of (often
3981  the page number appears in the central footer) simply include a command
3982  with a blank argument, e.
3983 \begin_inset space \thinspace{}
3984 \end_inset
3985
3986 g.:
3987 \end_layout
3988
3989 \begin_layout Standard
3990
3991 \family typewriter
3992
3993 \backslash
3994 cfoot{}
3995 \end_layout
3996
3997 \begin_layout Standard
3998 Let's get really fancy: lets put the section number with the word 
3999 \begin_inset Quotes eld
4000 \end_inset
4001
4002 Section
4003 \begin_inset Quotes erd
4004 \end_inset
4005
4006  (e.
4007 \begin_inset space \thinspace{}
4008 \end_inset
4009
4010 g.
4011 \begin_inset space \space{}
4012 \end_inset
4013
4014 Section 3) in the upper left, the page number (e.
4015 \begin_inset space \thinspace{}
4016 \end_inset
4017
4018 g.
4019 \begin_inset space \space{}
4020 \end_inset
4021
4022 Page 4) in the upper right, your name in the lower left, and the date in
4023  the lower right.
4024  The following commands should now appear in the preamble:
4025 \end_layout
4026
4027 \begin_layout Standard
4028
4029 \family typewriter
4030
4031 \backslash
4032 lhead{Section 
4033 \backslash
4034 thesection}
4035 \end_layout
4036
4037 \begin_layout Standard
4038
4039 \family typewriter
4040
4041 \backslash
4042 chead{}
4043 \end_layout
4044
4045 \begin_layout Standard
4046
4047 \family typewriter
4048
4049 \backslash
4050 rhead{Page 
4051 \backslash
4052 thepage}
4053 \end_layout
4054
4055 \begin_layout Standard
4056
4057 \family typewriter
4058
4059 \backslash
4060 lfoot{John Q.
4061  DocWriter}
4062 \end_layout
4063
4064 \begin_layout Standard
4065
4066 \family typewriter
4067
4068 \backslash
4069 cfoot{}
4070 \end_layout
4071
4072 \begin_layout Standard
4073
4074 \family typewriter
4075
4076 \backslash
4077 rfoot{
4078 \backslash
4079 today}
4080 \end_layout
4081
4082 \begin_layout Standard
4083 The commands 
4084 \begin_inset Flex Code
4085 status collapsed
4086
4087 \begin_layout Plain Layout
4088
4089 \backslash
4090 thesection
4091 \end_layout
4092
4093 \end_inset
4094
4095  and 
4096 \begin_inset Flex Code
4097 status collapsed
4098
4099 \begin_layout Plain Layout
4100
4101 \backslash
4102 thepage
4103 \end_layout
4104
4105 \end_inset
4106
4107  access \SpecialChar LaTeX
4108 's section and page counters, and so print out the current section
4109  and page numbers.
4110  
4111 \begin_inset Flex Code
4112 status collapsed
4113
4114 \begin_layout Plain Layout
4115
4116 \backslash
4117 today
4118 \end_layout
4119
4120 \end_inset
4121
4122  simply prints out today's date.
4123 \end_layout
4124
4125 \begin_layout Standard
4126 The thicknesses of the horizontal rules drawn beneath the header and above
4127  the footer can also be modified.
4128  If you don't want one of the rules, set its thickness to 0.
4129  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
4130  Use commands
4131 \family typewriter
4132  
4133 \family default
4134 like 
4135 \begin_inset Flex Code
4136 status collapsed
4137
4138 \begin_layout Plain Layout
4139
4140 \backslash
4141 renewcommand{
4142 \backslash
4143 headrulewidth}{0.4pt}
4144 \end_layout
4145
4146 \end_inset
4147
4148  and 
4149 \begin_inset Flex Code
4150 status collapsed
4151
4152 \begin_layout Plain Layout
4153
4154 \backslash
4155 renewcommand{
4156 \backslash
4157 footrulewidth}{0.4pt}
4158 \end_layout
4159
4160 \end_inset
4161
4162  to set the thicknesses.
4163 \end_layout
4164
4165 \begin_layout Standard
4166 You can switch the header/footer settings on and off for individual pages
4167  using commands like 
4168 \begin_inset Flex Code
4169 status collapsed
4170
4171 \begin_layout Plain Layout
4172
4173 \backslash
4174 thispagestyle{empty}
4175 \end_layout
4176
4177 \end_inset
4178
4179
4180 \begin_inset Flex Code
4181 status collapsed
4182
4183 \begin_layout Plain Layout
4184
4185 \backslash
4186 thispagestyle{plain}
4187 \end_layout
4188
4189 \end_inset
4190
4191 , and 
4192 \begin_inset Flex Code
4193 status collapsed
4194
4195 \begin_layout Plain Layout
4196
4197 \backslash
4198 thispagestyle{fancy}
4199 \end_layout
4200
4201 \end_inset
4202
4203 .
4204  Simply insert them in the text on the page you want changed and mark them
4205  as \SpecialChar TeX
4206  code.
4207  In fact, title pages are marked as plain by default, while following pages
4208  are marked fancy when using the global fancy setting.
4209 \end_layout
4210
4211 \begin_layout Standard
4212 As a final example, it is possible to include an image in the header or
4213  footer.
4214  Suppose you want to put a company logo in the upper lefthand corner.
4215  You might try something like
4216 \end_layout
4217
4218 \begin_layout Standard
4219
4220 \family typewriter
4221
4222 \backslash
4223 lhead{
4224 \backslash
4225 resizebox{1in}{!}{
4226 \backslash
4227 includegraphics{logo.eps}}}
4228 \end_layout
4229
4230 \begin_layout Standard
4231 \noindent
4232 (you may need to preface this with 
4233 \begin_inset Flex Code
4234 status collapsed
4235
4236 \begin_layout Plain Layout
4237 \noindent
4238
4239 \backslash
4240 usepackage{graphics}
4241 \end_layout
4242
4243 \end_inset
4244
4245  if you don't include graphics elsewhere in your document).
4246 \end_layout
4247
4248 \begin_layout Section
4249 Itemize Bullet Selection
4250 \begin_inset CommandInset label
4251 LatexCommand label
4252 name "sec:bullet"
4253
4254 \end_inset
4255
4256
4257 \end_layout
4258
4259 \begin_layout Standard
4260 by
4261 \noun on
4262  Allan Rae
4263 \end_layout
4264
4265 \begin_layout Subsection
4266 Introduction
4267 \end_layout
4268
4269 \begin_layout Standard
4270 \SpecialChar LyX
4271  provides 216 bullet shapes that can be accessed from a simple dialog.
4272  Using this dialog you can easily specify what bullet shape to use at each
4273  level of an itemized list.
4274  These settings are document-wide so you won't be able to specify different
4275  sets of bullets for different paragraphs.
4276 \begin_inset Foot
4277 status collapsed
4278
4279 \begin_layout Plain Layout
4280 Well, actually you can but you'll have to do it by hand.
4281 \end_layout
4282
4283 \end_inset
4284
4285
4286 \end_layout
4287
4288 \begin_layout Subsection
4289 How it looks
4290 \end_layout
4291
4292 \begin_layout Standard
4293 Open the dialog by selecting the 
4294 \begin_inset Flex Noun
4295 status collapsed
4296
4297 \begin_layout Plain Layout
4298 Document\SpecialChar menuseparator
4299 Settings
4300 \end_layout
4301
4302 \end_inset
4303
4304  menu item and then select the 
4305 \begin_inset Flex Noun
4306 status collapsed
4307
4308 \begin_layout Plain Layout
4309 Bullets
4310 \end_layout
4311
4312 \end_inset
4313
4314  tab.
4315 \end_layout
4316
4317 \begin_layout Standard
4318 The dialog provides you with a table of bullet shapes.
4319  A column of buttons on the left of the table provides access to the six
4320  different panels of bullet shapes.
4321  The row of buttons across the top is used to select which bullet depth
4322  you are changing.
4323  A text entry under the table shows the currently selected bullet shape's
4324  \SpecialChar LaTeX
4325  equivalent and this can be edited if desired.
4326  If you do modify the text you will also need to specify any needed packages
4327  in the \SpecialChar LaTeX
4328  preamble.
4329 \end_layout
4330
4331 \begin_layout Standard
4332 The six panels are divided up by the packages they require.
4333  The following table shows the mappings from button name to \SpecialChar LaTeX
4334  package.
4335 \end_layout
4336
4337 \begin_layout Standard
4338 \align center
4339 \begin_inset Tabular
4340 <lyxtabular version="3" rows="7" columns="2">
4341 <features tabularvalignment="middle">
4342 <column alignment="center" valignment="top" width="0pt">
4343 <column alignment="center" valignment="top" width="0pt">
4344 <row>
4345 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4346 \begin_inset Text
4347
4348 \begin_layout Plain Layout
4349
4350 \family roman
4351 \series medium
4352 \shape up
4353 \size normal
4354 \emph off
4355 \bar no
4356 \noun off
4357 \color none
4358 Button
4359 \end_layout
4360
4361 \end_inset
4362 </cell>
4363 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4364 \begin_inset Text
4365
4366 \begin_layout Plain Layout
4367
4368 \family roman
4369 \series medium
4370 \shape up
4371 \size normal
4372 \emph off
4373 \bar no
4374 \noun off
4375 \color none
4376 Packages Required
4377 \end_layout
4378
4379 \end_inset
4380 </cell>
4381 </row>
4382 <row>
4383 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4384 \begin_inset Text
4385
4386 \begin_layout Plain Layout
4387
4388 \family sans
4389 \series medium
4390 \shape up
4391 \size normal
4392 \emph off
4393 \bar no
4394 \noun off
4395 \color none
4396 Standard
4397 \end_layout
4398
4399 \end_inset
4400 </cell>
4401 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4402 \begin_inset Text
4403
4404 \begin_layout Plain Layout
4405
4406 \series medium
4407 \shape up
4408 \size normal
4409 \emph off
4410 \bar no
4411 \noun off
4412 \color none
4413 base \SpecialChar LaTeX
4414
4415 \end_layout
4416
4417 \end_inset
4418 </cell>
4419 </row>
4420 <row>
4421 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4422 \begin_inset Text
4423
4424 \begin_layout Plain Layout
4425
4426 \family sans
4427 \series medium
4428 \shape up
4429 \size normal
4430 \emph off
4431 \bar no
4432 \noun off
4433 \color none
4434 Maths
4435 \end_layout
4436
4437 \end_inset
4438 </cell>
4439 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4440 \begin_inset Text
4441
4442 \begin_layout Plain Layout
4443
4444 \family typewriter
4445 \series medium
4446 \shape up
4447 \size normal
4448 \emph off
4449 \bar no
4450 \noun off
4451 \color none
4452 amssymb.sty
4453 \end_layout
4454
4455 \end_inset
4456 </cell>
4457 </row>
4458 <row>
4459 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4460 \begin_inset Text
4461
4462 \begin_layout Plain Layout
4463
4464 \family sans
4465 \series medium
4466 \shape up
4467 \size normal
4468 \emph off
4469 \bar no
4470 \noun off
4471 \color none
4472 Ding1
4473 \end_layout
4474
4475 \end_inset
4476 </cell>
4477 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4478 \begin_inset Text
4479
4480 \begin_layout Plain Layout
4481
4482 \family typewriter
4483 \series medium
4484 \shape up
4485 \size normal
4486 \emph off
4487 \bar no
4488 \noun off
4489 \color none
4490 pifont.sty
4491 \end_layout
4492
4493 \end_inset
4494 </cell>
4495 </row>
4496 <row>
4497 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4498 \begin_inset Text
4499
4500 \begin_layout Plain Layout
4501
4502 \family sans
4503 \series medium
4504 \shape up
4505 \size normal
4506 \emph off
4507 \bar no
4508 \noun off
4509 \color none
4510 Ding2
4511 \end_layout
4512
4513 \end_inset
4514 </cell>
4515 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4516 \begin_inset Text
4517
4518 \begin_layout Plain Layout
4519
4520 \family typewriter
4521 \series medium
4522 \shape up
4523 \size normal
4524 \emph off
4525 \bar no
4526 \noun off
4527 \color none
4528 pifont.sty
4529 \end_layout
4530
4531 \end_inset
4532 </cell>
4533 </row>
4534 <row>
4535 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4536 \begin_inset Text
4537
4538 \begin_layout Plain Layout
4539
4540 \family sans
4541 \series medium
4542 \shape up
4543 \size normal
4544 \emph off
4545 \bar no
4546 \noun off
4547 \color none
4548 Ding3
4549 \end_layout
4550
4551 \end_inset
4552 </cell>
4553 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4554 \begin_inset Text
4555
4556 \begin_layout Plain Layout
4557
4558 \family typewriter
4559 \series medium
4560 \shape up
4561 \size normal
4562 \emph off
4563 \bar no
4564 \noun off
4565 \color none
4566 pifont.sty
4567 \end_layout
4568
4569 \end_inset
4570 </cell>
4571 </row>
4572 <row>
4573 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4574 \begin_inset Text
4575
4576 \begin_layout Plain Layout
4577
4578 \family sans
4579 \series medium
4580 \shape up
4581 \size normal
4582 \emph off
4583 \bar no
4584 \noun off
4585 \color none
4586 Ding4
4587 \end_layout
4588
4589 \end_inset
4590 </cell>
4591 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4592 \begin_inset Text
4593
4594 \begin_layout Plain Layout
4595
4596 \family typewriter
4597 \series medium
4598 \shape up
4599 \size normal
4600 \emph off
4601 \bar no
4602 \noun off
4603 \color none
4604 pifont.sty
4605 \end_layout
4606
4607 \end_inset
4608 </cell>
4609 </row>
4610 </lyxtabular>
4611
4612 \end_inset
4613
4614
4615 \end_layout
4616
4617 \begin_layout Standard
4618 \SpecialChar LyX
4619  doesn't stop you using bullets from packages you don't have.
4620  If you get errors from \SpecialChar LaTeX
4621  when you try to view or print the file, then it
4622  is likely you are missing a package.
4623 \begin_inset Foot
4624 status collapsed
4625
4626 \begin_layout Plain Layout
4627 \SpecialChar LyX
4628  doesn't restrict your use since you may be editing locally and exporting
4629  elsewhere.
4630 \end_layout
4631
4632 \end_inset
4633
4634
4635 \end_layout
4636
4637 \begin_layout Subsection
4638 How to use it
4639 \end_layout
4640
4641 \begin_layout Standard
4642 Select which bullet depth you want to change then select the bullet shape
4643  and size.
4644  Any changes will not be visible in \SpecialChar LyX
4645 , but are visible when viewing the document.
4646 \end_layout
4647
4648 \begin_layout Standard
4649 You can reset a bullet shape to the default simply by clicking your right
4650  mouse button on the appropriate bullet depth button.
4651 \begin_inset Foot
4652 status collapsed
4653
4654 \begin_layout Plain Layout
4655 If you 
4656 \emph on
4657 really
4658 \emph default
4659  want to have multiple sets of paragraphs with different sets of bullets
4660  in each, then you're going to have to get your hands dirty with \SpecialChar TeX
4661  code.
4662  The bullet selection dialog can help though because it provides you with
4663  the \SpecialChar LaTeX
4664  code for a wide range of bullet shapes.
4665  To make your own custom paragraphs you have the following options:
4666 \end_layout
4667
4668 \begin_layout Plain Layout
4669 \begin_inset ERT
4670 status open
4671
4672 \begin_layout Plain Layout
4673
4674
4675 \backslash
4676 let
4677 \backslash
4678 savelabelitemi=
4679 \backslash
4680 labelitemi
4681 \end_layout
4682
4683 \end_inset
4684
4685
4686 \end_layout
4687
4688 \begin_layout Plain Layout
4689 \begin_inset ERT
4690 status open
4691
4692 \begin_layout Plain Layout
4693
4694
4695 \backslash
4696 renewcommand
4697 \backslash
4698 labelitemi[0]{
4699 \backslash
4700 small
4701 \backslash
4702 (
4703 \backslash
4704 sharp
4705 \backslash
4706 )}
4707 \end_layout
4708
4709 \end_inset
4710
4711
4712 \end_layout
4713
4714 \begin_layout Itemize
4715 Use the \SpecialChar LaTeX
4716  command 
4717 \begin_inset Flex Code
4718 status collapsed
4719
4720 \begin_layout Plain Layout
4721
4722 \backslash
4723 renewcommand{}{}
4724 \end_layout
4725
4726 \end_inset
4727
4728  to specify a new bullet shape for a given depth.
4729  You'll also need to save the current bullet shape so you can restore it
4730  again afterwards.
4731  In this itemized list the following \SpecialChar LaTeX
4732  code was used to change the bullet
4733  used for the first depth.
4734 \end_layout
4735
4736 \begin_deeper
4737 \begin_layout LyX-Code
4738
4739 \backslash
4740 let
4741 \backslash
4742 savelabelitemi=
4743 \backslash
4744 labelitemi 
4745 \end_layout
4746
4747 \begin_layout LyX-Code
4748
4749 \backslash
4750 renewcommand
4751 \backslash
4752 labelitemi[0]{
4753 \backslash
4754 small
4755 \backslash
4756 (
4757 \backslash
4758 sharp
4759 \backslash
4760 )}
4761 \end_layout
4762
4763 \end_deeper
4764 \begin_layout Itemize
4765 Note that the itemize depth is specified in Roman numerals as part of the
4766  
4767 \family typewriter
4768
4769 \backslash
4770 labelitem
4771 \family default
4772  command.
4773 \end_layout
4774
4775 \begin_layout Itemize
4776 \begin_inset ERT
4777 status open
4778
4779 \begin_layout Plain Layout
4780
4781 [
4782 \backslash
4783 (
4784 \backslash
4785 star
4786 \backslash
4787 )]
4788 \end_layout
4789
4790 \end_inset
4791
4792  Specify each individual entry by starting each item with the bullet shape
4793  enclosed in square brackets and set as 
4794 \begin_inset Flex Noun
4795 status collapsed
4796
4797 \begin_layout Plain Layout
4798 \SpecialChar TeX
4799  Code
4800 \end_layout
4801
4802 \end_inset
4803
4804 .
4805  For example, this item was started with 
4806 \begin_inset Flex Code
4807 status collapsed
4808
4809 \begin_layout Plain Layout
4810 [
4811 \backslash
4812 (
4813 \backslash
4814 star
4815 \backslash
4816 )]
4817 \end_layout
4818
4819 \end_inset
4820
4821 .
4822 \end_layout
4823
4824 \begin_layout Plain Layout
4825 \begin_inset ERT
4826 status open
4827
4828 \begin_layout Plain Layout
4829
4830
4831 \backslash
4832 renewcommand
4833 \backslash
4834 labelitemi[0]{
4835 \backslash
4836 savelabelitemi}
4837 \end_layout
4838
4839 \end_inset
4840
4841
4842 \end_layout
4843
4844 \begin_layout Plain Layout
4845 You'll also need to revert the labelitem back to its previous setting for
4846  the global bullet shape settings to remain in effect.
4847  The way used here was:
4848 \end_layout
4849
4850 \begin_layout LyX-Code
4851
4852 \backslash
4853 renewcommand
4854 \backslash
4855 labelitemi[0]{
4856 \backslash
4857 savelabelitemi}
4858 \end_layout
4859
4860 \end_inset
4861
4862
4863 \end_layout
4864
4865 \begin_layout Chapter
4866 \SpecialChar LyX
4867  and the World Wide Web
4868 \end_layout
4869
4870 \begin_layout Standard
4871 \SpecialChar LyX
4872  has long supported the export of documents to various web-friendly formats,
4873  such as HTML.
4874  Before verson 2.0, however, HTML export was always accomplished by the use
4875  of external converters.
4876 \begin_inset Foot
4877 status collapsed
4878
4879 \begin_layout Plain Layout
4880 For details on the use of external converters with \SpecialChar LyX
4881 , see the 
4882 \emph on
4883 Converters
4884 \emph default
4885  section of the Customization manual.
4886 \end_layout
4887
4888 \end_inset
4889
4890  These fall into two large groups: there are converters that use \SpecialChar LaTeX
4891  as an
4892  intermediate format, such as 
4893 \begin_inset Flex Code
4894 status collapsed
4895
4896 \begin_layout Plain Layout
4897 htlatex
4898 \end_layout
4899
4900 \end_inset
4901
4902
4903 \begin_inset Flex Code
4904 status collapsed
4905
4906 \begin_layout Plain Layout
4907 html2latex
4908 \end_layout
4909
4910 \end_inset
4911
4912 , and 
4913 \begin_inset Flex Code
4914 status collapsed
4915
4916 \begin_layout Plain Layout
4917 plastex
4918 \end_layout
4919
4920 \end_inset
4921
4922 , relying upon \SpecialChar LyX
4923  to produce the \SpecialChar LaTeX
4924 ; and there is a converter that works directly
4925  on \SpecialChar LyX
4926  files, 
4927 \begin_inset Flex Code
4928 status collapsed
4929
4930 \begin_layout Plain Layout
4931 e\SpecialChar LyX
4932 er
4933 \end_layout
4934
4935 \end_inset
4936
4937 .
4938  All of these have different advantages and disadvantages.
4939  
4940 \end_layout
4941
4942 \begin_layout Standard
4943 The \SpecialChar LaTeX
4944 -based converters have the advantage that, in principle, they know everythin
4945 g about the exported document that \SpecialChar LaTeX
4946  does.
4947  Such converters do not care, for example, if a certain block of code was
4948  produced by \SpecialChar LyX
4949  or was Evil Red Text.
4950  These converters know about 
4951 \begin_inset Flex Code
4952 status collapsed
4953
4954 \begin_layout Plain Layout
4955 aux
4956 \end_layout
4957
4958 \end_inset
4959
4960  files, counters, and references, and can often make use of the 
4961 \begin_inset Flex Code
4962 status collapsed
4963
4964 \begin_layout Plain Layout
4965 bbl
4966 \end_layout
4967
4968 \end_inset
4969
4970  files generated by Bib\SpecialChar TeX
4971 .
4972  On the other hand, \SpecialChar LaTeX
4973  is a very hard language to parse—it is sometimes said
4974  that only \SpecialChar TeX
4975  itself understands \SpecialChar TeX
4976 —and \SpecialChar LaTeX
4977 -based converters will often choke on
4978  what seem to be quite simple constructs; complex ones can throw them completely
4979 , and as of this writing, for example, the 
4980 \emph on
4981 Embedded Objects
4982 \emph default
4983  manual will not export with 
4984 \begin_inset Flex Code
4985 status collapsed
4986
4987 \begin_layout Plain Layout
4988 htlatex
4989 \end_layout
4990
4991 \end_inset
4992
4993 , though the others will.
4994  The other issue concerns how math is handled.
4995  These converters typically convert the formulae into little pictures that
4996  are then linked from the HTML document.
4997  Since these are actually generated by \SpecialChar LaTeX
4998 , they are accurate.
4999  But they do not scale well, and just getting them to look as if they are
5000  actually meant to be in your document—so that the font sizes seem to be
5001  roughly the same—can be a challenge.
5002 \end_layout
5003
5004 \begin_layout Standard
5005 Alex Fernandez's 
5006 \begin_inset Flex Code
5007 status collapsed
5008
5009 \begin_layout Plain Layout
5010 e\SpecialChar LyX
5011 er
5012 \end_layout
5013
5014 \end_inset
5015
5016  (
5017 \begin_inset CommandInset href
5018 LatexCommand href
5019 name "http://elyxer.nongnu.org/"
5020 target "http://elyxer.nongnu.org/"
5021 literal "false"
5022
5023 \end_inset
5024
5025 ) solves some of these problems.
5026  In particular, the formulae it produces scale perfectly, since it renders
5027  math using a combination of HTML and CSS rather than converting the formulae
5028  to images.
5029  But even moderately complex formula are rendered less well than with 
5030 \begin_inset Flex Code
5031 status collapsed
5032
5033 \begin_layout Plain Layout
5034 htlatex
5035 \end_layout
5036
5037 \end_inset
5038
5039 ; this reflects the limitations of HTML.
5040 \begin_inset Foot
5041 status collapsed
5042
5043 \begin_layout Plain Layout
5044 That said, 
5045 \begin_inset Flex Code
5046 status collapsed
5047
5048 \begin_layout Plain Layout
5049 e\SpecialChar LyX
5050 er
5051 \end_layout
5052
5053 \end_inset
5054
5055  can also use jsMath and MathJax for equations, but this setting is only
5056  available globally and requires one to have access to a server that runs
5057  the backend.
5058 \end_layout
5059
5060 \end_inset
5061
5062  More importantly (as of version 1.1.1, at least), 
5063 \begin_inset Flex Code
5064 status collapsed
5065
5066 \begin_layout Plain Layout
5067 e\SpecialChar LyX
5068 er
5069 \end_layout
5070
5071 \end_inset
5072
5073  has limited support for math macros and no support for user-defined paragraph
5074  or character styles.
5075  These limitations make 
5076 \begin_inset Flex Code
5077 status collapsed
5078
5079 \begin_layout Plain Layout
5080 e\SpecialChar LyX
5081 er
5082 \end_layout
5083
5084 \end_inset
5085
5086  unsuitable for many of the documents \SpecialChar LyX
5087  users produce.
5088  In principle, of course, these problems could be solved, but the \SpecialChar LyX
5089  developers
5090  have decided to follow a different path and have made \SpecialChar LyX
5091  itself capable of
5092  writing XHTML, just as it is capable of writing \SpecialChar LaTeX
5093 , DocBook, and plaintext.
5094 \end_layout
5095
5096 \begin_layout Standard
5097 As of this writing, XHTML output remains under development and should probably
5098  be regarded as 
5099 \begin_inset Quotes eld
5100 \end_inset
5101
5102 experimental
5103 \begin_inset Quotes erd
5104 \end_inset
5105
5106 .
5107 \begin_inset Foot
5108 status collapsed
5109
5110 \begin_layout Plain Layout
5111 The file 
5112 \begin_inset Flex Code
5113 status collapsed
5114
5115 \begin_layout Plain Layout
5116 development/HTML.notes
5117 \end_layout
5118
5119 \end_inset
5120
5121 , which can be found in the \SpecialChar LyX
5122  source tree or 
5123 \begin_inset CommandInset href
5124 LatexCommand href
5125 name "accessed online"
5126 target "http://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
5127 literal "false"
5128
5129 \end_inset
5130
5131 , usually contains up-to-date information about the state of XHTML output.
5132  See also the list of XHTML bugs on 
5133 \begin_inset CommandInset href
5134 LatexCommand href
5135 name "the bug tracker"
5136 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"
5137 literal "false"
5138
5139 \end_inset
5140
5141 .
5142 \end_layout
5143
5144 \end_inset
5145
5146  Still, the developers have chosen this approach because it has several
5147  potential advantages over the other two.
5148 \end_layout
5149
5150 \begin_layout Standard
5151 These advantages are primarily due to the fact that the XHTML output routines,
5152  since they are part of \SpecialChar LyX
5153 , know everything \SpecialChar LyX
5154  knows about the document being
5155  exported.
5156 \begin_inset Foot
5157 status collapsed
5158
5159 \begin_layout Plain Layout
5160 Another advantage is that, since these routines are internal to \SpecialChar LyX
5161 , they are
5162  immune to changes in \SpecialChar LyX
5163 's file format, or to changes in the semantics of
5164  existing insets.
5165 \end_layout
5166
5167 \end_inset
5168
5169  So they know about the table of contents (as displayed in the outline),
5170  about the counters associated with different paragraph styles, and about
5171  user-defined styles.
5172  The XHTML output routines know what \SpecialChar LyX
5173  knows about internationalization,
5174  too, so they will output 
5175 \begin_inset Quotes eld
5176 \end_inset
5177
5178 Chapter 1
5179 \begin_inset Quotes erd
5180 \end_inset
5181
5182  or 
5183 \begin_inset Quotes eld
5184 \end_inset
5185
5186
5187 \lang ngerman
5188 Kapitel
5189 \lang english
5190  1
5191 \begin_inset Quotes erd
5192 \end_inset
5193
5194 , depending upon the language in effect at the time.
5195  
5196 \end_layout
5197
5198 \begin_layout Standard
5199 Quite generally, the output routines know what \SpecialChar LyX
5200  knows about document layout,
5201  that is, about how the document is to be rendered on screen.
5202  We use this information when we output the document as XHTML.
5203  In particular, \SpecialChar LyX
5204  
5205 \emph on
5206 automatically
5207 \emph default
5208  generates CSS style information corresponding to the layout information
5209  it uses to render the document on screen: if section headings are supposed
5210  to be sans-serif and bold as seen in \SpecialChar LyX
5211 , then (by default) they will be sans-seri
5212 f and bold when viewed in a web browser, too.
5213  And this is true not just for pre-defined styles, like Section, but for
5214  any style, including user-defined styles.
5215  Indeed, the XHTML output routines make no distinction between user-defined
5216  paragraph and character styles and \SpecialChar LyX
5217 's own pre-defined styles: in each case,
5218  everything \SpecialChar LyX
5219  knows about the styles is contained in the layout files.
5220  And much the same is true as regards pre-defined textual insets, such as
5221  footnotes, and various custom insets.
5222  
5223 \end_layout
5224
5225 \begin_layout Standard
5226 The result is that XHTML output can be customized and extended in exactly
5227  the same way \SpecialChar LaTeX
5228  output can be customized and extended: through layout files
5229  and modules.
5230  See chapter five of the 
5231 \emph on
5232 Customization 
5233 \emph default
5234 manual for the details.
5235 \end_layout
5236
5237 \begin_layout Standard
5238 The remainder of this chapter contains more detailed information on XHTML
5239  output, its limitations, and ways to work around those limitations.
5240 \end_layout
5241
5242 \begin_layout Section
5243 Math Output in XHTML
5244 \end_layout
5245
5246 \begin_layout Standard
5247 \SpecialChar LyX
5248  offers four choices for how math is rendered.
5249  These have various advantages and disadvantages:
5250 \end_layout
5251
5252 \begin_layout Itemize
5253 MathML
5254 \begin_inset Newline newline
5255 \end_inset
5256
5257 MathML is a dialect of XML designed specifically for mathematics on the
5258  web, and it typically renders very well in browsers that support it.
5259  The disadvantage is that not all browsers support MathML, and support is
5260  not complete even in the Gecko-based browsers, such as Firefox.
5261 \begin_inset Newline newline
5262 \end_inset
5263
5264 If \SpecialChar LyX
5265  is unable to render a formula as MathML—for example, if the formula
5266  uses the 
5267 \begin_inset Flex Code
5268 status collapsed
5269
5270 \begin_layout Plain Layout
5271 xymatrix
5272 \end_layout
5273
5274 \end_inset
5275
5276  package or ERT—then it will instead output the formula as an image.
5277  
5278 \end_layout
5279
5280 \begin_layout Itemize
5281 HTML
5282 \begin_inset Newline newline
5283 \end_inset
5284
5285 As mentioned above, 
5286 \begin_inset Flex Code
5287 status collapsed
5288
5289 \begin_layout Plain Layout
5290 elyxer
5291 \end_layout
5292
5293 \end_inset
5294
5295  outputs math as HTML, styled by CSS.
5296 \begin_inset Foot
5297 status collapsed
5298
5299 \begin_layout Plain Layout
5300 \SpecialChar LyX
5301  has borrowed some of the CSS for its HTML output from 
5302 \begin_inset Flex Code
5303 status collapsed
5304
5305 \begin_layout Plain Layout
5306 elyxer
5307 \end_layout
5308
5309 \end_inset
5310
5311 .
5312 \end_layout
5313
5314 \end_inset
5315
5316  For simple formulae, this can work quite well, though with more complicated
5317  formulae it tends to break down.
5318  Still, this method has the advantage that it is very widely supported and
5319  so it may be appropriate for documents that contain only a little, fairly
5320  simple math.
5321 \begin_inset Newline newline
5322 \end_inset
5323
5324 If Lyx is unable to render a formula as HTML—for example, if the formula
5325  uses the 
5326 \begin_inset Flex Code
5327 status collapsed
5328
5329 \begin_layout Plain Layout
5330 xymatrix
5331 \end_layout
5332
5333 \end_inset
5334
5335  package or ERT—then it will instead output the formula as an image.
5336  
5337 \end_layout
5338
5339 \begin_layout Itemize
5340 Images
5341 \begin_inset Newline newline
5342 \end_inset
5343
5344 Like 
5345 \begin_inset Flex Code
5346 status collapsed
5347
5348 \begin_layout Plain Layout
5349 htlatex
5350 \end_layout
5351
5352 \end_inset
5353
5354 , \SpecialChar LyX
5355  will output formulae as images, the very same images, in fact, that are
5356  used for instant preview.
5357 \begin_inset Foot
5358 status collapsed
5359
5360 \begin_layout Plain Layout
5361 Instant preview does 
5362 \emph on
5363 not 
5364 \emph default
5365 have to be on for images to be output, however.
5366 \end_layout
5367
5368 \end_inset
5369
5370  The advantage to this method is that the images are simply generated by
5371  \SpecialChar LaTeX
5372 , so they are very accurate.
5373  The disadvantage, as mentioned earlier, is that these are bitmapped images,
5374  so they do not scale terribly well, and one cannot copy them, etc.
5375  (As of this writing, there are also problems about equation numbering.
5376  See 
5377 \begin_inset CommandInset href
5378 LatexCommand href
5379 name "bug 6894"
5380 target "http://www.lyx.org/trac/ticket/6894"
5381 literal "false"
5382
5383 \end_inset
5384
5385 .)
5386 \begin_inset Newline newline
5387 \end_inset
5388
5389 The size of the images can be controlled by setting the 
5390 \begin_inset Quotes eld
5391 \end_inset
5392
5393 Math Images Scaling
5394 \begin_inset Quotes erd
5395 \end_inset
5396
5397  parameter under 
5398 \begin_inset Flex Noun
5399 status collapsed
5400
5401 \begin_layout Plain Layout
5402 Document\SpecialChar menuseparator
5403 Settings\SpecialChar menuseparator
5404 Output
5405 \end_layout
5406
5407 \end_inset
5408
5409 .
5410 \begin_inset Foot
5411 status collapsed
5412
5413 \begin_layout Plain Layout
5414 For those who want to know, this controls the resolution of the image in
5415  dots per inch and is based upon a default of 75 dpi.
5416 \end_layout
5417
5418 \end_inset
5419
5420
5421 \begin_inset Newline newline
5422 \end_inset
5423
5424 If \SpecialChar LyX
5425  for some reason fails to create an image for a formula (e.g., if a required
5426  \SpecialChar LaTeX
5427  package is not installed), then it will fall back to outputing the raw
5428  \SpecialChar LaTeX
5429 .
5430 \end_layout
5431
5432 \begin_layout Itemize
5433 \SpecialChar LaTeX
5434
5435 \begin_inset Newline newline
5436 \end_inset
5437
5438 Finally, \SpecialChar LyX
5439  will happily output math as \SpecialChar LaTeX
5440 .
5441  As well as being the output of last resort, this method can be used with
5442  such tools as 
5443 \begin_inset CommandInset href
5444 LatexCommand href
5445 name "jsMath"
5446 target "http://www.math.union.edu/~dpvc/jsMath/"
5447 literal "false"
5448
5449 \end_inset
5450
5451 , which uses JavaScript to render \SpecialChar LaTeX
5452  embedded in HTML documents.
5453  \SpecialChar LyX
5454  wraps the \SpecialChar LaTeX
5455  in either a 
5456 \begin_inset Flex Code
5457 status collapsed
5458
5459 \begin_layout Plain Layout
5460 span
5461 \end_layout
5462
5463 \end_inset
5464
5465  (for inline formulas) or 
5466 \begin_inset Flex Code
5467 status collapsed
5468
5469 \begin_layout Plain Layout
5470 div
5471 \end_layout
5472
5473 \end_inset
5474
5475  (for displayed formulas) with 
5476 \begin_inset Flex Code
5477 status collapsed
5478
5479 \begin_layout Plain Layout
5480 class='math'
5481 \end_layout
5482
5483 \end_inset
5484
5485 , as is required for jsMath.
5486 \end_layout
5487
5488 \begin_layout Standard
5489 One of these output methods must be selected under 
5490 \begin_inset Flex Noun
5491 status collapsed
5492
5493 \begin_layout Plain Layout
5494 Document\SpecialChar menuseparator
5495 Settings\SpecialChar menuseparator
5496 Output
5497 \end_layout
5498
5499 \end_inset
5500
5501 .
5502  By default, \SpecialChar LyX
5503  outputs MathML.
5504  This is a document-wide setting, therefore.
5505 \end_layout
5506
5507 \begin_layout Standard
5508 Eventually, \SpecialChar LyX
5509  will offer the user the option to select an alternate output
5510  method for a particular inset, say, one that isn't being rendered very
5511  well by MathML.
5512 \begin_inset Foot
5513 status collapsed
5514
5515 \begin_layout Plain Layout
5516 That said, since \SpecialChar LyX
5517  falls back to images if the inset contains ERT, then one
5518  can force output as an image by putting some harmless ERT into the math,
5519  for example: 
5520 \begin_inset Formula $a=b\relax$
5521 \end_inset
5522
5523 .
5524 \end_layout
5525
5526 \end_inset
5527
5528
5529 \end_layout
5530
5531 \begin_layout Section
5532 Bibliography and Citations
5533 \end_layout
5534
5535 \begin_layout Standard
5536 XHTML output fully supports bibliographies and citations.
5537  
5538 \end_layout
5539
5540 \begin_layout Standard
5541 Citation labels are generated by the same machinery that generates \SpecialChar LyX
5542 's on-screen
5543  labels, so the labels will look in the output much as they do in \SpecialChar LyX
5544 , though
5545  better.
5546  If you are using numerical citations, then \SpecialChar LyX
5547  will output numerical labels,
5548  such as [1] or [17], rather than simply showing the citation key in square
5549  brackets, as it does on-screen.
5550  If you are using author-year citations, then \SpecialChar LyX
5551  will add lowercase letters
5552  to the years, just as Bib\SpecialChar TeX
5553  does, if it finds more than one citation for
5554  a given author-year combination.
5555  The labels will be printed with the bibliography entries.
5556  Note that there is, at present, no way to customize the appearance of the
5557  labels, for example, to choose between square brackets and parentheses.
5558 \end_layout
5559
5560 \begin_layout Standard
5561 Bibliography output is handled by the same machinery that handles the presentati
5562 on of reference information in the citation dialog, so you will see in the
5563  XHTML output pretty much what you would see if you were to look at a given
5564  entry in the citation dialog.
5565  The formatting can be customized in your layout file or, preferably, in
5566  a module.
5567  See the 
5568 \emph on
5569 Customization
5570 \emph default
5571  manual for the details.
5572 \end_layout
5573
5574 \begin_layout Standard
5575 The main defect at present is that cross-referenced information is printed
5576  with every entry with which it is associated.
5577  So you can see things like this:
5578 \end_layout
5579
5580 \begin_layout Quote
5581 Jason Stanley, 
5582 \begin_inset Quotes eld
5583 \end_inset
5584
5585 Context and Logical Form
5586 \begin_inset Quotes erd
5587 \end_inset
5588
5589 , in 
5590 \emph on
5591 Language in Context: Selected Essays
5592 \emph default
5593  (Oxford: Oxford University Press, 2007), pp.
5594  30–68.
5595 \end_layout
5596
5597 \begin_layout Quote
5598 Jason Stanley, 
5599 \begin_inset Quotes eld
5600 \end_inset
5601
5602 Semantics in Context
5603 \begin_inset Quotes erd
5604 \end_inset
5605
5606 , in 
5607 \emph on
5608 Language in Context: Selected Essays
5609 \emph default
5610  (Oxford: Oxford University Press, 2007), pp.
5611  201–30.
5612 \end_layout
5613
5614 \begin_layout Standard
5615 This should be fixed before long.
5616 \end_layout
5617
5618 \begin_layout Standard
5619 There is no support at present for sectioned bibliographies.
5620  If you have multiple bibliographies, then \SpecialChar LyX
5621  will print the same bibliography
5622  over and over.
5623 \end_layout
5624
5625 \begin_layout Section
5626 Indexes
5627 \end_layout
5628
5629 \begin_layout Standard
5630 \SpecialChar LyX
5631  will happily export indexes as XHTML, but with certain limitations at the
5632  moment.
5633 \end_layout
5634
5635 \begin_layout Standard
5636 Index export will be most reliable when you do not attempt to use the fancy
5637  constructs that are described in the section on indexes in the 
5638 \emph on
5639 User's Guide
5640 \emph default
5641 .
5642 \begin_inset Foot
5643 status collapsed
5644
5645 \begin_layout Plain Layout
5646 The main issue here is that \SpecialChar LyX
5647  itself does not really handle these.
5648  It just lets you enter what you would have to enter in raw \SpecialChar LaTeX
5649 .
5650 \end_layout
5651
5652 \end_inset
5653
5654  We'll describe how they are handled using the subsection headings from
5655  that section.
5656 \end_layout
5657
5658 \begin_layout Itemize
5659 Grouping Index Entries (aka, sub-entries): \SpecialChar LyX
5660  makes an effort to support these,
5661  but the entries must be separated by 
5662 \begin_inset Quotes eld
5663 \end_inset
5664
5665  ! 
5666 \begin_inset Quotes erd
5667 \end_inset
5668
5669 , that is, there must be spaces around the exclamation point.
5670  This is because it is otherwise too difficult to check for escaped exclamation
5671  points, ones in math, and so forth.
5672 \end_layout
5673
5674 \begin_layout Itemize
5675 Page Ranges: There is no support at all for page ranges, since these make
5676  no sense with XHMTL.
5677  Instead, you will just get two index entries, one at either end.
5678 \end_layout
5679
5680 \begin_layout Itemize
5681 Cross-referencing: There is no support for cross-referencing.
5682  If \SpecialChar LyX
5683  finds an entry containing the 
5684 \begin_inset Quotes eld
5685 \end_inset
5686
5687 |see\SpecialChar ldots
5688
5689 \begin_inset Quotes erd
5690 \end_inset
5691
5692  construct, it is just dropped, and the rest is treated as an ordinary index
5693  entry.
5694 \end_layout
5695
5696 \begin_layout Itemize
5697 Index Entry Order: \SpecialChar LyX
5698  does support attempts to fix the sorting order.
5699  It will take what is before the first `@' it finds and use that for sorting,
5700  taking what follows the first `@' to be the actual entry.
5701  At present, \SpecialChar LyX
5702  does not check for escaped `@', so do not try to index email
5703  addresses.
5704 \end_layout
5705
5706 \begin_layout Itemize
5707 Index Entry Layout: You can format entries by using the text style dialog,
5708  or by using any other method available within \SpecialChar LyX
5709  itself.
5710  There is no support for constructs like: 
5711 \begin_inset Quotes eld
5712 \end_inset
5713
5714 entry|textbf
5715 \begin_inset Quotes erd
5716 \end_inset
5717
5718 .
5719  Indeed, if \SpecialChar LyX
5720  finds a pipe symbol, `|', in an entry, it will delete it and
5721  everything that follows it.
5722 \end_layout
5723
5724 \begin_layout Itemize
5725 Multiple Indexes: There is no support for multiple indexes.
5726  Rather, all index entries will be printed as one large index.
5727  To avoid our printing several versions of the index, we print only the
5728  main index, so make sure you have one.
5729 \end_layout
5730
5731 \begin_layout Section
5732 Nomenclature and Glossary
5733 \end_layout
5734
5735 \begin_layout Standard
5736 There is at present no support for glossaries.
5737  Adding it would be fairly trivial, and welcome.
5738 \end_layout
5739
5740 \begin_layout Chapter
5741 The \SpecialChar LyX
5742  Server
5743 \end_layout
5744
5745 \begin_layout Section
5746 Introduction
5747 \end_layout
5748
5749 \begin_layout Standard
5750 The `\SpecialChar LyX
5751  server' allows other programs to talk to \SpecialChar LyX
5752 , invoke \SpecialChar LyX
5753  commands, and retrieve
5754  information about the \SpecialChar LyX
5755  internal state.
5756  This is only intended for advanced users, but they should find it useful.
5757  It is by writing to the \SpecialChar LyX
5758  server, for example, that bibliography managers,
5759  such as JabRef, are able to 
5760 \begin_inset Quotes eld
5761 \end_inset
5762
5763 push
5764 \begin_inset Quotes erd
5765 \end_inset
5766
5767  citations to \SpecialChar LyX
5768 .
5769 \end_layout
5770
5771 \begin_layout Section
5772 Starting the \SpecialChar LyX
5773  Server
5774 \end_layout
5775
5776 \begin_layout Standard
5777 The \SpecialChar LyX
5778  server works through the use of a pair of named pipes.
5779  These are usually located in 
5780 \begin_inset Flex Code
5781 status collapsed
5782
5783 \begin_layout Plain Layout
5784 UserDir
5785 \end_layout
5786
5787 \end_inset
5788
5789 , (except on Windows, where 
5790 \emph on
5791 local
5792 \emph default
5793  named pipes are special objects located in 
5794 \begin_inset Flex Code
5795 status collapsed
5796
5797 \begin_layout Plain Layout
5798
5799 \backslash
5800
5801 \backslash
5802 .
5803 \backslash
5804 pipe
5805 \end_layout
5806
5807 \end_inset
5808
5809 ) and have the names 
5810 \begin_inset Quotes eld
5811 \end_inset
5812
5813
5814 \begin_inset Flex Code
5815 status collapsed
5816
5817 \begin_layout Plain Layout
5818 lyxpipe.in
5819 \end_layout
5820
5821 \end_inset
5822
5823
5824 \begin_inset Quotes erd
5825 \end_inset
5826
5827  and 
5828 \begin_inset Quotes eld
5829 \end_inset
5830
5831
5832 \begin_inset Flex Code
5833 status collapsed
5834
5835 \begin_layout Plain Layout
5836 lyxpipe.out
5837 \end_layout
5838
5839 \end_inset
5840
5841
5842 \begin_inset Quotes erd
5843 \end_inset
5844
5845 .
5846  External programs write into 
5847 \begin_inset Flex Code
5848 status collapsed
5849
5850 \begin_layout Plain Layout
5851 lyxpipe.in
5852 \end_layout
5853
5854 \end_inset
5855
5856  and read back data from 
5857 \begin_inset Flex Code
5858 status collapsed
5859
5860 \begin_layout Plain Layout
5861 lyxpipe.out
5862 \end_layout
5863
5864 \end_inset
5865
5866 .
5867  The stem of the pipe names can be defined in the 
5868 \begin_inset Flex Noun
5869 status collapsed
5870
5871 \begin_layout Plain Layout
5872 Tools\SpecialChar menuseparator
5873 Preferences
5874 \end_layout
5875
5876 \end_inset
5877
5878  dialog, for example 
5879 \begin_inset Flex Code
5880 status collapsed
5881
5882 \begin_layout Plain Layout
5883 "/home/myhome/lyxpipe"
5884 \end_layout
5885
5886 \end_inset
5887
5888 , or 
5889 \begin_inset Flex Code
5890 status collapsed
5891
5892 \begin_layout Plain Layout
5893 "
5894 \backslash
5895
5896 \backslash
5897 .
5898 \backslash
5899 pipe
5900 \backslash
5901 lyxpipe"
5902 \end_layout
5903
5904 \end_inset
5905
5906  on Windows (where any working path instead of lyxpipe can be used, for
5907  example 
5908 \begin_inset Flex Code
5909 status collapsed
5910
5911 \begin_layout Plain Layout
5912 "
5913 \backslash
5914
5915 \backslash
5916 .
5917 \backslash
5918 pipe
5919 \backslash
5920 my
5921 \backslash
5922 lyx
5923 \backslash
5924 pipe"
5925 \end_layout
5926
5927 \end_inset
5928
5929  would also work).
5930  You 
5931 \emph on
5932 must
5933 \emph default
5934  configure this manually in order for the server to start.
5935 \end_layout
5936
5937 \begin_layout Standard
5938 \SpecialChar LyX
5939  will add the '
5940 \begin_inset Flex Code
5941 status collapsed
5942
5943 \begin_layout Plain Layout
5944 .in
5945 \end_layout
5946
5947 \end_inset
5948
5949 ' and '
5950 \begin_inset Flex Code
5951 status collapsed
5952
5953 \begin_layout Plain Layout
5954 .out
5955 \end_layout
5956
5957 \end_inset
5958
5959 ' to create the pipes.
5960  If one of the pipes already exists, \SpecialChar LyX
5961  will assume that another \SpecialChar LyX
5962  process
5963  is already running and will not start the server.
5964  On POSIX (Unix like) systems, if for some other reason, an unused 
5965 \begin_inset Quotes eld
5966 \end_inset
5967
5968 stale
5969 \begin_inset Quotes erd
5970 \end_inset
5971
5972  pipe is left in existence when \SpecialChar LyX
5973  closes, then \SpecialChar LyX
5974  will try to delete it.
5975  If this fails for some reason, you will need to delete the pipes manually
5976  and then restart \SpecialChar LyX
5977 .
5978  On Windows, pipes are deleted by the OS on program termination or crash,
5979  so 
5980 \begin_inset Quotes eld
5981 \end_inset
5982
5983 stale
5984 \begin_inset Quotes erd
5985 \end_inset
5986
5987  pipes should not be possible.
5988 \end_layout
5989
5990 \begin_layout Standard
5991 To have several \SpecialChar LyX
5992  processes with servers at the same time, you have to use
5993  different configurations, perhaps by using separate user directories, each
5994  with its own 
5995 \begin_inset Flex Code
5996 status collapsed
5997
5998 \begin_layout Plain Layout
5999 preferences
6000 \end_layout
6001
6002 \end_inset
6003
6004  file, for each process.
6005 \end_layout
6006
6007 \begin_layout Standard
6008 If you are developing a client program, you might find it useful to enable
6009  debugging information from the \SpecialChar LyX
6010  server.
6011  Do this by starting \SpecialChar LyX
6012  as 
6013 \begin_inset Flex Code
6014 status collapsed
6015
6016 \begin_layout Plain Layout
6017 lyx -dbg lyxserver
6018 \end_layout
6019
6020 \end_inset
6021
6022 .
6023 \end_layout
6024
6025 \begin_layout Standard
6026 You can find a complete example client written in C++ in the source distribution
6027  as 
6028 \begin_inset Flex Code
6029 status collapsed
6030
6031 \begin_layout Plain Layout
6032 development/lyxserver/server_monitor.cpp
6033 \end_layout
6034
6035 \end_inset
6036
6037 .
6038 \end_layout
6039
6040 \begin_layout Standard
6041 Another useful tool is the command-line based client found in 
6042 \begin_inset Flex Code
6043 status collapsed
6044
6045 \begin_layout Plain Layout
6046 src/client/lyxclient
6047 \end_layout
6048
6049 \end_inset
6050
6051 .
6052 \end_layout
6053
6054 \begin_layout Section
6055 Normal communication
6056 \end_layout
6057
6058 \begin_layout Standard
6059 To issue a \SpecialChar LyX
6060  call, the client writes a line of ASCII text into the input
6061  pipe.
6062  This line has the following format:
6063 \end_layout
6064
6065 \begin_layout Quote
6066 LYXCMD:
6067 \emph on
6068 clientname
6069 \emph default
6070 :
6071 \emph on
6072 function
6073 \emph default
6074 :
6075 \emph on
6076 argument
6077 \end_layout
6078
6079 \begin_layout Description
6080 clientname is a name that the client can choose arbitrarily.
6081  Its only use is that \SpecialChar LyX
6082  will echo it if it sends an answer—so a client can
6083  dispatch results from different requesters.
6084 \end_layout
6085
6086 \begin_layout Description
6087 function is the function you want \SpecialChar LyX
6088  to perform.
6089  It is the same as the commands you'd use in the minibuffer.
6090 \end_layout
6091
6092 \begin_layout Description
6093 argument is an optional argument which is meaningful only to some functions
6094  (for instance, the 
6095 \begin_inset Quotes eld
6096 \end_inset
6097
6098 self-insert
6099 \begin_inset Quotes erd
6100 \end_inset
6101
6102  LFUN will insert the argument as text at the cursor position).
6103 \end_layout
6104
6105 \begin_layout Standard
6106 The answer from \SpecialChar LyX
6107  will arrive in the output pipe and be of the form
6108 \end_layout
6109
6110 \begin_layout Quote
6111 INFO:
6112 \emph on
6113 clientname
6114 \emph default
6115 :
6116 \emph on
6117 function
6118 \emph default
6119 :
6120 \emph on
6121 data
6122 \end_layout
6123
6124 \begin_layout Standard
6125 where 
6126 \emph on
6127 clientname
6128 \emph default
6129  and 
6130 \emph on
6131 function
6132 \emph default
6133  are just echoed from the command request, while 
6134 \emph on
6135 data
6136 \emph default
6137  is more or less useful information filled according to how the command
6138  execution worked out.
6139  Some commands, such as 
6140 \begin_inset Quotes eld
6141 \end_inset
6142
6143 font-state
6144 \begin_inset Quotes erd
6145 \end_inset
6146
6147 , will return information about the internal state of \SpecialChar LyX
6148 , while other will
6149  return an empty data-response.
6150  This means that the command execution went fine.
6151 \end_layout
6152
6153 \begin_layout Standard
6154 In case of errors, the response from \SpecialChar LyX
6155  will have this form
6156 \end_layout
6157
6158 \begin_layout Quote
6159 ERROR:
6160 \emph on
6161 clientname
6162 \emph default
6163 :
6164 \emph on
6165 function
6166 \emph default
6167 :
6168 \emph on
6169 error message
6170 \end_layout
6171
6172 \begin_layout Standard
6173 where the 
6174 \emph on
6175 error message
6176 \emph default
6177  should contain an explanation of why the command failed.
6178 \end_layout
6179
6180 \begin_layout Standard
6181 Examples:
6182 \end_layout
6183
6184 \begin_layout LyX-Code
6185 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
6186 \begin_inset Newline newline
6187 \end_inset
6188
6189 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
6190 \begin_inset Newline newline
6191 \end_inset
6192
6193 read a <~/.lyxpipe.out
6194 \begin_inset Newline newline
6195 \end_inset
6196
6197 echo $a
6198 \end_layout
6199
6200 \begin_layout Subsection
6201 AppleScript (Mac OS X)
6202 \end_layout
6203
6204 \begin_layout Standard
6205 Since \SpecialChar LyX
6206  2.1, \SpecialChar LyX
6207  supports basic interactions with AppleScript for normal communicatio
6208 n through the command run.
6209  This command takes a direct argument (the 
6210 \series bold
6211 function
6212 \series default
6213  to perform) and an optional argument.
6214  It either returns the output of the function or triggers an error with
6215  the error message and code.
6216 \end_layout
6217
6218 \begin_layout Standard
6219 Example:
6220 \end_layout
6221
6222 \begin_layout LyX-Code
6223 tell application "\SpecialChar LyX
6224 "
6225 \end_layout
6226
6227 \begin_layout LyX-Code
6228   try
6229 \end_layout
6230
6231 \begin_layout LyX-Code
6232     -- Stores the current file name into f
6233 \end_layout
6234
6235 \begin_layout LyX-Code
6236     set f to (run "server-get-filename" with argument "")
6237 \end_layout
6238
6239 \begin_layout LyX-Code
6240     on error the error_message number the error_number
6241 \end_layout
6242
6243 \begin_layout LyX-Code
6244       display dialog "Error: " & the error_number & ".
6245  " ¬
6246 \end_layout
6247
6248 \begin_layout LyX-Code
6249               & the error_message buttons {"OK"} default button 1
6250 \end_layout
6251
6252 \begin_layout LyX-Code
6253   end try
6254 \end_layout
6255
6256 \begin_layout LyX-Code
6257 end tell
6258 \end_layout
6259
6260 \begin_layout Section
6261 Notification
6262 \end_layout
6263
6264 \begin_layout Standard
6265 \SpecialChar LyX
6266  can notify clients of events going on asynchronously.
6267  Currently it will only do this if the user binds a key sequence with the
6268  function 
6269 \begin_inset Quotes eld
6270 \end_inset
6271
6272 notify
6273 \begin_inset Quotes erd
6274 \end_inset
6275
6276 .
6277  The format of the string \SpecialChar LyX
6278  sends is as follows:
6279 \end_layout
6280
6281 \begin_layout Quote
6282 \begin_inset Flex Code
6283 status collapsed
6284
6285 \begin_layout Plain Layout
6286 NOTIFY:
6287 \end_layout
6288
6289 \end_inset
6290
6291
6292 \emph on
6293 key-sequence
6294 \end_layout
6295
6296 \begin_layout Standard
6297 where 
6298 \emph on
6299 key-sequence
6300 \emph default
6301  is the printed representation of the key sequence that was actually typed
6302  by the user.
6303 \end_layout
6304
6305 \begin_layout Standard
6306 This mechanism can be used to extend \SpecialChar LyX
6307 's command set and implement macros.
6308  Bind some key sequence to 
6309 \begin_inset Quotes eld
6310 \end_inset
6311
6312 notify
6313 \begin_inset Quotes erd
6314 \end_inset
6315
6316 .
6317  Then start a client that listens on the output pipe, dispatches the command
6318  according to the sequence, and starts a function that may use \SpecialChar LyX
6319  calls and
6320  \SpecialChar LyX
6321  requests to issue a command or a series of commands to \SpecialChar LyX
6322 .
6323 \end_layout
6324
6325 \begin_layout Section
6326 The simple \SpecialChar LyX
6327  Server Protocol
6328 \end_layout
6329
6330 \begin_layout Standard
6331 \SpecialChar LyX
6332  implements a simple protocol that can be used for session management.
6333  All messages are of the form
6334 \end_layout
6335
6336 \begin_layout Quote
6337 LYXSRV:
6338 \emph on
6339 clientname
6340 \emph default
6341 :
6342 \emph on
6343 protocol message
6344 \end_layout
6345
6346 \begin_layout Standard
6347 where 
6348 \emph on
6349 protocol message
6350 \emph default
6351  can be 
6352 \begin_inset Quotes eld
6353 \end_inset
6354
6355 hello
6356 \begin_inset Quotes erd
6357 \end_inset
6358
6359  or 
6360 \begin_inset Quotes eld
6361 \end_inset
6362
6363 bye
6364 \begin_inset Quotes erd
6365 \end_inset
6366
6367 .
6368  If 
6369 \begin_inset Quotes eld
6370 \end_inset
6371
6372 hello
6373 \begin_inset Quotes erd
6374 \end_inset
6375
6376  is received from a client, \SpecialChar LyX
6377  will report back to inform the client that
6378  it's listening to it's messages, while 
6379 \begin_inset Quotes eld
6380 \end_inset
6381
6382 bye
6383 \begin_inset Quotes erd
6384 \end_inset
6385
6386  sent from \SpecialChar LyX
6387  will inform clients that \SpecialChar LyX
6388  is closing.
6389 \end_layout
6390
6391 \begin_layout Section
6392 Reverse DVI/PDF search
6393 \end_layout
6394
6395 \begin_layout Standard
6396 Some DVI/PDF viewers
6397 \begin_inset Foot
6398 status collapsed
6399
6400 \begin_layout Plain Layout
6401 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
6402  Qpdfview on Unix, Skim on Mac OSX and SumatraPDF on Windows.
6403 \end_layout
6404
6405 \end_inset
6406
6407  provide 
6408 \emph on
6409 reverse search
6410 \emph default
6411  facility (also called 
6412 \emph on
6413 inverse search
6414 \emph default
6415 ).
6416  This means that you can tell \SpecialChar LyX
6417  to put the cursor to a specific line in the
6418  document by clicking at the respective position in the DVI/PDF output.
6419  To achieve this, the viewer must be able to communicate with \SpecialChar LyX
6420 .
6421  This is done via the \SpecialChar LyX
6422  server either by using the named pipe (
6423 \emph on
6424 lyxpipe
6425 \emph default
6426 ), or the UNIX domain socket (
6427 \emph on
6428 lyxsocket
6429 \emph default
6430 ) that \SpecialChar LyX
6431  creates in its temporary directory (this is the way the 
6432 \begin_inset Flex Code
6433 status collapsed
6434
6435 \begin_layout Plain Layout
6436 lyxclient
6437 \end_layout
6438
6439 \end_inset
6440
6441  program communicates with \SpecialChar LyX
6442 ).
6443  In some cases, you need a helper script that mediates between the viewer
6444  and \SpecialChar LyX
6445 , in others, the viewer can communicate with \SpecialChar LyX
6446  directly.
6447  This depends on the selected viewer and on your operating system.
6448  The same applies to the way viewers need to be configured and the way the
6449  reverse search is actually performed.
6450  In what follows, we will thus describe how to setup reverse search for
6451  specific viewers.
6452  Before we turn to this, though, we will explain what needs to be done generally
6453  to enable reverse search in the DVI/PDF output.
6454 \end_layout
6455
6456 \begin_layout Subsection
6457 Automatic setup
6458 \begin_inset CommandInset label
6459 LatexCommand label
6460 name "subsec:rev-search"
6461
6462 \end_inset
6463
6464
6465 \end_layout
6466
6467 \begin_layout Standard
6468 In most cases \SpecialChar LyX
6469  will do the work for you by 
6470 \change_inserted -712698321 1500975045
6471 pressing the following button in the toolbar: 
6472 \begin_inset Info
6473 type  "icon"
6474 arg   "buffer-toggle-output-sync"
6475 \end_inset
6476
6477 .
6478  Alternatively, you can also enable the feature by checking 
6479 \family sans
6480 Synchronize with Output
6481 \family default
6482  in 
6483 \begin_inset Flex Noun
6484 status collapsed
6485
6486 \begin_layout Plain Layout
6487
6488 \change_inserted -712698321 1500975071
6489 Document\SpecialChar menuseparator
6490 Settings\SpecialChar menuseparator
6491 Formats
6492 \end_layout
6493
6494 \end_inset
6495
6496
6497 \change_deleted -712698321 1500974764
6498 enabling the option 
6499 \begin_inset Flex Noun
6500 status collapsed
6501
6502 \begin_layout Plain Layout
6503 Synchronize with Output
6504 \end_layout
6505
6506 \end_inset
6507
6508  in the menu 
6509 \begin_inset Flex Noun
6510 status collapsed
6511
6512 \begin_layout Plain Layout
6513 Document\SpecialChar menuseparator
6514 Settings\SpecialChar menuseparator
6515 Output
6516 \end_layout
6517
6518 \end_inset
6519
6520
6521 \change_unchanged
6522 .
6523  In such a case \SpecialChar LyX
6524  will automatically insert the necessary Sync\SpecialChar TeX
6525  macro (for
6526  PDF) or load the srcltx package (for DVI) respectively.
6527  This option can be easily reached also on 
6528 \begin_inset Flex Code
6529 status collapsed
6530
6531 \begin_layout Plain Layout
6532 View/Update
6533 \end_layout
6534
6535 \end_inset
6536
6537  Toolbar.
6538 \end_layout
6539
6540 \begin_layout Standard
6541 If you need a different setting, you can select or input a custom macro
6542  from the drop down box just below 
6543 \begin_inset Flex Noun
6544 status collapsed
6545
6546 \begin_layout Plain Layout
6547 Document\SpecialChar menuseparator
6548 Settings\SpecialChar menuseparator
6549 Output\SpecialChar menuseparator
6550 Synchronize with Output
6551 \end_layout
6552
6553 \end_inset
6554
6555 .
6556 \end_layout
6557
6558 \begin_layout Standard
6559 Note that the method 
6560 \begin_inset Flex Code
6561 status collapsed
6562
6563 \begin_layout Plain Layout
6564
6565 \backslash
6566 synctex=1
6567 \end_layout
6568
6569 \end_inset
6570
6571  enables gzip compression.
6572  If your viewer does not support it, you should instead use 
6573 \begin_inset Flex Code
6574 status collapsed
6575
6576 \begin_layout Plain Layout
6577
6578 \backslash
6579 synctex=-1
6580 \end_layout
6581
6582 \end_inset
6583
6584 .
6585 \end_layout
6586
6587 \begin_layout Standard
6588 Please also note that including the 
6589 \begin_inset Flex Code
6590 status collapsed
6591
6592 \begin_layout Plain Layout
6593 srcltx
6594 \end_layout
6595
6596 \end_inset
6597
6598  package or 
6599 \begin_inset Flex Code
6600 status collapsed
6601
6602 \begin_layout Plain Layout
6603 src-specials
6604 \end_layout
6605
6606 \end_inset
6607
6608  sometimes has an undesired impact on the typesetting.
6609  Thus, you should switch output synchronization off for the final typesetting
6610  if you use the 
6611 \begin_inset Flex Code
6612 status collapsed
6613
6614 \begin_layout Plain Layout
6615 srcltx
6616 \end_layout
6617
6618 \end_inset
6619
6620  package or 
6621 \begin_inset Flex Code
6622 status collapsed
6623
6624 \begin_layout Plain Layout
6625 src-specials
6626 \end_layout
6627
6628 \end_inset
6629
6630 .
6631  
6632 \end_layout
6633
6634 \begin_layout Standard
6635 In case you need some more special settings that are not covered by the
6636  automatic settings, read the next section about how to set up output synchroniz
6637 ation manually.
6638  If the automatic setup suits your needs, you can readily jump to section
6639 \begin_inset space ~
6640 \end_inset
6641
6642
6643 \begin_inset CommandInset ref
6644 LatexCommand ref
6645 reference "subsec:configuring-viewers"
6646
6647 \end_inset
6648
6649 , where the necessary configuration steps in your viewer – needed both with
6650  the automatic and the manual setup – are described.
6651 \end_layout
6652
6653 \begin_layout Subsection
6654 Manual setup
6655 \end_layout
6656
6657 \begin_layout Standard
6658 \SpecialChar LaTeX
6659  provides several different methods for reverse search.
6660  Some are built-in in the 
6661 \begin_inset Flex Code
6662 status collapsed
6663
6664 \begin_layout Plain Layout
6665 latex/pdflatex
6666 \end_layout
6667
6668 \end_inset
6669
6670  program, some are provided by external packages.
6671  Your choice depends on whether your \SpecialChar LaTeX
6672  distribution already provides a given
6673  method (the built-in methods are rather new) and whether your viewer can
6674  cope with it.
6675  The available methods are described in the following.
6676 \end_layout
6677
6678 \begin_layout Subsubsection*
6679 Built-in DVI-search via src-specials (DVI only) 
6680 \end_layout
6681
6682 \begin_layout Standard
6683 This method provides the DVI file with the necessary information for reverse
6684  search.
6685  It is available in \SpecialChar LaTeX
6686  since quite some time (any somewhat recent \SpecialChar LaTeX
6687  distribution
6688  should include it), and it works reliably.
6689  To enable it, change the 
6690 \begin_inset Flex Noun
6691 status collapsed
6692
6693 \begin_layout Plain Layout
6694 La
6695 \family sans
6696 TeX
6697 \family default
6698  (plain)->DVI
6699 \end_layout
6700
6701 \end_inset
6702
6703  or 
6704 \begin_inset Flex Noun
6705 status collapsed
6706
6707 \begin_layout Plain Layout
6708 La
6709 \family sans
6710 TeX
6711 \family default
6712  (plain)->DraftDVI
6713 \end_layout
6714
6715 \end_inset
6716
6717  converter in 
6718 \begin_inset Flex Noun
6719 status collapsed
6720
6721 \begin_layout Plain Layout
6722 Preferences\SpecialChar menuseparator
6723 File Handling\SpecialChar menuseparator
6724 Converters
6725 \end_layout
6726
6727 \end_inset
6728
6729  to 
6730 \begin_inset Flex Code
6731 status collapsed
6732
6733 \begin_layout Plain Layout
6734 latex -src-specials $$i
6735 \end_layout
6736
6737 \end_inset
6738
6739 .
6740  If this doesn't work, check if your \SpecialChar TeX
6741  engine needs different options (the
6742  syntax might differ in some distributions).
6743 \end_layout
6744
6745 \begin_layout Subsubsection*
6746 External Packages (PDFSync and scrltx) 
6747 \end_layout
6748
6749 \begin_layout Standard
6750 The packages 
6751 \emph on
6752 pdfsync
6753 \emph default
6754  and 
6755 \emph on
6756 scrltx
6757 \emph default
6758  provide reverse search facility for PDF output (via pdflatex) and DVI output,
6759  respectively.
6760  In order to enable it, load the packages in the \SpecialChar LyX
6761  preamble: 
6762 \end_layout
6763
6764 \begin_layout Itemize
6765 \begin_inset Flex Code
6766 status collapsed
6767
6768 \begin_layout Plain Layout
6769
6770 \backslash
6771 usepackage{pdfsync}
6772 \end_layout
6773
6774 \end_inset
6775
6776  for reverse PDF search,
6777 \end_layout
6778
6779 \begin_layout Itemize
6780 \begin_inset Flex Code
6781 status collapsed
6782
6783 \begin_layout Plain Layout
6784
6785 \backslash
6786 usepackage[active]{srcltx}
6787 \end_layout
6788
6789 \end_inset
6790
6791  for reverse DVI search.
6792 \end_layout
6793
6794 \begin_layout Standard
6795 If you want to be able to perform both DVI and PDF reverse searches, you
6796  can also insert in the preamble the following lines
6797 \end_layout
6798
6799 \begin_layout LyX-Code
6800
6801 \backslash
6802 usepackage{ifpdf}
6803 \begin_inset Newline newline
6804 \end_inset
6805
6806
6807 \backslash
6808 ifpdf
6809 \begin_inset Newline newline
6810 \end_inset
6811
6812   
6813 \backslash
6814 usepackage{pdfsync}
6815 \begin_inset Newline newline
6816 \end_inset
6817
6818
6819 \backslash
6820 else
6821 \begin_inset Newline newline
6822 \end_inset
6823
6824   
6825 \backslash
6826 usepackage[active]{srcltx}
6827 \begin_inset Newline newline
6828 \end_inset
6829
6830
6831 \backslash
6832 fi
6833 \end_layout
6834
6835 \begin_layout Standard
6836 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6837  right package will be used.
6838 \end_layout
6839
6840 \begin_layout Standard
6841 Note that PDFSync might affect the output layout of your document.
6842  It is therefore advised to disable PDFsync for final documents.
6843 \end_layout
6844
6845 \begin_layout Subsubsection*
6846 Built-in reverse search via Sync\SpecialChar TeX
6847  (DVI and PDF) 
6848 \end_layout
6849
6850 \begin_layout Standard
6851 Recent versions of 
6852 \begin_inset Flex Code
6853 status collapsed
6854
6855 \begin_layout Plain Layout
6856 (pdf)latex
6857 \end_layout
6858
6859 \end_inset
6860
6861  have built-in support for both PDF and DVI reverse search.
6862  This so-called 
6863 \emph on
6864 Sync\SpecialChar TeX
6865
6866 \emph default
6867  facility is basically the result of the integration of the PDFSync package
6868  to the pdftex program and its merge with the 
6869 \emph on
6870 scr-specials
6871 \emph default
6872  approach.
6873  You need at least \SpecialChar TeX
6874 Live 2008 or a recent Mik\SpecialChar TeX
6875  distribution in order to use
6876  it.
6877 \begin_inset Foot
6878 status collapsed
6879
6880 \begin_layout Plain Layout
6881 For some reason, Mik\SpecialChar TeX
6882  does not understand/obey the command \SpecialChar LyX
6883  inserts into
6884  the preamble when you check the "Enable Forward/Reverse Search" button
6885  in the toolbar and does not generate the necessary info.
6886 \end_layout
6887
6888 \begin_layout Plain Layout
6889 The generation of the required info can be forced by changing the converter
6890  "\SpecialChar LaTeX
6891  (pdflatex) -> PDF (pdflatex)" in Preferences->File handling->Converters
6892  from the default "pdflatex $$i" to "pdflatex -synctex=1 $$i" (i.e., by adding
6893  the -synctex=1 switch).
6894 \end_layout
6895
6896 \end_inset
6897
6898  Also note that only a few PDF viewers (
6899 \change_inserted -712698321 1500977288
6900 such as 
6901 \change_unchanged
6902 Okular and Qpdfview on Unix, Skim on the Mac, SumatraPDF on Windows
6903 \change_inserted -712698321 1500977299
6904 ; see the next section for details
6905 \change_unchanged
6906 ) already provide Sync\SpecialChar TeX
6907  support.
6908 \end_layout
6909
6910 \begin_layout Standard
6911 To enable Sync\SpecialChar TeX
6912  for DVI output, change the 
6913 \begin_inset Flex Noun
6914 status collapsed
6915
6916 \begin_layout Plain Layout
6917 La
6918 \family sans
6919 TeX
6920 \family default
6921  (plain) -> DVI
6922 \end_layout
6923
6924 \end_inset
6925
6926  or 
6927 \begin_inset Flex Noun
6928 status collapsed
6929
6930 \begin_layout Plain Layout
6931 La
6932 \family sans
6933 TeX
6934 \family default
6935  (plain) -> DraftDVI
6936 \end_layout
6937
6938 \end_inset
6939
6940  converter in 
6941 \begin_inset Flex Noun
6942 status collapsed
6943
6944 \begin_layout Plain Layout
6945 Preferences\SpecialChar menuseparator
6946 File Handling\SpecialChar menuseparator
6947 Converters
6948 \end_layout
6949
6950 \end_inset
6951
6952  to 
6953 \begin_inset Flex Code
6954 status collapsed
6955
6956 \begin_layout Plain Layout
6957 latex -synctex=1 $$i
6958 \end_layout
6959
6960 \end_inset
6961
6962 , and for PDF output, change the 
6963 \begin_inset Flex Noun
6964 status collapsed
6965
6966 \begin_layout Plain Layout
6967 La
6968 \family sans
6969 TeX
6970 \family default
6971  (pdflatex) -> PDF (pdflatex)
6972 \end_layout
6973
6974 \end_inset
6975
6976  
6977 \change_deleted -712698321 1500977453
6978 or
6979 \change_unchanged
6980  converter to 
6981 \begin_inset Flex Code
6982 status collapsed
6983
6984 \begin_layout Plain Layout
6985 pdflatex -synctex=1 $$i
6986 \end_layout
6987
6988 \end_inset
6989
6990 .
6991  
6992 \change_inserted -712698321 1500977740
6993 Should your viewer not be considered in the following description, or in
6994  case of missing success, please 
6995 \change_deleted -712698321 1500977741
6996 C
6997 \change_inserted -712698321 1500977744
6998 c
6999 \change_unchanged
7000 heck the documentation of your viewer whether the viewer needs to be configured
7001  for the use with Sync\SpecialChar TeX
7002 .
7003 \begin_inset Foot
7004 status collapsed
7005
7006 \begin_layout Plain Layout
7007 Note that the option 
7008 \begin_inset Flex Code
7009 status collapsed
7010
7011 \begin_layout Plain Layout
7012 -synctex=1
7013 \end_layout
7014
7015 \end_inset
7016
7017  option enables gzip compression.
7018  If your viewer does not support it, you should instead use 
7019 \begin_inset Flex Code
7020 status collapsed
7021
7022 \begin_layout Plain Layout
7023 -synctex=-1
7024 \end_layout
7025
7026 \end_inset
7027
7028 .
7029 \end_layout
7030
7031 \end_inset
7032
7033
7034 \end_layout
7035
7036 \begin_layout Subsection
7037 Configuring and using specific viewers
7038 \begin_inset CommandInset label
7039 LatexCommand label
7040 name "subsec:configuring-viewers"
7041
7042 \end_inset
7043
7044
7045 \end_layout
7046
7047 \begin_layout Subsubsection*
7048 Xdvi (all platforms)
7049 \end_layout
7050
7051 \begin_layout Standard
7052 If you use 
7053 \begin_inset Flex Code
7054 status collapsed
7055
7056 \begin_layout Plain Layout
7057 xdvi
7058 \end_layout
7059
7060 \end_inset
7061
7062 , you don't need to do anything else for performing a reverse DVI search,
7063  as \SpecialChar LyX
7064  already provides the necessary hooks for automatically using the 
7065 \begin_inset Flex Code
7066 status collapsed
7067
7068 \begin_layout Plain Layout
7069 lyxclient
7070 \end_layout
7071
7072 \end_inset
7073
7074  program.
7075  Just setup your document as described above (reverse search is triggered
7076  by Ctrl-click or Alt-click on Mac OSX, respectively).
7077 \end_layout
7078
7079 \begin_layout Standard
7080 However, if for whatever reason you want to use the named pipe instead of
7081  the socket for communicating with \SpecialChar LyX
7082 , simply change the DVI viewer in 
7083 \begin_inset Flex Noun
7084 status collapsed
7085
7086 \begin_layout Plain Layout
7087 Preferences\SpecialChar menuseparator
7088 File Handling\SpecialChar menuseparator
7089 File formats
7090 \end_layout
7091
7092 \end_inset
7093
7094  to
7095 \begin_inset Foot
7096 status collapsed
7097
7098 \begin_layout Plain Layout
7099 On Mac OSX you have to use 
7100 \begin_inset Flex Code
7101 status collapsed
7102
7103 \begin_layout Plain Layout
7104 DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l"
7105 \end_layout
7106
7107 \end_inset
7108
7109
7110 \end_layout
7111
7112 \end_inset
7113
7114  
7115 \begin_inset Flex Code
7116 status collapsed
7117
7118 \begin_layout Plain Layout
7119 xdvi -editor "lyxeditor.sh %f %l"
7120 \end_layout
7121
7122 \end_inset
7123
7124 , where 
7125 \begin_inset Flex Code
7126 status collapsed
7127
7128 \begin_layout Plain Layout
7129 lyxeditor.sh
7130 \end_layout
7131
7132 \end_inset
7133
7134  is a suitable script.
7135  For example, a minimal shell script is the following one:
7136 \end_layout
7137
7138 \begin_layout LyX-Code
7139 #!/bin/sh
7140 \begin_inset Newline newline
7141 \end_inset
7142
7143 LYXPIPE="/path/to/lyxpipe"
7144 \begin_inset Newline newline
7145 \end_inset
7146
7147 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
7148 \begin_inset Newline newline
7149 \end_inset
7150
7151 echo "$COMMAND" > "${LYXPIPE}".in || exit
7152 \begin_inset Newline newline
7153 \end_inset
7154
7155 read TMP < "${LYXPIPE}".out || exit
7156 \end_layout
7157
7158 \begin_layout Standard
7159 where 
7160 \begin_inset Flex Code
7161 status collapsed
7162
7163 \begin_layout Plain Layout
7164 /path/to/lyxpipe
7165 \end_layout
7166
7167 \end_inset
7168
7169  is the LyXServer pipe path specified in 
7170 \begin_inset Flex Noun
7171 status collapsed
7172
7173 \begin_layout Plain Layout
7174 Preferences\SpecialChar menuseparator
7175 Paths
7176 \end_layout
7177
7178 \end_inset
7179
7180 .
7181 \begin_inset Foot
7182 status collapsed
7183
7184 \begin_layout Plain Layout
7185 In the 
7186 \begin_inset Flex Code
7187 status collapsed
7188
7189 \begin_layout Plain Layout
7190 development/tools
7191 \end_layout
7192
7193 \end_inset
7194
7195  folder of a source distribution you can find a 
7196 \begin_inset Flex Code
7197 status collapsed
7198
7199 \begin_layout Plain Layout
7200 lyxeditor
7201 \end_layout
7202
7203 \end_inset
7204
7205  script which is able to locate the 
7206 \emph on
7207 lyxpipe
7208 \emph default
7209  based on your preferences.
7210 \end_layout
7211
7212 \end_inset
7213
7214
7215 \end_layout
7216
7217 \begin_layout Subsubsection*
7218 MacDviX (Mac OSX)
7219 \end_layout
7220
7221 \begin_layout Standard
7222 At the end of 
7223 \begin_inset Flex Code
7224 status collapsed
7225
7226 \begin_layout Plain Layout
7227 /Applications/MacDviX_Folder/calleditor.script
7228 \end_layout
7229
7230 \end_inset
7231
7232 , add the following lines:
7233 \end_layout
7234
7235 \begin_layout LyX-Code
7236 /Applications/LyX.app/Contents/MacOS/lyxeditor "$2" $1
7237 \begin_inset Newline newline
7238 \end_inset
7239
7240 exit 1
7241 \end_layout
7242
7243 \begin_layout Standard
7244 Modify the lines accordingly if you install \SpecialChar LyX
7245  somewhere else than in the
7246  Applications folder.
7247 \end_layout
7248
7249 \begin_layout Standard
7250 Reverse search is triggered by Alt-click (OPTION-click).
7251 \end_layout
7252
7253 \begin_layout Subsubsection*
7254 Skim (Mac OSX)
7255 \end_layout
7256
7257 \begin_layout Standard
7258 Enter 
7259 \begin_inset Flex Code
7260 status collapsed
7261
7262 \begin_layout Plain Layout
7263 open -a Skim.app $$i
7264 \end_layout
7265
7266 \end_inset
7267
7268  to the viewer setting in 
7269 \begin_inset Flex Noun
7270 status collapsed
7271
7272 \begin_layout Plain Layout
7273 Preferences\SpecialChar menuseparator
7274 File Handling\SpecialChar menuseparator
7275 File formats\SpecialChar menuseparator
7276 PDF (pdflatex)
7277 \end_layout
7278
7279 \end_inset
7280
7281 , and then in 
7282 \begin_inset Flex Noun
7283 status collapsed
7284
7285 \begin_layout Plain Layout
7286 Skim\SpecialChar menuseparator
7287 Preferences\SpecialChar menuseparator
7288 Sync
7289 \end_layout
7290
7291 \end_inset
7292
7293  choose 
7294 \begin_inset Flex Noun
7295 status collapsed
7296
7297 \begin_layout Plain Layout
7298 custom
7299 \end_layout
7300
7301 \end_inset
7302
7303  preset and enter command 
7304 \begin_inset Flex Noun
7305 status collapsed
7306
7307 \begin_layout Plain Layout
7308 /Applications/\SpecialChar LyX
7309 .app/Contents/MacOS/lyxeditor
7310 \end_layout
7311
7312 \end_inset
7313
7314 .
7315 \end_layout
7316
7317 \begin_layout Standard
7318 Reverse search is triggered by COMMAND-SHIFT-click
7319 \end_layout
7320
7321 \begin_layout Subsubsection*
7322 Evince (GNOME)
7323 \end_layout
7324
7325 \begin_layout Standard
7326 Reverse search with evince does not work out of the box, but it can be achieved
7327  by means of some third party helper scripts.
7328  Please refer to 
7329 \begin_inset CommandInset href
7330 LatexCommand href
7331 target "http://wiki.lyx.org/LyX/SyncTeX"
7332 literal "false"
7333
7334 \end_inset
7335
7336  for details.
7337 \end_layout
7338
7339 \begin_layout Subsubsection*
7340 Okular (KDE)
7341 \end_layout
7342
7343 \begin_layout Standard
7344 Go to 
7345 \begin_inset Flex Noun
7346 status collapsed
7347
7348 \begin_layout Plain Layout
7349 Settings\SpecialChar menuseparator
7350 Configure Okular\SpecialChar menuseparator
7351 Editor
7352 \end_layout
7353
7354 \end_inset
7355
7356
7357 \change_inserted -712698321 1500981642
7358  and
7359 \change_deleted -712698321 1500981641
7360 ,
7361 \change_unchanged
7362  select 
7363 \change_deleted -712698321 1500981634
7364
7365 \begin_inset Quotes eld
7366 \end_inset
7367
7368 Custom Text Editor
7369 \change_inserted -712698321 1500981635
7370 LyX
7371 \change_unchanged
7372
7373 \begin_inset Quotes erd
7374 \end_inset
7375
7376  
7377 \change_inserted -712698321 1500981659
7378 as editor.
7379  This inserts the appropriate 
7380 \change_deleted -712698321 1500981663
7381 and add the 
7382 \change_unchanged
7383 command 
7384 \change_inserted -712698321 1500981665
7385 (
7386 \change_unchanged
7387
7388 \begin_inset Flex Code
7389 status collapsed
7390
7391 \begin_layout Plain Layout
7392 lyxclient -g %f %l
7393 \end_layout
7394
7395 \end_inset
7396
7397
7398 \change_inserted -712698321 1500981668
7399 )
7400 \change_unchanged
7401 .
7402 \end_layout
7403
7404 \begin_layout Standard
7405 Reverse search is triggered by SHIFT-click.
7406 \end_layout
7407
7408 \begin_layout Subsubsection*
7409 Qpdfview (Unix)
7410 \end_layout
7411
7412 \begin_layout Standard
7413 Qpdfview supports Sync\SpecialChar TeX
7414  since version 0.3.5.
7415  Go to 
7416 \begin_inset Flex Noun
7417 status collapsed
7418
7419 \begin_layout Plain Layout
7420 Edit\SpecialChar menuseparator
7421 Settings\SpecialChar menuseparator
7422 Behavior
7423 \end_layout
7424
7425 \end_inset
7426
7427 , click on the input field of the 
7428 \begin_inset Quotes eld
7429 \end_inset
7430
7431 Source editor
7432 \begin_inset Quotes erd
7433 \end_inset
7434
7435  item and add the command 
7436 \begin_inset Flex Code
7437 status collapsed
7438
7439 \begin_layout Plain Layout
7440 lyxclient -g %1 %2
7441 \end_layout
7442
7443 \end_inset
7444
7445 .
7446 \end_layout
7447
7448 \begin_layout Standard
7449 Reverse search is triggered by double-click or, in more recent versions,
7450  by context menu.
7451 \end_layout
7452
7453 \begin_layout Subsubsection*
7454 YAP (Windows)
7455 \end_layout
7456
7457 \begin_layout Standard
7458 Launch yap, choose its 
7459 \begin_inset Flex Noun
7460 status collapsed
7461
7462 \begin_layout Plain Layout
7463 View\SpecialChar menuseparator
7464 Options
7465 \end_layout
7466
7467 \end_inset
7468
7469  menu and select the 
7470 \begin_inset Quotes eld
7471 \end_inset
7472
7473 Inverse DVI Search
7474 \begin_inset Quotes erd
7475 \end_inset
7476
7477  tab.
7478  Click on the 
7479 \begin_inset Quotes eld
7480 \end_inset
7481
7482 New\SpecialChar ldots
7483
7484 \begin_inset Quotes erd
7485 \end_inset
7486
7487  button and, in the window that opens, enter 
7488 \begin_inset Quotes eld
7489 \end_inset
7490
7491 \SpecialChar LyX
7492  Editor
7493 \begin_inset Quotes erd
7494 \end_inset
7495
7496  (or any other name you like) in the 
7497 \begin_inset Quotes eld
7498 \end_inset
7499
7500 Name:
7501 \begin_inset Quotes erd
7502 \end_inset
7503
7504  field.
7505  Now click on the button labeled 
7506 \begin_inset Quotes eld
7507 \end_inset
7508
7509 \SpecialChar ldots
7510
7511 \begin_inset Quotes erd
7512 \end_inset
7513
7514  to open a file dialog and navigate to the directory containing the batch
7515  file 
7516 \begin_inset Flex Code
7517 status collapsed
7518
7519 \begin_layout Plain Layout
7520 lyxeditor.bat
7521 \end_layout
7522
7523 \end_inset
7524
7525  (see below).
7526  Select 
7527 \begin_inset Flex Code
7528 status collapsed
7529
7530 \begin_layout Plain Layout
7531 lyxeditor.bat
7532 \end_layout
7533
7534 \end_inset
7535
7536  and then specify the program arguments as 
7537 \begin_inset Flex Code
7538 status collapsed
7539
7540 \begin_layout Plain Layout
7541 %f %l
7542 \end_layout
7543
7544 \end_inset
7545
7546 .
7547  The 
7548 \begin_inset Flex Code
7549 status collapsed
7550
7551 \begin_layout Plain Layout
7552 lyxeditor.bat
7553 \end_layout
7554
7555 \end_inset
7556
7557  wrapper is used for communicating with \SpecialChar LyX
7558  through the 
7559 \emph on
7560 lyxpipe
7561 \emph default
7562  and is as follows:
7563 \end_layout
7564
7565 \begin_layout LyX-Code
7566 @echo off
7567 \begin_inset Newline newline
7568 \end_inset
7569
7570 echo LYXCMD:revdvi:server-goto-file-row:%~1 %2> 
7571 \backslash
7572
7573 \backslash
7574 .
7575 \backslash
7576 pipe
7577 \backslash
7578 lyxpipe.in
7579 \begin_inset Newline newline
7580 \end_inset
7581
7582 type 
7583 \backslash
7584
7585 \backslash
7586 .
7587 \backslash
7588 pipe
7589 \backslash
7590 lyxpipe.out
7591 \end_layout
7592
7593 \begin_layout Standard
7594 Make sure that the \SpecialChar LyX
7595 Server pipe path you specified in \SpecialChar LyX
7596  is 
7597 \begin_inset Flex Code
7598 status collapsed
7599
7600 \begin_layout Plain Layout
7601
7602 \backslash
7603
7604 \backslash
7605 .
7606 \backslash
7607 pipe
7608 \backslash
7609 lyxpipe
7610 \end_layout
7611
7612 \end_inset
7613
7614 , otherwise change the 
7615 \begin_inset Flex Code
7616 status collapsed
7617
7618 \begin_layout Plain Layout
7619 lyxeditor.bat
7620 \end_layout
7621
7622 \end_inset
7623
7624  wrapper accordingly.
7625 \end_layout
7626
7627 \begin_layout Standard
7628 In yap, reverse search is triggered by double-click.
7629 \end_layout
7630
7631 \begin_layout Subsubsection*
7632 SumatraPDF (Windows)
7633 \end_layout
7634
7635 \begin_layout Standard
7636 In order to use SumatraPDF for inverse search, enter 
7637 \begin_inset Flex Code
7638 status collapsed
7639
7640 \begin_layout Plain Layout
7641 SumatraPDF -inverse-search "lyxeditor.bat "%f" %l"
7642 \end_layout
7643
7644 \end_inset
7645
7646  in the viewer setting in 
7647 \begin_inset Flex Noun
7648 status collapsed
7649
7650 \begin_layout Plain Layout
7651 Preferences\SpecialChar menuseparator
7652 File Handling\SpecialChar menuseparator
7653 File formats\SpecialChar menuseparator
7654 PDF (pdflatex)
7655 \end_layout
7656
7657 \end_inset
7658
7659 , where 
7660 \begin_inset Flex Code
7661 status collapsed
7662
7663 \begin_layout Plain Layout
7664 lyxeditor.bat
7665 \end_layout
7666
7667 \end_inset
7668
7669  is the previous wrapper.
7670  If SumatraPDF.exe is not in your command PATH, use its full file name.
7671 \end_layout
7672
7673 \begin_layout Standard
7674 Reverse search is triggered by double-click.
7675 \end_layout
7676
7677 \begin_layout Subsubsection*
7678 YAP (Cygwin)
7679 \end_layout
7680
7681 \begin_layout Standard
7682 First of all, make sure that yap is your default DVI viewer in the Windows
7683  environment, then launch it, choose its 
7684 \begin_inset Flex Noun
7685 status collapsed
7686
7687 \begin_layout Plain Layout
7688 View\SpecialChar menuseparator
7689 Options
7690 \end_layout
7691
7692 \end_inset
7693
7694  menu and select the 
7695 \begin_inset Quotes eld
7696 \end_inset
7697
7698 Inverse DVI Search
7699 \begin_inset Quotes erd
7700 \end_inset
7701
7702  tab.
7703  Click on the 
7704 \begin_inset Quotes eld
7705 \end_inset
7706
7707 New\SpecialChar ldots
7708
7709 \begin_inset Quotes erd
7710 \end_inset
7711
7712  button and, in the window that opens, enter 
7713 \begin_inset Quotes eld
7714 \end_inset
7715
7716 \SpecialChar LyX
7717  Editor
7718 \begin_inset Quotes erd
7719 \end_inset
7720
7721  (or any other name you like) in the 
7722 \begin_inset Quotes eld
7723 \end_inset
7724
7725 Name:
7726 \begin_inset Quotes erd
7727 \end_inset
7728
7729  field.
7730  Now click on the button labeled 
7731 \begin_inset Quotes eld
7732 \end_inset
7733
7734 \SpecialChar ldots
7735
7736 \begin_inset Quotes erd
7737 \end_inset
7738
7739  to open a file dialog and navigate to the directory containing the 
7740 \begin_inset Flex Code
7741 status collapsed
7742
7743 \begin_layout Plain Layout
7744 lyxeditor.exe
7745 \end_layout
7746
7747 \end_inset
7748
7749  program (which is installed by default on Cygwin along with the \SpecialChar LyX
7750  executable).
7751  Select 
7752 \begin_inset Flex Code
7753 status collapsed
7754
7755 \begin_layout Plain Layout
7756 lyxeditor.exe
7757 \end_layout
7758
7759 \end_inset
7760
7761  and then specify the program arguments as 
7762 \begin_inset Flex Code
7763 status collapsed
7764
7765 \begin_layout Plain Layout
7766 -g %f %l
7767 \end_layout
7768
7769 \end_inset
7770
7771 .
7772  In this way, you will be using the 
7773 \emph on
7774 lyxsocket
7775 \emph default
7776  for communicating with \SpecialChar LyX
7777 .
7778  If, for whatever reason, you want to use the 
7779 \emph on
7780 lyxpipe
7781 \emph default
7782 , omit the 
7783 \begin_inset Flex Code
7784 status collapsed
7785
7786 \begin_layout Plain Layout
7787 -g
7788 \end_layout
7789
7790 \end_inset
7791
7792  option and be sure to specify the \SpecialChar LyX
7793 Server pipe path in the \SpecialChar LyX
7794  preferences.
7795 \end_layout
7796
7797 \begin_layout Standard
7798 In yap, reverse search is triggered by double-click.
7799 \end_layout
7800
7801 \begin_layout Subsubsection*
7802 SumatraPDF (Cygwin)
7803 \end_layout
7804
7805 \begin_layout Standard
7806 In order to use SumatraPDF for inverse search, enter 
7807 \begin_inset Flex Code
7808 status collapsed
7809
7810 \begin_layout Plain Layout
7811 SumatraPDF -inverse-search "lyxeditor -g %f %l"
7812 \end_layout
7813
7814 \end_inset
7815
7816  in the viewer setting in 
7817 \begin_inset Flex Noun
7818 status collapsed
7819
7820 \begin_layout Plain Layout
7821 Preferences\SpecialChar menuseparator
7822 File Handling\SpecialChar menuseparator
7823 File formats\SpecialChar menuseparator
7824 PDF (pdflatex)
7825 \end_layout
7826
7827 \end_inset
7828
7829 .
7830  If SumatraPDF.exe is not in your command PATH, use its full posix path.
7831  The 
7832 \begin_inset Flex Code
7833 status collapsed
7834
7835 \begin_layout Plain Layout
7836 -g
7837 \end_layout
7838
7839 \end_inset
7840
7841  enables communication via the 
7842 \emph on
7843 lyxsocket
7844 \emph default
7845 .
7846  Again, omit the 
7847 \begin_inset Flex Code
7848 status collapsed
7849
7850 \begin_layout Plain Layout
7851 -g
7852 \end_layout
7853
7854 \end_inset
7855
7856  option if you want to use the 
7857 \emph on
7858 lyxpipe
7859 \emph default
7860 , and be sure to specify the \SpecialChar LyX
7861 Server pipe path in the \SpecialChar LyX
7862  preferences.
7863 \end_layout
7864
7865 \begin_layout Standard
7866 Reverse search is triggered by double-click.
7867 \end_layout
7868
7869 \begin_layout Section
7870 Forward search
7871 \end_layout
7872
7873 \begin_layout Standard
7874 Forward search is, as the name implies, in a sense the 
7875 \begin_inset Quotes eld
7876 \end_inset
7877
7878 opposite
7879 \begin_inset Quotes erd
7880 \end_inset
7881
7882  of reverse search.
7883  It allows you to let the viewer jump to a given position from within \SpecialChar LyX
7884 .
7885  If forward search is set up (as described in what follows), you can put
7886  the cursor anywhere in your \SpecialChar LyX
7887  document, and hit 
7888 \begin_inset Flex Noun
7889 status collapsed
7890
7891 \begin_layout Plain Layout
7892 Navigate\SpecialChar menuseparator
7893 Forward search
7894 \end_layout
7895
7896 \end_inset
7897
7898  (or select 
7899 \begin_inset Flex Noun
7900 status collapsed
7901
7902 \begin_layout Plain Layout
7903 Forward search
7904 \end_layout
7905
7906 \end_inset
7907
7908  in the context menu via right mouse click), and then the viewer will jump
7909  to that position as well.
7910  This implies, of course, that your viewer supports this function.
7911 \end_layout
7912
7913 \begin_layout Standard
7914 To make forward search possible, you first need to provide the generated
7915  output PDF/DVI file with additional information about the \SpecialChar TeX
7916  sources.
7917  This can be done via the methods described in the section 
7918 \begin_inset CommandInset ref
7919 LatexCommand ref
7920 reference "subsec:rev-search"
7921
7922 \end_inset
7923
7924 .
7925 \end_layout
7926
7927 \begin_layout Standard
7928 Additionally, you need to configure \SpecialChar LyX
7929  for using your viewers in 
7930 \begin_inset Flex Noun
7931 status collapsed
7932
7933 \begin_layout Plain Layout
7934 Tools\SpecialChar menuseparator
7935 Preferences\SpecialChar menuseparator
7936 Output\SpecialChar menuseparator
7937 General
7938 \end_layout
7939
7940 \end_inset
7941
7942 .
7943  We provide a range of tested configurations for some viewers, which you
7944  can select from the drop down list.
7945  If none of these configurations suits you, you have to find out and enter
7946  a suitable configuration yourself.
7947  The definition syntax uses the following placeholders:
7948 \end_layout
7949
7950 \begin_layout Itemize
7951 \noindent
7952 \begin_inset Flex Code
7953 status collapsed
7954
7955 \begin_layout Plain Layout
7956 $$n
7957 \end_layout
7958
7959 \end_inset
7960
7961 : row number
7962 \end_layout
7963
7964 \begin_layout Itemize
7965 \noindent
7966 \begin_inset Flex Code
7967 status collapsed
7968
7969 \begin_layout Plain Layout
7970 $$t
7971 \end_layout
7972
7973 \end_inset
7974
7975 : name of the (temporary) exported .tex file (without path)
7976 \end_layout
7977
7978 \begin_layout Itemize
7979 \noindent
7980 \begin_inset Flex Code
7981 status collapsed
7982
7983 \begin_layout Plain Layout
7984 $$f
7985 \end_layout
7986
7987 \end_inset
7988
7989 : name of the (temporary) exported .tex file (including path)
7990 \end_layout
7991
7992 \begin_layout Itemize
7993 \noindent
7994 \begin_inset Flex Code
7995 status collapsed
7996
7997 \begin_layout Plain Layout
7998 $$o
7999 \end_layout
8000
8001 \end_inset
8002
8003 : name of the exported output file (either dvi or pdf, depending on which
8004  one exists in the temporary directory)
8005 \end_layout
8006
8007 \begin_layout Standard
8008 Note that only some of the viewers provide full and usable forward search
8009  functionality out of the box, among them yap, xdvi, okular
8010 \begin_inset Foot
8011 status collapsed
8012
8013 \begin_layout Plain Layout
8014 You might want to set 
8015 \begin_inset Flex Code
8016 status collapsed
8017
8018 \begin_layout Plain Layout
8019 okular –unique
8020 \end_layout
8021
8022 \end_inset
8023
8024  in 
8025 \begin_inset Flex Noun
8026 status collapsed
8027
8028 \begin_layout Plain Layout
8029 Tools\SpecialChar menuseparator
8030 Preferences\SpecialChar menuseparator
8031 File Handling\SpecialChar menuseparator
8032 File
8033 \begin_inset space ~
8034 \end_inset
8035
8036 Formats
8037 \end_layout
8038
8039 \end_inset
8040
8041
8042 \end_layout
8043
8044 \end_inset
8045
8046 , qpdfview, and SumatraPDF
8047 \begin_inset Foot
8048 status collapsed
8049
8050 \begin_layout Plain Layout
8051 SumatraPDF can also use DDE commands through the external program CMCDDE
8052  — downloadable from 
8053 \begin_inset CommandInset href
8054 LatexCommand href
8055 target "http://www.istri.fr/spip/zip/CMCDDE.zip"
8056 literal "false"
8057
8058 \end_inset
8059
8060
8061 \end_layout
8062
8063 \end_inset
8064
8065 .
8066  Others, such as evince
8067 \begin_inset Foot
8068 status collapsed
8069
8070 \begin_layout Plain Layout
8071 Forward search with evince can be achieved by means of third party helper
8072  scripts.
8073  Please refer to 
8074 \begin_inset CommandInset href
8075 LatexCommand href
8076 target "http://wiki.lyx.org/LyX/SyncTeX"
8077 literal "false"
8078
8079 \end_inset
8080
8081  for details.
8082 \end_layout
8083
8084 \end_inset
8085
8086 , require some extra tools in order to use forward search.
8087  While many of the widespread PDF viewers (most notably Adobe Reader) do
8088  not support forward search at all, some other viewers – e.
8089 \begin_inset space \thinspace{}
8090 \end_inset
8091
8092 g.
8093  xpdf – allow at least to reload the document and jump to a specific page
8094  of the file, so you can at least navigate 
8095 \begin_inset Quotes eld
8096 \end_inset
8097
8098 near
8099 \begin_inset Quotes erd
8100 \end_inset
8101
8102 .
8103  This latter functionality is provided by an external call of synctex (see
8104  the predefined example configurations).
8105  
8106 \end_layout
8107
8108 \begin_layout Standard
8109 Forward search works both with DVI and PDF output.
8110  \SpecialChar LyX
8111  simply checks which preview format you have used before (i.
8112 \begin_inset space \thinspace{}
8113 \end_inset
8114
8115 e., which format is already there in the temporary directory) and chooses
8116  the appropriate configuration for the respective format.
8117 \end_layout
8118
8119 \begin_layout Chapter
8120 Special Document Classes
8121 \end_layout
8122
8123 \begin_layout Section
8124 A&A Paper
8125 \end_layout
8126
8127 \begin_layout Standard
8128 by 
8129 \noun on
8130 Peter Sütterlin
8131 \end_layout
8132
8133 \begin_layout Subsection
8134 Introduction
8135 \end_layout
8136
8137 \begin_layout Standard
8138 This section describes how \SpecialChar LyX
8139  can be used to write articles for submission
8140  to the scientific journal 
8141 \emph on
8142 Astronomy and Astrophysics
8143 \emph default
8144  (
8145 \begin_inset Flex URL
8146 status collapsed
8147
8148 \begin_layout Plain Layout
8149
8150 http://www.edpsciences.fr/aa/
8151 \end_layout
8152
8153 \end_inset
8154
8155 ) using Version 5.01 of the document class 
8156 \family typewriter
8157 aa.cls
8158 \family default
8159 .
8160  This package can be downloaded from the ftp site
8161 \end_layout
8162
8163 \begin_layout Standard
8164 \begin_inset VSpace medskip
8165 \end_inset
8166
8167
8168 \end_layout
8169
8170 \begin_layout Standard
8171 \align center
8172 \begin_inset Flex URL
8173 status collapsed
8174
8175 \begin_layout Plain Layout
8176
8177 ftp://ftp.edpsciences.org/pub/aa/readme.html
8178 \end_layout
8179
8180 \end_inset
8181
8182
8183 \end_layout
8184
8185 \begin_layout Standard
8186 \begin_inset VSpace medskip
8187 \end_inset
8188
8189
8190 \end_layout
8191
8192 \begin_layout Standard
8193 A manual comes together with that package, and this text is not meant to
8194  replace the original manual but is merely a short guide in how to realize
8195  the correct form of your paper.
8196  
8197 \end_layout
8198
8199 \begin_layout Standard
8200 Please note that the publisher of the journal was changed from Springer
8201  to EDP Sciences starting January 1, 2001.
8202  That change involved also some slight changes to the style files, namely
8203  the removal of the thesaurus command.
8204  The \SpecialChar LyX
8205  class aa supports the newest version of these style files, V 5.01.
8206  If you have an older version installed, please upgrade.
8207  For compatibility, the old (version 4) layout has been kept as 
8208 \family sans
8209 article (A&A V4)
8210 \family default
8211 .
8212  Please refer to the comments in 
8213 \family typewriter
8214 \SpecialChar LyX
8215 Dir/layouts/aapaper.layout
8216 \family default
8217 .
8218 \end_layout
8219
8220 \begin_layout Subsection
8221 Getting started
8222 \end_layout
8223
8224 \begin_layout Standard
8225 It is recommended you start from the example template distributed with \SpecialChar LyX
8226 .
8227  If you are not using a template, note the following settings:
8228 \end_layout
8229
8230 \begin_layout Itemize
8231 Select 
8232 \family sans
8233 article (A&A)
8234 \family default
8235  in the 
8236 \family sans
8237 Document\SpecialChar menuseparator
8238 Settings
8239 \family default
8240  dialog (OK, that one was obvious).
8241 \end_layout
8242
8243 \begin_layout Itemize
8244 Don't change the option 
8245 \family sans
8246 Page
8247 \begin_inset space ~
8248 \end_inset
8249
8250 style
8251 \family default
8252 : Leave it set to 
8253 \family sans
8254 default
8255 \family default
8256 .
8257  The whole layout is done by the macros, you shouldn't change anything.
8258 \end_layout
8259
8260 \begin_layout Subsection
8261 The header block
8262 \end_layout
8263
8264 \begin_layout Standard
8265 First thing to enter is the header information.
8266  It consists of seven entries, of which some are optional.
8267  They are
8268 \end_layout
8269
8270 \begin_layout Itemize
8271
8272 \family sans
8273 Title
8274 \family default
8275 : [required] 
8276 \end_layout
8277
8278 \begin_layout Itemize
8279
8280 \family sans
8281 Subtitle
8282 \family default
8283 : [optional] 
8284 \end_layout
8285
8286 \begin_layout Itemize
8287
8288 \family sans
8289 Author
8290 \family default
8291 : [required]
8292 \end_layout
8293
8294 \begin_layout Itemize
8295
8296 \family sans
8297 Address
8298 \family default
8299 : [required]
8300 \end_layout
8301
8302 \begin_layout Itemize
8303
8304 \family sans
8305 Offprints
8306 \family default
8307 : [optional] if more than one author: whom to contact for offprint requests.
8308 \end_layout
8309
8310 \begin_layout Itemize
8311
8312 \family sans
8313 Mail
8314 \family default
8315 : [optional] mail address for contacts.
8316 \end_layout
8317
8318 \begin_layout Itemize
8319
8320 \family sans
8321 Date
8322 \family default
8323 : [required].
8324  Suggested format is 
8325 \family typewriter
8326 Received: <date>; Accepted <date> 
8327 \end_layout
8328
8329 \begin_layout Standard
8330 There is no need to issue the 
8331 \family typewriter
8332
8333 \backslash
8334 maketitle
8335 \family default
8336  command, this is done automatically by \SpecialChar LyX
8337  when the header is finished.
8338  Although the order of the single header entries doesn't matter it is advised
8339  to keep the above sequence, just to get the best optics and meets the layout
8340  of the real document.
8341 \end_layout
8342
8343 \begin_layout Standard
8344 If you want to place footnotes in the header block, e.
8345 \begin_inset space \thinspace{}
8346 \end_inset
8347
8348 g.
8349 \begin_inset space \space{}
8350 \end_inset
8351
8352 to state your present address, just use the standard footnote via the menu
8353  
8354 \family sans
8355 Insert\SpecialChar menuseparator
8356 Footnote.
8357
8358 \family default
8359  \SpecialChar LyX
8360  will automagically use the term 
8361 \family typewriter
8362
8363 \backslash
8364 thanks{}
8365 \family default
8366  in that case.
8367 \end_layout
8368
8369 \begin_layout Standard
8370 In addition to these topics, the macros use three additional \SpecialChar LaTeX
8371  commands that
8372  have no counterpart in \SpecialChar LyX
8373 :
8374 \end_layout
8375
8376 \begin_layout Itemize
8377
8378 \family typewriter
8379
8380 \backslash
8381 and
8382 \family default
8383  to separate different names for more than one author and institute, respectivel
8384 y.
8385 \end_layout
8386
8387 \begin_layout Itemize
8388
8389 \family typewriter
8390
8391 \backslash
8392 inst{<nr>}
8393 \family default
8394 to mark corresponding author/institute pairs.
8395  The institutes are numbered sequentially as they appear in the 
8396 \family sans
8397 Address
8398 \family default
8399  field, so you have to put a marker to each author.
8400 \end_layout
8401
8402 \begin_layout Itemize
8403
8404 \family typewriter
8405
8406 \backslash
8407 email{address}
8408 \family default
8409  to supply an email address for fast contact.
8410 \end_layout
8411
8412 \begin_layout Standard
8413 In all cases, the appropriate command has to be entered in \SpecialChar LyX
8414  and marked as
8415  \SpecialChar LaTeX
8416  code.
8417  See the examples.
8418  
8419 \end_layout
8420
8421 \begin_layout Subsection
8422 The abstract
8423 \end_layout
8424
8425 \begin_layout Standard
8426 The abstract should immediately follow the header block.
8427  With version 5 the abstract environment was changed to a command, and there
8428  is now a resctriction to only one paragraph.
8429  In addition, it should contain an entry with the keywords.
8430  This is not yet implemented for \SpecialChar LyX
8431 , therefore you have to enter the \SpecialChar LaTeX
8432  command
8433  
8434 \family typewriter
8435
8436 \backslash
8437 keywords{}
8438 \family default
8439  by hand and mark it as \SpecialChar LaTeX
8440  code.
8441  Refer to the example paper.
8442 \end_layout
8443
8444 \begin_layout Subsection
8445 Supported environments
8446 \end_layout
8447
8448 \begin_layout Standard
8449 The A&A paper layout supports the following environments for structuring
8450  your text:
8451 \end_layout
8452
8453 \begin_layout Itemize
8454
8455 \family sans
8456 Standard
8457 \end_layout
8458
8459 \begin_layout Itemize
8460
8461 \family sans
8462 Section
8463 \end_layout
8464
8465 \begin_layout Itemize
8466
8467 \family sans
8468 Subsection
8469 \end_layout
8470
8471 \begin_layout Itemize
8472
8473 \family sans
8474 Subsubsection
8475 \end_layout
8476
8477 \begin_layout Itemize
8478
8479 \family sans
8480 Itemize
8481 \end_layout
8482
8483 \begin_layout Itemize
8484
8485 \family sans
8486 Enumerate
8487 \end_layout
8488
8489 \begin_layout Itemize
8490
8491 \family sans
8492 Description
8493 \end_layout
8494
8495 \begin_layout Itemize
8496
8497 \family sans
8498 Caption
8499 \end_layout
8500
8501 \begin_layout Itemize
8502
8503 \family sans
8504 Abstract
8505 \end_layout
8506
8507 \begin_layout Itemize
8508
8509 \family sans
8510 Acknowledgment
8511 \end_layout
8512
8513 \begin_layout Itemize
8514
8515 \family sans
8516 Bibliography
8517 \end_layout
8518
8519 \begin_layout Itemize
8520
8521 \family sans
8522 \SpecialChar LaTeX
8523
8524 \end_layout
8525
8526 \begin_layout Subsection
8527 Commands not supported by \SpecialChar LyX
8528
8529 \end_layout
8530
8531 \begin_layout Standard
8532 Some commands are not yet supported by the 
8533 \family sans
8534 paper (A&A)
8535 \family default
8536  layout for \SpecialChar LyX
8537 .
8538  Some have already been mentioned.
8539  For the sake of completeness, they are listed all together here:
8540 \end_layout
8541
8542 \begin_layout Itemize
8543
8544 \family typewriter
8545
8546 \backslash
8547 and
8548 \end_layout
8549
8550 \begin_layout Itemize
8551
8552 \family typewriter
8553
8554 \backslash
8555 email
8556 \end_layout
8557
8558 \begin_layout Itemize
8559
8560 \family typewriter
8561
8562 \backslash
8563 appendix
8564 \end_layout
8565
8566 \begin_layout Itemize
8567
8568 \family typewriter
8569
8570 \backslash
8571 authorrunning
8572 \end_layout
8573
8574 \begin_layout Itemize
8575
8576 \family typewriter
8577
8578 \backslash
8579 inst{}
8580 \end_layout
8581
8582 \begin_layout Itemize
8583
8584 \family typewriter
8585
8586 \backslash
8587 keywords{}
8588 \end_layout
8589
8590 \begin_layout Itemize
8591
8592 \family typewriter
8593
8594 \backslash
8595 object{}
8596 \end_layout
8597
8598 \begin_layout Itemize
8599
8600 \family typewriter
8601
8602 \backslash
8603 titlerunning{}
8604 \end_layout
8605
8606 \begin_layout Standard
8607 If you want to use any of these commands, you have to enter them yourself.
8608  
8609 \series bold
8610 Do not forget to mark them as \SpecialChar LaTeX
8611  code!
8612 \end_layout
8613
8614 \begin_layout Subsection
8615 Figure and Table Floats
8616 \end_layout
8617
8618 \begin_layout Standard
8619 \SpecialChar LyX
8620  provides support for the necessary float environments 
8621 \family sans
8622 figure, figure*, table
8623 \family default
8624  and 
8625 \family sans
8626 table*
8627 \family default
8628 , therefore we won't tell much about it here.
8629  Refer to the 
8630 \emph on
8631 User's
8632 \begin_inset space ~
8633 \end_inset
8634
8635 Guide
8636 \emph default
8637 .
8638  Just remember that tables should be left-aligned.
8639  For that, select the table and change the alignment in 
8640 \family sans
8641 Edit\SpecialChar menuseparator
8642 Paragraph
8643 \begin_inset space ~
8644 \end_inset
8645
8646 Settings.
8647 \end_layout
8648
8649 \begin_layout Standard
8650 There is only one special thing: the figures with caption besides the figure.
8651  To create such a figure, you have to do the following:
8652 \end_layout
8653
8654 \begin_layout Enumerate
8655 Create a wide figure float: 
8656 \family sans
8657 Insert\SpecialChar menuseparator
8658 Float\SpecialChar menuseparator
8659 Figure
8660 \family default
8661 , then right click in the figure and select 
8662 \family sans
8663 Span
8664 \begin_inset space ~
8665 \end_inset
8666
8667 columns
8668 \family default
8669 .
8670 \end_layout
8671
8672 \begin_layout Enumerate
8673 Enter your caption text.
8674 \end_layout
8675
8676 \begin_layout Enumerate
8677 Press 
8678 \family sans
8679 Return
8680 \family default
8681  to move the cursor above the caption.
8682 \end_layout
8683
8684 \begin_layout Enumerate
8685 Insert your figure
8686 \end_layout
8687
8688 \begin_layout Enumerate
8689 Position the cursor behind the figure and insert a horizontal fill: 
8690 \family sans
8691 Insert\SpecialChar menuseparator
8692 Special
8693 \begin_inset space ~
8694 \end_inset
8695
8696 Character\SpecialChar menuseparator
8697 Horizontal
8698 \begin_inset space ~
8699 \end_inset
8700
8701 Fill
8702 \family default
8703 .
8704 \end_layout
8705
8706 \begin_layout Enumerate
8707 Switch to \SpecialChar LaTeX
8708  mode: 
8709 \family sans
8710 M-c
8711 \begin_inset space ~
8712 \end_inset
8713
8714 t
8715 \family default
8716 .
8717 \end_layout
8718
8719 \begin_layout Enumerate
8720 Enter 
8721 \family typewriter
8722
8723 \backslash
8724 parbox[b]{55mm}{
8725 \family default
8726 .
8727  
8728 \series bold
8729 Do not close the brace!
8730 \end_layout
8731
8732 \begin_layout Enumerate
8733 Position the cursor behind the caption text, switch to \SpecialChar LaTeX
8734  mode and insert
8735  the closing brace: 
8736 \family sans
8737 M-c
8738 \begin_inset space ~
8739 \end_inset
8740
8741 t
8742 \family default
8743  
8744 \family typewriter
8745 }
8746 \family default
8747 .
8748 \end_layout
8749
8750 \begin_layout Standard
8751 Also, refer to the figures in the example paper.
8752 \end_layout
8753
8754 \begin_layout Subsection
8755 Referee layout
8756 \end_layout
8757
8758 \begin_layout Standard
8759 For submission, the paper has to be formated in a special double-spacing
8760  layout.
8761  For this purpose, you have to give the option 
8762 \family typewriter
8763 referee
8764 \family default
8765  to the documentclass.
8766  This must be done using the extra class options field in the 
8767 \family sans
8768 Document\SpecialChar menuseparator
8769 Settings
8770 \family default
8771  dialog.
8772  Just enter the string 
8773 \family typewriter
8774 referee
8775 \family default
8776  there.
8777 \end_layout
8778
8779 \begin_layout Subsection
8780 The example paper
8781 \end_layout
8782
8783 \begin_layout Standard
8784 The 
8785 \family sans
8786 Examples
8787 \family default
8788  directory contains an example paper written with \SpecialChar LyX
8789 .
8790  It is the example paper from the original macro package, translated to
8791  \SpecialChar LyX
8792 .
8793  Use it for inspiration, and compare the original \SpecialChar LaTeX
8794  code with \SpecialChar LyX
8795  way of writing.
8796 \end_layout
8797
8798 \begin_layout Section
8799 AAS\SpecialChar TeX
8800
8801 \end_layout
8802
8803 \begin_layout Standard
8804 by 
8805 \noun on
8806 Mike Ressler
8807 \end_layout
8808
8809 \begin_layout Subsection
8810 Introduction
8811 \end_layout
8812
8813 \begin_layout Standard
8814 AAS\SpecialChar TeX
8815  is a set of macros produced by the American Astronomical Society to
8816  facilitate electronic manuscript submission to the three journals they
8817  publish: the Astrophysical Journal (including the Letters and Supplement),
8818  the Astronomical Journal, and the Publications of the Astronomical Society
8819  of the Pacific.
8820  \SpecialChar LyX
8821  has proven to be an excellent tool for generating these documents, especially
8822  given its equation, citation, and figure handling capabilities.
8823  \SpecialChar LyX
8824  requires version 5.0 (or higher) of these macros; preferably 5.2, which
8825  is the version described here, or higher.
8826  Versions prior to 5.0 are intended for use with \SpecialChar LaTeX
8827 2.09 and are fundamentally
8828  incompatible with \SpecialChar LyX
8829 .
8830  The AAS\SpecialChar TeX
8831  package may be downloaded from the AAS\SpecialChar TeX
8832  Web site
8833 \end_layout
8834
8835 \begin_layout Standard
8836 \begin_inset VSpace medskip
8837 \end_inset
8838
8839
8840 \end_layout
8841
8842 \begin_layout Standard
8843 \align center
8844 \begin_inset Flex URL
8845 status collapsed
8846
8847 \begin_layout Plain Layout
8848
8849 https://aas.org/aastex/aastex-downloads
8850 \end_layout
8851
8852 \end_inset
8853
8854
8855 \end_layout
8856
8857 \begin_layout Standard
8858 \begin_inset VSpace medskip
8859 \end_inset
8860
8861
8862 \end_layout
8863
8864 \begin_layout Standard
8865 A complete user guide is contained in that package and you should familiarize
8866  yourself with it thoroughly before embarking on writing a paper in \SpecialChar LyX
8867 .
8868  \SpecialChar LyX
8869  will not reduce the need to figure out all the AAS\SpecialChar TeX
8870  commands, it will only
8871  reduce the drudgery of typing everything in.
8872  It is your responsibility to ensure that the final exported \SpecialChar LaTeX
8873  document conforms
8874  completely to the requirements of the journal to which you are submitting
8875  your paper.
8876 \end_layout
8877
8878 \begin_layout Subsection
8879 Starting a New Paper
8880 \end_layout
8881
8882 \begin_layout Standard
8883 I strongly suggest that you start with the AAS\SpecialChar TeX
8884  template file.
8885  Click on 
8886 \family sans
8887 File\SpecialChar menuseparator
8888 New from
8889 \family default
8890  
8891 \family sans
8892 Template
8893 \family default
8894 , enter the new file name, then choose the 
8895 \family typewriter
8896 aastex.lyx
8897 \family default
8898  template.
8899  This will show the most common fields found in a manuscript.
8900  Simply overwrite the existing text (including the brackets, 
8901 \family typewriter
8902 <>
8903 \family default
8904 ) with the correct information.
8905  Many of the AAS\SpecialChar TeX
8906  commands and environments can be implemented directly in
8907  \SpecialChar LyX
8908 , but some cannot: most noticeably 
8909 \family typewriter
8910
8911 \backslash
8912 altaffilmark
8913 \family default
8914  and 
8915 \family typewriter
8916
8917 \backslash
8918 altaffiltext
8919 \family default
8920 , which should stick out like a sore thumb if you actually just opened the
8921  template file.
8922  For commands such as these, the \SpecialChar LaTeX
8923  code must be entered directly and marked
8924  as such.
8925  Such commands are referred to as \SpecialChar TeX
8926  code, or Evil Red Text.
8927  I tried to minimize the amount of \SpecialChar TeX
8928  code needed in an AAS\SpecialChar TeX
8929  document, but
8930  there is still a bit more required than any of us would like.
8931 \end_layout
8932
8933 \begin_layout Subsection
8934 Finishing Your Paper
8935 \end_layout
8936
8937 \begin_layout Standard
8938 When the paper is finished to your satisfaction and previews/prints correctly,
8939  there are a few 
8940 \begin_inset Quotes eld
8941 \end_inset
8942
8943 postprocessing
8944 \begin_inset Quotes erd
8945 \end_inset
8946
8947  actions which need to be done before you submit it to the journals.
8948  
8949 \end_layout
8950
8951 \begin_layout Enumerate
8952 Export your paper as a \SpecialChar LaTeX
8953  file (
8954 \family sans
8955 File\SpecialChar menuseparator
8956 Export\SpecialChar menuseparator
8957 \SpecialChar LaTeX
8958
8959 \family default
8960 ).
8961  
8962 \end_layout
8963
8964 \begin_layout Enumerate
8965 Edit the resulting 
8966 \family typewriter
8967 .tex
8968 \family default
8969  file with your favorite text editor
8970 \end_layout
8971
8972 \begin_deeper
8973 \begin_layout Enumerate
8974 remove the comment lines before the 
8975 \family typewriter
8976
8977 \backslash
8978 documentclass
8979 \family default
8980  command
8981 \end_layout
8982
8983 \begin_layout Enumerate
8984 remove the 
8985 \family typewriter
8986
8987 \backslash
8988 usepackage...{fontenc}
8989 \family default
8990  line if it appears (usually just after 
8991 \family typewriter
8992
8993 \backslash
8994 documentclass
8995 \family default
8996 }; also remove the 
8997 \family typewriter
8998
8999 \backslash
9000 secnumdepth
9001 \family default
9002  line if it appears.
9003 \end_layout
9004
9005 \begin_layout Enumerate
9006 remove everything between (and including) the 
9007 \family typewriter
9008
9009 \backslash
9010 makeatletter
9011 \family default
9012  and 
9013 \family typewriter
9014
9015 \backslash
9016 makeatother
9017 \family default
9018  commands, except for any commands you specifically put into the \SpecialChar LaTeX
9019  preamble
9020  (which should appear immediately after the 
9021 \begin_inset Quotes eld
9022 \end_inset
9023
9024 User specified \SpecialChar LaTeX
9025  commands
9026 \begin_inset Quotes erd
9027 \end_inset
9028
9029  comment in the 
9030 \family typewriter
9031 .tex
9032 \family default
9033  file).
9034 \end_layout
9035
9036 \end_deeper
9037 \begin_layout Enumerate
9038 Run the resulting file through \SpecialChar LaTeX
9039  to make sure it still processes correctly.
9040 \end_layout
9041
9042 \begin_layout Enumerate
9043 Reread the journal requirements to make sure your filenames and formats
9044  are correct.
9045 \end_layout
9046
9047 \begin_layout Enumerate
9048 Submit it.
9049 \end_layout
9050
9051 \begin_layout Subsection
9052 Comments On Specific Commands
9053 \end_layout
9054
9055 \begin_layout Standard
9056 I will not describe the detailed usage of the individual AAS\SpecialChar TeX
9057  commands: the
9058  AAS\SpecialChar TeX
9059  User Guide (
9060 \family typewriter
9061 aasguide.tex
9062 \family default
9063 ) gives a good description of each.
9064  Thus it's probably easiest for me to go down the list as found in the guide
9065  and offer comments where necessary.
9066  So let's begin \SpecialChar ldots
9067
9068 \end_layout
9069
9070 \begin_layout Subsubsection
9071 Things that work as expected
9072 \end_layout
9073
9074 \begin_layout Standard
9075 Because they work as you might expect, I simply list them and the section
9076  they are found in: 
9077 \family typewriter
9078
9079 \backslash
9080 documentclass
9081 \family default
9082  (2.1.1), 
9083 \family typewriter
9084
9085 \backslash
9086 begin{document}
9087 \family default
9088  (2.2), 
9089 \family typewriter
9090
9091 \backslash
9092 title
9093 \family default
9094  (2.3), 
9095 \family typewriter
9096
9097 \backslash
9098 author
9099 \family default
9100  (2.3), 
9101 \family typewriter
9102
9103 \backslash
9104 affil
9105 \family default
9106  (2.3), 
9107 \family typewriter
9108
9109 \backslash
9110 abstract
9111 \family default
9112  (2.4), 
9113 \family typewriter
9114
9115 \backslash
9116 keywords
9117 \family default
9118  (2.5), 
9119 \family typewriter
9120
9121 \backslash
9122 section
9123 \family default
9124  (2.7), 
9125 \family typewriter
9126
9127 \backslash
9128 subsection
9129 \family default
9130  (2.7), 
9131 \family typewriter
9132
9133 \backslash
9134 subsubsection
9135 \family default
9136  (2.7), 
9137 \family typewriter
9138
9139 \backslash
9140 paragraph
9141 \family default
9142  (2.7), 
9143 \family typewriter
9144
9145 \backslash
9146 facility
9147 \family default
9148  (2.10), 
9149 \family typewriter
9150
9151 \backslash
9152 begin{displaymath}
9153 \family default
9154  (2.12), 
9155 \family typewriter
9156
9157 \backslash
9158 begin{equation}
9159 \family default
9160  (2.12), 
9161 \family typewriter
9162
9163 \backslash
9164 begin{eqnarray}
9165 \family default
9166  (2.12), 
9167 \family typewriter
9168
9169 \backslash
9170 begin{mathletters}
9171 \family default
9172  (2.12), 
9173 \family typewriter
9174
9175 \backslash
9176 begin{thebibliography}
9177 \family default
9178  (2.13.1), 
9179 \family typewriter
9180
9181 \backslash
9182 bibitem
9183 \family default
9184  (2.13.2), all the cite commands and their variations (2.13.2), the generic
9185  graphicx figure commands (2.14.1), 
9186 \family typewriter
9187
9188 \backslash
9189 begin{table}
9190 \family default
9191  (2.15.4), 
9192 \family typewriter
9193
9194 \backslash
9195 begin{tabular}
9196 \family default
9197  (2.15.4), 
9198 \family typewriter
9199
9200 \backslash
9201 caption
9202 \family default
9203  (2.15.4), 
9204 \family typewriter
9205
9206 \backslash
9207 label
9208 \family default
9209  (2.15.4, amongst other places), 
9210 \family typewriter
9211
9212 \backslash
9213 tablerefs
9214 \family default
9215  (2.15.5), 
9216 \family typewriter
9217
9218 \backslash
9219 tablecomments
9220 \family default
9221  (2.15.5), 
9222 \family typewriter
9223
9224 \backslash
9225 url
9226 \family default
9227  (2.17.4), 
9228 \family typewriter
9229
9230 \backslash
9231 end{document}
9232 \family default
9233  (2.18).
9234 \end_layout
9235
9236 \begin_layout Standard
9237 The following style options also work correctly: 
9238 \family typewriter
9239 longabstract
9240 \family default
9241  (2.4), 
9242 \family typewriter
9243 preprint
9244 \family default
9245  (3.2.1), 
9246 \family typewriter
9247 preprint2
9248 \family default
9249  (3.2.2), 
9250 \family typewriter
9251 eqsecnum
9252 \family default
9253  (3.3), 
9254 \family typewriter
9255 flushrt
9256 \family default
9257  (3.4).
9258  Simply put them in the 
9259 \family sans
9260 Options
9261 \family default
9262  box in 
9263 \family sans
9264 Layout\SpecialChar menuseparator
9265 Document
9266 \family default
9267 .
9268 \end_layout
9269
9270 \begin_layout Subsubsection
9271 Things that work, but require more comment
9272 \end_layout
9273
9274 \begin_layout Standard
9275 The following items work, but require a little more discussion:
9276 \end_layout
9277
9278 \begin_layout Itemize
9279 These items are reserved for use by the journal editors, but you can put
9280  them into the \SpecialChar LaTeX
9281  preamble if you feel compelled to do so: 
9282 \family typewriter
9283
9284 \backslash
9285 received
9286 \family default
9287
9288 \family typewriter
9289
9290 \backslash
9291 revised
9292 \family default
9293
9294 \family typewriter
9295
9296 \backslash
9297 accepted
9298 \family default
9299
9300 \family typewriter
9301
9302 \backslash
9303 ccc
9304 \family default
9305
9306 \family typewriter
9307
9308 \backslash
9309 cpright
9310 \family default
9311  (all from 2.1.3)
9312 \end_layout
9313
9314 \begin_layout Itemize
9315 These items may be placed in the \SpecialChar LaTeX
9316  preamble, and are included as blanks in
9317  the template file: 
9318 \family typewriter
9319
9320 \backslash
9321 slugcomment
9322 \family default
9323  (2.1.4), 
9324 \family typewriter
9325
9326 \backslash
9327 shorttitle
9328 \family default
9329  (2.1.5), 
9330 \family typewriter
9331
9332 \backslash
9333 shortauthors
9334 \family default
9335  (2.1.5)
9336 \end_layout
9337
9338 \begin_layout Itemize
9339
9340 \family typewriter
9341
9342 \backslash
9343 email
9344 \family default
9345  (2.3) – can only be used 
9346 \begin_inset Quotes eld
9347 \end_inset
9348
9349 standalone
9350 \begin_inset Quotes erd
9351 \end_inset
9352
9353 , not in the middle of a paragraph.
9354  Use \SpecialChar TeX
9355  code if you need to embed it.
9356 \end_layout
9357
9358 \begin_layout Itemize
9359
9360 \family typewriter
9361
9362 \backslash
9363 and
9364 \family default
9365  (2.3) – will have extra {} after it.
9366  This should not cause an error.
9367 \end_layout
9368
9369 \begin_layout Itemize
9370
9371 \family typewriter
9372
9373 \backslash
9374 notetoeditor
9375 \family default
9376  (2.6) – can only be used 
9377 \begin_inset Quotes eld
9378 \end_inset
9379
9380 standalone
9381 \begin_inset Quotes erd
9382 \end_inset
9383
9384 , not in the middle of a paragraph.
9385  Use \SpecialChar TeX
9386  code if you need to embed it.
9387 \end_layout
9388
9389 \begin_layout Itemize
9390
9391 \family typewriter
9392
9393 \backslash
9394 placetable
9395 \family default
9396  (2.8) – can't insert a cross-reference tag, you must type the tag name by
9397  hand
9398 \end_layout
9399
9400 \begin_layout Itemize
9401
9402 \family typewriter
9403
9404 \backslash
9405 placefigure
9406 \family default
9407  (2.8) – same as for 
9408 \family typewriter
9409
9410 \backslash
9411 placetable
9412 \end_layout
9413
9414 \begin_layout Itemize
9415
9416 \family typewriter
9417
9418 \backslash
9419 acknowledgements
9420 \family default
9421  (2.9) – will have extra {} after it.
9422  This should not cause an error.
9423 \end_layout
9424
9425 \begin_layout Itemize
9426
9427 \family typewriter
9428
9429 \backslash
9430 appendix
9431 \family default
9432  (2.11) – will have extra {} after it.
9433  This should not cause an error.
9434 \end_layout
9435
9436 \begin_layout Itemize
9437
9438 \family typewriter
9439
9440 \backslash
9441 figcaption
9442 \family default
9443  (2.14.2) – you can insert an optional filename argument by placing the cursor
9444  at the beginning of the text and selecting 
9445 \family sans
9446 Insert\SpecialChar menuseparator
9447 Short Title
9448 \family default
9449 .
9450  
9451 \begin_inset Quotes eld
9452 \end_inset
9453
9454 Short Title
9455 \begin_inset Quotes erd
9456 \end_inset
9457
9458  inserts an optional argument of the type needed by 
9459 \family typewriter
9460
9461 \backslash
9462 figcaption
9463 \family default
9464 .
9465  Hopefully it will be renamed someday.
9466 \end_layout
9467
9468 \begin_layout Itemize
9469
9470 \family typewriter
9471
9472 \backslash
9473 objectname
9474 \family default
9475  (2.17.1) – same as 
9476 \family typewriter
9477
9478 \backslash
9479 figcaption
9480 \family default
9481  for the catalog ID optional parameter
9482 \end_layout
9483
9484 \begin_layout Itemize
9485
9486 \family typewriter
9487
9488 \backslash
9489 dataset
9490 \family default
9491  (2.17.1) – same as 
9492 \family typewriter
9493
9494 \backslash
9495 figcaption
9496 \family default
9497  for the catalog ID optional parameter
9498 \end_layout
9499
9500 \begin_layout Subsubsection
9501 Things not implemented, use \SpecialChar TeX
9502  code
9503 \end_layout
9504
9505 \begin_layout Standard
9506
9507 \family typewriter
9508
9509 \backslash
9510 altaffilmark
9511 \family default
9512  (2.3), 
9513 \family typewriter
9514
9515 \backslash
9516 altaffiltext
9517 \family default
9518  (2.3), 
9519 \family typewriter
9520
9521 \backslash
9522 eqnum
9523 \family default
9524  (2.12), 
9525 \family typewriter
9526
9527 \backslash
9528 setcounter{equation}
9529 \family default
9530  (2.12), Journal name abbreviations (2.13.4), 
9531 \family typewriter
9532
9533 \backslash
9534 figurenum
9535 \family default
9536  (2.14.1), 
9537 \family typewriter
9538
9539 \backslash
9540 epsscale
9541 \family default
9542  (2.14.1), 
9543 \family typewriter
9544
9545 \backslash
9546 plotone
9547 \family default
9548  (2.14.1), 
9549 \family typewriter
9550
9551 \backslash
9552 plottwo
9553 \family default
9554  (2.14.1), 
9555 \family typewriter
9556
9557 \backslash
9558 tablenum
9559 \family default
9560  (2.15.4), 
9561 \family typewriter
9562
9563 \backslash
9564 tableline
9565 \family default
9566  (2.15.4, insert it as the first element in the lefthand cell after where
9567  you want it.
9568  Don't use any of \SpecialChar LyX
9569 's rules in the table), 
9570 \family typewriter
9571
9572 \backslash
9573 tablenotemark
9574 \family default
9575  (2.15.5), 
9576 \family typewriter
9577
9578 \backslash
9579 tablenotetext
9580 \family default
9581  (2.15.5), much of Misc (2.17, except 
9582 \family typewriter
9583
9584 \backslash
9585 objectname
9586 \family default
9587
9588 \family typewriter
9589
9590 \backslash
9591 dataset
9592 \family default
9593
9594 \family typewriter
9595
9596 \backslash
9597 url
9598 \family default
9599 , and 
9600 \family typewriter
9601
9602 \backslash
9603 email
9604 \family default
9605 ; see above), 
9606 \family typewriter
9607
9608 \backslash
9609 singlespace
9610 \family default
9611  (3.1), 
9612 \family typewriter
9613
9614 \backslash
9615 doublespace
9616 \family default
9617  (3.1), 
9618 \family typewriter
9619
9620 \backslash
9621 onecolumn
9622 \family default
9623  (3.2), 
9624 \family typewriter
9625
9626 \backslash
9627 twocolumn
9628 \family default
9629  (3.2)
9630 \end_layout
9631
9632 \begin_layout Subsubsection
9633 Things that cannot be implemented
9634 \end_layout
9635
9636 \begin_layout Standard
9637 \SpecialChar ldots
9638  at least in any meaningful sort of way, so I suggest ignoring them.
9639  They are the references environment (2.13.3), and the deluxetable environment
9640  (2.15).
9641  If you really, really need to use deluxetable, I suggest editing it in
9642  a separate file with a text editor, then using 
9643 \family sans
9644 Insert\SpecialChar menuseparator
9645 Child
9646 \begin_inset space ~
9647 \end_inset
9648
9649 Document
9650 \family default
9651  to include it in your \SpecialChar LyX
9652  document.
9653  See the 
9654 \family typewriter
9655 aas_sample.lyx
9656 \family default
9657  file to see an example of this.
9658 \end_layout
9659
9660 \begin_layout Subsection
9661 FAQs, Tips, Tricks, and Other Ruminations
9662 \end_layout
9663
9664 \begin_layout Subsubsection
9665 Getting \SpecialChar LyX
9666  and AAS\SpecialChar TeX
9667  to cooperate
9668 \end_layout
9669
9670 \begin_layout Standard
9671 It can be a bit tricky to get \SpecialChar LyX
9672  to recognize a new layout and document class.
9673  When all else fails, do this:
9674 \end_layout
9675
9676 \begin_layout Enumerate
9677 Make certain that \SpecialChar LaTeX
9678  can find AAS\SpecialChar TeX
9679 .
9680  Copy sample.tex (and perhaps table.tex) from the AAS\SpecialChar TeX
9681  distribution into a
9682  directory completely unrelated to \SpecialChar LaTeX
9683  or AAS\SpecialChar TeX
9684  and run \SpecialChar LaTeX
9685  on 
9686 \family typewriter
9687 sample.tex
9688 \family default
9689 .
9690 \end_layout
9691
9692 \begin_layout Enumerate
9693 Make certain that 
9694 \family typewriter
9695 aastex.layout
9696 \family default
9697  appears in \SpecialChar LyX
9698 's 
9699 \family typewriter
9700 layouts
9701 \family default
9702  folder
9703 \end_layout
9704
9705 \begin_layout Enumerate
9706 Rerun 
9707 \family sans
9708 Tools\SpecialChar menuseparator
9709 Reconfigure
9710 \family default
9711  in \SpecialChar LyX
9712 , then restart \SpecialChar LyX
9713 .
9714 \end_layout
9715
9716 \begin_layout Enumerate
9717 Open a regular new file, not from a template.
9718  Does AAS\SpecialChar TeX
9719  appear in the class list in 
9720 \family sans
9721 Document\SpecialChar menuseparator
9722 Settings
9723 \family default
9724 ?
9725 \end_layout
9726
9727 \begin_layout Standard
9728 If you get a warning from an existing AAS\SpecialChar TeX
9729  document about not being able
9730  to find the AAS\SpecialChar TeX
9731  layout or a message about 
9732 \begin_inset Quotes eld
9733 \end_inset
9734
9735 You should not mix title layouts with normal ones
9736 \begin_inset Quotes erd
9737 \end_inset
9738
9739 , things haven't been installed correctly.
9740 \end_layout
9741
9742 \begin_layout Subsubsection
9743 \SpecialChar LaTeX
9744  error processing a table 
9745 \end_layout
9746
9747 \begin_layout Standard
9748 \SpecialChar LyX
9749 , by default, attempts to center the table caption/title.
9750  This seems to produce a bad interaction in AAS\SpecialChar TeX
9751  so you should click somewhere
9752  in the caption/title, then select 
9753 \family sans
9754 Edit\SpecialChar menuseparator
9755 Paragraph
9756 \begin_inset space ~
9757 \end_inset
9758
9759 Settings
9760 \family default
9761 , then set the 
9762 \family sans
9763 Alignment
9764 \family default
9765  to 
9766 \family sans
9767 Block
9768 \family default
9769 .
9770  This took care of it for me.
9771 \end_layout
9772
9773 \begin_layout Subsubsection
9774 References
9775 \end_layout
9776
9777 \begin_layout Standard
9778 A couple of things: 1) I have noticed some funny spacing in the reference
9779  entries in the text.
9780  When you enter the bibliography item data, make sure their is 
9781 \emph on
9782 no
9783 \emph default
9784  space between the last author and the parenthesis setting off the year;
9785  
9786 \emph on
9787 e.
9788 \begin_inset space \thinspace{}
9789 \end_inset
9790
9791 g.
9792 \begin_inset space \space{}
9793 \end_inset
9794
9795
9796 \emph default
9797 type 
9798 \family typewriter
9799 Ressler(1992)
9800 \family default
9801 , not 
9802 \family typewriter
9803 Ressler (1992)
9804 \family default
9805 .
9806  2) Entering the references at all is not obvious.
9807  The easiest thing is to start typing your first reference at the end of
9808  the document, then mark it as type 
9809 \family sans
9810 References
9811 \family default
9812 .
9813  That will put a small gray box in front of what you just typed.
9814  Click on the box to fill in the rest of the information.
9815  For new references, go to the end of an existing reference and press return.
9816  That will create a new line with its own box, etc.
9817 \end_layout
9818
9819 \begin_layout Subsubsection
9820 Including EPS files
9821 \end_layout
9822
9823 \begin_layout Standard
9824 Even though AAS\SpecialChar TeX
9825  provides its own figure commands (
9826 \family typewriter
9827
9828 \backslash
9829 plotone
9830 \family default
9831 , for example), I much prefer \SpecialChar LaTeX
9832 's standard figure commands (with the default
9833  graphicx).
9834  You can insert the 
9835 \family typewriter
9836
9837 \backslash
9838 plotone
9839 \family default
9840 , etc.
9841 \begin_inset space ~
9842 \end_inset
9843
9844 commands as \SpecialChar TeX
9845  code into a Figure Float box if you desire, but I never have
9846  much luck getting the layout right.
9847  With the standard graphics, \SpecialChar LyX
9848  will insert a 
9849 \family typewriter
9850
9851 \backslash
9852 usepackage{graphicx}
9853 \family default
9854  command into the \SpecialChar LaTeX
9855  preamble and handle the figures in the standard \SpecialChar LaTeX2e
9856  way,
9857  interspersing the figures in the text.
9858  I believe ApJ accepts figures exactly this way now; AJ might still use
9859  the 
9860 \begin_inset Quotes eld
9861 \end_inset
9862
9863 stack everything at the end
9864 \begin_inset Quotes erd
9865 \end_inset
9866
9867  technique.
9868 \end_layout
9869
9870 \begin_layout Subsubsection
9871 Things I could have done, but didn't
9872 \end_layout
9873
9874 \begin_layout Standard
9875 There are a few 
9876 \begin_inset Quotes eld
9877 \end_inset
9878
9879 pretty
9880 \begin_inset Quotes erd
9881 \end_inset
9882
9883  things I could have implemented, but chose not to.
9884  For instance, I saw no point in double-spacing the text in the \SpecialChar LyX
9885  window,
9886  even though it is double-spaced in the paper manuscript.
9887  Also, I chose not to make separate layouts for the preprint and preprint2
9888  styles.
9889  Since I assume you will spend most of your time in the plain manuscript
9890  mode anyway, I decided not to chew up more disk space with this.
9891  
9892 \end_layout
9893
9894 \begin_layout Subsection
9895 Final Caveat
9896 \end_layout
9897
9898 \begin_layout Standard
9899 Your mileage may vary.
9900  I've now had papers published by both ApJ and AJ that have had 98% of the
9901  effort done in \SpecialChar LyX
9902 ; the last 2% was the \SpecialChar LaTeX
9903  post-processing and a few cleanups.
9904  I have had no trouble with the submission process, and I'm sure the journals
9905  were never aware that there might be a difference.
9906  So, go forth and publish!
9907 \end_layout
9908
9909 \begin_layout Section
9910 AMS \SpecialChar LaTeX
9911
9912 \end_layout
9913
9914 \begin_layout Standard
9915 by 
9916 \noun on
9917 David Johnson
9918 \noun default
9919 ; updated by 
9920 \noun on
9921 Richard Heck
9922 \end_layout
9923
9924 \begin_layout Standard
9925 \begin_inset VSpace bigskip
9926 \end_inset
9927
9928
9929 \end_layout
9930
9931 \begin_layout Standard
9932 \noindent
9933 The AMS \SpecialChar LaTeX
9934  layouts are set up to conform to suggested styles for mathematical
9935  papers to be submitted to American Mathematical Society publications.
9936  The layouts are not tailored to a specific journal, but easily can be.
9937  You should refer to the AMS documentation for specific instructions for
9938  each journal (usually it will entail only changing a single line in the
9939  \SpecialChar TeX
9940  output).
9941  That documentation is available on the Web at 
9942 \begin_inset Flex URL
9943 status open
9944
9945 \begin_layout Plain Layout
9946
9947 http://www.ams.org
9948 \end_layout
9949
9950 \end_inset
9951
9952  or by ftp at 
9953 \begin_inset Flex URL
9954 status open
9955
9956 \begin_layout Plain Layout
9957
9958 ftp://ftp.ams.org/pub/tex/amslatex/
9959 \end_layout
9960
9961 \end_inset
9962
9963 .
9964  These layouts are appropriate, and useful, for any mathematical writing.
9965  
9966 \end_layout
9967
9968 \begin_layout Standard
9969 There are two basic AMS \SpecialChar LaTeX
9970  layouts: 
9971 \end_layout
9972
9973 \begin_layout Itemize
9974 amsart: The standard AMS article format.
9975 \end_layout
9976
9977 \begin_layout Itemize
9978 amsbook: the standard AMS book (really, monograph) format.
9979  
9980 \end_layout
9981
9982 \begin_layout Standard
9983 The layouts themselves contain only the minimum necessary to use the AMS
9984  classes.
9985  They do not, in particular, contain any of the `theorem' environments used
9986  for setting theorems, lemmas, and the like.
9987  These are contained, instead, in the 
9988 \begin_inset Flex Code
9989 status collapsed
9990
9991 \begin_layout Plain Layout
9992 Theorems (AMS)
9993 \end_layout
9994
9995 \end_inset
9996
9997  module, which is loaded by default when you select one of the AMS classes.
9998  (It can also be used with other classes and can be removed, if you would
9999  rather use something else.) Less commonly used environments are in the 
10000 \begin_inset Flex Code
10001 status collapsed
10002
10003 \begin_layout Plain Layout
10004 Theorems (AMS-Extended)
10005 \end_layout
10006
10007 \end_inset
10008
10009  module, which must be loaded manually.
10010 \end_layout
10011
10012 \begin_layout Standard
10013 By default, theorems and the like are numbered consecutively throughout
10014  the document, but this may be modified by loading the module 
10015 \begin_inset Flex Code
10016 status collapsed
10017
10018 \begin_layout Plain Layout
10019 Theorems (Order by Section)
10020 \end_layout
10021
10022 \end_inset
10023
10024  or, if you are using 
10025 \begin_inset Flex Code
10026 status collapsed
10027
10028 \begin_layout Plain Layout
10029 book (AMS)
10030 \end_layout
10031
10032 \end_inset
10033
10034 , the module 
10035 \begin_inset Flex Code
10036 status collapsed
10037
10038 \begin_layout Plain Layout
10039 Theorems (Order by Chapter)
10040 \end_layout
10041
10042 \end_inset
10043
10044 .
10045  These will number the results as 
10046 \begin_inset Formula $n.m$
10047 \end_inset
10048
10049 , where the first number refers to the section (or chapter) and the second
10050  refers to the total number of results so far in that section (or chapter).
10051  Many environments are also available unnumbered.
10052  These are indicated by an asterisk at the end.
10053  If you happen to want 
10054 \emph on
10055 only
10056 \emph default
10057  unnumbered results, the module 
10058 \begin_inset Flex Code
10059 status collapsed
10060
10061 \begin_layout Plain Layout
10062 Theorems (Starred)
10063 \end_layout
10064
10065 \end_inset
10066
10067  provides that option.
10068 \end_layout
10069
10070 \begin_layout Standard
10071 Note that these modules do not 
10072 \emph on
10073 have
10074 \emph default
10075  to be used with the AMS classes.
10076  It is perfectly possible to use the 
10077 \begin_inset Flex Code
10078 status collapsed
10079
10080 \begin_layout Plain Layout
10081 Theorems (AMS)
10082 \end_layout
10083
10084 \end_inset
10085
10086  module, and the others mentioned, with other classes, such as 
10087 \begin_inset Flex Code
10088 status collapsed
10089
10090 \begin_layout Plain Layout
10091 article
10092 \end_layout
10093
10094 \end_inset
10095
10096
10097 \begin_inset Flex Code
10098 status collapsed
10099
10100 \begin_layout Plain Layout
10101 report
10102 \end_layout
10103
10104 \end_inset
10105
10106
10107 \begin_inset Flex Code
10108 status collapsed
10109
10110 \begin_layout Plain Layout
10111 book (KOMA-script)
10112 \end_layout
10113
10114 \end_inset
10115
10116 , and so forth.
10117 \end_layout
10118
10119 \begin_layout Subsection
10120 What these layouts provide
10121 \end_layout
10122
10123 \begin_layout Standard
10124 There is a long list of included environments provided by these layouts.
10125  In AMS-\SpecialChar LaTeX
10126 , there is, in fact, an opportunity to define an unlimited variety
10127  of `theorem' environments.
10128  However, the AMS recommends the environments that are available in \SpecialChar LyX
10129 .
10130  
10131 \end_layout
10132
10133 \begin_layout Standard
10134 The following environments—as well as the standard environments, such as
10135  
10136 \begin_inset Flex Noun
10137 status collapsed
10138
10139 \begin_layout Plain Layout
10140 section
10141 \end_layout
10142
10143 \end_inset
10144
10145
10146 \begin_inset Flex Noun
10147 status collapsed
10148
10149 \begin_layout Plain Layout
10150 bibliography
10151 \end_layout
10152
10153 \end_inset
10154
10155
10156 \begin_inset Flex Noun
10157 status collapsed
10158
10159 \begin_layout Plain Layout
10160 title
10161 \end_layout
10162
10163 \end_inset
10164
10165
10166 \begin_inset Flex Noun
10167 status collapsed
10168
10169 \begin_layout Plain Layout
10170 author
10171 \end_layout
10172
10173 \end_inset
10174
10175 , and 
10176 \begin_inset Flex Noun
10177 status collapsed
10178
10179 \begin_layout Plain Layout
10180 date
10181 \end_layout
10182
10183 \end_inset
10184
10185 —are provided by 
10186 \begin_inset Flex Code
10187 status collapsed
10188
10189 \begin_layout Plain Layout
10190 article (AMS)
10191 \end_layout
10192
10193 \end_inset
10194
10195  and 
10196 \begin_inset Flex Code
10197 status collapsed
10198
10199 \begin_layout Plain Layout
10200 book (AMS)
10201 \end_layout
10202
10203 \end_inset
10204
10205 :
10206 \end_layout
10207
10208 \begin_layout Description
10209 Address This should be the author's permanent address.
10210 \end_layout
10211
10212 \begin_layout Description
10213 Current
10214 \begin_inset space ~
10215 \end_inset
10216
10217 Address This should be the author's temporary address at the time of submission,
10218  if different from the Address.
10219 \end_layout
10220
10221 \begin_layout Description
10222 Email Author's e-mail address
10223 \end_layout
10224
10225 \begin_layout Description
10226 URL Author's Web address, if desired.
10227 \end_layout
10228
10229 \begin_layout Description
10230 Keywords Key words or phrases used to identify specific topics discussed
10231  in the paper.
10232 \end_layout
10233
10234 \begin_layout Description
10235 Subjectclass These refer to the AMS Subject Classifications, published and
10236  described in 
10237 \emph on
10238 Mathematical Reviews
10239 \emph default
10240 .
10241  These are also available online at the AMS cites listed above.
10242 \end_layout
10243
10244 \begin_layout Description
10245 Thanks
10246 \end_layout
10247
10248 \begin_layout Description
10249 Dedicatory
10250 \end_layout
10251
10252 \begin_layout Description
10253 Translator
10254 \end_layout
10255
10256 \begin_layout Standard
10257 The following environments are provided by both the 
10258 \begin_inset Flex Code
10259 status collapsed
10260
10261 \begin_layout Plain Layout
10262 Theorems
10263 \end_layout
10264
10265 \end_inset
10266
10267  and 
10268 \begin_inset Flex Code
10269 status collapsed
10270
10271 \begin_layout Plain Layout
10272 Theorems (AMS)
10273 \end_layout
10274
10275 \end_inset
10276
10277  modules, in the latter case in both starred (unnumbered) and unstarred
10278  (numbered) versions.
10279  These same environments are provided only in the starred versions by the
10280  
10281 \begin_inset Flex Code
10282 status collapsed
10283
10284 \begin_layout Plain Layout
10285 Theorems (Starred)
10286 \end_layout
10287
10288 \end_inset
10289
10290  module:
10291 \end_layout
10292
10293 \begin_layout Theorem
10294 This is typically used for the statements of major results.
10295  
10296 \end_layout
10297
10298 \begin_layout Corollary*
10299 This is used for statements which follow fairly directly from previous statement
10300 s.
10301  Again, these can be major results.
10302  
10303 \end_layout
10304
10305 \begin_layout Lemma
10306 These are smaller results needed to prove other statements.
10307 \end_layout
10308
10309 \begin_layout Proposition
10310 These are less major results which (hopefully) add to the general theory
10311  being discussed.
10312 \end_layout
10313
10314 \begin_layout Conjecture
10315 These are statements provided without justification, which the author does
10316  not know how to prove, but which seem to be true (to the author, at least).
10317 \end_layout
10318
10319 \begin_layout Definition*
10320 Guess what this is for.
10321  The font is different for this environment than for the previous ones.
10322  
10323 \end_layout
10324
10325 \begin_layout Example*
10326 Used for examples illustrating proven results.
10327 \end_layout
10328
10329 \begin_layout Problem
10330 It's not really known what this is for.
10331  You should figure it out.
10332 \end_layout
10333
10334 \begin_layout Exercise*
10335 Write a description for this one.
10336 \end_layout
10337
10338 \begin_layout Remark
10339 This environment is also a type of theorem, usually a lesser sort of observation.
10340 \end_layout
10341
10342 \begin_layout Claim*
10343 Often used in the course of giving a proof of a larger result.
10344 \end_layout
10345
10346 \begin_layout Case
10347 Generally, these are used to break up long arguments, using specific instances
10348  of some condition.
10349  
10350 \end_layout
10351
10352 \begin_layout Case
10353 The numbering scheme for cases is on its own, not together with other numbered
10354  statements.
10355  
10356 \end_layout
10357
10358 \begin_layout Proof
10359 At the end of this environment, a QED symbol (usually a square, but it can
10360  vary with different styles) is placed.
10361  If you want to have other environments within this one—for example, Case
10362  environments—and have the QED symbol appear only after them, then the other
10363  environments need to be nested within the proof environment.
10364  See the section 
10365 \emph on
10366 Nesting Environments
10367 \emph default
10368  of the 
10369 \emph on
10370 User's Guide
10371 \emph default
10372  for information on nesting.
10373 \end_layout
10374
10375 \begin_layout Standard
10376 And these environments are provided by 
10377 \begin_inset Flex Code
10378 status collapsed
10379
10380 \begin_layout Plain Layout
10381 Theorems (AMS-Extended)
10382 \end_layout
10383
10384 \end_inset
10385
10386 :
10387 \end_layout
10388
10389 \begin_layout Criterion*
10390 A required condition.
10391 \end_layout
10392
10393 \begin_layout Algorithm*
10394 A general procedure to be used.
10395 \end_layout
10396
10397 \begin_layout Axiom*
10398 This is a property or statement taken as true within the system being discussed.
10399 \end_layout
10400
10401 \begin_layout Condition*
10402 Sometimes used to state a condition assumed within the present context of
10403  discussion.
10404 \end_layout
10405
10406 \begin_layout Note*
10407 Similar to a Remark.
10408 \end_layout
10409
10410 \begin_layout Notation*
10411 Used for the explanation of, yes, notation.
10412 \end_layout
10413
10414 \begin_layout Summary
10415 Do we really need to tell you? 
10416 \end_layout
10417
10418 \begin_layout Acknowledgement*
10419 Acknowledgement.
10420 \end_layout
10421
10422 \begin_layout Conclusion*
10423 Sometimes used at the end of a long train of argument.
10424 \end_layout
10425
10426 \begin_layout Fact
10427 Used in a way similar to Proposition, though perhaps lower on the scale.
10428 \end_layout
10429
10430 \begin_layout Standard
10431 In addition, the AMS classes automatically provide the AMS \SpecialChar LaTeX
10432  and AMS fonts
10433  packages.
10434  They need to be available on your system in order to use these environments.
10435 \end_layout
10436
10437 \begin_layout Section
10438 AGU journals (
10439 \family sans
10440 aguplus
10441 \family default
10442 )
10443 \end_layout
10444
10445 \begin_layout Standard
10446 by 
10447 \shape smallcaps
10448 Martin Vermeer
10449 \end_layout
10450
10451 \begin_layout Subsection
10452 Description
10453 \end_layout
10454
10455 \begin_layout Standard
10456 These are the layout files for some of the journals of the American Geophysical
10457  Society.
10458  It is assumed that you have both the AGU's own class files and AGUplus
10459  installed (everything to be found at
10460 \begin_inset Flex URL
10461 status collapsed
10462
10463 \begin_layout Plain Layout
10464
10465 http://publications.agu.org/files/2013/08/AGU-LaTeX.zip
10466 \end_layout
10467
10468 \end_inset
10469
10470 ).
10471 \end_layout
10472
10473 \begin_layout Subsection
10474 New styles
10475 \end_layout
10476
10477 \begin_layout Standard
10478 Redefined are 
10479 \family sans
10480 Paragraph
10481 \family default
10482
10483 \family sans
10484 Paragraph*
10485 \family default
10486 .
10487  They are still called this in the \SpecialChar LyX
10488  GUI, though their \SpecialChar LaTeX
10489  equivalents in the
10490  AGU classes are 
10491 \family sans
10492 Subsubsubsection
10493 \family default
10494  and 
10495 \family sans
10496 Subsubsubsection*
10497 \family default
10498 .
10499 \end_layout
10500
10501 \begin_layout Standard
10502 Newly defined styles are 
10503 \family sans
10504 Left_Header
10505 \family default
10506
10507 \family sans
10508 Right_Header
10509 \family default
10510
10511 \family sans
10512 Received
10513 \family default
10514
10515 \family sans
10516 Revised
10517 \family default
10518
10519 \family sans
10520 Accepted
10521 \family default
10522
10523 \family sans
10524 CCC
10525 \family default
10526
10527 \family sans
10528 PaperId
10529 \family default
10530
10531 \family sans
10532 AuthorAddr
10533 \family default
10534
10535 \family sans
10536 SlugComment
10537 \family default
10538 .
10539  These are mostly manuscript attributes and defined in the AGU class documentati
10540 on.
10541 \end_layout
10542
10543 \begin_layout Standard
10544 I suspect this is still badly incomplete.
10545 \end_layout
10546
10547 \begin_layout Subsection
10548 New floats
10549 \end_layout
10550
10551 \begin_layout Standard
10552
10553 \family sans
10554 Planotable
10555 \family default
10556  and 
10557 \family sans
10558 Plate
10559 \family default
10560 .
10561  We also have a new 
10562 \family sans
10563 Table_Caption
10564 \family default
10565 .
10566 \end_layout
10567
10568 \begin_layout Subsection
10569 Supported journals
10570 \end_layout
10571
10572 \begin_layout Itemize
10573
10574 \emph on
10575 Journal of Geophysical Research
10576 \emph default
10577
10578 \family typewriter
10579 jgrga.layout
10580 \family default
10581  — Martin Vermeer
10582 \end_layout
10583
10584 \begin_layout Standard
10585 Add your own, it isn't so hard! Look at the 
10586 \family typewriter
10587 jgrga.layout
10588 \family default
10589  example and 
10590 \family typewriter
10591 aguplus.inc
10592 \family default
10593 .
10594 \end_layout
10595
10596 \begin_layout Subsection
10597 Bugs and things to remember
10598 \end_layout
10599
10600 \begin_layout Standard
10601 In order to use the new layouts, you must remember to do the following for
10602  a new document:
10603 \end_layout
10604
10605 \begin_layout Enumerate
10606
10607 \emph on
10608 Turn off babel
10609 \emph default
10610 .
10611  This can be done in the 
10612 \family sans
10613 Layout\SpecialChar menuseparator
10614 Document
10615 \family default
10616  or 
10617 \family sans
10618 Document\SpecialChar menuseparator
10619 Settings
10620 \family default
10621  menu item.
10622  (AGU articles are always in English, right? So 
10623 \emph on
10624 don't
10625 \emph default
10626  choose a language.)
10627 \end_layout
10628
10629 \begin_layout Enumerate
10630 Enter 
10631 \family typewriter
10632 jgrga
10633 \family default
10634  into the document's 
10635 \family sans
10636 Extra Options
10637 \family default
10638  field.
10639  (Yes, this is a bug.)
10640 \end_layout
10641
10642 \begin_layout Enumerate
10643 Make sure you use the 
10644 \family typewriter
10645 agu.bst
10646 \family default
10647  bibliography style, by entering 
10648 \family sans
10649 agu
10650 \family default
10651  into the second field of the Bib\SpecialChar TeX
10652  inset.
10653  None of the standard styles will do.
10654 \end_layout
10655
10656 \begin_layout Section
10657 Broadway
10658 \end_layout
10659
10660 \begin_layout Standard
10661 by 
10662 \shape smallcaps
10663 Garst Reese
10664 \end_layout
10665
10666 \begin_layout Subsection
10667 Introduction
10668 \end_layout
10669
10670 \begin_layout Standard
10671 Broadway is for writing plays.
10672  The format is more decorative than Hollywood, and much less standardized.
10673  This format should be suitable for workshops.
10674 \end_layout
10675
10676 \begin_layout Subsection
10677 Special problems
10678 \end_layout
10679
10680 \begin_layout Standard
10681 The same as in Hollywood.
10682 \end_layout
10683
10684 \begin_layout Subsection
10685 Special features
10686 \end_layout
10687
10688 \begin_layout Standard
10689 Insert the 
10690 \family sans
10691 Speaker
10692 \family default
10693  names as labels then cross-reference the label to insert the name.
10694  The cross-reference dialog will show the current cast of characters.
10695 \end_layout
10696
10697 \begin_layout Subsection
10698 Paper size and Margins
10699 \end_layout
10700
10701 \begin_layout Standard
10702 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
10703 \end_layout
10704
10705 \begin_layout Subsection
10706 Environments
10707 \end_layout
10708
10709 \begin_layout Standard
10710 The following environments are available.
10711  You can use broadway.bind to get the bind keys shown at the right.
10712 \end_layout
10713
10714 \begin_layout Itemize
10715
10716 \family sans
10717 Standard
10718 \begin_inset Newline newline
10719 \end_inset
10720
10721
10722 \family default
10723 You should not have to use this, but it is here for anything that does not
10724  fit otherwise.
10725 \end_layout
10726
10727 \begin_layout Itemize
10728
10729 \family sans
10730 Narrative
10731 \begin_inset space \hfill{}
10732 \end_inset
10733
10734 M-z n
10735 \begin_inset Newline newline
10736 \end_inset
10737
10738
10739 \family default
10740 Used to describe stage setting and the action.
10741  First use of speaker names in all CAPs.
10742 \end_layout
10743
10744 \begin_layout Itemize
10745
10746 \family sans
10747 ACT
10748 \begin_inset space \hfill{}
10749 \end_inset
10750
10751 M-z a
10752 \begin_inset Newline newline
10753 \end_inset
10754
10755
10756 \family default
10757 Automatically numbered.
10758  On screen it will be arabic, but will print as Roman.
10759 \end_layout
10760
10761 \begin_layout Itemize
10762
10763 \family sans
10764 ACT*
10765 \begin_inset space \hfill{}
10766 \end_inset
10767
10768 M-z S at
10769 \begin_inset Newline newline
10770 \end_inset
10771
10772
10773 \family default
10774 Subtitle for 
10775 \family sans
10776 ACT.
10777
10778 \family default
10779  It is just centered text.
10780 \end_layout
10781
10782 \begin_layout Itemize
10783
10784 \family sans
10785 SCENE
10786 \begin_inset space \hfill{}
10787 \end_inset
10788
10789 M-z S-S
10790 \begin_inset Newline newline
10791 \end_inset
10792
10793
10794 \family default
10795 Not automatically numbered.
10796  You supply the number.
10797  This is because I couldn't figure out how.
10798 \end_layout
10799
10800 \begin_layout Itemize
10801
10802 \family sans
10803 AT_RISE:
10804 \begin_inset space \hfill{}
10805 \end_inset
10806
10807 M-z S-R
10808 \begin_inset Newline newline
10809 \end_inset
10810
10811
10812 \family default
10813 A special case of Narrative to describe the setting and action as the curtain
10814  rises.
10815 \end_layout
10816
10817 \begin_layout Itemize
10818
10819 \family sans
10820 Speaker
10821 \begin_inset space \hfill{}
10822 \end_inset
10823
10824 M-z s
10825 \begin_inset Newline newline
10826 \end_inset
10827
10828
10829 \family default
10830 The speaker's (actor's) title, centered in all CAPS.
10831 \end_layout
10832
10833 \begin_layout Itemize
10834
10835 \family sans
10836 Parenthetical
10837 \begin_inset space \hfill{}
10838 \end_inset
10839
10840 M-z p
10841 \begin_inset Newline newline
10842 \end_inset
10843
10844
10845 \family default
10846 Instructions to the speaker.
10847  The parentheses are automatically inserted.
10848  The ( will appear on screen, but both will be in the printed play.
10849  This environment is only used within 
10850 \family sans
10851 Dialogue
10852 \family default
10853 .
10854 \end_layout
10855
10856 \begin_layout Itemize
10857
10858 \family sans
10859 Dialogue
10860 \begin_inset space \hfill{}
10861 \end_inset
10862
10863 M-z d
10864 \begin_inset Newline newline
10865 \end_inset
10866
10867
10868 \family default
10869 What the Speaker says.
10870 \end_layout
10871
10872 \begin_layout Itemize
10873
10874 \family sans
10875 CURTAIN
10876 \begin_inset space \hfill{}
10877 \end_inset
10878
10879 M-z S-C
10880 \begin_inset Newline newline
10881 \end_inset
10882
10883
10884 \family default
10885 The curtain comes down.
10886 \end_layout
10887
10888 \begin_layout Itemize
10889
10890 \family sans
10891 Title
10892 \begin_inset space \hfill{}
10893 \end_inset
10894
10895 M-z S-T
10896 \end_layout
10897
10898 \begin_layout Itemize
10899
10900 \family sans
10901 Author
10902 \begin_inset space \hfill{}
10903 \end_inset
10904
10905 M-z S-A
10906 \end_layout
10907
10908 \begin_layout Itemize
10909
10910 \family sans
10911 Right_Address
10912 \begin_inset space \hfill{}
10913 \end_inset
10914
10915 M-z r
10916 \end_layout
10917
10918 \begin_layout Standard
10919 Hello there.
10920 \end_layout
10921
10922 \begin_layout Section
10923 Dinbrief
10924 \end_layout
10925
10926 \begin_layout Standard
10927 The document class 
10928 \family sans
10929 dinbrief
10930 \family default
10931  can be used to type letters according to German conventions.
10932  A template file is included in 
10933 \family typewriter
10934 .../lyx/share/templates
10935 \family default
10936  for you to use as a starting point.
10937 \end_layout
10938
10939 \begin_layout Section
10940 EGS journals (
10941 \family sans
10942 egs
10943 \family default
10944 )
10945 \end_layout
10946
10947 \begin_layout Standard
10948 by 
10949 \shape smallcaps
10950 Martin Vermeer
10951 \end_layout
10952
10953 \begin_layout Subsection
10954 Description
10955 \end_layout
10956
10957 \begin_layout Standard
10958 This is the layout file for the European Geophysical Society journals.
10959  The needed 
10960 \family typewriter
10961 egs.cls
10962 \family default
10963  can be downloaded from the web site of the EGS under 
10964 \begin_inset Flex URL
10965 status collapsed
10966
10967 \begin_layout Plain Layout
10968
10969 www.copernicus.org
10970 \end_layout
10971
10972 \end_inset
10973
10974 .
10975 \end_layout
10976
10977 \begin_layout Subsection
10978 New styles
10979 \end_layout
10980
10981 \begin_layout Standard
10982
10983 \family sans
10984 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
10985  Accepted
10986 \family default
10987
10988 \family sans
10989 Offsets
10990 \family default
10991 .
10992  The current layout file is unfortunately very unmodular and would benefit
10993  from using the various 
10994 \family typewriter
10995 std*.inc
10996 \family default
10997  file inclusions.
10998 \end_layout
10999
11000 \begin_layout Section
11001 Elsevier Journals
11002 \end_layout
11003
11004 \begin_layout Standard
11005 See the \SpecialChar LyX
11006  template file 
11007 \family typewriter
11008 elsarticle.lyx
11009 \family default
11010 .
11011  It contains all infos you need.
11012 \end_layout
11013
11014 \begin_layout Section
11015 Foils [aka 
11016 \family sans
11017 Foil\SpecialChar TeX
11018
11019 \family default
11020 ]
11021 \begin_inset CommandInset label
11022 LatexCommand label
11023 name "sec:foiltex"
11024
11025 \end_inset
11026
11027
11028 \end_layout
11029
11030 \begin_layout Standard
11031 by 
11032 \noun on
11033 Allan Rae
11034 \end_layout
11035
11036 \begin_layout Subsection
11037 Introduction
11038 \end_layout
11039
11040 \begin_layout Standard
11041 This section describes how to use \SpecialChar LyX
11042  to make slides for overhead projectors.
11043  There are two document classes that can do this: the default slides class
11044  and the 
11045 \family sans
11046 Foil\SpecialChar TeX
11047
11048 \family default
11049  slides class.
11050  This section documents the latter.
11051 \end_layout
11052
11053 \begin_layout Standard
11054 I'm going to say this again, nice and clear, so that there's no misunderstanding
11055 :
11056 \end_layout
11057
11058 \begin_layout Standard
11059 \begin_inset VSpace bigskip
11060 \end_inset
11061
11062
11063 \end_layout
11064
11065 \begin_layout Standard
11066 \align center
11067
11068 \size large
11069 This section documents the class 
11070 \begin_inset Quotes eld
11071 \end_inset
11072
11073
11074 \family sans
11075 FoilTeX
11076 \family default
11077
11078 \begin_inset Quotes erd
11079 \end_inset
11080
11081  
11082 \emph on
11083 only.
11084 \end_layout
11085
11086 \begin_layout Standard
11087 \begin_inset VSpace bigskip
11088 \end_inset
11089
11090
11091 \end_layout
11092
11093 \begin_layout Standard
11094 If you're looking for the documentation for 
11095 \begin_inset Quotes eld
11096 \end_inset
11097
11098
11099 \family sans
11100 slides (default)
11101 \family default
11102
11103 \begin_inset Quotes erd
11104 \end_inset
11105
11106 , check out section
11107 \begin_inset space ~
11108 \end_inset
11109
11110
11111 \begin_inset CommandInset ref
11112 LatexCommand ref
11113 reference "sec:slitex"
11114
11115 \end_inset
11116
11117 .
11118  If your machine doesn't have the 
11119 \family sans
11120 foils
11121 \family default
11122  class 
11123 \family sans
11124 FoilTeX
11125 \family default
11126  installed, you'll probably have to use the default 
11127 \family sans
11128 slides
11129 \family default
11130  class, which isn't quite as good as 
11131 \family sans
11132 foils.
11133 \end_layout
11134
11135 \begin_layout Standard
11136 The 
11137 \family sans
11138 foils
11139 \family default
11140  class is designed for use with version
11141 \begin_inset space ~
11142 \end_inset
11143
11144 2.1 of the 
11145 \family sans
11146 foils.cls
11147 \family default
11148  \SpecialChar LaTeX
11149  class file which is now an integral part of \SpecialChar LaTeX2e
11150 .
11151 \end_layout
11152
11153 \begin_layout Subsection
11154 Getting Started
11155 \end_layout
11156
11157 \begin_layout Standard
11158 Obviously, to use this document class, you need to select 
11159 \family sans
11160 FoilTeX
11161 \family default
11162  from the 
11163 \family sans
11164 Class
11165 \family default
11166  entry in the 
11167 \family sans
11168 Document
11169 \begin_inset space ~
11170 \end_inset
11171
11172 Layout
11173 \family default
11174  dialog.
11175  There are some settings in the 
11176 \family sans
11177 Document
11178 \begin_inset space ~
11179 \end_inset
11180
11181 Layout
11182 \family default
11183  dialog that you should know about that are specific to this class:
11184 \end_layout
11185
11186 \begin_layout Itemize
11187 Don't change the options 
11188 \family sans
11189 Sides
11190 \family default
11191  and 
11192 \family sans
11193 Columns
11194 \family default
11195  on the 
11196 \family sans
11197 Document
11198 \begin_inset space ~
11199 \end_inset
11200
11201 Layout
11202 \family default
11203  dialog.
11204  They're ignored by the 
11205 \family sans
11206 foils
11207 \family default
11208  class.
11209 \end_layout
11210
11211 \begin_layout Itemize
11212 The default font size is 20
11213 \begin_inset space \thinspace{}
11214 \end_inset
11215
11216 pt with the other options being 17
11217 \begin_inset space \thinspace{}
11218 \end_inset
11219
11220 pt, 25
11221 \begin_inset space \thinspace{}
11222 \end_inset
11223
11224 pt and 30
11225 \begin_inset space \thinspace{}
11226 \end_inset
11227
11228 pt.
11229 \end_layout
11230
11231 \begin_layout Itemize
11232 The default font is 
11233 \family sans
11234 sans
11235 \family default
11236  
11237 \family sans
11238 serif
11239 \family default
11240  but all math equations are still typeset in the usual roman font.
11241 \end_layout
11242
11243 \begin_layout Itemize
11244
11245 \family sans
11246 Foil\SpecialChar TeX
11247
11248 \family default
11249  supports A4 and Letter paper sizes as well as a special size for working
11250  with 35
11251 \begin_inset space \thinspace{}
11252 \end_inset
11253
11254 mm slides.
11255  It doesn't support A5, B5, legal or executive paper sizes.
11256 \end_layout
11257
11258 \begin_layout Itemize
11259 Don't bother changing the 
11260 \family sans
11261 Float Placement
11262 \family default
11263  settings because they are ignored anyway.
11264  All floats appear where they are defined in the text.
11265 \end_layout
11266
11267 \begin_layout Itemize
11268 The 
11269 \family sans
11270 Pagestyle
11271 \family default
11272  setting behaves a bit differently for this class.
11273  
11274 \family sans
11275 Foil\SpecialChar TeX
11276
11277 \family default
11278  provides extensive footer and header capabilities including a user-defined
11279  logo.
11280  See section
11281 \begin_inset space ~
11282 \end_inset
11283
11284
11285 \begin_inset CommandInset ref
11286 LatexCommand ref
11287 reference "sec:foilfoot"
11288
11289 \end_inset
11290
11291  for more details.
11292  The title page is treated differently to all other pages in the document
11293  and is 
11294 \emph on
11295 always
11296 \emph default
11297  unnumbered and 
11298 \emph on
11299 always
11300 \emph default
11301  has the logo centered at the bottom of the page (if one is defined).
11302  The possible page style choices and what they do are as follows:
11303 \end_layout
11304
11305 \begin_deeper
11306 \begin_layout Labeling
11307 \labelwidthstring MMMMMMM
11308
11309 \family sans
11310 \series bold
11311 empty
11312 \family default
11313 \series default
11314  The final output contains no page numbers, or other headers or footers
11315  (except footnotes of course).
11316  
11317 \end_layout
11318
11319 \begin_layout Labeling
11320 \labelwidthstring MMMMMMM
11321
11322 \family sans
11323 \series bold
11324 plain
11325 \family default
11326 \series default
11327  The final output contains page numbers centered at the bottom of the page.
11328  No other headings or footers (other than footnotes).
11329 \end_layout
11330
11331 \begin_layout Labeling
11332 \labelwidthstring MMMMMMM
11333
11334 \series bold
11335 foilheadings
11336 \series default
11337  Page numbers in lower right corner.
11338  Additional headers and footers are also shown.
11339  This is also the default.
11340 \end_layout
11341
11342 \begin_layout Labeling
11343 \labelwidthstring MMMMMMM
11344
11345 \series bold
11346 fancy
11347 \series default
11348  Gives you access to the 
11349 \family sans
11350 fancyheadings
11351 \family default
11352  package although its use with 
11353 \family sans
11354 Foil\SpecialChar TeX
11355
11356 \family default
11357  is discouraged by the writer of the 
11358 \family sans
11359 Foil\SpecialChar TeX
11360
11361 \family default
11362  package because of some potential page layout clashes.
11363 \end_layout
11364
11365 \end_deeper
11366 \begin_layout Subsubsection
11367 Extra Options
11368 \end_layout
11369
11370 \begin_layout Standard
11371 The following options may be used in the extra class options in the 
11372 \family sans
11373 Document\SpecialChar menuseparator
11374 Settings
11375 \family default
11376  dialog.
11377 \end_layout
11378
11379 \begin_layout Labeling
11380 \labelwidthstring MMMMMMx
11381
11382 \series bold
11383 35mmSlide
11384 \series default
11385  This sets up the page layout for 7.33
11386 \begin_inset space \thinspace{}
11387 \end_inset
11388
11389 in by 11
11390 \begin_inset space \thinspace{}
11391 \end_inset
11392
11393 in paper, which is about the same aspect ratio as a 35
11394 \begin_inset space \thinspace{}
11395 \end_inset
11396
11397 mm slide, making it a bit easier to work with this medium.
11398 \end_layout
11399
11400 \begin_layout Labeling
11401 \labelwidthstring MMMMMMx
11402
11403 \series bold
11404 headrule
11405 \series default
11406  Places a rule across the page below the header on every page except the
11407  title page.
11408 \end_layout
11409
11410 \begin_layout Labeling
11411 \labelwidthstring MMMMMMx
11412
11413 \series bold
11414 footrule
11415 \series default
11416  Places a rule across the page above the footer on every page except the
11417  title page.
11418 \end_layout
11419
11420 \begin_layout Labeling
11421 \labelwidthstring MMMMMMx
11422
11423 \series bold
11424 dvips
11425 \series default
11426  This is automatically set each time you create a new 
11427 \family sans
11428 foils
11429 \family default
11430  document.
11431  This option tells 
11432 \family sans
11433 Foil\SpecialChar TeX
11434
11435 \family default
11436  to use the dvips driver to rotate those pages that are set as landscape
11437  foils.
11438 \end_layout
11439
11440 \begin_layout Labeling
11441 \labelwidthstring MMMMMMx
11442
11443 \series bold
11444 landscape
11445 \series default
11446  Simply changes the page dimensions to those of a landscape page but doesn't
11447  do any rotation.
11448  Thus if you use this option you need to use an external program to rotate
11449  each page or feed your paper through your printer as landscape.
11450  Note that this option effectively reverses the roles of the 
11451 \family sans
11452 Foilhead
11453 \family default
11454  and 
11455 \family sans
11456 Rotatefoilhead
11457 \family default
11458  environments (don't worry these are described in the next section).
11459 \end_layout
11460
11461 \begin_layout Labeling
11462 \labelwidthstring MMMMMMx
11463
11464 \series bold
11465 leqno
11466 \series default
11467  Equation numbers on the left.
11468 \end_layout
11469
11470 \begin_layout Labeling
11471 \labelwidthstring MMMMMMx
11472
11473 \series bold
11474 fleqn
11475 \series default
11476  Flush-left equations.
11477 \end_layout
11478
11479 \begin_layout Subsection
11480 Supported Environments
11481 \end_layout
11482
11483 \begin_layout Standard
11484 Most of the environments commonly supported in other classes are also supported
11485  by the 
11486 \family sans
11487 foils
11488 \family default
11489  class.
11490  There are several additional environments provided by 
11491 \family sans
11492 Foil\SpecialChar TeX
11493
11494 \family default
11495  as well as a couple added by \SpecialChar LyX
11496 .
11497  The following environments are shared with other classes:
11498 \end_layout
11499
11500 \begin_layout Standard
11501 \begin_inset Flex Multiple Columns
11502 status open
11503
11504 \begin_layout Itemize
11505
11506 \family sans
11507 Standard
11508 \end_layout
11509
11510 \begin_layout Itemize
11511
11512 \family sans
11513 Itemize
11514 \end_layout
11515
11516 \begin_layout Itemize
11517
11518 \family sans
11519 Enumerate
11520 \end_layout
11521
11522 \begin_layout Itemize
11523
11524 \family sans
11525 Description
11526 \end_layout
11527
11528 \begin_layout Itemize
11529
11530 \family sans
11531 List
11532 \end_layout
11533
11534 \begin_layout Itemize
11535
11536 \family sans
11537 \SpecialChar LyX
11538 -Code
11539 \end_layout
11540
11541 \begin_layout Itemize
11542
11543 \family sans
11544 Verse
11545 \end_layout
11546
11547 \begin_layout Itemize
11548
11549 \family sans
11550 Quote
11551 \end_layout
11552
11553 \begin_layout Itemize
11554
11555 \family sans
11556 Quotation
11557 \end_layout
11558
11559 \begin_layout Itemize
11560
11561 \family sans
11562 Title
11563 \end_layout
11564
11565 \begin_layout Itemize
11566
11567 \family sans
11568 Author
11569 \end_layout
11570
11571 \begin_layout Itemize
11572
11573 \family sans
11574 Date
11575 \end_layout
11576
11577 \begin_layout Itemize
11578
11579 \family sans
11580 Abstract
11581 \end_layout
11582
11583 \begin_layout Itemize
11584
11585 \family sans
11586 Bibliography
11587 \end_layout
11588
11589 \begin_layout Itemize
11590
11591 \family sans
11592 Address
11593 \end_layout
11594
11595 \begin_layout Itemize
11596
11597 \family sans
11598 RightAddress
11599 \end_layout
11600
11601 \begin_layout Itemize
11602
11603 \family sans
11604 Caption
11605 \end_layout
11606
11607 \begin_layout Itemize
11608
11609 \family sans
11610 Comment
11611 \end_layout
11612
11613 \end_inset
11614
11615
11616 \end_layout
11617
11618 \begin_layout Standard
11619 That is, all the major environments apart from the sectioning environments.
11620  Since foils are essentially self-contained sections, with a title and body,
11621  
11622 \family sans
11623 Foil\SpecialChar TeX
11624
11625 \family default
11626  provides specific commands for starting new foils and these are:
11627 \end_layout
11628
11629 \begin_layout Itemize
11630
11631 \family sans
11632 Foilhead
11633 \end_layout
11634
11635 \begin_layout Itemize
11636
11637 \family sans
11638 Rotatefoilhead
11639 \end_layout
11640
11641 \begin_layout Standard
11642 \SpecialChar LyX
11643  also provides slightly modified versions of these two environments called:
11644 \end_layout
11645
11646 \begin_layout Itemize
11647
11648 \family sans
11649 ShortFoilhead
11650 \end_layout
11651
11652 \begin_layout Itemize
11653
11654 \family sans
11655 ShortRotatefoilhead
11656 \end_layout
11657
11658 \begin_layout Standard
11659 and the differences will be explained in the next section.
11660 \end_layout
11661
11662 \begin_layout Standard
11663 Since foils are often used in presenting ideas or new theorems and such
11664  
11665 \family sans
11666 Foil\SpecialChar TeX
11667
11668 \family default
11669  also provides a comprehensive box of goodies for presenting them:
11670 \end_layout
11671
11672 \begin_layout Standard
11673 \begin_inset Flex Multiple Columns
11674 status open
11675
11676 \begin_layout Itemize
11677
11678 \family sans
11679 Theorem
11680 \end_layout
11681
11682 \begin_layout Itemize
11683
11684 \family sans
11685 Lemma
11686 \end_layout
11687
11688 \begin_layout Itemize
11689
11690 \family sans
11691 Corollary
11692 \end_layout
11693
11694 \begin_layout Itemize
11695
11696 \family sans
11697 Proposition
11698 \end_layout
11699
11700 \begin_layout Itemize
11701
11702 \family sans
11703 Definition
11704 \end_layout
11705
11706 \begin_layout Itemize
11707
11708 \family sans
11709 Proof
11710 \end_layout
11711
11712 \begin_layout Itemize
11713
11714 \family sans
11715 Theorem*
11716 \end_layout
11717
11718 \begin_layout Itemize
11719
11720 \family sans
11721 Lemma*
11722 \end_layout
11723
11724 \begin_layout Itemize
11725
11726 \family sans
11727 Corollary*
11728 \end_layout
11729
11730 \begin_layout Itemize
11731
11732 \family sans
11733 Proposition*
11734 \end_layout
11735
11736 \begin_layout Itemize
11737
11738 \family sans
11739 Definition*
11740 \end_layout
11741
11742 \end_inset
11743
11744
11745 \end_layout
11746
11747 \begin_layout Standard
11748 The starred versions are unnumbered while the unstarred versions are numbered.
11749  There are also two list environments added by \SpecialChar LyX
11750  and these are:
11751 \end_layout
11752
11753 \begin_layout Itemize
11754
11755 \family sans
11756 TickList
11757 \end_layout
11758
11759 \begin_layout Itemize
11760
11761 \family sans
11762 CrossList
11763 \end_layout
11764
11765 \begin_layout Standard
11766
11767 \family sans
11768 Foil\SpecialChar TeX
11769
11770 \family default
11771  provides some powerful header and footer capabilities that are best set
11772  in the preamble although they may be set at any point in a document.
11773  If you want to change these settings in your document the best place to
11774  do so is at the very top of a foil, i.
11775 \begin_inset space \thinspace{}
11776 \end_inset
11777
11778 e.
11779 \emph on
11780
11781 \begin_inset space \space{}
11782 \end_inset
11783
11784
11785 \emph default
11786 straight after the foilhead.
11787 \end_layout
11788
11789 \begin_layout Standard
11790 For this purpose, the following command styles are provided [
11791 \shape smallcaps
11792 Martin Vermeer
11793 \shape default
11794 ]:
11795 \end_layout
11796
11797 \begin_layout Standard
11798 \begin_inset Flex Multiple Columns
11799 status open
11800
11801 \begin_layout Itemize
11802
11803 \family sans
11804 My
11805 \begin_inset space ~
11806 \end_inset
11807
11808 Logo
11809 \end_layout
11810
11811 \begin_layout Itemize
11812
11813 \family sans
11814 Restriction
11815 \end_layout
11816
11817 \begin_layout Itemize
11818
11819 \family sans
11820 Right
11821 \begin_inset space ~
11822 \end_inset
11823
11824 Footer
11825 \end_layout
11826
11827 \begin_layout Itemize
11828
11829 \family sans
11830 Right
11831 \begin_inset space ~
11832 \end_inset
11833
11834 Header
11835 \end_layout
11836
11837 \begin_layout Itemize
11838
11839 \family sans
11840 Left
11841 \begin_inset space ~
11842 \end_inset
11843
11844 Header
11845 \end_layout
11846
11847 \begin_deeper
11848 \begin_layout Plain Layout
11849 \begin_inset space ~
11850 \end_inset
11851
11852
11853 \end_layout
11854
11855 \end_deeper
11856 \end_inset
11857
11858
11859 \end_layout
11860
11861 \begin_layout Standard
11862 There are also a few commands provided by 
11863 \family sans
11864 Foil\SpecialChar TeX
11865
11866 \family default
11867  that aren't directly supported by \SpecialChar LyX
11868  but I'll tell you what they do and how
11869  to use them in section
11870 \begin_inset space ~
11871 \end_inset
11872
11873
11874 \begin_inset CommandInset ref
11875 LatexCommand ref
11876 reference "sec:unsuppfoils"
11877
11878 \end_inset
11879
11880 .
11881 \end_layout
11882
11883 \begin_layout Subsection
11884 Building a Set of Foils
11885 \end_layout
11886
11887 \begin_layout Standard
11888 This section will give a simple introduction to using the different environments
11889  to build a set of foils.
11890  If you want to see an example set of foils, take a look at the 
11891 \family typewriter
11892 Foils.lyx
11893 \family default
11894  file you find in \SpecialChar LyX
11895 's 
11896 \family typewriter
11897 examples
11898 \family default
11899  folder.
11900 \end_layout
11901
11902 \begin_layout Subsubsection
11903 Give It a Title Page
11904 \end_layout
11905
11906 \begin_layout Standard
11907 Unlike other classes that provide 
11908 \family sans
11909 Title
11910 \family default
11911
11912 \family sans
11913 Author
11914 \family default
11915
11916 \family sans
11917 Date
11918 \family default
11919  and 
11920 \family sans
11921 Abstract
11922 \family default
11923  environments, 
11924 \family sans
11925 foils
11926 \family default
11927  creates the title on a page of its own.
11928  If you leave out the 
11929 \family sans
11930 Date
11931 \family default
11932  environment \SpecialChar LaTeX
11933  will substitute the current date (every time you regenerate
11934  the output).
11935 \end_layout
11936
11937 \begin_layout Subsubsection
11938 Start a New Foil
11939 \end_layout
11940
11941 \begin_layout Standard
11942 As I mentioned earlier, there are four ways of starting a new foil.
11943  For portrait foils you should use 
11944 \family sans
11945 Foilhead
11946 \family default
11947  or 
11948 \family sans
11949 ShortFoilhead.
11950
11951 \family default
11952  The difference between these two environments is the amount of space between
11953  the title of the foil (the foilhead) and the body of the foil.
11954 \end_layout
11955
11956 \begin_layout Standard
11957 Landscape foils are generated using the 
11958 \family sans
11959 Rotatefoilhead
11960 \family default
11961  and 
11962 \family sans
11963 ShortRotatefoilhead
11964 \family default
11965  environments.
11966  Again the only difference is the spacing between foilhead and body.
11967  Both of the short versions have 0.5
11968 \begin_inset space ~
11969 \end_inset
11970
11971 inches less separation between the foilhead and the body.
11972  
11973 \end_layout
11974
11975 \begin_layout Standard
11976 One problem with the support for landscape foils is the requirement that
11977  you have to use the 
11978 \family typewriter
11979 dvips
11980 \family default
11981  driver to generate the PostScript output otherwise the foils won't be rotated.
11982  It is possible to get landscape foils even if you haven't got the 
11983 \family typewriter
11984 dvips
11985 \family default
11986  driver provided you can feed your foils sideways through your printer ;-)
11987 \end_layout
11988
11989 \begin_layout Subsubsection
11990 Theorems, Lemmas, Proofs and more
11991 \end_layout
11992
11993 \begin_layout Standard
11994 Due to a small bug in \SpecialChar LyX
11995  you can't have two of the same type of these environments
11996  directly following each other.
11997  They must be separated by something.
11998  If you try, you will just be extending the previous environment as if you
11999  had merged the two environments together.
12000  So, how do you get around this problem? The simplest option is to insert
12001  some text between the two environments or add a 
12002 \family sans
12003 \SpecialChar LaTeX
12004
12005 \family default
12006  environment between the two with just a 
12007 \begin_inset Quotes eld
12008 \end_inset
12009
12010
12011 \family typewriter
12012 %
12013 \family default
12014
12015 \begin_inset Quotes erd
12016 \end_inset
12017
12018  in it.
12019  This will force \SpecialChar LyX
12020  to produce two separate environments and hence the correct
12021  \SpecialChar LaTeX
12022  output.
12023  An example is provided in the example file included with the \SpecialChar LyX
12024  distribution.
12025  Remember, this problem only occurs if you are trying to place two of the
12026  same type of theorem-like environments one directly after the other.
12027 \end_layout
12028
12029 \begin_layout Subsubsection
12030 Lists
12031 \end_layout
12032
12033 \begin_layout Standard
12034 You get all the commonly supported list styles found in other classes as
12035  well as two new ones.
12036  I'll only describe the new ones here.
12037  If you want to find out more about the other list environments check out
12038  the 
12039 \emph on
12040 User's Guide.
12041
12042 \emph default
12043  If you intend to use itemized lists you might also want to read about the
12044  
12045 \family sans
12046 Itemize
12047 \begin_inset space ~
12048 \end_inset
12049
12050 Bullet
12051 \begin_inset space ~
12052 \end_inset
12053
12054 Selection
12055 \family default
12056  dialog described above in section
12057 \begin_inset space ~
12058 \end_inset
12059
12060
12061 \begin_inset CommandInset ref
12062 LatexCommand ref
12063 reference "sec:bullet"
12064
12065 \end_inset
12066
12067 .
12068 \end_layout
12069
12070 \begin_layout Standard
12071 The two new list styles, 
12072 \family sans
12073 TickList
12074 \family default
12075  and 
12076 \family sans
12077 CrossList
12078 \family default
12079 , are designed to make it easier for you to create lists of do's and don'ts
12080  or right and wrong by providing dedicated environments that use a tick
12081  or a cross as the label of the list.
12082  These lists are in fact dedicated variants of the 
12083 \family sans
12084 Itemize
12085 \family default
12086  environment.
12087  They do however require that you have the 
12088 \family typewriter
12089 psnfss
12090 \family default
12091  packages installed.
12092 \end_layout
12093
12094 \begin_layout Subsubsection
12095 Figures and Tables
12096 \end_layout
12097
12098 \begin_layout Standard
12099
12100 \family sans
12101 Foil\SpecialChar TeX
12102
12103 \family default
12104  redefines the floating tables and figures so that they appear exactly where
12105  they are in the text rather than pushing them to the top of the page or
12106  to some user specified location.
12107  In fact if you change the float placement settings they are simply ignored.
12108 \end_layout
12109
12110 \begin_layout Subsubsection
12111 Page Headers and Footers
12112 \begin_inset CommandInset label
12113 LatexCommand label
12114 name "sec:foilfoot"
12115
12116 \end_inset
12117
12118
12119 \end_layout
12120
12121 \begin_layout Standard
12122
12123 \family sans
12124 My
12125 \begin_inset space ~
12126 \end_inset
12127
12128 Logo
12129 \family default
12130  and 
12131 \family sans
12132 Restriction
12133 \family default
12134  are two commands used to control the left-footer text string.
12135  The first is meant to allow you to include a graphic logo on your foils
12136  and defaults to 
12137 \begin_inset Quotes eld
12138 \end_inset
12139
12140 -Typeset by 
12141 \family sans
12142 Foil\SpecialChar TeX
12143
12144 \family default
12145 -
12146 \begin_inset Quotes erd
12147 \end_inset
12148
12149 .
12150  While the second is meant to provide a classification for the audience,
12151  
12152 \emph on
12153 e.
12154 \begin_inset space \thinspace{}
12155 \end_inset
12156
12157 g.
12158 \emph default
12159
12160 \begin_inset space \space{}
12161 \end_inset
12162
12163 Confidential.
12164  It is empty by default.
12165 \end_layout
12166
12167 \begin_layout Standard
12168 The remaining page corners can be filled by 
12169 \family sans
12170 Right
12171 \begin_inset space ~
12172 \end_inset
12173
12174 Footer
12175 \family default
12176  (which defaults to page numbers), 
12177 \family sans
12178 Right
12179 \begin_inset space ~
12180 \end_inset
12181
12182 Header
12183 \family default
12184  (top right) and 
12185 \family sans
12186 Left
12187 \begin_inset space ~
12188 \end_inset
12189
12190 Header
12191 \family default
12192  (top left).
12193 \end_layout
12194
12195 \begin_layout Subsection
12196 Unsupported 
12197 \family sans
12198 Foil\SpecialChar TeX
12199
12200 \family default
12201  Goodies
12202 \begin_inset CommandInset label
12203 LatexCommand label
12204 name "sec:unsuppfoils"
12205
12206 \end_inset
12207
12208
12209 \end_layout
12210
12211 \begin_layout Standard
12212 All the commands mentioned below need to be set in a 
12213 \family sans
12214 \SpecialChar LaTeX
12215
12216 \family default
12217  environment or as 
12218 \family sans
12219 \SpecialChar TeX
12220
12221 \family default
12222  within another environment.
12223 \end_layout
12224
12225 \begin_layout Subsubsection
12226 Lengths
12227 \end_layout
12228
12229 \begin_layout Standard
12230 All lengths are adjusted using the 
12231 \family typewriter
12232
12233 \backslash
12234 setlength{
12235 \family default
12236 \emph on
12237 lengthname
12238 \family typewriter
12239 \emph default
12240 }{
12241 \family default
12242 \emph on
12243 newlength
12244 \family typewriter
12245 \emph default
12246 }
12247 \family default
12248  command.
12249  Where 
12250 \emph on
12251 lengthname
12252 \emph default
12253  should be replaced by the name given to the length you want to change and
12254  
12255 \emph on
12256 newlength
12257 \emph default
12258  is the length value.
12259  All lengths should be specified in units of length such as inches (
12260 \family typewriter
12261 in
12262 \family default
12263 ), millimeters (
12264 \family typewriter
12265 mm
12266 \family default
12267 ) or points (
12268 \family typewriter
12269 pt
12270 \family default
12271 ) or relative to some document or font-based length such as 
12272 \family typewriter
12273
12274 \backslash
12275 textwidth
12276 \family default
12277 .
12278  
12279 \end_layout
12280
12281 \begin_layout Standard
12282 It's possible to change the spacing between a foilhead and the body of the
12283  foil by adjusting the length specified by 
12284 \family typewriter
12285
12286 \backslash
12287 foilheadskip
12288 \family default
12289 .
12290  For example, to make 
12291 \emph on
12292 all
12293 \emph default
12294  foilheads 0.5
12295 \begin_inset space \space{}
12296 \end_inset
12297
12298 in closer to their bodies put the following in the preamble: 
12299 \family typewriter
12300
12301 \backslash
12302 setlength{
12303 \backslash
12304 foilheadskip}{-0.5in}
12305 \end_layout
12306
12307 \begin_layout Standard
12308 The spacings around floats can be adjusted by setting these lengths:
12309 \end_layout
12310
12311 \begin_layout Labeling
12312 \labelwidthstring MMMMMMMMMMM
12313
12314 \family typewriter
12315
12316 \backslash
12317 abovefloatskip
12318 \family default
12319  Separation between the text and the top of the float
12320 \end_layout
12321
12322 \begin_layout Labeling
12323 \labelwidthstring MMMMMMMMMMM
12324
12325 \family typewriter
12326
12327 \backslash
12328 abovecaptionskip
12329 \family default
12330  Separation between the float and the caption
12331 \end_layout
12332
12333 \begin_layout Labeling
12334 \labelwidthstring MMMMMMMMMMM
12335
12336 \family typewriter
12337
12338 \backslash
12339 belowcaptionskip
12340 \family default
12341  Separation between the caption and the following text
12342 \end_layout
12343
12344 \begin_layout Labeling
12345 \labelwidthstring MMMMMMMMMMM
12346
12347 \family typewriter
12348
12349 \backslash
12350 captionwidth
12351 \family default
12352  You can make the captions narrower than the surrounding text by adjusting
12353  this length.
12354  Best done relative to 
12355 \family typewriter
12356
12357 \backslash
12358 textwidth
12359 \family default
12360 .
12361 \end_layout
12362
12363 \begin_layout Standard
12364 There are also several title page related lengths that you may find useful
12365  if you have a long title or several authors:
12366 \end_layout
12367
12368 \begin_layout Labeling
12369 \labelwidthstring MMMMMMMMMMM
12370
12371 \family typewriter
12372
12373 \backslash
12374 abovetitleskip
12375 \family default
12376  Separation from headers to 
12377 \family sans
12378 Title
12379 \end_layout
12380
12381 \begin_layout Labeling
12382 \labelwidthstring MMMMMMMMMMM
12383
12384 \family typewriter
12385
12386 \backslash
12387 titleauthorskip
12388 \family default
12389  between 
12390 \family sans
12391 Title
12392 \family default
12393  and 
12394 \family sans
12395 Author
12396 \family default
12397  environments
12398 \end_layout
12399
12400 \begin_layout Labeling
12401 \labelwidthstring MMMMMMMMMMM
12402
12403 \family typewriter
12404
12405 \backslash
12406 authorauthorskip
12407 \family default
12408  between multiple 
12409 \family sans
12410 Author
12411 \family default
12412  lines
12413 \end_layout
12414
12415 \begin_layout Labeling
12416 \labelwidthstring MMMMMMMMMMM
12417
12418 \family typewriter
12419
12420 \backslash
12421 authordateskip
12422 \family default
12423  between the 
12424 \family sans
12425 Author
12426 \family default
12427  and the 
12428 \family sans
12429 Date
12430 \end_layout
12431
12432 \begin_layout Labeling
12433 \labelwidthstring MMMMMMMMMMM
12434
12435 \family typewriter
12436
12437 \backslash
12438 dateabstractskip
12439 \family default
12440  between the 
12441 \family sans
12442 Date
12443 \family default
12444  and the 
12445 \family sans
12446 Abstract
12447 \end_layout
12448
12449 \begin_layout Standard
12450 The last length related command affects all the list environments.
12451  If you place 
12452 \family typewriter
12453
12454 \backslash
12455 zerolistvertdimens
12456 \family default
12457  
12458 \emph on
12459 inside
12460 \emph default
12461  a list environment then all the vertical spacing between the list items
12462  is removed.
12463  Note that this is a command not a length so it doesn't require 
12464 \family typewriter
12465
12466 \backslash
12467 setlength
12468 \family default
12469  like the stuff mentioned above.
12470 \end_layout
12471
12472 \begin_layout Subsubsection
12473 Headers and Footers
12474 \end_layout
12475
12476 \begin_layout Standard
12477 The 
12478 \family typewriter
12479
12480 \backslash
12481 LogoOn
12482 \family default
12483  and 
12484 \family typewriter
12485
12486 \backslash
12487 LogoOff
12488 \family default
12489  commands control whether the logo in the 
12490 \family sans
12491 MyLogo
12492 \family default
12493  definition appear on a given page.
12494  If you put 
12495 \family typewriter
12496
12497 \backslash
12498 LogoOff
12499 \family default
12500  in the preamble then none of the foils will have the logo on them.
12501  If you don't want the logo on a particular page place the 
12502 \family typewriter
12503
12504 \backslash
12505 LogoOff
12506 \family default
12507  directly after the foilhead of that page and the 
12508 \family typewriter
12509
12510 \backslash
12511 LogoOn
12512 \family default
12513  directly after the next foilhead.
12514 \end_layout
12515
12516 \begin_layout Standard
12517 If you decide to use the 
12518 \family sans
12519 fancy
12520 \family default
12521  page style setting in the 
12522 \family sans
12523 Document
12524 \begin_inset space ~
12525 \end_inset
12526
12527 Layout
12528 \family default
12529  dialog you should probably add 
12530 \family typewriter
12531
12532 \backslash
12533 let
12534 \backslash
12535 headwidth
12536 \backslash
12537 textwidth
12538 \family default
12539  to your preamble so headers and footers on landscape pages are correctly
12540  placed when rotated.
12541  This is due to some clashes between the page layouts provided by the 
12542 \family sans
12543 fancyheadings
12544 \family default
12545  package and the 
12546 \family sans
12547 foils
12548 \family default
12549  class.
12550 \end_layout
12551
12552 \begin_layout Section
12553 Hollywood (Hollywood spec scripts)
12554 \end_layout
12555
12556 \begin_layout Standard
12557 by 
12558 \shape smallcaps
12559 Garst Reese
12560 \end_layout
12561
12562 \begin_layout Subsection
12563 Introduction
12564 \end_layout
12565
12566 \begin_layout Standard
12567 Getting the format of a Hollywood script right is a 
12568 \begin_inset Quotes eld
12569 \end_inset
12570
12571 rite of passage.
12572 \begin_inset Quotes erd
12573 \end_inset
12574
12575  It is designed to make the readers focus on content and to be easy and
12576  familiar for the actors to read.
12577  Each page of a script should be one minute of film.
12578  Nothing goes in a script that you cannot see or hear on screen.
12579  The courier 12 pt font should be used throughout.
12580  No italics.
12581 \end_layout
12582
12583 \begin_layout Subsection
12584 Special problems
12585 \end_layout
12586
12587 \begin_layout Standard
12588 Speakers' lines should NEVER break in mid-sentence.
12589  If a speaker's lines continue over a page break, repeat the 
12590 \family sans
12591 Speaker
12592 \family default
12593  title followed by (Cont'd).
12594 \end_layout
12595
12596 \begin_layout Subsection
12597 Special features
12598 \end_layout
12599
12600 \begin_layout Standard
12601 Insert the 
12602 \family sans
12603 Speaker
12604 \family default
12605  names as labels then cross-reference the label to insert the name.
12606  The cross-reference dialog will show the current cast of characters.
12607  You can use this to insert the speaker name in narratives also.
12608 \end_layout
12609
12610 \begin_layout Subsection
12611 Paper size and Margins
12612 \end_layout
12613
12614 \begin_layout Standard
12615 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
12616 \end_layout
12617
12618 \begin_layout Subsection
12619 Environments
12620 \end_layout
12621
12622 \begin_layout Standard
12623 The following environments are available.
12624  You can use hollywood.bind to get the bind keys shown at the right.
12625 \end_layout
12626
12627 \begin_layout Itemize
12628
12629 \family sans
12630 Standard
12631 \begin_inset Newline newline
12632 \end_inset
12633
12634
12635 \family default
12636 Used where nothing else works.
12637  Try to avoid it.
12638 \end_layout
12639
12640 \begin_layout Itemize
12641
12642 \family sans
12643 FADE_IN
12644 \family default
12645 :
12646 \begin_inset space \hfill{}
12647 \end_inset
12648
12649
12650 \family sans
12651 M-z S-I
12652 \family default
12653
12654 \begin_inset Newline newline
12655 \end_inset
12656
12657 Usually followed by something like 
12658 \begin_inset Quotes eld
12659 \end_inset
12660
12661 on Sally waking up.
12662 \begin_inset Quotes erd
12663 \end_inset
12664
12665
12666 \end_layout
12667
12668 \begin_layout Itemize
12669
12670 \family sans
12671 INT:
12672 \begin_inset space \hfill{}
12673 \end_inset
12674
12675 M-z i
12676 \begin_inset Newline newline
12677 \end_inset
12678
12679
12680 \family default
12681 Introduces a new INTERIOR camera set-up.
12682  Always followed by DAY or NIGHT, or something similar to define the lighting
12683  required.
12684  Everthing on this line in CAPS.
12685 \end_layout
12686
12687 \begin_layout Itemize
12688
12689 \family sans
12690 EXT:
12691 \begin_inset space \hfill{}
12692 \end_inset
12693
12694 M-z e
12695 \begin_inset Newline newline
12696 \end_inset
12697
12698
12699 \family default
12700 Introduces a new EXTERIOR camera set-up.
12701  Everthing on this line in CAPS.
12702 \end_layout
12703
12704 \begin_layout Itemize
12705
12706 \family sans
12707 Speaker
12708 \begin_inset space \hfill{}
12709 \end_inset
12710
12711 M-z s
12712 \begin_inset Newline newline
12713 \end_inset
12714
12715
12716 \family default
12717 The character speaking.
12718 \end_layout
12719
12720 \begin_layout Itemize
12721
12722 \family sans
12723 Parenthetical
12724 \begin_inset space \hfill{}
12725 \end_inset
12726
12727 M-z p
12728 \begin_inset Newline newline
12729 \end_inset
12730
12731
12732 \family default
12733 Instructions to the speaker.
12734  The () are automatically inserted, but only the ( will show in \SpecialChar LyX
12735 .
12736  Both will be printed.
12737 \end_layout
12738
12739 \begin_layout Itemize
12740
12741 \family sans
12742 Dialogue
12743 \begin_inset space \hfill{}
12744 \end_inset
12745
12746 M-z d
12747 \begin_inset Newline newline
12748 \end_inset
12749
12750
12751 \family default
12752 What the 
12753 \family sans
12754 Speaker
12755 \family default
12756  says.
12757 \end_layout
12758
12759 \begin_layout Itemize
12760
12761 \family sans
12762 Transition
12763 \begin_inset space \hfill{}
12764 \end_inset
12765
12766 M-z t
12767 \begin_inset Newline newline
12768 \end_inset
12769
12770
12771 \family default
12772 Camera movement instruction.
12773  e.
12774 \begin_inset space \thinspace{}
12775 \end_inset
12776
12777 g.
12778 \begin_inset space \space{}
12779 \end_inset
12780
12781 CUT TO:
12782 \end_layout
12783
12784 \begin_layout Itemize
12785
12786 \family sans
12787 FADE OUT:
12788 \begin_inset space \hfill{}
12789 \end_inset
12790
12791 M-z S-I
12792 \end_layout
12793
12794 \begin_layout Itemize
12795
12796 \family sans
12797 Author
12798 \begin_inset space \hfill{}
12799 \end_inset
12800
12801 M-z S-A
12802 \end_layout
12803
12804 \begin_layout Itemize
12805
12806 \family sans
12807 Title
12808 \begin_inset space \hfill{}
12809 \end_inset
12810
12811 M-z S-T
12812 \end_layout
12813
12814 \begin_layout Itemize
12815
12816 \family sans
12817 Right_Address
12818 \begin_inset space \hfill{}
12819 \end_inset
12820
12821 M-z r
12822 \end_layout
12823
12824 \begin_layout Subsection
12825 Script jargon
12826 \end_layout
12827
12828 \begin_layout Itemize
12829 (O.S) — off screen
12830 \end_layout
12831
12832 \begin_layout Itemize
12833 (V.0) — voice over
12834 \end_layout
12835
12836 \begin_layout Itemize
12837 b.
12838 \begin_inset space \thinspace{}
12839 \end_inset
12840
12841 g.
12842  — background
12843 \end_layout
12844
12845 \begin_layout Itemize
12846 C.U.
12847  — close-up
12848 \end_layout
12849
12850 \begin_layout Itemize
12851 PAN — camera movement
12852 \end_layout
12853
12854 \begin_layout Itemize
12855 INSERT — cut to close-up of
12856 \end_layout
12857
12858 \begin_layout Section
12859 ijmpc and ijmpd
12860 \end_layout
12861
12862 \begin_layout Standard
12863 by 
12864 \noun on
12865 Panayotis Papasotiriou
12866 \end_layout
12867
12868 \begin_layout Subsection
12869 Overview
12870 \end_layout
12871
12872 \begin_layout Standard
12873 The ijmpc package is a set of macros that facilitates electronic manuscript
12874  submission to the 
12875 \emph on
12876 International Journal of Modern Physics C
12877 \emph default
12878 .
12879  Similarly, the ijmpd package is for creating manuscripts to be submitted
12880  to the 
12881 \emph on
12882 International Journal of Modern Physics D
12883 \emph default
12884 .
12885  Both journals are published by World Scientific.
12886  The corresponding document classes are named 
12887 \family typewriter
12888 ws-ijmpc.cls
12889 \family default
12890  and 
12891 \family typewriter
12892 ws-ijmpd.cls
12893 \family default
12894 , respectively.
12895  These files, together with instructions for the authors, can be downloaded
12896  from the sites 
12897 \begin_inset Flex URL
12898 status collapsed
12899
12900 \begin_layout Plain Layout
12901
12902 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
12903 \end_layout
12904
12905 \end_inset
12906
12907  and 
12908 \begin_inset Flex URL
12909 status collapsed
12910
12911 \begin_layout Plain Layout
12912
12913 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
12914 \end_layout
12915
12916 \end_inset
12917
12918 .
12919  Both packages are modified versions of the standard 
12920 \begin_inset Quotes eld
12921 \end_inset
12922
12923 article
12924 \begin_inset Quotes erd
12925 \end_inset
12926
12927  package, and they are almost (but not exactly) identical.
12928  Most of their features are supported by \SpecialChar LyX
12929 .
12930  I have used \SpecialChar LyX
12931  successfully to write articles submitted to both journals
12932  without any problem.
12933 \end_layout
12934
12935 \begin_layout Subsection
12936 Writing a paper
12937 \end_layout
12938
12939 \begin_layout Standard
12940 As usual, the easiest way to write a paper is to start with a template.
12941  Click on 
12942 \family sans
12943 File\SpecialChar menuseparator
12944 New from
12945 \family default
12946  
12947 \family sans
12948 Template
12949 \family default
12950 , then choose the 
12951 \family typewriter
12952 ijmpc.lyx
12953 \family default
12954  or 
12955 \family typewriter
12956 ijmpd.lyx
12957 \family default
12958  template.
12959  This will give an (almost) empty document that includes the most common
12960  fields found in a manuscript.
12961  Simply overwrite the existing text (including the brackets, 
12962 \family typewriter
12963 <>
12964 \family default
12965 ) with your text.
12966  You should keep in mind the following remarks.
12967 \end_layout
12968
12969 \begin_layout Enumerate
12970 \SpecialChar LyX
12971  won't let you change the font size and the page style of the document,
12972  because such modifications are not allowed by both packages.
12973 \end_layout
12974
12975 \begin_layout Enumerate
12976 The language of the document should not be changed.
12977  Before previewing your paper, be sure that the babel package is not used.
12978  To do this, click on 
12979 \family sans
12980 Tools\SpecialChar menuseparator
12981 Preferences
12982 \family default
12983 , select the 
12984 \family sans
12985 Lang Opts
12986 \family default
12987  tab, deselect the 
12988 \family sans
12989 Use babel
12990 \family default
12991  checkbox in the language settings, and click on 
12992 \family sans
12993 Apply
12994 \family default
12995  (or 
12996 \family sans
12997 Save
12998 \family default
12999 , if you wish to make this change permanent).
13000 \end_layout
13001
13002 \begin_layout Enumerate
13003 The 
13004 \begin_inset Quotes eld
13005 \end_inset
13006
13007 Keywords
13008 \begin_inset Quotes erd
13009 \end_inset
13010
13011  style must be used to define keywords.
13012 \end_layout
13013
13014 \begin_layout Enumerate
13015 The ijmpc package provides a style named 
13016 \begin_inset Quotes eld
13017 \end_inset
13018
13019 Classification Codes
13020 \begin_inset Quotes erd
13021 \end_inset
13022
13023 , which can be used to define classification codes, such as PACS numbers.
13024  Note that this facility is not supported by the ijmpd package.
13025 \end_layout
13026
13027 \begin_layout Enumerate
13028 Several new environments are available: 
13029 \begin_inset Quotes eld
13030 \end_inset
13031
13032 Definition
13033 \begin_inset Quotes erd
13034 \end_inset
13035
13036
13037 \begin_inset Quotes eld
13038 \end_inset
13039
13040 Step
13041 \begin_inset Quotes erd
13042 \end_inset
13043
13044
13045 \begin_inset Quotes eld
13046 \end_inset
13047
13048 Example
13049 \begin_inset Quotes erd
13050 \end_inset
13051
13052
13053 \begin_inset Quotes eld
13054 \end_inset
13055
13056 Remark
13057 \begin_inset Quotes erd
13058 \end_inset
13059
13060
13061 \begin_inset Quotes eld
13062 \end_inset
13063
13064 Notation
13065 \begin_inset Quotes erd
13066 \end_inset
13067
13068
13069 \begin_inset Quotes eld
13070 \end_inset
13071
13072 Theorem
13073 \begin_inset Quotes erd
13074 \end_inset
13075
13076
13077 \begin_inset Quotes eld
13078 \end_inset
13079
13080 Proof
13081 \begin_inset Quotes erd
13082 \end_inset
13083
13084
13085 \begin_inset Quotes eld
13086 \end_inset
13087
13088 Corollary
13089 \begin_inset Quotes erd
13090 \end_inset
13091
13092
13093 \begin_inset Quotes eld
13094 \end_inset
13095
13096 Lemma
13097 \begin_inset Quotes erd
13098 \end_inset
13099
13100
13101 \begin_inset Quotes eld
13102 \end_inset
13103
13104 Proposition
13105 \begin_inset Quotes erd
13106 \end_inset
13107
13108
13109 \begin_inset Quotes eld
13110 \end_inset
13111
13112 Prop
13113 \begin_inset Quotes erd
13114 \end_inset
13115
13116
13117 \begin_inset Quotes eld
13118 \end_inset
13119
13120 Question
13121 \begin_inset Quotes erd
13122 \end_inset
13123
13124
13125 \begin_inset Quotes eld
13126 \end_inset
13127
13128 Claim
13129 \begin_inset Quotes erd
13130 \end_inset
13131
13132 , and 
13133 \begin_inset Quotes eld
13134 \end_inset
13135
13136 Conjecture
13137 \begin_inset Quotes erd
13138 \end_inset
13139
13140 .
13141  Their use is more or less obvious.
13142  \SpecialChar LyX
13143  supports all these environments; it will use the proper label, text style,
13144  and numbering scheme for each of them.
13145 \end_layout
13146
13147 \begin_layout Enumerate
13148 Both packages use basic citations; the natbib package should not be used.
13149  In \SpecialChar LyX
13150 , citation references are shown as usual; in the output, citations are
13151  shown as superscripts.
13152  If you want to use a citation as normal text, you should use the 
13153 \family typewriter
13154 refcite
13155 \family default
13156  command, e.
13157 \begin_inset space \thinspace{}
13158 \end_inset
13159
13160 g.
13161 \begin_inset space \space{}
13162 \end_inset
13163
13164
13165 \begin_inset Quotes eld
13166 \end_inset
13167
13168 See Ref.
13169 \begin_inset space \space{}
13170 \end_inset
13171
13172
13173 \family typewriter
13174
13175 \backslash
13176 refcite{key}
13177 \family default
13178
13179 \begin_inset Quotes erd
13180 \end_inset
13181
13182 .
13183 \end_layout
13184
13185 \begin_layout Enumerate
13186 There is no 
13187 \begin_inset Quotes eld
13188 \end_inset
13189
13190 Acknowledgments
13191 \begin_inset Quotes erd
13192 \end_inset
13193
13194  section in both packages.
13195  To put acknowledgments, just use the 
13196 \begin_inset Quotes eld
13197 \end_inset
13198
13199 Section*
13200 \begin_inset Quotes erd
13201 \end_inset
13202
13203  environment.
13204 \end_layout
13205
13206 \begin_layout Enumerate
13207 Appendices may be added to the paper, 
13208 \emph on
13209 after
13210 \emph default
13211  the Acknowledgments and 
13212 \shape italic
13213 before
13214 \shape default
13215  the References.
13216  \SpecialChar LyX
13217  provides a special environment, called 
13218 \begin_inset Quotes eld
13219 \end_inset
13220
13221 Appendices Section
13222 \begin_inset Quotes erd
13223 \end_inset
13224
13225  which marks the beginning of the appendices.
13226  This environment should be left blank; it just sends a \SpecialChar LaTeX
13227  command, but nothing
13228  is really printed.
13229  In \SpecialChar LyX
13230 , the word 
13231 \begin_inset Quotes eld
13232 \end_inset
13233
13234 Appendix
13235 \begin_inset Quotes erd
13236 \end_inset
13237
13238  is printed with blue letters, as a signal that all sections after that
13239  point are appendices.
13240  To write an appendix, use the 
13241 \begin_inset Quotes eld
13242 \end_inset
13243
13244 Appendix
13245 \begin_inset Quotes erd
13246 \end_inset
13247
13248  environment.
13249  \SpecialChar LyX
13250  will number each appendix with capital letters, as required by both journals.
13251  Note that 
13252 \begin_inset Quotes eld
13253 \end_inset
13254
13255 Appendices Section
13256 \begin_inset Quotes erd
13257 \end_inset
13258
13259  
13260 \emph on
13261 must
13262 \emph default
13263  be present before the first appendix; if not, all appendices will be numbered
13264  as normal sections in the output.
13265 \end_layout
13266
13267 \begin_layout Enumerate
13268 The ijmpc and the ijmpd packages use the 
13269 \family typewriter
13270 tbl
13271 \family default
13272  command to implement table captions.
13273  As a result, a table created by \SpecialChar LyX
13274  is printed correctly, but its caption
13275  is ignored.
13276  However, you can use some \SpecialChar TeX
13277  code to overcome this problem, so that captions
13278  are printed as expected.
13279  To do so, create a float table as usual, remove the caption, and replace
13280  it with the \SpecialChar TeX
13281  code 
13282 \family typewriter
13283
13284 \backslash
13285 tbl{
13286 \emph on
13287 your table caption
13288 \emph default
13289 }{
13290 \family default
13291  (sic); you must also the \SpecialChar TeX
13292  code 
13293 \family typewriter
13294 }
13295 \family default
13296  immediately after the tabular material.
13297  Study the example table included in the template files to see how this
13298  trick is implemented.
13299  Alternatively, If you need table captions, you should implement the whole
13300  table float in a 
13301 \family typewriter
13302 .tex
13303 \family default
13304  file, then include this file to the \SpecialChar LyX
13305  document (
13306 \family sans
13307 Insert\SpecialChar menuseparator
13308 File\SpecialChar menuseparator
13309 Child
13310 \begin_inset space ~
13311 \end_inset
13312
13313 Document
13314 \family default
13315 ).
13316  Details on how to create a table float can be found in the files 
13317 \family typewriter
13318 ws-ijmpc.tex
13319 \family default
13320  and 
13321 \family typewriter
13322 ws-ijmpd.tex
13323 \family default
13324 , included in the corresponding packages.
13325 \end_layout
13326
13327 \begin_layout Subsection
13328 Preparing a paper for submission
13329 \end_layout
13330
13331 \begin_layout Standard
13332 Before you submit your paper you must export the \SpecialChar LyX
13333  document as a \SpecialChar LaTeX
13334  file (
13335 \family sans
13336 File\SpecialChar menuseparator
13337 Export\SpecialChar menuseparator
13338 \SpecialChar LaTeX
13339
13340 \family default
13341 )
13342 \begin_inset Foot
13343 status open
13344
13345 \begin_layout Plain Layout
13346 Actually you have the choice between \SpecialChar LaTeX
13347  (plain) and pdflatex.
13348  If you intend to use pdflatex to prepare the paper, you should use the
13349  pdflatex option so that included graphics are converted to PDF format,
13350  ready for use by pdflatex.
13351 \end_layout
13352
13353 \end_inset
13354
13355 , then make the following changes to the resulting 
13356 \family typewriter
13357 .tex
13358 \family default
13359  file.
13360 \end_layout
13361
13362 \begin_layout Enumerate
13363 Remove the comment lines before the 
13364 \family typewriter
13365
13366 \backslash
13367 documentclass
13368 \family default
13369  command.
13370 \end_layout
13371
13372 \begin_layout Enumerate
13373 Remove everything between (and including) the 
13374 \family typewriter
13375
13376 \backslash
13377 makeatletter
13378 \family default
13379  and 
13380 \family typewriter
13381
13382 \backslash
13383 makeatother
13384 \family default
13385  commands, except for any commands you specifically put into the \SpecialChar LaTeX
13386  preamble.
13387 \end_layout
13388
13389 \begin_layout Standard
13390 The modified 
13391 \family typewriter
13392 .tex
13393 \family default
13394  file should be saved and processed through \SpecialChar LaTeX
13395  as many times as necessary.
13396  You may also want to check the resulting 
13397 \family typewriter
13398 .dvi
13399 \family default
13400  document.
13401 \end_layout
13402
13403 \begin_layout Subsection
13404 Use of \SpecialChar TeX
13405  code
13406 \end_layout
13407
13408 \begin_layout Standard
13409 The use of \SpecialChar TeX
13410  code is reduced to two commands, which must be placed at the
13411  top of the document.
13412  If you started writing your paper by using the 
13413 \family typewriter
13414 ijmpc.lyx
13415 \family default
13416  or the 
13417 \family typewriter
13418 ijmpd.lyx
13419 \family default
13420  template, the \SpecialChar TeX
13421  code needed is already in its place; you usually don't need
13422  to delete it.
13423  You may only modify the first \SpecialChar TeX
13424  code to specify the information printed
13425  to the top of odd and even pages (authors' names and short paper's title,
13426  respectively).
13427  This \SpecialChar TeX
13428  code must have the form 
13429 \family typewriter
13430
13431 \backslash
13432 markboth{Authors' Names}{Short Paper's Title}
13433 \family default
13434 .
13435 \end_layout
13436
13437 \begin_layout Section
13438 iopart
13439 \end_layout
13440
13441 \begin_layout Standard
13442 by 
13443 \noun on
13444 Uwe Stöhr
13445 \end_layout
13446
13447 \begin_layout Subsection
13448 Overview
13449 \end_layout
13450
13451 \begin_layout Standard
13452 The iopart package provides a document class to create electronic manuscript
13453  submission to the journals published by the Institute of Physics.
13454  Instructions for the authors how to create a paper using the iopart class
13455  can be downloaded together with the iopart package from the site 
13456 \begin_inset Flex URL
13457 status collapsed
13458
13459 \begin_layout Plain Layout
13460
13461 ftp://ftp.iop.org/pub/journals/latex2e
13462 \end_layout
13463
13464 \end_inset
13465
13466 .
13467 \end_layout
13468
13469 \begin_layout Subsection
13470 Writing a paper
13471 \end_layout
13472
13473 \begin_layout Standard
13474 The easiest way to write a paper is to start with the file 
13475 \emph on
13476 IOP-article.lyx
13477 \emph default
13478  that is available in \SpecialChar LyX
13479 's examples files folder.
13480  Open this file, save it under a new name, and start writing.
13481  The example file explains how to use the special text environments.
13482  Here are the most important advices:
13483 \end_layout
13484
13485 \begin_layout Itemize
13486 To be able to compile your document to a PDF, PS, or DVI, ensure that the
13487  two options 
13488 \family sans
13489 Use AMS math package
13490 \family default
13491  in the document settings under 
13492 \family sans
13493 Math Options
13494 \family default
13495  are not used!
13496 \end_layout
13497
13498 \begin_layout Itemize
13499
13500 \size normal
13501 The title environment defines the kind of your paper.
13502  So use one of the following environments for the title:
13503 \end_layout
13504
13505 \begin_deeper
13506 \begin_layout Itemize
13507
13508 \family sans
13509 \size normal
13510 Title
13511 \family default
13512  for a Paper
13513 \end_layout
13514
13515 \begin_layout Itemize
13516
13517 \family sans
13518 \size normal
13519 Review
13520 \family default
13521  for a Review
13522 \end_layout
13523
13524 \begin_layout Itemize
13525
13526 \family sans
13527 \size normal
13528 Topical
13529 \family default
13530  for a Topical review
13531 \end_layout
13532
13533 \begin_layout Itemize
13534
13535 \family sans
13536 \size normal
13537 Comment
13538 \family default
13539  for a Comment
13540 \end_layout
13541
13542 \begin_layout Itemize
13543
13544 \family sans
13545 \size normal
13546 Note
13547 \family default
13548  for a Note
13549 \end_layout
13550
13551 \begin_layout Itemize
13552
13553 \family sans
13554 \size normal
13555 Paper
13556 \family default
13557  for a Paper (same as Title)
13558 \end_layout
13559
13560 \begin_layout Itemize
13561
13562 \family sans
13563 \size normal
13564 Prelim
13565 \family default
13566  for a Preliminary communication
13567 \end_layout
13568
13569 \begin_layout Itemize
13570
13571 \family sans
13572 \size normal
13573 Rapid
13574 \family default
13575  for a Rapid communication
13576 \end_layout
13577
13578 \begin_layout Itemize
13579
13580 \family sans
13581 \size normal
13582 Letter
13583 \family default
13584  for a Letter to the editor
13585 \end_layout
13586
13587 \end_deeper
13588 \begin_layout Itemize
13589
13590 \size normal
13591 All title environments except of 
13592 \family sans
13593 Letter
13594 \family default
13595  can have an optional short title.
13596 \end_layout
13597
13598 \begin_layout Itemize
13599 There is a general title environment 
13600 \family sans
13601 Article
13602 \family default
13603  which is not directly supported by the \SpecialChar LyX
13604 .
13605  This can be used as \SpecialChar TeX
13606  code when your document doesn't fit into one of the
13607  other title types.
13608 \end_layout
13609
13610 \begin_layout Standard
13611 For more informations like hints for special table and formula formatting,
13612  look at the IOP author guidelines.
13613 \end_layout
13614
13615 \begin_layout Section
13616 Kluwer
13617 \end_layout
13618
13619 \begin_layout Standard
13620 by 
13621 \noun on
13622 Panayotis Papasotiriou
13623 \end_layout
13624
13625 \begin_layout Subsection
13626 Overview
13627 \end_layout
13628
13629 \begin_layout Standard
13630 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
13631  that facilitates electronic manuscript submission to the journals they
13632  publish.
13633  Most known of them (at least in my domain of interest) are 
13634 \emph on
13635 Astrophysics and Space Science
13636 \emph default
13637  and 
13638 \emph on
13639 Solar Physics
13640 \emph default
13641 , but there are many others (see a complete list at 
13642 \begin_inset Flex URL
13643 status open
13644
13645 \begin_layout Plain Layout
13646
13647 http://www.wkap.nl/jrnllist.htm/JRNLHOME
13648 \end_layout
13649
13650 \end_inset
13651
13652 ).
13653  The Kluwer package may be downloaded from the site 
13654 \begin_inset Flex URL
13655 status collapsed
13656
13657 \begin_layout Plain Layout
13658
13659 http://www.wkap.nl/kaphtml.htm/STYLEFILES
13660 \end_layout
13661
13662 \end_inset
13663
13664 .
13665  A complete user guide is contained in that package (but it can also be
13666  downloaded separately).
13667 \end_layout
13668
13669 \begin_layout Standard
13670 \SpecialChar LyX
13671  supports many features of the package but not everything.
13672  However, the \SpecialChar TeX
13673  code needed is reduced to some 
13674 \begin_inset Quotes eld
13675 \end_inset
13676
13677 peculiar
13678 \begin_inset Quotes erd
13679 \end_inset
13680
13681  commands of the package (see
13682 \begin_inset space ~
13683 \end_inset
13684
13685
13686 \begin_inset CommandInset ref
13687 LatexCommand ref
13688 reference "subsec:kluwer_peculiarities"
13689
13690 \end_inset
13691
13692 ).
13693  I have recently used \SpecialChar LyX
13694  to write an article submitted to the 
13695 \emph on
13696 Astrophysics and Space Science
13697 \emph default
13698  without any problem.
13699 \end_layout
13700
13701 \begin_layout Subsection
13702 Writing a paper
13703 \end_layout
13704
13705 \begin_layout Standard
13706 The easiest way to write a paper is to start with the Kluwer template file.
13707  Click on 
13708 \family sans
13709 File\SpecialChar menuseparator
13710 New from
13711 \family default
13712  
13713 \family sans
13714 Template
13715 \family default
13716 , then choose the 
13717 \family typewriter
13718 kluwer.lyx
13719 \family default
13720  template.
13721  This will give an (almost) empty document that includes the most common
13722  fields found in a manuscript and a short description of their use.
13723  As in most templates, simply overwrite the existing text (including the
13724  brackets, 
13725 \family typewriter
13726 <>
13727 \family default
13728 ) with the correct information.
13729 \end_layout
13730
13731 \begin_layout Subsection
13732 Preparing a paper for submission
13733 \end_layout
13734
13735 \begin_layout Standard
13736 As in the AAS\SpecialChar TeX
13737  package, before you submit your paper to a journal you must
13738  
13739 \begin_inset Quotes eld
13740 \end_inset
13741
13742 postprocess
13743 \begin_inset Quotes erd
13744 \end_inset
13745
13746  it as follows.
13747 \end_layout
13748
13749 \begin_layout Enumerate
13750 Export your paper as a \SpecialChar LaTeX
13751  file.
13752  To do this, click on 
13753 \family sans
13754 File\SpecialChar menuseparator
13755 Export\SpecialChar menuseparator
13756 \SpecialChar LaTeX
13757
13758 \family default
13759 .
13760  
13761 \end_layout
13762
13763 \begin_layout Enumerate
13764 Edit the resulting 
13765 \family typewriter
13766 .tex
13767 \family default
13768  file with a text editor and make the following changes
13769 \end_layout
13770
13771 \begin_deeper
13772 \begin_layout Enumerate
13773 remove the comment lines before the 
13774 \family typewriter
13775
13776 \backslash
13777 documentclass
13778 \family default
13779  command,
13780 \end_layout
13781
13782 \begin_layout Enumerate
13783 remove everything between (and including) the 
13784 \family typewriter
13785
13786 \backslash
13787 makeatletter
13788 \family default
13789  and 
13790 \family typewriter
13791
13792 \backslash
13793 makeatother
13794 \family default
13795  commands, except for any commands you specifically put into the \SpecialChar LaTeX
13796  preamble.
13797 \end_layout
13798
13799 \begin_layout Standard
13800 Save the resulting 
13801 \family typewriter
13802 .tex
13803 \family default
13804  file.
13805 \end_layout
13806
13807 \end_deeper
13808 \begin_layout Enumerate
13809 Run the 
13810 \family typewriter
13811 .tex
13812 \family default
13813  file through \SpecialChar LaTeX
13814  as many times as necessary (usually up to three).
13815 \end_layout
13816
13817 \begin_layout Enumerate
13818 View the resulting 
13819 \family typewriter
13820 .dvi
13821 \family default
13822  document using, e.
13823 \begin_inset space \thinspace{}
13824 \end_inset
13825
13826 g.
13827 \begin_inset space \space{}
13828 \end_inset
13829
13830
13831 \family sans
13832 xdvi
13833 \family default
13834 , and check if everything is OK (it should, if you didn't make any mistake).
13835 \end_layout
13836
13837 \begin_layout Subsection
13838 \begin_inset Quotes eld
13839 \end_inset
13840
13841 Peculiarities
13842 \begin_inset Quotes erd
13843 \end_inset
13844
13845  of the Kluwer package
13846 \begin_inset CommandInset label
13847 LatexCommand label
13848 name "subsec:kluwer_peculiarities"
13849
13850 \end_inset
13851
13852
13853 \end_layout
13854
13855 \begin_layout Standard
13856 The Kluwer package has the following 
13857 \begin_inset Quotes eld
13858 \end_inset
13859
13860 peculiarities
13861 \begin_inset Quotes erd
13862 \end_inset
13863
13864 .
13865 \end_layout
13866
13867 \begin_layout Enumerate
13868 It is possible to write multiple articles in the same \SpecialChar LaTeX
13869  file
13870 \begin_inset Foot
13871 status collapsed
13872
13873 \begin_layout Plain Layout
13874 I can't imagine any good reason to do this.
13875 \end_layout
13876
13877 \end_inset
13878
13879 .
13880  Each article must be included in the environment 
13881 \begin_inset Quotes eld
13882 \end_inset
13883
13884 article
13885 \begin_inset Quotes erd
13886 \end_inset
13887
13888 .
13889  Unfortunately, this environment cannot be omitted, even if you write just
13890  one article.
13891  Therefore, each article starts with the command 
13892 \family typewriter
13893
13894 \backslash
13895 begin{article}
13896 \family default
13897  and, obviously, ends with the command 
13898 \family typewriter
13899
13900 \backslash
13901 end{article}
13902 \family default
13903 .
13904  Although this can be implemented in \SpecialChar LyX
13905 , I didn't included it, since it looks
13906  ugly and can confuse the novice user.
13907  Therefore, you need to enter them directly and mark them as \SpecialChar LaTeX
13908  code (the
13909  well-known 
13910 \begin_inset Quotes eld
13911 \end_inset
13912
13913 \SpecialChar TeX
13914  code
13915 \begin_inset Quotes erd
13916 \end_inset
13917
13918 ).
13919 \end_layout
13920
13921 \begin_layout Enumerate
13922 Information given at the beginning of the article (i.
13923 \begin_inset space \thinspace{}
13924 \end_inset
13925
13926 e.
13927 \begin_inset space \space{}
13928 \end_inset
13929
13930 title, subtitle, author, institution, running title, running author, abstract
13931  and keywords) must be included in an environment called 
13932 \begin_inset Quotes eld
13933 \end_inset
13934
13935 opening
13936 \begin_inset Quotes erd
13937 \end_inset
13938
13939 .
13940  This is not implemented in \SpecialChar LyX
13941 , so you must enter title, subtitle etc.
13942 \begin_inset space ~
13943 \end_inset
13944
13945 between two \SpecialChar TeX
13946  code lines (
13947 \family typewriter
13948
13949 \backslash
13950 begin{opening}
13951 \family default
13952  and 
13953 \family typewriter
13954
13955 \backslash
13956 end{opening}
13957 \family default
13958 ).
13959 \end_layout
13960
13961 \begin_layout Enumerate
13962 According to the user manual, the label of each bibliography item must be
13963  written as 
13964 \family typewriter
13965
13966 \backslash
13967 protect
13968 \backslash
13969 citeauthoryear{
13970 \family default
13971 \emph on
13972 author(s)
13973 \family typewriter
13974 \emph default
13975 }{
13976 \family default
13977 \emph on
13978 year
13979 \family typewriter
13980 \emph default
13981 }
13982 \family default
13983 .
13984 \end_layout
13985
13986 \begin_layout Standard
13987 The 
13988 \family typewriter
13989 kluwer.lyx
13990 \family default
13991  template takes care of all these 
13992 \begin_inset Quotes eld
13993 \end_inset
13994
13995 peculiarities
13996 \begin_inset Quotes erd
13997 \end_inset
13998
13999 .
14000  If you start a new paper using this template you don't need to do anything
14001  special.
14002  Just 
14003 \end_layout
14004
14005 \begin_layout Enumerate
14006 don't delete the \SpecialChar TeX
14007  code included in the template, and
14008 \end_layout
14009
14010 \begin_layout Enumerate
14011 copy the example bibliography item included in the template and modify it
14012  as necessary to enter new bibliography items.
14013 \end_layout
14014
14015 \begin_layout Section
14016 Koma-Script
14017 \end_layout
14018
14019 \begin_layout Standard
14020 by 
14021 \noun on
14022 Bernd Rellermeyer
14023 \end_layout
14024
14025 \begin_layout Subsection
14026 Overview
14027 \end_layout
14028
14029 \begin_layout Standard
14030 The \SpecialChar LyX
14031  document classes 
14032 \emph on
14033 article (koma-script)
14034 \emph default
14035
14036 \emph on
14037 report (koma-script)
14038 \emph default
14039
14040 \emph on
14041 book
14042 \emph default
14043  
14044 \emph on
14045 (koma-script)
14046 \emph default
14047 , and 
14048 \emph on
14049 letter
14050 \emph default
14051  
14052 \emph on
14053 (koma-script)
14054 \emph default
14055  correspond to the \SpecialChar LaTeX
14056  document classes 
14057 \family typewriter
14058 scrartcl.cls
14059 \family default
14060
14061 \family typewriter
14062 scrreprt.cls
14063 \family default
14064
14065 \family typewriter
14066 scrbook.cls
14067 \family default
14068 , and 
14069 \family typewriter
14070 scrlettr.cls
14071 \family default
14072 , resp.
14073 \begin_inset space ~
14074 \end_inset
14075
14076 of the Koma-Script family.
14077  They are replacements for the standard document classes 
14078 \family typewriter
14079 article.cls
14080 \family default
14081
14082 \family typewriter
14083 report.cls
14084 \family default
14085
14086 \family typewriter
14087 book.cls
14088 \family default
14089  and 
14090 \family typewriter
14091 letter.cls
14092 \family default
14093 , resp., and fit better to European typography conventions in a number of
14094  points.
14095 \end_layout
14096
14097 \begin_layout Itemize
14098 Standard character size is 11pt in 
14099 \emph on
14100 article (koma-script)
14101 \emph default
14102
14103 \emph on
14104 report (koma-script)
14105 \emph default
14106 , and 
14107 \emph on
14108 book (koma-script)
14109 \emph default
14110 , and 12pt in 
14111 \emph on
14112 letter (koma-script)
14113 \emph default
14114 .
14115 \end_layout
14116
14117 \begin_layout Itemize
14118 Headings, labels of the description environment, and a number of elements
14119  of the 
14120 \emph on
14121 letter (koma-script)
14122 \emph default
14123  document class are set in a bold sans serif font.
14124 \begin_inset Foot
14125 status collapsed
14126
14127 \begin_layout Plain Layout
14128 There is a big difference between the bold sans serif old cm fonts and new
14129  ec fonts, especially in the appearance of headings.
14130  In comparison, the ec bold sans serif fonts look a bit thin.
14131  Here the \SpecialChar LaTeX
14132  package 
14133 \family typewriter
14134 cmsd.sty by
14135 \family default
14136  
14137 \shape smallcaps
14138 Walter Schmidt
14139 \shape default
14140  helps to produce the 
14141 \begin_inset Quotes eld
14142 \end_inset
14143
14144 usual
14145 \begin_inset Quotes erd
14146 \end_inset
14147
14148  appearance when using the ec fonts.
14149 \end_layout
14150
14151 \end_inset
14152
14153  The numbering of chapter headings is made in the same way as the numbering
14154  of section headings, that is without the extra line 
14155 \begin_inset Quotes eld
14156 \end_inset
14157
14158 Chapter\SpecialChar ldots
14159
14160 \begin_inset Quotes erd
14161 \end_inset
14162
14163 .
14164  In addition, the appearance of the headings can be modified by using a
14165  number of options (in \SpecialChar LyX
14166  to be entered in the field 
14167 \family sans
14168 Extra
14169 \begin_inset space ~
14170 \end_inset
14171
14172 Options
14173 \family default
14174  of the dialog 
14175 \family sans
14176 Layout\SpecialChar menuseparator
14177 Document
14178 \family default
14179 ).
14180  
14181 \end_layout
14182
14183 \begin_layout Itemize
14184 The main means in the Koma-Script document classes to design the type area
14185  are the options 
14186 \family sans
14187 BCOR
14188 \family default
14189  and 
14190 \family sans
14191 DIV
14192 \family default
14193  (in \SpecialChar LyX
14194  to be entered in the extra class options field in the dialog 
14195 \family sans
14196 Document\SpecialChar menuseparator
14197 Settings
14198 \family default
14199 ).
14200  They make a clearer modification of page margins possible as do the options
14201  of the dialog 
14202 \family sans
14203 Document\SpecialChar menuseparator
14204 Settings
14205 \family default
14206 .
14207  
14208 \end_layout
14209
14210 \begin_layout Itemize
14211 The \SpecialChar LaTeX
14212  document classes of the Koma-Script family define a number of additional
14213  commands.
14214  Those part of it which makes sense in \SpecialChar LyX
14215  is implemented in corresponding
14216  paragraph types.
14217 \end_layout
14218
14219 \begin_layout Standard
14220 Detailed descriptions of the \SpecialChar LaTeX
14221  document classes of the Koma-Script family
14222  can be found in the Koma-Script documentation 
14223 \emph on
14224 scrguide
14225 \emph default
14226  (German) and 
14227 \emph on
14228 scrguien
14229 \emph default
14230  (English).
14231 \end_layout
14232
14233 \begin_layout Subsection
14234 article (koma-script), report (koma-script), and book (koma-script)
14235 \end_layout
14236
14237 \begin_layout Standard
14238 The document classes 
14239 \emph on
14240 article (koma-script)
14241 \emph default
14242
14243 \emph on
14244 report (koma-script)
14245 \emph default
14246 , and 
14247 \emph on
14248 book
14249 \emph default
14250  
14251 \emph on
14252 (koma-script)
14253 \emph default
14254  are implemented in the layout files 
14255 \family typewriter
14256 scrartcl.layout
14257 \family default
14258
14259 \family typewriter
14260 scrreprt.layout
14261 \family default
14262 , and 
14263 \family typewriter
14264 scrbook.layout
14265 \family default
14266 , resp.
14267  They contain all the paragraph types of the corresponding standard document
14268  classes 
14269 \emph on
14270 article
14271 \emph default
14272
14273 \emph on
14274 report
14275 \emph default
14276 , and 
14277 \emph on
14278 book
14279 \emph default
14280 , resp., partly modified, with the exception of the \SpecialChar LyX
14281  specific 
14282 \family sans
14283 List
14284 \family default
14285 -type, which is replaced by the new 
14286 \family sans
14287 Labeling
14288 \family default
14289 -type having the same functionality.
14290  Beside the 
14291 \family sans
14292 Labeling
14293 \family default
14294 -Type there is a number of new paragraph types added.
14295  They are 
14296 \emph on
14297 not
14298 \emph default
14299  part of 
14300 \emph on
14301 letter (koma-script)
14302 \emph default
14303 .
14304 \end_layout
14305
14306 \begin_layout Itemize
14307
14308 \family sans
14309 Addpart, Addchap
14310 \family default
14311
14312 \family sans
14313 Addsec
14314 \family default
14315 : are equivalents to 
14316 \family sans
14317 Part*, Chapter*
14318 \family default
14319  and 
14320 \family sans
14321 Section*
14322 \family default
14323 , resp., additionally inserting an entry in the table of contents.
14324  
14325 \family sans
14326 Addpart
14327 \family default
14328  and 
14329 \family sans
14330 Addchap
14331 \family default
14332  are not contained in 
14333 \emph on
14334 article (koma-script)
14335 \emph default
14336 .
14337 \end_layout
14338
14339 \begin_layout Itemize
14340
14341 \family sans
14342 Addchap*
14343 \family default
14344
14345 \family sans
14346 Addsec*
14347 \family default
14348 : behave exactly as 
14349 \family sans
14350 Addchap
14351 \family default
14352  and 
14353 \family sans
14354 Addsec
14355 \family default
14356 , resp., additionally clearing running heads.
14357  
14358 \family sans
14359 Addchap*
14360 \family default
14361  is not contained in 
14362 \emph on
14363 article (koma-script)
14364 \emph default
14365 .
14366 \begin_inset Foot
14367 status collapsed
14368
14369 \begin_layout Plain Layout
14370 There is also an 
14371 \family typewriter
14372
14373 \backslash
14374 addpart*
14375 \family default
14376  command in 
14377 \emph on
14378 book (koma-script)
14379 \emph default
14380  and in 
14381 \emph on
14382 report (koma-script)
14383 \emph default
14384 , but since this is identical to 
14385 \family sans
14386 Part*
14387 \family default
14388 , is has not been implemented in \SpecialChar LyX
14389 .
14390 \end_layout
14391
14392 \end_inset
14393
14394
14395 \end_layout
14396
14397 \begin_layout Itemize
14398
14399 \family sans
14400 Minisec
14401 \family default
14402 : generates a heading directly above the following paragraph in the standard
14403  character size without affecting the structure of the document.
14404 \end_layout
14405
14406 \begin_layout Itemize
14407
14408 \family sans
14409 Captionabove
14410 \family default
14411  and 
14412 \family sans
14413 Captionbelow
14414 \family default
14415  are special captions which respect the different space settings needed
14416  for captions placed above or below an element (if you follow strict typographic
14417  rules, you might want to place table captions always above the table).
14418  You can also use the class option 
14419 \family typewriter
14420 tablecaptionsabove
14421 \family default
14422 , which will switch 
14423 \family sans
14424 caption
14425 \family default
14426  to 
14427 \family sans
14428 captionabove
14429 \family default
14430  for tables and 
14431 \family sans
14432 captionbelow
14433 \family default
14434  for figures.
14435  You need at least Koma-Script version 2.8q to use this.
14436 \end_layout
14437
14438 \begin_layout Itemize
14439
14440 \family sans
14441 Dictum
14442 \family default
14443 : can be used to set a bonmot, e.
14444 \begin_inset space \thinspace{}
14445 \end_inset
14446
14447 g.
14448 \begin_inset space \space{}
14449 \end_inset
14450
14451 at the beginning of a chapter.
14452  If you use the optional argument (
14453 \family sans
14454 Insert\SpecialChar menuseparator
14455 Short
14456 \begin_inset space ~
14457 \end_inset
14458
14459 Title
14460 \family default
14461 ), you can insert the dictum's author there.
14462  Dictum and author are separated by a line.
14463  You need at least Koma-Script version 2.8q to use this.
14464  
14465 \family sans
14466 Dictum
14467 \family default
14468  is not contained in 
14469 \emph on
14470 article (koma-script)
14471 \emph default
14472 .
14473 \end_layout
14474
14475 \begin_layout Standard
14476 The following types, together with the standard types 
14477 \family sans
14478 Title
14479 \family default
14480
14481 \family sans
14482 Author
14483 \family default
14484 , and 
14485 \family sans
14486 Date
14487 \family default
14488 , form the title area of the document.
14489  They must be entered ahead of the first 
14490 \begin_inset Quotes eld
14491 \end_inset
14492
14493 ordinary
14494 \begin_inset Quotes erd
14495 \end_inset
14496
14497  paragraph.
14498 \begin_inset Foot
14499 status collapsed
14500
14501 \begin_layout Plain Layout
14502 The corresponding \SpecialChar LaTeX
14503  commands must appear before the 
14504 \family typewriter
14505
14506 \backslash
14507 maketitle
14508 \family default
14509  command.
14510 \end_layout
14511
14512 \end_inset
14513
14514  When such a type is used more than once, the latter usage overwrites the
14515  former one, that means, for every type only the latest usage is valid.
14516  The order of the different types however has, like 
14517 \family sans
14518 Title
14519 \family default
14520
14521 \family sans
14522 Author
14523 \family default
14524 , and 
14525 \family sans
14526 Date
14527 \family default
14528 , no effect on the appearance of the produced document.
14529 \end_layout
14530
14531 \begin_layout Itemize
14532
14533 \family sans
14534 Subject
14535 \family default
14536 : produces a centered paragraph above the ordinary title (
14537 \family sans
14538 Title
14539 \family default
14540
14541 \family sans
14542 Author
14543 \family default
14544
14545 \family sans
14546 Date
14547 \family default
14548 ) for the subject of the document.
14549 \end_layout
14550
14551 \begin_layout Itemize
14552
14553 \family sans
14554 Publishers
14555 \family default
14556 : produces a centered paragraph below the ordinary title (
14557 \family sans
14558 Title
14559 \family default
14560
14561 \family sans
14562 Author
14563 \family default
14564
14565 \family sans
14566 Date
14567 \family default
14568 ) for the publishers' name.
14569 \end_layout
14570
14571 \begin_layout Itemize
14572
14573 \family sans
14574 Dedication
14575 \family default
14576 : in 
14577 \emph on
14578 report (koma-script)
14579 \emph default
14580  and 
14581 \emph on
14582 book (koma-script)
14583 \emph default
14584  produces a centered paragraph on its own page behind the title page, or
14585  in 
14586 \emph on
14587 article (koma-script)
14588 \emph default
14589  produces a centered paragraph below the ordinary title (
14590 \family sans
14591 Title
14592 \family default
14593
14594 \family sans
14595 Author
14596 \family default
14597
14598 \family sans
14599 Date
14600 \family default
14601
14602 \family sans
14603 Publishers
14604 \family default
14605 ) for a dedication.
14606 \end_layout
14607
14608 \begin_layout Itemize
14609
14610 \family sans
14611 Titlehead
14612 \family default
14613 : produces a left aligned paragraph above the ordinary title (
14614 \family sans
14615 Title
14616 \family default
14617
14618 \family sans
14619 Author
14620 \family default
14621
14622 \family sans
14623 Date
14624 \family default
14625
14626 \family sans
14627 Subject
14628 \family default
14629 ) for a document`s head.
14630 \end_layout
14631
14632 \begin_layout Itemize
14633
14634 \family sans
14635 Uppertitleback
14636 \family default
14637 : produces in a double-sided print in 
14638 \emph on
14639 report (koma-script)
14640 \emph default
14641  and 
14642 \emph on
14643 book (koma-script)
14644 \emph default
14645  a left-aligned paragraph at the top of the title page`s back or has no
14646  effect in a single-sided print or in 
14647 \emph on
14648 article (koma-script)
14649 \emph default
14650 .
14651 \end_layout
14652
14653 \begin_layout Itemize
14654
14655 \family sans
14656 Lowertitleback
14657 \family default
14658 : produces in a double-sided print in 
14659 \emph on
14660 report (koma-script)
14661 \emph default
14662  and 
14663 \emph on
14664 book (koma-script)
14665 \emph default
14666  a left-aligned paragraph at the bottom of the title page`s back or has
14667  no effect in a single-sided print or in 
14668 \emph on
14669 article (koma-script)
14670 \emph default
14671 .
14672 \end_layout
14673
14674 \begin_layout Itemize
14675
14676 \family sans
14677 Extratitle
14678 \family default
14679 : produces a special 
14680 \begin_inset Quotes eld
14681 \end_inset
14682
14683 dirty
14684 \begin_inset Quotes erd
14685 \end_inset
14686
14687  page ahead of the actual document containing a paragraph without special
14688  formatting.
14689 \end_layout
14690
14691 \begin_layout Standard
14692 The layout files for the document classes 
14693 \emph on
14694 article (koma-script)
14695 \emph default
14696
14697 \emph on
14698 report (koma-script)
14699 \emph default
14700 , and 
14701 \emph on
14702 book (koma-script)
14703 \emph default
14704  do include the file 
14705 \family typewriter
14706 scrmacros.inc
14707 \family default
14708 .
14709  This is thought of as a place to define your own types.
14710  Copy scrmacros
14711 \family typewriter
14712 .inc
14713 \family default
14714  in your personal layout directory and edit the file!
14715 \end_layout
14716
14717 \begin_layout Subsection
14718 letter (koma-script)
14719 \end_layout
14720
14721 \begin_layout Standard
14722 \noindent
14723 The document class 
14724 \emph on
14725 letter (koma-script)
14726 \emph default
14727  is implemented in the layout file 
14728 \family typewriter
14729 scrlettr.layout
14730 \family default
14731 .
14732  It contains all the paragraph types of the corresponding standard document
14733  class 
14734 \emph on
14735 letter
14736 \emph default
14737 , partly modified, with the exception of the \SpecialChar LyX
14738  specific types 
14739 \family sans
14740 \SpecialChar LyX
14741 -Code
14742 \family default
14743  and 
14744 \family sans
14745 Comment
14746 \family default
14747  and the 
14748 \family sans
14749 List
14750 \family default
14751  type, which is replaced by the new 
14752 \family sans
14753 Labeling
14754 \family default
14755  type.
14756  In addition, it contains, in contrast to the standard document class, the
14757  standard types 
14758 \family sans
14759 \SpecialChar LaTeX
14760
14761 \family default
14762
14763 \family sans
14764 Quotation
14765 \family default
14766
14767 \family sans
14768 Quote
14769 \family default
14770 , and 
14771 \family sans
14772 Verse
14773 \family default
14774 .
14775  Furthermore, there are a number of new letter specific types.
14776 \end_layout
14777
14778 \begin_layout Standard
14779 The appearance of the letter produced by this document class can be controlled
14780  by a number of \SpecialChar LaTeX
14781  commands, which you can put in the \SpecialChar LaTeX
14782  preamble.
14783 \begin_inset Foot
14784 status collapsed
14785
14786 \begin_layout Plain Layout
14787 For example, the standard appearance of the letter`s heading, consisting
14788  of name and address, is quite self-willed.
14789  An 
14790 \begin_inset Quotes eld
14791 \end_inset
14792
14793 ordinary
14794 \begin_inset Quotes erd
14795 \end_inset
14796
14797  heading is produced by the following \SpecialChar LaTeX
14798  commands in the preamble:
14799 \end_layout
14800
14801 \begin_layout LyX-Code
14802
14803 \backslash
14804 firsthead{
14805 \backslash
14806 parbox[b]{
14807 \backslash
14808 textwidth}
14809 \end_layout
14810
14811 \begin_layout LyX-Code
14812   {
14813 \backslash
14814 ignorespaces 
14815 \backslash
14816 fromname
14817 \backslash
14818
14819 \backslash
14820  
14821 \backslash
14822 ignorespaces 
14823 \backslash
14824 fromaddress}} 
14825 \end_layout
14826
14827 \begin_layout LyX-Code
14828
14829 \backslash
14830 nexthead{
14831 \backslash
14832 parbox[b]{
14833 \backslash
14834 textwidth}
14835 \end_layout
14836
14837 \begin_layout LyX-Code
14838   {
14839 \backslash
14840 ignorespaces 
14841 \backslash
14842 fromname 
14843 \backslash
14844 hfill 
14845 \backslash
14846 ignorespaces 
14847 \backslash
14848 pagename
14849 \backslash
14850  
14851 \backslash
14852 thepage}}
14853 \end_layout
14854
14855 \end_inset
14856
14857  A detailed German description of such \SpecialChar LaTeX
14858  commands can be found in the Koma-Script
14859  documentation 
14860 \emph on
14861 scrguide
14862 \emph default
14863 .
14864  With it, the letter's author can produce his personal letter layout.
14865 \end_layout
14866
14867 \begin_layout Standard
14868 The types 
14869 \family sans
14870 Letter
14871 \family default
14872  and 
14873 \family sans
14874 Opening
14875 \family default
14876  define the beginning of the letter and must be used in every letter.
14877  To emphasize them in the \SpecialChar LyX
14878  document class, they are marked with the letter
14879  
14880 \shape italic
14881 L
14882 \shape default
14883  or 
14884 \shape italic
14885 O
14886 \shape default
14887 , resp.
14888 \begin_inset space ~
14889 \end_inset
14890
14891 in the left margin.
14892  It is possible to write any number of letters in one file.
14893  An 
14894 \family sans
14895 Opening
14896 \family default
14897  type produces a new letter using the same addressee and a 
14898 \family sans
14899 Letter
14900 \family default
14901  type produces a new addressee.
14902  The types 
14903 \family sans
14904 Closing
14905 \family default
14906
14907 \family sans
14908 PS
14909 \family default
14910
14911 \family sans
14912 CC
14913 \family default
14914 , and 
14915 \family sans
14916 Encl
14917 \family default
14918  are ordinary paragraph types and can also be used several times in one
14919  and the same letter.
14920 \end_layout
14921
14922 \begin_layout Itemize
14923
14924 \family sans
14925 Letter
14926 \family default
14927 : produces a paragraph for the addressee and implicitly defines the beginning
14928  of the letter.
14929 \end_layout
14930
14931 \begin_layout Itemize
14932
14933 \family sans
14934 Opening
14935 \family default
14936 : produces a paragraph for the form of address and implicitly produces a
14937  new letter.
14938 \end_layout
14939
14940 \begin_layout Itemize
14941
14942 \family sans
14943 Closing
14944 \family default
14945 : produces a paragraph for a close.
14946 \end_layout
14947
14948 \begin_layout Itemize
14949
14950 \family sans
14951 PS
14952 \family default
14953 : produces a paragraph for a postscript.
14954 \end_layout
14955
14956 \begin_layout Itemize
14957
14958 \family sans
14959 CC
14960 \family default
14961 : produces a paragraph for a distribution list.
14962 \end_layout
14963
14964 \begin_layout Itemize
14965
14966 \family sans
14967 Encl
14968 \family default
14969 : produces a paragraph for enclosures.
14970 \end_layout
14971
14972 \begin_layout Standard
14973 The types 
14974 \family sans
14975 Name
14976 \family default
14977
14978 \family sans
14979 Signature
14980 \family default
14981
14982 \family sans
14983 Address
14984 \family default
14985
14986 \family sans
14987 Telephone
14988 \family default
14989
14990 \family sans
14991 Place
14992 \family default
14993
14994 \family sans
14995 Backaddress
14996 \family default
14997
14998 \family sans
14999 Specialmail
15000 \family default
15001
15002 \family sans
15003 Location
15004 \family default
15005
15006 \family sans
15007 Title
15008 \family default
15009 , and 
15010 \family sans
15011 Subject
15012 \family default
15013  are input types provided with a label to enter information, which will
15014  be processed by the document class.
15015 \begin_inset Foot
15016 status open
15017
15018 \begin_layout Plain Layout
15019 It could be seen as a matter of inconsequence, that the types 
15020 \family sans
15021 Letter
15022 \family default
15023  and 
15024 \family sans
15025 Opening
15026 \family default
15027  described above are not such input types as well.
15028  Because of the special meaning of those types, however, I have implemented
15029  them as ordinary paragraph types with a one letter mark in the left margin.
15030  Moreover, it would affect my feeling of symmetry, if the 
15031 \family sans
15032 Opening
15033 \family default
15034  type and the 
15035 \family sans
15036 Closing
15037 \family default
15038  type had such a serious different appearance.
15039 \end_layout
15040
15041 \end_inset
15042
15043  The types must be used ahead of the corresponding 
15044 \family sans
15045 Opening
15046 \family default
15047  type.
15048 \end_layout
15049
15050 \begin_layout Standard
15051 An implementation of these types in a WYSIWYG fashion does not seem to make
15052  sense, because the real appearance of the produced letter does not only
15053  depend on the usage of the particular type, but also on other factors.
15054  For example, a signature entered in the 
15055 \family sans
15056 Signature
15057 \family default
15058  type will in the standard behavior appear in the produced letter only,
15059  when in the same letter also a 
15060 \family sans
15061 Closing
15062 \family default
15063  type is used.
15064  The entered value of the 
15065 \family sans
15066 Telephone
15067 \family default
15068  type will in the standard behavior not appear in the produced letter at
15069  all.
15070  The possibility to design the letter`s heading freely is already indicated
15071  in a footnote above.
15072 \end_layout
15073
15074 \begin_layout Standard
15075 The input types can also be used as empty paragraphs.
15076  This makes sense e.
15077 \begin_inset space \thinspace{}
15078 \end_inset
15079
15080 g.
15081 \begin_inset space \space{}
15082 \end_inset
15083
15084 for the 
15085 \family sans
15086 Signature
15087 \family default
15088  type.
15089  If the 
15090 \family sans
15091 Signature
15092 \family default
15093  type is not used at all, in the standard behavior the value of the 
15094 \family sans
15095 Name
15096 \family default
15097  type is used as signature, whereas if an empty 
15098 \family sans
15099 Signature
15100 \family default
15101  type is used, no signature value is defined.
15102 \end_layout
15103
15104 \begin_layout Standard
15105 By using the input types it is possible to write a letter template, containing
15106  filled input types with your personal dates (name, address, etc.) and empty
15107  input types for other dates you want to enter.
15108 \end_layout
15109
15110 \begin_layout Itemize
15111
15112 \family sans
15113 Name
15114 \family default
15115 : sender's name, in the standard behavior appears as a centered paragraph
15116  in small caps in the letter`s heading.
15117 \end_layout
15118
15119 \begin_layout Itemize
15120
15121 \family sans
15122 Signature
15123 \family default
15124 : sender's signature, in the standard behavior appears below the 
15125 \family sans
15126 Closing
15127 \family default
15128  type.
15129  If no 
15130 \family sans
15131 Signature
15132 \family default
15133  type is used, the value of the 
15134 \family sans
15135 Name
15136 \family default
15137  type appears instead.
15138 \end_layout
15139
15140 \begin_layout Itemize
15141
15142 \family sans
15143 Address
15144 \family default
15145 : sender's address, in the standard behavior appears in a centered paragraph
15146  in the letter`s heading below the sender's name.
15147 \end_layout
15148
15149 \begin_layout Itemize
15150
15151 \family sans
15152 Telephone
15153 \family default
15154 : sender's telephone number, in the standard behavior only sets the \SpecialChar LaTeX
15155  variable
15156  
15157 \family typewriter
15158
15159 \backslash
15160 telephonenum
15161 \family default
15162 .
15163 \end_layout
15164
15165 \begin_layout Itemize
15166
15167 \family sans
15168 Place
15169 \family default
15170 : place of the letter`s making.
15171 \end_layout
15172
15173 \begin_layout Itemize
15174
15175 \family sans
15176 Date
15177 \family default
15178 : date of the letter`s making.
15179  
15180 \family sans
15181 Place
15182 \family default
15183  and 
15184 \family sans
15185 Date
15186 \family default
15187 , in the standard behavior, produce the place and the date in a right-aligned
15188  line below the addressee's field.
15189  If an empty 
15190 \family sans
15191 Date
15192 \family default
15193  type is used, neither place nor date appear, independent of the value of
15194  the 
15195 \family sans
15196 Place
15197 \family default
15198  type.
15199  If no 
15200 \family sans
15201 Date
15202 \family default
15203  type is used, the date of the letter `s production is used.
15204 \end_layout
15205
15206 \begin_layout Itemize
15207
15208 \family sans
15209 Backaddress
15210 \family default
15211 : sender`s back address, in the standard behavior appears above the addressee's
15212  field in a small sans serif font.
15213 \end_layout
15214
15215 \begin_layout Itemize
15216
15217 \family sans
15218 Specialmail
15219 \family default
15220 : special mail information, in the standard behavior appears underlined
15221  above the addressee's field below the back address.
15222 \end_layout
15223
15224 \begin_layout Itemize
15225
15226 \family sans
15227 Location
15228 \family default
15229 : additional information, in the standard behavior appears on right side
15230  below the addressee`s field.
15231 \end_layout
15232
15233 \begin_layout Itemize
15234
15235 \family sans
15236 Title
15237 \family default
15238 : the letter's title, in the standard behavior appears in a big, bold, sans
15239  serif font above the subject.
15240 \end_layout
15241
15242 \begin_layout Itemize
15243
15244 \family sans
15245 Subject
15246 \family default
15247 : the letter's subject, in the standard behavior appears in a bold font
15248  above the 
15249 \family sans
15250 Opening
15251 \family default
15252  paragraph.
15253 \end_layout
15254
15255 \begin_layout Standard
15256 The types 
15257 \family sans
15258 Yourref
15259 \family default
15260
15261 \family sans
15262 Yourmail
15263 \family default
15264
15265 \family sans
15266 Myref
15267 \family default
15268
15269 \family sans
15270 Customer
15271 \family default
15272 , and 
15273 \family sans
15274 Invoice
15275 \family default
15276  produce a business letter like line above the 
15277 \family sans
15278 Title
15279 \family default
15280  line containing the fields 
15281 \begin_inset Quotes eld
15282 \end_inset
15283
15284 Your ref.
15285 \begin_inset Quotes erd
15286 \end_inset
15287
15288
15289 \begin_inset Quotes eld
15290 \end_inset
15291
15292 Your letter of
15293 \begin_inset Quotes erd
15294 \end_inset
15295
15296
15297 \begin_inset Quotes eld
15298 \end_inset
15299
15300 Our ref.
15301 \begin_inset Quotes erd
15302 \end_inset
15303
15304
15305 \begin_inset Quotes eld
15306 \end_inset
15307
15308 Customer no.
15309 \begin_inset Quotes erd
15310 \end_inset
15311
15312
15313 \begin_inset Quotes eld
15314 \end_inset
15315
15316 Invoice no.
15317 \begin_inset Quotes erd
15318 \end_inset
15319
15320 , and 
15321 \begin_inset Quotes eld
15322 \end_inset
15323
15324 Date
15325 \begin_inset Quotes erd
15326 \end_inset
15327
15328 .
15329  For the date field, the value of the 
15330 \family sans
15331 Date
15332 \family default
15333  type is used.
15334  If one of these 
15335 \begin_inset Quotes eld
15336 \end_inset
15337
15338 business letter types
15339 \begin_inset Quotes erd
15340 \end_inset
15341
15342  is used, the value of the 
15343 \family sans
15344 Place
15345 \family default
15346  type however does not appear, but only the \SpecialChar LaTeX
15347  variable 
15348 \family typewriter
15349
15350 \backslash
15351 fromplace
15352 \family default
15353  is set.
15354  The ordinary output of place and date in a right-aligned line below the
15355  addressee`s field is suppressed.
15356  The types are implemented as input types provided with a label and must
15357  be used ahead of the corresponding 
15358 \family sans
15359 Opening
15360 \family default
15361  type.
15362 \end_layout
15363
15364 \begin_layout Itemize
15365
15366 \family sans
15367 Yourref
15368 \family default
15369 : Your ref.
15370 \end_layout
15371
15372 \begin_layout Itemize
15373
15374 \family sans
15375 Yourmail
15376 \family default
15377 : Your letter of.
15378 \end_layout
15379
15380 \begin_layout Itemize
15381
15382 \family sans
15383 Myref
15384 \family default
15385 : Our ref.
15386 \end_layout
15387
15388 \begin_layout Itemize
15389
15390 \family sans
15391 Customer
15392 \family default
15393 : Customer no.
15394 \end_layout
15395
15396 \begin_layout Itemize
15397
15398 \family sans
15399 Invoice
15400 \family default
15401 : Invoice no.
15402 \end_layout
15403
15404 \begin_layout Subsection
15405 The new letter class: letter (koma-script v.2)
15406 \end_layout
15407
15408 \begin_layout Standard
15409 by 
15410 \noun on
15411 Jürgen Spitzmüller
15412 \end_layout
15413
15414 \begin_layout Standard
15415 \begin_inset VSpace medskip
15416 \end_inset
15417
15418
15419 \end_layout
15420
15421 \begin_layout Standard
15422 \noindent
15423 Koma-Script version 2.8 has introduced a new letter class 
15424 \family typewriter
15425 scrlttr2
15426 \family default
15427  which supersedes the now unsupported 
15428 \family typewriter
15429 scrlettr
15430 \family default
15431 .
15432  It has — on the \SpecialChar LaTeX
15433  side — a completely new interface and is not compatible
15434  with the old class.
15435  Therefore, \SpecialChar LyX
15436  supports both, though it is recommended you use the new class.
15437 \end_layout
15438
15439 \begin_layout Standard
15440 This class covers the same functionality as 
15441 \emph on
15442 letter (koma-script),
15443 \emph default
15444  and a few more.
15445  The basic items are 
15446 \family sans
15447 Address
15448 \family default
15449  (receiver's address, same as 
15450 \family sans
15451 Letter
15452 \family default
15453  in the old layout), 
15454 \family sans
15455 Opening
15456 \family default
15457 , and 
15458 \family sans
15459 Closing
15460 \family default
15461 .
15462  
15463 \family sans
15464 NextAddress
15465 \family default
15466  will start a new letter (i.
15467 \begin_inset space \thinspace{}
15468 \end_inset
15469
15470 e.
15471 \begin_inset space \space{}
15472 \end_inset
15473
15474 you can write several letters per document).
15475  New elements are sender's 
15476 \family sans
15477 E-Mail
15478 \family default
15479
15480 \family sans
15481 URL
15482 \family default
15483
15484 \family sans
15485 Fax
15486 \family default
15487
15488 \family sans
15489 Bank
15490 \family default
15491  and the possibility to use a 
15492 \family sans
15493 Logo
15494 \family default
15495  (via 
15496 \family sans
15497 Insert\SpecialChar menuseparator
15498 Graphics
15499 \family default
15500 ) in the header.
15501 \end_layout
15502
15503 \begin_layout Standard
15504 The biggest improvement is, though, that the letter's layout is configurable
15505  to meet almost any needs.
15506  This can be done via the preamble or with a special style file (Letter
15507  Class Option, extension 
15508 \family typewriter
15509 *.lco
15510 \family default
15511 ), that will be read in as a class option.
15512 \begin_inset Foot
15513 status collapsed
15514
15515 \begin_layout Plain Layout
15516 The KOMA package comes with some default 
15517 \family typewriter
15518 *.lco
15519 \family default
15520  files.
15521  There is, for instance, a 
15522 \family typewriter
15523 DIN.lco
15524 \family default
15525  file that follows german typesetting rules, or a 
15526 \family typewriter
15527 KOMAold.lco
15528 \family default
15529  that provides the default layout of the old 
15530 \family typewriter
15531 scrlettr
15532 \family default
15533  class.
15534  The latter can be loaded with the class option 
15535 \family typewriter
15536 KOMAold
15537 \family default
15538 , inserted via the 
15539 \family sans
15540 Layout\SpecialChar menuseparator
15541 Document\SpecialChar menuseparator
15542 Extra Options
15543 \family default
15544  field.
15545 \end_layout
15546
15547 \end_inset
15548
15549  Have a look at the 
15550 \emph on
15551 koma-letter2
15552 \emph default
15553  template that is included in \SpecialChar LyX
15554  for examples.
15555  A detailed description is to be found in the Koma-Script documentation
15556  (
15557 \emph on
15558 scrguide
15559 \emph default
15560 ).
15561 \end_layout
15562
15563 \begin_layout Subsection
15564 Problems
15565 \end_layout
15566
15567 \begin_layout Standard
15568 Visualizing the Koma-Script document classes in \SpecialChar LyX
15569 , the \SpecialChar LyX
15570  internals cause some
15571  problems.
15572 \end_layout
15573
15574 \begin_layout Itemize
15575 The chapter number of a 
15576 \family sans
15577 Chapter
15578 \family default
15579  type appears on a line of its own above the chapter heading instead of
15580  appearing in the same line ahead of it.
15581  The cause for that is the \SpecialChar LyX
15582  internal behavior for the labeltype 
15583 \family sans
15584 Counter_Chapter
15585 \family default
15586  in the layout file.
15587 \end_layout
15588
15589 \begin_layout Itemize
15590 The headings of the types 
15591 \family sans
15592 Addchap
15593 \family default
15594  and 
15595 \family sans
15596 Addsec
15597 \family default
15598  are only put in the 
15599 \begin_inset Quotes eld
15600 \end_inset
15601
15602 true
15603 \begin_inset Quotes erd
15604 \end_inset
15605
15606  \SpecialChar LaTeX
15607  table of contents, but not in the \SpecialChar LyX
15608  table of contents (
15609 \family sans
15610 Document\SpecialChar menuseparator
15611 Table
15612 \begin_inset space ~
15613 \end_inset
15614
15615 of
15616 \begin_inset space ~
15617 \end_inset
15618
15619 Contents
15620 \family default
15621 ).
15622 \end_layout
15623
15624 \begin_layout Itemize
15625 The paragraphs in a 
15626 \emph on
15627 letter
15628 \emph default
15629  document class appear in a skip separation mode, not indented.
15630  This is the standard behavior, no special \SpecialChar LaTeX
15631  commands are needed for that.
15632  But in the 
15633 \family sans
15634 Document\SpecialChar menuseparator
15635 Settings
15636 \family default
15637  dialog the corresponding radio button indicates 
15638 \family sans
15639 Indent
15640 \family default
15641 .
15642  A 
15643 \family sans
15644 Skip
15645 \family default
15646  value always has the effect that extra \SpecialChar LaTeX
15647  commands are inserted in the document
15648  to produce the gap, which is not what is wanted in this case.
15649 \end_layout
15650
15651 \begin_layout Section
15652 Memoir
15653 \end_layout
15654
15655 \begin_layout Standard
15656 By 
15657 \noun on
15658 Jürgen Spitzmüller
15659 \end_layout
15660
15661 \begin_layout Subsection
15662 Overview
15663 \end_layout
15664
15665 \begin_layout Standard
15666 Memoir is a very powerful and constantly evolving class.
15667  It has been designed with regard to fictional and non-fictional literature.
15668  Its aim is to let the user have maximum control over the typesetting of
15669  his document.
15670  Memoir is based on the standard book class, but it can also emulate the
15671  article class (see below).
15672 \end_layout
15673
15674 \begin_layout Standard
15675 Peter Wilson, the developer of Memoir, is known as the author of lots of
15676  useful packages in the \SpecialChar LaTeX
15677  world.
15678  Most of them have been merged with Memoir.
15679  Therefore, it is much easier to layout the table of contents, appendices,
15680  chapter designs and such.
15681  \SpecialChar LyX
15682 , though, does not support all of these goodies natively.
15683  Some of them might be added to forthcoming releases
15684 \begin_inset Foot
15685 status collapsed
15686
15687 \begin_layout Plain Layout
15688 You are invited to send suggestions to 
15689 \begin_inset Flex URL
15690 status collapsed
15691
15692 \begin_layout Plain Layout
15693
15694 lyx-devel@lists.lyx.org
15695 \end_layout
15696
15697 \end_inset
15698
15699 .
15700 \end_layout
15701
15702 \end_inset
15703
15704 , lots will probably never be supported, due to the limitations of \SpecialChar LyX
15705 's framework.
15706  Of course you can still use all features with the help of some native \SpecialChar LaTeX
15707
15708  commands (\SpecialChar TeX
15709  code
15710 \begin_inset Foot
15711 status collapsed
15712
15713 \begin_layout Plain Layout
15714 Cf.
15715 \begin_inset ERT
15716 status collapsed
15717
15718 \begin_layout Plain Layout
15719
15720
15721 \backslash
15722  
15723 \end_layout
15724
15725 \end_inset
15726
15727 section
15728 \begin_inset space ~
15729 \end_inset
15730
15731
15732 \begin_inset CommandInset ref
15733 LatexCommand ref
15734 reference "sec:Inserting-TeX-Code"
15735
15736 \end_inset
15737
15738  for details.
15739 \end_layout
15740
15741 \end_inset
15742
15743 ).
15744  In this section, we can only list those features that are natively supported
15745  by \SpecialChar LyX
15746 .
15747  For detailed descriptions (and for the rest of features) we recommend you
15748  have a look at the detailed manual of the Memoir class
15749 \begin_inset Foot
15750 status collapsed
15751
15752 \begin_layout Plain Layout
15753 Cf.
15754 \begin_inset ERT
15755 status collapsed
15756
15757 \begin_layout Plain Layout
15758
15759
15760 \backslash
15761  
15762 \end_layout
15763
15764 \end_inset
15765
15766
15767 \begin_inset Flex URL
15768 status collapsed
15769
15770 \begin_layout Plain Layout
15771
15772 CTAN:/macros/latex/memoir/memman.pdf
15773 \end_layout
15774
15775 \end_inset
15776
15777 .
15778 \end_layout
15779
15780 \end_inset
15781
15782 , which is not only a user guide for the class, but also both a comprehensive
15783  description on good typesetting and a superb example for good typesetting
15784  itself.
15785 \end_layout
15786
15787 \begin_layout Subsection
15788 Basic features and restrictions
15789 \end_layout
15790
15791 \begin_layout Standard
15792 Memoir supports basically all features of the standard book classes.
15793  There are, however, some differences, as follows:
15794 \end_layout
15795
15796 \begin_layout Description
15797 Font
15798 \begin_inset space ~
15799 \end_inset
15800
15801 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
15802 \end_layout
15803
15804 \begin_layout Description
15805 Page
15806 \begin_inset space ~
15807 \end_inset
15808
15809 style: The fancy page style is not supported, due to a command clash between
15810  Memoir and the fancyhdr package (they both define a command with the same
15811  name, which confuses \SpecialChar LaTeX
15812 ).
15813  Instead, Memoir comes with a number of its own page styles (see 
15814 \family sans
15815 Layout\SpecialChar menuseparator
15816 Document\SpecialChar menuseparator
15817 Page
15818 \begin_inset space ~
15819 \end_inset
15820
15821 Style
15822 \family default
15823 ).
15824  If you want to use these for the chapter pages, you have to use the command
15825  
15826 \family typewriter
15827
15828 \backslash
15829 chapterstyle
15830 \family default
15831  in the main text or in preamble (e.
15832 \begin_inset space \thinspace{}
15833 \end_inset
15834
15835 g.
15836 \begin_inset space \space{}
15837 \end_inset
15838
15839
15840 \family typewriter
15841
15842 \backslash
15843 chapterstyle{companion}
15844 \family default
15845 ).
15846 \end_layout
15847
15848 \begin_layout Description
15849 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
15850  optional argument in the standard classes.
15851  With this, you can specify an alternative version of the title for the
15852  table of contents and the headers (for instance, if the title is too long).
15853  In \SpecialChar LyX
15854 , you can do this via 
15855 \family sans
15856 Insert\SpecialChar menuseparator
15857 Short
15858 \begin_inset space ~
15859 \end_inset
15860
15861 Title
15862 \family default
15863  at the beginning of a chapter/section.
15864  Memoir features a second optional argument and thus separates the table
15865  of contents from the header.
15866  You can define three variants of a title with this: one for the main text,
15867  one for the table of contents, and one for the headers.
15868  Simply insert two optional arguments if you need this feature, the first
15869  one containing the short title for the Table of Contents, the second one
15870  containing an alternative short title for the headers.
15871 \end_layout
15872
15873 \begin_layout Description
15874 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
15875  of contents, the list of figures and the list of table start a new page
15876  automatically.
15877  Memoir does not follow this route.
15878  You have to insert a page break yourself, if you want to have one.
15879 \end_layout
15880
15881 \begin_layout Description
15882 Titlepage: For some unknown reason, Memoir uses pagination on the title
15883  page (in the standard classes, title pages are 
15884 \begin_inset Quotes eld
15885 \end_inset
15886
15887 empty
15888 \begin_inset Quotes erd
15889 \end_inset
15890
15891 ).
15892  If you want an empty title page, type 
15893 \family typewriter
15894
15895 \backslash
15896 aliaspagestyle{title}{empty}
15897 \family default
15898  in the preamble.
15899 \end_layout
15900
15901 \begin_layout Description
15902 Article: With the class option 
15903 \emph on
15904 article
15905 \emph default
15906  (to be inserted in 
15907 \family sans
15908 Layout\SpecialChar menuseparator
15909 Document\SpecialChar menuseparator
15910 Extra
15911 \begin_inset space ~
15912 \end_inset
15913
15914 Options
15915 \family default
15916 ), you can emulate article style.
15917  That is, counters (footnotes, figures, tables etc.) will not be reset on
15918  new chapters, chapters don't start a new page (but are—in contrary to 
15919 \begin_inset Quotes eld
15920 \end_inset
15921
15922 real
15923 \begin_inset Quotes erd
15924 \end_inset
15925
15926  article classes—still allowed), parts, though, use their own page, as in
15927  book.
15928 \end_layout
15929
15930 \begin_layout Description
15931 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
15932  font commands, which have been used in the old \SpecialChar LaTeX
15933  version 2.09 (e.
15934 \begin_inset space \thinspace{}
15935 \end_inset
15936
15937 g.
15938 \begin_inset space \space{}
15939 \end_inset
15940
15941
15942 \family typewriter
15943
15944 \backslash
15945 rm
15946 \family default
15947
15948 \family typewriter
15949
15950 \backslash
15951 it
15952 \family default
15953 ).
15954  It produces an error and stops \SpecialChar LaTeX
15955  whenever such a command appears.
15956  The class option 
15957 \emph on
15958 oldfontcommands
15959 \emph default
15960  reallows the commands and spits out warnings instead (which does at least
15961  not stop \SpecialChar LaTeX
15962 ).
15963  Since a lot of packages and particularly Bib\SpecialChar TeX
15964  style files are still using
15965  those commands, we have decided to use this option by default.
15966 \end_layout
15967
15968 \begin_layout Subsection
15969 Extra features
15970 \end_layout
15971
15972 \begin_layout Standard
15973 We will only describe the features supported by \SpecialChar LyX
15974  (which is not much currently).
15975  Please consult the Memoir manual
15976 \begin_inset Foot
15977 status collapsed
15978
15979 \begin_layout Plain Layout
15980 Cf.
15981 \begin_inset ERT
15982 status collapsed
15983
15984 \begin_layout Plain Layout
15985
15986
15987 \backslash
15988  
15989 \end_layout
15990
15991 \end_inset
15992
15993
15994 \begin_inset Flex URL
15995 status collapsed
15996
15997 \begin_layout Plain Layout
15998
15999 CTAN:/macros/latex/memoir/memman.pdf
16000 \end_layout
16001
16002 \end_inset
16003
16004 .
16005 \end_layout
16006
16007 \end_inset
16008
16009  for details.
16010 \end_layout
16011
16012 \begin_layout Description
16013 Abstract: You may wonder why an abstract is an extra feature.
16014  Well, it is in book class.
16015  Usually books don't have abstracts.
16016  Memoir, however, has.
16017  You can use it wherever and how often you like.
16018 \end_layout
16019
16020 \begin_layout Description
16021 Chapterprecis: You may know this older typesetting style: The contents of
16022  a chapter are summarized below the title and also in the table of contents
16023  (e.
16024 \begin_inset space \thinspace{}
16025 \end_inset
16026
16027 g.
16028 \begin_inset space \space{}
16029 \end_inset
16030
16031
16032 \emph on
16033 Our hero arrives in Troia; he loses some friends; he finds others
16034 \emph default
16035 ).
16036  Chapterprecis does exactly this.
16037  It is therefore only sensible below a chapter.
16038 \end_layout
16039
16040 \begin_layout Description
16041 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
16042  The epigraph environment provides an elegant way of typesetting such a
16043  motto.
16044  The motto itself (text) and its author (source) are divided by a short
16045  line.
16046  Unfortunately, we have to fool \SpecialChar LyX
16047  a bit here again, since the environment
16048  needs two arguments (text and source).
16049  In this case, we have to use curly brackets (in \SpecialChar TeX
16050  mode) between the two
16051  arguments: 
16052 \emph on
16053 <smart slogan>
16054 \emph default
16055  
16056 \family typewriter
16057 }{
16058 \family default
16059  
16060 \emph on
16061 <author of the slogan>.
16062 \end_layout
16063
16064 \begin_layout Description
16065 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
16066  complex figurative poems).
16067  \SpecialChar LyX
16068  can only support a few of them.
16069  One is poemtitle, which is a centered title for poems, which will also
16070  be added to the table of contents (verse is the standard environment for
16071  poems.
16072  Memoir has some enhanced versions of verse, but you need to use \SpecialChar TeX
16073  code,
16074  because they have to be nested inside regular verse environments, which
16075  is not possible with \SpecialChar LyX
16076 ).
16077 \end_layout
16078
16079 \begin_layout Description
16080 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
16081 \end_layout
16082
16083 \begin_layout Section
16084 Article (mwart), book (mwbk) and report (mwrep)
16085 \begin_inset Argument status
16086 status collapsed
16087
16088 \begin_layout Plain Layout
16089 The 
16090 \family typewriter
16091 mw
16092 \family default
16093  Classes
16094 \end_layout
16095
16096 \end_inset
16097
16098
16099 \end_layout
16100
16101 \begin_layout Standard
16102 by 
16103 \noun on
16104 Tomasz Luczak
16105 \end_layout
16106
16107 \begin_layout Standard
16108 The \SpecialChar LyX
16109  document classes 
16110 \emph on
16111 article (mwart)
16112 \emph default
16113
16114 \emph on
16115 report (mwrep)
16116 \emph default
16117  and 
16118 \emph on
16119 book
16120 \emph default
16121  
16122 \emph on
16123 (mwbk)
16124 \emph default
16125  correspond to the \SpecialChar LaTeX
16126  document classes 
16127 \family typewriter
16128 mwart.cls
16129 \family default
16130
16131 \family typewriter
16132 mwrep.cls
16133 \family default
16134  and 
16135 \family typewriter
16136 mwbk.cls
16137 \family default
16138 , resp.
16139  They are replacements for the standard document classes 
16140 \family typewriter
16141 article.cls
16142 \family default
16143
16144 \family typewriter
16145 report.cls
16146 \family default
16147  and 
16148 \family typewriter
16149 book.cls
16150 \family default
16151 , resp., and fit better to Polish typography conventions in a number of points.
16152  
16153 \end_layout
16154
16155 \begin_layout Standard
16156 Basic differences:
16157 \end_layout
16158
16159 \begin_layout Itemize
16160 Unnumbered titles (with star, e.
16161 \begin_inset space \thinspace{}
16162 \end_inset
16163
16164 g.
16165 \begin_inset space \space{}
16166 \end_inset
16167
16168
16169 \family sans
16170 Section*
16171 \family default
16172 ) are added into table of contents,
16173 \end_layout
16174
16175 \begin_layout Itemize
16176 Additional page styles:
16177 \end_layout
16178
16179 \begin_deeper
16180 \begin_layout Description
16181 uheadings header with separated lines,
16182 \end_layout
16183
16184 \begin_layout Description
16185 myheadings custom header, contents headers via commands: 
16186 \family typewriter
16187
16188 \backslash
16189 markright
16190 \family default
16191  and 
16192 \family typewriter
16193
16194 \backslash
16195 markboth
16196 \family default
16197 ,
16198 \end_layout
16199
16200 \begin_layout Description
16201 myuheadings custom header with separated lines,
16202 \end_layout
16203
16204 \begin_layout Description
16205 outer page number is placed on outer side of page
16206 \end_layout
16207
16208 \end_deeper
16209 \begin_layout Itemize
16210 Options 
16211 \end_layout
16212
16213 \begin_deeper
16214 \begin_layout Description
16215 rmheadings serif titles — default,
16216 \end_layout
16217
16218 \begin_layout Description
16219 sfheadings sansserif titles,
16220 \end_layout
16221
16222 \begin_layout Description
16223 authortitle on title page first placed is author next title — default,
16224 \end_layout
16225
16226 \begin_layout Description
16227 titleauthor on title page first placed is title next author,
16228 \end_layout
16229
16230 \begin_layout Description
16231 withmarginpar reserve place on page for margins.
16232 \end_layout
16233
16234 \end_deeper
16235 \begin_layout Section
16236 Paper
16237 \end_layout
16238
16239 \begin_layout Standard
16240 The document class 
16241 \family sans
16242 paper
16243 \family default
16244  provides an alternative to the standard 
16245 \family sans
16246 article
16247 \family default
16248  class.
16249  It provides similar functionality, but you might prefer this layout with
16250  sans serif sections, headings, and more.
16251 \end_layout
16252
16253 \begin_layout Section
16254 Rev\SpecialChar TeX
16255 4
16256 \end_layout
16257
16258 \begin_layout Standard
16259 by 
16260 \noun on
16261 Amir Karger
16262 \end_layout
16263
16264 \begin_layout Standard
16265 \begin_inset VSpace bigskip
16266 \end_inset
16267
16268
16269 \end_layout
16270
16271 \begin_layout Standard
16272 \noindent
16273 The 
16274 \family sans
16275 Revtex
16276 \begin_inset space ~
16277 \end_inset
16278
16279 4
16280 \family default
16281  textclass works with the American Physical Sociey's Rev\SpecialChar TeX
16282  4.0 (the 
16283 \begin_inset Formula $\beta$
16284 \end_inset
16285
16286  release of May, 1999) class.
16287 \end_layout
16288
16289 \begin_layout Standard
16290 \SpecialChar LyX
16291  has a 
16292 \family sans
16293 Revtex
16294 \family default
16295  textclass, which works with Rev\SpecialChar TeX
16296  3.1.
16297  However, v3.1 is basically obsolete, as it works with \SpecialChar LaTeX
16298  2.09.
16299  That means that it doesn't interact very well with \SpecialChar LyX
16300 , which requires \SpecialChar LaTeX2e
16301 , although
16302  it has been kludged to work.
16303  Since Rev\SpecialChar TeX
16304  4.0 has been designed to work much more cleanly with \SpecialChar LaTeX2e
16305 , \SpecialChar LyX
16306  with the
16307  
16308 \family sans
16309 Rev\SpecialChar TeX
16310
16311 \begin_inset space ~
16312 \end_inset
16313
16314 4
16315 \family default
16316  textclass should also be pretty easy to use.
16317 \end_layout
16318
16319 \begin_layout Standard
16320 These documents are supposed to be used in 
16321 \emph on
16322 addition
16323 \emph default
16324  to the Rev\SpecialChar TeX
16325  4.0 documents, so we don't describe any of the special Rev\SpecialChar TeX
16326  macros,
16327  and assume you'll know what to put in the preamble if necessary.
16328 \end_layout
16329
16330 \begin_layout Subsection
16331 Installation
16332 \end_layout
16333
16334 \begin_layout Standard
16335 All you need to do is install Rev\SpecialChar TeX
16336  4, as described in the package's README
16337  file.
16338  The package can be found at The Rev\SpecialChar TeX
16339  4 Web Site 
16340 \begin_inset Flex URL
16341 status collapsed
16342
16343 \begin_layout Plain Layout
16344
16345 http://publish.aps.org/revtex4/
16346 \end_layout
16347
16348 \end_inset
16349
16350 .
16351  Install it somewhere that \SpecialChar LaTeX
16352  can see it.
16353  Test it by trying to \SpecialChar LaTeX
16354  a short Rev\SpecialChar TeX
16355  4 document in some random directory (i.
16356 \begin_inset space \thinspace{}
16357 \end_inset
16358
16359 e.
16360 \begin_inset space \space{}
16361 \end_inset
16362
16363 not the directory where you installed the class file.) Then, if you reconfigure
16364  \SpecialChar LyX
16365 , it will find the class file and let you use the Rev\SpecialChar TeX
16366 4 textclass.
16367 \end_layout
16368
16369 \begin_layout Standard
16370 Probably the easiest way to get started is either to import a Rev\SpecialChar TeX
16371  4 document
16372  using 
16373 \family typewriter
16374 tex2lyx
16375 \family default
16376 , or to use the 
16377 \family sans
16378 Revtex
16379 \begin_inset space ~
16380 \end_inset
16381
16382 4
16383 \family default
16384  template, found in the templates directory.
16385 \end_layout
16386
16387 \begin_layout Subsection
16388 Preamble Matter
16389 \end_layout
16390
16391 \begin_layout Standard
16392 Optional arguments to 
16393 \family typewriter
16394
16395 \backslash
16396 documentclass
16397 \family default
16398 , like 
16399 \begin_inset Quotes eld
16400 \end_inset
16401
16402 preprint
16403 \begin_inset Quotes erd
16404 \end_inset
16405
16406  and 
16407 \begin_inset Quotes eld
16408 \end_inset
16409
16410 aps
16411 \begin_inset Quotes erd
16412 \end_inset
16413
16414 , go in the 
16415 \family sans
16416 Extra
16417 \begin_inset space ~
16418 \end_inset
16419
16420 Options
16421 \family default
16422  field in the 
16423 \family sans
16424 Document
16425 \begin_inset space ~
16426 \end_inset
16427
16428 Layout
16429 \family default
16430  dialog, as usual.
16431  Remember that in Rev\SpecialChar TeX
16432 , at least one optional argument is required! 
16433 \end_layout
16434
16435 \begin_layout Standard
16436 Other preamble matter, like 
16437 \family typewriter
16438
16439 \backslash
16440 draft
16441 \family default
16442  etc.
16443 \begin_inset space ~
16444 \end_inset
16445
16446 goes in the 
16447 \family sans
16448 \SpecialChar LaTeX
16449
16450 \begin_inset space ~
16451 \end_inset
16452
16453 Preamble
16454 \family default
16455  dialog, also as usual.
16456 \end_layout
16457
16458 \begin_layout Subsection
16459 Layouts
16460 \end_layout
16461
16462 \begin_layout Standard
16463 The layouts basically correspond to the commands in Rev\SpecialChar TeX
16464 4.0.
16465  For example, the Email layout corresponds to 
16466 \family typewriter
16467
16468 \backslash
16469 email{}
16470 \family default
16471 .
16472  Note that (at least as of Rev\SpecialChar TeX
16473  4.0 Beta), the 
16474 \family sans
16475 Address
16476 \family default
16477  and 
16478 \family sans
16479 Affiliation
16480 \family default
16481  layouts are exactly equivalent, so you shouldn't need to use both.
16482 \begin_inset Foot
16483 status collapsed
16484
16485 \begin_layout Plain Layout
16486 In case you're curious, both were included so that 
16487 \family typewriter
16488 tex2lyx
16489 \family default
16490  would be able to translate both 
16491 \family typewriter
16492
16493 \backslash
16494 address
16495 \family default
16496  and 
16497 \family typewriter
16498
16499 \backslash
16500 affiliation
16501 \family default
16502 .
16503 \end_layout
16504
16505 \end_inset
16506
16507
16508 \end_layout
16509
16510 \begin_layout Subsection
16511 Important Notes
16512 \end_layout
16513
16514 \begin_layout Standard
16515 There are a couple of important unique aspects of Rev\SpecialChar TeX
16516  4 which might cause
16517  bugs that will be even more confusing in \SpecialChar LyX
16518 .
16519 \end_layout
16520
16521 \begin_layout Standard
16522 In Rev\SpecialChar TeX
16523 , the 
16524 \family typewriter
16525
16526 \backslash
16527 thanks
16528 \family default
16529  command goes 
16530 \emph on
16531 outside
16532 \emph default
16533  the 
16534 \family typewriter
16535
16536 \backslash
16537 author
16538 \family default
16539  command.
16540  The \SpecialChar LyX
16541  equivalent is that there is a separate Thanks layout.
16542  Do 
16543 \emph on
16544 not
16545 \emph default
16546  write footnotes in the 
16547 \family sans
16548 Author
16549 \family default
16550  layout, or weird things may happen.
16551  See the Rev\SpecialChar TeX
16552  4 documentation for more details.
16553 \end_layout
16554
16555 \begin_layout Standard
16556 Also, the 
16557 \family sans
16558 Author
16559 \begin_inset space ~
16560 \end_inset
16561
16562 Email
16563 \family default
16564
16565 \family sans
16566 Author
16567 \begin_inset space ~
16568 \end_inset
16569
16570 URL
16571 \family default
16572 , and 
16573 \family sans
16574 Thanks
16575 \family default
16576  layouts must be placed 
16577 \emph on
16578 in between
16579 \emph default
16580  the 
16581 \family sans
16582 Author
16583 \family default
16584  layout and the corresponding 
16585 \family sans
16586 Address
16587 \family default
16588  (or equivalent 
16589 \family sans
16590 Affiliation
16591 \family default
16592 ) layout.
16593  If you put the 
16594 \family sans
16595 Thanks
16596 \family default
16597  after the 
16598 \family sans
16599 Address
16600 \family default
16601 , the \SpecialChar LaTeX
16602  won't compile.
16603 \end_layout
16604
16605 \begin_layout Subsection
16606 Drawbacks
16607 \end_layout
16608
16609 \begin_layout Standard
16610 The main problem with this layout is that you can't use the optional arguments
16611  to layouts like Email and Title.
16612  (The problem is not unique to this layout; you can't use optional arguments
16613  to the Section layouts either.) This means that after you export that file
16614  to \SpecialChar LaTeX
16615  (which you'll need to do eventually to send it in to APS), you'll need
16616  to edit the \SpecialChar LaTeX
16617  file with a text editor to add the optional arguments to set,
16618  e.
16619 \begin_inset space \thinspace{}
16620 \end_inset
16621
16622 g.
16623 \begin_inset space \space{}
16624 \end_inset
16625
16626 the running title for the page headers.
16627  Lacking these layouts makes the 
16628 \family typewriter
16629
16630 \backslash
16631 altaffiliation
16632 \family default
16633  (and the equivalent 
16634 \family typewriter
16635
16636 \backslash
16637 altaddress
16638 \family default
16639 ) useless, so the corresponding layouts don't exist, and will have to be
16640  added by hand.
16641 \begin_inset Foot
16642 status collapsed
16643
16644 \begin_layout Plain Layout
16645
16646 \emph on
16647 Note from JMarc:
16648 \emph default
16649  actually, \SpecialChar LyX
16650  1.3.0 supports some forms of optional arguments, but this layout
16651  has not been updated yet to take advantage of it.
16652 \end_layout
16653
16654 \end_inset
16655
16656  
16657 \end_layout
16658
16659 \begin_layout Section
16660 Springer Journals (
16661 \family sans
16662 svjour
16663 \family default
16664 )
16665 \end_layout
16666
16667 \begin_layout Standard
16668 by 
16669 \noun on
16670 Martin Vermeer
16671 \end_layout
16672
16673 \begin_layout Subsection
16674 Description
16675 \end_layout
16676
16677 \begin_layout Standard
16678 These are the layout files for some of the journal formats used by Springer
16679  Verlag and listed on 
16680 \begin_inset Flex URL
16681 status collapsed
16682
16683 \begin_layout Plain Layout
16684
16685 http://www.springer.de/author/tex/help-journals.html
16686 \end_layout
16687
16688 \end_inset
16689
16690 , where you should also go to fetch the class files (yes, these are \SpecialChar LaTeX2e
16691  now!).
16692  It is a modular system: the things common to all journals are implemented
16693  in 
16694 \family typewriter
16695 svjour.inc
16696 \family default
16697 , which journal-specific layout files (such as, e.
16698 \begin_inset space \thinspace{}
16699 \end_inset
16700
16701 g.
16702 \begin_inset space \space{}
16703 \end_inset
16704
16705
16706 \family typewriter
16707 svjog.layout
16708 \family default
16709  for Journal of Geodesy) can include.
16710 \end_layout
16711
16712 \begin_layout Standard
16713 This means that implementing support for any other Springer journal on this
16714  list is as simple as writing your own 
16715 \family typewriter
16716 sv
16717 \family default
16718 <myjournal>
16719 \family typewriter
16720 .layout
16721 \family default
16722  file following the outline given in 
16723 \family typewriter
16724 svjog.layout
16725 \family default
16726 .
16727  
16728 \end_layout
16729
16730 \begin_layout Standard
16731 It is reasonably well tested only for the Journal of Geodesy.
16732  
16733 \family typewriter
16734 svjour
16735 \family default
16736  and 
16737 \family typewriter
16738 svjog
16739 \family default
16740  come with the standard \SpecialChar LyX
16741  distribution.
16742  Install the relevant class file (downloaded from Springer) in a proper
16743  directory, reconfigure \SpecialChar LaTeX
16744  (in the te\SpecialChar TeX
16745  case by running 
16746 \family typewriter
16747 texhash
16748 \family default
16749 , as root if necessary — doesn't \SpecialChar LyX
16750  take care of this?), reconfigure \SpecialChar LyX
16751  and
16752  it should work.
16753 \end_layout
16754
16755 \begin_layout Subsection
16756 New styles
16757 \end_layout
16758
16759 \begin_layout Standard
16760 A large number of theorem-like styles — 
16761 \family sans
16762 Claim, Conjecture,
16763 \family default
16764  
16765 \family sans
16766 \SpecialChar ldots
16767 Theorem
16768 \family default
16769 .
16770 \end_layout
16771
16772 \begin_layout Standard
16773
16774 \family sans
16775 Headnote, Dedication, Subtitle, Running_\SpecialChar LaTeX
16776 _Title, Author_Running, Institute,
16777  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
16778 \family default
16779 .
16780  See the Springer class file documentation for details.
16781 \end_layout
16782
16783 \begin_layout Subsection
16784 Supported journals
16785 \end_layout
16786
16787 \begin_layout Itemize
16788
16789 \emph on
16790 Journal of Geodesy
16791 \emph default
16792
16793 \family typewriter
16794 svjog.layout
16795 \family default
16796  — Martin Vermeer
16797 \end_layout
16798
16799 \begin_layout Itemize
16800
16801 \emph on
16802 Probability Theory and Related Fields
16803 \emph default
16804
16805 \family typewriter
16806 svprobth.layout
16807 \family default
16808  — Jean-Marc Lasgouttes
16809 \end_layout
16810
16811 \begin_layout Standard
16812 Add your own, it isn't so hard!
16813 \end_layout
16814
16815 \begin_layout Subsection
16816 Credits
16817 \end_layout
16818
16819 \begin_layout Standard
16820 These files are partly based on the older 
16821 \family typewriter
16822 ejour2.layout
16823 \family default
16824 , which was again based on a tinkered-with version of an old \SpecialChar LaTeX
16825  2.09 style
16826  file from Springer.
16827  All this, and the 
16828 \family typewriter
16829 ejour2
16830 \family default
16831  layout, are now defunct.
16832  Jean-Marc Lasgouttes helped out big in making me find my way around the
16833  \SpecialChar LyX
16834  layout file mechanism.
16835 \end_layout
16836
16837 \begin_layout Subsection
16838 Bugs
16839 \end_layout
16840
16841 \begin_layout Standard
16842 Probably.
16843  But probably less than in the old hacked-\SpecialChar LaTeX
16844  
16845 \family typewriter
16846 ejour2
16847 \family default
16848 .
16849 \end_layout
16850
16851 \begin_layout Standard
16852 Limitations e.
16853 \begin_inset space \thinspace{}
16854 \end_inset
16855
16856 g.: does not display the number for theorem-like layouts, just #.
16857 \end_layout
16858
16859 \begin_layout Section
16860 Slides [aka 
16861 \noun on
16862 Sli\SpecialChar TeX
16863
16864 \noun default
16865 ]
16866 \begin_inset CommandInset label
16867 LatexCommand label
16868 name "sec:slitex"
16869
16870 \end_inset
16871
16872
16873 \end_layout
16874
16875 \begin_layout Standard
16876 by 
16877 \noun on
16878 John Weiss
16879 \noun default
16880  
16881 \end_layout
16882
16883 \begin_layout Subsection
16884 Introduction
16885 \end_layout
16886
16887 \begin_layout Standard
16888 This section describes how to use \SpecialChar LyX
16889  to make slides for overhead projectors.
16890  There are two document classes that can do this: the default slides class
16891  and the 
16892 \family sans
16893 Foil\SpecialChar TeX
16894
16895 \family default
16896  slides class.
16897  This section documents the former.
16898 \end_layout
16899
16900 \begin_layout Standard
16901 I'm going to say this again, nice and clear, so that there's no misunderstanding
16902 :
16903 \end_layout
16904
16905 \begin_layout Standard
16906 \begin_inset VSpace bigskip
16907 \end_inset
16908
16909
16910 \end_layout
16911
16912 \begin_layout Standard
16913 \align center
16914
16915 \size large
16916 This section documents the class 
16917 \begin_inset Quotes eld
16918 \end_inset
16919
16920
16921 \family sans
16922 slides (default)
16923 \family default
16924
16925 \begin_inset Quotes erd
16926 \end_inset
16927
16928  
16929 \emph on
16930 only.
16931 \end_layout
16932
16933 \begin_layout Standard
16934 \begin_inset VSpace bigskip
16935 \end_inset
16936
16937
16938 \end_layout
16939
16940 \begin_layout Standard
16941 If you're looking for the documentation for 
16942 \begin_inset Quotes eld
16943 \end_inset
16944
16945
16946 \family sans
16947 slides (Foil\SpecialChar TeX
16948 )
16949 \family default
16950
16951 \begin_inset Quotes erd
16952 \end_inset
16953
16954 , check out section
16955 \begin_inset space ~
16956 \end_inset
16957
16958
16959 \begin_inset CommandInset ref
16960 LatexCommand ref
16961 reference "sec:foiltex"
16962
16963 \end_inset
16964
16965 .
16966  The 
16967 \family sans
16968 foils
16969 \family default
16970  class [
16971 \begin_inset Quotes eld
16972 \end_inset
16973
16974
16975 \family sans
16976 slides (Foil\SpecialChar TeX
16977 )
16978 \family default
16979
16980 \begin_inset Quotes erd
16981 \end_inset
16982
16983 ] is actually somewhat better than the default 
16984 \family sans
16985 slides
16986 \family default
16987  class,
16988 \begin_inset Foot
16989 status collapsed
16990
16991 \begin_layout Plain Layout
16992 \SpecialChar ldots
16993 or so I've been told repeatedly by its advocates.
16994  Having never used it, I have no idea if this claim is true or not.
16995 \end_layout
16996
16997 \end_inset
16998
16999  which this section documents.
17000 \end_layout
17001
17002 \begin_layout Standard
17003 This class is the \SpecialChar LaTeX2e
17004  improvement of the old 
17005 \noun on
17006 Sli\SpecialChar TeX
17007
17008 \noun default
17009  package.
17010  Every \SpecialChar LaTeX2e
17011  distribution includes this class [which I'll just refer to as 
17012 \begin_inset Quotes eld
17013 \end_inset
17014
17015
17016 \family sans
17017 slides
17018 \family default
17019
17020 \begin_inset Quotes erd
17021 \end_inset
17022
17023  from now on], so you're bound to have it.
17024  As I noted earlier, there are other classes, such as 
17025 \family sans
17026 foils
17027 \family default
17028 , which also produce slides for overhead projectors and do a better job
17029  at it.
17030  However, there are some things which 
17031 \family sans
17032 slides
17033 \family default
17034  can do which the others can't, such as generate overlays.
17035  Read on to learn more!
17036 \end_layout
17037
17038 \begin_layout Subsection
17039 Getting Started
17040 \begin_inset CommandInset label
17041 LatexCommand label
17042 name "sec:slidesetup"
17043
17044 \end_inset
17045
17046
17047 \end_layout
17048
17049 \begin_layout Standard
17050 Obviously, to use this document class, you need to select 
17051 \begin_inset Quotes eld
17052 \end_inset
17053
17054
17055 \family sans
17056 slides (default)
17057 \family default
17058
17059 \begin_inset Quotes erd
17060 \end_inset
17061
17062  from the class list in the 
17063 \family sans
17064 Document\SpecialChar menuseparator
17065 Settings
17066 \family default
17067  dialog.
17068  There are some other special things you should know about this class:
17069 \end_layout
17070
17071 \begin_layout Itemize
17072 Don't bother changing the options 
17073 \family sans
17074 Sides and Columns
17075 \family default
17076 .
17077  They're not supported by the 
17078 \family sans
17079 slides
17080 \family default
17081  class, anyways.
17082 \end_layout
17083
17084 \begin_layout Itemize
17085 The option 
17086 \family sans
17087 Page
17088 \begin_inset space ~
17089 \end_inset
17090
17091 style
17092 \family default
17093  behaves a bit differently for this class.
17094  The possible choices and what they do are as follows:
17095 \end_layout
17096
17097 \begin_deeper
17098 \begin_layout Description
17099
17100 \family sans
17101 plain
17102 \family default
17103  The final output contains page numbers in the lower right corner.
17104 \end_layout
17105
17106 \begin_layout Description
17107
17108 \family sans
17109 headings
17110 \family default
17111  Like 
17112 \family sans
17113 plain
17114 \family default
17115 , but also prints out any time markers you've put in.
17116  This is the default.
17117 \end_layout
17118
17119 \begin_layout Description
17120
17121 \family sans
17122 empty
17123 \family default
17124  The final output contains no page numbers, time markers, or alignment markers.
17125 \end_layout
17126
17127 \end_deeper
17128 \begin_layout Itemize
17129 The 
17130 \family sans
17131 slides
17132 \family default
17133  class has an extra option: 
17134 \family typewriter
17135 clock
17136 \family default
17137 .
17138  To use it, put 
17139 \begin_inset Quotes eld
17140 \end_inset
17141
17142
17143 \family typewriter
17144 clock
17145 \family default
17146
17147 \begin_inset Quotes erd
17148 \end_inset
17149
17150  in the extra class options.
17151 \end_layout
17152
17153 \begin_deeper
17154 \begin_layout Standard
17155 Using this options allows you to add time markers to 
17156 \family sans
17157 Note
17158 \family default
17159 s.
17160  See section
17161 \begin_inset space ~
17162 \end_inset
17163
17164
17165 \begin_inset CommandInset ref
17166 LatexCommand ref
17167 reference "sec:slideNote"
17168
17169 \end_inset
17170
17171  for more details.
17172 \end_layout
17173
17174 \end_deeper
17175 \begin_layout Standard
17176 You can also use the template file 
17177 \begin_inset Quotes eld
17178 \end_inset
17179
17180
17181 \family typewriter
17182 slides.lyx
17183 \family default
17184
17185 \begin_inset Quotes erd
17186 \end_inset
17187
17188  to automatically set up a document to use the 
17189 \family sans
17190 slides
17191 \family default
17192  class [using 
17193 \family sans
17194 File\SpecialChar menuseparator
17195 New
17196 \begin_inset space ~
17197 \end_inset
17198
17199 from
17200 \begin_inset space ~
17201 \end_inset
17202
17203 Template
17204 \family default
17205  to open your new document].
17206  The template file also contains some examples of the special paragraph
17207  environments used by this class.
17208  I'll describe those next.
17209 \end_layout
17210
17211 \begin_layout Subsection
17212 Paragraph Environments
17213 \end_layout
17214
17215 \begin_layout Subsubsection
17216 Supported Environments
17217 \end_layout
17218
17219 \begin_layout Standard
17220 The first thing you'll notice when you start up a new 
17221 \family sans
17222 slides
17223 \family default
17224  document is the font size and type: it's the equivalent of the size 
17225 \begin_inset Quotes eld
17226 \end_inset
17227
17228
17229 \family sans
17230 Largest
17231 \family default
17232
17233 \begin_inset Quotes erd
17234 \end_inset
17235
17236  in the 
17237 \family sans
17238 Sans
17239 \begin_inset space ~
17240 \end_inset
17241
17242 Serif
17243 \family default
17244  font.
17245  This is also what's used in the output.
17246  Think of this as a 
17247 \begin_inset Quotes eld
17248 \end_inset
17249
17250 visual cue
17251 \begin_inset Quotes erd
17252 \end_inset
17253
17254  to remind you that this is a slide.
17255  Your final slides will use a larger font; ergo, you'll have less space.
17256  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
17257 \end_layout
17258
17259 \begin_layout Standard
17260 The next thing that becomes obvious is the changes to the paragraph environment
17261  pull-down box [at the far-left end of the toolbar].
17262  Most of the paragraph environments you're used to seeing are missing.
17263  There are also five new ones.
17264  That's because the 
17265 \family sans
17266 slides
17267 \family default
17268  class itself only supports certain paragraph environments:
17269 \end_layout
17270
17271 \begin_layout Itemize
17272
17273 \family sans
17274 Standard
17275 \end_layout
17276
17277 \begin_layout Itemize
17278
17279 \family sans
17280 Itemize
17281 \end_layout
17282
17283 \begin_layout Itemize
17284
17285 \family sans
17286 Enumerate
17287 \end_layout
17288
17289 \begin_layout Itemize
17290
17291 \family sans
17292 Description
17293 \end_layout
17294
17295 \begin_layout Itemize
17296
17297 \family sans
17298 List
17299 \end_layout
17300
17301 \begin_layout Itemize
17302
17303 \family sans
17304 Quotation
17305 \end_layout
17306
17307 \begin_layout Itemize
17308
17309 \family sans
17310 Quote
17311 \end_layout
17312
17313 \begin_layout Itemize
17314
17315 \family sans
17316 Verse
17317 \end_layout
17318
17319 \begin_layout Itemize
17320
17321 \family sans
17322 Caption
17323 \end_layout
17324
17325 \begin_layout Itemize
17326
17327 \family sans
17328 \SpecialChar LyX
17329 -Code
17330 \end_layout
17331
17332 \begin_layout Itemize
17333
17334 \family sans
17335 Comment
17336 \end_layout
17337
17338 \begin_layout Standard
17339 All of the other standard environments, including the section-heading environmen
17340 ts, aren't used in the 
17341 \family sans
17342 slides
17343 \family default
17344  class.
17345 \end_layout
17346
17347 \begin_layout Standard
17348 On the other hand, you'll notice the following new environments:
17349 \end_layout
17350
17351 \begin_layout Itemize
17352
17353 \family sans
17354 Slide
17355 \end_layout
17356
17357 \begin_layout Itemize
17358
17359 \family sans
17360 Overlay
17361 \end_layout
17362
17363 \begin_layout Itemize
17364
17365 \family sans
17366 Note
17367 \end_layout
17368
17369 \begin_layout Itemize
17370
17371 \family sans
17372 InvisibleText
17373 \end_layout
17374
17375 \begin_layout Itemize
17376
17377 \family sans
17378 VisibleText
17379 \end_layout
17380
17381 \begin_layout Standard
17382 These five are kind of quirky, due to a 
17383 \begin_inset Quotes eld
17384 \end_inset
17385
17386 feature
17387 \begin_inset Quotes erd
17388 \end_inset
17389
17390  in \SpecialChar LyX
17391 .
17392  You see, \SpecialChar LyX
17393  doesn't permit you to nest any other paragraph environment into
17394  an empty environment.
17395  Now, that's fine and dandy, but it means that you wouldn't be able to start
17396  a slide with anything except plain text.
17397  To deal with this, I've performed a little 
17398 \begin_inset Quotes eld
17399 \end_inset
17400
17401 \SpecialChar LaTeX
17402  magic.
17403 \begin_inset Quotes erd
17404 \end_inset
17405
17406  
17407 \end_layout
17408
17409 \begin_layout Subsubsection
17410 Quirks of the New Environments
17411 \begin_inset CommandInset label
17412 LatexCommand label
17413 name "sec:slideQuirk"
17414
17415 \end_inset
17416
17417
17418 \end_layout
17419
17420 \begin_layout Standard
17421 All five of the new paragraph environments are somewhat quirky due to inherent
17422  limitiations in the current version of \SpecialChar LyX
17423 .
17424  As I just mentioned, \SpecialChar LyX
17425  forbids environments that begin with another environment.
17426  To get around this, the 
17427 \family sans
17428 Slide
17429 \family default
17430  environment isn't a paragraph environment as described in the 
17431 \emph on
17432 User's Guide
17433 \emph default
17434 .
17435  
17436 \end_layout
17437
17438 \begin_layout Standard
17439 You should consider 
17440 \family sans
17441 Slide
17442 \family default
17443
17444 \family sans
17445 Overlay
17446 \family default
17447 , and 
17448 \family sans
17449 Note
17450 \family default
17451  to be 
17452 \begin_inset Quotes eld
17453 \end_inset
17454
17455 pseudo-environments.
17456 \begin_inset Quotes erd
17457 \end_inset
17458
17459  They look like a section heading or a 
17460 \begin_inset Quotes eld
17461 \end_inset
17462
17463
17464 \family sans
17465 Caption
17466 \family default
17467 ,
17468 \begin_inset Quotes erd
17469 \end_inset
17470
17471  but really begin a [and, if necessary, end the previous] paragraph environment.
17472  Likewise, treat 
17473 \family sans
17474 InvisibleText
17475 \family default
17476  and 
17477 \family sans
17478 VisibleText
17479 \family default
17480  as 
17481 \begin_inset Quotes eld
17482 \end_inset
17483
17484 pseudo-commands.
17485 \begin_inset Quotes erd
17486 \end_inset
17487
17488  These two perform some action.
17489 \end_layout
17490
17491 \begin_layout Standard
17492 A common feature of all five environments, 
17493 \family sans
17494 Slide
17495 \family default
17496
17497 \family sans
17498 Overlay
17499 \family default
17500
17501 \family sans
17502 Note
17503 \family default
17504
17505 \family sans
17506 InvisibleText
17507 \family default
17508  and 
17509 \family sans
17510 VisibleText
17511 \family default
17512 , is a rather long-ish label.
17513  The text following this label — ordinarily the contents of the paragraph
17514  environment — is utterly irrelevant for 
17515 \family sans
17516 Slide
17517 \family default
17518
17519 \family sans
17520 Overlay
17521 \family default
17522
17523 \family sans
17524 Note
17525 \family default
17526
17527 \family sans
17528 InvisibleText
17529 \family default
17530  and 
17531 \family sans
17532 VisibleText
17533 \family default
17534 .
17535  \SpecialChar LyX
17536  completely ignores it.
17537  In fact, you can leave these five environments completely empty.
17538  
17539 \end_layout
17540
17541 \begin_layout Standard
17542 While you don't 
17543 \emph on
17544 have
17545 \emph default
17546  to put any text after the rather long-ish label, you might want to.
17547  This could be a short description of the contents of the 
17548 \family sans
17549 Slide
17550 \family default
17551 , for example.
17552  In that case, enter your descriptive comment and hit 
17553 \family sans
17554 Return
17555 \family default
17556  as you normally would.
17557 \end_layout
17558
17559 \begin_layout Standard
17560 If, on the other hand, you don't want to enter any descriptive text, you'll
17561  hit another \SpecialChar LyX
17562  quirk.
17563  \SpecialChar LyX
17564 , like nature, abhors a vacuum, and will not let you start a new paragraph
17565  environment until you put something in the old one.
17566  So, do this:
17567 \end_layout
17568
17569 \begin_layout Itemize
17570 Start entering the text that will 
17571 \emph on
17572 follow
17573 \emph default
17574  the new 
17575 \family sans
17576 Slide
17577 \family default
17578
17579 \family sans
17580 Overlay
17581 \family default
17582
17583 \family sans
17584 Note
17585 \family default
17586
17587 \family sans
17588 InvisibleText
17589 \family default
17590  or 
17591 \family sans
17592 VisibleText
17593 \family default
17594 .
17595  
17596 \end_layout
17597
17598 \begin_layout Itemize
17599 Now move to the beginning of that paragraph.
17600  
17601 \end_layout
17602
17603 \begin_layout Itemize
17604 Next, hit 
17605 \family sans
17606 Return
17607 \family default
17608 .
17609  
17610 \end_layout
17611
17612 \begin_layout Itemize
17613 Finally, change this new, empty paragraph to a 
17614 \family sans
17615 Slide
17616 \family default
17617
17618 \family sans
17619 Overlay
17620 \family default
17621
17622 \family sans
17623 Note
17624 \family default
17625
17626 \family sans
17627 InvisibleText
17628 \family default
17629  or 
17630 \family sans
17631 VisibleText
17632 \family default
17633 .
17634  
17635 \end_layout
17636
17637 \begin_layout Standard
17638 Some future version of \SpecialChar LyX
17639  will, hopefully, resolve this quirkiness\SpecialChar ldots
17640
17641 \end_layout
17642
17643 \begin_layout Subsection
17644 Making a Presentation with 
17645 \family sans
17646 Slide
17647 \family default
17648
17649 \family sans
17650 Overlay
17651 \family default
17652  and 
17653 \family sans
17654 Note
17655 \end_layout
17656
17657 \begin_layout Subsubsection
17658 Using the 
17659 \family sans
17660 Slide
17661 \family default
17662  Environment
17663 \end_layout
17664
17665 \begin_layout Standard
17666 If you're expecting this section to teach you how to actually make a presentatio
17667 n, you'll be sorely disappointed.
17668  Naturally, I'll describe all of the ways the 
17669 \family sans
17670 slides
17671 \family default
17672  class can assist you in preparing the materials for a presentation.
17673  Filling in the contents, however, is up to you.
17674  [Then again, that 
17675 \emph on
17676 is
17677 \emph default
17678  the \SpecialChar LyX
17679  philosophy.]
17680 \end_layout
17681
17682 \begin_layout Standard
17683 Choosing the 
17684 \family sans
17685 Slide
17686 \family default
17687  environment [in the manner described in section
17688 \begin_inset space ~
17689 \end_inset
17690
17691
17692 \begin_inset CommandInset ref
17693 LatexCommand ref
17694 reference "sec:slideQuirk"
17695
17696 \end_inset
17697
17698 ] tells \SpecialChar LyX
17699  to begin a new slide [duh].
17700  The label for this environment/
17701 \begin_inset Quotes erd
17702 \end_inset
17703
17704 pseudo-command
17705 \begin_inset Quotes erd
17706 \end_inset
17707
17708  is an 
17709 \begin_inset Quotes eld
17710 \end_inset
17711
17712 ASCII line,
17713 \begin_inset Quotes erd
17714 \end_inset
17715
17716  in cool blue, followed by the label, 
17717 \begin_inset Quotes eld
17718 \end_inset
17719
17720 NewSlide:
17721 \begin_inset Quotes erd
17722 \end_inset
17723
17724 .
17725  Any text or paragraph environments that follow this one go on the new slide.
17726  It's that simple.
17727 \end_layout
17728
17729 \begin_layout Standard
17730 Slides are probably the only time you'll need to forcibly end pages in \SpecialChar LyX
17731
17732  (this can be specified in the 
17733 \family sans
17734 Paragraph Layout
17735 \family default
17736  dialog).
17737  In fact, you'll want to, once you finish entering the contents of one slide.
17738  If you've entered more text than can physically fit on a slide, the extra
17739  overflows onto a new slide.
17740  I don't recommend doing this, however, since the overflow slide won't have
17741  any page number on it.
17742  Furthermore, it may interfere with any 
17743 \family sans
17744 Overlay
17745 \family default
17746  you've made to accompany the oversized 
17747 \family sans
17748 Slide
17749 \family default
17750 .
17751 \end_layout
17752
17753 \begin_layout Standard
17754 The 
17755 \family sans
17756 Overlay
17757 \family default
17758  and 
17759 \family sans
17760 Note
17761 \family default
17762  environments work the same way as the 
17763 \family sans
17764 Slide
17765 \family default
17766  environment.
17767  They both create an 
17768 \begin_inset Quotes eld
17769 \end_inset
17770
17771 ASCII line
17772 \begin_inset Quotes erd
17773 \end_inset
17774
17775  followed by a label [
17776 \begin_inset Quotes eld
17777 \end_inset
17778
17779 NewOverlay:
17780 \begin_inset Quotes erd
17781 \end_inset
17782
17783  and 
17784 \begin_inset Quotes eld
17785 \end_inset
17786
17787 NewNote:
17788 \begin_inset Quotes erd
17789 \end_inset
17790
17791 , respectively].
17792  The color is a stunning magenta instead of blue, and the 
17793 \begin_inset Quotes eld
17794 \end_inset
17795
17796 ASCII line
17797 \begin_inset Quotes erd
17798 \end_inset
17799
17800  will look different, in style and in length.
17801  The label fonts of all three also differ from one another.
17802 \end_layout
17803
17804 \begin_layout Standard
17805 As with a 
17806 \family sans
17807 Slide
17808 \family default
17809 , if the contents of a 
17810 \family sans
17811 Note
17812 \family default
17813  or 
17814 \family sans
17815 Overlay
17816 \family default
17817  exceed the physical size of a slide or sheet of paper, the extra will overflow
17818  onto a new sheet.
17819  Again, you should avoid this.
17820  It defeats the whole purpose of 
17821 \family sans
17822 Note
17823 \family default
17824 s and 
17825 \family sans
17826 Overlay
17827 \family default
17828 s.
17829 \end_layout
17830
17831 \begin_layout Subsubsection
17832 Using 
17833 \family sans
17834 Overlay
17835 \family default
17836  with 
17837 \family sans
17838 Slide
17839 \end_layout
17840
17841 \begin_layout Standard
17842 The idea behind an 
17843 \family sans
17844 Overlay
17845 \family default
17846  is a slide that sits atop another slide.
17847  Perhaps you wish to discuss a figure on the main 
17848 \family sans
17849 Slide
17850 \family default
17851  before displaying the text associated with it.
17852  One way to accomplish this is tape a flap of dark paper over the part of
17853  the 
17854 \family sans
17855 Slide
17856 \family default
17857  you want to display later.
17858  This method fails, however, if you wish to overlap one graph with another,
17859  for example.
17860  You would then have to fumble while speaking to align the two separate,
17861  overlapping 
17862 \family sans
17863 Slide
17864 \family default
17865 s to align the two graphs.
17866  The use of an 
17867 \family sans
17868 Overlay
17869 \family default
17870  environment in both cases makes life much easier.
17871 \end_layout
17872
17873 \begin_layout Standard
17874 Each 
17875 \family sans
17876 Overlay
17877 \family default
17878  receives the page number of its 
17879 \begin_inset Quotes eld
17880 \end_inset
17881
17882 parent
17883 \begin_inset Quotes erd
17884 \end_inset
17885
17886  
17887 \family sans
17888 Slide
17889 \family default
17890 , appended by 
17891 \begin_inset Quotes eld
17892 \end_inset
17893
17894
17895 \family typewriter
17896 -a
17897 \family default
17898
17899 \begin_inset Quotes erd
17900 \end_inset
17901
17902 .
17903 \begin_inset Foot
17904 status collapsed
17905
17906 \begin_layout Plain Layout
17907 Presumably, mutliple 
17908 \family sans
17909 Overlay
17910 \family default
17911 s would have 
17912 \begin_inset Quotes eld
17913 \end_inset
17914
17915
17916 \family typewriter
17917 -a
17918 \family default
17919
17920 \begin_inset Quotes erd
17921 \end_inset
17922
17923
17924 \begin_inset Quotes eld
17925 \end_inset
17926
17927
17928 \family typewriter
17929 -b
17930 \family default
17931
17932 \begin_inset Quotes erd
17933 \end_inset
17934
17935
17936 \begin_inset Quotes eld
17937 \end_inset
17938
17939
17940 \family typewriter
17941 -c
17942 \family default
17943
17944 \begin_inset Quotes erd
17945 \end_inset
17946
17947 , etc.
17948 \begin_inset space ~
17949 \end_inset
17950
17951 appended to the page number of the parent 
17952 \family sans
17953 Slide
17954 \family default
17955 .
17956  
17957 \end_layout
17958
17959 \end_inset
17960
17961  Clearly, you want the contents of both the 
17962 \family sans
17963 Slide
17964 \family default
17965  and the 
17966 \family sans
17967 Overlay
17968 \family default
17969  to each fit on a single physical slide! You should probably consider an
17970  
17971 \family sans
17972 Overlay
17973 \family default
17974  as 
17975 \begin_inset Quotes eld
17976 \end_inset
17977
17978 part of
17979 \begin_inset Quotes erd
17980 \end_inset
17981
17982  a 
17983 \family sans
17984 Slide
17985 \family default
17986 .
17987  Indeed, the \SpecialChar LyX
17988  
17989 \family sans
17990 slides
17991 \family default
17992  class provides a visual cue for this: the label at the start of an 
17993 \family sans
17994 Overlay
17995 \family default
17996  is shorter than that at the start of a 
17997 \family sans
17998 Slide
17999 \family default
18000 .
18001  Lastly, when you generate printable output, you'll find alignment markers
18002  in all four corners of both the 
18003 \family sans
18004 Overlay
18005 \family default
18006  page and its parent 
18007 \family sans
18008 Slide
18009 \family default
18010 .
18011  These will assist you in lining up the two physical slides.
18012 \end_layout
18013
18014 \begin_layout Standard
18015 The major problem in overlaying two slides is aligning the contents of the
18016  two transparencies.
18017  How much space should you leave for that graph on the second slide? Worse
18018  still, what if you want a graph and a sentence on second slide, but there
18019  is text on the main transparency that goes in between them? You could try
18020  and insert vertical space of the right size.
18021  The better way is to use 
18022 \family sans
18023 InvisibleText
18024 \family default
18025  and 
18026 \family sans
18027 VisibleText
18028 \family default
18029 .
18030 \end_layout
18031
18032 \begin_layout Standard
18033 As their names imply, 
18034 \family sans
18035 InvisibleText
18036 \family default
18037  and 
18038 \family sans
18039 VisibleText
18040 \family default
18041  are two command-like paragraph environments that make all subsequent text
18042  invisible and visible, respectively.
18043  Note from section
18044 \begin_inset space ~
18045 \end_inset
18046
18047
18048 \begin_inset CommandInset ref
18049 LatexCommand ref
18050 reference "sec:slideQuirk"
18051
18052 \end_inset
18053
18054  that you don't place anything 
18055 \emph on
18056 into
18057 \emph default
18058  these two environments, however.
18059  When you create an 
18060 \family sans
18061 InvisibleText
18062 \family default
18063 , it inserts a centered, sky-blue label into the page reading 
18064 \begin_inset Quotes eld
18065 \end_inset
18066
18067 <Invisible Text Follows>
18068 \begin_inset Quotes erd
18069 \end_inset
18070
18071 .
18072  For paragraphs following this label, the parts of the 
18073 \family sans
18074 Slide
18075 \family default
18076  [or 
18077 \family sans
18078 Overlay
18079 \family default
18080 ; it doesn't matter which] where they would be contain instead blank space.
18081  
18082 \end_layout
18083
18084 \begin_layout Standard
18085 For 
18086 \family sans
18087 VisibleText
18088 \family default
18089 , the corresponding centered label is 
18090 \begin_inset Quotes eld
18091 \end_inset
18092
18093 <Visible Text Follows>
18094 \begin_inset Quotes erd
18095 \end_inset
18096
18097  in blazing green.
18098  Paragraphs following this label behave normally.
18099  Note that the beginning of a new 
18100 \family sans
18101 Slide
18102 \family default
18103
18104 \family sans
18105 Overlay
18106 \family default
18107 , or 
18108 \family sans
18109 Note
18110 \family default
18111  automatically shuts off an 
18112 \family sans
18113 InvisibleText
18114 \family default
18115 .
18116  It's therefore not necessary to use 
18117 \family sans
18118 VisibleText
18119 \family default
18120  at the end of a 
18121 \family sans
18122 Slide
18123 \family default
18124 .
18125 \end_layout
18126
18127 \begin_layout Standard
18128 By now, it should be obvious how to create overlay transparencies using
18129  the proper combination of 
18130 \family sans
18131 InvisibleText
18132 \family default
18133  and 
18134 \family sans
18135 VisibleText
18136 \family default
18137  on a 
18138 \family sans
18139 Slide
18140 \family default
18141  and 
18142 \family sans
18143 Overlay
18144 \family default
18145 :
18146 \end_layout
18147
18148 \begin_layout Enumerate
18149 Create a 
18150 \family sans
18151 Slide
18152 \family default
18153 , including everything that will appear on it, whether on the main slide
18154  or on the 
18155 \family sans
18156 Overlay
18157 \family default
18158 .
18159 \end_layout
18160
18161 \begin_layout Enumerate
18162 Before each figure or paragraph that will appear only on the 
18163 \family sans
18164 Overlay
18165 \family default
18166 , insert an 
18167 \family sans
18168 InvisibleText
18169 \family default
18170  environment.
18171  If necessary, insert a 
18172 \family sans
18173 VisibleText
18174 \family default
18175  environment after the 
18176 \family sans
18177 Overlay
18178 \family default
18179 -only text.
18180 \end_layout
18181
18182 \begin_layout Enumerate
18183 Start an 
18184 \family sans
18185 Overlay
18186 \family default
18187  immediately following the 
18188 \family sans
18189 Slide
18190 \family default
18191 .
18192 \end_layout
18193
18194 \begin_layout Enumerate
18195 Copy the contents of this 
18196 \family sans
18197 Slide
18198 \family default
18199  into the 
18200 \family sans
18201 Overlay
18202 \family default
18203 .
18204 \end_layout
18205
18206 \begin_layout Enumerate
18207 Within the 
18208 \family sans
18209 Overlay
18210 \family default
18211 , change all of the 
18212 \family sans
18213 InvisibleText
18214 \family default
18215  lines to 
18216 \family sans
18217 VisibleText
18218 \family default
18219  and vice-versa.
18220 \end_layout
18221
18222 \begin_layout Standard
18223 That's it.
18224  You've just made an 
18225 \family sans
18226 Overlay
18227 \family default
18228 .
18229 \end_layout
18230
18231 \begin_layout Standard
18232 There's one problem with the way I've designed the \SpecialChar LyX
18233  
18234 \family sans
18235 slides
18236 \family default
18237  class: you can't make text in the middle of a paragraph invisible, nor
18238  make text in the middle of an invisible paragraph visible again.
18239  To accomplish this feat, you'll need to use some inlined \SpecialChar LaTeX
18240  codes.
18241 \begin_inset Foot
18242 status collapsed
18243
18244 \begin_layout Plain Layout
18245 The commands of interest are: 
18246 \end_layout
18247
18248 \begin_layout Itemize
18249
18250 \family typewriter
18251 {
18252 \backslash
18253 invisible \SpecialChar ldots
18254  }
18255 \end_layout
18256
18257 \begin_layout Itemize
18258
18259 \family typewriter
18260 {
18261 \backslash
18262 visible \SpecialChar ldots
18263  }
18264 \end_layout
18265
18266 \begin_layout Plain Layout
18267 \SpecialChar ldots
18268 and need to be marked as \SpecialChar TeX
18269 .
18270  The text whose 
18271 \begin_inset Quotes eld
18272 \end_inset
18273
18274 visibility
18275 \begin_inset Quotes erd
18276 \end_inset
18277
18278  you wish to change goes in between the brackets [and after the 
18279 \family typewriter
18280
18281 \backslash
18282 invisible
18283 \family default
18284  or 
18285 \family typewriter
18286
18287 \backslash
18288 visible
18289 \family default
18290  command].
18291  If you don't know how to mark text as \SpecialChar TeX
18292 , see the appropriate section of
18293  the 
18294 \emph on
18295 User's Guide
18296 \emph default
18297 .
18298 \end_layout
18299
18300 \end_inset
18301
18302
18303 \end_layout
18304
18305 \begin_layout Subsubsection
18306 Using 
18307 \family sans
18308 Note
18309 \family default
18310  with 
18311 \family sans
18312 Slide
18313 \family default
18314
18315 \begin_inset CommandInset label
18316 LatexCommand label
18317 name "sec:slideNote"
18318
18319 \end_inset
18320
18321
18322 \end_layout
18323
18324 \begin_layout Standard
18325 Like an 
18326 \family sans
18327 Overlay
18328 \family default
18329 , a 
18330 \family sans
18331 Note
18332 \family default
18333  is associated with a 
18334 \begin_inset Quotes eld
18335 \end_inset
18336
18337 parent
18338 \begin_inset Quotes erd
18339 \end_inset
18340
18341  
18342 \family sans
18343 Slide
18344 \family default
18345 .
18346  Here, too, the \SpecialChar LyX
18347  
18348 \family sans
18349 slides
18350 \family default
18351  class provides visual cues.
18352  The label for a 
18353 \family sans
18354 Note
18355 \family default
18356  is shorter than that of a 
18357 \family sans
18358 Slide
18359 \family default
18360  [yet longer than that of an 
18361 \family sans
18362 Overlay
18363 \family default
18364 ] and, like the label of an 
18365 \family sans
18366 Overlay
18367 \family default
18368  is shockingly magenta.
18369  Additionally, the printed 
18370 \family sans
18371 Note
18372 \family default
18373  has the page number of its 
18374 \begin_inset Quotes eld
18375 \end_inset
18376
18377 parent
18378 \begin_inset Quotes erd
18379 \end_inset
18380
18381  
18382 \family sans
18383 Slide
18384 \family default
18385 , appended by 
18386 \begin_inset Quotes eld
18387 \end_inset
18388
18389
18390 \family typewriter
18391 -
18392 \family default
18393 1
18394 \begin_inset Quotes erd
18395 \end_inset
18396
18397
18398 \begin_inset Quotes eld
18399 \end_inset
18400
18401
18402 \family typewriter
18403 -
18404 \family default
18405 2
18406 \begin_inset Quotes erd
18407 \end_inset
18408
18409
18410 \begin_inset Quotes eld
18411 \end_inset
18412
18413
18414 \family typewriter
18415 -
18416 \family default
18417 3
18418 \begin_inset Quotes erd
18419 \end_inset
18420
18421 , etc.
18422  You can have multiple 
18423 \family sans
18424 Note
18425 \family default
18426 s associated with a single 
18427 \family sans
18428 Slide
18429 \family default
18430 , and, as with 
18431 \family sans
18432 Slide
18433 \family default
18434  and 
18435 \family sans
18436 Overlay
18437 \family default
18438 , you'll probably want to break up long 
18439 \family sans
18440 Note
18441 \family default
18442 s so that they fit on a single sheet of paper.
18443 \end_layout
18444
18445 \begin_layout Standard
18446 The purpose of a 
18447 \family sans
18448 Note
18449 \family default
18450  is obvious: it contains anything additional you might want to say about
18451  a 
18452 \family sans
18453 Slide
18454 \family default
18455 .
18456  It could also be used as a sheet of reminders for a particular 
18457 \family sans
18458 Slide
18459 \family default
18460 .
18461  In the case of the latter, you might want to make use of time markers.
18462  Currently, the \SpecialChar LyX
18463  
18464 \family sans
18465 slides
18466 \family default
18467  class has no 
18468 \begin_inset Quotes eld
18469 \end_inset
18470
18471 native
18472 \begin_inset Quotes erd
18473 \end_inset
18474
18475  support for time markers, a 
18476 \noun on
18477 Sli\SpecialChar TeX
18478
18479 \noun default
18480  feature.
18481  So, you'll have to resort to using the \SpecialChar LaTeX
18482  codes.
18483 \end_layout
18484
18485 \begin_layout Standard
18486 To use time markers, you'll need to specify the extra class option 
18487 \begin_inset Quotes eld
18488 \end_inset
18489
18490
18491 \family typewriter
18492 clock
18493 \family default
18494
18495 \begin_inset Quotes erd
18496 \end_inset
18497
18498  [see section
18499 \begin_inset space ~
18500 \end_inset
18501
18502
18503 \begin_inset CommandInset ref
18504 LatexCommand ref
18505 reference "sec:slidesetup"
18506
18507 \end_inset
18508
18509 ].
18510  This option turns on timing marks, which will appear in the lower-left-hand
18511  corner of every 
18512 \family sans
18513 Note
18514 \family default
18515  you generate.
18516  To set what appears in the time marker, you use the \SpecialChar LaTeX
18517  commands 
18518 \begin_inset Quotes eld
18519 \end_inset
18520
18521
18522 \family typewriter
18523
18524 \backslash
18525 settime{}
18526 \family default
18527
18528 \begin_inset Quotes erd
18529 \end_inset
18530
18531  and 
18532 \begin_inset Quotes eld
18533 \end_inset
18534
18535
18536 \family typewriter
18537
18538 \backslash
18539 addtime{}
18540 \family default
18541
18542 \begin_inset Quotes erd
18543 \end_inset
18544
18545 .
18546  The arguments of both commands are time measured in seconds.
18547  
18548 \begin_inset Quotes eld
18549 \end_inset
18550
18551
18552 \family typewriter
18553
18554 \backslash
18555 settime{}
18556 \family default
18557
18558 \begin_inset Quotes erd
18559 \end_inset
18560
18561  sets the time marker to a given time.
18562  
18563 \begin_inset Quotes eld
18564 \end_inset
18565
18566
18567 \family typewriter
18568
18569 \backslash
18570 addtime{}
18571 \family default
18572
18573 \begin_inset Quotes erd
18574 \end_inset
18575
18576  increments the time marker by the specified amount.
18577  Using time markers and 
18578 \family sans
18579 Note
18580 \family default
18581 s in this fashion, you can remind yourself how much time to spend on a particula
18582
18583 \family sans
18584 Slide
18585 \family default
18586 .
18587 \end_layout
18588
18589 \begin_layout Standard
18590 There's one last feature to describe.
18591  Clearly, you'd like to print out all of your 
18592 \family sans
18593 Slide
18594 \family default
18595 s and 
18596 \family sans
18597 Overlay
18598 \family default
18599 s on transparencies while printing all of your 
18600 \family sans
18601 Note
18602 \family default
18603 s on plain paper.
18604  However, a 
18605 \family sans
18606 Note
18607 \family default
18608  
18609 \emph on
18610 must
18611 \emph default
18612  follow the 
18613 \family sans
18614 Slide
18615 \family default
18616  with which it is associated.
18617  What's a person to do?
18618 \end_layout
18619
18620 \begin_layout Standard
18621 Luckily, there are two \SpecialChar LaTeX
18622  commands that allow you to select what to print
18623  out.
18624  Both must be placed into the preamble of your document.
18625  The command 
18626 \begin_inset Quotes eld
18627 \end_inset
18628
18629
18630 \family typewriter
18631
18632 \backslash
18633 onlyslides{
18634 \backslash
18635 slides}
18636 \family default
18637
18638 \begin_inset Quotes erd
18639 \end_inset
18640
18641  will cause the output to contain only the 
18642 \family sans
18643 Slide
18644 \family default
18645 s and 
18646 \family sans
18647 Overlay
18648 \family default
18649 s.
18650  Correspondingly, the command 
18651 \begin_inset Quotes eld
18652 \end_inset
18653
18654
18655 \family typewriter
18656
18657 \backslash
18658 onlynotes{
18659 \backslash
18660 notes}
18661 \family default
18662
18663 \begin_inset Quotes erd
18664 \end_inset
18665
18666  prevents the output of anything but 
18667 \family sans
18668 Note
18669 \family default
18670 s.
18671  I'd advise placing both commands in the preamble and initially comment
18672  both out.
18673  You can then preview your entire presentation as you write.
18674  When you're done writing, you can then uncomment one of the two to select
18675  what you want to print.
18676  I like to uncomment 
18677 \begin_inset Quotes eld
18678 \end_inset
18679
18680
18681 \family typewriter
18682
18683 \backslash
18684 onlyslides{
18685 \backslash
18686 slides}
18687 \family default
18688
18689 \begin_inset Quotes erd
18690 \end_inset
18691
18692  , print to a file with 
18693 \begin_inset Quotes eld
18694 \end_inset
18695
18696
18697 \family typewriter
18698 -slides
18699 \family default
18700
18701 \begin_inset Quotes erd
18702 \end_inset
18703
18704  in its name, comment it back out, then uncomment 
18705 \begin_inset Quotes eld
18706 \end_inset
18707
18708
18709 \family typewriter
18710
18711 \backslash
18712 onlynotes{
18713 \backslash
18714 notes}
18715 \family default
18716
18717 \begin_inset Quotes erd
18718 \end_inset
18719
18720  and print to a 
18721 \begin_inset Quotes eld
18722 \end_inset
18723
18724
18725 \family typewriter
18726 *-notes.ps
18727 \family default
18728
18729 \begin_inset Quotes erd
18730 \end_inset
18731
18732  file.
18733  I can then send either file to a printer, loading transparencies or plain
18734  paper as appropriate.
18735 \end_layout
18736
18737 \begin_layout Standard
18738 You can also provide other arguments to the 
18739 \begin_inset Quotes eld
18740 \end_inset
18741
18742
18743 \family typewriter
18744
18745 \backslash
18746 onlyslides{}
18747 \family default
18748
18749 \begin_inset Quotes erd
18750 \end_inset
18751
18752  and 
18753 \begin_inset Quotes eld
18754 \end_inset
18755
18756
18757 \family typewriter
18758
18759 \backslash
18760 onlynotes{}
18761 \family default
18762
18763 \begin_inset Quotes erd
18764 \end_inset
18765
18766  commands.
18767  See a good \SpecialChar LaTeX
18768  book for details.
18769 \end_layout
18770
18771 \begin_layout Subsection
18772 The 
18773 \family sans
18774 slides
18775 \family default
18776  Class Template File
18777 \end_layout
18778
18779 \begin_layout Standard
18780 I have also provided a template file, 
18781 \begin_inset Quotes eld
18782 \end_inset
18783
18784
18785 \family typewriter
18786 slides.lyx
18787 \family default
18788
18789 \begin_inset Quotes erd
18790 \end_inset
18791
18792 , with the 
18793 \family sans
18794 slides
18795 \family default
18796  class.
18797  To use it, begin your new presentation with 
18798 \family sans
18799 File\SpecialChar menuseparator
18800 New
18801 \begin_inset space ~
18802 \end_inset
18803
18804 from
18805 \begin_inset space ~
18806 \end_inset
18807
18808 Template
18809 \family default
18810 .
18811  Your new \SpecialChar LyX
18812  presentation file will contain an example 
18813 \family sans
18814 Slide
18815 \family default
18816  – 
18817 \family sans
18818 Overlay
18819 \family default
18820  – 
18821 \family sans
18822 Note
18823 \family default
18824  triplet.
18825  The 
18826 \family sans
18827 Slide
18828 \family default
18829  and 
18830 \family sans
18831 Overlay
18832 \family default
18833  additionally contain an example of the use of 
18834 \family sans
18835 InvisibleText
18836 \family default
18837  and 
18838 \family sans
18839 VisibleText
18840 \family default
18841 .
18842  Lastly, the preamble will contain:
18843 \end_layout
18844
18845 \begin_layout LyX-Code
18846 % Uncomment to print out only slides and overlays
18847 \end_layout
18848
18849 \begin_layout LyX-Code
18850 %
18851 \end_layout
18852
18853 \begin_layout LyX-Code
18854 %
18855 \backslash
18856 onlyslides{
18857 \backslash
18858 slides}
18859 \begin_inset Newline newline
18860 \end_inset
18861
18862  
18863 \end_layout
18864
18865 \begin_layout LyX-Code
18866 % Uncomment to print out only notes
18867 \end_layout
18868
18869 \begin_layout LyX-Code
18870 %
18871 \end_layout
18872
18873 \begin_layout LyX-Code
18874 %
18875 \backslash
18876 onlynotes{
18877 \backslash
18878 notes}
18879 \end_layout
18880
18881 \begin_layout Standard
18882 One final thing: I created this class to support the \SpecialChar LaTeX2e
18883  
18884 \begin_inset Quotes eld
18885 \end_inset
18886
18887
18888 \noun on
18889 Sli\SpecialChar TeX
18890
18891 \noun default
18892  emulation
18893 \begin_inset Quotes erd
18894 \end_inset
18895
18896  class, one of the built-in \SpecialChar LaTeX2e
18897  classes.
18898  Neither I nor the rest of the \SpecialChar LyX
18899  Team endorse or oppose the use of this built-in
18900  slide class.
18901  It's here if you want it or need it.
18902  There exist other \SpecialChar LaTeX2e
18903  classes for creating presentations, such as the 
18904 \family sans
18905 Foils
18906 \family default
18907  class [see section
18908 \begin_inset space ~
18909 \end_inset
18910
18911
18912 \begin_inset CommandInset ref
18913 LatexCommand ref
18914 reference "sec:foiltex"
18915
18916 \end_inset
18917
18918 ] or the 
18919 \begin_inset Quotes eld
18920 \end_inset
18921
18922
18923 \family typewriter
18924 seminar
18925 \family default
18926
18927 \begin_inset Quotes erd
18928 \end_inset
18929
18930  package [present on some \SpecialChar TeX
18931  distributions].
18932  The latter is not yet supported under \SpecialChar LyX
18933 .
18934 \begin_inset Foot
18935 status collapsed
18936
18937 \begin_layout Plain Layout
18938 Perhaps you can take on the task\SpecialChar ldots
18939
18940 \end_layout
18941
18942 \end_inset
18943
18944  I know nothing about these other classes.
18945  Try them out to see what sort of alternative they provide.
18946 \end_layout
18947
18948 \begin_layout Chapter
18949 \SpecialChar LyX
18950  Features needing Extra Software
18951 \end_layout
18952
18953 \begin_layout Section
18954 Checking \SpecialChar TeX
18955
18956 \end_layout
18957
18958 \begin_layout Standard
18959 by 
18960 \noun on
18961 Asger Alstrup
18962 \end_layout
18963
18964 \begin_layout Subsection
18965 Introduction
18966 \end_layout
18967
18968 \begin_layout Standard
18969 If you have the 
18970 \family typewriter
18971 chktex
18972 \family default
18973  program installed
18974 \begin_inset Foot
18975 status collapsed
18976
18977 \begin_layout Plain Layout
18978
18979 \family typewriter
18980 chktex
18981 \family default
18982  is not yet available when you are using the \SpecialChar LaTeX
18983  distribution MiK\SpecialChar TeX
18984 .
18985 \end_layout
18986
18987 \end_inset
18988
18989 , you'll find in the 
18990 \family sans
18991 Tools
18992 \family default
18993  menu the entry: 
18994 \family sans
18995 Check
18996 \begin_inset space ~
18997 \end_inset
18998
18999 TeX
19000 \family default
19001 .
19002  You can get 
19003 \family typewriter
19004 chktex
19005 \family default
19006  from CTAN,
19007 \begin_inset Newline newline
19008 \end_inset
19009
19010
19011 \begin_inset CommandInset href
19012 LatexCommand href
19013 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
19014 literal "false"
19015
19016 \end_inset
19017
19018 .
19019 \end_layout
19020
19021 \begin_layout Standard
19022 The 
19023 \family sans
19024 Chk\SpecialChar TeX
19025
19026 \family default
19027  package is a program that was written by 
19028 \begin_inset Flex Noun
19029 status collapsed
19030
19031 \begin_layout Plain Layout
19032 Jens T.
19033 \begin_inset space ~
19034 \end_inset
19035
19036 Berger Thielemann
19037 \end_layout
19038
19039 \end_inset
19040
19041  in frustration because some constructs in \SpecialChar LaTeX
19042  are sometimes non-intuitive,
19043  and easy to forget.
19044  The program runs over your \SpecialChar LaTeX
19045  file, checks the integrity of the file, and
19046  flags some common errors.
19047  In other technical words, it is 
19048 \family typewriter
19049 lint
19050 \family default
19051  for \SpecialChar LaTeX
19052 .
19053 \end_layout
19054
19055 \begin_layout Standard
19056 Well, what is a syntax checker doing in \SpecialChar LyX
19057  which is supposed to produce correct
19058  \SpecialChar LaTeX
19059  anyways? The answer is simple: Just as 
19060 \family typewriter
19061 Lint
19062 \family default
19063  not only checks the 
19064 \emph on
19065 syntax
19066 \emph default
19067  of C programs, but also does 
19068 \emph on
19069 semantic
19070 \emph default
19071  checks for type-errors, 
19072 \family sans
19073 Chk\SpecialChar TeX
19074
19075 \family default
19076  catches some common 
19077 \emph on
19078 typographic
19079 \emph default
19080  errors, in addition to the syntactical ones.
19081  Specifically, 
19082 \family sans
19083 Chk\SpecialChar TeX
19084
19085 \family default
19086  is capable of detecting several common errors, such as
19087 \end_layout
19088
19089 \begin_layout Itemize
19090 Ellipsis detection:
19091 \begin_inset Newline newline
19092 \end_inset
19093
19094 Use \SpecialChar ldots
19095  instead of ...
19096 \end_layout
19097
19098 \begin_layout Itemize
19099 No space in front of/after parenthesis:
19100 \begin_inset Newline newline
19101 \end_inset
19102
19103 ( wrong spacing )
19104 \end_layout
19105
19106 \begin_layout Itemize
19107 Enforcement of normal space after common abbreviations:
19108 \begin_inset Newline newline
19109 \end_inset
19110
19111 e.
19112 \begin_inset space \thinspace{}
19113 \end_inset
19114
19115 g.
19116 \begin_inset space \space{}
19117 \end_inset
19118
19119 is too wide spacing.
19120 \end_layout
19121
19122 \begin_layout Itemize
19123 Enforcement of end-of-sentence space when the last sentence ends with a
19124  capital letter:
19125 \begin_inset Newline newline
19126 \end_inset
19127
19128 This is a TEST.
19129  And this is wrong spacing.
19130 \end_layout
19131
19132 \begin_layout Itemize
19133 Space in front of labels and similar commands:
19134 \begin_inset Newline newline
19135 \end_inset
19136
19137 The label should stick right up to the text to avoid falling to a wrong
19138  page.
19139  
19140 \begin_inset CommandInset label
19141 LatexCommand label
19142 name "sec:chktex"
19143
19144 \end_inset
19145
19146  
19147 \begin_inset Foot
19148 status collapsed
19149
19150 \begin_layout Plain Layout
19151 This footnote is in danger of falling off to a wrong page
19152 \end_layout
19153
19154 \end_inset
19155
19156  The label is separated too much.
19157 \end_layout
19158
19159 \begin_layout Itemize
19160 Space in front of references, instead of hard spaces:
19161 \begin_inset Newline newline
19162 \end_inset
19163
19164 If you have bad luck, the text will break right between the referenced text
19165  and reference number, and that's a pity.
19166  See section 
19167 \begin_inset CommandInset ref
19168 LatexCommand ref
19169 reference "sec:chktex"
19170
19171 \end_inset
19172
19173 .
19174 \end_layout
19175
19176 \begin_layout Itemize
19177 Use of 
19178 \begin_inset Quotes eld
19179 \end_inset
19180
19181 x
19182 \begin_inset Quotes erd
19183 \end_inset
19184
19185  instead of 
19186 \begin_inset Formula $\times$
19187 \end_inset
19188
19189  between numbers:
19190 \begin_inset Newline newline
19191 \end_inset
19192
19193 2x2 looks cheap compared to 
19194 \begin_inset Formula $2\times2$
19195 \end_inset
19196
19197 .
19198 \end_layout
19199
19200 \begin_layout Standard
19201 and more \SpecialChar ldots
19202  It is an invaluable tool when you are 
19203 \begin_inset Quotes eld
19204 \end_inset
19205
19206 finishing up
19207 \begin_inset Quotes erd
19208 \end_inset
19209
19210  your document before printing, and you should run it right after the obligatory
19211  spelling check, and before you go fine tuning the typesetting.
19212 \end_layout
19213
19214 \begin_layout Subsection
19215 How to use it
19216 \end_layout
19217
19218 \begin_layout Standard
19219 If you have the program installed, usage is as simple as choosing 
19220 \family sans
19221 Tools\SpecialChar menuseparator
19222 Check
19223 \begin_inset space ~
19224 \end_inset
19225
19226 TeX
19227 \family default
19228 .
19229  This will make \SpecialChar LyX
19230  generate a \SpecialChar LaTeX
19231  file of your document, start 
19232 \family sans
19233 Chk\SpecialChar TeX
19234
19235 \family default
19236  to check it, and then make \SpecialChar LyX
19237  insert 
19238 \begin_inset Quotes eld
19239 \end_inset
19240
19241 error boxes
19242 \begin_inset Quotes erd
19243 \end_inset
19244
19245  with the warnings from 
19246 \family sans
19247 Chk\SpecialChar TeX
19248
19249 \family default
19250 , if there were any.
19251  The warnings will be placed close to the point of the mistake, and you
19252  can quickly find them by using the 
19253 \family sans
19254 Navigate\SpecialChar menuseparator
19255 Error
19256 \family default
19257  menu item, or the shortcut key 
19258 \family sans
19259 C-g
19260 \family default
19261  from the default 
19262 \family typewriter
19263 cua
19264 \family default
19265  bind file.
19266  Open the error boxes by clicking on them with the mouse, or use the shortcut
19267  key 
19268 \family sans
19269 C-i
19270 \family default
19271  from 
19272 \family typewriter
19273 cua
19274 \family default
19275  bindings, or the corresponding 
19276 \family sans
19277 C-o
19278 \family default
19279  for the alternate 
19280 \family typewriter
19281 emacs
19282 \family default
19283  bind file.
19284  Read the warning and correct the mistake, if it is a mistake.
19285  If you have trouble understanding what the warning is about, you can safely
19286  ignore it.
19287  Remember that there is a hidden layer between the document on screen and
19288  the technical details in invoking 
19289 \family sans
19290 Chk\SpecialChar TeX
19291
19292 \family default
19293 , and this gap can make some warnings seem arcane or just plain silly.
19294 \end_layout
19295
19296 \begin_layout Standard
19297 This document is an excellent testing bed for the feature, and it should
19298  provide quite a few warnings for you to fiddle with.
19299  Since computers are only so smart, expect most of the warnings to be false
19300  alarms, though.
19301 \end_layout
19302
19303 \begin_layout Subsection
19304 How to fine tune it
19305 \end_layout
19306
19307 \begin_layout Standard
19308 Sometimes, you'll find that 
19309 \family sans
19310 Chk\SpecialChar TeX
19311
19312 \family default
19313  makes more noise than suits your mood.
19314  Then you can choose not to use it, wait until your mood changes, or try
19315  to customize 
19316 \family sans
19317 Chk\SpecialChar TeX
19318
19319 \family default
19320  to get better along with you.
19321 \end_layout
19322
19323 \begin_layout Standard
19324 Although 
19325 \family sans
19326 Chk\SpecialChar TeX
19327
19328 \family default
19329  
19330 \emph on
19331 is
19332 \emph default
19333  very configurable and extensible, you should not expect to solve all problems
19334  with 
19335 \family sans
19336 Chk\SpecialChar TeX
19337
19338 \family default
19339  in \SpecialChar LyX
19340  this way.
19341  Since \SpecialChar LyX
19342  has to generate a somewhat special \SpecialChar LaTeX
19343  file to be able to match the
19344  line numbers from the 
19345 \family sans
19346 Chk\SpecialChar TeX
19347
19348 \family default
19349  output
19350 \begin_inset Foot
19351 status collapsed
19352
19353 \begin_layout Plain Layout
19354 You can inspect the specific output from 
19355 \family sans
19356 chktex
19357 \family default
19358  by using 
19359 \family sans
19360 Document\SpecialChar menuseparator
19361 \SpecialChar LaTeX
19362
19363 \begin_inset space ~
19364 \end_inset
19365
19366 Log
19367 \family default
19368  right after a 
19369 \family sans
19370 chktex
19371 \family default
19372  run.
19373 \end_layout
19374
19375 \end_inset
19376
19377  to the internal document structure, some of the warnings will not appear
19378  correctly.
19379  There are two things you can do about this:
19380 \end_layout
19381
19382 \begin_layout Itemize
19383 Fine tune the 
19384 \family sans
19385 Chk\SpecialChar TeX
19386
19387 \family default
19388  invocation command line in 
19389 \begin_inset Flex Noun
19390 status collapsed
19391
19392 \begin_layout Plain Layout
19393 Tools\SpecialChar menuseparator
19394 Preferences\SpecialChar menuseparator
19395 Output\SpecialChar menuseparator
19396 LaTeX\SpecialChar menuseparator
19397 CheckTeX command
19398 \end_layout
19399
19400 \end_inset
19401
19402 , or the global 
19403 \family sans
19404 Chk\SpecialChar TeX
19405
19406 \family default
19407  installation configuration file (usually with the file 
19408 \family typewriter
19409 chktexrc
19410 \family default
19411 ).
19412  See below to learn what warnings can be enabled and disabled on the command
19413  line.
19414 \end_layout
19415
19416 \begin_layout Itemize
19417 Export your document as a raw \SpecialChar LaTeX
19418  file using 
19419 \family sans
19420 File\SpecialChar menuseparator
19421 Export\SpecialChar menuseparator
19422 \SpecialChar LaTeX
19423
19424 \family default
19425  and run 
19426 \family typewriter
19427 chktex
19428 \family default
19429  manually on that.
19430  Invoked in this way, it can be a hassle to find the corresponding place
19431  in the document inside \SpecialChar LyX
19432 , but with a little patience, you should be able
19433  to do it.
19434 \end_layout
19435
19436 \begin_layout Standard
19437 Here follows the warning messages that can be enabled and disabled in 
19438 \family sans
19439 Preferences
19440 \family default
19441 .
19442  Use 
19443 \family typewriter
19444 -n#
19445 \family default
19446  to disable a warning, and 
19447 \family typewriter
19448 -w#
19449 \family default
19450  to enable a warning.
19451  The emphasized entries are disabled by default, because the default is
19452  "
19453 \family typewriter
19454 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
19455 \family default
19456 ".
19457 \end_layout
19458
19459 \begin_layout Standard
19460 Notice that you should only use the options that enable and disable warnings,
19461  because \SpecialChar LyX
19462  relies on some of the other command line parameters to be set
19463  in a specific way to have a chance to communicate with 
19464 \family typewriter
19465 chktex
19466 \family default
19467 .
19468 \end_layout
19469
19470 \begin_layout Enumerate
19471
19472 \size small
19473 \emph on
19474 Command terminated with space.
19475 \end_layout
19476
19477 \begin_layout Enumerate
19478
19479 \size small
19480 Non-breaking space (
19481 \begin_inset Quotes eld
19482 \end_inset
19483
19484
19485 \family typewriter
19486 ~
19487 \family default
19488
19489 \begin_inset Quotes erd
19490 \end_inset
19491
19492 ) should have been used.
19493 \end_layout
19494
19495 \begin_layout Enumerate
19496
19497 \size small
19498 \emph on
19499 You should enclose the previous parenthesis with 
19500 \begin_inset Quotes eld
19501 \end_inset
19502
19503
19504 \family typewriter
19505 {}
19506 \family default
19507
19508 \begin_inset Quotes erd
19509 \end_inset
19510
19511 .
19512 \end_layout
19513
19514 \begin_layout Enumerate
19515
19516 \size small
19517 Italic correction (
19518 \begin_inset Quotes eld
19519 \end_inset
19520
19521
19522 \family typewriter
19523
19524 \backslash
19525 /
19526 \family default
19527
19528 \begin_inset Quotes erd
19529 \end_inset
19530
19531 ) found in non-italic buffer.
19532 \end_layout
19533
19534 \begin_layout Enumerate
19535
19536 \size small
19537 Italic correction (
19538 \begin_inset Quotes eld
19539 \end_inset
19540
19541
19542 \family typewriter
19543
19544 \backslash
19545 /
19546 \family default
19547
19548 \begin_inset Quotes erd
19549 \end_inset
19550
19551 ) found more than once.
19552 \end_layout
19553
19554 \begin_layout Enumerate
19555
19556 \size small
19557 \emph on
19558 No italic correction (
19559 \begin_inset Quotes eld
19560 \end_inset
19561
19562
19563 \family typewriter
19564
19565 \backslash
19566 /
19567 \family default
19568
19569 \begin_inset Quotes erd
19570 \end_inset
19571
19572 ) found.
19573 \end_layout
19574
19575 \begin_layout Enumerate
19576
19577 \size small
19578 Accent command 
19579 \begin_inset Quotes eld
19580 \end_inset
19581
19582
19583 \family typewriter
19584 cmd
19585 \family default
19586
19587 \begin_inset Quotes erd
19588 \end_inset
19589
19590  needs use of 
19591 \begin_inset Quotes eld
19592 \end_inset
19593
19594
19595 \family typewriter
19596 cmd
19597 \family default
19598
19599 \begin_inset Quotes erd
19600 \end_inset
19601
19602 .
19603 \end_layout
19604
19605 \begin_layout Enumerate
19606
19607 \size small
19608 Wrong length of dash may have been used.
19609 \end_layout
19610
19611 \begin_layout Enumerate
19612
19613 \size small
19614 \emph on
19615 \begin_inset Quotes eld
19616 \end_inset
19617
19618
19619 \family typewriter
19620 %s
19621 \family default
19622
19623 \begin_inset Quotes erd
19624 \end_inset
19625
19626  expected, found 
19627 \begin_inset Quotes eld
19628 \end_inset
19629
19630
19631 \family typewriter
19632 %s
19633 \family default
19634
19635 \begin_inset Quotes erd
19636 \end_inset
19637
19638 .
19639 \end_layout
19640
19641 \begin_layout Enumerate
19642
19643 \size small
19644 Solo 
19645 \begin_inset Quotes eld
19646 \end_inset
19647
19648
19649 \family typewriter
19650 %s
19651 \family default
19652
19653 \begin_inset Quotes erd
19654 \end_inset
19655
19656  found.
19657 \end_layout
19658
19659 \begin_layout Enumerate
19660
19661 \size small
19662 You should use 
19663 \begin_inset Quotes eld
19664 \end_inset
19665
19666
19667 \family typewriter
19668 %s
19669 \family default
19670
19671 \begin_inset Quotes erd
19672 \end_inset
19673
19674  to achieve an ellipsis.
19675 \end_layout
19676
19677 \begin_layout Enumerate
19678
19679 \size small
19680 Inter-word spacing (
19681 \begin_inset Quotes eld
19682 \end_inset
19683
19684
19685 \family typewriter
19686
19687 \backslash
19688
19689 \family default
19690  
19691 \begin_inset Quotes eld
19692 \end_inset
19693
19694 ) should perhaps be used.
19695 \end_layout
19696
19697 \begin_layout Enumerate
19698
19699 \size small
19700 Inter-sentence spacing (
19701 \begin_inset Quotes eld
19702 \end_inset
19703
19704
19705 \family typewriter
19706
19707 \backslash
19708 @
19709 \family default
19710
19711 \begin_inset Quotes erd
19712 \end_inset
19713
19714 ) should perhaps be used.
19715 \end_layout
19716
19717 \begin_layout Enumerate
19718
19719 \size small
19720 Could not find argument for command.
19721 \end_layout
19722
19723 \begin_layout Enumerate
19724
19725 \size small
19726 No match found for 
19727 \begin_inset Quotes eld
19728 \end_inset
19729
19730
19731 \family typewriter
19732 %s
19733 \family default
19734
19735 \begin_inset Quotes erd
19736 \end_inset
19737
19738 .
19739 \end_layout
19740
19741 \begin_layout Enumerate
19742
19743 \size small
19744 Math mode still on at end of \SpecialChar LaTeX
19745  file.
19746 \end_layout
19747
19748 \begin_layout Enumerate
19749
19750 \size small
19751 Number of 
19752 \begin_inset Quotes eld
19753 \end_inset
19754
19755
19756 \family typewriter
19757 char
19758 \family default
19759
19760 \begin_inset Quotes erd
19761 \end_inset
19762
19763  doesn't match the number of 
19764 \begin_inset Quotes eld
19765 \end_inset
19766
19767
19768 \family typewriter
19769 char
19770 \family default
19771
19772 \begin_inset Quotes erd
19773 \end_inset
19774
19775 .
19776 \end_layout
19777
19778 \begin_layout Enumerate
19779
19780 \size small
19781 You should use either 
19782 \family typewriter
19783
19784 \begin_inset Quotes eld
19785 \end_inset
19786
19787
19788 \family default
19789  or 
19790 \family typewriter
19791
19792 \begin_inset Quotes erd
19793 \end_inset
19794
19795
19796 \family default
19797  as an alternative to 
19798 \begin_inset Quotes eld
19799 \end_inset
19800
19801
19802 \family typewriter
19803 "
19804 \family default
19805
19806 \begin_inset Quotes erd
19807 \end_inset
19808
19809 .
19810 \end_layout
19811
19812 \begin_layout Enumerate
19813
19814 \size small
19815 You should use "
19816 \family typewriter
19817 '
19818 \family default
19819 " (ASCII 39) instead of "
19820 \family typewriter
19821 ´
19822 \family default
19823 " (ASCII 180).
19824 \end_layout
19825
19826 \begin_layout Enumerate
19827
19828 \size small
19829 User-specified pattern found.
19830 \end_layout
19831
19832 \begin_layout Enumerate
19833
19834 \size small
19835 This command might not be intended.
19836 \end_layout
19837
19838 \begin_layout Enumerate
19839
19840 \size small
19841 \emph on
19842 Comment displayed.
19843 \end_layout
19844
19845 \begin_layout Enumerate
19846
19847 \size small
19848 Either 
19849 \family typewriter
19850 ''
19851 \backslash
19852 ,'
19853 \family default
19854  or 
19855 \family typewriter
19856 '
19857 \backslash
19858 ,''
19859 \family default
19860  will look better.
19861 \end_layout
19862
19863 \begin_layout Enumerate
19864
19865 \size small
19866 Delete this space to maintain correct page references.
19867 \end_layout
19868
19869 \begin_layout Enumerate
19870
19871 \size small
19872 \emph on
19873 You might wish to put this between a pair of 
19874 \begin_inset Quotes eld
19875 \end_inset
19876
19877
19878 \family typewriter
19879 {}
19880 \family default
19881
19882 \begin_inset Quotes erd
19883 \end_inset
19884
19885 .
19886 \end_layout
19887
19888 \begin_layout Enumerate
19889
19890 \size small
19891 You ought to remove spaces in front of punctuation.
19892 \end_layout
19893
19894 \begin_layout Enumerate
19895
19896 \size small
19897 Could not execute \SpecialChar LaTeX
19898  command.
19899 \end_layout
19900
19901 \begin_layout Enumerate
19902
19903 \size small
19904 Don't use 
19905 \family typewriter
19906
19907 \backslash
19908 /
19909 \family default
19910  in front of small punctuation.
19911 \end_layout
19912
19913 \begin_layout Enumerate
19914
19915 \family typewriter
19916 \size small
19917 $
19918 \backslash
19919 times$
19920 \family default
19921  may look prettier here.
19922 \end_layout
19923
19924 \begin_layout Enumerate
19925
19926 \size small
19927 \emph on
19928 Multiple spaces detected in output.
19929 \end_layout
19930
19931 \begin_layout Enumerate
19932
19933 \size small
19934 This text may be ignored.
19935 \end_layout
19936
19937 \begin_layout Enumerate
19938
19939 \size small
19940 Use 
19941 \family typewriter
19942
19943 \begin_inset Quotes eld
19944 \end_inset
19945
19946
19947 \family default
19948  to begin quotation, not 
19949 \family typewriter
19950 '
19951 \family default
19952 .
19953 \end_layout
19954
19955 \begin_layout Enumerate
19956
19957 \size small
19958 Use 
19959 \family typewriter
19960 '
19961 \family default
19962  to end quotation, not 
19963 \family typewriter
19964
19965 \begin_inset Quotes eld
19966 \end_inset
19967
19968
19969 \family default
19970 .
19971 \end_layout
19972
19973 \begin_layout Enumerate
19974
19975 \size small
19976 Don't mix quotes.
19977 \end_layout
19978
19979 \begin_layout Enumerate
19980
19981 \size small
19982 You should perhaps use 
19983 \begin_inset Quotes eld
19984 \end_inset
19985
19986
19987 \family typewriter
19988 cmd
19989 \family default
19990
19991 \begin_inset Quotes erd
19992 \end_inset
19993
19994  instead.
19995 \end_layout
19996
19997 \begin_layout Enumerate
19998
19999 \size small
20000 You should put a space in front of/after parenthesis.
20001 \end_layout
20002
20003 \begin_layout Enumerate
20004
20005 \size small
20006 You should avoid spaces in front of/after parenthesis.
20007 \end_layout
20008
20009 \begin_layout Enumerate
20010
20011 \size small
20012 \emph on
20013 You should not use punctuation in front of/after quotes.
20014 \end_layout
20015
20016 \begin_layout Enumerate
20017
20018 \size small
20019 Double space found.
20020 \end_layout
20021
20022 \begin_layout Enumerate
20023
20024 \size small
20025 You should put punctuation outside inner/inside display math mode.
20026 \end_layout
20027
20028 \begin_layout Enumerate
20029
20030 \size small
20031 You ought to not use primitive \SpecialChar TeX
20032  in \SpecialChar LaTeX
20033  code.
20034 \end_layout
20035
20036 \begin_layout Enumerate
20037
20038 \size small
20039 You should remove spaces in front of 
20040 \begin_inset Quotes eld
20041 \end_inset
20042
20043
20044 \family typewriter
20045 %s
20046 \family default
20047
20048 \begin_inset Quotes erd
20049 \end_inset
20050
20051
20052 \end_layout
20053
20054 \begin_layout Enumerate
20055
20056 \size small
20057 \begin_inset Quotes eld
20058 \end_inset
20059
20060
20061 \family typewriter
20062 %s
20063 \family default
20064
20065 \begin_inset Quotes erd
20066 \end_inset
20067
20068  is normally not followed by 
20069 \begin_inset Quotes eld
20070 \end_inset
20071
20072
20073 \family typewriter
20074 %c
20075 \family default
20076
20077 \begin_inset Quotes erd
20078 \end_inset
20079
20080 .
20081 \end_layout
20082
20083 \begin_layout Standard
20084 In later versions of \SpecialChar LyX
20085 , we hope to provide a more complete interface to this
20086  tool (and it's smaller cousin 
20087 \family typewriter
20088 lacheck
20089 \family default
20090 ) to exploit the full power of it.
20091  But it's not exactly useless as it is now: go try it on one of your existing
20092  documents of a certain length and be surprised.
20093 \end_layout
20094
20095 \begin_layout Section
20096 Version Control in \SpecialChar LyX
20097
20098 \end_layout
20099
20100 \begin_layout Standard
20101 by
20102 \noun on
20103  Lars Gullik Bjønnes 
20104 \noun default
20105 and 
20106 \noun on
20107 Pavel Sanda
20108 \end_layout
20109
20110 \begin_layout Subsection
20111 Introduction
20112 \end_layout
20113
20114 \begin_layout Standard
20115 \SpecialChar LyX
20116  supports some of the most basic RCS/CVS/SVN/GIT commands.
20117  If you need something a bit more sophisticated you will have to do that
20118  manually in a terminal.
20119 \end_layout
20120
20121 \begin_layout Standard
20122 Also note that CVS support is not as good as subversion support so we advise
20123  using SVN instead.
20124  A good place to start learning Subversion is SVN Book
20125 \begin_inset Foot
20126 status collapsed
20127
20128 \begin_layout Plain Layout
20129 \begin_inset CommandInset href
20130 LatexCommand href
20131 target "http://svnbook.red-bean.com/"
20132 literal "false"
20133
20134 \end_inset
20135
20136
20137 \end_layout
20138
20139 \end_inset
20140
20141 .
20142  In the case of RCS you should read 
20143 \begin_inset Quotes eld
20144 \end_inset
20145
20146 rcsintro
20147 \begin_inset Quotes erd
20148 \end_inset
20149
20150  (a man file, read it with 
20151 \family typewriter
20152 man rcsintro
20153 \family default
20154 ).
20155  This file describes all the basic features of RCS.
20156  You should especially notice the comment about a RCS directory, and the
20157  notion of a master RCS file (the file ending in 
20158 \family typewriter
20159 ,v
20160 \family default
20161 ).
20162 \end_layout
20163
20164 \begin_layout Standard
20165 Before you begin to use the version control features in \SpecialChar LyX
20166 , you should be
20167  familiar with RCS/CVS/SVN/GIT usage.
20168  The implementation in \SpecialChar LyX
20169  assumes a recent version of the GNU RCS or CVS/SVN
20170  package — no guarantees are made for older versions.
20171  Most of the log messages are not currently displayed after operations —
20172  you can check them in the Messages pane if unsure.
20173  Regular users of version control will appreciate VC toolbar, which can
20174  be enabled via 
20175 \family sans
20176 View\SpecialChar menuseparator
20177 Toolbars\SpecialChar menuseparator
20178 Version
20179 \begin_inset space ~
20180 \end_inset
20181
20182 Control
20183 \family default
20184 .
20185 \end_layout
20186
20187 \begin_layout Standard
20188 For introducing your own external commands consult vc-command in the manual
20189  of \SpecialChar LyX
20190  functions.
20191 \end_layout
20192
20193 \begin_layout Standard
20194 It is strongly recommended to store documents in uncompressed format if
20195  using version control (uncheck 
20196 \family sans
20197 Document\SpecialChar menuseparator
20198 Compressed
20199 \family default
20200  if it is checked): Uncompressed LyX documents are text files and therefore
20201  for merging two different versions by version control systems.
20202  Compressed LyX documents are binary files, which cannot be merged by version
20203  control systems.
20204 \end_layout
20205
20206 \begin_layout Subsection
20207 RCS commands in \SpecialChar LyX
20208
20209 \end_layout
20210
20211 \begin_layout Standard
20212 The following sections describe the RCS commands supported by \SpecialChar LyX
20213 .
20214  You can find them in the 
20215 \family sans
20216 File\SpecialChar menuseparator
20217 Version
20218 \begin_inset space ~
20219 \end_inset
20220
20221 Control
20222 \family default
20223  submenu.
20224  \SpecialChar LyX
20225  was tested against RCS 5.7/5.8.
20226 \end_layout
20227
20228 \begin_layout Subsubsection
20229
20230 \family sans
20231 Register
20232 \end_layout
20233
20234 \begin_layout Standard
20235 If your document is not under revision control, this is the only item shown
20236  in the menu.
20237  And if it is under revision control, the 
20238 \family sans
20239 Register
20240 \family default
20241  item is not visible.
20242  
20243 \end_layout
20244
20245 \begin_layout Standard
20246 This command registers your document with RCS (unless you are under the
20247  directory managed by CVS)\SpecialChar endofsentence
20248  You are asked interactively to supply an initial
20249  description of the document.
20250  The document is now set in Read-Only mode and you have to 
20251 \family sans
20252 Check
20253 \begin_inset space ~
20254 \end_inset
20255
20256 Out
20257 \begin_inset space ~
20258 \end_inset
20259
20260 For
20261 \begin_inset space ~
20262 \end_inset
20263
20264 Edit
20265 \family default
20266 , before making any changes to it.
20267  A document under revision control has a 
20268 \begin_inset Quotes eld
20269 \end_inset
20270
20271 [RCS:<version> <locker>]
20272 \begin_inset Quotes erd
20273 \end_inset
20274
20275  item tagged to the filename in the minibuffer.
20276 \end_layout
20277
20278 \begin_layout Standard
20279 RCS command that is run: 
20280 \family typewriter
20281 ci -q -u -i -t-"<initial description>" <file-name>
20282 \end_layout
20283
20284 \begin_layout Standard
20285 Read 
20286 \family typewriter
20287 man ci
20288 \family default
20289  to understand the switches.
20290  
20291 \end_layout
20292
20293 \begin_layout Subsubsection
20294
20295 \family sans
20296 Check In Changes
20297 \end_layout
20298
20299 \begin_layout Standard
20300 When you are finished editing a file, you check in your changes.
20301  When you do this, you are asked for a description of the changes.
20302  This is stored in the history log.
20303  The version number is bumped, your changes are applied to the master RCS
20304  file, the document is unlocked and set to Read-Only mode.
20305 \end_layout
20306
20307 \begin_layout Standard
20308 RCS command: 
20309 \family typewriter
20310 ci -q -u -m"<description>" <file-name>
20311 \end_layout
20312
20313 \begin_layout Subsubsection
20314
20315 \family sans
20316 Check Out For Edit
20317 \end_layout
20318
20319 \begin_layout Standard
20320 By doing this you lock the document so that only you can edit it.
20321  This will also make the document Read-Write only for you.
20322  You will usually continue editing for a while and when you are finished
20323  you check in your changes.
20324  The status line is changed to reflect that you have locked the file.
20325 \end_layout
20326
20327 \begin_layout Standard
20328 RCS command: 
20329 \family typewriter
20330 co -q -l <file-name>
20331 \end_layout
20332
20333 \begin_layout Subsubsection
20334
20335 \family sans
20336 Revert To Repository Version
20337 \end_layout
20338
20339 \begin_layout Standard
20340 This will discard all changes made to the document since the last check
20341  in.
20342  You get a warning before changes are discarded.
20343 \end_layout
20344
20345 \begin_layout Standard
20346 RCS command: 
20347 \family typewriter
20348 co -f -u<version> <file-name>
20349 \end_layout
20350
20351 \begin_layout Subsubsection
20352
20353 \family sans
20354 Copy
20355 \end_layout
20356
20357 \begin_layout Standard
20358 This will create a copy of the current document.
20359  Since RCS does not support copy operations natively, the version history
20360  is not preserved, and the copy is added as a new file.
20361  It requires a clean document without any changes since the last checkin.
20362  You are asked for a file name and a description of the copy operation.
20363  After that the copy is created, both locally and in the repository.
20364  If the parent directories of the copied and original document differ, all
20365  relative paths of included files of the copy are adjusted (like in 
20366 \family sans
20367 File\SpecialChar menuseparator
20368 Save As
20369 \family default
20370 \SpecialChar ldots
20371 ).
20372  Finally, the copy is loaded instead of the original document.
20373 \end_layout
20374
20375 \begin_layout Labeling
20376 \labelwidthstring 00.00.0000
20377 RCS
20378 \begin_inset space ~
20379 \end_inset
20380
20381 commands: 
20382 \begin_inset space ~
20383 \end_inset
20384
20385
20386 \begin_inset Newline newline
20387 \end_inset
20388
20389 Copy 
20390 \begin_inset Flex Code
20391 status collapsed
20392
20393 \begin_layout Plain Layout
20394
20395 \family typewriter
20396 \begin_inset Quotes eld
20397 \end_inset
20398
20399 <file-name>
20400 \begin_inset Quotes erd
20401 \end_inset
20402
20403
20404 \end_layout
20405
20406 \end_inset
20407
20408  to 
20409 \begin_inset Flex Code
20410 status collapsed
20411
20412 \begin_layout Plain Layout
20413
20414 \family typewriter
20415 \begin_inset Quotes eld
20416 \end_inset
20417
20418 <new-file-name>
20419 \begin_inset Quotes erd
20420 \end_inset
20421
20422
20423 \end_layout
20424
20425 \end_inset
20426
20427
20428 \begin_inset Newline newline
20429 \end_inset
20430
20431
20432 \begin_inset Flex Code
20433 status collapsed
20434
20435 \begin_layout Plain Layout
20436 ci -q -u 
20437 \family typewriter
20438 -i 
20439 \begin_inset Quotes eld
20440 \end_inset
20441
20442 <new-file-name>
20443 \begin_inset Quotes erd
20444 \end_inset
20445
20446
20447 \end_layout
20448
20449 \end_inset
20450
20451
20452 \end_layout
20453
20454 \begin_layout Subsubsection
20455
20456 \family sans
20457 Undo Last Checkin
20458 \end_layout
20459
20460 \begin_layout Standard
20461 This makes as if the last check in never happened.
20462  No changes are made to the document loaded into \SpecialChar LyX
20463 , but the last version
20464  is removed from the master RCS file.
20465 \end_layout
20466
20467 \begin_layout Standard
20468 RCS command: 
20469 \family typewriter
20470 rcs -o<version> <file-name>
20471 \end_layout
20472
20473 \begin_layout Subsubsection
20474
20475 \family sans
20476 Show History
20477 \end_layout
20478
20479 \begin_layout Standard
20480 This shows the complete history of the RCS document.
20481  The output of 
20482 \family typewriter
20483 rlog <file-name>
20484 \family default
20485  is shown in a browser.
20486  See 
20487 \family typewriter
20488 man rlog
20489 \family default
20490  for more info.
20491 \end_layout
20492
20493 \begin_layout Subsubsection
20494 Revision info
20495 \end_layout
20496
20497 \begin_layout Standard
20498 \SpecialChar LyX
20499  supports RCS version number, author name, date and time of last commit.
20500  All those are extracted from 
20501 \family typewriter
20502 rlog -r <file-name>
20503 \family default
20504 .
20505  See 
20506 \begin_inset CommandInset ref
20507 LatexCommand ref
20508 reference "subsec:VCS-Revision-Information"
20509
20510 \end_inset
20511
20512  for details.
20513 \end_layout
20514
20515 \begin_layout Subsection
20516 CVS commands in \SpecialChar LyX
20517
20518 \end_layout
20519
20520 \begin_layout Standard
20521 A subset of CVS operations is supported by \SpecialChar LyX
20522 .
20523  You can find the commands in the 
20524 \family sans
20525 File\SpecialChar menuseparator
20526 Version
20527 \begin_inset space ~
20528 \end_inset
20529
20530 Control
20531 \family default
20532  submenu.
20533  The version control system SVN is more powerful, so please use it instead
20534  of CVS if possible.
20535 \end_layout
20536
20537 \begin_layout Subsubsection
20538
20539 \family sans
20540 General CVS usage
20541 \end_layout
20542
20543 \begin_layout Standard
20544 If you start from scratch with CVS you have to create your repository and
20545  checkout the working copy with external tools.
20546  If you're using a client-server setup you may need to login before doing
20547  the first repository checkout.
20548 \end_layout
20549
20550 \begin_layout Standard
20551 If your documents are under revision control and others are using the same
20552  repository problems arise when different changes to the same document at
20553  the same location happen.
20554  Standard CVS repositories don't operate with a file locking mechanism.
20555  This may be surprising, but conflicts only occur if people disagree on
20556  the proper content of the same part of a document.
20557  So, if co-workers are used to communicate regularly, these conflicts occur
20558  rarely.
20559  If they don't communicate they have a fundamental problem anyway.
20560  Nevertheless some people like to work with so called 
20561 \begin_inset Quotes eld
20562 \end_inset
20563
20564 reserved checkouts
20565 \begin_inset Quotes erd
20566 \end_inset
20567
20568 .
20569  If they do so the working copy of all files is readonly when checked out
20570  first and the user starts editing after using a special command to make
20571  the working copy writable.
20572  When the changes are checked in the working copy returns to readonly state.
20573  With \SpecialChar LyX
20574  one has to edit the 
20575 \begin_inset Flex Code
20576 status collapsed
20577
20578 \begin_layout Plain Layout
20579 .cvsrc
20580 \end_layout
20581
20582 \end_inset
20583
20584  file and add the line 
20585 \begin_inset Flex Code
20586 status collapsed
20587
20588 \begin_layout Plain Layout
20589 cvs -r
20590 \end_layout
20591
20592 \end_inset
20593
20594  to work with reserved checkouts.
20595  The benefit is the possibility to see who is using a writable copy of some
20596  document.
20597  It's not guaranteed only one user makes a copy writable.
20598 \end_layout
20599
20600 \begin_layout Standard
20601 \SpecialChar LyX
20602  tries to guess if you're using reserved or non-reserved checkouts.
20603  If your working copy is readonly or it is writable and an additional copy
20604  of your document exists in the CVS/Base sub-directory a reserved otherwise
20605  a non-reserved checkout is assumed.
20606  When a reserved checkout is detected you have to use 
20607 \begin_inset Flex Noun
20608 status collapsed
20609
20610 \begin_layout Plain Layout
20611 Check Out
20612 \end_layout
20613
20614 \end_inset
20615
20616  to make your working copy writable if it's readonly.
20617  After doing so the 
20618 \begin_inset Flex Noun
20619 status collapsed
20620
20621 \begin_layout Plain Layout
20622 Check In
20623 \end_layout
20624
20625 \end_inset
20626
20627  operation is possible and that makes your working copy readonly again after
20628  transferring your changes to the repository.
20629 \end_layout
20630
20631 \begin_layout Standard
20632 More information about CVS can be found here 
20633 \begin_inset Flex URL
20634 status collapsed
20635
20636 \begin_layout Plain Layout
20637
20638 http://www.nongnu.org/cvs
20639 \end_layout
20640
20641 \end_inset
20642
20643  and here 
20644 \begin_inset Flex URL
20645 status collapsed
20646
20647 \begin_layout Plain Layout
20648
20649 http://ximbiot.com/cvs
20650 \end_layout
20651
20652 \end_inset
20653
20654 .
20655 \end_layout
20656
20657 \begin_layout Standard
20658 Read 
20659 \family typewriter
20660 man cvs
20661 \family default
20662  to understand the sub-commands and the switches mentioned below.
20663 \end_layout
20664
20665 \begin_layout Subsubsection
20666
20667 \family sans
20668 Register
20669 \end_layout
20670
20671 \begin_layout Standard
20672 If your document is not under revision control, this is the only item shown
20673  in the menu.
20674  And if it is under revision control, the 
20675 \family sans
20676 Register
20677 \family default
20678  item is not visible.
20679  
20680 \end_layout
20681
20682 \begin_layout Standard
20683 This command registers in CVS your document 
20684 \begin_inset Flex Strong
20685 status collapsed
20686
20687 \begin_layout Plain Layout
20688
20689 \emph on
20690 only
20691 \end_layout
20692
20693 \end_inset
20694
20695  in the case you have already the documents directory under CVS control
20696  (in particular 
20697 \family typewriter
20698 CVS/Entries
20699 \family default
20700  file exists).
20701  This means you have to create or checkout the archive by yourself using
20702  external tools.
20703  (In case you forget that step \SpecialChar LyX
20704  registers the document with RCS.)
20705 \end_layout
20706
20707 \begin_layout Standard
20708 Then you are asked interactively to supply an initial description of the
20709  document.
20710  Don't forget that registered file is not yet checked in.
20711 \end_layout
20712
20713 \begin_layout Standard
20714 CVS command that is run: 
20715 \family typewriter
20716 cvs -q add -m"<entered message>" "<file-name>"
20717 \end_layout
20718
20719 \begin_layout Standard
20720 The term 
20721 \family typewriter
20722 "<file-name>"
20723 \family default
20724  above and for all other CVS commands is an abbreviation for 
20725 \begin_inset Quotes eld
20726 \end_inset
20727
20728 change the current working directory to file location and use the file name
20729  without path component as argument
20730 \begin_inset Quotes erd
20731 \end_inset
20732
20733 .
20734 \end_layout
20735
20736 \begin_layout Subsubsection
20737
20738 \family sans
20739 Check In Changes
20740 \end_layout
20741
20742 \begin_layout Standard
20743 When you are finished editing a file, you commit your changes.
20744  When you do this and you had changed the document, you are asked for a
20745  description of the changes.
20746  After that changes are written to the repository.
20747  In case you didn't change the document and a reserved checkout is detected
20748  the reservation made on 
20749 \begin_inset Flex Noun
20750 status collapsed
20751
20752 \begin_layout Plain Layout
20753 Check Out
20754 \end_layout
20755
20756 \end_inset
20757
20758  is undone.
20759 \end_layout
20760
20761 \begin_layout Labeling
20762 \labelwidthstring 00.00.0000
20763 CVS
20764 \begin_inset space ~
20765 \end_inset
20766
20767 command: 
20768 \begin_inset space ~
20769 \end_inset
20770
20771
20772 \begin_inset Newline newline
20773 \end_inset
20774
20775
20776 \begin_inset Flex Code
20777 status collapsed
20778
20779 \begin_layout Plain Layout
20780 cvs 
20781 \family typewriter
20782 -q commit -m"<description>" "<file-name>"
20783 \end_layout
20784
20785 \end_inset
20786
20787  or
20788 \begin_inset Newline newline
20789 \end_inset
20790
20791
20792 \begin_inset Flex Code
20793 status collapsed
20794
20795 \begin_layout Plain Layout
20796 cvs -q unedit 
20797 \family typewriter
20798 "<file-name>"
20799 \end_layout
20800
20801 \end_inset
20802
20803
20804 \end_layout
20805
20806 \begin_layout Subsubsection
20807
20808 \family sans
20809 Check Out Changes
20810 \end_layout
20811
20812 \begin_layout Standard
20813 When you are sharing a repository with others, you may have to incorporate
20814  their changes into your working copy.
20815 \end_layout
20816
20817 \begin_layout Standard
20818 CVS command: 
20819 \family typewriter
20820 cvs -q update "<file-name>"
20821 \end_layout
20822
20823 \begin_layout Standard
20824 If a readonly checkout is detected the working copy is made writable and
20825  reserved.
20826 \end_layout
20827
20828 \begin_layout Standard
20829 CVS command: 
20830 \family typewriter
20831 cvs -q edit "<file-name>"
20832 \end_layout
20833
20834 \begin_layout Subsubsection
20835
20836 \family sans
20837 Revert To Repository Version
20838 \end_layout
20839
20840 \begin_layout Standard
20841 This will discard all changes made to the document since the last check
20842  in.
20843  You get a warning before changes are discarded.
20844  Firstly the file is deleted, secondly CVS update command is run.
20845 \end_layout
20846
20847 \begin_layout Standard
20848 CVS command: 
20849 \family typewriter
20850 cvs -q update "<file-name>"
20851 \end_layout
20852
20853 \begin_layout Standard
20854 If a reserved checkout is detected and the working copy has no changes only
20855  the reservation is undone.
20856 \end_layout
20857
20858 \begin_layout Standard
20859 CVS command: 
20860 \family typewriter
20861 cvs -q unedit "<file-name>"
20862 \end_layout
20863
20864 \begin_layout Subsubsection
20865
20866 \family sans
20867 Copy
20868 \end_layout
20869
20870 \begin_layout Standard
20871 This will create a copy of the current document.
20872  Since CVS does not support copy operations natively, the version history
20873  is not preserved, and the copy is added as a new file.
20874  It requires a clean document without any changes since the last checkin.
20875  You are asked for a file name and a description of the copy operation.
20876  After that the copy is created, both locally and in the repository.
20877  If the parent directories of the copied and original document differ, all
20878  relative paths of included files of the copy are adjusted (like in 
20879 \family sans
20880 File\SpecialChar menuseparator
20881 Save As
20882 \family default
20883 \SpecialChar ldots
20884 ).
20885  Finally, the copy is loaded instead of the original document.
20886 \end_layout
20887
20888 \begin_layout Labeling
20889 \labelwidthstring 00.00.0000
20890 CVS
20891 \begin_inset space ~
20892 \end_inset
20893
20894 commands: 
20895 \begin_inset space ~
20896 \end_inset
20897
20898
20899 \begin_inset Newline newline
20900 \end_inset
20901
20902 Copy 
20903 \begin_inset Flex Code
20904 status collapsed
20905
20906 \begin_layout Plain Layout
20907
20908 \family typewriter
20909 \begin_inset Quotes eld
20910 \end_inset
20911
20912 <file-name>
20913 \begin_inset Quotes erd
20914 \end_inset
20915
20916
20917 \end_layout
20918
20919 \end_inset
20920
20921  to 
20922 \begin_inset Flex Code
20923 status collapsed
20924
20925 \begin_layout Plain Layout
20926
20927 \family typewriter
20928 \begin_inset Quotes eld
20929 \end_inset
20930
20931 <new-file-name>
20932 \begin_inset Quotes erd
20933 \end_inset
20934
20935
20936 \end_layout
20937
20938 \end_inset
20939
20940
20941 \begin_inset Newline newline
20942 \end_inset
20943
20944
20945 \begin_inset Flex Code
20946 status collapsed
20947
20948 \begin_layout Plain Layout
20949 cvs -q add 
20950 \family typewriter
20951
20952 \begin_inset Quotes eld
20953 \end_inset
20954
20955 <new-file-name>
20956 \begin_inset Quotes erd
20957 \end_inset
20958
20959
20960 \end_layout
20961
20962 \end_inset
20963
20964
20965 \end_layout
20966
20967 \begin_layout Subsubsection
20968
20969 \family sans
20970 Rename
20971 \end_layout
20972
20973 \begin_layout Standard
20974 This will rename the current document.
20975  Since CVS does not support rename operations natively, the version history
20976  is not preserved, the renamed document is added as a new file, and the
20977  original document is deleted.
20978  It requires a clean document without any changes since the last checkin.
20979  You are asked for a file name and a description of the rename operation.
20980  After that the document is renamed, both locally and in the repository.
20981  If the parent directories of the new and old file names differ, all relative
20982  paths of included files are adjusted (like in 
20983 \family sans
20984 File\SpecialChar menuseparator
20985 Save As
20986 \family default
20987 \SpecialChar ldots
20988 ).
20989  Finally, the document is reloaded using the new name.
20990 \end_layout
20991
20992 \begin_layout Labeling
20993 \labelwidthstring 00.00.0000
20994 CVS
20995 \begin_inset space ~
20996 \end_inset
20997
20998 commands: 
20999 \begin_inset space ~
21000 \end_inset
21001
21002
21003 \begin_inset Newline newline
21004 \end_inset
21005
21006 Rename 
21007 \begin_inset Flex Code
21008 status collapsed
21009
21010 \begin_layout Plain Layout
21011
21012 \family typewriter
21013 \begin_inset Quotes eld
21014 \end_inset
21015
21016 <file-name>
21017 \begin_inset Quotes erd
21018 \end_inset
21019
21020
21021 \end_layout
21022
21023 \end_inset
21024
21025  to 
21026 \begin_inset Flex Code
21027 status collapsed
21028
21029 \begin_layout Plain Layout
21030
21031 \family typewriter
21032 \begin_inset Quotes eld
21033 \end_inset
21034
21035 <new-file-name>
21036 \begin_inset Quotes erd
21037 \end_inset
21038
21039
21040 \end_layout
21041
21042 \end_inset
21043
21044
21045 \begin_inset Newline newline
21046 \end_inset
21047
21048
21049 \begin_inset Flex Code
21050 status collapsed
21051
21052 \begin_layout Plain Layout
21053 cvs -q add 
21054 \family typewriter
21055
21056 \begin_inset Quotes eld
21057 \end_inset
21058
21059 <new-file-name>
21060 \begin_inset Quotes erd
21061 \end_inset
21062
21063
21064 \end_layout
21065
21066 \end_inset
21067
21068
21069 \begin_inset Newline newline
21070 \end_inset
21071
21072
21073 \begin_inset Flex Code
21074 status collapsed
21075
21076 \begin_layout Plain Layout
21077 cvs -q remove 
21078 \family typewriter
21079
21080 \begin_inset Quotes eld
21081 \end_inset
21082
21083 <file-name>
21084 \begin_inset Quotes erd
21085 \end_inset
21086
21087
21088 \end_layout
21089
21090 \end_inset
21091
21092
21093 \end_layout
21094
21095 \begin_layout Subsubsection
21096 Update of the local directory checkout from repository
21097 \end_layout
21098
21099 \begin_layout Standard
21100 Once your documents gets more complex, containing sub-documents and pictures,
21101  including external 
21102 \begin_inset Flex Code
21103 status collapsed
21104
21105 \begin_layout Plain Layout
21106 .tex
21107 \end_layout
21108
21109 \end_inset
21110
21111  files and so on using version control becomes more complicated.
21112  \SpecialChar LyX
21113  supports updating the whole tree in which resides the document.
21114  This become especially useful once you cooperate with people which neither
21115  have detailed knowledge about CVS usage nor they have ambition to commit
21116  additional material to the repository.
21117  You have to organize the files structure so that all external files are
21118  in the same directory or subdirectories of the document.
21119  It's good practice anyway to store multipart documents in an extra directory.
21120 \end_layout
21121
21122 \begin_layout Standard
21123 The 
21124 \begin_inset Flex Code
21125 status collapsed
21126
21127 \begin_layout Plain Layout
21128 Update local directory from repository
21129 \end_layout
21130
21131 \end_inset
21132
21133  command updates the whole directory.
21134  If local changes are detected user is warned before update starts.
21135  In case of merge conflicts both versions of the conflicting document parts
21136  are placed in the final document.
21137  You have to review and correct the result of the merge.
21138  You'll find the conflicts enclosed in pairs of 
21139 \begin_inset Flex Code
21140 status collapsed
21141
21142 \begin_layout Plain Layout
21143 <<<<<<<
21144 \end_layout
21145
21146 \end_inset
21147
21148  and 
21149 \begin_inset Flex Code
21150 status collapsed
21151
21152 \begin_layout Plain Layout
21153 >>>>>>>
21154 \end_layout
21155
21156 \end_inset
21157
21158  separated by 
21159 \begin_inset Flex Code
21160 status collapsed
21161
21162 \begin_layout Plain Layout
21163 =======
21164 \end_layout
21165
21166 \end_inset
21167
21168 .
21169  The first part is your version as before the update operation with the
21170  document name prepended.
21171  The second one is the repository version with the version number after
21172  the sequence of 
21173 \begin_inset Flex Code
21174 status collapsed
21175
21176 \begin_layout Plain Layout
21177 >
21178 \end_layout
21179
21180 \end_inset
21181
21182  signs.
21183 \end_layout
21184
21185 \begin_layout Labeling
21186 \labelwidthstring 00.00.0000
21187 CVS
21188 \begin_inset space ~
21189 \end_inset
21190
21191 commands: 
21192 \begin_inset space ~
21193 \end_inset
21194
21195
21196 \begin_inset Newline newline
21197 \end_inset
21198
21199
21200 \begin_inset Flex Code
21201 status collapsed
21202
21203 \begin_layout Plain Layout
21204 cd $path; cvs diff 
21205 \family typewriter
21206 "."
21207 \end_layout
21208
21209 \end_inset
21210
21211  (Ask if changes are detected.)
21212 \begin_inset Newline newline
21213 \end_inset
21214
21215
21216 \begin_inset Flex Code
21217 status collapsed
21218
21219 \begin_layout Plain Layout
21220 cd $path; cvs -q update 
21221 \family typewriter
21222 "."
21223 \end_layout
21224
21225 \end_inset
21226
21227
21228 \end_layout
21229
21230 \begin_layout Standard
21231 where 
21232 \begin_inset Flex Code
21233 status collapsed
21234
21235 \begin_layout Plain Layout
21236 $path
21237 \end_layout
21238
21239 \end_inset
21240
21241  stands for the path to the document.
21242 \end_layout
21243
21244 \begin_layout Subsubsection
21245
21246 \family sans
21247 Show History
21248 \end_layout
21249
21250 \begin_layout Standard
21251 This shows the complete history of the CVS document.
21252  The output of 
21253 \family typewriter
21254 cvs log "<file-name>"
21255 \family default
21256  is shown in a browser.
21257 \end_layout
21258
21259 \begin_layout Subsubsection
21260 Revision info
21261 \end_layout
21262
21263 \begin_layout Standard
21264 \SpecialChar LyX
21265  supports CVS version number, author name, date and time of last commit.
21266  All those are extracted from 
21267 \family typewriter
21268 cvs log -r <file-name>
21269 \family default
21270 .
21271  See 
21272 \begin_inset CommandInset ref
21273 LatexCommand ref
21274 reference "subsec:VCS-Revision-Information"
21275
21276 \end_inset
21277
21278  for details.
21279 \end_layout
21280
21281 \begin_layout Subsection
21282 SVN commands in \SpecialChar LyX
21283
21284 \end_layout
21285
21286 \begin_layout Standard
21287 SVN is now partially supported by \SpecialChar LyX
21288 .
21289  You can find the commands in the 
21290 \family sans
21291 File\SpecialChar menuseparator
21292 Version
21293 \begin_inset space ~
21294 \end_inset
21295
21296 Control
21297 \family default
21298  submenu.
21299  Please note that if you use password protected access to repository via
21300  ssh, you will be asked in terminal window.
21301  \SpecialChar LyX
21302  was tested against SVN 1.5, 1.6, 1.7 and 1.8
21303 \begin_inset Foot
21304 status open
21305
21306 \begin_layout Plain Layout
21307 Most of the commands will work with 1.4 too, see 
21308 \begin_inset CommandInset ref
21309 LatexCommand ref
21310 reference "subsec:SVN-Repo-Update"
21311
21312 \end_inset
21313
21314 .
21315  There seems to be currently unresolved permissions problem under SVN 1.8
21316  with reverting changes when file is locked.
21317 \end_layout
21318
21319 \end_inset
21320
21321
21322 \end_layout
21323
21324 \begin_layout Subsubsection
21325
21326 \family sans
21327 Register
21328 \end_layout
21329
21330 \begin_layout Standard
21331 If your document is not under revision control, this is the only item shown
21332  in the menu.
21333  And if it is under revision control, the 
21334 \family sans
21335 Register
21336 \family default
21337  item is not visible.
21338 \end_layout
21339
21340 \begin_layout Standard
21341 This command registers in SVN your document ONLY in case you have already
21342  the documents directory under SVN control (in particular 
21343 \family typewriter
21344 .svn/entries
21345 \family default
21346  file exists).
21347  This means you have to checkout the archive by yourself.
21348 \end_layout
21349
21350 \begin_layout Standard
21351 Then you are asked interactively to supply an initial description of the
21352  document.
21353  Don't forget that registered file is not yet commited.
21354 \end_layout
21355
21356 \begin_layout Standard
21357 SVN command that is run: 
21358 \family typewriter
21359 svn add -q 
21360 \begin_inset Quotes eld
21361 \end_inset
21362
21363 <file-name>
21364 \begin_inset Quotes erd
21365 \end_inset
21366
21367
21368 \end_layout
21369
21370 \begin_layout Standard
21371 Read 
21372 \family typewriter
21373 man svn
21374 \family default
21375  to understand the switches.
21376 \end_layout
21377
21378 \begin_layout Subsubsection
21379
21380 \family sans
21381 Check In Changes
21382 \end_layout
21383
21384 \begin_layout Standard
21385 When you are finished editing a file, you commit your changes.
21386  When you do this, you are asked for a description of the changes.
21387  After that changes are commited.
21388 \end_layout
21389
21390 \begin_layout Standard
21391 SVN command:
21392 \begin_inset Foot
21393 status collapsed
21394
21395 \begin_layout Plain Layout
21396 In case locking is not enabled.
21397  See Section 
21398 \begin_inset CommandInset ref
21399 LatexCommand ref
21400 reference "subsec:SVN-File-Locking"
21401
21402 \end_inset
21403
21404 .
21405 \end_layout
21406
21407 \end_inset
21408
21409  
21410 \family typewriter
21411 svn commit -q -m"<description>" <file-name>
21412 \end_layout
21413
21414 \begin_layout Subsubsection
21415
21416 \family sans
21417 Check Out For Edit
21418 \end_layout
21419
21420 \begin_layout Standard
21421 Updates the changes of this file from the repository.
21422  Be sure you understand SVN merging and conflicts resolving before using
21423  this function, because all conflicts has to be resolved manually by you!
21424 \end_layout
21425
21426 \begin_layout Standard
21427 SVN command:
21428 \begin_inset Foot
21429 status collapsed
21430
21431 \begin_layout Plain Layout
21432 Ditto.
21433 \end_layout
21434
21435 \end_inset
21436
21437  
21438 \family typewriter
21439 svn update --non-interactive 
21440 \begin_inset Quotes eld
21441 \end_inset
21442
21443 <file-name>
21444 \begin_inset Quotes erd
21445 \end_inset
21446
21447
21448 \end_layout
21449
21450 \begin_layout Subsubsection
21451
21452 \family sans
21453 Revert To Repository Version
21454 \end_layout
21455
21456 \begin_layout Standard
21457 This will discard all changes made to the document since the last check
21458  in.
21459  You get a warning before changes are discarded.
21460 \end_layout
21461
21462 \begin_layout Standard
21463 SVN command: 
21464 \family typewriter
21465 svn revert -q 
21466 \begin_inset Quotes eld
21467 \end_inset
21468
21469 <file-name>
21470 \begin_inset Quotes erd
21471 \end_inset
21472
21473
21474 \end_layout
21475
21476 \begin_layout Subsubsection
21477
21478 \family sans
21479 Copy
21480 \end_layout
21481
21482 \begin_layout Standard
21483 This will create a copy of the current document including the version history.
21484  It requires a clean document without any changes since the last checkin.
21485  You are asked for a file name and a description of the copy operation.
21486  After that the copy is created, both locally and in the repository.
21487  If the parent directories of the copied and original document differ, all
21488  relative paths of included files of the copy are adjusted (like in 
21489 \family sans
21490 File\SpecialChar menuseparator
21491 Save As
21492 \family default
21493 \SpecialChar ldots
21494 ).
21495  Finally, the copy is loaded instead of the original document.
21496 \end_layout
21497
21498 \begin_layout Labeling
21499 \labelwidthstring 00.00.0000
21500 SVN
21501 \begin_inset space ~
21502 \end_inset
21503
21504 commands: 
21505 \begin_inset space ~
21506 \end_inset
21507
21508
21509 \begin_inset Newline newline
21510 \end_inset
21511
21512
21513 \begin_inset Flex Code
21514 status collapsed
21515
21516 \begin_layout Plain Layout
21517 svn copy -q 
21518 \family typewriter
21519
21520 \begin_inset Quotes eld
21521 \end_inset
21522
21523 <file-name>
21524 \begin_inset Quotes erd
21525 \end_inset
21526
21527  
21528 \begin_inset Quotes eld
21529 \end_inset
21530
21531 <new-file-name>
21532 \begin_inset Quotes erd
21533 \end_inset
21534
21535
21536 \end_layout
21537
21538 \end_inset
21539
21540
21541 \begin_inset Newline newline
21542 \end_inset
21543
21544
21545 \begin_inset Flex Code
21546 status collapsed
21547
21548 \begin_layout Plain Layout
21549 svn commit
21550 \end_layout
21551
21552 \end_inset
21553
21554
21555 \end_layout
21556
21557 \begin_layout Subsubsection
21558
21559 \family sans
21560 Rename
21561 \end_layout
21562
21563 \begin_layout Standard
21564 This will rename the current document including the version history.
21565  It requires a clean document without any changes since the last checkin.
21566  You are asked for a file name and a description of the rename operation.
21567  After that the document is renamed, both locally and in the repository.
21568  If the parent directories of the new and old file names differ, all relative
21569  paths of included files are adjusted (like in 
21570 \family sans
21571 File\SpecialChar menuseparator
21572 Save As
21573 \family default
21574 \SpecialChar ldots
21575 ).
21576  Finally, the document is reloaded using the new name.
21577 \end_layout
21578
21579 \begin_layout Labeling
21580 \labelwidthstring 00.00.0000
21581 SVN
21582 \begin_inset space ~
21583 \end_inset
21584
21585 commands: 
21586 \begin_inset space ~
21587 \end_inset
21588
21589
21590 \begin_inset Newline newline
21591 \end_inset
21592
21593
21594 \begin_inset Flex Code
21595 status collapsed
21596
21597 \begin_layout Plain Layout
21598 svn move -q 
21599 \family typewriter
21600
21601 \begin_inset Quotes eld
21602 \end_inset
21603
21604 <file-name>
21605 \begin_inset Quotes erd
21606 \end_inset
21607
21608  
21609 \begin_inset Quotes eld
21610 \end_inset
21611
21612 <new-file-name>
21613 \begin_inset Quotes erd
21614 \end_inset
21615
21616
21617 \end_layout
21618
21619 \end_inset
21620
21621
21622 \begin_inset Newline newline
21623 \end_inset
21624
21625
21626 \begin_inset Flex Code
21627 status collapsed
21628
21629 \begin_layout Plain Layout
21630 svn commit
21631 \end_layout
21632
21633 \end_inset
21634
21635
21636 \end_layout
21637
21638 \begin_layout Subsubsection
21639 \begin_inset CommandInset label
21640 LatexCommand label
21641 name "subsec:SVN-Repo-Update"
21642
21643 \end_inset
21644
21645 Update of the local directory checkout from repository
21646 \begin_inset Foot
21647 status collapsed
21648
21649 \begin_layout Plain Layout
21650 Note that this command will work only with subversion 
21651 \begin_inset Formula $\geqq1.5$
21652 \end_inset
21653
21654
21655 \end_layout
21656
21657 \end_inset
21658
21659
21660 \end_layout
21661
21662 \begin_layout Standard
21663 All the commands above have one shortcomming - they deal with the current
21664  document only.
21665  Once your document contains pictures, includes external 
21666 \begin_inset Flex Code
21667 status collapsed
21668
21669 \begin_layout Plain Layout
21670 .tex
21671 \end_layout
21672
21673 \end_inset
21674
21675  files and so on administration becomes more complicated.
21676  \SpecialChar LyX
21677  now supports updating the whole tree in which resides the document
21678 \begin_inset Foot
21679 status collapsed
21680
21681 \begin_layout Plain Layout
21682 One need to organize the files structure so that all external files are
21683  in the same directory or subdirectories of the document.
21684  
21685 \end_layout
21686
21687 \end_inset
21688
21689 .
21690  This become especially useful once you cooperate with people which neither
21691  know about subversion management nor they have ambition to commit additional
21692  material to the repository.
21693  
21694 \end_layout
21695
21696 \begin_layout Standard
21697 \begin_inset Flex Code
21698 status collapsed
21699
21700 \begin_layout Plain Layout
21701 Update local directory from repository
21702 \end_layout
21703
21704 \end_inset
21705
21706  command updates the whole directory and in case of merge conflicts local
21707  version of the files are left, so no unintended data loss occurs.
21708  If local changes are detected user is warned before update starts.
21709 \end_layout
21710
21711 \begin_layout Labeling
21712 \labelwidthstring 00.00.0000
21713 SVN
21714 \begin_inset space ~
21715 \end_inset
21716
21717 commands: 
21718 \begin_inset space ~
21719 \end_inset
21720
21721
21722 \begin_inset Newline newline
21723 \end_inset
21724
21725
21726 \begin_inset Flex Code
21727 status collapsed
21728
21729 \begin_layout Plain Layout
21730 svn diff $path
21731 \end_layout
21732
21733 \end_inset
21734
21735  (Ask if changes are detected.)
21736 \begin_inset Newline newline
21737 \end_inset
21738
21739
21740 \begin_inset Flex Code
21741 status collapsed
21742
21743 \begin_layout Plain Layout
21744 svn update –accept mine-full $path
21745 \end_layout
21746
21747 \end_inset
21748
21749
21750 \end_layout
21751
21752 \begin_layout Standard
21753 where 
21754 \begin_inset Flex Code
21755 status collapsed
21756
21757 \begin_layout Plain Layout
21758 $path
21759 \end_layout
21760
21761 \end_inset
21762
21763  stands for the path to the document.
21764 \end_layout
21765
21766 \begin_layout Subsubsection
21767
21768 \family sans
21769 Show History
21770 \end_layout
21771
21772 \begin_layout Standard
21773 This shows the complete history of the SVN document.
21774  The output of 
21775 \family typewriter
21776 svn log 
21777 \begin_inset Quotes eld
21778 \end_inset
21779
21780 <file-name>
21781 \begin_inset Quotes erd
21782 \end_inset
21783
21784
21785 \family default
21786  is shown in a browser.
21787 \end_layout
21788
21789 \begin_layout Subsubsection
21790 File Locking
21791 \begin_inset CommandInset label
21792 LatexCommand label
21793 name "subsec:SVN-File-Locking"
21794
21795 \end_inset
21796
21797
21798 \end_layout
21799
21800 \begin_layout Standard
21801 The file exchange through various revision control systems brings the problem
21802  of merge conflicts in case two different users try to edit the same (parts
21803  of) document.
21804  When such a conflict happens it needs manual resolving and one reasonable
21805  alternative is to provide some kind of locking mechanism, which guarantees
21806  that only one user is allowed to edit file at the given time.
21807 \end_layout
21808
21809 \begin_layout Standard
21810 SVN has two such mechanisms to provide mutual exclusivity for file access
21811  - locks and automatic setting of write permissions (see sec.
21812  
21813 \begin_inset CommandInset ref
21814 LatexCommand ref
21815 reference "subsec:Automatical-Locking-Property"
21816
21817 \end_inset
21818
21819 ) based on 
21820 \begin_inset Flex Code
21821 status collapsed
21822
21823 \begin_layout Plain Layout
21824 svn:needs-lock
21825 \end_layout
21826
21827 \end_inset
21828
21829  file svn property
21830 \begin_inset Foot
21831 status open
21832
21833 \begin_layout Plain Layout
21834 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
21835 \end_layout
21836
21837 \end_inset
21838
21839 .
21840  If this property is detected for a given document \SpecialChar LyX
21841  starts to use SVN locks
21842  for document editing automatically and the whole check-in/out mechanism
21843  switches to the same regimen as for RCS.
21844  This in particular means there are two different modes of file use in \SpecialChar LyX
21845 :
21846 \end_layout
21847
21848 \begin_layout Itemize
21849 Unlocked state.
21850  The loaded file is in the read-only mode.
21851  For editing on needs to check-out.
21852  
21853 \emph on
21854 Check-out
21855 \emph default
21856  consists of updating from the repository and gaining write lock.
21857  If the lock is not possible to obtain, we remain in unlocked state.
21858 \end_layout
21859
21860 \begin_layout Itemize
21861 Locked state.
21862  The loaded file is in the 'normal' edit mode.
21863  No other user is allowed to edit the file.
21864  
21865 \emph on
21866 Check-in
21867 \emph default
21868  consists of commiting changes and releasing write-lock.
21869  If no changes have been made to the document, no commit will be produced
21870 \begin_inset Foot
21871 status collapsed
21872
21873 \begin_layout Plain Layout
21874 Don't be puzzled by the fact that you will be asked for commit message anyway.
21875 \end_layout
21876
21877 \end_inset
21878
21879  and only the write-lock will be released.
21880 \end_layout
21881
21882 \begin_layout Standard
21883 SVN commands:
21884 \end_layout
21885
21886 \begin_layout Labeling
21887 \labelwidthstring 00.00.0000
21888 Check-in:
21889 \family typewriter
21890  svn commit -q -m"<description>" "<file-name>"
21891 \begin_inset Newline newline
21892 \end_inset
21893
21894 svn unlock "<file-name>"
21895 \end_layout
21896
21897 \begin_layout Labeling
21898 \labelwidthstring 00.00.0000
21899 Check-out: 
21900 \family typewriter
21901 svn update "<file-name>"
21902 \begin_inset Newline newline
21903 \end_inset
21904
21905 svn lock "<file-name>"
21906 \end_layout
21907
21908 \begin_layout Subsubsection
21909
21910 \family typewriter
21911 \begin_inset CommandInset label
21912 LatexCommand label
21913 name "subsec:Automatical-Locking-Property"
21914
21915 \end_inset
21916
21917
21918 \family default
21919 Automatic Locking Property
21920 \end_layout
21921
21922 \begin_layout Standard
21923 The above mentioned automatic setting of write permissions of the .lyx file
21924  can be set through
21925 \family sans
21926  File\SpecialChar menuseparator
21927 Version
21928 \begin_inset space ~
21929 \end_inset
21930
21931 Control\SpecialChar menuseparator
21932 Toggle locking property
21933 \family default
21934 .
21935  This command is active only when the file is not locked on the svn server
21936  (i.e.
21937  you need to check-out before proceeding).
21938 \end_layout
21939
21940 \begin_layout Labeling
21941 \labelwidthstring 00.00.0000
21942 SVN
21943 \begin_inset space ~
21944 \end_inset
21945
21946 commands:
21947 \end_layout
21948
21949 \begin_layout Labeling
21950 \labelwidthstring 00.00.0000
21951 Set:
21952 \family typewriter
21953  svn propset svn:needs-lock ON "<file-name>"
21954 \end_layout
21955
21956 \begin_layout Labeling
21957 \labelwidthstring 00.00.0000
21958 Unset: 
21959 \family typewriter
21960 svn propdel svn:needs-lock "<file-name>"
21961 \end_layout
21962
21963 \begin_layout Subsubsection
21964 \begin_inset CommandInset label
21965 LatexCommand label
21966 name "subsec:VCS-Revision-Information"
21967
21968 \end_inset
21969
21970 Revision Information in Documents
21971 \end_layout
21972
21973 \begin_layout Standard
21974 There are more possibilities how to activate revision information in our
21975  document.
21976 \end_layout
21977
21978 \begin_layout Itemize
21979 \SpecialChar LyX
21980  supports directly:
21981 \end_layout
21982
21983 \begin_deeper
21984 \begin_layout Itemize
21985 tree revision information (
21986 \begin_inset Flex Code
21987 status collapsed
21988
21989 \begin_layout Plain Layout
21990 vcs-tree-revision
21991 \end_layout
21992
21993 \end_inset
21994
21995 ).
21996  The result is the output of the 
21997 \begin_inset Flex Code
21998 status collapsed
21999
22000 \begin_layout Plain Layout
22001 svnversion
22002 \end_layout
22003
22004 \end_inset
22005
22006  command, the following table gives you an idea, how to read the results.
22007 \end_layout
22008
22009 \begin_layout Standard
22010 \align center
22011 \begin_inset Tabular
22012 <lyxtabular version="3" rows="6" columns="2">
22013 <features tabularvalignment="middle">
22014 <column alignment="center" valignment="top">
22015 <column alignment="center" valignment="top">
22016 <row>
22017 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
22018 \begin_inset Text
22019
22020 \begin_layout Plain Layout
22021 Output
22022 \end_layout
22023
22024 \end_inset
22025 </cell>
22026 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
22027 \begin_inset Text
22028
22029 \begin_layout Plain Layout
22030 Meaning
22031 \end_layout
22032
22033 \end_inset
22034 </cell>
22035 </row>
22036 <row>
22037 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
22038 \begin_inset Text
22039
22040 \begin_layout Plain Layout
22041 4123:4168
22042 \end_layout
22043
22044 \end_inset
22045 </cell>
22046 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
22047 \begin_inset Text
22048
22049 \begin_layout Plain Layout
22050 mixed revision working copy
22051 \end_layout
22052
22053 \end_inset
22054 </cell>
22055 </row>
22056 <row>
22057 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
22058 \begin_inset Text
22059
22060 \begin_layout Plain Layout
22061 4168M
22062 \end_layout
22063
22064 \end_inset
22065 </cell>
22066 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
22067 \begin_inset Text
22068
22069 \begin_layout Plain Layout
22070 modified working copy
22071 \end_layout
22072
22073 \end_inset
22074 </cell>
22075 </row>
22076 <row>
22077 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
22078 \begin_inset Text
22079
22080 \begin_layout Plain Layout
22081 4123S
22082 \end_layout
22083
22084 \end_inset
22085 </cell>
22086 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
22087 \begin_inset Text
22088
22089 \begin_layout Plain Layout
22090 switched working copy
22091 \end_layout
22092
22093 \end_inset
22094 </cell>
22095 </row>
22096 <row>
22097 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
22098 \begin_inset Text
22099
22100 \begin_layout Plain Layout
22101 4123P
22102 \end_layout
22103
22104 \end_inset
22105 </cell>
22106 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
22107 \begin_inset Text
22108
22109 \begin_layout Plain Layout
22110 partial working copy, from a sparse checkout
22111 \end_layout
22112
22113 \end_inset
22114 </cell>
22115 </row>
22116 <row>
22117 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
22118 \begin_inset Text
22119
22120 \begin_layout Plain Layout
22121 4123:4168MS
22122 \end_layout
22123
22124 \end_inset
22125 </cell>
22126 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
22127 \begin_inset Text
22128
22129 \begin_layout Plain Layout
22130 mixed revision, modified, switched working copy
22131 \end_layout
22132
22133 \end_inset
22134 </cell>
22135 </row>
22136 </lyxtabular>
22137
22138 \end_inset
22139
22140
22141 \end_layout
22142
22143 \begin_layout Itemize
22144 file revision information.
22145  The result comes from parsing the output of 
22146 \begin_inset Flex Code
22147 status collapsed
22148
22149 \begin_layout Plain Layout
22150 svn
22151 \begin_inset space ~
22152 \end_inset
22153
22154 info
22155 \begin_inset space ~
22156 \end_inset
22157
22158 –xml
22159 \begin_inset space ~
22160 \end_inset
22161
22162 file.lyx
22163 \end_layout
22164
22165 \end_inset
22166
22167 .
22168  Supported flags are:
22169 \end_layout
22170
22171 \begin_deeper
22172 \begin_layout Itemize
22173 version number of the last commit (
22174 \begin_inset Flex Code
22175 status collapsed
22176
22177 \begin_layout Plain Layout
22178 vcs-revision
22179 \end_layout
22180
22181 \end_inset
22182
22183 )
22184 \end_layout
22185
22186 \begin_layout Itemize
22187 author of the last commit (
22188 \begin_inset Flex Code
22189 status collapsed
22190
22191 \begin_layout Plain Layout
22192 vcs-author
22193 \end_layout
22194
22195 \end_inset
22196
22197 )
22198 \end_layout
22199
22200 \begin_layout Itemize
22201 date of the last commit (
22202 \begin_inset Flex Code
22203 status collapsed
22204
22205 \begin_layout Plain Layout
22206 vcs-date
22207 \end_layout
22208
22209 \end_inset
22210
22211 )
22212 \end_layout
22213
22214 \begin_layout Itemize
22215 time of the last commit (
22216 \begin_inset Flex Code
22217 status collapsed
22218
22219 \begin_layout Plain Layout
22220 vcs-time
22221 \end_layout
22222
22223 \end_inset
22224
22225 )
22226 \end_layout
22227
22228 \end_deeper
22229 \begin_layout Standard
22230 You can obtain this info via InsetInfo (e.g.
22231  
22232 \begin_inset Flex Code
22233 status collapsed
22234
22235 \begin_layout Plain Layout
22236 info-insert buffer vcs-date
22237 \end_layout
22238
22239 \end_inset
22240
22241 ).
22242  The information will be available only when you have the file stored under
22243  svn managment (i.e.
22244  the 
22245 \begin_inset Flex Code
22246 status collapsed
22247
22248 \begin_layout Plain Layout
22249 .svn
22250 \end_layout
22251
22252 \end_inset
22253
22254  directory is available with your document).
22255 \end_layout
22256
22257 \end_deeper
22258 \begin_layout Itemize
22259 Another—a hacking one—possibility is to use svn keywords
22260 \begin_inset Foot
22261 status collapsed
22262
22263 \begin_layout Plain Layout
22264 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
22265 \end_layout
22266
22267 \end_inset
22268
22269 .
22270  In short – you set file keywords property (e.g.
22271  
22272 \family sans
22273 svn propset svn:keywords 'Rev' file.lyx
22274 \family default
22275 ) and then paste keyword \SpecialChar TeX
22276  code
22277 \begin_inset Foot
22278 status collapsed
22279
22280 \begin_layout Plain Layout
22281 This is an easy way how to ensure that \SpecialChar LyX
22282  won't break the line in the middle
22283  of keyword tag.
22284 \end_layout
22285
22286 \end_inset
22287
22288  tag in your document (e.g.
22289  
22290 \begin_inset ERT
22291 status open
22292
22293 \begin_layout Plain Layout
22294
22295 $Rev$
22296 \end_layout
22297
22298 \end_inset
22299
22300 ).
22301  This way svn client will automatically substitute revision number (e.g.
22302  
22303 \begin_inset ERT
22304 status open
22305
22306 \begin_layout Plain Layout
22307
22308 $Rev: 59 $
22309 \end_layout
22310
22311 \end_inset
22312
22313 ) after each update and commit.
22314  There are more problems with this approach.
22315  Firstly, the '$' character is used in \SpecialChar TeX
22316  world for math equations, so any
22317  occurence of math formula 
22318 \begin_inset Formula $Rev$
22319 \end_inset
22320
22321  become 
22322 \begin_inset Formula $Rev:59$
22323 \end_inset
22324
22325  in your \SpecialChar LyX
22326  document.
22327  Similarly for other keywords like Id, Date, Author, etc.
22328  Secondly svn output is dependent on your locales, so its very easy that
22329  svn would produce some problematic strings once Date is used.
22330  Thirdly you get the whole 'Rev: 59' string in your document instead of
22331  the plain number.
22332  Until subversion implements user's custom keywords it will be hard to use
22333  this approach reliably or let \SpecialChar LyX
22334  to support it directly.
22335 \end_layout
22336
22337 \begin_layout Subsection
22338 SVN and Windows Environment
22339 \end_layout
22340
22341 \begin_layout Quote
22342 My inclination is to say that if the user cannot figure out the command
22343  line operations on their own fairly quickly, they would be well advised
22344  to use TortoiseSVN.
22345  —P.
22346  A.
22347  Rubin
22348 \end_layout
22349
22350 \begin_layout Subsubsection
22351 Preparation
22352 \end_layout
22353
22354 \begin_layout Standard
22355 In addition to installing \SpecialChar LyX
22356 , and having access to a Subversion repository,
22357  the user will need to install the Subversion client program.
22358  A Windows installer for the client program is available from 
22359 \begin_inset CommandInset href
22360 LatexCommand href
22361 name "CollabNet"
22362 target "http://www.collab.net/nonav/downloads/subversion/"
22363 literal "false"
22364
22365 \end_inset
22366
22367 .
22368  The user may also want to install 
22369 \begin_inset CommandInset href
22370 LatexCommand href
22371 name "TortoiseSVN"
22372 target "http://tortoisesvn.tigris.org/"
22373 literal "false"
22374
22375 \end_inset
22376
22377 , which integrates Subversion operations into the context (rightclick) menu
22378  of Windows Explorer.
22379  Operations done outside \SpecialChar LyX
22380  will typically be more convenient using the Explorer
22381  context menu.
22382  Note that TortoiseSVN is not a replacement for the client program, which
22383  is what \SpecialChar LyX
22384  itself will use.
22385 \end_layout
22386
22387 \begin_layout Subsubsection
22388 Bringing a document under Subversion control
22389 \end_layout
22390
22391 \begin_layout Standard
22392 Before a \SpecialChar LyX
22393  document can be brought under version control in Subversion, its
22394  parent directory needs to be under version control.
22395  If the document is being added to a project already in the repository,
22396  this is accomplished by checking the project out to the directory where
22397  the new document will be placed.
22398  If the project itself is not yet under version control (for instance, if
22399  this document starts a new project), the directory must be imported into
22400  the repository.
22401  This is done outside \SpecialChar LyX
22402 .
22403  Both import and checkout are easily accomplished from the Explorer context
22404  menu using TortoiseSVN, or alternatively can be done using the command
22405  line client at a DOS prompt.
22406  The procedure for importing the project using TortoiseSVN is described
22407  below, assuming an existing repository and a new project being started
22408  in 
22409 \family typewriter
22410 C:
22411 \backslash
22412 new project
22413 \family default
22414 .
22415  For information on using the Subversion client program, run 
22416 \family typewriter
22417 svn --help 
22418 \family default
22419 in a DOS shell.
22420 \end_layout
22421
22422 \begin_layout Enumerate
22423 Locate 
22424 \family typewriter
22425 C:
22426 \backslash
22427 new project 
22428 \family default
22429 in Windows Explorer, right click it, and select 
22430 \family sans
22431 TortoiseSVN\SpecialChar menuseparator
22432 Repo-browser
22433 \family default
22434 .
22435  If necessary, adjust the URL for the repository, then click OK.
22436 \end_layout
22437
22438 \begin_layout Enumerate
22439 Right click the level of the repository under which you want to place the
22440  new project folder (typically the top level) and click 
22441 \family sans
22442 Create folder
22443 \family default
22444  Supply a name for the project folder and click OK.
22445  Add a message for the log file if desired, then click OK again.
22446  The new project folder should appear in the repository.
22447  Finally, click OK again to exit the repository browser.
22448 \end_layout
22449
22450 \begin_layout Enumerate
22451 Once again right click 
22452 \family typewriter
22453 C:
22454 \backslash
22455 new project
22456 \family default
22457 , this time selecting SVN Checkout\SpecialChar ldots
22458  Select the URL of the project folder
22459  you just created in the repository, and set the checkout directory to 
22460 \family typewriter
22461 C:
22462 \backslash
22463 new project.
22464
22465 \family default
22466  Click OK.
22467  You will be warned about a non-empty folder; click OK to proceed.
22468  You should now have a 
22469 \family typewriter
22470 .svn
22471 \family default
22472  directory under 
22473 \family typewriter
22474 C:
22475 \backslash
22476 new project.
22477 \end_layout
22478
22479 \begin_layout Enumerate
22480 Create or open your document in \SpecialChar LyX
22481  and click 
22482 \family sans
22483 File\SpecialChar menuseparator
22484 Version
22485 \begin_inset space ~
22486 \end_inset
22487
22488 Control\SpecialChar menuseparator
22489 Register.
22490  
22491 \family default
22492 Add a log message and click OK to commit the document to version control.
22493 \end_layout
22494
22495 \begin_layout Standard
22496 From this point onward, you should have full functionality in the 
22497 \family sans
22498 File\SpecialChar menuseparator
22499 Version
22500 \begin_inset space ~
22501 \end_inset
22502
22503 Control
22504 \family default
22505  menu.
22506  You also have the option of checking the document in and out, viewing its
22507  history, etc.
22508  using the TortoiseSVN context menu in Windows Explorer or the Subversion
22509  client program from a command prompt.
22510 \end_layout
22511
22512 \begin_layout Subsubsection
22513 SSH tunnel used with SVN under Windows
22514 \end_layout
22515
22516 \begin_layout Standard
22517 Compared with Linux setting up an svn client to communicate over ssh under
22518  Windows is a rather troublesome task.
22519  We will at least offer some hints how to setup the client side but prior
22520  knowledge about ssh and the Windows command line is needed, also be prepared
22521  for a great deal of frustration\SpecialChar ldots
22522
22523 \end_layout
22524
22525 \begin_layout Enumerate
22526 Get an svn client for windows, as described in the previous sections.
22527  When it is a fresh install run some svn command (e.g.
22528  
22529 \begin_inset Flex Code
22530 status collapsed
22531
22532 \begin_layout Plain Layout
22533 svn –version
22534 \end_layout
22535
22536 \end_inset
22537
22538 ) to create config files, which you will need to change later on.
22539 \end_layout
22540
22541 \begin_layout Enumerate
22542 Choose an ssh client for Windows.
22543  There are several possibilities, we will use the one from Putty tools
22544 \begin_inset Foot
22545 status collapsed
22546
22547 \begin_layout Plain Layout
22548 \begin_inset Flex URL
22549 status collapsed
22550
22551 \begin_layout Plain Layout
22552
22553 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
22554 \end_layout
22555
22556 \end_inset
22557
22558
22559 \end_layout
22560
22561 \end_inset
22562
22563 .
22564  You will need to set the connection up so that the client doesn't ask for
22565  any password from you.
22566  To keep things easy we will use only keys without any additional password
22567  protection etc.
22568 \end_layout
22569
22570 \begin_deeper
22571 \begin_layout Enumerate
22572 Generate keys by 
22573 \begin_inset Flex Code
22574 status collapsed
22575
22576 \begin_layout Plain Layout
22577 puttygen
22578 \end_layout
22579
22580 \end_inset
22581
22582 .
22583  Save your private .ppk key file and put the public one on the server side.
22584  If the SVN server runs on Linux, note that the format of the public key
22585  is not compatible with Linux openssh and you will need to direcly copy-paste
22586  the key from the “
22587 \emph on
22588 Public key for pasting into OpenSSH authorized_keys file
22589 \emph default
22590 :” edit field into the server's 
22591 \begin_inset Flex Code
22592 status collapsed
22593
22594 \begin_layout Plain Layout
22595 ~/.ssh/authorized_keys
22596 \end_layout
22597
22598 \end_inset
22599
22600  / 
22601 \begin_inset Flex Code
22602 status collapsed
22603
22604 \begin_layout Plain Layout
22605 authorized_keys2
22606 \end_layout
22607
22608 \end_inset
22609
22610  file.
22611 \end_layout
22612
22613 \begin_layout Enumerate
22614 Get the Putty's 
22615 \begin_inset Flex Code
22616 status collapsed
22617
22618 \begin_layout Plain Layout
22619 plink
22620 \end_layout
22621
22622 \end_inset
22623
22624 .
22625  In the SVN config file
22626 \begin_inset Foot
22627 status collapsed
22628
22629 \begin_layout Plain Layout
22630 Exact path depends on Windows version, usually somewhere around 
22631 \begin_inset Flex Code
22632 status collapsed
22633
22634 \begin_layout Plain Layout
22635 c:
22636 \backslash
22637 Documents and Settings
22638 \backslash
22639 user
22640 \backslash
22641 Application Data
22642 \backslash
22643 Subversion
22644 \backslash
22645 config
22646 \end_layout
22647
22648 \end_inset
22649
22650  / 
22651 \begin_inset Flex Code
22652 status collapsed
22653
22654 \begin_layout Plain Layout
22655 AppData
22656 \backslash
22657 Roaming
22658 \backslash
22659 Subversion
22660 \end_layout
22661
22662 \end_inset
22663
22664 .
22665 \end_layout
22666
22667 \end_inset
22668
22669 , section [tunnels], setup ssh command, e.g.
22670  
22671 \begin_inset Flex Code
22672 status collapsed
22673
22674 \begin_layout Plain Layout
22675 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
22676 \end_layout
22677
22678 \end_inset
22679
22680 .
22681 \begin_inset Foot
22682 status collapsed
22683
22684 \begin_layout Plain Layout
22685 It will usually take a lot of time to get exact command right and it depends
22686  on many things.
22687  For example do not have some remote server saved as a default session in
22688  Putty etc.
22689  If things fail, try to connect via plink without SVN first.
22690 \end_layout
22691
22692 \end_inset
22693
22694
22695 \end_layout
22696
22697 \end_deeper
22698 \begin_layout Enumerate
22699 Checkout the SVN archive, e.
22700 \begin_inset space \thinspace{}
22701 \end_inset
22702
22703 g.
22704 \begin_inset Newline newline
22705 \end_inset
22706
22707
22708 \begin_inset Flex Code
22709 status collapsed
22710
22711 \begin_layout Plain Layout
22712 svn co svn+ssh://user@server/repository_path
22713 \end_layout
22714
22715 \end_inset
22716
22717 .
22718 \end_layout
22719
22720 \begin_layout Subsubsection
22721 End-of-Line Conversions
22722 \end_layout
22723
22724 \begin_layout Standard
22725 When the collaborators are mixing Linux and Windows environments, \SpecialChar LyX
22726  will
22727  use different line endings inside the .lyx files.
22728  This is not a problem as far as \SpecialChar LyX
22729  functionality is concerned, but the commit
22730  diffs will be huge and merge-conflicts prone.
22731  Fortunately SVN itself knows
22732 \begin_inset Foot
22733 status collapsed
22734
22735 \begin_layout Plain Layout
22736 \begin_inset Flex URL
22737 status collapsed
22738
22739 \begin_layout Plain Layout
22740
22741 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
22742 \end_layout
22743
22744 \end_inset
22745
22746
22747 \end_layout
22748
22749 \end_inset
22750
22751  how to deal with CR/LF problems when switching .lyx files to the 
22752 \begin_inset Flex Code
22753 status collapsed
22754
22755 \begin_layout Plain Layout
22756 native
22757 \end_layout
22758
22759 \end_inset
22760
22761  mode.
22762 \begin_inset Foot
22763 status collapsed
22764
22765 \begin_layout Plain Layout
22766 For the lazy guys: 
22767 \begin_inset Flex Code
22768 status collapsed
22769
22770 \begin_layout Plain Layout
22771 svn propset svn:eol-style native FILE_NAME
22772 \end_layout
22773
22774 \end_inset
22775
22776
22777 \end_layout
22778
22779 \end_inset
22780
22781
22782 \end_layout
22783
22784 \begin_layout Subsection
22785 GIT commands in \SpecialChar LyX
22786
22787 \end_layout
22788
22789 \begin_layout Standard
22790 A minimal subset of GIT commands is now supported by \SpecialChar LyX
22791 .
22792  You can find the commands in the 
22793 \family sans
22794 File\SpecialChar menuseparator
22795 Version
22796 \begin_inset space ~
22797 \end_inset
22798
22799 Control
22800 \family default
22801  submenu.
22802  Please note that if you use password protected access to repository via
22803  ssh, you will be asked in terminal window.
22804  \SpecialChar LyX
22805  was tested against GIT 1.7.
22806 \begin_inset Foot
22807 status open
22808
22809 \begin_layout Plain Layout
22810 Windows users please note that you need to ensure that git is on the path.
22811  This can be set from within \SpecialChar LyX
22812  at 
22813 \family sans
22814 Tools\SpecialChar menuseparator
22815 Preferences\SpecialChar menuseparator
22816 Paths\SpecialChar menuseparator
22817 PATH prefix
22818 \family default
22819 .
22820 \end_layout
22821
22822 \end_inset
22823
22824
22825 \end_layout
22826
22827 \begin_layout Standard
22828 One big difference of GIT and the other supported version control systems
22829  is the distributed nature of GIT: With traditional version control systems
22830  there is one central server which hosts the repository.
22831  Users commit their changes to the server, and get updates made by other
22832  users from it.
22833  With GIT, users commit to a local repository.
22834  The local repository can be synchronized with one or more remote repositories
22835  using the 
22836 \begin_inset Flex Code
22837 status collapsed
22838
22839 \begin_layout Plain Layout
22840 pull
22841 \end_layout
22842
22843 \end_inset
22844
22845  and 
22846 \begin_inset Flex Code
22847 status collapsed
22848
22849 \begin_layout Plain Layout
22850 push
22851 \end_layout
22852
22853 \end_inset
22854
22855  GIT commands.
22856  \SpecialChar LyX
22857  does not interact in any way with remote GIT repositories.
22858  It works exclusively with the local repository in a very similar way as
22859  with a central CVS or SVN repository.
22860  If you use remote GIT repositories you need to do the 
22861 \begin_inset Flex Code
22862 status collapsed
22863
22864 \begin_layout Plain Layout
22865 pull
22866 \end_layout
22867
22868 \end_inset
22869
22870  and 
22871 \begin_inset Flex Code
22872 status collapsed
22873
22874 \begin_layout Plain Layout
22875 push
22876 \end_layout
22877
22878 \end_inset
22879
22880  operations with your favourite GIT client.
22881 \end_layout
22882
22883 \begin_layout Subsubsection
22884
22885 \family sans
22886 Register
22887 \end_layout
22888
22889 \begin_layout Standard
22890 If your document is not under revision control, this is the only item shown
22891  in the menu.
22892  And if it is under revision control, the 
22893 \family sans
22894 Register
22895 \family default
22896  item is not visible.
22897 \end_layout
22898
22899 \begin_layout Standard
22900 This command registers in GIT your document ONLY in case you have already
22901  the documents directory under GIT control (in particular 
22902 \family typewriter
22903 .git/index
22904 \family default
22905  file exists).
22906  This means you have to checkout the archive by yourself.
22907 \end_layout
22908
22909 \begin_layout Standard
22910 Then you are asked interactively to supply an initial description of the
22911  document.
22912  Don't forget that registered file is not yet commited.
22913 \end_layout
22914
22915 \begin_layout Standard
22916 GIT command that is run: 
22917 \family typewriter
22918 git add 
22919 \begin_inset Quotes eld
22920 \end_inset
22921
22922 <file-name>
22923 \begin_inset Quotes erd
22924 \end_inset
22925
22926
22927 \end_layout
22928
22929 \begin_layout Standard
22930 Read 
22931 \family typewriter
22932 man git
22933 \family default
22934  to understand the switches.
22935 \end_layout
22936
22937 \begin_layout Subsubsection
22938
22939 \family sans
22940 Check In Changes
22941 \end_layout
22942
22943 \begin_layout Standard
22944 When you are finished editing a file, you commit your changes.
22945  When you do this, you are asked for a description of the changes.
22946  After that changes are commited.
22947 \end_layout
22948
22949 \begin_layout Standard
22950 GIT command: 
22951 \family typewriter
22952 git commit -q -m"<description>" <file-name>
22953 \end_layout
22954
22955 \begin_layout Subsubsection
22956
22957 \family sans
22958 Revert To Repository Version
22959 \end_layout
22960
22961 \begin_layout Standard
22962 This will discard all changes made to the document since the last check
22963  in.
22964  You get a warning before changes are discarded.
22965 \end_layout
22966
22967 \begin_layout Standard
22968 GIT command: 
22969 \family typewriter
22970 git checkout -q 
22971 \begin_inset Quotes eld
22972 \end_inset
22973
22974 <file-name>
22975 \begin_inset Quotes erd
22976 \end_inset
22977
22978
22979 \end_layout
22980
22981 \begin_layout Subsubsection
22982
22983 \family sans
22984 Rename
22985 \end_layout
22986
22987 \begin_layout Standard
22988 This will rename the current document including the version history.
22989  It requires a clean document without any changes since the last checkin.
22990  You are asked for a file name and a description of the rename operation.
22991  After that the document is renamed, both locally and in the repository.
22992  If the parent directories of the new and old file names differ, all relative
22993  paths of included files are adjusted (like in 
22994 \family sans
22995 File\SpecialChar menuseparator
22996 Save As
22997 \family default
22998 \SpecialChar ldots
22999 ).
23000  Finally, the document is reloaded using the new name.
23001 \end_layout
23002
23003 \begin_layout Labeling
23004 \labelwidthstring 00.00.0000
23005 GIT
23006 \begin_inset space ~
23007 \end_inset
23008
23009 commands: 
23010 \begin_inset space ~
23011 \end_inset
23012
23013
23014 \begin_inset Newline newline
23015 \end_inset
23016
23017
23018 \begin_inset Flex Code
23019 status collapsed
23020
23021 \begin_layout Plain Layout
23022 git mv 
23023 \family typewriter
23024
23025 \begin_inset Quotes eld
23026 \end_inset
23027
23028 <file-name>
23029 \begin_inset Quotes erd
23030 \end_inset
23031
23032  
23033 \begin_inset Quotes eld
23034 \end_inset
23035
23036 <new-file-name>
23037 \begin_inset Quotes erd
23038 \end_inset
23039
23040
23041 \end_layout
23042
23043 \end_inset
23044
23045
23046 \begin_inset Newline newline
23047 \end_inset
23048
23049
23050 \begin_inset Flex Code
23051 status collapsed
23052
23053 \begin_layout Plain Layout
23054 git commit
23055 \end_layout
23056
23057 \end_inset
23058
23059
23060 \end_layout
23061
23062 \begin_layout Subsubsection
23063
23064 \family sans
23065 Show History
23066 \end_layout
23067
23068 \begin_layout Standard
23069 This shows the complete history of the GIT document.
23070  The output of 
23071 \family typewriter
23072 git log 
23073 \begin_inset Quotes eld
23074 \end_inset
23075
23076 <file-name>
23077 \begin_inset Quotes erd
23078 \end_inset
23079
23080
23081 \family default
23082  is shown in a browser.
23083 \end_layout
23084
23085 \begin_layout Subsubsection
23086 Version Info
23087 \end_layout
23088
23089 \begin_layout Standard
23090 \SpecialChar LyX
23091  supports GIT hash number of the last commit to the file, author name, date
23092  and time of last commit.
23093  All those are extracted from 
23094 \family typewriter
23095 git log -n 1 --pretty=format:%H%n%an%n%ai
23096 \family default
23097 .
23098  Tree version information is obtained via 
23099 \family typewriter
23100 git describe --abbrev --dirty --long
23101 \family default
23102 .
23103  See 
23104 \begin_inset CommandInset ref
23105 LatexCommand ref
23106 reference "subsec:VCS-Revision-Information"
23107
23108 \end_inset
23109
23110  for other details.
23111 \end_layout
23112
23113 \begin_layout Subsection
23114 Further tuning
23115 \end_layout
23116
23117 \begin_layout Standard
23118 With the recent addition of the vc-command function \SpecialChar LyX
23119  power users are allowed
23120  to create their own commands for revision control.
23121 \end_layout
23122
23123 \begin_layout Standard
23124 As an example you can see how two TortoiseSVN commands could be integrated
23125  directly:
23126 \end_layout
23127
23128 \begin_layout Description
23129 Commit: 
23130 \begin_inset Flex Code
23131 status collapsed
23132
23133 \begin_layout Plain Layout
23134 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
23135 \end_layout
23136
23137 \end_inset
23138
23139
23140 \end_layout
23141
23142 \begin_layout Description
23143 Revert: 
23144 \begin_inset Flex Code
23145 status collapsed
23146
23147 \begin_layout Plain Layout
23148 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
23149 \end_layout
23150
23151 \end_inset
23152
23153
23154 \end_layout
23155
23156 \begin_layout Subsection
23157 Version control and Document comparison
23158 \end_layout
23159
23160 \begin_layout Standard
23161 One of the typical uses of version control is to inspect the changes between
23162  revisions, usually by creating 
23163 \begin_inset Flex Code
23164 status collapsed
23165
23166 \begin_layout Plain Layout
23167 diff
23168 \end_layout
23169
23170 \end_inset
23171
23172  dumps.
23173  While this is useful for plain text files, it is much less useful in the
23174  case of \SpecialChar LyX
23175  files, which have more a complicated structure.
23176  Hence we provide binding to the Document comparison feature.
23177  There are two ways of calling this feature - either by direct call of 
23178 \begin_inset Flex Code
23179 status collapsed
23180
23181 \begin_layout Plain Layout
23182 VC_COMPARE
23183 \end_layout
23184
23185 \end_inset
23186
23187  \SpecialChar LyX
23188  function (for details see \SpecialChar LyX
23189  functions manual) or by icon/menu item 
23190 \begin_inset Flex Noun
23191 status collapsed
23192
23193 \begin_layout Plain Layout
23194 Compare with older revision...
23195 \end_layout
23196
23197 \end_inset
23198
23199 .
23200  One can either compare two chosen revisions of the document or he can simply
23201  compare the current version of edited text with older revisions (where
23202  '
23203 \begin_inset Flex Noun
23204 status collapsed
23205
23206 \begin_layout Plain Layout
23207 0
23208 \end_layout
23209
23210 \end_inset
23211
23212 ' revisions back means comparison of the edited file with last commited
23213  revision).
23214  
23215 \end_layout
23216
23217 \begin_layout Standard
23218 This feature is supported for SVN and RCS though due to the more complicated
23219  versioning scheme of RCS there is a constraint – when addressing the revisions
23220  in dialog, numbers always point to the last number in RCS revision number,
23221  i.e.
23222  '35' in '1.2.35'.
23223  We don't currently support GIT addressing of revisions, one can just compare
23224  edited document with its revision X steps backs, where X is addressed as
23225  HEAD~X.
23226 \end_layout
23227
23228 \begin_layout Section
23229 Literate Programming
23230 \end_layout
23231
23232 \begin_layout Standard
23233 Updated by 
23234 \noun on
23235 Kayvan Sylvan 
23236 \noun default
23237 (kayvan@sylvan.com)
23238 \noun on
23239
23240 \noun default
23241 original documentation written by 
23242 \noun on
23243 Edmar Wienskoski Jr.
23244
23245 \noun default
23246  (edmar-w-jr@technologist.com)
23247 \end_layout
23248
23249 \begin_layout Subsection
23250 Introduction
23251 \end_layout
23252
23253 \begin_layout Standard
23254 The main purpose of this documentation is to show you how to use \SpecialChar LyX
23255  for literate
23256  programming, where it is assumed that you are familiar with this programming
23257  technique, and know what 
23258 \begin_inset Quotes eld
23259 \end_inset
23260
23261 tangling
23262 \begin_inset Quotes erd
23263 \end_inset
23264
23265  and 
23266 \begin_inset Quotes eld
23267 \end_inset
23268
23269 weaving
23270 \begin_inset Quotes erd
23271 \end_inset
23272
23273  means.
23274  If that is not the case, please follow the web links provided in the following
23275  sections.
23276  There is a lot of good documentation out there covering old development
23277  history to the latest tools tips.
23278 \end_layout
23279
23280 \begin_layout Standard
23281 It is also assumed that you are familiar with \SpecialChar LyX
23282  itself to a point that you
23283  are comfortable changing your \SpecialChar LyX
23284  preferences, and X resources file.
23285  If that is not the case please refer to other \SpecialChar LyX
23286  documentation to cover your
23287  specific needs.
23288 \end_layout
23289
23290 \begin_layout Subsection
23291 Literate Programming
23292 \end_layout
23293
23294 \begin_layout Standard
23295 From the Literate Programming FAQ: 
23296 \end_layout
23297
23298 \begin_layout Quotation
23299 Literate programming is the combination of documentation and source together
23300  in a fashion suited for reading by human beings.
23301  In fact, literate programs should be enjoyable reading, even inviting!
23302  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
23303  and documentation in a single file.
23304  Literate programming tools then parse the file to produce either readable
23305  documentation or compilable source.
23306  The WEB style of literate programming was created by D.
23307 \begin_inset space \thinspace{}
23308 \end_inset
23309
23310 E.
23311  Knuth during the development of his \SpecialChar TeX
23312  typesetting software.
23313  
23314 \end_layout
23315
23316 \begin_layout Standard
23317 Another excerpt says:
23318 \end_layout
23319
23320 \begin_layout Quotation
23321
23322 \emph on
23323 How is literate programming different from verbose commenting?
23324 \end_layout
23325
23326 \begin_layout Quotation
23327 There are three distinguishing characteristics.
23328  In order of importance, they are: 
23329 \end_layout
23330
23331 \begin_deeper
23332 \begin_layout Itemize
23333 flexible order of elaboration 
23334 \end_layout
23335
23336 \begin_layout Itemize
23337 automatic support for browsing 
23338 \end_layout
23339
23340 \begin_layout Itemize
23341 typeset documentation, especially diagrams and mathematics 
23342 \end_layout
23343
23344 \end_deeper
23345 \begin_layout Standard
23346 Now that I sparked your curiosity, take a look in the references.
23347 \end_layout
23348
23349 \begin_layout Subsubsection
23350 References
23351 \end_layout
23352
23353 \begin_layout Standard
23354 The complete Literate Programming FAQ can be found at:
23355 \end_layout
23356
23357 \begin_layout Quote
23358 Literate Programming FAQ 
23359 \begin_inset Flex URL
23360 status collapsed
23361
23362 \begin_layout Plain Layout
23363
23364 http://www.literateprogramming.com/lpfaq.pdf
23365 \end_layout
23366
23367 \end_inset
23368
23369
23370 \end_layout
23371
23372 \begin_layout Standard
23373 The FAQ lists 23 (twenty three!) different literate programming tools.
23374  Where some are specialized or 
23375 \begin_inset Quotes eld
23376 \end_inset
23377
23378 tailored
23379 \begin_inset Quotes erd
23380 \end_inset
23381
23382  for particular programming languages, while other have general scope.
23383  I selected 
23384 \noun on
23385 Noweb
23386 \noun default
23387  for my own use for several reasons:
23388 \end_layout
23389
23390 \begin_layout Itemize
23391 It can generate the documentation either in \SpecialChar LaTeX
23392  or HTML.
23393 \end_layout
23394
23395 \begin_layout Itemize
23396 It has a open architecture, i.
23397 \begin_inset space \thinspace{}
23398 \end_inset
23399
23400 e.
23401 \begin_inset space \space{}
23402 \end_inset
23403
23404 it is easy to plug in new filters and to perform special processing that
23405  you may need.
23406  
23407 \end_layout
23408
23409 \begin_layout Itemize
23410 There is a good selection of filters available already (the HTML is one
23411  of them).
23412 \end_layout
23413
23414 \begin_layout Itemize
23415 It is free.
23416 \end_layout
23417
23418 \begin_layout Standard
23419 The Noweb web page can be found at: 
23420 \end_layout
23421
23422 \begin_layout Quote
23423 Noweb home page 
23424 \begin_inset Flex URL
23425 status collapsed
23426
23427 \begin_layout Plain Layout
23428
23429 http://www.cs.virginia.edu/~nr/noweb/
23430 \end_layout
23431
23432 \end_inset
23433
23434
23435 \end_layout
23436
23437 \begin_layout Standard
23438 Starting from there you can reach many other interesting links and even
23439  some literate program examples.
23440 \end_layout
23441
23442 \begin_layout Subsection
23443 \SpecialChar LyX
23444  and Literate Programming with Noweb
23445 \end_layout
23446
23447 \begin_layout Standard
23448 The \SpecialChar LyX
23449  support for Literate Programming is provided by using the generic \SpecialChar LyX
23450
23451  converters mechanism.
23452  This support is provided in a 
23453 \begin_inset Quotes eld
23454 \end_inset
23455
23456 Noweb independent
23457 \begin_inset Quotes erd
23458 \end_inset
23459
23460  way, i.
23461 \begin_inset space \thinspace{}
23462 \end_inset
23463
23464 e.
23465 \begin_inset space \space{}
23466 \end_inset
23467
23468 you will be able to use this new \SpecialChar LyX
23469  feature with some other literate programming
23470  tool of your choice by just changing your \SpecialChar LyX
23471  preferences.
23472 \end_layout
23473
23474 \begin_layout Subsubsection
23475 Generating documents and code (weaving and tangling)
23476 \end_layout
23477
23478 \begin_layout Paragraph
23479 Using the noweb module
23480 \end_layout
23481
23482 \begin_layout Standard
23483 If you have installed Noweb and \SpecialChar LyX
23484  successfully, whenever you open a new document,
23485  after you have chosen its document class, use the Document->Settings menu
23486  to add the 
23487 \begin_inset Quotes eld
23488 \end_inset
23489
23490 noweb
23491 \begin_inset Quotes erd
23492 \end_inset
23493
23494  module.
23495  If Noweb is correctly installed, when you click on the 
23496 \begin_inset Quotes eld
23497 \end_inset
23498
23499 Modules
23500 \begin_inset Quotes erd
23501 \end_inset
23502
23503  link, you will see the 
23504 \begin_inset Quotes eld
23505 \end_inset
23506
23507 noweb
23508 \begin_inset Quotes erd
23509 \end_inset
23510
23511  module in the available list and you can add it to your document.
23512 \end_layout
23513
23514 \begin_layout Paragraph
23515 Typing code in
23516 \end_layout
23517
23518 \begin_layout Standard
23519 \SpecialChar LyX
23520  enables you to write code with a layout named 
23521 \begin_inset Flex Noun
23522 status collapsed
23523
23524 \begin_layout Plain Layout
23525 Chunk
23526 \end_layout
23527
23528 \end_inset
23529
23530 .
23531  Noweb delimits chunks like this:
23532 \end_layout
23533
23534 \begin_layout LyX-Code
23535 <<My code>>=
23536 \end_layout
23537
23538 \begin_layout LyX-Code
23539   code
23540 \end_layout
23541
23542 \begin_layout LyX-Code
23543   more code
23544 \end_layout
23545
23546 \begin_layout LyX-Code
23547   even more code
23548 \end_layout
23549
23550 \begin_layout LyX-Code
23551   @
23552 \end_layout
23553
23554 \begin_layout Standard
23555 The problem is that whatever is written in between the << and the 
23556 \family typewriter
23557 @
23558 \family default
23559  must be taken literally, i.
23560 \begin_inset space \thinspace{}
23561 \end_inset
23562
23563 e.
23564 \begin_inset space \space{}
23565 \end_inset
23566
23567 \SpecialChar LyX
23568  should be prevented from making any special interpretation of what has
23569  been written.
23570  This is also handled by 
23571 \begin_inset Flex Noun
23572 status collapsed
23573
23574 \begin_layout Plain Layout
23575 Chunk
23576 \end_layout
23577
23578 \end_inset
23579
23580 , that works like a normal paragraph but has a free spacing capability.
23581 \end_layout
23582
23583 \begin_layout Standard
23584 As a special note, you can also use the 
23585 \begin_inset Quotes eld
23586 \end_inset
23587
23588 %def
23589 \begin_inset Quotes erd
23590 \end_inset
23591
23592  construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
23593 rence:
23594 \end_layout
23595
23596 \begin_layout LyX-Code
23597 <<My chunk>>=
23598 \end_layout
23599
23600 \begin_layout LyX-Code
23601 def some_function(args):
23602 \end_layout
23603
23604 \begin_layout LyX-Code
23605    "This is the doc string for this function."
23606 \end_layout
23607
23608 \begin_layout LyX-Code
23609    print "My args: ", args
23610 \end_layout
23611
23612 \begin_layout LyX-Code
23613 @ %def some_function
23614 \end_layout
23615
23616 \begin_layout Standard
23617 For an example of this usage and the resulting cross-reference output, look
23618  at the Literate python program in 
23619 \emph on
23620 LIBDIR/examples/listerrors.lyx
23621 \emph default
23622  which should make this all clear.
23623 \end_layout
23624
23625 \begin_layout Paragraph
23626 Generating the documentation
23627 \end_layout
23628
23629 \begin_layout Standard
23630 At this point you already have a new document file with a proper document
23631  class, and with some code and text on it.
23632  How do I print it? The answer is simple, you select 
23633 \family sans
23634 View\SpecialChar menuseparator
23635 DVI,
23636 \family default
23637  etc.
23638  Just like you would do for a plain document.
23639  No special procedure is required.
23640 \end_layout
23641
23642 \begin_layout Standard
23643 To help orientate you, I will now explain what happens inside \SpecialChar LyX
23644 :
23645 \end_layout
23646
23647 \begin_layout Enumerate
23648 When the 
23649 \family sans
23650 Update\SpecialChar menuseparator
23651 DVI
23652 \family default
23653  menu option is chosen, a \SpecialChar LaTeX
23654  file is generated.
23655  
23656 \end_layout
23657
23658 \begin_deeper
23659 \begin_layout Standard
23660 If the document is of any literate class the generated file will be named
23661  with an extension name defined by the 
23662 \begin_inset Quotes eld
23663 \end_inset
23664
23665 literate
23666 \begin_inset Quotes erd
23667 \end_inset
23668
23669  format (defined in the Preferences panel), otherwise the file will have
23670  the usual 
23671 \family typewriter
23672 .tex
23673 \family default
23674  extension.
23675 \end_layout
23676
23677 \end_deeper
23678 \begin_layout Enumerate
23679 Note that the only difference so far is in the name of the file, no special
23680  processing is required by \SpecialChar LyX
23681 .
23682  Given that you formatted the code using the 
23683 \begin_inset Flex Noun
23684 status collapsed
23685
23686 \begin_layout Plain Layout
23687 Chunk
23688 \end_layout
23689
23690 \end_inset
23691
23692  layout that, by itself, takes care of the business.
23693 \end_layout
23694
23695 \begin_layout Enumerate
23696 If the document is of any literate class \SpecialChar LyX
23697  will then use the internal \SpecialChar LyX
23698  to
23699  Noweb converter, followed by the Noweb to \SpecialChar LaTeX
23700  converter
23701 \begin_inset Foot
23702 status collapsed
23703
23704 \begin_layout Plain Layout
23705 The converters are defined in the 
23706 \family sans
23707 Tools\SpecialChar menuseparator
23708 Preferences
23709 \family default
23710  panel, under the 
23711 \begin_inset Quotes eld
23712 \end_inset
23713
23714 Conversion
23715 \begin_inset Quotes erd
23716 \end_inset
23717
23718  tab.
23719  See section 
23720 \emph on
23721 Converters
23722 \emph default
23723  of the 
23724 \emph on
23725 Customization
23726 \emph default
23727  manual for general information about converters.
23728 \end_layout
23729
23730 \end_inset
23731
23732  to generate the \SpecialChar LaTeX
23733  file.
23734 \end_layout
23735
23736 \begin_deeper
23737 \begin_layout Standard
23738 Otherwise it will just skip this step.
23739 \end_layout
23740
23741 \end_deeper
23742 \begin_layout Enumerate
23743 Finally, \SpecialChar LaTeX
23744  is invoked and the regular post processing continues as in a plain
23745  document.
23746 \end_layout
23747
23748 \begin_layout Standard
23749 Independence from a particular 
23750 \begin_inset Quotes eld
23751 \end_inset
23752
23753 literate tool
23754 \begin_inset Quotes erd
23755 \end_inset
23756
23757  is easily achieved by changing the commands that are run by the various
23758  converters.
23759 \end_layout
23760
23761 \begin_layout Paragraph
23762 Generating the code
23763 \end_layout
23764
23765 \begin_layout Standard
23766 When the build menu option is chosen or the corresponding button in the
23767  toolbar is pressed, a \SpecialChar LaTeX
23768  file is generated just like step 1 above.
23769  Next, \SpecialChar LyX
23770  invokes the 
23771 \family typewriter
23772 Noweb->Program
23773 \family default
23774  converter.
23775  This converter needs to be defined by the user and is not installed by
23776  default, though the Program format is.
23777  This converter (like any other converter) will have two parts:
23778 \end_layout
23779
23780 \begin_layout Enumerate
23781 The converter program itself.
23782  This program performs the conversion from the one format to the other (in
23783  this case, from the Noweb format to the Program pseudo-format).
23784 \end_layout
23785
23786 \begin_layout Enumerate
23787 The error log parser.
23788  This is a program whose sole purpose is to rewrite error messages in a
23789  format that \SpecialChar LyX
23790  understands.
23791  This makes it possible for \SpecialChar LyX
23792  to place error boxes in the right places in
23793  the file buffer.
23794 \end_layout
23795
23796 \begin_layout Standard
23797 The first part, the 
23798 \begin_inset Quotes eld
23799 \end_inset
23800
23801 Converter
23802 \begin_inset Quotes erd
23803 \end_inset
23804
23805  setting, should be set to
23806 \begin_inset Newline newline
23807 \end_inset
23808
23809
23810 \begin_inset Quotes eld
23811 \end_inset
23812
23813
23814 \family typewriter
23815 build-script $$i
23816 \family default
23817  $$r
23818 \begin_inset Quotes erd
23819 \end_inset
23820
23821 .
23822 \begin_inset Newline newline
23823 \end_inset
23824
23825 This basically means that \SpecialChar LyX
23826  will call 
23827 \begin_inset Quotes eld
23828 \end_inset
23829
23830 build-script
23831 \begin_inset Quotes erd
23832 \end_inset
23833
23834  (a program or script) with the name of the Noweb file (normally a file
23835  in the \SpecialChar LyX
23836  temp directory) and the directory path of the original \SpecialChar LyX
23837  file.
23838  
23839 \end_layout
23840
23841 \begin_layout Standard
23842 This is an implementation of 
23843 \begin_inset Quotes eld
23844 \end_inset
23845
23846 build-script
23847 \begin_inset Quotes erd
23848 \end_inset
23849
23850  that you can place in a directory on your path:
23851 \end_layout
23852
23853 \begin_layout Standard
23854 \begin_inset VSpace defskip
23855 \end_inset
23856
23857
23858 \end_layout
23859
23860 \begin_layout Standard
23861 \begin_inset Newpage pagebreak
23862 \end_inset
23863
23864
23865 \end_layout
23866
23867 \begin_layout Standard
23868
23869 \family sans
23870 #!/bin/sh
23871 \end_layout
23872
23873 \begin_layout Standard
23874
23875 \family sans
23876 #
23877 \end_layout
23878
23879 \begin_layout Standard
23880
23881 \family sans
23882 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
23883 \end_layout
23884
23885 \begin_layout Standard
23886 \begin_inset VSpace defskip
23887 \end_inset
23888
23889
23890 \end_layout
23891
23892 \begin_layout Standard
23893 The next part of the converter setting is the 
23894 \begin_inset Quotes eld
23895 \end_inset
23896
23897 Flags
23898 \begin_inset Quotes erd
23899 \end_inset
23900
23901  which is to be set to
23902 \begin_inset Newline newline
23903 \end_inset
23904
23905
23906 \begin_inset Quotes eld
23907 \end_inset
23908
23909
23910 \family typewriter
23911 parselog=$$s/scripts/listerrors
23912 \family default
23913
23914 \begin_inset Quotes erd
23915 \end_inset
23916
23917 .
23918 \begin_inset Newline newline
23919 \end_inset
23920
23921 This will run any errors that are generated by the 
23922 \begin_inset Quotes eld
23923 \end_inset
23924
23925 build-script
23926 \begin_inset Quotes erd
23927 \end_inset
23928
23929  process through the 
23930 \begin_inset Quotes eld
23931 \end_inset
23932
23933 listerrors
23934 \begin_inset Quotes erd
23935 \end_inset
23936
23937  program.
23938 \end_layout
23939
23940 \begin_layout Standard
23941 The build will normally take place in \SpecialChar LyX
23942 's temporary directory, so the files
23943  produced by the conversion will be in that directory.
23944  \SpecialChar LyX
23945  will copy out what it regards as the `main' file, but the 
23946 \family typewriter
23947 Noweb->Program
23948 \family default
23949  conversion may produce several files, and so most of these would then be
23950  deleted when \SpecialChar LyX
23951  was closed.
23952  This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
23953  the build-script chunk can place the generated files in that location.
23954 \end_layout
23955
23956 \begin_layout Paragraph
23957 Build instructions in the document
23958 \end_layout
23959
23960 \begin_layout Standard
23961 The last piece of the integration between \SpecialChar LyX
23962  and noweb is the 
23963 \begin_inset Quotes eld
23964 \end_inset
23965
23966 build-script
23967 \begin_inset Quotes erd
23968 \end_inset
23969
23970  chunk.
23971  Generally, the instructions for building your program should be embedded
23972  in a chunk of its own.
23973  The noweb-specific 
23974 \begin_inset Quotes eld
23975 \end_inset
23976
23977 build-script
23978 \begin_inset Quotes erd
23979 \end_inset
23980
23981  above uses the notangle command to look for this chunk (called 
23982 \begin_inset Quotes eld
23983 \end_inset
23984
23985 build-script
23986 \begin_inset Quotes erd
23987 \end_inset
23988
23989 ) and runs its contents through 
23990 \begin_inset Quotes eld
23991 \end_inset
23992
23993 sh
23994 \begin_inset Quotes erd
23995 \end_inset
23996
23997 .
23998 \end_layout
23999
24000 \begin_layout Standard
24001 Typically, such a chunk would look something like this:
24002 \end_layout
24003
24004 \begin_layout LyX-Code
24005 <<build-script>>=
24006 \end_layout
24007
24008 \begin_layout LyX-Code
24009 #!/bin/sh
24010 \begin_inset Newline newline
24011 \end_inset
24012
24013 if [ -z "${NOWEB_SOURCE}" ]
24014 \begin_inset Newline newline
24015 \end_inset
24016
24017 then
24018 \end_layout
24019
24020 \begin_layout LyX-Code
24021 NOWEB_SOURCE=myfile.nw
24022 \begin_inset Newline newline
24023 \end_inset
24024
24025 fi
24026 \begin_inset Newline newline
24027 \end_inset
24028
24029 [...
24030  code to extract files ...
24031  use NOWEB_OUTPUT_DIR here ...]
24032 \begin_inset Newline newline
24033 \end_inset
24034
24035 [...
24036  code to compile files ...]
24037 \begin_inset Newline newline
24038 \end_inset
24039
24040 @
24041 \end_layout
24042
24043 \begin_layout Standard
24044 Look in 
24045 \emph on
24046 LIBDIR/examples/listerrors.lyx
24047 \emph default
24048  or in 
24049 \emph on
24050 LIBDIR/examples/Literate.lyx
24051 \emph default
24052  which implement two versions of the 
24053 \begin_inset Quotes eld
24054 \end_inset
24055
24056 listerrors
24057 \begin_inset Quotes erd
24058 \end_inset
24059
24060  program for some illustrations of how all of these pieces go together or
24061  in 
24062 \emph on
24063 LIBDIR/examples/noweb2lyx.lyx.
24064
24065 \emph default
24066  Interestingly, these three files show off the language-indepence of the
24067  \SpecialChar LyX
24068  literate programming support since they are written in Python, C and Perl
24069  respectively.
24070 \end_layout
24071
24072 \begin_layout Subsubsection
24073 Configuring \SpecialChar LyX
24074
24075 \end_layout
24076
24077 \begin_layout Standard
24078 All the Literate Programming support is configured by the 
24079 \family sans
24080 Tools\SpecialChar menuseparator
24081 Preferences
24082 \family default
24083  panel in the 
24084 \begin_inset Quotes eld
24085 \end_inset
24086
24087 File Handling
24088 \begin_inset Quotes erd
24089 \end_inset
24090
24091  tab.
24092  The important parts are:
24093 \end_layout
24094
24095 \begin_layout Description
24096 the
24097 \begin_inset space ~
24098 \end_inset
24099
24100
24101 \begin_inset Quotes eld
24102 \end_inset
24103
24104 NoWeb
24105 \begin_inset Quotes erd
24106 \end_inset
24107
24108
24109 \begin_inset space ~
24110 \end_inset
24111
24112 format Set up via the File Formats tab, this is where the Noweb-specific
24113  pieces are set up.
24114  The 
24115 \family sans
24116 GUI Name
24117 \family default
24118  is set to 
24119 \family typewriter
24120 NoWeb
24121 \family default
24122 , the file extension is set to 
24123 \family typewriter
24124 .nw
24125 \family default
24126 .
24127  This tells \SpecialChar LyX
24128  to create a file with a 
24129 \family typewriter
24130 .nw
24131 \family default
24132  extension in the first step of the conversion process.
24133 \end_layout
24134
24135 \begin_layout Description
24136 the
24137 \begin_inset space ~
24138 \end_inset
24139
24140
24141 \family sans
24142 Program
24143 \family default
24144
24145 \begin_inset space ~
24146 \end_inset
24147
24148 format This is an empty format whose sole purpose is to be the endpoint
24149  of a conversion (which then allows us to set up a converter for it).
24150 \end_layout
24151
24152 \begin_layout Description
24153
24154 \family sans
24155 NoWeb
24156 \family default
24157 ->
24158 \family sans
24159 \SpecialChar LaTeX
24160
24161 \family default
24162  This converter performs the 
24163 \begin_inset Quotes eld
24164 \end_inset
24165
24166 weaving
24167 \begin_inset Quotes erd
24168 \end_inset
24169
24170  of the literate document.
24171  For Noweb, it is set to 
24172 \begin_inset Quotes eld
24173 \end_inset
24174
24175
24176 \family typewriter
24177 noweave -delay -index $$i > $$o
24178 \family default
24179
24180 \begin_inset Quotes erd
24181 \end_inset
24182
24183
24184 \end_layout
24185
24186 \begin_layout Description
24187
24188 \family sans
24189 NoWeb
24190 \family default
24191 ->
24192 \family sans
24193 Program
24194 \family default
24195  This performs the 
24196 \begin_inset Quotes eld
24197 \end_inset
24198
24199 tangling step
24200 \begin_inset Quotes erd
24201 \end_inset
24202
24203 .
24204  As stated above, the Converter is set to 
24205 \begin_inset Quotes eld
24206 \end_inset
24207
24208
24209 \family typewriter
24210 build-script $$i
24211 \family default
24212  $$r
24213 \begin_inset Quotes erd
24214 \end_inset
24215
24216 , with Flags set to
24217 \begin_inset Newline newline
24218 \end_inset
24219
24220
24221 \begin_inset Quotes eld
24222 \end_inset
24223
24224
24225 \family typewriter
24226 parselog=$$s/scripts/listerrors
24227 \family default
24228
24229 \begin_inset Quotes erd
24230 \end_inset
24231
24232 .
24233 \end_layout
24234
24235 \begin_layout Subsubsection
24236 Debug extensions
24237 \end_layout
24238
24239 \begin_layout Standard
24240 There is also a new function implemented in the \SpecialChar LyX
24241  server, the 
24242 \begin_inset Quotes eld
24243 \end_inset
24244
24245 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
24246  
24247 \end_layout
24248
24249 \begin_layout Standard
24250 When debugging code with ddd/gdb, it is possible to invoke a text editor
24251  at the current execution position with a single key stroke.
24252  The default ddd configuration for that is shift-ctrl-V.
24253  It happens that you can define the editor command line invocation in ddd
24254  by accessing the 
24255 \family sans
24256 Edit\SpecialChar menuseparator
24257 Preferences\SpecialChar menuseparator
24258 Helpers
24259 \family default
24260  dialog and changing the "Edit Sources" entry.
24261 \end_layout
24262
24263 \begin_layout Standard
24264 I take advantage of the newly created \SpecialChar LyX
24265  server function and this ddd feature,
24266  and set 
24267 \begin_inset Quotes eld
24268 \end_inset
24269
24270 Edit Sources
24271 \begin_inset Quotes erd
24272 \end_inset
24273
24274  to:
24275 \end_layout
24276
24277 \begin_layout Standard
24278 \begin_inset VSpace defskip
24279 \end_inset
24280
24281
24282 \end_layout
24283
24284 \begin_layout Standard
24285
24286 \family sans
24287 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
24288 \end_layout
24289
24290 \begin_layout Standard
24291 \begin_inset VSpace defskip
24292 \end_inset
24293
24294
24295 \end_layout
24296
24297 \begin_layout Standard
24298 With this, whenever you are using ddd and find a point in the program that
24299  you want to edit, you just press shift-ctrl-V (in the ddd window), and
24300  ddd will forward this information to \SpecialChar LyX
24301  through the \SpecialChar LyX
24302  server and then the
24303  \SpecialChar LyX
24304  window will show the same file with the cursor at the same position ddd
24305  was pointing to.
24306  No more guessing or long scrolling to locate a point in the program back
24307  from debugging !
24308 \end_layout
24309
24310 \begin_layout Standard
24311 Note however that you must enable the \SpecialChar LyX
24312  server to get this feature working
24313  (it is disabled by default).
24314  You can enable it in 
24315 \family sans
24316 Preferences
24317 \family default
24318  (tabs 
24319 \family sans
24320 Inputs
24321 \family default
24322
24323 \family sans
24324 Paths
24325 \family default
24326 ) by entering in the 
24327 \family sans
24328 \SpecialChar LyX
24329 server pipe
24330 \family default
24331  a path like 
24332 \begin_inset Quotes eld
24333 \end_inset
24334
24335
24336 \family typewriter
24337 /home/<your-home-directory>/.lyx/lyxpipe
24338 \family default
24339
24340 \begin_inset Quotes erd
24341 \end_inset
24342
24343
24344 \end_layout
24345
24346 \begin_layout Standard
24347 Read the \SpecialChar LyX
24348  server documentation in the 
24349 \emph on
24350 Customization Manual
24351 \emph default
24352  for further information.
24353 \end_layout
24354
24355 \begin_layout Subsubsection
24356 Toolbar extensions
24357 \end_layout
24358
24359 \begin_layout Standard
24360 There are six new buttons that can be added to your \SpecialChar LyX
24361  toolbar.
24362  Five of these buttons are short cuts to layout styles: 
24363 \family sans
24364 Standard
24365 \family default
24366
24367 \family sans
24368 Section
24369 \family default
24370
24371 \family sans
24372 \SpecialChar LaTeX
24373
24374 \family default
24375
24376 \family sans
24377 \SpecialChar LyX
24378 -Code
24379 \family default
24380 , and 
24381 \family sans
24382 Chunk
24383 \family default
24384 .
24385  The last one is a short cut to the 
24386 \begin_inset Quotes eld
24387 \end_inset
24388
24389 Build Program
24390 \begin_inset Quotes erd
24391 \end_inset
24392
24393  File menu entry.
24394  
24395 \end_layout
24396
24397 \begin_layout Standard
24398 \SpecialChar LyX
24399  has a range of buttons that are available for tool bar customization.
24400  In my toolbar I like to combine the six short cuts above with two more:
24401  One for 
24402 \family sans
24403 Document
24404 \family default
24405 \SpecialChar menuseparator
24406
24407 \family sans
24408 Update
24409 \family default
24410 \SpecialChar menuseparator
24411
24412 \family sans
24413 DVI
24414 \family default
24415  and the other for 
24416 \family sans
24417 Document\SpecialChar menuseparator
24418 View\SpecialChar menuseparator
24419 DVI
24420 \family default
24421  File menu entries.
24422  Here is how it looks like:
24423 \end_layout
24424
24425 \begin_layout LyX-Code
24426 Toolbar
24427 \end_layout
24428
24429 \begin_layout LyX-Code
24430   Layouts
24431 \end_layout
24432
24433 \begin_layout LyX-Code
24434   Icon "layout Standard"
24435 \end_layout
24436
24437 \begin_layout LyX-Code
24438   Icon "layout Section"
24439 \end_layout
24440
24441 \begin_layout LyX-Code
24442   Icon "layout \SpecialChar LaTeX
24443 "
24444 \end_layout
24445
24446 \begin_layout LyX-Code
24447   Icon "layout \SpecialChar LyX
24448 -Code"
24449 \end_layout
24450
24451 \begin_layout LyX-Code
24452   Icon "layout Chunk"
24453 \end_layout
24454
24455 \begin_layout LyX-Code
24456   Separator
24457 \end_layout
24458
24459 \begin_layout LyX-Code
24460   Icon "buffer-view"
24461 \end_layout
24462
24463 \begin_layout LyX-Code
24464   Icon "buffer-typeset"
24465 \end_layout
24466
24467 \begin_layout LyX-Code
24468   Icon "build-program"
24469 \end_layout
24470
24471 \begin_layout LyX-Code
24472   Separator
24473 \end_layout
24474
24475 \begin_layout LyX-Code
24476 .
24477 \end_layout
24478
24479 \begin_layout LyX-Code
24480 .
24481 \end_layout
24482
24483 \begin_layout LyX-Code
24484 .
24485 \end_layout
24486
24487 \begin_layout LyX-Code
24488 End
24489 \end_layout
24490
24491 \begin_layout Subsubsection
24492 Colors customization
24493 \end_layout
24494
24495 \begin_layout Standard
24496 There are a number of colors in \SpecialChar LyX
24497  that can be customized in 
24498 \family sans
24499 Preferences
24500 \family default
24501 .
24502  One of the things that bothers people is the \SpecialChar LaTeX
24503  font color.
24504  The default color is red, since the chunks uses \SpecialChar LaTeX
24505  font, and there is a lot
24506  of chunks in literate documents, you may get tired of seeing everything
24507  in red.
24508  You can change it by going to the tabs 
24509 \family sans
24510 Look&Feel
24511 \family default
24512
24513 \family sans
24514 Colors.
24515 \end_layout
24516
24517 \begin_layout Standard
24518 The next thing is the visible presence of the newline character in the screen.
24519  You can choose the color of this particular character and make it blend
24520  in the background.
24521  I recommend you choosing a color that is close to the background but not
24522  equal, that way you still can see it is there, but it is not bothering
24523  you anymore.
24524 \end_layout
24525
24526 \begin_layout Subsection
24527 \SpecialChar LyX
24528  and knitr/Sweave
24529 \end_layout
24530
24531 \begin_layout Standard
24532 Support for 
24533 \family sans
24534 knitr
24535 \family default
24536  and 
24537 \family sans
24538 Sweave
24539 \family default
24540  is documented in the 
24541 \emph on
24542 knitr.lyx
24543 \emph default
24544  example file and in the Sweave manual (menu 
24545 \family sans
24546 Help\SpecialChar menuseparator
24547 Specific Manuals
24548 \family default
24549 ).
24550 \end_layout
24551
24552 \begin_layout Chapter
24553 Special features
24554 \end_layout
24555
24556 \begin_layout Standard
24557 You can do everything with \SpecialChar LyX
24558  that you can do with \SpecialChar LaTeX
24559 .
24560  However, \SpecialChar LyX
24561  cannot support every \SpecialChar LaTeX
24562  feature directly.
24563  But you can always use \SpecialChar TeX
24564  Code.
24565  This chapter shows you some more special things you might want to use.
24566  For other special things you can do with figures, tables, floats, boxes
24567  and notes, have a look at the 
24568 \emph on
24569 Embedded
24570 \begin_inset space ~
24571 \end_inset
24572
24573 Objects
24574 \emph default
24575  manual.
24576 \end_layout
24577
24578 \begin_layout Section
24579 Multiple Text Columns
24580 \end_layout
24581
24582 \begin_layout Standard
24583 This feature is independent of the option 
24584 \family sans
24585 Two-column document
24586 \family default
24587  in the document settings under 
24588 \family sans
24589 Text Layout
24590 \family default
24591 .
24592  If you want to have 2
24593 \begin_inset space ~
24594 \end_inset
24595
24596 columns for the whole document, it is recommended to use the 
24597 \family sans
24598 Two-column document
24599 \family default
24600  option.
24601  For all other cases use this feature.
24602 \end_layout
24603
24604 \begin_layout Standard
24605 To use multiple text columns in your document, you have to load the module
24606  
24607 \family sans
24608 Multiple Columns
24609 \family default
24610  (menu 
24611 \family sans
24612 Document\SpecialChar menuseparator
24613 Settings\SpecialChar menuseparator
24614 Modules
24615 \family default
24616 ) and must have the \SpecialChar LaTeX
24617 -package 
24618 \series bold
24619 multicol
24620 \series default
24621  installed.
24622 \end_layout
24623
24624 \begin_layout Standard
24625 Footnotes within multiple columns will be placed at the bottom of the page
24626  and not under each column.
24627  Within the different columns you can use everything, with the limitation
24628  that for floats you need to use the float option 
24629 \family sans
24630 Span columns
24631 \family default
24632 .
24633 \end_layout
24634
24635 \begin_layout Subsection
24636 Basics
24637 \end_layout
24638
24639 \begin_layout Standard
24640 If you want to have 2
24641 \begin_inset space ~
24642 \end_inset
24643
24644 columns in your text, insert a multicolumn inset via the menu 
24645 \family sans
24646 Insert\SpecialChar menuseparator
24647 Custom
24648 \begin_inset space ~
24649 \end_inset
24650
24651 Insets\SpecialChar menuseparator
24652 Multiple
24653 \begin_inset space ~
24654 \end_inset
24655
24656 Columns
24657 \family default
24658  where the columns should start.
24659  Write all text that should be printed in 2
24660 \begin_inset space ~
24661 \end_inset
24662
24663 columns into this inset.
24664 \end_layout
24665
24666 \begin_layout Standard
24667 Here is an example:
24668 \end_layout
24669
24670 \begin_layout Standard
24671 \noindent
24672 \begin_inset Flex Multiple Columns
24673 status open
24674
24675 \begin_layout Plain Layout
24676 \noindent
24677
24678 \series bold
24679 \size small
24680 The Adventure of the Empty House
24681 \series default
24682
24683 \begin_inset Newline newline
24684 \end_inset
24685
24686 by Sir Arthur Conan Doyle
24687 \end_layout
24688
24689 \begin_layout Plain Layout
24690
24691 \size small
24692 It was in the spring of the year 1894 that all London was interested, and
24693  the fashionable world dismayed, by the murder of the Honourable Ronald
24694  Adair under most unusual and inexplicable circumstances.
24695  The public has already learned those particulars of the crime which came
24696  out in the police investigation, but a good deal was suppressed upon that
24697  occasion, since the case for the prosecution was so overwhelmingly strong
24698  that it was not necessary to bring forward all the facts.
24699  Only now, at the end of nearly ten years, am I allowed to supply those
24700  missing links which make up the whole of that remarkable chain.
24701  The crime was of interest in itself, but that interest was as nothing to
24702  me compared to the inconceivable sequel, which afforded me the greatest
24703  shock and surprise of any event in my adventurous life.
24704  Even now, after this long interval, I find myself thrilling as I think
24705  of it, and feeling once more that sudden flood of joy, amazement, and increduli
24706 ty which utterly submerged my mind.
24707  Let me say to that public, which has shown some interest in those glimpses
24708  which I have occasionally given them of the thoughts and actions of a very
24709  remarkable man, that they are not to blame me if I have not shared my knowledge
24710  with them, for I should have considered it my first duty to do so, had
24711  I not been barred by a positive prohibition from his own lips, which was
24712  only withdrawn upon the third of last month.
24713 \end_layout
24714
24715 \end_inset
24716
24717
24718 \end_layout
24719
24720 \begin_layout Standard
24721 To get 3 or more columns, set the cursor into the multicolumn inset and
24722  use the menu 
24723 \family sans
24724 Insert\SpecialChar menuseparator
24725 Number
24726 \begin_inset space ~
24727 \end_inset
24728
24729 of
24730 \begin_inset space ~
24731 \end_inset
24732
24733 Columns
24734 \family default
24735 .
24736  The number of the desired columns is written into that inset (for 3
24737 \begin_inset space ~
24738 \end_inset
24739
24740 columns write 
24741 \begin_inset Quotes eld
24742 \end_inset
24743
24744 3
24745 \begin_inset Quotes erd
24746 \end_inset
24747
24748 ).
24749 \begin_inset Newline newline
24750 \end_inset
24751
24752 Here is an example with 3
24753 \begin_inset space ~
24754 \end_inset
24755
24756 columns:
24757 \end_layout
24758
24759 \begin_layout Standard
24760 \begin_inset Flex Multiple Columns
24761 status open
24762
24763 \begin_layout Plain Layout
24764
24765 \size footnotesize
24766 \begin_inset Argument 1
24767 status open
24768
24769 \begin_layout Plain Layout
24770 3
24771 \end_layout
24772
24773 \end_inset
24774
24775 It can be imagined that my close intimacy with Sherlock Holmes had interested
24776  me deeply in crime, and that after his disappearance I never failed to
24777  read with care the various problems which came before the public.
24778  And I even attempted, more than once, for my own private satisfaction,
24779  to employ his methods in their solution, though with indifferent success.
24780  There was none, however, which appealed to me like this tragedy of Ronald
24781  Adair.
24782  As I read the evidence at the inquest, which led up to a verdict of willful
24783  murder against some person or persons unknown, I realized more clearly
24784  than I had ever done the loss which the community had sustained by the
24785  death of Sherlock Holmes.
24786  There were points about this strange business which would, I was sure,
24787  have specially appealed to him, and the efforts of the police would have
24788  been supplemented, or more probably anticipated, by the trained observation
24789  and the alert mind of the first criminal agent in Europe.
24790  All day, as I drove upon my round, I turned over the case in my mind and
24791  found no explanation which appeared to me to be adequate.
24792  At the risk of telling a twice-told tale, I will recapitulate the facts
24793  as they were known to the public at the conclusion of the inquest.
24794 \end_layout
24795
24796 \end_inset
24797
24798
24799 \end_layout
24800
24801 \begin_layout Standard
24802 You can have up to 10
24803 \begin_inset space ~
24804 \end_inset
24805
24806 columns if you want to, but that might not be very pleasant for the readers
24807  of your document.
24808 \end_layout
24809
24810 \begin_layout Standard
24811 \begin_inset Newpage newpage
24812 \end_inset
24813
24814
24815 \end_layout
24816
24817 \begin_layout Subsection
24818 Columns inside Columns
24819 \end_layout
24820
24821 \begin_layout Standard
24822 You can also have columns inside columns:
24823 \end_layout
24824
24825 \begin_layout Standard
24826 \begin_inset Flex Multiple Columns
24827 status open
24828
24829 \begin_layout Plain Layout
24830
24831 \size footnotesize
24832 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
24833  at that time governor of one of the Australian colonies.
24834  Adair's mother had returned from Australia to undergo the operation for
24835  cataract, and she, her son Ronald, and her daughter Hilda were living together
24836  at 427 Park Lane.
24837 \end_layout
24838
24839 \begin_layout Plain Layout
24840 \begin_inset Flex Multiple Columns
24841 status open
24842
24843 \begin_layout Plain Layout
24844
24845 \size footnotesize
24846 The youth moved in the best society–had, so far as was known, no enemies
24847  and no particular vices.
24848  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
24849  had been broken off by mutual consent some months before, and there was
24850  no sign that it had left any very profound feeling behind it.
24851  For the rest {sic} the man's life moved in a narrow and conventional circle,
24852  for his habits were quiet and his nature unemotional.
24853  Yet it was upon this easy-going young aristocrat that death came, in most
24854  strange and unexpected form, between the hours of ten and eleven-twenty
24855  on the night of March 30, 1894.
24856 \end_layout
24857
24858 \end_inset
24859
24860
24861 \end_layout
24862
24863 \begin_layout Plain Layout
24864
24865 \size footnotesize
24866 Ronald Adair was fond of cards–playing continually, but never for such stakes
24867  as would hurt him.
24868  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
24869  It was shown that, after dinner on the day of his death, he had played
24870  a rubber of whist at the latter club.
24871  He had also played there in the afternoon.
24872
24873 \size default
24874  
24875 \size footnotesize
24876 The evidence of those who had played with him– Mr.
24877  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
24878  and that there was a fairly equal fall of the cards.
24879  Adair might have lost five pounds, but not more.
24880  His fortune was a considerable one, and such a loss could not in any way
24881  affect him.
24882  He had played nearly every day at one club or other, but he was a cautious
24883  player, and usually rose a winner.
24884  It came out in evidence that, in partnership with Colonel Moran, he had
24885  actually won as much as four hundred and twenty pounds in a sitting, some
24886  weeks before, from Godfrey Milner and Lord Balmoral.
24887  So much for his recent history as it came out at the inquest.
24888 \end_layout
24889
24890 \end_inset
24891
24892
24893 \end_layout
24894
24895 \begin_layout Subsection
24896 Advanced Examples
24897 \end_layout
24898
24899 \begin_layout Standard
24900 The examples in this section show some more special features of multiple
24901  columns.
24902 \end_layout
24903
24904 \begin_layout Standard
24905 For more features of multiple columns, have a look at the documentation
24906  of the \SpecialChar LaTeX
24907 -package 
24908 \series bold
24909 multicol
24910 \series default
24911
24912 \begin_inset CommandInset citation
24913 LatexCommand cite
24914 key "multicol"
24915 literal "true"
24916
24917 \end_inset
24918
24919 .
24920 \end_layout
24921
24922 \begin_layout Subsubsection
24923 Preface
24924 \end_layout
24925
24926 \begin_layout Standard
24927 To add a preface text for multiple columns, set the cursor into the multicolumn
24928  inset and use the menu 
24929 \family sans
24930 Insert\SpecialChar menuseparator
24931 Preface
24932 \family default
24933 .
24934  Write your preface text into that inset.
24935 \begin_inset Newline newline
24936 \end_inset
24937
24938 This is an example with some preface text:
24939 \end_layout
24940
24941 \begin_layout Standard
24942 \begin_inset VSpace bigskip
24943 \end_inset
24944
24945
24946 \end_layout
24947
24948 \begin_layout Standard
24949 \begin_inset Flex Multiple Columns
24950 status open
24951
24952 \begin_layout Plain Layout
24953 \begin_inset Argument 2
24954 status open
24955
24956 \begin_layout Plain Layout
24957 And the story continues and continues and continues and continues\SpecialChar ldots
24958
24959 \end_layout
24960
24961 \end_inset
24962
24963
24964 \size small
24965 On the evening of the crime, he returned from the club exactly at ten.
24966  His mother and sister were out spending the evening with a relation.
24967  The servant deposed that she heard him enter the front room on the second
24968  floor, generally used as his sitting-room.
24969  She had lit a fire there, and as it smoked she had opened the window.
24970  No sound was heard from the room until eleven-twenty, the hour of the return
24971  of Lady Maynooth and her daughter.
24972  Desiring to say good-night, she attempted to enter her son's room.
24973  The door was locked on the inside, and no answer could be got to their
24974  cries and knocking.
24975  Help was obtained, and the door forced.
24976  The unfortunate young man was found lying near the table.
24977  His head had been horribly mutilated by an expanding revolver bullet, but
24978  no weapon of any sort was to be found in the room.
24979 \end_layout
24980
24981 \end_inset
24982
24983
24984 \end_layout
24985
24986 \begin_layout Standard
24987 You can also use a section heading as the preface if you use a section command
24988  as \SpecialChar TeX
24989  Code.
24990  For example the command
24991 \end_layout
24992
24993 \begin_layout Standard
24994
24995 \series bold
24996
24997 \backslash
24998 subsection{subsection title}
24999 \end_layout
25000
25001 \begin_layout Standard
25002 creates a subsection.
25003  In this example the preface is a subsubsection:
25004 \end_layout
25005
25006 \begin_layout Standard
25007 \begin_inset Flex Multiple Columns
25008 status open
25009
25010 \begin_layout Plain Layout
25011 \begin_inset Argument 2
25012 status open
25013
25014 \begin_layout Plain Layout
25015 \begin_inset ERT
25016 status collapsed
25017
25018 \begin_layout Plain Layout
25019
25020
25021 \backslash
25022 subsubsection{
25023 \end_layout
25024
25025 \end_inset
25026
25027 This is a subsubsection heading as a preface
25028 \begin_inset ERT
25029 status collapsed
25030
25031 \begin_layout Plain Layout
25032
25033 }
25034 \end_layout
25035
25036 \end_inset
25037
25038
25039 \end_layout
25040
25041 \end_inset
25042
25043
25044 \size small
25045 A minute examination of the circumstances served only to make the case more
25046  complex.
25047  In the first place, no reason could be given why the young man should have
25048  fastened the door upon the inside.
25049  There was the possibility that the murderer had done this, and had afterwards
25050  escaped by the window.
25051  The drop was at least twenty feet, however, and a bed of crocuses in full
25052  bloom lay beneath.
25053  Neither the flowers nor the earth showed any sign of having been disturbed,
25054  nor were there any marks upon the narrow strip of grass which separated
25055  the house from the road.
25056  Apparently, therefore, it was the young man himself who had fastened the
25057  door.
25058  But how did he come by his death? No one could have climbed up to the window
25059  without leaving traces.
25060  Suppose a man had fired through the window, he would indeed be a remarkable
25061  shot who could with a revolver inflict so deadly a wound.
25062  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
25063  a hundred yards of the house.
25064  No one had heard a shot.
25065 \end_layout
25066
25067 \end_inset
25068
25069
25070 \end_layout
25071
25072 \begin_layout Standard
25073 If there is less vertical space than 6
25074 \begin_inset space ~
25075 \end_inset
25076
25077 text lines is left on the page at the beginning of the multiple columns,
25078  a page break will be inserted before the multiple columns.
25079  Depending on the number of lines of the preface text, you might want to
25080  change this space.
25081  This is done by setting the cursor into the mulitcolumn inset behind the
25082  preface (if there is any) and using the menu 
25083 \family sans
25084 Insert\SpecialChar menuseparator
25085 Space
25086 \begin_inset space ~
25087 \end_inset
25088
25089 Before
25090 \begin_inset space ~
25091 \end_inset
25092
25093 Page
25094 \begin_inset space ~
25095 \end_inset
25096
25097 Break
25098 \family default
25099 .
25100  Insert into that inset the amount of space like e.
25101 \begin_inset space \thinspace{}
25102 \end_inset
25103
25104 g.
25105 \begin_inset space \space{}
25106 \end_inset
25107
25108
25109 \begin_inset Quotes eld
25110 \end_inset
25111
25112 5cm
25113 \begin_inset Quotes erd
25114 \end_inset
25115
25116 .
25117 \begin_inset Newline newline
25118 \end_inset
25119
25120 In this example the space is set to 7
25121 \begin_inset space ~
25122 \end_inset
25123
25124 text lines by using 
25125 \begin_inset Quotes eld
25126 \end_inset
25127
25128 7
25129 \backslash
25130 baselineskip
25131 \begin_inset Quotes erd
25132 \end_inset
25133
25134  (where the command 
25135 \series bold
25136
25137 \backslash
25138 baselineskip
25139 \series default
25140  needs to be inserted as \SpecialChar TeX
25141  code):
25142 \end_layout
25143
25144 \begin_layout Standard
25145 \begin_inset Flex Multiple Columns
25146 status open
25147
25148 \begin_layout Plain Layout
25149 \begin_inset Argument 3
25150 status open
25151
25152 \begin_layout Plain Layout
25153 7
25154 \begin_inset ERT
25155 status collapsed
25156
25157 \begin_layout Plain Layout
25158
25159
25160 \backslash
25161 baselineskip
25162 \end_layout
25163
25164 \end_inset
25165
25166
25167 \end_layout
25168
25169 \end_inset
25170
25171
25172 \size small
25173 On the evening of the crime, he returned from the club exactly at ten.
25174  His mother and sister were out spending the evening with a relation.
25175  The servant deposed that she heard him enter the front room on the second
25176  floor, generally used as his sitting-room.
25177  She had lit a fire there, and as it smoked she had opened the window.
25178  No sound was heard from the room until eleven-twenty, the hour of the return
25179  of Lady Maynooth and her daughter.
25180  Desiring to say good-night, she attempted to enter her son's room.
25181  The door was locked on the inside, and no answer could be got to their
25182  cries and knocking.
25183  Help was obtained, and the door forced.
25184  The unfortunate young man was found lying near the table.
25185  His head had been horribly mutilated by an expanding revolver bullet, but
25186  no weapon of any sort was to be found in the room.
25187 \end_layout
25188
25189 \end_inset
25190
25191
25192 \end_layout
25193
25194 \begin_layout Subsubsection
25195 Surrounding Space
25196 \end_layout
25197
25198 \begin_layout Standard
25199 The amount of space before and after multiple columns can be changed by
25200  changing the length 
25201 \series bold
25202
25203 \backslash
25204 multicolsep
25205 \series default
25206 .
25207  For example the command
25208 \end_layout
25209
25210 \begin_layout Standard
25211
25212 \series bold
25213
25214 \backslash
25215 setlength{
25216 \backslash
25217 multicolsep}{3cm}
25218 \end_layout
25219
25220 \begin_layout Standard
25221 in \SpecialChar TeX
25222  Code changes its value to 3
25223 \begin_inset space \thinspace{}
25224 \end_inset
25225
25226 cm.
25227  The change must be made before the multiple columns' start.
25228  The predefined value is 13
25229 \begin_inset space \thinspace{}
25230 \end_inset
25231
25232 pt.
25233 \end_layout
25234
25235 \begin_layout Standard
25236 For this example 
25237 \series bold
25238
25239 \backslash
25240 multicolsep
25241 \series default
25242  was set to 2.5
25243 \begin_inset space \thinspace{}
25244 \end_inset
25245
25246 cm:
25247 \end_layout
25248
25249 \begin_layout Standard
25250 \begin_inset ERT
25251 status open
25252
25253 \begin_layout Plain Layout
25254
25255
25256 \backslash
25257 setlength{
25258 \backslash
25259 multicolsep}{2.5cm}
25260 \end_layout
25261
25262 \end_inset
25263
25264
25265 \end_layout
25266
25267 \begin_layout Standard
25268 \begin_inset Flex Multiple Columns
25269 status open
25270
25271 \begin_layout Plain Layout
25272
25273 \size small
25274 All day I turned these facts over in my mind, endeavouring to hit upon some
25275  theory which could reconcile them all, and to find that line of least resistanc
25276 e which my poor friend had declared to be the starting-point of every investigat
25277 ion.
25278  I confess that I made little progress.
25279  In the evening I strolled across the Park, and found myself about six o'clock
25280  at the Oxford Street end of Park Lane.
25281  A group of loafers upon the pavements, all staring up at a particular window,
25282  directed me to the house which I had come to see.
25283  A tall, thin man with coloured glasses, whom I strongly suspected of being
25284  a plain-clothes detective, was pointing out some theory of his own, while
25285  the others crowded round to listen to what he said.
25286  I got as near him as I could, but his observations seemed to me to be absurd,
25287  so I withdrew again in some disgust.
25288  As I did so I struck against an elderly, deformed man, who had been behind
25289  me, and I knocked down several books which he was carrying.
25290 \end_layout
25291
25292 \end_inset
25293
25294
25295 \end_layout
25296
25297 \begin_layout Standard
25298 \begin_inset Note Greyedout
25299 status open
25300
25301 \begin_layout Plain Layout
25302
25303 \series bold
25304 Note:
25305 \series default
25306  The values you set with 
25307 \series bold
25308
25309 \backslash
25310 setlength
25311 \series default
25312  will be used for all following multiple columns until you change them again.
25313 \end_layout
25314
25315 \end_inset
25316
25317
25318 \end_layout
25319
25320 \begin_layout Standard
25321 \begin_inset ERT
25322 status collapsed
25323
25324 \begin_layout Plain Layout
25325
25326
25327 \backslash
25328 setlength{
25329 \backslash
25330 multicolsep}{13pt}
25331 \end_layout
25332
25333 \end_inset
25334
25335
25336 \begin_inset Note Note
25337 status collapsed
25338
25339 \begin_layout Plain Layout
25340 go back to the default
25341 \end_layout
25342
25343 \end_inset
25344
25345
25346 \end_layout
25347
25348 \begin_layout Standard
25349 \begin_inset Newpage newpage
25350 \end_inset
25351
25352
25353 \end_layout
25354
25355 \begin_layout Subsubsection
25356 Column Breaks
25357 \end_layout
25358
25359 \begin_layout Standard
25360 A column break can be forced by inserting the command 
25361 \series bold
25362
25363 \backslash
25364 columnbreak{}
25365 \series default
25366  as \SpecialChar TeX
25367  Code to that position in the text where the column should be broken.
25368  Note that this leads in most cases to whitespace in the text.
25369 \begin_inset Newline newline
25370 \end_inset
25371
25372 Here is an example:
25373 \end_layout
25374
25375 \begin_layout Standard
25376 \begin_inset Flex Multiple Columns
25377 status open
25378
25379 \begin_layout Plain Layout
25380
25381 \size small
25382 \begin_inset Quotes eld
25383 \end_inset
25384
25385 You're surprised to see me, sir,
25386 \begin_inset Quotes erd
25387 \end_inset
25388
25389  said he, in a strange, croaking voice.
25390 \end_layout
25391
25392 \begin_layout Plain Layout
25393
25394 \size small
25395 I acknowledged that I was.
25396 \end_layout
25397
25398 \begin_layout Plain Layout
25399
25400 \size small
25401 \begin_inset Quotes eld
25402 \end_inset
25403
25404 Well, I've a conscience, sir, and when I chanced to see you go into this
25405  house, as I came hobbling after you, I thought to myself, I'll just step
25406  in and see that kind gentleman, and tell him that if I was a bit gruff
25407  in my manner there was not any harm meant, and that I am much obliged to
25408  him for picking up my books.
25409 \begin_inset Quotes erd
25410 \end_inset
25411
25412
25413 \end_layout
25414
25415 \begin_layout Plain Layout
25416
25417 \size small
25418 \begin_inset Quotes eld
25419 \end_inset
25420
25421 You make too much of a trifle,
25422 \begin_inset Quotes erd
25423 \end_inset
25424
25425  said I.
25426  
25427 \begin_inset Quotes eld
25428 \end_inset
25429
25430 May I ask how you knew who I was?
25431 \begin_inset Quotes erd
25432 \end_inset
25433
25434  AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED.
25435 \begin_inset ERT
25436 status collapsed
25437
25438 \begin_layout Plain Layout
25439
25440
25441 \backslash
25442 columnbreak{}
25443 \end_layout
25444
25445 \end_inset
25446
25447
25448 \end_layout
25449
25450 \begin_layout Plain Layout
25451
25452 \size small
25453 \begin_inset Quotes eld
25454 \end_inset
25455
25456 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
25457  you'll find my little bookshop at the corner of Church Street, and very
25458  happy to see you, I am sure.
25459  Maybe you collect yourself, sir.
25460  Here's 
25461 \noun on
25462 British
25463 \begin_inset space ~
25464 \end_inset
25465
25466 Birds
25467 \noun default
25468 , and 
25469 \noun on
25470 Catullus
25471 \noun default
25472 , and 
25473 \noun on
25474 The Holy War
25475 \noun default
25476 –a bargain, every one of them.
25477  With five volumes you could just fill that gap on that second shelf.
25478  It looks untidy, does it not, sir?
25479 \begin_inset Quotes erd
25480 \end_inset
25481
25482
25483 \end_layout
25484
25485 \end_inset
25486
25487
25488 \end_layout
25489
25490 \begin_layout Subsubsection
25491 Column Separation
25492 \end_layout
25493
25494 \begin_layout Standard
25495 The width of the columns is automatically calculated, but you can modify
25496  the space between the columns.
25497  This is done by changing the length 
25498 \series bold
25499
25500 \backslash
25501 columnsep
25502 \series default
25503 .
25504  Its predefined value is 10
25505 \begin_inset space \thinspace{}
25506 \end_inset
25507
25508 pt.
25509  Here is an example where 
25510 \series bold
25511
25512 \backslash
25513 columnsep
25514 \series default
25515  is set to 3
25516 \begin_inset space \thinspace{}
25517 \end_inset
25518
25519 cm:
25520 \end_layout
25521
25522 \begin_layout Standard
25523 \begin_inset ERT
25524 status open
25525
25526 \begin_layout Plain Layout
25527
25528
25529 \backslash
25530 setlength{
25531 \backslash
25532 columnsep}{3cm}
25533 \end_layout
25534
25535 \end_inset
25536
25537
25538 \end_layout
25539
25540 \begin_layout Standard
25541 \begin_inset Flex Multiple Columns
25542 status open
25543
25544 \begin_layout Plain Layout
25545
25546 \size small
25547 My observations of No.
25548 \begin_inset space \space{}
25549 \end_inset
25550
25551 427 Park Lane did little to clear up the problem in which I was interested.
25552  The house was separated from the street by a low wall and railing, the
25553  whole not more than five feet high.
25554  It was perfectly easy, therefore, for anyone to get into the garden, but
25555  the window was entirely inaccessible, since there was no water pipe or
25556  anything which could help the most active man to climb it.
25557  More puzzled than ever, I retraced my steps to Kensington.
25558  I had not been in my study five minutes when the maid entered to say that
25559  a person desired to see me.
25560  To my astonishment it was none other than my strange old book collector,
25561  his sharp, wizened face peering out from a frame of white hair, and his
25562  precious volumes, a dozen of them at least, wedged under his right arm.
25563 \end_layout
25564
25565 \end_inset
25566
25567
25568 \end_layout
25569
25570 \begin_layout Standard
25571 \begin_inset ERT
25572 status collapsed
25573
25574 \begin_layout Plain Layout
25575
25576
25577 \backslash
25578 setlength{
25579 \backslash
25580 columnsep}{10pt}
25581 \end_layout
25582
25583 \end_inset
25584
25585
25586 \begin_inset Note Note
25587 status collapsed
25588
25589 \begin_layout Plain Layout
25590 go back to the default
25591 \end_layout
25592
25593 \end_inset
25594
25595
25596 \end_layout
25597
25598 \begin_layout Subsubsection
25599 Vertical Lines
25600 \end_layout
25601
25602 \begin_layout Standard
25603 Between the columns a rule with a width of the length 
25604 \series bold
25605
25606 \backslash
25607 columnseprule
25608 \series default
25609  is placed.
25610  If this rule width is set to 0
25611 \begin_inset space \thinspace{}
25612 \end_inset
25613
25614 pt (this is the default), the rule is suppressed.
25615  In the following example the rule is 2
25616 \begin_inset space \thinspace{}
25617 \end_inset
25618
25619 pt wide:
25620 \end_layout
25621
25622 \begin_layout Standard
25623 \begin_inset ERT
25624 status open
25625
25626 \begin_layout Plain Layout
25627
25628
25629 \backslash
25630 setlength{
25631 \backslash
25632 columnseprule}{2pt}
25633 \end_layout
25634
25635 \end_inset
25636
25637
25638 \end_layout
25639
25640 \begin_layout Standard
25641 \begin_inset Flex Multiple Columns
25642 status open
25643
25644 \begin_layout Plain Layout
25645
25646 \size small
25647 \begin_inset Quotes eld
25648 \end_inset
25649
25650 You're surprised to see me, sir,
25651 \begin_inset Quotes erd
25652 \end_inset
25653
25654  said he, in a strange, croaking voice.
25655 \end_layout
25656
25657 \begin_layout Plain Layout
25658
25659 \size small
25660 I acknowledged that I was.
25661 \end_layout
25662
25663 \begin_layout Plain Layout
25664
25665 \size small
25666 \begin_inset Quotes eld
25667 \end_inset
25668
25669 Well, I've a conscience, sir, and when I chanced to see you go into this
25670  house, as I came hobbling after you, I thought to myself, I'll just step
25671  in and see that kind gentleman, and tell him that if I was a bit gruff
25672  in my manner there was not any harm meant, and that I am much obliged to
25673  him for picking up my books.
25674 \begin_inset Quotes erd
25675 \end_inset
25676
25677
25678 \end_layout
25679
25680 \begin_layout Plain Layout
25681
25682 \size small
25683 \begin_inset Quotes eld
25684 \end_inset
25685
25686 You make too much of a trifle,
25687 \begin_inset Quotes erd
25688 \end_inset
25689
25690  said I.
25691  
25692 \begin_inset Quotes eld
25693 \end_inset
25694
25695 May I ask how you knew who I was?
25696 \begin_inset Quotes erd
25697 \end_inset
25698
25699
25700 \end_layout
25701
25702 \begin_layout Plain Layout
25703
25704 \size small
25705 \begin_inset Quotes eld
25706 \end_inset
25707
25708 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
25709  you'll find my little bookshop at the corner of Church Street, and very
25710  happy to see you, I am sure.
25711  Maybe you collect yourself, sir.
25712  Here's 
25713 \noun on
25714 British
25715 \begin_inset space ~
25716 \end_inset
25717
25718 Birds
25719 \noun default
25720 , and 
25721 \noun on
25722 Catullus
25723 \noun default
25724 , and 
25725 \noun on
25726 The Holy War
25727 \noun default
25728 –a bargain, every one of them.
25729  With five volumes you could just fill that gap on that second shelf.
25730  It looks untidy, does it not, sir?
25731 \begin_inset Quotes erd
25732 \end_inset
25733
25734
25735 \end_layout
25736
25737 \end_inset
25738
25739
25740 \end_layout
25741
25742 \begin_layout Standard
25743 \begin_inset VSpace defskip
25744 \end_inset
25745
25746
25747 \end_layout
25748
25749 \begin_layout Standard
25750 The rule can be colored by redefining the command 
25751 \series bold
25752
25753 \backslash
25754 columnseprulecolor
25755 \series default
25756 .
25757  This is done by inserting the command
25758 \begin_inset Newline newline
25759 \end_inset
25760
25761
25762 \series bold
25763
25764 \backslash
25765 renewcommand{
25766 \backslash
25767 columnseprulecolor}{
25768 \backslash
25769 color{red}}
25770 \series default
25771
25772 \begin_inset Newline newline
25773 \end_inset
25774
25775 as \SpecialChar TeX
25776  Code before the multicolumn inset.
25777  Replace 
25778 \series bold
25779 red
25780 \series default
25781  in this command by a color of your choice.
25782  You can use all pre- and self-defined colors.
25783  See the 
25784 \emph on
25785 EmbeddedObjects
25786 \emph default
25787  manual, section 
25788 \emph on
25789 Colored
25790 \begin_inset space ~
25791 \end_inset
25792
25793 Tables
25794 \emph default
25795  for more information about pre- and self-defined colors.
25796  To go back to the default color insert the command
25797 \begin_inset Newline newline
25798 \end_inset
25799
25800
25801 \series bold
25802
25803 \backslash
25804 renewcommand{
25805 \backslash
25806 columnseprulecolor}{
25807 \backslash
25808 normalcolor}
25809 \series default
25810
25811 \begin_inset Newline newline
25812 \end_inset
25813
25814 Here is the example with a cyan rule and 1
25815 \begin_inset space \thinspace{}
25816 \end_inset
25817
25818 cm column separation:
25819 \end_layout
25820
25821 \begin_layout Standard
25822 \begin_inset ERT
25823 status open
25824
25825 \begin_layout Plain Layout
25826
25827
25828 \backslash
25829 setlength{
25830 \backslash
25831 columnsep}{1cm}
25832 \end_layout
25833
25834 \begin_layout Plain Layout
25835
25836
25837 \backslash
25838 renewcommand{
25839 \backslash
25840 columnseprulecolor}{
25841 \backslash
25842 color{cyan}}
25843 \end_layout
25844
25845 \end_inset
25846
25847
25848 \end_layout
25849
25850 \begin_layout Standard
25851 \begin_inset Flex Multiple Columns
25852 status open
25853
25854 \begin_layout Plain Layout
25855
25856 \size small
25857 \begin_inset Quotes eld
25858 \end_inset
25859
25860 You're surprised to see me, sir,
25861 \begin_inset Quotes erd
25862 \end_inset
25863
25864  said he, in a strange, croaking voice.
25865 \end_layout
25866
25867 \begin_layout Plain Layout
25868
25869 \size small
25870 I acknowledged that I was.
25871 \end_layout
25872
25873 \begin_layout Plain Layout
25874
25875 \size small
25876 \begin_inset Quotes eld
25877 \end_inset
25878
25879 Well, I've a conscience, sir, and when I chanced to see you go into this
25880  house, as I came hobbling after you, I thought to myself, I'll just step
25881  in and see that kind gentleman, and tell him that if I was a bit gruff
25882  in my manner there was not any harm meant, and that I am much obliged to
25883  him for picking up my books.
25884 \begin_inset Quotes erd
25885 \end_inset
25886
25887
25888 \end_layout
25889
25890 \begin_layout Plain Layout
25891
25892 \size small
25893 \begin_inset Quotes eld
25894 \end_inset
25895
25896 You make too much of a trifle,
25897 \begin_inset Quotes erd
25898 \end_inset
25899
25900  said I.
25901  
25902 \begin_inset Quotes eld
25903 \end_inset
25904
25905 May I ask how you knew who I was?
25906 \begin_inset Quotes erd
25907 \end_inset
25908
25909
25910 \end_layout
25911
25912 \begin_layout Plain Layout
25913
25914 \size small
25915 \begin_inset Quotes eld
25916 \end_inset
25917
25918 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
25919  you'll find my little bookshop at the corner of Church Street, and very
25920  happy to see you, I am sure.
25921  Maybe you collect yourself, sir.
25922  Here's 
25923 \noun on
25924 British
25925 \begin_inset space ~
25926 \end_inset
25927
25928 Birds
25929 \noun default
25930 , and 
25931 \noun on
25932 Catullus
25933 \noun default
25934 , and 
25935 \noun on
25936 The Holy War
25937 \noun default
25938 –a bargain, every one of them.
25939  With five volumes you could just fill that gap on that second shelf.
25940  It looks untidy, does it not, sir?
25941 \begin_inset Quotes erd
25942 \end_inset
25943
25944
25945 \end_layout
25946
25947 \end_inset
25948
25949
25950 \end_layout
25951
25952 \begin_layout Standard
25953 \begin_inset ERT
25954 status collapsed
25955
25956 \begin_layout Plain Layout
25957
25958
25959 \backslash
25960 setlength{
25961 \backslash
25962 columnseprule}{0pt}
25963 \end_layout
25964
25965 \begin_layout Plain Layout
25966
25967
25968 \backslash
25969 renewcommand{
25970 \backslash
25971 columnseprulecolor}{
25972 \backslash
25973 normalcolor}
25974 \end_layout
25975
25976 \end_inset
25977
25978
25979 \begin_inset Note Note
25980 status collapsed
25981
25982 \begin_layout Plain Layout
25983 go back to the default
25984 \end_layout
25985
25986 \end_inset
25987
25988
25989 \end_layout
25990
25991 \begin_layout Section
25992 Non-standard Paragraph Shapes
25993 \end_layout
25994
25995 \begin_layout Standard
25996 \noindent
25997 \SpecialChar LaTeX
25998  as well as any other text processor uses by default rectangular paragraphs.
25999  For special cases like for example posters, invitation cards or poems you
26000  can modify the paragraph shape to one of your choice.
26001  This can be done by using the \SpecialChar LaTeX
26002 -package 
26003 \series bold
26004 shapepar
26005 \series default
26006  which is loaded by using in the document settings the module 
26007 \family sans
26008 Custom paragraph shapes
26009 \family default
26010 .
26011 \end_layout
26012
26013 \begin_layout Subsection
26014 Predefined shapes
26015 \end_layout
26016
26017 \begin_layout Standard
26018
26019 \series bold
26020 shapepar
26021 \series default
26022  provides the following shapes:
26023 \end_layout
26024
26025 \begin_layout Standard
26026 \begin_inset Tabular
26027 <lyxtabular version="3" rows="13" columns="3">
26028 <features booktabs="true" islongtable="true" longtabularalignment="center">
26029 <column alignment="center" valignment="middle" width="16col%">
26030 <column alignment="center" valignment="middle" width="40col%">
26031 <column alignment="center" valignment="middle" width="35col%">
26032 <row endhead="true">
26033 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
26034 \begin_inset Text
26035
26036 \begin_layout Plain Layout
26037 Name
26038 \end_layout
26039
26040 \end_inset
26041 </cell>
26042 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
26043 \begin_inset Text
26044
26045 \begin_layout Plain Layout
26046 Description
26047 \end_layout
26048
26049 \end_inset
26050 </cell>
26051 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
26052 \begin_inset Text
26053
26054 \begin_layout Plain Layout
26055 Annotation
26056 \end_layout
26057
26058 \end_inset
26059 </cell>
26060 </row>
26061 <row>
26062 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26063 \begin_inset Text
26064
26065 \begin_layout Plain Layout
26066 CDlabel
26067 \end_layout
26068
26069 \end_inset
26070 </cell>
26071 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26072 \begin_inset Text
26073
26074 \begin_layout Plain Layout
26075 Circle with circular hole (in the size of a CD/DVD)
26076 \end_layout
26077
26078 \end_inset
26079 </cell>
26080 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26081 \begin_inset Text
26082
26083 \begin_layout Plain Layout
26084 Cannot be scaled, take care there is not too much text
26085 \end_layout
26086
26087 \end_inset
26088 </cell>
26089 </row>
26090 <row>
26091 <cell alignment="center" valignment="top" topline="true" usebox="none">
26092 \begin_inset Text
26093
26094 \begin_layout Plain Layout
26095 Circle
26096 \end_layout
26097
26098 \end_inset
26099 </cell>
26100 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26101 \begin_inset Text
26102
26103 \begin_layout Plain Layout
26104 Circle
26105 \end_layout
26106
26107 \end_inset
26108 </cell>
26109 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26110 \begin_inset Text
26111
26112 \begin_layout Plain Layout
26113 Fragile, calculation might fail
26114 \end_layout
26115
26116 \end_inset
26117 </cell>
26118 </row>
26119 <row>
26120 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26121 \begin_inset Text
26122
26123 \begin_layout Plain Layout
26124 Diamond
26125 \end_layout
26126
26127 \end_inset
26128 </cell>
26129 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26130 \begin_inset Text
26131
26132 \begin_layout Plain Layout
26133 Rhomboid (symbolizing a 
26134 \begin_inset Quotes eld
26135 \end_inset
26136
26137 diamond
26138 \begin_inset Quotes erd
26139 \end_inset
26140
26141 )
26142 \end_layout
26143
26144 \end_inset
26145 </cell>
26146 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26147 \begin_inset Text
26148
26149 \begin_layout Plain Layout
26150 -
26151 \end_layout
26152
26153 \end_inset
26154 </cell>
26155 </row>
26156 <row>
26157 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26158 \begin_inset Text
26159
26160 \begin_layout Plain Layout
26161 Heart
26162 \end_layout
26163
26164 \end_inset
26165 </cell>
26166 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26167 \begin_inset Text
26168
26169 \begin_layout Plain Layout
26170 Heart-like shape
26171 \end_layout
26172
26173 \end_inset
26174 </cell>
26175 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26176 \begin_inset Text
26177
26178 \begin_layout Plain Layout
26179 -
26180 \end_layout
26181
26182 \end_inset
26183 </cell>
26184 </row>
26185 <row>
26186 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26187 \begin_inset Text
26188
26189 \begin_layout Plain Layout
26190 Hexagon
26191 \end_layout
26192
26193 \end_inset
26194 </cell>
26195 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26196 \begin_inset Text
26197
26198 \begin_layout Plain Layout
26199 Hexagon
26200 \end_layout
26201
26202 \end_inset
26203 </cell>
26204 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26205 \begin_inset Text
26206
26207 \begin_layout Plain Layout
26208 -
26209 \end_layout
26210
26211 \end_inset
26212 </cell>
26213 </row>
26214 <row>
26215 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26216 \begin_inset Text
26217
26218 \begin_layout Plain Layout
26219 Nut
26220 \end_layout
26221
26222 \end_inset
26223 </cell>
26224 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26225 \begin_inset Text
26226
26227 \begin_layout Plain Layout
26228 Nut for bolt (hexagon with circular hole)
26229 \end_layout
26230
26231 \end_inset
26232 </cell>
26233 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26234 \begin_inset Text
26235
26236 \begin_layout Plain Layout
26237 -
26238 \end_layout
26239
26240 \end_inset
26241 </cell>
26242 </row>
26243 <row>
26244 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26245 \begin_inset Text
26246
26247 \begin_layout Plain Layout
26248 Square
26249 \end_layout
26250
26251 \end_inset
26252 </cell>
26253 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26254 \begin_inset Text
26255
26256 \begin_layout Plain Layout
26257 Square
26258 \end_layout
26259
26260 \end_inset
26261 </cell>
26262 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26263 \begin_inset Text
26264
26265 \begin_layout Plain Layout
26266 -
26267 \end_layout
26268
26269 \end_inset
26270 </cell>
26271 </row>
26272 <row>
26273 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
26274 \begin_inset Text
26275
26276 \begin_layout Plain Layout
26277 Star
26278 \end_layout
26279
26280 \end_inset
26281 </cell>
26282 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
26283 \begin_inset Text
26284
26285 \begin_layout Plain Layout
26286 Five-point star
26287 \end_layout
26288
26289 \end_inset
26290 </cell>
26291 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
26292 \begin_inset Text
26293
26294 \begin_layout Plain Layout
26295 -
26296 \end_layout
26297
26298 \end_inset
26299 </cell>
26300 </row>
26301 <row>
26302 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26303 \begin_inset Text
26304
26305 \begin_layout Plain Layout
26306 Candle
26307 \end_layout
26308
26309 \end_inset
26310 </cell>
26311 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26312 \begin_inset Text
26313
26314 \begin_layout Plain Layout
26315 Burning candle
26316 \end_layout
26317
26318 \end_inset
26319 </cell>
26320 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26321 \begin_inset Text
26322
26323 \begin_layout Plain Layout
26324 -
26325 \end_layout
26326
26327 \end_inset
26328 </cell>
26329 </row>
26330 <row>
26331 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26332 \begin_inset Text
26333
26334 \begin_layout Plain Layout
26335 Drop down/up
26336 \end_layout
26337
26338 \end_inset
26339 </cell>
26340 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26341 \begin_inset Text
26342
26343 \begin_layout Plain Layout
26344 Normal/reversed rain drop
26345 \end_layout
26346
26347 \end_inset
26348 </cell>
26349 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26350 \begin_inset Text
26351
26352 \begin_layout Plain Layout
26353 Fragile, calculation might fail
26354 \end_layout
26355
26356 \end_inset
26357 </cell>
26358 </row>
26359 <row>
26360 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26361 \begin_inset Text
26362
26363 \begin_layout Plain Layout
26364 \SpecialChar TeX
26365
26366 \end_layout
26367
26368 \end_inset
26369 </cell>
26370 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26371 \begin_inset Text
26372
26373 \begin_layout Plain Layout
26374 The \SpecialChar TeX
26375  logo
26376 \end_layout
26377
26378 \end_inset
26379 </cell>
26380 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26381 \begin_inset Text
26382
26383 \begin_layout Plain Layout
26384 -
26385 \end_layout
26386
26387 \end_inset
26388 </cell>
26389 </row>
26390 <row>
26391 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
26392 \begin_inset Text
26393
26394 \begin_layout Plain Layout
26395 Triangle up/down/
26396 \begin_inset Newline newline
26397 \end_inset
26398
26399 left/right
26400 \end_layout
26401
26402 \end_inset
26403 </cell>
26404 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
26405 \begin_inset Text
26406
26407 \begin_layout Plain Layout
26408 Triangles in different orientations
26409 \end_layout
26410
26411 \end_inset
26412 </cell>
26413 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
26414 \begin_inset Text
26415
26416 \begin_layout Plain Layout
26417 -
26418 \end_layout
26419
26420 \end_inset
26421 </cell>
26422 </row>
26423 </lyxtabular>
26424
26425 \end_inset
26426
26427
26428 \end_layout
26429
26430 \begin_layout Standard
26431 To use a shape for your paragraph, simply select it in \SpecialChar LyX
26432 's pull-down box
26433  for environments in the toolbar.
26434 \end_layout
26435
26436 \begin_layout Standard
26437 \begin_inset Newpage newpage
26438 \end_inset
26439
26440
26441 \end_layout
26442
26443 \begin_layout Standard
26444 Here is an example paragraph in the shape of a nut:
26445 \end_layout
26446
26447 \begin_layout Standard
26448 \begin_inset VSpace bigskip
26449 \end_inset
26450
26451
26452 \end_layout
26453
26454 \begin_layout Nut
26455
26456 \lang latin
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  At vero eos et accusam et justo duo dolores et ea rebum.
26461  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26462  sit amet.
26463  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26464  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26465  voluptua.
26466 \end_layout
26467
26468 \begin_layout Standard
26469 \begin_inset VSpace bigskip
26470 \end_inset
26471
26472
26473 \end_layout
26474
26475 \begin_layout Standard
26476 \begin_inset Note Greyedout
26477 status open
26478
26479 \begin_layout Plain Layout
26480
26481 \series bold
26482 Note
26483 \series default
26484 : shapepar paragraphs cannot run over a page break.
26485 \end_layout
26486
26487 \end_inset
26488
26489
26490 \end_layout
26491
26492 \begin_layout Standard
26493 \begin_inset VSpace bigskip
26494 \end_inset
26495
26496
26497 \end_layout
26498
26499 \begin_layout Standard
26500
26501 \series bold
26502 shapepar
26503 \series default
26504  takes care that the shape will always be preserved, no matter how much
26505  text is in the paragraph.
26506  Therefore the paragraph size changes with the amount of contained text.
26507  This can lead to paragraph sizes exceeding the page margins.
26508  To demonstrate the size scaling, here is the same example paragraph but
26509  with twice as much text:
26510 \end_layout
26511
26512 \begin_layout Standard
26513 \begin_inset Newpage newpage
26514 \end_inset
26515
26516
26517 \end_layout
26518
26519 \begin_layout Nut
26520
26521 \lang latin
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  At vero eos et accusam et justo duo dolores et ea rebum.
26526  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26527  sit amet.
26528  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26529  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26530  voluptua.
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  At vero eos et accusam et justo duo dolores et ea rebum.
26535  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26536  sit amet.
26537  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26538  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26539  voluptua.
26540 \end_layout
26541
26542 \begin_layout Standard
26543 \begin_inset VSpace bigskip
26544 \end_inset
26545
26546
26547 \end_layout
26548
26549 \begin_layout Standard
26550 An exception is the shape 
26551 \family sans
26552 CDlabel
26553 \family default
26554 .
26555  It cannot be scaled because it must fit the size of a CD/DVD.
26556  Therefore the amount of text that fits into the shape is limited.
26557 \begin_inset Newline newline
26558 \end_inset
26559
26560 The 
26561 \family sans
26562 drop
26563 \family default
26564  shapes and the 
26565 \family sans
26566 circle
26567 \family default
26568  shape are fragile, meaning that the calculation of their size can fail,
26569  depending on the amount of text.
26570  You will then get the \SpecialChar LaTeX
26571  error 
26572 \begin_inset Quotes eld
26573 \end_inset
26574
26575 Arithmetic overflow
26576 \begin_inset Quotes erd
26577 \end_inset
26578
26579 .
26580  In this case one can try to remove or add some text; if nothing works one
26581  has to use another shape.
26582 \end_layout
26583
26584 \begin_layout Standard
26585 \begin_inset VSpace bigskip
26586 \end_inset
26587
26588
26589 \end_layout
26590
26591 \begin_layout Standard
26592 For shapes with tips you will maybe see that \SpecialChar LaTeX
26593 's hyphenation routine fails
26594  for text in the tips.
26595  Therefore it is often necessary to add hyphenation points 
26596 \family sans
26597 (
26598 \begin_inset Info
26599 type  "shortcut"
26600 arg   "specialchar-insert hyphenation"
26601 \end_inset
26602
26603
26604 \family default
26605 ) to the corresponding text parts.
26606 \end_layout
26607
26608 \begin_layout Standard
26609 \begin_inset VSpace bigskip
26610 \end_inset
26611
26612
26613 \end_layout
26614
26615 \begin_layout Standard
26616 Shapepar paragraphs are either always centered or placed on the page so
26617  that their left border touches the left page margin.
26618  You can therefore not use the paragraph dialog to align such paragraphs.
26619  A solution is to put the paragraph into a minipage or parbox and align
26620  the box.
26621  The problem is hereby to find the right width for the box.
26622  Because if it is too wide and you center the box, the paragraph is not
26623  centered too because it sticks at the left side of the box.
26624  So you might have to play a bit with the width until it fits.
26625  Here are two heart-shaped paragraphs, the first one is not aligned, the
26626  second one is right-aligned:
26627 \end_layout
26628
26629 \begin_layout Standard
26630 \begin_inset Newpage newpage
26631 \end_inset
26632
26633
26634 \end_layout
26635
26636 \begin_layout Heart
26637 \noindent
26638
26639 \lang latin
26640 Lo\SpecialChar softhyphen
26641 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26642  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26643  voluptua.
26644  At vero eos et accusam et justo duo dolores et ea rebum.
26645  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26646  sit amet.
26647 \end_layout
26648
26649 \begin_layout Standard
26650 \begin_inset VSpace bigskip
26651 \end_inset
26652
26653
26654 \end_layout
26655
26656 \begin_layout Standard
26657 \noindent
26658 \align right
26659 \begin_inset Box Frameless
26660 position "t"
26661 hor_pos "c"
26662 has_inner_box 1
26663 inner_pos "t"
26664 use_parbox 1
26665 use_makebox 0
26666 width "42col%"
26667 special "none"
26668 height "1in"
26669 height_special "totalheight"
26670 thickness "0.4pt"
26671 separation "3pt"
26672 shadowsize "4pt"
26673 framecolor "black"
26674 backgroundcolor "none"
26675 status open
26676
26677 \begin_layout Heart
26678 \noindent
26679
26680 \lang latin
26681 Lo\SpecialChar softhyphen
26682 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26683  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26684  voluptua.
26685  At vero eos et accusam et justo duo dolores et ea rebum.
26686  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26687  sit amet.
26688 \end_layout
26689
26690 \end_inset
26691
26692
26693 \end_layout
26694
26695 \begin_layout Subsection
26696 Custom shapes
26697 \end_layout
26698
26699 \begin_layout Standard
26700 You can define any shape you want.
26701  Doing this manually is a lot of work because every coordinate must be specified.
26702  But there is a way to let the computer calculate the coordinates:
26703 \end_layout
26704
26705 \begin_layout Enumerate
26706 Install the program 
26707 \begin_inset CommandInset href
26708 LatexCommand href
26709 name "Jpgfdraw"
26710 target "http://www.ctan.org/tex-archive/graphics/jpgfdraw"
26711 literal "false"
26712
26713 \end_inset
26714
26715 .
26716 \end_layout
26717
26718 \begin_layout Enumerate
26719 In 
26720 \family sans
26721 Jpgfdraw
26722 \family default
26723  go to the menu 
26724 \family sans
26725 TeX/LaTeX\SpecialChar menuseparator
26726 Settings\SpecialChar menuseparator
26727 Set Normal Size
26728 \family default
26729  and select the font size you are using in your document.
26730  For example this document uses the size 12
26731 \begin_inset space \thinspace{}
26732 \end_inset
26733
26734 pt.
26735 \end_layout
26736
26737 \begin_layout Enumerate
26738 Draw a shape.
26739 \end_layout
26740
26741 \begin_layout Enumerate
26742 Use the menu 
26743 \family sans
26744 TeX/LaTeX\SpecialChar menuseparator
26745 Shapepar
26746 \family default
26747  to export the shape to coordinates.
26748  In the appearing dialog use either the outline of your shape for the coordinate
26749 s or the path itself.
26750 \begin_inset Foot
26751 status collapsed
26752
26753 \begin_layout Plain Layout
26754 For more information see 
26755 \begin_inset CommandInset href
26756 LatexCommand href
26757 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
26758 literal "false"
26759
26760 \end_inset
26761
26762
26763 \end_layout
26764
26765 \end_inset
26766
26767
26768 \end_layout
26769
26770 \begin_layout Standard
26771 The coordinates are written into a \SpecialChar TeX
26772  file.
26773  To use it for your \SpecialChar LyX
26774  document
26775 \end_layout
26776
26777 \begin_layout Enumerate
26778 Place the cursor before the first character of your paragraph (or into a
26779  new empty one).
26780 \end_layout
26781
26782 \begin_layout Enumerate
26783 Open in \SpecialChar LyX
26784  the menu 
26785 \family sans
26786 Insert\SpecialChar menuseparator
26787 File\SpecialChar menuseparator
26788 Child
26789 \begin_inset space ~
26790 \end_inset
26791
26792 Document
26793 \family default
26794 , select the file and use 
26795 \family sans
26796 Input
26797 \family default
26798  as 
26799 \family sans
26800 Include Type.
26801 \end_layout
26802
26803 \begin_layout Standard
26804 \begin_inset VSpace defskip
26805 \end_inset
26806
26807
26808 \end_layout
26809
26810 \begin_layout Standard
26811 \begin_inset Note Greyedout
26812 status open
26813
26814 \begin_layout Plain Layout
26815
26816 \series bold
26817 Note
26818 \series default
26819 : The changed shape only applies to the current paragraph; everything is
26820  reset to normal for the next paragraph.
26821  Therefore the shape definition file must be input into every paragraph
26822  with the desired shape.
26823 \end_layout
26824
26825 \end_inset
26826
26827
26828 \end_layout
26829
26830 \begin_layout Standard
26831 \begin_inset VSpace bigskip
26832 \end_inset
26833
26834
26835 \end_layout
26836
26837 \begin_layout Standard
26838 Here is an example:
26839 \end_layout
26840
26841 \begin_layout Standard
26842 \begin_inset VSpace bigskip
26843 \end_inset
26844
26845
26846 \end_layout
26847
26848 \begin_layout Standard
26849 \begin_inset CommandInset include
26850 LatexCommand input
26851 filename "SpecialParagraphShape.tex"
26852
26853 \end_inset
26854
26855
26856 \lang latin
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  At vero eos et accusam et justo duo dolores et ea rebum.
26861  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26862  sit amet.
26863  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26864  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26865  voluptua.
26866 \end_layout
26867
26868 \begin_layout Standard
26869 \begin_inset VSpace bigskip
26870 \end_inset
26871
26872
26873 \end_layout
26874
26875 \begin_layout Standard
26876
26877 \series bold
26878 A tip:
26879 \series default
26880  to draw complexer shapes in 
26881 \family sans
26882 Jpgfdraw
26883 \family default
26884  you can draw the shape in a program of your choice and import the resulting
26885  image to 
26886 \family sans
26887 Jpgfdraw
26888 \family default
26889 .
26890  Then you only need to draw a line or spline along the outline of the image.
26891 \end_layout
26892
26893 \begin_layout Standard
26894 \begin_inset VSpace bigskip
26895 \end_inset
26896
26897
26898 \end_layout
26899
26900 \begin_layout Standard
26901 The module 
26902 \family sans
26903 Custom paragraph shapes
26904 \family default
26905  also provides the two commands 
26906 \family sans
26907 shapepar
26908 \family default
26909  and 
26910 \family sans
26911 Shapepar
26912 \family default
26913  which can be used to define custom shapes coordinate by coordinate.
26914 \begin_inset Foot
26915 status collapsed
26916
26917 \begin_layout Plain Layout
26918 These commands are internally used for all shapes described here.
26919 \end_layout
26920
26921 \end_inset
26922
26923  For information how these styles are used and about further customization
26924  possibilities, have a look at the documentation of the package 
26925 \series bold
26926 shapepar
26927 \series default
26928
26929 \begin_inset CommandInset citation
26930 LatexCommand cite
26931 key "shapepar"
26932 literal "true"
26933
26934 \end_inset
26935
26936 .
26937 \end_layout
26938
26939 \begin_layout Bibliography
26940 \begin_inset CommandInset bibitem
26941 LatexCommand bibitem
26942 key "multicol"
26943 literal "true"
26944
26945 \end_inset
26946
26947 Documentation of the \SpecialChar LaTeX
26948 -package 
26949 \begin_inset CommandInset href
26950 LatexCommand href
26951 name "multicol"
26952 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
26953 literal "false"
26954
26955 \end_inset
26956
26957
26958 \end_layout
26959
26960 \begin_layout Bibliography
26961 \begin_inset CommandInset bibitem
26962 LatexCommand bibitem
26963 key "shapepar"
26964 literal "true"
26965
26966 \end_inset
26967
26968 Documentation of the \SpecialChar LaTeX
26969 -package 
26970 \begin_inset CommandInset href
26971 LatexCommand href
26972 name "shapepar"
26973 target "http://mirrors.ctan.org/macros/latex/contrib/shapepar/shapepar.pdf"
26974 literal "false"
26975
26976 \end_inset
26977
26978
26979 \end_layout
26980
26981 \end_body
26982 \end_document