]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
a6b0f2c06384888e65ecb0ceef5c0dbd97f447dd
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.3 created this file. For more info see http://www.lyx.org/
2 \lyxformat 533
3 \begin_document
4 \begin_header
5 \save_transient_properties true
6 \origin /systemlyxdir/doc/
7 \textclass scrbook
8 \begin_preamble
9 % DO NOT ALTER THIS PREAMBLE!!!
10 %
11 % This preamble is designed to ensure that the manual prints
12 % out as advertised. If you mess with this preamble,
13 % parts of the manual may not print out as expected.  If you
14 % have problems LaTeXing this file, please contact 
15 % the documentation team
16 % email: lyx-docs@lists.lyx.org
17
18 % the pages of the TOC are numbered roman
19 % and a PDF-bookmark for the TOC is added
20 \pagenumbering{roman}
21 \let\myTOC\tableofcontents
22 \renewcommand{\tableofcontents}{%
23  \pdfbookmark[1]{\contentsname}{}
24  \myTOC
25  \cleardoublepage
26  \pagenumbering{arabic}}
27
28 % extra space for tables
29 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
30 \end_preamble
31 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
32 \use_default_options false
33 \begin_modules
34 logicalmkup
35 theorems-ams
36 theorems-ams-extended
37 multicol
38 shapepar
39 \end_modules
40 \maintain_unincluded_children false
41 \language english
42 \language_package default
43 \inputencoding auto
44 \fontencoding global
45 \font_roman "lmodern" "default"
46 \font_sans "lmss" "default"
47 \font_typewriter "lmtt" "default"
48 \font_math "auto" "auto"
49 \font_default_family default
50 \use_non_tex_fonts false
51 \font_sc false
52 \font_osf false
53 \font_sf_scale 100 100
54 \font_tt_scale 100 100
55 \use_microtype false
56 \graphics default
57 \default_output_format pdf2
58 \output_sync 0
59 \bibtex_command default
60 \index_command default
61 \paperfontsize 12
62 \spacing single
63 \use_hyperref true
64 \pdf_title "LyX's Additional Features manual"
65 \pdf_author "LyX Team"
66 \pdf_subject "LyX's additional features documentation"
67 \pdf_keywords "LyX, Documentation, Additional"
68 \pdf_bookmarks true
69 \pdf_bookmarksnumbered true
70 \pdf_bookmarksopen false
71 \pdf_bookmarksopenlevel 1
72 \pdf_breaklinks false
73 \pdf_pdfborder false
74 \pdf_colorlinks true
75 \pdf_backref false
76 \pdf_pdfusetitle false
77 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
78 \papersize a4paper
79 \use_geometry false
80 \use_package amsmath 1
81 \use_package amssymb 1
82 \use_package cancel 0
83 \use_package esint 0
84 \use_package mathdots 1
85 \use_package mathtools 0
86 \use_package mhchem 1
87 \use_package stackrel 0
88 \use_package stmaryrd 0
89 \use_package undertilde 0
90 \cite_engine basic
91 \cite_engine_type default
92 \biblio_style plain
93 \use_bibtopic false
94 \use_indices false
95 \paperorientation portrait
96 \suppress_date false
97 \justification true
98 \use_refstyle 0
99 \notefontcolor #0000ff
100 \index Index
101 \shortcut idx
102 \color #008000
103 \end_index
104 \secnumdepth 3
105 \tocdepth 3
106 \paragraph_separation indent
107 \paragraph_indentation default
108 \quotes_style english
109 \dynamic_quotes 0
110 \papercolumns 1
111 \papersides 2
112 \paperpagestyle headings
113 \tracking_changes true
114 \output_changes false
115 \html_math_output 0
116 \html_css_as_file 0
117 \html_be_strict true
118 \author -712698321 "Jürgen Spitzmüller"
119 \end_header
120
121 \begin_body
122
123 \begin_layout Title
124 Additional \SpecialChar LyX
125  Features
126 \end_layout
127
128 \begin_layout Subtitle
129 Version 2.2.x
130 \end_layout
131
132 \begin_layout Author
133 by the \SpecialChar LyX
134  Team
135 \begin_inset Foot
136 status collapsed
137
138 \begin_layout Plain Layout
139 \noindent
140 Principal maintainer of this file is
141 \noun on
142  Richard Heck
143 \noun default
144 .
145  If you have comments or error corrections, please send them to the \SpecialChar LyX
146  Documentati
147 on mailing list, 
148 \begin_inset Flex Code
149 status collapsed
150
151 \begin_layout Plain Layout
152 \noindent
153 <lyx-docs@lists.lyx.org>
154 \end_layout
155
156 \end_inset
157
158 .
159 \end_layout
160
161 \end_inset
162
163
164 \end_layout
165
166 \begin_layout Standard
167 \begin_inset CommandInset toc
168 LatexCommand tableofcontents
169
170 \end_inset
171
172
173 \end_layout
174
175 \begin_layout Chapter
176 Introduction
177 \end_layout
178
179 \begin_layout Standard
180 This manual is essentially Part II of the 
181 \emph on
182 User's Guide\SpecialChar endofsentence
183
184 \emph default
185  The reason for separating the two documents is simple: the 
186 \emph on
187 User's Guide
188 \emph default
189  is already quite lengthy, and it contains information on all of the basic
190  features one needs to know in order to prepare most documents.
191  However, the \SpecialChar LyX
192  Team has worked to make \SpecialChar LyX
193  extensible through various configuration
194  files and external packages.
195  That means that if you want to support the Fizzwizzle \SpecialChar LaTeX
196  package, you can
197  create a layout file (or module) for it without having to alter \SpecialChar LyX
198  itself.
199  We've already had contributions of several new features this way, and some
200  of them are documented here.
201  There are also some more `advanced' features, such as how to control the
202  presentation of bibliographies and how to work with multi-part documents,
203  that are not covered in the 
204 \emph on
205 User's Guide
206 \emph default
207  and are discussed here.
208 \end_layout
209
210 \begin_layout Standard
211 This manual also documents some special features, like fax support, version
212  control, and SGML support, which require additional software to work properly.
213  There is also a chapter on \SpecialChar LyX
214 's support for HTML.
215  And lastly, there's a chapter of \SpecialChar LaTeX
216  tools and tips, things you can use to
217  spruce up your documents by directly using the powerful features of \SpecialChar LaTeX
218 .
219  After all, \SpecialChar LyX
220  
221 \emph on
222 is
223 \emph default
224  only WYSIWYM and will only ever interface to some, not all, \SpecialChar LaTeX
225  features.
226 \end_layout
227
228 \begin_layout Standard
229 If you haven't read the 
230 \emph on
231 Introduction
232 \emph default
233  yet, you are definitely in the wrong manual.
234  The 
235 \emph on
236 Introduction
237 \emph default
238  is the first place to go, since it describes the notation and format of
239  all of the manuals.
240  You should also be thoroughly familiar with the 
241 \emph on
242 User's Guide
243 \emph default
244  and all of the basic features of \SpecialChar LyX
245  before attempting to read this one.
246 \end_layout
247
248 \begin_layout Standard
249 Since many of the topics in this manual depend heavily on \SpecialChar LyX
250 's interaction
251  with \SpecialChar LaTeX
252 , this first chapter covers the inner workings of \SpecialChar LyX
253  and how to direct
254  \SpecialChar LyX
255  to generate exactly the \SpecialChar LaTeX
256  code you want.
257  It is obviously for more seasoned \SpecialChar LyX
258  users.
259 \end_layout
260
261 \begin_layout Chapter
262 \SpecialChar LyX
263  and \SpecialChar LaTeX
264
265 \end_layout
266
267 \begin_layout Section
268 How \SpecialChar LyX
269  Uses \SpecialChar LaTeX
270
271 \end_layout
272
273 \begin_layout Standard
274 This chapter is for both \SpecialChar TeX
275 -nicians and the \SpecialChar LaTeX
276 -curious.
277  In it, we'll explain how \SpecialChar LyX
278  and \SpecialChar LaTeX
279  work together to produce printable output.
280  This is the only place in any of the manuals where we assume you know something
281  about \SpecialChar LaTeX
282 .
283 \end_layout
284
285 \begin_layout Standard
286 At one time, \SpecialChar LyX
287  was called a 
288 \begin_inset Quotes eld
289 \end_inset
290
291 WYSIWYM frontend to \SpecialChar LaTeX
292 ,
293 \begin_inset Quotes erd
294 \end_inset
295
296  but that's no longer true.
297  There are frontends to \SpecialChar LaTeX
298  out there.
299 \begin_inset Foot
300 status collapsed
301
302 \begin_layout Plain Layout
303 Some familar ones are \SpecialChar TeX
304 maker and kile, on Linux, and \SpecialChar TeX
305 shop, OSX.
306  There are also the \SpecialChar LaTeX
307  modes for vi and emacs, of course.
308 \end_layout
309
310 \end_inset
311
312  These are basically text editors with the ability to run \SpecialChar LaTeX
313  and mark any
314  errors in the file you're editing.
315  Although \SpecialChar LyX
316  
317 \emph on
318 is
319 \emph default
320  an editor, and it 
321 \emph on
322 does
323 \emph default
324  run \SpecialChar LaTeX
325 , and it also indicates errors in the file, it also does much, much
326  more.
327  For one thing, you don't need to know \SpecialChar LaTeX
328  to use \SpecialChar LyX
329  effectively.
330  And \SpecialChar LyX
331  has added its own extensions to \SpecialChar LaTeX
332 .
333  Try the following sometime: select 
334 \begin_inset Flex Noun
335 status collapsed
336
337 \begin_layout Plain Layout
338 Export\SpecialChar menuseparator
339 LaTeX
340 \end_layout
341
342 \end_inset
343
344  from the 
345 \begin_inset Flex Noun
346 status collapsed
347
348 \begin_layout Plain Layout
349 File
350 \end_layout
351
352 \end_inset
353
354  menu (or 
355 \begin_inset Flex Noun
356 status collapsed
357
358 \begin_layout Plain Layout
359 View\SpecialChar menuseparator
360 Source
361 \begin_inset space ~
362 \end_inset
363
364 Pane
365 \end_layout
366
367 \end_inset
368
369 ), then look at the preamble of the resulting 
370 \begin_inset Flex Code
371 status collapsed
372
373 \begin_layout Plain Layout
374 .tex
375 \end_layout
376
377 \end_inset
378
379  file.
380  You'll notice a variety of new macros defined specifically by \SpecialChar LyX
381 .
382  These macros are defined automatically, according to the features you use
383  in the document.
384 \end_layout
385
386 \begin_layout Standard
387 There are several commands that automatically invoke \SpecialChar LaTeX
388 .
389  They are:
390 \end_layout
391
392 \begin_layout Itemize
393 \begin_inset Flex Noun
394 status collapsed
395
396 \begin_layout Plain Layout
397 Document\SpecialChar menuseparator
398 View
399 \end_layout
400
401 \end_inset
402
403
404 \end_layout
405
406 \begin_layout Itemize
407 \begin_inset Flex Noun
408 status collapsed
409
410 \begin_layout Plain Layout
411 Document\SpecialChar menuseparator
412 Update
413 \end_layout
414
415 \end_inset
416
417
418 \end_layout
419
420 \begin_layout Standard
421 They will only invoke \SpecialChar LaTeX
422  if the file has changed since the last time \SpecialChar LaTeX
423  was
424  run.
425  
426 \end_layout
427
428 \begin_layout Standard
429 When \SpecialChar LyX
430  runs \SpecialChar LaTeX
431  on the file you're editing, it performs these steps:
432 \end_layout
433
434 \begin_layout Enumerate
435 Convert the document to \SpecialChar LaTeX
436  and save to a file with the extension 
437 \begin_inset Flex Code
438 status collapsed
439
440 \begin_layout Plain Layout
441 .tex
442 \end_layout
443
444 \end_inset
445
446  in place of 
447 \begin_inset Flex Code
448 status collapsed
449
450 \begin_layout Plain Layout
451 .lyx
452 \end_layout
453
454 \end_inset
455
456 .
457 \end_layout
458
459 \begin_layout Enumerate
460 Run \SpecialChar LaTeX
461  on the 
462 \begin_inset Flex Code
463 status collapsed
464
465 \begin_layout Plain Layout
466 .tex
467 \end_layout
468
469 \end_inset
470
471  file (maybe several times), and run any other commands (such as 
472 \begin_inset Flex Code
473 status collapsed
474
475 \begin_layout Plain Layout
476 bibtex
477 \end_layout
478
479 \end_inset
480
481  or 
482 \begin_inset Flex Code
483 status collapsed
484
485 \begin_layout Plain Layout
486 makeindex
487 \end_layout
488
489 \end_inset
490
491 ) needed to compile the \SpecialChar LaTeX
492  file.
493 \end_layout
494
495 \begin_layout Enumerate
496 If there are any errors, show the error log.
497 \end_layout
498
499 \begin_layout Standard
500 If you have run \SpecialChar LaTeX
501  using 
502 \begin_inset Flex Noun
503 status collapsed
504
505 \begin_layout Plain Layout
506 View\SpecialChar menuseparator
507 DVI
508 \end_layout
509
510 \end_inset
511
512 , \SpecialChar LyX
513  then runs a DVI viewer to display the DVI-file.
514  If you have used 
515 \begin_inset Flex Noun
516 status collapsed
517
518 \begin_layout Plain Layout
519 View\SpecialChar menuseparator
520 PostScript
521 \end_layout
522
523 \end_inset
524
525 , \SpecialChar LyX
526  performs further steps:
527 \end_layout
528
529 \begin_layout Itemize
530 Run 
531 \begin_inset Flex Code
532 status collapsed
533
534 \begin_layout Plain Layout
535 dvips
536 \end_layout
537
538 \end_inset
539
540  to convert the DVI file to PostScript.
541 \end_layout
542
543 \begin_layout Itemize
544 Run a PostScript viewer, such as 
545 \begin_inset Flex Code
546 status collapsed
547
548 \begin_layout Plain Layout
549 ghostview
550 \end_layout
551
552 \end_inset
553
554 , to display the PostScript file.
555 \end_layout
556
557 \begin_layout Standard
558 \SpecialChar LyX
559  does similar things when viewing, or exporting, other formats.
560 \end_layout
561
562 \begin_layout Section
563 Translating \SpecialChar LaTeX
564  files into \SpecialChar LyX
565
566 \end_layout
567
568 \begin_layout Standard
569 You can import a \SpecialChar LaTeX
570  file into \SpecialChar LyX
571  by using the 
572 \begin_inset Flex Noun
573 status collapsed
574
575 \begin_layout Plain Layout
576 File\SpecialChar menuseparator
577 Import\SpecialChar menuseparator
578 LaTeX
579 \end_layout
580
581 \end_inset
582
583  command in \SpecialChar LyX
584 .
585  This will call a program named 
586 \begin_inset Flex Code
587 status collapsed
588
589 \begin_layout Plain Layout
590 tex2lyx
591 \end_layout
592
593 \end_inset
594
595  which will create a file 
596 \begin_inset Flex Code
597 status collapsed
598
599 \begin_layout Plain Layout
600 foo.lyx
601 \end_layout
602
603 \end_inset
604
605  from the file 
606 \begin_inset Flex Code
607 status collapsed
608
609 \begin_layout Plain Layout
610 foo.tex
611 \end_layout
612
613 \end_inset
614
615 .
616  \SpecialChar LyX
617  will then open that file.
618 \begin_inset Foot
619 status collapsed
620
621 \begin_layout Plain Layout
622 \begin_inset Flex Code
623 status collapsed
624
625 \begin_layout Plain Layout
626 tex2lyx
627 \end_layout
628
629 \end_inset
630
631  can also be run from the command line, of course.
632 \end_layout
633
634 \end_inset
635
636
637 \end_layout
638
639 \begin_layout Standard
640 \begin_inset Flex Code
641 status collapsed
642
643 \begin_layout Plain Layout
644 tex2lyx
645 \end_layout
646
647 \end_inset
648
649  will translate most legal \SpecialChar LaTeX
650 , but not everything.
651  It will put things it doesn't understand into \SpecialChar TeX
652  code, so after translating
653  a file with 
654 \begin_inset Flex Code
655 status collapsed
656
657 \begin_layout Plain Layout
658 tex2lyx
659 \end_layout
660
661 \end_inset
662
663 , you can look for \SpecialChar TeX
664  code and hand-edit it until it looks right.
665 \end_layout
666
667 \begin_layout Standard
668 If you don't know what \SpecialChar TeX
669  code is, read the next section.
670 \end_layout
671
672 \begin_layout Section
673 \begin_inset CommandInset label
674 LatexCommand label
675 name "sec:Inserting-TeX-Code"
676
677 \end_inset
678
679 Inserting \SpecialChar TeX
680  Code into \SpecialChar LyX
681  Documents 
682 \end_layout
683
684 \begin_layout Standard
685 Anything you can do in \SpecialChar LaTeX
686  you can do in \SpecialChar LyX
687 , for a very simple reason: You can
688  always insert \SpecialChar TeX
689  code into any \SpecialChar LyX
690  document.
691  \SpecialChar LyX
692  cannot, and will never be able to, display every possible \SpecialChar LaTeX
693  construct.
694  If ever you need to insert \SpecialChar LaTeX
695  commands into your \SpecialChar LyX
696  document, you can use the
697  
698 \begin_inset Flex Code
699 status collapsed
700
701 \begin_layout Plain Layout
702 \SpecialChar TeX
703  Code
704 \end_layout
705
706 \end_inset
707
708  box, which you can insert into your document with 
709 \begin_inset Flex Noun
710 status collapsed
711
712 \begin_layout Plain Layout
713 Insert\SpecialChar menuseparator
714
715 \family sans
716 TeX
717 \family default
718  Code
719 \end_layout
720
721 \end_inset
722
723  or the keyboard shortcut 
724 \begin_inset Info
725 type  "shortcut"
726 arg   "ert-insert"
727 \end_inset
728
729 .
730 \end_layout
731
732 \begin_layout Standard
733 Here's an example of inserting \SpecialChar LaTeX
734  commands in a \SpecialChar LyX
735  document.
736  The code looks like this:
737 \end_layout
738
739 \begin_layout LyX-Code
740
741 \backslash
742 begin{tabular}{ll}
743 \begin_inset Newline newline
744 \end_inset
745
746
747 \backslash
748 begin{minipage}{5cm}
749 \begin_inset Newline newline
750 \end_inset
751
752 This is an example of a minipage environment.
753  You 
754 \begin_inset Newline newline
755 \end_inset
756
757 can put nearly everything in it, even (non-floating) 
758 \begin_inset Newline newline
759 \end_inset
760
761 figures and tables.
762  
763 \begin_inset Newline newline
764 \end_inset
765
766
767 \backslash
768 end{minipage}
769 \begin_inset Newline newline
770 \end_inset
771
772 &
773 \begin_inset Newline newline
774 \end_inset
775
776
777 \backslash
778 begin{minipage}{5cm}
779 \begin_inset Newline newline
780 \end_inset
781
782
783 \backslash
784 begin{verbatim}
785 \begin_inset Newline newline
786 \end_inset
787
788
789 \backslash
790 begin{minipage}{5cm}
791 \begin_inset Newline newline
792 \end_inset
793
794 This ...
795  
796 \begin_inset Newline newline
797 \end_inset
798
799
800 \backslash
801 end{minipage}
802 \begin_inset Newline newline
803 \end_inset
804
805
806 \backslash
807 end{verbatim}
808 \begin_inset Newline newline
809 \end_inset
810
811
812 \backslash
813 end{minipage}
814 \begin_inset Newline newline
815 \end_inset
816
817
818 \backslash
819 end{tabular}
820 \end_layout
821
822 \begin_layout LyX-Code
823
824 \end_layout
825
826 \begin_layout Standard
827 The 
828 \begin_inset Flex Code
829 status collapsed
830
831 \begin_layout Plain Layout
832 \SpecialChar TeX
833  Code
834 \end_layout
835
836 \end_inset
837
838  box containing this text is directly after this paragraph.
839  Those of you reading the manual in \SpecialChar LyX
840  will only see the \SpecialChar TeX
841  code inset.
842  Those reading a printed version of the manuals will see the actual results:
843 \begin_inset VSpace bigskip
844 \end_inset
845
846
847 \end_layout
848
849 \begin_layout Standard
850 \begin_inset ERT
851 status open
852
853 \begin_layout Plain Layout
854
855
856 \backslash
857 begin{tabular}{ll}
858 \end_layout
859
860 \begin_layout Plain Layout
861
862
863 \backslash
864 begin{minipage}{5cm}
865 \end_layout
866
867 \begin_layout Plain Layout
868
869 This is an example of a minipage environment.
870  You can put nearly everything in it, even (non-floating) figures and tables.
871  
872 \end_layout
873
874 \begin_layout Plain Layout
875
876
877 \backslash
878 end{minipage}
879 \end_layout
880
881 \begin_layout Plain Layout
882
883 &
884 \end_layout
885
886 \begin_layout Plain Layout
887
888
889 \backslash
890 begin{minipage}{5cm}
891 \end_layout
892
893 \begin_layout Plain Layout
894
895
896 \backslash
897 begin{verbatim}
898 \end_layout
899
900 \begin_layout Plain Layout
901
902
903 \backslash
904 begin{minipage}{5cm}
905 \end_layout
906
907 \begin_layout Plain Layout
908
909 This ...
910  
911 \end_layout
912
913 \begin_layout Plain Layout
914
915
916 \backslash
917 end{minipage}
918 \end_layout
919
920 \begin_layout Plain Layout
921
922
923 \backslash
924 end{verbatim}
925 \end_layout
926
927 \begin_layout Plain Layout
928
929
930 \backslash
931 end{minipage}
932 \end_layout
933
934 \begin_layout Plain Layout
935
936
937 \backslash
938 end{tabular}
939 \end_layout
940
941 \end_inset
942
943
944 \begin_inset VSpace bigskip
945 \end_inset
946
947
948 \end_layout
949
950 \begin_layout Standard
951 In addition to using \SpecialChar TeX
952  code, you can also create a separate file containing
953  some complex \SpecialChar LaTeX
954  structure and then use 
955 \begin_inset Flex Noun
956 status collapsed
957
958 \begin_layout Plain Layout
959 Insert\SpecialChar menuseparator
960 Child
961 \begin_inset space ~
962 \end_inset
963
964 Document
965 \end_layout
966
967 \end_inset
968
969  to include your file (you should select the type 
970 \begin_inset Flex Code
971 status collapsed
972
973 \begin_layout Plain Layout
974 Input
975 \end_layout
976
977 \end_inset
978
979 ).
980  We recommend that you only do this if you have a 
981 \begin_inset Flex Code
982 status collapsed
983
984 \begin_layout Plain Layout
985 .tex
986 \end_layout
987
988 \end_inset
989
990  file which you 
991 \emph on
992 know
993 \emph default
994  works already.
995  Otherwise, you'll have a big job tracking down \SpecialChar LaTeX
996  errors.
997 \end_layout
998
999 \begin_layout Standard
1000 There are a few last points to emphasize:
1001 \end_layout
1002
1003 \begin_layout Itemize
1004 \SpecialChar LyX
1005  
1006 \emph on
1007 does not
1008 \emph default
1009  check if your \SpecialChar LaTeX
1010  code is correct.
1011 \end_layout
1012
1013 \begin_layout Itemize
1014 Beware of reinventing the wheel.
1015 \end_layout
1016
1017 \begin_layout Standard
1018 On that last point, \SpecialChar LyX
1019  does have quite a few features tucked into it, and
1020  more are coming.
1021  Be sure to check the manuals to make sure that \SpecialChar LyX
1022  doesn't have such-and-such
1023  feature before you decide you have to do it by hand.
1024  Moreover, there are numerous \SpecialChar LaTeX
1025  packages out there to do all sorts of things,
1026  from labels to envelopes to fancy multipage tables.
1027  Check out 
1028 \begin_inset CommandInset href
1029 LatexCommand href
1030 name "CTAN"
1031 target "http://www.ctan.org/"
1032 literal "false"
1033
1034 \end_inset
1035
1036  for details.
1037 \end_layout
1038
1039 \begin_layout Standard
1040 If you do need to do some wild and fancy things within your document, be
1041  sure to check out a good \SpecialChar LaTeX
1042  book for assistance.
1043  There are a number of them listed in the bibliography of the 
1044 \emph on
1045 User's Guide
1046 \emph default
1047 .
1048 \end_layout
1049
1050 \begin_layout Section
1051 \SpecialChar LyX
1052  and the \SpecialChar LaTeX
1053  Preamble
1054 \end_layout
1055
1056 \begin_layout Subsection
1057 About the \SpecialChar LaTeX
1058  Preamble
1059 \end_layout
1060
1061 \begin_layout Standard
1062 If you already know \SpecialChar LaTeX
1063 , there is no need to explain here what the preamble
1064  is good for.
1065  If you don't, the following will give you some ideas—we recommend again
1066  that you consult a \SpecialChar LaTeX
1067  book for further information.
1068  In any case, you should read the points below, because they explain what
1069  you can do and what you don't need to do in the \SpecialChar LaTeX
1070  preamble of a \SpecialChar LyX
1071  document.
1072 \end_layout
1073
1074 \begin_layout Standard
1075 The \SpecialChar LaTeX
1076  preamble comes at the very beginning of a document, 
1077 \emph on
1078 before
1079 \emph default
1080  the text.
1081  It serves to:
1082 \end_layout
1083
1084 \begin_layout Itemize
1085 Declare the document class.
1086  
1087 \begin_inset Newline newline
1088 \end_inset
1089
1090 \SpecialChar LyX
1091  already does this for you.
1092  If you're a seasoned \SpecialChar LaTeX
1093 -nician, and you have a custom document class you
1094  want to use, check out the 
1095 \emph on
1096 Customization Manual
1097 \emph default
1098  for information on how to make \SpecialChar LyX
1099  interface to it.
1100 \end_layout
1101
1102 \begin_layout Itemize
1103 Declare the usage of packages.
1104  
1105 \begin_inset Newline newline
1106 \end_inset
1107
1108 \SpecialChar LaTeX
1109  packages provide special commands, which are only available within a document
1110  when the package has been declared in the preamble.
1111  In addition to providing special commands, the inclusion of a package can
1112  change the document.
1113  For example, the package 
1114 \begin_inset Flex Code
1115 status collapsed
1116
1117 \begin_layout Plain Layout
1118 indentfirst
1119 \end_layout
1120
1121 \end_inset
1122
1123  forces all paragraphs to be indented.
1124  There are other packages for labels, envelopes, margins, etc.
1125  
1126 \end_layout
1127
1128 \begin_layout Itemize
1129 Set counters, variables, lengths and widths.
1130  
1131 \begin_inset Newline newline
1132 \end_inset
1133
1134 There are several \SpecialChar LaTeX
1135  counters and variables that 
1136 \emph on
1137 must
1138 \emph default
1139  be set globally from within the preamble in order to have the desired effect.
1140  (There are variables that you can set and reset inside the document, too.)
1141  Margins are a good example of something that must be set in the preamble.
1142  Another example is the label format for lists.
1143  You can actually set these just about anywhere, but it's best to do it
1144  just once, inside the preamble.
1145 \end_layout
1146
1147 \begin_layout Itemize
1148 Declare user defined commands (with 
1149 \begin_inset Flex Code
1150 status collapsed
1151
1152 \begin_layout Plain Layout
1153
1154 \backslash
1155 newcommand
1156 \end_layout
1157
1158 \end_inset
1159
1160  or 
1161 \begin_inset Flex Code
1162 status collapsed
1163
1164 \begin_layout Plain Layout
1165
1166 \backslash
1167 renewcommand
1168 \end_layout
1169
1170 \end_inset
1171
1172 ).
1173 \begin_inset Newline newline
1174 \end_inset
1175
1176 These are abbreviations for \SpecialChar LaTeX
1177  commands which appear very often inside a document.
1178  Although the preamble is a good place to declare such commands, they 
1179 \emph on
1180 can
1181 \emph default
1182  be declared anywhere (before they are used for the first time, of course).
1183  This can be useful if there is a lot of raw \SpecialChar LaTeX
1184  code in your document, which
1185  normally should not be the case.
1186 \end_layout
1187
1188 \begin_layout Standard
1189 \SpecialChar LyX
1190  adds its own set of definitions to the preamble of the 
1191 \begin_inset Flex Code
1192 status collapsed
1193
1194 \begin_layout Plain Layout
1195 .tex
1196 \end_layout
1197
1198 \end_inset
1199
1200  file it produces.
1201  This makes \SpecialChar LaTeX
1202  files generated by \SpecialChar LyX
1203  portable.
1204 \end_layout
1205
1206 \begin_layout Subsection
1207 Changing the Preamble
1208 \end_layout
1209
1210 \begin_layout Standard
1211 The commands which \SpecialChar LyX
1212  adds to the preamble of a \SpecialChar LaTeX
1213  file are fixed; you can't
1214  change them without patching \SpecialChar LyX
1215  itself.
1216  You can, however, add your own stuff to the preamble by selecting 
1217 \begin_inset Flex Noun
1218 status collapsed
1219
1220 \begin_layout Plain Layout
1221 \SpecialChar LaTeX
1222
1223 \begin_inset space ~
1224 \end_inset
1225
1226 Preamble
1227 \end_layout
1228
1229 \end_inset
1230
1231  in the 
1232 \begin_inset Flex Noun
1233 status collapsed
1234
1235 \begin_layout Plain Layout
1236 Document\SpecialChar menuseparator
1237 Settings
1238 \end_layout
1239
1240 \end_inset
1241
1242  dialog.
1243  \SpecialChar LyX
1244  adds anything in the 
1245 \begin_inset Flex Noun
1246 status collapsed
1247
1248 \begin_layout Plain Layout
1249 Preamble
1250 \end_layout
1251
1252 \end_inset
1253
1254  dialog to its own built-in preamble.
1255  Before adding your own declarations in the preamble, you should make sure
1256  that \SpecialChar LyX
1257  doesn't already support what you want to do.
1258  (Remember what we said about reinventing the wheel?) Also, 
1259 \emph on
1260 make sure your preamble code is correct
1261 \emph default
1262 .
1263  \SpecialChar LyX
1264  doesn't check it for you.
1265  If there is an error, you're likely to get an error like 
1266 \begin_inset Quotes eld
1267 \end_inset
1268
1269
1270 \begin_inset Flex Code
1271 status collapsed
1272
1273 \begin_layout Plain Layout
1274 Missing 
1275 \backslash
1276 begin{document}
1277 \end_layout
1278
1279 \end_inset
1280
1281
1282 \begin_inset Quotes erd
1283 \end_inset
1284
1285 .
1286  If you see this error, check your preamble.
1287 \end_layout
1288
1289 \begin_layout Subsection
1290 Examples
1291 \end_layout
1292
1293 \begin_layout Standard
1294 Here are some examples of what you can add to a preamble, and what they
1295  do.
1296 \end_layout
1297
1298 \begin_layout Subsubsection
1299 Example #1: Offsets
1300 \end_layout
1301
1302 \begin_layout Standard
1303 There are two variables under \SpecialChar LaTeX
1304  that control page position: 
1305 \begin_inset Flex Code
1306 status collapsed
1307
1308 \begin_layout Plain Layout
1309
1310 \backslash
1311 hoffset
1312 \end_layout
1313
1314 \end_inset
1315
1316  and 
1317 \begin_inset Flex Code
1318 status collapsed
1319
1320 \begin_layout Plain Layout
1321
1322 \backslash
1323 voffset
1324 \end_layout
1325
1326 \end_inset
1327
1328 .
1329  Their names should be self-explanatory.
1330  These variables are useful if you think for a moment about computer labels.
1331  Sometimes, the size of a print medium and the area of the medium that you
1332  can actually print on aren't the same.
1333  This is where 
1334 \begin_inset Flex Code
1335 status collapsed
1336
1337 \begin_layout Plain Layout
1338
1339 \backslash
1340 hoffset
1341 \end_layout
1342
1343 \end_inset
1344
1345  and 
1346 \begin_inset Flex Code
1347 status collapsed
1348
1349 \begin_layout Plain Layout
1350
1351 \backslash
1352 voffset
1353 \end_layout
1354
1355 \end_inset
1356
1357  come in.
1358 \end_layout
1359
1360 \begin_layout Standard
1361 The default values for 
1362 \begin_inset Flex Code
1363 status collapsed
1364
1365 \begin_layout Plain Layout
1366
1367 \backslash
1368 hoffset
1369 \end_layout
1370
1371 \end_inset
1372
1373  and 
1374 \begin_inset Flex Code
1375 status collapsed
1376
1377 \begin_layout Plain Layout
1378
1379 \backslash
1380 voffset
1381 \end_layout
1382
1383 \end_inset
1384
1385  are both 0
1386 \begin_inset space \thinspace{}
1387 \end_inset
1388
1389 points, i.
1390 \begin_inset space \thinspace{}
1391 \end_inset
1392
1393 e.
1394 \begin_inset space \space{}
1395 \end_inset
1396
1397 the page isn't shifted.
1398  Unfortunately, some DVI drivers always seem to shift the page.
1399  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1400  If you're using \SpecialChar LyX
1401  on a system that you don't personally maintain, and your
1402  sysadmin is a doofus, 
1403 \begin_inset Flex Code
1404 status collapsed
1405
1406 \begin_layout Plain Layout
1407
1408 \backslash
1409 hoffset
1410 \end_layout
1411
1412 \end_inset
1413
1414  and 
1415 \begin_inset Flex Code
1416 status collapsed
1417
1418 \begin_layout Plain Layout
1419
1420 \backslash
1421 voffset
1422 \end_layout
1423
1424 \end_inset
1425
1426  can save the day.
1427  Suppose your left and top margins are always 0.5
1428 \begin_inset space \thinspace{}
1429 \end_inset
1430
1431 inches too big.
1432  You can add this to the preamble:
1433 \end_layout
1434
1435 \begin_layout LyX-Code
1436
1437 \backslash
1438 setlength{
1439 \backslash
1440 hoffset}{-0.5 in}
1441 \end_layout
1442
1443 \begin_layout LyX-Code
1444
1445 \backslash
1446 setlength{
1447 \backslash
1448 voffset}{-0.5 in}
1449 \end_layout
1450
1451 \begin_layout Standard
1452 and your margins should now be correct.
1453 \end_layout
1454
1455 \begin_layout Subsubsection
1456 Example #2: Labels
1457 \end_layout
1458
1459 \begin_layout Standard
1460 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1461  There's a rather nice package, available at your nearest CTAN archive,
1462  for printing sheets of labels: 
1463 \begin_inset Flex Code
1464 status collapsed
1465
1466 \begin_layout Plain Layout
1467 labels.sty
1468 \end_layout
1469
1470 \end_inset
1471
1472 .
1473  Now, your system may not have this package installed by default.
1474  We leave that up to you to check.
1475  You'll also want to read the documentation for it; we're not going to do
1476  that for you.
1477  Since this is an example, however, we'll give you an example of how you
1478  use this package.
1479 \end_layout
1480
1481 \begin_layout Standard
1482 First, make sure you're using the 
1483 \begin_inset Flex Code
1484 status collapsed
1485
1486 \begin_layout Plain Layout
1487 article
1488 \end_layout
1489
1490 \end_inset
1491
1492  document class.
1493  Next, you need to put the following in your preamble:
1494 \end_layout
1495
1496 \begin_layout LyX-Code
1497
1498 \backslash
1499 usepackage{labels}
1500 \end_layout
1501
1502 \begin_layout LyX-Code
1503
1504 \backslash
1505 LabelCols=3
1506 \end_layout
1507
1508 \begin_layout LyX-Code
1509
1510 \backslash
1511 LabelRows=7
1512 \end_layout
1513
1514 \begin_layout LyX-Code
1515
1516 \backslash
1517 LeftBorder=8mm
1518 \end_layout
1519
1520 \begin_layout LyX-Code
1521
1522 \backslash
1523 RightBorder=8mm
1524 \end_layout
1525
1526 \begin_layout LyX-Code
1527
1528 \backslash
1529 TopBorder=9mm
1530 \end_layout
1531
1532 \begin_layout LyX-Code
1533
1534 \backslash
1535 BottomBorder=2mm
1536 \end_layout
1537
1538 \begin_layout Standard
1539 This sets things up for Avery label sheets, stock #5360.
1540  You're now ready to print labels, but you'll need to insert \SpecialChar LaTeX
1541  code, placing
1542  the commands 
1543 \begin_inset Flex Code
1544 status collapsed
1545
1546 \begin_layout Plain Layout
1547
1548 \backslash
1549 begin{labels}
1550 \end_layout
1551
1552 \end_inset
1553
1554  and 
1555 \begin_inset Flex Code
1556 status collapsed
1557
1558 \begin_layout Plain Layout
1559
1560 \backslash
1561 end{labels}
1562 \end_layout
1563
1564 \end_inset
1565
1566  around each label text.
1567  This and other special features of 
1568 \begin_inset Flex Code
1569 status collapsed
1570
1571 \begin_layout Plain Layout
1572 labels.sty
1573 \end_layout
1574
1575 \end_inset
1576
1577  are explained in its documentation.
1578 \end_layout
1579
1580 \begin_layout Standard
1581 Someday, someone may write a \SpecialChar LyX
1582  layout file to support this package directly.
1583  Maybe that someone is you.
1584 \end_layout
1585
1586 \begin_layout Subsubsection
1587 Example #3: Paragraph Indentation
1588 \end_layout
1589
1590 \begin_layout Standard
1591 Americans are trained to indent the first line of 
1592 \emph on
1593 every
1594 \emph default
1595  paragraph.
1596  As with all of their other weird quirks, most Americans will whine and
1597  moan until they can have their way and indent the first line of all paragraphs.
1598  (Yes, we're joking.
1599  (We are?) 
1600 \emph on
1601 Yeah
1602 \emph default
1603 , we are.)
1604 \end_layout
1605
1606 \begin_layout Standard
1607 Of course, this behavior isn't standard typography.
1608  In books, you typically only indent the first line of a paragraph 
1609 \emph on
1610 if
1611 \emph default
1612  it follows another one.
1613  The idea behind indenting the first line of a paragraph is to distinguish
1614  neighboring paragraphs from one another.
1615  If there is no previous paragraph—for example, if it follows a figure or
1616  is the first paragraph in a section—then there is no need for indentation.
1617  
1618 \end_layout
1619
1620 \begin_layout Standard
1621 If you're a typical American (we're still joking!), though, you don't care
1622  about such esoteric things; you want your indentation! Add this to the
1623  preamble:
1624 \end_layout
1625
1626 \begin_layout LyX-Code
1627
1628 \backslash
1629 usepackage{indentfirst}
1630 \end_layout
1631
1632 \begin_layout Standard
1633 If your \SpecialChar TeX
1634  distribution isn't braindead, you'll have this package, and all
1635  of your paragraphs will get the indentation the Founding Fathers intended
1636  they should have.
1637 \end_layout
1638
1639 \begin_layout Subsubsection
1640 Example #4: This Document
1641 \end_layout
1642
1643 \begin_layout Standard
1644 You can also check out the preamble of this document to get an idea of some
1645  of the advanced things you can do.
1646 \end_layout
1647
1648 \begin_layout Section
1649 \SpecialChar LyX
1650  and \SpecialChar LaTeX
1651  Errors
1652 \end_layout
1653
1654 \begin_layout Standard
1655 When \SpecialChar LyX
1656  calls \SpecialChar LaTeX
1657 , it tells \SpecialChar LaTeX
1658  to blithely ignore any errors and keep going.
1659  It then uses the logfile from the \SpecialChar LaTeX
1660  run to do a post-mortem.
1661  After analyzing the logfile, \SpecialChar LyX
1662  displays a dialog listing the errors.
1663  Clicking on any one of them will take you to the position in your \SpecialChar LyX
1664  file
1665  where the error occurred.
1666 \begin_inset Foot
1667 status collapsed
1668
1669 \begin_layout Plain Layout
1670 Well, usually.
1671  Analyzing the logfile is a tough job, and \SpecialChar LyX
1672  doesn't always go to the right
1673  line.
1674  There are also cases where \SpecialChar LaTeX
1675  reports the error on one line, but the actual
1676  error is earlier.
1677  This is not unlike forgetting a closing brace in a program: You'll get
1678  an error, but only later.
1679 \end_layout
1680
1681 \end_inset
1682
1683
1684 \end_layout
1685
1686 \begin_layout Standard
1687 Some folks also like to look at the log file directly: It is available from
1688  
1689 \begin_inset Flex Noun
1690 status collapsed
1691
1692 \begin_layout Plain Layout
1693 Document\SpecialChar menuseparator
1694 LaTeX
1695 \begin_inset space ~
1696 \end_inset
1697
1698 Log
1699 \end_layout
1700
1701 \end_inset
1702
1703 .
1704  There are some fairly common error messages and warnings.
1705  We'll cover those here.
1706  You should look at a good \SpecialChar LaTeX
1707  book for a complete listing.
1708 \end_layout
1709
1710 \begin_layout Itemize
1711 \begin_inset Flex Code
1712 status collapsed
1713
1714 \begin_layout Plain Layout
1715 LaTeX Warning
1716 \end_layout
1717
1718 \end_inset
1719
1720
1721 \begin_inset Newline newline
1722 \end_inset
1723
1724 Anything beginning with these words is a warning message for the purpose
1725  of 
1726 \begin_inset Quotes eld
1727 \end_inset
1728
1729 debugging
1730 \begin_inset Quotes erd
1731 \end_inset
1732
1733  the \SpecialChar LaTeX
1734  code itself.
1735  You'll get messages like this if you added or changed cross-references
1736  or bibliography entries, in which case, \SpecialChar LaTeX
1737  is trying to tell you that you
1738  need to make another run.
1739  You can by-and-large ignore these.
1740 \end_layout
1741
1742 \begin_layout Itemize
1743 \begin_inset Flex Code
1744 status collapsed
1745
1746 \begin_layout Plain Layout
1747 LaTeX Font Warning
1748 \end_layout
1749
1750 \end_inset
1751
1752
1753 \begin_inset Newline newline
1754 \end_inset
1755
1756 Another warning message, this time about fonts which \SpecialChar LaTeX
1757  couldn't find.
1758  The rest of the message will often say something about a replacement font
1759  that \SpecialChar LaTeX
1760  used.
1761  You can safely ignore these, too.
1762 \end_layout
1763
1764 \begin_layout Itemize
1765 \begin_inset Flex Code
1766 status collapsed
1767
1768 \begin_layout Plain Layout
1769 Overfull 
1770 \backslash
1771 hbox
1772 \end_layout
1773
1774 \end_inset
1775
1776
1777 \begin_inset Newline newline
1778 \end_inset
1779
1780 \SpecialChar LaTeX
1781  absolutely 
1782 \emph on
1783 loves
1784 \emph default
1785  to spew these out.
1786  They are warnings about lines that were too long and run past the right
1787  margin.
1788  Almost always, this is unnoticeable in the final output.
1789  (It can be just a point or two.) Or, only one or two characters extend past
1790  the margin.
1791  \SpecialChar LaTeX
1792  seems to generate at least one of these messages for just about any document
1793  you write.
1794 \begin_inset Newline newline
1795 \end_inset
1796
1797 You can ignore these messages.
1798  Your eyes will tell you if there's a problem with something that's too
1799  wide; just look at the output.
1800 \begin_inset Foot
1801 status collapsed
1802
1803 \begin_layout Plain Layout
1804 You can also enable the `draft' option in 
1805 \begin_inset Flex Noun
1806 status collapsed
1807
1808 \begin_layout Plain Layout
1809 Document\SpecialChar menuseparator
1810 Settings
1811 \end_layout
1812
1813 \end_inset
1814
1815 , and then \SpecialChar LaTeX
1816  will draw a black box in the margin of lines that are overfull.
1817 \end_layout
1818
1819 \end_inset
1820
1821
1822 \end_layout
1823
1824 \begin_layout Itemize
1825 \begin_inset Flex Code
1826 status collapsed
1827
1828 \begin_layout Plain Layout
1829 Underfull 
1830 \backslash
1831 hbox
1832 \end_layout
1833
1834 \end_inset
1835
1836
1837 \begin_inset Newline newline
1838 \end_inset
1839
1840 Not quite as common as its cousin.
1841  \SpecialChar LaTeX
1842  seems to like to print lines that are a bit too wide as opposed to ones
1843  that are a bit too narrow.
1844  We have no idea why.
1845 \end_layout
1846
1847 \begin_layout Itemize
1848 \begin_inset Flex Code
1849 status collapsed
1850
1851 \begin_layout Plain Layout
1852 Overfull 
1853 \backslash
1854 vbox
1855 \end_layout
1856
1857 \end_inset
1858
1859  and 
1860 \begin_inset Flex Code
1861 status collapsed
1862
1863 \begin_layout Plain Layout
1864 Underfull 
1865 \backslash
1866 vbox
1867 \end_layout
1868
1869 \end_inset
1870
1871
1872 \begin_inset Newline newline
1873 \end_inset
1874
1875 Warnings about troubles breaking the page.
1876  Once again, just look at the output.
1877  Your eyes will tell you where something has gone wrong.
1878 \end_layout
1879
1880 \begin_layout Itemize
1881 \begin_inset Flex Code
1882 status collapsed
1883
1884 \begin_layout Plain Layout
1885 LaTeX Error: File 
1886 \begin_inset Quotes els
1887 \end_inset
1888
1889 Xxxx
1890 \begin_inset Quotes ers
1891 \end_inset
1892
1893  not found
1894 \end_layout
1895
1896 \end_inset
1897
1898
1899 \begin_inset Newline newline
1900 \end_inset
1901
1902 The file 
1903 \begin_inset Quotes eld
1904 \end_inset
1905
1906 Xxxx
1907 \begin_inset Quotes erd
1908 \end_inset
1909
1910  isn't installed on this system.
1911  This usually appears because some package your document needs isn't installed.
1912  If you didn't touch the preamble or didn't use the 
1913 \begin_inset Flex Code
1914 status collapsed
1915
1916 \begin_layout Plain Layout
1917
1918 \backslash
1919 usepackage{}
1920 \end_layout
1921
1922 \end_inset
1923
1924  command, then one of the packages \SpecialChar LyX
1925  tried to load is missing.
1926  Use 
1927 \begin_inset Flex Noun
1928 status collapsed
1929
1930 \begin_layout Plain Layout
1931 Help\SpecialChar menuseparator
1932 \SpecialChar LaTeX
1933  Configuration
1934 \end_layout
1935
1936 \end_inset
1937
1938  to get a list of packages that \SpecialChar LyX
1939  knows about.
1940  This file is updated whenever you reconfigure \SpecialChar LyX
1941  (using 
1942 \begin_inset Flex Noun
1943 status collapsed
1944
1945 \begin_layout Plain Layout
1946 Tools\SpecialChar menuseparator
1947 Reconfigure
1948 \end_layout
1949
1950 \end_inset
1951
1952 ) and tells you which packages have been detected and what they do.
1953 \begin_inset Newline newline
1954 \end_inset
1955
1956 If you did use the 
1957 \begin_inset Flex Code
1958 status collapsed
1959
1960 \begin_layout Plain Layout
1961
1962 \backslash
1963 usepackage{}
1964 \end_layout
1965
1966 \end_inset
1967
1968  command and the package in question isn't installed, then you'll need to
1969  install it yourself.
1970 \end_layout
1971
1972 \begin_layout Itemize
1973 \begin_inset Flex Code
1974 status collapsed
1975
1976 \begin_layout Plain Layout
1977 LaTeX Error: Unknown option
1978 \end_layout
1979
1980 \end_inset
1981
1982
1983 \begin_inset Newline newline
1984 \end_inset
1985
1986 Error messages beginning with this are trying to tell you that you specified
1987  a bad or undefined option to a package.
1988  Check the package's documentation.
1989 \end_layout
1990
1991 \begin_layout Itemize
1992 \begin_inset Flex Code
1993 status collapsed
1994
1995 \begin_layout Plain Layout
1996 Undefined control sequence
1997 \end_layout
1998
1999 \end_inset
2000
2001
2002 \begin_inset Newline newline
2003 \end_inset
2004
2005 If you've inserted \SpecialChar LaTeX
2006  code into your document, but made a typo, you'll get
2007  one of these.
2008  You may have forgotten to load a package.
2009  In any case, this error message usually means that you used an undefined
2010  command.
2011  
2012 \end_layout
2013
2014 \begin_layout Standard
2015 There are other error and warning messages.
2016  Some are self-explanatory.
2017  These are usually \SpecialChar LaTeX
2018  messages.
2019  Others are downright cryptic.
2020  These are usually \SpecialChar TeX
2021  error messages, and we really have 
2022 \emph on
2023 no clue
2024 \emph default
2025  what they mean or how to decipher them.
2026  No-one does.
2027 \end_layout
2028
2029 \begin_layout Standard
2030 There's a general sequence you should follow if you get error messages:
2031 \end_layout
2032
2033 \begin_layout Enumerate
2034 Look at the \SpecialChar LaTeX
2035  code you inserted for typos.
2036 \end_layout
2037
2038 \begin_layout Enumerate
2039 If there are no typos, check that you used the command(s) correctly.
2040 \end_layout
2041
2042 \begin_layout Enumerate
2043 If you get a bunch of error boxes piled up at the very top of the document—and
2044  especially if you see a 
2045 \begin_inset Quotes eld
2046 \end_inset
2047
2048
2049 \begin_inset Flex Code
2050 status collapsed
2051
2052 \begin_layout Plain Layout
2053 Missing 
2054 \backslash
2055 begin{document}
2056 \end_layout
2057
2058 \end_inset
2059
2060
2061 \begin_inset Quotes erd
2062 \end_inset
2063
2064  error—it means that there are errors in the preamble.
2065  Start debugging your preamble.
2066 \end_layout
2067
2068 \begin_layout Enumerate
2069 If you didn't add anything to the preamble and didn't add any \SpecialChar LaTeX
2070  code to the
2071  document, the first suspect is your \SpecialChar LaTeX
2072  distribution itself.
2073  Check for missing packages and install them.
2074 \end_layout
2075
2076 \begin_layout Enumerate
2077 Okay, so there are no missing packages.
2078  Did you use any of the fine-tuning options in \SpecialChar LyX
2079 ? Specifically, did you 
2080 \emph on
2081 misuse
2082 \emph default
2083  any of them, like trying to manually insert lots of 
2084 \begin_inset Flex Code
2085 status collapsed
2086
2087 \begin_layout Plain Layout
2088 Protected
2089 \begin_inset space ~
2090 \end_inset
2091
2092 Blanks
2093 \end_layout
2094
2095 \end_inset
2096
2097
2098 \begin_inset Flex Code
2099 status collapsed
2100
2101 \begin_layout Plain Layout
2102 Linebreaks
2103 \end_layout
2104
2105 \end_inset
2106
2107 , or 
2108 \begin_inset Flex Code
2109 status collapsed
2110
2111 \begin_layout Plain Layout
2112 Pagebreaks
2113 \end_layout
2114
2115 \end_inset
2116
2117 ? Did you try to kludge something together with these instead of using the
2118  appropriate paragraph environment?
2119 \end_layout
2120
2121 \begin_layout Enumerate
2122 All right, you didn't use any of the fine-tuning options, you played by
2123  the rules.
2124  Did you try to pull a fancy maneuver? Did you do something funky inside
2125  a table or an equation, like inserting a graphic into a table cell?
2126 \end_layout
2127
2128 \begin_layout Enumerate
2129 Do you have long sections of text where \SpecialChar LaTeX
2130  cannot find a place to break a
2131  line? By default, \SpecialChar LaTeX
2132  is rather strict about how much extra inter-word spacing
2133  it will add in order to break a line.
2134  Preferably, you should rework the paragraph to avoid the problem.
2135 \end_layout
2136
2137 \begin_layout Enumerate
2138 Did you go overboard with the nesting? \SpecialChar LyX
2139  (currently) doesn't check to make
2140  sure you're in the limits for nesting environments.
2141  If you nested a bunch of environments to the 
2142 \begin_inset Formula $17^{\mathrm{th}}$
2143 \end_inset
2144
2145  level, that's the problem.
2146  (The limit in \SpecialChar LaTeX
2147  is five.)
2148 \end_layout
2149
2150 \begin_layout Enumerate
2151 Okay, you didn't get any error messages, but your output looks awful.
2152  If you have a table or figure that's too wide or long for the page, you
2153  need to:
2154 \end_layout
2155
2156 \begin_deeper
2157 \begin_layout Enumerate
2158 rescale the figure so it fits.
2159 \end_layout
2160
2161 \begin_layout Enumerate
2162 trim down the table so it fits.
2163 \end_layout
2164
2165 \end_deeper
2166 \begin_layout Enumerate
2167 If something else is wrong with the output, and you didn't try to pull anything
2168  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2169 \end_layout
2170
2171 \begin_layout Standard
2172 If all this doesn't help—well, then 
2173 \emph on
2174 perhaps
2175 \emph default
2176  you might have found a bug in \SpecialChar LyX
2177 \SpecialChar ldots
2178 .
2179 \end_layout
2180
2181 \begin_layout Chapter
2182 Supplemental Tools
2183 \end_layout
2184
2185 \begin_layout Section
2186 Customizing Bibliographies with Bib\SpecialChar TeX
2187
2188 \change_inserted -712698321 1485694846
2189  or Biblatex
2190 \change_unchanged
2191
2192 \end_layout
2193
2194 \begin_layout Standard
2195 The most basic information about how to use Bib\SpecialChar TeX
2196  
2197 \change_inserted -712698321 1485694851
2198 or 
2199 \family sans
2200 Biblatex
2201 \family default
2202  
2203 \change_unchanged
2204 with \SpecialChar LyX
2205  is contained in the section 
2206 \emph on
2207 Bibliography databases
2208 \change_deleted -712698321 1485694823
2209  (Bib\SpecialChar TeX
2210 )
2211 \change_unchanged
2212
2213 \emph default
2214  of the 
2215 \emph on
2216 User's Guide
2217 \emph default
2218 .
2219  The following subsections explain special bibliography features supported
2220  by \SpecialChar LyX
2221 .
2222 \end_layout
2223
2224 \begin_layout Subsection
2225 Alternative Citation Styles
2226 \end_layout
2227
2228 \begin_layout Standard
2229 Standard Bib\SpecialChar TeX
2230  uses numbers (e.
2231 \begin_inset space \thinspace{}
2232 \end_inset
2233
2234 g.
2235 \begin_inset space \space{}
2236 \end_inset
2237
2238
2239 \begin_inset Quotes eld
2240 \end_inset
2241
2242 [12]
2243 \begin_inset Quotes erd
2244 \end_inset
2245
2246 ) to refer to a cited work.
2247  However, in many scientific disciplines, other citation styles are in use.
2248  The most common one is the author-year style (e.
2249 \begin_inset space \thinspace{}
2250 \end_inset
2251
2252 g.
2253 \begin_inset space \space{}
2254 \end_inset
2255
2256
2257 \begin_inset Quotes eld
2258 \end_inset
2259
2260 Knuth 1984a
2261 \begin_inset Quotes erd
2262 \end_inset
2263
2264 ).
2265  \SpecialChar LyX
2266  supports 
2267 \change_deleted -712698321 1485694902
2268 two
2269 \change_inserted -712698321 1485694902
2270 three
2271 \change_unchanged
2272  packages that provide this style,
2273 \change_inserted -712698321 1485694917
2274  
2275 \begin_inset Flex Code
2276 status collapsed
2277
2278 \begin_layout Plain Layout
2279
2280 \change_inserted -712698321 1485694917
2281 biblatex
2282 \change_unchanged
2283
2284 \end_layout
2285
2286 \end_inset
2287
2288 ,
2289 \change_unchanged
2290  
2291 \begin_inset Flex Code
2292 status collapsed
2293
2294 \begin_layout Plain Layout
2295 natbib
2296 \end_layout
2297
2298 \end_inset
2299
2300
2301 \change_inserted -712698321 1485696751
2302 ,
2303 \change_unchanged
2304  and 
2305 \begin_inset Flex Code
2306 status collapsed
2307
2308 \begin_layout Plain Layout
2309 jurabib
2310 \end_layout
2311
2312 \end_inset
2313
2314 .
2315  
2316 \change_deleted -712698321 1485695091
2317 Both
2318 \change_inserted -712698321 1485695093
2319 Each of these
2320 \change_unchanged
2321  packages ha
2322 \change_deleted -712698321 1485695095
2323 ve
2324 \change_inserted -712698321 1485695095
2325 s
2326 \change_unchanged
2327  their pros and cons, which cannot be listed in detail.
2328  If you only want to have simple author-year (or author-numerical) style,
2329  or if you want to use one of the countless style files for 
2330 \begin_inset Flex Code
2331 status collapsed
2332
2333 \begin_layout Plain Layout
2334 natbib
2335 \end_layout
2336
2337 \end_inset
2338
2339 , then the established 
2340 \begin_inset Flex Code
2341 status collapsed
2342
2343 \begin_layout Plain Layout
2344 natbib
2345 \end_layout
2346
2347 \end_inset
2348
2349  package is probably your choice.
2350  If you 
2351 \change_inserted -712698321 1485695152
2352 look for specific citation styles common in law studies
2353 \change_deleted -712698321 1485695162
2354 need special features like short title references, ibidem etc.
2355 \change_unchanged
2356 , you might consider the 
2357 \begin_inset Flex Code
2358 status collapsed
2359
2360 \begin_layout Plain Layout
2361 jurabib
2362 \end_layout
2363
2364 \end_inset
2365
2366  package.
2367
2368 \change_inserted -712698321 1485695432
2369  If you want to have full control over the formatting or look for advanced
2370  features such as ibidem, footnote citations, full title citations, advanced
2371  date formats (such as 400 BC) or full localization to other languages than
2372  English, you should definitely consider 
2373 \begin_inset Flex Code
2374 status collapsed
2375
2376 \begin_layout Plain Layout
2377
2378 \change_inserted -712698321 1485695328
2379 biblatex
2380 \end_layout
2381
2382 \end_inset
2383
2384 , which exceeds all other packages in terms of features, but is also quite
2385  heavy and more resource-hungry.
2386 \change_unchanged
2387
2388 \end_layout
2389
2390 \begin_layout Standard
2391 The handling of 
2392 \change_deleted -712698321 1485695449
2393 both
2394 \change_inserted -712698321 1485695449
2395 these
2396 \change_unchanged
2397  packages in \SpecialChar LyX
2398  is basically the same.
2399  Go to 
2400 \begin_inset Flex Noun
2401 status collapsed
2402
2403 \begin_layout Plain Layout
2404 Document\SpecialChar menuseparator
2405 Settings
2406 \end_layout
2407
2408 \end_inset
2409
2410  and select under 
2411 \begin_inset Flex Noun
2412 status collapsed
2413
2414 \begin_layout Plain Layout
2415 Bibliography
2416 \end_layout
2417
2418 \end_inset
2419
2420  
2421 \change_deleted -712698321 1485695462
2422 the option
2423 \change_inserted -712698321 1485695559
2424 the 
2425 \begin_inset Flex Noun
2426 status collapsed
2427
2428 \begin_layout Plain Layout
2429
2430 \change_inserted -712698321 1485695499
2431 Style Format
2432 \end_layout
2433
2434 \end_inset
2435
2436  
2437 \begin_inset Flex Noun
2438 status collapsed
2439
2440 \begin_layout Plain Layout
2441
2442 \change_inserted -712698321 1485695527
2443 Biblatex
2444 \end_layout
2445
2446 \end_inset
2447
2448
2449 \begin_inset Flex Noun
2450 status collapsed
2451
2452 \begin_layout Plain Layout
2453
2454 \change_inserted -712698321 1485695554
2455 Biblatex (Natbib mode)
2456 \end_layout
2457
2458 \end_inset
2459
2460 ,
2461 \change_unchanged
2462  
2463 \begin_inset Flex Noun
2464 status collapsed
2465
2466 \begin_layout Plain Layout
2467 Natbib
2468 \change_inserted -712698321 1485695505
2469  (BibTeX)
2470 \change_unchanged
2471
2472 \end_layout
2473
2474 \end_inset
2475
2476  or 
2477 \begin_inset Flex Noun
2478 status collapsed
2479
2480 \begin_layout Plain Layout
2481 Jurabib
2482 \change_inserted -712698321 1485695511
2483  (BibTeX)
2484 \change_unchanged
2485
2486 \end_layout
2487
2488 \end_inset
2489
2490
2491 \change_inserted -712698321 1485695637
2492  (see sec.
2493 \begin_inset space ~
2494 \end_inset
2495
2496 6.5.3 in the User's Guide for more information on these choices)
2497 \change_unchanged
2498 .
2499  With 
2500 \change_deleted -712698321 1485695643
2501 both
2502 \change_inserted -712698321 1485695645
2503 all these
2504 \change_unchanged
2505  packages, you will get some extra features in the citation dialog and you
2506  can select the style of the reference (
2507 \begin_inset Quotes eld
2508 \end_inset
2509
2510 Knuth 1984
2511 \begin_inset Quotes erd
2512 \end_inset
2513
2514
2515 \begin_inset Quotes eld
2516 \end_inset
2517
2518 Knuth (1984)
2519 \begin_inset Quotes erd
2520 \end_inset
2521
2522
2523 \begin_inset Quotes eld
2524 \end_inset
2525
2526 Knuth, 1984
2527 \begin_inset Quotes erd
2528 \end_inset
2529
2530
2531 \begin_inset Quotes eld
2532 \end_inset
2533
2534 1984
2535 \begin_inset Quotes erd
2536 \end_inset
2537
2538  etc.).
2539  Note that 
2540 \change_deleted -712698321 1485695659
2541 both
2542 \change_inserted -712698321 1485695660
2543 either
2544 \change_unchanged
2545  package
2546 \change_deleted -712698321 1485695663
2547 s
2548 \change_unchanged
2549  need
2550 \change_inserted -712698321 1485695664
2551 s
2552 \change_unchanged
2553  specifically designed style files.
2554  They 
2555 \change_deleted -712698321 1485695676
2556 both
2557 \change_inserted -712698321 1485695676
2558 all
2559 \change_unchanged
2560  ship their own, but there are lots of additional style files, and there
2561  is even an interactive style file builder
2562 \begin_inset Foot
2563 status collapsed
2564
2565 \begin_layout Plain Layout
2566 See 
2567 \begin_inset Flex URL
2568 status open
2569
2570 \begin_layout Plain Layout
2571
2572 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2573 \end_layout
2574
2575 \end_inset
2576
2577
2578 \end_layout
2579
2580 \end_inset
2581
2582  for 
2583 \begin_inset Flex Code
2584 status collapsed
2585
2586 \begin_layout Plain Layout
2587 natbib
2588 \end_layout
2589
2590 \end_inset
2591
2592 .
2593 \end_layout
2594
2595 \begin_layout Subsection
2596 S
2597 \change_deleted -712698321 1486199102
2598 ection
2599 \change_inserted -712698321 1486199104
2600 ubdivid
2601 \change_unchanged
2602 ed Bibliographies
2603 \end_layout
2604
2605 \begin_layout Standard
2606 Sometimes you might need to divide your bibliography into several sections.
2607  If you are for instance a historian, the possibility to separate sources
2608  and scientific works is most likely a 
2609 \begin_inset Quotes eld
2610 \end_inset
2611
2612 must have
2613 \begin_inset Quotes erd
2614 \end_inset
2615
2616 .
2617  Unfortunately, Bib\SpecialChar TeX
2618  itself does not allow you to do this.
2619  But with the help of some \SpecialChar LaTeX
2620  packages, Bib\SpecialChar TeX
2621  can be extended to fit your needs.
2622 \end_layout
2623
2624 \begin_layout Standard
2625 \SpecialChar LyX
2626  provides native support for one of these packages, 
2627 \family typewriter
2628 bibtopic
2629 \family default
2630 .
2631 \begin_inset Foot
2632 status collapsed
2633
2634 \begin_layout Plain Layout
2635 Available from 
2636 \begin_inset Flex URL
2637 status open
2638
2639 \begin_layout Plain Layout
2640
2641 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2642 \end_layout
2643
2644 \end_inset
2645
2646
2647 \end_layout
2648
2649 \end_inset
2650
2651  The advantage of this package (compared to other packages 
2652 \change_deleted -712698321 1485695727
2653 like
2654 \change_inserted -712698321 1485695729
2655 such as
2656 \change_unchanged
2657  
2658 \family typewriter
2659 multibib
2660 \family default
2661 ) is that you don't need to define new citation commands.
2662  Instead, you need to prepare different bibliographic databases which include
2663  the entries for the different sections of the bibliography.
2664  For example: If you want to divide your bibliography into the sections
2665  
2666 \begin_inset Quotes eld
2667 \end_inset
2668
2669 Sources
2670 \begin_inset Quotes erd
2671 \end_inset
2672
2673  and 
2674 \begin_inset Quotes eld
2675 \end_inset
2676
2677 Scientific works
2678 \begin_inset Quotes erd
2679 \end_inset
2680
2681 , you first need to create two bibliographic databases, e.
2682 \begin_inset space \thinspace{}
2683 \end_inset
2684
2685 g.
2686 \begin_inset space \space{}
2687 \end_inset
2688
2689
2690 \begin_inset Flex Code
2691 status collapsed
2692
2693 \begin_layout Plain Layout
2694 sources.bib
2695 \end_layout
2696
2697 \end_inset
2698
2699  and 
2700 \begin_inset Flex Code
2701 status collapsed
2702
2703 \begin_layout Plain Layout
2704 scientific.bib
2705 \end_layout
2706
2707 \end_inset
2708
2709 .
2710  
2711 \end_layout
2712
2713 \begin_layout Standard
2714 Go to 
2715 \begin_inset Flex Noun
2716 status collapsed
2717
2718 \begin_layout Plain Layout
2719 Document\SpecialChar menuseparator
2720 Settings
2721 \end_layout
2722
2723 \end_inset
2724
2725  and check under 
2726 \begin_inset Flex Noun
2727 status collapsed
2728
2729 \begin_layout Plain Layout
2730 Bibliography
2731 \end_layout
2732
2733 \end_inset
2734
2735  the option 
2736 \begin_inset Flex Noun
2737 status collapsed
2738
2739 \begin_layout Plain Layout
2740 S
2741 \change_deleted -712698321 1486199132
2742 ection
2743 \change_inserted -712698321 1486199136
2744 ubdivid
2745 \change_unchanged
2746 ed bibliography
2747 \end_layout
2748
2749 \end_inset
2750
2751 .
2752  Now you can insert multiple Bib\SpecialChar TeX
2753  bibliographies, one for each section of
2754  your bibliography.
2755  Returning to our example: Insert the Bib\SpecialChar TeX
2756  bibliography 
2757 \begin_inset Flex Code
2758 status collapsed
2759
2760 \begin_layout Plain Layout
2761 sources.bib
2762 \end_layout
2763
2764 \end_inset
2765
2766  and a second one for the database 
2767 \begin_inset Flex Code
2768 status collapsed
2769
2770 \begin_layout Plain Layout
2771 scientific.bib
2772 \end_layout
2773
2774 \end_inset
2775
2776 .
2777  You are free to use the same or different styles for each section.
2778  Additionally, you can choose if the bibliography section should contain
2779  
2780 \begin_inset Quotes eld
2781 \end_inset
2782
2783 all cited references
2784 \begin_inset Quotes erd
2785 \end_inset
2786
2787  of the specified database(s) (which is the default), 
2788 \begin_inset Quotes eld
2789 \end_inset
2790
2791 all uncited references
2792 \begin_inset Quotes erd
2793 \end_inset
2794
2795  or even 
2796 \begin_inset Quotes eld
2797 \end_inset
2798
2799 all references
2800 \begin_inset Quotes erd
2801 \end_inset
2802
2803 .
2804  This might be useful if you would like to separate your bibliography into
2805  three sections: 
2806 \begin_inset Quotes eld
2807 \end_inset
2808
2809 Cited sources
2810 \begin_inset Quotes erd
2811 \end_inset
2812
2813
2814 \begin_inset Quotes eld
2815 \end_inset
2816
2817 Uncited sources
2818 \begin_inset Quotes erd
2819 \end_inset
2820
2821 , and 
2822 \begin_inset Quotes eld
2823 \end_inset
2824
2825 Scientific works
2826 \begin_inset Quotes erd
2827 \end_inset
2828
2829 .
2830  The titles for the sections can be added as ordinary sections or subsections.
2831  Since 
2832 \begin_inset Flex Code
2833 status collapsed
2834
2835 \begin_layout Plain Layout
2836 bibtopic
2837 \end_layout
2838
2839 \end_inset
2840
2841  removes the bibliography title, you have to manually re-add that, too (as
2842  a chapter* or section*, for instance).
2843 \change_inserted -712698321 1485695762
2844
2845 \end_layout
2846
2847 \begin_layout Standard
2848
2849 \change_inserted -712698321 1486200403
2850 With 
2851 \family sans
2852 Biblatex
2853 \family default
2854 , the procedure is a bit different.
2855  Since 
2856 \family typewriter
2857 bibtopic
2858 \family default
2859  does not work with 
2860 \family sans
2861 Biblatex
2862 \family default
2863 , the aforementioned 
2864 \begin_inset Flex Noun
2865 status collapsed
2866
2867 \begin_layout Plain Layout
2868
2869 \change_inserted -712698321 1486200382
2870 Subdivided bibliography
2871 \end_layout
2872
2873 \end_inset
2874
2875  option is disabled if you use 
2876 \family sans
2877 Biblatex
2878 \family default
2879 .
2880  However, 
2881 \family sans
2882 Biblatex
2883 \family default
2884  provides its own means to generate subdivided bibliographies.
2885  You can either add keywords to bibliography entries via the 
2886 \begin_inset Flex Code
2887 status collapsed
2888
2889 \begin_layout Plain Layout
2890
2891 \change_inserted -712698321 1485696318
2892 keywords
2893 \change_unchanged
2894
2895 \end_layout
2896
2897 \end_inset
2898
2899  entry option and then filter bibliography sections by keyword (by adding
2900  
2901 \begin_inset Flex Code
2902 status collapsed
2903
2904 \begin_layout Plain Layout
2905
2906 \change_inserted -712698321 1485696306
2907 keyword=mykeyword
2908 \change_unchanged
2909
2910 \end_layout
2911
2912 \end_inset
2913
2914  to the 
2915 \begin_inset Flex Noun
2916 status collapsed
2917
2918 \begin_layout Plain Layout
2919
2920 \change_inserted -712698321 1485696431
2921 Options
2922 \change_unchanged
2923
2924 \end_layout
2925
2926 \end_inset
2927
2928  field of the dialog that opens if you right-click on the 
2929 \begin_inset Flex Noun
2930 status collapsed
2931
2932 \begin_layout Plain Layout
2933
2934 \change_inserted -712698321 1485696518
2935 Biblatex Generated Bibliography
2936 \change_unchanged
2937
2938 \end_layout
2939
2940 \end_inset
2941
2942  button), or you can filter by entry types (such as 
2943 \emph on
2944 book
2945 \emph default
2946  or 
2947 \emph on
2948 article
2949 \emph default
2950 ) by entering e.
2951 \begin_inset space \thinspace{}
2952 \end_inset
2953
2954 g.
2955  
2956 \begin_inset Flex Code
2957 status collapsed
2958
2959 \begin_layout Plain Layout
2960
2961 \change_inserted -712698321 1485696628
2962 type=book
2963 \end_layout
2964
2965 \end_inset
2966
2967  or 
2968 \begin_inset Flex Code
2969 status collapsed
2970
2971 \begin_layout Plain Layout
2972
2973 \change_inserted -712698321 1485696643
2974 nottype=collection
2975 \end_layout
2976
2977 \end_inset
2978
2979  to the mentioned 
2980 \begin_inset Flex Noun
2981 status collapsed
2982
2983 \begin_layout Plain Layout
2984
2985 \change_inserted -712698321 1485696667
2986 Options
2987 \end_layout
2988
2989 \end_inset
2990
2991  field, or you can create so-called 
2992 \begin_inset Quotes eld
2993 \end_inset
2994
2995 Bibliography Categories
2996 \begin_inset Quotes erd
2997 \end_inset
2998
2999  to which you can assign individual entries.
3000  Please refer to the Biblatex manual, section 
3001 \emph on
3002 Subdivided Bibliographies
3003 \emph default
3004 , for details.
3005 \change_unchanged
3006
3007 \end_layout
3008
3009 \begin_layout Subsection
3010 Multiple Bibliographies
3011 \end_layout
3012
3013 \begin_layout Standard
3014 Multiple bibliographies, e.
3015 \begin_inset space \thinspace{}
3016 \end_inset
3017
3018 g.
3019 \begin_inset space \space{}
3020 \end_inset
3021
3022 a bibliography for each 
3023 \change_inserted -712698321 1486199441
3024 part, chapter, 
3025 \change_unchanged
3026 section or 
3027 \change_inserted -712698321 1486199445
3028 subsection
3029 \change_deleted -712698321 1486199447
3030 chapter
3031 \change_unchanged
3032  of the document, are 
3033 \change_deleted -712698321 1486199458
3034 not 
3035 \change_inserted -712698321 1486200433
3036 also 
3037 \change_unchanged
3038 supported 
3039 \change_inserted -712698321 1486202058
3040 by \SpecialChar LyX
3041 .
3042  In order to enable it, go to 
3043 \begin_inset Flex Noun
3044 status collapsed
3045
3046 \begin_layout Plain Layout
3047
3048 \change_inserted -712698321 1486199572
3049 Document\SpecialChar menuseparator
3050 Settings\SpecialChar menuseparator
3051 Bibliography
3052 \change_unchanged
3053
3054 \end_layout
3055
3056 \end_inset
3057
3058  and select the relevant unit (e.
3059 \begin_inset space \thinspace{}
3060 \end_inset
3061
3062 g., 
3063 \begin_inset Quotes eld
3064 \end_inset
3065
3066 by section
3067 \begin_inset Quotes erd
3068 \end_inset
3069
3070 ) in the 
3071 \begin_inset Flex Noun
3072 status collapsed
3073
3074 \begin_layout Plain Layout
3075
3076 \change_inserted -712698321 1486199553
3077 Multiple Bibliographies
3078 \change_unchanged
3079
3080 \end_layout
3081
3082 \end_inset
3083
3084  combo box.
3085  
3086 \change_deleted -712698321 1486199771
3087 by Bib\SpecialChar TeX
3088  itself.
3089  
3090 \change_inserted -712698321 1486200569
3091 Then add a Bib(la)\SpecialChar TeX
3092  bibliography to each unit (e.
3093 \begin_inset space \thinspace{}
3094 \end_inset
3095
3096 g., section) of your document.
3097  In the output, a separate bibliography, containing only the references
3098  done in the current unit is generated.
3099 \end_layout
3100
3101 \begin_layout Standard
3102
3103 \change_inserted -712698321 1486199829
3104 If you use Bib\SpecialChar TeX
3105
3106 \change_deleted -712698321 1486199835
3107 But 
3108 \change_unchanged
3109 the 
3110 \begin_inset Flex Code
3111 status collapsed
3112
3113 \begin_layout Plain Layout
3114 bibtopic
3115 \end_layout
3116
3117 \end_inset
3118
3119  package, which is
3120 \change_inserted -712698321 1486199815
3121  also
3122 \change_unchanged
3123  used for the creation of 
3124 \change_deleted -712698321 1486199277
3125 section
3126 \change_inserted -712698321 1486199815
3127 subdivid
3128 \change_unchanged
3129 ed bibliographies in \SpecialChar LyX
3130  (see the previous section), 
3131 \change_inserted -712698321 1486199852
3132 is used to create multiple bibliographies.
3133 \change_deleted -712698321 1486200505
3134 provides an easy way to solve this task, if you are willing to use some
3135  
3136 \begin_inset Flex Noun
3137 status collapsed
3138
3139 \begin_layout Plain Layout
3140 \SpecialChar TeX
3141  Code
3142 \end_layout
3143
3144 \end_inset
3145
3146  (see section
3147 \begin_inset space ~
3148 \end_inset
3149
3150
3151 \begin_inset CommandInset ref
3152 LatexCommand ref
3153 reference "sec:Inserting-TeX-Code"
3154
3155 \end_inset
3156
3157 ).
3158 \change_unchanged
3159
3160 \begin_inset Foot
3161 status collapsed
3162
3163 \begin_layout Plain Layout
3164 An alternative approach
3165 \change_inserted -712698321 1486199215
3166 , if you are willing to use some 
3167 \begin_inset Flex Noun
3168 status collapsed
3169
3170 \begin_layout Plain Layout
3171
3172 \change_inserted -712698321 1486199212
3173 \SpecialChar TeX
3174  Code
3175 \end_layout
3176
3177 \end_inset
3178
3179  (see section
3180 \begin_inset space ~
3181 \end_inset
3182
3183
3184 \begin_inset CommandInset ref
3185 LatexCommand ref
3186 reference "sec:Inserting-TeX-Code"
3187
3188 \end_inset
3189
3190 ),
3191 \change_unchanged
3192  is to use the 
3193 \begin_inset Flex Code
3194 status collapsed
3195
3196 \begin_layout Plain Layout
3197 chapterbib
3198 \end_layout
3199
3200 \end_inset
3201
3202  or 
3203 \begin_inset Flex Code
3204 status collapsed
3205
3206 \begin_layout Plain Layout
3207 bibunits
3208 \end_layout
3209
3210 \end_inset
3211
3212  package, respectively.
3213 \end_layout
3214
3215 \end_inset
3216
3217
3218 \change_inserted -712698321 1486202156
3219  
3220 \change_deleted -712698321 1486202138
3221
3222 \end_layout
3223
3224 \begin_layout Standard
3225
3226 \change_deleted -712698321 1486202126
3227 First go to 
3228 \begin_inset Flex Noun
3229 status collapsed
3230
3231 \begin_layout Plain Layout
3232 Document\SpecialChar menuseparator
3233 Settings
3234 \end_layout
3235
3236 \end_inset
3237
3238  and under 
3239 \begin_inset Flex Noun
3240 status collapsed
3241
3242 \begin_layout Plain Layout
3243 Bibliography
3244 \end_layout
3245
3246 \end_inset
3247
3248  check 
3249 \begin_inset Flex Noun
3250 status collapsed
3251
3252 \begin_layout Plain Layout
3253 Sectioned bibliography
3254 \end_layout
3255
3256 \end_inset
3257
3258 .
3259  In the document, you have to enclose the sections, which shall contain
3260  their own bibliography (including the Bib\SpecialChar TeX
3261  bibliography itself), between
3262  
3263 \change_inserted -712698321 1486201472
3264 \SpecialChar LyX
3265  encloses the specified units in 
3266 \begin_inset Flex Code
3267 status collapsed
3268
3269 \begin_layout Plain Layout
3270
3271 \change_inserted -712698321 1486201443
3272 bibtopic
3273 \end_layout
3274
3275 \end_inset
3276
3277 's 
3278 \change_unchanged
3279
3280 \begin_inset Flex Code
3281 status collapsed
3282
3283 \begin_layout Plain Layout
3284
3285 \backslash
3286 begin{btUnit}
3287 \end_layout
3288
3289 \end_inset
3290
3291  and 
3292 \begin_inset Flex Code
3293 status collapsed
3294
3295 \begin_layout Plain Layout
3296
3297 \backslash
3298 end{btUnit}
3299 \end_layout
3300
3301 \end_inset
3302
3303
3304 \change_inserted -712698321 1486201491
3305  in order to create the units.
3306  Note that this approach has
3307 \change_unchanged
3308  
3309 \change_inserted -712698321 1486201489
3310 some limitations.
3311  
3312 \change_deleted -712698321 1486200476
3313 (those commands have to be inserted as \SpecialChar TeX
3314  code).
3315  The bibliography will contain all references that have been cited in the
3316  current 
3317 \begin_inset Flex Code
3318 status collapsed
3319
3320 \begin_layout Plain Layout
3321 btUnit
3322 \end_layout
3323
3324 \end_inset
3325
3326 .
3327  
3328 \series bold
3329 Note:
3330 \series default
3331  If you are using this approach, then 
3332 \change_inserted -712698321 1486201489
3333 First, 
3334 \change_unchanged
3335 every citation reference has to be inside some 
3336 \begin_inset Flex Code
3337 status collapsed
3338
3339 \begin_layout Plain Layout
3340 btUnit
3341 \end_layout
3342
3343 \end_inset
3344
3345 .
3346  
3347 \change_inserted -712698321 1486201489
3348 So citations outside a defined unit (e.
3349 \begin_inset space \thinspace{}
3350 \end_inset
3351
3352 g., before the first section if you use 
3353 \begin_inset Quotes eld
3354 \end_inset
3355
3356 by section
3357 \begin_inset Quotes erd
3358 \end_inset
3359
3360 ) will appear as 
3361 \begin_inset Quotes eld
3362 \end_inset
3363
3364 ???
3365 \begin_inset Quotes erd
3366 \end_inset
3367
3368 .
3369  You can also create your own units by entering 
3370 \begin_inset Flex Code
3371 status collapsed
3372
3373 \begin_layout Plain Layout
3374
3375 \change_inserted -712698321 1486200131
3376
3377 \backslash
3378 begin{btUnit}
3379 \end_layout
3380
3381 \end_inset
3382
3383  and 
3384 \begin_inset Flex Code
3385 status collapsed
3386
3387 \begin_layout Plain Layout
3388
3389 \change_inserted -712698321 1486200131
3390
3391 \backslash
3392 end{btUnit}
3393 \end_layout
3394
3395 \end_inset
3396
3397  as \SpecialChar TeX
3398  code (for instance to work around the mentioned limitation).
3399  Note, though, that
3400 \change_deleted -712698321 1486200476
3401 Also, the
3402 \change_unchanged
3403  
3404 \begin_inset Flex Code
3405 status collapsed
3406
3407 \begin_layout Plain Layout
3408 btUnit
3409 \end_layout
3410
3411 \end_inset
3412
3413 s cannot be nested.
3414
3415 \change_inserted -712698321 1486201489
3416  A second limitation is that 
3417 \begin_inset Flex Code
3418 status collapsed
3419
3420 \begin_layout Plain Layout
3421
3422 \change_inserted -712698321 1486200199
3423 bibtopic
3424 \end_layout
3425
3426 \end_inset
3427
3428  always processes all references of a bibliography database, even if they
3429  are not cited.
3430  This can result in odd labels (e.
3431 \begin_inset space \thinspace{}
3432 \end_inset
3433
3434 g.
3435  
3436 \begin_inset Quotes eld
3437 \end_inset
3438
3439 Miller 2014b
3440 \begin_inset Quotes erd
3441 \end_inset
3442
3443  if two works of this author from 2014 are in the database, even if only
3444  one is cited).
3445 \end_layout
3446
3447 \begin_layout Standard
3448
3449 \change_inserted -712698321 1486204109
3450 If you use 
3451 \family sans
3452 Biblatex
3453 \family default
3454 , the 
3455 \begin_inset Flex Code
3456 status collapsed
3457
3458 \begin_layout Plain Layout
3459
3460 \change_inserted -712698321 1486202183
3461 refsection
3462 \change_unchanged
3463
3464 \end_layout
3465
3466 \end_inset
3467
3468  option is used instead.
3469  If you need specific units, you can start them with the \SpecialChar TeX
3470  code 
3471 \begin_inset Flex Code
3472 status collapsed
3473
3474 \begin_layout Plain Layout
3475
3476 \change_inserted -712698321 1485697716
3477
3478 \backslash
3479 newrefsection
3480 \change_unchanged
3481
3482 \end_layout
3483
3484 \end_inset
3485
3486  or 
3487 \begin_inset Flex Code
3488 status collapsed
3489
3490 \begin_layout Plain Layout
3491
3492 \change_inserted -712698321 1485697724
3493
3494 \backslash
3495 newrefsegment
3496 \change_unchanged
3497
3498 \end_layout
3499
3500 \end_inset
3501
3502 , respectively.
3503  If you also want to control the end of the unit, use the environment 
3504 \begin_inset Flex Code
3505 status collapsed
3506
3507 \begin_layout Plain Layout
3508
3509 \change_inserted -712698321 1485697769
3510
3511 \backslash
3512 begin{refsection}
3513 \end_layout
3514
3515 \end_inset
3516
3517  \SpecialChar ldots
3518  
3519 \begin_inset Flex Code
3520 status collapsed
3521
3522 \begin_layout Plain Layout
3523
3524 \change_inserted -712698321 1485697780
3525
3526 \backslash
3527 end{refsection}
3528 \end_layout
3529
3530 \end_inset
3531
3532  instead.
3533  Note, though, that 
3534 \begin_inset Flex Code
3535 status collapsed
3536
3537 \begin_layout Plain Layout
3538
3539 \change_inserted -712698321 1486201999
3540 refsection
3541 \change_unchanged
3542
3543 \end_layout
3544
3545 \end_inset
3546
3547 s cannot be nested.
3548  In addition to the individual bibliography of the current unit, 
3549 \family sans
3550 Biblatex
3551 \family default
3552  also provides an easy way to output all bibliographies, subsequently, at
3553  one place (e.
3554 \begin_inset space \thinspace{}
3555 \end_inset
3556
3557 g., at the end of the document).
3558  Select 
3559 \begin_inset Quotes eld
3560 \end_inset
3561
3562 all reference units
3563 \begin_inset Quotes erd
3564 \end_inset
3565
3566  from the Content combo box of the Bib(la)TeX inset dialog in order to achieve
3567  this.
3568  Please refer to the 
3569 \family sans
3570 Biblatex
3571 \family default
3572  manual for more information on this topic.
3573 \change_unchanged
3574
3575 \end_layout
3576
3577 \begin_layout Section
3578 Multipart Documents
3579 \end_layout
3580
3581 \begin_layout Subsection
3582 General Operation
3583 \end_layout
3584
3585 \begin_layout Standard
3586 When you are working on a large file with many sections, it is often convenient
3587  to break up the document into several files, or perhaps you have something
3588  where a table may change from time to time, but the preceding text does
3589  not.
3590  In these cases, you should seriously consider using multipart documents.
3591  For example, scientific papers often have five major sections: the introduction
3592 , observations, results, discussion, and conclusion.
3593  Each of these could be its own separate \SpecialChar LyX
3594  file, with one 
3595 \begin_inset Quotes eld
3596 \end_inset
3597
3598 master
3599 \begin_inset Quotes erd
3600 \end_inset
3601
3602  file which contains the title, authors, abstract, references, etc., plus
3603  the five included files.
3604  It is important to note that each of these files is a full \SpecialChar LyX
3605  file which
3606  can be formatted and printed on its own, as well as included in a master
3607  file.
3608  Each of these files must have the same document class, however—don't attempt
3609  to mix book classes with article classes.
3610  You may also include \SpecialChar LaTeX
3611  files; however, these files must not have their own
3612  preamble (i.
3613 \begin_inset space \thinspace{}
3614 \end_inset
3615
3616 e.
3617 \begin_inset space \space{}
3618 \end_inset
3619
3620 everything up to and including the 
3621 \begin_inset Flex Code
3622 status collapsed
3623
3624 \begin_layout Plain Layout
3625
3626 \backslash
3627 begin{document}
3628 \end_layout
3629
3630 \end_inset
3631
3632  line as well as the 
3633 \begin_inset Flex Code
3634 status collapsed
3635
3636 \begin_layout Plain Layout
3637
3638 \backslash
3639 end{document}
3640 \end_layout
3641
3642 \end_inset
3643
3644  line must be deleted) or else errors will be generated when you try to
3645  make a DVI file.
3646 \end_layout
3647
3648 \begin_layout Standard
3649 \SpecialChar LyX
3650  allows you to include files quite easily with 
3651 \begin_inset Flex Noun
3652 status collapsed
3653
3654 \begin_layout Plain Layout
3655 Insert\SpecialChar menuseparator
3656 ChiId
3657 \begin_inset space ~
3658 \end_inset
3659
3660 Document
3661 \end_layout
3662
3663 \end_inset
3664
3665 .
3666  When you click on this selection a small box is inserted into the file
3667  at the current cursor location.
3668  Clicking on the box raises a dialog which allows you to select the file
3669  to be included, and the method of its inclusion.
3670  
3671 \end_layout
3672
3673 \begin_layout Standard
3674 The file selection box should by now be obvious.
3675  The three inclusion methods are 
3676 \begin_inset Quotes eld
3677 \end_inset
3678
3679 include
3680 \begin_inset Quotes erd
3681 \end_inset
3682
3683
3684 \begin_inset Quotes eld
3685 \end_inset
3686
3687 input
3688 \begin_inset Quotes erd
3689 \end_inset
3690
3691 , and 
3692 \begin_inset Quotes eld
3693 \end_inset
3694
3695 verbatim
3696 \begin_inset Quotes erd
3697 \end_inset
3698
3699 .
3700  The difference between 
3701 \begin_inset Quotes eld
3702 \end_inset
3703
3704 include
3705 \begin_inset Quotes erd
3706 \end_inset
3707
3708  and 
3709 \begin_inset Quotes eld
3710 \end_inset
3711
3712 input
3713 \begin_inset Quotes erd
3714 \end_inset
3715
3716  is really only meaningful to \SpecialChar LaTeX
3717 perts, but the practical difference is that
3718  files that are 
3719 \begin_inset Quotes eld
3720 \end_inset
3721
3722 included
3723 \begin_inset Quotes erd
3724 \end_inset
3725
3726  are typeset beginning on a new page, while files that are 
3727 \begin_inset Quotes eld
3728 \end_inset
3729
3730 inputted
3731 \begin_inset Quotes erd
3732 \end_inset
3733
3734  are typeset starting on the current page.
3735 \end_layout
3736
3737 \begin_layout Standard
3738 Generally, the master file is converted into a full \SpecialChar LaTeX
3739  file before typesetting,
3740  while the included files are converted to \SpecialChar LaTeX
3741  files that do not have all the
3742  preamble information.
3743 \end_layout
3744
3745 \begin_layout Standard
3746
3747 \begin_inset Quotes eld
3748 \end_inset
3749
3750 verbatim
3751 \begin_inset Quotes erd
3752 \end_inset
3753
3754  included file allows you to include a file typeset exactly as it appears
3755  in the file, i.
3756 \begin_inset space \thinspace{}
3757 \end_inset
3758
3759 e.
3760 \begin_inset space \space{}
3761 \end_inset
3762
3763 in 
3764 \begin_inset Flex Code
3765 status collapsed
3766
3767 \begin_layout Plain Layout
3768 verbatim
3769 \end_layout
3770
3771 \end_inset
3772
3773  mode, with the characters set in a fixed-width typewriter font.
3774  Normally, spaces in this file are invisible, though two consecutive spaces
3775  are conserved, unlike \SpecialChar LyX
3776 's normal treatment of spaces.
3777  However, setting the 
3778 \begin_inset Flex Noun
3779 status collapsed
3780
3781 \begin_layout Plain Layout
3782 Mark
3783 \begin_inset space ~
3784 \end_inset
3785
3786 spaces
3787 \begin_inset space ~
3788 \end_inset
3789
3790 in
3791 \begin_inset space ~
3792 \end_inset
3793
3794 output
3795 \end_layout
3796
3797 \end_inset
3798
3799  checkbox typesets a mark to unambiguously define the presence of a space.
3800  
3801 \end_layout
3802
3803 \begin_layout Subsection
3804 Cross-References Between Files
3805 \end_layout
3806
3807 \begin_layout Standard
3808 \begin_inset Box Shadowbox
3809 position "t"
3810 hor_pos "c"
3811 has_inner_box 1
3812 inner_pos "t"
3813 use_parbox 0
3814 use_makebox 0
3815 width "100col%"
3816 special "none"
3817 height "1in"
3818 height_special "totalheight"
3819 thickness "0.4pt"
3820 separation "3pt"
3821 shadowsize "4pt"
3822 framecolor "black"
3823 backgroundcolor "none"
3824 status open
3825
3826 \begin_layout Plain Layout
3827 This section is somewhat out of date.
3828  Need to describe default master documents and how children are opened when
3829  the master is.
3830  [[FIXME]]
3831 \end_layout
3832
3833 \end_inset
3834
3835
3836 \end_layout
3837
3838 \begin_layout Standard
3839 It is possible to set up cross-references between the different files.
3840  First, open all the files in question: let's call them A and B in a two
3841  file example, where B is included in A.
3842  Let's say you insert a label in A, then want to reference it in B.
3843  Open the cross-reference dialog whilst in document B, and you can select
3844  the 
3845 \begin_inset Quotes eld
3846 \end_inset
3847
3848 buffer
3849 \begin_inset Quotes erd
3850 \end_inset
3851
3852  to use.
3853 \end_layout
3854
3855 \begin_layout Subsection
3856 Bibliography Lists in all Subdocuments
3857 \end_layout
3858
3859 \begin_layout Standard
3860 \begin_inset Box Frameless
3861 position "t"
3862 hor_pos "c"
3863 has_inner_box 1
3864 inner_pos "t"
3865 use_parbox 0
3866 use_makebox 0
3867 width "100col%"
3868 special "none"
3869 height "1in"
3870 height_special "totalheight"
3871 thickness "0.4pt"
3872 separation "3pt"
3873 shadowsize "4pt"
3874 framecolor "black"
3875 backgroundcolor "none"
3876 status open
3877
3878 \begin_layout Plain Layout
3879 This section also needs updating.
3880  There is now material about this on the wiki, and it could be copied here.
3881 \end_layout
3882
3883 \end_inset
3884
3885
3886 \end_layout
3887
3888 \begin_layout Standard
3889 Copy the bibliography list with all entries to all subdocuments and transform
3890  them to a comment.
3891  This way \SpecialChar LyX
3892  will find the 
3893 \begin_inset Flex Code
3894 status collapsed
3895
3896 \begin_layout Plain Layout
3897 .bib
3898 \end_layout
3899
3900 \end_inset
3901
3902 -files and you can easily insert references without making the bibliography
3903  list visible.
3904 \end_layout
3905
3906 \begin_layout Standard
3907 As the bibliography list is in a comment, \SpecialChar LaTeX
3908  won't use it and the references
3909  will look like this: [?], instead of like this: [1].
3910  One solution is to use the \SpecialChar LaTeX
3911 -package 
3912 \begin_inset Flex Code
3913 status collapsed
3914
3915 \begin_layout Plain Layout
3916 comment
3917 \end_layout
3918
3919 \end_inset
3920
3921  that will only include comments by processing the files separately.
3922  To do this, add in the \SpecialChar LaTeX
3923  preamble of every subdocument the following:
3924 \end_layout
3925
3926 \begin_layout LyX-Code
3927
3928 \backslash
3929 usepackage{comment}
3930 \end_layout
3931
3932 \begin_layout LyX-Code
3933
3934 \backslash
3935 includecomment{comment}
3936 \end_layout
3937
3938 \begin_layout Standard
3939 See also 
3940 \begin_inset Flex URL
3941 status collapsed
3942
3943 \begin_layout Plain Layout
3944
3945 http://wiki.lyx.org/FAQ/Unsorted#toc31
3946 \end_layout
3947
3948 \end_inset
3949
3950 .
3951 \end_layout
3952
3953 \begin_layout Section
3954 \SpecialChar LyX
3955  Archives
3956 \end_layout
3957
3958 \begin_layout Standard
3959 Users sometimes need to be able to 
3960 \begin_inset Quotes eld
3961 \end_inset
3962
3963 bundle
3964 \begin_inset Quotes erd
3965 \end_inset
3966
3967  a \SpecialChar LyX
3968  file together with all the images (and other files) on which it depends,
3969  either for sending to a publisher or for sharing with a co-author.
3970  \SpecialChar LyX
3971  2.0 includes a Python script (
3972 \begin_inset Flex Code
3973 status collapsed
3974
3975 \begin_layout Plain Layout
3976 lyxpak.py
3977 \end_layout
3978
3979 \end_inset
3980
3981 ) that automates this process.
3982  To use it, you must have either the 
3983 \begin_inset Flex Code
3984 status collapsed
3985
3986 \begin_layout Plain Layout
3987 zipfile
3988 \end_layout
3989
3990 \end_inset
3991
3992  or 
3993 \begin_inset Flex Code
3994 status collapsed
3995
3996 \begin_layout Plain Layout
3997 tarfile
3998 \end_layout
3999
4000 \end_inset
4001
4002  python modules installed on your system.
4003  By default, the script prefers the 
4004 \begin_inset Flex Code
4005 status collapsed
4006
4007 \begin_layout Plain Layout
4008 gzip
4009 \end_layout
4010
4011 \end_inset
4012
4013 -compressed 
4014 \begin_inset Flex Code
4015 status collapsed
4016
4017 \begin_layout Plain Layout
4018 tar
4019 \end_layout
4020
4021 \end_inset
4022
4023  format on Unix-like systems and the 
4024 \begin_inset Flex Code
4025 status collapsed
4026
4027 \begin_layout Plain Layout
4028 zip
4029 \end_layout
4030
4031 \end_inset
4032
4033  format on Windows.
4034 \end_layout
4035
4036 \begin_layout Standard
4037 \SpecialChar LyX
4038 's configuration process will set the script up to export a `\SpecialChar LyX
4039  Archive',
4040  and this format will then be available under 
4041 \begin_inset Flex Code
4042 status collapsed
4043
4044 \begin_layout Plain Layout
4045 File\SpecialChar menuseparator
4046 Export
4047 \end_layout
4048
4049 \end_inset
4050
4051 .
4052 \end_layout
4053
4054 \begin_layout Standard
4055 Independently of the platform, the generation of a particular archive format
4056  can be forced by adding either the 
4057 \begin_inset Flex Code
4058 status collapsed
4059
4060 \begin_layout Plain Layout
4061 -t
4062 \end_layout
4063
4064 \end_inset
4065
4066  (for the 
4067 \begin_inset Flex Code
4068 status collapsed
4069
4070 \begin_layout Plain Layout
4071 tar
4072 \end_layout
4073
4074 \end_inset
4075
4076  format) or 
4077 \begin_inset Flex Code
4078 status collapsed
4079
4080 \begin_layout Plain Layout
4081 -z
4082 \end_layout
4083
4084 \end_inset
4085
4086  (for the 
4087 \begin_inset Flex Code
4088 status collapsed
4089
4090 \begin_layout Plain Layout
4091 zip
4092 \end_layout
4093
4094 \end_inset
4095
4096  format) switch to the 
4097 \begin_inset Flex Code
4098 status collapsed
4099
4100 \begin_layout Plain Layout
4101 \SpecialChar LyX
4102 \SpecialChar menuseparator
4103 \SpecialChar LyX
4104  Archive
4105 \end_layout
4106
4107 \end_inset
4108
4109  converter in 
4110 \begin_inset Flex Code
4111 status collapsed
4112
4113 \begin_layout Plain Layout
4114 Tools\SpecialChar menuseparator
4115 Preferences\SpecialChar menuseparator
4116 File Handling\SpecialChar menuseparator
4117 Converters
4118 \end_layout
4119
4120 \end_inset
4121
4122 .
4123  (Make sure you add the switch after the script name, not before it.)
4124 \end_layout
4125
4126 \begin_layout Section
4127 Fancy Headers and Footers
4128 \end_layout
4129
4130 \begin_layout Standard
4131 The default page layout is rather plain; for an 
4132 \begin_inset Flex Code
4133 status collapsed
4134
4135 \begin_layout Plain Layout
4136 article
4137 \end_layout
4138
4139 \end_inset
4140
4141  document class, all you get is a centered page number at the bottom of
4142  the page.
4143  This document uses KOMA-script's book class, so it appears to be a bit
4144  fancier.
4145  But to really put on a show, you need to set the document page style to
4146  
4147 \begin_inset Quotes eld
4148 \end_inset
4149
4150 fancy
4151 \begin_inset Quotes erd
4152 \end_inset
4153
4154 , as mentioned in the 
4155 \emph on
4156 User Guide
4157 \emph default
4158 .
4159  This section describes the \SpecialChar LaTeX
4160  code you need to insert in your \SpecialChar LaTeX
4161  preamble in
4162  order to get the desired effects.
4163 \end_layout
4164
4165 \begin_layout Standard
4166 For more information on fancy headers, see the 
4167 \begin_inset Flex Code
4168 status collapsed
4169
4170 \begin_layout Plain Layout
4171 fancyhdr
4172 \end_layout
4173
4174 \end_inset
4175
4176  package documentation.
4177  (
4178 \begin_inset Flex URL
4179 status collapsed
4180
4181 \begin_layout Plain Layout
4182
4183 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
4184 \end_layout
4185
4186 \end_inset
4187
4188 )
4189 \end_layout
4190
4191 \begin_layout Standard
4192 The page header is divided into three fields, not surprisingly labeled 
4193 \begin_inset Quotes eld
4194 \end_inset
4195
4196 left
4197 \begin_inset Quotes erd
4198 \end_inset
4199
4200
4201 \begin_inset Quotes eld
4202 \end_inset
4203
4204 center
4205 \begin_inset Quotes erd
4206 \end_inset
4207
4208 , and 
4209 \begin_inset Quotes eld
4210 \end_inset
4211
4212 right
4213 \begin_inset Quotes erd
4214 \end_inset
4215
4216 .
4217  The footer is also divided into these three fields.
4218  The \SpecialChar LaTeX
4219  commands to set these fields in the simplest manner are 
4220 \begin_inset Flex Code
4221 status collapsed
4222
4223 \begin_layout Plain Layout
4224
4225 \backslash
4226 lhead
4227 \end_layout
4228
4229 \end_inset
4230
4231
4232 \begin_inset Flex Code
4233 status collapsed
4234
4235 \begin_layout Plain Layout
4236
4237 \backslash
4238 chead
4239 \end_layout
4240
4241 \end_inset
4242
4243
4244 \begin_inset Flex Code
4245 status collapsed
4246
4247 \begin_layout Plain Layout
4248
4249 \backslash
4250 rhead
4251 \end_layout
4252
4253 \end_inset
4254
4255
4256 \begin_inset Flex Code
4257 status collapsed
4258
4259 \begin_layout Plain Layout
4260
4261 \backslash
4262 lfoot
4263 \end_layout
4264
4265 \end_inset
4266
4267 , etc.
4268  Suppose you wish to put your name in the upper left hand corner of each
4269  page.
4270  Simply insert the following command in the preamble: 
4271 \end_layout
4272
4273 \begin_layout Standard
4274
4275 \family typewriter
4276
4277 \backslash
4278 lhead{John Q.
4279  DocWriter}
4280 \end_layout
4281
4282 \begin_layout Standard
4283 You will now see your name in the upper left.
4284  If a field has a default entry that you would like to get rid of (often
4285  the page number appears in the central footer) simply include a command
4286  with a blank argument, e.
4287 \begin_inset space \thinspace{}
4288 \end_inset
4289
4290 g.:
4291 \end_layout
4292
4293 \begin_layout Standard
4294
4295 \family typewriter
4296
4297 \backslash
4298 cfoot{}
4299 \end_layout
4300
4301 \begin_layout Standard
4302 Let's get really fancy: lets put the section number with the word 
4303 \begin_inset Quotes eld
4304 \end_inset
4305
4306 Section
4307 \begin_inset Quotes erd
4308 \end_inset
4309
4310  (e.
4311 \begin_inset space \thinspace{}
4312 \end_inset
4313
4314 g.
4315 \begin_inset space \space{}
4316 \end_inset
4317
4318 Section 3) in the upper left, the page number (e.
4319 \begin_inset space \thinspace{}
4320 \end_inset
4321
4322 g.
4323 \begin_inset space \space{}
4324 \end_inset
4325
4326 Page 4) in the upper right, your name in the lower left, and the date in
4327  the lower right.
4328  The following commands should now appear in the preamble:
4329 \end_layout
4330
4331 \begin_layout Standard
4332
4333 \family typewriter
4334
4335 \backslash
4336 lhead{Section 
4337 \backslash
4338 thesection}
4339 \end_layout
4340
4341 \begin_layout Standard
4342
4343 \family typewriter
4344
4345 \backslash
4346 chead{}
4347 \end_layout
4348
4349 \begin_layout Standard
4350
4351 \family typewriter
4352
4353 \backslash
4354 rhead{Page 
4355 \backslash
4356 thepage}
4357 \end_layout
4358
4359 \begin_layout Standard
4360
4361 \family typewriter
4362
4363 \backslash
4364 lfoot{John Q.
4365  DocWriter}
4366 \end_layout
4367
4368 \begin_layout Standard
4369
4370 \family typewriter
4371
4372 \backslash
4373 cfoot{}
4374 \end_layout
4375
4376 \begin_layout Standard
4377
4378 \family typewriter
4379
4380 \backslash
4381 rfoot{
4382 \backslash
4383 today}
4384 \end_layout
4385
4386 \begin_layout Standard
4387 The commands 
4388 \begin_inset Flex Code
4389 status collapsed
4390
4391 \begin_layout Plain Layout
4392
4393 \backslash
4394 thesection
4395 \end_layout
4396
4397 \end_inset
4398
4399  and 
4400 \begin_inset Flex Code
4401 status collapsed
4402
4403 \begin_layout Plain Layout
4404
4405 \backslash
4406 thepage
4407 \end_layout
4408
4409 \end_inset
4410
4411  access \SpecialChar LaTeX
4412 's section and page counters, and so print out the current section
4413  and page numbers.
4414  
4415 \begin_inset Flex Code
4416 status collapsed
4417
4418 \begin_layout Plain Layout
4419
4420 \backslash
4421 today
4422 \end_layout
4423
4424 \end_inset
4425
4426  simply prints out today's date.
4427 \end_layout
4428
4429 \begin_layout Standard
4430 The thicknesses of the horizontal rules drawn beneath the header and above
4431  the footer can also be modified.
4432  If you don't want one of the rules, set its thickness to 0.
4433  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
4434  Use commands
4435 \family typewriter
4436  
4437 \family default
4438 like 
4439 \begin_inset Flex Code
4440 status collapsed
4441
4442 \begin_layout Plain Layout
4443
4444 \backslash
4445 renewcommand{
4446 \backslash
4447 headrulewidth}{0.4pt}
4448 \end_layout
4449
4450 \end_inset
4451
4452  and 
4453 \begin_inset Flex Code
4454 status collapsed
4455
4456 \begin_layout Plain Layout
4457
4458 \backslash
4459 renewcommand{
4460 \backslash
4461 footrulewidth}{0.4pt}
4462 \end_layout
4463
4464 \end_inset
4465
4466  to set the thicknesses.
4467 \end_layout
4468
4469 \begin_layout Standard
4470 You can switch the header/footer settings on and off for individual pages
4471  using commands like 
4472 \begin_inset Flex Code
4473 status collapsed
4474
4475 \begin_layout Plain Layout
4476
4477 \backslash
4478 thispagestyle{empty}
4479 \end_layout
4480
4481 \end_inset
4482
4483
4484 \begin_inset Flex Code
4485 status collapsed
4486
4487 \begin_layout Plain Layout
4488
4489 \backslash
4490 thispagestyle{plain}
4491 \end_layout
4492
4493 \end_inset
4494
4495 , and 
4496 \begin_inset Flex Code
4497 status collapsed
4498
4499 \begin_layout Plain Layout
4500
4501 \backslash
4502 thispagestyle{fancy}
4503 \end_layout
4504
4505 \end_inset
4506
4507 .
4508  Simply insert them in the text on the page you want changed and mark them
4509  as \SpecialChar TeX
4510  code.
4511  In fact, title pages are marked as plain by default, while following pages
4512  are marked fancy when using the global fancy setting.
4513 \end_layout
4514
4515 \begin_layout Standard
4516 As a final example, it is possible to include an image in the header or
4517  footer.
4518  Suppose you want to put a company logo in the upper lefthand corner.
4519  You might try something like
4520 \end_layout
4521
4522 \begin_layout Standard
4523
4524 \family typewriter
4525
4526 \backslash
4527 lhead{
4528 \backslash
4529 resizebox{1in}{!}{
4530 \backslash
4531 includegraphics{logo.eps}}}
4532 \end_layout
4533
4534 \begin_layout Standard
4535 \noindent
4536 (you may need to preface this with 
4537 \begin_inset Flex Code
4538 status collapsed
4539
4540 \begin_layout Plain Layout
4541 \noindent
4542
4543 \backslash
4544 usepackage{graphics}
4545 \end_layout
4546
4547 \end_inset
4548
4549  if you don't include graphics elsewhere in your document).
4550 \end_layout
4551
4552 \begin_layout Section
4553 Itemize Bullet Selection
4554 \begin_inset CommandInset label
4555 LatexCommand label
4556 name "sec:bullet"
4557
4558 \end_inset
4559
4560
4561 \end_layout
4562
4563 \begin_layout Standard
4564 by
4565 \noun on
4566  Allan Rae
4567 \end_layout
4568
4569 \begin_layout Subsection
4570 Introduction
4571 \end_layout
4572
4573 \begin_layout Standard
4574 \SpecialChar LyX
4575  provides 216 bullet shapes that can be accessed from a simple dialog.
4576  Using this dialog you can easily specify what bullet shape to use at each
4577  level of an itemized list.
4578  These settings are document-wide so you won't be able to specify different
4579  sets of bullets for different paragraphs.
4580 \begin_inset Foot
4581 status collapsed
4582
4583 \begin_layout Plain Layout
4584 Well, actually you can but you'll have to do it by hand.
4585 \end_layout
4586
4587 \end_inset
4588
4589
4590 \end_layout
4591
4592 \begin_layout Subsection
4593 How it looks
4594 \end_layout
4595
4596 \begin_layout Standard
4597 Open the dialog by selecting the 
4598 \begin_inset Flex Noun
4599 status collapsed
4600
4601 \begin_layout Plain Layout
4602 Document\SpecialChar menuseparator
4603 Settings
4604 \end_layout
4605
4606 \end_inset
4607
4608  menu item and then select the 
4609 \begin_inset Flex Noun
4610 status collapsed
4611
4612 \begin_layout Plain Layout
4613 Bullets
4614 \end_layout
4615
4616 \end_inset
4617
4618  tab.
4619 \end_layout
4620
4621 \begin_layout Standard
4622 The dialog provides you with a table of bullet shapes.
4623  A column of buttons on the left of the table provides access to the six
4624  different panels of bullet shapes.
4625  The row of buttons across the top is used to select which bullet depth
4626  you are changing.
4627  A text entry under the table shows the currently selected bullet shape's
4628  \SpecialChar LaTeX
4629  equivalent and this can be edited if desired.
4630  If you do modify the text you will also need to specify any needed packages
4631  in the \SpecialChar LaTeX
4632  preamble.
4633 \end_layout
4634
4635 \begin_layout Standard
4636 The six panels are divided up by the packages they require.
4637  The following table shows the mappings from button name to \SpecialChar LaTeX
4638  package.
4639 \end_layout
4640
4641 \begin_layout Standard
4642 \align center
4643 \begin_inset Tabular
4644 <lyxtabular version="3" rows="7" columns="2">
4645 <features tabularvalignment="middle">
4646 <column alignment="center" valignment="top" width="0pt">
4647 <column alignment="center" valignment="top" width="0pt">
4648 <row>
4649 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4650 \begin_inset Text
4651
4652 \begin_layout Plain Layout
4653
4654 \family roman
4655 \series medium
4656 \shape up
4657 \size normal
4658 \emph off
4659 \bar no
4660 \noun off
4661 \color none
4662 Button
4663 \end_layout
4664
4665 \end_inset
4666 </cell>
4667 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4668 \begin_inset Text
4669
4670 \begin_layout Plain Layout
4671
4672 \family roman
4673 \series medium
4674 \shape up
4675 \size normal
4676 \emph off
4677 \bar no
4678 \noun off
4679 \color none
4680 Packages Required
4681 \end_layout
4682
4683 \end_inset
4684 </cell>
4685 </row>
4686 <row>
4687 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4688 \begin_inset Text
4689
4690 \begin_layout Plain Layout
4691
4692 \family sans
4693 \series medium
4694 \shape up
4695 \size normal
4696 \emph off
4697 \bar no
4698 \noun off
4699 \color none
4700 Standard
4701 \end_layout
4702
4703 \end_inset
4704 </cell>
4705 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4706 \begin_inset Text
4707
4708 \begin_layout Plain Layout
4709
4710 \series medium
4711 \shape up
4712 \size normal
4713 \emph off
4714 \bar no
4715 \noun off
4716 \color none
4717 base \SpecialChar LaTeX
4718
4719 \end_layout
4720
4721 \end_inset
4722 </cell>
4723 </row>
4724 <row>
4725 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4726 \begin_inset Text
4727
4728 \begin_layout Plain Layout
4729
4730 \family sans
4731 \series medium
4732 \shape up
4733 \size normal
4734 \emph off
4735 \bar no
4736 \noun off
4737 \color none
4738 Maths
4739 \end_layout
4740
4741 \end_inset
4742 </cell>
4743 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4744 \begin_inset Text
4745
4746 \begin_layout Plain Layout
4747
4748 \family typewriter
4749 \series medium
4750 \shape up
4751 \size normal
4752 \emph off
4753 \bar no
4754 \noun off
4755 \color none
4756 amssymb.sty
4757 \end_layout
4758
4759 \end_inset
4760 </cell>
4761 </row>
4762 <row>
4763 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4764 \begin_inset Text
4765
4766 \begin_layout Plain Layout
4767
4768 \family sans
4769 \series medium
4770 \shape up
4771 \size normal
4772 \emph off
4773 \bar no
4774 \noun off
4775 \color none
4776 Ding1
4777 \end_layout
4778
4779 \end_inset
4780 </cell>
4781 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4782 \begin_inset Text
4783
4784 \begin_layout Plain Layout
4785
4786 \family typewriter
4787 \series medium
4788 \shape up
4789 \size normal
4790 \emph off
4791 \bar no
4792 \noun off
4793 \color none
4794 pifont.sty
4795 \end_layout
4796
4797 \end_inset
4798 </cell>
4799 </row>
4800 <row>
4801 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4802 \begin_inset Text
4803
4804 \begin_layout Plain Layout
4805
4806 \family sans
4807 \series medium
4808 \shape up
4809 \size normal
4810 \emph off
4811 \bar no
4812 \noun off
4813 \color none
4814 Ding2
4815 \end_layout
4816
4817 \end_inset
4818 </cell>
4819 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4820 \begin_inset Text
4821
4822 \begin_layout Plain Layout
4823
4824 \family typewriter
4825 \series medium
4826 \shape up
4827 \size normal
4828 \emph off
4829 \bar no
4830 \noun off
4831 \color none
4832 pifont.sty
4833 \end_layout
4834
4835 \end_inset
4836 </cell>
4837 </row>
4838 <row>
4839 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4840 \begin_inset Text
4841
4842 \begin_layout Plain Layout
4843
4844 \family sans
4845 \series medium
4846 \shape up
4847 \size normal
4848 \emph off
4849 \bar no
4850 \noun off
4851 \color none
4852 Ding3
4853 \end_layout
4854
4855 \end_inset
4856 </cell>
4857 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4858 \begin_inset Text
4859
4860 \begin_layout Plain Layout
4861
4862 \family typewriter
4863 \series medium
4864 \shape up
4865 \size normal
4866 \emph off
4867 \bar no
4868 \noun off
4869 \color none
4870 pifont.sty
4871 \end_layout
4872
4873 \end_inset
4874 </cell>
4875 </row>
4876 <row>
4877 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4878 \begin_inset Text
4879
4880 \begin_layout Plain Layout
4881
4882 \family sans
4883 \series medium
4884 \shape up
4885 \size normal
4886 \emph off
4887 \bar no
4888 \noun off
4889 \color none
4890 Ding4
4891 \end_layout
4892
4893 \end_inset
4894 </cell>
4895 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4896 \begin_inset Text
4897
4898 \begin_layout Plain Layout
4899
4900 \family typewriter
4901 \series medium
4902 \shape up
4903 \size normal
4904 \emph off
4905 \bar no
4906 \noun off
4907 \color none
4908 pifont.sty
4909 \end_layout
4910
4911 \end_inset
4912 </cell>
4913 </row>
4914 </lyxtabular>
4915
4916 \end_inset
4917
4918
4919 \end_layout
4920
4921 \begin_layout Standard
4922 \SpecialChar LyX
4923  doesn't stop you using bullets from packages you don't have.
4924  If you get errors from \SpecialChar LaTeX
4925  when you try to view or print the file, then it
4926  is likely you are missing a package.
4927 \begin_inset Foot
4928 status collapsed
4929
4930 \begin_layout Plain Layout
4931 \SpecialChar LyX
4932  doesn't restrict your use since you may be editing locally and exporting
4933  elsewhere.
4934 \end_layout
4935
4936 \end_inset
4937
4938
4939 \end_layout
4940
4941 \begin_layout Subsection
4942 How to use it
4943 \end_layout
4944
4945 \begin_layout Standard
4946 Select which bullet depth you want to change then select the bullet shape
4947  and size.
4948  Any changes will not be visible in \SpecialChar LyX
4949 , but are visible when viewing the document.
4950 \end_layout
4951
4952 \begin_layout Standard
4953 You can reset a bullet shape to the default simply by clicking your right
4954  mouse button on the appropriate bullet depth button.
4955 \begin_inset Foot
4956 status collapsed
4957
4958 \begin_layout Plain Layout
4959 If you 
4960 \emph on
4961 really
4962 \emph default
4963  want to have multiple sets of paragraphs with different sets of bullets
4964  in each, then you're going to have to get your hands dirty with \SpecialChar TeX
4965  code.
4966  The bullet selection dialog can help though because it provides you with
4967  the \SpecialChar LaTeX
4968  code for a wide range of bullet shapes.
4969  To make your own custom paragraphs you have the following options:
4970 \end_layout
4971
4972 \begin_layout Plain Layout
4973 \begin_inset ERT
4974 status open
4975
4976 \begin_layout Plain Layout
4977
4978
4979 \backslash
4980 let
4981 \backslash
4982 savelabelitemi=
4983 \backslash
4984 labelitemi
4985 \end_layout
4986
4987 \end_inset
4988
4989
4990 \end_layout
4991
4992 \begin_layout Plain Layout
4993 \begin_inset ERT
4994 status open
4995
4996 \begin_layout Plain Layout
4997
4998
4999 \backslash
5000 renewcommand
5001 \backslash
5002 labelitemi[0]{
5003 \backslash
5004 small
5005 \backslash
5006 (
5007 \backslash
5008 sharp
5009 \backslash
5010 )}
5011 \end_layout
5012
5013 \end_inset
5014
5015
5016 \end_layout
5017
5018 \begin_layout Itemize
5019 Use the \SpecialChar LaTeX
5020  command 
5021 \begin_inset Flex Code
5022 status collapsed
5023
5024 \begin_layout Plain Layout
5025
5026 \backslash
5027 renewcommand{}{}
5028 \end_layout
5029
5030 \end_inset
5031
5032  to specify a new bullet shape for a given depth.
5033  You'll also need to save the current bullet shape so you can restore it
5034  again afterwards.
5035  In this itemized list the following \SpecialChar LaTeX
5036  code was used to change the bullet
5037  used for the first depth.
5038 \end_layout
5039
5040 \begin_deeper
5041 \begin_layout LyX-Code
5042
5043 \backslash
5044 let
5045 \backslash
5046 savelabelitemi=
5047 \backslash
5048 labelitemi 
5049 \end_layout
5050
5051 \begin_layout LyX-Code
5052
5053 \backslash
5054 renewcommand
5055 \backslash
5056 labelitemi[0]{
5057 \backslash
5058 small
5059 \backslash
5060 (
5061 \backslash
5062 sharp
5063 \backslash
5064 )}
5065 \end_layout
5066
5067 \end_deeper
5068 \begin_layout Itemize
5069 Note that the itemize depth is specified in Roman numerals as part of the
5070  
5071 \family typewriter
5072
5073 \backslash
5074 labelitem
5075 \family default
5076  command.
5077 \end_layout
5078
5079 \begin_layout Itemize
5080 \begin_inset ERT
5081 status open
5082
5083 \begin_layout Plain Layout
5084
5085 [
5086 \backslash
5087 (
5088 \backslash
5089 star
5090 \backslash
5091 )]
5092 \end_layout
5093
5094 \end_inset
5095
5096  Specify each individual entry by starting each item with the bullet shape
5097  enclosed in square brackets and set as 
5098 \begin_inset Flex Noun
5099 status collapsed
5100
5101 \begin_layout Plain Layout
5102 \SpecialChar TeX
5103  Code
5104 \end_layout
5105
5106 \end_inset
5107
5108 .
5109  For example, this item was started with 
5110 \begin_inset Flex Code
5111 status collapsed
5112
5113 \begin_layout Plain Layout
5114 [
5115 \backslash
5116 (
5117 \backslash
5118 star
5119 \backslash
5120 )]
5121 \end_layout
5122
5123 \end_inset
5124
5125 .
5126 \end_layout
5127
5128 \begin_layout Plain Layout
5129 \begin_inset ERT
5130 status open
5131
5132 \begin_layout Plain Layout
5133
5134
5135 \backslash
5136 renewcommand
5137 \backslash
5138 labelitemi[0]{
5139 \backslash
5140 savelabelitemi}
5141 \end_layout
5142
5143 \end_inset
5144
5145
5146 \end_layout
5147
5148 \begin_layout Plain Layout
5149 You'll also need to revert the labelitem back to its previous setting for
5150  the global bullet shape settings to remain in effect.
5151  The way used here was:
5152 \end_layout
5153
5154 \begin_layout LyX-Code
5155
5156 \backslash
5157 renewcommand
5158 \backslash
5159 labelitemi[0]{
5160 \backslash
5161 savelabelitemi}
5162 \end_layout
5163
5164 \end_inset
5165
5166
5167 \end_layout
5168
5169 \begin_layout Chapter
5170 \SpecialChar LyX
5171  and the World Wide Web
5172 \end_layout
5173
5174 \begin_layout Standard
5175 \SpecialChar LyX
5176  has long supported the export of documents to various web-friendly formats,
5177  such as HTML.
5178  Before verson 2.0, however, HTML export was always accomplished by the use
5179  of external converters.
5180 \begin_inset Foot
5181 status collapsed
5182
5183 \begin_layout Plain Layout
5184 For details on the use of external converters with \SpecialChar LyX
5185 , see the 
5186 \emph on
5187 Converters
5188 \emph default
5189  section of the Customization manual.
5190 \end_layout
5191
5192 \end_inset
5193
5194  These fall into two large groups: there are converters that use \SpecialChar LaTeX
5195  as an
5196  intermediate format, such as 
5197 \begin_inset Flex Code
5198 status collapsed
5199
5200 \begin_layout Plain Layout
5201 htlatex
5202 \end_layout
5203
5204 \end_inset
5205
5206
5207 \begin_inset Flex Code
5208 status collapsed
5209
5210 \begin_layout Plain Layout
5211 html2latex
5212 \end_layout
5213
5214 \end_inset
5215
5216 , and 
5217 \begin_inset Flex Code
5218 status collapsed
5219
5220 \begin_layout Plain Layout
5221 plastex
5222 \end_layout
5223
5224 \end_inset
5225
5226 , relying upon \SpecialChar LyX
5227  to produce the \SpecialChar LaTeX
5228 ; and there is a converter that works directly
5229  on \SpecialChar LyX
5230  files, 
5231 \begin_inset Flex Code
5232 status collapsed
5233
5234 \begin_layout Plain Layout
5235 e\SpecialChar LyX
5236 er
5237 \end_layout
5238
5239 \end_inset
5240
5241 .
5242  All of these have different advantages and disadvantages.
5243  
5244 \end_layout
5245
5246 \begin_layout Standard
5247 The \SpecialChar LaTeX
5248 -based converters have the advantage that, in principle, they know everythin
5249 g about the exported document that \SpecialChar LaTeX
5250  does.
5251  Such converters do not care, for example, if a certain block of code was
5252  produced by \SpecialChar LyX
5253  or was Evil Red Text.
5254  These converters know about 
5255 \begin_inset Flex Code
5256 status collapsed
5257
5258 \begin_layout Plain Layout
5259 aux
5260 \end_layout
5261
5262 \end_inset
5263
5264  files, counters, and references, and can often make use of the 
5265 \begin_inset Flex Code
5266 status collapsed
5267
5268 \begin_layout Plain Layout
5269 bbl
5270 \end_layout
5271
5272 \end_inset
5273
5274  files generated by Bib\SpecialChar TeX
5275 .
5276  On the other hand, \SpecialChar LaTeX
5277  is a very hard language to parse—it is sometimes said
5278  that only \SpecialChar TeX
5279  itself understands \SpecialChar TeX
5280 —and \SpecialChar LaTeX
5281 -based converters will often choke on
5282  what seem to be quite simple constructs; complex ones can throw them completely
5283 , and as of this writing, for example, the 
5284 \emph on
5285 Embedded Objects
5286 \emph default
5287  manual will not export with 
5288 \begin_inset Flex Code
5289 status collapsed
5290
5291 \begin_layout Plain Layout
5292 htlatex
5293 \end_layout
5294
5295 \end_inset
5296
5297 , though the others will.
5298  The other issue concerns how math is handled.
5299  These converters typically convert the formulae into little pictures that
5300  are then linked from the HTML document.
5301  Since these are actually generated by \SpecialChar LaTeX
5302 , they are accurate.
5303  But they do not scale well, and just getting them to look as if they are
5304  actually meant to be in your document—so that the font sizes seem to be
5305  roughly the same—can be a challenge.
5306 \end_layout
5307
5308 \begin_layout Standard
5309 Alex Fernandez's 
5310 \begin_inset Flex Code
5311 status collapsed
5312
5313 \begin_layout Plain Layout
5314 e\SpecialChar LyX
5315 er
5316 \end_layout
5317
5318 \end_inset
5319
5320  (
5321 \begin_inset CommandInset href
5322 LatexCommand href
5323 name "http://elyxer.nongnu.org/"
5324 target "http://elyxer.nongnu.org/"
5325 literal "false"
5326
5327 \end_inset
5328
5329 ) solves some of these problems.
5330  In particular, the formulae it produces scale perfectly, since it renders
5331  math using a combination of HTML and CSS rather than converting the formulae
5332  to images.
5333  But even moderately complex formula are rendered less well than with 
5334 \begin_inset Flex Code
5335 status collapsed
5336
5337 \begin_layout Plain Layout
5338 htlatex
5339 \end_layout
5340
5341 \end_inset
5342
5343 ; this reflects the limitations of HTML.
5344 \begin_inset Foot
5345 status collapsed
5346
5347 \begin_layout Plain Layout
5348 That said, 
5349 \begin_inset Flex Code
5350 status collapsed
5351
5352 \begin_layout Plain Layout
5353 e\SpecialChar LyX
5354 er
5355 \end_layout
5356
5357 \end_inset
5358
5359  can also use jsMath and MathJax for equations, but this setting is only
5360  available globally and requires one to have access to a server that runs
5361  the backend.
5362 \end_layout
5363
5364 \end_inset
5365
5366  More importantly (as of version 1.1.1, at least), 
5367 \begin_inset Flex Code
5368 status collapsed
5369
5370 \begin_layout Plain Layout
5371 e\SpecialChar LyX
5372 er
5373 \end_layout
5374
5375 \end_inset
5376
5377  has limited support for math macros and no support for user-defined paragraph
5378  or character styles.
5379  These limitations make 
5380 \begin_inset Flex Code
5381 status collapsed
5382
5383 \begin_layout Plain Layout
5384 e\SpecialChar LyX
5385 er
5386 \end_layout
5387
5388 \end_inset
5389
5390  unsuitable for many of the documents \SpecialChar LyX
5391  users produce.
5392  In principle, of course, these problems could be solved, but the \SpecialChar LyX
5393  developers
5394  have decided to follow a different path and have made \SpecialChar LyX
5395  itself capable of
5396  writing XHTML, just as it is capable of writing \SpecialChar LaTeX
5397 , DocBook, and plaintext.
5398 \end_layout
5399
5400 \begin_layout Standard
5401 As of this writing, XHTML output remains under development and should probably
5402  be regarded as 
5403 \begin_inset Quotes eld
5404 \end_inset
5405
5406 experimental
5407 \begin_inset Quotes erd
5408 \end_inset
5409
5410 .
5411 \begin_inset Foot
5412 status collapsed
5413
5414 \begin_layout Plain Layout
5415 The file 
5416 \begin_inset Flex Code
5417 status collapsed
5418
5419 \begin_layout Plain Layout
5420 development/HTML.notes
5421 \end_layout
5422
5423 \end_inset
5424
5425 , which can be found in the \SpecialChar LyX
5426  source tree or 
5427 \begin_inset CommandInset href
5428 LatexCommand href
5429 name "accessed online"
5430 target "http://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
5431 literal "false"
5432
5433 \end_inset
5434
5435 , usually contains up-to-date information about the state of XHTML output.
5436  See also the list of XHTML bugs on 
5437 \begin_inset CommandInset href
5438 LatexCommand href
5439 name "the bug tracker"
5440 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"
5441 literal "false"
5442
5443 \end_inset
5444
5445 .
5446 \end_layout
5447
5448 \end_inset
5449
5450  Still, the developers have chosen this approach because it has several
5451  potential advantages over the other two.
5452 \end_layout
5453
5454 \begin_layout Standard
5455 These advantages are primarily due to the fact that the XHTML output routines,
5456  since they are part of \SpecialChar LyX
5457 , know everything \SpecialChar LyX
5458  knows about the document being
5459  exported.
5460 \begin_inset Foot
5461 status collapsed
5462
5463 \begin_layout Plain Layout
5464 Another advantage is that, since these routines are internal to \SpecialChar LyX
5465 , they are
5466  immune to changes in \SpecialChar LyX
5467 's file format, or to changes in the semantics of
5468  existing insets.
5469 \end_layout
5470
5471 \end_inset
5472
5473  So they know about the table of contents (as displayed in the outline),
5474  about the counters associated with different paragraph styles, and about
5475  user-defined styles.
5476  The XHTML output routines know what \SpecialChar LyX
5477  knows about internationalization,
5478  too, so they will output 
5479 \begin_inset Quotes eld
5480 \end_inset
5481
5482 Chapter 1
5483 \begin_inset Quotes erd
5484 \end_inset
5485
5486  or 
5487 \begin_inset Quotes eld
5488 \end_inset
5489
5490
5491 \lang ngerman
5492 Kapitel
5493 \lang english
5494  1
5495 \begin_inset Quotes erd
5496 \end_inset
5497
5498 , depending upon the language in effect at the time.
5499  
5500 \end_layout
5501
5502 \begin_layout Standard
5503 Quite generally, the output routines know what \SpecialChar LyX
5504  knows about document layout,
5505  that is, about how the document is to be rendered on screen.
5506  We use this information when we output the document as XHTML.
5507  In particular, \SpecialChar LyX
5508  
5509 \emph on
5510 automatically
5511 \emph default
5512  generates CSS style information corresponding to the layout information
5513  it uses to render the document on screen: if section headings are supposed
5514  to be sans-serif and bold as seen in \SpecialChar LyX
5515 , then (by default) they will be sans-seri
5516 f and bold when viewed in a web browser, too.
5517  And this is true not just for pre-defined styles, like Section, but for
5518  any style, including user-defined styles.
5519  Indeed, the XHTML output routines make no distinction between user-defined
5520  paragraph and character styles and \SpecialChar LyX
5521 's own pre-defined styles: in each case,
5522  everything \SpecialChar LyX
5523  knows about the styles is contained in the layout files.
5524  And much the same is true as regards pre-defined textual insets, such as
5525  footnotes, and various custom insets.
5526  
5527 \end_layout
5528
5529 \begin_layout Standard
5530 The result is that XHTML output can be customized and extended in exactly
5531  the same way \SpecialChar LaTeX
5532  output can be customized and extended: through layout files
5533  and modules.
5534  See chapter five of the 
5535 \emph on
5536 Customization 
5537 \emph default
5538 manual for the details.
5539 \end_layout
5540
5541 \begin_layout Standard
5542 The remainder of this chapter contains more detailed information on XHTML
5543  output, its limitations, and ways to work around those limitations.
5544 \end_layout
5545
5546 \begin_layout Section
5547 Math Output in XHTML
5548 \end_layout
5549
5550 \begin_layout Standard
5551 \SpecialChar LyX
5552  offers four choices for how math is rendered.
5553  These have various advantages and disadvantages:
5554 \end_layout
5555
5556 \begin_layout Itemize
5557 MathML
5558 \begin_inset Newline newline
5559 \end_inset
5560
5561 MathML is a dialect of XML designed specifically for mathematics on the
5562  web, and it typically renders very well in browsers that support it.
5563  The disadvantage is that not all browsers support MathML, and support is
5564  not complete even in the Gecko-based browsers, such as Firefox.
5565 \begin_inset Newline newline
5566 \end_inset
5567
5568 If \SpecialChar LyX
5569  is unable to render a formula as MathML—for example, if the formula
5570  uses the 
5571 \begin_inset Flex Code
5572 status collapsed
5573
5574 \begin_layout Plain Layout
5575 xymatrix
5576 \end_layout
5577
5578 \end_inset
5579
5580  package or ERT—then it will instead output the formula as an image.
5581  
5582 \end_layout
5583
5584 \begin_layout Itemize
5585 HTML
5586 \begin_inset Newline newline
5587 \end_inset
5588
5589 As mentioned above, 
5590 \begin_inset Flex Code
5591 status collapsed
5592
5593 \begin_layout Plain Layout
5594 elyxer
5595 \end_layout
5596
5597 \end_inset
5598
5599  outputs math as HTML, styled by CSS.
5600 \begin_inset Foot
5601 status collapsed
5602
5603 \begin_layout Plain Layout
5604 \SpecialChar LyX
5605  has borrowed some of the CSS for its HTML output from 
5606 \begin_inset Flex Code
5607 status collapsed
5608
5609 \begin_layout Plain Layout
5610 elyxer
5611 \end_layout
5612
5613 \end_inset
5614
5615 .
5616 \end_layout
5617
5618 \end_inset
5619
5620  For simple formulae, this can work quite well, though with more complicated
5621  formulae it tends to break down.
5622  Still, this method has the advantage that it is very widely supported and
5623  so it may be appropriate for documents that contain only a little, fairly
5624  simple math.
5625 \begin_inset Newline newline
5626 \end_inset
5627
5628 If Lyx is unable to render a formula as HTML—for example, if the formula
5629  uses the 
5630 \begin_inset Flex Code
5631 status collapsed
5632
5633 \begin_layout Plain Layout
5634 xymatrix
5635 \end_layout
5636
5637 \end_inset
5638
5639  package or ERT—then it will instead output the formula as an image.
5640  
5641 \end_layout
5642
5643 \begin_layout Itemize
5644 Images
5645 \begin_inset Newline newline
5646 \end_inset
5647
5648 Like 
5649 \begin_inset Flex Code
5650 status collapsed
5651
5652 \begin_layout Plain Layout
5653 htlatex
5654 \end_layout
5655
5656 \end_inset
5657
5658 , \SpecialChar LyX
5659  will output formulae as images, the very same images, in fact, that are
5660  used for instant preview.
5661 \begin_inset Foot
5662 status collapsed
5663
5664 \begin_layout Plain Layout
5665 Instant preview does 
5666 \emph on
5667 not 
5668 \emph default
5669 have to be on for images to be output, however.
5670 \end_layout
5671
5672 \end_inset
5673
5674  The advantage to this method is that the images are simply generated by
5675  \SpecialChar LaTeX
5676 , so they are very accurate.
5677  The disadvantage, as mentioned earlier, is that these are bitmapped images,
5678  so they do not scale terribly well, and one cannot copy them, etc.
5679  (As of this writing, there are also problems about equation numbering.
5680  See 
5681 \begin_inset CommandInset href
5682 LatexCommand href
5683 name "bug 6894"
5684 target "http://www.lyx.org/trac/ticket/6894"
5685 literal "false"
5686
5687 \end_inset
5688
5689 .)
5690 \begin_inset Newline newline
5691 \end_inset
5692
5693 The size of the images can be controlled by setting the 
5694 \begin_inset Quotes eld
5695 \end_inset
5696
5697 Math Images Scaling
5698 \begin_inset Quotes erd
5699 \end_inset
5700
5701  parameter under 
5702 \begin_inset Flex Noun
5703 status collapsed
5704
5705 \begin_layout Plain Layout
5706 Document\SpecialChar menuseparator
5707 Settings\SpecialChar menuseparator
5708 Output
5709 \end_layout
5710
5711 \end_inset
5712
5713 .
5714 \begin_inset Foot
5715 status collapsed
5716
5717 \begin_layout Plain Layout
5718 For those who want to know, this controls the resolution of the image in
5719  dots per inch and is based upon a default of 75 dpi.
5720 \end_layout
5721
5722 \end_inset
5723
5724
5725 \begin_inset Newline newline
5726 \end_inset
5727
5728 If \SpecialChar LyX
5729  for some reason fails to create an image for a formula (e.g., if a required
5730  \SpecialChar LaTeX
5731  package is not installed), then it will fall back to outputing the raw
5732  \SpecialChar LaTeX
5733 .
5734 \end_layout
5735
5736 \begin_layout Itemize
5737 \SpecialChar LaTeX
5738
5739 \begin_inset Newline newline
5740 \end_inset
5741
5742 Finally, \SpecialChar LyX
5743  will happily output math as \SpecialChar LaTeX
5744 .
5745  As well as being the output of last resort, this method can be used with
5746  such tools as 
5747 \begin_inset CommandInset href
5748 LatexCommand href
5749 name "jsMath"
5750 target "http://www.math.union.edu/~dpvc/jsMath/"
5751 literal "false"
5752
5753 \end_inset
5754
5755 , which uses JavaScript to render \SpecialChar LaTeX
5756  embedded in HTML documents.
5757  \SpecialChar LyX
5758  wraps the \SpecialChar LaTeX
5759  in either a 
5760 \begin_inset Flex Code
5761 status collapsed
5762
5763 \begin_layout Plain Layout
5764 span
5765 \end_layout
5766
5767 \end_inset
5768
5769  (for inline formulas) or 
5770 \begin_inset Flex Code
5771 status collapsed
5772
5773 \begin_layout Plain Layout
5774 div
5775 \end_layout
5776
5777 \end_inset
5778
5779  (for displayed formulas) with 
5780 \begin_inset Flex Code
5781 status collapsed
5782
5783 \begin_layout Plain Layout
5784 class='math'
5785 \end_layout
5786
5787 \end_inset
5788
5789 , as is required for jsMath.
5790 \end_layout
5791
5792 \begin_layout Standard
5793 One of these output methods must be selected under 
5794 \begin_inset Flex Noun
5795 status collapsed
5796
5797 \begin_layout Plain Layout
5798 Document\SpecialChar menuseparator
5799 Settings\SpecialChar menuseparator
5800 Output
5801 \end_layout
5802
5803 \end_inset
5804
5805 .
5806  By default, \SpecialChar LyX
5807  outputs MathML.
5808  This is a document-wide setting, therefore.
5809 \end_layout
5810
5811 \begin_layout Standard
5812 Eventually, \SpecialChar LyX
5813  will offer the user the option to select an alternate output
5814  method for a particular inset, say, one that isn't being rendered very
5815  well by MathML.
5816 \begin_inset Foot
5817 status collapsed
5818
5819 \begin_layout Plain Layout
5820 That said, since \SpecialChar LyX
5821  falls back to images if the inset contains ERT, then one
5822  can force output as an image by putting some harmless ERT into the math,
5823  for example: 
5824 \begin_inset Formula $a=b\relax$
5825 \end_inset
5826
5827 .
5828 \end_layout
5829
5830 \end_inset
5831
5832
5833 \end_layout
5834
5835 \begin_layout Section
5836 Bibliography and Citations
5837 \end_layout
5838
5839 \begin_layout Standard
5840 XHTML output fully supports bibliographies and citations.
5841  
5842 \end_layout
5843
5844 \begin_layout Standard
5845 Citation labels are generated by the same machinery that generates \SpecialChar LyX
5846 's on-screen
5847  labels, so the labels will look in the output much as they do in \SpecialChar LyX
5848 , though
5849  better.
5850  If you are using numerical citations, then \SpecialChar LyX
5851  will output numerical labels,
5852  such as [1] or [17], rather than simply showing the citation key in square
5853  brackets, as it does on-screen.
5854  If you are using author-year citations, then \SpecialChar LyX
5855  will add lowercase letters
5856  to the years, just as Bib\SpecialChar TeX
5857  does, if it finds more than one citation for
5858  a given author-year combination.
5859  The labels will be printed with the bibliography entries.
5860  Note that there is, at present, no way to customize the appearance of the
5861  labels, for example, to choose between square brackets and parentheses.
5862 \end_layout
5863
5864 \begin_layout Standard
5865 Bibliography output is handled by the same machinery that handles the presentati
5866 on of reference information in the citation dialog, so you will see in the
5867  XHTML output pretty much what you would see if you were to look at a given
5868  entry in the citation dialog.
5869  The formatting can be customized in your layout file or, preferably, in
5870  a module.
5871  See the 
5872 \emph on
5873 Customization
5874 \emph default
5875  manual for the details.
5876 \end_layout
5877
5878 \begin_layout Standard
5879 The main defect at present is that cross-referenced information is printed
5880  with every entry with which it is associated.
5881  So you can see things like this:
5882 \end_layout
5883
5884 \begin_layout Quote
5885 Jason Stanley, 
5886 \begin_inset Quotes eld
5887 \end_inset
5888
5889 Context and Logical Form
5890 \begin_inset Quotes erd
5891 \end_inset
5892
5893 , in 
5894 \emph on
5895 Language in Context: Selected Essays
5896 \emph default
5897  (Oxford: Oxford University Press, 2007), pp.
5898  30–68.
5899 \end_layout
5900
5901 \begin_layout Quote
5902 Jason Stanley, 
5903 \begin_inset Quotes eld
5904 \end_inset
5905
5906 Semantics in Context
5907 \begin_inset Quotes erd
5908 \end_inset
5909
5910 , in 
5911 \emph on
5912 Language in Context: Selected Essays
5913 \emph default
5914  (Oxford: Oxford University Press, 2007), pp.
5915  201–30.
5916 \end_layout
5917
5918 \begin_layout Standard
5919 This should be fixed before long.
5920 \end_layout
5921
5922 \begin_layout Standard
5923 There is no support at present for sectioned bibliographies.
5924  If you have multiple bibliographies, then \SpecialChar LyX
5925  will print the same bibliography
5926  over and over.
5927 \end_layout
5928
5929 \begin_layout Section
5930 Indexes
5931 \end_layout
5932
5933 \begin_layout Standard
5934 \SpecialChar LyX
5935  will happily export indexes as XHTML, but with certain limitations at the
5936  moment.
5937 \end_layout
5938
5939 \begin_layout Standard
5940 Index export will be most reliable when you do not attempt to use the fancy
5941  constructs that are described in the section on indexes in the 
5942 \emph on
5943 User's Guide
5944 \emph default
5945 .
5946 \begin_inset Foot
5947 status collapsed
5948
5949 \begin_layout Plain Layout
5950 The main issue here is that \SpecialChar LyX
5951  itself does not really handle these.
5952  It just lets you enter what you would have to enter in raw \SpecialChar LaTeX
5953 .
5954 \end_layout
5955
5956 \end_inset
5957
5958  We'll describe how they are handled using the subsection headings from
5959  that section.
5960 \end_layout
5961
5962 \begin_layout Itemize
5963 Grouping Index Entries (aka, sub-entries): \SpecialChar LyX
5964  makes an effort to support these,
5965  but the entries must be separated by 
5966 \begin_inset Quotes eld
5967 \end_inset
5968
5969  ! 
5970 \begin_inset Quotes erd
5971 \end_inset
5972
5973 , that is, there must be spaces around the exclamation point.
5974  This is because it is otherwise too difficult to check for escaped exclamation
5975  points, ones in math, and so forth.
5976 \end_layout
5977
5978 \begin_layout Itemize
5979 Page Ranges: There is no support at all for page ranges, since these make
5980  no sense with XHMTL.
5981  Instead, you will just get two index entries, one at either end.
5982 \end_layout
5983
5984 \begin_layout Itemize
5985 Cross-referencing: There is no support for cross-referencing.
5986  If \SpecialChar LyX
5987  finds an entry containing the 
5988 \begin_inset Quotes eld
5989 \end_inset
5990
5991 |see\SpecialChar ldots
5992
5993 \begin_inset Quotes erd
5994 \end_inset
5995
5996  construct, it is just dropped, and the rest is treated as an ordinary index
5997  entry.
5998 \end_layout
5999
6000 \begin_layout Itemize
6001 Index Entry Order: \SpecialChar LyX
6002  does support attempts to fix the sorting order.
6003  It will take what is before the first `@' it finds and use that for sorting,
6004  taking what follows the first `@' to be the actual entry.
6005  At present, \SpecialChar LyX
6006  does not check for escaped `@', so do not try to index email
6007  addresses.
6008 \end_layout
6009
6010 \begin_layout Itemize
6011 Index Entry Layout: You can format entries by using the text style dialog,
6012  or by using any other method available within \SpecialChar LyX
6013  itself.
6014  There is no support for constructs like: 
6015 \begin_inset Quotes eld
6016 \end_inset
6017
6018 entry|textbf
6019 \begin_inset Quotes erd
6020 \end_inset
6021
6022 .
6023  Indeed, if \SpecialChar LyX
6024  finds a pipe symbol, `|', in an entry, it will delete it and
6025  everything that follows it.
6026 \end_layout
6027
6028 \begin_layout Itemize
6029 Multiple Indexes: There is no support for multiple indexes.
6030  Rather, all index entries will be printed as one large index.
6031  To avoid our printing several versions of the index, we print only the
6032  main index, so make sure you have one.
6033 \end_layout
6034
6035 \begin_layout Section
6036 Nomenclature and Glossary
6037 \end_layout
6038
6039 \begin_layout Standard
6040 There is at present no support for glossaries.
6041  Adding it would be fairly trivial, and welcome.
6042 \end_layout
6043
6044 \begin_layout Chapter
6045 The \SpecialChar LyX
6046  Server
6047 \end_layout
6048
6049 \begin_layout Section
6050 Introduction
6051 \end_layout
6052
6053 \begin_layout Standard
6054 The `\SpecialChar LyX
6055  server' allows other programs to talk to \SpecialChar LyX
6056 , invoke \SpecialChar LyX
6057  commands, and retrieve
6058  information about the \SpecialChar LyX
6059  internal state.
6060  This is only intended for advanced users, but they should find it useful.
6061  It is by writing to the \SpecialChar LyX
6062  server, for example, that bibliography managers,
6063  such as JabRef, are able to 
6064 \begin_inset Quotes eld
6065 \end_inset
6066
6067 push
6068 \begin_inset Quotes erd
6069 \end_inset
6070
6071  citations to \SpecialChar LyX
6072 .
6073 \end_layout
6074
6075 \begin_layout Section
6076 Starting the \SpecialChar LyX
6077  Server
6078 \end_layout
6079
6080 \begin_layout Standard
6081 The \SpecialChar LyX
6082  server works through the use of a pair of named pipes.
6083  These are usually located in 
6084 \begin_inset Flex Code
6085 status collapsed
6086
6087 \begin_layout Plain Layout
6088 UserDir
6089 \end_layout
6090
6091 \end_inset
6092
6093 , (except on Windows, where 
6094 \emph on
6095 local
6096 \emph default
6097  named pipes are special objects located in 
6098 \begin_inset Flex Code
6099 status collapsed
6100
6101 \begin_layout Plain Layout
6102
6103 \backslash
6104
6105 \backslash
6106 .
6107 \backslash
6108 pipe
6109 \end_layout
6110
6111 \end_inset
6112
6113 ) and have the names 
6114 \begin_inset Quotes eld
6115 \end_inset
6116
6117
6118 \begin_inset Flex Code
6119 status collapsed
6120
6121 \begin_layout Plain Layout
6122 lyxpipe.in
6123 \end_layout
6124
6125 \end_inset
6126
6127
6128 \begin_inset Quotes erd
6129 \end_inset
6130
6131  and 
6132 \begin_inset Quotes eld
6133 \end_inset
6134
6135
6136 \begin_inset Flex Code
6137 status collapsed
6138
6139 \begin_layout Plain Layout
6140 lyxpipe.out
6141 \end_layout
6142
6143 \end_inset
6144
6145
6146 \begin_inset Quotes erd
6147 \end_inset
6148
6149 .
6150  External programs write into 
6151 \begin_inset Flex Code
6152 status collapsed
6153
6154 \begin_layout Plain Layout
6155 lyxpipe.in
6156 \end_layout
6157
6158 \end_inset
6159
6160  and read back data from 
6161 \begin_inset Flex Code
6162 status collapsed
6163
6164 \begin_layout Plain Layout
6165 lyxpipe.out
6166 \end_layout
6167
6168 \end_inset
6169
6170 .
6171  The stem of the pipe names can be defined in the 
6172 \begin_inset Flex Noun
6173 status collapsed
6174
6175 \begin_layout Plain Layout
6176 Tools\SpecialChar menuseparator
6177 Preferences
6178 \end_layout
6179
6180 \end_inset
6181
6182  dialog, for example 
6183 \begin_inset Flex Code
6184 status collapsed
6185
6186 \begin_layout Plain Layout
6187 "/home/myhome/lyxpipe"
6188 \end_layout
6189
6190 \end_inset
6191
6192 , or 
6193 \begin_inset Flex Code
6194 status collapsed
6195
6196 \begin_layout Plain Layout
6197 "
6198 \backslash
6199
6200 \backslash
6201 .
6202 \backslash
6203 pipe
6204 \backslash
6205 lyxpipe"
6206 \end_layout
6207
6208 \end_inset
6209
6210  on Windows (where any working path instead of lyxpipe can be used, for
6211  example 
6212 \begin_inset Flex Code
6213 status collapsed
6214
6215 \begin_layout Plain Layout
6216 "
6217 \backslash
6218
6219 \backslash
6220 .
6221 \backslash
6222 pipe
6223 \backslash
6224 my
6225 \backslash
6226 lyx
6227 \backslash
6228 pipe"
6229 \end_layout
6230
6231 \end_inset
6232
6233  would also work).
6234  You 
6235 \emph on
6236 must
6237 \emph default
6238  configure this manually in order for the server to start.
6239 \end_layout
6240
6241 \begin_layout Standard
6242 \SpecialChar LyX
6243  will add the '
6244 \begin_inset Flex Code
6245 status collapsed
6246
6247 \begin_layout Plain Layout
6248 .in
6249 \end_layout
6250
6251 \end_inset
6252
6253 ' and '
6254 \begin_inset Flex Code
6255 status collapsed
6256
6257 \begin_layout Plain Layout
6258 .out
6259 \end_layout
6260
6261 \end_inset
6262
6263 ' to create the pipes.
6264  If one of the pipes already exists, \SpecialChar LyX
6265  will assume that another \SpecialChar LyX
6266  process
6267  is already running and will not start the server.
6268  On POSIX (Unix like) systems, if for some other reason, an unused 
6269 \begin_inset Quotes eld
6270 \end_inset
6271
6272 stale
6273 \begin_inset Quotes erd
6274 \end_inset
6275
6276  pipe is left in existence when \SpecialChar LyX
6277  closes, then \SpecialChar LyX
6278  will try to delete it.
6279  If this fails for some reason, you will need to delete the pipes manually
6280  and then restart \SpecialChar LyX
6281 .
6282  On Windows, pipes are deleted by the OS on program termination or crash,
6283  so 
6284 \begin_inset Quotes eld
6285 \end_inset
6286
6287 stale
6288 \begin_inset Quotes erd
6289 \end_inset
6290
6291  pipes should not be possible.
6292 \end_layout
6293
6294 \begin_layout Standard
6295 To have several \SpecialChar LyX
6296  processes with servers at the same time, you have to use
6297  different configurations, perhaps by using separate user directories, each
6298  with its own 
6299 \begin_inset Flex Code
6300 status collapsed
6301
6302 \begin_layout Plain Layout
6303 preferences
6304 \end_layout
6305
6306 \end_inset
6307
6308  file, for each process.
6309 \end_layout
6310
6311 \begin_layout Standard
6312 If you are developing a client program, you might find it useful to enable
6313  debugging information from the \SpecialChar LyX
6314  server.
6315  Do this by starting \SpecialChar LyX
6316  as 
6317 \begin_inset Flex Code
6318 status collapsed
6319
6320 \begin_layout Plain Layout
6321 lyx -dbg lyxserver
6322 \end_layout
6323
6324 \end_inset
6325
6326 .
6327 \end_layout
6328
6329 \begin_layout Standard
6330 You can find a complete example client written in C++ in the source distribution
6331  as 
6332 \begin_inset Flex Code
6333 status collapsed
6334
6335 \begin_layout Plain Layout
6336 development/lyxserver/server_monitor.cpp
6337 \end_layout
6338
6339 \end_inset
6340
6341 .
6342 \end_layout
6343
6344 \begin_layout Standard
6345 Another useful tool is the command-line based client found in 
6346 \begin_inset Flex Code
6347 status collapsed
6348
6349 \begin_layout Plain Layout
6350 src/client/lyxclient
6351 \end_layout
6352
6353 \end_inset
6354
6355 .
6356 \end_layout
6357
6358 \begin_layout Section
6359 Normal communication
6360 \end_layout
6361
6362 \begin_layout Standard
6363 To issue a \SpecialChar LyX
6364  call, the client writes a line of ASCII text into the input
6365  pipe.
6366  This line has the following format:
6367 \end_layout
6368
6369 \begin_layout Quote
6370 LYXCMD:
6371 \emph on
6372 clientname
6373 \emph default
6374 :
6375 \emph on
6376 function
6377 \emph default
6378 :
6379 \emph on
6380 argument
6381 \end_layout
6382
6383 \begin_layout Description
6384 clientname is a name that the client can choose arbitrarily.
6385  Its only use is that \SpecialChar LyX
6386  will echo it if it sends an answer—so a client can
6387  dispatch results from different requesters.
6388 \end_layout
6389
6390 \begin_layout Description
6391 function is the function you want \SpecialChar LyX
6392  to perform.
6393  It is the same as the commands you'd use in the minibuffer.
6394 \end_layout
6395
6396 \begin_layout Description
6397 argument is an optional argument which is meaningful only to some functions
6398  (for instance, the 
6399 \begin_inset Quotes eld
6400 \end_inset
6401
6402 self-insert
6403 \begin_inset Quotes erd
6404 \end_inset
6405
6406  LFUN will insert the argument as text at the cursor position).
6407 \end_layout
6408
6409 \begin_layout Standard
6410 The answer from \SpecialChar LyX
6411  will arrive in the output pipe and be of the form
6412 \end_layout
6413
6414 \begin_layout Quote
6415 INFO:
6416 \emph on
6417 clientname
6418 \emph default
6419 :
6420 \emph on
6421 function
6422 \emph default
6423 :
6424 \emph on
6425 data
6426 \end_layout
6427
6428 \begin_layout Standard
6429 where 
6430 \emph on
6431 clientname
6432 \emph default
6433  and 
6434 \emph on
6435 function
6436 \emph default
6437  are just echoed from the command request, while 
6438 \emph on
6439 data
6440 \emph default
6441  is more or less useful information filled according to how the command
6442  execution worked out.
6443  Some commands, such as 
6444 \begin_inset Quotes eld
6445 \end_inset
6446
6447 font-state
6448 \begin_inset Quotes erd
6449 \end_inset
6450
6451 , will return information about the internal state of \SpecialChar LyX
6452 , while other will
6453  return an empty data-response.
6454  This means that the command execution went fine.
6455 \end_layout
6456
6457 \begin_layout Standard
6458 In case of errors, the response from \SpecialChar LyX
6459  will have this form
6460 \end_layout
6461
6462 \begin_layout Quote
6463 ERROR:
6464 \emph on
6465 clientname
6466 \emph default
6467 :
6468 \emph on
6469 function
6470 \emph default
6471 :
6472 \emph on
6473 error message
6474 \end_layout
6475
6476 \begin_layout Standard
6477 where the 
6478 \emph on
6479 error message
6480 \emph default
6481  should contain an explanation of why the command failed.
6482 \end_layout
6483
6484 \begin_layout Standard
6485 Examples:
6486 \end_layout
6487
6488 \begin_layout LyX-Code
6489 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
6490 \begin_inset Newline newline
6491 \end_inset
6492
6493 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
6494 \begin_inset Newline newline
6495 \end_inset
6496
6497 read a <~/.lyxpipe.out
6498 \begin_inset Newline newline
6499 \end_inset
6500
6501 echo $a
6502 \end_layout
6503
6504 \begin_layout Subsection
6505 AppleScript (Mac OS X)
6506 \end_layout
6507
6508 \begin_layout Standard
6509 Since \SpecialChar LyX
6510  2.1, \SpecialChar LyX
6511  supports basic interactions with AppleScript for normal communicatio
6512 n through the command run.
6513  This command takes a direct argument (the 
6514 \series bold
6515 function
6516 \series default
6517  to perform) and an optional argument.
6518  It either returns the output of the function or triggers an error with
6519  the error message and code.
6520 \end_layout
6521
6522 \begin_layout Standard
6523 Example:
6524 \end_layout
6525
6526 \begin_layout LyX-Code
6527 tell application "\SpecialChar LyX
6528 "
6529 \end_layout
6530
6531 \begin_layout LyX-Code
6532   try
6533 \end_layout
6534
6535 \begin_layout LyX-Code
6536     -- Stores the current file name into f
6537 \end_layout
6538
6539 \begin_layout LyX-Code
6540     set f to (run "server-get-filename" with argument "")
6541 \end_layout
6542
6543 \begin_layout LyX-Code
6544     on error the error_message number the error_number
6545 \end_layout
6546
6547 \begin_layout LyX-Code
6548       display dialog "Error: " & the error_number & ".
6549  " ¬
6550 \end_layout
6551
6552 \begin_layout LyX-Code
6553               & the error_message buttons {"OK"} default button 1
6554 \end_layout
6555
6556 \begin_layout LyX-Code
6557   end try
6558 \end_layout
6559
6560 \begin_layout LyX-Code
6561 end tell
6562 \end_layout
6563
6564 \begin_layout Section
6565 Notification
6566 \end_layout
6567
6568 \begin_layout Standard
6569 \SpecialChar LyX
6570  can notify clients of events going on asynchronously.
6571  Currently it will only do this if the user binds a key sequence with the
6572  function 
6573 \begin_inset Quotes eld
6574 \end_inset
6575
6576 notify
6577 \begin_inset Quotes erd
6578 \end_inset
6579
6580 .
6581  The format of the string \SpecialChar LyX
6582  sends is as follows:
6583 \end_layout
6584
6585 \begin_layout Quote
6586 \begin_inset Flex Code
6587 status collapsed
6588
6589 \begin_layout Plain Layout
6590 NOTIFY:
6591 \end_layout
6592
6593 \end_inset
6594
6595
6596 \emph on
6597 key-sequence
6598 \end_layout
6599
6600 \begin_layout Standard
6601 where 
6602 \emph on
6603 key-sequence
6604 \emph default
6605  is the printed representation of the key sequence that was actually typed
6606  by the user.
6607 \end_layout
6608
6609 \begin_layout Standard
6610 This mechanism can be used to extend \SpecialChar LyX
6611 's command set and implement macros.
6612  Bind some key sequence to 
6613 \begin_inset Quotes eld
6614 \end_inset
6615
6616 notify
6617 \begin_inset Quotes erd
6618 \end_inset
6619
6620 .
6621  Then start a client that listens on the output pipe, dispatches the command
6622  according to the sequence, and starts a function that may use \SpecialChar LyX
6623  calls and
6624  \SpecialChar LyX
6625  requests to issue a command or a series of commands to \SpecialChar LyX
6626 .
6627 \end_layout
6628
6629 \begin_layout Section
6630 The simple \SpecialChar LyX
6631  Server Protocol
6632 \end_layout
6633
6634 \begin_layout Standard
6635 \SpecialChar LyX
6636  implements a simple protocol that can be used for session management.
6637  All messages are of the form
6638 \end_layout
6639
6640 \begin_layout Quote
6641 LYXSRV:
6642 \emph on
6643 clientname
6644 \emph default
6645 :
6646 \emph on
6647 protocol message
6648 \end_layout
6649
6650 \begin_layout Standard
6651 where 
6652 \emph on
6653 protocol message
6654 \emph default
6655  can be 
6656 \begin_inset Quotes eld
6657 \end_inset
6658
6659 hello
6660 \begin_inset Quotes erd
6661 \end_inset
6662
6663  or 
6664 \begin_inset Quotes eld
6665 \end_inset
6666
6667 bye
6668 \begin_inset Quotes erd
6669 \end_inset
6670
6671 .
6672  If 
6673 \begin_inset Quotes eld
6674 \end_inset
6675
6676 hello
6677 \begin_inset Quotes erd
6678 \end_inset
6679
6680  is received from a client, \SpecialChar LyX
6681  will report back to inform the client that
6682  it's listening to it's messages, while 
6683 \begin_inset Quotes eld
6684 \end_inset
6685
6686 bye
6687 \begin_inset Quotes erd
6688 \end_inset
6689
6690  sent from \SpecialChar LyX
6691  will inform clients that \SpecialChar LyX
6692  is closing.
6693 \end_layout
6694
6695 \begin_layout Section
6696 Reverse DVI/PDF search
6697 \end_layout
6698
6699 \begin_layout Standard
6700 Some DVI/PDF viewers
6701 \begin_inset Foot
6702 status collapsed
6703
6704 \begin_layout Plain Layout
6705 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
6706  Qpdfview on Unix, Skim on Mac OSX and SumatraPDF on Windows.
6707 \end_layout
6708
6709 \end_inset
6710
6711  provide 
6712 \emph on
6713 reverse search
6714 \emph default
6715  facility (also called 
6716 \emph on
6717 inverse search
6718 \emph default
6719 ).
6720  This means that you can tell \SpecialChar LyX
6721  to put the cursor to a specific line in the
6722  document by clicking at the respective position in the DVI/PDF output.
6723  To achieve this, the viewer must be able to communicate with \SpecialChar LyX
6724 .
6725  This is done via the \SpecialChar LyX
6726  server either by using the named pipe (
6727 \emph on
6728 lyxpipe
6729 \emph default
6730 ), or the UNIX domain socket (
6731 \emph on
6732 lyxsocket
6733 \emph default
6734 ) that \SpecialChar LyX
6735  creates in its temporary directory (this is the way the 
6736 \begin_inset Flex Code
6737 status collapsed
6738
6739 \begin_layout Plain Layout
6740 lyxclient
6741 \end_layout
6742
6743 \end_inset
6744
6745  program communicates with \SpecialChar LyX
6746 ).
6747  In some cases, you need a helper script that mediates between the viewer
6748  and \SpecialChar LyX
6749 , in others, the viewer can communicate with \SpecialChar LyX
6750  directly.
6751  This depends on the selected viewer and on your operating system.
6752  The same applies to the way viewers need to be configured and the way the
6753  reverse search is actually performed.
6754  In what follows, we will thus describe how to setup reverse search for
6755  specific viewers.
6756  Before we turn to this, though, we will explain what needs to be done generally
6757  to enable reverse search in the DVI/PDF output.
6758 \end_layout
6759
6760 \begin_layout Subsection
6761 Automatic setup
6762 \begin_inset CommandInset label
6763 LatexCommand label
6764 name "subsec:rev-search"
6765
6766 \end_inset
6767
6768
6769 \end_layout
6770
6771 \begin_layout Standard
6772 In most cases \SpecialChar LyX
6773  will do the work for you by enabling the option 
6774 \begin_inset Flex Noun
6775 status collapsed
6776
6777 \begin_layout Plain Layout
6778 Synchronize with Output
6779 \end_layout
6780
6781 \end_inset
6782
6783  in the menu 
6784 \begin_inset Flex Noun
6785 status collapsed
6786
6787 \begin_layout Plain Layout
6788 Document\SpecialChar menuseparator
6789 Settings\SpecialChar menuseparator
6790 Output
6791 \end_layout
6792
6793 \end_inset
6794
6795 .
6796  In such a case \SpecialChar LyX
6797  will automatically insert the necessary Sync\SpecialChar TeX
6798  macro (for
6799  PDF) or load the srcltx package (for DVI) respectively.
6800  This option can be easily reached also on 
6801 \begin_inset Flex Code
6802 status collapsed
6803
6804 \begin_layout Plain Layout
6805 View/Update
6806 \end_layout
6807
6808 \end_inset
6809
6810  Toolbar.
6811 \end_layout
6812
6813 \begin_layout Standard
6814 If you need a different setting, you can select or input a custom macro
6815  from the drop down box just below 
6816 \begin_inset Flex Noun
6817 status collapsed
6818
6819 \begin_layout Plain Layout
6820 Document\SpecialChar menuseparator
6821 Settings\SpecialChar menuseparator
6822 Output\SpecialChar menuseparator
6823 Synchronize with Output
6824 \end_layout
6825
6826 \end_inset
6827
6828 .
6829 \end_layout
6830
6831 \begin_layout Standard
6832 Note that the method 
6833 \begin_inset Flex Code
6834 status collapsed
6835
6836 \begin_layout Plain Layout
6837
6838 \backslash
6839 synctex=1
6840 \end_layout
6841
6842 \end_inset
6843
6844  enables gzip compression.
6845  If your viewer does not support it, you should instead use 
6846 \begin_inset Flex Code
6847 status collapsed
6848
6849 \begin_layout Plain Layout
6850
6851 \backslash
6852 synctex=-1
6853 \end_layout
6854
6855 \end_inset
6856
6857 .
6858 \end_layout
6859
6860 \begin_layout Standard
6861 Please also note that including the 
6862 \begin_inset Flex Code
6863 status collapsed
6864
6865 \begin_layout Plain Layout
6866 srcltx
6867 \end_layout
6868
6869 \end_inset
6870
6871  package or 
6872 \begin_inset Flex Code
6873 status collapsed
6874
6875 \begin_layout Plain Layout
6876 src-specials
6877 \end_layout
6878
6879 \end_inset
6880
6881  sometimes has an undesired impact on the typesetting.
6882  Thus, you should switch output synchronization off for the final typesetting
6883  if you use the 
6884 \begin_inset Flex Code
6885 status collapsed
6886
6887 \begin_layout Plain Layout
6888 srcltx
6889 \end_layout
6890
6891 \end_inset
6892
6893  package or 
6894 \begin_inset Flex Code
6895 status collapsed
6896
6897 \begin_layout Plain Layout
6898 src-specials
6899 \end_layout
6900
6901 \end_inset
6902
6903 .
6904  
6905 \end_layout
6906
6907 \begin_layout Standard
6908 In case you need some more special settings that are not covered by the
6909  automatic settings, read the next section about how to set up output synchroniz
6910 ation manually.
6911  If the automatic setup suits your needs, you can readily jump to section
6912 \begin_inset space ~
6913 \end_inset
6914
6915
6916 \begin_inset CommandInset ref
6917 LatexCommand ref
6918 reference "subsec:configuring-viewers"
6919
6920 \end_inset
6921
6922 , where the necessary configuration steps in your viewer – needed both with
6923  the automatic and the manual setup – are described.
6924 \end_layout
6925
6926 \begin_layout Subsection
6927 Manual setup
6928 \end_layout
6929
6930 \begin_layout Standard
6931 \SpecialChar LaTeX
6932  provides several different methods for reverse search.
6933  Some are built-in in the 
6934 \begin_inset Flex Code
6935 status collapsed
6936
6937 \begin_layout Plain Layout
6938 latex/pdflatex
6939 \end_layout
6940
6941 \end_inset
6942
6943  program, some are provided by external packages.
6944  Your choice depends on whether your \SpecialChar LaTeX
6945  distribution already provides a given
6946  method (the built-in methods are rather new) and whether your viewer can
6947  cope with it.
6948  The available methods are described in the following.
6949 \end_layout
6950
6951 \begin_layout Subsubsection*
6952 Built-in DVI-search via src-specials (DVI only) 
6953 \end_layout
6954
6955 \begin_layout Standard
6956 This method provides the DVI file with the necessary information for reverse
6957  search.
6958  It is available in \SpecialChar LaTeX
6959  since quite some time (any somewhat recent \SpecialChar LaTeX
6960  distribution
6961  should include it), and it works reliably.
6962  To enable it, 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  (plain)->DVI
6972 \end_layout
6973
6974 \end_inset
6975
6976  or 
6977 \begin_inset Flex Noun
6978 status collapsed
6979
6980 \begin_layout Plain Layout
6981 La
6982 \family sans
6983 TeX
6984 \family default
6985  (plain)->DraftDVI
6986 \end_layout
6987
6988 \end_inset
6989
6990  converter in 
6991 \begin_inset Flex Noun
6992 status collapsed
6993
6994 \begin_layout Plain Layout
6995 Preferences\SpecialChar menuseparator
6996 File Handling\SpecialChar menuseparator
6997 Converters
6998 \end_layout
6999
7000 \end_inset
7001
7002  to 
7003 \begin_inset Flex Code
7004 status collapsed
7005
7006 \begin_layout Plain Layout
7007 latex -src-specials $$i
7008 \end_layout
7009
7010 \end_inset
7011
7012 .
7013  If this doesn't work, check if your \SpecialChar TeX
7014  engine needs different options (the
7015  syntax might differ in some distributions).
7016 \end_layout
7017
7018 \begin_layout Subsubsection*
7019 External Packages (PDFSync and scrltx) 
7020 \end_layout
7021
7022 \begin_layout Standard
7023 The packages 
7024 \emph on
7025 pdfsync
7026 \emph default
7027  and 
7028 \emph on
7029 scrltx
7030 \emph default
7031  provide reverse search facility for PDF output (via pdflatex) and DVI output,
7032  respectively.
7033  In order to enable it, load the packages in the \SpecialChar LyX
7034  preamble: 
7035 \end_layout
7036
7037 \begin_layout Itemize
7038 \begin_inset Flex Code
7039 status collapsed
7040
7041 \begin_layout Plain Layout
7042
7043 \backslash
7044 usepackage{pdfsync}
7045 \end_layout
7046
7047 \end_inset
7048
7049  for reverse PDF search,
7050 \end_layout
7051
7052 \begin_layout Itemize
7053 \begin_inset Flex Code
7054 status collapsed
7055
7056 \begin_layout Plain Layout
7057
7058 \backslash
7059 usepackage[active]{srcltx}
7060 \end_layout
7061
7062 \end_inset
7063
7064  for reverse DVI search.
7065 \end_layout
7066
7067 \begin_layout Standard
7068 If you want to be able to perform both DVI and PDF reverse searches, you
7069  can also insert in the preamble the following lines
7070 \end_layout
7071
7072 \begin_layout LyX-Code
7073
7074 \backslash
7075 usepackage{ifpdf}
7076 \begin_inset Newline newline
7077 \end_inset
7078
7079
7080 \backslash
7081 ifpdf
7082 \begin_inset Newline newline
7083 \end_inset
7084
7085   
7086 \backslash
7087 usepackage{pdfsync}
7088 \begin_inset Newline newline
7089 \end_inset
7090
7091
7092 \backslash
7093 else
7094 \begin_inset Newline newline
7095 \end_inset
7096
7097   
7098 \backslash
7099 usepackage[active]{srcltx}
7100 \begin_inset Newline newline
7101 \end_inset
7102
7103
7104 \backslash
7105 fi
7106 \end_layout
7107
7108 \begin_layout Standard
7109 This way, you can preview the file as either DVI or PDF (pdflatex) and the
7110  right package will be used.
7111 \end_layout
7112
7113 \begin_layout Standard
7114 Note that PDFSync might affect the output layout of your document.
7115  It is therefore advised to disable PDFsync for final documents.
7116 \end_layout
7117
7118 \begin_layout Subsubsection*
7119 Built-in reverse search via Sync\SpecialChar TeX
7120  (DVI and PDF) 
7121 \end_layout
7122
7123 \begin_layout Standard
7124 Recent versions of 
7125 \begin_inset Flex Code
7126 status collapsed
7127
7128 \begin_layout Plain Layout
7129 (pdf)latex
7130 \end_layout
7131
7132 \end_inset
7133
7134  have built-in support for both PDF and DVI reverse search.
7135  This so-called 
7136 \emph on
7137 Sync\SpecialChar TeX
7138
7139 \emph default
7140  facility is basically the result of the integration of the PDFSync package
7141  to the pdftex program and its merge with the 
7142 \emph on
7143 scr-specials
7144 \emph default
7145  approach.
7146  You need at least \SpecialChar TeX
7147 Live 2008 or a recent Mik\SpecialChar TeX
7148  distribution in order to use
7149  it.
7150 \begin_inset Foot
7151 status collapsed
7152
7153 \begin_layout Plain Layout
7154 For some reason, Mik\SpecialChar TeX
7155  does not understand/obey the command \SpecialChar LyX
7156  inserts into
7157  the preamble when you check the "Enable Forward/Reverse Search" button
7158  in the toolbar and does not generate the necessary info.
7159 \end_layout
7160
7161 \begin_layout Plain Layout
7162 The generation of the required info can be forced by changing the converter
7163  "\SpecialChar LaTeX
7164  (pdflatex) -> PDF (pdflatex)" in Preferences->File handling->Converters
7165  from the default "pdflatex $$i" to "pdflatex -synctex=1 $$i" (i.e., by adding
7166  the -synctex=1 switch).
7167 \end_layout
7168
7169 \end_inset
7170
7171  Also note that only a few PDF viewers (Okular and Qpdfview on Unix, Skim
7172  on the Mac, SumatraPDF on Windows) already provide Sync\SpecialChar TeX
7173  support.
7174 \end_layout
7175
7176 \begin_layout Standard
7177 To enable Sync\SpecialChar TeX
7178  for DVI output, change the 
7179 \begin_inset Flex Noun
7180 status collapsed
7181
7182 \begin_layout Plain Layout
7183 La
7184 \family sans
7185 TeX
7186 \family default
7187  (plain) -> DVI
7188 \end_layout
7189
7190 \end_inset
7191
7192  or 
7193 \begin_inset Flex Noun
7194 status collapsed
7195
7196 \begin_layout Plain Layout
7197 La
7198 \family sans
7199 TeX
7200 \family default
7201  (plain) -> DraftDVI
7202 \end_layout
7203
7204 \end_inset
7205
7206  converter in 
7207 \begin_inset Flex Noun
7208 status collapsed
7209
7210 \begin_layout Plain Layout
7211 Preferences\SpecialChar menuseparator
7212 File Handling\SpecialChar menuseparator
7213 Converters
7214 \end_layout
7215
7216 \end_inset
7217
7218  to 
7219 \begin_inset Flex Code
7220 status collapsed
7221
7222 \begin_layout Plain Layout
7223 latex -synctex=1 $$i
7224 \end_layout
7225
7226 \end_inset
7227
7228 , and for PDF output, change the 
7229 \begin_inset Flex Noun
7230 status collapsed
7231
7232 \begin_layout Plain Layout
7233 La
7234 \family sans
7235 TeX
7236 \family default
7237  (pdflatex) -> PDF (pdflatex)
7238 \end_layout
7239
7240 \end_inset
7241
7242  or converter to 
7243 \begin_inset Flex Code
7244 status collapsed
7245
7246 \begin_layout Plain Layout
7247 pdflatex -synctex=1 $$i
7248 \end_layout
7249
7250 \end_inset
7251
7252 .
7253  Check the documentation of your viewer whether the viewer needs to be configure
7254 d for the use with Sync\SpecialChar TeX
7255 .
7256 \begin_inset Foot
7257 status collapsed
7258
7259 \begin_layout Plain Layout
7260 Note that the option 
7261 \begin_inset Flex Code
7262 status collapsed
7263
7264 \begin_layout Plain Layout
7265 -synctex=1
7266 \end_layout
7267
7268 \end_inset
7269
7270  option enables gzip compression.
7271  If your viewer does not support it, you should instead use 
7272 \begin_inset Flex Code
7273 status collapsed
7274
7275 \begin_layout Plain Layout
7276 -synctex=-1
7277 \end_layout
7278
7279 \end_inset
7280
7281 .
7282 \end_layout
7283
7284 \end_inset
7285
7286
7287 \end_layout
7288
7289 \begin_layout Subsection
7290 Configuring and using specific viewers
7291 \begin_inset CommandInset label
7292 LatexCommand label
7293 name "subsec:configuring-viewers"
7294
7295 \end_inset
7296
7297
7298 \end_layout
7299
7300 \begin_layout Subsubsection*
7301 Xdvi (all platforms)
7302 \end_layout
7303
7304 \begin_layout Standard
7305 If you use 
7306 \begin_inset Flex Code
7307 status collapsed
7308
7309 \begin_layout Plain Layout
7310 xdvi
7311 \end_layout
7312
7313 \end_inset
7314
7315 , you don't need to do anything else for performing a reverse DVI search,
7316  as \SpecialChar LyX
7317  already provides the necessary hooks for automatically using the 
7318 \begin_inset Flex Code
7319 status collapsed
7320
7321 \begin_layout Plain Layout
7322 lyxclient
7323 \end_layout
7324
7325 \end_inset
7326
7327  program.
7328  Just setup your document as described above (reverse search is triggered
7329  by Ctrl-click or Alt-click on Mac OSX, respectively).
7330 \end_layout
7331
7332 \begin_layout Standard
7333 However, if for whatever reason you want to use the named pipe instead of
7334  the socket for communicating with \SpecialChar LyX
7335 , simply change the DVI viewer in 
7336 \begin_inset Flex Noun
7337 status collapsed
7338
7339 \begin_layout Plain Layout
7340 Preferences\SpecialChar menuseparator
7341 File Handling\SpecialChar menuseparator
7342 File formats
7343 \end_layout
7344
7345 \end_inset
7346
7347  to
7348 \begin_inset Foot
7349 status collapsed
7350
7351 \begin_layout Plain Layout
7352 On Mac OSX you have to use 
7353 \begin_inset Flex Code
7354 status collapsed
7355
7356 \begin_layout Plain Layout
7357 DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l"
7358 \end_layout
7359
7360 \end_inset
7361
7362
7363 \end_layout
7364
7365 \end_inset
7366
7367  
7368 \begin_inset Flex Code
7369 status collapsed
7370
7371 \begin_layout Plain Layout
7372 xdvi -editor "lyxeditor.sh %f %l"
7373 \end_layout
7374
7375 \end_inset
7376
7377 , where 
7378 \begin_inset Flex Code
7379 status collapsed
7380
7381 \begin_layout Plain Layout
7382 lyxeditor.sh
7383 \end_layout
7384
7385 \end_inset
7386
7387  is a suitable script.
7388  For example, a minimal shell script is the following one:
7389 \end_layout
7390
7391 \begin_layout LyX-Code
7392 #!/bin/sh
7393 \begin_inset Newline newline
7394 \end_inset
7395
7396 LYXPIPE="/path/to/lyxpipe"
7397 \begin_inset Newline newline
7398 \end_inset
7399
7400 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
7401 \begin_inset Newline newline
7402 \end_inset
7403
7404 echo "$COMMAND" > "${LYXPIPE}".in || exit
7405 \begin_inset Newline newline
7406 \end_inset
7407
7408 read TMP < "${LYXPIPE}".out || exit
7409 \end_layout
7410
7411 \begin_layout Standard
7412 where 
7413 \begin_inset Flex Code
7414 status collapsed
7415
7416 \begin_layout Plain Layout
7417 /path/to/lyxpipe
7418 \end_layout
7419
7420 \end_inset
7421
7422  is the LyXServer pipe path specified in 
7423 \begin_inset Flex Noun
7424 status collapsed
7425
7426 \begin_layout Plain Layout
7427 Preferences\SpecialChar menuseparator
7428 Paths
7429 \end_layout
7430
7431 \end_inset
7432
7433 .
7434 \begin_inset Foot
7435 status collapsed
7436
7437 \begin_layout Plain Layout
7438 In the 
7439 \begin_inset Flex Code
7440 status collapsed
7441
7442 \begin_layout Plain Layout
7443 development/tools
7444 \end_layout
7445
7446 \end_inset
7447
7448  folder of a source distribution you can find a 
7449 \begin_inset Flex Code
7450 status collapsed
7451
7452 \begin_layout Plain Layout
7453 lyxeditor
7454 \end_layout
7455
7456 \end_inset
7457
7458  script which is able to locate the 
7459 \emph on
7460 lyxpipe
7461 \emph default
7462  based on your preferences.
7463 \end_layout
7464
7465 \end_inset
7466
7467
7468 \end_layout
7469
7470 \begin_layout Subsubsection*
7471 MacDviX (Mac OSX)
7472 \end_layout
7473
7474 \begin_layout Standard
7475 At the end of 
7476 \begin_inset Flex Code
7477 status collapsed
7478
7479 \begin_layout Plain Layout
7480 /Applications/MacDviX_Folder/calleditor.script
7481 \end_layout
7482
7483 \end_inset
7484
7485 , add the following lines:
7486 \end_layout
7487
7488 \begin_layout LyX-Code
7489 /Applications/LyX.app/Contents/MacOS/lyxeditor "$2" $1
7490 \begin_inset Newline newline
7491 \end_inset
7492
7493 exit 1
7494 \end_layout
7495
7496 \begin_layout Standard
7497 Modify the lines accordingly if you install \SpecialChar LyX
7498  somewhere else than in the
7499  Applications folder.
7500 \end_layout
7501
7502 \begin_layout Standard
7503 Reverse search is triggered by Alt-click (OPTION-click).
7504 \end_layout
7505
7506 \begin_layout Subsubsection*
7507 Skim (Mac OSX)
7508 \end_layout
7509
7510 \begin_layout Standard
7511 Enter 
7512 \begin_inset Flex Code
7513 status collapsed
7514
7515 \begin_layout Plain Layout
7516 open -a Skim.app $$i
7517 \end_layout
7518
7519 \end_inset
7520
7521  to the viewer setting in 
7522 \begin_inset Flex Noun
7523 status collapsed
7524
7525 \begin_layout Plain Layout
7526 Preferences\SpecialChar menuseparator
7527 File Handling\SpecialChar menuseparator
7528 File formats\SpecialChar menuseparator
7529 PDF (pdflatex)
7530 \end_layout
7531
7532 \end_inset
7533
7534 , and then in 
7535 \begin_inset Flex Noun
7536 status collapsed
7537
7538 \begin_layout Plain Layout
7539 Skim\SpecialChar menuseparator
7540 Preferences\SpecialChar menuseparator
7541 Sync
7542 \end_layout
7543
7544 \end_inset
7545
7546  choose 
7547 \begin_inset Flex Noun
7548 status collapsed
7549
7550 \begin_layout Plain Layout
7551 custom
7552 \end_layout
7553
7554 \end_inset
7555
7556  preset and enter command 
7557 \begin_inset Flex Noun
7558 status collapsed
7559
7560 \begin_layout Plain Layout
7561 /Applications/\SpecialChar LyX
7562 .app/Contents/MacOS/lyxeditor
7563 \end_layout
7564
7565 \end_inset
7566
7567 .
7568 \end_layout
7569
7570 \begin_layout Standard
7571 Reverse search is triggered by COMMAND-SHIFT-click
7572 \end_layout
7573
7574 \begin_layout Subsubsection*
7575 Okular (KDE)
7576 \end_layout
7577
7578 \begin_layout Standard
7579 Go to 
7580 \begin_inset Flex Noun
7581 status collapsed
7582
7583 \begin_layout Plain Layout
7584 Settings\SpecialChar menuseparator
7585 Configure Okular\SpecialChar menuseparator
7586 Editor
7587 \end_layout
7588
7589 \end_inset
7590
7591 , select 
7592 \begin_inset Quotes eld
7593 \end_inset
7594
7595 Custom Text Editor
7596 \begin_inset Quotes erd
7597 \end_inset
7598
7599  and add the command 
7600 \begin_inset Flex Code
7601 status collapsed
7602
7603 \begin_layout Plain Layout
7604 lyxclient -g %f %l
7605 \end_layout
7606
7607 \end_inset
7608
7609 .
7610 \end_layout
7611
7612 \begin_layout Standard
7613 Reverse search is triggered by SHIFT-click.
7614 \end_layout
7615
7616 \begin_layout Subsubsection*
7617 Qpdfview (Unix)
7618 \end_layout
7619
7620 \begin_layout Standard
7621 Qpdfview supports Sync\SpecialChar TeX
7622  since version 0.3.5.
7623  Go to 
7624 \begin_inset Flex Noun
7625 status collapsed
7626
7627 \begin_layout Plain Layout
7628 Edit\SpecialChar menuseparator
7629 Settings\SpecialChar menuseparator
7630 Behavior
7631 \end_layout
7632
7633 \end_inset
7634
7635 , click on the input field of the 
7636 \begin_inset Quotes eld
7637 \end_inset
7638
7639 Source editor
7640 \begin_inset Quotes erd
7641 \end_inset
7642
7643  item and add the command 
7644 \begin_inset Flex Code
7645 status collapsed
7646
7647 \begin_layout Plain Layout
7648 lyxclient -g %1 %2
7649 \end_layout
7650
7651 \end_inset
7652
7653 .
7654 \end_layout
7655
7656 \begin_layout Standard
7657 Reverse search is triggered by double-click or, in more recent versions,
7658  by context menu.
7659 \end_layout
7660
7661 \begin_layout Subsubsection*
7662 YAP (Windows)
7663 \end_layout
7664
7665 \begin_layout Standard
7666 Launch yap, choose its 
7667 \begin_inset Flex Noun
7668 status collapsed
7669
7670 \begin_layout Plain Layout
7671 View\SpecialChar menuseparator
7672 Options
7673 \end_layout
7674
7675 \end_inset
7676
7677  menu and select the 
7678 \begin_inset Quotes eld
7679 \end_inset
7680
7681 Inverse DVI Search
7682 \begin_inset Quotes erd
7683 \end_inset
7684
7685  tab.
7686  Click on the 
7687 \begin_inset Quotes eld
7688 \end_inset
7689
7690 New\SpecialChar ldots
7691
7692 \begin_inset Quotes erd
7693 \end_inset
7694
7695  button and, in the window that opens, enter 
7696 \begin_inset Quotes eld
7697 \end_inset
7698
7699 \SpecialChar LyX
7700  Editor
7701 \begin_inset Quotes erd
7702 \end_inset
7703
7704  (or any other name you like) in the 
7705 \begin_inset Quotes eld
7706 \end_inset
7707
7708 Name:
7709 \begin_inset Quotes erd
7710 \end_inset
7711
7712  field.
7713  Now click on the button labeled 
7714 \begin_inset Quotes eld
7715 \end_inset
7716
7717 \SpecialChar ldots
7718
7719 \begin_inset Quotes erd
7720 \end_inset
7721
7722  to open a file dialog and navigate to the directory containing the batch
7723  file 
7724 \begin_inset Flex Code
7725 status collapsed
7726
7727 \begin_layout Plain Layout
7728 lyxeditor.bat
7729 \end_layout
7730
7731 \end_inset
7732
7733  (see below).
7734  Select 
7735 \begin_inset Flex Code
7736 status collapsed
7737
7738 \begin_layout Plain Layout
7739 lyxeditor.bat
7740 \end_layout
7741
7742 \end_inset
7743
7744  and then specify the program arguments as 
7745 \begin_inset Flex Code
7746 status collapsed
7747
7748 \begin_layout Plain Layout
7749 %f %l
7750 \end_layout
7751
7752 \end_inset
7753
7754 .
7755  The 
7756 \begin_inset Flex Code
7757 status collapsed
7758
7759 \begin_layout Plain Layout
7760 lyxeditor.bat
7761 \end_layout
7762
7763 \end_inset
7764
7765  wrapper is used for communicating with \SpecialChar LyX
7766  through the 
7767 \emph on
7768 lyxpipe
7769 \emph default
7770  and is as follows:
7771 \end_layout
7772
7773 \begin_layout LyX-Code
7774 @echo off
7775 \begin_inset Newline newline
7776 \end_inset
7777
7778 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
7779 \backslash
7780
7781 \backslash
7782 .
7783 \backslash
7784 pipe
7785 \backslash
7786 lyxpipe.in
7787 \begin_inset Newline newline
7788 \end_inset
7789
7790 type 
7791 \backslash
7792
7793 \backslash
7794 .
7795 \backslash
7796 pipe
7797 \backslash
7798 lyxpipe.out
7799 \end_layout
7800
7801 \begin_layout Standard
7802 Make sure that the \SpecialChar LyX
7803 Server pipe path you specified in \SpecialChar LyX
7804  is 
7805 \begin_inset Flex Code
7806 status collapsed
7807
7808 \begin_layout Plain Layout
7809
7810 \backslash
7811
7812 \backslash
7813 .
7814 \backslash
7815 pipe
7816 \backslash
7817 lyxpipe
7818 \end_layout
7819
7820 \end_inset
7821
7822 , otherwise change the 
7823 \begin_inset Flex Code
7824 status collapsed
7825
7826 \begin_layout Plain Layout
7827 lyxeditor.bat
7828 \end_layout
7829
7830 \end_inset
7831
7832  wrapper accordingly.
7833 \end_layout
7834
7835 \begin_layout Standard
7836 In yap, reverse search is triggered by double-click.
7837 \end_layout
7838
7839 \begin_layout Subsubsection*
7840 SumatraPDF (Windows)
7841 \end_layout
7842
7843 \begin_layout Standard
7844 In order to use SumatraPDF for inverse search, enter 
7845 \begin_inset Flex Code
7846 status collapsed
7847
7848 \begin_layout Plain Layout
7849 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
7850 \end_layout
7851
7852 \end_inset
7853
7854  in the viewer setting in 
7855 \begin_inset Flex Noun
7856 status collapsed
7857
7858 \begin_layout Plain Layout
7859 Preferences\SpecialChar menuseparator
7860 File Handling\SpecialChar menuseparator
7861 File formats\SpecialChar menuseparator
7862 PDF (pdflatex)
7863 \end_layout
7864
7865 \end_inset
7866
7867 , where 
7868 \begin_inset Flex Code
7869 status collapsed
7870
7871 \begin_layout Plain Layout
7872 lyxeditor.bat
7873 \end_layout
7874
7875 \end_inset
7876
7877  is the previous wrapper.
7878  If SumatraPDF.exe is not in your command PATH, use its full file name.
7879 \end_layout
7880
7881 \begin_layout Standard
7882 Reverse search is triggered by double-click.
7883 \end_layout
7884
7885 \begin_layout Subsubsection*
7886 YAP (Cygwin)
7887 \end_layout
7888
7889 \begin_layout Standard
7890 First of all, make sure that yap is your default DVI viewer in the Windows
7891  environment, then launch it, choose its 
7892 \begin_inset Flex Noun
7893 status collapsed
7894
7895 \begin_layout Plain Layout
7896 View\SpecialChar menuseparator
7897 Options
7898 \end_layout
7899
7900 \end_inset
7901
7902  menu and select the 
7903 \begin_inset Quotes eld
7904 \end_inset
7905
7906 Inverse DVI Search
7907 \begin_inset Quotes erd
7908 \end_inset
7909
7910  tab.
7911  Click on the 
7912 \begin_inset Quotes eld
7913 \end_inset
7914
7915 New\SpecialChar ldots
7916
7917 \begin_inset Quotes erd
7918 \end_inset
7919
7920  button and, in the window that opens, enter 
7921 \begin_inset Quotes eld
7922 \end_inset
7923
7924 \SpecialChar LyX
7925  Editor
7926 \begin_inset Quotes erd
7927 \end_inset
7928
7929  (or any other name you like) in the 
7930 \begin_inset Quotes eld
7931 \end_inset
7932
7933 Name:
7934 \begin_inset Quotes erd
7935 \end_inset
7936
7937  field.
7938  Now click on the button labeled 
7939 \begin_inset Quotes eld
7940 \end_inset
7941
7942 \SpecialChar ldots
7943
7944 \begin_inset Quotes erd
7945 \end_inset
7946
7947  to open a file dialog and navigate to the directory containing the 
7948 \begin_inset Flex Code
7949 status collapsed
7950
7951 \begin_layout Plain Layout
7952 lyxeditor.exe
7953 \end_layout
7954
7955 \end_inset
7956
7957  program (which is installed by default on Cygwin along with the \SpecialChar LyX
7958  executable).
7959  Select 
7960 \begin_inset Flex Code
7961 status collapsed
7962
7963 \begin_layout Plain Layout
7964 lyxeditor.exe
7965 \end_layout
7966
7967 \end_inset
7968
7969  and then specify the program arguments as 
7970 \begin_inset Flex Code
7971 status collapsed
7972
7973 \begin_layout Plain Layout
7974 -g %f %l
7975 \end_layout
7976
7977 \end_inset
7978
7979 .
7980  In this way, you will be using the 
7981 \emph on
7982 lyxsocket
7983 \emph default
7984  for communicating with \SpecialChar LyX
7985 .
7986  If, for whatever reason, you want to use the 
7987 \emph on
7988 lyxpipe
7989 \emph default
7990 , omit the 
7991 \begin_inset Flex Code
7992 status collapsed
7993
7994 \begin_layout Plain Layout
7995 -g
7996 \end_layout
7997
7998 \end_inset
7999
8000  option and be sure to specify the \SpecialChar LyX
8001 Server pipe path in the \SpecialChar LyX
8002  preferences.
8003 \end_layout
8004
8005 \begin_layout Standard
8006 In yap, reverse search is triggered by double-click.
8007 \end_layout
8008
8009 \begin_layout Subsubsection*
8010 SumatraPDF (Cygwin)
8011 \end_layout
8012
8013 \begin_layout Standard
8014 In order to use SumatraPDF for inverse search, enter 
8015 \begin_inset Flex Code
8016 status collapsed
8017
8018 \begin_layout Plain Layout
8019 SumatraPDF -inverse-search "lyxeditor -g %f %l"
8020 \end_layout
8021
8022 \end_inset
8023
8024  in the viewer setting in 
8025 \begin_inset Flex Noun
8026 status collapsed
8027
8028 \begin_layout Plain Layout
8029 Preferences\SpecialChar menuseparator
8030 File Handling\SpecialChar menuseparator
8031 File formats\SpecialChar menuseparator
8032 PDF (pdflatex)
8033 \end_layout
8034
8035 \end_inset
8036
8037 .
8038  If SumatraPDF.exe is not in your command PATH, use its full posix path.
8039  The 
8040 \begin_inset Flex Code
8041 status collapsed
8042
8043 \begin_layout Plain Layout
8044 -g
8045 \end_layout
8046
8047 \end_inset
8048
8049  enables communication via the 
8050 \emph on
8051 lyxsocket
8052 \emph default
8053 .
8054  Again, omit the 
8055 \begin_inset Flex Code
8056 status collapsed
8057
8058 \begin_layout Plain Layout
8059 -g
8060 \end_layout
8061
8062 \end_inset
8063
8064  option if you want to use the 
8065 \emph on
8066 lyxpipe
8067 \emph default
8068 , and be sure to specify the \SpecialChar LyX
8069 Server pipe path in the \SpecialChar LyX
8070  preferences.
8071 \end_layout
8072
8073 \begin_layout Standard
8074 Reverse search is triggered by double-click.
8075 \end_layout
8076
8077 \begin_layout Section
8078 Forward search
8079 \end_layout
8080
8081 \begin_layout Standard
8082 Forward search is, as the name implies, in a sense the 
8083 \begin_inset Quotes eld
8084 \end_inset
8085
8086 opposite
8087 \begin_inset Quotes erd
8088 \end_inset
8089
8090  of reverse search.
8091  It allows you to let the viewer jump to a given position from within \SpecialChar LyX
8092 .
8093  If forward search is set up (as described in what follows), you can put
8094  the cursor anywhere in your \SpecialChar LyX
8095  document, and hit 
8096 \begin_inset Flex Noun
8097 status collapsed
8098
8099 \begin_layout Plain Layout
8100 Navigate\SpecialChar menuseparator
8101 Forward search
8102 \end_layout
8103
8104 \end_inset
8105
8106  (or select 
8107 \begin_inset Flex Noun
8108 status collapsed
8109
8110 \begin_layout Plain Layout
8111 Forward search
8112 \end_layout
8113
8114 \end_inset
8115
8116  in the context menu via right mouse click), and then the viewer will jump
8117  to that position as well.
8118  This implies, of course, that your viewer supports this function.
8119 \end_layout
8120
8121 \begin_layout Standard
8122 To make forward search possible, you first need to provide the generated
8123  output PDF/DVI file with additional information about the \SpecialChar TeX
8124  sources.
8125  This can be done via the methods described in the section 
8126 \begin_inset CommandInset ref
8127 LatexCommand ref
8128 reference "subsec:rev-search"
8129
8130 \end_inset
8131
8132 .
8133 \end_layout
8134
8135 \begin_layout Standard
8136 Additionally, you need to configure \SpecialChar LyX
8137  for using your viewers in 
8138 \begin_inset Flex Noun
8139 status collapsed
8140
8141 \begin_layout Plain Layout
8142 Tools\SpecialChar menuseparator
8143 Preferences\SpecialChar menuseparator
8144 Output\SpecialChar menuseparator
8145 General
8146 \end_layout
8147
8148 \end_inset
8149
8150 .
8151  We provide a range of tested configurations for some viewers, which you
8152  can select from the drop down list.
8153  If none of these configurations suits you, you have to find out and enter
8154  a suitable configuration yourself.
8155  The definition syntax uses the following placeholders:
8156 \end_layout
8157
8158 \begin_layout Itemize
8159 \noindent
8160 \begin_inset Flex Code
8161 status collapsed
8162
8163 \begin_layout Plain Layout
8164 $$n
8165 \end_layout
8166
8167 \end_inset
8168
8169 : row number
8170 \end_layout
8171
8172 \begin_layout Itemize
8173 \noindent
8174 \begin_inset Flex Code
8175 status collapsed
8176
8177 \begin_layout Plain Layout
8178 $$t
8179 \end_layout
8180
8181 \end_inset
8182
8183 : name of the (temporary) exported .tex file (without path)
8184 \end_layout
8185
8186 \begin_layout Itemize
8187 \noindent
8188 \begin_inset Flex Code
8189 status collapsed
8190
8191 \begin_layout Plain Layout
8192 $$f
8193 \end_layout
8194
8195 \end_inset
8196
8197 : name of the (temporary) exported .tex file (including path)
8198 \end_layout
8199
8200 \begin_layout Itemize
8201 \noindent
8202 \begin_inset Flex Code
8203 status collapsed
8204
8205 \begin_layout Plain Layout
8206 $$o
8207 \end_layout
8208
8209 \end_inset
8210
8211 : name of the exported output file (either dvi or pdf, depending on which
8212  one exists in the temporary directory)
8213 \end_layout
8214
8215 \begin_layout Standard
8216 Note that only some of the viewers provide full forward search functionality,
8217  among them yap, xdvi, okular
8218 \begin_inset Foot
8219 status collapsed
8220
8221 \begin_layout Plain Layout
8222 You might want to set 
8223 \begin_inset Flex Code
8224 status collapsed
8225
8226 \begin_layout Plain Layout
8227 okular –unique
8228 \end_layout
8229
8230 \end_inset
8231
8232  in 
8233 \begin_inset Flex Noun
8234 status collapsed
8235
8236 \begin_layout Plain Layout
8237 Tools\SpecialChar menuseparator
8238 Preferences\SpecialChar menuseparator
8239 File Handling\SpecialChar menuseparator
8240 File
8241 \begin_inset space ~
8242 \end_inset
8243
8244 Formats
8245 \end_layout
8246
8247 \end_inset
8248
8249
8250 \end_layout
8251
8252 \end_inset
8253
8254 , qpdfview and SumatraPDF
8255 \begin_inset Foot
8256 status collapsed
8257
8258 \begin_layout Plain Layout
8259 SumatraPDF can also use DDE commands through the external program CMCDDE
8260  — downloadable from 
8261 \begin_inset CommandInset href
8262 LatexCommand href
8263 target "http://www.istri.fr/spip/zip/CMCDDE.zip"
8264 literal "false"
8265
8266 \end_inset
8267
8268
8269 \end_layout
8270
8271 \end_inset
8272
8273 .
8274  While many of the widespread PDF viewers (most notably Adobe Reader) do
8275  not support forward search at all, some other viewers – e.
8276 \begin_inset space \thinspace{}
8277 \end_inset
8278
8279 g.
8280  evince and xpdf – allow at least to reload the document and jump to a specific
8281  page of the file, so you can at least navigate 
8282 \begin_inset Quotes eld
8283 \end_inset
8284
8285 near
8286 \begin_inset Quotes erd
8287 \end_inset
8288
8289 .
8290  This latter functionality is provided by an external call of synctex (see
8291  the predefined example configurations).
8292  
8293 \end_layout
8294
8295 \begin_layout Standard
8296 Forward search works both with DVI and PDF output.
8297  \SpecialChar LyX
8298  simply checks which preview format you have used before (i.
8299 \begin_inset space \thinspace{}
8300 \end_inset
8301
8302 e., which format is already there in the temporary directory) and chooses
8303  the appropriate configuration for the respective format.
8304 \end_layout
8305
8306 \begin_layout Chapter
8307 Special Document Classes
8308 \end_layout
8309
8310 \begin_layout Section
8311 A&A Paper
8312 \end_layout
8313
8314 \begin_layout Standard
8315 by 
8316 \noun on
8317 Peter Sütterlin
8318 \end_layout
8319
8320 \begin_layout Subsection
8321 Introduction
8322 \end_layout
8323
8324 \begin_layout Standard
8325 This section describes how \SpecialChar LyX
8326  can be used to write articles for submission
8327  to the scientific journal 
8328 \emph on
8329 Astronomy and Astrophysics
8330 \emph default
8331  (
8332 \begin_inset Flex URL
8333 status collapsed
8334
8335 \begin_layout Plain Layout
8336
8337 http://www.edpsciences.fr/aa/
8338 \end_layout
8339
8340 \end_inset
8341
8342 ) using Version 5.01 of the document class 
8343 \family typewriter
8344 aa.cls
8345 \family default
8346 .
8347  This package can be downloaded from the ftp site
8348 \end_layout
8349
8350 \begin_layout Standard
8351 \begin_inset VSpace medskip
8352 \end_inset
8353
8354
8355 \end_layout
8356
8357 \begin_layout Standard
8358 \align center
8359 \begin_inset Flex URL
8360 status collapsed
8361
8362 \begin_layout Plain Layout
8363
8364 ftp://ftp.edpsciences.org/pub/aa/readme.html
8365 \end_layout
8366
8367 \end_inset
8368
8369
8370 \end_layout
8371
8372 \begin_layout Standard
8373 \begin_inset VSpace medskip
8374 \end_inset
8375
8376
8377 \end_layout
8378
8379 \begin_layout Standard
8380 A manual comes together with that package, and this text is not meant to
8381  replace the original manual but is merely a short guide in how to realize
8382  the correct form of your paper.
8383  
8384 \end_layout
8385
8386 \begin_layout Standard
8387 Please note that the publisher of the journal was changed from Springer
8388  to EDP Sciences starting January 1, 2001.
8389  That change involved also some slight changes to the style files, namely
8390  the removal of the thesaurus command.
8391  The \SpecialChar LyX
8392  class aa supports the newest version of these style files, V 5.01.
8393  If you have an older version installed, please upgrade.
8394  For compatibility, the old (version 4) layout has been kept as 
8395 \family sans
8396 article (A&A V4)
8397 \family default
8398 .
8399  Please refer to the comments in 
8400 \family typewriter
8401 \SpecialChar LyX
8402 Dir/layouts/aapaper.layout
8403 \family default
8404 .
8405 \end_layout
8406
8407 \begin_layout Subsection
8408 Getting started
8409 \end_layout
8410
8411 \begin_layout Standard
8412 It is recommended you start from the example template distributed with \SpecialChar LyX
8413 .
8414  If you are not using a template, note the following settings:
8415 \end_layout
8416
8417 \begin_layout Itemize
8418 Select 
8419 \family sans
8420 article (A&A)
8421 \family default
8422  in the 
8423 \family sans
8424 Document\SpecialChar menuseparator
8425 Settings
8426 \family default
8427  dialog (OK, that one was obvious).
8428 \end_layout
8429
8430 \begin_layout Itemize
8431 Don't change the option 
8432 \family sans
8433 Page
8434 \begin_inset space ~
8435 \end_inset
8436
8437 style
8438 \family default
8439 : Leave it set to 
8440 \family sans
8441 default
8442 \family default
8443 .
8444  The whole layout is done by the macros, you shouldn't change anything.
8445 \end_layout
8446
8447 \begin_layout Subsection
8448 The header block
8449 \end_layout
8450
8451 \begin_layout Standard
8452 First thing to enter is the header information.
8453  It consists of seven entries, of which some are optional.
8454  They are
8455 \end_layout
8456
8457 \begin_layout Itemize
8458
8459 \family sans
8460 Title
8461 \family default
8462 : [required] 
8463 \end_layout
8464
8465 \begin_layout Itemize
8466
8467 \family sans
8468 Subtitle
8469 \family default
8470 : [optional] 
8471 \end_layout
8472
8473 \begin_layout Itemize
8474
8475 \family sans
8476 Author
8477 \family default
8478 : [required]
8479 \end_layout
8480
8481 \begin_layout Itemize
8482
8483 \family sans
8484 Address
8485 \family default
8486 : [required]
8487 \end_layout
8488
8489 \begin_layout Itemize
8490
8491 \family sans
8492 Offprints
8493 \family default
8494 : [optional] if more than one author: whom to contact for offprint requests.
8495 \end_layout
8496
8497 \begin_layout Itemize
8498
8499 \family sans
8500 Mail
8501 \family default
8502 : [optional] mail address for contacts.
8503 \end_layout
8504
8505 \begin_layout Itemize
8506
8507 \family sans
8508 Date
8509 \family default
8510 : [required].
8511  Suggested format is 
8512 \family typewriter
8513 Received: <date>; Accepted <date> 
8514 \end_layout
8515
8516 \begin_layout Standard
8517 There is no need to issue the 
8518 \family typewriter
8519
8520 \backslash
8521 maketitle
8522 \family default
8523  command, this is done automatically by \SpecialChar LyX
8524  when the header is finished.
8525  Although the order of the single header entries doesn't matter it is advised
8526  to keep the above sequence, just to get the best optics and meets the layout
8527  of the real document.
8528 \end_layout
8529
8530 \begin_layout Standard
8531 If you want to place footnotes in the header block, e.
8532 \begin_inset space \thinspace{}
8533 \end_inset
8534
8535 g.
8536 \begin_inset space \space{}
8537 \end_inset
8538
8539 to state your present address, just use the standard footnote via the menu
8540  
8541 \family sans
8542 Insert\SpecialChar menuseparator
8543 Footnote.
8544
8545 \family default
8546  \SpecialChar LyX
8547  will automagically use the term 
8548 \family typewriter
8549
8550 \backslash
8551 thanks{}
8552 \family default
8553  in that case.
8554 \end_layout
8555
8556 \begin_layout Standard
8557 In addition to these topics, the macros use three additional \SpecialChar LaTeX
8558  commands that
8559  have no counterpart in \SpecialChar LyX
8560 :
8561 \end_layout
8562
8563 \begin_layout Itemize
8564
8565 \family typewriter
8566
8567 \backslash
8568 and
8569 \family default
8570  to separate different names for more than one author and institute, respectivel
8571 y.
8572 \end_layout
8573
8574 \begin_layout Itemize
8575
8576 \family typewriter
8577
8578 \backslash
8579 inst{<nr>}
8580 \family default
8581 to mark corresponding author/institute pairs.
8582  The institutes are numbered sequentially as they appear in the 
8583 \family sans
8584 Address
8585 \family default
8586  field, so you have to put a marker to each author.
8587 \end_layout
8588
8589 \begin_layout Itemize
8590
8591 \family typewriter
8592
8593 \backslash
8594 email{address}
8595 \family default
8596  to supply an email address for fast contact.
8597 \end_layout
8598
8599 \begin_layout Standard
8600 In all cases, the appropriate command has to be entered in \SpecialChar LyX
8601  and marked as
8602  \SpecialChar LaTeX
8603  code.
8604  See the examples.
8605  
8606 \end_layout
8607
8608 \begin_layout Subsection
8609 The abstract
8610 \end_layout
8611
8612 \begin_layout Standard
8613 The abstract should immediately follow the header block.
8614  With version 5 the abstract environment was changed to a command, and there
8615  is now a resctriction to only one paragraph.
8616  In addition, it should contain an entry with the keywords.
8617  This is not yet implemented for \SpecialChar LyX
8618 , therefore you have to enter the \SpecialChar LaTeX
8619  command
8620  
8621 \family typewriter
8622
8623 \backslash
8624 keywords{}
8625 \family default
8626  by hand and mark it as \SpecialChar LaTeX
8627  code.
8628  Refer to the example paper.
8629 \end_layout
8630
8631 \begin_layout Subsection
8632 Supported environments
8633 \end_layout
8634
8635 \begin_layout Standard
8636 The A&A paper layout supports the following environments for structuring
8637  your text:
8638 \end_layout
8639
8640 \begin_layout Itemize
8641
8642 \family sans
8643 Standard
8644 \end_layout
8645
8646 \begin_layout Itemize
8647
8648 \family sans
8649 Section
8650 \end_layout
8651
8652 \begin_layout Itemize
8653
8654 \family sans
8655 Subsection
8656 \end_layout
8657
8658 \begin_layout Itemize
8659
8660 \family sans
8661 Subsubsection
8662 \end_layout
8663
8664 \begin_layout Itemize
8665
8666 \family sans
8667 Itemize
8668 \end_layout
8669
8670 \begin_layout Itemize
8671
8672 \family sans
8673 Enumerate
8674 \end_layout
8675
8676 \begin_layout Itemize
8677
8678 \family sans
8679 Description
8680 \end_layout
8681
8682 \begin_layout Itemize
8683
8684 \family sans
8685 Caption
8686 \end_layout
8687
8688 \begin_layout Itemize
8689
8690 \family sans
8691 Abstract
8692 \end_layout
8693
8694 \begin_layout Itemize
8695
8696 \family sans
8697 Acknowledgment
8698 \end_layout
8699
8700 \begin_layout Itemize
8701
8702 \family sans
8703 Bibliography
8704 \end_layout
8705
8706 \begin_layout Itemize
8707
8708 \family sans
8709 \SpecialChar LaTeX
8710
8711 \end_layout
8712
8713 \begin_layout Subsection
8714 Commands not supported by \SpecialChar LyX
8715
8716 \end_layout
8717
8718 \begin_layout Standard
8719 Some commands are not yet supported by the 
8720 \family sans
8721 paper (A&A)
8722 \family default
8723  layout for \SpecialChar LyX
8724 .
8725  Some have already been mentioned.
8726  For the sake of completeness, they are listed all together here:
8727 \end_layout
8728
8729 \begin_layout Itemize
8730
8731 \family typewriter
8732
8733 \backslash
8734 and
8735 \end_layout
8736
8737 \begin_layout Itemize
8738
8739 \family typewriter
8740
8741 \backslash
8742 email
8743 \end_layout
8744
8745 \begin_layout Itemize
8746
8747 \family typewriter
8748
8749 \backslash
8750 appendix
8751 \end_layout
8752
8753 \begin_layout Itemize
8754
8755 \family typewriter
8756
8757 \backslash
8758 authorrunning
8759 \end_layout
8760
8761 \begin_layout Itemize
8762
8763 \family typewriter
8764
8765 \backslash
8766 inst{}
8767 \end_layout
8768
8769 \begin_layout Itemize
8770
8771 \family typewriter
8772
8773 \backslash
8774 keywords{}
8775 \end_layout
8776
8777 \begin_layout Itemize
8778
8779 \family typewriter
8780
8781 \backslash
8782 object{}
8783 \end_layout
8784
8785 \begin_layout Itemize
8786
8787 \family typewriter
8788
8789 \backslash
8790 titlerunning{}
8791 \end_layout
8792
8793 \begin_layout Standard
8794 If you want to use any of these commands, you have to enter them yourself.
8795  
8796 \series bold
8797 Do not forget to mark them as \SpecialChar LaTeX
8798  code!
8799 \end_layout
8800
8801 \begin_layout Subsection
8802 Figure and Table Floats
8803 \end_layout
8804
8805 \begin_layout Standard
8806 \SpecialChar LyX
8807  provides support for the necessary float environments 
8808 \family sans
8809 figure, figure*, table
8810 \family default
8811  and 
8812 \family sans
8813 table*
8814 \family default
8815 , therefore we won't tell much about it here.
8816  Refer to the 
8817 \emph on
8818 User's
8819 \begin_inset space ~
8820 \end_inset
8821
8822 Guide
8823 \emph default
8824 .
8825  Just remember that tables should be left-aligned.
8826  For that, select the table and change the alignment in 
8827 \family sans
8828 Edit\SpecialChar menuseparator
8829 Paragraph
8830 \begin_inset space ~
8831 \end_inset
8832
8833 Settings.
8834 \end_layout
8835
8836 \begin_layout Standard
8837 There is only one special thing: the figures with caption besides the figure.
8838  To create such a figure, you have to do the following:
8839 \end_layout
8840
8841 \begin_layout Enumerate
8842 Create a wide figure float: 
8843 \family sans
8844 Insert\SpecialChar menuseparator
8845 Float\SpecialChar menuseparator
8846 Figure
8847 \family default
8848 , then right click in the figure and select 
8849 \family sans
8850 Span
8851 \begin_inset space ~
8852 \end_inset
8853
8854 columns
8855 \family default
8856 .
8857 \end_layout
8858
8859 \begin_layout Enumerate
8860 Enter your caption text.
8861 \end_layout
8862
8863 \begin_layout Enumerate
8864 Press 
8865 \family sans
8866 Return
8867 \family default
8868  to move the cursor above the caption.
8869 \end_layout
8870
8871 \begin_layout Enumerate
8872 Insert your figure
8873 \end_layout
8874
8875 \begin_layout Enumerate
8876 Position the cursor behind the figure and insert a horizontal fill: 
8877 \family sans
8878 Insert\SpecialChar menuseparator
8879 Special
8880 \begin_inset space ~
8881 \end_inset
8882
8883 Character\SpecialChar menuseparator
8884 Horizontal
8885 \begin_inset space ~
8886 \end_inset
8887
8888 Fill
8889 \family default
8890 .
8891 \end_layout
8892
8893 \begin_layout Enumerate
8894 Switch to \SpecialChar LaTeX
8895  mode: 
8896 \family sans
8897 M-c
8898 \begin_inset space ~
8899 \end_inset
8900
8901 t
8902 \family default
8903 .
8904 \end_layout
8905
8906 \begin_layout Enumerate
8907 Enter 
8908 \family typewriter
8909
8910 \backslash
8911 parbox[b]{55mm}{
8912 \family default
8913 .
8914  
8915 \series bold
8916 Do not close the brace!
8917 \end_layout
8918
8919 \begin_layout Enumerate
8920 Position the cursor behind the caption text, switch to \SpecialChar LaTeX
8921  mode and insert
8922  the closing brace: 
8923 \family sans
8924 M-c
8925 \begin_inset space ~
8926 \end_inset
8927
8928 t
8929 \family default
8930  
8931 \family typewriter
8932 }
8933 \family default
8934 .
8935 \end_layout
8936
8937 \begin_layout Standard
8938 Also, refer to the figures in the example paper.
8939 \end_layout
8940
8941 \begin_layout Subsection
8942 Referee layout
8943 \end_layout
8944
8945 \begin_layout Standard
8946 For submission, the paper has to be formated in a special double-spacing
8947  layout.
8948  For this purpose, you have to give the option 
8949 \family typewriter
8950 referee
8951 \family default
8952  to the documentclass.
8953  This must be done using the extra class options field in the 
8954 \family sans
8955 Document\SpecialChar menuseparator
8956 Settings
8957 \family default
8958  dialog.
8959  Just enter the string 
8960 \family typewriter
8961 referee
8962 \family default
8963  there.
8964 \end_layout
8965
8966 \begin_layout Subsection
8967 The example paper
8968 \end_layout
8969
8970 \begin_layout Standard
8971 The 
8972 \family sans
8973 Examples
8974 \family default
8975  directory contains an example paper written with \SpecialChar LyX
8976 .
8977  It is the example paper from the original macro package, translated to
8978  \SpecialChar LyX
8979 .
8980  Use it for inspiration, and compare the original \SpecialChar LaTeX
8981  code with \SpecialChar LyX
8982  way of writing.
8983 \end_layout
8984
8985 \begin_layout Section
8986 AAS\SpecialChar TeX
8987
8988 \end_layout
8989
8990 \begin_layout Standard
8991 by 
8992 \noun on
8993 Mike Ressler
8994 \end_layout
8995
8996 \begin_layout Subsection
8997 Introduction
8998 \end_layout
8999
9000 \begin_layout Standard
9001 AAS\SpecialChar TeX
9002  is a set of macros produced by the American Astronomical Society to
9003  facilitate electronic manuscript submission to the three journals they
9004  publish: the Astrophysical Journal (including the Letters and Supplement),
9005  the Astronomical Journal, and the Publications of the Astronomical Society
9006  of the Pacific.
9007  \SpecialChar LyX
9008  has proven to be an excellent tool for generating these documents, especially
9009  given its equation, citation, and figure handling capabilities.
9010  \SpecialChar LyX
9011  requires version 5.0 (or higher) of these macros; preferably 5.2, which
9012  is the version described here, or higher.
9013  Versions prior to 5.0 are intended for use with \SpecialChar LaTeX
9014 2.09 and are fundamentally
9015  incompatible with \SpecialChar LyX
9016 .
9017  The AAS\SpecialChar TeX
9018  package may be downloaded from the AAS\SpecialChar TeX
9019  Web site
9020 \end_layout
9021
9022 \begin_layout Standard
9023 \begin_inset VSpace medskip
9024 \end_inset
9025
9026
9027 \end_layout
9028
9029 \begin_layout Standard
9030 \align center
9031 \begin_inset Flex URL
9032 status collapsed
9033
9034 \begin_layout Plain Layout
9035
9036 https://aas.org/aastex/aastex-downloads
9037 \end_layout
9038
9039 \end_inset
9040
9041
9042 \end_layout
9043
9044 \begin_layout Standard
9045 \begin_inset VSpace medskip
9046 \end_inset
9047
9048
9049 \end_layout
9050
9051 \begin_layout Standard
9052 A complete user guide is contained in that package and you should familiarize
9053  yourself with it thoroughly before embarking on writing a paper in \SpecialChar LyX
9054 .
9055  \SpecialChar LyX
9056  will not reduce the need to figure out all the AAS\SpecialChar TeX
9057  commands, it will only
9058  reduce the drudgery of typing everything in.
9059  It is your responsibility to ensure that the final exported \SpecialChar LaTeX
9060  document conforms
9061  completely to the requirements of the journal to which you are submitting
9062  your paper.
9063 \end_layout
9064
9065 \begin_layout Subsection
9066 Starting a New Paper
9067 \end_layout
9068
9069 \begin_layout Standard
9070 I strongly suggest that you start with the AAS\SpecialChar TeX
9071  template file.
9072  Click on 
9073 \family sans
9074 File\SpecialChar menuseparator
9075 New from
9076 \family default
9077  
9078 \family sans
9079 Template
9080 \family default
9081 , enter the new file name, then choose the 
9082 \family typewriter
9083 aastex.lyx
9084 \family default
9085  template.
9086  This will show the most common fields found in a manuscript.
9087  Simply overwrite the existing text (including the brackets, 
9088 \family typewriter
9089 <>
9090 \family default
9091 ) with the correct information.
9092  Many of the AAS\SpecialChar TeX
9093  commands and environments can be implemented directly in
9094  \SpecialChar LyX
9095 , but some cannot: most noticeably 
9096 \family typewriter
9097
9098 \backslash
9099 altaffilmark
9100 \family default
9101  and 
9102 \family typewriter
9103
9104 \backslash
9105 altaffiltext
9106 \family default
9107 , which should stick out like a sore thumb if you actually just opened the
9108  template file.
9109  For commands such as these, the \SpecialChar LaTeX
9110  code must be entered directly and marked
9111  as such.
9112  Such commands are referred to as \SpecialChar TeX
9113  code, or Evil Red Text.
9114  I tried to minimize the amount of \SpecialChar TeX
9115  code needed in an AAS\SpecialChar TeX
9116  document, but
9117  there is still a bit more required than any of us would like.
9118 \end_layout
9119
9120 \begin_layout Subsection
9121 Finishing Your Paper
9122 \end_layout
9123
9124 \begin_layout Standard
9125 When the paper is finished to your satisfaction and previews/prints correctly,
9126  there are a few 
9127 \begin_inset Quotes eld
9128 \end_inset
9129
9130 postprocessing
9131 \begin_inset Quotes erd
9132 \end_inset
9133
9134  actions which need to be done before you submit it to the journals.
9135  
9136 \end_layout
9137
9138 \begin_layout Enumerate
9139 Export your paper as a \SpecialChar LaTeX
9140  file (
9141 \family sans
9142 File\SpecialChar menuseparator
9143 Export\SpecialChar menuseparator
9144 \SpecialChar LaTeX
9145
9146 \family default
9147 ).
9148  
9149 \end_layout
9150
9151 \begin_layout Enumerate
9152 Edit the resulting 
9153 \family typewriter
9154 .tex
9155 \family default
9156  file with your favorite text editor
9157 \end_layout
9158
9159 \begin_deeper
9160 \begin_layout Enumerate
9161 remove the comment lines before the 
9162 \family typewriter
9163
9164 \backslash
9165 documentclass
9166 \family default
9167  command
9168 \end_layout
9169
9170 \begin_layout Enumerate
9171 remove the 
9172 \family typewriter
9173
9174 \backslash
9175 usepackage...{fontenc}
9176 \family default
9177  line if it appears (usually just after 
9178 \family typewriter
9179
9180 \backslash
9181 documentclass
9182 \family default
9183 }; also remove the 
9184 \family typewriter
9185
9186 \backslash
9187 secnumdepth
9188 \family default
9189  line if it appears.
9190 \end_layout
9191
9192 \begin_layout Enumerate
9193 remove everything between (and including) the 
9194 \family typewriter
9195
9196 \backslash
9197 makeatletter
9198 \family default
9199  and 
9200 \family typewriter
9201
9202 \backslash
9203 makeatother
9204 \family default
9205  commands, except for any commands you specifically put into the \SpecialChar LaTeX
9206  preamble
9207  (which should appear immediately after the 
9208 \begin_inset Quotes eld
9209 \end_inset
9210
9211 User specified \SpecialChar LaTeX
9212  commands
9213 \begin_inset Quotes erd
9214 \end_inset
9215
9216  comment in the 
9217 \family typewriter
9218 .tex
9219 \family default
9220  file).
9221 \end_layout
9222
9223 \end_deeper
9224 \begin_layout Enumerate
9225 Run the resulting file through \SpecialChar LaTeX
9226  to make sure it still processes correctly.
9227 \end_layout
9228
9229 \begin_layout Enumerate
9230 Reread the journal requirements to make sure your filenames and formats
9231  are correct.
9232 \end_layout
9233
9234 \begin_layout Enumerate
9235 Submit it.
9236 \end_layout
9237
9238 \begin_layout Subsection
9239 Comments On Specific Commands
9240 \end_layout
9241
9242 \begin_layout Standard
9243 I will not describe the detailed usage of the individual AAS\SpecialChar TeX
9244  commands: the
9245  AAS\SpecialChar TeX
9246  User Guide (
9247 \family typewriter
9248 aasguide.tex
9249 \family default
9250 ) gives a good description of each.
9251  Thus it's probably easiest for me to go down the list as found in the guide
9252  and offer comments where necessary.
9253  So let's begin \SpecialChar ldots
9254
9255 \end_layout
9256
9257 \begin_layout Subsubsection
9258 Things that work as expected
9259 \end_layout
9260
9261 \begin_layout Standard
9262 Because they work as you might expect, I simply list them and the section
9263  they are found in: 
9264 \family typewriter
9265
9266 \backslash
9267 documentclass
9268 \family default
9269  (2.1.1), 
9270 \family typewriter
9271
9272 \backslash
9273 begin{document}
9274 \family default
9275  (2.2), 
9276 \family typewriter
9277
9278 \backslash
9279 title
9280 \family default
9281  (2.3), 
9282 \family typewriter
9283
9284 \backslash
9285 author
9286 \family default
9287  (2.3), 
9288 \family typewriter
9289
9290 \backslash
9291 affil
9292 \family default
9293  (2.3), 
9294 \family typewriter
9295
9296 \backslash
9297 abstract
9298 \family default
9299  (2.4), 
9300 \family typewriter
9301
9302 \backslash
9303 keywords
9304 \family default
9305  (2.5), 
9306 \family typewriter
9307
9308 \backslash
9309 section
9310 \family default
9311  (2.7), 
9312 \family typewriter
9313
9314 \backslash
9315 subsection
9316 \family default
9317  (2.7), 
9318 \family typewriter
9319
9320 \backslash
9321 subsubsection
9322 \family default
9323  (2.7), 
9324 \family typewriter
9325
9326 \backslash
9327 paragraph
9328 \family default
9329  (2.7), 
9330 \family typewriter
9331
9332 \backslash
9333 facility
9334 \family default
9335  (2.10), 
9336 \family typewriter
9337
9338 \backslash
9339 begin{displaymath}
9340 \family default
9341  (2.12), 
9342 \family typewriter
9343
9344 \backslash
9345 begin{equation}
9346 \family default
9347  (2.12), 
9348 \family typewriter
9349
9350 \backslash
9351 begin{eqnarray}
9352 \family default
9353  (2.12), 
9354 \family typewriter
9355
9356 \backslash
9357 begin{mathletters}
9358 \family default
9359  (2.12), 
9360 \family typewriter
9361
9362 \backslash
9363 begin{thebibliography}
9364 \family default
9365  (2.13.1), 
9366 \family typewriter
9367
9368 \backslash
9369 bibitem
9370 \family default
9371  (2.13.2), all the cite commands and their variations (2.13.2), the generic
9372  graphicx figure commands (2.14.1), 
9373 \family typewriter
9374
9375 \backslash
9376 begin{table}
9377 \family default
9378  (2.15.4), 
9379 \family typewriter
9380
9381 \backslash
9382 begin{tabular}
9383 \family default
9384  (2.15.4), 
9385 \family typewriter
9386
9387 \backslash
9388 caption
9389 \family default
9390  (2.15.4), 
9391 \family typewriter
9392
9393 \backslash
9394 label
9395 \family default
9396  (2.15.4, amongst other places), 
9397 \family typewriter
9398
9399 \backslash
9400 tablerefs
9401 \family default
9402  (2.15.5), 
9403 \family typewriter
9404
9405 \backslash
9406 tablecomments
9407 \family default
9408  (2.15.5), 
9409 \family typewriter
9410
9411 \backslash
9412 url
9413 \family default
9414  (2.17.4), 
9415 \family typewriter
9416
9417 \backslash
9418 end{document}
9419 \family default
9420  (2.18).
9421 \end_layout
9422
9423 \begin_layout Standard
9424 The following style options also work correctly: 
9425 \family typewriter
9426 longabstract
9427 \family default
9428  (2.4), 
9429 \family typewriter
9430 preprint
9431 \family default
9432  (3.2.1), 
9433 \family typewriter
9434 preprint2
9435 \family default
9436  (3.2.2), 
9437 \family typewriter
9438 eqsecnum
9439 \family default
9440  (3.3), 
9441 \family typewriter
9442 flushrt
9443 \family default
9444  (3.4).
9445  Simply put them in the 
9446 \family sans
9447 Options
9448 \family default
9449  box in 
9450 \family sans
9451 Layout\SpecialChar menuseparator
9452 Document
9453 \family default
9454 .
9455 \end_layout
9456
9457 \begin_layout Subsubsection
9458 Things that work, but require more comment
9459 \end_layout
9460
9461 \begin_layout Standard
9462 The following items work, but require a little more discussion:
9463 \end_layout
9464
9465 \begin_layout Itemize
9466 These items are reserved for use by the journal editors, but you can put
9467  them into the \SpecialChar LaTeX
9468  preamble if you feel compelled to do so: 
9469 \family typewriter
9470
9471 \backslash
9472 received
9473 \family default
9474
9475 \family typewriter
9476
9477 \backslash
9478 revised
9479 \family default
9480
9481 \family typewriter
9482
9483 \backslash
9484 accepted
9485 \family default
9486
9487 \family typewriter
9488
9489 \backslash
9490 ccc
9491 \family default
9492
9493 \family typewriter
9494
9495 \backslash
9496 cpright
9497 \family default
9498  (all from 2.1.3)
9499 \end_layout
9500
9501 \begin_layout Itemize
9502 These items may be placed in the \SpecialChar LaTeX
9503  preamble, and are included as blanks in
9504  the template file: 
9505 \family typewriter
9506
9507 \backslash
9508 slugcomment
9509 \family default
9510  (2.1.4), 
9511 \family typewriter
9512
9513 \backslash
9514 shorttitle
9515 \family default
9516  (2.1.5), 
9517 \family typewriter
9518
9519 \backslash
9520 shortauthors
9521 \family default
9522  (2.1.5)
9523 \end_layout
9524
9525 \begin_layout Itemize
9526
9527 \family typewriter
9528
9529 \backslash
9530 email
9531 \family default
9532  (2.3) – can only be used 
9533 \begin_inset Quotes eld
9534 \end_inset
9535
9536 standalone
9537 \begin_inset Quotes erd
9538 \end_inset
9539
9540 , not in the middle of a paragraph.
9541  Use \SpecialChar TeX
9542  code if you need to embed it.
9543 \end_layout
9544
9545 \begin_layout Itemize
9546
9547 \family typewriter
9548
9549 \backslash
9550 and
9551 \family default
9552  (2.3) – will have extra {} after it.
9553  This should not cause an error.
9554 \end_layout
9555
9556 \begin_layout Itemize
9557
9558 \family typewriter
9559
9560 \backslash
9561 notetoeditor
9562 \family default
9563  (2.6) – can only be used 
9564 \begin_inset Quotes eld
9565 \end_inset
9566
9567 standalone
9568 \begin_inset Quotes erd
9569 \end_inset
9570
9571 , not in the middle of a paragraph.
9572  Use \SpecialChar TeX
9573  code if you need to embed it.
9574 \end_layout
9575
9576 \begin_layout Itemize
9577
9578 \family typewriter
9579
9580 \backslash
9581 placetable
9582 \family default
9583  (2.8) – can't insert a cross-reference tag, you must type the tag name by
9584  hand
9585 \end_layout
9586
9587 \begin_layout Itemize
9588
9589 \family typewriter
9590
9591 \backslash
9592 placefigure
9593 \family default
9594  (2.8) – same as for 
9595 \family typewriter
9596
9597 \backslash
9598 placetable
9599 \end_layout
9600
9601 \begin_layout Itemize
9602
9603 \family typewriter
9604
9605 \backslash
9606 acknowledgements
9607 \family default
9608  (2.9) – will have extra {} after it.
9609  This should not cause an error.
9610 \end_layout
9611
9612 \begin_layout Itemize
9613
9614 \family typewriter
9615
9616 \backslash
9617 appendix
9618 \family default
9619  (2.11) – will have extra {} after it.
9620  This should not cause an error.
9621 \end_layout
9622
9623 \begin_layout Itemize
9624
9625 \family typewriter
9626
9627 \backslash
9628 figcaption
9629 \family default
9630  (2.14.2) – you can insert an optional filename argument by placing the cursor
9631  at the beginning of the text and selecting 
9632 \family sans
9633 Insert\SpecialChar menuseparator
9634 Short Title
9635 \family default
9636 .
9637  
9638 \begin_inset Quotes eld
9639 \end_inset
9640
9641 Short Title
9642 \begin_inset Quotes erd
9643 \end_inset
9644
9645  inserts an optional argument of the type needed by 
9646 \family typewriter
9647
9648 \backslash
9649 figcaption
9650 \family default
9651 .
9652  Hopefully it will be renamed someday.
9653 \end_layout
9654
9655 \begin_layout Itemize
9656
9657 \family typewriter
9658
9659 \backslash
9660 objectname
9661 \family default
9662  (2.17.1) – same as 
9663 \family typewriter
9664
9665 \backslash
9666 figcaption
9667 \family default
9668  for the catalog ID optional parameter
9669 \end_layout
9670
9671 \begin_layout Itemize
9672
9673 \family typewriter
9674
9675 \backslash
9676 dataset
9677 \family default
9678  (2.17.1) – same as 
9679 \family typewriter
9680
9681 \backslash
9682 figcaption
9683 \family default
9684  for the catalog ID optional parameter
9685 \end_layout
9686
9687 \begin_layout Subsubsection
9688 Things not implemented, use \SpecialChar TeX
9689  code
9690 \end_layout
9691
9692 \begin_layout Standard
9693
9694 \family typewriter
9695
9696 \backslash
9697 altaffilmark
9698 \family default
9699  (2.3), 
9700 \family typewriter
9701
9702 \backslash
9703 altaffiltext
9704 \family default
9705  (2.3), 
9706 \family typewriter
9707
9708 \backslash
9709 eqnum
9710 \family default
9711  (2.12), 
9712 \family typewriter
9713
9714 \backslash
9715 setcounter{equation}
9716 \family default
9717  (2.12), Journal name abbreviations (2.13.4), 
9718 \family typewriter
9719
9720 \backslash
9721 figurenum
9722 \family default
9723  (2.14.1), 
9724 \family typewriter
9725
9726 \backslash
9727 epsscale
9728 \family default
9729  (2.14.1), 
9730 \family typewriter
9731
9732 \backslash
9733 plotone
9734 \family default
9735  (2.14.1), 
9736 \family typewriter
9737
9738 \backslash
9739 plottwo
9740 \family default
9741  (2.14.1), 
9742 \family typewriter
9743
9744 \backslash
9745 tablenum
9746 \family default
9747  (2.15.4), 
9748 \family typewriter
9749
9750 \backslash
9751 tableline
9752 \family default
9753  (2.15.4, insert it as the first element in the lefthand cell after where
9754  you want it.
9755  Don't use any of \SpecialChar LyX
9756 's rules in the table), 
9757 \family typewriter
9758
9759 \backslash
9760 tablenotemark
9761 \family default
9762  (2.15.5), 
9763 \family typewriter
9764
9765 \backslash
9766 tablenotetext
9767 \family default
9768  (2.15.5), much of Misc (2.17, except 
9769 \family typewriter
9770
9771 \backslash
9772 objectname
9773 \family default
9774
9775 \family typewriter
9776
9777 \backslash
9778 dataset
9779 \family default
9780
9781 \family typewriter
9782
9783 \backslash
9784 url
9785 \family default
9786 , and 
9787 \family typewriter
9788
9789 \backslash
9790 email
9791 \family default
9792 ; see above), 
9793 \family typewriter
9794
9795 \backslash
9796 singlespace
9797 \family default
9798  (3.1), 
9799 \family typewriter
9800
9801 \backslash
9802 doublespace
9803 \family default
9804  (3.1), 
9805 \family typewriter
9806
9807 \backslash
9808 onecolumn
9809 \family default
9810  (3.2), 
9811 \family typewriter
9812
9813 \backslash
9814 twocolumn
9815 \family default
9816  (3.2)
9817 \end_layout
9818
9819 \begin_layout Subsubsection
9820 Things that cannot be implemented
9821 \end_layout
9822
9823 \begin_layout Standard
9824 \SpecialChar ldots
9825  at least in any meaningful sort of way, so I suggest ignoring them.
9826  They are the references environment (2.13.3), and the deluxetable environment
9827  (2.15).
9828  If you really, really need to use deluxetable, I suggest editing it in
9829  a separate file with a text editor, then using 
9830 \family sans
9831 Insert\SpecialChar menuseparator
9832 Child
9833 \begin_inset space ~
9834 \end_inset
9835
9836 Document
9837 \family default
9838  to include it in your \SpecialChar LyX
9839  document.
9840  See the 
9841 \family typewriter
9842 aas_sample.lyx
9843 \family default
9844  file to see an example of this.
9845 \end_layout
9846
9847 \begin_layout Subsection
9848 FAQs, Tips, Tricks, and Other Ruminations
9849 \end_layout
9850
9851 \begin_layout Subsubsection
9852 Getting \SpecialChar LyX
9853  and AAS\SpecialChar TeX
9854  to cooperate
9855 \end_layout
9856
9857 \begin_layout Standard
9858 It can be a bit tricky to get \SpecialChar LyX
9859  to recognize a new layout and document class.
9860  When all else fails, do this:
9861 \end_layout
9862
9863 \begin_layout Enumerate
9864 Make certain that \SpecialChar LaTeX
9865  can find AAS\SpecialChar TeX
9866 .
9867  Copy sample.tex (and perhaps table.tex) from the AAS\SpecialChar TeX
9868  distribution into a
9869  directory completely unrelated to \SpecialChar LaTeX
9870  or AAS\SpecialChar TeX
9871  and run \SpecialChar LaTeX
9872  on 
9873 \family typewriter
9874 sample.tex
9875 \family default
9876 .
9877 \end_layout
9878
9879 \begin_layout Enumerate
9880 Make certain that 
9881 \family typewriter
9882 aastex.layout
9883 \family default
9884  appears in \SpecialChar LyX
9885 's 
9886 \family typewriter
9887 layouts
9888 \family default
9889  folder
9890 \end_layout
9891
9892 \begin_layout Enumerate
9893 Rerun 
9894 \family sans
9895 Tools\SpecialChar menuseparator
9896 Reconfigure
9897 \family default
9898  in \SpecialChar LyX
9899 , then restart \SpecialChar LyX
9900 .
9901 \end_layout
9902
9903 \begin_layout Enumerate
9904 Open a regular new file, not from a template.
9905  Does AAS\SpecialChar TeX
9906  appear in the class list in 
9907 \family sans
9908 Document\SpecialChar menuseparator
9909 Settings
9910 \family default
9911 ?
9912 \end_layout
9913
9914 \begin_layout Standard
9915 If you get a warning from an existing AAS\SpecialChar TeX
9916  document about not being able
9917  to find the AAS\SpecialChar TeX
9918  layout or a message about 
9919 \begin_inset Quotes eld
9920 \end_inset
9921
9922 You should not mix title layouts with normal ones
9923 \begin_inset Quotes erd
9924 \end_inset
9925
9926 , things haven't been installed correctly.
9927 \end_layout
9928
9929 \begin_layout Subsubsection
9930 \SpecialChar LaTeX
9931  error processing a table 
9932 \end_layout
9933
9934 \begin_layout Standard
9935 \SpecialChar LyX
9936 , by default, attempts to center the table caption/title.
9937  This seems to produce a bad interaction in AAS\SpecialChar TeX
9938  so you should click somewhere
9939  in the caption/title, then select 
9940 \family sans
9941 Edit\SpecialChar menuseparator
9942 Paragraph
9943 \begin_inset space ~
9944 \end_inset
9945
9946 Settings
9947 \family default
9948 , then set the 
9949 \family sans
9950 Alignment
9951 \family default
9952  to 
9953 \family sans
9954 Block
9955 \family default
9956 .
9957  This took care of it for me.
9958 \end_layout
9959
9960 \begin_layout Subsubsection
9961 References
9962 \end_layout
9963
9964 \begin_layout Standard
9965 A couple of things: 1) I have noticed some funny spacing in the reference
9966  entries in the text.
9967  When you enter the bibliography item data, make sure their is 
9968 \emph on
9969 no
9970 \emph default
9971  space between the last author and the parenthesis setting off the year;
9972  
9973 \emph on
9974 e.
9975 \begin_inset space \thinspace{}
9976 \end_inset
9977
9978 g.
9979 \begin_inset space \space{}
9980 \end_inset
9981
9982
9983 \emph default
9984 type 
9985 \family typewriter
9986 Ressler(1992)
9987 \family default
9988 , not 
9989 \family typewriter
9990 Ressler (1992)
9991 \family default
9992 .
9993  2) Entering the references at all is not obvious.
9994  The easiest thing is to start typing your first reference at the end of
9995  the document, then mark it as type 
9996 \family sans
9997 References
9998 \family default
9999 .
10000  That will put a small gray box in front of what you just typed.
10001  Click on the box to fill in the rest of the information.
10002  For new references, go to the end of an existing reference and press return.
10003  That will create a new line with its own box, etc.
10004 \end_layout
10005
10006 \begin_layout Subsubsection
10007 Including EPS files
10008 \end_layout
10009
10010 \begin_layout Standard
10011 Even though AAS\SpecialChar TeX
10012  provides its own figure commands (
10013 \family typewriter
10014
10015 \backslash
10016 plotone
10017 \family default
10018 , for example), I much prefer \SpecialChar LaTeX
10019 's standard figure commands (with the default
10020  graphicx).
10021  You can insert the 
10022 \family typewriter
10023
10024 \backslash
10025 plotone
10026 \family default
10027 , etc.
10028 \begin_inset space ~
10029 \end_inset
10030
10031 commands as \SpecialChar TeX
10032  code into a Figure Float box if you desire, but I never have
10033  much luck getting the layout right.
10034  With the standard graphics, \SpecialChar LyX
10035  will insert a 
10036 \family typewriter
10037
10038 \backslash
10039 usepackage{graphicx}
10040 \family default
10041  command into the \SpecialChar LaTeX
10042  preamble and handle the figures in the standard \SpecialChar LaTeX2e
10043  way,
10044  interspersing the figures in the text.
10045  I believe ApJ accepts figures exactly this way now; AJ might still use
10046  the 
10047 \begin_inset Quotes eld
10048 \end_inset
10049
10050 stack everything at the end
10051 \begin_inset Quotes erd
10052 \end_inset
10053
10054  technique.
10055 \end_layout
10056
10057 \begin_layout Subsubsection
10058 Things I could have done, but didn't
10059 \end_layout
10060
10061 \begin_layout Standard
10062 There are a few 
10063 \begin_inset Quotes eld
10064 \end_inset
10065
10066 pretty
10067 \begin_inset Quotes erd
10068 \end_inset
10069
10070  things I could have implemented, but chose not to.
10071  For instance, I saw no point in double-spacing the text in the \SpecialChar LyX
10072  window,
10073  even though it is double-spaced in the paper manuscript.
10074  Also, I chose not to make separate layouts for the preprint and preprint2
10075  styles.
10076  Since I assume you will spend most of your time in the plain manuscript
10077  mode anyway, I decided not to chew up more disk space with this.
10078  
10079 \end_layout
10080
10081 \begin_layout Subsection
10082 Final Caveat
10083 \end_layout
10084
10085 \begin_layout Standard
10086 Your mileage may vary.
10087  I've now had papers published by both ApJ and AJ that have had 98% of the
10088  effort done in \SpecialChar LyX
10089 ; the last 2% was the \SpecialChar LaTeX
10090  post-processing and a few cleanups.
10091  I have had no trouble with the submission process, and I'm sure the journals
10092  were never aware that there might be a difference.
10093  So, go forth and publish!
10094 \end_layout
10095
10096 \begin_layout Section
10097 AMS \SpecialChar LaTeX
10098
10099 \end_layout
10100
10101 \begin_layout Standard
10102 by 
10103 \noun on
10104 David Johnson
10105 \noun default
10106 ; updated by 
10107 \noun on
10108 Richard Heck
10109 \end_layout
10110
10111 \begin_layout Standard
10112 \begin_inset VSpace bigskip
10113 \end_inset
10114
10115
10116 \end_layout
10117
10118 \begin_layout Standard
10119 \noindent
10120 The AMS \SpecialChar LaTeX
10121  layouts are set up to conform to suggested styles for mathematical
10122  papers to be submitted to American Mathematical Society publications.
10123  The layouts are not tailored to a specific journal, but easily can be.
10124  You should refer to the AMS documentation for specific instructions for
10125  each journal (usually it will entail only changing a single line in the
10126  \SpecialChar TeX
10127  output).
10128  That documentation is available on the Web at 
10129 \begin_inset Flex URL
10130 status open
10131
10132 \begin_layout Plain Layout
10133
10134 http://www.ams.org
10135 \end_layout
10136
10137 \end_inset
10138
10139  or by ftp at 
10140 \begin_inset Flex URL
10141 status open
10142
10143 \begin_layout Plain Layout
10144
10145 ftp://ftp.ams.org/pub/tex/amslatex/
10146 \end_layout
10147
10148 \end_inset
10149
10150 .
10151  These layouts are appropriate, and useful, for any mathematical writing.
10152  
10153 \end_layout
10154
10155 \begin_layout Standard
10156 There are two basic AMS \SpecialChar LaTeX
10157  layouts: 
10158 \end_layout
10159
10160 \begin_layout Itemize
10161 amsart: The standard AMS article format.
10162 \end_layout
10163
10164 \begin_layout Itemize
10165 amsbook: the standard AMS book (really, monograph) format.
10166  
10167 \end_layout
10168
10169 \begin_layout Standard
10170 The layouts themselves contain only the minimum necessary to use the AMS
10171  classes.
10172  They do not, in particular, contain any of the `theorem' environments used
10173  for setting theorems, lemmas, and the like.
10174  These are contained, instead, in the 
10175 \begin_inset Flex Code
10176 status collapsed
10177
10178 \begin_layout Plain Layout
10179 Theorems (AMS)
10180 \end_layout
10181
10182 \end_inset
10183
10184  module, which is loaded by default when you select one of the AMS classes.
10185  (It can also be used with other classes and can be removed, if you would
10186  rather use something else.) Less commonly used environments are in the 
10187 \begin_inset Flex Code
10188 status collapsed
10189
10190 \begin_layout Plain Layout
10191 Theorems (AMS-Extended)
10192 \end_layout
10193
10194 \end_inset
10195
10196  module, which must be loaded manually.
10197 \end_layout
10198
10199 \begin_layout Standard
10200 By default, theorems and the like are numbered consecutively throughout
10201  the document, but this may be modified by loading the module 
10202 \begin_inset Flex Code
10203 status collapsed
10204
10205 \begin_layout Plain Layout
10206 Theorems (Order by Section)
10207 \end_layout
10208
10209 \end_inset
10210
10211  or, if you are using 
10212 \begin_inset Flex Code
10213 status collapsed
10214
10215 \begin_layout Plain Layout
10216 book (AMS)
10217 \end_layout
10218
10219 \end_inset
10220
10221 , the module 
10222 \begin_inset Flex Code
10223 status collapsed
10224
10225 \begin_layout Plain Layout
10226 Theorems (Order by Chapter)
10227 \end_layout
10228
10229 \end_inset
10230
10231 .
10232  These will number the results as 
10233 \begin_inset Formula $n.m$
10234 \end_inset
10235
10236 , where the first number refers to the section (or chapter) and the second
10237  refers to the total number of results so far in that section (or chapter).
10238  Many environments are also available unnumbered.
10239  These are indicated by an asterisk at the end.
10240  If you happen to want 
10241 \emph on
10242 only
10243 \emph default
10244  unnumbered results, the module 
10245 \begin_inset Flex Code
10246 status collapsed
10247
10248 \begin_layout Plain Layout
10249 Theorems (Starred)
10250 \end_layout
10251
10252 \end_inset
10253
10254  provides that option.
10255 \end_layout
10256
10257 \begin_layout Standard
10258 Note that these modules do not 
10259 \emph on
10260 have
10261 \emph default
10262  to be used with the AMS classes.
10263  It is perfectly possible to use the 
10264 \begin_inset Flex Code
10265 status collapsed
10266
10267 \begin_layout Plain Layout
10268 Theorems (AMS)
10269 \end_layout
10270
10271 \end_inset
10272
10273  module, and the others mentioned, with other classes, such as 
10274 \begin_inset Flex Code
10275 status collapsed
10276
10277 \begin_layout Plain Layout
10278 article
10279 \end_layout
10280
10281 \end_inset
10282
10283
10284 \begin_inset Flex Code
10285 status collapsed
10286
10287 \begin_layout Plain Layout
10288 report
10289 \end_layout
10290
10291 \end_inset
10292
10293
10294 \begin_inset Flex Code
10295 status collapsed
10296
10297 \begin_layout Plain Layout
10298 book (KOMA-script)
10299 \end_layout
10300
10301 \end_inset
10302
10303 , and so forth.
10304 \end_layout
10305
10306 \begin_layout Subsection
10307 What these layouts provide
10308 \end_layout
10309
10310 \begin_layout Standard
10311 There is a long list of included environments provided by these layouts.
10312  In AMS-\SpecialChar LaTeX
10313 , there is, in fact, an opportunity to define an unlimited variety
10314  of `theorem' environments.
10315  However, the AMS recommends the environments that are available in \SpecialChar LyX
10316 .
10317  
10318 \end_layout
10319
10320 \begin_layout Standard
10321 The following environments—as well as the standard environments, such as
10322  
10323 \begin_inset Flex Noun
10324 status collapsed
10325
10326 \begin_layout Plain Layout
10327 section
10328 \end_layout
10329
10330 \end_inset
10331
10332
10333 \begin_inset Flex Noun
10334 status collapsed
10335
10336 \begin_layout Plain Layout
10337 bibliography
10338 \end_layout
10339
10340 \end_inset
10341
10342
10343 \begin_inset Flex Noun
10344 status collapsed
10345
10346 \begin_layout Plain Layout
10347 title
10348 \end_layout
10349
10350 \end_inset
10351
10352
10353 \begin_inset Flex Noun
10354 status collapsed
10355
10356 \begin_layout Plain Layout
10357 author
10358 \end_layout
10359
10360 \end_inset
10361
10362 , and 
10363 \begin_inset Flex Noun
10364 status collapsed
10365
10366 \begin_layout Plain Layout
10367 date
10368 \end_layout
10369
10370 \end_inset
10371
10372 —are provided by 
10373 \begin_inset Flex Code
10374 status collapsed
10375
10376 \begin_layout Plain Layout
10377 article (AMS)
10378 \end_layout
10379
10380 \end_inset
10381
10382  and 
10383 \begin_inset Flex Code
10384 status collapsed
10385
10386 \begin_layout Plain Layout
10387 book (AMS)
10388 \end_layout
10389
10390 \end_inset
10391
10392 :
10393 \end_layout
10394
10395 \begin_layout Description
10396 Address This should be the author's permanent address.
10397 \end_layout
10398
10399 \begin_layout Description
10400 Current
10401 \begin_inset space ~
10402 \end_inset
10403
10404 Address This should be the author's temporary address at the time of submission,
10405  if different from the Address.
10406 \end_layout
10407
10408 \begin_layout Description
10409 Email Author's e-mail address
10410 \end_layout
10411
10412 \begin_layout Description
10413 URL Author's Web address, if desired.
10414 \end_layout
10415
10416 \begin_layout Description
10417 Keywords Key words or phrases used to identify specific topics discussed
10418  in the paper.
10419 \end_layout
10420
10421 \begin_layout Description
10422 Subjectclass These refer to the AMS Subject Classifications, published and
10423  described in 
10424 \emph on
10425 Mathematical Reviews
10426 \emph default
10427 .
10428  These are also available online at the AMS cites listed above.
10429 \end_layout
10430
10431 \begin_layout Description
10432 Thanks
10433 \end_layout
10434
10435 \begin_layout Description
10436 Dedicatory
10437 \end_layout
10438
10439 \begin_layout Description
10440 Translator
10441 \end_layout
10442
10443 \begin_layout Standard
10444 The following environments are provided by both the 
10445 \begin_inset Flex Code
10446 status collapsed
10447
10448 \begin_layout Plain Layout
10449 Theorems
10450 \end_layout
10451
10452 \end_inset
10453
10454  and 
10455 \begin_inset Flex Code
10456 status collapsed
10457
10458 \begin_layout Plain Layout
10459 Theorems (AMS)
10460 \end_layout
10461
10462 \end_inset
10463
10464  modules, in the latter case in both starred (unnumbered) and unstarred
10465  (numbered) versions.
10466  These same environments are provided only in the starred versions by the
10467  
10468 \begin_inset Flex Code
10469 status collapsed
10470
10471 \begin_layout Plain Layout
10472 Theorems (Starred)
10473 \end_layout
10474
10475 \end_inset
10476
10477  module:
10478 \end_layout
10479
10480 \begin_layout Theorem
10481 This is typically used for the statements of major results.
10482  
10483 \end_layout
10484
10485 \begin_layout Corollary*
10486 This is used for statements which follow fairly directly from previous statement
10487 s.
10488  Again, these can be major results.
10489  
10490 \end_layout
10491
10492 \begin_layout Lemma
10493 These are smaller results needed to prove other statements.
10494 \end_layout
10495
10496 \begin_layout Proposition
10497 These are less major results which (hopefully) add to the general theory
10498  being discussed.
10499 \end_layout
10500
10501 \begin_layout Conjecture
10502 These are statements provided without justification, which the author does
10503  not know how to prove, but which seem to be true (to the author, at least).
10504 \end_layout
10505
10506 \begin_layout Definition*
10507 Guess what this is for.
10508  The font is different for this environment than for the previous ones.
10509  
10510 \end_layout
10511
10512 \begin_layout Example*
10513 Used for examples illustrating proven results.
10514 \end_layout
10515
10516 \begin_layout Problem
10517 It's not really known what this is for.
10518  You should figure it out.
10519 \end_layout
10520
10521 \begin_layout Exercise*
10522 Write a description for this one.
10523 \end_layout
10524
10525 \begin_layout Remark
10526 This environment is also a type of theorem, usually a lesser sort of observation.
10527 \end_layout
10528
10529 \begin_layout Claim*
10530 Often used in the course of giving a proof of a larger result.
10531 \end_layout
10532
10533 \begin_layout Case
10534 Generally, these are used to break up long arguments, using specific instances
10535  of some condition.
10536  
10537 \end_layout
10538
10539 \begin_layout Case
10540 The numbering scheme for cases is on its own, not together with other numbered
10541  statements.
10542  
10543 \end_layout
10544
10545 \begin_layout Proof
10546 At the end of this environment, a QED symbol (usually a square, but it can
10547  vary with different styles) is placed.
10548  If you want to have other environments within this one—for example, Case
10549  environments—and have the QED symbol appear only after them, then the other
10550  environments need to be nested within the proof environment.
10551  See the section 
10552 \emph on
10553 Nesting Environments
10554 \emph default
10555  of the 
10556 \emph on
10557 User's Guide
10558 \emph default
10559  for information on nesting.
10560 \end_layout
10561
10562 \begin_layout Standard
10563 And these environments are provided by 
10564 \begin_inset Flex Code
10565 status collapsed
10566
10567 \begin_layout Plain Layout
10568 Theorems (AMS-Extended)
10569 \end_layout
10570
10571 \end_inset
10572
10573 :
10574 \end_layout
10575
10576 \begin_layout Criterion*
10577 A required condition.
10578 \end_layout
10579
10580 \begin_layout Algorithm*
10581 A general procedure to be used.
10582 \end_layout
10583
10584 \begin_layout Axiom*
10585 This is a property or statement taken as true within the system being discussed.
10586 \end_layout
10587
10588 \begin_layout Condition*
10589 Sometimes used to state a condition assumed within the present context of
10590  discussion.
10591 \end_layout
10592
10593 \begin_layout Note*
10594 Similar to a Remark.
10595 \end_layout
10596
10597 \begin_layout Notation*
10598 Used for the explanation of, yes, notation.
10599 \end_layout
10600
10601 \begin_layout Summary
10602 Do we really need to tell you? 
10603 \end_layout
10604
10605 \begin_layout Acknowledgement*
10606 Acknowledgement.
10607 \end_layout
10608
10609 \begin_layout Conclusion*
10610 Sometimes used at the end of a long train of argument.
10611 \end_layout
10612
10613 \begin_layout Fact
10614 Used in a way similar to Proposition, though perhaps lower on the scale.
10615 \end_layout
10616
10617 \begin_layout Standard
10618 In addition, the AMS classes automatically provide the AMS \SpecialChar LaTeX
10619  and AMS fonts
10620  packages.
10621  They need to be available on your system in order to use these environments.
10622 \end_layout
10623
10624 \begin_layout Section
10625 AGU journals (
10626 \family sans
10627 aguplus
10628 \family default
10629 )
10630 \end_layout
10631
10632 \begin_layout Standard
10633 by 
10634 \shape smallcaps
10635 Martin Vermeer
10636 \end_layout
10637
10638 \begin_layout Subsection
10639 Description
10640 \end_layout
10641
10642 \begin_layout Standard
10643 These are the layout files for some of the journals of the American Geophysical
10644  Society.
10645  It is assumed that you have both the AGU's own class files and AGUplus
10646  installed (everything to be found at
10647 \begin_inset Flex URL
10648 status collapsed
10649
10650 \begin_layout Plain Layout
10651
10652 http://publications.agu.org/files/2013/08/AGU-LaTeX.zip
10653 \end_layout
10654
10655 \end_inset
10656
10657 ).
10658 \end_layout
10659
10660 \begin_layout Subsection
10661 New styles
10662 \end_layout
10663
10664 \begin_layout Standard
10665 Redefined are 
10666 \family sans
10667 Paragraph
10668 \family default
10669
10670 \family sans
10671 Paragraph*
10672 \family default
10673 .
10674  They are still called this in the \SpecialChar LyX
10675  GUI, though their \SpecialChar LaTeX
10676  equivalents in the
10677  AGU classes are 
10678 \family sans
10679 Subsubsubsection
10680 \family default
10681  and 
10682 \family sans
10683 Subsubsubsection*
10684 \family default
10685 .
10686 \end_layout
10687
10688 \begin_layout Standard
10689 Newly defined styles are 
10690 \family sans
10691 Left_Header
10692 \family default
10693
10694 \family sans
10695 Right_Header
10696 \family default
10697
10698 \family sans
10699 Received
10700 \family default
10701
10702 \family sans
10703 Revised
10704 \family default
10705
10706 \family sans
10707 Accepted
10708 \family default
10709
10710 \family sans
10711 CCC
10712 \family default
10713
10714 \family sans
10715 PaperId
10716 \family default
10717
10718 \family sans
10719 AuthorAddr
10720 \family default
10721
10722 \family sans
10723 SlugComment
10724 \family default
10725 .
10726  These are mostly manuscript attributes and defined in the AGU class documentati
10727 on.
10728 \end_layout
10729
10730 \begin_layout Standard
10731 I suspect this is still badly incomplete.
10732 \end_layout
10733
10734 \begin_layout Subsection
10735 New floats
10736 \end_layout
10737
10738 \begin_layout Standard
10739
10740 \family sans
10741 Planotable
10742 \family default
10743  and 
10744 \family sans
10745 Plate
10746 \family default
10747 .
10748  We also have a new 
10749 \family sans
10750 Table_Caption
10751 \family default
10752 .
10753 \end_layout
10754
10755 \begin_layout Subsection
10756 Supported journals
10757 \end_layout
10758
10759 \begin_layout Itemize
10760
10761 \emph on
10762 Journal of Geophysical Research
10763 \emph default
10764
10765 \family typewriter
10766 jgrga.layout
10767 \family default
10768  — Martin Vermeer
10769 \end_layout
10770
10771 \begin_layout Standard
10772 Add your own, it isn't so hard! Look at the 
10773 \family typewriter
10774 jgrga.layout
10775 \family default
10776  example and 
10777 \family typewriter
10778 aguplus.inc
10779 \family default
10780 .
10781 \end_layout
10782
10783 \begin_layout Subsection
10784 Bugs and things to remember
10785 \end_layout
10786
10787 \begin_layout Standard
10788 In order to use the new layouts, you must remember to do the following for
10789  a new document:
10790 \end_layout
10791
10792 \begin_layout Enumerate
10793
10794 \emph on
10795 Turn off babel
10796 \emph default
10797 .
10798  This can be done in the 
10799 \family sans
10800 Layout\SpecialChar menuseparator
10801 Document
10802 \family default
10803  or 
10804 \family sans
10805 Document\SpecialChar menuseparator
10806 Settings
10807 \family default
10808  menu item.
10809  (AGU articles are always in English, right? So 
10810 \emph on
10811 don't
10812 \emph default
10813  choose a language.)
10814 \end_layout
10815
10816 \begin_layout Enumerate
10817 Enter 
10818 \family typewriter
10819 jgrga
10820 \family default
10821  into the document's 
10822 \family sans
10823 Extra Options
10824 \family default
10825  field.
10826  (Yes, this is a bug.)
10827 \end_layout
10828
10829 \begin_layout Enumerate
10830 Make sure you use the 
10831 \family typewriter
10832 agu.bst
10833 \family default
10834  bibliography style, by entering 
10835 \family sans
10836 agu
10837 \family default
10838  into the second field of the Bib\SpecialChar TeX
10839  inset.
10840  None of the standard styles will do.
10841 \end_layout
10842
10843 \begin_layout Section
10844 Broadway
10845 \end_layout
10846
10847 \begin_layout Standard
10848 by 
10849 \shape smallcaps
10850 Garst Reese
10851 \end_layout
10852
10853 \begin_layout Subsection
10854 Introduction
10855 \end_layout
10856
10857 \begin_layout Standard
10858 Broadway is for writing plays.
10859  The format is more decorative than Hollywood, and much less standardized.
10860  This format should be suitable for workshops.
10861 \end_layout
10862
10863 \begin_layout Subsection
10864 Special problems
10865 \end_layout
10866
10867 \begin_layout Standard
10868 The same as in Hollywood.
10869 \end_layout
10870
10871 \begin_layout Subsection
10872 Special features
10873 \end_layout
10874
10875 \begin_layout Standard
10876 Insert the 
10877 \family sans
10878 Speaker
10879 \family default
10880  names as labels then cross-reference the label to insert the name.
10881  The cross-reference dialog will show the current cast of characters.
10882 \end_layout
10883
10884 \begin_layout Subsection
10885 Paper size and Margins
10886 \end_layout
10887
10888 \begin_layout Standard
10889 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
10890 \end_layout
10891
10892 \begin_layout Subsection
10893 Environments
10894 \end_layout
10895
10896 \begin_layout Standard
10897 The following environments are available.
10898  You can use broadway.bind to get the bind keys shown at the right.
10899 \end_layout
10900
10901 \begin_layout Itemize
10902
10903 \family sans
10904 Standard
10905 \begin_inset Newline newline
10906 \end_inset
10907
10908
10909 \family default
10910 You should not have to use this, but it is here for anything that does not
10911  fit otherwise.
10912 \end_layout
10913
10914 \begin_layout Itemize
10915
10916 \family sans
10917 Narrative
10918 \begin_inset space \hfill{}
10919 \end_inset
10920
10921 M-z n
10922 \begin_inset Newline newline
10923 \end_inset
10924
10925
10926 \family default
10927 Used to describe stage setting and the action.
10928  First use of speaker names in all CAPs.
10929 \end_layout
10930
10931 \begin_layout Itemize
10932
10933 \family sans
10934 ACT
10935 \begin_inset space \hfill{}
10936 \end_inset
10937
10938 M-z a
10939 \begin_inset Newline newline
10940 \end_inset
10941
10942
10943 \family default
10944 Automatically numbered.
10945  On screen it will be arabic, but will print as Roman.
10946 \end_layout
10947
10948 \begin_layout Itemize
10949
10950 \family sans
10951 ACT*
10952 \begin_inset space \hfill{}
10953 \end_inset
10954
10955 M-z S at
10956 \begin_inset Newline newline
10957 \end_inset
10958
10959
10960 \family default
10961 Subtitle for 
10962 \family sans
10963 ACT.
10964
10965 \family default
10966  It is just centered text.
10967 \end_layout
10968
10969 \begin_layout Itemize
10970
10971 \family sans
10972 SCENE
10973 \begin_inset space \hfill{}
10974 \end_inset
10975
10976 M-z S-S
10977 \begin_inset Newline newline
10978 \end_inset
10979
10980
10981 \family default
10982 Not automatically numbered.
10983  You supply the number.
10984  This is because I couldn't figure out how.
10985 \end_layout
10986
10987 \begin_layout Itemize
10988
10989 \family sans
10990 AT_RISE:
10991 \begin_inset space \hfill{}
10992 \end_inset
10993
10994 M-z S-R
10995 \begin_inset Newline newline
10996 \end_inset
10997
10998
10999 \family default
11000 A special case of Narrative to describe the setting and action as the curtain
11001  rises.
11002 \end_layout
11003
11004 \begin_layout Itemize
11005
11006 \family sans
11007 Speaker
11008 \begin_inset space \hfill{}
11009 \end_inset
11010
11011 M-z s
11012 \begin_inset Newline newline
11013 \end_inset
11014
11015
11016 \family default
11017 The speaker's (actor's) title, centered in all CAPS.
11018 \end_layout
11019
11020 \begin_layout Itemize
11021
11022 \family sans
11023 Parenthetical
11024 \begin_inset space \hfill{}
11025 \end_inset
11026
11027 M-z p
11028 \begin_inset Newline newline
11029 \end_inset
11030
11031
11032 \family default
11033 Instructions to the speaker.
11034  The parentheses are automatically inserted.
11035  The ( will appear on screen, but both will be in the printed play.
11036  This environment is only used within 
11037 \family sans
11038 Dialogue
11039 \family default
11040 .
11041 \end_layout
11042
11043 \begin_layout Itemize
11044
11045 \family sans
11046 Dialogue
11047 \begin_inset space \hfill{}
11048 \end_inset
11049
11050 M-z d
11051 \begin_inset Newline newline
11052 \end_inset
11053
11054
11055 \family default
11056 What the Speaker says.
11057 \end_layout
11058
11059 \begin_layout Itemize
11060
11061 \family sans
11062 CURTAIN
11063 \begin_inset space \hfill{}
11064 \end_inset
11065
11066 M-z S-C
11067 \begin_inset Newline newline
11068 \end_inset
11069
11070
11071 \family default
11072 The curtain comes down.
11073 \end_layout
11074
11075 \begin_layout Itemize
11076
11077 \family sans
11078 Title
11079 \begin_inset space \hfill{}
11080 \end_inset
11081
11082 M-z S-T
11083 \end_layout
11084
11085 \begin_layout Itemize
11086
11087 \family sans
11088 Author
11089 \begin_inset space \hfill{}
11090 \end_inset
11091
11092 M-z S-A
11093 \end_layout
11094
11095 \begin_layout Itemize
11096
11097 \family sans
11098 Right_Address
11099 \begin_inset space \hfill{}
11100 \end_inset
11101
11102 M-z r
11103 \end_layout
11104
11105 \begin_layout Standard
11106 Hello there.
11107 \end_layout
11108
11109 \begin_layout Section
11110 Dinbrief
11111 \end_layout
11112
11113 \begin_layout Standard
11114 The document class 
11115 \family sans
11116 dinbrief
11117 \family default
11118  can be used to type letters according to German conventions.
11119  A template file is included in 
11120 \family typewriter
11121 .../lyx/share/templates
11122 \family default
11123  for you to use as a starting point.
11124 \end_layout
11125
11126 \begin_layout Section
11127 EGS journals (
11128 \family sans
11129 egs
11130 \family default
11131 )
11132 \end_layout
11133
11134 \begin_layout Standard
11135 by 
11136 \shape smallcaps
11137 Martin Vermeer
11138 \end_layout
11139
11140 \begin_layout Subsection
11141 Description
11142 \end_layout
11143
11144 \begin_layout Standard
11145 This is the layout file for the European Geophysical Society journals.
11146  The needed 
11147 \family typewriter
11148 egs.cls
11149 \family default
11150  can be downloaded from the web site of the EGS under 
11151 \begin_inset Flex URL
11152 status collapsed
11153
11154 \begin_layout Plain Layout
11155
11156 www.copernicus.org
11157 \end_layout
11158
11159 \end_inset
11160
11161 .
11162 \end_layout
11163
11164 \begin_layout Subsection
11165 New styles
11166 \end_layout
11167
11168 \begin_layout Standard
11169
11170 \family sans
11171 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
11172  Accepted
11173 \family default
11174
11175 \family sans
11176 Offsets
11177 \family default
11178 .
11179  The current layout file is unfortunately very unmodular and would benefit
11180  from using the various 
11181 \family typewriter
11182 std*.inc
11183 \family default
11184  file inclusions.
11185 \end_layout
11186
11187 \begin_layout Section
11188 Elsevier Journals
11189 \end_layout
11190
11191 \begin_layout Standard
11192 See the \SpecialChar LyX
11193  template file 
11194 \family typewriter
11195 elsarticle.lyx
11196 \family default
11197 .
11198  It contains all infos you need.
11199 \end_layout
11200
11201 \begin_layout Section
11202 Foils [aka 
11203 \family sans
11204 Foil\SpecialChar TeX
11205
11206 \family default
11207 ]
11208 \begin_inset CommandInset label
11209 LatexCommand label
11210 name "sec:foiltex"
11211
11212 \end_inset
11213
11214
11215 \end_layout
11216
11217 \begin_layout Standard
11218 by 
11219 \noun on
11220 Allan Rae
11221 \end_layout
11222
11223 \begin_layout Subsection
11224 Introduction
11225 \end_layout
11226
11227 \begin_layout Standard
11228 This section describes how to use \SpecialChar LyX
11229  to make slides for overhead projectors.
11230  There are two document classes that can do this: the default slides class
11231  and the 
11232 \family sans
11233 Foil\SpecialChar TeX
11234
11235 \family default
11236  slides class.
11237  This section documents the latter.
11238 \end_layout
11239
11240 \begin_layout Standard
11241 I'm going to say this again, nice and clear, so that there's no misunderstanding
11242 :
11243 \end_layout
11244
11245 \begin_layout Standard
11246 \begin_inset VSpace bigskip
11247 \end_inset
11248
11249
11250 \end_layout
11251
11252 \begin_layout Standard
11253 \align center
11254
11255 \size large
11256 This section documents the class 
11257 \begin_inset Quotes eld
11258 \end_inset
11259
11260
11261 \family sans
11262 FoilTeX
11263 \family default
11264
11265 \begin_inset Quotes erd
11266 \end_inset
11267
11268  
11269 \emph on
11270 only.
11271 \end_layout
11272
11273 \begin_layout Standard
11274 \begin_inset VSpace bigskip
11275 \end_inset
11276
11277
11278 \end_layout
11279
11280 \begin_layout Standard
11281 If you're looking for the documentation for 
11282 \begin_inset Quotes eld
11283 \end_inset
11284
11285
11286 \family sans
11287 slides (default)
11288 \family default
11289
11290 \begin_inset Quotes erd
11291 \end_inset
11292
11293 , check out section
11294 \begin_inset space ~
11295 \end_inset
11296
11297
11298 \begin_inset CommandInset ref
11299 LatexCommand ref
11300 reference "sec:slitex"
11301
11302 \end_inset
11303
11304 .
11305  If your machine doesn't have the 
11306 \family sans
11307 foils
11308 \family default
11309  class 
11310 \family sans
11311 FoilTeX
11312 \family default
11313  installed, you'll probably have to use the default 
11314 \family sans
11315 slides
11316 \family default
11317  class, which isn't quite as good as 
11318 \family sans
11319 foils.
11320 \end_layout
11321
11322 \begin_layout Standard
11323 The 
11324 \family sans
11325 foils
11326 \family default
11327  class is designed for use with version
11328 \begin_inset space ~
11329 \end_inset
11330
11331 2.1 of the 
11332 \family sans
11333 foils.cls
11334 \family default
11335  \SpecialChar LaTeX
11336  class file which is now an integral part of \SpecialChar LaTeX2e
11337 .
11338 \end_layout
11339
11340 \begin_layout Subsection
11341 Getting Started
11342 \end_layout
11343
11344 \begin_layout Standard
11345 Obviously, to use this document class, you need to select 
11346 \family sans
11347 FoilTeX
11348 \family default
11349  from the 
11350 \family sans
11351 Class
11352 \family default
11353  entry in the 
11354 \family sans
11355 Document
11356 \begin_inset space ~
11357 \end_inset
11358
11359 Layout
11360 \family default
11361  dialog.
11362  There are some settings in the 
11363 \family sans
11364 Document
11365 \begin_inset space ~
11366 \end_inset
11367
11368 Layout
11369 \family default
11370  dialog that you should know about that are specific to this class:
11371 \end_layout
11372
11373 \begin_layout Itemize
11374 Don't change the options 
11375 \family sans
11376 Sides
11377 \family default
11378  and 
11379 \family sans
11380 Columns
11381 \family default
11382  on the 
11383 \family sans
11384 Document
11385 \begin_inset space ~
11386 \end_inset
11387
11388 Layout
11389 \family default
11390  dialog.
11391  They're ignored by the 
11392 \family sans
11393 foils
11394 \family default
11395  class.
11396 \end_layout
11397
11398 \begin_layout Itemize
11399 The default font size is 20
11400 \begin_inset space \thinspace{}
11401 \end_inset
11402
11403 pt with the other options being 17
11404 \begin_inset space \thinspace{}
11405 \end_inset
11406
11407 pt, 25
11408 \begin_inset space \thinspace{}
11409 \end_inset
11410
11411 pt and 30
11412 \begin_inset space \thinspace{}
11413 \end_inset
11414
11415 pt.
11416 \end_layout
11417
11418 \begin_layout Itemize
11419 The default font is 
11420 \family sans
11421 sans
11422 \family default
11423  
11424 \family sans
11425 serif
11426 \family default
11427  but all math equations are still typeset in the usual roman font.
11428 \end_layout
11429
11430 \begin_layout Itemize
11431
11432 \family sans
11433 Foil\SpecialChar TeX
11434
11435 \family default
11436  supports A4 and Letter paper sizes as well as a special size for working
11437  with 35
11438 \begin_inset space \thinspace{}
11439 \end_inset
11440
11441 mm slides.
11442  It doesn't support A5, B5, legal or executive paper sizes.
11443 \end_layout
11444
11445 \begin_layout Itemize
11446 Don't bother changing the 
11447 \family sans
11448 Float Placement
11449 \family default
11450  settings because they are ignored anyway.
11451  All floats appear where they are defined in the text.
11452 \end_layout
11453
11454 \begin_layout Itemize
11455 The 
11456 \family sans
11457 Pagestyle
11458 \family default
11459  setting behaves a bit differently for this class.
11460  
11461 \family sans
11462 Foil\SpecialChar TeX
11463
11464 \family default
11465  provides extensive footer and header capabilities including a user-defined
11466  logo.
11467  See section
11468 \begin_inset space ~
11469 \end_inset
11470
11471
11472 \begin_inset CommandInset ref
11473 LatexCommand ref
11474 reference "sec:foilfoot"
11475
11476 \end_inset
11477
11478  for more details.
11479  The title page is treated differently to all other pages in the document
11480  and is 
11481 \emph on
11482 always
11483 \emph default
11484  unnumbered and 
11485 \emph on
11486 always
11487 \emph default
11488  has the logo centered at the bottom of the page (if one is defined).
11489  The possible page style choices and what they do are as follows:
11490 \end_layout
11491
11492 \begin_deeper
11493 \begin_layout Labeling
11494 \labelwidthstring MMMMMMM
11495
11496 \family sans
11497 \series bold
11498 empty
11499 \family default
11500 \series default
11501  The final output contains no page numbers, or other headers or footers
11502  (except footnotes of course).
11503  
11504 \end_layout
11505
11506 \begin_layout Labeling
11507 \labelwidthstring MMMMMMM
11508
11509 \family sans
11510 \series bold
11511 plain
11512 \family default
11513 \series default
11514  The final output contains page numbers centered at the bottom of the page.
11515  No other headings or footers (other than footnotes).
11516 \end_layout
11517
11518 \begin_layout Labeling
11519 \labelwidthstring MMMMMMM
11520
11521 \series bold
11522 foilheadings
11523 \series default
11524  Page numbers in lower right corner.
11525  Additional headers and footers are also shown.
11526  This is also the default.
11527 \end_layout
11528
11529 \begin_layout Labeling
11530 \labelwidthstring MMMMMMM
11531
11532 \series bold
11533 fancy
11534 \series default
11535  Gives you access to the 
11536 \family sans
11537 fancyheadings
11538 \family default
11539  package although its use with 
11540 \family sans
11541 Foil\SpecialChar TeX
11542
11543 \family default
11544  is discouraged by the writer of the 
11545 \family sans
11546 Foil\SpecialChar TeX
11547
11548 \family default
11549  package because of some potential page layout clashes.
11550 \end_layout
11551
11552 \end_deeper
11553 \begin_layout Subsubsection
11554 Extra Options
11555 \end_layout
11556
11557 \begin_layout Standard
11558 The following options may be used in the extra class options in the 
11559 \family sans
11560 Document\SpecialChar menuseparator
11561 Settings
11562 \family default
11563  dialog.
11564 \end_layout
11565
11566 \begin_layout Labeling
11567 \labelwidthstring MMMMMMx
11568
11569 \series bold
11570 35mmSlide
11571 \series default
11572  This sets up the page layout for 7.33
11573 \begin_inset space \thinspace{}
11574 \end_inset
11575
11576 in by 11
11577 \begin_inset space \thinspace{}
11578 \end_inset
11579
11580 in paper, which is about the same aspect ratio as a 35
11581 \begin_inset space \thinspace{}
11582 \end_inset
11583
11584 mm slide, making it a bit easier to work with this medium.
11585 \end_layout
11586
11587 \begin_layout Labeling
11588 \labelwidthstring MMMMMMx
11589
11590 \series bold
11591 headrule
11592 \series default
11593  Places a rule across the page below the header on every page except the
11594  title page.
11595 \end_layout
11596
11597 \begin_layout Labeling
11598 \labelwidthstring MMMMMMx
11599
11600 \series bold
11601 footrule
11602 \series default
11603  Places a rule across the page above the footer on every page except the
11604  title page.
11605 \end_layout
11606
11607 \begin_layout Labeling
11608 \labelwidthstring MMMMMMx
11609
11610 \series bold
11611 dvips
11612 \series default
11613  This is automatically set each time you create a new 
11614 \family sans
11615 foils
11616 \family default
11617  document.
11618  This option tells 
11619 \family sans
11620 Foil\SpecialChar TeX
11621
11622 \family default
11623  to use the dvips driver to rotate those pages that are set as landscape
11624  foils.
11625 \end_layout
11626
11627 \begin_layout Labeling
11628 \labelwidthstring MMMMMMx
11629
11630 \series bold
11631 landscape
11632 \series default
11633  Simply changes the page dimensions to those of a landscape page but doesn't
11634  do any rotation.
11635  Thus if you use this option you need to use an external program to rotate
11636  each page or feed your paper through your printer as landscape.
11637  Note that this option effectively reverses the roles of the 
11638 \family sans
11639 Foilhead
11640 \family default
11641  and 
11642 \family sans
11643 Rotatefoilhead
11644 \family default
11645  environments (don't worry these are described in the next section).
11646 \end_layout
11647
11648 \begin_layout Labeling
11649 \labelwidthstring MMMMMMx
11650
11651 \series bold
11652 leqno
11653 \series default
11654  Equation numbers on the left.
11655 \end_layout
11656
11657 \begin_layout Labeling
11658 \labelwidthstring MMMMMMx
11659
11660 \series bold
11661 fleqn
11662 \series default
11663  Flush-left equations.
11664 \end_layout
11665
11666 \begin_layout Subsection
11667 Supported Environments
11668 \end_layout
11669
11670 \begin_layout Standard
11671 Most of the environments commonly supported in other classes are also supported
11672  by the 
11673 \family sans
11674 foils
11675 \family default
11676  class.
11677  There are several additional environments provided by 
11678 \family sans
11679 Foil\SpecialChar TeX
11680
11681 \family default
11682  as well as a couple added by \SpecialChar LyX
11683 .
11684  The following environments are shared with other classes:
11685 \end_layout
11686
11687 \begin_layout Standard
11688 \begin_inset Flex Multiple Columns
11689 status open
11690
11691 \begin_layout Itemize
11692
11693 \family sans
11694 Standard
11695 \end_layout
11696
11697 \begin_layout Itemize
11698
11699 \family sans
11700 Itemize
11701 \end_layout
11702
11703 \begin_layout Itemize
11704
11705 \family sans
11706 Enumerate
11707 \end_layout
11708
11709 \begin_layout Itemize
11710
11711 \family sans
11712 Description
11713 \end_layout
11714
11715 \begin_layout Itemize
11716
11717 \family sans
11718 List
11719 \end_layout
11720
11721 \begin_layout Itemize
11722
11723 \family sans
11724 \SpecialChar LyX
11725 -Code
11726 \end_layout
11727
11728 \begin_layout Itemize
11729
11730 \family sans
11731 Verse
11732 \end_layout
11733
11734 \begin_layout Itemize
11735
11736 \family sans
11737 Quote
11738 \end_layout
11739
11740 \begin_layout Itemize
11741
11742 \family sans
11743 Quotation
11744 \end_layout
11745
11746 \begin_layout Itemize
11747
11748 \family sans
11749 Title
11750 \end_layout
11751
11752 \begin_layout Itemize
11753
11754 \family sans
11755 Author
11756 \end_layout
11757
11758 \begin_layout Itemize
11759
11760 \family sans
11761 Date
11762 \end_layout
11763
11764 \begin_layout Itemize
11765
11766 \family sans
11767 Abstract
11768 \end_layout
11769
11770 \begin_layout Itemize
11771
11772 \family sans
11773 Bibliography
11774 \end_layout
11775
11776 \begin_layout Itemize
11777
11778 \family sans
11779 Address
11780 \end_layout
11781
11782 \begin_layout Itemize
11783
11784 \family sans
11785 RightAddress
11786 \end_layout
11787
11788 \begin_layout Itemize
11789
11790 \family sans
11791 Caption
11792 \end_layout
11793
11794 \begin_layout Itemize
11795
11796 \family sans
11797 Comment
11798 \end_layout
11799
11800 \end_inset
11801
11802
11803 \end_layout
11804
11805 \begin_layout Standard
11806 That is, all the major environments apart from the sectioning environments.
11807  Since foils are essentially self-contained sections, with a title and body,
11808  
11809 \family sans
11810 Foil\SpecialChar TeX
11811
11812 \family default
11813  provides specific commands for starting new foils and these are:
11814 \end_layout
11815
11816 \begin_layout Itemize
11817
11818 \family sans
11819 Foilhead
11820 \end_layout
11821
11822 \begin_layout Itemize
11823
11824 \family sans
11825 Rotatefoilhead
11826 \end_layout
11827
11828 \begin_layout Standard
11829 \SpecialChar LyX
11830  also provides slightly modified versions of these two environments called:
11831 \end_layout
11832
11833 \begin_layout Itemize
11834
11835 \family sans
11836 ShortFoilhead
11837 \end_layout
11838
11839 \begin_layout Itemize
11840
11841 \family sans
11842 ShortRotatefoilhead
11843 \end_layout
11844
11845 \begin_layout Standard
11846 and the differences will be explained in the next section.
11847 \end_layout
11848
11849 \begin_layout Standard
11850 Since foils are often used in presenting ideas or new theorems and such
11851  
11852 \family sans
11853 Foil\SpecialChar TeX
11854
11855 \family default
11856  also provides a comprehensive box of goodies for presenting them:
11857 \end_layout
11858
11859 \begin_layout Standard
11860 \begin_inset Flex Multiple Columns
11861 status open
11862
11863 \begin_layout Itemize
11864
11865 \family sans
11866 Theorem
11867 \end_layout
11868
11869 \begin_layout Itemize
11870
11871 \family sans
11872 Lemma
11873 \end_layout
11874
11875 \begin_layout Itemize
11876
11877 \family sans
11878 Corollary
11879 \end_layout
11880
11881 \begin_layout Itemize
11882
11883 \family sans
11884 Proposition
11885 \end_layout
11886
11887 \begin_layout Itemize
11888
11889 \family sans
11890 Definition
11891 \end_layout
11892
11893 \begin_layout Itemize
11894
11895 \family sans
11896 Proof
11897 \end_layout
11898
11899 \begin_layout Itemize
11900
11901 \family sans
11902 Theorem*
11903 \end_layout
11904
11905 \begin_layout Itemize
11906
11907 \family sans
11908 Lemma*
11909 \end_layout
11910
11911 \begin_layout Itemize
11912
11913 \family sans
11914 Corollary*
11915 \end_layout
11916
11917 \begin_layout Itemize
11918
11919 \family sans
11920 Proposition*
11921 \end_layout
11922
11923 \begin_layout Itemize
11924
11925 \family sans
11926 Definition*
11927 \end_layout
11928
11929 \end_inset
11930
11931
11932 \end_layout
11933
11934 \begin_layout Standard
11935 The starred versions are unnumbered while the unstarred versions are numbered.
11936  There are also two list environments added by \SpecialChar LyX
11937  and these are:
11938 \end_layout
11939
11940 \begin_layout Itemize
11941
11942 \family sans
11943 TickList
11944 \end_layout
11945
11946 \begin_layout Itemize
11947
11948 \family sans
11949 CrossList
11950 \end_layout
11951
11952 \begin_layout Standard
11953
11954 \family sans
11955 Foil\SpecialChar TeX
11956
11957 \family default
11958  provides some powerful header and footer capabilities that are best set
11959  in the preamble although they may be set at any point in a document.
11960  If you want to change these settings in your document the best place to
11961  do so is at the very top of a foil, i.
11962 \begin_inset space \thinspace{}
11963 \end_inset
11964
11965 e.
11966 \emph on
11967
11968 \begin_inset space \space{}
11969 \end_inset
11970
11971
11972 \emph default
11973 straight after the foilhead.
11974 \end_layout
11975
11976 \begin_layout Standard
11977 For this purpose, the following command styles are provided [
11978 \shape smallcaps
11979 Martin Vermeer
11980 \shape default
11981 ]:
11982 \end_layout
11983
11984 \begin_layout Standard
11985 \begin_inset Flex Multiple Columns
11986 status open
11987
11988 \begin_layout Itemize
11989
11990 \family sans
11991 My
11992 \begin_inset space ~
11993 \end_inset
11994
11995 Logo
11996 \end_layout
11997
11998 \begin_layout Itemize
11999
12000 \family sans
12001 Restriction
12002 \end_layout
12003
12004 \begin_layout Itemize
12005
12006 \family sans
12007 Right
12008 \begin_inset space ~
12009 \end_inset
12010
12011 Footer
12012 \end_layout
12013
12014 \begin_layout Itemize
12015
12016 \family sans
12017 Right
12018 \begin_inset space ~
12019 \end_inset
12020
12021 Header
12022 \end_layout
12023
12024 \begin_layout Itemize
12025
12026 \family sans
12027 Left
12028 \begin_inset space ~
12029 \end_inset
12030
12031 Header
12032 \end_layout
12033
12034 \begin_deeper
12035 \begin_layout Plain Layout
12036 \begin_inset space ~
12037 \end_inset
12038
12039
12040 \end_layout
12041
12042 \end_deeper
12043 \end_inset
12044
12045
12046 \end_layout
12047
12048 \begin_layout Standard
12049 There are also a few commands provided by 
12050 \family sans
12051 Foil\SpecialChar TeX
12052
12053 \family default
12054  that aren't directly supported by \SpecialChar LyX
12055  but I'll tell you what they do and how
12056  to use them in section
12057 \begin_inset space ~
12058 \end_inset
12059
12060
12061 \begin_inset CommandInset ref
12062 LatexCommand ref
12063 reference "sec:unsuppfoils"
12064
12065 \end_inset
12066
12067 .
12068 \end_layout
12069
12070 \begin_layout Subsection
12071 Building a Set of Foils
12072 \end_layout
12073
12074 \begin_layout Standard
12075 This section will give a simple introduction to using the different environments
12076  to build a set of foils.
12077  If you want to see an example set of foils, take a look at the 
12078 \family typewriter
12079 Foils.lyx
12080 \family default
12081  file you find in \SpecialChar LyX
12082 's 
12083 \family typewriter
12084 examples
12085 \family default
12086  folder.
12087 \end_layout
12088
12089 \begin_layout Subsubsection
12090 Give It a Title Page
12091 \end_layout
12092
12093 \begin_layout Standard
12094 Unlike other classes that provide 
12095 \family sans
12096 Title
12097 \family default
12098
12099 \family sans
12100 Author
12101 \family default
12102
12103 \family sans
12104 Date
12105 \family default
12106  and 
12107 \family sans
12108 Abstract
12109 \family default
12110  environments, 
12111 \family sans
12112 foils
12113 \family default
12114  creates the title on a page of its own.
12115  If you leave out the 
12116 \family sans
12117 Date
12118 \family default
12119  environment \SpecialChar LaTeX
12120  will substitute the current date (every time you regenerate
12121  the output).
12122 \end_layout
12123
12124 \begin_layout Subsubsection
12125 Start a New Foil
12126 \end_layout
12127
12128 \begin_layout Standard
12129 As I mentioned earlier, there are four ways of starting a new foil.
12130  For portrait foils you should use 
12131 \family sans
12132 Foilhead
12133 \family default
12134  or 
12135 \family sans
12136 ShortFoilhead.
12137
12138 \family default
12139  The difference between these two environments is the amount of space between
12140  the title of the foil (the foilhead) and the body of the foil.
12141 \end_layout
12142
12143 \begin_layout Standard
12144 Landscape foils are generated using the 
12145 \family sans
12146 Rotatefoilhead
12147 \family default
12148  and 
12149 \family sans
12150 ShortRotatefoilhead
12151 \family default
12152  environments.
12153  Again the only difference is the spacing between foilhead and body.
12154  Both of the short versions have 0.5
12155 \begin_inset space ~
12156 \end_inset
12157
12158 inches less separation between the foilhead and the body.
12159  
12160 \end_layout
12161
12162 \begin_layout Standard
12163 One problem with the support for landscape foils is the requirement that
12164  you have to use the 
12165 \family typewriter
12166 dvips
12167 \family default
12168  driver to generate the PostScript output otherwise the foils won't be rotated.
12169  It is possible to get landscape foils even if you haven't got the 
12170 \family typewriter
12171 dvips
12172 \family default
12173  driver provided you can feed your foils sideways through your printer ;-)
12174 \end_layout
12175
12176 \begin_layout Subsubsection
12177 Theorems, Lemmas, Proofs and more
12178 \end_layout
12179
12180 \begin_layout Standard
12181 Due to a small bug in \SpecialChar LyX
12182  you can't have two of the same type of these environments
12183  directly following each other.
12184  They must be separated by something.
12185  If you try, you will just be extending the previous environment as if you
12186  had merged the two environments together.
12187  So, how do you get around this problem? The simplest option is to insert
12188  some text between the two environments or add a 
12189 \family sans
12190 \SpecialChar LaTeX
12191
12192 \family default
12193  environment between the two with just a 
12194 \begin_inset Quotes eld
12195 \end_inset
12196
12197
12198 \family typewriter
12199 %
12200 \family default
12201
12202 \begin_inset Quotes erd
12203 \end_inset
12204
12205  in it.
12206  This will force \SpecialChar LyX
12207  to produce two separate environments and hence the correct
12208  \SpecialChar LaTeX
12209  output.
12210  An example is provided in the example file included with the \SpecialChar LyX
12211  distribution.
12212  Remember, this problem only occurs if you are trying to place two of the
12213  same type of theorem-like environments one directly after the other.
12214 \end_layout
12215
12216 \begin_layout Subsubsection
12217 Lists
12218 \end_layout
12219
12220 \begin_layout Standard
12221 You get all the commonly supported list styles found in other classes as
12222  well as two new ones.
12223  I'll only describe the new ones here.
12224  If you want to find out more about the other list environments check out
12225  the 
12226 \emph on
12227 User's Guide.
12228
12229 \emph default
12230  If you intend to use itemized lists you might also want to read about the
12231  
12232 \family sans
12233 Itemize
12234 \begin_inset space ~
12235 \end_inset
12236
12237 Bullet
12238 \begin_inset space ~
12239 \end_inset
12240
12241 Selection
12242 \family default
12243  dialog described above in section
12244 \begin_inset space ~
12245 \end_inset
12246
12247
12248 \begin_inset CommandInset ref
12249 LatexCommand ref
12250 reference "sec:bullet"
12251
12252 \end_inset
12253
12254 .
12255 \end_layout
12256
12257 \begin_layout Standard
12258 The two new list styles, 
12259 \family sans
12260 TickList
12261 \family default
12262  and 
12263 \family sans
12264 CrossList
12265 \family default
12266 , are designed to make it easier for you to create lists of do's and don'ts
12267  or right and wrong by providing dedicated environments that use a tick
12268  or a cross as the label of the list.
12269  These lists are in fact dedicated variants of the 
12270 \family sans
12271 Itemize
12272 \family default
12273  environment.
12274  They do however require that you have the 
12275 \family typewriter
12276 psnfss
12277 \family default
12278  packages installed.
12279 \end_layout
12280
12281 \begin_layout Subsubsection
12282 Figures and Tables
12283 \end_layout
12284
12285 \begin_layout Standard
12286
12287 \family sans
12288 Foil\SpecialChar TeX
12289
12290 \family default
12291  redefines the floating tables and figures so that they appear exactly where
12292  they are in the text rather than pushing them to the top of the page or
12293  to some user specified location.
12294  In fact if you change the float placement settings they are simply ignored.
12295 \end_layout
12296
12297 \begin_layout Subsubsection
12298 Page Headers and Footers
12299 \begin_inset CommandInset label
12300 LatexCommand label
12301 name "sec:foilfoot"
12302
12303 \end_inset
12304
12305
12306 \end_layout
12307
12308 \begin_layout Standard
12309
12310 \family sans
12311 My
12312 \begin_inset space ~
12313 \end_inset
12314
12315 Logo
12316 \family default
12317  and 
12318 \family sans
12319 Restriction
12320 \family default
12321  are two commands used to control the left-footer text string.
12322  The first is meant to allow you to include a graphic logo on your foils
12323  and defaults to 
12324 \begin_inset Quotes eld
12325 \end_inset
12326
12327 -Typeset by 
12328 \family sans
12329 Foil\SpecialChar TeX
12330
12331 \family default
12332 -
12333 \begin_inset Quotes erd
12334 \end_inset
12335
12336 .
12337  While the second is meant to provide a classification for the audience,
12338  
12339 \emph on
12340 e.
12341 \begin_inset space \thinspace{}
12342 \end_inset
12343
12344 g.
12345 \emph default
12346
12347 \begin_inset space \space{}
12348 \end_inset
12349
12350 Confidential.
12351  It is empty by default.
12352 \end_layout
12353
12354 \begin_layout Standard
12355 The remaining page corners can be filled by 
12356 \family sans
12357 Right
12358 \begin_inset space ~
12359 \end_inset
12360
12361 Footer
12362 \family default
12363  (which defaults to page numbers), 
12364 \family sans
12365 Right
12366 \begin_inset space ~
12367 \end_inset
12368
12369 Header
12370 \family default
12371  (top right) and 
12372 \family sans
12373 Left
12374 \begin_inset space ~
12375 \end_inset
12376
12377 Header
12378 \family default
12379  (top left).
12380 \end_layout
12381
12382 \begin_layout Subsection
12383 Unsupported 
12384 \family sans
12385 Foil\SpecialChar TeX
12386
12387 \family default
12388  Goodies
12389 \begin_inset CommandInset label
12390 LatexCommand label
12391 name "sec:unsuppfoils"
12392
12393 \end_inset
12394
12395
12396 \end_layout
12397
12398 \begin_layout Standard
12399 All the commands mentioned below need to be set in a 
12400 \family sans
12401 \SpecialChar LaTeX
12402
12403 \family default
12404  environment or as 
12405 \family sans
12406 \SpecialChar TeX
12407
12408 \family default
12409  within another environment.
12410 \end_layout
12411
12412 \begin_layout Subsubsection
12413 Lengths
12414 \end_layout
12415
12416 \begin_layout Standard
12417 All lengths are adjusted using the 
12418 \family typewriter
12419
12420 \backslash
12421 setlength{
12422 \family default
12423 \emph on
12424 lengthname
12425 \family typewriter
12426 \emph default
12427 }{
12428 \family default
12429 \emph on
12430 newlength
12431 \family typewriter
12432 \emph default
12433 }
12434 \family default
12435  command.
12436  Where 
12437 \emph on
12438 lengthname
12439 \emph default
12440  should be replaced by the name given to the length you want to change and
12441  
12442 \emph on
12443 newlength
12444 \emph default
12445  is the length value.
12446  All lengths should be specified in units of length such as inches (
12447 \family typewriter
12448 in
12449 \family default
12450 ), millimeters (
12451 \family typewriter
12452 mm
12453 \family default
12454 ) or points (
12455 \family typewriter
12456 pt
12457 \family default
12458 ) or relative to some document or font-based length such as 
12459 \family typewriter
12460
12461 \backslash
12462 textwidth
12463 \family default
12464 .
12465  
12466 \end_layout
12467
12468 \begin_layout Standard
12469 It's possible to change the spacing between a foilhead and the body of the
12470  foil by adjusting the length specified by 
12471 \family typewriter
12472
12473 \backslash
12474 foilheadskip
12475 \family default
12476 .
12477  For example, to make 
12478 \emph on
12479 all
12480 \emph default
12481  foilheads 0.5
12482 \begin_inset space \space{}
12483 \end_inset
12484
12485 in closer to their bodies put the following in the preamble: 
12486 \family typewriter
12487
12488 \backslash
12489 setlength{
12490 \backslash
12491 foilheadskip}{-0.5in}
12492 \end_layout
12493
12494 \begin_layout Standard
12495 The spacings around floats can be adjusted by setting these lengths:
12496 \end_layout
12497
12498 \begin_layout Labeling
12499 \labelwidthstring MMMMMMMMMMM
12500
12501 \family typewriter
12502
12503 \backslash
12504 abovefloatskip
12505 \family default
12506  Separation between the text and the top of the float
12507 \end_layout
12508
12509 \begin_layout Labeling
12510 \labelwidthstring MMMMMMMMMMM
12511
12512 \family typewriter
12513
12514 \backslash
12515 abovecaptionskip
12516 \family default
12517  Separation between the float and the caption
12518 \end_layout
12519
12520 \begin_layout Labeling
12521 \labelwidthstring MMMMMMMMMMM
12522
12523 \family typewriter
12524
12525 \backslash
12526 belowcaptionskip
12527 \family default
12528  Separation between the caption and the following text
12529 \end_layout
12530
12531 \begin_layout Labeling
12532 \labelwidthstring MMMMMMMMMMM
12533
12534 \family typewriter
12535
12536 \backslash
12537 captionwidth
12538 \family default
12539  You can make the captions narrower than the surrounding text by adjusting
12540  this length.
12541  Best done relative to 
12542 \family typewriter
12543
12544 \backslash
12545 textwidth
12546 \family default
12547 .
12548 \end_layout
12549
12550 \begin_layout Standard
12551 There are also several title page related lengths that you may find useful
12552  if you have a long title or several authors:
12553 \end_layout
12554
12555 \begin_layout Labeling
12556 \labelwidthstring MMMMMMMMMMM
12557
12558 \family typewriter
12559
12560 \backslash
12561 abovetitleskip
12562 \family default
12563  Separation from headers to 
12564 \family sans
12565 Title
12566 \end_layout
12567
12568 \begin_layout Labeling
12569 \labelwidthstring MMMMMMMMMMM
12570
12571 \family typewriter
12572
12573 \backslash
12574 titleauthorskip
12575 \family default
12576  between 
12577 \family sans
12578 Title
12579 \family default
12580  and 
12581 \family sans
12582 Author
12583 \family default
12584  environments
12585 \end_layout
12586
12587 \begin_layout Labeling
12588 \labelwidthstring MMMMMMMMMMM
12589
12590 \family typewriter
12591
12592 \backslash
12593 authorauthorskip
12594 \family default
12595  between multiple 
12596 \family sans
12597 Author
12598 \family default
12599  lines
12600 \end_layout
12601
12602 \begin_layout Labeling
12603 \labelwidthstring MMMMMMMMMMM
12604
12605 \family typewriter
12606
12607 \backslash
12608 authordateskip
12609 \family default
12610  between the 
12611 \family sans
12612 Author
12613 \family default
12614  and the 
12615 \family sans
12616 Date
12617 \end_layout
12618
12619 \begin_layout Labeling
12620 \labelwidthstring MMMMMMMMMMM
12621
12622 \family typewriter
12623
12624 \backslash
12625 dateabstractskip
12626 \family default
12627  between the 
12628 \family sans
12629 Date
12630 \family default
12631  and the 
12632 \family sans
12633 Abstract
12634 \end_layout
12635
12636 \begin_layout Standard
12637 The last length related command affects all the list environments.
12638  If you place 
12639 \family typewriter
12640
12641 \backslash
12642 zerolistvertdimens
12643 \family default
12644  
12645 \emph on
12646 inside
12647 \emph default
12648  a list environment then all the vertical spacing between the list items
12649  is removed.
12650  Note that this is a command not a length so it doesn't require 
12651 \family typewriter
12652
12653 \backslash
12654 setlength
12655 \family default
12656  like the stuff mentioned above.
12657 \end_layout
12658
12659 \begin_layout Subsubsection
12660 Headers and Footers
12661 \end_layout
12662
12663 \begin_layout Standard
12664 The 
12665 \family typewriter
12666
12667 \backslash
12668 LogoOn
12669 \family default
12670  and 
12671 \family typewriter
12672
12673 \backslash
12674 LogoOff
12675 \family default
12676  commands control whether the logo in the 
12677 \family sans
12678 MyLogo
12679 \family default
12680  definition appear on a given page.
12681  If you put 
12682 \family typewriter
12683
12684 \backslash
12685 LogoOff
12686 \family default
12687  in the preamble then none of the foils will have the logo on them.
12688  If you don't want the logo on a particular page place the 
12689 \family typewriter
12690
12691 \backslash
12692 LogoOff
12693 \family default
12694  directly after the foilhead of that page and the 
12695 \family typewriter
12696
12697 \backslash
12698 LogoOn
12699 \family default
12700  directly after the next foilhead.
12701 \end_layout
12702
12703 \begin_layout Standard
12704 If you decide to use the 
12705 \family sans
12706 fancy
12707 \family default
12708  page style setting in the 
12709 \family sans
12710 Document
12711 \begin_inset space ~
12712 \end_inset
12713
12714 Layout
12715 \family default
12716  dialog you should probably add 
12717 \family typewriter
12718
12719 \backslash
12720 let
12721 \backslash
12722 headwidth
12723 \backslash
12724 textwidth
12725 \family default
12726  to your preamble so headers and footers on landscape pages are correctly
12727  placed when rotated.
12728  This is due to some clashes between the page layouts provided by the 
12729 \family sans
12730 fancyheadings
12731 \family default
12732  package and the 
12733 \family sans
12734 foils
12735 \family default
12736  class.
12737 \end_layout
12738
12739 \begin_layout Section
12740 Hollywood (Hollywood spec scripts)
12741 \end_layout
12742
12743 \begin_layout Standard
12744 by 
12745 \shape smallcaps
12746 Garst Reese
12747 \end_layout
12748
12749 \begin_layout Subsection
12750 Introduction
12751 \end_layout
12752
12753 \begin_layout Standard
12754 Getting the format of a Hollywood script right is a 
12755 \begin_inset Quotes eld
12756 \end_inset
12757
12758 rite of passage.
12759 \begin_inset Quotes erd
12760 \end_inset
12761
12762  It is designed to make the readers focus on content and to be easy and
12763  familiar for the actors to read.
12764  Each page of a script should be one minute of film.
12765  Nothing goes in a script that you cannot see or hear on screen.
12766  The courier 12 pt font should be used throughout.
12767  No italics.
12768 \end_layout
12769
12770 \begin_layout Subsection
12771 Special problems
12772 \end_layout
12773
12774 \begin_layout Standard
12775 Speakers' lines should NEVER break in mid-sentence.
12776  If a speaker's lines continue over a page break, repeat the 
12777 \family sans
12778 Speaker
12779 \family default
12780  title followed by (Cont'd).
12781 \end_layout
12782
12783 \begin_layout Subsection
12784 Special features
12785 \end_layout
12786
12787 \begin_layout Standard
12788 Insert the 
12789 \family sans
12790 Speaker
12791 \family default
12792  names as labels then cross-reference the label to insert the name.
12793  The cross-reference dialog will show the current cast of characters.
12794  You can use this to insert the speaker name in narratives also.
12795 \end_layout
12796
12797 \begin_layout Subsection
12798 Paper size and Margins
12799 \end_layout
12800
12801 \begin_layout Standard
12802 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
12803 \end_layout
12804
12805 \begin_layout Subsection
12806 Environments
12807 \end_layout
12808
12809 \begin_layout Standard
12810 The following environments are available.
12811  You can use hollywood.bind to get the bind keys shown at the right.
12812 \end_layout
12813
12814 \begin_layout Itemize
12815
12816 \family sans
12817 Standard
12818 \begin_inset Newline newline
12819 \end_inset
12820
12821
12822 \family default
12823 Used where nothing else works.
12824  Try to avoid it.
12825 \end_layout
12826
12827 \begin_layout Itemize
12828
12829 \family sans
12830 FADE_IN
12831 \family default
12832 :
12833 \begin_inset space \hfill{}
12834 \end_inset
12835
12836
12837 \family sans
12838 M-z S-I
12839 \family default
12840
12841 \begin_inset Newline newline
12842 \end_inset
12843
12844 Usually followed by something like 
12845 \begin_inset Quotes eld
12846 \end_inset
12847
12848 on Sally waking up.
12849 \begin_inset Quotes erd
12850 \end_inset
12851
12852
12853 \end_layout
12854
12855 \begin_layout Itemize
12856
12857 \family sans
12858 INT:
12859 \begin_inset space \hfill{}
12860 \end_inset
12861
12862 M-z i
12863 \begin_inset Newline newline
12864 \end_inset
12865
12866
12867 \family default
12868 Introduces a new INTERIOR camera set-up.
12869  Always followed by DAY or NIGHT, or something similar to define the lighting
12870  required.
12871  Everthing on this line in CAPS.
12872 \end_layout
12873
12874 \begin_layout Itemize
12875
12876 \family sans
12877 EXT:
12878 \begin_inset space \hfill{}
12879 \end_inset
12880
12881 M-z e
12882 \begin_inset Newline newline
12883 \end_inset
12884
12885
12886 \family default
12887 Introduces a new EXTERIOR camera set-up.
12888  Everthing on this line in CAPS.
12889 \end_layout
12890
12891 \begin_layout Itemize
12892
12893 \family sans
12894 Speaker
12895 \begin_inset space \hfill{}
12896 \end_inset
12897
12898 M-z s
12899 \begin_inset Newline newline
12900 \end_inset
12901
12902
12903 \family default
12904 The character speaking.
12905 \end_layout
12906
12907 \begin_layout Itemize
12908
12909 \family sans
12910 Parenthetical
12911 \begin_inset space \hfill{}
12912 \end_inset
12913
12914 M-z p
12915 \begin_inset Newline newline
12916 \end_inset
12917
12918
12919 \family default
12920 Instructions to the speaker.
12921  The () are automatically inserted, but only the ( will show in \SpecialChar LyX
12922 .
12923  Both will be printed.
12924 \end_layout
12925
12926 \begin_layout Itemize
12927
12928 \family sans
12929 Dialogue
12930 \begin_inset space \hfill{}
12931 \end_inset
12932
12933 M-z d
12934 \begin_inset Newline newline
12935 \end_inset
12936
12937
12938 \family default
12939 What the 
12940 \family sans
12941 Speaker
12942 \family default
12943  says.
12944 \end_layout
12945
12946 \begin_layout Itemize
12947
12948 \family sans
12949 Transition
12950 \begin_inset space \hfill{}
12951 \end_inset
12952
12953 M-z t
12954 \begin_inset Newline newline
12955 \end_inset
12956
12957
12958 \family default
12959 Camera movement instruction.
12960  e.
12961 \begin_inset space \thinspace{}
12962 \end_inset
12963
12964 g.
12965 \begin_inset space \space{}
12966 \end_inset
12967
12968 CUT TO:
12969 \end_layout
12970
12971 \begin_layout Itemize
12972
12973 \family sans
12974 FADE OUT:
12975 \begin_inset space \hfill{}
12976 \end_inset
12977
12978 M-z S-I
12979 \end_layout
12980
12981 \begin_layout Itemize
12982
12983 \family sans
12984 Author
12985 \begin_inset space \hfill{}
12986 \end_inset
12987
12988 M-z S-A
12989 \end_layout
12990
12991 \begin_layout Itemize
12992
12993 \family sans
12994 Title
12995 \begin_inset space \hfill{}
12996 \end_inset
12997
12998 M-z S-T
12999 \end_layout
13000
13001 \begin_layout Itemize
13002
13003 \family sans
13004 Right_Address
13005 \begin_inset space \hfill{}
13006 \end_inset
13007
13008 M-z r
13009 \end_layout
13010
13011 \begin_layout Subsection
13012 Script jargon
13013 \end_layout
13014
13015 \begin_layout Itemize
13016 (O.S) — off screen
13017 \end_layout
13018
13019 \begin_layout Itemize
13020 (V.0) — voice over
13021 \end_layout
13022
13023 \begin_layout Itemize
13024 b.
13025 \begin_inset space \thinspace{}
13026 \end_inset
13027
13028 g.
13029  — background
13030 \end_layout
13031
13032 \begin_layout Itemize
13033 C.U.
13034  — close-up
13035 \end_layout
13036
13037 \begin_layout Itemize
13038 PAN — camera movement
13039 \end_layout
13040
13041 \begin_layout Itemize
13042 INSERT — cut to close-up of
13043 \end_layout
13044
13045 \begin_layout Section
13046 ijmpc and ijmpd
13047 \end_layout
13048
13049 \begin_layout Standard
13050 by 
13051 \noun on
13052 Panayotis Papasotiriou
13053 \end_layout
13054
13055 \begin_layout Subsection
13056 Overview
13057 \end_layout
13058
13059 \begin_layout Standard
13060 The ijmpc package is a set of macros that facilitates electronic manuscript
13061  submission to the 
13062 \emph on
13063 International Journal of Modern Physics C
13064 \emph default
13065 .
13066  Similarly, the ijmpd package is for creating manuscripts to be submitted
13067  to the 
13068 \emph on
13069 International Journal of Modern Physics D
13070 \emph default
13071 .
13072  Both journals are published by World Scientific.
13073  The corresponding document classes are named 
13074 \family typewriter
13075 ws-ijmpc.cls
13076 \family default
13077  and 
13078 \family typewriter
13079 ws-ijmpd.cls
13080 \family default
13081 , respectively.
13082  These files, together with instructions for the authors, can be downloaded
13083  from the sites 
13084 \begin_inset Flex URL
13085 status collapsed
13086
13087 \begin_layout Plain Layout
13088
13089 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
13090 \end_layout
13091
13092 \end_inset
13093
13094  and 
13095 \begin_inset Flex URL
13096 status collapsed
13097
13098 \begin_layout Plain Layout
13099
13100 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
13101 \end_layout
13102
13103 \end_inset
13104
13105 .
13106  Both packages are modified versions of the standard 
13107 \begin_inset Quotes eld
13108 \end_inset
13109
13110 article
13111 \begin_inset Quotes erd
13112 \end_inset
13113
13114  package, and they are almost (but not exactly) identical.
13115  Most of their features are supported by \SpecialChar LyX
13116 .
13117  I have used \SpecialChar LyX
13118  successfully to write articles submitted to both journals
13119  without any problem.
13120 \end_layout
13121
13122 \begin_layout Subsection
13123 Writing a paper
13124 \end_layout
13125
13126 \begin_layout Standard
13127 As usual, the easiest way to write a paper is to start with a template.
13128  Click on 
13129 \family sans
13130 File\SpecialChar menuseparator
13131 New from
13132 \family default
13133  
13134 \family sans
13135 Template
13136 \family default
13137 , then choose the 
13138 \family typewriter
13139 ijmpc.lyx
13140 \family default
13141  or 
13142 \family typewriter
13143 ijmpd.lyx
13144 \family default
13145  template.
13146  This will give an (almost) empty document that includes the most common
13147  fields found in a manuscript.
13148  Simply overwrite the existing text (including the brackets, 
13149 \family typewriter
13150 <>
13151 \family default
13152 ) with your text.
13153  You should keep in mind the following remarks.
13154 \end_layout
13155
13156 \begin_layout Enumerate
13157 \SpecialChar LyX
13158  won't let you change the font size and the page style of the document,
13159  because such modifications are not allowed by both packages.
13160 \end_layout
13161
13162 \begin_layout Enumerate
13163 The language of the document should not be changed.
13164  Before previewing your paper, be sure that the babel package is not used.
13165  To do this, click on 
13166 \family sans
13167 Tools\SpecialChar menuseparator
13168 Preferences
13169 \family default
13170 , select the 
13171 \family sans
13172 Lang Opts
13173 \family default
13174  tab, deselect the 
13175 \family sans
13176 Use babel
13177 \family default
13178  checkbox in the language settings, and click on 
13179 \family sans
13180 Apply
13181 \family default
13182  (or 
13183 \family sans
13184 Save
13185 \family default
13186 , if you wish to make this change permanent).
13187 \end_layout
13188
13189 \begin_layout Enumerate
13190 The 
13191 \begin_inset Quotes eld
13192 \end_inset
13193
13194 Keywords
13195 \begin_inset Quotes erd
13196 \end_inset
13197
13198  style must be used to define keywords.
13199 \end_layout
13200
13201 \begin_layout Enumerate
13202 The ijmpc package provides a style named 
13203 \begin_inset Quotes eld
13204 \end_inset
13205
13206 Classification Codes
13207 \begin_inset Quotes erd
13208 \end_inset
13209
13210 , which can be used to define classification codes, such as PACS numbers.
13211  Note that this facility is not supported by the ijmpd package.
13212 \end_layout
13213
13214 \begin_layout Enumerate
13215 Several new environments are available: 
13216 \begin_inset Quotes eld
13217 \end_inset
13218
13219 Definition
13220 \begin_inset Quotes erd
13221 \end_inset
13222
13223
13224 \begin_inset Quotes eld
13225 \end_inset
13226
13227 Step
13228 \begin_inset Quotes erd
13229 \end_inset
13230
13231
13232 \begin_inset Quotes eld
13233 \end_inset
13234
13235 Example
13236 \begin_inset Quotes erd
13237 \end_inset
13238
13239
13240 \begin_inset Quotes eld
13241 \end_inset
13242
13243 Remark
13244 \begin_inset Quotes erd
13245 \end_inset
13246
13247
13248 \begin_inset Quotes eld
13249 \end_inset
13250
13251 Notation
13252 \begin_inset Quotes erd
13253 \end_inset
13254
13255
13256 \begin_inset Quotes eld
13257 \end_inset
13258
13259 Theorem
13260 \begin_inset Quotes erd
13261 \end_inset
13262
13263
13264 \begin_inset Quotes eld
13265 \end_inset
13266
13267 Proof
13268 \begin_inset Quotes erd
13269 \end_inset
13270
13271
13272 \begin_inset Quotes eld
13273 \end_inset
13274
13275 Corollary
13276 \begin_inset Quotes erd
13277 \end_inset
13278
13279
13280 \begin_inset Quotes eld
13281 \end_inset
13282
13283 Lemma
13284 \begin_inset Quotes erd
13285 \end_inset
13286
13287
13288 \begin_inset Quotes eld
13289 \end_inset
13290
13291 Proposition
13292 \begin_inset Quotes erd
13293 \end_inset
13294
13295
13296 \begin_inset Quotes eld
13297 \end_inset
13298
13299 Prop
13300 \begin_inset Quotes erd
13301 \end_inset
13302
13303
13304 \begin_inset Quotes eld
13305 \end_inset
13306
13307 Question
13308 \begin_inset Quotes erd
13309 \end_inset
13310
13311
13312 \begin_inset Quotes eld
13313 \end_inset
13314
13315 Claim
13316 \begin_inset Quotes erd
13317 \end_inset
13318
13319 , and 
13320 \begin_inset Quotes eld
13321 \end_inset
13322
13323 Conjecture
13324 \begin_inset Quotes erd
13325 \end_inset
13326
13327 .
13328  Their use is more or less obvious.
13329  \SpecialChar LyX
13330  supports all these environments; it will use the proper label, text style,
13331  and numbering scheme for each of them.
13332 \end_layout
13333
13334 \begin_layout Enumerate
13335 Both packages use basic citations; the natbib package should not be used.
13336  In \SpecialChar LyX
13337 , citation references are shown as usual; in the output, citations are
13338  shown as superscripts.
13339  If you want to use a citation as normal text, you should use the 
13340 \family typewriter
13341 refcite
13342 \family default
13343  command, e.
13344 \begin_inset space \thinspace{}
13345 \end_inset
13346
13347 g.
13348 \begin_inset space \space{}
13349 \end_inset
13350
13351
13352 \begin_inset Quotes eld
13353 \end_inset
13354
13355 See Ref.
13356 \begin_inset space \space{}
13357 \end_inset
13358
13359
13360 \family typewriter
13361
13362 \backslash
13363 refcite{key}
13364 \family default
13365
13366 \begin_inset Quotes erd
13367 \end_inset
13368
13369 .
13370 \end_layout
13371
13372 \begin_layout Enumerate
13373 There is no 
13374 \begin_inset Quotes eld
13375 \end_inset
13376
13377 Acknowledgments
13378 \begin_inset Quotes erd
13379 \end_inset
13380
13381  section in both packages.
13382  To put acknowledgments, just use the 
13383 \begin_inset Quotes eld
13384 \end_inset
13385
13386 Section*
13387 \begin_inset Quotes erd
13388 \end_inset
13389
13390  environment.
13391 \end_layout
13392
13393 \begin_layout Enumerate
13394 Appendices may be added to the paper, 
13395 \emph on
13396 after
13397 \emph default
13398  the Acknowledgments and 
13399 \shape italic
13400 before
13401 \shape default
13402  the References.
13403  \SpecialChar LyX
13404  provides a special environment, called 
13405 \begin_inset Quotes eld
13406 \end_inset
13407
13408 Appendices Section
13409 \begin_inset Quotes erd
13410 \end_inset
13411
13412  which marks the beginning of the appendices.
13413  This environment should be left blank; it just sends a \SpecialChar LaTeX
13414  command, but nothing
13415  is really printed.
13416  In \SpecialChar LyX
13417 , the word 
13418 \begin_inset Quotes eld
13419 \end_inset
13420
13421 Appendix
13422 \begin_inset Quotes erd
13423 \end_inset
13424
13425  is printed with blue letters, as a signal that all sections after that
13426  point are appendices.
13427  To write an appendix, use the 
13428 \begin_inset Quotes eld
13429 \end_inset
13430
13431 Appendix
13432 \begin_inset Quotes erd
13433 \end_inset
13434
13435  environment.
13436  \SpecialChar LyX
13437  will number each appendix with capital letters, as required by both journals.
13438  Note that 
13439 \begin_inset Quotes eld
13440 \end_inset
13441
13442 Appendices Section
13443 \begin_inset Quotes erd
13444 \end_inset
13445
13446  
13447 \emph on
13448 must
13449 \emph default
13450  be present before the first appendix; if not, all appendices will be numbered
13451  as normal sections in the output.
13452 \end_layout
13453
13454 \begin_layout Enumerate
13455 The ijmpc and the ijmpd packages use the 
13456 \family typewriter
13457 tbl
13458 \family default
13459  command to implement table captions.
13460  As a result, a table created by \SpecialChar LyX
13461  is printed correctly, but its caption
13462  is ignored.
13463  However, you can use some \SpecialChar TeX
13464  code to overcome this problem, so that captions
13465  are printed as expected.
13466  To do so, create a float table as usual, remove the caption, and replace
13467  it with the \SpecialChar TeX
13468  code 
13469 \family typewriter
13470
13471 \backslash
13472 tbl{
13473 \emph on
13474 your table caption
13475 \emph default
13476 }{
13477 \family default
13478  (sic); you must also the \SpecialChar TeX
13479  code 
13480 \family typewriter
13481 }
13482 \family default
13483  immediately after the tabular material.
13484  Study the example table included in the template files to see how this
13485  trick is implemented.
13486  Alternatively, If you need table captions, you should implement the whole
13487  table float in a 
13488 \family typewriter
13489 .tex
13490 \family default
13491  file, then include this file to the \SpecialChar LyX
13492  document (
13493 \family sans
13494 Insert\SpecialChar menuseparator
13495 File\SpecialChar menuseparator
13496 Child
13497 \begin_inset space ~
13498 \end_inset
13499
13500 Document
13501 \family default
13502 ).
13503  Details on how to create a table float can be found in the files 
13504 \family typewriter
13505 ws-ijmpc.tex
13506 \family default
13507  and 
13508 \family typewriter
13509 ws-ijmpd.tex
13510 \family default
13511 , included in the corresponding packages.
13512 \end_layout
13513
13514 \begin_layout Subsection
13515 Preparing a paper for submission
13516 \end_layout
13517
13518 \begin_layout Standard
13519 Before you submit your paper you must export the \SpecialChar LyX
13520  document as a \SpecialChar LaTeX
13521  file (
13522 \family sans
13523 File\SpecialChar menuseparator
13524 Export\SpecialChar menuseparator
13525 \SpecialChar LaTeX
13526
13527 \family default
13528 )
13529 \begin_inset Foot
13530 status open
13531
13532 \begin_layout Plain Layout
13533 Actually you have the choice between \SpecialChar LaTeX
13534  (plain) and pdflatex.
13535  If you intend to use pdflatex to prepare the paper, you should use the
13536  pdflatex option so that included graphics are converted to PDF format,
13537  ready for use by pdflatex.
13538 \end_layout
13539
13540 \end_inset
13541
13542 , then make the following changes to the resulting 
13543 \family typewriter
13544 .tex
13545 \family default
13546  file.
13547 \end_layout
13548
13549 \begin_layout Enumerate
13550 Remove the comment lines before the 
13551 \family typewriter
13552
13553 \backslash
13554 documentclass
13555 \family default
13556  command.
13557 \end_layout
13558
13559 \begin_layout Enumerate
13560 Remove everything between (and including) the 
13561 \family typewriter
13562
13563 \backslash
13564 makeatletter
13565 \family default
13566  and 
13567 \family typewriter
13568
13569 \backslash
13570 makeatother
13571 \family default
13572  commands, except for any commands you specifically put into the \SpecialChar LaTeX
13573  preamble.
13574 \end_layout
13575
13576 \begin_layout Standard
13577 The modified 
13578 \family typewriter
13579 .tex
13580 \family default
13581  file should be saved and processed through \SpecialChar LaTeX
13582  as many times as necessary.
13583  You may also want to check the resulting 
13584 \family typewriter
13585 .dvi
13586 \family default
13587  document.
13588 \end_layout
13589
13590 \begin_layout Subsection
13591 Use of \SpecialChar TeX
13592  code
13593 \end_layout
13594
13595 \begin_layout Standard
13596 The use of \SpecialChar TeX
13597  code is reduced to two commands, which must be placed at the
13598  top of the document.
13599  If you started writing your paper by using the 
13600 \family typewriter
13601 ijmpc.lyx
13602 \family default
13603  or the 
13604 \family typewriter
13605 ijmpd.lyx
13606 \family default
13607  template, the \SpecialChar TeX
13608  code needed is already in its place; you usually don't need
13609  to delete it.
13610  You may only modify the first \SpecialChar TeX
13611  code to specify the information printed
13612  to the top of odd and even pages (authors' names and short paper's title,
13613  respectively).
13614  This \SpecialChar TeX
13615  code must have the form 
13616 \family typewriter
13617
13618 \backslash
13619 markboth{Authors' Names}{Short Paper's Title}
13620 \family default
13621 .
13622 \end_layout
13623
13624 \begin_layout Section
13625 iopart
13626 \end_layout
13627
13628 \begin_layout Standard
13629 by 
13630 \noun on
13631 Uwe Stöhr
13632 \end_layout
13633
13634 \begin_layout Subsection
13635 Overview
13636 \end_layout
13637
13638 \begin_layout Standard
13639 The iopart package provides a document class to create electronic manuscript
13640  submission to the journals published by the Institute of Physics.
13641  Instructions for the authors how to create a paper using the iopart class
13642  can be downloaded together with the iopart package from the site 
13643 \begin_inset Flex URL
13644 status collapsed
13645
13646 \begin_layout Plain Layout
13647
13648 ftp://ftp.iop.org/pub/journals/latex2e
13649 \end_layout
13650
13651 \end_inset
13652
13653 .
13654 \end_layout
13655
13656 \begin_layout Subsection
13657 Writing a paper
13658 \end_layout
13659
13660 \begin_layout Standard
13661 The easiest way to write a paper is to start with the file 
13662 \emph on
13663 IOP-article.lyx
13664 \emph default
13665  that is available in \SpecialChar LyX
13666 's examples files folder.
13667  Open this file, save it under a new name, and start writing.
13668  The example file explains how to use the special text environments.
13669  Here are the most important advices:
13670 \end_layout
13671
13672 \begin_layout Itemize
13673 To be able to compile your document to a PDF, PS, or DVI, ensure that the
13674  two options 
13675 \family sans
13676 Use AMS math package
13677 \family default
13678  in the document settings under 
13679 \family sans
13680 Math Options
13681 \family default
13682  are not used!
13683 \end_layout
13684
13685 \begin_layout Itemize
13686
13687 \size normal
13688 The title environment defines the kind of your paper.
13689  So use one of the following environments for the title:
13690 \end_layout
13691
13692 \begin_deeper
13693 \begin_layout Itemize
13694
13695 \family sans
13696 \size normal
13697 Title
13698 \family default
13699  for a Paper
13700 \end_layout
13701
13702 \begin_layout Itemize
13703
13704 \family sans
13705 \size normal
13706 Review
13707 \family default
13708  for a Review
13709 \end_layout
13710
13711 \begin_layout Itemize
13712
13713 \family sans
13714 \size normal
13715 Topical
13716 \family default
13717  for a Topical review
13718 \end_layout
13719
13720 \begin_layout Itemize
13721
13722 \family sans
13723 \size normal
13724 Comment
13725 \family default
13726  for a Comment
13727 \end_layout
13728
13729 \begin_layout Itemize
13730
13731 \family sans
13732 \size normal
13733 Note
13734 \family default
13735  for a Note
13736 \end_layout
13737
13738 \begin_layout Itemize
13739
13740 \family sans
13741 \size normal
13742 Paper
13743 \family default
13744  for a Paper (same as Title)
13745 \end_layout
13746
13747 \begin_layout Itemize
13748
13749 \family sans
13750 \size normal
13751 Prelim
13752 \family default
13753  for a Preliminary communication
13754 \end_layout
13755
13756 \begin_layout Itemize
13757
13758 \family sans
13759 \size normal
13760 Rapid
13761 \family default
13762  for a Rapid communication
13763 \end_layout
13764
13765 \begin_layout Itemize
13766
13767 \family sans
13768 \size normal
13769 Letter
13770 \family default
13771  for a Letter to the editor
13772 \end_layout
13773
13774 \end_deeper
13775 \begin_layout Itemize
13776
13777 \size normal
13778 All title environments except of 
13779 \family sans
13780 Letter
13781 \family default
13782  can have an optional short title.
13783 \end_layout
13784
13785 \begin_layout Itemize
13786 There is a general title environment 
13787 \family sans
13788 Article
13789 \family default
13790  which is not directly supported by the \SpecialChar LyX
13791 .
13792  This can be used as \SpecialChar TeX
13793  code when your document doesn't fit into one of the
13794  other title types.
13795 \end_layout
13796
13797 \begin_layout Standard
13798 For more informations like hints for special table and formula formatting,
13799  look at the IOP author guidelines.
13800 \end_layout
13801
13802 \begin_layout Section
13803 Kluwer
13804 \end_layout
13805
13806 \begin_layout Standard
13807 by 
13808 \noun on
13809 Panayotis Papasotiriou
13810 \end_layout
13811
13812 \begin_layout Subsection
13813 Overview
13814 \end_layout
13815
13816 \begin_layout Standard
13817 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
13818  that facilitates electronic manuscript submission to the journals they
13819  publish.
13820  Most known of them (at least in my domain of interest) are 
13821 \emph on
13822 Astrophysics and Space Science
13823 \emph default
13824  and 
13825 \emph on
13826 Solar Physics
13827 \emph default
13828 , but there are many others (see a complete list at 
13829 \begin_inset Flex URL
13830 status open
13831
13832 \begin_layout Plain Layout
13833
13834 http://www.wkap.nl/jrnllist.htm/JRNLHOME
13835 \end_layout
13836
13837 \end_inset
13838
13839 ).
13840  The Kluwer package may be downloaded from the site 
13841 \begin_inset Flex URL
13842 status collapsed
13843
13844 \begin_layout Plain Layout
13845
13846 http://www.wkap.nl/kaphtml.htm/STYLEFILES
13847 \end_layout
13848
13849 \end_inset
13850
13851 .
13852  A complete user guide is contained in that package (but it can also be
13853  downloaded separately).
13854 \end_layout
13855
13856 \begin_layout Standard
13857 \SpecialChar LyX
13858  supports many features of the package but not everything.
13859  However, the \SpecialChar TeX
13860  code needed is reduced to some 
13861 \begin_inset Quotes eld
13862 \end_inset
13863
13864 peculiar
13865 \begin_inset Quotes erd
13866 \end_inset
13867
13868  commands of the package (see
13869 \begin_inset space ~
13870 \end_inset
13871
13872
13873 \begin_inset CommandInset ref
13874 LatexCommand ref
13875 reference "subsec:kluwer_peculiarities"
13876
13877 \end_inset
13878
13879 ).
13880  I have recently used \SpecialChar LyX
13881  to write an article submitted to the 
13882 \emph on
13883 Astrophysics and Space Science
13884 \emph default
13885  without any problem.
13886 \end_layout
13887
13888 \begin_layout Subsection
13889 Writing a paper
13890 \end_layout
13891
13892 \begin_layout Standard
13893 The easiest way to write a paper is to start with the Kluwer template file.
13894  Click on 
13895 \family sans
13896 File\SpecialChar menuseparator
13897 New from
13898 \family default
13899  
13900 \family sans
13901 Template
13902 \family default
13903 , then choose the 
13904 \family typewriter
13905 kluwer.lyx
13906 \family default
13907  template.
13908  This will give an (almost) empty document that includes the most common
13909  fields found in a manuscript and a short description of their use.
13910  As in most templates, simply overwrite the existing text (including the
13911  brackets, 
13912 \family typewriter
13913 <>
13914 \family default
13915 ) with the correct information.
13916 \end_layout
13917
13918 \begin_layout Subsection
13919 Preparing a paper for submission
13920 \end_layout
13921
13922 \begin_layout Standard
13923 As in the AAS\SpecialChar TeX
13924  package, before you submit your paper to a journal you must
13925  
13926 \begin_inset Quotes eld
13927 \end_inset
13928
13929 postprocess
13930 \begin_inset Quotes erd
13931 \end_inset
13932
13933  it as follows.
13934 \end_layout
13935
13936 \begin_layout Enumerate
13937 Export your paper as a \SpecialChar LaTeX
13938  file.
13939  To do this, click on 
13940 \family sans
13941 File\SpecialChar menuseparator
13942 Export\SpecialChar menuseparator
13943 \SpecialChar LaTeX
13944
13945 \family default
13946 .
13947  
13948 \end_layout
13949
13950 \begin_layout Enumerate
13951 Edit the resulting 
13952 \family typewriter
13953 .tex
13954 \family default
13955  file with a text editor and make the following changes
13956 \end_layout
13957
13958 \begin_deeper
13959 \begin_layout Enumerate
13960 remove the comment lines before the 
13961 \family typewriter
13962
13963 \backslash
13964 documentclass
13965 \family default
13966  command,
13967 \end_layout
13968
13969 \begin_layout Enumerate
13970 remove everything between (and including) the 
13971 \family typewriter
13972
13973 \backslash
13974 makeatletter
13975 \family default
13976  and 
13977 \family typewriter
13978
13979 \backslash
13980 makeatother
13981 \family default
13982  commands, except for any commands you specifically put into the \SpecialChar LaTeX
13983  preamble.
13984 \end_layout
13985
13986 \begin_layout Standard
13987 Save the resulting 
13988 \family typewriter
13989 .tex
13990 \family default
13991  file.
13992 \end_layout
13993
13994 \end_deeper
13995 \begin_layout Enumerate
13996 Run the 
13997 \family typewriter
13998 .tex
13999 \family default
14000  file through \SpecialChar LaTeX
14001  as many times as necessary (usually up to three).
14002 \end_layout
14003
14004 \begin_layout Enumerate
14005 View the resulting 
14006 \family typewriter
14007 .dvi
14008 \family default
14009  document using, e.
14010 \begin_inset space \thinspace{}
14011 \end_inset
14012
14013 g.
14014 \begin_inset space \space{}
14015 \end_inset
14016
14017
14018 \family sans
14019 xdvi
14020 \family default
14021 , and check if everything is OK (it should, if you didn't make any mistake).
14022 \end_layout
14023
14024 \begin_layout Subsection
14025 \begin_inset Quotes eld
14026 \end_inset
14027
14028 Peculiarities
14029 \begin_inset Quotes erd
14030 \end_inset
14031
14032  of the Kluwer package
14033 \begin_inset CommandInset label
14034 LatexCommand label
14035 name "subsec:kluwer_peculiarities"
14036
14037 \end_inset
14038
14039
14040 \end_layout
14041
14042 \begin_layout Standard
14043 The Kluwer package has the following 
14044 \begin_inset Quotes eld
14045 \end_inset
14046
14047 peculiarities
14048 \begin_inset Quotes erd
14049 \end_inset
14050
14051 .
14052 \end_layout
14053
14054 \begin_layout Enumerate
14055 It is possible to write multiple articles in the same \SpecialChar LaTeX
14056  file
14057 \begin_inset Foot
14058 status collapsed
14059
14060 \begin_layout Plain Layout
14061 I can't imagine any good reason to do this.
14062 \end_layout
14063
14064 \end_inset
14065
14066 .
14067  Each article must be included in the environment 
14068 \begin_inset Quotes eld
14069 \end_inset
14070
14071 article
14072 \begin_inset Quotes erd
14073 \end_inset
14074
14075 .
14076  Unfortunately, this environment cannot be omitted, even if you write just
14077  one article.
14078  Therefore, each article starts with the command 
14079 \family typewriter
14080
14081 \backslash
14082 begin{article}
14083 \family default
14084  and, obviously, ends with the command 
14085 \family typewriter
14086
14087 \backslash
14088 end{article}
14089 \family default
14090 .
14091  Although this can be implemented in \SpecialChar LyX
14092 , I didn't included it, since it looks
14093  ugly and can confuse the novice user.
14094  Therefore, you need to enter them directly and mark them as \SpecialChar LaTeX
14095  code (the
14096  well-known 
14097 \begin_inset Quotes eld
14098 \end_inset
14099
14100 \SpecialChar TeX
14101  code
14102 \begin_inset Quotes erd
14103 \end_inset
14104
14105 ).
14106 \end_layout
14107
14108 \begin_layout Enumerate
14109 Information given at the beginning of the article (i.
14110 \begin_inset space \thinspace{}
14111 \end_inset
14112
14113 e.
14114 \begin_inset space \space{}
14115 \end_inset
14116
14117 title, subtitle, author, institution, running title, running author, abstract
14118  and keywords) must be included in an environment called 
14119 \begin_inset Quotes eld
14120 \end_inset
14121
14122 opening
14123 \begin_inset Quotes erd
14124 \end_inset
14125
14126 .
14127  This is not implemented in \SpecialChar LyX
14128 , so you must enter title, subtitle etc.
14129 \begin_inset space ~
14130 \end_inset
14131
14132 between two \SpecialChar TeX
14133  code lines (
14134 \family typewriter
14135
14136 \backslash
14137 begin{opening}
14138 \family default
14139  and 
14140 \family typewriter
14141
14142 \backslash
14143 end{opening}
14144 \family default
14145 ).
14146 \end_layout
14147
14148 \begin_layout Enumerate
14149 According to the user manual, the label of each bibliography item must be
14150  written as 
14151 \family typewriter
14152
14153 \backslash
14154 protect
14155 \backslash
14156 citeauthoryear{
14157 \family default
14158 \emph on
14159 author(s)
14160 \family typewriter
14161 \emph default
14162 }{
14163 \family default
14164 \emph on
14165 year
14166 \family typewriter
14167 \emph default
14168 }
14169 \family default
14170 .
14171 \end_layout
14172
14173 \begin_layout Standard
14174 The 
14175 \family typewriter
14176 kluwer.lyx
14177 \family default
14178  template takes care of all these 
14179 \begin_inset Quotes eld
14180 \end_inset
14181
14182 peculiarities
14183 \begin_inset Quotes erd
14184 \end_inset
14185
14186 .
14187  If you start a new paper using this template you don't need to do anything
14188  special.
14189  Just 
14190 \end_layout
14191
14192 \begin_layout Enumerate
14193 don't delete the \SpecialChar TeX
14194  code included in the template, and
14195 \end_layout
14196
14197 \begin_layout Enumerate
14198 copy the example bibliography item included in the template and modify it
14199  as necessary to enter new bibliography items.
14200 \end_layout
14201
14202 \begin_layout Section
14203 Koma-Script
14204 \end_layout
14205
14206 \begin_layout Standard
14207 by 
14208 \noun on
14209 Bernd Rellermeyer
14210 \end_layout
14211
14212 \begin_layout Subsection
14213 Overview
14214 \end_layout
14215
14216 \begin_layout Standard
14217 The \SpecialChar LyX
14218  document classes 
14219 \emph on
14220 article (koma-script)
14221 \emph default
14222
14223 \emph on
14224 report (koma-script)
14225 \emph default
14226
14227 \emph on
14228 book
14229 \emph default
14230  
14231 \emph on
14232 (koma-script)
14233 \emph default
14234 , and 
14235 \emph on
14236 letter
14237 \emph default
14238  
14239 \emph on
14240 (koma-script)
14241 \emph default
14242  correspond to the \SpecialChar LaTeX
14243  document classes 
14244 \family typewriter
14245 scrartcl.cls
14246 \family default
14247
14248 \family typewriter
14249 scrreprt.cls
14250 \family default
14251
14252 \family typewriter
14253 scrbook.cls
14254 \family default
14255 , and 
14256 \family typewriter
14257 scrlettr.cls
14258 \family default
14259 , resp.
14260 \begin_inset space ~
14261 \end_inset
14262
14263 of the Koma-Script family.
14264  They are replacements for the standard document classes 
14265 \family typewriter
14266 article.cls
14267 \family default
14268
14269 \family typewriter
14270 report.cls
14271 \family default
14272
14273 \family typewriter
14274 book.cls
14275 \family default
14276  and 
14277 \family typewriter
14278 letter.cls
14279 \family default
14280 , resp., and fit better to European typography conventions in a number of
14281  points.
14282 \end_layout
14283
14284 \begin_layout Itemize
14285 Standard character size is 11pt in 
14286 \emph on
14287 article (koma-script)
14288 \emph default
14289
14290 \emph on
14291 report (koma-script)
14292 \emph default
14293 , and 
14294 \emph on
14295 book (koma-script)
14296 \emph default
14297 , and 12pt in 
14298 \emph on
14299 letter (koma-script)
14300 \emph default
14301 .
14302 \end_layout
14303
14304 \begin_layout Itemize
14305 Headings, labels of the description environment, and a number of elements
14306  of the 
14307 \emph on
14308 letter (koma-script)
14309 \emph default
14310  document class are set in a bold sans serif font.
14311 \begin_inset Foot
14312 status collapsed
14313
14314 \begin_layout Plain Layout
14315 There is a big difference between the bold sans serif old cm fonts and new
14316  ec fonts, especially in the appearance of headings.
14317  In comparison, the ec bold sans serif fonts look a bit thin.
14318  Here the \SpecialChar LaTeX
14319  package 
14320 \family typewriter
14321 cmsd.sty by
14322 \family default
14323  
14324 \shape smallcaps
14325 Walter Schmidt
14326 \shape default
14327  helps to produce the 
14328 \begin_inset Quotes eld
14329 \end_inset
14330
14331 usual
14332 \begin_inset Quotes erd
14333 \end_inset
14334
14335  appearance when using the ec fonts.
14336 \end_layout
14337
14338 \end_inset
14339
14340  The numbering of chapter headings is made in the same way as the numbering
14341  of section headings, that is without the extra line 
14342 \begin_inset Quotes eld
14343 \end_inset
14344
14345 Chapter\SpecialChar ldots
14346
14347 \begin_inset Quotes erd
14348 \end_inset
14349
14350 .
14351  In addition, the appearance of the headings can be modified by using a
14352  number of options (in \SpecialChar LyX
14353  to be entered in the field 
14354 \family sans
14355 Extra
14356 \begin_inset space ~
14357 \end_inset
14358
14359 Options
14360 \family default
14361  of the dialog 
14362 \family sans
14363 Layout\SpecialChar menuseparator
14364 Document
14365 \family default
14366 ).
14367  
14368 \end_layout
14369
14370 \begin_layout Itemize
14371 The main means in the Koma-Script document classes to design the type area
14372  are the options 
14373 \family sans
14374 BCOR
14375 \family default
14376  and 
14377 \family sans
14378 DIV
14379 \family default
14380  (in \SpecialChar LyX
14381  to be entered in the extra class options field in the dialog 
14382 \family sans
14383 Document\SpecialChar menuseparator
14384 Settings
14385 \family default
14386 ).
14387  They make a clearer modification of page margins possible as do the options
14388  of the dialog 
14389 \family sans
14390 Document\SpecialChar menuseparator
14391 Settings
14392 \family default
14393 .
14394  
14395 \end_layout
14396
14397 \begin_layout Itemize
14398 The \SpecialChar LaTeX
14399  document classes of the Koma-Script family define a number of additional
14400  commands.
14401  Those part of it which makes sense in \SpecialChar LyX
14402  is implemented in corresponding
14403  paragraph types.
14404 \end_layout
14405
14406 \begin_layout Standard
14407 Detailed descriptions of the \SpecialChar LaTeX
14408  document classes of the Koma-Script family
14409  can be found in the Koma-Script documentation 
14410 \emph on
14411 scrguide
14412 \emph default
14413  (German) and 
14414 \emph on
14415 scrguien
14416 \emph default
14417  (English).
14418 \end_layout
14419
14420 \begin_layout Subsection
14421 article (koma-script), report (koma-script), and book (koma-script)
14422 \end_layout
14423
14424 \begin_layout Standard
14425 The document classes 
14426 \emph on
14427 article (koma-script)
14428 \emph default
14429
14430 \emph on
14431 report (koma-script)
14432 \emph default
14433 , and 
14434 \emph on
14435 book
14436 \emph default
14437  
14438 \emph on
14439 (koma-script)
14440 \emph default
14441  are implemented in the layout files 
14442 \family typewriter
14443 scrartcl.layout
14444 \family default
14445
14446 \family typewriter
14447 scrreprt.layout
14448 \family default
14449 , and 
14450 \family typewriter
14451 scrbook.layout
14452 \family default
14453 , resp.
14454  They contain all the paragraph types of the corresponding standard document
14455  classes 
14456 \emph on
14457 article
14458 \emph default
14459
14460 \emph on
14461 report
14462 \emph default
14463 , and 
14464 \emph on
14465 book
14466 \emph default
14467 , resp., partly modified, with the exception of the \SpecialChar LyX
14468  specific 
14469 \family sans
14470 List
14471 \family default
14472 -type, which is replaced by the new 
14473 \family sans
14474 Labeling
14475 \family default
14476 -type having the same functionality.
14477  Beside the 
14478 \family sans
14479 Labeling
14480 \family default
14481 -Type there is a number of new paragraph types added.
14482  They are 
14483 \emph on
14484 not
14485 \emph default
14486  part of 
14487 \emph on
14488 letter (koma-script)
14489 \emph default
14490 .
14491 \end_layout
14492
14493 \begin_layout Itemize
14494
14495 \family sans
14496 Addpart, Addchap
14497 \family default
14498
14499 \family sans
14500 Addsec
14501 \family default
14502 : are equivalents to 
14503 \family sans
14504 Part*, Chapter*
14505 \family default
14506  and 
14507 \family sans
14508 Section*
14509 \family default
14510 , resp., additionally inserting an entry in the table of contents.
14511  
14512 \family sans
14513 Addpart
14514 \family default
14515  and 
14516 \family sans
14517 Addchap
14518 \family default
14519  are not contained in 
14520 \emph on
14521 article (koma-script)
14522 \emph default
14523 .
14524 \end_layout
14525
14526 \begin_layout Itemize
14527
14528 \family sans
14529 Addchap*
14530 \family default
14531
14532 \family sans
14533 Addsec*
14534 \family default
14535 : behave exactly as 
14536 \family sans
14537 Addchap
14538 \family default
14539  and 
14540 \family sans
14541 Addsec
14542 \family default
14543 , resp., additionally clearing running heads.
14544  
14545 \family sans
14546 Addchap*
14547 \family default
14548  is not contained in 
14549 \emph on
14550 article (koma-script)
14551 \emph default
14552 .
14553 \begin_inset Foot
14554 status collapsed
14555
14556 \begin_layout Plain Layout
14557 There is also an 
14558 \family typewriter
14559
14560 \backslash
14561 addpart*
14562 \family default
14563  command in 
14564 \emph on
14565 book (koma-script)
14566 \emph default
14567  and in 
14568 \emph on
14569 report (koma-script)
14570 \emph default
14571 , but since this is identical to 
14572 \family sans
14573 Part*
14574 \family default
14575 , is has not been implemented in \SpecialChar LyX
14576 .
14577 \end_layout
14578
14579 \end_inset
14580
14581
14582 \end_layout
14583
14584 \begin_layout Itemize
14585
14586 \family sans
14587 Minisec
14588 \family default
14589 : generates a heading directly above the following paragraph in the standard
14590  character size without affecting the structure of the document.
14591 \end_layout
14592
14593 \begin_layout Itemize
14594
14595 \family sans
14596 Captionabove
14597 \family default
14598  and 
14599 \family sans
14600 Captionbelow
14601 \family default
14602  are special captions which respect the different space settings needed
14603  for captions placed above or below an element (if you follow strict typographic
14604  rules, you might want to place table captions always above the table).
14605  You can also use the class option 
14606 \family typewriter
14607 tablecaptionsabove
14608 \family default
14609 , which will switch 
14610 \family sans
14611 caption
14612 \family default
14613  to 
14614 \family sans
14615 captionabove
14616 \family default
14617  for tables and 
14618 \family sans
14619 captionbelow
14620 \family default
14621  for figures.
14622  You need at least Koma-Script version 2.8q to use this.
14623 \end_layout
14624
14625 \begin_layout Itemize
14626
14627 \family sans
14628 Dictum
14629 \family default
14630 : can be used to set a bonmot, e.
14631 \begin_inset space \thinspace{}
14632 \end_inset
14633
14634 g.
14635 \begin_inset space \space{}
14636 \end_inset
14637
14638 at the beginning of a chapter.
14639  If you use the optional argument (
14640 \family sans
14641 Insert\SpecialChar menuseparator
14642 Short
14643 \begin_inset space ~
14644 \end_inset
14645
14646 Title
14647 \family default
14648 ), you can insert the dictum's author there.
14649  Dictum and author are separated by a line.
14650  You need at least Koma-Script version 2.8q to use this.
14651  
14652 \family sans
14653 Dictum
14654 \family default
14655  is not contained in 
14656 \emph on
14657 article (koma-script)
14658 \emph default
14659 .
14660 \end_layout
14661
14662 \begin_layout Standard
14663 The following types, together with the standard types 
14664 \family sans
14665 Title
14666 \family default
14667
14668 \family sans
14669 Author
14670 \family default
14671 , and 
14672 \family sans
14673 Date
14674 \family default
14675 , form the title area of the document.
14676  They must be entered ahead of the first 
14677 \begin_inset Quotes eld
14678 \end_inset
14679
14680 ordinary
14681 \begin_inset Quotes erd
14682 \end_inset
14683
14684  paragraph.
14685 \begin_inset Foot
14686 status collapsed
14687
14688 \begin_layout Plain Layout
14689 The corresponding \SpecialChar LaTeX
14690  commands must appear before the 
14691 \family typewriter
14692
14693 \backslash
14694 maketitle
14695 \family default
14696  command.
14697 \end_layout
14698
14699 \end_inset
14700
14701  When such a type is used more than once, the latter usage overwrites the
14702  former one, that means, for every type only the latest usage is valid.
14703  The order of the different types however has, like 
14704 \family sans
14705 Title
14706 \family default
14707
14708 \family sans
14709 Author
14710 \family default
14711 , and 
14712 \family sans
14713 Date
14714 \family default
14715 , no effect on the appearance of the produced document.
14716 \end_layout
14717
14718 \begin_layout Itemize
14719
14720 \family sans
14721 Subject
14722 \family default
14723 : produces a centered paragraph above the ordinary title (
14724 \family sans
14725 Title
14726 \family default
14727
14728 \family sans
14729 Author
14730 \family default
14731
14732 \family sans
14733 Date
14734 \family default
14735 ) for the subject of the document.
14736 \end_layout
14737
14738 \begin_layout Itemize
14739
14740 \family sans
14741 Publishers
14742 \family default
14743 : produces a centered paragraph below the ordinary title (
14744 \family sans
14745 Title
14746 \family default
14747
14748 \family sans
14749 Author
14750 \family default
14751
14752 \family sans
14753 Date
14754 \family default
14755 ) for the publishers' name.
14756 \end_layout
14757
14758 \begin_layout Itemize
14759
14760 \family sans
14761 Dedication
14762 \family default
14763 : in 
14764 \emph on
14765 report (koma-script)
14766 \emph default
14767  and 
14768 \emph on
14769 book (koma-script)
14770 \emph default
14771  produces a centered paragraph on its own page behind the title page, or
14772  in 
14773 \emph on
14774 article (koma-script)
14775 \emph default
14776  produces a centered paragraph below the ordinary title (
14777 \family sans
14778 Title
14779 \family default
14780
14781 \family sans
14782 Author
14783 \family default
14784
14785 \family sans
14786 Date
14787 \family default
14788
14789 \family sans
14790 Publishers
14791 \family default
14792 ) for a dedication.
14793 \end_layout
14794
14795 \begin_layout Itemize
14796
14797 \family sans
14798 Titlehead
14799 \family default
14800 : produces a left aligned paragraph above the ordinary title (
14801 \family sans
14802 Title
14803 \family default
14804
14805 \family sans
14806 Author
14807 \family default
14808
14809 \family sans
14810 Date
14811 \family default
14812
14813 \family sans
14814 Subject
14815 \family default
14816 ) for a document`s head.
14817 \end_layout
14818
14819 \begin_layout Itemize
14820
14821 \family sans
14822 Uppertitleback
14823 \family default
14824 : produces in a double-sided print in 
14825 \emph on
14826 report (koma-script)
14827 \emph default
14828  and 
14829 \emph on
14830 book (koma-script)
14831 \emph default
14832  a left-aligned paragraph at the top of the title page`s back or has no
14833  effect in a single-sided print or in 
14834 \emph on
14835 article (koma-script)
14836 \emph default
14837 .
14838 \end_layout
14839
14840 \begin_layout Itemize
14841
14842 \family sans
14843 Lowertitleback
14844 \family default
14845 : produces in a double-sided print in 
14846 \emph on
14847 report (koma-script)
14848 \emph default
14849  and 
14850 \emph on
14851 book (koma-script)
14852 \emph default
14853  a left-aligned paragraph at the bottom of the title page`s back or has
14854  no effect in a single-sided print or in 
14855 \emph on
14856 article (koma-script)
14857 \emph default
14858 .
14859 \end_layout
14860
14861 \begin_layout Itemize
14862
14863 \family sans
14864 Extratitle
14865 \family default
14866 : produces a special 
14867 \begin_inset Quotes eld
14868 \end_inset
14869
14870 dirty
14871 \begin_inset Quotes erd
14872 \end_inset
14873
14874  page ahead of the actual document containing a paragraph without special
14875  formatting.
14876 \end_layout
14877
14878 \begin_layout Standard
14879 The layout files for the document classes 
14880 \emph on
14881 article (koma-script)
14882 \emph default
14883
14884 \emph on
14885 report (koma-script)
14886 \emph default
14887 , and 
14888 \emph on
14889 book (koma-script)
14890 \emph default
14891  do include the file 
14892 \family typewriter
14893 scrmacros.inc
14894 \family default
14895 .
14896  This is thought of as a place to define your own types.
14897  Copy scrmacros
14898 \family typewriter
14899 .inc
14900 \family default
14901  in your personal layout directory and edit the file!
14902 \end_layout
14903
14904 \begin_layout Subsection
14905 letter (koma-script)
14906 \end_layout
14907
14908 \begin_layout Standard
14909 \noindent
14910 The document class 
14911 \emph on
14912 letter (koma-script)
14913 \emph default
14914  is implemented in the layout file 
14915 \family typewriter
14916 scrlettr.layout
14917 \family default
14918 .
14919  It contains all the paragraph types of the corresponding standard document
14920  class 
14921 \emph on
14922 letter
14923 \emph default
14924 , partly modified, with the exception of the \SpecialChar LyX
14925  specific types 
14926 \family sans
14927 \SpecialChar LyX
14928 -Code
14929 \family default
14930  and 
14931 \family sans
14932 Comment
14933 \family default
14934  and the 
14935 \family sans
14936 List
14937 \family default
14938  type, which is replaced by the new 
14939 \family sans
14940 Labeling
14941 \family default
14942  type.
14943  In addition, it contains, in contrast to the standard document class, the
14944  standard types 
14945 \family sans
14946 \SpecialChar LaTeX
14947
14948 \family default
14949
14950 \family sans
14951 Quotation
14952 \family default
14953
14954 \family sans
14955 Quote
14956 \family default
14957 , and 
14958 \family sans
14959 Verse
14960 \family default
14961 .
14962  Furthermore, there are a number of new letter specific types.
14963 \end_layout
14964
14965 \begin_layout Standard
14966 The appearance of the letter produced by this document class can be controlled
14967  by a number of \SpecialChar LaTeX
14968  commands, which you can put in the \SpecialChar LaTeX
14969  preamble.
14970 \begin_inset Foot
14971 status collapsed
14972
14973 \begin_layout Plain Layout
14974 For example, the standard appearance of the letter`s heading, consisting
14975  of name and address, is quite self-willed.
14976  An 
14977 \begin_inset Quotes eld
14978 \end_inset
14979
14980 ordinary
14981 \begin_inset Quotes erd
14982 \end_inset
14983
14984  heading is produced by the following \SpecialChar LaTeX
14985  commands in the preamble:
14986 \end_layout
14987
14988 \begin_layout LyX-Code
14989
14990 \backslash
14991 firsthead{
14992 \backslash
14993 parbox[b]{
14994 \backslash
14995 textwidth}
14996 \end_layout
14997
14998 \begin_layout LyX-Code
14999   {
15000 \backslash
15001 ignorespaces 
15002 \backslash
15003 fromname
15004 \backslash
15005
15006 \backslash
15007  
15008 \backslash
15009 ignorespaces 
15010 \backslash
15011 fromaddress}} 
15012 \end_layout
15013
15014 \begin_layout LyX-Code
15015
15016 \backslash
15017 nexthead{
15018 \backslash
15019 parbox[b]{
15020 \backslash
15021 textwidth}
15022 \end_layout
15023
15024 \begin_layout LyX-Code
15025   {
15026 \backslash
15027 ignorespaces 
15028 \backslash
15029 fromname 
15030 \backslash
15031 hfill 
15032 \backslash
15033 ignorespaces 
15034 \backslash
15035 pagename
15036 \backslash
15037  
15038 \backslash
15039 thepage}}
15040 \end_layout
15041
15042 \end_inset
15043
15044  A detailed German description of such \SpecialChar LaTeX
15045  commands can be found in the Koma-Script
15046  documentation 
15047 \emph on
15048 scrguide
15049 \emph default
15050 .
15051  With it, the letter's author can produce his personal letter layout.
15052 \end_layout
15053
15054 \begin_layout Standard
15055 The types 
15056 \family sans
15057 Letter
15058 \family default
15059  and 
15060 \family sans
15061 Opening
15062 \family default
15063  define the beginning of the letter and must be used in every letter.
15064  To emphasize them in the \SpecialChar LyX
15065  document class, they are marked with the letter
15066  
15067 \shape italic
15068 L
15069 \shape default
15070  or 
15071 \shape italic
15072 O
15073 \shape default
15074 , resp.
15075 \begin_inset space ~
15076 \end_inset
15077
15078 in the left margin.
15079  It is possible to write any number of letters in one file.
15080  An 
15081 \family sans
15082 Opening
15083 \family default
15084  type produces a new letter using the same addressee and a 
15085 \family sans
15086 Letter
15087 \family default
15088  type produces a new addressee.
15089  The types 
15090 \family sans
15091 Closing
15092 \family default
15093
15094 \family sans
15095 PS
15096 \family default
15097
15098 \family sans
15099 CC
15100 \family default
15101 , and 
15102 \family sans
15103 Encl
15104 \family default
15105  are ordinary paragraph types and can also be used several times in one
15106  and the same letter.
15107 \end_layout
15108
15109 \begin_layout Itemize
15110
15111 \family sans
15112 Letter
15113 \family default
15114 : produces a paragraph for the addressee and implicitly defines the beginning
15115  of the letter.
15116 \end_layout
15117
15118 \begin_layout Itemize
15119
15120 \family sans
15121 Opening
15122 \family default
15123 : produces a paragraph for the form of address and implicitly produces a
15124  new letter.
15125 \end_layout
15126
15127 \begin_layout Itemize
15128
15129 \family sans
15130 Closing
15131 \family default
15132 : produces a paragraph for a close.
15133 \end_layout
15134
15135 \begin_layout Itemize
15136
15137 \family sans
15138 PS
15139 \family default
15140 : produces a paragraph for a postscript.
15141 \end_layout
15142
15143 \begin_layout Itemize
15144
15145 \family sans
15146 CC
15147 \family default
15148 : produces a paragraph for a distribution list.
15149 \end_layout
15150
15151 \begin_layout Itemize
15152
15153 \family sans
15154 Encl
15155 \family default
15156 : produces a paragraph for enclosures.
15157 \end_layout
15158
15159 \begin_layout Standard
15160 The types 
15161 \family sans
15162 Name
15163 \family default
15164
15165 \family sans
15166 Signature
15167 \family default
15168
15169 \family sans
15170 Address
15171 \family default
15172
15173 \family sans
15174 Telephone
15175 \family default
15176
15177 \family sans
15178 Place
15179 \family default
15180
15181 \family sans
15182 Backaddress
15183 \family default
15184
15185 \family sans
15186 Specialmail
15187 \family default
15188
15189 \family sans
15190 Location
15191 \family default
15192
15193 \family sans
15194 Title
15195 \family default
15196 , and 
15197 \family sans
15198 Subject
15199 \family default
15200  are input types provided with a label to enter information, which will
15201  be processed by the document class.
15202 \begin_inset Foot
15203 status open
15204
15205 \begin_layout Plain Layout
15206 It could be seen as a matter of inconsequence, that the types 
15207 \family sans
15208 Letter
15209 \family default
15210  and 
15211 \family sans
15212 Opening
15213 \family default
15214  described above are not such input types as well.
15215  Because of the special meaning of those types, however, I have implemented
15216  them as ordinary paragraph types with a one letter mark in the left margin.
15217  Moreover, it would affect my feeling of symmetry, if the 
15218 \family sans
15219 Opening
15220 \family default
15221  type and the 
15222 \family sans
15223 Closing
15224 \family default
15225  type had such a serious different appearance.
15226 \end_layout
15227
15228 \end_inset
15229
15230  The types must be used ahead of the corresponding 
15231 \family sans
15232 Opening
15233 \family default
15234  type.
15235 \end_layout
15236
15237 \begin_layout Standard
15238 An implementation of these types in a WYSIWYG fashion does not seem to make
15239  sense, because the real appearance of the produced letter does not only
15240  depend on the usage of the particular type, but also on other factors.
15241  For example, a signature entered in the 
15242 \family sans
15243 Signature
15244 \family default
15245  type will in the standard behavior appear in the produced letter only,
15246  when in the same letter also a 
15247 \family sans
15248 Closing
15249 \family default
15250  type is used.
15251  The entered value of the 
15252 \family sans
15253 Telephone
15254 \family default
15255  type will in the standard behavior not appear in the produced letter at
15256  all.
15257  The possibility to design the letter`s heading freely is already indicated
15258  in a footnote above.
15259 \end_layout
15260
15261 \begin_layout Standard
15262 The input types can also be used as empty paragraphs.
15263  This makes sense e.
15264 \begin_inset space \thinspace{}
15265 \end_inset
15266
15267 g.
15268 \begin_inset space \space{}
15269 \end_inset
15270
15271 for the 
15272 \family sans
15273 Signature
15274 \family default
15275  type.
15276  If the 
15277 \family sans
15278 Signature
15279 \family default
15280  type is not used at all, in the standard behavior the value of the 
15281 \family sans
15282 Name
15283 \family default
15284  type is used as signature, whereas if an empty 
15285 \family sans
15286 Signature
15287 \family default
15288  type is used, no signature value is defined.
15289 \end_layout
15290
15291 \begin_layout Standard
15292 By using the input types it is possible to write a letter template, containing
15293  filled input types with your personal dates (name, address, etc.) and empty
15294  input types for other dates you want to enter.
15295 \end_layout
15296
15297 \begin_layout Itemize
15298
15299 \family sans
15300 Name
15301 \family default
15302 : sender's name, in the standard behavior appears as a centered paragraph
15303  in small caps in the letter`s heading.
15304 \end_layout
15305
15306 \begin_layout Itemize
15307
15308 \family sans
15309 Signature
15310 \family default
15311 : sender's signature, in the standard behavior appears below the 
15312 \family sans
15313 Closing
15314 \family default
15315  type.
15316  If no 
15317 \family sans
15318 Signature
15319 \family default
15320  type is used, the value of the 
15321 \family sans
15322 Name
15323 \family default
15324  type appears instead.
15325 \end_layout
15326
15327 \begin_layout Itemize
15328
15329 \family sans
15330 Address
15331 \family default
15332 : sender's address, in the standard behavior appears in a centered paragraph
15333  in the letter`s heading below the sender's name.
15334 \end_layout
15335
15336 \begin_layout Itemize
15337
15338 \family sans
15339 Telephone
15340 \family default
15341 : sender's telephone number, in the standard behavior only sets the \SpecialChar LaTeX
15342  variable
15343  
15344 \family typewriter
15345
15346 \backslash
15347 telephonenum
15348 \family default
15349 .
15350 \end_layout
15351
15352 \begin_layout Itemize
15353
15354 \family sans
15355 Place
15356 \family default
15357 : place of the letter`s making.
15358 \end_layout
15359
15360 \begin_layout Itemize
15361
15362 \family sans
15363 Date
15364 \family default
15365 : date of the letter`s making.
15366  
15367 \family sans
15368 Place
15369 \family default
15370  and 
15371 \family sans
15372 Date
15373 \family default
15374 , in the standard behavior, produce the place and the date in a right-aligned
15375  line below the addressee's field.
15376  If an empty 
15377 \family sans
15378 Date
15379 \family default
15380  type is used, neither place nor date appear, independent of the value of
15381  the 
15382 \family sans
15383 Place
15384 \family default
15385  type.
15386  If no 
15387 \family sans
15388 Date
15389 \family default
15390  type is used, the date of the letter `s production is used.
15391 \end_layout
15392
15393 \begin_layout Itemize
15394
15395 \family sans
15396 Backaddress
15397 \family default
15398 : sender`s back address, in the standard behavior appears above the addressee's
15399  field in a small sans serif font.
15400 \end_layout
15401
15402 \begin_layout Itemize
15403
15404 \family sans
15405 Specialmail
15406 \family default
15407 : special mail information, in the standard behavior appears underlined
15408  above the addressee's field below the back address.
15409 \end_layout
15410
15411 \begin_layout Itemize
15412
15413 \family sans
15414 Location
15415 \family default
15416 : additional information, in the standard behavior appears on right side
15417  below the addressee`s field.
15418 \end_layout
15419
15420 \begin_layout Itemize
15421
15422 \family sans
15423 Title
15424 \family default
15425 : the letter's title, in the standard behavior appears in a big, bold, sans
15426  serif font above the subject.
15427 \end_layout
15428
15429 \begin_layout Itemize
15430
15431 \family sans
15432 Subject
15433 \family default
15434 : the letter's subject, in the standard behavior appears in a bold font
15435  above the 
15436 \family sans
15437 Opening
15438 \family default
15439  paragraph.
15440 \end_layout
15441
15442 \begin_layout Standard
15443 The types 
15444 \family sans
15445 Yourref
15446 \family default
15447
15448 \family sans
15449 Yourmail
15450 \family default
15451
15452 \family sans
15453 Myref
15454 \family default
15455
15456 \family sans
15457 Customer
15458 \family default
15459 , and 
15460 \family sans
15461 Invoice
15462 \family default
15463  produce a business letter like line above the 
15464 \family sans
15465 Title
15466 \family default
15467  line containing the fields 
15468 \begin_inset Quotes eld
15469 \end_inset
15470
15471 Your ref.
15472 \begin_inset Quotes erd
15473 \end_inset
15474
15475
15476 \begin_inset Quotes eld
15477 \end_inset
15478
15479 Your letter of
15480 \begin_inset Quotes erd
15481 \end_inset
15482
15483
15484 \begin_inset Quotes eld
15485 \end_inset
15486
15487 Our ref.
15488 \begin_inset Quotes erd
15489 \end_inset
15490
15491
15492 \begin_inset Quotes eld
15493 \end_inset
15494
15495 Customer no.
15496 \begin_inset Quotes erd
15497 \end_inset
15498
15499
15500 \begin_inset Quotes eld
15501 \end_inset
15502
15503 Invoice no.
15504 \begin_inset Quotes erd
15505 \end_inset
15506
15507 , and 
15508 \begin_inset Quotes eld
15509 \end_inset
15510
15511 Date
15512 \begin_inset Quotes erd
15513 \end_inset
15514
15515 .
15516  For the date field, the value of the 
15517 \family sans
15518 Date
15519 \family default
15520  type is used.
15521  If one of these 
15522 \begin_inset Quotes eld
15523 \end_inset
15524
15525 business letter types
15526 \begin_inset Quotes erd
15527 \end_inset
15528
15529  is used, the value of the 
15530 \family sans
15531 Place
15532 \family default
15533  type however does not appear, but only the \SpecialChar LaTeX
15534  variable 
15535 \family typewriter
15536
15537 \backslash
15538 fromplace
15539 \family default
15540  is set.
15541  The ordinary output of place and date in a right-aligned line below the
15542  addressee`s field is suppressed.
15543  The types are implemented as input types provided with a label and must
15544  be used ahead of the corresponding 
15545 \family sans
15546 Opening
15547 \family default
15548  type.
15549 \end_layout
15550
15551 \begin_layout Itemize
15552
15553 \family sans
15554 Yourref
15555 \family default
15556 : Your ref.
15557 \end_layout
15558
15559 \begin_layout Itemize
15560
15561 \family sans
15562 Yourmail
15563 \family default
15564 : Your letter of.
15565 \end_layout
15566
15567 \begin_layout Itemize
15568
15569 \family sans
15570 Myref
15571 \family default
15572 : Our ref.
15573 \end_layout
15574
15575 \begin_layout Itemize
15576
15577 \family sans
15578 Customer
15579 \family default
15580 : Customer no.
15581 \end_layout
15582
15583 \begin_layout Itemize
15584
15585 \family sans
15586 Invoice
15587 \family default
15588 : Invoice no.
15589 \end_layout
15590
15591 \begin_layout Subsection
15592 The new letter class: letter (koma-script v.2)
15593 \end_layout
15594
15595 \begin_layout Standard
15596 by 
15597 \noun on
15598 Jürgen Spitzmüller
15599 \end_layout
15600
15601 \begin_layout Standard
15602 \begin_inset VSpace medskip
15603 \end_inset
15604
15605
15606 \end_layout
15607
15608 \begin_layout Standard
15609 \noindent
15610 Koma-Script version 2.8 has introduced a new letter class 
15611 \family typewriter
15612 scrlttr2
15613 \family default
15614  which supersedes the now unsupported 
15615 \family typewriter
15616 scrlettr
15617 \family default
15618 .
15619  It has — on the \SpecialChar LaTeX
15620  side — a completely new interface and is not compatible
15621  with the old class.
15622  Therefore, \SpecialChar LyX
15623  supports both, though it is recommended you use the new class.
15624 \end_layout
15625
15626 \begin_layout Standard
15627 This class covers the same functionality as 
15628 \emph on
15629 letter (koma-script),
15630 \emph default
15631  and a few more.
15632  The basic items are 
15633 \family sans
15634 Address
15635 \family default
15636  (receiver's address, same as 
15637 \family sans
15638 Letter
15639 \family default
15640  in the old layout), 
15641 \family sans
15642 Opening
15643 \family default
15644 , and 
15645 \family sans
15646 Closing
15647 \family default
15648 .
15649  
15650 \family sans
15651 NextAddress
15652 \family default
15653  will start a new letter (i.
15654 \begin_inset space \thinspace{}
15655 \end_inset
15656
15657 e.
15658 \begin_inset space \space{}
15659 \end_inset
15660
15661 you can write several letters per document).
15662  New elements are sender's 
15663 \family sans
15664 E-Mail
15665 \family default
15666
15667 \family sans
15668 URL
15669 \family default
15670
15671 \family sans
15672 Fax
15673 \family default
15674
15675 \family sans
15676 Bank
15677 \family default
15678  and the possibility to use a 
15679 \family sans
15680 Logo
15681 \family default
15682  (via 
15683 \family sans
15684 Insert\SpecialChar menuseparator
15685 Graphics
15686 \family default
15687 ) in the header.
15688 \end_layout
15689
15690 \begin_layout Standard
15691 The biggest improvement is, though, that the letter's layout is configurable
15692  to meet almost any needs.
15693  This can be done via the preamble or with a special style file (Letter
15694  Class Option, extension 
15695 \family typewriter
15696 *.lco
15697 \family default
15698 ), that will be read in as a class option.
15699 \begin_inset Foot
15700 status collapsed
15701
15702 \begin_layout Plain Layout
15703 The KOMA package comes with some default 
15704 \family typewriter
15705 *.lco
15706 \family default
15707  files.
15708  There is, for instance, a 
15709 \family typewriter
15710 DIN.lco
15711 \family default
15712  file that follows german typesetting rules, or a 
15713 \family typewriter
15714 KOMAold.lco
15715 \family default
15716  that provides the default layout of the old 
15717 \family typewriter
15718 scrlettr
15719 \family default
15720  class.
15721  The latter can be loaded with the class option 
15722 \family typewriter
15723 KOMAold
15724 \family default
15725 , inserted via the 
15726 \family sans
15727 Layout\SpecialChar menuseparator
15728 Document\SpecialChar menuseparator
15729 Extra Options
15730 \family default
15731  field.
15732 \end_layout
15733
15734 \end_inset
15735
15736  Have a look at the 
15737 \emph on
15738 koma-letter2
15739 \emph default
15740  template that is included in \SpecialChar LyX
15741  for examples.
15742  A detailed description is to be found in the Koma-Script documentation
15743  (
15744 \emph on
15745 scrguide
15746 \emph default
15747 ).
15748 \end_layout
15749
15750 \begin_layout Subsection
15751 Problems
15752 \end_layout
15753
15754 \begin_layout Standard
15755 Visualizing the Koma-Script document classes in \SpecialChar LyX
15756 , the \SpecialChar LyX
15757  internals cause some
15758  problems.
15759 \end_layout
15760
15761 \begin_layout Itemize
15762 The chapter number of a 
15763 \family sans
15764 Chapter
15765 \family default
15766  type appears on a line of its own above the chapter heading instead of
15767  appearing in the same line ahead of it.
15768  The cause for that is the \SpecialChar LyX
15769  internal behavior for the labeltype 
15770 \family sans
15771 Counter_Chapter
15772 \family default
15773  in the layout file.
15774 \end_layout
15775
15776 \begin_layout Itemize
15777 The headings of the types 
15778 \family sans
15779 Addchap
15780 \family default
15781  and 
15782 \family sans
15783 Addsec
15784 \family default
15785  are only put in the 
15786 \begin_inset Quotes eld
15787 \end_inset
15788
15789 true
15790 \begin_inset Quotes erd
15791 \end_inset
15792
15793  \SpecialChar LaTeX
15794  table of contents, but not in the \SpecialChar LyX
15795  table of contents (
15796 \family sans
15797 Document\SpecialChar menuseparator
15798 Table
15799 \begin_inset space ~
15800 \end_inset
15801
15802 of
15803 \begin_inset space ~
15804 \end_inset
15805
15806 Contents
15807 \family default
15808 ).
15809 \end_layout
15810
15811 \begin_layout Itemize
15812 The paragraphs in a 
15813 \emph on
15814 letter
15815 \emph default
15816  document class appear in a skip separation mode, not indented.
15817  This is the standard behavior, no special \SpecialChar LaTeX
15818  commands are needed for that.
15819  But in the 
15820 \family sans
15821 Document\SpecialChar menuseparator
15822 Settings
15823 \family default
15824  dialog the corresponding radio button indicates 
15825 \family sans
15826 Indent
15827 \family default
15828 .
15829  A 
15830 \family sans
15831 Skip
15832 \family default
15833  value always has the effect that extra \SpecialChar LaTeX
15834  commands are inserted in the document
15835  to produce the gap, which is not what is wanted in this case.
15836 \end_layout
15837
15838 \begin_layout Section
15839 Memoir
15840 \end_layout
15841
15842 \begin_layout Standard
15843 By 
15844 \noun on
15845 Jürgen Spitzmüller
15846 \end_layout
15847
15848 \begin_layout Subsection
15849 Overview
15850 \end_layout
15851
15852 \begin_layout Standard
15853 Memoir is a very powerful and constantly evolving class.
15854  It has been designed with regard to fictional and non-fictional literature.
15855  Its aim is to let the user have maximum control over the typesetting of
15856  his document.
15857  Memoir is based on the standard book class, but it can also emulate the
15858  article class (see below).
15859 \end_layout
15860
15861 \begin_layout Standard
15862 Peter Wilson, the developer of Memoir, is known as the author of lots of
15863  useful packages in the \SpecialChar LaTeX
15864  world.
15865  Most of them have been merged with Memoir.
15866  Therefore, it is much easier to layout the table of contents, appendices,
15867  chapter designs and such.
15868  \SpecialChar LyX
15869 , though, does not support all of these goodies natively.
15870  Some of them might be added to forthcoming releases
15871 \begin_inset Foot
15872 status collapsed
15873
15874 \begin_layout Plain Layout
15875 You are invited to send suggestions to 
15876 \begin_inset Flex URL
15877 status collapsed
15878
15879 \begin_layout Plain Layout
15880
15881 lyx-devel@lists.lyx.org
15882 \end_layout
15883
15884 \end_inset
15885
15886 .
15887 \end_layout
15888
15889 \end_inset
15890
15891 , lots will probably never be supported, due to the limitations of \SpecialChar LyX
15892 's framework.
15893  Of course you can still use all features with the help of some native \SpecialChar LaTeX
15894
15895  commands (\SpecialChar TeX
15896  code
15897 \begin_inset Foot
15898 status collapsed
15899
15900 \begin_layout Plain Layout
15901 Cf.
15902 \begin_inset ERT
15903 status collapsed
15904
15905 \begin_layout Plain Layout
15906
15907
15908 \backslash
15909  
15910 \end_layout
15911
15912 \end_inset
15913
15914 section
15915 \begin_inset space ~
15916 \end_inset
15917
15918
15919 \begin_inset CommandInset ref
15920 LatexCommand ref
15921 reference "sec:Inserting-TeX-Code"
15922
15923 \end_inset
15924
15925  for details.
15926 \end_layout
15927
15928 \end_inset
15929
15930 ).
15931  In this section, we can only list those features that are natively supported
15932  by \SpecialChar LyX
15933 .
15934  For detailed descriptions (and for the rest of features) we recommend you
15935  have a look at the detailed manual of the Memoir class
15936 \begin_inset Foot
15937 status collapsed
15938
15939 \begin_layout Plain Layout
15940 Cf.
15941 \begin_inset ERT
15942 status collapsed
15943
15944 \begin_layout Plain Layout
15945
15946
15947 \backslash
15948  
15949 \end_layout
15950
15951 \end_inset
15952
15953
15954 \begin_inset Flex URL
15955 status collapsed
15956
15957 \begin_layout Plain Layout
15958
15959 CTAN:/macros/latex/memoir/memman.pdf
15960 \end_layout
15961
15962 \end_inset
15963
15964 .
15965 \end_layout
15966
15967 \end_inset
15968
15969 , which is not only a user guide for the class, but also both a comprehensive
15970  description on good typesetting and a superb example for good typesetting
15971  itself.
15972 \end_layout
15973
15974 \begin_layout Subsection
15975 Basic features and restrictions
15976 \end_layout
15977
15978 \begin_layout Standard
15979 Memoir supports basically all features of the standard book classes.
15980  There are, however, some differences, as follows:
15981 \end_layout
15982
15983 \begin_layout Description
15984 Font
15985 \begin_inset space ~
15986 \end_inset
15987
15988 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
15989 \end_layout
15990
15991 \begin_layout Description
15992 Page
15993 \begin_inset space ~
15994 \end_inset
15995
15996 style: The fancy page style is not supported, due to a command clash between
15997  Memoir and the fancyhdr package (they both define a command with the same
15998  name, which confuses \SpecialChar LaTeX
15999 ).
16000  Instead, Memoir comes with a number of its own page styles (see 
16001 \family sans
16002 Layout\SpecialChar menuseparator
16003 Document\SpecialChar menuseparator
16004 Page
16005 \begin_inset space ~
16006 \end_inset
16007
16008 Style
16009 \family default
16010 ).
16011  If you want to use these for the chapter pages, you have to use the command
16012  
16013 \family typewriter
16014
16015 \backslash
16016 chapterstyle
16017 \family default
16018  in the main text or in preamble (e.
16019 \begin_inset space \thinspace{}
16020 \end_inset
16021
16022 g.
16023 \begin_inset space \space{}
16024 \end_inset
16025
16026
16027 \family typewriter
16028
16029 \backslash
16030 chapterstyle{companion}
16031 \family default
16032 ).
16033 \end_layout
16034
16035 \begin_layout Description
16036 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
16037  optional argument in the standard classes.
16038  With this, you can specify an alternative version of the title for the
16039  table of contents and the headers (for instance, if the title is too long).
16040  In \SpecialChar LyX
16041 , you can do this via 
16042 \family sans
16043 Insert\SpecialChar menuseparator
16044 Short
16045 \begin_inset space ~
16046 \end_inset
16047
16048 Title
16049 \family default
16050  at the beginning of a chapter/section.
16051  Memoir features a second optional argument and thus separates the table
16052  of contents from the header.
16053  You can define three variants of a title with this: one for the main text,
16054  one for the table of contents, and one for the headers.
16055  Simply insert two optional arguments if you need this feature, the first
16056  one containing the short title for the Table of Contents, the second one
16057  containing an alternative short title for the headers.
16058 \end_layout
16059
16060 \begin_layout Description
16061 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
16062  of contents, the list of figures and the list of table start a new page
16063  automatically.
16064  Memoir does not follow this route.
16065  You have to insert a page break yourself, if you want to have one.
16066 \end_layout
16067
16068 \begin_layout Description
16069 Titlepage: For some unknown reason, Memoir uses pagination on the title
16070  page (in the standard classes, title pages are 
16071 \begin_inset Quotes eld
16072 \end_inset
16073
16074 empty
16075 \begin_inset Quotes erd
16076 \end_inset
16077
16078 ).
16079  If you want an empty title page, type 
16080 \family typewriter
16081
16082 \backslash
16083 aliaspagestyle{title}{empty}
16084 \family default
16085  in the preamble.
16086 \end_layout
16087
16088 \begin_layout Description
16089 Article: With the class option 
16090 \emph on
16091 article
16092 \emph default
16093  (to be inserted in 
16094 \family sans
16095 Layout\SpecialChar menuseparator
16096 Document\SpecialChar menuseparator
16097 Extra
16098 \begin_inset space ~
16099 \end_inset
16100
16101 Options
16102 \family default
16103 ), you can emulate article style.
16104  That is, counters (footnotes, figures, tables etc.) will not be reset on
16105  new chapters, chapters don't start a new page (but are—in contrary to 
16106 \begin_inset Quotes eld
16107 \end_inset
16108
16109 real
16110 \begin_inset Quotes erd
16111 \end_inset
16112
16113  article classes—still allowed), parts, though, use their own page, as in
16114  book.
16115 \end_layout
16116
16117 \begin_layout Description
16118 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
16119  font commands, which have been used in the old \SpecialChar LaTeX
16120  version 2.09 (e.
16121 \begin_inset space \thinspace{}
16122 \end_inset
16123
16124 g.
16125 \begin_inset space \space{}
16126 \end_inset
16127
16128
16129 \family typewriter
16130
16131 \backslash
16132 rm
16133 \family default
16134
16135 \family typewriter
16136
16137 \backslash
16138 it
16139 \family default
16140 ).
16141  It produces an error and stops \SpecialChar LaTeX
16142  whenever such a command appears.
16143  The class option 
16144 \emph on
16145 oldfontcommands
16146 \emph default
16147  reallows the commands and spits out warnings instead (which does at least
16148  not stop \SpecialChar LaTeX
16149 ).
16150  Since a lot of packages and particularly Bib\SpecialChar TeX
16151  style files are still using
16152  those commands, we have decided to use this option by default.
16153 \end_layout
16154
16155 \begin_layout Subsection
16156 Extra features
16157 \end_layout
16158
16159 \begin_layout Standard
16160 We will only describe the features supported by \SpecialChar LyX
16161  (which is not much currently).
16162  Please consult the Memoir manual
16163 \begin_inset Foot
16164 status collapsed
16165
16166 \begin_layout Plain Layout
16167 Cf.
16168 \begin_inset ERT
16169 status collapsed
16170
16171 \begin_layout Plain Layout
16172
16173
16174 \backslash
16175  
16176 \end_layout
16177
16178 \end_inset
16179
16180
16181 \begin_inset Flex URL
16182 status collapsed
16183
16184 \begin_layout Plain Layout
16185
16186 CTAN:/macros/latex/memoir/memman.pdf
16187 \end_layout
16188
16189 \end_inset
16190
16191 .
16192 \end_layout
16193
16194 \end_inset
16195
16196  for details.
16197 \end_layout
16198
16199 \begin_layout Description
16200 Abstract: You may wonder why an abstract is an extra feature.
16201  Well, it is in book class.
16202  Usually books don't have abstracts.
16203  Memoir, however, has.
16204  You can use it wherever and how often you like.
16205 \end_layout
16206
16207 \begin_layout Description
16208 Chapterprecis: You may know this older typesetting style: The contents of
16209  a chapter are summarized below the title and also in the table of contents
16210  (e.
16211 \begin_inset space \thinspace{}
16212 \end_inset
16213
16214 g.
16215 \begin_inset space \space{}
16216 \end_inset
16217
16218
16219 \emph on
16220 Our hero arrives in Troia; he loses some friends; he finds others
16221 \emph default
16222 ).
16223  Chapterprecis does exactly this.
16224  It is therefore only sensible below a chapter.
16225 \end_layout
16226
16227 \begin_layout Description
16228 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
16229  The epigraph environment provides an elegant way of typesetting such a
16230  motto.
16231  The motto itself (text) and its author (source) are divided by a short
16232  line.
16233  Unfortunately, we have to fool \SpecialChar LyX
16234  a bit here again, since the environment
16235  needs two arguments (text and source).
16236  In this case, we have to use curly brackets (in \SpecialChar TeX
16237  mode) between the two
16238  arguments: 
16239 \emph on
16240 <smart slogan>
16241 \emph default
16242  
16243 \family typewriter
16244 }{
16245 \family default
16246  
16247 \emph on
16248 <author of the slogan>.
16249 \end_layout
16250
16251 \begin_layout Description
16252 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
16253  complex figurative poems).
16254  \SpecialChar LyX
16255  can only support a few of them.
16256  One is poemtitle, which is a centered title for poems, which will also
16257  be added to the table of contents (verse is the standard environment for
16258  poems.
16259  Memoir has some enhanced versions of verse, but you need to use \SpecialChar TeX
16260  code,
16261  because they have to be nested inside regular verse environments, which
16262  is not possible with \SpecialChar LyX
16263 ).
16264 \end_layout
16265
16266 \begin_layout Description
16267 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
16268 \end_layout
16269
16270 \begin_layout Section
16271 Article (mwart), book (mwbk) and report (mwrep)
16272 \begin_inset Argument status
16273 status collapsed
16274
16275 \begin_layout Plain Layout
16276 The 
16277 \family typewriter
16278 mw
16279 \family default
16280  Classes
16281 \end_layout
16282
16283 \end_inset
16284
16285
16286 \end_layout
16287
16288 \begin_layout Standard
16289 by 
16290 \noun on
16291 Tomasz Luczak
16292 \end_layout
16293
16294 \begin_layout Standard
16295 The \SpecialChar LyX
16296  document classes 
16297 \emph on
16298 article (mwart)
16299 \emph default
16300
16301 \emph on
16302 report (mwrep)
16303 \emph default
16304  and 
16305 \emph on
16306 book
16307 \emph default
16308  
16309 \emph on
16310 (mwbk)
16311 \emph default
16312  correspond to the \SpecialChar LaTeX
16313  document classes 
16314 \family typewriter
16315 mwart.cls
16316 \family default
16317
16318 \family typewriter
16319 mwrep.cls
16320 \family default
16321  and 
16322 \family typewriter
16323 mwbk.cls
16324 \family default
16325 , resp.
16326  They are replacements for the standard document classes 
16327 \family typewriter
16328 article.cls
16329 \family default
16330
16331 \family typewriter
16332 report.cls
16333 \family default
16334  and 
16335 \family typewriter
16336 book.cls
16337 \family default
16338 , resp., and fit better to Polish typography conventions in a number of points.
16339  
16340 \end_layout
16341
16342 \begin_layout Standard
16343 Basic differences:
16344 \end_layout
16345
16346 \begin_layout Itemize
16347 Unnumbered titles (with star, e.
16348 \begin_inset space \thinspace{}
16349 \end_inset
16350
16351 g.
16352 \begin_inset space \space{}
16353 \end_inset
16354
16355
16356 \family sans
16357 Section*
16358 \family default
16359 ) are added into table of contents,
16360 \end_layout
16361
16362 \begin_layout Itemize
16363 Additional page styles:
16364 \end_layout
16365
16366 \begin_deeper
16367 \begin_layout Description
16368 uheadings header with separated lines,
16369 \end_layout
16370
16371 \begin_layout Description
16372 myheadings custom header, contents headers via commands: 
16373 \family typewriter
16374
16375 \backslash
16376 markright
16377 \family default
16378  and 
16379 \family typewriter
16380
16381 \backslash
16382 markboth
16383 \family default
16384 ,
16385 \end_layout
16386
16387 \begin_layout Description
16388 myuheadings custom header with separated lines,
16389 \end_layout
16390
16391 \begin_layout Description
16392 outer page number is placed on outer side of page
16393 \end_layout
16394
16395 \end_deeper
16396 \begin_layout Itemize
16397 Options 
16398 \end_layout
16399
16400 \begin_deeper
16401 \begin_layout Description
16402 rmheadings serif titles — default,
16403 \end_layout
16404
16405 \begin_layout Description
16406 sfheadings sansserif titles,
16407 \end_layout
16408
16409 \begin_layout Description
16410 authortitle on title page first placed is author next title — default,
16411 \end_layout
16412
16413 \begin_layout Description
16414 titleauthor on title page first placed is title next author,
16415 \end_layout
16416
16417 \begin_layout Description
16418 withmarginpar reserve place on page for margins.
16419 \end_layout
16420
16421 \end_deeper
16422 \begin_layout Section
16423 Paper
16424 \end_layout
16425
16426 \begin_layout Standard
16427 The document class 
16428 \family sans
16429 paper
16430 \family default
16431  provides an alternative to the standard 
16432 \family sans
16433 article
16434 \family default
16435  class.
16436  It provides similar functionality, but you might prefer this layout with
16437  sans serif sections, headings, and more.
16438 \end_layout
16439
16440 \begin_layout Section
16441 Rev\SpecialChar TeX
16442 4
16443 \end_layout
16444
16445 \begin_layout Standard
16446 by 
16447 \noun on
16448 Amir Karger
16449 \end_layout
16450
16451 \begin_layout Standard
16452 \begin_inset VSpace bigskip
16453 \end_inset
16454
16455
16456 \end_layout
16457
16458 \begin_layout Standard
16459 \noindent
16460 The 
16461 \family sans
16462 Revtex
16463 \begin_inset space ~
16464 \end_inset
16465
16466 4
16467 \family default
16468  textclass works with the American Physical Sociey's Rev\SpecialChar TeX
16469  4.0 (the 
16470 \begin_inset Formula $\beta$
16471 \end_inset
16472
16473  release of May, 1999) class.
16474 \end_layout
16475
16476 \begin_layout Standard
16477 \SpecialChar LyX
16478  has a 
16479 \family sans
16480 Revtex
16481 \family default
16482  textclass, which works with Rev\SpecialChar TeX
16483  3.1.
16484  However, v3.1 is basically obsolete, as it works with \SpecialChar LaTeX
16485  2.09.
16486  That means that it doesn't interact very well with \SpecialChar LyX
16487 , which requires \SpecialChar LaTeX2e
16488 , although
16489  it has been kludged to work.
16490  Since Rev\SpecialChar TeX
16491  4.0 has been designed to work much more cleanly with \SpecialChar LaTeX2e
16492 , \SpecialChar LyX
16493  with the
16494  
16495 \family sans
16496 Rev\SpecialChar TeX
16497
16498 \begin_inset space ~
16499 \end_inset
16500
16501 4
16502 \family default
16503  textclass should also be pretty easy to use.
16504 \end_layout
16505
16506 \begin_layout Standard
16507 These documents are supposed to be used in 
16508 \emph on
16509 addition
16510 \emph default
16511  to the Rev\SpecialChar TeX
16512  4.0 documents, so we don't describe any of the special Rev\SpecialChar TeX
16513  macros,
16514  and assume you'll know what to put in the preamble if necessary.
16515 \end_layout
16516
16517 \begin_layout Subsection
16518 Installation
16519 \end_layout
16520
16521 \begin_layout Standard
16522 All you need to do is install Rev\SpecialChar TeX
16523  4, as described in the package's README
16524  file.
16525  The package can be found at The Rev\SpecialChar TeX
16526  4 Web Site 
16527 \begin_inset Flex URL
16528 status collapsed
16529
16530 \begin_layout Plain Layout
16531
16532 http://publish.aps.org/revtex4/
16533 \end_layout
16534
16535 \end_inset
16536
16537 .
16538  Install it somewhere that \SpecialChar LaTeX
16539  can see it.
16540  Test it by trying to \SpecialChar LaTeX
16541  a short Rev\SpecialChar TeX
16542  4 document in some random directory (i.
16543 \begin_inset space \thinspace{}
16544 \end_inset
16545
16546 e.
16547 \begin_inset space \space{}
16548 \end_inset
16549
16550 not the directory where you installed the class file.) Then, if you reconfigure
16551  \SpecialChar LyX
16552 , it will find the class file and let you use the Rev\SpecialChar TeX
16553 4 textclass.
16554 \end_layout
16555
16556 \begin_layout Standard
16557 Probably the easiest way to get started is either to import a Rev\SpecialChar TeX
16558  4 document
16559  using 
16560 \family typewriter
16561 tex2lyx
16562 \family default
16563 , or to use the 
16564 \family sans
16565 Revtex
16566 \begin_inset space ~
16567 \end_inset
16568
16569 4
16570 \family default
16571  template, found in the templates directory.
16572 \end_layout
16573
16574 \begin_layout Subsection
16575 Preamble Matter
16576 \end_layout
16577
16578 \begin_layout Standard
16579 Optional arguments to 
16580 \family typewriter
16581
16582 \backslash
16583 documentclass
16584 \family default
16585 , like 
16586 \begin_inset Quotes eld
16587 \end_inset
16588
16589 preprint
16590 \begin_inset Quotes erd
16591 \end_inset
16592
16593  and 
16594 \begin_inset Quotes eld
16595 \end_inset
16596
16597 aps
16598 \begin_inset Quotes erd
16599 \end_inset
16600
16601 , go in the 
16602 \family sans
16603 Extra
16604 \begin_inset space ~
16605 \end_inset
16606
16607 Options
16608 \family default
16609  field in the 
16610 \family sans
16611 Document
16612 \begin_inset space ~
16613 \end_inset
16614
16615 Layout
16616 \family default
16617  dialog, as usual.
16618  Remember that in Rev\SpecialChar TeX
16619 , at least one optional argument is required! 
16620 \end_layout
16621
16622 \begin_layout Standard
16623 Other preamble matter, like 
16624 \family typewriter
16625
16626 \backslash
16627 draft
16628 \family default
16629  etc.
16630 \begin_inset space ~
16631 \end_inset
16632
16633 goes in the 
16634 \family sans
16635 \SpecialChar LaTeX
16636
16637 \begin_inset space ~
16638 \end_inset
16639
16640 Preamble
16641 \family default
16642  dialog, also as usual.
16643 \end_layout
16644
16645 \begin_layout Subsection
16646 Layouts
16647 \end_layout
16648
16649 \begin_layout Standard
16650 The layouts basically correspond to the commands in Rev\SpecialChar TeX
16651 4.0.
16652  For example, the Email layout corresponds to 
16653 \family typewriter
16654
16655 \backslash
16656 email{}
16657 \family default
16658 .
16659  Note that (at least as of Rev\SpecialChar TeX
16660  4.0 Beta), the 
16661 \family sans
16662 Address
16663 \family default
16664  and 
16665 \family sans
16666 Affiliation
16667 \family default
16668  layouts are exactly equivalent, so you shouldn't need to use both.
16669 \begin_inset Foot
16670 status collapsed
16671
16672 \begin_layout Plain Layout
16673 In case you're curious, both were included so that 
16674 \family typewriter
16675 tex2lyx
16676 \family default
16677  would be able to translate both 
16678 \family typewriter
16679
16680 \backslash
16681 address
16682 \family default
16683  and 
16684 \family typewriter
16685
16686 \backslash
16687 affiliation
16688 \family default
16689 .
16690 \end_layout
16691
16692 \end_inset
16693
16694
16695 \end_layout
16696
16697 \begin_layout Subsection
16698 Important Notes
16699 \end_layout
16700
16701 \begin_layout Standard
16702 There are a couple of important unique aspects of Rev\SpecialChar TeX
16703  4 which might cause
16704  bugs that will be even more confusing in \SpecialChar LyX
16705 .
16706 \end_layout
16707
16708 \begin_layout Standard
16709 In Rev\SpecialChar TeX
16710 , the 
16711 \family typewriter
16712
16713 \backslash
16714 thanks
16715 \family default
16716  command goes 
16717 \emph on
16718 outside
16719 \emph default
16720  the 
16721 \family typewriter
16722
16723 \backslash
16724 author
16725 \family default
16726  command.
16727  The \SpecialChar LyX
16728  equivalent is that there is a separate Thanks layout.
16729  Do 
16730 \emph on
16731 not
16732 \emph default
16733  write footnotes in the 
16734 \family sans
16735 Author
16736 \family default
16737  layout, or weird things may happen.
16738  See the Rev\SpecialChar TeX
16739  4 documentation for more details.
16740 \end_layout
16741
16742 \begin_layout Standard
16743 Also, the 
16744 \family sans
16745 Author
16746 \begin_inset space ~
16747 \end_inset
16748
16749 Email
16750 \family default
16751
16752 \family sans
16753 Author
16754 \begin_inset space ~
16755 \end_inset
16756
16757 URL
16758 \family default
16759 , and 
16760 \family sans
16761 Thanks
16762 \family default
16763  layouts must be placed 
16764 \emph on
16765 in between
16766 \emph default
16767  the 
16768 \family sans
16769 Author
16770 \family default
16771  layout and the corresponding 
16772 \family sans
16773 Address
16774 \family default
16775  (or equivalent 
16776 \family sans
16777 Affiliation
16778 \family default
16779 ) layout.
16780  If you put the 
16781 \family sans
16782 Thanks
16783 \family default
16784  after the 
16785 \family sans
16786 Address
16787 \family default
16788 , the \SpecialChar LaTeX
16789  won't compile.
16790 \end_layout
16791
16792 \begin_layout Subsection
16793 Drawbacks
16794 \end_layout
16795
16796 \begin_layout Standard
16797 The main problem with this layout is that you can't use the optional arguments
16798  to layouts like Email and Title.
16799  (The problem is not unique to this layout; you can't use optional arguments
16800  to the Section layouts either.) This means that after you export that file
16801  to \SpecialChar LaTeX
16802  (which you'll need to do eventually to send it in to APS), you'll need
16803  to edit the \SpecialChar LaTeX
16804  file with a text editor to add the optional arguments to set,
16805  e.
16806 \begin_inset space \thinspace{}
16807 \end_inset
16808
16809 g.
16810 \begin_inset space \space{}
16811 \end_inset
16812
16813 the running title for the page headers.
16814  Lacking these layouts makes the 
16815 \family typewriter
16816
16817 \backslash
16818 altaffiliation
16819 \family default
16820  (and the equivalent 
16821 \family typewriter
16822
16823 \backslash
16824 altaddress
16825 \family default
16826 ) useless, so the corresponding layouts don't exist, and will have to be
16827  added by hand.
16828 \begin_inset Foot
16829 status collapsed
16830
16831 \begin_layout Plain Layout
16832
16833 \emph on
16834 Note from JMarc:
16835 \emph default
16836  actually, \SpecialChar LyX
16837  1.3.0 supports some forms of optional arguments, but this layout
16838  has not been updated yet to take advantage of it.
16839 \end_layout
16840
16841 \end_inset
16842
16843  
16844 \end_layout
16845
16846 \begin_layout Section
16847 Springer Journals (
16848 \family sans
16849 svjour
16850 \family default
16851 )
16852 \end_layout
16853
16854 \begin_layout Standard
16855 by 
16856 \noun on
16857 Martin Vermeer
16858 \end_layout
16859
16860 \begin_layout Subsection
16861 Description
16862 \end_layout
16863
16864 \begin_layout Standard
16865 These are the layout files for some of the journal formats used by Springer
16866  Verlag and listed on 
16867 \begin_inset Flex URL
16868 status collapsed
16869
16870 \begin_layout Plain Layout
16871
16872 http://www.springer.de/author/tex/help-journals.html
16873 \end_layout
16874
16875 \end_inset
16876
16877 , where you should also go to fetch the class files (yes, these are \SpecialChar LaTeX2e
16878  now!).
16879  It is a modular system: the things common to all journals are implemented
16880  in 
16881 \family typewriter
16882 svjour.inc
16883 \family default
16884 , which journal-specific layout files (such as, e.
16885 \begin_inset space \thinspace{}
16886 \end_inset
16887
16888 g.
16889 \begin_inset space \space{}
16890 \end_inset
16891
16892
16893 \family typewriter
16894 svjog.layout
16895 \family default
16896  for Journal of Geodesy) can include.
16897 \end_layout
16898
16899 \begin_layout Standard
16900 This means that implementing support for any other Springer journal on this
16901  list is as simple as writing your own 
16902 \family typewriter
16903 sv
16904 \family default
16905 <myjournal>
16906 \family typewriter
16907 .layout
16908 \family default
16909  file following the outline given in 
16910 \family typewriter
16911 svjog.layout
16912 \family default
16913 .
16914  
16915 \end_layout
16916
16917 \begin_layout Standard
16918 It is reasonably well tested only for the Journal of Geodesy.
16919  
16920 \family typewriter
16921 svjour
16922 \family default
16923  and 
16924 \family typewriter
16925 svjog
16926 \family default
16927  come with the standard \SpecialChar LyX
16928  distribution.
16929  Install the relevant class file (downloaded from Springer) in a proper
16930  directory, reconfigure \SpecialChar LaTeX
16931  (in the te\SpecialChar TeX
16932  case by running 
16933 \family typewriter
16934 texhash
16935 \family default
16936 , as root if necessary — doesn't \SpecialChar LyX
16937  take care of this?), reconfigure \SpecialChar LyX
16938  and
16939  it should work.
16940 \end_layout
16941
16942 \begin_layout Subsection
16943 New styles
16944 \end_layout
16945
16946 \begin_layout Standard
16947 A large number of theorem-like styles — 
16948 \family sans
16949 Claim, Conjecture,
16950 \family default
16951  
16952 \family sans
16953 \SpecialChar ldots
16954 Theorem
16955 \family default
16956 .
16957 \end_layout
16958
16959 \begin_layout Standard
16960
16961 \family sans
16962 Headnote, Dedication, Subtitle, Running_\SpecialChar LaTeX
16963 _Title, Author_Running, Institute,
16964  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
16965 \family default
16966 .
16967  See the Springer class file documentation for details.
16968 \end_layout
16969
16970 \begin_layout Subsection
16971 Supported journals
16972 \end_layout
16973
16974 \begin_layout Itemize
16975
16976 \emph on
16977 Journal of Geodesy
16978 \emph default
16979
16980 \family typewriter
16981 svjog.layout
16982 \family default
16983  — Martin Vermeer
16984 \end_layout
16985
16986 \begin_layout Itemize
16987
16988 \emph on
16989 Probability Theory and Related Fields
16990 \emph default
16991
16992 \family typewriter
16993 svprobth.layout
16994 \family default
16995  — Jean-Marc Lasgouttes
16996 \end_layout
16997
16998 \begin_layout Standard
16999 Add your own, it isn't so hard!
17000 \end_layout
17001
17002 \begin_layout Subsection
17003 Credits
17004 \end_layout
17005
17006 \begin_layout Standard
17007 These files are partly based on the older 
17008 \family typewriter
17009 ejour2.layout
17010 \family default
17011 , which was again based on a tinkered-with version of an old \SpecialChar LaTeX
17012  2.09 style
17013  file from Springer.
17014  All this, and the 
17015 \family typewriter
17016 ejour2
17017 \family default
17018  layout, are now defunct.
17019  Jean-Marc Lasgouttes helped out big in making me find my way around the
17020  \SpecialChar LyX
17021  layout file mechanism.
17022 \end_layout
17023
17024 \begin_layout Subsection
17025 Bugs
17026 \end_layout
17027
17028 \begin_layout Standard
17029 Probably.
17030  But probably less than in the old hacked-\SpecialChar LaTeX
17031  
17032 \family typewriter
17033 ejour2
17034 \family default
17035 .
17036 \end_layout
17037
17038 \begin_layout Standard
17039 Limitations e.
17040 \begin_inset space \thinspace{}
17041 \end_inset
17042
17043 g.: does not display the number for theorem-like layouts, just #.
17044 \end_layout
17045
17046 \begin_layout Section
17047 Slides [aka 
17048 \noun on
17049 Sli\SpecialChar TeX
17050
17051 \noun default
17052 ]
17053 \begin_inset CommandInset label
17054 LatexCommand label
17055 name "sec:slitex"
17056
17057 \end_inset
17058
17059
17060 \end_layout
17061
17062 \begin_layout Standard
17063 by 
17064 \noun on
17065 John Weiss
17066 \noun default
17067  
17068 \end_layout
17069
17070 \begin_layout Subsection
17071 Introduction
17072 \end_layout
17073
17074 \begin_layout Standard
17075 This section describes how to use \SpecialChar LyX
17076  to make slides for overhead projectors.
17077  There are two document classes that can do this: the default slides class
17078  and the 
17079 \family sans
17080 Foil\SpecialChar TeX
17081
17082 \family default
17083  slides class.
17084  This section documents the former.
17085 \end_layout
17086
17087 \begin_layout Standard
17088 I'm going to say this again, nice and clear, so that there's no misunderstanding
17089 :
17090 \end_layout
17091
17092 \begin_layout Standard
17093 \begin_inset VSpace bigskip
17094 \end_inset
17095
17096
17097 \end_layout
17098
17099 \begin_layout Standard
17100 \align center
17101
17102 \size large
17103 This section documents the class 
17104 \begin_inset Quotes eld
17105 \end_inset
17106
17107
17108 \family sans
17109 slides (default)
17110 \family default
17111
17112 \begin_inset Quotes erd
17113 \end_inset
17114
17115  
17116 \emph on
17117 only.
17118 \end_layout
17119
17120 \begin_layout Standard
17121 \begin_inset VSpace bigskip
17122 \end_inset
17123
17124
17125 \end_layout
17126
17127 \begin_layout Standard
17128 If you're looking for the documentation for 
17129 \begin_inset Quotes eld
17130 \end_inset
17131
17132
17133 \family sans
17134 slides (Foil\SpecialChar TeX
17135 )
17136 \family default
17137
17138 \begin_inset Quotes erd
17139 \end_inset
17140
17141 , check out section
17142 \begin_inset space ~
17143 \end_inset
17144
17145
17146 \begin_inset CommandInset ref
17147 LatexCommand ref
17148 reference "sec:foiltex"
17149
17150 \end_inset
17151
17152 .
17153  The 
17154 \family sans
17155 foils
17156 \family default
17157  class [
17158 \begin_inset Quotes eld
17159 \end_inset
17160
17161
17162 \family sans
17163 slides (Foil\SpecialChar TeX
17164 )
17165 \family default
17166
17167 \begin_inset Quotes erd
17168 \end_inset
17169
17170 ] is actually somewhat better than the default 
17171 \family sans
17172 slides
17173 \family default
17174  class,
17175 \begin_inset Foot
17176 status collapsed
17177
17178 \begin_layout Plain Layout
17179 \SpecialChar ldots
17180 or so I've been told repeatedly by its advocates.
17181  Having never used it, I have no idea if this claim is true or not.
17182 \end_layout
17183
17184 \end_inset
17185
17186  which this section documents.
17187 \end_layout
17188
17189 \begin_layout Standard
17190 This class is the \SpecialChar LaTeX2e
17191  improvement of the old 
17192 \noun on
17193 Sli\SpecialChar TeX
17194
17195 \noun default
17196  package.
17197  Every \SpecialChar LaTeX2e
17198  distribution includes this class [which I'll just refer to as 
17199 \begin_inset Quotes eld
17200 \end_inset
17201
17202
17203 \family sans
17204 slides
17205 \family default
17206
17207 \begin_inset Quotes erd
17208 \end_inset
17209
17210  from now on], so you're bound to have it.
17211  As I noted earlier, there are other classes, such as 
17212 \family sans
17213 foils
17214 \family default
17215 , which also produce slides for overhead projectors and do a better job
17216  at it.
17217  However, there are some things which 
17218 \family sans
17219 slides
17220 \family default
17221  can do which the others can't, such as generate overlays.
17222  Read on to learn more!
17223 \end_layout
17224
17225 \begin_layout Subsection
17226 Getting Started
17227 \begin_inset CommandInset label
17228 LatexCommand label
17229 name "sec:slidesetup"
17230
17231 \end_inset
17232
17233
17234 \end_layout
17235
17236 \begin_layout Standard
17237 Obviously, to use this document class, you need to select 
17238 \begin_inset Quotes eld
17239 \end_inset
17240
17241
17242 \family sans
17243 slides (default)
17244 \family default
17245
17246 \begin_inset Quotes erd
17247 \end_inset
17248
17249  from the class list in the 
17250 \family sans
17251 Document\SpecialChar menuseparator
17252 Settings
17253 \family default
17254  dialog.
17255  There are some other special things you should know about this class:
17256 \end_layout
17257
17258 \begin_layout Itemize
17259 Don't bother changing the options 
17260 \family sans
17261 Sides and Columns
17262 \family default
17263 .
17264  They're not supported by the 
17265 \family sans
17266 slides
17267 \family default
17268  class, anyways.
17269 \end_layout
17270
17271 \begin_layout Itemize
17272 The option 
17273 \family sans
17274 Page
17275 \begin_inset space ~
17276 \end_inset
17277
17278 style
17279 \family default
17280  behaves a bit differently for this class.
17281  The possible choices and what they do are as follows:
17282 \end_layout
17283
17284 \begin_deeper
17285 \begin_layout Description
17286
17287 \family sans
17288 plain
17289 \family default
17290  The final output contains page numbers in the lower right corner.
17291 \end_layout
17292
17293 \begin_layout Description
17294
17295 \family sans
17296 headings
17297 \family default
17298  Like 
17299 \family sans
17300 plain
17301 \family default
17302 , but also prints out any time markers you've put in.
17303  This is the default.
17304 \end_layout
17305
17306 \begin_layout Description
17307
17308 \family sans
17309 empty
17310 \family default
17311  The final output contains no page numbers, time markers, or alignment markers.
17312 \end_layout
17313
17314 \end_deeper
17315 \begin_layout Itemize
17316 The 
17317 \family sans
17318 slides
17319 \family default
17320  class has an extra option: 
17321 \family typewriter
17322 clock
17323 \family default
17324 .
17325  To use it, put 
17326 \begin_inset Quotes eld
17327 \end_inset
17328
17329
17330 \family typewriter
17331 clock
17332 \family default
17333
17334 \begin_inset Quotes erd
17335 \end_inset
17336
17337  in the extra class options.
17338 \end_layout
17339
17340 \begin_deeper
17341 \begin_layout Standard
17342 Using this options allows you to add time markers to 
17343 \family sans
17344 Note
17345 \family default
17346 s.
17347  See section
17348 \begin_inset space ~
17349 \end_inset
17350
17351
17352 \begin_inset CommandInset ref
17353 LatexCommand ref
17354 reference "sec:slideNote"
17355
17356 \end_inset
17357
17358  for more details.
17359 \end_layout
17360
17361 \end_deeper
17362 \begin_layout Standard
17363 You can also use the template file 
17364 \begin_inset Quotes eld
17365 \end_inset
17366
17367
17368 \family typewriter
17369 slides.lyx
17370 \family default
17371
17372 \begin_inset Quotes erd
17373 \end_inset
17374
17375  to automatically set up a document to use the 
17376 \family sans
17377 slides
17378 \family default
17379  class [using 
17380 \family sans
17381 File\SpecialChar menuseparator
17382 New
17383 \begin_inset space ~
17384 \end_inset
17385
17386 from
17387 \begin_inset space ~
17388 \end_inset
17389
17390 Template
17391 \family default
17392  to open your new document].
17393  The template file also contains some examples of the special paragraph
17394  environments used by this class.
17395  I'll describe those next.
17396 \end_layout
17397
17398 \begin_layout Subsection
17399 Paragraph Environments
17400 \end_layout
17401
17402 \begin_layout Subsubsection
17403 Supported Environments
17404 \end_layout
17405
17406 \begin_layout Standard
17407 The first thing you'll notice when you start up a new 
17408 \family sans
17409 slides
17410 \family default
17411  document is the font size and type: it's the equivalent of the size 
17412 \begin_inset Quotes eld
17413 \end_inset
17414
17415
17416 \family sans
17417 Largest
17418 \family default
17419
17420 \begin_inset Quotes erd
17421 \end_inset
17422
17423  in the 
17424 \family sans
17425 Sans
17426 \begin_inset space ~
17427 \end_inset
17428
17429 Serif
17430 \family default
17431  font.
17432  This is also what's used in the output.
17433  Think of this as a 
17434 \begin_inset Quotes eld
17435 \end_inset
17436
17437 visual cue
17438 \begin_inset Quotes erd
17439 \end_inset
17440
17441  to remind you that this is a slide.
17442  Your final slides will use a larger font; ergo, you'll have less space.
17443  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
17444 \end_layout
17445
17446 \begin_layout Standard
17447 The next thing that becomes obvious is the changes to the paragraph environment
17448  pull-down box [at the far-left end of the toolbar].
17449  Most of the paragraph environments you're used to seeing are missing.
17450  There are also five new ones.
17451  That's because the 
17452 \family sans
17453 slides
17454 \family default
17455  class itself only supports certain paragraph environments:
17456 \end_layout
17457
17458 \begin_layout Itemize
17459
17460 \family sans
17461 Standard
17462 \end_layout
17463
17464 \begin_layout Itemize
17465
17466 \family sans
17467 Itemize
17468 \end_layout
17469
17470 \begin_layout Itemize
17471
17472 \family sans
17473 Enumerate
17474 \end_layout
17475
17476 \begin_layout Itemize
17477
17478 \family sans
17479 Description
17480 \end_layout
17481
17482 \begin_layout Itemize
17483
17484 \family sans
17485 List
17486 \end_layout
17487
17488 \begin_layout Itemize
17489
17490 \family sans
17491 Quotation
17492 \end_layout
17493
17494 \begin_layout Itemize
17495
17496 \family sans
17497 Quote
17498 \end_layout
17499
17500 \begin_layout Itemize
17501
17502 \family sans
17503 Verse
17504 \end_layout
17505
17506 \begin_layout Itemize
17507
17508 \family sans
17509 Caption
17510 \end_layout
17511
17512 \begin_layout Itemize
17513
17514 \family sans
17515 \SpecialChar LyX
17516 -Code
17517 \end_layout
17518
17519 \begin_layout Itemize
17520
17521 \family sans
17522 Comment
17523 \end_layout
17524
17525 \begin_layout Standard
17526 All of the other standard environments, including the section-heading environmen
17527 ts, aren't used in the 
17528 \family sans
17529 slides
17530 \family default
17531  class.
17532 \end_layout
17533
17534 \begin_layout Standard
17535 On the other hand, you'll notice the following new environments:
17536 \end_layout
17537
17538 \begin_layout Itemize
17539
17540 \family sans
17541 Slide
17542 \end_layout
17543
17544 \begin_layout Itemize
17545
17546 \family sans
17547 Overlay
17548 \end_layout
17549
17550 \begin_layout Itemize
17551
17552 \family sans
17553 Note
17554 \end_layout
17555
17556 \begin_layout Itemize
17557
17558 \family sans
17559 InvisibleText
17560 \end_layout
17561
17562 \begin_layout Itemize
17563
17564 \family sans
17565 VisibleText
17566 \end_layout
17567
17568 \begin_layout Standard
17569 These five are kind of quirky, due to a 
17570 \begin_inset Quotes eld
17571 \end_inset
17572
17573 feature
17574 \begin_inset Quotes erd
17575 \end_inset
17576
17577  in \SpecialChar LyX
17578 .
17579  You see, \SpecialChar LyX
17580  doesn't permit you to nest any other paragraph environment into
17581  an empty environment.
17582  Now, that's fine and dandy, but it means that you wouldn't be able to start
17583  a slide with anything except plain text.
17584  To deal with this, I've performed a little 
17585 \begin_inset Quotes eld
17586 \end_inset
17587
17588 \SpecialChar LaTeX
17589  magic.
17590 \begin_inset Quotes erd
17591 \end_inset
17592
17593  
17594 \end_layout
17595
17596 \begin_layout Subsubsection
17597 Quirks of the New Environments
17598 \begin_inset CommandInset label
17599 LatexCommand label
17600 name "sec:slideQuirk"
17601
17602 \end_inset
17603
17604
17605 \end_layout
17606
17607 \begin_layout Standard
17608 All five of the new paragraph environments are somewhat quirky due to inherent
17609  limitiations in the current version of \SpecialChar LyX
17610 .
17611  As I just mentioned, \SpecialChar LyX
17612  forbids environments that begin with another environment.
17613  To get around this, the 
17614 \family sans
17615 Slide
17616 \family default
17617  environment isn't a paragraph environment as described in the 
17618 \emph on
17619 User's Guide
17620 \emph default
17621 .
17622  
17623 \end_layout
17624
17625 \begin_layout Standard
17626 You should consider 
17627 \family sans
17628 Slide
17629 \family default
17630
17631 \family sans
17632 Overlay
17633 \family default
17634 , and 
17635 \family sans
17636 Note
17637 \family default
17638  to be 
17639 \begin_inset Quotes eld
17640 \end_inset
17641
17642 pseudo-environments.
17643 \begin_inset Quotes erd
17644 \end_inset
17645
17646  They look like a section heading or a 
17647 \begin_inset Quotes eld
17648 \end_inset
17649
17650
17651 \family sans
17652 Caption
17653 \family default
17654 ,
17655 \begin_inset Quotes erd
17656 \end_inset
17657
17658  but really begin a [and, if necessary, end the previous] paragraph environment.
17659  Likewise, treat 
17660 \family sans
17661 InvisibleText
17662 \family default
17663  and 
17664 \family sans
17665 VisibleText
17666 \family default
17667  as 
17668 \begin_inset Quotes eld
17669 \end_inset
17670
17671 pseudo-commands.
17672 \begin_inset Quotes erd
17673 \end_inset
17674
17675  These two perform some action.
17676 \end_layout
17677
17678 \begin_layout Standard
17679 A common feature of all five environments, 
17680 \family sans
17681 Slide
17682 \family default
17683
17684 \family sans
17685 Overlay
17686 \family default
17687
17688 \family sans
17689 Note
17690 \family default
17691
17692 \family sans
17693 InvisibleText
17694 \family default
17695  and 
17696 \family sans
17697 VisibleText
17698 \family default
17699 , is a rather long-ish label.
17700  The text following this label — ordinarily the contents of the paragraph
17701  environment — is utterly irrelevant for 
17702 \family sans
17703 Slide
17704 \family default
17705
17706 \family sans
17707 Overlay
17708 \family default
17709
17710 \family sans
17711 Note
17712 \family default
17713
17714 \family sans
17715 InvisibleText
17716 \family default
17717  and 
17718 \family sans
17719 VisibleText
17720 \family default
17721 .
17722  \SpecialChar LyX
17723  completely ignores it.
17724  In fact, you can leave these five environments completely empty.
17725  
17726 \end_layout
17727
17728 \begin_layout Standard
17729 While you don't 
17730 \emph on
17731 have
17732 \emph default
17733  to put any text after the rather long-ish label, you might want to.
17734  This could be a short description of the contents of the 
17735 \family sans
17736 Slide
17737 \family default
17738 , for example.
17739  In that case, enter your descriptive comment and hit 
17740 \family sans
17741 Return
17742 \family default
17743  as you normally would.
17744 \end_layout
17745
17746 \begin_layout Standard
17747 If, on the other hand, you don't want to enter any descriptive text, you'll
17748  hit another \SpecialChar LyX
17749  quirk.
17750  \SpecialChar LyX
17751 , like nature, abhors a vacuum, and will not let you start a new paragraph
17752  environment until you put something in the old one.
17753  So, do this:
17754 \end_layout
17755
17756 \begin_layout Itemize
17757 Start entering the text that will 
17758 \emph on
17759 follow
17760 \emph default
17761  the new 
17762 \family sans
17763 Slide
17764 \family default
17765
17766 \family sans
17767 Overlay
17768 \family default
17769
17770 \family sans
17771 Note
17772 \family default
17773
17774 \family sans
17775 InvisibleText
17776 \family default
17777  or 
17778 \family sans
17779 VisibleText
17780 \family default
17781 .
17782  
17783 \end_layout
17784
17785 \begin_layout Itemize
17786 Now move to the beginning of that paragraph.
17787  
17788 \end_layout
17789
17790 \begin_layout Itemize
17791 Next, hit 
17792 \family sans
17793 Return
17794 \family default
17795 .
17796  
17797 \end_layout
17798
17799 \begin_layout Itemize
17800 Finally, change this new, empty paragraph to a 
17801 \family sans
17802 Slide
17803 \family default
17804
17805 \family sans
17806 Overlay
17807 \family default
17808
17809 \family sans
17810 Note
17811 \family default
17812
17813 \family sans
17814 InvisibleText
17815 \family default
17816  or 
17817 \family sans
17818 VisibleText
17819 \family default
17820 .
17821  
17822 \end_layout
17823
17824 \begin_layout Standard
17825 Some future version of \SpecialChar LyX
17826  will, hopefully, resolve this quirkiness\SpecialChar ldots
17827
17828 \end_layout
17829
17830 \begin_layout Subsection
17831 Making a Presentation with 
17832 \family sans
17833 Slide
17834 \family default
17835
17836 \family sans
17837 Overlay
17838 \family default
17839  and 
17840 \family sans
17841 Note
17842 \end_layout
17843
17844 \begin_layout Subsubsection
17845 Using the 
17846 \family sans
17847 Slide
17848 \family default
17849  Environment
17850 \end_layout
17851
17852 \begin_layout Standard
17853 If you're expecting this section to teach you how to actually make a presentatio
17854 n, you'll be sorely disappointed.
17855  Naturally, I'll describe all of the ways the 
17856 \family sans
17857 slides
17858 \family default
17859  class can assist you in preparing the materials for a presentation.
17860  Filling in the contents, however, is up to you.
17861  [Then again, that 
17862 \emph on
17863 is
17864 \emph default
17865  the \SpecialChar LyX
17866  philosophy.]
17867 \end_layout
17868
17869 \begin_layout Standard
17870 Choosing the 
17871 \family sans
17872 Slide
17873 \family default
17874  environment [in the manner described in section
17875 \begin_inset space ~
17876 \end_inset
17877
17878
17879 \begin_inset CommandInset ref
17880 LatexCommand ref
17881 reference "sec:slideQuirk"
17882
17883 \end_inset
17884
17885 ] tells \SpecialChar LyX
17886  to begin a new slide [duh].
17887  The label for this environment/
17888 \begin_inset Quotes erd
17889 \end_inset
17890
17891 pseudo-command
17892 \begin_inset Quotes erd
17893 \end_inset
17894
17895  is an 
17896 \begin_inset Quotes eld
17897 \end_inset
17898
17899 ASCII line,
17900 \begin_inset Quotes erd
17901 \end_inset
17902
17903  in cool blue, followed by the label, 
17904 \begin_inset Quotes eld
17905 \end_inset
17906
17907 NewSlide:
17908 \begin_inset Quotes erd
17909 \end_inset
17910
17911 .
17912  Any text or paragraph environments that follow this one go on the new slide.
17913  It's that simple.
17914 \end_layout
17915
17916 \begin_layout Standard
17917 Slides are probably the only time you'll need to forcibly end pages in \SpecialChar LyX
17918
17919  (this can be specified in the 
17920 \family sans
17921 Paragraph Layout
17922 \family default
17923  dialog).
17924  In fact, you'll want to, once you finish entering the contents of one slide.
17925  If you've entered more text than can physically fit on a slide, the extra
17926  overflows onto a new slide.
17927  I don't recommend doing this, however, since the overflow slide won't have
17928  any page number on it.
17929  Furthermore, it may interfere with any 
17930 \family sans
17931 Overlay
17932 \family default
17933  you've made to accompany the oversized 
17934 \family sans
17935 Slide
17936 \family default
17937 .
17938 \end_layout
17939
17940 \begin_layout Standard
17941 The 
17942 \family sans
17943 Overlay
17944 \family default
17945  and 
17946 \family sans
17947 Note
17948 \family default
17949  environments work the same way as the 
17950 \family sans
17951 Slide
17952 \family default
17953  environment.
17954  They both create an 
17955 \begin_inset Quotes eld
17956 \end_inset
17957
17958 ASCII line
17959 \begin_inset Quotes erd
17960 \end_inset
17961
17962  followed by a label [
17963 \begin_inset Quotes eld
17964 \end_inset
17965
17966 NewOverlay:
17967 \begin_inset Quotes erd
17968 \end_inset
17969
17970  and 
17971 \begin_inset Quotes eld
17972 \end_inset
17973
17974 NewNote:
17975 \begin_inset Quotes erd
17976 \end_inset
17977
17978 , respectively].
17979  The color is a stunning magenta instead of blue, and the 
17980 \begin_inset Quotes eld
17981 \end_inset
17982
17983 ASCII line
17984 \begin_inset Quotes erd
17985 \end_inset
17986
17987  will look different, in style and in length.
17988  The label fonts of all three also differ from one another.
17989 \end_layout
17990
17991 \begin_layout Standard
17992 As with a 
17993 \family sans
17994 Slide
17995 \family default
17996 , if the contents of a 
17997 \family sans
17998 Note
17999 \family default
18000  or 
18001 \family sans
18002 Overlay
18003 \family default
18004  exceed the physical size of a slide or sheet of paper, the extra will overflow
18005  onto a new sheet.
18006  Again, you should avoid this.
18007  It defeats the whole purpose of 
18008 \family sans
18009 Note
18010 \family default
18011 s and 
18012 \family sans
18013 Overlay
18014 \family default
18015 s.
18016 \end_layout
18017
18018 \begin_layout Subsubsection
18019 Using 
18020 \family sans
18021 Overlay
18022 \family default
18023  with 
18024 \family sans
18025 Slide
18026 \end_layout
18027
18028 \begin_layout Standard
18029 The idea behind an 
18030 \family sans
18031 Overlay
18032 \family default
18033  is a slide that sits atop another slide.
18034  Perhaps you wish to discuss a figure on the main 
18035 \family sans
18036 Slide
18037 \family default
18038  before displaying the text associated with it.
18039  One way to accomplish this is tape a flap of dark paper over the part of
18040  the 
18041 \family sans
18042 Slide
18043 \family default
18044  you want to display later.
18045  This method fails, however, if you wish to overlap one graph with another,
18046  for example.
18047  You would then have to fumble while speaking to align the two separate,
18048  overlapping 
18049 \family sans
18050 Slide
18051 \family default
18052 s to align the two graphs.
18053  The use of an 
18054 \family sans
18055 Overlay
18056 \family default
18057  environment in both cases makes life much easier.
18058 \end_layout
18059
18060 \begin_layout Standard
18061 Each 
18062 \family sans
18063 Overlay
18064 \family default
18065  receives the page number of its 
18066 \begin_inset Quotes eld
18067 \end_inset
18068
18069 parent
18070 \begin_inset Quotes erd
18071 \end_inset
18072
18073  
18074 \family sans
18075 Slide
18076 \family default
18077 , appended by 
18078 \begin_inset Quotes eld
18079 \end_inset
18080
18081
18082 \family typewriter
18083 -a
18084 \family default
18085
18086 \begin_inset Quotes erd
18087 \end_inset
18088
18089 .
18090 \begin_inset Foot
18091 status collapsed
18092
18093 \begin_layout Plain Layout
18094 Presumably, mutliple 
18095 \family sans
18096 Overlay
18097 \family default
18098 s would have 
18099 \begin_inset Quotes eld
18100 \end_inset
18101
18102
18103 \family typewriter
18104 -a
18105 \family default
18106
18107 \begin_inset Quotes erd
18108 \end_inset
18109
18110
18111 \begin_inset Quotes eld
18112 \end_inset
18113
18114
18115 \family typewriter
18116 -b
18117 \family default
18118
18119 \begin_inset Quotes erd
18120 \end_inset
18121
18122
18123 \begin_inset Quotes eld
18124 \end_inset
18125
18126
18127 \family typewriter
18128 -c
18129 \family default
18130
18131 \begin_inset Quotes erd
18132 \end_inset
18133
18134 , etc.
18135 \begin_inset space ~
18136 \end_inset
18137
18138 appended to the page number of the parent 
18139 \family sans
18140 Slide
18141 \family default
18142 .
18143  
18144 \end_layout
18145
18146 \end_inset
18147
18148  Clearly, you want the contents of both the 
18149 \family sans
18150 Slide
18151 \family default
18152  and the 
18153 \family sans
18154 Overlay
18155 \family default
18156  to each fit on a single physical slide! You should probably consider an
18157  
18158 \family sans
18159 Overlay
18160 \family default
18161  as 
18162 \begin_inset Quotes eld
18163 \end_inset
18164
18165 part of
18166 \begin_inset Quotes erd
18167 \end_inset
18168
18169  a 
18170 \family sans
18171 Slide
18172 \family default
18173 .
18174  Indeed, the \SpecialChar LyX
18175  
18176 \family sans
18177 slides
18178 \family default
18179  class provides a visual cue for this: the label at the start of an 
18180 \family sans
18181 Overlay
18182 \family default
18183  is shorter than that at the start of a 
18184 \family sans
18185 Slide
18186 \family default
18187 .
18188  Lastly, when you generate printable output, you'll find alignment markers
18189  in all four corners of both the 
18190 \family sans
18191 Overlay
18192 \family default
18193  page and its parent 
18194 \family sans
18195 Slide
18196 \family default
18197 .
18198  These will assist you in lining up the two physical slides.
18199 \end_layout
18200
18201 \begin_layout Standard
18202 The major problem in overlaying two slides is aligning the contents of the
18203  two transparencies.
18204  How much space should you leave for that graph on the second slide? Worse
18205  still, what if you want a graph and a sentence on second slide, but there
18206  is text on the main transparency that goes in between them? You could try
18207  and insert vertical space of the right size.
18208  The better way is to use 
18209 \family sans
18210 InvisibleText
18211 \family default
18212  and 
18213 \family sans
18214 VisibleText
18215 \family default
18216 .
18217 \end_layout
18218
18219 \begin_layout Standard
18220 As their names imply, 
18221 \family sans
18222 InvisibleText
18223 \family default
18224  and 
18225 \family sans
18226 VisibleText
18227 \family default
18228  are two command-like paragraph environments that make all subsequent text
18229  invisible and visible, respectively.
18230  Note from section
18231 \begin_inset space ~
18232 \end_inset
18233
18234
18235 \begin_inset CommandInset ref
18236 LatexCommand ref
18237 reference "sec:slideQuirk"
18238
18239 \end_inset
18240
18241  that you don't place anything 
18242 \emph on
18243 into
18244 \emph default
18245  these two environments, however.
18246  When you create an 
18247 \family sans
18248 InvisibleText
18249 \family default
18250 , it inserts a centered, sky-blue label into the page reading 
18251 \begin_inset Quotes eld
18252 \end_inset
18253
18254 <Invisible Text Follows>
18255 \begin_inset Quotes erd
18256 \end_inset
18257
18258 .
18259  For paragraphs following this label, the parts of the 
18260 \family sans
18261 Slide
18262 \family default
18263  [or 
18264 \family sans
18265 Overlay
18266 \family default
18267 ; it doesn't matter which] where they would be contain instead blank space.
18268  
18269 \end_layout
18270
18271 \begin_layout Standard
18272 For 
18273 \family sans
18274 VisibleText
18275 \family default
18276 , the corresponding centered label is 
18277 \begin_inset Quotes eld
18278 \end_inset
18279
18280 <Visible Text Follows>
18281 \begin_inset Quotes erd
18282 \end_inset
18283
18284  in blazing green.
18285  Paragraphs following this label behave normally.
18286  Note that the beginning of a new 
18287 \family sans
18288 Slide
18289 \family default
18290
18291 \family sans
18292 Overlay
18293 \family default
18294 , or 
18295 \family sans
18296 Note
18297 \family default
18298  automatically shuts off an 
18299 \family sans
18300 InvisibleText
18301 \family default
18302 .
18303  It's therefore not necessary to use 
18304 \family sans
18305 VisibleText
18306 \family default
18307  at the end of a 
18308 \family sans
18309 Slide
18310 \family default
18311 .
18312 \end_layout
18313
18314 \begin_layout Standard
18315 By now, it should be obvious how to create overlay transparencies using
18316  the proper combination of 
18317 \family sans
18318 InvisibleText
18319 \family default
18320  and 
18321 \family sans
18322 VisibleText
18323 \family default
18324  on a 
18325 \family sans
18326 Slide
18327 \family default
18328  and 
18329 \family sans
18330 Overlay
18331 \family default
18332 :
18333 \end_layout
18334
18335 \begin_layout Enumerate
18336 Create a 
18337 \family sans
18338 Slide
18339 \family default
18340 , including everything that will appear on it, whether on the main slide
18341  or on the 
18342 \family sans
18343 Overlay
18344 \family default
18345 .
18346 \end_layout
18347
18348 \begin_layout Enumerate
18349 Before each figure or paragraph that will appear only on the 
18350 \family sans
18351 Overlay
18352 \family default
18353 , insert an 
18354 \family sans
18355 InvisibleText
18356 \family default
18357  environment.
18358  If necessary, insert a 
18359 \family sans
18360 VisibleText
18361 \family default
18362  environment after the 
18363 \family sans
18364 Overlay
18365 \family default
18366 -only text.
18367 \end_layout
18368
18369 \begin_layout Enumerate
18370 Start an 
18371 \family sans
18372 Overlay
18373 \family default
18374  immediately following the 
18375 \family sans
18376 Slide
18377 \family default
18378 .
18379 \end_layout
18380
18381 \begin_layout Enumerate
18382 Copy the contents of this 
18383 \family sans
18384 Slide
18385 \family default
18386  into the 
18387 \family sans
18388 Overlay
18389 \family default
18390 .
18391 \end_layout
18392
18393 \begin_layout Enumerate
18394 Within the 
18395 \family sans
18396 Overlay
18397 \family default
18398 , change all of the 
18399 \family sans
18400 InvisibleText
18401 \family default
18402  lines to 
18403 \family sans
18404 VisibleText
18405 \family default
18406  and vice-versa.
18407 \end_layout
18408
18409 \begin_layout Standard
18410 That's it.
18411  You've just made an 
18412 \family sans
18413 Overlay
18414 \family default
18415 .
18416 \end_layout
18417
18418 \begin_layout Standard
18419 There's one problem with the way I've designed the \SpecialChar LyX
18420  
18421 \family sans
18422 slides
18423 \family default
18424  class: you can't make text in the middle of a paragraph invisible, nor
18425  make text in the middle of an invisible paragraph visible again.
18426  To accomplish this feat, you'll need to use some inlined \SpecialChar LaTeX
18427  codes.
18428 \begin_inset Foot
18429 status collapsed
18430
18431 \begin_layout Plain Layout
18432 The commands of interest are: 
18433 \end_layout
18434
18435 \begin_layout Itemize
18436
18437 \family typewriter
18438 {
18439 \backslash
18440 invisible \SpecialChar ldots
18441  }
18442 \end_layout
18443
18444 \begin_layout Itemize
18445
18446 \family typewriter
18447 {
18448 \backslash
18449 visible \SpecialChar ldots
18450  }
18451 \end_layout
18452
18453 \begin_layout Plain Layout
18454 \SpecialChar ldots
18455 and need to be marked as \SpecialChar TeX
18456 .
18457  The text whose 
18458 \begin_inset Quotes eld
18459 \end_inset
18460
18461 visibility
18462 \begin_inset Quotes erd
18463 \end_inset
18464
18465  you wish to change goes in between the brackets [and after the 
18466 \family typewriter
18467
18468 \backslash
18469 invisible
18470 \family default
18471  or 
18472 \family typewriter
18473
18474 \backslash
18475 visible
18476 \family default
18477  command].
18478  If you don't know how to mark text as \SpecialChar TeX
18479 , see the appropriate section of
18480  the 
18481 \emph on
18482 User's Guide
18483 \emph default
18484 .
18485 \end_layout
18486
18487 \end_inset
18488
18489
18490 \end_layout
18491
18492 \begin_layout Subsubsection
18493 Using 
18494 \family sans
18495 Note
18496 \family default
18497  with 
18498 \family sans
18499 Slide
18500 \family default
18501
18502 \begin_inset CommandInset label
18503 LatexCommand label
18504 name "sec:slideNote"
18505
18506 \end_inset
18507
18508
18509 \end_layout
18510
18511 \begin_layout Standard
18512 Like an 
18513 \family sans
18514 Overlay
18515 \family default
18516 , a 
18517 \family sans
18518 Note
18519 \family default
18520  is associated with a 
18521 \begin_inset Quotes eld
18522 \end_inset
18523
18524 parent
18525 \begin_inset Quotes erd
18526 \end_inset
18527
18528  
18529 \family sans
18530 Slide
18531 \family default
18532 .
18533  Here, too, the \SpecialChar LyX
18534  
18535 \family sans
18536 slides
18537 \family default
18538  class provides visual cues.
18539  The label for a 
18540 \family sans
18541 Note
18542 \family default
18543  is shorter than that of a 
18544 \family sans
18545 Slide
18546 \family default
18547  [yet longer than that of an 
18548 \family sans
18549 Overlay
18550 \family default
18551 ] and, like the label of an 
18552 \family sans
18553 Overlay
18554 \family default
18555  is shockingly magenta.
18556  Additionally, the printed 
18557 \family sans
18558 Note
18559 \family default
18560  has the page number of its 
18561 \begin_inset Quotes eld
18562 \end_inset
18563
18564 parent
18565 \begin_inset Quotes erd
18566 \end_inset
18567
18568  
18569 \family sans
18570 Slide
18571 \family default
18572 , appended by 
18573 \begin_inset Quotes eld
18574 \end_inset
18575
18576
18577 \family typewriter
18578 -
18579 \family default
18580 1
18581 \begin_inset Quotes erd
18582 \end_inset
18583
18584
18585 \begin_inset Quotes eld
18586 \end_inset
18587
18588
18589 \family typewriter
18590 -
18591 \family default
18592 2
18593 \begin_inset Quotes erd
18594 \end_inset
18595
18596
18597 \begin_inset Quotes eld
18598 \end_inset
18599
18600
18601 \family typewriter
18602 -
18603 \family default
18604 3
18605 \begin_inset Quotes erd
18606 \end_inset
18607
18608 , etc.
18609  You can have multiple 
18610 \family sans
18611 Note
18612 \family default
18613 s associated with a single 
18614 \family sans
18615 Slide
18616 \family default
18617 , and, as with 
18618 \family sans
18619 Slide
18620 \family default
18621  and 
18622 \family sans
18623 Overlay
18624 \family default
18625 , you'll probably want to break up long 
18626 \family sans
18627 Note
18628 \family default
18629 s so that they fit on a single sheet of paper.
18630 \end_layout
18631
18632 \begin_layout Standard
18633 The purpose of a 
18634 \family sans
18635 Note
18636 \family default
18637  is obvious: it contains anything additional you might want to say about
18638  a 
18639 \family sans
18640 Slide
18641 \family default
18642 .
18643  It could also be used as a sheet of reminders for a particular 
18644 \family sans
18645 Slide
18646 \family default
18647 .
18648  In the case of the latter, you might want to make use of time markers.
18649  Currently, the \SpecialChar LyX
18650  
18651 \family sans
18652 slides
18653 \family default
18654  class has no 
18655 \begin_inset Quotes eld
18656 \end_inset
18657
18658 native
18659 \begin_inset Quotes erd
18660 \end_inset
18661
18662  support for time markers, a 
18663 \noun on
18664 Sli\SpecialChar TeX
18665
18666 \noun default
18667  feature.
18668  So, you'll have to resort to using the \SpecialChar LaTeX
18669  codes.
18670 \end_layout
18671
18672 \begin_layout Standard
18673 To use time markers, you'll need to specify the extra class option 
18674 \begin_inset Quotes eld
18675 \end_inset
18676
18677
18678 \family typewriter
18679 clock
18680 \family default
18681
18682 \begin_inset Quotes erd
18683 \end_inset
18684
18685  [see section
18686 \begin_inset space ~
18687 \end_inset
18688
18689
18690 \begin_inset CommandInset ref
18691 LatexCommand ref
18692 reference "sec:slidesetup"
18693
18694 \end_inset
18695
18696 ].
18697  This option turns on timing marks, which will appear in the lower-left-hand
18698  corner of every 
18699 \family sans
18700 Note
18701 \family default
18702  you generate.
18703  To set what appears in the time marker, you use the \SpecialChar LaTeX
18704  commands 
18705 \begin_inset Quotes eld
18706 \end_inset
18707
18708
18709 \family typewriter
18710
18711 \backslash
18712 settime{}
18713 \family default
18714
18715 \begin_inset Quotes erd
18716 \end_inset
18717
18718  and 
18719 \begin_inset Quotes eld
18720 \end_inset
18721
18722
18723 \family typewriter
18724
18725 \backslash
18726 addtime{}
18727 \family default
18728
18729 \begin_inset Quotes erd
18730 \end_inset
18731
18732 .
18733  The arguments of both commands are time measured in seconds.
18734  
18735 \begin_inset Quotes eld
18736 \end_inset
18737
18738
18739 \family typewriter
18740
18741 \backslash
18742 settime{}
18743 \family default
18744
18745 \begin_inset Quotes erd
18746 \end_inset
18747
18748  sets the time marker to a given time.
18749  
18750 \begin_inset Quotes eld
18751 \end_inset
18752
18753
18754 \family typewriter
18755
18756 \backslash
18757 addtime{}
18758 \family default
18759
18760 \begin_inset Quotes erd
18761 \end_inset
18762
18763  increments the time marker by the specified amount.
18764  Using time markers and 
18765 \family sans
18766 Note
18767 \family default
18768 s in this fashion, you can remind yourself how much time to spend on a particula
18769
18770 \family sans
18771 Slide
18772 \family default
18773 .
18774 \end_layout
18775
18776 \begin_layout Standard
18777 There's one last feature to describe.
18778  Clearly, you'd like to print out all of your 
18779 \family sans
18780 Slide
18781 \family default
18782 s and 
18783 \family sans
18784 Overlay
18785 \family default
18786 s on transparencies while printing all of your 
18787 \family sans
18788 Note
18789 \family default
18790 s on plain paper.
18791  However, a 
18792 \family sans
18793 Note
18794 \family default
18795  
18796 \emph on
18797 must
18798 \emph default
18799  follow the 
18800 \family sans
18801 Slide
18802 \family default
18803  with which it is associated.
18804  What's a person to do?
18805 \end_layout
18806
18807 \begin_layout Standard
18808 Luckily, there are two \SpecialChar LaTeX
18809  commands that allow you to select what to print
18810  out.
18811  Both must be placed into the preamble of your document.
18812  The command 
18813 \begin_inset Quotes eld
18814 \end_inset
18815
18816
18817 \family typewriter
18818
18819 \backslash
18820 onlyslides{
18821 \backslash
18822 slides}
18823 \family default
18824
18825 \begin_inset Quotes erd
18826 \end_inset
18827
18828  will cause the output to contain only the 
18829 \family sans
18830 Slide
18831 \family default
18832 s and 
18833 \family sans
18834 Overlay
18835 \family default
18836 s.
18837  Correspondingly, the command 
18838 \begin_inset Quotes eld
18839 \end_inset
18840
18841
18842 \family typewriter
18843
18844 \backslash
18845 onlynotes{
18846 \backslash
18847 notes}
18848 \family default
18849
18850 \begin_inset Quotes erd
18851 \end_inset
18852
18853  prevents the output of anything but 
18854 \family sans
18855 Note
18856 \family default
18857 s.
18858  I'd advise placing both commands in the preamble and initially comment
18859  both out.
18860  You can then preview your entire presentation as you write.
18861  When you're done writing, you can then uncomment one of the two to select
18862  what you want to print.
18863  I like to uncomment 
18864 \begin_inset Quotes eld
18865 \end_inset
18866
18867
18868 \family typewriter
18869
18870 \backslash
18871 onlyslides{
18872 \backslash
18873 slides}
18874 \family default
18875
18876 \begin_inset Quotes erd
18877 \end_inset
18878
18879  , print to a file with 
18880 \begin_inset Quotes eld
18881 \end_inset
18882
18883
18884 \family typewriter
18885 -slides
18886 \family default
18887
18888 \begin_inset Quotes erd
18889 \end_inset
18890
18891  in its name, comment it back out, then uncomment 
18892 \begin_inset Quotes eld
18893 \end_inset
18894
18895
18896 \family typewriter
18897
18898 \backslash
18899 onlynotes{
18900 \backslash
18901 notes}
18902 \family default
18903
18904 \begin_inset Quotes erd
18905 \end_inset
18906
18907  and print to a 
18908 \begin_inset Quotes eld
18909 \end_inset
18910
18911
18912 \family typewriter
18913 *-notes.ps
18914 \family default
18915
18916 \begin_inset Quotes erd
18917 \end_inset
18918
18919  file.
18920  I can then send either file to a printer, loading transparencies or plain
18921  paper as appropriate.
18922 \end_layout
18923
18924 \begin_layout Standard
18925 You can also provide other arguments to the 
18926 \begin_inset Quotes eld
18927 \end_inset
18928
18929
18930 \family typewriter
18931
18932 \backslash
18933 onlyslides{}
18934 \family default
18935
18936 \begin_inset Quotes erd
18937 \end_inset
18938
18939  and 
18940 \begin_inset Quotes eld
18941 \end_inset
18942
18943
18944 \family typewriter
18945
18946 \backslash
18947 onlynotes{}
18948 \family default
18949
18950 \begin_inset Quotes erd
18951 \end_inset
18952
18953  commands.
18954  See a good \SpecialChar LaTeX
18955  book for details.
18956 \end_layout
18957
18958 \begin_layout Subsection
18959 The 
18960 \family sans
18961 slides
18962 \family default
18963  Class Template File
18964 \end_layout
18965
18966 \begin_layout Standard
18967 I have also provided a template file, 
18968 \begin_inset Quotes eld
18969 \end_inset
18970
18971
18972 \family typewriter
18973 slides.lyx
18974 \family default
18975
18976 \begin_inset Quotes erd
18977 \end_inset
18978
18979 , with the 
18980 \family sans
18981 slides
18982 \family default
18983  class.
18984  To use it, begin your new presentation with 
18985 \family sans
18986 File\SpecialChar menuseparator
18987 New
18988 \begin_inset space ~
18989 \end_inset
18990
18991 from
18992 \begin_inset space ~
18993 \end_inset
18994
18995 Template
18996 \family default
18997 .
18998  Your new \SpecialChar LyX
18999  presentation file will contain an example 
19000 \family sans
19001 Slide
19002 \family default
19003  – 
19004 \family sans
19005 Overlay
19006 \family default
19007  – 
19008 \family sans
19009 Note
19010 \family default
19011  triplet.
19012  The 
19013 \family sans
19014 Slide
19015 \family default
19016  and 
19017 \family sans
19018 Overlay
19019 \family default
19020  additionally contain an example of the use of 
19021 \family sans
19022 InvisibleText
19023 \family default
19024  and 
19025 \family sans
19026 VisibleText
19027 \family default
19028 .
19029  Lastly, the preamble will contain:
19030 \end_layout
19031
19032 \begin_layout LyX-Code
19033 % Uncomment to print out only slides and overlays
19034 \end_layout
19035
19036 \begin_layout LyX-Code
19037 %
19038 \end_layout
19039
19040 \begin_layout LyX-Code
19041 %
19042 \backslash
19043 onlyslides{
19044 \backslash
19045 slides}
19046 \begin_inset Newline newline
19047 \end_inset
19048
19049  
19050 \end_layout
19051
19052 \begin_layout LyX-Code
19053 % Uncomment to print out only notes
19054 \end_layout
19055
19056 \begin_layout LyX-Code
19057 %
19058 \end_layout
19059
19060 \begin_layout LyX-Code
19061 %
19062 \backslash
19063 onlynotes{
19064 \backslash
19065 notes}
19066 \end_layout
19067
19068 \begin_layout Standard
19069 One final thing: I created this class to support the \SpecialChar LaTeX2e
19070  
19071 \begin_inset Quotes eld
19072 \end_inset
19073
19074
19075 \noun on
19076 Sli\SpecialChar TeX
19077
19078 \noun default
19079  emulation
19080 \begin_inset Quotes erd
19081 \end_inset
19082
19083  class, one of the built-in \SpecialChar LaTeX2e
19084  classes.
19085  Neither I nor the rest of the \SpecialChar LyX
19086  Team endorse or oppose the use of this built-in
19087  slide class.
19088  It's here if you want it or need it.
19089  There exist other \SpecialChar LaTeX2e
19090  classes for creating presentations, such as the 
19091 \family sans
19092 Foils
19093 \family default
19094  class [see section
19095 \begin_inset space ~
19096 \end_inset
19097
19098
19099 \begin_inset CommandInset ref
19100 LatexCommand ref
19101 reference "sec:foiltex"
19102
19103 \end_inset
19104
19105 ] or the 
19106 \begin_inset Quotes eld
19107 \end_inset
19108
19109
19110 \family typewriter
19111 seminar
19112 \family default
19113
19114 \begin_inset Quotes erd
19115 \end_inset
19116
19117  package [present on some \SpecialChar TeX
19118  distributions].
19119  The latter is not yet supported under \SpecialChar LyX
19120 .
19121 \begin_inset Foot
19122 status collapsed
19123
19124 \begin_layout Plain Layout
19125 Perhaps you can take on the task\SpecialChar ldots
19126
19127 \end_layout
19128
19129 \end_inset
19130
19131  I know nothing about these other classes.
19132  Try them out to see what sort of alternative they provide.
19133 \end_layout
19134
19135 \begin_layout Chapter
19136 \SpecialChar LyX
19137  Features needing Extra Software
19138 \end_layout
19139
19140 \begin_layout Section
19141 Checking \SpecialChar TeX
19142
19143 \end_layout
19144
19145 \begin_layout Standard
19146 by 
19147 \noun on
19148 Asger Alstrup
19149 \end_layout
19150
19151 \begin_layout Subsection
19152 Introduction
19153 \end_layout
19154
19155 \begin_layout Standard
19156 If you have the 
19157 \family typewriter
19158 chktex
19159 \family default
19160  program installed
19161 \begin_inset Foot
19162 status collapsed
19163
19164 \begin_layout Plain Layout
19165
19166 \family typewriter
19167 chktex
19168 \family default
19169  is not yet available when you are using the \SpecialChar LaTeX
19170  distribution MiK\SpecialChar TeX
19171 .
19172 \end_layout
19173
19174 \end_inset
19175
19176 , you'll find in the 
19177 \family sans
19178 Tools
19179 \family default
19180  menu the entry: 
19181 \family sans
19182 Check
19183 \begin_inset space ~
19184 \end_inset
19185
19186 TeX
19187 \family default
19188 .
19189  You can get 
19190 \family typewriter
19191 chktex
19192 \family default
19193  from CTAN,
19194 \begin_inset Newline newline
19195 \end_inset
19196
19197
19198 \begin_inset CommandInset href
19199 LatexCommand href
19200 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
19201 literal "false"
19202
19203 \end_inset
19204
19205 .
19206 \end_layout
19207
19208 \begin_layout Standard
19209 The 
19210 \family sans
19211 Chk\SpecialChar TeX
19212
19213 \family default
19214  package is a program that was written by 
19215 \begin_inset Flex Noun
19216 status collapsed
19217
19218 \begin_layout Plain Layout
19219 Jens T.
19220 \begin_inset space ~
19221 \end_inset
19222
19223 Berger Thielemann
19224 \end_layout
19225
19226 \end_inset
19227
19228  in frustration because some constructs in \SpecialChar LaTeX
19229  are sometimes non-intuitive,
19230  and easy to forget.
19231  The program runs over your \SpecialChar LaTeX
19232  file, checks the integrity of the file, and
19233  flags some common errors.
19234  In other technical words, it is 
19235 \family typewriter
19236 lint
19237 \family default
19238  for \SpecialChar LaTeX
19239 .
19240 \end_layout
19241
19242 \begin_layout Standard
19243 Well, what is a syntax checker doing in \SpecialChar LyX
19244  which is supposed to produce correct
19245  \SpecialChar LaTeX
19246  anyways? The answer is simple: Just as 
19247 \family typewriter
19248 Lint
19249 \family default
19250  not only checks the 
19251 \emph on
19252 syntax
19253 \emph default
19254  of C programs, but also does 
19255 \emph on
19256 semantic
19257 \emph default
19258  checks for type-errors, 
19259 \family sans
19260 Chk\SpecialChar TeX
19261
19262 \family default
19263  catches some common 
19264 \emph on
19265 typographic
19266 \emph default
19267  errors, in addition to the syntactical ones.
19268  Specifically, 
19269 \family sans
19270 Chk\SpecialChar TeX
19271
19272 \family default
19273  is capable of detecting several common errors, such as
19274 \end_layout
19275
19276 \begin_layout Itemize
19277 Ellipsis detection:
19278 \begin_inset Newline newline
19279 \end_inset
19280
19281 Use \SpecialChar ldots
19282  instead of ...
19283 \end_layout
19284
19285 \begin_layout Itemize
19286 No space in front of/after parenthesis:
19287 \begin_inset Newline newline
19288 \end_inset
19289
19290 ( wrong spacing )
19291 \end_layout
19292
19293 \begin_layout Itemize
19294 Enforcement of normal space after common abbreviations:
19295 \begin_inset Newline newline
19296 \end_inset
19297
19298 e.
19299 \begin_inset space \thinspace{}
19300 \end_inset
19301
19302 g.
19303 \begin_inset space \space{}
19304 \end_inset
19305
19306 is too wide spacing.
19307 \end_layout
19308
19309 \begin_layout Itemize
19310 Enforcement of end-of-sentence space when the last sentence ends with a
19311  capital letter:
19312 \begin_inset Newline newline
19313 \end_inset
19314
19315 This is a TEST.
19316  And this is wrong spacing.
19317 \end_layout
19318
19319 \begin_layout Itemize
19320 Space in front of labels and similar commands:
19321 \begin_inset Newline newline
19322 \end_inset
19323
19324 The label should stick right up to the text to avoid falling to a wrong
19325  page.
19326  
19327 \begin_inset CommandInset label
19328 LatexCommand label
19329 name "sec:chktex"
19330
19331 \end_inset
19332
19333  
19334 \begin_inset Foot
19335 status collapsed
19336
19337 \begin_layout Plain Layout
19338 This footnote is in danger of falling off to a wrong page
19339 \end_layout
19340
19341 \end_inset
19342
19343  The label is separated too much.
19344 \end_layout
19345
19346 \begin_layout Itemize
19347 Space in front of references, instead of hard spaces:
19348 \begin_inset Newline newline
19349 \end_inset
19350
19351 If you have bad luck, the text will break right between the referenced text
19352  and reference number, and that's a pity.
19353  See section 
19354 \begin_inset CommandInset ref
19355 LatexCommand ref
19356 reference "sec:chktex"
19357
19358 \end_inset
19359
19360 .
19361 \end_layout
19362
19363 \begin_layout Itemize
19364 Use of 
19365 \begin_inset Quotes eld
19366 \end_inset
19367
19368 x
19369 \begin_inset Quotes erd
19370 \end_inset
19371
19372  instead of 
19373 \begin_inset Formula $\times$
19374 \end_inset
19375
19376  between numbers:
19377 \begin_inset Newline newline
19378 \end_inset
19379
19380 2x2 looks cheap compared to 
19381 \begin_inset Formula $2\times2$
19382 \end_inset
19383
19384 .
19385 \end_layout
19386
19387 \begin_layout Standard
19388 and more \SpecialChar ldots
19389  It is an invaluable tool when you are 
19390 \begin_inset Quotes eld
19391 \end_inset
19392
19393 finishing up
19394 \begin_inset Quotes erd
19395 \end_inset
19396
19397  your document before printing, and you should run it right after the obligatory
19398  spelling check, and before you go fine tuning the typesetting.
19399 \end_layout
19400
19401 \begin_layout Subsection
19402 How to use it
19403 \end_layout
19404
19405 \begin_layout Standard
19406 If you have the program installed, usage is as simple as choosing 
19407 \family sans
19408 Tools\SpecialChar menuseparator
19409 Check
19410 \begin_inset space ~
19411 \end_inset
19412
19413 TeX
19414 \family default
19415 .
19416  This will make \SpecialChar LyX
19417  generate a \SpecialChar LaTeX
19418  file of your document, start 
19419 \family sans
19420 Chk\SpecialChar TeX
19421
19422 \family default
19423  to check it, and then make \SpecialChar LyX
19424  insert 
19425 \begin_inset Quotes eld
19426 \end_inset
19427
19428 error boxes
19429 \begin_inset Quotes erd
19430 \end_inset
19431
19432  with the warnings from 
19433 \family sans
19434 Chk\SpecialChar TeX
19435
19436 \family default
19437 , if there were any.
19438  The warnings will be placed close to the point of the mistake, and you
19439  can quickly find them by using the 
19440 \family sans
19441 Navigate\SpecialChar menuseparator
19442 Error
19443 \family default
19444  menu item, or the shortcut key 
19445 \family sans
19446 C-g
19447 \family default
19448  from the default 
19449 \family typewriter
19450 cua
19451 \family default
19452  bind file.
19453  Open the error boxes by clicking on them with the mouse, or use the shortcut
19454  key 
19455 \family sans
19456 C-i
19457 \family default
19458  from 
19459 \family typewriter
19460 cua
19461 \family default
19462  bindings, or the corresponding 
19463 \family sans
19464 C-o
19465 \family default
19466  for the alternate 
19467 \family typewriter
19468 emacs
19469 \family default
19470  bind file.
19471  Read the warning and correct the mistake, if it is a mistake.
19472  If you have trouble understanding what the warning is about, you can safely
19473  ignore it.
19474  Remember that there is a hidden layer between the document on screen and
19475  the technical details in invoking 
19476 \family sans
19477 Chk\SpecialChar TeX
19478
19479 \family default
19480 , and this gap can make some warnings seem arcane or just plain silly.
19481 \end_layout
19482
19483 \begin_layout Standard
19484 This document is an excellent testing bed for the feature, and it should
19485  provide quite a few warnings for you to fiddle with.
19486  Since computers are only so smart, expect most of the warnings to be false
19487  alarms, though.
19488 \end_layout
19489
19490 \begin_layout Subsection
19491 How to fine tune it
19492 \end_layout
19493
19494 \begin_layout Standard
19495 Sometimes, you'll find that 
19496 \family sans
19497 Chk\SpecialChar TeX
19498
19499 \family default
19500  makes more noise than suits your mood.
19501  Then you can choose not to use it, wait until your mood changes, or try
19502  to customize 
19503 \family sans
19504 Chk\SpecialChar TeX
19505
19506 \family default
19507  to get better along with you.
19508 \end_layout
19509
19510 \begin_layout Standard
19511 Although 
19512 \family sans
19513 Chk\SpecialChar TeX
19514
19515 \family default
19516  
19517 \emph on
19518 is
19519 \emph default
19520  very configurable and extensible, you should not expect to solve all problems
19521  with 
19522 \family sans
19523 Chk\SpecialChar TeX
19524
19525 \family default
19526  in \SpecialChar LyX
19527  this way.
19528  Since \SpecialChar LyX
19529  has to generate a somewhat special \SpecialChar LaTeX
19530  file to be able to match the
19531  line numbers from the 
19532 \family sans
19533 Chk\SpecialChar TeX
19534
19535 \family default
19536  output
19537 \begin_inset Foot
19538 status collapsed
19539
19540 \begin_layout Plain Layout
19541 You can inspect the specific output from 
19542 \family sans
19543 chktex
19544 \family default
19545  by using 
19546 \family sans
19547 Document\SpecialChar menuseparator
19548 \SpecialChar LaTeX
19549
19550 \begin_inset space ~
19551 \end_inset
19552
19553 Log
19554 \family default
19555  right after a 
19556 \family sans
19557 chktex
19558 \family default
19559  run.
19560 \end_layout
19561
19562 \end_inset
19563
19564  to the internal document structure, some of the warnings will not appear
19565  correctly.
19566  There are two things you can do about this:
19567 \end_layout
19568
19569 \begin_layout Itemize
19570 Fine tune the 
19571 \family sans
19572 Chk\SpecialChar TeX
19573
19574 \family default
19575  invocation command line in 
19576 \begin_inset Flex Noun
19577 status collapsed
19578
19579 \begin_layout Plain Layout
19580 Tools\SpecialChar menuseparator
19581 Preferences\SpecialChar menuseparator
19582 Output\SpecialChar menuseparator
19583 LaTeX\SpecialChar menuseparator
19584 CheckTeX command
19585 \end_layout
19586
19587 \end_inset
19588
19589 , or the global 
19590 \family sans
19591 Chk\SpecialChar TeX
19592
19593 \family default
19594  installation configuration file (usually with the file 
19595 \family typewriter
19596 chktexrc
19597 \family default
19598 ).
19599  See below to learn what warnings can be enabled and disabled on the command
19600  line.
19601 \end_layout
19602
19603 \begin_layout Itemize
19604 Export your document as a raw \SpecialChar LaTeX
19605  file using 
19606 \family sans
19607 File\SpecialChar menuseparator
19608 Export\SpecialChar menuseparator
19609 \SpecialChar LaTeX
19610
19611 \family default
19612  and run 
19613 \family typewriter
19614 chktex
19615 \family default
19616  manually on that.
19617  Invoked in this way, it can be a hassle to find the corresponding place
19618  in the document inside \SpecialChar LyX
19619 , but with a little patience, you should be able
19620  to do it.
19621 \end_layout
19622
19623 \begin_layout Standard
19624 Here follows the warning messages that can be enabled and disabled in 
19625 \family sans
19626 Preferences
19627 \family default
19628 .
19629  Use 
19630 \family typewriter
19631 -n#
19632 \family default
19633  to disable a warning, and 
19634 \family typewriter
19635 -w#
19636 \family default
19637  to enable a warning.
19638  The emphasized entries are disabled by default, because the default is
19639  "
19640 \family typewriter
19641 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
19642 \family default
19643 ".
19644 \end_layout
19645
19646 \begin_layout Standard
19647 Notice that you should only use the options that enable and disable warnings,
19648  because \SpecialChar LyX
19649  relies on some of the other command line parameters to be set
19650  in a specific way to have a chance to communicate with 
19651 \family typewriter
19652 chktex
19653 \family default
19654 .
19655 \end_layout
19656
19657 \begin_layout Enumerate
19658
19659 \size small
19660 \emph on
19661 Command terminated with space.
19662 \end_layout
19663
19664 \begin_layout Enumerate
19665
19666 \size small
19667 Non-breaking space (
19668 \begin_inset Quotes eld
19669 \end_inset
19670
19671
19672 \family typewriter
19673 ~
19674 \family default
19675
19676 \begin_inset Quotes erd
19677 \end_inset
19678
19679 ) should have been used.
19680 \end_layout
19681
19682 \begin_layout Enumerate
19683
19684 \size small
19685 \emph on
19686 You should enclose the previous parenthesis with 
19687 \begin_inset Quotes eld
19688 \end_inset
19689
19690
19691 \family typewriter
19692 {}
19693 \family default
19694
19695 \begin_inset Quotes erd
19696 \end_inset
19697
19698 .
19699 \end_layout
19700
19701 \begin_layout Enumerate
19702
19703 \size small
19704 Italic correction (
19705 \begin_inset Quotes eld
19706 \end_inset
19707
19708
19709 \family typewriter
19710
19711 \backslash
19712 /
19713 \family default
19714
19715 \begin_inset Quotes erd
19716 \end_inset
19717
19718 ) found in non-italic buffer.
19719 \end_layout
19720
19721 \begin_layout Enumerate
19722
19723 \size small
19724 Italic correction (
19725 \begin_inset Quotes eld
19726 \end_inset
19727
19728
19729 \family typewriter
19730
19731 \backslash
19732 /
19733 \family default
19734
19735 \begin_inset Quotes erd
19736 \end_inset
19737
19738 ) found more than once.
19739 \end_layout
19740
19741 \begin_layout Enumerate
19742
19743 \size small
19744 \emph on
19745 No italic correction (
19746 \begin_inset Quotes eld
19747 \end_inset
19748
19749
19750 \family typewriter
19751
19752 \backslash
19753 /
19754 \family default
19755
19756 \begin_inset Quotes erd
19757 \end_inset
19758
19759 ) found.
19760 \end_layout
19761
19762 \begin_layout Enumerate
19763
19764 \size small
19765 Accent command 
19766 \begin_inset Quotes eld
19767 \end_inset
19768
19769
19770 \family typewriter
19771 cmd
19772 \family default
19773
19774 \begin_inset Quotes erd
19775 \end_inset
19776
19777  needs use of 
19778 \begin_inset Quotes eld
19779 \end_inset
19780
19781
19782 \family typewriter
19783 cmd
19784 \family default
19785
19786 \begin_inset Quotes erd
19787 \end_inset
19788
19789 .
19790 \end_layout
19791
19792 \begin_layout Enumerate
19793
19794 \size small
19795 Wrong length of dash may have been used.
19796 \end_layout
19797
19798 \begin_layout Enumerate
19799
19800 \size small
19801 \emph on
19802 \begin_inset Quotes eld
19803 \end_inset
19804
19805
19806 \family typewriter
19807 %s
19808 \family default
19809
19810 \begin_inset Quotes erd
19811 \end_inset
19812
19813  expected, found 
19814 \begin_inset Quotes eld
19815 \end_inset
19816
19817
19818 \family typewriter
19819 %s
19820 \family default
19821
19822 \begin_inset Quotes erd
19823 \end_inset
19824
19825 .
19826 \end_layout
19827
19828 \begin_layout Enumerate
19829
19830 \size small
19831 Solo 
19832 \begin_inset Quotes eld
19833 \end_inset
19834
19835
19836 \family typewriter
19837 %s
19838 \family default
19839
19840 \begin_inset Quotes erd
19841 \end_inset
19842
19843  found.
19844 \end_layout
19845
19846 \begin_layout Enumerate
19847
19848 \size small
19849 You should use 
19850 \begin_inset Quotes eld
19851 \end_inset
19852
19853
19854 \family typewriter
19855 %s
19856 \family default
19857
19858 \begin_inset Quotes erd
19859 \end_inset
19860
19861  to achieve an ellipsis.
19862 \end_layout
19863
19864 \begin_layout Enumerate
19865
19866 \size small
19867 Inter-word spacing (
19868 \begin_inset Quotes eld
19869 \end_inset
19870
19871
19872 \family typewriter
19873
19874 \backslash
19875
19876 \family default
19877  
19878 \begin_inset Quotes eld
19879 \end_inset
19880
19881 ) should perhaps be used.
19882 \end_layout
19883
19884 \begin_layout Enumerate
19885
19886 \size small
19887 Inter-sentence spacing (
19888 \begin_inset Quotes eld
19889 \end_inset
19890
19891
19892 \family typewriter
19893
19894 \backslash
19895 @
19896 \family default
19897
19898 \begin_inset Quotes erd
19899 \end_inset
19900
19901 ) should perhaps be used.
19902 \end_layout
19903
19904 \begin_layout Enumerate
19905
19906 \size small
19907 Could not find argument for command.
19908 \end_layout
19909
19910 \begin_layout Enumerate
19911
19912 \size small
19913 No match found for 
19914 \begin_inset Quotes eld
19915 \end_inset
19916
19917
19918 \family typewriter
19919 %s
19920 \family default
19921
19922 \begin_inset Quotes erd
19923 \end_inset
19924
19925 .
19926 \end_layout
19927
19928 \begin_layout Enumerate
19929
19930 \size small
19931 Math mode still on at end of \SpecialChar LaTeX
19932  file.
19933 \end_layout
19934
19935 \begin_layout Enumerate
19936
19937 \size small
19938 Number of 
19939 \begin_inset Quotes eld
19940 \end_inset
19941
19942
19943 \family typewriter
19944 char
19945 \family default
19946
19947 \begin_inset Quotes erd
19948 \end_inset
19949
19950  doesn't match the number of 
19951 \begin_inset Quotes eld
19952 \end_inset
19953
19954
19955 \family typewriter
19956 char
19957 \family default
19958
19959 \begin_inset Quotes erd
19960 \end_inset
19961
19962 .
19963 \end_layout
19964
19965 \begin_layout Enumerate
19966
19967 \size small
19968 You should use either 
19969 \family typewriter
19970
19971 \begin_inset Quotes eld
19972 \end_inset
19973
19974
19975 \family default
19976  or 
19977 \family typewriter
19978
19979 \begin_inset Quotes erd
19980 \end_inset
19981
19982
19983 \family default
19984  as an alternative to 
19985 \begin_inset Quotes eld
19986 \end_inset
19987
19988
19989 \family typewriter
19990 "
19991 \family default
19992
19993 \begin_inset Quotes erd
19994 \end_inset
19995
19996 .
19997 \end_layout
19998
19999 \begin_layout Enumerate
20000
20001 \size small
20002 You should use "
20003 \family typewriter
20004 '
20005 \family default
20006 " (ASCII 39) instead of "
20007 \family typewriter
20008 ´
20009 \family default
20010 " (ASCII 180).
20011 \end_layout
20012
20013 \begin_layout Enumerate
20014
20015 \size small
20016 User-specified pattern found.
20017 \end_layout
20018
20019 \begin_layout Enumerate
20020
20021 \size small
20022 This command might not be intended.
20023 \end_layout
20024
20025 \begin_layout Enumerate
20026
20027 \size small
20028 \emph on
20029 Comment displayed.
20030 \end_layout
20031
20032 \begin_layout Enumerate
20033
20034 \size small
20035 Either 
20036 \family typewriter
20037 ''
20038 \backslash
20039 ,'
20040 \family default
20041  or 
20042 \family typewriter
20043 '
20044 \backslash
20045 ,''
20046 \family default
20047  will look better.
20048 \end_layout
20049
20050 \begin_layout Enumerate
20051
20052 \size small
20053 Delete this space to maintain correct page references.
20054 \end_layout
20055
20056 \begin_layout Enumerate
20057
20058 \size small
20059 \emph on
20060 You might wish to put this between a pair of 
20061 \begin_inset Quotes eld
20062 \end_inset
20063
20064
20065 \family typewriter
20066 {}
20067 \family default
20068
20069 \begin_inset Quotes erd
20070 \end_inset
20071
20072 .
20073 \end_layout
20074
20075 \begin_layout Enumerate
20076
20077 \size small
20078 You ought to remove spaces in front of punctuation.
20079 \end_layout
20080
20081 \begin_layout Enumerate
20082
20083 \size small
20084 Could not execute \SpecialChar LaTeX
20085  command.
20086 \end_layout
20087
20088 \begin_layout Enumerate
20089
20090 \size small
20091 Don't use 
20092 \family typewriter
20093
20094 \backslash
20095 /
20096 \family default
20097  in front of small punctuation.
20098 \end_layout
20099
20100 \begin_layout Enumerate
20101
20102 \family typewriter
20103 \size small
20104 $
20105 \backslash
20106 times$
20107 \family default
20108  may look prettier here.
20109 \end_layout
20110
20111 \begin_layout Enumerate
20112
20113 \size small
20114 \emph on
20115 Multiple spaces detected in output.
20116 \end_layout
20117
20118 \begin_layout Enumerate
20119
20120 \size small
20121 This text may be ignored.
20122 \end_layout
20123
20124 \begin_layout Enumerate
20125
20126 \size small
20127 Use 
20128 \family typewriter
20129
20130 \begin_inset Quotes eld
20131 \end_inset
20132
20133
20134 \family default
20135  to begin quotation, not 
20136 \family typewriter
20137 '
20138 \family default
20139 .
20140 \end_layout
20141
20142 \begin_layout Enumerate
20143
20144 \size small
20145 Use 
20146 \family typewriter
20147 '
20148 \family default
20149  to end quotation, not 
20150 \family typewriter
20151
20152 \begin_inset Quotes eld
20153 \end_inset
20154
20155
20156 \family default
20157 .
20158 \end_layout
20159
20160 \begin_layout Enumerate
20161
20162 \size small
20163 Don't mix quotes.
20164 \end_layout
20165
20166 \begin_layout Enumerate
20167
20168 \size small
20169 You should perhaps use 
20170 \begin_inset Quotes eld
20171 \end_inset
20172
20173
20174 \family typewriter
20175 cmd
20176 \family default
20177
20178 \begin_inset Quotes erd
20179 \end_inset
20180
20181  instead.
20182 \end_layout
20183
20184 \begin_layout Enumerate
20185
20186 \size small
20187 You should put a space in front of/after parenthesis.
20188 \end_layout
20189
20190 \begin_layout Enumerate
20191
20192 \size small
20193 You should avoid spaces in front of/after parenthesis.
20194 \end_layout
20195
20196 \begin_layout Enumerate
20197
20198 \size small
20199 \emph on
20200 You should not use punctuation in front of/after quotes.
20201 \end_layout
20202
20203 \begin_layout Enumerate
20204
20205 \size small
20206 Double space found.
20207 \end_layout
20208
20209 \begin_layout Enumerate
20210
20211 \size small
20212 You should put punctuation outside inner/inside display math mode.
20213 \end_layout
20214
20215 \begin_layout Enumerate
20216
20217 \size small
20218 You ought to not use primitive \SpecialChar TeX
20219  in \SpecialChar LaTeX
20220  code.
20221 \end_layout
20222
20223 \begin_layout Enumerate
20224
20225 \size small
20226 You should remove spaces in front of 
20227 \begin_inset Quotes eld
20228 \end_inset
20229
20230
20231 \family typewriter
20232 %s
20233 \family default
20234
20235 \begin_inset Quotes erd
20236 \end_inset
20237
20238
20239 \end_layout
20240
20241 \begin_layout Enumerate
20242
20243 \size small
20244 \begin_inset Quotes eld
20245 \end_inset
20246
20247
20248 \family typewriter
20249 %s
20250 \family default
20251
20252 \begin_inset Quotes erd
20253 \end_inset
20254
20255  is normally not followed by 
20256 \begin_inset Quotes eld
20257 \end_inset
20258
20259
20260 \family typewriter
20261 %c
20262 \family default
20263
20264 \begin_inset Quotes erd
20265 \end_inset
20266
20267 .
20268 \end_layout
20269
20270 \begin_layout Standard
20271 In later versions of \SpecialChar LyX
20272 , we hope to provide a more complete interface to this
20273  tool (and it's smaller cousin 
20274 \family typewriter
20275 lacheck
20276 \family default
20277 ) to exploit the full power of it.
20278  But it's not exactly useless as it is now: go try it on one of your existing
20279  documents of a certain length and be surprised.
20280 \end_layout
20281
20282 \begin_layout Section
20283 Version Control in \SpecialChar LyX
20284
20285 \end_layout
20286
20287 \begin_layout Standard
20288 by
20289 \noun on
20290  Lars Gullik Bjønnes 
20291 \noun default
20292 and 
20293 \noun on
20294 Pavel Sanda
20295 \end_layout
20296
20297 \begin_layout Subsection
20298 Introduction
20299 \end_layout
20300
20301 \begin_layout Standard
20302 \SpecialChar LyX
20303  supports some of the most basic RCS/CVS/SVN/GIT commands.
20304  If you need something a bit more sophisticated you will have to do that
20305  manually in a terminal.
20306 \end_layout
20307
20308 \begin_layout Standard
20309 Also note that CVS support is not as good as subversion support so we advise
20310  using SVN instead.
20311  A good place to start learning Subversion is SVN Book
20312 \begin_inset Foot
20313 status collapsed
20314
20315 \begin_layout Plain Layout
20316 \begin_inset CommandInset href
20317 LatexCommand href
20318 target "http://svnbook.red-bean.com/"
20319 literal "false"
20320
20321 \end_inset
20322
20323
20324 \end_layout
20325
20326 \end_inset
20327
20328 .
20329  In the case of RCS you should read 
20330 \begin_inset Quotes eld
20331 \end_inset
20332
20333 rcsintro
20334 \begin_inset Quotes erd
20335 \end_inset
20336
20337  (a man file, read it with 
20338 \family typewriter
20339 man rcsintro
20340 \family default
20341 ).
20342  This file describes all the basic features of RCS.
20343  You should especially notice the comment about a RCS directory, and the
20344  notion of a master RCS file (the file ending in 
20345 \family typewriter
20346 ,v
20347 \family default
20348 ).
20349 \end_layout
20350
20351 \begin_layout Standard
20352 Before you begin to use the version control features in \SpecialChar LyX
20353 , you should be
20354  familiar with RCS/CVS/SVN/GIT usage.
20355  The implementation in \SpecialChar LyX
20356  assumes a recent version of the GNU RCS or CVS/SVN
20357  package — no guarantees are made for older versions.
20358  Most of the log messages are not currently displayed after operations —
20359  you can check them in the Messages pane if unsure.
20360  Regular users of version control will appreciate VC toolbar, which can
20361  be enabled via 
20362 \family sans
20363 View\SpecialChar menuseparator
20364 Toolbars\SpecialChar menuseparator
20365 Version
20366 \begin_inset space ~
20367 \end_inset
20368
20369 Control
20370 \family default
20371 .
20372 \end_layout
20373
20374 \begin_layout Standard
20375 For introducing your own external commands consult vc-command in the manual
20376  of \SpecialChar LyX
20377  functions.
20378 \end_layout
20379
20380 \begin_layout Standard
20381 It is strongly recommended to store documents in uncompressed format if
20382  using version control (uncheck 
20383 \family sans
20384 Document\SpecialChar menuseparator
20385 Compressed
20386 \family default
20387  if it is checked): Uncompressed LyX documents are text files and therefore
20388  for merging two different versions by version control systems.
20389  Compressed LyX documents are binary files, which cannot be merged by version
20390  control systems.
20391 \end_layout
20392
20393 \begin_layout Subsection
20394 RCS commands in \SpecialChar LyX
20395
20396 \end_layout
20397
20398 \begin_layout Standard
20399 The following sections describe the RCS commands supported by \SpecialChar LyX
20400 .
20401  You can find them in the 
20402 \family sans
20403 File\SpecialChar menuseparator
20404 Version
20405 \begin_inset space ~
20406 \end_inset
20407
20408 Control
20409 \family default
20410  submenu.
20411  \SpecialChar LyX
20412  was tested against RCS 5.7/5.8.
20413 \end_layout
20414
20415 \begin_layout Subsubsection
20416
20417 \family sans
20418 Register
20419 \end_layout
20420
20421 \begin_layout Standard
20422 If your document is not under revision control, this is the only item shown
20423  in the menu.
20424  And if it is under revision control, the 
20425 \family sans
20426 Register
20427 \family default
20428  item is not visible.
20429  
20430 \end_layout
20431
20432 \begin_layout Standard
20433 This command registers your document with RCS (unless you are under the
20434  directory managed by CVS)\SpecialChar endofsentence
20435  You are asked interactively to supply an initial
20436  description of the document.
20437  The document is now set in Read-Only mode and you have to 
20438 \family sans
20439 Check
20440 \begin_inset space ~
20441 \end_inset
20442
20443 Out
20444 \begin_inset space ~
20445 \end_inset
20446
20447 For
20448 \begin_inset space ~
20449 \end_inset
20450
20451 Edit
20452 \family default
20453 , before making any changes to it.
20454  A document under revision control has a 
20455 \begin_inset Quotes eld
20456 \end_inset
20457
20458 [RCS:<version> <locker>]
20459 \begin_inset Quotes erd
20460 \end_inset
20461
20462  item tagged to the filename in the minibuffer.
20463 \end_layout
20464
20465 \begin_layout Standard
20466 RCS command that is run: 
20467 \family typewriter
20468 ci -q -u -i -t-"<initial description>" <file-name>
20469 \end_layout
20470
20471 \begin_layout Standard
20472 Read 
20473 \family typewriter
20474 man ci
20475 \family default
20476  to understand the switches.
20477  
20478 \end_layout
20479
20480 \begin_layout Subsubsection
20481
20482 \family sans
20483 Check In Changes
20484 \end_layout
20485
20486 \begin_layout Standard
20487 When you are finished editing a file, you check in your changes.
20488  When you do this, you are asked for a description of the changes.
20489  This is stored in the history log.
20490  The version number is bumped, your changes are applied to the master RCS
20491  file, the document is unlocked and set to Read-Only mode.
20492 \end_layout
20493
20494 \begin_layout Standard
20495 RCS command: 
20496 \family typewriter
20497 ci -q -u -m"<description>" <file-name>
20498 \end_layout
20499
20500 \begin_layout Subsubsection
20501
20502 \family sans
20503 Check Out For Edit
20504 \end_layout
20505
20506 \begin_layout Standard
20507 By doing this you lock the document so that only you can edit it.
20508  This will also make the document Read-Write only for you.
20509  You will usually continue editing for a while and when you are finished
20510  you check in your changes.
20511  The status line is changed to reflect that you have locked the file.
20512 \end_layout
20513
20514 \begin_layout Standard
20515 RCS command: 
20516 \family typewriter
20517 co -q -l <file-name>
20518 \end_layout
20519
20520 \begin_layout Subsubsection
20521
20522 \family sans
20523 Revert To Repository Version
20524 \end_layout
20525
20526 \begin_layout Standard
20527 This will discard all changes made to the document since the last check
20528  in.
20529  You get a warning before changes are discarded.
20530 \end_layout
20531
20532 \begin_layout Standard
20533 RCS command: 
20534 \family typewriter
20535 co -f -u<version> <file-name>
20536 \end_layout
20537
20538 \begin_layout Subsubsection
20539
20540 \family sans
20541 Copy
20542 \end_layout
20543
20544 \begin_layout Standard
20545 This will create a copy of the current document.
20546  Since RCS does not support copy operations natively, the version history
20547  is not preserved, and the copy is added as a new file.
20548  It requires a clean document without any changes since the last checkin.
20549  You are asked for a file name and a description of the copy operation.
20550  After that the copy is created, both locally and in the repository.
20551  If the parent directories of the copied and original document differ, all
20552  relative paths of included files of the copy are adjusted (like in 
20553 \family sans
20554 File\SpecialChar menuseparator
20555 Save As
20556 \family default
20557 \SpecialChar ldots
20558 ).
20559  Finally, the copy is loaded instead of the original document.
20560 \end_layout
20561
20562 \begin_layout Labeling
20563 \labelwidthstring 00.00.0000
20564 RCS
20565 \begin_inset space ~
20566 \end_inset
20567
20568 commands: 
20569 \begin_inset space ~
20570 \end_inset
20571
20572
20573 \begin_inset Newline newline
20574 \end_inset
20575
20576 Copy 
20577 \begin_inset Flex Code
20578 status collapsed
20579
20580 \begin_layout Plain Layout
20581
20582 \family typewriter
20583 \begin_inset Quotes eld
20584 \end_inset
20585
20586 <file-name>
20587 \begin_inset Quotes erd
20588 \end_inset
20589
20590
20591 \end_layout
20592
20593 \end_inset
20594
20595  to 
20596 \begin_inset Flex Code
20597 status collapsed
20598
20599 \begin_layout Plain Layout
20600
20601 \family typewriter
20602 \begin_inset Quotes eld
20603 \end_inset
20604
20605 <new-file-name>
20606 \begin_inset Quotes erd
20607 \end_inset
20608
20609
20610 \end_layout
20611
20612 \end_inset
20613
20614
20615 \begin_inset Newline newline
20616 \end_inset
20617
20618
20619 \begin_inset Flex Code
20620 status collapsed
20621
20622 \begin_layout Plain Layout
20623 ci -q -u 
20624 \family typewriter
20625 -i 
20626 \begin_inset Quotes eld
20627 \end_inset
20628
20629 <new-file-name>
20630 \begin_inset Quotes erd
20631 \end_inset
20632
20633
20634 \end_layout
20635
20636 \end_inset
20637
20638
20639 \end_layout
20640
20641 \begin_layout Subsubsection
20642
20643 \family sans
20644 Undo Last Checkin
20645 \end_layout
20646
20647 \begin_layout Standard
20648 This makes as if the last check in never happened.
20649  No changes are made to the document loaded into \SpecialChar LyX
20650 , but the last version
20651  is removed from the master RCS file.
20652 \end_layout
20653
20654 \begin_layout Standard
20655 RCS command: 
20656 \family typewriter
20657 rcs -o<version> <file-name>
20658 \end_layout
20659
20660 \begin_layout Subsubsection
20661
20662 \family sans
20663 Show History
20664 \end_layout
20665
20666 \begin_layout Standard
20667 This shows the complete history of the RCS document.
20668  The output of 
20669 \family typewriter
20670 rlog <file-name>
20671 \family default
20672  is shown in a browser.
20673  See 
20674 \family typewriter
20675 man rlog
20676 \family default
20677  for more info.
20678 \end_layout
20679
20680 \begin_layout Subsubsection
20681 Revision info
20682 \end_layout
20683
20684 \begin_layout Standard
20685 \SpecialChar LyX
20686  supports RCS version number, author name, date and time of last commit.
20687  All those are extracted from 
20688 \family typewriter
20689 rlog -r <file-name>
20690 \family default
20691 .
20692  See 
20693 \begin_inset CommandInset ref
20694 LatexCommand ref
20695 reference "subsec:VCS-Revision-Information"
20696
20697 \end_inset
20698
20699  for details.
20700 \end_layout
20701
20702 \begin_layout Subsection
20703 CVS commands in \SpecialChar LyX
20704
20705 \end_layout
20706
20707 \begin_layout Standard
20708 A subset of CVS operations is supported by \SpecialChar LyX
20709 .
20710  You can find the commands in the 
20711 \family sans
20712 File\SpecialChar menuseparator
20713 Version
20714 \begin_inset space ~
20715 \end_inset
20716
20717 Control
20718 \family default
20719  submenu.
20720  The version control system SVN is more powerful, so please use it instead
20721  of CVS if possible.
20722 \end_layout
20723
20724 \begin_layout Subsubsection
20725
20726 \family sans
20727 General CVS usage
20728 \end_layout
20729
20730 \begin_layout Standard
20731 If you start from scratch with CVS you have to create your repository and
20732  checkout the working copy with external tools.
20733  If you're using a client-server setup you may need to login before doing
20734  the first repository checkout.
20735 \end_layout
20736
20737 \begin_layout Standard
20738 If your documents are under revision control and others are using the same
20739  repository problems arise when different changes to the same document at
20740  the same location happen.
20741  Standard CVS repositories don't operate with a file locking mechanism.
20742  This may be surprising, but conflicts only occur if people disagree on
20743  the proper content of the same part of a document.
20744  So, if co-workers are used to communicate regularly, these conflicts occur
20745  rarely.
20746  If they don't communicate they have a fundamental problem anyway.
20747  Nevertheless some people like to work with so called 
20748 \begin_inset Quotes eld
20749 \end_inset
20750
20751 reserved checkouts
20752 \begin_inset Quotes erd
20753 \end_inset
20754
20755 .
20756  If they do so the working copy of all files is readonly when checked out
20757  first and the user starts editing after using a special command to make
20758  the working copy writable.
20759  When the changes are checked in the working copy returns to readonly state.
20760  With \SpecialChar LyX
20761  one has to edit the 
20762 \begin_inset Flex Code
20763 status collapsed
20764
20765 \begin_layout Plain Layout
20766 .cvsrc
20767 \end_layout
20768
20769 \end_inset
20770
20771  file and add the line 
20772 \begin_inset Flex Code
20773 status collapsed
20774
20775 \begin_layout Plain Layout
20776 cvs -r
20777 \end_layout
20778
20779 \end_inset
20780
20781  to work with reserved checkouts.
20782  The benefit is the possibility to see who is using a writable copy of some
20783  document.
20784  It's not guaranteed only one user makes a copy writable.
20785 \end_layout
20786
20787 \begin_layout Standard
20788 \SpecialChar LyX
20789  tries to guess if you're using reserved or non-reserved checkouts.
20790  If your working copy is readonly or it is writable and an additional copy
20791  of your document exists in the CVS/Base sub-directory a reserved otherwise
20792  a non-reserved checkout is assumed.
20793  When a reserved checkout is detected you have to use 
20794 \begin_inset Flex Noun
20795 status collapsed
20796
20797 \begin_layout Plain Layout
20798 Check Out
20799 \end_layout
20800
20801 \end_inset
20802
20803  to make your working copy writable if it's readonly.
20804  After doing so the 
20805 \begin_inset Flex Noun
20806 status collapsed
20807
20808 \begin_layout Plain Layout
20809 Check In
20810 \end_layout
20811
20812 \end_inset
20813
20814  operation is possible and that makes your working copy readonly again after
20815  transferring your changes to the repository.
20816 \end_layout
20817
20818 \begin_layout Standard
20819 More information about CVS can be found here 
20820 \begin_inset Flex URL
20821 status collapsed
20822
20823 \begin_layout Plain Layout
20824
20825 http://www.nongnu.org/cvs
20826 \end_layout
20827
20828 \end_inset
20829
20830  and here 
20831 \begin_inset Flex URL
20832 status collapsed
20833
20834 \begin_layout Plain Layout
20835
20836 http://ximbiot.com/cvs
20837 \end_layout
20838
20839 \end_inset
20840
20841 .
20842 \end_layout
20843
20844 \begin_layout Standard
20845 Read 
20846 \family typewriter
20847 man cvs
20848 \family default
20849  to understand the sub-commands and the switches mentioned below.
20850 \end_layout
20851
20852 \begin_layout Subsubsection
20853
20854 \family sans
20855 Register
20856 \end_layout
20857
20858 \begin_layout Standard
20859 If your document is not under revision control, this is the only item shown
20860  in the menu.
20861  And if it is under revision control, the 
20862 \family sans
20863 Register
20864 \family default
20865  item is not visible.
20866  
20867 \end_layout
20868
20869 \begin_layout Standard
20870 This command registers in CVS your document 
20871 \begin_inset Flex Strong
20872 status collapsed
20873
20874 \begin_layout Plain Layout
20875
20876 \emph on
20877 only
20878 \end_layout
20879
20880 \end_inset
20881
20882  in the case you have already the documents directory under CVS control
20883  (in particular 
20884 \family typewriter
20885 CVS/Entries
20886 \family default
20887  file exists).
20888  This means you have to create or checkout the archive by yourself using
20889  external tools.
20890  (In case you forget that step \SpecialChar LyX
20891  registers the document with RCS.)
20892 \end_layout
20893
20894 \begin_layout Standard
20895 Then you are asked interactively to supply an initial description of the
20896  document.
20897  Don't forget that registered file is not yet checked in.
20898 \end_layout
20899
20900 \begin_layout Standard
20901 CVS command that is run: 
20902 \family typewriter
20903 cvs -q add -m"<entered message>" "<file-name>"
20904 \end_layout
20905
20906 \begin_layout Standard
20907 The term 
20908 \family typewriter
20909 "<file-name>"
20910 \family default
20911  above and for all other CVS commands is an abbreviation for 
20912 \begin_inset Quotes eld
20913 \end_inset
20914
20915 change the current working directory to file location and use the file name
20916  without path component as argument
20917 \begin_inset Quotes erd
20918 \end_inset
20919
20920 .
20921 \end_layout
20922
20923 \begin_layout Subsubsection
20924
20925 \family sans
20926 Check In Changes
20927 \end_layout
20928
20929 \begin_layout Standard
20930 When you are finished editing a file, you commit your changes.
20931  When you do this and you had changed the document, you are asked for a
20932  description of the changes.
20933  After that changes are written to the repository.
20934  In case you didn't change the document and a reserved checkout is detected
20935  the reservation made on 
20936 \begin_inset Flex Noun
20937 status collapsed
20938
20939 \begin_layout Plain Layout
20940 Check Out
20941 \end_layout
20942
20943 \end_inset
20944
20945  is undone.
20946 \end_layout
20947
20948 \begin_layout Labeling
20949 \labelwidthstring 00.00.0000
20950 CVS
20951 \begin_inset space ~
20952 \end_inset
20953
20954 command: 
20955 \begin_inset space ~
20956 \end_inset
20957
20958
20959 \begin_inset Newline newline
20960 \end_inset
20961
20962
20963 \begin_inset Flex Code
20964 status collapsed
20965
20966 \begin_layout Plain Layout
20967 cvs 
20968 \family typewriter
20969 -q commit -m"<description>" "<file-name>"
20970 \end_layout
20971
20972 \end_inset
20973
20974  or
20975 \begin_inset Newline newline
20976 \end_inset
20977
20978
20979 \begin_inset Flex Code
20980 status collapsed
20981
20982 \begin_layout Plain Layout
20983 cvs -q unedit 
20984 \family typewriter
20985 "<file-name>"
20986 \end_layout
20987
20988 \end_inset
20989
20990
20991 \end_layout
20992
20993 \begin_layout Subsubsection
20994
20995 \family sans
20996 Check Out Changes
20997 \end_layout
20998
20999 \begin_layout Standard
21000 When you are sharing a repository with others, you may have to incorporate
21001  their changes into your working copy.
21002 \end_layout
21003
21004 \begin_layout Standard
21005 CVS command: 
21006 \family typewriter
21007 cvs -q update "<file-name>"
21008 \end_layout
21009
21010 \begin_layout Standard
21011 If a readonly checkout is detected the working copy is made writable and
21012  reserved.
21013 \end_layout
21014
21015 \begin_layout Standard
21016 CVS command: 
21017 \family typewriter
21018 cvs -q edit "<file-name>"
21019 \end_layout
21020
21021 \begin_layout Subsubsection
21022
21023 \family sans
21024 Revert To Repository Version
21025 \end_layout
21026
21027 \begin_layout Standard
21028 This will discard all changes made to the document since the last check
21029  in.
21030  You get a warning before changes are discarded.
21031  Firstly the file is deleted, secondly CVS update command is run.
21032 \end_layout
21033
21034 \begin_layout Standard
21035 CVS command: 
21036 \family typewriter
21037 cvs -q update "<file-name>"
21038 \end_layout
21039
21040 \begin_layout Standard
21041 If a reserved checkout is detected and the working copy has no changes only
21042  the reservation is undone.
21043 \end_layout
21044
21045 \begin_layout Standard
21046 CVS command: 
21047 \family typewriter
21048 cvs -q unedit "<file-name>"
21049 \end_layout
21050
21051 \begin_layout Subsubsection
21052
21053 \family sans
21054 Copy
21055 \end_layout
21056
21057 \begin_layout Standard
21058 This will create a copy of the current document.
21059  Since CVS does not support copy operations natively, the version history
21060  is not preserved, and the copy is added as a new file.
21061  It requires a clean document without any changes since the last checkin.
21062  You are asked for a file name and a description of the copy operation.
21063  After that the copy is created, both locally and in the repository.
21064  If the parent directories of the copied and original document differ, all
21065  relative paths of included files of the copy are adjusted (like in 
21066 \family sans
21067 File\SpecialChar menuseparator
21068 Save As
21069 \family default
21070 \SpecialChar ldots
21071 ).
21072  Finally, the copy is loaded instead of the original document.
21073 \end_layout
21074
21075 \begin_layout Labeling
21076 \labelwidthstring 00.00.0000
21077 CVS
21078 \begin_inset space ~
21079 \end_inset
21080
21081 commands: 
21082 \begin_inset space ~
21083 \end_inset
21084
21085
21086 \begin_inset Newline newline
21087 \end_inset
21088
21089 Copy 
21090 \begin_inset Flex Code
21091 status collapsed
21092
21093 \begin_layout Plain Layout
21094
21095 \family typewriter
21096 \begin_inset Quotes eld
21097 \end_inset
21098
21099 <file-name>
21100 \begin_inset Quotes erd
21101 \end_inset
21102
21103
21104 \end_layout
21105
21106 \end_inset
21107
21108  to 
21109 \begin_inset Flex Code
21110 status collapsed
21111
21112 \begin_layout Plain Layout
21113
21114 \family typewriter
21115 \begin_inset Quotes eld
21116 \end_inset
21117
21118 <new-file-name>
21119 \begin_inset Quotes erd
21120 \end_inset
21121
21122
21123 \end_layout
21124
21125 \end_inset
21126
21127
21128 \begin_inset Newline newline
21129 \end_inset
21130
21131
21132 \begin_inset Flex Code
21133 status collapsed
21134
21135 \begin_layout Plain Layout
21136 cvs -q add 
21137 \family typewriter
21138
21139 \begin_inset Quotes eld
21140 \end_inset
21141
21142 <new-file-name>
21143 \begin_inset Quotes erd
21144 \end_inset
21145
21146
21147 \end_layout
21148
21149 \end_inset
21150
21151
21152 \end_layout
21153
21154 \begin_layout Subsubsection
21155
21156 \family sans
21157 Rename
21158 \end_layout
21159
21160 \begin_layout Standard
21161 This will rename the current document.
21162  Since CVS does not support rename operations natively, the version history
21163  is not preserved, the renamed document is added as a new file, and the
21164  original document is deleted.
21165  It requires a clean document without any changes since the last checkin.
21166  You are asked for a file name and a description of the rename operation.
21167  After that the document is renamed, both locally and in the repository.
21168  If the parent directories of the new and old file names differ, all relative
21169  paths of included files are adjusted (like in 
21170 \family sans
21171 File\SpecialChar menuseparator
21172 Save As
21173 \family default
21174 \SpecialChar ldots
21175 ).
21176  Finally, the document is reloaded using the new name.
21177 \end_layout
21178
21179 \begin_layout Labeling
21180 \labelwidthstring 00.00.0000
21181 CVS
21182 \begin_inset space ~
21183 \end_inset
21184
21185 commands: 
21186 \begin_inset space ~
21187 \end_inset
21188
21189
21190 \begin_inset Newline newline
21191 \end_inset
21192
21193 Rename 
21194 \begin_inset Flex Code
21195 status collapsed
21196
21197 \begin_layout Plain Layout
21198
21199 \family typewriter
21200 \begin_inset Quotes eld
21201 \end_inset
21202
21203 <file-name>
21204 \begin_inset Quotes erd
21205 \end_inset
21206
21207
21208 \end_layout
21209
21210 \end_inset
21211
21212  to 
21213 \begin_inset Flex Code
21214 status collapsed
21215
21216 \begin_layout Plain Layout
21217
21218 \family typewriter
21219 \begin_inset Quotes eld
21220 \end_inset
21221
21222 <new-file-name>
21223 \begin_inset Quotes erd
21224 \end_inset
21225
21226
21227 \end_layout
21228
21229 \end_inset
21230
21231
21232 \begin_inset Newline newline
21233 \end_inset
21234
21235
21236 \begin_inset Flex Code
21237 status collapsed
21238
21239 \begin_layout Plain Layout
21240 cvs -q add 
21241 \family typewriter
21242
21243 \begin_inset Quotes eld
21244 \end_inset
21245
21246 <new-file-name>
21247 \begin_inset Quotes erd
21248 \end_inset
21249
21250
21251 \end_layout
21252
21253 \end_inset
21254
21255
21256 \begin_inset Newline newline
21257 \end_inset
21258
21259
21260 \begin_inset Flex Code
21261 status collapsed
21262
21263 \begin_layout Plain Layout
21264 cvs -q remove 
21265 \family typewriter
21266
21267 \begin_inset Quotes eld
21268 \end_inset
21269
21270 <file-name>
21271 \begin_inset Quotes erd
21272 \end_inset
21273
21274
21275 \end_layout
21276
21277 \end_inset
21278
21279
21280 \end_layout
21281
21282 \begin_layout Subsubsection
21283 Update of the local directory checkout from repository
21284 \end_layout
21285
21286 \begin_layout Standard
21287 Once your documents gets more complex, containing sub-documents and pictures,
21288  including external 
21289 \begin_inset Flex Code
21290 status collapsed
21291
21292 \begin_layout Plain Layout
21293 .tex
21294 \end_layout
21295
21296 \end_inset
21297
21298  files and so on using version control becomes more complicated.
21299  \SpecialChar LyX
21300  supports updating the whole tree in which resides the document.
21301  This become especially useful once you cooperate with people which neither
21302  have detailed knowledge about CVS usage nor they have ambition to commit
21303  additional material to the repository.
21304  You have to organize the files structure so that all external files are
21305  in the same directory or subdirectories of the document.
21306  It's good practice anyway to store multipart documents in an extra directory.
21307 \end_layout
21308
21309 \begin_layout Standard
21310 The 
21311 \begin_inset Flex Code
21312 status collapsed
21313
21314 \begin_layout Plain Layout
21315 Update local directory from repository
21316 \end_layout
21317
21318 \end_inset
21319
21320  command updates the whole directory.
21321  If local changes are detected user is warned before update starts.
21322  In case of merge conflicts both versions of the conflicting document parts
21323  are placed in the final document.
21324  You have to review and correct the result of the merge.
21325  You'll find the conflicts enclosed in pairs of 
21326 \begin_inset Flex Code
21327 status collapsed
21328
21329 \begin_layout Plain Layout
21330 <<<<<<<
21331 \end_layout
21332
21333 \end_inset
21334
21335  and 
21336 \begin_inset Flex Code
21337 status collapsed
21338
21339 \begin_layout Plain Layout
21340 >>>>>>>
21341 \end_layout
21342
21343 \end_inset
21344
21345  separated by 
21346 \begin_inset Flex Code
21347 status collapsed
21348
21349 \begin_layout Plain Layout
21350 =======
21351 \end_layout
21352
21353 \end_inset
21354
21355 .
21356  The first part is your version as before the update operation with the
21357  document name prepended.
21358  The second one is the repository version with the version number after
21359  the sequence of 
21360 \begin_inset Flex Code
21361 status collapsed
21362
21363 \begin_layout Plain Layout
21364 >
21365 \end_layout
21366
21367 \end_inset
21368
21369  signs.
21370 \end_layout
21371
21372 \begin_layout Labeling
21373 \labelwidthstring 00.00.0000
21374 CVS
21375 \begin_inset space ~
21376 \end_inset
21377
21378 commands: 
21379 \begin_inset space ~
21380 \end_inset
21381
21382
21383 \begin_inset Newline newline
21384 \end_inset
21385
21386
21387 \begin_inset Flex Code
21388 status collapsed
21389
21390 \begin_layout Plain Layout
21391 cd $path; cvs diff 
21392 \family typewriter
21393 "."
21394 \end_layout
21395
21396 \end_inset
21397
21398  (Ask if changes are detected.)
21399 \begin_inset Newline newline
21400 \end_inset
21401
21402
21403 \begin_inset Flex Code
21404 status collapsed
21405
21406 \begin_layout Plain Layout
21407 cd $path; cvs -q update 
21408 \family typewriter
21409 "."
21410 \end_layout
21411
21412 \end_inset
21413
21414
21415 \end_layout
21416
21417 \begin_layout Standard
21418 where 
21419 \begin_inset Flex Code
21420 status collapsed
21421
21422 \begin_layout Plain Layout
21423 $path
21424 \end_layout
21425
21426 \end_inset
21427
21428  stands for the path to the document.
21429 \end_layout
21430
21431 \begin_layout Subsubsection
21432
21433 \family sans
21434 Show History
21435 \end_layout
21436
21437 \begin_layout Standard
21438 This shows the complete history of the CVS document.
21439  The output of 
21440 \family typewriter
21441 cvs log "<file-name>"
21442 \family default
21443  is shown in a browser.
21444 \end_layout
21445
21446 \begin_layout Subsubsection
21447 Revision info
21448 \end_layout
21449
21450 \begin_layout Standard
21451 \SpecialChar LyX
21452  supports CVS version number, author name, date and time of last commit.
21453  All those are extracted from 
21454 \family typewriter
21455 cvs log -r <file-name>
21456 \family default
21457 .
21458  See 
21459 \begin_inset CommandInset ref
21460 LatexCommand ref
21461 reference "subsec:VCS-Revision-Information"
21462
21463 \end_inset
21464
21465  for details.
21466 \end_layout
21467
21468 \begin_layout Subsection
21469 SVN commands in \SpecialChar LyX
21470
21471 \end_layout
21472
21473 \begin_layout Standard
21474 SVN is now partially supported by \SpecialChar LyX
21475 .
21476  You can find the commands in the 
21477 \family sans
21478 File\SpecialChar menuseparator
21479 Version
21480 \begin_inset space ~
21481 \end_inset
21482
21483 Control
21484 \family default
21485  submenu.
21486  Please note that if you use password protected access to repository via
21487  ssh, you will be asked in terminal window.
21488  \SpecialChar LyX
21489  was tested against SVN 1.5, 1.6, 1.7 and 1.8
21490 \begin_inset Foot
21491 status open
21492
21493 \begin_layout Plain Layout
21494 Most of the commands will work with 1.4 too, see 
21495 \begin_inset CommandInset ref
21496 LatexCommand ref
21497 reference "subsec:SVN-Repo-Update"
21498
21499 \end_inset
21500
21501 .
21502  There seems to be currently unresolved permissions problem under SVN 1.8
21503  with reverting changes when file is locked.
21504 \end_layout
21505
21506 \end_inset
21507
21508
21509 \end_layout
21510
21511 \begin_layout Subsubsection
21512
21513 \family sans
21514 Register
21515 \end_layout
21516
21517 \begin_layout Standard
21518 If your document is not under revision control, this is the only item shown
21519  in the menu.
21520  And if it is under revision control, the 
21521 \family sans
21522 Register
21523 \family default
21524  item is not visible.
21525 \end_layout
21526
21527 \begin_layout Standard
21528 This command registers in SVN your document ONLY in case you have already
21529  the documents directory under SVN control (in particular 
21530 \family typewriter
21531 .svn/entries
21532 \family default
21533  file exists).
21534  This means you have to checkout the archive by yourself.
21535 \end_layout
21536
21537 \begin_layout Standard
21538 Then you are asked interactively to supply an initial description of the
21539  document.
21540  Don't forget that registered file is not yet commited.
21541 \end_layout
21542
21543 \begin_layout Standard
21544 SVN command that is run: 
21545 \family typewriter
21546 svn add -q 
21547 \begin_inset Quotes eld
21548 \end_inset
21549
21550 <file-name>
21551 \begin_inset Quotes erd
21552 \end_inset
21553
21554
21555 \end_layout
21556
21557 \begin_layout Standard
21558 Read 
21559 \family typewriter
21560 man svn
21561 \family default
21562  to understand the switches.
21563 \end_layout
21564
21565 \begin_layout Subsubsection
21566
21567 \family sans
21568 Check In Changes
21569 \end_layout
21570
21571 \begin_layout Standard
21572 When you are finished editing a file, you commit your changes.
21573  When you do this, you are asked for a description of the changes.
21574  After that changes are commited.
21575 \end_layout
21576
21577 \begin_layout Standard
21578 SVN command:
21579 \begin_inset Foot
21580 status collapsed
21581
21582 \begin_layout Plain Layout
21583 In case locking is not enabled.
21584  See Section 
21585 \begin_inset CommandInset ref
21586 LatexCommand ref
21587 reference "subsec:SVN-File-Locking"
21588
21589 \end_inset
21590
21591 .
21592 \end_layout
21593
21594 \end_inset
21595
21596  
21597 \family typewriter
21598 svn commit -q -m"<description>" <file-name>
21599 \end_layout
21600
21601 \begin_layout Subsubsection
21602
21603 \family sans
21604 Check Out For Edit
21605 \end_layout
21606
21607 \begin_layout Standard
21608 Updates the changes of this file from the repository.
21609  Be sure you understand SVN merging and conflicts resolving before using
21610  this function, because all conflicts has to be resolved manually by you!
21611 \end_layout
21612
21613 \begin_layout Standard
21614 SVN command:
21615 \begin_inset Foot
21616 status collapsed
21617
21618 \begin_layout Plain Layout
21619 Ditto.
21620 \end_layout
21621
21622 \end_inset
21623
21624  
21625 \family typewriter
21626 svn update --non-interactive 
21627 \begin_inset Quotes eld
21628 \end_inset
21629
21630 <file-name>
21631 \begin_inset Quotes erd
21632 \end_inset
21633
21634
21635 \end_layout
21636
21637 \begin_layout Subsubsection
21638
21639 \family sans
21640 Revert To Repository Version
21641 \end_layout
21642
21643 \begin_layout Standard
21644 This will discard all changes made to the document since the last check
21645  in.
21646  You get a warning before changes are discarded.
21647 \end_layout
21648
21649 \begin_layout Standard
21650 SVN command: 
21651 \family typewriter
21652 svn revert -q 
21653 \begin_inset Quotes eld
21654 \end_inset
21655
21656 <file-name>
21657 \begin_inset Quotes erd
21658 \end_inset
21659
21660
21661 \end_layout
21662
21663 \begin_layout Subsubsection
21664
21665 \family sans
21666 Copy
21667 \end_layout
21668
21669 \begin_layout Standard
21670 This will create a copy of the current document including the version history.
21671  It requires a clean document without any changes since the last checkin.
21672  You are asked for a file name and a description of the copy operation.
21673  After that the copy is created, both locally and in the repository.
21674  If the parent directories of the copied and original document differ, all
21675  relative paths of included files of the copy are adjusted (like in 
21676 \family sans
21677 File\SpecialChar menuseparator
21678 Save As
21679 \family default
21680 \SpecialChar ldots
21681 ).
21682  Finally, the copy is loaded instead of the original document.
21683 \end_layout
21684
21685 \begin_layout Labeling
21686 \labelwidthstring 00.00.0000
21687 SVN
21688 \begin_inset space ~
21689 \end_inset
21690
21691 commands: 
21692 \begin_inset space ~
21693 \end_inset
21694
21695
21696 \begin_inset Newline newline
21697 \end_inset
21698
21699
21700 \begin_inset Flex Code
21701 status collapsed
21702
21703 \begin_layout Plain Layout
21704 svn copy -q 
21705 \family typewriter
21706
21707 \begin_inset Quotes eld
21708 \end_inset
21709
21710 <file-name>
21711 \begin_inset Quotes erd
21712 \end_inset
21713
21714  
21715 \begin_inset Quotes eld
21716 \end_inset
21717
21718 <new-file-name>
21719 \begin_inset Quotes erd
21720 \end_inset
21721
21722
21723 \end_layout
21724
21725 \end_inset
21726
21727
21728 \begin_inset Newline newline
21729 \end_inset
21730
21731
21732 \begin_inset Flex Code
21733 status collapsed
21734
21735 \begin_layout Plain Layout
21736 svn commit
21737 \end_layout
21738
21739 \end_inset
21740
21741
21742 \end_layout
21743
21744 \begin_layout Subsubsection
21745
21746 \family sans
21747 Rename
21748 \end_layout
21749
21750 \begin_layout Standard
21751 This will rename the current document including the version history.
21752  It requires a clean document without any changes since the last checkin.
21753  You are asked for a file name and a description of the rename operation.
21754  After that the document is renamed, both locally and in the repository.
21755  If the parent directories of the new and old file names differ, all relative
21756  paths of included files are adjusted (like in 
21757 \family sans
21758 File\SpecialChar menuseparator
21759 Save As
21760 \family default
21761 \SpecialChar ldots
21762 ).
21763  Finally, the document is reloaded using the new name.
21764 \end_layout
21765
21766 \begin_layout Labeling
21767 \labelwidthstring 00.00.0000
21768 SVN
21769 \begin_inset space ~
21770 \end_inset
21771
21772 commands: 
21773 \begin_inset space ~
21774 \end_inset
21775
21776
21777 \begin_inset Newline newline
21778 \end_inset
21779
21780
21781 \begin_inset Flex Code
21782 status collapsed
21783
21784 \begin_layout Plain Layout
21785 svn move -q 
21786 \family typewriter
21787
21788 \begin_inset Quotes eld
21789 \end_inset
21790
21791 <file-name>
21792 \begin_inset Quotes erd
21793 \end_inset
21794
21795  
21796 \begin_inset Quotes eld
21797 \end_inset
21798
21799 <new-file-name>
21800 \begin_inset Quotes erd
21801 \end_inset
21802
21803
21804 \end_layout
21805
21806 \end_inset
21807
21808
21809 \begin_inset Newline newline
21810 \end_inset
21811
21812
21813 \begin_inset Flex Code
21814 status collapsed
21815
21816 \begin_layout Plain Layout
21817 svn commit
21818 \end_layout
21819
21820 \end_inset
21821
21822
21823 \end_layout
21824
21825 \begin_layout Subsubsection
21826 \begin_inset CommandInset label
21827 LatexCommand label
21828 name "subsec:SVN-Repo-Update"
21829
21830 \end_inset
21831
21832 Update of the local directory checkout from repository
21833 \begin_inset Foot
21834 status collapsed
21835
21836 \begin_layout Plain Layout
21837 Note that this command will work only with subversion 
21838 \begin_inset Formula $\geqq1.5$
21839 \end_inset
21840
21841
21842 \end_layout
21843
21844 \end_inset
21845
21846
21847 \end_layout
21848
21849 \begin_layout Standard
21850 All the commands above have one shortcomming - they deal with the current
21851  document only.
21852  Once your document contains pictures, includes external 
21853 \begin_inset Flex Code
21854 status collapsed
21855
21856 \begin_layout Plain Layout
21857 .tex
21858 \end_layout
21859
21860 \end_inset
21861
21862  files and so on administration becomes more complicated.
21863  \SpecialChar LyX
21864  now supports updating the whole tree in which resides the document
21865 \begin_inset Foot
21866 status collapsed
21867
21868 \begin_layout Plain Layout
21869 One need to organize the files structure so that all external files are
21870  in the same directory or subdirectories of the document.
21871  
21872 \end_layout
21873
21874 \end_inset
21875
21876 .
21877  This become especially useful once you cooperate with people which neither
21878  know about subversion management nor they have ambition to commit additional
21879  material to the repository.
21880  
21881 \end_layout
21882
21883 \begin_layout Standard
21884 \begin_inset Flex Code
21885 status collapsed
21886
21887 \begin_layout Plain Layout
21888 Update local directory from repository
21889 \end_layout
21890
21891 \end_inset
21892
21893  command updates the whole directory and in case of merge conflicts local
21894  version of the files are left, so no unintended data loss occurs.
21895  If local changes are detected user is warned before update starts.
21896 \end_layout
21897
21898 \begin_layout Labeling
21899 \labelwidthstring 00.00.0000
21900 SVN
21901 \begin_inset space ~
21902 \end_inset
21903
21904 commands: 
21905 \begin_inset space ~
21906 \end_inset
21907
21908
21909 \begin_inset Newline newline
21910 \end_inset
21911
21912
21913 \begin_inset Flex Code
21914 status collapsed
21915
21916 \begin_layout Plain Layout
21917 svn diff $path
21918 \end_layout
21919
21920 \end_inset
21921
21922  (Ask if changes are detected.)
21923 \begin_inset Newline newline
21924 \end_inset
21925
21926
21927 \begin_inset Flex Code
21928 status collapsed
21929
21930 \begin_layout Plain Layout
21931 svn update –accept mine-full $path
21932 \end_layout
21933
21934 \end_inset
21935
21936
21937 \end_layout
21938
21939 \begin_layout Standard
21940 where 
21941 \begin_inset Flex Code
21942 status collapsed
21943
21944 \begin_layout Plain Layout
21945 $path
21946 \end_layout
21947
21948 \end_inset
21949
21950  stands for the path to the document.
21951 \end_layout
21952
21953 \begin_layout Subsubsection
21954
21955 \family sans
21956 Show History
21957 \end_layout
21958
21959 \begin_layout Standard
21960 This shows the complete history of the SVN document.
21961  The output of 
21962 \family typewriter
21963 svn log 
21964 \begin_inset Quotes eld
21965 \end_inset
21966
21967 <file-name>
21968 \begin_inset Quotes erd
21969 \end_inset
21970
21971
21972 \family default
21973  is shown in a browser.
21974 \end_layout
21975
21976 \begin_layout Subsubsection
21977 File Locking
21978 \begin_inset CommandInset label
21979 LatexCommand label
21980 name "subsec:SVN-File-Locking"
21981
21982 \end_inset
21983
21984
21985 \end_layout
21986
21987 \begin_layout Standard
21988 The file exchange through various revision control systems brings the problem
21989  of merge conflicts in case two different users try to edit the same (parts
21990  of) document.
21991  When such a conflict happens it needs manual resolving and one reasonable
21992  alternative is to provide some kind of locking mechanism, which guarantees
21993  that only one user is allowed to edit file at the given time.
21994 \end_layout
21995
21996 \begin_layout Standard
21997 SVN has two such mechanisms to provide mutual exclusivity for file access
21998  - locks and automatic setting of write permissions (see sec.
21999  
22000 \begin_inset CommandInset ref
22001 LatexCommand ref
22002 reference "subsec:Automatical-Locking-Property"
22003
22004 \end_inset
22005
22006 ) based on 
22007 \begin_inset Flex Code
22008 status collapsed
22009
22010 \begin_layout Plain Layout
22011 svn:needs-lock
22012 \end_layout
22013
22014 \end_inset
22015
22016  file svn property
22017 \begin_inset Foot
22018 status open
22019
22020 \begin_layout Plain Layout
22021 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
22022 \end_layout
22023
22024 \end_inset
22025
22026 .
22027  If this property is detected for a given document \SpecialChar LyX
22028  starts to use SVN locks
22029  for document editing automatically and the whole check-in/out mechanism
22030  switches to the same regimen as for RCS.
22031  This in particular means there are two different modes of file use in \SpecialChar LyX
22032 :
22033 \end_layout
22034
22035 \begin_layout Itemize
22036 Unlocked state.
22037  The loaded file is in the read-only mode.
22038  For editing on needs to check-out.
22039  
22040 \emph on
22041 Check-out
22042 \emph default
22043  consists of updating from the repository and gaining write lock.
22044  If the lock is not possible to obtain, we remain in unlocked state.
22045 \end_layout
22046
22047 \begin_layout Itemize
22048 Locked state.
22049  The loaded file is in the 'normal' edit mode.
22050  No other user is allowed to edit the file.
22051  
22052 \emph on
22053 Check-in
22054 \emph default
22055  consists of commiting changes and releasing write-lock.
22056  If no changes have been made to the document, no commit will be produced
22057 \begin_inset Foot
22058 status collapsed
22059
22060 \begin_layout Plain Layout
22061 Don't be puzzled by the fact that you will be asked for commit message anyway.
22062 \end_layout
22063
22064 \end_inset
22065
22066  and only the write-lock will be released.
22067 \end_layout
22068
22069 \begin_layout Standard
22070 SVN commands:
22071 \end_layout
22072
22073 \begin_layout Labeling
22074 \labelwidthstring 00.00.0000
22075 Check-in:
22076 \family typewriter
22077  svn commit -q -m"<description>" "<file-name>"
22078 \begin_inset Newline newline
22079 \end_inset
22080
22081 svn unlock "<file-name>"
22082 \end_layout
22083
22084 \begin_layout Labeling
22085 \labelwidthstring 00.00.0000
22086 Check-out: 
22087 \family typewriter
22088 svn update "<file-name>"
22089 \begin_inset Newline newline
22090 \end_inset
22091
22092 svn lock "<file-name>"
22093 \end_layout
22094
22095 \begin_layout Subsubsection
22096
22097 \family typewriter
22098 \begin_inset CommandInset label
22099 LatexCommand label
22100 name "subsec:Automatical-Locking-Property"
22101
22102 \end_inset
22103
22104
22105 \family default
22106 Automatic Locking Property
22107 \end_layout
22108
22109 \begin_layout Standard
22110 The above mentioned automatic setting of write permissions of the .lyx file
22111  can be set through
22112 \family sans
22113  File\SpecialChar menuseparator
22114 Version
22115 \begin_inset space ~
22116 \end_inset
22117
22118 Control\SpecialChar menuseparator
22119 Toggle locking property
22120 \family default
22121 .
22122  This command is active only when the file is not locked on the svn server
22123  (i.e.
22124  you need to check-out before proceeding).
22125 \end_layout
22126
22127 \begin_layout Labeling
22128 \labelwidthstring 00.00.0000
22129 SVN
22130 \begin_inset space ~
22131 \end_inset
22132
22133 commands:
22134 \end_layout
22135
22136 \begin_layout Labeling
22137 \labelwidthstring 00.00.0000
22138 Set:
22139 \family typewriter
22140  svn propset svn:needs-lock ON "<file-name>"
22141 \end_layout
22142
22143 \begin_layout Labeling
22144 \labelwidthstring 00.00.0000
22145 Unset: 
22146 \family typewriter
22147 svn propdel svn:needs-lock "<file-name>"
22148 \end_layout
22149
22150 \begin_layout Subsubsection
22151 \begin_inset CommandInset label
22152 LatexCommand label
22153 name "subsec:VCS-Revision-Information"
22154
22155 \end_inset
22156
22157 Revision Information in Documents
22158 \end_layout
22159
22160 \begin_layout Standard
22161 There are more possibilities how to activate revision information in our
22162  document.
22163 \end_layout
22164
22165 \begin_layout Itemize
22166 \SpecialChar LyX
22167  supports directly:
22168 \end_layout
22169
22170 \begin_deeper
22171 \begin_layout Itemize
22172 tree revision information (
22173 \begin_inset Flex Code
22174 status collapsed
22175
22176 \begin_layout Plain Layout
22177 vcs-tree-revision
22178 \end_layout
22179
22180 \end_inset
22181
22182 ).
22183  The result is the output of the 
22184 \begin_inset Flex Code
22185 status collapsed
22186
22187 \begin_layout Plain Layout
22188 svnversion
22189 \end_layout
22190
22191 \end_inset
22192
22193  command, the following table gives you an idea, how to read the results.
22194 \end_layout
22195
22196 \begin_layout Standard
22197 \align center
22198 \begin_inset Tabular
22199 <lyxtabular version="3" rows="6" columns="2">
22200 <features tabularvalignment="middle">
22201 <column alignment="center" valignment="top">
22202 <column alignment="center" valignment="top">
22203 <row>
22204 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
22205 \begin_inset Text
22206
22207 \begin_layout Plain Layout
22208 Output
22209 \end_layout
22210
22211 \end_inset
22212 </cell>
22213 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
22214 \begin_inset Text
22215
22216 \begin_layout Plain Layout
22217 Meaning
22218 \end_layout
22219
22220 \end_inset
22221 </cell>
22222 </row>
22223 <row>
22224 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
22225 \begin_inset Text
22226
22227 \begin_layout Plain Layout
22228 4123:4168
22229 \end_layout
22230
22231 \end_inset
22232 </cell>
22233 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
22234 \begin_inset Text
22235
22236 \begin_layout Plain Layout
22237 mixed revision working copy
22238 \end_layout
22239
22240 \end_inset
22241 </cell>
22242 </row>
22243 <row>
22244 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
22245 \begin_inset Text
22246
22247 \begin_layout Plain Layout
22248 4168M
22249 \end_layout
22250
22251 \end_inset
22252 </cell>
22253 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
22254 \begin_inset Text
22255
22256 \begin_layout Plain Layout
22257 modified working copy
22258 \end_layout
22259
22260 \end_inset
22261 </cell>
22262 </row>
22263 <row>
22264 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
22265 \begin_inset Text
22266
22267 \begin_layout Plain Layout
22268 4123S
22269 \end_layout
22270
22271 \end_inset
22272 </cell>
22273 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
22274 \begin_inset Text
22275
22276 \begin_layout Plain Layout
22277 switched working copy
22278 \end_layout
22279
22280 \end_inset
22281 </cell>
22282 </row>
22283 <row>
22284 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
22285 \begin_inset Text
22286
22287 \begin_layout Plain Layout
22288 4123P
22289 \end_layout
22290
22291 \end_inset
22292 </cell>
22293 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
22294 \begin_inset Text
22295
22296 \begin_layout Plain Layout
22297 partial working copy, from a sparse checkout
22298 \end_layout
22299
22300 \end_inset
22301 </cell>
22302 </row>
22303 <row>
22304 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
22305 \begin_inset Text
22306
22307 \begin_layout Plain Layout
22308 4123:4168MS
22309 \end_layout
22310
22311 \end_inset
22312 </cell>
22313 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
22314 \begin_inset Text
22315
22316 \begin_layout Plain Layout
22317 mixed revision, modified, switched working copy
22318 \end_layout
22319
22320 \end_inset
22321 </cell>
22322 </row>
22323 </lyxtabular>
22324
22325 \end_inset
22326
22327
22328 \end_layout
22329
22330 \begin_layout Itemize
22331 file revision information.
22332  The result comes from parsing the output of 
22333 \begin_inset Flex Code
22334 status collapsed
22335
22336 \begin_layout Plain Layout
22337 svn
22338 \begin_inset space ~
22339 \end_inset
22340
22341 info
22342 \begin_inset space ~
22343 \end_inset
22344
22345 –xml
22346 \begin_inset space ~
22347 \end_inset
22348
22349 file.lyx
22350 \end_layout
22351
22352 \end_inset
22353
22354 .
22355  Supported flags are:
22356 \end_layout
22357
22358 \begin_deeper
22359 \begin_layout Itemize
22360 version number of the last commit (
22361 \begin_inset Flex Code
22362 status collapsed
22363
22364 \begin_layout Plain Layout
22365 vcs-revision
22366 \end_layout
22367
22368 \end_inset
22369
22370 )
22371 \end_layout
22372
22373 \begin_layout Itemize
22374 author of the last commit (
22375 \begin_inset Flex Code
22376 status collapsed
22377
22378 \begin_layout Plain Layout
22379 vcs-author
22380 \end_layout
22381
22382 \end_inset
22383
22384 )
22385 \end_layout
22386
22387 \begin_layout Itemize
22388 date of the last commit (
22389 \begin_inset Flex Code
22390 status collapsed
22391
22392 \begin_layout Plain Layout
22393 vcs-date
22394 \end_layout
22395
22396 \end_inset
22397
22398 )
22399 \end_layout
22400
22401 \begin_layout Itemize
22402 time of the last commit (
22403 \begin_inset Flex Code
22404 status collapsed
22405
22406 \begin_layout Plain Layout
22407 vcs-time
22408 \end_layout
22409
22410 \end_inset
22411
22412 )
22413 \end_layout
22414
22415 \end_deeper
22416 \begin_layout Standard
22417 You can obtain this info via InsetInfo (e.g.
22418  
22419 \begin_inset Flex Code
22420 status collapsed
22421
22422 \begin_layout Plain Layout
22423 info-insert buffer vcs-date
22424 \end_layout
22425
22426 \end_inset
22427
22428 ).
22429  The information will be available only when you have the file stored under
22430  svn managment (i.e.
22431  the 
22432 \begin_inset Flex Code
22433 status collapsed
22434
22435 \begin_layout Plain Layout
22436 .svn
22437 \end_layout
22438
22439 \end_inset
22440
22441  directory is available with your document).
22442 \end_layout
22443
22444 \end_deeper
22445 \begin_layout Itemize
22446 Another—a hacking one—possibility is to use svn keywords
22447 \begin_inset Foot
22448 status collapsed
22449
22450 \begin_layout Plain Layout
22451 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
22452 \end_layout
22453
22454 \end_inset
22455
22456 .
22457  In short – you set file keywords property (e.g.
22458  
22459 \family sans
22460 svn propset svn:keywords 'Rev' file.lyx
22461 \family default
22462 ) and then paste keyword \SpecialChar TeX
22463  code
22464 \begin_inset Foot
22465 status collapsed
22466
22467 \begin_layout Plain Layout
22468 This is an easy way how to ensure that \SpecialChar LyX
22469  won't break the line in the middle
22470  of keyword tag.
22471 \end_layout
22472
22473 \end_inset
22474
22475  tag in your document (e.g.
22476  
22477 \begin_inset ERT
22478 status open
22479
22480 \begin_layout Plain Layout
22481
22482 $Rev$
22483 \end_layout
22484
22485 \end_inset
22486
22487 ).
22488  This way svn client will automatically substitute revision number (e.g.
22489  
22490 \begin_inset ERT
22491 status open
22492
22493 \begin_layout Plain Layout
22494
22495 $Rev: 59 $
22496 \end_layout
22497
22498 \end_inset
22499
22500 ) after each update and commit.
22501  There are more problems with this approach.
22502  Firstly, the '$' character is used in \SpecialChar TeX
22503  world for math equations, so any
22504  occurence of math formula 
22505 \begin_inset Formula $Rev$
22506 \end_inset
22507
22508  become 
22509 \begin_inset Formula $Rev:59$
22510 \end_inset
22511
22512  in your \SpecialChar LyX
22513  document.
22514  Similarly for other keywords like Id, Date, Author, etc.
22515  Secondly svn output is dependent on your locales, so its very easy that
22516  svn would produce some problematic strings once Date is used.
22517  Thirdly you get the whole 'Rev: 59' string in your document instead of
22518  the plain number.
22519  Until subversion implements user's custom keywords it will be hard to use
22520  this approach reliably or let \SpecialChar LyX
22521  to support it directly.
22522 \end_layout
22523
22524 \begin_layout Subsection
22525 SVN and Windows Environment
22526 \end_layout
22527
22528 \begin_layout Quote
22529 My inclination is to say that if the user cannot figure out the command
22530  line operations on their own fairly quickly, they would be well advised
22531  to use TortoiseSVN.
22532  —P.
22533  A.
22534  Rubin
22535 \end_layout
22536
22537 \begin_layout Subsubsection
22538 Preparation
22539 \end_layout
22540
22541 \begin_layout Standard
22542 In addition to installing \SpecialChar LyX
22543 , and having access to a Subversion repository,
22544  the user will need to install the Subversion client program.
22545  A Windows installer for the client program is available from 
22546 \begin_inset CommandInset href
22547 LatexCommand href
22548 name "CollabNet"
22549 target "http://www.collab.net/nonav/downloads/subversion/"
22550 literal "false"
22551
22552 \end_inset
22553
22554 .
22555  The user may also want to install 
22556 \begin_inset CommandInset href
22557 LatexCommand href
22558 name "TortoiseSVN"
22559 target "http://tortoisesvn.tigris.org/"
22560 literal "false"
22561
22562 \end_inset
22563
22564 , which integrates Subversion operations into the context (rightclick) menu
22565  of Windows Explorer.
22566  Operations done outside \SpecialChar LyX
22567  will typically be more convenient using the Explorer
22568  context menu.
22569  Note that TortoiseSVN is not a replacement for the client program, which
22570  is what \SpecialChar LyX
22571  itself will use.
22572 \end_layout
22573
22574 \begin_layout Subsubsection
22575 Bringing a document under Subversion control
22576 \end_layout
22577
22578 \begin_layout Standard
22579 Before a \SpecialChar LyX
22580  document can be brought under version control in Subversion, its
22581  parent directory needs to be under version control.
22582  If the document is being added to a project already in the repository,
22583  this is accomplished by checking the project out to the directory where
22584  the new document will be placed.
22585  If the project itself is not yet under version control (for instance, if
22586  this document starts a new project), the directory must be imported into
22587  the repository.
22588  This is done outside \SpecialChar LyX
22589 .
22590  Both import and checkout are easily accomplished from the Explorer context
22591  menu using TortoiseSVN, or alternatively can be done using the command
22592  line client at a DOS prompt.
22593  The procedure for importing the project using TortoiseSVN is described
22594  below, assuming an existing repository and a new project being started
22595  in 
22596 \family typewriter
22597 C:
22598 \backslash
22599 new project
22600 \family default
22601 .
22602  For information on using the Subversion client program, run 
22603 \family typewriter
22604 svn --help 
22605 \family default
22606 in a DOS shell.
22607 \end_layout
22608
22609 \begin_layout Enumerate
22610 Locate 
22611 \family typewriter
22612 C:
22613 \backslash
22614 new project 
22615 \family default
22616 in Windows Explorer, right click it, and select 
22617 \family sans
22618 TortoiseSVN\SpecialChar menuseparator
22619 Repo-browser
22620 \family default
22621 .
22622  If necessary, adjust the URL for the repository, then click OK.
22623 \end_layout
22624
22625 \begin_layout Enumerate
22626 Right click the level of the repository under which you want to place the
22627  new project folder (typically the top level) and click 
22628 \family sans
22629 Create folder
22630 \family default
22631  Supply a name for the project folder and click OK.
22632  Add a message for the log file if desired, then click OK again.
22633  The new project folder should appear in the repository.
22634  Finally, click OK again to exit the repository browser.
22635 \end_layout
22636
22637 \begin_layout Enumerate
22638 Once again right click 
22639 \family typewriter
22640 C:
22641 \backslash
22642 new project
22643 \family default
22644 , this time selecting SVN Checkout\SpecialChar ldots
22645  Select the URL of the project folder
22646  you just created in the repository, and set the checkout directory to 
22647 \family typewriter
22648 C:
22649 \backslash
22650 new project.
22651
22652 \family default
22653  Click OK.
22654  You will be warned about a non-empty folder; click OK to proceed.
22655  You should now have a 
22656 \family typewriter
22657 .svn
22658 \family default
22659  directory under 
22660 \family typewriter
22661 C:
22662 \backslash
22663 new project.
22664 \end_layout
22665
22666 \begin_layout Enumerate
22667 Create or open your document in \SpecialChar LyX
22668  and click 
22669 \family sans
22670 File\SpecialChar menuseparator
22671 Version
22672 \begin_inset space ~
22673 \end_inset
22674
22675 Control\SpecialChar menuseparator
22676 Register.
22677  
22678 \family default
22679 Add a log message and click OK to commit the document to version control.
22680 \end_layout
22681
22682 \begin_layout Standard
22683 From this point onward, you should have full functionality in the 
22684 \family sans
22685 File\SpecialChar menuseparator
22686 Version
22687 \begin_inset space ~
22688 \end_inset
22689
22690 Control
22691 \family default
22692  menu.
22693  You also have the option of checking the document in and out, viewing its
22694  history, etc.
22695  using the TortoiseSVN context menu in Windows Explorer or the Subversion
22696  client program from a command prompt.
22697 \end_layout
22698
22699 \begin_layout Subsubsection
22700 SSH tunnel used with SVN under Windows
22701 \end_layout
22702
22703 \begin_layout Standard
22704 Compared with Linux setting up an svn client to communicate over ssh under
22705  Windows is a rather troublesome task.
22706  We will at least offer some hints how to setup the client side but prior
22707  knowledge about ssh and the Windows command line is needed, also be prepared
22708  for a great deal of frustration\SpecialChar ldots
22709
22710 \end_layout
22711
22712 \begin_layout Enumerate
22713 Get an svn client for windows, as described in the previous sections.
22714  When it is a fresh install run some svn command (e.g.
22715  
22716 \begin_inset Flex Code
22717 status collapsed
22718
22719 \begin_layout Plain Layout
22720 svn –version
22721 \end_layout
22722
22723 \end_inset
22724
22725 ) to create config files, which you will need to change later on.
22726 \end_layout
22727
22728 \begin_layout Enumerate
22729 Choose an ssh client for Windows.
22730  There are several possibilities, we will use the one from Putty tools
22731 \begin_inset Foot
22732 status collapsed
22733
22734 \begin_layout Plain Layout
22735 \begin_inset Flex URL
22736 status collapsed
22737
22738 \begin_layout Plain Layout
22739
22740 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
22741 \end_layout
22742
22743 \end_inset
22744
22745
22746 \end_layout
22747
22748 \end_inset
22749
22750 .
22751  You will need to set the connection up so that the client doesn't ask for
22752  any password from you.
22753  To keep things easy we will use only keys without any additional password
22754  protection etc.
22755 \end_layout
22756
22757 \begin_deeper
22758 \begin_layout Enumerate
22759 Generate keys by 
22760 \begin_inset Flex Code
22761 status collapsed
22762
22763 \begin_layout Plain Layout
22764 puttygen
22765 \end_layout
22766
22767 \end_inset
22768
22769 .
22770  Save your private .ppk key file and put the public one on the server side.
22771  If the SVN server runs on Linux, note that the format of the public key
22772  is not compatible with Linux openssh and you will need to direcly copy-paste
22773  the key from the “
22774 \emph on
22775 Public key for pasting into OpenSSH authorized_keys file
22776 \emph default
22777 :” edit field into the server's 
22778 \begin_inset Flex Code
22779 status collapsed
22780
22781 \begin_layout Plain Layout
22782 ~/.ssh/authorized_keys
22783 \end_layout
22784
22785 \end_inset
22786
22787  / 
22788 \begin_inset Flex Code
22789 status collapsed
22790
22791 \begin_layout Plain Layout
22792 authorized_keys2
22793 \end_layout
22794
22795 \end_inset
22796
22797  file.
22798 \end_layout
22799
22800 \begin_layout Enumerate
22801 Get the Putty's 
22802 \begin_inset Flex Code
22803 status collapsed
22804
22805 \begin_layout Plain Layout
22806 plink
22807 \end_layout
22808
22809 \end_inset
22810
22811 .
22812  In the SVN config file
22813 \begin_inset Foot
22814 status collapsed
22815
22816 \begin_layout Plain Layout
22817 Exact path depends on Windows version, usually somewhere around 
22818 \begin_inset Flex Code
22819 status collapsed
22820
22821 \begin_layout Plain Layout
22822 c:
22823 \backslash
22824 Documents and Settings
22825 \backslash
22826 user
22827 \backslash
22828 Application Data
22829 \backslash
22830 Subversion
22831 \backslash
22832 config
22833 \end_layout
22834
22835 \end_inset
22836
22837  / 
22838 \begin_inset Flex Code
22839 status collapsed
22840
22841 \begin_layout Plain Layout
22842 AppData
22843 \backslash
22844 Roaming
22845 \backslash
22846 Subversion
22847 \end_layout
22848
22849 \end_inset
22850
22851 .
22852 \end_layout
22853
22854 \end_inset
22855
22856 , section [tunnels], setup ssh command, e.g.
22857  
22858 \begin_inset Flex Code
22859 status collapsed
22860
22861 \begin_layout Plain Layout
22862 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
22863 \end_layout
22864
22865 \end_inset
22866
22867 .
22868 \begin_inset Foot
22869 status collapsed
22870
22871 \begin_layout Plain Layout
22872 It will usually take a lot of time to get exact command right and it depends
22873  on many things.
22874  For example do not have some remote server saved as a default session in
22875  Putty etc.
22876  If things fail, try to connect via plink without SVN first.
22877 \end_layout
22878
22879 \end_inset
22880
22881
22882 \end_layout
22883
22884 \end_deeper
22885 \begin_layout Enumerate
22886 Checkout the SVN archive, e.
22887 \begin_inset space \thinspace{}
22888 \end_inset
22889
22890 g.
22891 \begin_inset Newline newline
22892 \end_inset
22893
22894
22895 \begin_inset Flex Code
22896 status collapsed
22897
22898 \begin_layout Plain Layout
22899 svn co svn+ssh://user@server/repository_path
22900 \end_layout
22901
22902 \end_inset
22903
22904 .
22905 \end_layout
22906
22907 \begin_layout Subsubsection
22908 End-of-Line Conversions
22909 \end_layout
22910
22911 \begin_layout Standard
22912 When the collaborators are mixing Linux and Windows environments, \SpecialChar LyX
22913  will
22914  use different line endings inside the .lyx files.
22915  This is not a problem as far as \SpecialChar LyX
22916  functionality is concerned, but the commit
22917  diffs will be huge and merge-conflicts prone.
22918  Fortunately SVN itself knows
22919 \begin_inset Foot
22920 status collapsed
22921
22922 \begin_layout Plain Layout
22923 \begin_inset Flex URL
22924 status collapsed
22925
22926 \begin_layout Plain Layout
22927
22928 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
22929 \end_layout
22930
22931 \end_inset
22932
22933
22934 \end_layout
22935
22936 \end_inset
22937
22938  how to deal with CR/LF problems when switching .lyx files to the 
22939 \begin_inset Flex Code
22940 status collapsed
22941
22942 \begin_layout Plain Layout
22943 native
22944 \end_layout
22945
22946 \end_inset
22947
22948  mode.
22949 \begin_inset Foot
22950 status collapsed
22951
22952 \begin_layout Plain Layout
22953 For the lazy guys: 
22954 \begin_inset Flex Code
22955 status collapsed
22956
22957 \begin_layout Plain Layout
22958 svn propset svn:eol-style native FILE_NAME
22959 \end_layout
22960
22961 \end_inset
22962
22963
22964 \end_layout
22965
22966 \end_inset
22967
22968
22969 \end_layout
22970
22971 \begin_layout Subsection
22972 GIT commands in \SpecialChar LyX
22973
22974 \end_layout
22975
22976 \begin_layout Standard
22977 A minimal subset of GIT commands is now supported by \SpecialChar LyX
22978 .
22979  You can find the commands in the 
22980 \family sans
22981 File\SpecialChar menuseparator
22982 Version
22983 \begin_inset space ~
22984 \end_inset
22985
22986 Control
22987 \family default
22988  submenu.
22989  Please note that if you use password protected access to repository via
22990  ssh, you will be asked in terminal window.
22991  \SpecialChar LyX
22992  was tested against GIT 1.7.
22993 \begin_inset Foot
22994 status open
22995
22996 \begin_layout Plain Layout
22997 Windows users please note that you need to ensure that git is on the path.
22998  This can be set from within \SpecialChar LyX
22999  at 
23000 \family sans
23001 Tools\SpecialChar menuseparator
23002 Preferences\SpecialChar menuseparator
23003 Paths\SpecialChar menuseparator
23004 PATH prefix
23005 \family default
23006 .
23007 \end_layout
23008
23009 \end_inset
23010
23011
23012 \end_layout
23013
23014 \begin_layout Standard
23015 One big difference of GIT and the other supported version control systems
23016  is the distributed nature of GIT: With traditional version control systems
23017  there is one central server which hosts the repository.
23018  Users commit their changes to the server, and get updates made by other
23019  users from it.
23020  With GIT, users commit to a local repository.
23021  The local repository can be synchronized with one or more remote repositories
23022  using the 
23023 \begin_inset Flex Code
23024 status collapsed
23025
23026 \begin_layout Plain Layout
23027 pull
23028 \end_layout
23029
23030 \end_inset
23031
23032  and 
23033 \begin_inset Flex Code
23034 status collapsed
23035
23036 \begin_layout Plain Layout
23037 push
23038 \end_layout
23039
23040 \end_inset
23041
23042  GIT commands.
23043  \SpecialChar LyX
23044  does not interact in any way with remote GIT repositories.
23045  It works exclusively with the local repository in a very similar way as
23046  with a central CVS or SVN repository.
23047  If you use remote GIT repositories you need to do the 
23048 \begin_inset Flex Code
23049 status collapsed
23050
23051 \begin_layout Plain Layout
23052 pull
23053 \end_layout
23054
23055 \end_inset
23056
23057  and 
23058 \begin_inset Flex Code
23059 status collapsed
23060
23061 \begin_layout Plain Layout
23062 push
23063 \end_layout
23064
23065 \end_inset
23066
23067  operations with your favourite GIT client.
23068 \end_layout
23069
23070 \begin_layout Subsubsection
23071
23072 \family sans
23073 Register
23074 \end_layout
23075
23076 \begin_layout Standard
23077 If your document is not under revision control, this is the only item shown
23078  in the menu.
23079  And if it is under revision control, the 
23080 \family sans
23081 Register
23082 \family default
23083  item is not visible.
23084 \end_layout
23085
23086 \begin_layout Standard
23087 This command registers in GIT your document ONLY in case you have already
23088  the documents directory under GIT control (in particular 
23089 \family typewriter
23090 .git/index
23091 \family default
23092  file exists).
23093  This means you have to checkout the archive by yourself.
23094 \end_layout
23095
23096 \begin_layout Standard
23097 Then you are asked interactively to supply an initial description of the
23098  document.
23099  Don't forget that registered file is not yet commited.
23100 \end_layout
23101
23102 \begin_layout Standard
23103 GIT command that is run: 
23104 \family typewriter
23105 git add 
23106 \begin_inset Quotes eld
23107 \end_inset
23108
23109 <file-name>
23110 \begin_inset Quotes erd
23111 \end_inset
23112
23113
23114 \end_layout
23115
23116 \begin_layout Standard
23117 Read 
23118 \family typewriter
23119 man git
23120 \family default
23121  to understand the switches.
23122 \end_layout
23123
23124 \begin_layout Subsubsection
23125
23126 \family sans
23127 Check In Changes
23128 \end_layout
23129
23130 \begin_layout Standard
23131 When you are finished editing a file, you commit your changes.
23132  When you do this, you are asked for a description of the changes.
23133  After that changes are commited.
23134 \end_layout
23135
23136 \begin_layout Standard
23137 GIT command: 
23138 \family typewriter
23139 git commit -q -m"<description>" <file-name>
23140 \end_layout
23141
23142 \begin_layout Subsubsection
23143
23144 \family sans
23145 Revert To Repository Version
23146 \end_layout
23147
23148 \begin_layout Standard
23149 This will discard all changes made to the document since the last check
23150  in.
23151  You get a warning before changes are discarded.
23152 \end_layout
23153
23154 \begin_layout Standard
23155 GIT command: 
23156 \family typewriter
23157 git checkout -q 
23158 \begin_inset Quotes eld
23159 \end_inset
23160
23161 <file-name>
23162 \begin_inset Quotes erd
23163 \end_inset
23164
23165
23166 \end_layout
23167
23168 \begin_layout Subsubsection
23169
23170 \family sans
23171 Rename
23172 \end_layout
23173
23174 \begin_layout Standard
23175 This will rename the current document including the version history.
23176  It requires a clean document without any changes since the last checkin.
23177  You are asked for a file name and a description of the rename operation.
23178  After that the document is renamed, both locally and in the repository.
23179  If the parent directories of the new and old file names differ, all relative
23180  paths of included files are adjusted (like in 
23181 \family sans
23182 File\SpecialChar menuseparator
23183 Save As
23184 \family default
23185 \SpecialChar ldots
23186 ).
23187  Finally, the document is reloaded using the new name.
23188 \end_layout
23189
23190 \begin_layout Labeling
23191 \labelwidthstring 00.00.0000
23192 GIT
23193 \begin_inset space ~
23194 \end_inset
23195
23196 commands: 
23197 \begin_inset space ~
23198 \end_inset
23199
23200
23201 \begin_inset Newline newline
23202 \end_inset
23203
23204
23205 \begin_inset Flex Code
23206 status collapsed
23207
23208 \begin_layout Plain Layout
23209 git mv 
23210 \family typewriter
23211
23212 \begin_inset Quotes eld
23213 \end_inset
23214
23215 <file-name>
23216 \begin_inset Quotes erd
23217 \end_inset
23218
23219  
23220 \begin_inset Quotes eld
23221 \end_inset
23222
23223 <new-file-name>
23224 \begin_inset Quotes erd
23225 \end_inset
23226
23227
23228 \end_layout
23229
23230 \end_inset
23231
23232
23233 \begin_inset Newline newline
23234 \end_inset
23235
23236
23237 \begin_inset Flex Code
23238 status collapsed
23239
23240 \begin_layout Plain Layout
23241 git commit
23242 \end_layout
23243
23244 \end_inset
23245
23246
23247 \end_layout
23248
23249 \begin_layout Subsubsection
23250
23251 \family sans
23252 Show History
23253 \end_layout
23254
23255 \begin_layout Standard
23256 This shows the complete history of the GIT document.
23257  The output of 
23258 \family typewriter
23259 git log 
23260 \begin_inset Quotes eld
23261 \end_inset
23262
23263 <file-name>
23264 \begin_inset Quotes erd
23265 \end_inset
23266
23267
23268 \family default
23269  is shown in a browser.
23270 \end_layout
23271
23272 \begin_layout Subsubsection
23273 Version Info
23274 \end_layout
23275
23276 \begin_layout Standard
23277 \SpecialChar LyX
23278  supports GIT hash number of the last commit to the file, author name, date
23279  and time of last commit.
23280  All those are extracted from 
23281 \family typewriter
23282 git log -n 1 --pretty=format:%H%n%an%n%ai
23283 \family default
23284 .
23285  Tree version information is obtained via 
23286 \family typewriter
23287 git describe --abbrev --dirty --long
23288 \family default
23289 .
23290  See 
23291 \begin_inset CommandInset ref
23292 LatexCommand ref
23293 reference "subsec:VCS-Revision-Information"
23294
23295 \end_inset
23296
23297  for other details.
23298 \end_layout
23299
23300 \begin_layout Subsection
23301 Further tuning
23302 \end_layout
23303
23304 \begin_layout Standard
23305 With the recent addition of the vc-command function \SpecialChar LyX
23306  power users are allowed
23307  to create their own commands for revision control.
23308 \end_layout
23309
23310 \begin_layout Standard
23311 As an example you can see how two TortoiseSVN commands could be integrated
23312  directly:
23313 \end_layout
23314
23315 \begin_layout Description
23316 Commit: 
23317 \begin_inset Flex Code
23318 status collapsed
23319
23320 \begin_layout Plain Layout
23321 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
23322 \end_layout
23323
23324 \end_inset
23325
23326
23327 \end_layout
23328
23329 \begin_layout Description
23330 Revert: 
23331 \begin_inset Flex Code
23332 status collapsed
23333
23334 \begin_layout Plain Layout
23335 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
23336 \end_layout
23337
23338 \end_inset
23339
23340
23341 \end_layout
23342
23343 \begin_layout Subsection
23344 Version control and Document comparison
23345 \end_layout
23346
23347 \begin_layout Standard
23348 One of the typical uses of version control is to inspect the changes between
23349  revisions, usually by creating 
23350 \begin_inset Flex Code
23351 status collapsed
23352
23353 \begin_layout Plain Layout
23354 diff
23355 \end_layout
23356
23357 \end_inset
23358
23359  dumps.
23360  While this is useful for plain text files, it is much less useful in the
23361  case of \SpecialChar LyX
23362  files, which have more a complicated structure.
23363  Hence we provide binding to the Document comparison feature.
23364  There are two ways of calling this feature - either by direct call of 
23365 \begin_inset Flex Code
23366 status collapsed
23367
23368 \begin_layout Plain Layout
23369 VC_COMPARE
23370 \end_layout
23371
23372 \end_inset
23373
23374  \SpecialChar LyX
23375  function (for details see \SpecialChar LyX
23376  functions manual) or by icon/menu item 
23377 \begin_inset Flex Noun
23378 status collapsed
23379
23380 \begin_layout Plain Layout
23381 Compare with older revision...
23382 \end_layout
23383
23384 \end_inset
23385
23386 .
23387  One can either compare two chosen revisions of the document or he can simply
23388  compare the current version of edited text with older revisions (where
23389  '
23390 \begin_inset Flex Noun
23391 status collapsed
23392
23393 \begin_layout Plain Layout
23394 0
23395 \end_layout
23396
23397 \end_inset
23398
23399 ' revisions back means comparison of the edited file with last commited
23400  revision).
23401  
23402 \end_layout
23403
23404 \begin_layout Standard
23405 This feature is supported for SVN and RCS though due to the more complicated
23406  versioning scheme of RCS there is a constraint – when addressing the revisions
23407  in dialog, numbers always point to the last number in RCS revision number,
23408  i.e.
23409  '35' in '1.2.35'.
23410  We don't currently support GIT addressing of revisions, one can just compare
23411  edited document with its revision X steps backs, where X is addressed as
23412  HEAD~X.
23413 \end_layout
23414
23415 \begin_layout Section
23416 Literate Programming
23417 \end_layout
23418
23419 \begin_layout Standard
23420 Updated by 
23421 \noun on
23422 Kayvan Sylvan 
23423 \noun default
23424 (kayvan@sylvan.com)
23425 \noun on
23426
23427 \noun default
23428 original documentation written by 
23429 \noun on
23430 Edmar Wienskoski Jr.
23431
23432 \noun default
23433  (edmar-w-jr@technologist.com)
23434 \end_layout
23435
23436 \begin_layout Subsection
23437 Introduction
23438 \end_layout
23439
23440 \begin_layout Standard
23441 The main purpose of this documentation is to show you how to use \SpecialChar LyX
23442  for literate
23443  programming, where it is assumed that you are familiar with this programming
23444  technique, and know what 
23445 \begin_inset Quotes eld
23446 \end_inset
23447
23448 tangling
23449 \begin_inset Quotes erd
23450 \end_inset
23451
23452  and 
23453 \begin_inset Quotes eld
23454 \end_inset
23455
23456 weaving
23457 \begin_inset Quotes erd
23458 \end_inset
23459
23460  means.
23461  If that is not the case, please follow the web links provided in the following
23462  sections.
23463  There is a lot of good documentation out there covering old development
23464  history to the latest tools tips.
23465 \end_layout
23466
23467 \begin_layout Standard
23468 It is also assumed that you are familiar with \SpecialChar LyX
23469  itself to a point that you
23470  are comfortable changing your \SpecialChar LyX
23471  preferences, and X resources file.
23472  If that is not the case please refer to other \SpecialChar LyX
23473  documentation to cover your
23474  specific needs.
23475 \end_layout
23476
23477 \begin_layout Subsection
23478 Literate Programming
23479 \end_layout
23480
23481 \begin_layout Standard
23482 From the Literate Programming FAQ: 
23483 \end_layout
23484
23485 \begin_layout Quotation
23486 Literate programming is the combination of documentation and source together
23487  in a fashion suited for reading by human beings.
23488  In fact, literate programs should be enjoyable reading, even inviting!
23489  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
23490  and documentation in a single file.
23491  Literate programming tools then parse the file to produce either readable
23492  documentation or compilable source.
23493  The WEB style of literate programming was created by D.
23494 \begin_inset space \thinspace{}
23495 \end_inset
23496
23497 E.
23498  Knuth during the development of his \SpecialChar TeX
23499  typesetting software.
23500  
23501 \end_layout
23502
23503 \begin_layout Standard
23504 Another excerpt says:
23505 \end_layout
23506
23507 \begin_layout Quotation
23508
23509 \emph on
23510 How is literate programming different from verbose commenting?
23511 \end_layout
23512
23513 \begin_layout Quotation
23514 There are three distinguishing characteristics.
23515  In order of importance, they are: 
23516 \end_layout
23517
23518 \begin_deeper
23519 \begin_layout Itemize
23520 flexible order of elaboration 
23521 \end_layout
23522
23523 \begin_layout Itemize
23524 automatic support for browsing 
23525 \end_layout
23526
23527 \begin_layout Itemize
23528 typeset documentation, especially diagrams and mathematics 
23529 \end_layout
23530
23531 \end_deeper
23532 \begin_layout Standard
23533 Now that I sparked your curiosity, take a look in the references.
23534 \end_layout
23535
23536 \begin_layout Subsubsection
23537 References
23538 \end_layout
23539
23540 \begin_layout Standard
23541 The complete Literate Programming FAQ can be found at:
23542 \end_layout
23543
23544 \begin_layout Quote
23545 Literate Programming FAQ 
23546 \begin_inset Flex URL
23547 status collapsed
23548
23549 \begin_layout Plain Layout
23550
23551 http://www.literateprogramming.com/lpfaq.pdf
23552 \end_layout
23553
23554 \end_inset
23555
23556
23557 \end_layout
23558
23559 \begin_layout Standard
23560 The FAQ lists 23 (twenty three!) different literate programming tools.
23561  Where some are specialized or 
23562 \begin_inset Quotes eld
23563 \end_inset
23564
23565 tailored
23566 \begin_inset Quotes erd
23567 \end_inset
23568
23569  for particular programming languages, while other have general scope.
23570  I selected 
23571 \noun on
23572 Noweb
23573 \noun default
23574  for my own use for several reasons:
23575 \end_layout
23576
23577 \begin_layout Itemize
23578 It can generate the documentation either in \SpecialChar LaTeX
23579  or HTML.
23580 \end_layout
23581
23582 \begin_layout Itemize
23583 It has a open architecture, i.
23584 \begin_inset space \thinspace{}
23585 \end_inset
23586
23587 e.
23588 \begin_inset space \space{}
23589 \end_inset
23590
23591 it is easy to plug in new filters and to perform special processing that
23592  you may need.
23593  
23594 \end_layout
23595
23596 \begin_layout Itemize
23597 There is a good selection of filters available already (the HTML is one
23598  of them).
23599 \end_layout
23600
23601 \begin_layout Itemize
23602 It is free.
23603 \end_layout
23604
23605 \begin_layout Standard
23606 The Noweb web page can be found at: 
23607 \end_layout
23608
23609 \begin_layout Quote
23610 Noweb home page 
23611 \begin_inset Flex URL
23612 status collapsed
23613
23614 \begin_layout Plain Layout
23615
23616 http://www.cs.virginia.edu/~nr/noweb/
23617 \end_layout
23618
23619 \end_inset
23620
23621
23622 \end_layout
23623
23624 \begin_layout Standard
23625 Starting from there you can reach many other interesting links and even
23626  some literate program examples.
23627 \end_layout
23628
23629 \begin_layout Subsection
23630 \SpecialChar LyX
23631  and Literate Programming with Noweb
23632 \end_layout
23633
23634 \begin_layout Standard
23635 The \SpecialChar LyX
23636  support for Literate Programming is provided by using the generic \SpecialChar LyX
23637
23638  converters mechanism.
23639  This support is provided in a 
23640 \begin_inset Quotes eld
23641 \end_inset
23642
23643 Noweb independent
23644 \begin_inset Quotes erd
23645 \end_inset
23646
23647  way, i.
23648 \begin_inset space \thinspace{}
23649 \end_inset
23650
23651 e.
23652 \begin_inset space \space{}
23653 \end_inset
23654
23655 you will be able to use this new \SpecialChar LyX
23656  feature with some other literate programming
23657  tool of your choice by just changing your \SpecialChar LyX
23658  preferences.
23659 \end_layout
23660
23661 \begin_layout Subsubsection
23662 Generating documents and code (weaving and tangling)
23663 \end_layout
23664
23665 \begin_layout Paragraph
23666 Using the noweb module
23667 \end_layout
23668
23669 \begin_layout Standard
23670 If you have installed Noweb and \SpecialChar LyX
23671  successfully, whenever you open a new document,
23672  after you have chosen its document class, use the Document->Settings menu
23673  to add the 
23674 \begin_inset Quotes eld
23675 \end_inset
23676
23677 noweb
23678 \begin_inset Quotes erd
23679 \end_inset
23680
23681  module.
23682  If Noweb is correctly installed, when you click on the 
23683 \begin_inset Quotes eld
23684 \end_inset
23685
23686 Modules
23687 \begin_inset Quotes erd
23688 \end_inset
23689
23690  link, you will see the 
23691 \begin_inset Quotes eld
23692 \end_inset
23693
23694 noweb
23695 \begin_inset Quotes erd
23696 \end_inset
23697
23698  module in the available list and you can add it to your document.
23699 \end_layout
23700
23701 \begin_layout Paragraph
23702 Typing code in
23703 \end_layout
23704
23705 \begin_layout Standard
23706 \SpecialChar LyX
23707  enables you to write code with a layout named 
23708 \begin_inset Flex Noun
23709 status collapsed
23710
23711 \begin_layout Plain Layout
23712 Chunk
23713 \end_layout
23714
23715 \end_inset
23716
23717 .
23718  Noweb delimits chunks like this:
23719 \end_layout
23720
23721 \begin_layout LyX-Code
23722 <<My code>>=
23723 \end_layout
23724
23725 \begin_layout LyX-Code
23726   code
23727 \end_layout
23728
23729 \begin_layout LyX-Code
23730   more code
23731 \end_layout
23732
23733 \begin_layout LyX-Code
23734   even more code
23735 \end_layout
23736
23737 \begin_layout LyX-Code
23738   @
23739 \end_layout
23740
23741 \begin_layout Standard
23742 The problem is that whatever is written in between the << and the 
23743 \family typewriter
23744 @
23745 \family default
23746  must be taken literally, i.
23747 \begin_inset space \thinspace{}
23748 \end_inset
23749
23750 e.
23751 \begin_inset space \space{}
23752 \end_inset
23753
23754 \SpecialChar LyX
23755  should be prevented from making any special interpretation of what has
23756  been written.
23757  This is also handled by 
23758 \begin_inset Flex Noun
23759 status collapsed
23760
23761 \begin_layout Plain Layout
23762 Chunk
23763 \end_layout
23764
23765 \end_inset
23766
23767 , that works like a normal paragraph but has a free spacing capability.
23768 \end_layout
23769
23770 \begin_layout Standard
23771 As a special note, you can also use the 
23772 \begin_inset Quotes eld
23773 \end_inset
23774
23775 %def
23776 \begin_inset Quotes erd
23777 \end_inset
23778
23779  construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
23780 rence:
23781 \end_layout
23782
23783 \begin_layout LyX-Code
23784 <<My chunk>>=
23785 \end_layout
23786
23787 \begin_layout LyX-Code
23788 def some_function(args):
23789 \end_layout
23790
23791 \begin_layout LyX-Code
23792    "This is the doc string for this function."
23793 \end_layout
23794
23795 \begin_layout LyX-Code
23796    print "My args: ", args
23797 \end_layout
23798
23799 \begin_layout LyX-Code
23800 @ %def some_function
23801 \end_layout
23802
23803 \begin_layout Standard
23804 For an example of this usage and the resulting cross-reference output, look
23805  at the Literate python program in 
23806 \emph on
23807 LIBDIR/examples/listerrors.lyx
23808 \emph default
23809  which should make this all clear.
23810 \end_layout
23811
23812 \begin_layout Paragraph
23813 Generating the documentation
23814 \end_layout
23815
23816 \begin_layout Standard
23817 At this point you already have a new document file with a proper document
23818  class, and with some code and text on it.
23819  How do I print it? The answer is simple, you select 
23820 \family sans
23821 View\SpecialChar menuseparator
23822 DVI,
23823 \family default
23824  etc.
23825  Just like you would do for a plain document.
23826  No special procedure is required.
23827 \end_layout
23828
23829 \begin_layout Standard
23830 To help orientate you, I will now explain what happens inside \SpecialChar LyX
23831 :
23832 \end_layout
23833
23834 \begin_layout Enumerate
23835 When the 
23836 \family sans
23837 Update\SpecialChar menuseparator
23838 DVI
23839 \family default
23840  menu option is chosen, a \SpecialChar LaTeX
23841  file is generated.
23842  
23843 \end_layout
23844
23845 \begin_deeper
23846 \begin_layout Standard
23847 If the document is of any literate class the generated file will be named
23848  with an extension name defined by the 
23849 \begin_inset Quotes eld
23850 \end_inset
23851
23852 literate
23853 \begin_inset Quotes erd
23854 \end_inset
23855
23856  format (defined in the Preferences panel), otherwise the file will have
23857  the usual 
23858 \family typewriter
23859 .tex
23860 \family default
23861  extension.
23862 \end_layout
23863
23864 \end_deeper
23865 \begin_layout Enumerate
23866 Note that the only difference so far is in the name of the file, no special
23867  processing is required by \SpecialChar LyX
23868 .
23869  Given that you formatted the code using the 
23870 \begin_inset Flex Noun
23871 status collapsed
23872
23873 \begin_layout Plain Layout
23874 Chunk
23875 \end_layout
23876
23877 \end_inset
23878
23879  layout that, by itself, takes care of the business.
23880 \end_layout
23881
23882 \begin_layout Enumerate
23883 If the document is of any literate class \SpecialChar LyX
23884  will then use the internal \SpecialChar LyX
23885  to
23886  Noweb converter, followed by the Noweb to \SpecialChar LaTeX
23887  converter
23888 \begin_inset Foot
23889 status collapsed
23890
23891 \begin_layout Plain Layout
23892 The converters are defined in the 
23893 \family sans
23894 Tools\SpecialChar menuseparator
23895 Preferences
23896 \family default
23897  panel, under the 
23898 \begin_inset Quotes eld
23899 \end_inset
23900
23901 Conversion
23902 \begin_inset Quotes erd
23903 \end_inset
23904
23905  tab.
23906  See section 
23907 \emph on
23908 Converters
23909 \emph default
23910  of the 
23911 \emph on
23912 Customization
23913 \emph default
23914  manual for general information about converters.
23915 \end_layout
23916
23917 \end_inset
23918
23919  to generate the \SpecialChar LaTeX
23920  file.
23921 \end_layout
23922
23923 \begin_deeper
23924 \begin_layout Standard
23925 Otherwise it will just skip this step.
23926 \end_layout
23927
23928 \end_deeper
23929 \begin_layout Enumerate
23930 Finally, \SpecialChar LaTeX
23931  is invoked and the regular post processing continues as in a plain
23932  document.
23933 \end_layout
23934
23935 \begin_layout Standard
23936 Independence from a particular 
23937 \begin_inset Quotes eld
23938 \end_inset
23939
23940 literate tool
23941 \begin_inset Quotes erd
23942 \end_inset
23943
23944  is easily achieved by changing the commands that are run by the various
23945  converters.
23946 \end_layout
23947
23948 \begin_layout Paragraph
23949 Generating the code
23950 \end_layout
23951
23952 \begin_layout Standard
23953 When the build menu option is chosen or the corresponding button in the
23954  toolbar is pressed, a \SpecialChar LaTeX
23955  file is generated just like step 1 above.
23956  Next, \SpecialChar LyX
23957  invokes the 
23958 \family typewriter
23959 Noweb->Program
23960 \family default
23961  converter.
23962  This converter needs to be defined by the user and is not installed by
23963  default, though the Program format is.
23964  This converter (like any other converter) will have two parts:
23965 \end_layout
23966
23967 \begin_layout Enumerate
23968 The converter program itself.
23969  This program performs the conversion from the one format to the other (in
23970  this case, from the Noweb format to the Program pseudo-format).
23971 \end_layout
23972
23973 \begin_layout Enumerate
23974 The error log parser.
23975  This is a program whose sole purpose is to rewrite error messages in a
23976  format that \SpecialChar LyX
23977  understands.
23978  This makes it possible for \SpecialChar LyX
23979  to place error boxes in the right places in
23980  the file buffer.
23981 \end_layout
23982
23983 \begin_layout Standard
23984 The first part, the 
23985 \begin_inset Quotes eld
23986 \end_inset
23987
23988 Converter
23989 \begin_inset Quotes erd
23990 \end_inset
23991
23992  setting, should be set to
23993 \begin_inset Newline newline
23994 \end_inset
23995
23996
23997 \begin_inset Quotes eld
23998 \end_inset
23999
24000
24001 \family typewriter
24002 build-script $$i
24003 \family default
24004  $$r
24005 \begin_inset Quotes erd
24006 \end_inset
24007
24008 .
24009 \begin_inset Newline newline
24010 \end_inset
24011
24012 This basically means that \SpecialChar LyX
24013  will call 
24014 \begin_inset Quotes eld
24015 \end_inset
24016
24017 build-script
24018 \begin_inset Quotes erd
24019 \end_inset
24020
24021  (a program or script) with the name of the Noweb file (normally a file
24022  in the \SpecialChar LyX
24023  temp directory) and the directory path of the original \SpecialChar LyX
24024  file.
24025  
24026 \end_layout
24027
24028 \begin_layout Standard
24029 This is an implementation of 
24030 \begin_inset Quotes eld
24031 \end_inset
24032
24033 build-script
24034 \begin_inset Quotes erd
24035 \end_inset
24036
24037  that you can place in a directory on your path:
24038 \end_layout
24039
24040 \begin_layout Standard
24041 \begin_inset VSpace defskip
24042 \end_inset
24043
24044
24045 \end_layout
24046
24047 \begin_layout Standard
24048 \begin_inset Newpage pagebreak
24049 \end_inset
24050
24051
24052 \end_layout
24053
24054 \begin_layout Standard
24055
24056 \family sans
24057 #!/bin/sh
24058 \end_layout
24059
24060 \begin_layout Standard
24061
24062 \family sans
24063 #
24064 \end_layout
24065
24066 \begin_layout Standard
24067
24068 \family sans
24069 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
24070 \end_layout
24071
24072 \begin_layout Standard
24073 \begin_inset VSpace defskip
24074 \end_inset
24075
24076
24077 \end_layout
24078
24079 \begin_layout Standard
24080 The next part of the converter setting is the 
24081 \begin_inset Quotes eld
24082 \end_inset
24083
24084 Flags
24085 \begin_inset Quotes erd
24086 \end_inset
24087
24088  which is to be set to
24089 \begin_inset Newline newline
24090 \end_inset
24091
24092
24093 \begin_inset Quotes eld
24094 \end_inset
24095
24096
24097 \family typewriter
24098 parselog=$$s/scripts/listerrors
24099 \family default
24100
24101 \begin_inset Quotes erd
24102 \end_inset
24103
24104 .
24105 \begin_inset Newline newline
24106 \end_inset
24107
24108 This will run any errors that are generated by the 
24109 \begin_inset Quotes eld
24110 \end_inset
24111
24112 build-script
24113 \begin_inset Quotes erd
24114 \end_inset
24115
24116  process through the 
24117 \begin_inset Quotes eld
24118 \end_inset
24119
24120 listerrors
24121 \begin_inset Quotes erd
24122 \end_inset
24123
24124  program.
24125 \end_layout
24126
24127 \begin_layout Standard
24128 The build will normally take place in \SpecialChar LyX
24129 's temporary directory, so the files
24130  produced by the conversion will be in that directory.
24131  \SpecialChar LyX
24132  will copy out what it regards as the `main' file, but the 
24133 \family typewriter
24134 Noweb->Program
24135 \family default
24136  conversion may produce several files, and so most of these would then be
24137  deleted when \SpecialChar LyX
24138  was closed.
24139  This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
24140  the build-script chunk can place the generated files in that location.
24141 \end_layout
24142
24143 \begin_layout Paragraph
24144 Build instructions in the document
24145 \end_layout
24146
24147 \begin_layout Standard
24148 The last piece of the integration between \SpecialChar LyX
24149  and noweb is the 
24150 \begin_inset Quotes eld
24151 \end_inset
24152
24153 build-script
24154 \begin_inset Quotes erd
24155 \end_inset
24156
24157  chunk.
24158  Generally, the instructions for building your program should be embedded
24159  in a chunk of its own.
24160  The noweb-specific 
24161 \begin_inset Quotes eld
24162 \end_inset
24163
24164 build-script
24165 \begin_inset Quotes erd
24166 \end_inset
24167
24168  above uses the notangle command to look for this chunk (called 
24169 \begin_inset Quotes eld
24170 \end_inset
24171
24172 build-script
24173 \begin_inset Quotes erd
24174 \end_inset
24175
24176 ) and runs its contents through 
24177 \begin_inset Quotes eld
24178 \end_inset
24179
24180 sh
24181 \begin_inset Quotes erd
24182 \end_inset
24183
24184 .
24185 \end_layout
24186
24187 \begin_layout Standard
24188 Typically, such a chunk would look something like this:
24189 \end_layout
24190
24191 \begin_layout LyX-Code
24192 <<build-script>>=
24193 \end_layout
24194
24195 \begin_layout LyX-Code
24196 #!/bin/sh
24197 \begin_inset Newline newline
24198 \end_inset
24199
24200 if [ -z "${NOWEB_SOURCE}" ]
24201 \begin_inset Newline newline
24202 \end_inset
24203
24204 then
24205 \end_layout
24206
24207 \begin_layout LyX-Code
24208 NOWEB_SOURCE=myfile.nw
24209 \begin_inset Newline newline
24210 \end_inset
24211
24212 fi
24213 \begin_inset Newline newline
24214 \end_inset
24215
24216 [...
24217  code to extract files ...
24218  use NOWEB_OUTPUT_DIR here ...]
24219 \begin_inset Newline newline
24220 \end_inset
24221
24222 [...
24223  code to compile files ...]
24224 \begin_inset Newline newline
24225 \end_inset
24226
24227 @
24228 \end_layout
24229
24230 \begin_layout Standard
24231 Look in 
24232 \emph on
24233 LIBDIR/examples/listerrors.lyx
24234 \emph default
24235  or in 
24236 \emph on
24237 LIBDIR/examples/Literate.lyx
24238 \emph default
24239  which implement two versions of the 
24240 \begin_inset Quotes eld
24241 \end_inset
24242
24243 listerrors
24244 \begin_inset Quotes erd
24245 \end_inset
24246
24247  program for some illustrations of how all of these pieces go together or
24248  in 
24249 \emph on
24250 LIBDIR/examples/noweb2lyx.lyx.
24251
24252 \emph default
24253  Interestingly, these three files show off the language-indepence of the
24254  \SpecialChar LyX
24255  literate programming support since they are written in Python, C and Perl
24256  respectively.
24257 \end_layout
24258
24259 \begin_layout Subsubsection
24260 Configuring \SpecialChar LyX
24261
24262 \end_layout
24263
24264 \begin_layout Standard
24265 All the Literate Programming support is configured by the 
24266 \family sans
24267 Tools\SpecialChar menuseparator
24268 Preferences
24269 \family default
24270  panel in the 
24271 \begin_inset Quotes eld
24272 \end_inset
24273
24274 File Handling
24275 \begin_inset Quotes erd
24276 \end_inset
24277
24278  tab.
24279  The important parts are:
24280 \end_layout
24281
24282 \begin_layout Description
24283 the
24284 \begin_inset space ~
24285 \end_inset
24286
24287
24288 \begin_inset Quotes eld
24289 \end_inset
24290
24291 NoWeb
24292 \begin_inset Quotes erd
24293 \end_inset
24294
24295
24296 \begin_inset space ~
24297 \end_inset
24298
24299 format Set up via the File Formats tab, this is where the Noweb-specific
24300  pieces are set up.
24301  The 
24302 \family sans
24303 GUI Name
24304 \family default
24305  is set to 
24306 \family typewriter
24307 NoWeb
24308 \family default
24309 , the file extension is set to 
24310 \family typewriter
24311 .nw
24312 \family default
24313 .
24314  This tells \SpecialChar LyX
24315  to create a file with a 
24316 \family typewriter
24317 .nw
24318 \family default
24319  extension in the first step of the conversion process.
24320 \end_layout
24321
24322 \begin_layout Description
24323 the
24324 \begin_inset space ~
24325 \end_inset
24326
24327
24328 \family sans
24329 Program
24330 \family default
24331
24332 \begin_inset space ~
24333 \end_inset
24334
24335 format This is an empty format whose sole purpose is to be the endpoint
24336  of a conversion (which then allows us to set up a converter for it).
24337 \end_layout
24338
24339 \begin_layout Description
24340
24341 \family sans
24342 NoWeb
24343 \family default
24344 ->
24345 \family sans
24346 \SpecialChar LaTeX
24347
24348 \family default
24349  This converter performs the 
24350 \begin_inset Quotes eld
24351 \end_inset
24352
24353 weaving
24354 \begin_inset Quotes erd
24355 \end_inset
24356
24357  of the literate document.
24358  For Noweb, it is set to 
24359 \begin_inset Quotes eld
24360 \end_inset
24361
24362
24363 \family typewriter
24364 noweave -delay -index $$i > $$o
24365 \family default
24366
24367 \begin_inset Quotes erd
24368 \end_inset
24369
24370
24371 \end_layout
24372
24373 \begin_layout Description
24374
24375 \family sans
24376 NoWeb
24377 \family default
24378 ->
24379 \family sans
24380 Program
24381 \family default
24382  This performs the 
24383 \begin_inset Quotes eld
24384 \end_inset
24385
24386 tangling step
24387 \begin_inset Quotes erd
24388 \end_inset
24389
24390 .
24391  As stated above, the Converter is set to 
24392 \begin_inset Quotes eld
24393 \end_inset
24394
24395
24396 \family typewriter
24397 build-script $$i
24398 \family default
24399  $$r
24400 \begin_inset Quotes erd
24401 \end_inset
24402
24403 , with Flags set to
24404 \begin_inset Newline newline
24405 \end_inset
24406
24407
24408 \begin_inset Quotes eld
24409 \end_inset
24410
24411
24412 \family typewriter
24413 parselog=$$s/scripts/listerrors
24414 \family default
24415
24416 \begin_inset Quotes erd
24417 \end_inset
24418
24419 .
24420 \end_layout
24421
24422 \begin_layout Subsubsection
24423 Debug extensions
24424 \end_layout
24425
24426 \begin_layout Standard
24427 There is also a new function implemented in the \SpecialChar LyX
24428  server, the 
24429 \begin_inset Quotes eld
24430 \end_inset
24431
24432 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
24433  
24434 \end_layout
24435
24436 \begin_layout Standard
24437 When debugging code with ddd/gdb, it is possible to invoke a text editor
24438  at the current execution position with a single key stroke.
24439  The default ddd configuration for that is shift-ctrl-V.
24440  It happens that you can define the editor command line invocation in ddd
24441  by accessing the 
24442 \family sans
24443 Edit\SpecialChar menuseparator
24444 Preferences\SpecialChar menuseparator
24445 Helpers
24446 \family default
24447  dialog and changing the "Edit Sources" entry.
24448 \end_layout
24449
24450 \begin_layout Standard
24451 I take advantage of the newly created \SpecialChar LyX
24452  server function and this ddd feature,
24453  and set 
24454 \begin_inset Quotes eld
24455 \end_inset
24456
24457 Edit Sources
24458 \begin_inset Quotes erd
24459 \end_inset
24460
24461  to:
24462 \end_layout
24463
24464 \begin_layout Standard
24465 \begin_inset VSpace defskip
24466 \end_inset
24467
24468
24469 \end_layout
24470
24471 \begin_layout Standard
24472
24473 \family sans
24474 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
24475 \end_layout
24476
24477 \begin_layout Standard
24478 \begin_inset VSpace defskip
24479 \end_inset
24480
24481
24482 \end_layout
24483
24484 \begin_layout Standard
24485 With this, whenever you are using ddd and find a point in the program that
24486  you want to edit, you just press shift-ctrl-V (in the ddd window), and
24487  ddd will forward this information to \SpecialChar LyX
24488  through the \SpecialChar LyX
24489  server and then the
24490  \SpecialChar LyX
24491  window will show the same file with the cursor at the same position ddd
24492  was pointing to.
24493  No more guessing or long scrolling to locate a point in the program back
24494  from debugging !
24495 \end_layout
24496
24497 \begin_layout Standard
24498 Note however that you must enable the \SpecialChar LyX
24499  server to get this feature working
24500  (it is disabled by default).
24501  You can enable it in 
24502 \family sans
24503 Preferences
24504 \family default
24505  (tabs 
24506 \family sans
24507 Inputs
24508 \family default
24509
24510 \family sans
24511 Paths
24512 \family default
24513 ) by entering in the 
24514 \family sans
24515 \SpecialChar LyX
24516 server pipe
24517 \family default
24518  a path like 
24519 \begin_inset Quotes eld
24520 \end_inset
24521
24522
24523 \family typewriter
24524 /home/<your-home-directory>/.lyx/lyxpipe
24525 \family default
24526
24527 \begin_inset Quotes erd
24528 \end_inset
24529
24530
24531 \end_layout
24532
24533 \begin_layout Standard
24534 Read the \SpecialChar LyX
24535  server documentation in the 
24536 \emph on
24537 Customization Manual
24538 \emph default
24539  for further information.
24540 \end_layout
24541
24542 \begin_layout Subsubsection
24543 Toolbar extensions
24544 \end_layout
24545
24546 \begin_layout Standard
24547 There are six new buttons that can be added to your \SpecialChar LyX
24548  toolbar.
24549  Five of these buttons are short cuts to layout styles: 
24550 \family sans
24551 Standard
24552 \family default
24553
24554 \family sans
24555 Section
24556 \family default
24557
24558 \family sans
24559 \SpecialChar LaTeX
24560
24561 \family default
24562
24563 \family sans
24564 \SpecialChar LyX
24565 -Code
24566 \family default
24567 , and 
24568 \family sans
24569 Chunk
24570 \family default
24571 .
24572  The last one is a short cut to the 
24573 \begin_inset Quotes eld
24574 \end_inset
24575
24576 Build Program
24577 \begin_inset Quotes erd
24578 \end_inset
24579
24580  File menu entry.
24581  
24582 \end_layout
24583
24584 \begin_layout Standard
24585 \SpecialChar LyX
24586  has a range of buttons that are available for tool bar customization.
24587  In my toolbar I like to combine the six short cuts above with two more:
24588  One for 
24589 \family sans
24590 Document
24591 \family default
24592 \SpecialChar menuseparator
24593
24594 \family sans
24595 Update
24596 \family default
24597 \SpecialChar menuseparator
24598
24599 \family sans
24600 DVI
24601 \family default
24602  and the other for 
24603 \family sans
24604 Document\SpecialChar menuseparator
24605 View\SpecialChar menuseparator
24606 DVI
24607 \family default
24608  File menu entries.
24609  Here is how it looks like:
24610 \end_layout
24611
24612 \begin_layout LyX-Code
24613 Toolbar
24614 \end_layout
24615
24616 \begin_layout LyX-Code
24617   Layouts
24618 \end_layout
24619
24620 \begin_layout LyX-Code
24621   Icon "layout Standard"
24622 \end_layout
24623
24624 \begin_layout LyX-Code
24625   Icon "layout Section"
24626 \end_layout
24627
24628 \begin_layout LyX-Code
24629   Icon "layout \SpecialChar LaTeX
24630 "
24631 \end_layout
24632
24633 \begin_layout LyX-Code
24634   Icon "layout \SpecialChar LyX
24635 -Code"
24636 \end_layout
24637
24638 \begin_layout LyX-Code
24639   Icon "layout Chunk"
24640 \end_layout
24641
24642 \begin_layout LyX-Code
24643   Separator
24644 \end_layout
24645
24646 \begin_layout LyX-Code
24647   Icon "buffer-view"
24648 \end_layout
24649
24650 \begin_layout LyX-Code
24651   Icon "buffer-typeset"
24652 \end_layout
24653
24654 \begin_layout LyX-Code
24655   Icon "build-program"
24656 \end_layout
24657
24658 \begin_layout LyX-Code
24659   Separator
24660 \end_layout
24661
24662 \begin_layout LyX-Code
24663 .
24664 \end_layout
24665
24666 \begin_layout LyX-Code
24667 .
24668 \end_layout
24669
24670 \begin_layout LyX-Code
24671 .
24672 \end_layout
24673
24674 \begin_layout LyX-Code
24675 End
24676 \end_layout
24677
24678 \begin_layout Subsubsection
24679 Colors customization
24680 \end_layout
24681
24682 \begin_layout Standard
24683 There are a number of colors in \SpecialChar LyX
24684  that can be customized in 
24685 \family sans
24686 Preferences
24687 \family default
24688 .
24689  One of the things that bothers people is the \SpecialChar LaTeX
24690  font color.
24691  The default color is red, since the chunks uses \SpecialChar LaTeX
24692  font, and there is a lot
24693  of chunks in literate documents, you may get tired of seeing everything
24694  in red.
24695  You can change it by going to the tabs 
24696 \family sans
24697 Look&Feel
24698 \family default
24699
24700 \family sans
24701 Colors.
24702 \end_layout
24703
24704 \begin_layout Standard
24705 The next thing is the visible presence of the newline character in the screen.
24706  You can choose the color of this particular character and make it blend
24707  in the background.
24708  I recommend you choosing a color that is close to the background but not
24709  equal, that way you still can see it is there, but it is not bothering
24710  you anymore.
24711 \end_layout
24712
24713 \begin_layout Subsection
24714 \SpecialChar LyX
24715  and knitr/Sweave
24716 \end_layout
24717
24718 \begin_layout Standard
24719 Support for 
24720 \family sans
24721 knitr
24722 \family default
24723  and 
24724 \family sans
24725 Sweave
24726 \family default
24727  is documented in the 
24728 \emph on
24729 knitr.lyx
24730 \emph default
24731  example file and in the Sweave manual (menu 
24732 \family sans
24733 Help\SpecialChar menuseparator
24734 Specific Manuals
24735 \family default
24736 ).
24737 \end_layout
24738
24739 \begin_layout Chapter
24740 Special features
24741 \end_layout
24742
24743 \begin_layout Standard
24744 You can do everything with \SpecialChar LyX
24745  that you can do with \SpecialChar LaTeX
24746 .
24747  However, \SpecialChar LyX
24748  cannot support every \SpecialChar LaTeX
24749  feature directly.
24750  But you can always use \SpecialChar TeX
24751  Code.
24752  This chapter shows you some more special things you might want to use.
24753  For other special things you can do with figures, tables, floats, boxes
24754  and notes, have a look at the 
24755 \emph on
24756 Embedded
24757 \begin_inset space ~
24758 \end_inset
24759
24760 Objects
24761 \emph default
24762  manual.
24763 \end_layout
24764
24765 \begin_layout Section
24766 Multiple Text Columns
24767 \end_layout
24768
24769 \begin_layout Standard
24770 This feature is independent of the option 
24771 \family sans
24772 Two-column document
24773 \family default
24774  in the document settings under 
24775 \family sans
24776 Text Layout
24777 \family default
24778 .
24779  If you want to have 2
24780 \begin_inset space ~
24781 \end_inset
24782
24783 columns for the whole document, it is recommended to use the 
24784 \family sans
24785 Two-column document
24786 \family default
24787  option.
24788  For all other cases use this feature.
24789 \end_layout
24790
24791 \begin_layout Standard
24792 To use multiple text columns in your document, you have to load the module
24793  
24794 \family sans
24795 Multiple Columns
24796 \family default
24797  (menu 
24798 \family sans
24799 Document\SpecialChar menuseparator
24800 Settings\SpecialChar menuseparator
24801 Modules
24802 \family default
24803 ) and must have the \SpecialChar LaTeX
24804 -package 
24805 \series bold
24806 multicol
24807 \series default
24808  installed.
24809 \end_layout
24810
24811 \begin_layout Standard
24812 Footnotes within multiple columns will be placed at the bottom of the page
24813  and not under each column.
24814  Within the different columns you can use everything, with the limitation
24815  that for floats you need to use the float option 
24816 \family sans
24817 Span columns
24818 \family default
24819 .
24820 \end_layout
24821
24822 \begin_layout Subsection
24823 Basics
24824 \end_layout
24825
24826 \begin_layout Standard
24827 If you want to have 2
24828 \begin_inset space ~
24829 \end_inset
24830
24831 columns in your text, insert a multicolumn inset via the menu 
24832 \family sans
24833 Insert\SpecialChar menuseparator
24834 Custom
24835 \begin_inset space ~
24836 \end_inset
24837
24838 Insets\SpecialChar menuseparator
24839 Multiple
24840 \begin_inset space ~
24841 \end_inset
24842
24843 Columns
24844 \family default
24845  where the columns should start.
24846  Write all text that should be printed in 2
24847 \begin_inset space ~
24848 \end_inset
24849
24850 columns into this inset.
24851 \end_layout
24852
24853 \begin_layout Standard
24854 Here is an example:
24855 \end_layout
24856
24857 \begin_layout Standard
24858 \noindent
24859 \begin_inset Flex Multiple Columns
24860 status open
24861
24862 \begin_layout Plain Layout
24863 \noindent
24864
24865 \series bold
24866 \size small
24867 The Adventure of the Empty House
24868 \series default
24869
24870 \begin_inset Newline newline
24871 \end_inset
24872
24873 by Sir Arthur Conan Doyle
24874 \end_layout
24875
24876 \begin_layout Plain Layout
24877
24878 \size small
24879 It was in the spring of the year 1894 that all London was interested, and
24880  the fashionable world dismayed, by the murder of the Honourable Ronald
24881  Adair under most unusual and inexplicable circumstances.
24882  The public has already learned those particulars of the crime which came
24883  out in the police investigation, but a good deal was suppressed upon that
24884  occasion, since the case for the prosecution was so overwhelmingly strong
24885  that it was not necessary to bring forward all the facts.
24886  Only now, at the end of nearly ten years, am I allowed to supply those
24887  missing links which make up the whole of that remarkable chain.
24888  The crime was of interest in itself, but that interest was as nothing to
24889  me compared to the inconceivable sequel, which afforded me the greatest
24890  shock and surprise of any event in my adventurous life.
24891  Even now, after this long interval, I find myself thrilling as I think
24892  of it, and feeling once more that sudden flood of joy, amazement, and increduli
24893 ty which utterly submerged my mind.
24894  Let me say to that public, which has shown some interest in those glimpses
24895  which I have occasionally given them of the thoughts and actions of a very
24896  remarkable man, that they are not to blame me if I have not shared my knowledge
24897  with them, for I should have considered it my first duty to do so, had
24898  I not been barred by a positive prohibition from his own lips, which was
24899  only withdrawn upon the third of last month.
24900 \end_layout
24901
24902 \end_inset
24903
24904
24905 \end_layout
24906
24907 \begin_layout Standard
24908 To get 3 or more columns, set the cursor into the multicolumn inset and
24909  use the menu 
24910 \family sans
24911 Insert\SpecialChar menuseparator
24912 Number
24913 \begin_inset space ~
24914 \end_inset
24915
24916 of
24917 \begin_inset space ~
24918 \end_inset
24919
24920 Columns
24921 \family default
24922 .
24923  The number of the desired columns is written into that inset (for 3
24924 \begin_inset space ~
24925 \end_inset
24926
24927 columns write 
24928 \begin_inset Quotes eld
24929 \end_inset
24930
24931 3
24932 \begin_inset Quotes erd
24933 \end_inset
24934
24935 ).
24936 \begin_inset Newline newline
24937 \end_inset
24938
24939 Here is an example with 3
24940 \begin_inset space ~
24941 \end_inset
24942
24943 columns:
24944 \end_layout
24945
24946 \begin_layout Standard
24947 \begin_inset Flex Multiple Columns
24948 status open
24949
24950 \begin_layout Plain Layout
24951
24952 \size footnotesize
24953 \begin_inset Argument 1
24954 status open
24955
24956 \begin_layout Plain Layout
24957 3
24958 \end_layout
24959
24960 \end_inset
24961
24962 It can be imagined that my close intimacy with Sherlock Holmes had interested
24963  me deeply in crime, and that after his disappearance I never failed to
24964  read with care the various problems which came before the public.
24965  And I even attempted, more than once, for my own private satisfaction,
24966  to employ his methods in their solution, though with indifferent success.
24967  There was none, however, which appealed to me like this tragedy of Ronald
24968  Adair.
24969  As I read the evidence at the inquest, which led up to a verdict of willful
24970  murder against some person or persons unknown, I realized more clearly
24971  than I had ever done the loss which the community had sustained by the
24972  death of Sherlock Holmes.
24973  There were points about this strange business which would, I was sure,
24974  have specially appealed to him, and the efforts of the police would have
24975  been supplemented, or more probably anticipated, by the trained observation
24976  and the alert mind of the first criminal agent in Europe.
24977  All day, as I drove upon my round, I turned over the case in my mind and
24978  found no explanation which appeared to me to be adequate.
24979  At the risk of telling a twice-told tale, I will recapitulate the facts
24980  as they were known to the public at the conclusion of the inquest.
24981 \end_layout
24982
24983 \end_inset
24984
24985
24986 \end_layout
24987
24988 \begin_layout Standard
24989 You can have up to 10
24990 \begin_inset space ~
24991 \end_inset
24992
24993 columns if you want to, but that might not be very pleasant for the readers
24994  of your document.
24995 \end_layout
24996
24997 \begin_layout Standard
24998 \begin_inset Newpage newpage
24999 \end_inset
25000
25001
25002 \end_layout
25003
25004 \begin_layout Subsection
25005 Columns inside Columns
25006 \end_layout
25007
25008 \begin_layout Standard
25009 You can also have columns inside columns:
25010 \end_layout
25011
25012 \begin_layout Standard
25013 \begin_inset Flex Multiple Columns
25014 status open
25015
25016 \begin_layout Plain Layout
25017
25018 \size footnotesize
25019 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
25020  at that time governor of one of the Australian colonies.
25021  Adair's mother had returned from Australia to undergo the operation for
25022  cataract, and she, her son Ronald, and her daughter Hilda were living together
25023  at 427 Park Lane.
25024 \end_layout
25025
25026 \begin_layout Plain Layout
25027 \begin_inset Flex Multiple Columns
25028 status open
25029
25030 \begin_layout Plain Layout
25031
25032 \size footnotesize
25033 The youth moved in the best society–had, so far as was known, no enemies
25034  and no particular vices.
25035  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
25036  had been broken off by mutual consent some months before, and there was
25037  no sign that it had left any very profound feeling behind it.
25038  For the rest {sic} the man's life moved in a narrow and conventional circle,
25039  for his habits were quiet and his nature unemotional.
25040  Yet it was upon this easy-going young aristocrat that death came, in most
25041  strange and unexpected form, between the hours of ten and eleven-twenty
25042  on the night of March 30, 1894.
25043 \end_layout
25044
25045 \end_inset
25046
25047
25048 \end_layout
25049
25050 \begin_layout Plain Layout
25051
25052 \size footnotesize
25053 Ronald Adair was fond of cards–playing continually, but never for such stakes
25054  as would hurt him.
25055  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
25056  It was shown that, after dinner on the day of his death, he had played
25057  a rubber of whist at the latter club.
25058  He had also played there in the afternoon.
25059
25060 \size default
25061  
25062 \size footnotesize
25063 The evidence of those who had played with him– Mr.
25064  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
25065  and that there was a fairly equal fall of the cards.
25066  Adair might have lost five pounds, but not more.
25067  His fortune was a considerable one, and such a loss could not in any way
25068  affect him.
25069  He had played nearly every day at one club or other, but he was a cautious
25070  player, and usually rose a winner.
25071  It came out in evidence that, in partnership with Colonel Moran, he had
25072  actually won as much as four hundred and twenty pounds in a sitting, some
25073  weeks before, from Godfrey Milner and Lord Balmoral.
25074  So much for his recent history as it came out at the inquest.
25075 \end_layout
25076
25077 \end_inset
25078
25079
25080 \end_layout
25081
25082 \begin_layout Subsection
25083 Advanced Examples
25084 \end_layout
25085
25086 \begin_layout Standard
25087 The examples in this section show some more special features of multiple
25088  columns.
25089 \end_layout
25090
25091 \begin_layout Standard
25092 For more features of multiple columns, have a look at the documentation
25093  of the \SpecialChar LaTeX
25094 -package 
25095 \series bold
25096 multicol
25097 \series default
25098
25099 \begin_inset CommandInset citation
25100 LatexCommand cite
25101 key "multicol"
25102 literal "true"
25103
25104 \end_inset
25105
25106 .
25107 \end_layout
25108
25109 \begin_layout Subsubsection
25110 Preface
25111 \end_layout
25112
25113 \begin_layout Standard
25114 To add a preface text for multiple columns, set the cursor into the multicolumn
25115  inset and use the menu 
25116 \family sans
25117 Insert\SpecialChar menuseparator
25118 Preface
25119 \family default
25120 .
25121  Write your preface text into that inset.
25122 \begin_inset Newline newline
25123 \end_inset
25124
25125 This is an example with some preface text:
25126 \end_layout
25127
25128 \begin_layout Standard
25129 \begin_inset VSpace bigskip
25130 \end_inset
25131
25132
25133 \end_layout
25134
25135 \begin_layout Standard
25136 \begin_inset Flex Multiple Columns
25137 status open
25138
25139 \begin_layout Plain Layout
25140 \begin_inset Argument 2
25141 status open
25142
25143 \begin_layout Plain Layout
25144 And the story continues and continues and continues and continues\SpecialChar ldots
25145
25146 \end_layout
25147
25148 \end_inset
25149
25150
25151 \size small
25152 On the evening of the crime, he returned from the club exactly at ten.
25153  His mother and sister were out spending the evening with a relation.
25154  The servant deposed that she heard him enter the front room on the second
25155  floor, generally used as his sitting-room.
25156  She had lit a fire there, and as it smoked she had opened the window.
25157  No sound was heard from the room until eleven-twenty, the hour of the return
25158  of Lady Maynooth and her daughter.
25159  Desiring to say good-night, she attempted to enter her son's room.
25160  The door was locked on the inside, and no answer could be got to their
25161  cries and knocking.
25162  Help was obtained, and the door forced.
25163  The unfortunate young man was found lying near the table.
25164  His head had been horribly mutilated by an expanding revolver bullet, but
25165  no weapon of any sort was to be found in the room.
25166 \end_layout
25167
25168 \end_inset
25169
25170
25171 \end_layout
25172
25173 \begin_layout Standard
25174 You can also use a section heading as the preface if you use a section command
25175  as \SpecialChar TeX
25176  Code.
25177  For example the command
25178 \end_layout
25179
25180 \begin_layout Standard
25181
25182 \series bold
25183
25184 \backslash
25185 subsection{subsection title}
25186 \end_layout
25187
25188 \begin_layout Standard
25189 creates a subsection.
25190  In this example the preface is a subsubsection:
25191 \end_layout
25192
25193 \begin_layout Standard
25194 \begin_inset Flex Multiple Columns
25195 status open
25196
25197 \begin_layout Plain Layout
25198 \begin_inset Argument 2
25199 status open
25200
25201 \begin_layout Plain Layout
25202 \begin_inset ERT
25203 status collapsed
25204
25205 \begin_layout Plain Layout
25206
25207
25208 \backslash
25209 subsubsection{
25210 \end_layout
25211
25212 \end_inset
25213
25214 This is a subsubsection heading as a preface
25215 \begin_inset ERT
25216 status collapsed
25217
25218 \begin_layout Plain Layout
25219
25220 }
25221 \end_layout
25222
25223 \end_inset
25224
25225
25226 \end_layout
25227
25228 \end_inset
25229
25230
25231 \size small
25232 A minute examination of the circumstances served only to make the case more
25233  complex.
25234  In the first place, no reason could be given why the young man should have
25235  fastened the door upon the inside.
25236  There was the possibility that the murderer had done this, and had afterwards
25237  escaped by the window.
25238  The drop was at least twenty feet, however, and a bed of crocuses in full
25239  bloom lay beneath.
25240  Neither the flowers nor the earth showed any sign of having been disturbed,
25241  nor were there any marks upon the narrow strip of grass which separated
25242  the house from the road.
25243  Apparently, therefore, it was the young man himself who had fastened the
25244  door.
25245  But how did he come by his death? No one could have climbed up to the window
25246  without leaving traces.
25247  Suppose a man had fired through the window, he would indeed be a remarkable
25248  shot who could with a revolver inflict so deadly a wound.
25249  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
25250  a hundred yards of the house.
25251  No one had heard a shot.
25252 \end_layout
25253
25254 \end_inset
25255
25256
25257 \end_layout
25258
25259 \begin_layout Standard
25260 If there is less vertical space than 6
25261 \begin_inset space ~
25262 \end_inset
25263
25264 text lines is left on the page at the beginning of the multiple columns,
25265  a page break will be inserted before the multiple columns.
25266  Depending on the number of lines of the preface text, you might want to
25267  change this space.
25268  This is done by setting the cursor into the mulitcolumn inset behind the
25269  preface (if there is any) and using the menu 
25270 \family sans
25271 Insert\SpecialChar menuseparator
25272 Space
25273 \begin_inset space ~
25274 \end_inset
25275
25276 Before
25277 \begin_inset space ~
25278 \end_inset
25279
25280 Page
25281 \begin_inset space ~
25282 \end_inset
25283
25284 Break
25285 \family default
25286 .
25287  Insert into that inset the amount of space like e.
25288 \begin_inset space \thinspace{}
25289 \end_inset
25290
25291 g.
25292 \begin_inset space \space{}
25293 \end_inset
25294
25295
25296 \begin_inset Quotes eld
25297 \end_inset
25298
25299 5cm
25300 \begin_inset Quotes erd
25301 \end_inset
25302
25303 .
25304 \begin_inset Newline newline
25305 \end_inset
25306
25307 In this example the space is set to 7
25308 \begin_inset space ~
25309 \end_inset
25310
25311 text lines by using 
25312 \begin_inset Quotes eld
25313 \end_inset
25314
25315 7
25316 \backslash
25317 baselineskip
25318 \begin_inset Quotes erd
25319 \end_inset
25320
25321  (where the command 
25322 \series bold
25323
25324 \backslash
25325 baselineskip
25326 \series default
25327  needs to be inserted as \SpecialChar TeX
25328  code):
25329 \end_layout
25330
25331 \begin_layout Standard
25332 \begin_inset Flex Multiple Columns
25333 status open
25334
25335 \begin_layout Plain Layout
25336 \begin_inset Argument 3
25337 status open
25338
25339 \begin_layout Plain Layout
25340 7
25341 \begin_inset ERT
25342 status collapsed
25343
25344 \begin_layout Plain Layout
25345
25346
25347 \backslash
25348 baselineskip
25349 \end_layout
25350
25351 \end_inset
25352
25353
25354 \end_layout
25355
25356 \end_inset
25357
25358
25359 \size small
25360 On the evening of the crime, he returned from the club exactly at ten.
25361  His mother and sister were out spending the evening with a relation.
25362  The servant deposed that she heard him enter the front room on the second
25363  floor, generally used as his sitting-room.
25364  She had lit a fire there, and as it smoked she had opened the window.
25365  No sound was heard from the room until eleven-twenty, the hour of the return
25366  of Lady Maynooth and her daughter.
25367  Desiring to say good-night, she attempted to enter her son's room.
25368  The door was locked on the inside, and no answer could be got to their
25369  cries and knocking.
25370  Help was obtained, and the door forced.
25371  The unfortunate young man was found lying near the table.
25372  His head had been horribly mutilated by an expanding revolver bullet, but
25373  no weapon of any sort was to be found in the room.
25374 \end_layout
25375
25376 \end_inset
25377
25378
25379 \end_layout
25380
25381 \begin_layout Subsubsection
25382 Surrounding Space
25383 \end_layout
25384
25385 \begin_layout Standard
25386 The amount of space before and after multiple columns can be changed by
25387  changing the length 
25388 \series bold
25389
25390 \backslash
25391 multicolsep
25392 \series default
25393 .
25394  For example the command
25395 \end_layout
25396
25397 \begin_layout Standard
25398
25399 \series bold
25400
25401 \backslash
25402 setlength{
25403 \backslash
25404 multicolsep}{3cm}
25405 \end_layout
25406
25407 \begin_layout Standard
25408 in \SpecialChar TeX
25409  Code changes its value to 3
25410 \begin_inset space \thinspace{}
25411 \end_inset
25412
25413 cm.
25414  The change must be made before the multiple columns' start.
25415  The predefined value is 13
25416 \begin_inset space \thinspace{}
25417 \end_inset
25418
25419 pt.
25420 \end_layout
25421
25422 \begin_layout Standard
25423 For this example 
25424 \series bold
25425
25426 \backslash
25427 multicolsep
25428 \series default
25429  was set to 2.5
25430 \begin_inset space \thinspace{}
25431 \end_inset
25432
25433 cm:
25434 \end_layout
25435
25436 \begin_layout Standard
25437 \begin_inset ERT
25438 status open
25439
25440 \begin_layout Plain Layout
25441
25442
25443 \backslash
25444 setlength{
25445 \backslash
25446 multicolsep}{2.5cm}
25447 \end_layout
25448
25449 \end_inset
25450
25451
25452 \end_layout
25453
25454 \begin_layout Standard
25455 \begin_inset Flex Multiple Columns
25456 status open
25457
25458 \begin_layout Plain Layout
25459
25460 \size small
25461 All day I turned these facts over in my mind, endeavouring to hit upon some
25462  theory which could reconcile them all, and to find that line of least resistanc
25463 e which my poor friend had declared to be the starting-point of every investigat
25464 ion.
25465  I confess that I made little progress.
25466  In the evening I strolled across the Park, and found myself about six o'clock
25467  at the Oxford Street end of Park Lane.
25468  A group of loafers upon the pavements, all staring up at a particular window,
25469  directed me to the house which I had come to see.
25470  A tall, thin man with coloured glasses, whom I strongly suspected of being
25471  a plain-clothes detective, was pointing out some theory of his own, while
25472  the others crowded round to listen to what he said.
25473  I got as near him as I could, but his observations seemed to me to be absurd,
25474  so I withdrew again in some disgust.
25475  As I did so I struck against an elderly, deformed man, who had been behind
25476  me, and I knocked down several books which he was carrying.
25477 \end_layout
25478
25479 \end_inset
25480
25481
25482 \end_layout
25483
25484 \begin_layout Standard
25485 \begin_inset Note Greyedout
25486 status open
25487
25488 \begin_layout Plain Layout
25489
25490 \series bold
25491 Note:
25492 \series default
25493  The values you set with 
25494 \series bold
25495
25496 \backslash
25497 setlength
25498 \series default
25499  will be used for all following multiple columns until you change them again.
25500 \end_layout
25501
25502 \end_inset
25503
25504
25505 \end_layout
25506
25507 \begin_layout Standard
25508 \begin_inset ERT
25509 status collapsed
25510
25511 \begin_layout Plain Layout
25512
25513
25514 \backslash
25515 setlength{
25516 \backslash
25517 multicolsep}{13pt}
25518 \end_layout
25519
25520 \end_inset
25521
25522
25523 \begin_inset Note Note
25524 status collapsed
25525
25526 \begin_layout Plain Layout
25527 go back to the default
25528 \end_layout
25529
25530 \end_inset
25531
25532
25533 \end_layout
25534
25535 \begin_layout Standard
25536 \begin_inset Newpage newpage
25537 \end_inset
25538
25539
25540 \end_layout
25541
25542 \begin_layout Subsubsection
25543 Column Breaks
25544 \end_layout
25545
25546 \begin_layout Standard
25547 A column break can be forced by inserting the command 
25548 \series bold
25549
25550 \backslash
25551 columnbreak{}
25552 \series default
25553  as \SpecialChar TeX
25554  Code to that position in the text where the column should be broken.
25555  Note that this leads in most cases to whitespace in the text.
25556 \begin_inset Newline newline
25557 \end_inset
25558
25559 Here is an example:
25560 \end_layout
25561
25562 \begin_layout Standard
25563 \begin_inset Flex Multiple Columns
25564 status open
25565
25566 \begin_layout Plain Layout
25567
25568 \size small
25569 \begin_inset Quotes eld
25570 \end_inset
25571
25572 You're surprised to see me, sir,
25573 \begin_inset Quotes erd
25574 \end_inset
25575
25576  said he, in a strange, croaking voice.
25577 \end_layout
25578
25579 \begin_layout Plain Layout
25580
25581 \size small
25582 I acknowledged that I was.
25583 \end_layout
25584
25585 \begin_layout Plain Layout
25586
25587 \size small
25588 \begin_inset Quotes eld
25589 \end_inset
25590
25591 Well, I've a conscience, sir, and when I chanced to see you go into this
25592  house, as I came hobbling after you, I thought to myself, I'll just step
25593  in and see that kind gentleman, and tell him that if I was a bit gruff
25594  in my manner there was not any harm meant, and that I am much obliged to
25595  him for picking up my books.
25596 \begin_inset Quotes erd
25597 \end_inset
25598
25599
25600 \end_layout
25601
25602 \begin_layout Plain Layout
25603
25604 \size small
25605 \begin_inset Quotes eld
25606 \end_inset
25607
25608 You make too much of a trifle,
25609 \begin_inset Quotes erd
25610 \end_inset
25611
25612  said I.
25613  
25614 \begin_inset Quotes eld
25615 \end_inset
25616
25617 May I ask how you knew who I was?
25618 \begin_inset Quotes erd
25619 \end_inset
25620
25621  AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED.
25622 \begin_inset ERT
25623 status collapsed
25624
25625 \begin_layout Plain Layout
25626
25627
25628 \backslash
25629 columnbreak{}
25630 \end_layout
25631
25632 \end_inset
25633
25634
25635 \end_layout
25636
25637 \begin_layout Plain Layout
25638
25639 \size small
25640 \begin_inset Quotes eld
25641 \end_inset
25642
25643 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
25644  you'll find my little bookshop at the corner of Church Street, and very
25645  happy to see you, I am sure.
25646  Maybe you collect yourself, sir.
25647  Here's 
25648 \noun on
25649 British
25650 \begin_inset space ~
25651 \end_inset
25652
25653 Birds
25654 \noun default
25655 , and 
25656 \noun on
25657 Catullus
25658 \noun default
25659 , and 
25660 \noun on
25661 The Holy War
25662 \noun default
25663 –a bargain, every one of them.
25664  With five volumes you could just fill that gap on that second shelf.
25665  It looks untidy, does it not, sir?
25666 \begin_inset Quotes erd
25667 \end_inset
25668
25669
25670 \end_layout
25671
25672 \end_inset
25673
25674
25675 \end_layout
25676
25677 \begin_layout Subsubsection
25678 Column Separation
25679 \end_layout
25680
25681 \begin_layout Standard
25682 The width of the columns is automatically calculated, but you can modify
25683  the space between the columns.
25684  This is done by changing the length 
25685 \series bold
25686
25687 \backslash
25688 columnsep
25689 \series default
25690 .
25691  Its predefined value is 10
25692 \begin_inset space \thinspace{}
25693 \end_inset
25694
25695 pt.
25696  Here is an example where 
25697 \series bold
25698
25699 \backslash
25700 columnsep
25701 \series default
25702  is set to 3
25703 \begin_inset space \thinspace{}
25704 \end_inset
25705
25706 cm:
25707 \end_layout
25708
25709 \begin_layout Standard
25710 \begin_inset ERT
25711 status open
25712
25713 \begin_layout Plain Layout
25714
25715
25716 \backslash
25717 setlength{
25718 \backslash
25719 columnsep}{3cm}
25720 \end_layout
25721
25722 \end_inset
25723
25724
25725 \end_layout
25726
25727 \begin_layout Standard
25728 \begin_inset Flex Multiple Columns
25729 status open
25730
25731 \begin_layout Plain Layout
25732
25733 \size small
25734 My observations of No.
25735 \begin_inset space \space{}
25736 \end_inset
25737
25738 427 Park Lane did little to clear up the problem in which I was interested.
25739  The house was separated from the street by a low wall and railing, the
25740  whole not more than five feet high.
25741  It was perfectly easy, therefore, for anyone to get into the garden, but
25742  the window was entirely inaccessible, since there was no water pipe or
25743  anything which could help the most active man to climb it.
25744  More puzzled than ever, I retraced my steps to Kensington.
25745  I had not been in my study five minutes when the maid entered to say that
25746  a person desired to see me.
25747  To my astonishment it was none other than my strange old book collector,
25748  his sharp, wizened face peering out from a frame of white hair, and his
25749  precious volumes, a dozen of them at least, wedged under his right arm.
25750 \end_layout
25751
25752 \end_inset
25753
25754
25755 \end_layout
25756
25757 \begin_layout Standard
25758 \begin_inset ERT
25759 status collapsed
25760
25761 \begin_layout Plain Layout
25762
25763
25764 \backslash
25765 setlength{
25766 \backslash
25767 columnsep}{10pt}
25768 \end_layout
25769
25770 \end_inset
25771
25772
25773 \begin_inset Note Note
25774 status collapsed
25775
25776 \begin_layout Plain Layout
25777 go back to the default
25778 \end_layout
25779
25780 \end_inset
25781
25782
25783 \end_layout
25784
25785 \begin_layout Subsubsection
25786 Vertical Lines
25787 \end_layout
25788
25789 \begin_layout Standard
25790 Between the columns a rule with a width of the length 
25791 \series bold
25792
25793 \backslash
25794 columnseprule
25795 \series default
25796  is placed.
25797  If this rule width is set to 0
25798 \begin_inset space \thinspace{}
25799 \end_inset
25800
25801 pt (this is the default), the rule is suppressed.
25802  In the following example the rule is 2
25803 \begin_inset space \thinspace{}
25804 \end_inset
25805
25806 pt wide:
25807 \end_layout
25808
25809 \begin_layout Standard
25810 \begin_inset ERT
25811 status open
25812
25813 \begin_layout Plain Layout
25814
25815
25816 \backslash
25817 setlength{
25818 \backslash
25819 columnseprule}{2pt}
25820 \end_layout
25821
25822 \end_inset
25823
25824
25825 \end_layout
25826
25827 \begin_layout Standard
25828 \begin_inset Flex Multiple Columns
25829 status open
25830
25831 \begin_layout Plain Layout
25832
25833 \size small
25834 \begin_inset Quotes eld
25835 \end_inset
25836
25837 You're surprised to see me, sir,
25838 \begin_inset Quotes erd
25839 \end_inset
25840
25841  said he, in a strange, croaking voice.
25842 \end_layout
25843
25844 \begin_layout Plain Layout
25845
25846 \size small
25847 I acknowledged that I was.
25848 \end_layout
25849
25850 \begin_layout Plain Layout
25851
25852 \size small
25853 \begin_inset Quotes eld
25854 \end_inset
25855
25856 Well, I've a conscience, sir, and when I chanced to see you go into this
25857  house, as I came hobbling after you, I thought to myself, I'll just step
25858  in and see that kind gentleman, and tell him that if I was a bit gruff
25859  in my manner there was not any harm meant, and that I am much obliged to
25860  him for picking up my books.
25861 \begin_inset Quotes erd
25862 \end_inset
25863
25864
25865 \end_layout
25866
25867 \begin_layout Plain Layout
25868
25869 \size small
25870 \begin_inset Quotes eld
25871 \end_inset
25872
25873 You make too much of a trifle,
25874 \begin_inset Quotes erd
25875 \end_inset
25876
25877  said I.
25878  
25879 \begin_inset Quotes eld
25880 \end_inset
25881
25882 May I ask how you knew who I was?
25883 \begin_inset Quotes erd
25884 \end_inset
25885
25886
25887 \end_layout
25888
25889 \begin_layout Plain Layout
25890
25891 \size small
25892 \begin_inset Quotes eld
25893 \end_inset
25894
25895 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
25896  you'll find my little bookshop at the corner of Church Street, and very
25897  happy to see you, I am sure.
25898  Maybe you collect yourself, sir.
25899  Here's 
25900 \noun on
25901 British
25902 \begin_inset space ~
25903 \end_inset
25904
25905 Birds
25906 \noun default
25907 , and 
25908 \noun on
25909 Catullus
25910 \noun default
25911 , and 
25912 \noun on
25913 The Holy War
25914 \noun default
25915 –a bargain, every one of them.
25916  With five volumes you could just fill that gap on that second shelf.
25917  It looks untidy, does it not, sir?
25918 \begin_inset Quotes erd
25919 \end_inset
25920
25921
25922 \end_layout
25923
25924 \end_inset
25925
25926
25927 \end_layout
25928
25929 \begin_layout Standard
25930 \begin_inset VSpace defskip
25931 \end_inset
25932
25933
25934 \end_layout
25935
25936 \begin_layout Standard
25937 The rule can be colored by redefining the command 
25938 \series bold
25939
25940 \backslash
25941 columnseprulecolor
25942 \series default
25943 .
25944  This is done by inserting the command
25945 \begin_inset Newline newline
25946 \end_inset
25947
25948
25949 \series bold
25950
25951 \backslash
25952 renewcommand{
25953 \backslash
25954 columnseprulecolor}{
25955 \backslash
25956 color{red}}
25957 \series default
25958
25959 \begin_inset Newline newline
25960 \end_inset
25961
25962 as \SpecialChar TeX
25963  Code before the multicolumn inset.
25964  Replace 
25965 \series bold
25966 red
25967 \series default
25968  in this command by a color of your choice.
25969  You can use all pre- and self-defined colors.
25970  See the 
25971 \emph on
25972 EmbeddedObjects
25973 \emph default
25974  manual, section 
25975 \emph on
25976 Colored
25977 \begin_inset space ~
25978 \end_inset
25979
25980 Tables
25981 \emph default
25982  for more information about pre- and self-defined colors.
25983  To go back to the default color insert the command
25984 \begin_inset Newline newline
25985 \end_inset
25986
25987
25988 \series bold
25989
25990 \backslash
25991 renewcommand{
25992 \backslash
25993 columnseprulecolor}{
25994 \backslash
25995 normalcolor}
25996 \series default
25997
25998 \begin_inset Newline newline
25999 \end_inset
26000
26001 Here is the example with a cyan rule and 1
26002 \begin_inset space \thinspace{}
26003 \end_inset
26004
26005 cm column separation:
26006 \end_layout
26007
26008 \begin_layout Standard
26009 \begin_inset ERT
26010 status open
26011
26012 \begin_layout Plain Layout
26013
26014
26015 \backslash
26016 setlength{
26017 \backslash
26018 columnsep}{1cm}
26019 \end_layout
26020
26021 \begin_layout Plain Layout
26022
26023
26024 \backslash
26025 renewcommand{
26026 \backslash
26027 columnseprulecolor}{
26028 \backslash
26029 color{cyan}}
26030 \end_layout
26031
26032 \end_inset
26033
26034
26035 \end_layout
26036
26037 \begin_layout Standard
26038 \begin_inset Flex Multiple Columns
26039 status open
26040
26041 \begin_layout Plain Layout
26042
26043 \size small
26044 \begin_inset Quotes eld
26045 \end_inset
26046
26047 You're surprised to see me, sir,
26048 \begin_inset Quotes erd
26049 \end_inset
26050
26051  said he, in a strange, croaking voice.
26052 \end_layout
26053
26054 \begin_layout Plain Layout
26055
26056 \size small
26057 I acknowledged that I was.
26058 \end_layout
26059
26060 \begin_layout Plain Layout
26061
26062 \size small
26063 \begin_inset Quotes eld
26064 \end_inset
26065
26066 Well, I've a conscience, sir, and when I chanced to see you go into this
26067  house, as I came hobbling after you, I thought to myself, I'll just step
26068  in and see that kind gentleman, and tell him that if I was a bit gruff
26069  in my manner there was not any harm meant, and that I am much obliged to
26070  him for picking up my books.
26071 \begin_inset Quotes erd
26072 \end_inset
26073
26074
26075 \end_layout
26076
26077 \begin_layout Plain Layout
26078
26079 \size small
26080 \begin_inset Quotes eld
26081 \end_inset
26082
26083 You make too much of a trifle,
26084 \begin_inset Quotes erd
26085 \end_inset
26086
26087  said I.
26088  
26089 \begin_inset Quotes eld
26090 \end_inset
26091
26092 May I ask how you knew who I was?
26093 \begin_inset Quotes erd
26094 \end_inset
26095
26096
26097 \end_layout
26098
26099 \begin_layout Plain Layout
26100
26101 \size small
26102 \begin_inset Quotes eld
26103 \end_inset
26104
26105 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
26106  you'll find my little bookshop at the corner of Church Street, and very
26107  happy to see you, I am sure.
26108  Maybe you collect yourself, sir.
26109  Here's 
26110 \noun on
26111 British
26112 \begin_inset space ~
26113 \end_inset
26114
26115 Birds
26116 \noun default
26117 , and 
26118 \noun on
26119 Catullus
26120 \noun default
26121 , and 
26122 \noun on
26123 The Holy War
26124 \noun default
26125 –a bargain, every one of them.
26126  With five volumes you could just fill that gap on that second shelf.
26127  It looks untidy, does it not, sir?
26128 \begin_inset Quotes erd
26129 \end_inset
26130
26131
26132 \end_layout
26133
26134 \end_inset
26135
26136
26137 \end_layout
26138
26139 \begin_layout Standard
26140 \begin_inset ERT
26141 status collapsed
26142
26143 \begin_layout Plain Layout
26144
26145
26146 \backslash
26147 setlength{
26148 \backslash
26149 columnseprule}{0pt}
26150 \end_layout
26151
26152 \begin_layout Plain Layout
26153
26154
26155 \backslash
26156 renewcommand{
26157 \backslash
26158 columnseprulecolor}{
26159 \backslash
26160 normalcolor}
26161 \end_layout
26162
26163 \end_inset
26164
26165
26166 \begin_inset Note Note
26167 status collapsed
26168
26169 \begin_layout Plain Layout
26170 go back to the default
26171 \end_layout
26172
26173 \end_inset
26174
26175
26176 \end_layout
26177
26178 \begin_layout Section
26179 Non-standard Paragraph Shapes
26180 \end_layout
26181
26182 \begin_layout Standard
26183 \noindent
26184 \SpecialChar LaTeX
26185  as well as any other text processor uses by default rectangular paragraphs.
26186  For special cases like for example posters, invitation cards or poems you
26187  can modify the paragraph shape to one of your choice.
26188  This can be done by using the \SpecialChar LaTeX
26189 -package 
26190 \series bold
26191 shapepar
26192 \series default
26193  which is loaded by using in the document settings the module 
26194 \family sans
26195 Custom paragraph shapes
26196 \family default
26197 .
26198 \end_layout
26199
26200 \begin_layout Subsection
26201 Predefined shapes
26202 \end_layout
26203
26204 \begin_layout Standard
26205
26206 \series bold
26207 shapepar
26208 \series default
26209  provides the following shapes:
26210 \end_layout
26211
26212 \begin_layout Standard
26213 \begin_inset Tabular
26214 <lyxtabular version="3" rows="13" columns="3">
26215 <features booktabs="true" islongtable="true" longtabularalignment="center">
26216 <column alignment="center" valignment="middle" width="16col%">
26217 <column alignment="center" valignment="middle" width="40col%">
26218 <column alignment="center" valignment="middle" width="35col%">
26219 <row endhead="true">
26220 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
26221 \begin_inset Text
26222
26223 \begin_layout Plain Layout
26224 Name
26225 \end_layout
26226
26227 \end_inset
26228 </cell>
26229 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
26230 \begin_inset Text
26231
26232 \begin_layout Plain Layout
26233 Description
26234 \end_layout
26235
26236 \end_inset
26237 </cell>
26238 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
26239 \begin_inset Text
26240
26241 \begin_layout Plain Layout
26242 Annotation
26243 \end_layout
26244
26245 \end_inset
26246 </cell>
26247 </row>
26248 <row>
26249 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26250 \begin_inset Text
26251
26252 \begin_layout Plain Layout
26253 CDlabel
26254 \end_layout
26255
26256 \end_inset
26257 </cell>
26258 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26259 \begin_inset Text
26260
26261 \begin_layout Plain Layout
26262 Circle with circular hole (in the size of a CD/DVD)
26263 \end_layout
26264
26265 \end_inset
26266 </cell>
26267 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26268 \begin_inset Text
26269
26270 \begin_layout Plain Layout
26271 Cannot be scaled, take care there is not too much text
26272 \end_layout
26273
26274 \end_inset
26275 </cell>
26276 </row>
26277 <row>
26278 <cell alignment="center" valignment="top" topline="true" usebox="none">
26279 \begin_inset Text
26280
26281 \begin_layout Plain Layout
26282 Circle
26283 \end_layout
26284
26285 \end_inset
26286 </cell>
26287 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26288 \begin_inset Text
26289
26290 \begin_layout Plain Layout
26291 Circle
26292 \end_layout
26293
26294 \end_inset
26295 </cell>
26296 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26297 \begin_inset Text
26298
26299 \begin_layout Plain Layout
26300 Fragile, calculation might fail
26301 \end_layout
26302
26303 \end_inset
26304 </cell>
26305 </row>
26306 <row>
26307 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26308 \begin_inset Text
26309
26310 \begin_layout Plain Layout
26311 Diamond
26312 \end_layout
26313
26314 \end_inset
26315 </cell>
26316 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26317 \begin_inset Text
26318
26319 \begin_layout Plain Layout
26320 Rhomboid (symbolizing a 
26321 \begin_inset Quotes eld
26322 \end_inset
26323
26324 diamond
26325 \begin_inset Quotes erd
26326 \end_inset
26327
26328 )
26329 \end_layout
26330
26331 \end_inset
26332 </cell>
26333 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26334 \begin_inset Text
26335
26336 \begin_layout Plain Layout
26337 -
26338 \end_layout
26339
26340 \end_inset
26341 </cell>
26342 </row>
26343 <row>
26344 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26345 \begin_inset Text
26346
26347 \begin_layout Plain Layout
26348 Heart
26349 \end_layout
26350
26351 \end_inset
26352 </cell>
26353 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26354 \begin_inset Text
26355
26356 \begin_layout Plain Layout
26357 Heart-like shape
26358 \end_layout
26359
26360 \end_inset
26361 </cell>
26362 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26363 \begin_inset Text
26364
26365 \begin_layout Plain Layout
26366 -
26367 \end_layout
26368
26369 \end_inset
26370 </cell>
26371 </row>
26372 <row>
26373 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26374 \begin_inset Text
26375
26376 \begin_layout Plain Layout
26377 Hexagon
26378 \end_layout
26379
26380 \end_inset
26381 </cell>
26382 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26383 \begin_inset Text
26384
26385 \begin_layout Plain Layout
26386 Hexagon
26387 \end_layout
26388
26389 \end_inset
26390 </cell>
26391 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26392 \begin_inset Text
26393
26394 \begin_layout Plain Layout
26395 -
26396 \end_layout
26397
26398 \end_inset
26399 </cell>
26400 </row>
26401 <row>
26402 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26403 \begin_inset Text
26404
26405 \begin_layout Plain Layout
26406 Nut
26407 \end_layout
26408
26409 \end_inset
26410 </cell>
26411 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26412 \begin_inset Text
26413
26414 \begin_layout Plain Layout
26415 Nut for bolt (hexagon with circular hole)
26416 \end_layout
26417
26418 \end_inset
26419 </cell>
26420 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26421 \begin_inset Text
26422
26423 \begin_layout Plain Layout
26424 -
26425 \end_layout
26426
26427 \end_inset
26428 </cell>
26429 </row>
26430 <row>
26431 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26432 \begin_inset Text
26433
26434 \begin_layout Plain Layout
26435 Square
26436 \end_layout
26437
26438 \end_inset
26439 </cell>
26440 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26441 \begin_inset Text
26442
26443 \begin_layout Plain Layout
26444 Square
26445 \end_layout
26446
26447 \end_inset
26448 </cell>
26449 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26450 \begin_inset Text
26451
26452 \begin_layout Plain Layout
26453 -
26454 \end_layout
26455
26456 \end_inset
26457 </cell>
26458 </row>
26459 <row>
26460 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
26461 \begin_inset Text
26462
26463 \begin_layout Plain Layout
26464 Star
26465 \end_layout
26466
26467 \end_inset
26468 </cell>
26469 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
26470 \begin_inset Text
26471
26472 \begin_layout Plain Layout
26473 Five-point star
26474 \end_layout
26475
26476 \end_inset
26477 </cell>
26478 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
26479 \begin_inset Text
26480
26481 \begin_layout Plain Layout
26482 -
26483 \end_layout
26484
26485 \end_inset
26486 </cell>
26487 </row>
26488 <row>
26489 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26490 \begin_inset Text
26491
26492 \begin_layout Plain Layout
26493 Candle
26494 \end_layout
26495
26496 \end_inset
26497 </cell>
26498 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26499 \begin_inset Text
26500
26501 \begin_layout Plain Layout
26502 Burning candle
26503 \end_layout
26504
26505 \end_inset
26506 </cell>
26507 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26508 \begin_inset Text
26509
26510 \begin_layout Plain Layout
26511 -
26512 \end_layout
26513
26514 \end_inset
26515 </cell>
26516 </row>
26517 <row>
26518 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26519 \begin_inset Text
26520
26521 \begin_layout Plain Layout
26522 Drop down/up
26523 \end_layout
26524
26525 \end_inset
26526 </cell>
26527 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26528 \begin_inset Text
26529
26530 \begin_layout Plain Layout
26531 Normal/reversed rain drop
26532 \end_layout
26533
26534 \end_inset
26535 </cell>
26536 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26537 \begin_inset Text
26538
26539 \begin_layout Plain Layout
26540 Fragile, calculation might fail
26541 \end_layout
26542
26543 \end_inset
26544 </cell>
26545 </row>
26546 <row>
26547 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26548 \begin_inset Text
26549
26550 \begin_layout Plain Layout
26551 \SpecialChar TeX
26552
26553 \end_layout
26554
26555 \end_inset
26556 </cell>
26557 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
26558 \begin_inset Text
26559
26560 \begin_layout Plain Layout
26561 The \SpecialChar TeX
26562  logo
26563 \end_layout
26564
26565 \end_inset
26566 </cell>
26567 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
26568 \begin_inset Text
26569
26570 \begin_layout Plain Layout
26571 -
26572 \end_layout
26573
26574 \end_inset
26575 </cell>
26576 </row>
26577 <row>
26578 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
26579 \begin_inset Text
26580
26581 \begin_layout Plain Layout
26582 Triangle up/down/
26583 \begin_inset Newline newline
26584 \end_inset
26585
26586 left/right
26587 \end_layout
26588
26589 \end_inset
26590 </cell>
26591 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
26592 \begin_inset Text
26593
26594 \begin_layout Plain Layout
26595 Triangles in different orientations
26596 \end_layout
26597
26598 \end_inset
26599 </cell>
26600 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
26601 \begin_inset Text
26602
26603 \begin_layout Plain Layout
26604 -
26605 \end_layout
26606
26607 \end_inset
26608 </cell>
26609 </row>
26610 </lyxtabular>
26611
26612 \end_inset
26613
26614
26615 \end_layout
26616
26617 \begin_layout Standard
26618 To use a shape for your paragraph, simply select it in \SpecialChar LyX
26619 's pull-down box
26620  for environments in the toolbar.
26621 \end_layout
26622
26623 \begin_layout Standard
26624 \begin_inset Newpage newpage
26625 \end_inset
26626
26627
26628 \end_layout
26629
26630 \begin_layout Standard
26631 Here is an example paragraph in the shape of a nut:
26632 \end_layout
26633
26634 \begin_layout Standard
26635 \begin_inset VSpace bigskip
26636 \end_inset
26637
26638
26639 \end_layout
26640
26641 \begin_layout Nut
26642
26643 \lang latin
26644 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26645  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26646  voluptua.
26647  At vero eos et accusam et justo duo dolores et ea rebum.
26648  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26649  sit amet.
26650  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26651  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26652  voluptua.
26653 \end_layout
26654
26655 \begin_layout Standard
26656 \begin_inset VSpace bigskip
26657 \end_inset
26658
26659
26660 \end_layout
26661
26662 \begin_layout Standard
26663 \begin_inset Note Greyedout
26664 status open
26665
26666 \begin_layout Plain Layout
26667
26668 \series bold
26669 Note
26670 \series default
26671 : shapepar paragraphs cannot run over a page break.
26672 \end_layout
26673
26674 \end_inset
26675
26676
26677 \end_layout
26678
26679 \begin_layout Standard
26680 \begin_inset VSpace bigskip
26681 \end_inset
26682
26683
26684 \end_layout
26685
26686 \begin_layout Standard
26687
26688 \series bold
26689 shapepar
26690 \series default
26691  takes care that the shape will always be preserved, no matter how much
26692  text is in the paragraph.
26693  Therefore the paragraph size changes with the amount of contained text.
26694  This can lead to paragraph sizes exceeding the page margins.
26695  To demonstrate the size scaling, here is the same example paragraph but
26696  with twice as much text:
26697 \end_layout
26698
26699 \begin_layout Standard
26700 \begin_inset Newpage newpage
26701 \end_inset
26702
26703
26704 \end_layout
26705
26706 \begin_layout Nut
26707
26708 \lang latin
26709 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26710  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26711  voluptua.
26712  At vero eos et accusam et justo duo dolores et ea rebum.
26713  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26714  sit amet.
26715  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26716  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26717  voluptua.
26718  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26719  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26720  voluptua.
26721  At vero eos et accusam et justo duo dolores et ea rebum.
26722  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26723  sit amet.
26724  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26725  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26726  voluptua.
26727 \end_layout
26728
26729 \begin_layout Standard
26730 \begin_inset VSpace bigskip
26731 \end_inset
26732
26733
26734 \end_layout
26735
26736 \begin_layout Standard
26737 An exception is the shape 
26738 \family sans
26739 CDlabel
26740 \family default
26741 .
26742  It cannot be scaled because it must fit the size of a CD/DVD.
26743  Therefore the amount of text that fits into the shape is limited.
26744 \begin_inset Newline newline
26745 \end_inset
26746
26747 The 
26748 \family sans
26749 drop
26750 \family default
26751  shapes and the 
26752 \family sans
26753 circle
26754 \family default
26755  shape are fragile, meaning that the calculation of their size can fail,
26756  depending on the amount of text.
26757  You will then get the \SpecialChar LaTeX
26758  error 
26759 \begin_inset Quotes eld
26760 \end_inset
26761
26762 Arithmetic overflow
26763 \begin_inset Quotes erd
26764 \end_inset
26765
26766 .
26767  In this case one can try to remove or add some text; if nothing works one
26768  has to use another shape.
26769 \end_layout
26770
26771 \begin_layout Standard
26772 \begin_inset VSpace bigskip
26773 \end_inset
26774
26775
26776 \end_layout
26777
26778 \begin_layout Standard
26779 For shapes with tips you will maybe see that \SpecialChar LaTeX
26780 's hyphenation routine fails
26781  for text in the tips.
26782  Therefore it is often necessary to add hyphenation points 
26783 \family sans
26784 (
26785 \begin_inset Info
26786 type  "shortcut"
26787 arg   "specialchar-insert hyphenation"
26788 \end_inset
26789
26790
26791 \family default
26792 ) to the corresponding text parts.
26793 \end_layout
26794
26795 \begin_layout Standard
26796 \begin_inset VSpace bigskip
26797 \end_inset
26798
26799
26800 \end_layout
26801
26802 \begin_layout Standard
26803 Shapepar paragraphs are either always centered or placed on the page so
26804  that their left border touches the left page margin.
26805  You can therefore not use the paragraph dialog to align such paragraphs.
26806  A solution is to put the paragraph into a minipage or parbox and align
26807  the box.
26808  The problem is hereby to find the right width for the box.
26809  Because if it is too wide and you center the box, the paragraph is not
26810  centered too because it sticks at the left side of the box.
26811  So you might have to play a bit with the width until it fits.
26812  Here are two heart-shaped paragraphs, the first one is not aligned, the
26813  second one is right-aligned:
26814 \end_layout
26815
26816 \begin_layout Standard
26817 \begin_inset Newpage newpage
26818 \end_inset
26819
26820
26821 \end_layout
26822
26823 \begin_layout Heart
26824 \noindent
26825
26826 \lang latin
26827 Lo\SpecialChar softhyphen
26828 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26829  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26830  voluptua.
26831  At vero eos et accusam et justo duo dolores et ea rebum.
26832  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26833  sit amet.
26834 \end_layout
26835
26836 \begin_layout Standard
26837 \begin_inset VSpace bigskip
26838 \end_inset
26839
26840
26841 \end_layout
26842
26843 \begin_layout Standard
26844 \noindent
26845 \align right
26846 \begin_inset Box Frameless
26847 position "t"
26848 hor_pos "c"
26849 has_inner_box 1
26850 inner_pos "t"
26851 use_parbox 1
26852 use_makebox 0
26853 width "42col%"
26854 special "none"
26855 height "1in"
26856 height_special "totalheight"
26857 thickness "0.4pt"
26858 separation "3pt"
26859 shadowsize "4pt"
26860 framecolor "black"
26861 backgroundcolor "none"
26862 status open
26863
26864 \begin_layout Heart
26865 \noindent
26866
26867 \lang latin
26868 Lo\SpecialChar softhyphen
26869 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26870  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26871  voluptua.
26872  At vero eos et accusam et justo duo dolores et ea rebum.
26873  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26874  sit amet.
26875 \end_layout
26876
26877 \end_inset
26878
26879
26880 \end_layout
26881
26882 \begin_layout Subsection
26883 Custom shapes
26884 \end_layout
26885
26886 \begin_layout Standard
26887 You can define any shape you want.
26888  Doing this manually is a lot of work because every coordinate must be specified.
26889  But there is a way to let the computer calculate the coordinates:
26890 \end_layout
26891
26892 \begin_layout Enumerate
26893 Install the program 
26894 \begin_inset CommandInset href
26895 LatexCommand href
26896 name "Jpgfdraw"
26897 target "http://www.ctan.org/tex-archive/graphics/jpgfdraw"
26898 literal "false"
26899
26900 \end_inset
26901
26902 .
26903 \end_layout
26904
26905 \begin_layout Enumerate
26906 In 
26907 \family sans
26908 Jpgfdraw
26909 \family default
26910  go to the menu 
26911 \family sans
26912 TeX/LaTeX\SpecialChar menuseparator
26913 Settings\SpecialChar menuseparator
26914 Set Normal Size
26915 \family default
26916  and select the font size you are using in your document.
26917  For example this document uses the size 12
26918 \begin_inset space \thinspace{}
26919 \end_inset
26920
26921 pt.
26922 \end_layout
26923
26924 \begin_layout Enumerate
26925 Draw a shape.
26926 \end_layout
26927
26928 \begin_layout Enumerate
26929 Use the menu 
26930 \family sans
26931 TeX/LaTeX\SpecialChar menuseparator
26932 Shapepar
26933 \family default
26934  to export the shape to coordinates.
26935  In the appearing dialog use either the outline of your shape for the coordinate
26936 s or the path itself.
26937 \begin_inset Foot
26938 status collapsed
26939
26940 \begin_layout Plain Layout
26941 For more information see 
26942 \begin_inset CommandInset href
26943 LatexCommand href
26944 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
26945 literal "false"
26946
26947 \end_inset
26948
26949
26950 \end_layout
26951
26952 \end_inset
26953
26954
26955 \end_layout
26956
26957 \begin_layout Standard
26958 The coordinates are written into a \SpecialChar TeX
26959  file.
26960  To use it for your \SpecialChar LyX
26961  document
26962 \end_layout
26963
26964 \begin_layout Enumerate
26965 Place the cursor before the first character of your paragraph (or into a
26966  new empty one).
26967 \end_layout
26968
26969 \begin_layout Enumerate
26970 Open in \SpecialChar LyX
26971  the menu 
26972 \family sans
26973 Insert\SpecialChar menuseparator
26974 File\SpecialChar menuseparator
26975 Child
26976 \begin_inset space ~
26977 \end_inset
26978
26979 Document
26980 \family default
26981 , select the file and use 
26982 \family sans
26983 Input
26984 \family default
26985  as 
26986 \family sans
26987 Include Type.
26988 \end_layout
26989
26990 \begin_layout Standard
26991 \begin_inset VSpace defskip
26992 \end_inset
26993
26994
26995 \end_layout
26996
26997 \begin_layout Standard
26998 \begin_inset Note Greyedout
26999 status open
27000
27001 \begin_layout Plain Layout
27002
27003 \series bold
27004 Note
27005 \series default
27006 : The changed shape only applies to the current paragraph; everything is
27007  reset to normal for the next paragraph.
27008  Therefore the shape definition file must be input into every paragraph
27009  with the desired shape.
27010 \end_layout
27011
27012 \end_inset
27013
27014
27015 \end_layout
27016
27017 \begin_layout Standard
27018 \begin_inset VSpace bigskip
27019 \end_inset
27020
27021
27022 \end_layout
27023
27024 \begin_layout Standard
27025 Here is an example:
27026 \end_layout
27027
27028 \begin_layout Standard
27029 \begin_inset VSpace bigskip
27030 \end_inset
27031
27032
27033 \end_layout
27034
27035 \begin_layout Standard
27036 \begin_inset CommandInset include
27037 LatexCommand input
27038 filename "SpecialParagraphShape.tex"
27039
27040 \end_inset
27041
27042
27043 \lang latin
27044 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
27045  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
27046  voluptua.
27047  At vero eos et accusam et justo duo dolores et ea rebum.
27048  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
27049  sit amet.
27050  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
27051  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
27052  voluptua.
27053 \end_layout
27054
27055 \begin_layout Standard
27056 \begin_inset VSpace bigskip
27057 \end_inset
27058
27059
27060 \end_layout
27061
27062 \begin_layout Standard
27063
27064 \series bold
27065 A tip:
27066 \series default
27067  to draw complexer shapes in 
27068 \family sans
27069 Jpgfdraw
27070 \family default
27071  you can draw the shape in a program of your choice and import the resulting
27072  image to 
27073 \family sans
27074 Jpgfdraw
27075 \family default
27076 .
27077  Then you only need to draw a line or spline along the outline of the image.
27078 \end_layout
27079
27080 \begin_layout Standard
27081 \begin_inset VSpace bigskip
27082 \end_inset
27083
27084
27085 \end_layout
27086
27087 \begin_layout Standard
27088 The module 
27089 \family sans
27090 Custom paragraph shapes
27091 \family default
27092  also provides the two commands 
27093 \family sans
27094 shapepar
27095 \family default
27096  and 
27097 \family sans
27098 Shapepar
27099 \family default
27100  which can be used to define custom shapes coordinate by coordinate.
27101 \begin_inset Foot
27102 status collapsed
27103
27104 \begin_layout Plain Layout
27105 These commands are internally used for all shapes described here.
27106 \end_layout
27107
27108 \end_inset
27109
27110  For information how these styles are used and about further customization
27111  possibilities, have a look at the documentation of the package 
27112 \series bold
27113 shapepar
27114 \series default
27115
27116 \begin_inset CommandInset citation
27117 LatexCommand cite
27118 key "shapepar"
27119 literal "true"
27120
27121 \end_inset
27122
27123 .
27124 \end_layout
27125
27126 \begin_layout Bibliography
27127 \begin_inset CommandInset bibitem
27128 LatexCommand bibitem
27129 key "multicol"
27130 literal "true"
27131
27132 \end_inset
27133
27134 Documentation of the \SpecialChar LaTeX
27135 -package 
27136 \begin_inset CommandInset href
27137 LatexCommand href
27138 name "multicol"
27139 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
27140 literal "false"
27141
27142 \end_inset
27143
27144
27145 \end_layout
27146
27147 \begin_layout Bibliography
27148 \begin_inset CommandInset bibitem
27149 LatexCommand bibitem
27150 key "shapepar"
27151 literal "true"
27152
27153 \end_inset
27154
27155 Documentation of the \SpecialChar LaTeX
27156 -package 
27157 \begin_inset CommandInset href
27158 LatexCommand href
27159 name "shapepar"
27160 target "http://mirrors.ctan.org/macros/latex/contrib/shapepar/shapepar.pdf"
27161 literal "false"
27162
27163 \end_inset
27164
27165
27166 \end_layout
27167
27168 \end_body
27169 \end_document