]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
Introduce listpreamble argument type
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.3 created this file. For more info see http://www.lyx.org/
2 \lyxformat 544
3 \begin_document
4 \begin_header
5 \save_transient_properties true
6 \origin /systemlyxdir/doc/
7 \textclass scrbook
8 \begin_preamble
9 % DO NOT ALTER THIS PREAMBLE!!!
10 %
11 % This preamble is designed to ensure that the manual prints
12 % out as advertised. If you mess with this preamble,
13 % parts of the manual may not print out as expected.  If you
14 % have problems LaTeXing this file, please contact 
15 % the documentation team
16 % email: lyx-docs@lists.lyx.org
17
18 % the pages of the TOC are numbered roman
19 % and a PDF-bookmark for the TOC is added
20 \pagenumbering{roman}
21 \let\myTOC\tableofcontents
22 \renewcommand{\tableofcontents}{%
23  \pdfbookmark[1]{\contentsname}{}
24  \myTOC
25  \cleardoublepage
26  \pagenumbering{arabic}}
27
28 % extra space for tables
29 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
30 \end_preamble
31 \options bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
32 \use_default_options false
33 \begin_modules
34 logicalmkup
35 theorems-ams
36 theorems-ams-extended
37 multicol
38 shapepar
39 \end_modules
40 \maintain_unincluded_children false
41 \language english
42 \language_package default
43 \inputencoding auto
44 \fontencoding global
45 \font_roman "lmodern" "default"
46 \font_sans "lmss" "default"
47 \font_typewriter "lmtt" "default"
48 \font_math "auto" "auto"
49 \font_default_family default
50 \use_non_tex_fonts false
51 \font_sc false
52 \font_osf false
53 \font_sf_scale 100 100
54 \font_tt_scale 100 100
55 \use_microtype false
56 \use_dash_ligatures true
57 \graphics default
58 \default_output_format pdf2
59 \output_sync 0
60 \bibtex_command default
61 \index_command default
62 \paperfontsize 12
63 \spacing single
64 \use_hyperref true
65 \pdf_title "LyX's Additional Features manual"
66 \pdf_author "LyX Team"
67 \pdf_subject "LyX's additional features documentation"
68 \pdf_keywords "LyX, Documentation, Additional"
69 \pdf_bookmarks true
70 \pdf_bookmarksnumbered true
71 \pdf_bookmarksopen false
72 \pdf_bookmarksopenlevel 1
73 \pdf_breaklinks false
74 \pdf_pdfborder false
75 \pdf_colorlinks true
76 \pdf_backref false
77 \pdf_pdfusetitle false
78 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
79 \papersize a4paper
80 \use_geometry false
81 \use_package amsmath 1
82 \use_package amssymb 1
83 \use_package cancel 1
84 \use_package esint 1
85 \use_package mathdots 1
86 \use_package mathtools 1
87 \use_package mhchem 1
88 \use_package stackrel 1
89 \use_package stmaryrd 1
90 \use_package undertilde 1
91 \cite_engine basic
92 \cite_engine_type default
93 \biblio_style plain
94 \use_bibtopic false
95 \use_indices false
96 \paperorientation portrait
97 \suppress_date false
98 \justification true
99 \use_refstyle 0
100 \use_minted 0
101 \notefontcolor #0000ff
102 \index Index
103 \shortcut idx
104 \color #008000
105 \end_index
106 \secnumdepth 3
107 \tocdepth 3
108 \paragraph_separation indent
109 \paragraph_indentation default
110 \is_math_indent 1
111 \math_indentation default
112 \math_numbering_side default
113 \quotes_style english
114 \dynamic_quotes 0
115 \papercolumns 1
116 \papersides 2
117 \paperpagestyle headings
118 \tracking_changes false
119 \output_changes false
120 \html_math_output 0
121 \html_css_as_file 0
122 \html_be_strict true
123 \end_header
124
125 \begin_body
126
127 \begin_layout Title
128 Additional \SpecialChar LyX
129  Features
130 \end_layout
131
132 \begin_layout Subtitle
133 Version 2.3.x
134 \end_layout
135
136 \begin_layout Author
137 by the \SpecialChar LyX
138  Team
139 \begin_inset Foot
140 status collapsed
141
142 \begin_layout Plain Layout
143 \noindent
144 Principal maintainer of this file is
145 \noun on
146  Richard Heck
147 \noun default
148 .
149  If you have comments or error corrections, please send them to the \SpecialChar LyX
150  Documentati
151 on mailing list, 
152 \begin_inset Flex Code
153 status collapsed
154
155 \begin_layout Plain Layout
156 \noindent
157 <lyx-docs@lists.lyx.org>
158 \end_layout
159
160 \end_inset
161
162 .
163 \end_layout
164
165 \end_inset
166
167
168 \end_layout
169
170 \begin_layout Standard
171 \begin_inset CommandInset toc
172 LatexCommand tableofcontents
173
174 \end_inset
175
176
177 \end_layout
178
179 \begin_layout Chapter
180 Introduction
181 \end_layout
182
183 \begin_layout Standard
184 This manual is essentially Part II of the 
185 \emph on
186 User's Guide\SpecialChar endofsentence
187
188 \emph default
189  The reason for separating the two documents is simple: the 
190 \emph on
191 User's Guide
192 \emph default
193  is already quite lengthy, and it contains information on all of the basic
194  features one needs to know in order to prepare most documents.
195  However, the \SpecialChar LyX
196  Team has worked to make \SpecialChar LyX
197  extensible through various configuration
198  files and external packages.
199  That means that if you want to support the Fizzwizzle \SpecialChar LaTeX
200  package, you can
201  create a layout file (or module) for it without having to alter \SpecialChar LyX
202  itself.
203  We've already had contributions of several new features this way, and some
204  of them are documented here.
205  There are also some more `advanced' features, such as how to control the
206  presentation of bibliographies and how to work with multi-part documents,
207  that are not covered in the 
208 \emph on
209 User's Guide
210 \emph default
211  and are discussed here.
212 \end_layout
213
214 \begin_layout Standard
215 This manual also documents some special features, like fax support, version
216  control, and SGML support, which require additional software to work properly.
217  There is also a chapter on \SpecialChar LyX
218 's support for HTML.
219  And lastly, there's a chapter of \SpecialChar LaTeX
220  tools and tips, things you can use to
221  spruce up your documents by directly using the powerful features of \SpecialChar LaTeX
222 .
223  After all, \SpecialChar LyX
224  
225 \emph on
226 is
227 \emph default
228  only WYSIWYM and will only ever interface to some, not all, \SpecialChar LaTeX
229  features.
230 \end_layout
231
232 \begin_layout Standard
233 If you haven't read the 
234 \emph on
235 Introduction
236 \emph default
237  yet, you are definitely in the wrong manual.
238  The 
239 \emph on
240 Introduction
241 \emph default
242  is the first place to go, since it describes the notation and format of
243  all of the manuals.
244  You should also be thoroughly familiar with the 
245 \emph on
246 User's Guide
247 \emph default
248  and all of the basic features of \SpecialChar LyX
249  before attempting to read this one.
250 \end_layout
251
252 \begin_layout Standard
253 Since many of the topics in this manual depend heavily on \SpecialChar LyX
254 's interaction
255  with \SpecialChar LaTeX
256 , this first chapter covers the inner workings of \SpecialChar LyX
257  and how to direct
258  \SpecialChar LyX
259  to generate exactly the \SpecialChar LaTeX
260  code you want.
261  It is obviously for more seasoned \SpecialChar LyX
262  users.
263 \end_layout
264
265 \begin_layout Chapter
266 \SpecialChar LyX
267  and \SpecialChar LaTeX
268
269 \end_layout
270
271 \begin_layout Section
272 How \SpecialChar LyX
273  Uses \SpecialChar LaTeX
274
275 \end_layout
276
277 \begin_layout Standard
278 This chapter is for both \SpecialChar TeX
279 -nicians and the \SpecialChar LaTeX
280 -curious.
281  In it, we'll explain how \SpecialChar LyX
282  and \SpecialChar LaTeX
283  work together to produce printable output.
284  This is the only place in any of the manuals where we assume you know something
285  about \SpecialChar LaTeX
286 .
287 \end_layout
288
289 \begin_layout Standard
290 At one time, \SpecialChar LyX
291  was called a 
292 \begin_inset Quotes eld
293 \end_inset
294
295 WYSIWYM frontend to \SpecialChar LaTeX
296 ,
297 \begin_inset Quotes erd
298 \end_inset
299
300  but that's no longer true.
301  There are frontends to \SpecialChar LaTeX
302  out there.
303 \begin_inset Foot
304 status collapsed
305
306 \begin_layout Plain Layout
307 Some familar ones are \SpecialChar TeX
308 maker and kile, on Linux, and \SpecialChar TeX
309 shop, OSX.
310  There are also the \SpecialChar LaTeX
311  modes for vi and emacs, of course.
312 \end_layout
313
314 \end_inset
315
316  These are basically text editors with the ability to run \SpecialChar LaTeX
317  and mark any
318  errors in the file you're editing.
319  Although \SpecialChar LyX
320  
321 \emph on
322 is
323 \emph default
324  an editor, and it 
325 \emph on
326 does
327 \emph default
328  run \SpecialChar LaTeX
329 , and it also indicates errors in the file, it also does much, much
330  more.
331  For one thing, you don't need to know \SpecialChar LaTeX
332  to use \SpecialChar LyX
333  effectively.
334  And \SpecialChar LyX
335  has added its own extensions to \SpecialChar LaTeX
336 .
337  Try the following sometime: select 
338 \begin_inset Flex Noun
339 status collapsed
340
341 \begin_layout Plain Layout
342 Export\SpecialChar menuseparator
343 LaTeX
344 \end_layout
345
346 \end_inset
347
348  from the 
349 \begin_inset Flex Noun
350 status collapsed
351
352 \begin_layout Plain Layout
353 File
354 \end_layout
355
356 \end_inset
357
358  menu (or 
359 \begin_inset Flex Noun
360 status collapsed
361
362 \begin_layout Plain Layout
363 View\SpecialChar menuseparator
364 Source
365 \begin_inset space ~
366 \end_inset
367
368 Pane
369 \end_layout
370
371 \end_inset
372
373 ), then look at the preamble of the resulting 
374 \begin_inset Flex Code
375 status collapsed
376
377 \begin_layout Plain Layout
378 .tex
379 \end_layout
380
381 \end_inset
382
383  file.
384  You'll notice a variety of new macros defined specifically by \SpecialChar LyX
385 .
386  These macros are defined automatically, according to the features you use
387  in the document.
388 \end_layout
389
390 \begin_layout Standard
391 There are several commands that automatically invoke \SpecialChar LaTeX
392 .
393  They are:
394 \end_layout
395
396 \begin_layout Itemize
397 \begin_inset Flex Noun
398 status collapsed
399
400 \begin_layout Plain Layout
401 Document\SpecialChar menuseparator
402 View
403 \end_layout
404
405 \end_inset
406
407
408 \end_layout
409
410 \begin_layout Itemize
411 \begin_inset Flex Noun
412 status collapsed
413
414 \begin_layout Plain Layout
415 Document\SpecialChar menuseparator
416 Update
417 \end_layout
418
419 \end_inset
420
421
422 \end_layout
423
424 \begin_layout Standard
425 They will only invoke \SpecialChar LaTeX
426  if the file has changed since the last time \SpecialChar LaTeX
427  was
428  run.
429  
430 \end_layout
431
432 \begin_layout Standard
433 When \SpecialChar LyX
434  runs \SpecialChar LaTeX
435  on the file you're editing, it performs these steps:
436 \end_layout
437
438 \begin_layout Enumerate
439 Convert the document to \SpecialChar LaTeX
440  and save to a file with the extension 
441 \begin_inset Flex Code
442 status collapsed
443
444 \begin_layout Plain Layout
445 .tex
446 \end_layout
447
448 \end_inset
449
450  in place of 
451 \begin_inset Flex Code
452 status collapsed
453
454 \begin_layout Plain Layout
455 .lyx
456 \end_layout
457
458 \end_inset
459
460 .
461 \end_layout
462
463 \begin_layout Enumerate
464 Run \SpecialChar LaTeX
465  on the 
466 \begin_inset Flex Code
467 status collapsed
468
469 \begin_layout Plain Layout
470 .tex
471 \end_layout
472
473 \end_inset
474
475  file (maybe several times), and run any other commands (such as 
476 \begin_inset Flex Code
477 status collapsed
478
479 \begin_layout Plain Layout
480 bibtex
481 \end_layout
482
483 \end_inset
484
485  or 
486 \begin_inset Flex Code
487 status collapsed
488
489 \begin_layout Plain Layout
490 makeindex
491 \end_layout
492
493 \end_inset
494
495 ) needed to compile the \SpecialChar LaTeX
496  file.
497 \end_layout
498
499 \begin_layout Enumerate
500 If there are any errors, show the error log.
501 \end_layout
502
503 \begin_layout Standard
504 If you have run \SpecialChar LaTeX
505  using 
506 \begin_inset Flex Noun
507 status collapsed
508
509 \begin_layout Plain Layout
510 View\SpecialChar menuseparator
511 DVI
512 \end_layout
513
514 \end_inset
515
516 , \SpecialChar LyX
517  then runs a DVI viewer to display the DVI-file.
518  If you have used 
519 \begin_inset Flex Noun
520 status collapsed
521
522 \begin_layout Plain Layout
523 View\SpecialChar menuseparator
524 PostScript
525 \end_layout
526
527 \end_inset
528
529 , \SpecialChar LyX
530  performs further steps:
531 \end_layout
532
533 \begin_layout Itemize
534 Run 
535 \begin_inset Flex Code
536 status collapsed
537
538 \begin_layout Plain Layout
539 dvips
540 \end_layout
541
542 \end_inset
543
544  to convert the DVI file to PostScript.
545 \end_layout
546
547 \begin_layout Itemize
548 Run a PostScript viewer, such as 
549 \begin_inset Flex Code
550 status collapsed
551
552 \begin_layout Plain Layout
553 ghostview
554 \end_layout
555
556 \end_inset
557
558 , to display the PostScript file.
559 \end_layout
560
561 \begin_layout Standard
562 \SpecialChar LyX
563  does similar things when viewing, or exporting, other formats.
564 \end_layout
565
566 \begin_layout Section
567 Translating \SpecialChar LaTeX
568  files into \SpecialChar LyX
569
570 \end_layout
571
572 \begin_layout Standard
573 You can import a \SpecialChar LaTeX
574  file into \SpecialChar LyX
575  by using the 
576 \begin_inset Flex Noun
577 status collapsed
578
579 \begin_layout Plain Layout
580 File\SpecialChar menuseparator
581 Import\SpecialChar menuseparator
582 LaTeX
583 \end_layout
584
585 \end_inset
586
587  command in \SpecialChar LyX
588 .
589  This will call a program named 
590 \begin_inset Flex Code
591 status collapsed
592
593 \begin_layout Plain Layout
594 tex2lyx
595 \end_layout
596
597 \end_inset
598
599  which will create a file 
600 \begin_inset Flex Code
601 status collapsed
602
603 \begin_layout Plain Layout
604 foo.lyx
605 \end_layout
606
607 \end_inset
608
609  from the file 
610 \begin_inset Flex Code
611 status collapsed
612
613 \begin_layout Plain Layout
614 foo.tex
615 \end_layout
616
617 \end_inset
618
619 .
620  \SpecialChar LyX
621  will then open that file.
622 \begin_inset Foot
623 status collapsed
624
625 \begin_layout Plain Layout
626 \begin_inset Flex Code
627 status collapsed
628
629 \begin_layout Plain Layout
630 tex2lyx
631 \end_layout
632
633 \end_inset
634
635  can also be run from the command line, of course.
636 \end_layout
637
638 \end_inset
639
640
641 \end_layout
642
643 \begin_layout Standard
644 \begin_inset Flex Code
645 status collapsed
646
647 \begin_layout Plain Layout
648 tex2lyx
649 \end_layout
650
651 \end_inset
652
653  will translate most legal \SpecialChar LaTeX
654 , but not everything.
655  It will put things it doesn't understand into \SpecialChar TeX
656  code, so after translating
657  a file with 
658 \begin_inset Flex Code
659 status collapsed
660
661 \begin_layout Plain Layout
662 tex2lyx
663 \end_layout
664
665 \end_inset
666
667 , you can look for \SpecialChar TeX
668  code and hand-edit it until it looks right.
669 \end_layout
670
671 \begin_layout Standard
672 If you don't know what \SpecialChar TeX
673  code is, read the next section.
674 \end_layout
675
676 \begin_layout Section
677 \begin_inset CommandInset label
678 LatexCommand label
679 name "sec:Inserting-TeX-Code"
680
681 \end_inset
682
683 Inserting \SpecialChar TeX
684  Code into \SpecialChar LyX
685  Documents 
686 \end_layout
687
688 \begin_layout Standard
689 Anything you can do in \SpecialChar LaTeX
690  you can do in \SpecialChar LyX
691 , for a very simple reason: You can
692  always insert \SpecialChar TeX
693  code into any \SpecialChar LyX
694  document.
695  \SpecialChar LyX
696  cannot, and will never be able to, display every possible \SpecialChar LaTeX
697  construct.
698  If ever you need to insert \SpecialChar LaTeX
699  commands into your \SpecialChar LyX
700  document, you can use the
701  
702 \begin_inset Flex Code
703 status collapsed
704
705 \begin_layout Plain Layout
706 \SpecialChar TeX
707  Code
708 \end_layout
709
710 \end_inset
711
712  box, which you can insert into your document with 
713 \begin_inset Flex Noun
714 status collapsed
715
716 \begin_layout Plain Layout
717 Insert\SpecialChar menuseparator
718
719 \family sans
720 TeX
721 \family default
722  Code
723 \end_layout
724
725 \end_inset
726
727  or the keyboard shortcut 
728 \begin_inset Info
729 type  "shortcut"
730 arg   "ert-insert"
731 \end_inset
732
733 .
734 \end_layout
735
736 \begin_layout Standard
737 Here's an example of inserting \SpecialChar LaTeX
738  commands in a \SpecialChar LyX
739  document.
740  The code looks like this:
741 \end_layout
742
743 \begin_layout LyX-Code
744
745 \backslash
746 begin{tabular}{ll}
747 \begin_inset Newline newline
748 \end_inset
749
750
751 \backslash
752 begin{minipage}{5cm}
753 \begin_inset Newline newline
754 \end_inset
755
756 This is an example of a minipage environment.
757  You 
758 \begin_inset Newline newline
759 \end_inset
760
761 can put nearly everything in it, even (non-floating) 
762 \begin_inset Newline newline
763 \end_inset
764
765 figures and tables.
766  
767 \begin_inset Newline newline
768 \end_inset
769
770
771 \backslash
772 end{minipage}
773 \begin_inset Newline newline
774 \end_inset
775
776 &
777 \begin_inset Newline newline
778 \end_inset
779
780
781 \backslash
782 begin{minipage}{5cm}
783 \begin_inset Newline newline
784 \end_inset
785
786
787 \backslash
788 begin{verbatim}
789 \begin_inset Newline newline
790 \end_inset
791
792
793 \backslash
794 begin{minipage}{5cm}
795 \begin_inset Newline newline
796 \end_inset
797
798 This ...
799  
800 \begin_inset Newline newline
801 \end_inset
802
803
804 \backslash
805 end{minipage}
806 \begin_inset Newline newline
807 \end_inset
808
809
810 \backslash
811 end{verbatim}
812 \begin_inset Newline newline
813 \end_inset
814
815
816 \backslash
817 end{minipage}
818 \begin_inset Newline newline
819 \end_inset
820
821
822 \backslash
823 end{tabular}
824 \end_layout
825
826 \begin_layout LyX-Code
827
828 \end_layout
829
830 \begin_layout Standard
831 The 
832 \begin_inset Flex Code
833 status collapsed
834
835 \begin_layout Plain Layout
836 \SpecialChar TeX
837  Code
838 \end_layout
839
840 \end_inset
841
842  box containing this text is directly after this paragraph.
843  Those of you reading the manual in \SpecialChar LyX
844  will only see the \SpecialChar TeX
845  code inset.
846  Those reading a printed version of the manuals will see the actual results:
847 \begin_inset VSpace bigskip
848 \end_inset
849
850
851 \end_layout
852
853 \begin_layout Standard
854 \begin_inset ERT
855 status open
856
857 \begin_layout Plain Layout
858
859
860 \backslash
861 begin{tabular}{ll}
862 \end_layout
863
864 \begin_layout Plain Layout
865
866
867 \backslash
868 begin{minipage}{5cm}
869 \end_layout
870
871 \begin_layout Plain Layout
872
873 This is an example of a minipage environment.
874  You can put nearly everything in it, even (non-floating) figures and tables.
875  
876 \end_layout
877
878 \begin_layout Plain Layout
879
880
881 \backslash
882 end{minipage}
883 \end_layout
884
885 \begin_layout Plain Layout
886
887 &
888 \end_layout
889
890 \begin_layout Plain Layout
891
892
893 \backslash
894 begin{minipage}{5cm}
895 \end_layout
896
897 \begin_layout Plain Layout
898
899
900 \backslash
901 begin{verbatim}
902 \end_layout
903
904 \begin_layout Plain Layout
905
906
907 \backslash
908 begin{minipage}{5cm}
909 \end_layout
910
911 \begin_layout Plain Layout
912
913 This ...
914  
915 \end_layout
916
917 \begin_layout Plain Layout
918
919
920 \backslash
921 end{minipage}
922 \end_layout
923
924 \begin_layout Plain Layout
925
926
927 \backslash
928 end{verbatim}
929 \end_layout
930
931 \begin_layout Plain Layout
932
933
934 \backslash
935 end{minipage}
936 \end_layout
937
938 \begin_layout Plain Layout
939
940
941 \backslash
942 end{tabular}
943 \end_layout
944
945 \end_inset
946
947
948 \begin_inset VSpace bigskip
949 \end_inset
950
951
952 \end_layout
953
954 \begin_layout Standard
955 In addition to using \SpecialChar TeX
956  code, you can also create a separate file containing
957  some complex \SpecialChar LaTeX
958  structure and then use 
959 \begin_inset Flex Noun
960 status collapsed
961
962 \begin_layout Plain Layout
963 Insert\SpecialChar menuseparator
964 Child
965 \begin_inset space ~
966 \end_inset
967
968 Document
969 \end_layout
970
971 \end_inset
972
973  to include your file (you should select the type 
974 \begin_inset Flex Code
975 status collapsed
976
977 \begin_layout Plain Layout
978 Input
979 \end_layout
980
981 \end_inset
982
983 ).
984  We recommend that you only do this if you have a 
985 \begin_inset Flex Code
986 status collapsed
987
988 \begin_layout Plain Layout
989 .tex
990 \end_layout
991
992 \end_inset
993
994  file which you 
995 \emph on
996 know
997 \emph default
998  works already.
999  Otherwise, you'll have a big job tracking down \SpecialChar LaTeX
1000  errors.
1001 \end_layout
1002
1003 \begin_layout Standard
1004 There are a few last points to emphasize:
1005 \end_layout
1006
1007 \begin_layout Itemize
1008 \SpecialChar LyX
1009  
1010 \emph on
1011 does not
1012 \emph default
1013  check if your \SpecialChar LaTeX
1014  code is correct.
1015 \end_layout
1016
1017 \begin_layout Itemize
1018 Beware of reinventing the wheel.
1019 \end_layout
1020
1021 \begin_layout Standard
1022 On that last point, \SpecialChar LyX
1023  does have quite a few features tucked into it, and
1024  more are coming.
1025  Be sure to check the manuals to make sure that \SpecialChar LyX
1026  doesn't have such-and-such
1027  feature before you decide you have to do it by hand.
1028  Moreover, there are numerous \SpecialChar LaTeX
1029  packages out there to do all sorts of things,
1030  from labels to envelopes to fancy multipage tables.
1031  Check out 
1032 \begin_inset CommandInset href
1033 LatexCommand href
1034 name "CTAN"
1035 target "http://www.ctan.org/"
1036 literal "false"
1037
1038 \end_inset
1039
1040  for details.
1041 \end_layout
1042
1043 \begin_layout Standard
1044 If you do need to do some wild and fancy things within your document, be
1045  sure to check out a good \SpecialChar LaTeX
1046  book for assistance.
1047  There are a number of them listed in the bibliography of the 
1048 \emph on
1049 User's Guide
1050 \emph default
1051 .
1052 \end_layout
1053
1054 \begin_layout Section
1055 \SpecialChar LyX
1056  and the \SpecialChar LaTeX
1057  Preamble
1058 \end_layout
1059
1060 \begin_layout Subsection
1061 About the \SpecialChar LaTeX
1062  Preamble
1063 \end_layout
1064
1065 \begin_layout Standard
1066 If you already know \SpecialChar LaTeX
1067 , there is no need to explain here what the preamble
1068  is good for.
1069  If you don't, the following will give you some ideas—we recommend again
1070  that you consult a \SpecialChar LaTeX
1071  book for further information.
1072  In any case, you should read the points below, because they explain what
1073  you can do and what you don't need to do in the \SpecialChar LaTeX
1074  preamble of a \SpecialChar LyX
1075  document.
1076 \end_layout
1077
1078 \begin_layout Standard
1079 The \SpecialChar LaTeX
1080  preamble comes at the very beginning of a document, 
1081 \emph on
1082 before
1083 \emph default
1084  the text.
1085  It serves to:
1086 \end_layout
1087
1088 \begin_layout Itemize
1089 Declare the document class.
1090  
1091 \begin_inset Newline newline
1092 \end_inset
1093
1094 \SpecialChar LyX
1095  already does this for you.
1096  If you're a seasoned \SpecialChar LaTeX
1097 -nician, and you have a custom document class you
1098  want to use, check out the 
1099 \emph on
1100 Customization Manual
1101 \emph default
1102  for information on how to make \SpecialChar LyX
1103  interface to it.
1104 \end_layout
1105
1106 \begin_layout Itemize
1107 Declare the usage of packages.
1108  
1109 \begin_inset Newline newline
1110 \end_inset
1111
1112 \SpecialChar LaTeX
1113  packages provide special commands, which are only available within a document
1114  when the package has been declared in the preamble.
1115  In addition to providing special commands, the inclusion of a package can
1116  change the document.
1117  For example, the package 
1118 \begin_inset Flex Code
1119 status collapsed
1120
1121 \begin_layout Plain Layout
1122 indentfirst
1123 \end_layout
1124
1125 \end_inset
1126
1127  forces all paragraphs to be indented.
1128  There are other packages for labels, envelopes, margins, etc.
1129  
1130 \end_layout
1131
1132 \begin_layout Itemize
1133 Set counters, variables, lengths and widths.
1134  
1135 \begin_inset Newline newline
1136 \end_inset
1137
1138 There are several \SpecialChar LaTeX
1139  counters and variables that 
1140 \emph on
1141 must
1142 \emph default
1143  be set globally from within the preamble in order to have the desired effect.
1144  (There are variables that you can set and reset inside the document, too.)
1145  Margins are a good example of something that must be set in the preamble.
1146  Another example is the label format for lists.
1147  You can actually set these just about anywhere, but it's best to do it
1148  just once, inside the preamble.
1149 \end_layout
1150
1151 \begin_layout Itemize
1152 Declare user defined commands (with 
1153 \begin_inset Flex Code
1154 status collapsed
1155
1156 \begin_layout Plain Layout
1157
1158 \backslash
1159 newcommand
1160 \end_layout
1161
1162 \end_inset
1163
1164  or 
1165 \begin_inset Flex Code
1166 status collapsed
1167
1168 \begin_layout Plain Layout
1169
1170 \backslash
1171 renewcommand
1172 \end_layout
1173
1174 \end_inset
1175
1176 ).
1177 \begin_inset Newline newline
1178 \end_inset
1179
1180 These are abbreviations for \SpecialChar LaTeX
1181  commands which appear very often inside a document.
1182  Although the preamble is a good place to declare such commands, they 
1183 \emph on
1184 can
1185 \emph default
1186  be declared anywhere (before they are used for the first time, of course).
1187  This can be useful if there is a lot of raw \SpecialChar LaTeX
1188  code in your document, which
1189  normally should not be the case.
1190 \end_layout
1191
1192 \begin_layout Standard
1193 \SpecialChar LyX
1194  adds its own set of definitions to the preamble of the 
1195 \begin_inset Flex Code
1196 status collapsed
1197
1198 \begin_layout Plain Layout
1199 .tex
1200 \end_layout
1201
1202 \end_inset
1203
1204  file it produces.
1205  This makes \SpecialChar LaTeX
1206  files generated by \SpecialChar LyX
1207  portable.
1208 \end_layout
1209
1210 \begin_layout Subsection
1211 Changing the Preamble
1212 \end_layout
1213
1214 \begin_layout Standard
1215 The commands which \SpecialChar LyX
1216  adds to the preamble of a \SpecialChar LaTeX
1217  file are fixed; you can't
1218  change them without patching \SpecialChar LyX
1219  itself.
1220  You can, however, add your own stuff to the preamble by selecting 
1221 \begin_inset Flex Noun
1222 status collapsed
1223
1224 \begin_layout Plain Layout
1225 \SpecialChar LaTeX
1226
1227 \begin_inset space ~
1228 \end_inset
1229
1230 Preamble
1231 \end_layout
1232
1233 \end_inset
1234
1235  in the 
1236 \begin_inset Flex Noun
1237 status collapsed
1238
1239 \begin_layout Plain Layout
1240 Document\SpecialChar menuseparator
1241 Settings
1242 \end_layout
1243
1244 \end_inset
1245
1246  dialog.
1247  \SpecialChar LyX
1248  adds anything in the 
1249 \begin_inset Flex Noun
1250 status collapsed
1251
1252 \begin_layout Plain Layout
1253 Preamble
1254 \end_layout
1255
1256 \end_inset
1257
1258  dialog to its own built-in preamble.
1259  Before adding your own declarations in the preamble, you should make sure
1260  that \SpecialChar LyX
1261  doesn't already support what you want to do.
1262  (Remember what we said about reinventing the wheel?) Also, 
1263 \emph on
1264 make sure your preamble code is correct
1265 \emph default
1266 .
1267  \SpecialChar LyX
1268  doesn't check it for you.
1269  If there is an error, you're likely to get an error like 
1270 \begin_inset Quotes eld
1271 \end_inset
1272
1273
1274 \begin_inset Flex Code
1275 status collapsed
1276
1277 \begin_layout Plain Layout
1278 Missing 
1279 \backslash
1280 begin{document}
1281 \end_layout
1282
1283 \end_inset
1284
1285
1286 \begin_inset Quotes erd
1287 \end_inset
1288
1289 .
1290  If you see this error, check your preamble.
1291 \end_layout
1292
1293 \begin_layout Subsection
1294 Examples
1295 \end_layout
1296
1297 \begin_layout Standard
1298 Here are some examples of what you can add to a preamble, and what they
1299  do.
1300 \end_layout
1301
1302 \begin_layout Subsubsection
1303 Example #1: Offsets
1304 \end_layout
1305
1306 \begin_layout Standard
1307 There are two variables under \SpecialChar LaTeX
1308  that control page position: 
1309 \begin_inset Flex Code
1310 status collapsed
1311
1312 \begin_layout Plain Layout
1313
1314 \backslash
1315 hoffset
1316 \end_layout
1317
1318 \end_inset
1319
1320  and 
1321 \begin_inset Flex Code
1322 status collapsed
1323
1324 \begin_layout Plain Layout
1325
1326 \backslash
1327 voffset
1328 \end_layout
1329
1330 \end_inset
1331
1332 .
1333  Their names should be self-explanatory.
1334  These variables are useful if you think for a moment about computer labels.
1335  Sometimes, the size of a print medium and the area of the medium that you
1336  can actually print on aren't the same.
1337  This is where 
1338 \begin_inset Flex Code
1339 status collapsed
1340
1341 \begin_layout Plain Layout
1342
1343 \backslash
1344 hoffset
1345 \end_layout
1346
1347 \end_inset
1348
1349  and 
1350 \begin_inset Flex Code
1351 status collapsed
1352
1353 \begin_layout Plain Layout
1354
1355 \backslash
1356 voffset
1357 \end_layout
1358
1359 \end_inset
1360
1361  come in.
1362 \end_layout
1363
1364 \begin_layout Standard
1365 The default values for 
1366 \begin_inset Flex Code
1367 status collapsed
1368
1369 \begin_layout Plain Layout
1370
1371 \backslash
1372 hoffset
1373 \end_layout
1374
1375 \end_inset
1376
1377  and 
1378 \begin_inset Flex Code
1379 status collapsed
1380
1381 \begin_layout Plain Layout
1382
1383 \backslash
1384 voffset
1385 \end_layout
1386
1387 \end_inset
1388
1389  are both 0
1390 \begin_inset space \thinspace{}
1391 \end_inset
1392
1393 points, i.
1394 \begin_inset space \thinspace{}
1395 \end_inset
1396
1397 e.
1398 \begin_inset space \space{}
1399 \end_inset
1400
1401 the page isn't shifted.
1402  Unfortunately, some DVI drivers always seem to shift the page.
1403  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1404  If you're using \SpecialChar LyX
1405  on a system that you don't personally maintain, and your
1406  sysadmin is a doofus, 
1407 \begin_inset Flex Code
1408 status collapsed
1409
1410 \begin_layout Plain Layout
1411
1412 \backslash
1413 hoffset
1414 \end_layout
1415
1416 \end_inset
1417
1418  and 
1419 \begin_inset Flex Code
1420 status collapsed
1421
1422 \begin_layout Plain Layout
1423
1424 \backslash
1425 voffset
1426 \end_layout
1427
1428 \end_inset
1429
1430  can save the day.
1431  Suppose your left and top margins are always 0.5
1432 \begin_inset space \thinspace{}
1433 \end_inset
1434
1435 inches too big.
1436  You can add this to the preamble:
1437 \end_layout
1438
1439 \begin_layout LyX-Code
1440
1441 \backslash
1442 setlength{
1443 \backslash
1444 hoffset}{-0.5 in}
1445 \end_layout
1446
1447 \begin_layout LyX-Code
1448
1449 \backslash
1450 setlength{
1451 \backslash
1452 voffset}{-0.5 in}
1453 \end_layout
1454
1455 \begin_layout Standard
1456 and your margins should now be correct.
1457 \end_layout
1458
1459 \begin_layout Subsubsection
1460 Example #2: Labels
1461 \end_layout
1462
1463 \begin_layout Standard
1464 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1465  There's a rather nice package, available at your nearest CTAN archive,
1466  for printing sheets of labels: 
1467 \begin_inset Flex Code
1468 status collapsed
1469
1470 \begin_layout Plain Layout
1471 labels.sty
1472 \end_layout
1473
1474 \end_inset
1475
1476 .
1477  Now, your system may not have this package installed by default.
1478  We leave that up to you to check.
1479  You'll also want to read the documentation for it; we're not going to do
1480  that for you.
1481  Since this is an example, however, we'll give you an example of how you
1482  use this package.
1483 \end_layout
1484
1485 \begin_layout Standard
1486 First, make sure you're using the 
1487 \begin_inset Flex Code
1488 status collapsed
1489
1490 \begin_layout Plain Layout
1491 article
1492 \end_layout
1493
1494 \end_inset
1495
1496  document class.
1497  Next, you need to put the following in your preamble:
1498 \end_layout
1499
1500 \begin_layout LyX-Code
1501
1502 \backslash
1503 usepackage{labels}
1504 \end_layout
1505
1506 \begin_layout LyX-Code
1507
1508 \backslash
1509 LabelCols=3
1510 \end_layout
1511
1512 \begin_layout LyX-Code
1513
1514 \backslash
1515 LabelRows=7
1516 \end_layout
1517
1518 \begin_layout LyX-Code
1519
1520 \backslash
1521 LeftBorder=8mm
1522 \end_layout
1523
1524 \begin_layout LyX-Code
1525
1526 \backslash
1527 RightBorder=8mm
1528 \end_layout
1529
1530 \begin_layout LyX-Code
1531
1532 \backslash
1533 TopBorder=9mm
1534 \end_layout
1535
1536 \begin_layout LyX-Code
1537
1538 \backslash
1539 BottomBorder=2mm
1540 \end_layout
1541
1542 \begin_layout Standard
1543 This sets things up for Avery label sheets, stock #5360.
1544  You're now ready to print labels, but you'll need to insert \SpecialChar LaTeX
1545  code, placing
1546  the commands 
1547 \begin_inset Flex Code
1548 status collapsed
1549
1550 \begin_layout Plain Layout
1551
1552 \backslash
1553 begin{labels}
1554 \end_layout
1555
1556 \end_inset
1557
1558  and 
1559 \begin_inset Flex Code
1560 status collapsed
1561
1562 \begin_layout Plain Layout
1563
1564 \backslash
1565 end{labels}
1566 \end_layout
1567
1568 \end_inset
1569
1570  around each label text.
1571  This and other special features of 
1572 \begin_inset Flex Code
1573 status collapsed
1574
1575 \begin_layout Plain Layout
1576 labels.sty
1577 \end_layout
1578
1579 \end_inset
1580
1581  are explained in its documentation.
1582 \end_layout
1583
1584 \begin_layout Standard
1585 Someday, someone may write a \SpecialChar LyX
1586  layout file to support this package directly.
1587  Maybe that someone is you.
1588 \end_layout
1589
1590 \begin_layout Subsubsection
1591 Example #3: Paragraph Indentation
1592 \end_layout
1593
1594 \begin_layout Standard
1595 Americans are trained to indent the first line of 
1596 \emph on
1597 every
1598 \emph default
1599  paragraph.
1600  As with all of their other weird quirks, most Americans will whine and
1601  moan until they can have their way and indent the first line of all paragraphs.
1602  (Yes, we're joking.
1603  (We are?) 
1604 \emph on
1605 Yeah
1606 \emph default
1607 , we are.)
1608 \end_layout
1609
1610 \begin_layout Standard
1611 Of course, this behavior isn't standard typography.
1612  In books, you typically only indent the first line of a paragraph 
1613 \emph on
1614 if
1615 \emph default
1616  it follows another one.
1617  The idea behind indenting the first line of a paragraph is to distinguish
1618  neighboring paragraphs from one another.
1619  If there is no previous paragraph—for example, if it follows a figure or
1620  is the first paragraph in a section—then there is no need for indentation.
1621  
1622 \end_layout
1623
1624 \begin_layout Standard
1625 If you're a typical American (we're still joking!), though, you don't care
1626  about such esoteric things; you want your indentation! Add this to the
1627  preamble:
1628 \end_layout
1629
1630 \begin_layout LyX-Code
1631
1632 \backslash
1633 usepackage{indentfirst}
1634 \end_layout
1635
1636 \begin_layout Standard
1637 If your \SpecialChar TeX
1638  distribution isn't braindead, you'll have this package, and all
1639  of your paragraphs will get the indentation the Founding Fathers intended
1640  they should have.
1641 \end_layout
1642
1643 \begin_layout Subsubsection
1644 Example #4: This Document
1645 \end_layout
1646
1647 \begin_layout Standard
1648 You can also check out the preamble of this document to get an idea of some
1649  of the advanced things you can do.
1650 \end_layout
1651
1652 \begin_layout Section
1653 \SpecialChar LyX
1654  and \SpecialChar LaTeX
1655  Errors
1656 \end_layout
1657
1658 \begin_layout Standard
1659 When \SpecialChar LyX
1660  calls \SpecialChar LaTeX
1661 , it tells \SpecialChar LaTeX
1662  to blithely ignore any errors and keep going.
1663  It then uses the logfile from the \SpecialChar LaTeX
1664  run to do a post-mortem.
1665  After analyzing the logfile, \SpecialChar LyX
1666  displays a dialog listing the errors.
1667  Clicking on any one of them will take you to the position in your \SpecialChar LyX
1668  file
1669  where the error occurred.
1670 \begin_inset Foot
1671 status collapsed
1672
1673 \begin_layout Plain Layout
1674 Well, usually.
1675  Analyzing the logfile is a tough job, and \SpecialChar LyX
1676  doesn't always go to the right
1677  line.
1678  There are also cases where \SpecialChar LaTeX
1679  reports the error on one line, but the actual
1680  error is earlier.
1681  This is not unlike forgetting a closing brace in a program: You'll get
1682  an error, but only later.
1683 \end_layout
1684
1685 \end_inset
1686
1687
1688 \end_layout
1689
1690 \begin_layout Standard
1691 Some folks also like to look at the log file directly: It is available from
1692  
1693 \begin_inset Flex Noun
1694 status collapsed
1695
1696 \begin_layout Plain Layout
1697 Document\SpecialChar menuseparator
1698 LaTeX
1699 \begin_inset space ~
1700 \end_inset
1701
1702 Log
1703 \end_layout
1704
1705 \end_inset
1706
1707 .
1708  There are some fairly common error messages and warnings.
1709  We'll cover those here.
1710  You should look at a good \SpecialChar LaTeX
1711  book for a complete listing.
1712 \end_layout
1713
1714 \begin_layout Itemize
1715 \begin_inset Flex Code
1716 status collapsed
1717
1718 \begin_layout Plain Layout
1719 LaTeX Warning
1720 \end_layout
1721
1722 \end_inset
1723
1724
1725 \begin_inset Newline newline
1726 \end_inset
1727
1728 Anything beginning with these words is a warning message for the purpose
1729  of 
1730 \begin_inset Quotes eld
1731 \end_inset
1732
1733 debugging
1734 \begin_inset Quotes erd
1735 \end_inset
1736
1737  the \SpecialChar LaTeX
1738  code itself.
1739  You'll get messages like this if you added or changed cross-references
1740  or bibliography entries, in which case, \SpecialChar LaTeX
1741  is trying to tell you that you
1742  need to make another run.
1743  You can by-and-large ignore these.
1744 \end_layout
1745
1746 \begin_layout Itemize
1747 \begin_inset Flex Code
1748 status collapsed
1749
1750 \begin_layout Plain Layout
1751 LaTeX Font Warning
1752 \end_layout
1753
1754 \end_inset
1755
1756
1757 \begin_inset Newline newline
1758 \end_inset
1759
1760 Another warning message, this time about fonts which \SpecialChar LaTeX
1761  couldn't find.
1762  The rest of the message will often say something about a replacement font
1763  that \SpecialChar LaTeX
1764  used.
1765  You can safely ignore these, too.
1766 \end_layout
1767
1768 \begin_layout Itemize
1769 \begin_inset Flex Code
1770 status collapsed
1771
1772 \begin_layout Plain Layout
1773 Overfull 
1774 \backslash
1775 hbox
1776 \end_layout
1777
1778 \end_inset
1779
1780
1781 \begin_inset Newline newline
1782 \end_inset
1783
1784 \SpecialChar LaTeX
1785  absolutely 
1786 \emph on
1787 loves
1788 \emph default
1789  to spew these out.
1790  It seems to generate at least one of these messages for just about any
1791  document you write.
1792  They are warnings about lines that were too long and run past the right
1793  margin.
1794  This happens if \SpecialChar LaTeX
1795  does not find a reasonable way to break the lines (notoriously
1796  often with typewriter font, since this does not allow for automatic break
1797  points).
1798  In many cases, this is unnoticeable in the final output.
1799  (It can be just a point or two.) Sometimes, however, the lines run rather
1800  visibly into the margin; something you will not want to have in your final
1801  print.
1802  
1803 \begin_inset Newline newline
1804 \end_inset
1805
1806 There are several global ways to try to minimize the overfull lines.
1807  Clicking 
1808 \family sans
1809 Enable micro-typographic extensions
1810 \family default
1811  in 
1812 \family sans
1813 Document\SpecialChar menuseparator
1814 Settings\SpecialChar menuseparator
1815 Fonts
1816 \family default
1817  might already improve things a lot.
1818  Furthermore, \SpecialChar LaTeX
1819  code such as the following in 
1820 \family sans
1821 Document\SpecialChar menuseparator
1822 Settings\SpecialChar menuseparator
1823 Preamble
1824 \family default
1825  usually reduces the overfull lines drastically (we use this in the preamble
1826  of this document):
1827 \end_layout
1828
1829 \begin_deeper
1830 \begin_layout LyX-Code
1831
1832 \backslash
1833 tolerance 1414
1834 \begin_inset Newline newline
1835 \end_inset
1836
1837
1838 \backslash
1839 hbadness 1414
1840 \begin_inset Newline newline
1841 \end_inset
1842
1843
1844 \backslash
1845 emergencystretch 1.5em
1846 \begin_inset Newline newline
1847 \end_inset
1848
1849
1850 \backslash
1851 hfuzz 0.3pt
1852 \end_layout
1853
1854 \begin_layout Standard
1855 In some cases, however, you eventually have to rewrite the text to get the
1856  line breaking right.
1857 \begin_inset Foot
1858 status collapsed
1859
1860 \begin_layout Plain Layout
1861 For more information, see 
1862 \begin_inset Flex URL
1863 status open
1864
1865 \begin_layout Plain Layout
1866
1867 http://www.tex.ac.uk/FAQ-overfull.html
1868 \end_layout
1869
1870 \end_inset
1871
1872
1873 \end_layout
1874
1875 \end_inset
1876
1877
1878 \end_layout
1879
1880 \begin_layout Standard
1881 In any case, you should check the respective lines, at least for the final
1882  version of your document.
1883  Your eyes will tell you if there's a problem with something that's too
1884  wide.
1885 \begin_inset Foot
1886 status collapsed
1887
1888 \begin_layout Plain Layout
1889 You can also enable the `draft' option in 
1890 \begin_inset Flex Noun
1891 status collapsed
1892
1893 \begin_layout Plain Layout
1894 Document\SpecialChar menuseparator
1895 Settings
1896 \end_layout
1897
1898 \end_inset
1899
1900 , and then \SpecialChar LaTeX
1901  will draw a black box in the margin of lines that are overfull.
1902 \end_layout
1903
1904 \end_inset
1905
1906  
1907 \end_layout
1908
1909 \end_deeper
1910 \begin_layout Itemize
1911 \begin_inset Flex Code
1912 status collapsed
1913
1914 \begin_layout Plain Layout
1915 Underfull 
1916 \backslash
1917 hbox
1918 \end_layout
1919
1920 \end_inset
1921
1922
1923 \begin_inset Newline newline
1924 \end_inset
1925
1926 Not quite as common as its cousin.
1927  This happens again if \SpecialChar LaTeX
1928  does not find a reasonable break point and consequently
1929  generates too loose lines.
1930  As with the overfull lines, you should check if this is a visible problem.
1931 \end_layout
1932
1933 \begin_layout Itemize
1934 \begin_inset Flex Code
1935 status collapsed
1936
1937 \begin_layout Plain Layout
1938 Overfull 
1939 \backslash
1940 vbox
1941 \end_layout
1942
1943 \end_inset
1944
1945  and 
1946 \begin_inset Flex Code
1947 status collapsed
1948
1949 \begin_layout Plain Layout
1950 Underfull 
1951 \backslash
1952 vbox
1953 \end_layout
1954
1955 \end_inset
1956
1957
1958 \begin_inset Newline newline
1959 \end_inset
1960
1961 Warnings about troubles breaking the page.
1962  Once again, just look at the output.
1963  Your eyes will tell you where something has gone wrong.
1964 \end_layout
1965
1966 \begin_layout Itemize
1967 \begin_inset Flex Code
1968 status collapsed
1969
1970 \begin_layout Plain Layout
1971 LaTeX Error: File 
1972 \begin_inset Quotes els
1973 \end_inset
1974
1975 Xxxx
1976 \begin_inset Quotes ers
1977 \end_inset
1978
1979  not found
1980 \end_layout
1981
1982 \end_inset
1983
1984
1985 \begin_inset Newline newline
1986 \end_inset
1987
1988 The file 
1989 \begin_inset Quotes eld
1990 \end_inset
1991
1992 Xxxx
1993 \begin_inset Quotes erd
1994 \end_inset
1995
1996  isn't installed on this system.
1997  This usually appears because some package your document needs isn't installed.
1998  If you didn't touch the preamble or didn't use the 
1999 \begin_inset Flex Code
2000 status collapsed
2001
2002 \begin_layout Plain Layout
2003
2004 \backslash
2005 usepackage{}
2006 \end_layout
2007
2008 \end_inset
2009
2010  command, then one of the packages \SpecialChar LyX
2011  tried to load is missing.
2012  Use 
2013 \begin_inset Flex Noun
2014 status collapsed
2015
2016 \begin_layout Plain Layout
2017 Help\SpecialChar menuseparator
2018 \SpecialChar LaTeX
2019  Configuration
2020 \end_layout
2021
2022 \end_inset
2023
2024  to get a list of packages that \SpecialChar LyX
2025  knows about.
2026  This file is updated whenever you reconfigure \SpecialChar LyX
2027  (using 
2028 \begin_inset Flex Noun
2029 status collapsed
2030
2031 \begin_layout Plain Layout
2032 Tools\SpecialChar menuseparator
2033 Reconfigure
2034 \end_layout
2035
2036 \end_inset
2037
2038 ) and tells you which packages have been detected and what they do.
2039 \begin_inset Newline newline
2040 \end_inset
2041
2042 If you did use the 
2043 \begin_inset Flex Code
2044 status collapsed
2045
2046 \begin_layout Plain Layout
2047
2048 \backslash
2049 usepackage{}
2050 \end_layout
2051
2052 \end_inset
2053
2054  command and the package in question isn't installed, then you'll need to
2055  install it yourself.
2056 \end_layout
2057
2058 \begin_layout Itemize
2059 \begin_inset Flex Code
2060 status collapsed
2061
2062 \begin_layout Plain Layout
2063 LaTeX Error: Unknown option
2064 \end_layout
2065
2066 \end_inset
2067
2068
2069 \begin_inset Newline newline
2070 \end_inset
2071
2072 Error messages beginning with this are trying to tell you that you specified
2073  a bad or undefined option to a package.
2074  Check the package's documentation.
2075 \end_layout
2076
2077 \begin_layout Itemize
2078 \begin_inset Flex Code
2079 status collapsed
2080
2081 \begin_layout Plain Layout
2082 Undefined control sequence
2083 \end_layout
2084
2085 \end_inset
2086
2087
2088 \begin_inset Newline newline
2089 \end_inset
2090
2091 If you've inserted \SpecialChar LaTeX
2092  code into your document, but made a typo, you'll get
2093  one of these.
2094  You may have forgotten to load a package.
2095  In any case, this error message usually means that you used an undefined
2096  command.
2097  
2098 \end_layout
2099
2100 \begin_layout Standard
2101 There are other error and warning messages.
2102  Some are self-explanatory.
2103  These are usually \SpecialChar LaTeX
2104  messages.
2105  Others are downright cryptic.
2106  These are usually \SpecialChar TeX
2107  error messages, and we really have 
2108 \emph on
2109 no clue
2110 \emph default
2111  what they mean or how to decipher them.
2112  No-one does.
2113 \end_layout
2114
2115 \begin_layout Standard
2116 There's a general sequence you should follow if you get error messages:
2117 \end_layout
2118
2119 \begin_layout Enumerate
2120 Look at the \SpecialChar LaTeX
2121  code you inserted for typos.
2122 \end_layout
2123
2124 \begin_layout Enumerate
2125 If there are no typos, check that you used the command(s) correctly.
2126 \end_layout
2127
2128 \begin_layout Enumerate
2129 If you get a bunch of error boxes piled up at the very top of the document—and
2130  especially if you see a 
2131 \begin_inset Quotes eld
2132 \end_inset
2133
2134
2135 \begin_inset Flex Code
2136 status collapsed
2137
2138 \begin_layout Plain Layout
2139 Missing 
2140 \backslash
2141 begin{document}
2142 \end_layout
2143
2144 \end_inset
2145
2146
2147 \begin_inset Quotes erd
2148 \end_inset
2149
2150  error—it means that there are errors in the preamble.
2151  Start debugging your preamble.
2152 \end_layout
2153
2154 \begin_layout Enumerate
2155 If you didn't add anything to the preamble and didn't add any \SpecialChar LaTeX
2156  code to the
2157  document, the first suspect is your \SpecialChar LaTeX
2158  distribution itself.
2159  Check for missing packages and install them.
2160 \end_layout
2161
2162 \begin_layout Enumerate
2163 Okay, so there are no missing packages.
2164  Did you use any of the fine-tuning options in \SpecialChar LyX
2165 ? Specifically, did you 
2166 \emph on
2167 misuse
2168 \emph default
2169  any of them, like trying to manually insert lots of 
2170 \begin_inset Flex Code
2171 status collapsed
2172
2173 \begin_layout Plain Layout
2174 Protected
2175 \begin_inset space ~
2176 \end_inset
2177
2178 Blanks
2179 \end_layout
2180
2181 \end_inset
2182
2183
2184 \begin_inset Flex Code
2185 status collapsed
2186
2187 \begin_layout Plain Layout
2188 Linebreaks
2189 \end_layout
2190
2191 \end_inset
2192
2193 , or 
2194 \begin_inset Flex Code
2195 status collapsed
2196
2197 \begin_layout Plain Layout
2198 Pagebreaks
2199 \end_layout
2200
2201 \end_inset
2202
2203 ? Did you try to kludge something together with these instead of using the
2204  appropriate paragraph environment?
2205 \end_layout
2206
2207 \begin_layout Enumerate
2208 All right, you didn't use any of the fine-tuning options, you played by
2209  the rules.
2210  Did you try to pull a fancy maneuver? Did you do something funky inside
2211  a table or an equation, like inserting a graphic into a table cell?
2212 \end_layout
2213
2214 \begin_layout Enumerate
2215 Do you have long sections of text where \SpecialChar LaTeX
2216  cannot find a place to break a
2217  line? By default, \SpecialChar LaTeX
2218  is rather strict about how much extra inter-word spacing
2219  it will add in order to break a line.
2220  Preferably, you should rework the paragraph to avoid the problem.
2221 \end_layout
2222
2223 \begin_layout Enumerate
2224 Did you go overboard with the nesting? \SpecialChar LyX
2225  (currently) doesn't check to make
2226  sure you're in the limits for nesting environments.
2227  If you nested a bunch of environments to the 
2228 \begin_inset Formula $17^{\mathrm{th}}$
2229 \end_inset
2230
2231  level, that's the problem.
2232  (The limit in \SpecialChar LaTeX
2233  is five.)
2234 \end_layout
2235
2236 \begin_layout Enumerate
2237 Okay, you didn't get any error messages, but your output looks awful.
2238  If you have a table or figure that's too wide or long for the page, you
2239  need to:
2240 \end_layout
2241
2242 \begin_deeper
2243 \begin_layout Enumerate
2244 rescale the figure so it fits.
2245 \end_layout
2246
2247 \begin_layout Enumerate
2248 trim down the table so it fits.
2249 \end_layout
2250
2251 \end_deeper
2252 \begin_layout Enumerate
2253 If something else is wrong with the output, and you didn't try to pull anything
2254  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2255 \end_layout
2256
2257 \begin_layout Standard
2258 If all this doesn't help—well, then 
2259 \emph on
2260 perhaps
2261 \emph default
2262  you might have found a bug in \SpecialChar LyX
2263 \SpecialChar ldots
2264 .
2265 \end_layout
2266
2267 \begin_layout Chapter
2268 Supplemental Tools
2269 \end_layout
2270
2271 \begin_layout Section
2272 Customizing Bibliographies with Bib\SpecialChar TeX
2273  or Biblatex
2274 \end_layout
2275
2276 \begin_layout Standard
2277 The most basic information about how to use Bib\SpecialChar TeX
2278  or 
2279 \family sans
2280 Biblatex
2281 \family default
2282  with \SpecialChar LyX
2283  is contained in the section 
2284 \emph on
2285 Bibliography databases
2286 \emph default
2287  of the 
2288 \emph on
2289 User's Guide
2290 \emph default
2291 .
2292  The following subsections explain special bibliography features supported
2293  by \SpecialChar LyX
2294 .
2295 \end_layout
2296
2297 \begin_layout Subsection
2298 Alternative Citation Styles
2299 \end_layout
2300
2301 \begin_layout Standard
2302 Standard Bib\SpecialChar TeX
2303  uses numbers (e.
2304 \begin_inset space \thinspace{}
2305 \end_inset
2306
2307 g.
2308 \begin_inset space \space{}
2309 \end_inset
2310
2311
2312 \begin_inset Quotes eld
2313 \end_inset
2314
2315 [12]
2316 \begin_inset Quotes erd
2317 \end_inset
2318
2319 ) to refer to a cited work.
2320  However, in many scientific disciplines, other citation styles are in use.
2321  The most common one is the author-year style (e.
2322 \begin_inset space \thinspace{}
2323 \end_inset
2324
2325 g.
2326 \begin_inset space \space{}
2327 \end_inset
2328
2329
2330 \begin_inset Quotes eld
2331 \end_inset
2332
2333 Knuth 1984a
2334 \begin_inset Quotes erd
2335 \end_inset
2336
2337 ).
2338  \SpecialChar LyX
2339  supports three packages that provide this style, 
2340 \begin_inset Flex Code
2341 status collapsed
2342
2343 \begin_layout Plain Layout
2344 biblatex
2345 \end_layout
2346
2347 \end_inset
2348
2349
2350 \begin_inset Flex Code
2351 status collapsed
2352
2353 \begin_layout Plain Layout
2354 natbib
2355 \end_layout
2356
2357 \end_inset
2358
2359 , and 
2360 \begin_inset Flex Code
2361 status collapsed
2362
2363 \begin_layout Plain Layout
2364 jurabib
2365 \end_layout
2366
2367 \end_inset
2368
2369 .
2370  Each of these packages has their pros and cons, which cannot be listed
2371  in detail.
2372  If you only want to have simple author-year (or author-numerical) style,
2373  or if you want to use one of the countless style files for 
2374 \begin_inset Flex Code
2375 status collapsed
2376
2377 \begin_layout Plain Layout
2378 natbib
2379 \end_layout
2380
2381 \end_inset
2382
2383 , then the established 
2384 \begin_inset Flex Code
2385 status collapsed
2386
2387 \begin_layout Plain Layout
2388 natbib
2389 \end_layout
2390
2391 \end_inset
2392
2393  package is probably your choice.
2394  If you look for specific citation styles common in law studies, you might
2395  consider the 
2396 \begin_inset Flex Code
2397 status collapsed
2398
2399 \begin_layout Plain Layout
2400 jurabib
2401 \end_layout
2402
2403 \end_inset
2404
2405  package.
2406  If you want to have full control over the formatting or look for advanced
2407  features such as ibidem, footnote citations, full title citations, advanced
2408  date formats (such as 400 BC) or full localization to other languages than
2409  English, you should definitely consider 
2410 \begin_inset Flex Code
2411 status collapsed
2412
2413 \begin_layout Plain Layout
2414 biblatex
2415 \end_layout
2416
2417 \end_inset
2418
2419 , which exceeds all other packages in terms of features, but is also quite
2420  heavy and more resource-hungry.
2421 \end_layout
2422
2423 \begin_layout Standard
2424 The handling of these packages in \SpecialChar LyX
2425  is basically the same.
2426  Go to 
2427 \begin_inset Flex Noun
2428 status collapsed
2429
2430 \begin_layout Plain Layout
2431 Document\SpecialChar menuseparator
2432 Settings
2433 \end_layout
2434
2435 \end_inset
2436
2437  and select under 
2438 \begin_inset Flex Noun
2439 status collapsed
2440
2441 \begin_layout Plain Layout
2442 Bibliography
2443 \end_layout
2444
2445 \end_inset
2446
2447  the 
2448 \begin_inset Flex Noun
2449 status collapsed
2450
2451 \begin_layout Plain Layout
2452 Style Format
2453 \end_layout
2454
2455 \end_inset
2456
2457  
2458 \begin_inset Flex Noun
2459 status collapsed
2460
2461 \begin_layout Plain Layout
2462 Basic (BibTeX)
2463 \end_layout
2464
2465 \end_inset
2466
2467
2468 \begin_inset Flex Noun
2469 status collapsed
2470
2471 \begin_layout Plain Layout
2472 Biblatex
2473 \end_layout
2474
2475 \end_inset
2476
2477
2478 \begin_inset Flex Noun
2479 status collapsed
2480
2481 \begin_layout Plain Layout
2482 Biblatex (Natbib mode)
2483 \end_layout
2484
2485 \end_inset
2486
2487
2488 \begin_inset Flex Noun
2489 status collapsed
2490
2491 \begin_layout Plain Layout
2492 Natbib (BibTeX)
2493 \end_layout
2494
2495 \end_inset
2496
2497  or 
2498 \begin_inset Flex Noun
2499 status collapsed
2500
2501 \begin_layout Plain Layout
2502 Jurabib (BibTeX)
2503 \end_layout
2504
2505 \end_inset
2506
2507  (see sec.
2508 \begin_inset space ~
2509 \end_inset
2510
2511 6.5.3 in the User's Guide for more information on these choices).
2512  With all these packages, you will get some extra features in the citation
2513  dialog and you can select the style of the reference (
2514 \begin_inset Quotes eld
2515 \end_inset
2516
2517 Knuth 1984
2518 \begin_inset Quotes erd
2519 \end_inset
2520
2521
2522 \begin_inset Quotes eld
2523 \end_inset
2524
2525 Knuth (1984)
2526 \begin_inset Quotes erd
2527 \end_inset
2528
2529
2530 \begin_inset Quotes eld
2531 \end_inset
2532
2533 Knuth, 1984
2534 \begin_inset Quotes erd
2535 \end_inset
2536
2537
2538 \begin_inset Quotes eld
2539 \end_inset
2540
2541 1984
2542 \begin_inset Quotes erd
2543 \end_inset
2544
2545  etc.).
2546  Note that either package needs specifically designed style files.
2547  They all ship their own, but there are lots of additional style files,
2548  and there is even an interactive style file builder
2549 \begin_inset Foot
2550 status collapsed
2551
2552 \begin_layout Plain Layout
2553 See 
2554 \begin_inset Flex URL
2555 status open
2556
2557 \begin_layout Plain Layout
2558
2559 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2560 \end_layout
2561
2562 \end_inset
2563
2564
2565 \end_layout
2566
2567 \end_inset
2568
2569  for 
2570 \begin_inset Flex Code
2571 status collapsed
2572
2573 \begin_layout Plain Layout
2574 natbib
2575 \end_layout
2576
2577 \end_inset
2578
2579 .
2580 \end_layout
2581
2582 \begin_layout Subsection
2583 Subdivided Bibliographies
2584 \end_layout
2585
2586 \begin_layout Standard
2587 Sometimes you might need to divide your bibliography into several sections.
2588  If you are for instance a historian, the possibility to separate sources
2589  and scientific works is most likely a 
2590 \begin_inset Quotes eld
2591 \end_inset
2592
2593 must have
2594 \begin_inset Quotes erd
2595 \end_inset
2596
2597 .
2598  Unfortunately, Bib\SpecialChar TeX
2599  itself does not allow you to do this.
2600  But with the help of some \SpecialChar LaTeX
2601  packages, Bib\SpecialChar TeX
2602  can be extended to fit your needs.
2603 \end_layout
2604
2605 \begin_layout Standard
2606 \SpecialChar LyX
2607  provides native support for one of these packages, 
2608 \family typewriter
2609 bibtopic
2610 \family default
2611 .
2612 \begin_inset Foot
2613 status collapsed
2614
2615 \begin_layout Plain Layout
2616 Available from 
2617 \begin_inset Flex URL
2618 status open
2619
2620 \begin_layout Plain Layout
2621
2622 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2623 \end_layout
2624
2625 \end_inset
2626
2627
2628 \end_layout
2629
2630 \end_inset
2631
2632  The advantage of this package (compared to other packages such as 
2633 \family typewriter
2634 multibib
2635 \family default
2636 ) is that you don't need to define new citation commands.
2637  Instead, you need to prepare different bibliographic databases which include
2638  the entries for the different sections of the bibliography.
2639  For example: If you want to divide your bibliography into the sections
2640  
2641 \begin_inset Quotes eld
2642 \end_inset
2643
2644 Sources
2645 \begin_inset Quotes erd
2646 \end_inset
2647
2648  and 
2649 \begin_inset Quotes eld
2650 \end_inset
2651
2652 Scientific works
2653 \begin_inset Quotes erd
2654 \end_inset
2655
2656 , you first need to create two bibliographic databases, e.
2657 \begin_inset space \thinspace{}
2658 \end_inset
2659
2660 g.
2661 \begin_inset space \space{}
2662 \end_inset
2663
2664
2665 \begin_inset Flex Code
2666 status collapsed
2667
2668 \begin_layout Plain Layout
2669 sources.bib
2670 \end_layout
2671
2672 \end_inset
2673
2674  and 
2675 \begin_inset Flex Code
2676 status collapsed
2677
2678 \begin_layout Plain Layout
2679 scientific.bib
2680 \end_layout
2681
2682 \end_inset
2683
2684 .
2685  
2686 \end_layout
2687
2688 \begin_layout Standard
2689 Go to 
2690 \begin_inset Flex Noun
2691 status collapsed
2692
2693 \begin_layout Plain Layout
2694 Document\SpecialChar menuseparator
2695 Settings
2696 \end_layout
2697
2698 \end_inset
2699
2700  and check under 
2701 \begin_inset Flex Noun
2702 status collapsed
2703
2704 \begin_layout Plain Layout
2705 Bibliography
2706 \end_layout
2707
2708 \end_inset
2709
2710  the option 
2711 \begin_inset Flex Noun
2712 status collapsed
2713
2714 \begin_layout Plain Layout
2715 Subdivided bibliography
2716 \end_layout
2717
2718 \end_inset
2719
2720 .
2721  Now you can insert multiple Bib\SpecialChar TeX
2722  bibliographies, one for each section of
2723  your bibliography.
2724  Returning to our example: Insert the Bib\SpecialChar TeX
2725  bibliography 
2726 \begin_inset Flex Code
2727 status collapsed
2728
2729 \begin_layout Plain Layout
2730 sources.bib
2731 \end_layout
2732
2733 \end_inset
2734
2735  and a second one for the database 
2736 \begin_inset Flex Code
2737 status collapsed
2738
2739 \begin_layout Plain Layout
2740 scientific.bib
2741 \end_layout
2742
2743 \end_inset
2744
2745 .
2746  You are free to use the same or different styles for each section.
2747  Additionally, you can choose if the bibliography section should contain
2748  
2749 \begin_inset Quotes eld
2750 \end_inset
2751
2752 all cited references
2753 \begin_inset Quotes erd
2754 \end_inset
2755
2756  of the specified database(s) (which is the default), 
2757 \begin_inset Quotes eld
2758 \end_inset
2759
2760 all uncited references
2761 \begin_inset Quotes erd
2762 \end_inset
2763
2764  or even 
2765 \begin_inset Quotes eld
2766 \end_inset
2767
2768 all references
2769 \begin_inset Quotes erd
2770 \end_inset
2771
2772 .
2773  This might be useful if you would like to separate your bibliography into
2774  three sections: 
2775 \begin_inset Quotes eld
2776 \end_inset
2777
2778 Cited sources
2779 \begin_inset Quotes erd
2780 \end_inset
2781
2782
2783 \begin_inset Quotes eld
2784 \end_inset
2785
2786 Uncited sources
2787 \begin_inset Quotes erd
2788 \end_inset
2789
2790 , and 
2791 \begin_inset Quotes eld
2792 \end_inset
2793
2794 Scientific works
2795 \begin_inset Quotes erd
2796 \end_inset
2797
2798 .
2799  The titles for the sections can be added as ordinary sections or subsections.
2800  Since 
2801 \begin_inset Flex Code
2802 status collapsed
2803
2804 \begin_layout Plain Layout
2805 bibtopic
2806 \end_layout
2807
2808 \end_inset
2809
2810  removes the bibliography title, you have to manually re-add that, too (as
2811  a chapter* or section*, for instance).
2812 \end_layout
2813
2814 \begin_layout Standard
2815 With 
2816 \family sans
2817 Biblatex
2818 \family default
2819 , the procedure is a bit different.
2820  Since 
2821 \family typewriter
2822 bibtopic
2823 \family default
2824  does not work with 
2825 \family sans
2826 Biblatex
2827 \family default
2828 , the aforementioned 
2829 \begin_inset Flex Noun
2830 status collapsed
2831
2832 \begin_layout Plain Layout
2833 Subdivided bibliography
2834 \end_layout
2835
2836 \end_inset
2837
2838  option is disabled if you use 
2839 \family sans
2840 Biblatex
2841 \family default
2842 .
2843  However, 
2844 \family sans
2845 Biblatex
2846 \family default
2847  provides its own means to generate subdivided bibliographies.
2848  You can either add keywords to bibliography entries via the 
2849 \begin_inset Flex Code
2850 status collapsed
2851
2852 \begin_layout Plain Layout
2853 keywords
2854 \end_layout
2855
2856 \end_inset
2857
2858  entry option and then filter bibliography sections by keyword (by adding
2859  
2860 \begin_inset Flex Code
2861 status collapsed
2862
2863 \begin_layout Plain Layout
2864 keyword=mykeyword
2865 \end_layout
2866
2867 \end_inset
2868
2869  to the 
2870 \begin_inset Flex Noun
2871 status collapsed
2872
2873 \begin_layout Plain Layout
2874 Options
2875 \end_layout
2876
2877 \end_inset
2878
2879  field of the dialog that opens if you left-click on the 
2880 \begin_inset Flex Noun
2881 status collapsed
2882
2883 \begin_layout Plain Layout
2884 Biblatex Generated Bibliography
2885 \end_layout
2886
2887 \end_inset
2888
2889  button), or you can filter by entry types (such as 
2890 \emph on
2891 book
2892 \emph default
2893  or 
2894 \emph on
2895 article
2896 \emph default
2897 ) by entering e.
2898 \begin_inset space \thinspace{}
2899 \end_inset
2900
2901 g.
2902  
2903 \begin_inset Flex Code
2904 status collapsed
2905
2906 \begin_layout Plain Layout
2907 type=book
2908 \end_layout
2909
2910 \end_inset
2911
2912  or 
2913 \begin_inset Flex Code
2914 status collapsed
2915
2916 \begin_layout Plain Layout
2917 nottype=collection
2918 \end_layout
2919
2920 \end_inset
2921
2922  to the mentioned 
2923 \begin_inset Flex Noun
2924 status collapsed
2925
2926 \begin_layout Plain Layout
2927 Options
2928 \end_layout
2929
2930 \end_inset
2931
2932  field, or you can create so-called 
2933 \begin_inset Quotes eld
2934 \end_inset
2935
2936 Bibliography Categories
2937 \begin_inset Quotes erd
2938 \end_inset
2939
2940  to which you can assign individual entries.
2941  Please refer to the Biblatex manual, section 
2942 \emph on
2943 Subdivided Bibliographies
2944 \emph default
2945 , for details.
2946 \end_layout
2947
2948 \begin_layout Subsection
2949 Multiple Bibliographies
2950 \begin_inset CommandInset label
2951 LatexCommand label
2952 name "subsec:Multiple-Bibliographies"
2953
2954 \end_inset
2955
2956
2957 \end_layout
2958
2959 \begin_layout Standard
2960 Multiple bibliographies, e.
2961 \begin_inset space \thinspace{}
2962 \end_inset
2963
2964 g.
2965 \begin_inset space \space{}
2966 \end_inset
2967
2968 a bibliography for each part, chapter, section, subsection or child (sub-documen
2969 t) of the document, are also supported by \SpecialChar LyX
2970 .
2971  In order to enable it, go to 
2972 \begin_inset Flex Noun
2973 status collapsed
2974
2975 \begin_layout Plain Layout
2976 Document\SpecialChar menuseparator
2977 Settings\SpecialChar menuseparator
2978 Bibliography
2979 \end_layout
2980
2981 \end_inset
2982
2983  and select the relevant unit (e.
2984 \begin_inset space \thinspace{}
2985 \end_inset
2986
2987 g., 
2988 \begin_inset Quotes eld
2989 \end_inset
2990
2991 per section
2992 \begin_inset Quotes erd
2993 \end_inset
2994
2995 ) in the 
2996 \begin_inset Flex Noun
2997 status collapsed
2998
2999 \begin_layout Plain Layout
3000 Multiple Bibliographies
3001 \end_layout
3002
3003 \end_inset
3004
3005  combo box.
3006  Then add a Bib(la)\SpecialChar TeX
3007  bibliography to each unit (e.
3008 \begin_inset space \thinspace{}
3009 \end_inset
3010
3011 g., section) of your document.
3012  In the output, a separate bibliography, containing only the references
3013  done in the current unit is generated.
3014 \end_layout
3015
3016 \begin_layout Standard
3017 If you use Bib\SpecialChar TeX
3018 , either the 
3019 \begin_inset Flex Code
3020 status collapsed
3021
3022 \begin_layout Plain Layout
3023 chapterbib
3024 \end_layout
3025
3026 \end_inset
3027
3028  or the 
3029 \begin_inset Flex Code
3030 status collapsed
3031
3032 \begin_layout Plain Layout
3033 bibtopic
3034 \end_layout
3035
3036 \end_inset
3037
3038  package is used to create multiple bibliographies.
3039  The former package is used if you select 
3040 \begin_inset Quotes eld
3041 \end_inset
3042
3043 per child document
3044 \begin_inset Quotes erd
3045 \end_inset
3046
3047  and do 
3048 \emph on
3049 not
3050 \emph default
3051  check 
3052 \begin_inset Flex Noun
3053 status collapsed
3054
3055 \begin_layout Plain Layout
3056 Sectioned Bibliography
3057 \end_layout
3058
3059 \end_inset
3060
3061 .
3062  In all other cases, 
3063 \begin_inset Flex Code
3064 status collapsed
3065
3066 \begin_layout Plain Layout
3067 bibtopic
3068 \end_layout
3069
3070 \end_inset
3071
3072  is used.
3073 \begin_inset Foot
3074 status collapsed
3075
3076 \begin_layout Plain Layout
3077 An alternative approach, if you are willing to use some 
3078 \begin_inset Flex Noun
3079 status collapsed
3080
3081 \begin_layout Plain Layout
3082 \SpecialChar TeX
3083  Code
3084 \end_layout
3085
3086 \end_inset
3087
3088  (see section
3089 \begin_inset space ~
3090 \end_inset
3091
3092
3093 \begin_inset CommandInset ref
3094 LatexCommand ref
3095 reference "sec:Inserting-TeX-Code"
3096
3097 \end_inset
3098
3099 ), is to use the 
3100 \begin_inset Flex Code
3101 status collapsed
3102
3103 \begin_layout Plain Layout
3104 bibunits
3105 \end_layout
3106
3107 \end_inset
3108
3109  package.
3110 \end_layout
3111
3112 \end_inset
3113
3114  If 
3115 \begin_inset Flex Code
3116 status collapsed
3117
3118 \begin_layout Plain Layout
3119 bibtopic
3120 \end_layout
3121
3122 \end_inset
3123
3124  is used, \SpecialChar LyX
3125  encloses the specified units in 
3126 \begin_inset Flex Code
3127 status collapsed
3128
3129 \begin_layout Plain Layout
3130 bibtopic
3131 \end_layout
3132
3133 \end_inset
3134
3135 's 
3136 \begin_inset Flex Code
3137 status collapsed
3138
3139 \begin_layout Plain Layout
3140
3141 \backslash
3142 begin{btUnit}
3143 \end_layout
3144
3145 \end_inset
3146
3147  and 
3148 \begin_inset Flex Code
3149 status collapsed
3150
3151 \begin_layout Plain Layout
3152
3153 \backslash
3154 end{btUnit}
3155 \end_layout
3156
3157 \end_inset
3158
3159  in order to create the units.
3160  Note that this approach has some limitations.
3161  First, every citation reference has to be inside some 
3162 \begin_inset Flex Code
3163 status collapsed
3164
3165 \begin_layout Plain Layout
3166 btUnit
3167 \end_layout
3168
3169 \end_inset
3170
3171 .
3172  So citations outside a defined unit (e.
3173 \begin_inset space \thinspace{}
3174 \end_inset
3175
3176 g., before the first section if you use 
3177 \begin_inset Quotes eld
3178 \end_inset
3179
3180 by section
3181 \begin_inset Quotes erd
3182 \end_inset
3183
3184 ) will appear as 
3185 \begin_inset Quotes eld
3186 \end_inset
3187
3188 ???
3189 \begin_inset Quotes erd
3190 \end_inset
3191
3192 .
3193  You can also create your own units by entering 
3194 \begin_inset Flex Code
3195 status collapsed
3196
3197 \begin_layout Plain Layout
3198
3199 \backslash
3200 begin{btUnit}
3201 \end_layout
3202
3203 \end_inset
3204
3205  and 
3206 \begin_inset Flex Code
3207 status collapsed
3208
3209 \begin_layout Plain Layout
3210
3211 \backslash
3212 end{btUnit}
3213 \end_layout
3214
3215 \end_inset
3216
3217  as \SpecialChar TeX
3218  code (for instance to work around the mentioned limitation).
3219  Note, though, that 
3220 \begin_inset Flex Code
3221 status collapsed
3222
3223 \begin_layout Plain Layout
3224 btUnit
3225 \end_layout
3226
3227 \end_inset
3228
3229 s cannot be nested.
3230  A second limitation is that 
3231 \begin_inset Flex Code
3232 status collapsed
3233
3234 \begin_layout Plain Layout
3235 bibtopic
3236 \end_layout
3237
3238 \end_inset
3239
3240  always processes all references of a bibliography database, even if they
3241  are not cited.
3242  This can result in odd labels (e.
3243 \begin_inset space \thinspace{}
3244 \end_inset
3245
3246 g.
3247  
3248 \begin_inset Quotes eld
3249 \end_inset
3250
3251 Miller 2014b
3252 \begin_inset Quotes erd
3253 \end_inset
3254
3255  if two works of this author from 2014 are in the database, even if only
3256  one is cited).
3257 \end_layout
3258
3259 \begin_layout Standard
3260 If you use 
3261 \family sans
3262 Biblatex
3263 \family default
3264 , the 
3265 \begin_inset Flex Code
3266 status collapsed
3267
3268 \begin_layout Plain Layout
3269 refsection
3270 \end_layout
3271
3272 \end_inset
3273
3274  option is used instead.
3275  If you need specific units, you can start them with the \SpecialChar TeX
3276  code 
3277 \begin_inset Flex Code
3278 status collapsed
3279
3280 \begin_layout Plain Layout
3281
3282 \backslash
3283 newrefsection
3284 \end_layout
3285
3286 \end_inset
3287
3288  or 
3289 \begin_inset Flex Code
3290 status collapsed
3291
3292 \begin_layout Plain Layout
3293
3294 \backslash
3295 newrefsegment
3296 \end_layout
3297
3298 \end_inset
3299
3300 , respectively.
3301  If you also want to control the end of the unit, use the environment 
3302 \begin_inset Flex Code
3303 status collapsed
3304
3305 \begin_layout Plain Layout
3306
3307 \backslash
3308 begin{refsection}
3309 \end_layout
3310
3311 \end_inset
3312
3313  \SpecialChar ldots
3314  
3315 \begin_inset Flex Code
3316 status collapsed
3317
3318 \begin_layout Plain Layout
3319
3320 \backslash
3321 end{refsection}
3322 \end_layout
3323
3324 \end_inset
3325
3326  instead.
3327  Note, though, that 
3328 \begin_inset Flex Code
3329 status collapsed
3330
3331 \begin_layout Plain Layout
3332 refsection
3333 \end_layout
3334
3335 \end_inset
3336
3337 s cannot be nested.
3338  In addition to the individual bibliography of the current unit, 
3339 \family sans
3340 Biblatex
3341 \family default
3342  also provides an easy way to output all bibliographies, subsequently, at
3343  one place (e.
3344 \begin_inset space \thinspace{}
3345 \end_inset
3346
3347 g., at the end of the document).
3348  Select 
3349 \begin_inset Quotes eld
3350 \end_inset
3351
3352 all reference units
3353 \begin_inset Quotes erd
3354 \end_inset
3355
3356  from the Content combo box of the Bib(la)TeX inset dialog in order to achieve
3357  this.
3358  Please refer to the 
3359 \family sans
3360 Biblatex
3361 \family default
3362  manual for more information on this topic.
3363 \end_layout
3364
3365 \begin_layout Section
3366 Multipart Documents
3367 \end_layout
3368
3369 \begin_layout Subsection
3370 General Operation
3371 \end_layout
3372
3373 \begin_layout Standard
3374 When you are working on a large file with many sections, it is often convenient
3375  to break up the document into several files, or perhaps you have something
3376  where a table may change from time to time, but the preceding text does
3377  not.
3378  In these cases, you should seriously consider using multipart documents.
3379  For example, scientific papers often have five major sections: the introduction
3380 , observations, results, discussion, and conclusion.
3381  Each of these could be its own separate \SpecialChar LyX
3382  file, with one 
3383 \begin_inset Quotes eld
3384 \end_inset
3385
3386 master
3387 \begin_inset Quotes erd
3388 \end_inset
3389
3390  file which contains the title, authors, abstract, references, etc., plus
3391  the five included files.
3392  It is important to note that each of these files is a full \SpecialChar LyX
3393  file which
3394  can be formatted and printed on its own, as well as included in a master
3395  file.
3396  Each of these files must have the same document class, however—don't attempt
3397  to mix book classes with article classes.
3398  You may also include \SpecialChar LaTeX
3399  files; however, these files must not have their own
3400  preamble (i.
3401 \begin_inset space \thinspace{}
3402 \end_inset
3403
3404 e.
3405 \begin_inset space \space{}
3406 \end_inset
3407
3408 everything up to and including the 
3409 \begin_inset Flex Code
3410 status collapsed
3411
3412 \begin_layout Plain Layout
3413
3414 \backslash
3415 begin{document}
3416 \end_layout
3417
3418 \end_inset
3419
3420  line as well as the 
3421 \begin_inset Flex Code
3422 status collapsed
3423
3424 \begin_layout Plain Layout
3425
3426 \backslash
3427 end{document}
3428 \end_layout
3429
3430 \end_inset
3431
3432  line must be deleted) or else errors will be generated when you try to
3433  make a DVI file.
3434 \end_layout
3435
3436 \begin_layout Standard
3437 \SpecialChar LyX
3438  allows you to include files quite easily with 
3439 \begin_inset Flex Noun
3440 status collapsed
3441
3442 \begin_layout Plain Layout
3443 Insert\SpecialChar menuseparator
3444 Child
3445 \begin_inset space ~
3446 \end_inset
3447
3448 Document
3449 \end_layout
3450
3451 \end_inset
3452
3453 .
3454  When you click on this selection a small box is inserted into the file
3455  at the current cursor location.
3456  Clicking on the box raises a dialog which allows you to select the file
3457  to be included, and the method of its inclusion.
3458  
3459 \end_layout
3460
3461 \begin_layout Standard
3462 The file selection box should by now be obvious.
3463  The three inclusion methods are 
3464 \begin_inset Quotes eld
3465 \end_inset
3466
3467 include
3468 \begin_inset Quotes erd
3469 \end_inset
3470
3471
3472 \begin_inset Quotes eld
3473 \end_inset
3474
3475 input
3476 \begin_inset Quotes erd
3477 \end_inset
3478
3479 , and 
3480 \begin_inset Quotes eld
3481 \end_inset
3482
3483 verbatim
3484 \begin_inset Quotes erd
3485 \end_inset
3486
3487 .
3488  The methods 
3489 \begin_inset Quotes eld
3490 \end_inset
3491
3492 include
3493 \begin_inset Quotes erd
3494 \end_inset
3495
3496  and 
3497 \begin_inset Quotes eld
3498 \end_inset
3499
3500 input
3501 \begin_inset Quotes erd
3502 \end_inset
3503
3504  are similar in many ways, but there are also some notable differences:
3505 \end_layout
3506
3507 \begin_layout Enumerate
3508 Files that are 
3509 \begin_inset Quotes eld
3510 \end_inset
3511
3512 included
3513 \begin_inset Quotes erd
3514 \end_inset
3515
3516  are typeset beginning on a new page, while files that are 
3517 \begin_inset Quotes eld
3518 \end_inset
3519
3520 inputted
3521 \begin_inset Quotes erd
3522 \end_inset
3523
3524  are typeset starting on the current page.
3525 \end_layout
3526
3527 \begin_layout Enumerate
3528 \begin_inset Quotes eld
3529 \end_inset
3530
3531 Included
3532 \begin_inset Quotes erd
3533 \end_inset
3534
3535  files cannot themselves 
3536 \begin_inset Quotes eld
3537 \end_inset
3538
3539 include
3540 \begin_inset Quotes erd
3541 \end_inset
3542
3543  further files (
3544 \begin_inset Quotes eld
3545 \end_inset
3546
3547 grandchilds
3548 \begin_inset Quotes erd
3549 \end_inset
3550
3551 ).
3552  With 
3553 \begin_inset Quotes eld
3554 \end_inset
3555
3556 input
3557 \begin_inset Quotes erd
3558 \end_inset
3559
3560 , on the other hand, infinite sub-inputting is possible.
3561 \end_layout
3562
3563 \begin_layout Enumerate
3564 \begin_inset Quotes eld
3565 \end_inset
3566
3567 Include
3568 \begin_inset Quotes erd
3569 \end_inset
3570
3571  allow for the output of only selected 
3572 \begin_inset Quotes eld
3573 \end_inset
3574
3575 included
3576 \begin_inset Quotes erd
3577 \end_inset
3578
3579  files, while maintaining the actual counters (pagination etc.) and references
3580  (please refer to the section 
3581 \emph on
3582 Child
3583 \begin_inset space ~
3584 \end_inset
3585
3586 Documents
3587 \emph default
3588  of the 
3589 \emph on
3590 Embedded
3591 \begin_inset space ~
3592 \end_inset
3593
3594 Objects
3595 \emph default
3596  manual for details).
3597 \end_layout
3598
3599 \begin_layout Standard
3600 Hence, 
3601 \begin_inset Quotes eld
3602 \end_inset
3603
3604 include
3605 \begin_inset Quotes erd
3606 \end_inset
3607
3608  is the preferred method for chapters that are outsourced to child documents,
3609  while 
3610 \begin_inset Quotes eld
3611 \end_inset
3612
3613 input
3614 \begin_inset Quotes erd
3615 \end_inset
3616
3617  is more suitable for arbitrary file inheritance.
3618 \end_layout
3619
3620 \begin_layout Standard
3621
3622 \begin_inset Quotes eld
3623 \end_inset
3624
3625 verbatim
3626 \begin_inset Quotes erd
3627 \end_inset
3628
3629  included file allows you to include a file typeset exactly as it appears
3630  in the file, i.
3631 \begin_inset space \thinspace{}
3632 \end_inset
3633
3634 e.
3635 \begin_inset space \space{}
3636 \end_inset
3637
3638 in 
3639 \begin_inset Flex Code
3640 status collapsed
3641
3642 \begin_layout Plain Layout
3643 verbatim
3644 \end_layout
3645
3646 \end_inset
3647
3648  mode, with the characters set in a fixed-width typewriter font.
3649  Normally, spaces in this file are invisible, though two consecutive spaces
3650  are conserved, unlike \SpecialChar LyX
3651 's normal treatment of spaces.
3652  However, setting the 
3653 \begin_inset Flex Noun
3654 status collapsed
3655
3656 \begin_layout Plain Layout
3657 Mark
3658 \begin_inset space ~
3659 \end_inset
3660
3661 spaces
3662 \begin_inset space ~
3663 \end_inset
3664
3665 in
3666 \begin_inset space ~
3667 \end_inset
3668
3669 output
3670 \end_layout
3671
3672 \end_inset
3673
3674  checkbox typesets a mark to unambiguously define the presence of a space.
3675  
3676 \end_layout
3677
3678 \begin_layout Standard
3679 Generally, the master file is converted into a full \SpecialChar LaTeX
3680  file before typesetting,
3681  while the included files are converted to \SpecialChar LaTeX
3682  files that do not have all the
3683  preamble information.
3684 \end_layout
3685
3686 \begin_layout Subsection
3687 Cross-References Between Files
3688 \end_layout
3689
3690 \begin_layout Standard
3691 \begin_inset Box Shadowbox
3692 position "t"
3693 hor_pos "c"
3694 has_inner_box 1
3695 inner_pos "t"
3696 use_parbox 0
3697 use_makebox 0
3698 width "100col%"
3699 special "none"
3700 height "1in"
3701 height_special "totalheight"
3702 thickness "0.4pt"
3703 separation "3pt"
3704 shadowsize "4pt"
3705 framecolor "black"
3706 backgroundcolor "none"
3707 status open
3708
3709 \begin_layout Plain Layout
3710 This section is somewhat out of date.
3711  Need to describe default master documents and how children are opened when
3712  the master is.
3713  [[FIXME]]
3714 \end_layout
3715
3716 \end_inset
3717
3718
3719 \end_layout
3720
3721 \begin_layout Standard
3722 It is possible to set up cross-references between the different files.
3723  First, open all the files in question: let's call them A and B in a two
3724  file example, where B is included in A.
3725  Let's say you insert a label in A, then want to reference it in B.
3726  Open the cross-reference dialog whilst in document B, and you can select
3727  the 
3728 \begin_inset Quotes eld
3729 \end_inset
3730
3731 buffer
3732 \begin_inset Quotes erd
3733 \end_inset
3734
3735  to use.
3736 \end_layout
3737
3738 \begin_layout Subsection
3739 Bibliography Lists in all Subdocuments
3740 \end_layout
3741
3742 \begin_layout Standard
3743 If you work with child documents, you might want to have only one main bibliogra
3744 phy at the end, but still be able to have a selected bibliography for the
3745  child if you output it on its own.
3746  Here is how to achieve this.
3747 \end_layout
3748
3749 \begin_layout Standard
3750 For the main document, you just insert a bibliography inset at the place
3751  where the main bibliography has to appear (within the master file or within
3752  a child).
3753  If the bibliography inset is in the master file, the references will be
3754  inherited by all children, so they are available in the citation dialog
3755  within each child.
3756 \end_layout
3757
3758 \begin_layout Standard
3759 For child-specific bibliographies, insert bibliography insets within the
3760  child documents, at the place where the bibliography should appear when
3761  the child is compiled separately.
3762  However, the trick is to insert them into a branch (
3763 \family sans
3764 Insert\SpecialChar menuseparator
3765 Branch\SpecialChar menuseparator
3766 Insert New Branch...
3767 \family default
3768 ), e.
3769 \begin_inset space \thinspace{}
3770 \end_inset
3771
3772 g.
3773  called 
3774 \begin_inset Quotes eld
3775 \end_inset
3776
3777 Childonly
3778 \begin_inset Quotes erd
3779 \end_inset
3780
3781 .
3782  Within the children, activate the branch (
3783 \family sans
3784 Document\SpecialChar menuseparator
3785 Settings...\SpecialChar menuseparator
3786 Branches
3787 \family default
3788 ).
3789  Within the master, deactivate the branch (
3790 \family sans
3791 Document\SpecialChar menuseparator
3792 Settings...\SpecialChar menuseparator
3793 Branches
3794 \family default
3795 ).
3796  Now the child's bibliography will be ignored by the master, but considered
3797  by the child.
3798 \end_layout
3799
3800 \begin_layout Standard
3801 If you need multiple bibliographies (e.
3802 \begin_inset space \thinspace{}
3803 \end_inset
3804
3805 g., one per child in the 
3806 \emph on
3807 main document
3808 \emph default
3809 ), please refer to sec.
3810 \begin_inset space ~
3811 \end_inset
3812
3813
3814 \begin_inset CommandInset ref
3815 LatexCommand ref
3816 reference "subsec:Multiple-Bibliographies"
3817
3818 \end_inset
3819
3820 .
3821 \end_layout
3822
3823 \begin_layout Section
3824 \SpecialChar LyX
3825  Archives
3826 \end_layout
3827
3828 \begin_layout Standard
3829 Users sometimes need to be able to 
3830 \begin_inset Quotes eld
3831 \end_inset
3832
3833 bundle
3834 \begin_inset Quotes erd
3835 \end_inset
3836
3837  a \SpecialChar LyX
3838  file together with all the images (and other files) on which it depends,
3839  either for sending to a publisher or for sharing with a co-author.
3840  \SpecialChar LyX
3841  includes a Python script (
3842 \begin_inset Flex Code
3843 status collapsed
3844
3845 \begin_layout Plain Layout
3846 lyxpak.py
3847 \end_layout
3848
3849 \end_inset
3850
3851 ) that automates this process.
3852  To use it, you must have either the 
3853 \begin_inset Flex Code
3854 status collapsed
3855
3856 \begin_layout Plain Layout
3857 zipfile
3858 \end_layout
3859
3860 \end_inset
3861
3862  or 
3863 \begin_inset Flex Code
3864 status collapsed
3865
3866 \begin_layout Plain Layout
3867 tarfile
3868 \end_layout
3869
3870 \end_inset
3871
3872  python modules installed on your system.
3873  By default, the script prefers the 
3874 \begin_inset Flex Code
3875 status collapsed
3876
3877 \begin_layout Plain Layout
3878 gzip
3879 \end_layout
3880
3881 \end_inset
3882
3883 -compressed 
3884 \begin_inset Flex Code
3885 status collapsed
3886
3887 \begin_layout Plain Layout
3888 tar
3889 \end_layout
3890
3891 \end_inset
3892
3893  format on Unix-like systems and the 
3894 \begin_inset Flex Code
3895 status collapsed
3896
3897 \begin_layout Plain Layout
3898 zip
3899 \end_layout
3900
3901 \end_inset
3902
3903  format on Windows.
3904 \end_layout
3905
3906 \begin_layout Standard
3907 \SpecialChar LyX
3908 's configuration process will set the script up to export a `\SpecialChar LyX
3909  Archive',
3910  and this format will then be available under 
3911 \begin_inset Flex Code
3912 status collapsed
3913
3914 \begin_layout Plain Layout
3915 File\SpecialChar menuseparator
3916 Export
3917 \end_layout
3918
3919 \end_inset
3920
3921 .
3922 \end_layout
3923
3924 \begin_layout Standard
3925 Independently of the platform, the generation of a particular archive format
3926  can be forced by adding either the 
3927 \begin_inset Flex Code
3928 status collapsed
3929
3930 \begin_layout Plain Layout
3931 -t
3932 \end_layout
3933
3934 \end_inset
3935
3936  (for the 
3937 \begin_inset Flex Code
3938 status collapsed
3939
3940 \begin_layout Plain Layout
3941 tar
3942 \end_layout
3943
3944 \end_inset
3945
3946  format) or 
3947 \begin_inset Flex Code
3948 status collapsed
3949
3950 \begin_layout Plain Layout
3951 -z
3952 \end_layout
3953
3954 \end_inset
3955
3956  (for the 
3957 \begin_inset Flex Code
3958 status collapsed
3959
3960 \begin_layout Plain Layout
3961 zip
3962 \end_layout
3963
3964 \end_inset
3965
3966  format) switch to the 
3967 \begin_inset Flex Code
3968 status collapsed
3969
3970 \begin_layout Plain Layout
3971 \SpecialChar LyX
3972 \SpecialChar menuseparator
3973 \SpecialChar LyX
3974  Archive
3975 \end_layout
3976
3977 \end_inset
3978
3979  converter in 
3980 \begin_inset Flex Code
3981 status collapsed
3982
3983 \begin_layout Plain Layout
3984 Tools\SpecialChar menuseparator
3985 Preferences\SpecialChar menuseparator
3986 File Handling\SpecialChar menuseparator
3987 Converters
3988 \end_layout
3989
3990 \end_inset
3991
3992 .
3993  (Make sure you add the switch after the script name, not before it.)
3994 \end_layout
3995
3996 \begin_layout Section
3997 Fancy Headers and Footers
3998 \end_layout
3999
4000 \begin_layout Standard
4001 The default page layout is rather plain; for an 
4002 \begin_inset Flex Code
4003 status collapsed
4004
4005 \begin_layout Plain Layout
4006 article
4007 \end_layout
4008
4009 \end_inset
4010
4011  document class, all you get is a centered page number at the bottom of
4012  the page.
4013  This document uses KOMA-script's book class, so it appears to be a bit
4014  fancier.
4015  But to really put on a show, you need to set the document page style to
4016  
4017 \begin_inset Quotes eld
4018 \end_inset
4019
4020 fancy
4021 \begin_inset Quotes erd
4022 \end_inset
4023
4024 , as mentioned in the 
4025 \emph on
4026 User Guide
4027 \emph default
4028 .
4029  This section describes the \SpecialChar LaTeX
4030  code you need to insert in your \SpecialChar LaTeX
4031  preamble in
4032  order to get the desired effects.
4033 \end_layout
4034
4035 \begin_layout Standard
4036 For more information on fancy headers, see the 
4037 \begin_inset Flex Code
4038 status collapsed
4039
4040 \begin_layout Plain Layout
4041 fancyhdr
4042 \end_layout
4043
4044 \end_inset
4045
4046  package documentation.
4047  (
4048 \begin_inset Flex URL
4049 status collapsed
4050
4051 \begin_layout Plain Layout
4052
4053 https://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
4054 \end_layout
4055
4056 \end_inset
4057
4058 )
4059 \end_layout
4060
4061 \begin_layout Standard
4062 The page header is divided into three fields, not surprisingly labeled 
4063 \begin_inset Quotes eld
4064 \end_inset
4065
4066 left
4067 \begin_inset Quotes erd
4068 \end_inset
4069
4070
4071 \begin_inset Quotes eld
4072 \end_inset
4073
4074 center
4075 \begin_inset Quotes erd
4076 \end_inset
4077
4078 , and 
4079 \begin_inset Quotes eld
4080 \end_inset
4081
4082 right
4083 \begin_inset Quotes erd
4084 \end_inset
4085
4086 .
4087  The footer is also divided into these three fields.
4088  The \SpecialChar LaTeX
4089  commands to set these fields in the simplest manner are 
4090 \begin_inset Flex Code
4091 status collapsed
4092
4093 \begin_layout Plain Layout
4094
4095 \backslash
4096 lhead
4097 \end_layout
4098
4099 \end_inset
4100
4101
4102 \begin_inset Flex Code
4103 status collapsed
4104
4105 \begin_layout Plain Layout
4106
4107 \backslash
4108 chead
4109 \end_layout
4110
4111 \end_inset
4112
4113
4114 \begin_inset Flex Code
4115 status collapsed
4116
4117 \begin_layout Plain Layout
4118
4119 \backslash
4120 rhead
4121 \end_layout
4122
4123 \end_inset
4124
4125
4126 \begin_inset Flex Code
4127 status collapsed
4128
4129 \begin_layout Plain Layout
4130
4131 \backslash
4132 lfoot
4133 \end_layout
4134
4135 \end_inset
4136
4137 , etc.
4138  Suppose you wish to put your name in the upper left hand corner of each
4139  page.
4140  Simply insert the following command in the preamble: 
4141 \end_layout
4142
4143 \begin_layout Standard
4144
4145 \family typewriter
4146
4147 \backslash
4148 lhead{John Q.
4149  DocWriter}
4150 \end_layout
4151
4152 \begin_layout Standard
4153 You will now see your name in the upper left.
4154  If a field has a default entry that you would like to get rid of (often
4155  the page number appears in the central footer) simply include a command
4156  with a blank argument, e.
4157 \begin_inset space \thinspace{}
4158 \end_inset
4159
4160 g.:
4161 \end_layout
4162
4163 \begin_layout Standard
4164
4165 \family typewriter
4166
4167 \backslash
4168 cfoot{}
4169 \end_layout
4170
4171 \begin_layout Standard
4172 Let's get really fancy: lets put the section number with the word 
4173 \begin_inset Quotes eld
4174 \end_inset
4175
4176 Section
4177 \begin_inset Quotes erd
4178 \end_inset
4179
4180  (e.
4181 \begin_inset space \thinspace{}
4182 \end_inset
4183
4184 g.
4185 \begin_inset space \space{}
4186 \end_inset
4187
4188 Section 3) in the upper left, the page number (e.
4189 \begin_inset space \thinspace{}
4190 \end_inset
4191
4192 g.
4193 \begin_inset space \space{}
4194 \end_inset
4195
4196 Page 4) in the upper right, your name in the lower left, and the date in
4197  the lower right.
4198  The following commands should now appear in the preamble:
4199 \end_layout
4200
4201 \begin_layout Standard
4202
4203 \family typewriter
4204
4205 \backslash
4206 lhead{Section 
4207 \backslash
4208 thesection}
4209 \end_layout
4210
4211 \begin_layout Standard
4212
4213 \family typewriter
4214
4215 \backslash
4216 chead{}
4217 \end_layout
4218
4219 \begin_layout Standard
4220
4221 \family typewriter
4222
4223 \backslash
4224 rhead{Page 
4225 \backslash
4226 thepage}
4227 \end_layout
4228
4229 \begin_layout Standard
4230
4231 \family typewriter
4232
4233 \backslash
4234 lfoot{John Q.
4235  DocWriter}
4236 \end_layout
4237
4238 \begin_layout Standard
4239
4240 \family typewriter
4241
4242 \backslash
4243 cfoot{}
4244 \end_layout
4245
4246 \begin_layout Standard
4247
4248 \family typewriter
4249
4250 \backslash
4251 rfoot{
4252 \backslash
4253 today}
4254 \end_layout
4255
4256 \begin_layout Standard
4257 The commands 
4258 \begin_inset Flex Code
4259 status collapsed
4260
4261 \begin_layout Plain Layout
4262
4263 \backslash
4264 thesection
4265 \end_layout
4266
4267 \end_inset
4268
4269  and 
4270 \begin_inset Flex Code
4271 status collapsed
4272
4273 \begin_layout Plain Layout
4274
4275 \backslash
4276 thepage
4277 \end_layout
4278
4279 \end_inset
4280
4281  access \SpecialChar LaTeX
4282 's section and page counters, and so print out the current section
4283  and page numbers.
4284  
4285 \begin_inset Flex Code
4286 status collapsed
4287
4288 \begin_layout Plain Layout
4289
4290 \backslash
4291 today
4292 \end_layout
4293
4294 \end_inset
4295
4296  simply prints out today's date.
4297 \end_layout
4298
4299 \begin_layout Standard
4300 The thicknesses of the horizontal rules drawn beneath the header and above
4301  the footer can also be modified.
4302  If you don't want one of the rules, set its thickness to 0.
4303  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
4304  Use commands
4305 \family typewriter
4306  
4307 \family default
4308 like 
4309 \begin_inset Flex Code
4310 status collapsed
4311
4312 \begin_layout Plain Layout
4313
4314 \backslash
4315 renewcommand{
4316 \backslash
4317 headrulewidth}{0.4pt}
4318 \end_layout
4319
4320 \end_inset
4321
4322  and 
4323 \begin_inset Flex Code
4324 status collapsed
4325
4326 \begin_layout Plain Layout
4327
4328 \backslash
4329 renewcommand{
4330 \backslash
4331 footrulewidth}{0.4pt}
4332 \end_layout
4333
4334 \end_inset
4335
4336  to set the thicknesses.
4337 \end_layout
4338
4339 \begin_layout Standard
4340 You can switch the header/footer settings on and off for individual pages
4341  using commands like 
4342 \begin_inset Flex Code
4343 status collapsed
4344
4345 \begin_layout Plain Layout
4346
4347 \backslash
4348 thispagestyle{empty}
4349 \end_layout
4350
4351 \end_inset
4352
4353
4354 \begin_inset Flex Code
4355 status collapsed
4356
4357 \begin_layout Plain Layout
4358
4359 \backslash
4360 thispagestyle{plain}
4361 \end_layout
4362
4363 \end_inset
4364
4365 , and 
4366 \begin_inset Flex Code
4367 status collapsed
4368
4369 \begin_layout Plain Layout
4370
4371 \backslash
4372 thispagestyle{fancy}
4373 \end_layout
4374
4375 \end_inset
4376
4377 .
4378  Simply insert them in the text on the page you want changed and mark them
4379  as \SpecialChar TeX
4380  code.
4381  In fact, title pages are marked as plain by default, while following pages
4382  are marked fancy when using the global fancy setting.
4383 \end_layout
4384
4385 \begin_layout Standard
4386 As a final example, it is possible to include an image in the header or
4387  footer.
4388  Suppose you want to put a company logo in the upper lefthand corner.
4389  You might try something like
4390 \end_layout
4391
4392 \begin_layout Standard
4393
4394 \family typewriter
4395
4396 \backslash
4397 lhead{
4398 \backslash
4399 resizebox{1in}{!}{
4400 \backslash
4401 includegraphics{logo.eps}}}
4402 \end_layout
4403
4404 \begin_layout Standard
4405 \noindent
4406 (you may need to preface this with 
4407 \begin_inset Flex Code
4408 status collapsed
4409
4410 \begin_layout Plain Layout
4411 \noindent
4412
4413 \backslash
4414 usepackage{graphics}
4415 \end_layout
4416
4417 \end_inset
4418
4419  if you don't include graphics elsewhere in your document).
4420 \end_layout
4421
4422 \begin_layout Section
4423 Itemize Bullet Selection
4424 \begin_inset CommandInset label
4425 LatexCommand label
4426 name "sec:bullet"
4427
4428 \end_inset
4429
4430
4431 \end_layout
4432
4433 \begin_layout Standard
4434 by
4435 \noun on
4436  Allan Rae
4437 \end_layout
4438
4439 \begin_layout Subsection
4440 Introduction
4441 \end_layout
4442
4443 \begin_layout Standard
4444 \SpecialChar LyX
4445  provides 216 bullet shapes that can be accessed from a simple dialog.
4446  Using this dialog you can easily specify what bullet shape to use at each
4447  level of an itemized list.
4448  These settings are document-wide so you won't be able to specify different
4449  sets of bullets for different paragraphs.
4450 \begin_inset Foot
4451 status collapsed
4452
4453 \begin_layout Plain Layout
4454 Well, actually you can but you'll have to do it by hand.
4455 \end_layout
4456
4457 \end_inset
4458
4459
4460 \end_layout
4461
4462 \begin_layout Subsection
4463 How it looks
4464 \end_layout
4465
4466 \begin_layout Standard
4467 Open the dialog by selecting the 
4468 \begin_inset Flex Noun
4469 status collapsed
4470
4471 \begin_layout Plain Layout
4472 Document\SpecialChar menuseparator
4473 Settings
4474 \end_layout
4475
4476 \end_inset
4477
4478  menu item and then select the 
4479 \begin_inset Flex Noun
4480 status collapsed
4481
4482 \begin_layout Plain Layout
4483 Bullets
4484 \end_layout
4485
4486 \end_inset
4487
4488  tab.
4489 \end_layout
4490
4491 \begin_layout Standard
4492 The dialog provides you with a table of bullet shapes.
4493  A column of buttons on the left of the table provides access to the six
4494  different panels of bullet shapes.
4495  The row of buttons across the top is used to select which bullet depth
4496  you are changing.
4497  A text entry under the table shows the currently selected bullet shape's
4498  \SpecialChar LaTeX
4499  equivalent and this can be edited if desired.
4500  If you do modify the text you will also need to specify any needed packages
4501  in the \SpecialChar LaTeX
4502  preamble.
4503 \end_layout
4504
4505 \begin_layout Standard
4506 The six panels are divided up by the packages they require.
4507  The following table shows the mappings from button name to \SpecialChar LaTeX
4508  package.
4509 \end_layout
4510
4511 \begin_layout Standard
4512 \align center
4513 \begin_inset Tabular
4514 <lyxtabular version="3" rows="7" columns="2">
4515 <features tabularvalignment="middle">
4516 <column alignment="center" valignment="top" width="0pt">
4517 <column alignment="center" valignment="top" width="0pt">
4518 <row>
4519 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4520 \begin_inset Text
4521
4522 \begin_layout Plain Layout
4523
4524 \family roman
4525 \series medium
4526 \shape up
4527 \size normal
4528 \emph off
4529 \bar no
4530 \noun off
4531 \color none
4532 Button
4533 \end_layout
4534
4535 \end_inset
4536 </cell>
4537 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4538 \begin_inset Text
4539
4540 \begin_layout Plain Layout
4541
4542 \family roman
4543 \series medium
4544 \shape up
4545 \size normal
4546 \emph off
4547 \bar no
4548 \noun off
4549 \color none
4550 Packages Required
4551 \end_layout
4552
4553 \end_inset
4554 </cell>
4555 </row>
4556 <row>
4557 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4558 \begin_inset Text
4559
4560 \begin_layout Plain Layout
4561
4562 \family sans
4563 \series medium
4564 \shape up
4565 \size normal
4566 \emph off
4567 \bar no
4568 \noun off
4569 \color none
4570 Standard
4571 \end_layout
4572
4573 \end_inset
4574 </cell>
4575 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4576 \begin_inset Text
4577
4578 \begin_layout Plain Layout
4579
4580 \series medium
4581 \shape up
4582 \size normal
4583 \emph off
4584 \bar no
4585 \noun off
4586 \color none
4587 base \SpecialChar LaTeX
4588
4589 \end_layout
4590
4591 \end_inset
4592 </cell>
4593 </row>
4594 <row>
4595 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4596 \begin_inset Text
4597
4598 \begin_layout Plain Layout
4599
4600 \family sans
4601 \series medium
4602 \shape up
4603 \size normal
4604 \emph off
4605 \bar no
4606 \noun off
4607 \color none
4608 Maths
4609 \end_layout
4610
4611 \end_inset
4612 </cell>
4613 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4614 \begin_inset Text
4615
4616 \begin_layout Plain Layout
4617
4618 \family typewriter
4619 \series medium
4620 \shape up
4621 \size normal
4622 \emph off
4623 \bar no
4624 \noun off
4625 \color none
4626 amssymb.sty
4627 \end_layout
4628
4629 \end_inset
4630 </cell>
4631 </row>
4632 <row>
4633 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4634 \begin_inset Text
4635
4636 \begin_layout Plain Layout
4637
4638 \family sans
4639 \series medium
4640 \shape up
4641 \size normal
4642 \emph off
4643 \bar no
4644 \noun off
4645 \color none
4646 Ding1
4647 \end_layout
4648
4649 \end_inset
4650 </cell>
4651 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4652 \begin_inset Text
4653
4654 \begin_layout Plain Layout
4655
4656 \family typewriter
4657 \series medium
4658 \shape up
4659 \size normal
4660 \emph off
4661 \bar no
4662 \noun off
4663 \color none
4664 pifont.sty
4665 \end_layout
4666
4667 \end_inset
4668 </cell>
4669 </row>
4670 <row>
4671 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4672 \begin_inset Text
4673
4674 \begin_layout Plain Layout
4675
4676 \family sans
4677 \series medium
4678 \shape up
4679 \size normal
4680 \emph off
4681 \bar no
4682 \noun off
4683 \color none
4684 Ding2
4685 \end_layout
4686
4687 \end_inset
4688 </cell>
4689 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4690 \begin_inset Text
4691
4692 \begin_layout Plain Layout
4693
4694 \family typewriter
4695 \series medium
4696 \shape up
4697 \size normal
4698 \emph off
4699 \bar no
4700 \noun off
4701 \color none
4702 pifont.sty
4703 \end_layout
4704
4705 \end_inset
4706 </cell>
4707 </row>
4708 <row>
4709 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4710 \begin_inset Text
4711
4712 \begin_layout Plain Layout
4713
4714 \family sans
4715 \series medium
4716 \shape up
4717 \size normal
4718 \emph off
4719 \bar no
4720 \noun off
4721 \color none
4722 Ding3
4723 \end_layout
4724
4725 \end_inset
4726 </cell>
4727 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4728 \begin_inset Text
4729
4730 \begin_layout Plain Layout
4731
4732 \family typewriter
4733 \series medium
4734 \shape up
4735 \size normal
4736 \emph off
4737 \bar no
4738 \noun off
4739 \color none
4740 pifont.sty
4741 \end_layout
4742
4743 \end_inset
4744 </cell>
4745 </row>
4746 <row>
4747 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4748 \begin_inset Text
4749
4750 \begin_layout Plain Layout
4751
4752 \family sans
4753 \series medium
4754 \shape up
4755 \size normal
4756 \emph off
4757 \bar no
4758 \noun off
4759 \color none
4760 Ding4
4761 \end_layout
4762
4763 \end_inset
4764 </cell>
4765 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4766 \begin_inset Text
4767
4768 \begin_layout Plain Layout
4769
4770 \family typewriter
4771 \series medium
4772 \shape up
4773 \size normal
4774 \emph off
4775 \bar no
4776 \noun off
4777 \color none
4778 pifont.sty
4779 \end_layout
4780
4781 \end_inset
4782 </cell>
4783 </row>
4784 </lyxtabular>
4785
4786 \end_inset
4787
4788
4789 \end_layout
4790
4791 \begin_layout Standard
4792 \SpecialChar LyX
4793  doesn't stop you using bullets from packages you don't have.
4794  If you get errors from \SpecialChar LaTeX
4795  when you try to view or print the file, then it
4796  is likely you are missing a package.
4797 \begin_inset Foot
4798 status collapsed
4799
4800 \begin_layout Plain Layout
4801 \SpecialChar LyX
4802  doesn't restrict your use since you may be editing locally and exporting
4803  elsewhere.
4804 \end_layout
4805
4806 \end_inset
4807
4808
4809 \end_layout
4810
4811 \begin_layout Subsection
4812 How to use it
4813 \end_layout
4814
4815 \begin_layout Standard
4816 Select which bullet depth you want to change then select the bullet shape
4817  and size.
4818  Any changes will not be visible in \SpecialChar LyX
4819 , but are visible when viewing the document.
4820 \end_layout
4821
4822 \begin_layout Standard
4823 You can reset a bullet shape to the default simply by clicking your right
4824  mouse button on the appropriate bullet depth button.
4825 \begin_inset Foot
4826 status open
4827
4828 \begin_layout Plain Layout
4829 If you 
4830 \emph on
4831 really
4832 \emph default
4833  want to have multiple sets of paragraphs with different sets of bullets
4834  in each, then you're going to have to get your hands dirty with \SpecialChar TeX
4835  code.
4836  The bullet selection dialog can help though because it provides you with
4837  the \SpecialChar LaTeX
4838  code for a wide range of bullet shapes.
4839  To make your own custom paragraphs you have the following options:
4840 \end_layout
4841
4842 \begin_layout Plain Layout
4843 \begin_inset ERT
4844 status open
4845
4846 \begin_layout Plain Layout
4847
4848
4849 \backslash
4850 let
4851 \backslash
4852 savelabelitemi=
4853 \backslash
4854 labelitemi
4855 \end_layout
4856
4857 \end_inset
4858
4859
4860 \end_layout
4861
4862 \begin_layout Plain Layout
4863 \begin_inset ERT
4864 status open
4865
4866 \begin_layout Plain Layout
4867
4868
4869 \backslash
4870 renewcommand
4871 \backslash
4872 labelitemi[0]{
4873 \backslash
4874 small
4875 \backslash
4876 (
4877 \backslash
4878 sharp
4879 \backslash
4880 )}
4881 \end_layout
4882
4883 \end_inset
4884
4885
4886 \end_layout
4887
4888 \begin_layout Itemize
4889 Use the \SpecialChar LaTeX
4890  command 
4891 \begin_inset Flex Code
4892 status collapsed
4893
4894 \begin_layout Plain Layout
4895
4896 \backslash
4897 renewcommand{}{}
4898 \end_layout
4899
4900 \end_inset
4901
4902  to specify a new bullet shape for a given depth.
4903  You'll also need to save the current bullet shape so you can restore it
4904  again afterwards.
4905  In this itemized list the following \SpecialChar LaTeX
4906  code was used to change the bullet
4907  used for the first depth.
4908 \end_layout
4909
4910 \begin_deeper
4911 \begin_layout LyX-Code
4912
4913 \backslash
4914 let
4915 \backslash
4916 savelabelitemi=
4917 \backslash
4918 labelitemi 
4919 \end_layout
4920
4921 \begin_layout LyX-Code
4922
4923 \backslash
4924 renewcommand
4925 \backslash
4926 labelitemi[0]{
4927 \backslash
4928 small
4929 \backslash
4930 (
4931 \backslash
4932 sharp
4933 \backslash
4934 )}
4935 \end_layout
4936
4937 \end_deeper
4938 \begin_layout Itemize
4939 Note that the itemize depth is specified in Roman numerals as part of the
4940  
4941 \family typewriter
4942
4943 \backslash
4944 labelitem
4945 \family default
4946  command.
4947 \end_layout
4948
4949 \begin_layout Itemize
4950 \begin_inset Argument item:1
4951 status open
4952
4953 \begin_layout Plain Layout
4954 \begin_inset ERT
4955 status open
4956
4957 \begin_layout Plain Layout
4958
4959
4960 \backslash
4961 (
4962 \backslash
4963 star
4964 \backslash
4965 )
4966 \end_layout
4967
4968 \end_inset
4969
4970
4971 \end_layout
4972
4973 \end_inset
4974
4975  Specify each individual entry by starting each item with the bullet shape
4976  enclosed in a 
4977 \begin_inset Quotes eld
4978 \end_inset
4979
4980 Custom Item
4981 \begin_inset Quotes erd
4982 \end_inset
4983
4984  inset (available at 
4985 \family sans
4986 Insert\SpecialChar menuseparator
4987 Custom Item
4988 \family default
4989 ) and set as 
4990 \begin_inset Flex Noun
4991 status collapsed
4992
4993 \begin_layout Plain Layout
4994 \SpecialChar TeX
4995  Code
4996 \end_layout
4997
4998 \end_inset
4999
5000 .
5001  For example, this item was started with 
5002 \begin_inset Flex Code
5003 status collapsed
5004
5005 \begin_layout Plain Layout
5006
5007 \backslash
5008 (
5009 \backslash
5010 star
5011 \backslash
5012 )
5013 \end_layout
5014
5015 \end_inset
5016
5017 .
5018 \end_layout
5019
5020 \begin_layout Plain Layout
5021 \begin_inset ERT
5022 status open
5023
5024 \begin_layout Plain Layout
5025
5026
5027 \backslash
5028 renewcommand
5029 \backslash
5030 labelitemi[0]{
5031 \backslash
5032 savelabelitemi}
5033 \end_layout
5034
5035 \end_inset
5036
5037
5038 \end_layout
5039
5040 \begin_layout Plain Layout
5041 You'll also need to revert the labelitem back to its previous setting for
5042  the global bullet shape settings to remain in effect.
5043  The way used here was:
5044 \end_layout
5045
5046 \begin_layout LyX-Code
5047
5048 \backslash
5049 renewcommand
5050 \backslash
5051 labelitemi[0]{
5052 \backslash
5053 savelabelitemi}
5054 \end_layout
5055
5056 \end_inset
5057
5058
5059 \end_layout
5060
5061 \begin_layout Chapter
5062 \SpecialChar LyX
5063  and the World Wide Web
5064 \end_layout
5065
5066 \begin_layout Standard
5067 \SpecialChar LyX
5068  has long supported the export of documents to various web-friendly formats,
5069  such as HTML.
5070  Before version 2.0, however, HTML export was always accomplished by the
5071  use of external converters.
5072 \begin_inset Foot
5073 status collapsed
5074
5075 \begin_layout Plain Layout
5076 For details on the use of external converters with \SpecialChar LyX
5077 , see the 
5078 \emph on
5079 Converters
5080 \emph default
5081  section of the Customization manual.
5082 \end_layout
5083
5084 \end_inset
5085
5086  These fall into two large groups: there are converters that use \SpecialChar LaTeX
5087  as an
5088  intermediate format, such as 
5089 \begin_inset Flex Code
5090 status collapsed
5091
5092 \begin_layout Plain Layout
5093 htlatex
5094 \end_layout
5095
5096 \end_inset
5097
5098
5099 \begin_inset Flex Code
5100 status collapsed
5101
5102 \begin_layout Plain Layout
5103 html2latex
5104 \end_layout
5105
5106 \end_inset
5107
5108 , and 
5109 \begin_inset Flex Code
5110 status collapsed
5111
5112 \begin_layout Plain Layout
5113 plastex
5114 \end_layout
5115
5116 \end_inset
5117
5118 , relying upon \SpecialChar LyX
5119  to produce the \SpecialChar LaTeX
5120 ; and there is a converter that works directly
5121  on \SpecialChar LyX
5122  files, 
5123 \begin_inset Flex Code
5124 status collapsed
5125
5126 \begin_layout Plain Layout
5127 e\SpecialChar LyX
5128 er
5129 \end_layout
5130
5131 \end_inset
5132
5133 .
5134  All of these have different advantages and disadvantages.
5135  
5136 \end_layout
5137
5138 \begin_layout Standard
5139 The \SpecialChar LaTeX
5140 -based converters have the advantage that, in principle, they know everythin
5141 g about the exported document that \SpecialChar LaTeX
5142  does.
5143  Such converters do not care, for example, if a certain block of code was
5144  produced by \SpecialChar LyX
5145  or was Evil Red Text.
5146  These converters know about 
5147 \begin_inset Flex Code
5148 status collapsed
5149
5150 \begin_layout Plain Layout
5151 aux
5152 \end_layout
5153
5154 \end_inset
5155
5156  files, counters, and references, and can often make use of the 
5157 \begin_inset Flex Code
5158 status collapsed
5159
5160 \begin_layout Plain Layout
5161 bbl
5162 \end_layout
5163
5164 \end_inset
5165
5166  files generated by Bib\SpecialChar TeX
5167 .
5168  On the other hand, \SpecialChar LaTeX
5169  is a very hard language to parse—it is sometimes said
5170  that only \SpecialChar TeX
5171  itself understands \SpecialChar TeX
5172 —and \SpecialChar LaTeX
5173 -based converters will often choke on
5174  what seem to be quite simple constructs; complex ones can throw them completely
5175 , and as of this writing, for example, the 
5176 \emph on
5177 Embedded Objects
5178 \emph default
5179  manual will not export with 
5180 \begin_inset Flex Code
5181 status collapsed
5182
5183 \begin_layout Plain Layout
5184 htlatex
5185 \end_layout
5186
5187 \end_inset
5188
5189 , though the others will.
5190  The other issue concerns how math is handled.
5191  These converters typically convert the formulae into little pictures that
5192  are then linked from the HTML document.
5193  Since these are actually generated by \SpecialChar LaTeX
5194 , they are accurate.
5195  But they do not scale well, and just getting them to look as if they are
5196  actually meant to be in your document—so that the font sizes seem to be
5197  roughly the same—can be a challenge.
5198 \end_layout
5199
5200 \begin_layout Standard
5201 Alex Fernandez's 
5202 \begin_inset Flex Code
5203 status collapsed
5204
5205 \begin_layout Plain Layout
5206 e\SpecialChar LyX
5207 er
5208 \end_layout
5209
5210 \end_inset
5211
5212  (
5213 \begin_inset CommandInset href
5214 LatexCommand href
5215 name "http://pinchito.es/elyxer/"
5216 target "http://pinchito.es/elyxer/"
5217 literal "false"
5218
5219 \end_inset
5220
5221 ) solves some of these problems.
5222  In particular, the formulae it produces scale perfectly, since it renders
5223  math using a combination of HTML and CSS rather than converting the formulae
5224  to images.
5225  But even moderately complex formula are rendered less well than with 
5226 \begin_inset Flex Code
5227 status collapsed
5228
5229 \begin_layout Plain Layout
5230 htlatex
5231 \end_layout
5232
5233 \end_inset
5234
5235 ; this reflects the limitations of HTML.
5236 \begin_inset Foot
5237 status collapsed
5238
5239 \begin_layout Plain Layout
5240 That said, 
5241 \begin_inset Flex Code
5242 status collapsed
5243
5244 \begin_layout Plain Layout
5245 e\SpecialChar LyX
5246 er
5247 \end_layout
5248
5249 \end_inset
5250
5251  can also use jsMath and MathJax for equations, but this setting is only
5252  available globally and requires one to have access to a server that runs
5253  the backend.
5254 \end_layout
5255
5256 \end_inset
5257
5258  More importantly (as of version 1.1.1, at least), 
5259 \begin_inset Flex Code
5260 status collapsed
5261
5262 \begin_layout Plain Layout
5263 e\SpecialChar LyX
5264 er
5265 \end_layout
5266
5267 \end_inset
5268
5269  has limited support for math macros and no support for user-defined paragraph
5270  or character styles.
5271  These limitations make 
5272 \begin_inset Flex Code
5273 status collapsed
5274
5275 \begin_layout Plain Layout
5276 e\SpecialChar LyX
5277 er
5278 \end_layout
5279
5280 \end_inset
5281
5282  unsuitable for many of the documents \SpecialChar LyX
5283  users produce.
5284  In principle, of course, these problems could be solved, but the \SpecialChar LyX
5285  developers
5286  have decided to follow a different path and have made \SpecialChar LyX
5287  itself capable of
5288  writing XHTML, just as it is capable of writing \SpecialChar LaTeX
5289 , DocBook, and plaintext.
5290 \end_layout
5291
5292 \begin_layout Standard
5293 As of this writing, XHTML output remains under development and should probably
5294  be regarded as 
5295 \begin_inset Quotes eld
5296 \end_inset
5297
5298 experimental
5299 \begin_inset Quotes erd
5300 \end_inset
5301
5302 .
5303 \begin_inset Foot
5304 status collapsed
5305
5306 \begin_layout Plain Layout
5307 The file 
5308 \begin_inset Flex Code
5309 status collapsed
5310
5311 \begin_layout Plain Layout
5312 development/HTML/HTML.notes
5313 \end_layout
5314
5315 \end_inset
5316
5317 , which can be found in the \SpecialChar LyX
5318  source tree or 
5319 \begin_inset CommandInset href
5320 LatexCommand href
5321 name "accessed online"
5322 target "https://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
5323 literal "false"
5324
5325 \end_inset
5326
5327 , usually contains up-to-date information about the state of XHTML output.
5328  See also the list of XHTML bugs on 
5329 \begin_inset CommandInset href
5330 LatexCommand href
5331 name "the bug tracker"
5332 target "https://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"
5333 literal "false"
5334
5335 \end_inset
5336
5337 .
5338 \end_layout
5339
5340 \end_inset
5341
5342  Still, the developers have chosen this approach because it has several
5343  potential advantages over the other two.
5344 \end_layout
5345
5346 \begin_layout Standard
5347 These advantages are primarily due to the fact that the XHTML output routines,
5348  since they are part of \SpecialChar LyX
5349 , know everything \SpecialChar LyX
5350  knows about the document being
5351  exported.
5352 \begin_inset Foot
5353 status collapsed
5354
5355 \begin_layout Plain Layout
5356 Another advantage is that, since these routines are internal to \SpecialChar LyX
5357 , they are
5358  immune to changes in \SpecialChar LyX
5359 's file format, or to changes in the semantics of
5360  existing insets.
5361 \end_layout
5362
5363 \end_inset
5364
5365  So they know about the table of contents (as displayed in the outline),
5366  about the counters associated with different paragraph styles, and about
5367  user-defined styles.
5368  The XHTML output routines know what \SpecialChar LyX
5369  knows about internationalization,
5370  too, so they will output 
5371 \begin_inset Quotes eld
5372 \end_inset
5373
5374 Chapter 1
5375 \begin_inset Quotes erd
5376 \end_inset
5377
5378  or 
5379 \begin_inset Quotes eld
5380 \end_inset
5381
5382
5383 \lang ngerman
5384 Kapitel
5385 \lang english
5386  1
5387 \begin_inset Quotes erd
5388 \end_inset
5389
5390 , depending upon the language in effect at the time.
5391  
5392 \end_layout
5393
5394 \begin_layout Standard
5395 Quite generally, the output routines know what \SpecialChar LyX
5396  knows about document layout,
5397  that is, about how the document is to be rendered on screen.
5398  We use this information when we output the document as XHTML.
5399  In particular, \SpecialChar LyX
5400  
5401 \emph on
5402 automatically
5403 \emph default
5404  generates CSS style information corresponding to the layout information
5405  it uses to render the document on screen: if section headings are supposed
5406  to be sans-serif and bold as seen in \SpecialChar LyX
5407 , then (by default) they will be sans-seri
5408 f and bold when viewed in a web browser, too.
5409  And this is true not just for pre-defined styles, like Section, but for
5410  any style, including user-defined styles.
5411  Indeed, the XHTML output routines make no distinction between user-defined
5412  paragraph and character styles and \SpecialChar LyX
5413 's own pre-defined styles: in each case,
5414  everything \SpecialChar LyX
5415  knows about the styles is contained in the layout files.
5416  And much the same is true as regards pre-defined textual insets, such as
5417  footnotes, and various custom insets.
5418  
5419 \end_layout
5420
5421 \begin_layout Standard
5422 The result is that XHTML output can be customized and extended in exactly
5423  the same way \SpecialChar LaTeX
5424  output can be customized and extended: through layout files
5425  and modules.
5426  See chapter five of the 
5427 \emph on
5428 Customization 
5429 \emph default
5430 manual for the details.
5431 \end_layout
5432
5433 \begin_layout Standard
5434 The remainder of this chapter contains more detailed information on XHTML
5435  output, its limitations, and ways to work around those limitations.
5436 \end_layout
5437
5438 \begin_layout Section
5439 Math Output in XHTML
5440 \end_layout
5441
5442 \begin_layout Standard
5443 \SpecialChar LyX
5444  offers four choices for how math is rendered.
5445  These have various advantages and disadvantages:
5446 \end_layout
5447
5448 \begin_layout Itemize
5449 MathML
5450 \begin_inset Newline newline
5451 \end_inset
5452
5453 MathML is a dialect of XML designed specifically for mathematics on the
5454  web, and it typically renders very well in browsers that support it.
5455  The disadvantage is that not all browsers support MathML, and support is
5456  not complete even in the Gecko-based browsers, such as Firefox.
5457 \begin_inset Newline newline
5458 \end_inset
5459
5460 If \SpecialChar LyX
5461  is unable to render a formula as MathML—for example, if the formula
5462  uses the 
5463 \begin_inset Flex Code
5464 status collapsed
5465
5466 \begin_layout Plain Layout
5467 xymatrix
5468 \end_layout
5469
5470 \end_inset
5471
5472  package or ERT—then it will instead output the formula as an image.
5473  
5474 \end_layout
5475
5476 \begin_layout Itemize
5477 HTML
5478 \begin_inset Newline newline
5479 \end_inset
5480
5481 As mentioned above, 
5482 \begin_inset Flex Code
5483 status collapsed
5484
5485 \begin_layout Plain Layout
5486 elyxer
5487 \end_layout
5488
5489 \end_inset
5490
5491  outputs math as HTML, styled by CSS.
5492 \begin_inset Foot
5493 status collapsed
5494
5495 \begin_layout Plain Layout
5496 \SpecialChar LyX
5497  has borrowed some of the CSS for its HTML output from 
5498 \begin_inset Flex Code
5499 status collapsed
5500
5501 \begin_layout Plain Layout
5502 elyxer
5503 \end_layout
5504
5505 \end_inset
5506
5507 .
5508 \end_layout
5509
5510 \end_inset
5511
5512  For simple formulae, this can work quite well, though with more complicated
5513  formulae it tends to break down.
5514  Still, this method has the advantage that it is very widely supported and
5515  so it may be appropriate for documents that contain only a little, fairly
5516  simple math.
5517 \begin_inset Newline newline
5518 \end_inset
5519
5520 If Lyx is unable to render a formula as HTML—for example, if the formula
5521  uses the 
5522 \begin_inset Flex Code
5523 status collapsed
5524
5525 \begin_layout Plain Layout
5526 xymatrix
5527 \end_layout
5528
5529 \end_inset
5530
5531  package or ERT—then it will instead output the formula as an image.
5532  
5533 \end_layout
5534
5535 \begin_layout Itemize
5536 Images
5537 \begin_inset Newline newline
5538 \end_inset
5539
5540 Like 
5541 \begin_inset Flex Code
5542 status collapsed
5543
5544 \begin_layout Plain Layout
5545 htlatex
5546 \end_layout
5547
5548 \end_inset
5549
5550 , \SpecialChar LyX
5551  will output formulae as images, the very same images, in fact, that are
5552  used for instant preview.
5553 \begin_inset Foot
5554 status collapsed
5555
5556 \begin_layout Plain Layout
5557 Instant preview does 
5558 \emph on
5559 not 
5560 \emph default
5561 have to be on for images to be output, however.
5562 \end_layout
5563
5564 \end_inset
5565
5566  The advantage to this method is that the images are simply generated by
5567  \SpecialChar LaTeX
5568 , so they are very accurate.
5569  The disadvantage, as mentioned earlier, is that these are bitmapped images,
5570  so they do not scale terribly well, and one cannot copy them, etc.
5571 \begin_inset Newline newline
5572 \end_inset
5573
5574 The size of the images can be controlled by setting the 
5575 \begin_inset Quotes eld
5576 \end_inset
5577
5578 Math Images Scaling
5579 \begin_inset Quotes erd
5580 \end_inset
5581
5582  parameter under 
5583 \begin_inset Flex Noun
5584 status collapsed
5585
5586 \begin_layout Plain Layout
5587 Document\SpecialChar menuseparator
5588 Settings\SpecialChar menuseparator
5589 Formats
5590 \end_layout
5591
5592 \end_inset
5593
5594 .
5595 \begin_inset Foot
5596 status collapsed
5597
5598 \begin_layout Plain Layout
5599 For those who want to know, this controls the resolution of the image in
5600  dots per inch and is based upon a default of 75 dpi.
5601 \end_layout
5602
5603 \end_inset
5604
5605
5606 \begin_inset Newline newline
5607 \end_inset
5608
5609 If \SpecialChar LyX
5610  for some reason fails to create an image for a formula (e.g., if a required
5611  \SpecialChar LaTeX
5612  package is not installed), then it will fall back to outputing the raw
5613  \SpecialChar LaTeX
5614 .
5615 \end_layout
5616
5617 \begin_layout Itemize
5618 \SpecialChar LaTeX
5619
5620 \begin_inset Newline newline
5621 \end_inset
5622
5623 Finally, \SpecialChar LyX
5624  will happily output math as \SpecialChar LaTeX
5625 .
5626  As well as being the output of last resort, this method can be used with
5627  such tools as 
5628 \begin_inset CommandInset href
5629 LatexCommand href
5630 name "jsMath"
5631 target "http://www.math.union.edu/~dpvc/jsMath/"
5632 literal "false"
5633
5634 \end_inset
5635
5636 , which uses JavaScript to render \SpecialChar LaTeX
5637  embedded in HTML documents.
5638  \SpecialChar LyX
5639  wraps the \SpecialChar LaTeX
5640  in either a 
5641 \begin_inset Flex Code
5642 status collapsed
5643
5644 \begin_layout Plain Layout
5645 span
5646 \end_layout
5647
5648 \end_inset
5649
5650  (for inline formulas) or 
5651 \begin_inset Flex Code
5652 status collapsed
5653
5654 \begin_layout Plain Layout
5655 div
5656 \end_layout
5657
5658 \end_inset
5659
5660  (for displayed formulas) with 
5661 \begin_inset Flex Code
5662 status collapsed
5663
5664 \begin_layout Plain Layout
5665 class='math'
5666 \end_layout
5667
5668 \end_inset
5669
5670 , as is required for jsMath.
5671 \end_layout
5672
5673 \begin_layout Standard
5674 One of these output methods must be selected under 
5675 \begin_inset Flex Noun
5676 status collapsed
5677
5678 \begin_layout Plain Layout
5679 Document\SpecialChar menuseparator
5680 Settings\SpecialChar menuseparator
5681 Formats
5682 \end_layout
5683
5684 \end_inset
5685
5686 .
5687  By default, \SpecialChar LyX
5688  outputs MathML.
5689  This is a document-wide setting, therefore.
5690 \end_layout
5691
5692 \begin_layout Standard
5693 Eventually, \SpecialChar LyX
5694  will offer the user the option to select an alternate output
5695  method for a particular inset, say, one that isn't being rendered very
5696  well by MathML.
5697 \begin_inset Foot
5698 status collapsed
5699
5700 \begin_layout Plain Layout
5701 That said, since \SpecialChar LyX
5702  falls back to images if the inset contains ERT, then one
5703  can force output as an image by putting some harmless ERT into the math,
5704  for example: 
5705 \begin_inset Formula $a=b\relax$
5706 \end_inset
5707
5708 .
5709 \end_layout
5710
5711 \end_inset
5712
5713
5714 \end_layout
5715
5716 \begin_layout Section
5717 Bibliography and Citations
5718 \end_layout
5719
5720 \begin_layout Standard
5721 XHTML output fully supports bibliographies and citations.
5722  
5723 \end_layout
5724
5725 \begin_layout Standard
5726 Citation labels are generated by the same machinery that generates \SpecialChar LyX
5727 's on-screen
5728  labels, so the labels will look in the output much as they do in \SpecialChar LyX
5729 , though
5730  better.
5731  If you are using numerical citations, then \SpecialChar LyX
5732  will output numerical labels,
5733  such as [1] or [17], rather than simply showing the citation key in square
5734  brackets, as it does on-screen.
5735  If you are using author-year citations, then \SpecialChar LyX
5736  will add lowercase letters
5737  to the years, just as Bib\SpecialChar TeX
5738  does, if it finds more than one citation for
5739  a given author-year combination.
5740  The labels will be printed with the bibliography entries.
5741  Note that there is, at present, no way to customize the appearance of the
5742  labels, for example, to choose between square brackets and parentheses.
5743 \end_layout
5744
5745 \begin_layout Standard
5746 Bibliography output is handled by the same machinery that handles the presentati
5747 on of reference information in the citation dialog, so you will see in the
5748  XHTML output pretty much what you would see if you were to look at a given
5749  entry in the citation dialog.
5750  The formatting can be customized in your layout file or, preferably, in
5751  a module.
5752  See the 
5753 \emph on
5754 Customization
5755 \emph default
5756  manual for the details.
5757 \end_layout
5758
5759 \begin_layout Standard
5760 The main defect at present is that cross-referenced information is printed
5761  with every entry with which it is associated.
5762  So you can see things like this:
5763 \end_layout
5764
5765 \begin_layout Quote
5766 Jason Stanley, 
5767 \begin_inset Quotes eld
5768 \end_inset
5769
5770 Context and Logical Form
5771 \begin_inset Quotes erd
5772 \end_inset
5773
5774 , in 
5775 \emph on
5776 Language in Context: Selected Essays
5777 \emph default
5778  (Oxford: Oxford University Press, 2007), pp.
5779  30–68.
5780 \end_layout
5781
5782 \begin_layout Quote
5783 Jason Stanley, 
5784 \begin_inset Quotes eld
5785 \end_inset
5786
5787 Semantics in Context
5788 \begin_inset Quotes erd
5789 \end_inset
5790
5791 , in 
5792 \emph on
5793 Language in Context: Selected Essays
5794 \emph default
5795  (Oxford: Oxford University Press, 2007), pp.
5796  201–30.
5797 \end_layout
5798
5799 \begin_layout Standard
5800 This should be fixed before long.
5801 \end_layout
5802
5803 \begin_layout Standard
5804 There is no support at present for sectioned bibliographies.
5805  If you have multiple bibliographies, then \SpecialChar LyX
5806  will print the same bibliography
5807  over and over.
5808 \end_layout
5809
5810 \begin_layout Section
5811 Indexes
5812 \end_layout
5813
5814 \begin_layout Standard
5815 \SpecialChar LyX
5816  will happily export indexes as XHTML, but with certain limitations at the
5817  moment.
5818 \end_layout
5819
5820 \begin_layout Standard
5821 Index export will be most reliable when you do not attempt to use the fancy
5822  constructs that are described in the section on indexes in the 
5823 \emph on
5824 User's Guide
5825 \emph default
5826 .
5827 \begin_inset Foot
5828 status collapsed
5829
5830 \begin_layout Plain Layout
5831 The main issue here is that \SpecialChar LyX
5832  itself does not really handle these.
5833  It just lets you enter what you would have to enter in raw \SpecialChar LaTeX
5834 .
5835 \end_layout
5836
5837 \end_inset
5838
5839  We'll describe how they are handled using the subsection headings from
5840  that section.
5841 \end_layout
5842
5843 \begin_layout Itemize
5844 Grouping Index Entries (aka, sub-entries): \SpecialChar LyX
5845  makes an effort to support these,
5846  but the entries must be separated by 
5847 \begin_inset Quotes eld
5848 \end_inset
5849
5850  ! 
5851 \begin_inset Quotes erd
5852 \end_inset
5853
5854 , that is, there must be spaces around the exclamation point.
5855  This is because it is otherwise too difficult to check for escaped exclamation
5856  points, ones in math, and so forth.
5857 \end_layout
5858
5859 \begin_layout Itemize
5860 Page Ranges: There is no support at all for page ranges, since these make
5861  no sense with XHMTL.
5862  Instead, you will just get two index entries, one at either end.
5863 \end_layout
5864
5865 \begin_layout Itemize
5866 Cross-referencing: There is no support for cross-referencing.
5867  If \SpecialChar LyX
5868  finds an entry containing the 
5869 \begin_inset Quotes eld
5870 \end_inset
5871
5872 |see\SpecialChar ldots
5873
5874 \begin_inset Quotes erd
5875 \end_inset
5876
5877  construct, it is just dropped, and the rest is treated as an ordinary index
5878  entry.
5879 \end_layout
5880
5881 \begin_layout Itemize
5882 Index Entry Order: \SpecialChar LyX
5883  does support attempts to fix the sorting order.
5884  It will take what is before the first `@' it finds and use that for sorting,
5885  taking what follows the first `@' to be the actual entry.
5886  At present, \SpecialChar LyX
5887  does not check for escaped `@', so do not try to index email
5888  addresses.
5889 \end_layout
5890
5891 \begin_layout Itemize
5892 Index Entry Layout: You can format entries by using the text style dialog,
5893  or by using any other method available within \SpecialChar LyX
5894  itself.
5895  There is no support for constructs like: 
5896 \begin_inset Quotes eld
5897 \end_inset
5898
5899 entry|textbf
5900 \begin_inset Quotes erd
5901 \end_inset
5902
5903 .
5904  Indeed, if \SpecialChar LyX
5905  finds a pipe symbol, `|', in an entry, it will delete it and
5906  everything that follows it.
5907 \end_layout
5908
5909 \begin_layout Itemize
5910 Multiple Indexes: There is no support for multiple indexes.
5911  Rather, all index entries will be printed as one large index.
5912  To avoid our printing several versions of the index, we print only the
5913  main index, so make sure you have one.
5914 \end_layout
5915
5916 \begin_layout Section
5917 Nomenclature and Glossary
5918 \end_layout
5919
5920 \begin_layout Standard
5921 There is at present no support for glossaries.
5922  Adding it would be fairly trivial, and welcome.
5923 \end_layout
5924
5925 \begin_layout Chapter
5926 The \SpecialChar LyX
5927  Server
5928 \end_layout
5929
5930 \begin_layout Section
5931 Introduction
5932 \end_layout
5933
5934 \begin_layout Standard
5935 The `\SpecialChar LyX
5936  server' allows other programs to talk to \SpecialChar LyX
5937 , invoke \SpecialChar LyX
5938  commands, and retrieve
5939  information about the \SpecialChar LyX
5940  internal state.
5941  This is only intended for advanced users, but they should find it useful.
5942  It is by writing to the \SpecialChar LyX
5943  server, for example, that bibliography managers,
5944  such as JabRef, are able to 
5945 \begin_inset Quotes eld
5946 \end_inset
5947
5948 push
5949 \begin_inset Quotes erd
5950 \end_inset
5951
5952  citations to \SpecialChar LyX
5953 .
5954 \end_layout
5955
5956 \begin_layout Section
5957 Starting the \SpecialChar LyX
5958  Server
5959 \begin_inset CommandInset label
5960 LatexCommand label
5961 name "sec:Starting-the-Server"
5962
5963 \end_inset
5964
5965
5966 \end_layout
5967
5968 \begin_layout Standard
5969 The \SpecialChar LyX
5970  server works through the use of a pair of named pipes.
5971  These are usually located in 
5972 \begin_inset Flex Code
5973 status collapsed
5974
5975 \begin_layout Plain Layout
5976 UserDir
5977 \end_layout
5978
5979 \end_inset
5980
5981 , (except on Windows, where 
5982 \emph on
5983 local
5984 \emph default
5985  named pipes are special objects located in 
5986 \begin_inset Flex Code
5987 status collapsed
5988
5989 \begin_layout Plain Layout
5990
5991 \backslash
5992
5993 \backslash
5994 .
5995 \backslash
5996 pipe
5997 \end_layout
5998
5999 \end_inset
6000
6001 ) and have the names 
6002 \begin_inset Quotes eld
6003 \end_inset
6004
6005
6006 \begin_inset Flex Code
6007 status collapsed
6008
6009 \begin_layout Plain Layout
6010 lyxpipe.in
6011 \end_layout
6012
6013 \end_inset
6014
6015
6016 \begin_inset Quotes erd
6017 \end_inset
6018
6019  and 
6020 \begin_inset Quotes eld
6021 \end_inset
6022
6023
6024 \begin_inset Flex Code
6025 status collapsed
6026
6027 \begin_layout Plain Layout
6028 lyxpipe.out
6029 \end_layout
6030
6031 \end_inset
6032
6033
6034 \begin_inset Quotes erd
6035 \end_inset
6036
6037 .
6038  External programs write into 
6039 \begin_inset Flex Code
6040 status collapsed
6041
6042 \begin_layout Plain Layout
6043 lyxpipe.in
6044 \end_layout
6045
6046 \end_inset
6047
6048  and read back data from 
6049 \begin_inset Flex Code
6050 status collapsed
6051
6052 \begin_layout Plain Layout
6053 lyxpipe.out
6054 \end_layout
6055
6056 \end_inset
6057
6058 .
6059  The stem of the pipe names can be defined in the 
6060 \begin_inset Flex Noun
6061 status collapsed
6062
6063 \begin_layout Plain Layout
6064 Tools\SpecialChar menuseparator
6065 Preferences
6066 \end_layout
6067
6068 \end_inset
6069
6070  dialog, for example 
6071 \begin_inset Flex Code
6072 status collapsed
6073
6074 \begin_layout Plain Layout
6075 "/home/myhome/lyxpipe"
6076 \end_layout
6077
6078 \end_inset
6079
6080 , or 
6081 \begin_inset Flex Code
6082 status collapsed
6083
6084 \begin_layout Plain Layout
6085 "
6086 \backslash
6087
6088 \backslash
6089 .
6090 \backslash
6091 pipe
6092 \backslash
6093 lyxpipe"
6094 \end_layout
6095
6096 \end_inset
6097
6098  on Windows (where any working path instead of lyxpipe can be used, for
6099  example 
6100 \begin_inset Flex Code
6101 status collapsed
6102
6103 \begin_layout Plain Layout
6104 "
6105 \backslash
6106
6107 \backslash
6108 .
6109 \backslash
6110 pipe
6111 \backslash
6112 my
6113 \backslash
6114 lyx
6115 \backslash
6116 pipe"
6117 \end_layout
6118
6119 \end_inset
6120
6121  would also work).
6122  You 
6123 \emph on
6124 must
6125 \emph default
6126  configure this manually in order for the server to start.
6127 \end_layout
6128
6129 \begin_layout Standard
6130 \SpecialChar LyX
6131  will add the '
6132 \begin_inset Flex Code
6133 status collapsed
6134
6135 \begin_layout Plain Layout
6136 .in
6137 \end_layout
6138
6139 \end_inset
6140
6141 ' and '
6142 \begin_inset Flex Code
6143 status collapsed
6144
6145 \begin_layout Plain Layout
6146 .out
6147 \end_layout
6148
6149 \end_inset
6150
6151 ' to create the pipes.
6152  If one of the pipes already exists, \SpecialChar LyX
6153  will assume that another \SpecialChar LyX
6154  process
6155  is already running and will not start the server.
6156  On POSIX (Unix like) systems, if for some other reason, an unused 
6157 \begin_inset Quotes eld
6158 \end_inset
6159
6160 stale
6161 \begin_inset Quotes erd
6162 \end_inset
6163
6164  pipe is left in existence when \SpecialChar LyX
6165  closes, then \SpecialChar LyX
6166  will try to delete it.
6167  If this fails for some reason, you will need to delete the pipes manually
6168  and then restart \SpecialChar LyX
6169 .
6170  On Windows, pipes are deleted by the OS on program termination or crash,
6171  so 
6172 \begin_inset Quotes eld
6173 \end_inset
6174
6175 stale
6176 \begin_inset Quotes erd
6177 \end_inset
6178
6179  pipes should not be possible.
6180 \end_layout
6181
6182 \begin_layout Standard
6183 To have several \SpecialChar LyX
6184  processes with servers at the same time, you have to use
6185  different configurations, perhaps by using separate user directories, each
6186  with its own 
6187 \begin_inset Flex Code
6188 status collapsed
6189
6190 \begin_layout Plain Layout
6191 preferences
6192 \end_layout
6193
6194 \end_inset
6195
6196  file, for each process.
6197 \end_layout
6198
6199 \begin_layout Standard
6200 If you are developing a client program, you might find it useful to enable
6201  debugging information from the \SpecialChar LyX
6202  server.
6203  Do this by starting \SpecialChar LyX
6204  as 
6205 \begin_inset Flex Code
6206 status collapsed
6207
6208 \begin_layout Plain Layout
6209 lyx -dbg lyxserver
6210 \end_layout
6211
6212 \end_inset
6213
6214 .
6215 \end_layout
6216
6217 \begin_layout Standard
6218 You can find a complete example client written in C++ in the source distribution
6219  as 
6220 \begin_inset Flex Code
6221 status collapsed
6222
6223 \begin_layout Plain Layout
6224 development/lyxserver/server_monitor.cpp
6225 \end_layout
6226
6227 \end_inset
6228
6229 .
6230 \end_layout
6231
6232 \begin_layout Standard
6233 Another useful tool is the command-line based client found in 
6234 \begin_inset Flex Code
6235 status collapsed
6236
6237 \begin_layout Plain Layout
6238 src/client/lyxclient
6239 \end_layout
6240
6241 \end_inset
6242
6243 .
6244 \end_layout
6245
6246 \begin_layout Section
6247 Normal communication
6248 \end_layout
6249
6250 \begin_layout Standard
6251 To issue a \SpecialChar LyX
6252  call, the client writes a line of ASCII text into the input
6253  pipe.
6254  This line has the following format:
6255 \end_layout
6256
6257 \begin_layout Quote
6258 LYXCMD:
6259 \emph on
6260 clientname
6261 \emph default
6262 :
6263 \emph on
6264 function
6265 \emph default
6266 :
6267 \emph on
6268 argument
6269 \end_layout
6270
6271 \begin_layout Description
6272 clientname is a name that the client can choose arbitrarily.
6273  Its only use is that \SpecialChar LyX
6274  will echo it if it sends an answer—so a client can
6275  dispatch results from different requesters.
6276 \end_layout
6277
6278 \begin_layout Description
6279 function is the function you want \SpecialChar LyX
6280  to perform.
6281  It is the same as the commands you'd use in the minibuffer.
6282 \end_layout
6283
6284 \begin_layout Description
6285 argument is an optional argument which is meaningful only to some functions
6286  (for instance, the 
6287 \begin_inset Quotes eld
6288 \end_inset
6289
6290 self-insert
6291 \begin_inset Quotes erd
6292 \end_inset
6293
6294  LFUN will insert the argument as text at the cursor position).
6295 \end_layout
6296
6297 \begin_layout Standard
6298 The answer from \SpecialChar LyX
6299  will arrive in the output pipe and be of the form
6300 \end_layout
6301
6302 \begin_layout Quote
6303 INFO:
6304 \emph on
6305 clientname
6306 \emph default
6307 :
6308 \emph on
6309 function
6310 \emph default
6311 :
6312 \emph on
6313 data
6314 \end_layout
6315
6316 \begin_layout Standard
6317 where 
6318 \emph on
6319 clientname
6320 \emph default
6321  and 
6322 \emph on
6323 function
6324 \emph default
6325  are just echoed from the command request, while 
6326 \emph on
6327 data
6328 \emph default
6329  is more or less useful information filled according to how the command
6330  execution worked out.
6331  Some commands, such as 
6332 \begin_inset Quotes eld
6333 \end_inset
6334
6335 font-state
6336 \begin_inset Quotes erd
6337 \end_inset
6338
6339 , will return information about the internal state of \SpecialChar LyX
6340 , while other will
6341  return an empty data-response.
6342  This means that the command execution went fine.
6343 \end_layout
6344
6345 \begin_layout Standard
6346 In case of errors, the response from \SpecialChar LyX
6347  will have this form
6348 \end_layout
6349
6350 \begin_layout Quote
6351 ERROR:
6352 \emph on
6353 clientname
6354 \emph default
6355 :
6356 \emph on
6357 function
6358 \emph default
6359 :
6360 \emph on
6361 error message
6362 \end_layout
6363
6364 \begin_layout Standard
6365 where the 
6366 \emph on
6367 error message
6368 \emph default
6369  should contain an explanation of why the command failed.
6370 \end_layout
6371
6372 \begin_layout Standard
6373 Examples:
6374 \end_layout
6375
6376 \begin_layout LyX-Code
6377 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
6378 \begin_inset Newline newline
6379 \end_inset
6380
6381 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
6382 \begin_inset Newline newline
6383 \end_inset
6384
6385 read a <~/.lyxpipe.out
6386 \begin_inset Newline newline
6387 \end_inset
6388
6389 echo $a
6390 \end_layout
6391
6392 \begin_layout Subsection
6393 AppleScript (Mac OS X)
6394 \end_layout
6395
6396 \begin_layout Standard
6397 Since \SpecialChar LyX
6398  2.1, \SpecialChar LyX
6399  supports basic interactions with AppleScript for normal communicatio
6400 n through the command run.
6401  This command takes a direct argument (the 
6402 \series bold
6403 function
6404 \series default
6405  to perform) and an optional argument.
6406  It either returns the output of the function or triggers an error with
6407  the error message and code.
6408 \end_layout
6409
6410 \begin_layout Standard
6411 Example:
6412 \end_layout
6413
6414 \begin_layout LyX-Code
6415 tell application "\SpecialChar LyX
6416 "
6417 \end_layout
6418
6419 \begin_layout LyX-Code
6420   try
6421 \end_layout
6422
6423 \begin_layout LyX-Code
6424     -- Stores the current file name into f
6425 \end_layout
6426
6427 \begin_layout LyX-Code
6428     set f to (run "server-get-filename" with argument "")
6429 \end_layout
6430
6431 \begin_layout LyX-Code
6432     on error the error_message number the error_number
6433 \end_layout
6434
6435 \begin_layout LyX-Code
6436       display dialog "Error: " & the error_number & ".
6437  " Â¬
6438 \end_layout
6439
6440 \begin_layout LyX-Code
6441               & the error_message buttons {"OK"} default button 1
6442 \end_layout
6443
6444 \begin_layout LyX-Code
6445   end try
6446 \end_layout
6447
6448 \begin_layout LyX-Code
6449 end tell
6450 \end_layout
6451
6452 \begin_layout Section
6453 Notification
6454 \end_layout
6455
6456 \begin_layout Standard
6457 \SpecialChar LyX
6458  can notify clients of events going on asynchronously.
6459  Currently it will only do this if the user binds a key sequence with the
6460  function 
6461 \begin_inset Quotes eld
6462 \end_inset
6463
6464 notify
6465 \begin_inset Quotes erd
6466 \end_inset
6467
6468 .
6469  The format of the string \SpecialChar LyX
6470  sends is as follows:
6471 \end_layout
6472
6473 \begin_layout Quote
6474 \begin_inset Flex Code
6475 status collapsed
6476
6477 \begin_layout Plain Layout
6478 NOTIFY:
6479 \end_layout
6480
6481 \end_inset
6482
6483
6484 \emph on
6485 key-sequence
6486 \end_layout
6487
6488 \begin_layout Standard
6489 where 
6490 \emph on
6491 key-sequence
6492 \emph default
6493  is the printed representation of the key sequence that was actually typed
6494  by the user.
6495 \end_layout
6496
6497 \begin_layout Standard
6498 This mechanism can be used to extend \SpecialChar LyX
6499 's command set and implement macros.
6500  Bind some key sequence to 
6501 \begin_inset Quotes eld
6502 \end_inset
6503
6504 notify
6505 \begin_inset Quotes erd
6506 \end_inset
6507
6508 .
6509  Then start a client that listens on the output pipe, dispatches the command
6510  according to the sequence, and starts a function that may use \SpecialChar LyX
6511  calls and
6512  \SpecialChar LyX
6513  requests to issue a command or a series of commands to \SpecialChar LyX
6514 .
6515 \end_layout
6516
6517 \begin_layout Section
6518 The simple \SpecialChar LyX
6519  Server Protocol
6520 \end_layout
6521
6522 \begin_layout Standard
6523 \SpecialChar LyX
6524  implements a simple protocol that can be used for session management.
6525  All messages are of the form
6526 \end_layout
6527
6528 \begin_layout Quote
6529 LYXSRV:
6530 \emph on
6531 clientname
6532 \emph default
6533 :
6534 \emph on
6535 protocol message
6536 \end_layout
6537
6538 \begin_layout Standard
6539 where 
6540 \emph on
6541 protocol message
6542 \emph default
6543  can be 
6544 \begin_inset Quotes eld
6545 \end_inset
6546
6547 hello
6548 \begin_inset Quotes erd
6549 \end_inset
6550
6551  or 
6552 \begin_inset Quotes eld
6553 \end_inset
6554
6555 bye
6556 \begin_inset Quotes erd
6557 \end_inset
6558
6559 .
6560  If 
6561 \begin_inset Quotes eld
6562 \end_inset
6563
6564 hello
6565 \begin_inset Quotes erd
6566 \end_inset
6567
6568  is received from a client, \SpecialChar LyX
6569  will report back to inform the client that
6570  it's listening to it's messages, while 
6571 \begin_inset Quotes eld
6572 \end_inset
6573
6574 bye
6575 \begin_inset Quotes erd
6576 \end_inset
6577
6578  sent from \SpecialChar LyX
6579  will inform clients that \SpecialChar LyX
6580  is closing.
6581 \end_layout
6582
6583 \begin_layout Section
6584 Reverse DVI/PDF search
6585 \end_layout
6586
6587 \begin_layout Standard
6588 Some DVI/PDF viewers
6589 \begin_inset Foot
6590 status collapsed
6591
6592 \begin_layout Plain Layout
6593 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
6594  Qpdfview on Unix, Skim on Mac OSX and SumatraPDF on Windows.
6595 \end_layout
6596
6597 \end_inset
6598
6599  provide 
6600 \emph on
6601 reverse search
6602 \emph default
6603  facility (also called 
6604 \emph on
6605 inverse search
6606 \emph default
6607 ).
6608  This means that you can tell \SpecialChar LyX
6609  to put the cursor to a specific line in the
6610  document by clicking at the respective position in the DVI/PDF output.
6611  To achieve this, the viewer must be able to communicate with \SpecialChar LyX
6612 .
6613  This is done via the \SpecialChar LyX
6614  server either by using the named pipe (
6615 \emph on
6616 lyxpipe
6617 \emph default
6618 ), or the UNIX domain socket (
6619 \emph on
6620 lyxsocket
6621 \emph default
6622 ) that \SpecialChar LyX
6623  creates in its temporary directory (this is the way the 
6624 \begin_inset Flex Code
6625 status collapsed
6626
6627 \begin_layout Plain Layout
6628 lyxclient
6629 \end_layout
6630
6631 \end_inset
6632
6633  program communicates with \SpecialChar LyX
6634 ).
6635  In some cases, you need a helper script that mediates between the viewer
6636  and \SpecialChar LyX
6637 , in others, the viewer can communicate with \SpecialChar LyX
6638  directly.
6639  This depends on the selected viewer and on your operating system.
6640  The same applies to the way viewers need to be configured and the way the
6641  reverse search is actually performed.
6642  In what follows, we will thus describe how to setup reverse search for
6643  specific viewers.
6644  Before we turn to this, though, we will explain what needs to be done generally
6645  to enable reverse search in the DVI/PDF output.
6646 \end_layout
6647
6648 \begin_layout Subsection
6649 Automatic setup
6650 \begin_inset CommandInset label
6651 LatexCommand label
6652 name "subsec:rev-search"
6653
6654 \end_inset
6655
6656
6657 \end_layout
6658
6659 \begin_layout Standard
6660 In most cases \SpecialChar LyX
6661  will do the work for you by pressing the following button
6662  in the toolbar: 
6663 \begin_inset Info
6664 type  "icon"
6665 arg   "buffer-toggle-output-sync"
6666 \end_inset
6667
6668 .
6669  Alternatively, you can also enable the feature by checking 
6670 \family sans
6671 Synchronize with Output
6672 \family default
6673  in 
6674 \begin_inset Flex Noun
6675 status collapsed
6676
6677 \begin_layout Plain Layout
6678 Document\SpecialChar menuseparator
6679 Settings\SpecialChar menuseparator
6680 Formats
6681 \end_layout
6682
6683 \end_inset
6684
6685 .
6686  In such a case \SpecialChar LyX
6687  will automatically insert the necessary Sync\SpecialChar TeX
6688  macro (for
6689  PDF) or load the srcltx package (for DVI) respectively.
6690  This option can be easily reached also on 
6691 \begin_inset Flex Code
6692 status collapsed
6693
6694 \begin_layout Plain Layout
6695 View/Update
6696 \end_layout
6697
6698 \end_inset
6699
6700  Toolbar.
6701 \end_layout
6702
6703 \begin_layout Standard
6704 If you need a different setting, you can select or input a custom macro
6705  from the drop down box just below 
6706 \begin_inset Flex Noun
6707 status collapsed
6708
6709 \begin_layout Plain Layout
6710 Document\SpecialChar menuseparator
6711 Settings\SpecialChar menuseparator
6712 Output\SpecialChar menuseparator
6713 Synchronize with Output
6714 \end_layout
6715
6716 \end_inset
6717
6718 .
6719 \end_layout
6720
6721 \begin_layout Standard
6722 Note that the method 
6723 \begin_inset Flex Code
6724 status collapsed
6725
6726 \begin_layout Plain Layout
6727
6728 \backslash
6729 synctex=1
6730 \end_layout
6731
6732 \end_inset
6733
6734  enables gzip compression.
6735  If your viewer does not support it, you should instead use 
6736 \begin_inset Flex Code
6737 status collapsed
6738
6739 \begin_layout Plain Layout
6740
6741 \backslash
6742 synctex=-1
6743 \end_layout
6744
6745 \end_inset
6746
6747 .
6748 \end_layout
6749
6750 \begin_layout Standard
6751 Please also note that including the 
6752 \begin_inset Flex Code
6753 status collapsed
6754
6755 \begin_layout Plain Layout
6756 srcltx
6757 \end_layout
6758
6759 \end_inset
6760
6761  package or 
6762 \begin_inset Flex Code
6763 status collapsed
6764
6765 \begin_layout Plain Layout
6766 src-specials
6767 \end_layout
6768
6769 \end_inset
6770
6771  sometimes has an undesired impact on the typesetting.
6772  Thus, you should switch output synchronization off for the final typesetting
6773  if you use the 
6774 \begin_inset Flex Code
6775 status collapsed
6776
6777 \begin_layout Plain Layout
6778 srcltx
6779 \end_layout
6780
6781 \end_inset
6782
6783  package or 
6784 \begin_inset Flex Code
6785 status collapsed
6786
6787 \begin_layout Plain Layout
6788 src-specials
6789 \end_layout
6790
6791 \end_inset
6792
6793 .
6794  
6795 \end_layout
6796
6797 \begin_layout Standard
6798 In case you need some more special settings that are not covered by the
6799  automatic settings, read the next section about how to set up output synchroniz
6800 ation manually.
6801  If the automatic setup suits your needs, you can readily jump to section
6802 \begin_inset space ~
6803 \end_inset
6804
6805
6806 \begin_inset CommandInset ref
6807 LatexCommand ref
6808 reference "subsec:configuring-viewers"
6809
6810 \end_inset
6811
6812 , where the necessary configuration steps in your viewer â€“ needed both with
6813  the automatic and the manual setup â€“ are described.
6814 \end_layout
6815
6816 \begin_layout Subsection
6817 Manual setup
6818 \end_layout
6819
6820 \begin_layout Standard
6821 \SpecialChar LaTeX
6822  provides several different methods for reverse search.
6823  Some are built-in in the 
6824 \begin_inset Flex Code
6825 status collapsed
6826
6827 \begin_layout Plain Layout
6828 latex/pdflatex
6829 \end_layout
6830
6831 \end_inset
6832
6833  program, some are provided by external packages.
6834  Your choice depends on whether your \SpecialChar LaTeX
6835  distribution already provides a given
6836  method (the built-in methods are rather new) and whether your viewer can
6837  cope with it.
6838  The available methods are described in the following.
6839 \end_layout
6840
6841 \begin_layout Subsubsection*
6842 Built-in DVI-search via src-specials (DVI only) 
6843 \end_layout
6844
6845 \begin_layout Standard
6846 This method provides the DVI file with the necessary information for reverse
6847  search.
6848  It is available in \SpecialChar LaTeX
6849  since quite some time (any somewhat recent \SpecialChar LaTeX
6850  distribution
6851  should include it), and it works reliably.
6852  To enable it, change the 
6853 \begin_inset Flex Noun
6854 status collapsed
6855
6856 \begin_layout Plain Layout
6857 La
6858 \family sans
6859 TeX
6860 \family default
6861  (plain)->DVI
6862 \end_layout
6863
6864 \end_inset
6865
6866  or 
6867 \begin_inset Flex Noun
6868 status collapsed
6869
6870 \begin_layout Plain Layout
6871 La
6872 \family sans
6873 TeX
6874 \family default
6875  (plain)->DraftDVI
6876 \end_layout
6877
6878 \end_inset
6879
6880  converter in 
6881 \begin_inset Flex Noun
6882 status collapsed
6883
6884 \begin_layout Plain Layout
6885 Preferences\SpecialChar menuseparator
6886 File Handling\SpecialChar menuseparator
6887 Converters
6888 \end_layout
6889
6890 \end_inset
6891
6892  to 
6893 \begin_inset Flex Code
6894 status collapsed
6895
6896 \begin_layout Plain Layout
6897 latex -src-specials $$i
6898 \end_layout
6899
6900 \end_inset
6901
6902 .
6903  If this doesn't work, check if your \SpecialChar TeX
6904  engine needs different options (the
6905  syntax might differ in some distributions).
6906 \end_layout
6907
6908 \begin_layout Subsubsection*
6909 External Packages (PDFSync and scrltx) 
6910 \end_layout
6911
6912 \begin_layout Standard
6913 The packages 
6914 \emph on
6915 pdfsync
6916 \emph default
6917  and 
6918 \emph on
6919 scrltx
6920 \emph default
6921  provide reverse search facility for PDF output (via pdflatex) and DVI output,
6922  respectively.
6923  In order to enable it, load the packages in the \SpecialChar LyX
6924  preamble: 
6925 \end_layout
6926
6927 \begin_layout Itemize
6928 \begin_inset Flex Code
6929 status collapsed
6930
6931 \begin_layout Plain Layout
6932
6933 \backslash
6934 usepackage{pdfsync}
6935 \end_layout
6936
6937 \end_inset
6938
6939  for reverse PDF search,
6940 \end_layout
6941
6942 \begin_layout Itemize
6943 \begin_inset Flex Code
6944 status collapsed
6945
6946 \begin_layout Plain Layout
6947
6948 \backslash
6949 usepackage[active]{srcltx}
6950 \end_layout
6951
6952 \end_inset
6953
6954  for reverse DVI search.
6955 \end_layout
6956
6957 \begin_layout Standard
6958 If you want to be able to perform both DVI and PDF reverse searches, you
6959  can also insert in the preamble the following lines
6960 \end_layout
6961
6962 \begin_layout LyX-Code
6963
6964 \backslash
6965 usepackage{ifpdf}
6966 \begin_inset Newline newline
6967 \end_inset
6968
6969
6970 \backslash
6971 ifpdf
6972 \begin_inset Newline newline
6973 \end_inset
6974
6975   
6976 \backslash
6977 usepackage{pdfsync}
6978 \begin_inset Newline newline
6979 \end_inset
6980
6981
6982 \backslash
6983 else
6984 \begin_inset Newline newline
6985 \end_inset
6986
6987   
6988 \backslash
6989 usepackage[active]{srcltx}
6990 \begin_inset Newline newline
6991 \end_inset
6992
6993
6994 \backslash
6995 fi
6996 \end_layout
6997
6998 \begin_layout Standard
6999 This way, you can preview the file as either DVI or PDF (pdflatex) and the
7000  right package will be used.
7001 \end_layout
7002
7003 \begin_layout Standard
7004 Note that PDFSync might affect the output layout of your document.
7005  It is therefore advised to disable PDFsync for final documents.
7006 \end_layout
7007
7008 \begin_layout Subsubsection*
7009 Built-in reverse search via Sync\SpecialChar TeX
7010  (DVI and PDF) 
7011 \end_layout
7012
7013 \begin_layout Standard
7014 Recent versions of 
7015 \begin_inset Flex Code
7016 status collapsed
7017
7018 \begin_layout Plain Layout
7019 (pdf)latex
7020 \end_layout
7021
7022 \end_inset
7023
7024  have built-in support for both PDF and DVI reverse search.
7025  This so-called 
7026 \emph on
7027 Sync\SpecialChar TeX
7028
7029 \emph default
7030  facility is basically the result of the integration of the PDFSync package
7031  to the pdftex program and its merge with the 
7032 \emph on
7033 scr-specials
7034 \emph default
7035  approach.
7036  You need at least \SpecialChar TeX
7037 Live 2008 or a recent Mik\SpecialChar TeX
7038  distribution in order to use
7039  it.
7040 \begin_inset Foot
7041 status collapsed
7042
7043 \begin_layout Plain Layout
7044 For some reason, Mik\SpecialChar TeX
7045  does not understand/obey the command \SpecialChar LyX
7046  inserts into
7047  the preamble when you check the "Enable Forward/Reverse Search" button
7048  in the toolbar and does not generate the necessary info.
7049 \end_layout
7050
7051 \begin_layout Plain Layout
7052 The generation of the required info can be forced by changing the converter
7053  "\SpecialChar LaTeX
7054  (pdflatex) -> PDF (pdflatex)" in Preferences->File handling->Converters
7055  from the default "pdflatex $$i" to "pdflatex -synctex=1 $$i" (i.e., by adding
7056  the -synctex=1 switch).
7057 \end_layout
7058
7059 \end_inset
7060
7061  Also note that only a few PDF viewers (such as Okular and Qpdfview on Unix,
7062  Skim on the Mac, SumatraPDF on Windows; see the next section for details)
7063  already provide Sync\SpecialChar TeX
7064  support.
7065 \end_layout
7066
7067 \begin_layout Standard
7068 To enable Sync\SpecialChar TeX
7069  for DVI output, change the 
7070 \begin_inset Flex Noun
7071 status collapsed
7072
7073 \begin_layout Plain Layout
7074 La
7075 \family sans
7076 TeX
7077 \family default
7078  (plain) -> DVI
7079 \end_layout
7080
7081 \end_inset
7082
7083  or 
7084 \begin_inset Flex Noun
7085 status collapsed
7086
7087 \begin_layout Plain Layout
7088 La
7089 \family sans
7090 TeX
7091 \family default
7092  (plain) -> DraftDVI
7093 \end_layout
7094
7095 \end_inset
7096
7097  converter in 
7098 \begin_inset Flex Noun
7099 status collapsed
7100
7101 \begin_layout Plain Layout
7102 Preferences\SpecialChar menuseparator
7103 File Handling\SpecialChar menuseparator
7104 Converters
7105 \end_layout
7106
7107 \end_inset
7108
7109  to 
7110 \begin_inset Flex Code
7111 status collapsed
7112
7113 \begin_layout Plain Layout
7114 latex -synctex=1 $$i
7115 \end_layout
7116
7117 \end_inset
7118
7119 , and for PDF output, change the 
7120 \begin_inset Flex Noun
7121 status collapsed
7122
7123 \begin_layout Plain Layout
7124 La
7125 \family sans
7126 TeX
7127 \family default
7128  (pdflatex) -> PDF (pdflatex)
7129 \end_layout
7130
7131 \end_inset
7132
7133  converter to 
7134 \begin_inset Flex Code
7135 status collapsed
7136
7137 \begin_layout Plain Layout
7138 pdflatex -synctex=1 $$i
7139 \end_layout
7140
7141 \end_inset
7142
7143 .
7144  Should your viewer not be considered in the following description, or in
7145  case of missing success, please check the documentation of your viewer
7146  whether the viewer needs to be configured for the use with Sync\SpecialChar TeX
7147 .
7148 \begin_inset Foot
7149 status collapsed
7150
7151 \begin_layout Plain Layout
7152 Note that the option 
7153 \begin_inset Flex Code
7154 status collapsed
7155
7156 \begin_layout Plain Layout
7157 -synctex=1
7158 \end_layout
7159
7160 \end_inset
7161
7162  option enables gzip compression.
7163  If your viewer does not support it, you should instead use 
7164 \begin_inset Flex Code
7165 status collapsed
7166
7167 \begin_layout Plain Layout
7168 -synctex=-1
7169 \end_layout
7170
7171 \end_inset
7172
7173 .
7174 \end_layout
7175
7176 \end_inset
7177
7178
7179 \end_layout
7180
7181 \begin_layout Subsection
7182 Configuring and using specific viewers
7183 \begin_inset CommandInset label
7184 LatexCommand label
7185 name "subsec:configuring-viewers"
7186
7187 \end_inset
7188
7189
7190 \end_layout
7191
7192 \begin_layout Subsubsection*
7193 Xdvi (all platforms)
7194 \end_layout
7195
7196 \begin_layout Standard
7197 If you use 
7198 \begin_inset Flex Code
7199 status collapsed
7200
7201 \begin_layout Plain Layout
7202 xdvi
7203 \end_layout
7204
7205 \end_inset
7206
7207 , you don't need to do anything else for performing a reverse DVI search,
7208  as \SpecialChar LyX
7209  already provides the necessary hooks for automatically using the 
7210 \begin_inset Flex Code
7211 status collapsed
7212
7213 \begin_layout Plain Layout
7214 lyxclient
7215 \end_layout
7216
7217 \end_inset
7218
7219  program.
7220  Just setup your document as described above (reverse search is triggered
7221  by Ctrl-click or Alt-click on Mac OSX, respectively).
7222 \end_layout
7223
7224 \begin_layout Standard
7225 However, if for whatever reason you want to use the named pipe instead of
7226  the socket for communicating with \SpecialChar LyX
7227 , simply change the DVI viewer in 
7228 \begin_inset Flex Noun
7229 status collapsed
7230
7231 \begin_layout Plain Layout
7232 Preferences\SpecialChar menuseparator
7233 File Handling\SpecialChar menuseparator
7234 File formats
7235 \end_layout
7236
7237 \end_inset
7238
7239  to
7240 \begin_inset Foot
7241 status collapsed
7242
7243 \begin_layout Plain Layout
7244 On Mac OSX you have to use 
7245 \begin_inset Flex Code
7246 status collapsed
7247
7248 \begin_layout Plain Layout
7249 DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l"
7250 \end_layout
7251
7252 \end_inset
7253
7254
7255 \end_layout
7256
7257 \end_inset
7258
7259  
7260 \begin_inset Flex Code
7261 status collapsed
7262
7263 \begin_layout Plain Layout
7264 xdvi -editor "lyxeditor.sh %f %l"
7265 \end_layout
7266
7267 \end_inset
7268
7269 , where 
7270 \begin_inset Flex Code
7271 status collapsed
7272
7273 \begin_layout Plain Layout
7274 lyxeditor.sh
7275 \end_layout
7276
7277 \end_inset
7278
7279  is a suitable script.
7280  For example, a minimal shell script is the following one:
7281 \end_layout
7282
7283 \begin_layout LyX-Code
7284 #!/bin/sh
7285 \begin_inset Newline newline
7286 \end_inset
7287
7288 LYXPIPE="/path/to/lyxpipe"
7289 \begin_inset Newline newline
7290 \end_inset
7291
7292 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
7293 \begin_inset Newline newline
7294 \end_inset
7295
7296 echo "$COMMAND" > "${LYXPIPE}".in || exit
7297 \begin_inset Newline newline
7298 \end_inset
7299
7300 read TMP < "${LYXPIPE}".out || exit
7301 \end_layout
7302
7303 \begin_layout Standard
7304 where 
7305 \begin_inset Flex Code
7306 status collapsed
7307
7308 \begin_layout Plain Layout
7309 /path/to/lyxpipe
7310 \end_layout
7311
7312 \end_inset
7313
7314  is the LyXServer pipe path specified in 
7315 \begin_inset Flex Noun
7316 status collapsed
7317
7318 \begin_layout Plain Layout
7319 Preferences\SpecialChar menuseparator
7320 Paths
7321 \end_layout
7322
7323 \end_inset
7324
7325 .
7326 \begin_inset Foot
7327 status collapsed
7328
7329 \begin_layout Plain Layout
7330 In the 
7331 \begin_inset Flex Code
7332 status collapsed
7333
7334 \begin_layout Plain Layout
7335 development/tools
7336 \end_layout
7337
7338 \end_inset
7339
7340  folder of a source distribution you can find a 
7341 \begin_inset Flex Code
7342 status collapsed
7343
7344 \begin_layout Plain Layout
7345 lyxeditor
7346 \end_layout
7347
7348 \end_inset
7349
7350  script which is able to locate the 
7351 \emph on
7352 lyxpipe
7353 \emph default
7354  based on your preferences.
7355 \end_layout
7356
7357 \end_inset
7358
7359
7360 \end_layout
7361
7362 \begin_layout Subsubsection*
7363 MacDviX (Mac OSX)
7364 \end_layout
7365
7366 \begin_layout Standard
7367 At the end of 
7368 \begin_inset Flex Code
7369 status collapsed
7370
7371 \begin_layout Plain Layout
7372 /Applications/MacDviX_Folder/calleditor.script
7373 \end_layout
7374
7375 \end_inset
7376
7377 , add the following lines:
7378 \end_layout
7379
7380 \begin_layout LyX-Code
7381 /Applications/LyX.app/Contents/MacOS/lyxeditor "$2" $1
7382 \begin_inset Newline newline
7383 \end_inset
7384
7385 exit 1
7386 \end_layout
7387
7388 \begin_layout Standard
7389 Modify the lines accordingly if you install \SpecialChar LyX
7390  somewhere else than in the
7391  Applications folder.
7392 \end_layout
7393
7394 \begin_layout Standard
7395 Reverse search is triggered by Alt-click (OPTION-click).
7396 \end_layout
7397
7398 \begin_layout Subsubsection*
7399 Skim (Mac OSX)
7400 \end_layout
7401
7402 \begin_layout Standard
7403 Enter 
7404 \begin_inset Flex Code
7405 status collapsed
7406
7407 \begin_layout Plain Layout
7408 open -a Skim.app $$i
7409 \end_layout
7410
7411 \end_inset
7412
7413  to the viewer setting in 
7414 \begin_inset Flex Noun
7415 status collapsed
7416
7417 \begin_layout Plain Layout
7418 Preferences\SpecialChar menuseparator
7419 File Handling\SpecialChar menuseparator
7420 File formats\SpecialChar menuseparator
7421 PDF (pdflatex)
7422 \end_layout
7423
7424 \end_inset
7425
7426 , and then in 
7427 \begin_inset Flex Noun
7428 status collapsed
7429
7430 \begin_layout Plain Layout
7431 Skim\SpecialChar menuseparator
7432 Preferences\SpecialChar menuseparator
7433 Sync
7434 \end_layout
7435
7436 \end_inset
7437
7438  choose 
7439 \begin_inset Flex Noun
7440 status collapsed
7441
7442 \begin_layout Plain Layout
7443 custom
7444 \end_layout
7445
7446 \end_inset
7447
7448  preset and enter command 
7449 \begin_inset Flex Noun
7450 status collapsed
7451
7452 \begin_layout Plain Layout
7453 /Applications/\SpecialChar LyX
7454 .app/Contents/MacOS/lyxeditor
7455 \end_layout
7456
7457 \end_inset
7458
7459 .
7460 \end_layout
7461
7462 \begin_layout Standard
7463 Reverse search is triggered by COMMAND-SHIFT-click
7464 \end_layout
7465
7466 \begin_layout Subsubsection*
7467 Evince (GNOME)
7468 \end_layout
7469
7470 \begin_layout Standard
7471 Reverse search with evince does not work out of the box, but it can be achieved
7472  by means of some third party helper scripts.
7473  Please refer to 
7474 \begin_inset CommandInset href
7475 LatexCommand href
7476 target "https://wiki.lyx.org/LyX/SyncTeX"
7477 literal "false"
7478
7479 \end_inset
7480
7481  for details.
7482 \end_layout
7483
7484 \begin_layout Subsubsection*
7485 Okular (KDE)
7486 \end_layout
7487
7488 \begin_layout Standard
7489 Go to 
7490 \begin_inset Flex Noun
7491 status collapsed
7492
7493 \begin_layout Plain Layout
7494 Settings\SpecialChar menuseparator
7495 Configure Okular\SpecialChar menuseparator
7496 Editor
7497 \end_layout
7498
7499 \end_inset
7500
7501  and select LyX
7502 \begin_inset Quotes erd
7503 \end_inset
7504
7505  as editor.
7506  This inserts the appropriate command (
7507 \begin_inset Flex Code
7508 status collapsed
7509
7510 \begin_layout Plain Layout
7511 lyxclient -g %f %l
7512 \end_layout
7513
7514 \end_inset
7515
7516 ).
7517 \end_layout
7518
7519 \begin_layout Standard
7520 Reverse search is triggered by SHIFT-click.
7521 \end_layout
7522
7523 \begin_layout Subsubsection*
7524 Qpdfview (Unix)
7525 \end_layout
7526
7527 \begin_layout Standard
7528 Qpdfview supports Sync\SpecialChar TeX
7529  since version 0.3.5.
7530  Go to 
7531 \begin_inset Flex Noun
7532 status collapsed
7533
7534 \begin_layout Plain Layout
7535 Edit\SpecialChar menuseparator
7536 Settings\SpecialChar menuseparator
7537 Behavior
7538 \end_layout
7539
7540 \end_inset
7541
7542 , click on the input field of the 
7543 \begin_inset Quotes eld
7544 \end_inset
7545
7546 Source editor
7547 \begin_inset Quotes erd
7548 \end_inset
7549
7550  item and add the command 
7551 \begin_inset Flex Code
7552 status collapsed
7553
7554 \begin_layout Plain Layout
7555 lyxclient -g %1 %2
7556 \end_layout
7557
7558 \end_inset
7559
7560 .
7561 \end_layout
7562
7563 \begin_layout Standard
7564 Reverse search is triggered by double-click or, in more recent versions,
7565  by context menu.
7566 \end_layout
7567
7568 \begin_layout Subsubsection*
7569 YAP (Windows)
7570 \end_layout
7571
7572 \begin_layout Standard
7573 Launch yap, choose its 
7574 \begin_inset Flex Noun
7575 status collapsed
7576
7577 \begin_layout Plain Layout
7578 View\SpecialChar menuseparator
7579 Options
7580 \end_layout
7581
7582 \end_inset
7583
7584  menu and select the 
7585 \begin_inset Quotes eld
7586 \end_inset
7587
7588 Inverse DVI Search
7589 \begin_inset Quotes erd
7590 \end_inset
7591
7592  tab.
7593  Click on the 
7594 \begin_inset Quotes eld
7595 \end_inset
7596
7597 New\SpecialChar ldots
7598
7599 \begin_inset Quotes erd
7600 \end_inset
7601
7602  button and, in the window that opens, enter 
7603 \begin_inset Quotes eld
7604 \end_inset
7605
7606 \SpecialChar LyX
7607  Editor
7608 \begin_inset Quotes erd
7609 \end_inset
7610
7611  (or any other name you like) in the 
7612 \begin_inset Quotes eld
7613 \end_inset
7614
7615 Name:
7616 \begin_inset Quotes erd
7617 \end_inset
7618
7619  field.
7620  Now click on the button labeled 
7621 \begin_inset Quotes eld
7622 \end_inset
7623
7624 \SpecialChar ldots
7625
7626 \begin_inset Quotes erd
7627 \end_inset
7628
7629  to open a file dialog and navigate to the directory containing the batch
7630  file 
7631 \begin_inset Flex Code
7632 status collapsed
7633
7634 \begin_layout Plain Layout
7635 lyxeditor.bat
7636 \end_layout
7637
7638 \end_inset
7639
7640  (see below).
7641  Select 
7642 \begin_inset Flex Code
7643 status collapsed
7644
7645 \begin_layout Plain Layout
7646 lyxeditor.bat
7647 \end_layout
7648
7649 \end_inset
7650
7651  and then specify the program arguments as 
7652 \begin_inset Flex Code
7653 status collapsed
7654
7655 \begin_layout Plain Layout
7656 %f %l
7657 \end_layout
7658
7659 \end_inset
7660
7661 .
7662  The 
7663 \begin_inset Flex Code
7664 status collapsed
7665
7666 \begin_layout Plain Layout
7667 lyxeditor.bat
7668 \end_layout
7669
7670 \end_inset
7671
7672  wrapper is used for communicating with \SpecialChar LyX
7673  through the 
7674 \emph on
7675 lyxpipe
7676 \emph default
7677  and is as follows:
7678 \end_layout
7679
7680 \begin_layout LyX-Code
7681 @echo off
7682 \begin_inset Newline newline
7683 \end_inset
7684
7685 echo LYXCMD:revdvi:server-goto-file-row:%~1 %2> 
7686 \backslash
7687
7688 \backslash
7689 .
7690 \backslash
7691 pipe
7692 \backslash
7693 lyxpipe.in
7694 \begin_inset Newline newline
7695 \end_inset
7696
7697 type 
7698 \backslash
7699
7700 \backslash
7701 .
7702 \backslash
7703 pipe
7704 \backslash
7705 lyxpipe.out
7706 \end_layout
7707
7708 \begin_layout Standard
7709 Make sure that the \SpecialChar LyX
7710 Server pipe path you specified in \SpecialChar LyX
7711  is 
7712 \begin_inset Flex Code
7713 status collapsed
7714
7715 \begin_layout Plain Layout
7716
7717 \backslash
7718
7719 \backslash
7720 .
7721 \backslash
7722 pipe
7723 \backslash
7724 lyxpipe
7725 \end_layout
7726
7727 \end_inset
7728
7729 , otherwise change the 
7730 \begin_inset Flex Code
7731 status collapsed
7732
7733 \begin_layout Plain Layout
7734 lyxeditor.bat
7735 \end_layout
7736
7737 \end_inset
7738
7739  wrapper accordingly.
7740 \end_layout
7741
7742 \begin_layout Standard
7743 In yap, reverse search is triggered by double-click.
7744 \end_layout
7745
7746 \begin_layout Subsubsection*
7747 SumatraPDF (Windows)
7748 \end_layout
7749
7750 \begin_layout Standard
7751 In order to use SumatraPDF for inverse search, enter 
7752 \begin_inset Flex Code
7753 status collapsed
7754
7755 \begin_layout Plain Layout
7756 SumatraPDF -inverse-search "lyxeditor.bat "%f" %l"
7757 \end_layout
7758
7759 \end_inset
7760
7761  in the viewer setting in 
7762 \begin_inset Flex Noun
7763 status collapsed
7764
7765 \begin_layout Plain Layout
7766 Preferences\SpecialChar menuseparator
7767 File Handling\SpecialChar menuseparator
7768 File formats\SpecialChar menuseparator
7769 PDF (pdflatex)
7770 \end_layout
7771
7772 \end_inset
7773
7774 , where 
7775 \begin_inset Flex Code
7776 status collapsed
7777
7778 \begin_layout Plain Layout
7779 lyxeditor.bat
7780 \end_layout
7781
7782 \end_inset
7783
7784  is the previous wrapper.
7785  If SumatraPDF.exe is not in your command PATH, use its full file name.
7786 \end_layout
7787
7788 \begin_layout Standard
7789 Reverse search is triggered by double-click.
7790 \end_layout
7791
7792 \begin_layout Subsubsection*
7793 YAP (Cygwin)
7794 \end_layout
7795
7796 \begin_layout Standard
7797 First of all, make sure that yap is your default DVI viewer in the Windows
7798  environment, then launch it, choose its 
7799 \begin_inset Flex Noun
7800 status collapsed
7801
7802 \begin_layout Plain Layout
7803 View\SpecialChar menuseparator
7804 Options
7805 \end_layout
7806
7807 \end_inset
7808
7809  menu and select the 
7810 \begin_inset Quotes eld
7811 \end_inset
7812
7813 Inverse DVI Search
7814 \begin_inset Quotes erd
7815 \end_inset
7816
7817  tab.
7818  Click on the 
7819 \begin_inset Quotes eld
7820 \end_inset
7821
7822 New\SpecialChar ldots
7823
7824 \begin_inset Quotes erd
7825 \end_inset
7826
7827  button and, in the window that opens, enter 
7828 \begin_inset Quotes eld
7829 \end_inset
7830
7831 \SpecialChar LyX
7832  Editor
7833 \begin_inset Quotes erd
7834 \end_inset
7835
7836  (or any other name you like) in the 
7837 \begin_inset Quotes eld
7838 \end_inset
7839
7840 Name:
7841 \begin_inset Quotes erd
7842 \end_inset
7843
7844  field.
7845  Now click on the button labeled 
7846 \begin_inset Quotes eld
7847 \end_inset
7848
7849 \SpecialChar ldots
7850
7851 \begin_inset Quotes erd
7852 \end_inset
7853
7854  to open a file dialog and navigate to the directory containing the 
7855 \begin_inset Flex Code
7856 status collapsed
7857
7858 \begin_layout Plain Layout
7859 lyxeditor.exe
7860 \end_layout
7861
7862 \end_inset
7863
7864  program (which is installed by default on Cygwin along with the \SpecialChar LyX
7865  executable).
7866  Select 
7867 \begin_inset Flex Code
7868 status collapsed
7869
7870 \begin_layout Plain Layout
7871 lyxeditor.exe
7872 \end_layout
7873
7874 \end_inset
7875
7876  and then specify the program arguments as 
7877 \begin_inset Flex Code
7878 status collapsed
7879
7880 \begin_layout Plain Layout
7881 -g %f %l
7882 \end_layout
7883
7884 \end_inset
7885
7886 .
7887  In this way, you will be using the 
7888 \emph on
7889 lyxsocket
7890 \emph default
7891  for communicating with \SpecialChar LyX
7892 .
7893  If, for whatever reason, you want to use the 
7894 \emph on
7895 lyxpipe
7896 \emph default
7897 , omit the 
7898 \begin_inset Flex Code
7899 status collapsed
7900
7901 \begin_layout Plain Layout
7902 -g
7903 \end_layout
7904
7905 \end_inset
7906
7907  option and be sure to specify the \SpecialChar LyX
7908 Server pipe path in the \SpecialChar LyX
7909  preferences.
7910 \end_layout
7911
7912 \begin_layout Standard
7913 In yap, reverse search is triggered by double-click.
7914 \end_layout
7915
7916 \begin_layout Subsubsection*
7917 SumatraPDF (Cygwin)
7918 \end_layout
7919
7920 \begin_layout Standard
7921 In order to use SumatraPDF for inverse search, enter 
7922 \begin_inset Flex Code
7923 status collapsed
7924
7925 \begin_layout Plain Layout
7926 SumatraPDF -inverse-search "lyxeditor -g %f %l"
7927 \end_layout
7928
7929 \end_inset
7930
7931  in the viewer setting in 
7932 \begin_inset Flex Noun
7933 status collapsed
7934
7935 \begin_layout Plain Layout
7936 Preferences\SpecialChar menuseparator
7937 File Handling\SpecialChar menuseparator
7938 File formats\SpecialChar menuseparator
7939 PDF (pdflatex)
7940 \end_layout
7941
7942 \end_inset
7943
7944 .
7945  If SumatraPDF.exe is not in your command PATH, use its full posix path.
7946  The 
7947 \begin_inset Flex Code
7948 status collapsed
7949
7950 \begin_layout Plain Layout
7951 -g
7952 \end_layout
7953
7954 \end_inset
7955
7956  enables communication via the 
7957 \emph on
7958 lyxsocket
7959 \emph default
7960 .
7961  Again, omit the 
7962 \begin_inset Flex Code
7963 status collapsed
7964
7965 \begin_layout Plain Layout
7966 -g
7967 \end_layout
7968
7969 \end_inset
7970
7971  option if you want to use the 
7972 \emph on
7973 lyxpipe
7974 \emph default
7975 , and be sure to specify the \SpecialChar LyX
7976 Server pipe path in the \SpecialChar LyX
7977  preferences.
7978 \end_layout
7979
7980 \begin_layout Standard
7981 Reverse search is triggered by double-click.
7982 \end_layout
7983
7984 \begin_layout Section
7985 Forward search
7986 \end_layout
7987
7988 \begin_layout Standard
7989 Forward search is, as the name implies, in a sense the 
7990 \begin_inset Quotes eld
7991 \end_inset
7992
7993 opposite
7994 \begin_inset Quotes erd
7995 \end_inset
7996
7997  of reverse search.
7998  It allows you to let the viewer jump to a given position from within \SpecialChar LyX
7999 .
8000  If forward search is set up (as described in what follows), you can put
8001  the cursor anywhere in your \SpecialChar LyX
8002  document, and hit 
8003 \begin_inset Flex Noun
8004 status collapsed
8005
8006 \begin_layout Plain Layout
8007 Navigate\SpecialChar menuseparator
8008 Forward search
8009 \end_layout
8010
8011 \end_inset
8012
8013  (or select 
8014 \begin_inset Flex Noun
8015 status collapsed
8016
8017 \begin_layout Plain Layout
8018 Forward search
8019 \end_layout
8020
8021 \end_inset
8022
8023  in the context menu via right mouse click), and then the viewer will jump
8024  to that position as well.
8025  This implies, of course, that your viewer supports this function.
8026 \end_layout
8027
8028 \begin_layout Standard
8029 To make forward search possible, you first need to provide the generated
8030  output PDF/DVI file with additional information about the \SpecialChar TeX
8031  sources.
8032  This can be done via the methods described in the section 
8033 \begin_inset CommandInset ref
8034 LatexCommand ref
8035 reference "subsec:rev-search"
8036
8037 \end_inset
8038
8039 .
8040 \end_layout
8041
8042 \begin_layout Standard
8043 Additionally, you need to configure \SpecialChar LyX
8044  for using your viewers in 
8045 \begin_inset Flex Noun
8046 status collapsed
8047
8048 \begin_layout Plain Layout
8049 Tools\SpecialChar menuseparator
8050 Preferences\SpecialChar menuseparator
8051 Output\SpecialChar menuseparator
8052 General
8053 \end_layout
8054
8055 \end_inset
8056
8057 .
8058  We provide a range of tested configurations for some viewers, which you
8059  can select from the drop down list.
8060  If none of these configurations suits you, you have to find out and enter
8061  a suitable configuration yourself.
8062  The definition syntax uses the following placeholders:
8063 \end_layout
8064
8065 \begin_layout Itemize
8066 \noindent
8067 \begin_inset Flex Code
8068 status collapsed
8069
8070 \begin_layout Plain Layout
8071 $$n
8072 \end_layout
8073
8074 \end_inset
8075
8076 : row number
8077 \end_layout
8078
8079 \begin_layout Itemize
8080 \noindent
8081 \begin_inset Flex Code
8082 status collapsed
8083
8084 \begin_layout Plain Layout
8085 $$t
8086 \end_layout
8087
8088 \end_inset
8089
8090 : name of the (temporary) exported .tex file (without path)
8091 \end_layout
8092
8093 \begin_layout Itemize
8094 \noindent
8095 \begin_inset Flex Code
8096 status collapsed
8097
8098 \begin_layout Plain Layout
8099 $$f
8100 \end_layout
8101
8102 \end_inset
8103
8104 : name of the (temporary) exported .tex file (including path)
8105 \end_layout
8106
8107 \begin_layout Itemize
8108 \noindent
8109 \begin_inset Flex Code
8110 status collapsed
8111
8112 \begin_layout Plain Layout
8113 $$o
8114 \end_layout
8115
8116 \end_inset
8117
8118 : name of the exported output file (either dvi or pdf, depending on which
8119  one exists in the temporary directory)
8120 \end_layout
8121
8122 \begin_layout Standard
8123 Note that only some of the viewers provide full and usable forward search
8124  functionality out of the box, among them yap, xdvi, okular
8125 \begin_inset Foot
8126 status collapsed
8127
8128 \begin_layout Plain Layout
8129 You might want to set 
8130 \begin_inset Flex Code
8131 status collapsed
8132
8133 \begin_layout Plain Layout
8134 okular --unique
8135 \end_layout
8136
8137 \end_inset
8138
8139  in 
8140 \begin_inset Flex Noun
8141 status collapsed
8142
8143 \begin_layout Plain Layout
8144 Tools\SpecialChar menuseparator
8145 Preferences\SpecialChar menuseparator
8146 File Handling\SpecialChar menuseparator
8147 File
8148 \begin_inset space ~
8149 \end_inset
8150
8151 Formats
8152 \end_layout
8153
8154 \end_inset
8155
8156
8157 \end_layout
8158
8159 \end_inset
8160
8161 , qpdfview, and SumatraPDF
8162 \begin_inset Foot
8163 status collapsed
8164
8165 \begin_layout Plain Layout
8166 SumatraPDF can also use DDE commands through the external program CMCDDE
8167  â€” downloadable from 
8168 \begin_inset CommandInset href
8169 LatexCommand href
8170 target "http://www.istri.fr/spip/zip/CMCDDE.zip"
8171 literal "false"
8172
8173 \end_inset
8174
8175
8176 \end_layout
8177
8178 \end_inset
8179
8180 .
8181  Others, such as evince
8182 \begin_inset Foot
8183 status collapsed
8184
8185 \begin_layout Plain Layout
8186 Forward search with evince can be achieved by means of third party helper
8187  scripts.
8188  Please refer to 
8189 \begin_inset CommandInset href
8190 LatexCommand href
8191 target "https://wiki.lyx.org/LyX/SyncTeX"
8192 literal "false"
8193
8194 \end_inset
8195
8196  for details.
8197 \end_layout
8198
8199 \end_inset
8200
8201 , require some extra tools in order to use forward search.
8202  While many of the widespread PDF viewers (most notably Adobe Reader) do
8203  not support forward search at all, some other viewers â€“ e.
8204 \begin_inset space \thinspace{}
8205 \end_inset
8206
8207 g.
8208  xpdf â€“ allow at least to reload the document and jump to a specific page
8209  of the file, so you can at least navigate 
8210 \begin_inset Quotes eld
8211 \end_inset
8212
8213 near
8214 \begin_inset Quotes erd
8215 \end_inset
8216
8217 .
8218  This latter functionality is provided by an external call of synctex (see
8219  the predefined example configurations).
8220  
8221 \end_layout
8222
8223 \begin_layout Standard
8224 Forward search works both with DVI and PDF output.
8225  \SpecialChar LyX
8226  simply checks which preview format you have used before (i.
8227 \begin_inset space \thinspace{}
8228 \end_inset
8229
8230 e., which format is already there in the temporary directory) and chooses
8231  the appropriate configuration for the respective format.
8232 \end_layout
8233
8234 \begin_layout Chapter
8235 Special Document Classes
8236 \end_layout
8237
8238 \begin_layout Section
8239 A&A Paper
8240 \end_layout
8241
8242 \begin_layout Standard
8243 by 
8244 \noun on
8245 Peter Sütterlin
8246 \end_layout
8247
8248 \begin_layout Subsection
8249 Introduction
8250 \end_layout
8251
8252 \begin_layout Standard
8253 This section describes how \SpecialChar LyX
8254  can be used to write articles for submission
8255  to the scientific journal 
8256 \emph on
8257 Astronomy and Astrophysics
8258 \emph default
8259  (
8260 \begin_inset Flex URL
8261 status collapsed
8262
8263 \begin_layout Plain Layout
8264
8265 https://www.aanda.org/
8266 \end_layout
8267
8268 \end_inset
8269
8270 ) using Version 5.01 of the document class 
8271 \family typewriter
8272 aa.cls
8273 \family default
8274 .
8275  This package can be downloaded from the ftp site
8276 \end_layout
8277
8278 \begin_layout Standard
8279 \begin_inset VSpace medskip
8280 \end_inset
8281
8282
8283 \end_layout
8284
8285 \begin_layout Standard
8286 \align center
8287 \begin_inset Flex URL
8288 status collapsed
8289
8290 \begin_layout Plain Layout
8291
8292 ftp://ftp.edpsciences.org/pub/aa/readme.html
8293 \end_layout
8294
8295 \end_inset
8296
8297
8298 \end_layout
8299
8300 \begin_layout Standard
8301 \begin_inset VSpace medskip
8302 \end_inset
8303
8304
8305 \end_layout
8306
8307 \begin_layout Standard
8308 A manual comes together with that package, and this text is not meant to
8309  replace the original manual but is merely a short guide in how to realize
8310  the correct form of your paper.
8311  
8312 \end_layout
8313
8314 \begin_layout Standard
8315 Please note that the publisher of the journal was changed from Springer
8316  to EDP Sciences starting January 1, 2001.
8317  That change involved also some slight changes to the style files, namely
8318  the removal of the thesaurus command.
8319  The \SpecialChar LyX
8320  class aa supports the newest version of these style files, V 5.01.
8321  If you have an older version installed, please upgrade.
8322  For compatibility, the old (version 4) layout has been kept as 
8323 \family sans
8324 article (A&A V4)
8325 \family default
8326 .
8327  Please refer to the comments in 
8328 \family typewriter
8329 \SpecialChar LyX
8330 Dir/layouts/aapaper.layout
8331 \family default
8332 .
8333 \end_layout
8334
8335 \begin_layout Subsection
8336 Getting started
8337 \end_layout
8338
8339 \begin_layout Standard
8340 It is recommended you start from the example template distributed with \SpecialChar LyX
8341 .
8342  If you are not using a template, note the following settings:
8343 \end_layout
8344
8345 \begin_layout Itemize
8346 Select 
8347 \family sans
8348 article (A&A)
8349 \family default
8350  in the 
8351 \family sans
8352 Document\SpecialChar menuseparator
8353 Settings
8354 \family default
8355  dialog (OK, that one was obvious).
8356 \end_layout
8357
8358 \begin_layout Itemize
8359 Don't change the option 
8360 \family sans
8361 Page
8362 \begin_inset space ~
8363 \end_inset
8364
8365 style
8366 \family default
8367 : Leave it set to 
8368 \family sans
8369 default
8370 \family default
8371 .
8372  The whole layout is done by the macros, you shouldn't change anything.
8373 \end_layout
8374
8375 \begin_layout Subsection
8376 The header block
8377 \end_layout
8378
8379 \begin_layout Standard
8380 First thing to enter is the header information.
8381  It consists of seven entries, of which some are optional.
8382  They are
8383 \end_layout
8384
8385 \begin_layout Itemize
8386
8387 \family sans
8388 Title
8389 \family default
8390 : [required] 
8391 \end_layout
8392
8393 \begin_layout Itemize
8394
8395 \family sans
8396 Subtitle
8397 \family default
8398 : [optional] 
8399 \end_layout
8400
8401 \begin_layout Itemize
8402
8403 \family sans
8404 Author
8405 \family default
8406 : [required]
8407 \end_layout
8408
8409 \begin_layout Itemize
8410
8411 \family sans
8412 Address
8413 \family default
8414 : [required]
8415 \end_layout
8416
8417 \begin_layout Itemize
8418
8419 \family sans
8420 Offprints
8421 \family default
8422 : [optional] if more than one author: whom to contact for offprint requests.
8423 \end_layout
8424
8425 \begin_layout Itemize
8426
8427 \family sans
8428 Mail
8429 \family default
8430 : [optional] mail address for contacts.
8431 \end_layout
8432
8433 \begin_layout Itemize
8434
8435 \family sans
8436 Date
8437 \family default
8438 : [required].
8439  Suggested format is 
8440 \family typewriter
8441 Received: <date>; Accepted <date> 
8442 \end_layout
8443
8444 \begin_layout Standard
8445 There is no need to issue the 
8446 \family typewriter
8447
8448 \backslash
8449 maketitle
8450 \family default
8451  command, this is done automatically by \SpecialChar LyX
8452  when the header is finished.
8453  Although the order of the single header entries doesn't matter it is advised
8454  to keep the above sequence, just to get the best optics and meets the layout
8455  of the real document.
8456 \end_layout
8457
8458 \begin_layout Standard
8459 If you want to place footnotes in the header block, e.
8460 \begin_inset space \thinspace{}
8461 \end_inset
8462
8463 g.
8464 \begin_inset space \space{}
8465 \end_inset
8466
8467 to state your present address, just use the standard footnote via the menu
8468  
8469 \family sans
8470 Insert\SpecialChar menuseparator
8471 Footnote.
8472
8473 \family default
8474  \SpecialChar LyX
8475  will automagically use the term 
8476 \family typewriter
8477
8478 \backslash
8479 thanks{}
8480 \family default
8481  in that case.
8482 \end_layout
8483
8484 \begin_layout Standard
8485 Under 
8486 \family sans
8487 Edit\SpecialChar menuseparator
8488 Text Style
8489 \family default
8490 , you'll find two insets which are relevant for the titling:
8491 \end_layout
8492
8493 \begin_layout Itemize
8494
8495 \family sans
8496 Institute
8497 \family typewriter
8498  
8499 \family default
8500 to mark corresponding author\SpecialChar breakableslash
8501 institute pairs.
8502  The institutes are numbered sequentially as they appear in the 
8503 \family sans
8504 Address
8505 \family default
8506  field, so you have to put a marker to each author.
8507 \end_layout
8508
8509 \begin_layout Itemize
8510
8511 \family sans
8512 Email
8513 \family default
8514  to supply an email address for fast contact.
8515 \end_layout
8516
8517 \begin_layout Standard
8518 In addition to these topics, the macros use one additional \SpecialChar LaTeX
8519  command that
8520  has no counterpart in \SpecialChar LyX
8521 :
8522 \end_layout
8523
8524 \begin_layout Itemize
8525
8526 \family typewriter
8527
8528 \backslash
8529 and
8530 \family default
8531  to separate different names for more than one author and institute, respectivel
8532 y.
8533 \end_layout
8534
8535 \begin_layout Standard
8536 The appropriate command has to be entered in \SpecialChar LyX
8537  and marked as \SpecialChar LaTeX
8538  code.
8539  See the examples.
8540  
8541 \end_layout
8542
8543 \begin_layout Subsection
8544 The abstract
8545 \end_layout
8546
8547 \begin_layout Standard
8548 The abstract should immediately follow the header block.
8549  With version 5 the abstract environment was changed to a command, and there
8550  is now a restriction to only one paragraph.
8551  In addition, it should contain an entry with the keywords.
8552  This is done via the paragraph style 
8553 \family sans
8554 Keywords
8555 \family default
8556 .
8557  Refer to the example paper.
8558 \end_layout
8559
8560 \begin_layout Subsection
8561 Supported environments
8562 \end_layout
8563
8564 \begin_layout Standard
8565 The A&A paper layout supports the following environments for structuring
8566  your text:
8567 \end_layout
8568
8569 \begin_layout Itemize
8570
8571 \family sans
8572 Standard
8573 \end_layout
8574
8575 \begin_layout Itemize
8576
8577 \family sans
8578 Section
8579 \end_layout
8580
8581 \begin_layout Itemize
8582
8583 \family sans
8584 Subsection
8585 \end_layout
8586
8587 \begin_layout Itemize
8588
8589 \family sans
8590 Subsubsection
8591 \end_layout
8592
8593 \begin_layout Itemize
8594
8595 \family sans
8596 Itemize
8597 \end_layout
8598
8599 \begin_layout Itemize
8600
8601 \family sans
8602 Enumerate
8603 \end_layout
8604
8605 \begin_layout Itemize
8606
8607 \family sans
8608 Description
8609 \end_layout
8610
8611 \begin_layout Itemize
8612
8613 \family sans
8614 Caption
8615 \end_layout
8616
8617 \begin_layout Itemize
8618
8619 \family sans
8620 Abstract
8621 \end_layout
8622
8623 \begin_layout Itemize
8624
8625 \family sans
8626 Acknowledgment
8627 \end_layout
8628
8629 \begin_layout Itemize
8630
8631 \family sans
8632 Bibliography
8633 \end_layout
8634
8635 \begin_layout Itemize
8636
8637 \family sans
8638 \SpecialChar LaTeX
8639
8640 \end_layout
8641
8642 \begin_layout Subsection
8643 Commands not supported by \SpecialChar LyX
8644
8645 \end_layout
8646
8647 \begin_layout Standard
8648 Some commands are not yet supported by the 
8649 \family sans
8650 paper (A&A)
8651 \family default
8652  layout for \SpecialChar LyX
8653 .
8654  Some have already been mentioned.
8655  For the sake of completeness, they are listed all together here:
8656 \end_layout
8657
8658 \begin_layout Itemize
8659
8660 \family typewriter
8661
8662 \backslash
8663 and
8664 \end_layout
8665
8666 \begin_layout Itemize
8667
8668 \family typewriter
8669
8670 \backslash
8671 authorrunning
8672 \end_layout
8673
8674 \begin_layout Itemize
8675
8676 \family typewriter
8677
8678 \backslash
8679 object{}
8680 \end_layout
8681
8682 \begin_layout Itemize
8683
8684 \family typewriter
8685
8686 \backslash
8687 titlerunning{}
8688 \end_layout
8689
8690 \begin_layout Standard
8691 If you want to use any of these commands, you have to enter them yourself.
8692  
8693 \series bold
8694 Do not forget to mark them as \SpecialChar LaTeX
8695  code!
8696 \end_layout
8697
8698 \begin_layout Subsection
8699 Figure and Table Floats
8700 \end_layout
8701
8702 \begin_layout Standard
8703 \SpecialChar LyX
8704  provides support for the necessary float environments 
8705 \family sans
8706 figure, figure*, table
8707 \family default
8708  and 
8709 \family sans
8710 table*
8711 \family default
8712 , therefore we won't tell much about it here.
8713  Refer to the 
8714 \emph on
8715 User's
8716 \begin_inset space ~
8717 \end_inset
8718
8719 Guide
8720 \emph default
8721 .
8722  Just remember that tables should be left-aligned.
8723  For that, select the table and change the alignment in 
8724 \family sans
8725 Edit\SpecialChar menuseparator
8726 Paragraph
8727 \begin_inset space ~
8728 \end_inset
8729
8730 Settings.
8731 \end_layout
8732
8733 \begin_layout Standard
8734 There is only one special thing: the figures with caption besides the figure.
8735  To create such a figure, you have to do the following:
8736 \end_layout
8737
8738 \begin_layout Enumerate
8739 Create a wide figure float: 
8740 \family sans
8741 Insert\SpecialChar menuseparator
8742 Float\SpecialChar menuseparator
8743 Figure
8744 \family default
8745 , then right click in the figure and select 
8746 \family sans
8747 Span
8748 \begin_inset space ~
8749 \end_inset
8750
8751 columns
8752 \family default
8753 .
8754 \end_layout
8755
8756 \begin_layout Enumerate
8757 Enter your caption text.
8758 \end_layout
8759
8760 \begin_layout Enumerate
8761 Press 
8762 \family sans
8763 Return
8764 \family default
8765  to move the cursor above the caption.
8766 \end_layout
8767
8768 \begin_layout Enumerate
8769 Insert your figure
8770 \end_layout
8771
8772 \begin_layout Enumerate
8773 Position the cursor behind the figure and insert a horizontal fill: 
8774 \family sans
8775 Insert\SpecialChar menuseparator
8776 Special
8777 \begin_inset space ~
8778 \end_inset
8779
8780 Character\SpecialChar menuseparator
8781 Horizontal
8782 \begin_inset space ~
8783 \end_inset
8784
8785 Fill
8786 \family default
8787 .
8788 \end_layout
8789
8790 \begin_layout Enumerate
8791 Switch to \SpecialChar LaTeX
8792  mode: 
8793 \family sans
8794 M-c
8795 \begin_inset space ~
8796 \end_inset
8797
8798 t
8799 \family default
8800 .
8801 \end_layout
8802
8803 \begin_layout Enumerate
8804 Enter 
8805 \family typewriter
8806
8807 \backslash
8808 parbox[b]{55mm}{
8809 \family default
8810 .
8811  
8812 \series bold
8813 Do not close the brace!
8814 \end_layout
8815
8816 \begin_layout Enumerate
8817 Position the cursor behind the caption text, switch to \SpecialChar LaTeX
8818  mode and insert
8819  the closing brace: 
8820 \family sans
8821 M-c
8822 \begin_inset space ~
8823 \end_inset
8824
8825 t
8826 \family default
8827  
8828 \family typewriter
8829 }
8830 \family default
8831 .
8832 \end_layout
8833
8834 \begin_layout Standard
8835 Also, refer to the figures in the example paper.
8836 \end_layout
8837
8838 \begin_layout Subsection
8839 Referee layout
8840 \end_layout
8841
8842 \begin_layout Standard
8843 For submission, the paper has to be formated in a special double-spacing
8844  layout.
8845  For this purpose, you have to give the option 
8846 \family typewriter
8847 referee
8848 \family default
8849  to the document class.
8850  This must be done using the custom class options field in the 
8851 \family sans
8852 Document\SpecialChar menuseparator
8853 Settings
8854 \family default
8855  dialog.
8856  Just enter the string 
8857 \family typewriter
8858 referee
8859 \family default
8860  there.
8861 \end_layout
8862
8863 \begin_layout Subsection
8864 The example paper
8865 \end_layout
8866
8867 \begin_layout Standard
8868 The 
8869 \family sans
8870 Examples
8871 \family default
8872  directory contains an example paper written with \SpecialChar LyX
8873 .
8874  It is the example paper from the original macro package, translated to
8875  \SpecialChar LyX
8876 .
8877  Use it for inspiration, and compare the original \SpecialChar LaTeX
8878  code with \SpecialChar LyX
8879  way of writing.
8880 \end_layout
8881
8882 \begin_layout Section
8883 AAS\SpecialChar TeX
8884
8885 \end_layout
8886
8887 \begin_layout Standard
8888 by 
8889 \noun on
8890 Mike Ressler
8891 \end_layout
8892
8893 \begin_layout Subsection
8894 Introduction
8895 \end_layout
8896
8897 \begin_layout Standard
8898 AAS\SpecialChar TeX
8899  is a set of macros produced by the American Astronomical Society to
8900  facilitate electronic manuscript submission to the three journals they
8901  publish: the Astrophysical Journal (including the Letters and Supplement),
8902  the Astronomical Journal, and the Publications of the Astronomical Society
8903  of the Pacific.
8904  \SpecialChar LyX
8905  has proven to be an excellent tool for generating these documents, especially
8906  given its equation, citation, and figure handling capabilities.
8907  \SpecialChar LyX
8908  requires version 5.0 (or higher) of these macros; preferably 6.0, which
8909  is the version described here, or higher.
8910  Versions prior to 5.0 are intended for use with \SpecialChar LaTeX
8911 2.09 and are fundamentally
8912  incompatible with \SpecialChar LyX
8913 .
8914  The AAS\SpecialChar TeX
8915  package may be downloaded from the AAS\SpecialChar TeX
8916  Web site
8917 \end_layout
8918
8919 \begin_layout Standard
8920 \begin_inset VSpace medskip
8921 \end_inset
8922
8923
8924 \end_layout
8925
8926 \begin_layout Standard
8927 \align center
8928 \begin_inset Flex URL
8929 status collapsed
8930
8931 \begin_layout Plain Layout
8932
8933 https://aas.org/aastex/aastex-downloads
8934 \end_layout
8935
8936 \end_inset
8937
8938
8939 \end_layout
8940
8941 \begin_layout Standard
8942 \begin_inset VSpace medskip
8943 \end_inset
8944
8945
8946 \end_layout
8947
8948 \begin_layout Standard
8949 A complete user guide is contained in that package and you should familiarize
8950  yourself with it thoroughly before embarking on writing a paper in \SpecialChar LyX
8951 .
8952  \SpecialChar LyX
8953  will not reduce the need to figure out all the AAS\SpecialChar TeX
8954  commands, it will only
8955  reduce the drudgery of typing everything in.
8956  It is your responsibility to ensure that the final exported \SpecialChar LaTeX
8957  document conforms
8958  completely to the requirements of the journal to which you are submitting
8959  your paper.
8960 \end_layout
8961
8962 \begin_layout Subsection
8963 Starting a New Paper
8964 \end_layout
8965
8966 \begin_layout Standard
8967 I strongly suggest that you start with the AAS\SpecialChar TeX
8968  template file.
8969  Click on 
8970 \family sans
8971 File\SpecialChar menuseparator
8972 New from
8973 \family default
8974  
8975 \family sans
8976 Template
8977 \family default
8978 , enter the new file name, then choose the 
8979 \family typewriter
8980 aastex6.lyx
8981 \family default
8982  template.
8983  This will show the most common fields found in a manuscript.
8984  Simply overwrite the existing text (including the brackets, 
8985 \family typewriter
8986 <>
8987 \family default
8988 ) with the correct information.
8989  Many of the AAS\SpecialChar TeX
8990  commands and environments can be implemented directly in
8991  \SpecialChar LyX
8992 , but some cannot.
8993  For commands such as these, the \SpecialChar LaTeX
8994  code must be entered directly and marked
8995  as such.
8996  Such commands are referred to as \SpecialChar TeX
8997  code, or Evil Red Text.
8998  I tried to minimize the amount of \SpecialChar TeX
8999  code needed in an AAS\SpecialChar TeX
9000  document.
9001 \end_layout
9002
9003 \begin_layout Subsection
9004 Finishing Your Paper
9005 \end_layout
9006
9007 \begin_layout Standard
9008 When the paper is finished to your satisfaction and previews/prints correctly,
9009  there are a few 
9010 \begin_inset Quotes eld
9011 \end_inset
9012
9013 postprocessing
9014 \begin_inset Quotes erd
9015 \end_inset
9016
9017  actions which need to be done before you submit it to the journals.
9018  
9019 \end_layout
9020
9021 \begin_layout Enumerate
9022 Export your paper as a \SpecialChar LaTeX
9023  file (
9024 \family sans
9025 File\SpecialChar menuseparator
9026 Export\SpecialChar menuseparator
9027 \SpecialChar LaTeX
9028
9029 \family default
9030 ).
9031  
9032 \end_layout
9033
9034 \begin_layout Enumerate
9035 Edit the resulting 
9036 \family typewriter
9037 .tex
9038 \family default
9039  file with your favorite text editor
9040 \end_layout
9041
9042 \begin_deeper
9043 \begin_layout Enumerate
9044 remove the comment lines before the 
9045 \family typewriter
9046
9047 \backslash
9048 documentclass
9049 \family default
9050  command
9051 \end_layout
9052
9053 \begin_layout Enumerate
9054 remove the 
9055 \family typewriter
9056
9057 \backslash
9058 usepackage...{fontenc}
9059 \family default
9060  line if it appears (usually just after 
9061 \family typewriter
9062
9063 \backslash
9064 documentclass
9065 \family default
9066 }; also remove the 
9067 \family typewriter
9068
9069 \backslash
9070 secnumdepth
9071 \family default
9072  line if it appears.
9073 \end_layout
9074
9075 \begin_layout Enumerate
9076 remove everything between (and including) the 
9077 \family typewriter
9078
9079 \backslash
9080 makeatletter
9081 \family default
9082  and 
9083 \family typewriter
9084
9085 \backslash
9086 makeatother
9087 \family default
9088  commands, except for any commands you specifically put into the \SpecialChar LaTeX
9089  preamble
9090  (which should appear immediately after the 
9091 \begin_inset Quotes eld
9092 \end_inset
9093
9094 User specified \SpecialChar LaTeX
9095  commands
9096 \begin_inset Quotes erd
9097 \end_inset
9098
9099  comment in the 
9100 \family typewriter
9101 .tex
9102 \family default
9103  file).
9104 \end_layout
9105
9106 \end_deeper
9107 \begin_layout Enumerate
9108 Run the resulting file through \SpecialChar LaTeX
9109  to make sure it still processes correctly.
9110 \end_layout
9111
9112 \begin_layout Enumerate
9113 Reread the journal requirements to make sure your filenames and formats
9114  are correct.
9115 \end_layout
9116
9117 \begin_layout Enumerate
9118 Submit it.
9119 \end_layout
9120
9121 \begin_layout Subsection
9122 Comments On Specific Commands
9123 \end_layout
9124
9125 \begin_layout Standard
9126 I will not describe the detailed usage of the individual AAS\SpecialChar TeX
9127  commands: the
9128  AAS\SpecialChar TeX
9129  User Guide (
9130 \family typewriter
9131 aasguide.tex
9132 \family default
9133 ) gives a good description of each.
9134  Thus it's probably easiest for me to go down the list as found in the guide
9135  and offer comments where necessary.
9136  So let's begin \SpecialChar ldots
9137
9138 \end_layout
9139
9140 \begin_layout Subsubsection
9141 Things that work as expected
9142 \end_layout
9143
9144 \begin_layout Standard
9145 Because they work as you might expect, I simply list them and the section
9146  they are found in: 
9147 \family typewriter
9148
9149 \backslash
9150 documentclass
9151 \family default
9152  (2.1.1), 
9153 \family typewriter
9154
9155 \backslash
9156 begin{document}
9157 \family default
9158  (2.2), 
9159 \family typewriter
9160
9161 \backslash
9162 title
9163 \family default
9164  (2.3), 
9165 \family typewriter
9166
9167 \backslash
9168 author
9169 \family default
9170  (2.3), 
9171 \family typewriter
9172
9173 \backslash
9174 affil
9175 \family default
9176  (2.3), 
9177 \family typewriter
9178
9179 \backslash
9180 abstract
9181 \family default
9182  (2.4), 
9183 \family typewriter
9184
9185 \backslash
9186 keywords
9187 \family default
9188  (2.5), 
9189 \family typewriter
9190
9191 \backslash
9192 section
9193 \family default
9194  (2.7), 
9195 \family typewriter
9196
9197 \backslash
9198 subsection
9199 \family default
9200  (2.7), 
9201 \family typewriter
9202
9203 \backslash
9204 subsubsection
9205 \family default
9206  (2.7), 
9207 \family typewriter
9208
9209 \backslash
9210 paragraph
9211 \family default
9212  (2.7), 
9213 \family typewriter
9214
9215 \backslash
9216 facility
9217 \family default
9218  (2.10), 
9219 \family typewriter
9220
9221 \backslash
9222 begin{displaymath}
9223 \family default
9224  (2.12), 
9225 \family typewriter
9226
9227 \backslash
9228 begin{equation}
9229 \family default
9230  (2.12), 
9231 \family typewriter
9232
9233 \backslash
9234 begin{eqnarray}
9235 \family default
9236  (2.12), 
9237 \family typewriter
9238
9239 \backslash
9240 begin{mathletters}
9241 \family default
9242  (2.12), 
9243 \family typewriter
9244
9245 \backslash
9246 begin{thebibliography}
9247 \family default
9248  (2.13.1), 
9249 \family typewriter
9250
9251 \backslash
9252 bibitem
9253 \family default
9254  (2.13.2), all the cite commands and their variations (2.13.2), the generic
9255  graphicx figure commands (2.14.1), 
9256 \family typewriter
9257
9258 \backslash
9259 begin{table}
9260 \family default
9261  (2.15.4), 
9262 \family typewriter
9263
9264 \backslash
9265 begin{tabular}
9266 \family default
9267  (2.15.4), 
9268 \family typewriter
9269
9270 \backslash
9271 caption
9272 \family default
9273  (2.15.4), 
9274 \family typewriter
9275
9276 \backslash
9277 label
9278 \family default
9279  (2.15.4, amongst other places), 
9280 \family typewriter
9281
9282 \backslash
9283 tablerefs
9284 \family default
9285  (2.15.5), 
9286 \family typewriter
9287
9288 \backslash
9289 tablecomments
9290 \family default
9291  (2.15.5), 
9292 \family typewriter
9293
9294 \backslash
9295 url
9296 \family default
9297  (2.17.4), 
9298 \family typewriter
9299
9300 \backslash
9301 end{document}
9302 \family default
9303  (2.18).
9304 \end_layout
9305
9306 \begin_layout Standard
9307 The following style options also work correctly: 
9308 \family typewriter
9309 longabstract
9310 \family default
9311  (2.4), 
9312 \family typewriter
9313 preprint
9314 \family default
9315  (3.2.1), 
9316 \family typewriter
9317 preprint2
9318 \family default
9319  (3.2.2), 
9320 \family typewriter
9321 eqsecnum
9322 \family default
9323  (3.3), 
9324 \family typewriter
9325 flushrt
9326 \family default
9327  (3.4).
9328  Simply put them in the 
9329 \family sans
9330 Options
9331 \family default
9332  box in 
9333 \family sans
9334 Layout\SpecialChar menuseparator
9335 Document
9336 \family default
9337 .
9338 \end_layout
9339
9340 \begin_layout Subsubsection
9341 Things that work, but require more comment
9342 \end_layout
9343
9344 \begin_layout Standard
9345 The following items work, but require a little more discussion:
9346 \end_layout
9347
9348 \begin_layout Itemize
9349 These items are reserved for use by the journal editors, but you can put
9350  them into the \SpecialChar LaTeX
9351  preamble if you feel compelled to do so: 
9352 \family typewriter
9353
9354 \backslash
9355 received
9356 \family default
9357
9358 \family typewriter
9359
9360 \backslash
9361 revised
9362 \family default
9363
9364 \family typewriter
9365
9366 \backslash
9367 accepted
9368 \family default
9369
9370 \family typewriter
9371
9372 \backslash
9373 ccc
9374 \family default
9375
9376 \family typewriter
9377
9378 \backslash
9379 cpright
9380 \family default
9381  (all from 2.1.3)
9382 \end_layout
9383
9384 \begin_layout Itemize
9385 These items may be placed in the \SpecialChar LaTeX
9386  preamble, and are included as blanks in
9387  the template file: 
9388 \family typewriter
9389
9390 \backslash
9391 slugcomment
9392 \family default
9393  (2.1.4), 
9394 \family typewriter
9395
9396 \backslash
9397 shorttitle
9398 \family default
9399  (2.1.5), 
9400 \family typewriter
9401
9402 \backslash
9403 shortauthors
9404 \family default
9405  (2.1.5)
9406 \end_layout
9407
9408 \begin_layout Itemize
9409
9410 \family typewriter
9411
9412 \backslash
9413 email
9414 \family default
9415  (2.3) â€“ can only be used 
9416 \begin_inset Quotes eld
9417 \end_inset
9418
9419 standalone
9420 \begin_inset Quotes erd
9421 \end_inset
9422
9423 , not in the middle of a paragraph.
9424  Use \SpecialChar TeX
9425  code if you need to embed it.
9426 \end_layout
9427
9428 \begin_layout Itemize
9429
9430 \family typewriter
9431
9432 \backslash
9433 and
9434 \family default
9435  (2.3) â€“ will have extra {} after it.
9436  This should not cause an error.
9437 \end_layout
9438
9439 \begin_layout Itemize
9440
9441 \family typewriter
9442
9443 \backslash
9444 notetoeditor
9445 \family default
9446  (2.6) â€“ can only be used 
9447 \begin_inset Quotes eld
9448 \end_inset
9449
9450 standalone
9451 \begin_inset Quotes erd
9452 \end_inset
9453
9454 , not in the middle of a paragraph.
9455  Use \SpecialChar TeX
9456  code if you need to embed it.
9457 \end_layout
9458
9459 \begin_layout Itemize
9460
9461 \family typewriter
9462
9463 \backslash
9464 placetable
9465 \family default
9466  (2.8) â€“ can't insert a cross-reference tag, you must type the tag name by
9467  hand
9468 \end_layout
9469
9470 \begin_layout Itemize
9471
9472 \family typewriter
9473
9474 \backslash
9475 placefigure
9476 \family default
9477  (2.8) â€“ same as for 
9478 \family typewriter
9479
9480 \backslash
9481 placetable
9482 \end_layout
9483
9484 \begin_layout Itemize
9485
9486 \family typewriter
9487
9488 \backslash
9489 acknowledgements
9490 \family default
9491  (2.9) â€“ will have extra {} after it.
9492  This should not cause an error.
9493 \end_layout
9494
9495 \begin_layout Itemize
9496
9497 \family typewriter
9498
9499 \backslash
9500 appendix
9501 \family default
9502  (2.11) â€“ will have extra {} after it.
9503  This should not cause an error.
9504 \end_layout
9505
9506 \begin_layout Itemize
9507
9508 \family typewriter
9509
9510 \backslash
9511 figcaption
9512 \family default
9513  (2.14.2) â€“ you can insert an optional filename argument by placing the cursor
9514  at the beginning of the text and selecting 
9515 \family sans
9516 Insert\SpecialChar menuseparator
9517 Short Title
9518 \family default
9519 .
9520  
9521 \begin_inset Quotes eld
9522 \end_inset
9523
9524 Short Title
9525 \begin_inset Quotes erd
9526 \end_inset
9527
9528  inserts an optional argument of the type needed by 
9529 \family typewriter
9530
9531 \backslash
9532 figcaption
9533 \family default
9534 .
9535  Hopefully it will be renamed someday.
9536 \end_layout
9537
9538 \begin_layout Itemize
9539
9540 \family typewriter
9541
9542 \backslash
9543 objectname
9544 \family default
9545  (2.17.1) â€“ same as 
9546 \family typewriter
9547
9548 \backslash
9549 figcaption
9550 \family default
9551  for the catalog ID optional parameter
9552 \end_layout
9553
9554 \begin_layout Itemize
9555
9556 \family typewriter
9557
9558 \backslash
9559 dataset
9560 \family default
9561  (2.17.1) â€“ same as 
9562 \family typewriter
9563
9564 \backslash
9565 figcaption
9566 \family default
9567  for the catalog ID optional parameter
9568 \end_layout
9569
9570 \begin_layout Subsubsection
9571 Things not implemented, use \SpecialChar TeX
9572  code
9573 \end_layout
9574
9575 \begin_layout Standard
9576
9577 \family typewriter
9578
9579 \backslash
9580 eqnum
9581 \family default
9582  (2.12), 
9583 \family typewriter
9584
9585 \backslash
9586 setcounter{equation}
9587 \family default
9588  (2.12), Journal name abbreviations (2.13.4), 
9589 \family typewriter
9590
9591 \backslash
9592 figurenum
9593 \family default
9594  (2.14.1), 
9595 \family typewriter
9596
9597 \backslash
9598 epsscale
9599 \family default
9600  (2.14.1), 
9601 \family typewriter
9602
9603 \backslash
9604 plotone
9605 \family default
9606  (2.14.1), 
9607 \family typewriter
9608
9609 \backslash
9610 plottwo
9611 \family default
9612  (2.14.1), 
9613 \family typewriter
9614
9615 \backslash
9616 tablenum
9617 \family default
9618  (2.15.4), 
9619 \family typewriter
9620
9621 \backslash
9622 tableline
9623 \family default
9624  (2.15.4, insert it as the first element in the lefthand cell after where
9625  you want it.
9626  Don't use any of \SpecialChar LyX
9627 's rules in the table), 
9628 \family typewriter
9629
9630 \backslash
9631 tablenotemark
9632 \family default
9633  (2.15.5), 
9634 \family typewriter
9635
9636 \backslash
9637 tablenotetext
9638 \family default
9639  (2.15.5), much of Misc (2.17, except 
9640 \family typewriter
9641
9642 \backslash
9643 objectname
9644 \family default
9645
9646 \family typewriter
9647
9648 \backslash
9649 dataset
9650 \family default
9651
9652 \family typewriter
9653
9654 \backslash
9655 url
9656 \family default
9657 , and 
9658 \family typewriter
9659
9660 \backslash
9661 email
9662 \family default
9663 ; see above), 
9664 \family typewriter
9665
9666 \backslash
9667 singlespace
9668 \family default
9669  (3.1), 
9670 \family typewriter
9671
9672 \backslash
9673 doublespace
9674 \family default
9675  (3.1), 
9676 \family typewriter
9677
9678 \backslash
9679 onecolumn
9680 \family default
9681  (3.2), 
9682 \family typewriter
9683
9684 \backslash
9685 twocolumn
9686 \family default
9687  (3.2)
9688 \end_layout
9689
9690 \begin_layout Subsubsection
9691 Things that cannot be implemented
9692 \end_layout
9693
9694 \begin_layout Standard
9695 \SpecialChar ldots
9696  at least in any meaningful sort of way, so I suggest ignoring them.
9697  They are the references environment (2.13.3), and the deluxetable environment
9698  (2.15).
9699  If you really, really need to use deluxetable, I suggest editing it in
9700  a separate file with a text editor, then using 
9701 \family sans
9702 Insert\SpecialChar menuseparator
9703 Child
9704 \begin_inset space ~
9705 \end_inset
9706
9707 Document
9708 \family default
9709  to include it in your \SpecialChar LyX
9710  document.
9711  See the 
9712 \family typewriter
9713 aas_sample.lyx
9714 \family default
9715  file to see an example of this.
9716 \end_layout
9717
9718 \begin_layout Subsection
9719 FAQs, Tips, Tricks, and Other Ruminations
9720 \end_layout
9721
9722 \begin_layout Subsubsection
9723 Getting \SpecialChar LyX
9724  and AAS\SpecialChar TeX
9725  to cooperate
9726 \end_layout
9727
9728 \begin_layout Standard
9729 It can be a bit tricky to get \SpecialChar LyX
9730  to recognize a new layout and document class.
9731  When all else fails, do this:
9732 \end_layout
9733
9734 \begin_layout Enumerate
9735 Make certain that \SpecialChar LaTeX
9736  can find AAS\SpecialChar TeX
9737 .
9738  Copy sample.tex (and perhaps table.tex) from the AAS\SpecialChar TeX
9739  distribution into a
9740  directory completely unrelated to \SpecialChar LaTeX
9741  or AAS\SpecialChar TeX
9742  and run \SpecialChar LaTeX
9743  on 
9744 \family typewriter
9745 sample.tex
9746 \family default
9747 .
9748 \end_layout
9749
9750 \begin_layout Enumerate
9751 Make certain that 
9752 \family typewriter
9753 aastex.layout
9754 \family default
9755  appears in \SpecialChar LyX
9756 's 
9757 \family typewriter
9758 layouts
9759 \family default
9760  folder
9761 \end_layout
9762
9763 \begin_layout Enumerate
9764 Rerun 
9765 \family sans
9766 Tools\SpecialChar menuseparator
9767 Reconfigure
9768 \family default
9769  in \SpecialChar LyX
9770 , then restart \SpecialChar LyX
9771 .
9772 \end_layout
9773
9774 \begin_layout Enumerate
9775 Open a regular new file, not from a template.
9776  Does AAS\SpecialChar TeX
9777  appear in the class list in 
9778 \family sans
9779 Document\SpecialChar menuseparator
9780 Settings
9781 \family default
9782 ?
9783 \end_layout
9784
9785 \begin_layout Standard
9786 If you get a warning from an existing AAS\SpecialChar TeX
9787  document about not being able
9788  to find the AAS\SpecialChar TeX
9789  layout or a message about 
9790 \begin_inset Quotes eld
9791 \end_inset
9792
9793 You should not mix title layouts with normal ones
9794 \begin_inset Quotes erd
9795 \end_inset
9796
9797 , things haven't been installed correctly.
9798 \end_layout
9799
9800 \begin_layout Subsubsection
9801 \SpecialChar LaTeX
9802  error processing a table 
9803 \end_layout
9804
9805 \begin_layout Standard
9806 \SpecialChar LyX
9807 , by default, attempts to center the table caption/title.
9808  This seems to produce a bad interaction in AAS\SpecialChar TeX
9809  so you should click somewhere
9810  in the caption/title, then select 
9811 \family sans
9812 Edit\SpecialChar menuseparator
9813 Paragraph
9814 \begin_inset space ~
9815 \end_inset
9816
9817 Settings
9818 \family default
9819 , then set the 
9820 \family sans
9821 Alignment
9822 \family default
9823  to 
9824 \family sans
9825 Block
9826 \family default
9827 .
9828  This took care of it for me.
9829 \end_layout
9830
9831 \begin_layout Subsubsection
9832 References
9833 \end_layout
9834
9835 \begin_layout Standard
9836 A couple of things: 1) I have noticed some funny spacing in the reference
9837  entries in the text.
9838  When you enter the bibliography item data, make sure their is 
9839 \emph on
9840 no
9841 \emph default
9842  space between the last author and the parenthesis setting off the year;
9843  
9844 \emph on
9845 e.
9846 \begin_inset space \thinspace{}
9847 \end_inset
9848
9849 g.
9850 \begin_inset space \space{}
9851 \end_inset
9852
9853
9854 \emph default
9855 type 
9856 \family typewriter
9857 Ressler(1992)
9858 \family default
9859 , not 
9860 \family typewriter
9861 Ressler (1992)
9862 \family default
9863 .
9864  2) Entering the references at all is not obvious.
9865  The easiest thing is to start typing your first reference at the end of
9866  the document, then mark it as type 
9867 \family sans
9868 References
9869 \family default
9870 .
9871  That will put a small gray box in front of what you just typed.
9872  Click on the box to fill in the rest of the information.
9873  For new references, go to the end of an existing reference and press return.
9874  That will create a new line with its own box, etc.
9875 \end_layout
9876
9877 \begin_layout Subsubsection
9878 Including EPS files
9879 \end_layout
9880
9881 \begin_layout Standard
9882 Even though AAS\SpecialChar TeX
9883  provides its own figure commands (
9884 \family typewriter
9885
9886 \backslash
9887 plotone
9888 \family default
9889 , for example), I much prefer \SpecialChar LaTeX
9890 's standard figure commands (with the default
9891  graphicx).
9892  You can insert the 
9893 \family typewriter
9894
9895 \backslash
9896 plotone
9897 \family default
9898 , etc.
9899 \begin_inset space ~
9900 \end_inset
9901
9902 commands as \SpecialChar TeX
9903  code into a Figure Float box if you desire, but I never have
9904  much luck getting the layout right.
9905  With the standard graphics, \SpecialChar LyX
9906  will insert a 
9907 \family typewriter
9908
9909 \backslash
9910 usepackage{graphicx}
9911 \family default
9912  command into the \SpecialChar LaTeX
9913  preamble and handle the figures in the standard \SpecialChar LaTeX2e
9914  way,
9915  interspersing the figures in the text.
9916  I believe ApJ accepts figures exactly this way now; AJ might still use
9917  the 
9918 \begin_inset Quotes eld
9919 \end_inset
9920
9921 stack everything at the end
9922 \begin_inset Quotes erd
9923 \end_inset
9924
9925  technique.
9926 \end_layout
9927
9928 \begin_layout Subsubsection
9929 Things I could have done, but didn't
9930 \end_layout
9931
9932 \begin_layout Standard
9933 There are a few 
9934 \begin_inset Quotes eld
9935 \end_inset
9936
9937 pretty
9938 \begin_inset Quotes erd
9939 \end_inset
9940
9941  things I could have implemented, but chose not to.
9942  For instance, I saw no point in double-spacing the text in the \SpecialChar LyX
9943  window,
9944  even though it is double-spaced in the paper manuscript.
9945  Also, I chose not to make separate layouts for the preprint and preprint2
9946  styles.
9947  Since I assume you will spend most of your time in the plain manuscript
9948  mode anyway, I decided not to chew up more disk space with this.
9949  
9950 \end_layout
9951
9952 \begin_layout Subsection
9953 Final Caveat
9954 \end_layout
9955
9956 \begin_layout Standard
9957 Your mileage may vary.
9958  I've now had papers published by both ApJ and AJ that have had 98% of the
9959  effort done in \SpecialChar LyX
9960 ; the last 2% was the \SpecialChar LaTeX
9961  post-processing and a few cleanups.
9962  I have had no trouble with the submission process, and I'm sure the journals
9963  were never aware that there might be a difference.
9964  So, go forth and publish!
9965 \end_layout
9966
9967 \begin_layout Section
9968 AMS \SpecialChar LaTeX
9969
9970 \end_layout
9971
9972 \begin_layout Standard
9973 by 
9974 \noun on
9975 David Johnson
9976 \noun default
9977 ; updated by 
9978 \noun on
9979 Richard Heck
9980 \end_layout
9981
9982 \begin_layout Standard
9983 \begin_inset VSpace bigskip
9984 \end_inset
9985
9986
9987 \end_layout
9988
9989 \begin_layout Standard
9990 \noindent
9991 The AMS \SpecialChar LaTeX
9992  layouts are set up to conform to suggested styles for mathematical
9993  papers to be submitted to American Mathematical Society publications.
9994  The layouts are not tailored to a specific journal, but easily can be.
9995  You should refer to the AMS documentation for specific instructions for
9996  each journal (usually it will entail only changing a single line in the
9997  \SpecialChar TeX
9998  output).
9999  That documentation is available on the Web at 
10000 \begin_inset Flex URL
10001 status open
10002
10003 \begin_layout Plain Layout
10004
10005 http://www.ams.org
10006 \end_layout
10007
10008 \end_inset
10009
10010  or by ftp at 
10011 \begin_inset Flex URL
10012 status open
10013
10014 \begin_layout Plain Layout
10015
10016 ftp://ftp.ams.org/pub/tex/amslatex/
10017 \end_layout
10018
10019 \end_inset
10020
10021 .
10022  These layouts are appropriate, and useful, for any mathematical writing.
10023  
10024 \end_layout
10025
10026 \begin_layout Standard
10027 There are two basic AMS \SpecialChar LaTeX
10028  layouts: 
10029 \end_layout
10030
10031 \begin_layout Itemize
10032 amsart: The standard AMS article format.
10033 \end_layout
10034
10035 \begin_layout Itemize
10036 amsbook: the standard AMS book (really, monograph) format.
10037  
10038 \end_layout
10039
10040 \begin_layout Standard
10041 The layouts themselves contain only the minimum necessary to use the AMS
10042  classes.
10043  They do not, in particular, contain any of the `theorem' environments used
10044  for setting theorems, lemmas, and the like.
10045  These are contained, instead, in the 
10046 \begin_inset Flex Code
10047 status collapsed
10048
10049 \begin_layout Plain Layout
10050 Theorems (AMS)
10051 \end_layout
10052
10053 \end_inset
10054
10055  module, which is loaded by default when you select one of the AMS classes.
10056  (It can also be used with other classes and can be removed, if you would
10057  rather use something else.) Less commonly used environments are in the 
10058 \begin_inset Flex Code
10059 status collapsed
10060
10061 \begin_layout Plain Layout
10062 Theorems (AMS-Extended)
10063 \end_layout
10064
10065 \end_inset
10066
10067  module, which must be loaded manually.
10068 \end_layout
10069
10070 \begin_layout Standard
10071 By default, theorems and the like are numbered consecutively throughout
10072  the document, but this may be modified by loading the module 
10073 \begin_inset Flex Code
10074 status collapsed
10075
10076 \begin_layout Plain Layout
10077 Theorems (Order by Section)
10078 \end_layout
10079
10080 \end_inset
10081
10082  or, if you are using 
10083 \begin_inset Flex Code
10084 status collapsed
10085
10086 \begin_layout Plain Layout
10087 book (AMS)
10088 \end_layout
10089
10090 \end_inset
10091
10092 , the module 
10093 \begin_inset Flex Code
10094 status collapsed
10095
10096 \begin_layout Plain Layout
10097 Theorems (Order by Chapter)
10098 \end_layout
10099
10100 \end_inset
10101
10102 .
10103  These will number the results as 
10104 \begin_inset Formula $n.m$
10105 \end_inset
10106
10107 , where the first number refers to the section (or chapter) and the second
10108  refers to the total number of results so far in that section (or chapter).
10109  Many environments are also available unnumbered.
10110  These are indicated by an asterisk at the end.
10111  If you happen to want 
10112 \emph on
10113 only
10114 \emph default
10115  unnumbered results, the module 
10116 \begin_inset Flex Code
10117 status collapsed
10118
10119 \begin_layout Plain Layout
10120 Theorems (Starred)
10121 \end_layout
10122
10123 \end_inset
10124
10125  provides that option.
10126 \end_layout
10127
10128 \begin_layout Standard
10129 Note that these modules do not 
10130 \emph on
10131 have
10132 \emph default
10133  to be used with the AMS classes.
10134  It is perfectly possible to use the 
10135 \begin_inset Flex Code
10136 status collapsed
10137
10138 \begin_layout Plain Layout
10139 Theorems (AMS)
10140 \end_layout
10141
10142 \end_inset
10143
10144  module, and the others mentioned, with other classes, such as 
10145 \begin_inset Flex Code
10146 status collapsed
10147
10148 \begin_layout Plain Layout
10149 article
10150 \end_layout
10151
10152 \end_inset
10153
10154
10155 \begin_inset Flex Code
10156 status collapsed
10157
10158 \begin_layout Plain Layout
10159 report
10160 \end_layout
10161
10162 \end_inset
10163
10164
10165 \begin_inset Flex Code
10166 status collapsed
10167
10168 \begin_layout Plain Layout
10169 book (KOMA-script)
10170 \end_layout
10171
10172 \end_inset
10173
10174 , and so forth.
10175 \end_layout
10176
10177 \begin_layout Subsection
10178 What these layouts provide
10179 \end_layout
10180
10181 \begin_layout Standard
10182 There is a long list of included environments provided by these layouts.
10183  In AMS-\SpecialChar LaTeX
10184 , there is, in fact, an opportunity to define an unlimited variety
10185  of `theorem' environments.
10186  However, the AMS recommends the environments that are available in \SpecialChar LyX
10187 .
10188  
10189 \end_layout
10190
10191 \begin_layout Standard
10192 The following environments—as well as the standard environments, such as
10193  
10194 \begin_inset Flex Noun
10195 status collapsed
10196
10197 \begin_layout Plain Layout
10198 section
10199 \end_layout
10200
10201 \end_inset
10202
10203
10204 \begin_inset Flex Noun
10205 status collapsed
10206
10207 \begin_layout Plain Layout
10208 bibliography
10209 \end_layout
10210
10211 \end_inset
10212
10213
10214 \begin_inset Flex Noun
10215 status collapsed
10216
10217 \begin_layout Plain Layout
10218 title
10219 \end_layout
10220
10221 \end_inset
10222
10223
10224 \begin_inset Flex Noun
10225 status collapsed
10226
10227 \begin_layout Plain Layout
10228 author
10229 \end_layout
10230
10231 \end_inset
10232
10233 , and 
10234 \begin_inset Flex Noun
10235 status collapsed
10236
10237 \begin_layout Plain Layout
10238 date
10239 \end_layout
10240
10241 \end_inset
10242
10243 —are provided by 
10244 \begin_inset Flex Code
10245 status collapsed
10246
10247 \begin_layout Plain Layout
10248 article (AMS)
10249 \end_layout
10250
10251 \end_inset
10252
10253  and 
10254 \begin_inset Flex Code
10255 status collapsed
10256
10257 \begin_layout Plain Layout
10258 book (AMS)
10259 \end_layout
10260
10261 \end_inset
10262
10263 :
10264 \end_layout
10265
10266 \begin_layout Description
10267 Address This should be the author's permanent address.
10268 \end_layout
10269
10270 \begin_layout Description
10271 Current
10272 \begin_inset space ~
10273 \end_inset
10274
10275 Address This should be the author's temporary address at the time of submission,
10276  if different from the Address.
10277 \end_layout
10278
10279 \begin_layout Description
10280 Email Author's e-mail address
10281 \end_layout
10282
10283 \begin_layout Description
10284 URL Author's Web address, if desired.
10285 \end_layout
10286
10287 \begin_layout Description
10288 Keywords Key words or phrases used to identify specific topics discussed
10289  in the paper.
10290 \end_layout
10291
10292 \begin_layout Description
10293 Subjectclass These refer to the AMS Subject Classifications, published and
10294  described in 
10295 \emph on
10296 Mathematical Reviews
10297 \emph default
10298 .
10299  These are also available online at the AMS cites listed above.
10300 \end_layout
10301
10302 \begin_layout Description
10303 Thanks
10304 \end_layout
10305
10306 \begin_layout Description
10307 Dedicatory
10308 \end_layout
10309
10310 \begin_layout Description
10311 Translator
10312 \end_layout
10313
10314 \begin_layout Standard
10315 The following environments are provided by both the 
10316 \begin_inset Flex Code
10317 status collapsed
10318
10319 \begin_layout Plain Layout
10320 Theorems
10321 \end_layout
10322
10323 \end_inset
10324
10325  and 
10326 \begin_inset Flex Code
10327 status collapsed
10328
10329 \begin_layout Plain Layout
10330 Theorems (AMS)
10331 \end_layout
10332
10333 \end_inset
10334
10335  modules, in the latter case in both starred (unnumbered) and unstarred
10336  (numbered) versions.
10337  These same environments are provided only in the starred versions by the
10338  
10339 \begin_inset Flex Code
10340 status collapsed
10341
10342 \begin_layout Plain Layout
10343 Theorems (Starred)
10344 \end_layout
10345
10346 \end_inset
10347
10348  module:
10349 \end_layout
10350
10351 \begin_layout Theorem
10352 This is typically used for the statements of major results.
10353  
10354 \end_layout
10355
10356 \begin_layout Corollary*
10357 This is used for statements which follow fairly directly from previous statement
10358 s.
10359  Again, these can be major results.
10360  
10361 \end_layout
10362
10363 \begin_layout Lemma
10364 These are smaller results needed to prove other statements.
10365 \end_layout
10366
10367 \begin_layout Proposition
10368 These are less major results which (hopefully) add to the general theory
10369  being discussed.
10370 \end_layout
10371
10372 \begin_layout Conjecture
10373 These are statements provided without justification, which the author does
10374  not know how to prove, but which seem to be true (to the author, at least).
10375 \end_layout
10376
10377 \begin_layout Definition*
10378 Guess what this is for.
10379  The font is different for this environment than for the previous ones.
10380  
10381 \end_layout
10382
10383 \begin_layout Example*
10384 Used for examples illustrating proven results.
10385 \end_layout
10386
10387 \begin_layout Problem
10388 It's not really known what this is for.
10389  You should figure it out.
10390 \end_layout
10391
10392 \begin_layout Exercise*
10393 Write a description for this one.
10394 \end_layout
10395
10396 \begin_layout Remark
10397 This environment is also a type of theorem, usually a lesser sort of observation.
10398 \end_layout
10399
10400 \begin_layout Claim*
10401 Often used in the course of giving a proof of a larger result.
10402 \end_layout
10403
10404 \begin_layout Case
10405 Generally, these are used to break up long arguments, using specific instances
10406  of some condition.
10407  
10408 \end_layout
10409
10410 \begin_layout Case
10411 The numbering scheme for cases is on its own, not together with other numbered
10412  statements.
10413  
10414 \end_layout
10415
10416 \begin_layout Proof
10417 At the end of this environment, a QED symbol (usually a square, but it can
10418  vary with different styles) is placed.
10419  If you want to have other environments within this one—for example, Case
10420  environments—and have the QED symbol appear only after them, then the other
10421  environments need to be nested within the proof environment.
10422  See the section 
10423 \emph on
10424 Nesting Environments
10425 \emph default
10426  of the 
10427 \emph on
10428 User's Guide
10429 \emph default
10430  for information on nesting.
10431 \end_layout
10432
10433 \begin_layout Standard
10434 And these environments are provided by 
10435 \begin_inset Flex Code
10436 status collapsed
10437
10438 \begin_layout Plain Layout
10439 Theorems (AMS-Extended)
10440 \end_layout
10441
10442 \end_inset
10443
10444 :
10445 \end_layout
10446
10447 \begin_layout Criterion*
10448 A required condition.
10449 \end_layout
10450
10451 \begin_layout Algorithm*
10452 A general procedure to be used.
10453 \end_layout
10454
10455 \begin_layout Axiom*
10456 This is a property or statement taken as true within the system being discussed.
10457 \end_layout
10458
10459 \begin_layout Condition*
10460 Sometimes used to state a condition assumed within the present context of
10461  discussion.
10462 \end_layout
10463
10464 \begin_layout Note*
10465 Similar to a Remark.
10466 \end_layout
10467
10468 \begin_layout Notation*
10469 Used for the explanation of, yes, notation.
10470 \end_layout
10471
10472 \begin_layout Summary
10473 Do we really need to tell you? 
10474 \end_layout
10475
10476 \begin_layout Acknowledgement*
10477 Acknowledgement.
10478 \end_layout
10479
10480 \begin_layout Conclusion*
10481 Sometimes used at the end of a long train of argument.
10482 \end_layout
10483
10484 \begin_layout Fact
10485 Used in a way similar to Proposition, though perhaps lower on the scale.
10486 \end_layout
10487
10488 \begin_layout Standard
10489 In addition, the AMS classes automatically provide the AMS \SpecialChar LaTeX
10490  and AMS fonts
10491  packages.
10492  They need to be available on your system in order to use these environments.
10493 \end_layout
10494
10495 \begin_layout Section
10496 Broadway
10497 \end_layout
10498
10499 \begin_layout Standard
10500 by 
10501 \shape smallcaps
10502 Garst Reese
10503 \end_layout
10504
10505 \begin_layout Subsection
10506 Introduction
10507 \end_layout
10508
10509 \begin_layout Standard
10510 Broadway is for writing plays.
10511  The format is more decorative than Hollywood, and much less standardized.
10512  This format should be suitable for workshops.
10513 \end_layout
10514
10515 \begin_layout Subsection
10516 Special problems
10517 \end_layout
10518
10519 \begin_layout Standard
10520 The same as in Hollywood.
10521 \end_layout
10522
10523 \begin_layout Subsection
10524 Special features
10525 \end_layout
10526
10527 \begin_layout Standard
10528 Insert the 
10529 \family sans
10530 Speaker
10531 \family default
10532  names as labels then cross-reference the label to insert the name.
10533  The cross-reference dialog will show the current cast of characters.
10534 \end_layout
10535
10536 \begin_layout Subsection
10537 Paper size and Margins
10538 \end_layout
10539
10540 \begin_layout Standard
10541 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
10542 \end_layout
10543
10544 \begin_layout Subsection
10545 Environments
10546 \end_layout
10547
10548 \begin_layout Standard
10549 The following environments are available.
10550  You can use broadway.bind to get the bind keys shown at the right.
10551 \end_layout
10552
10553 \begin_layout Itemize
10554
10555 \family sans
10556 Standard
10557 \begin_inset Newline newline
10558 \end_inset
10559
10560
10561 \family default
10562 You should not have to use this, but it is here for anything that does not
10563  fit otherwise.
10564 \end_layout
10565
10566 \begin_layout Itemize
10567
10568 \family sans
10569 Narrative
10570 \begin_inset space \hfill{}
10571 \end_inset
10572
10573 M-z n
10574 \begin_inset Newline newline
10575 \end_inset
10576
10577
10578 \family default
10579 Used to describe stage setting and the action.
10580  First use of speaker names in all CAPs.
10581 \end_layout
10582
10583 \begin_layout Itemize
10584
10585 \family sans
10586 ACT
10587 \begin_inset space \hfill{}
10588 \end_inset
10589
10590 M-z a
10591 \begin_inset Newline newline
10592 \end_inset
10593
10594
10595 \family default
10596 Automatically numbered.
10597  On screen it will be arabic, but will print as Roman.
10598 \end_layout
10599
10600 \begin_layout Itemize
10601
10602 \family sans
10603 ACT*
10604 \begin_inset space \hfill{}
10605 \end_inset
10606
10607 M-z S at
10608 \begin_inset Newline newline
10609 \end_inset
10610
10611
10612 \family default
10613 Subtitle for 
10614 \family sans
10615 ACT.
10616
10617 \family default
10618  It is just centered text.
10619 \end_layout
10620
10621 \begin_layout Itemize
10622
10623 \family sans
10624 SCENE
10625 \begin_inset space \hfill{}
10626 \end_inset
10627
10628 M-z S-S
10629 \begin_inset Newline newline
10630 \end_inset
10631
10632
10633 \family default
10634 Not automatically numbered.
10635  You supply the number.
10636  This is because I couldn't figure out how.
10637 \end_layout
10638
10639 \begin_layout Itemize
10640
10641 \family sans
10642 AT_RISE:
10643 \begin_inset space \hfill{}
10644 \end_inset
10645
10646 M-z S-R
10647 \begin_inset Newline newline
10648 \end_inset
10649
10650
10651 \family default
10652 A special case of Narrative to describe the setting and action as the curtain
10653  rises.
10654 \end_layout
10655
10656 \begin_layout Itemize
10657
10658 \family sans
10659 Speaker
10660 \begin_inset space \hfill{}
10661 \end_inset
10662
10663 M-z s
10664 \begin_inset Newline newline
10665 \end_inset
10666
10667
10668 \family default
10669 The speaker's (actor's) title, centered in all CAPS.
10670 \end_layout
10671
10672 \begin_layout Itemize
10673
10674 \family sans
10675 Parenthetical
10676 \begin_inset space \hfill{}
10677 \end_inset
10678
10679 M-z p
10680 \begin_inset Newline newline
10681 \end_inset
10682
10683
10684 \family default
10685 Instructions to the speaker.
10686  The parentheses are automatically inserted.
10687  The ( will appear on screen, but both will be in the printed play.
10688  This environment is only used within 
10689 \family sans
10690 Dialogue
10691 \family default
10692 .
10693 \end_layout
10694
10695 \begin_layout Itemize
10696
10697 \family sans
10698 Dialogue
10699 \begin_inset space \hfill{}
10700 \end_inset
10701
10702 M-z d
10703 \begin_inset Newline newline
10704 \end_inset
10705
10706
10707 \family default
10708 What the Speaker says.
10709 \end_layout
10710
10711 \begin_layout Itemize
10712
10713 \family sans
10714 CURTAIN
10715 \begin_inset space \hfill{}
10716 \end_inset
10717
10718 M-z S-C
10719 \begin_inset Newline newline
10720 \end_inset
10721
10722
10723 \family default
10724 The curtain comes down.
10725 \end_layout
10726
10727 \begin_layout Itemize
10728
10729 \family sans
10730 Title
10731 \begin_inset space \hfill{}
10732 \end_inset
10733
10734 M-z S-T
10735 \end_layout
10736
10737 \begin_layout Itemize
10738
10739 \family sans
10740 Author
10741 \begin_inset space \hfill{}
10742 \end_inset
10743
10744 M-z S-A
10745 \end_layout
10746
10747 \begin_layout Itemize
10748
10749 \family sans
10750 Right_Address
10751 \begin_inset space \hfill{}
10752 \end_inset
10753
10754 M-z r
10755 \end_layout
10756
10757 \begin_layout Standard
10758 Hello there.
10759 \end_layout
10760
10761 \begin_layout Section
10762 Dinbrief
10763 \end_layout
10764
10765 \begin_layout Standard
10766 The document class 
10767 \family sans
10768 dinbrief
10769 \family default
10770  can be used to type letters according to German conventions.
10771  A template file is included in 
10772 \family typewriter
10773 .../lyx/share/templates
10774 \family default
10775  for you to use as a starting point.
10776 \end_layout
10777
10778 \begin_layout Section
10779 Elsevier Journals
10780 \end_layout
10781
10782 \begin_layout Standard
10783 See the \SpecialChar LyX
10784  template file 
10785 \family typewriter
10786 elsarticle.lyx
10787 \family default
10788 .
10789  It contains all infos you need.
10790 \end_layout
10791
10792 \begin_layout Section
10793 Foils [aka 
10794 \family sans
10795 Foil\SpecialChar TeX
10796
10797 \family default
10798 ]
10799 \begin_inset CommandInset label
10800 LatexCommand label
10801 name "sec:foiltex"
10802
10803 \end_inset
10804
10805
10806 \end_layout
10807
10808 \begin_layout Standard
10809 by 
10810 \noun on
10811 Allan Rae
10812 \end_layout
10813
10814 \begin_layout Subsection
10815 Introduction
10816 \end_layout
10817
10818 \begin_layout Standard
10819 This section describes how to use \SpecialChar LyX
10820  to make slides for overhead projectors.
10821  There are two document classes that can do this: the default slides class
10822  and the 
10823 \family sans
10824 Foil\SpecialChar TeX
10825
10826 \family default
10827  slides class.
10828  This section documents the latter.
10829 \end_layout
10830
10831 \begin_layout Standard
10832 I'm going to say this again, nice and clear, so that there's no misunderstanding
10833 :
10834 \end_layout
10835
10836 \begin_layout Standard
10837 \begin_inset VSpace bigskip
10838 \end_inset
10839
10840
10841 \end_layout
10842
10843 \begin_layout Standard
10844 \align center
10845
10846 \size large
10847 This section documents the class 
10848 \begin_inset Quotes eld
10849 \end_inset
10850
10851
10852 \family sans
10853 FoilTeX
10854 \family default
10855
10856 \begin_inset Quotes erd
10857 \end_inset
10858
10859  
10860 \emph on
10861 only.
10862 \end_layout
10863
10864 \begin_layout Standard
10865 \begin_inset VSpace bigskip
10866 \end_inset
10867
10868
10869 \end_layout
10870
10871 \begin_layout Standard
10872 If you're looking for the documentation for 
10873 \begin_inset Quotes eld
10874 \end_inset
10875
10876
10877 \family sans
10878 slides (default)
10879 \family default
10880
10881 \begin_inset Quotes erd
10882 \end_inset
10883
10884 , check out section
10885 \begin_inset space ~
10886 \end_inset
10887
10888
10889 \begin_inset CommandInset ref
10890 LatexCommand ref
10891 reference "sec:slitex"
10892
10893 \end_inset
10894
10895 .
10896  If your machine doesn't have the 
10897 \family sans
10898 foils
10899 \family default
10900  class 
10901 \family sans
10902 FoilTeX
10903 \family default
10904  installed, you'll probably have to use the default 
10905 \family sans
10906 slides
10907 \family default
10908  class, which isn't quite as good as 
10909 \family sans
10910 foils.
10911 \end_layout
10912
10913 \begin_layout Standard
10914 The 
10915 \family sans
10916 foils
10917 \family default
10918  class is designed for use with version
10919 \begin_inset space ~
10920 \end_inset
10921
10922 2.1 of the 
10923 \family sans
10924 foils.cls
10925 \family default
10926  \SpecialChar LaTeX
10927  class file which is now an integral part of \SpecialChar LaTeX2e
10928 .
10929 \end_layout
10930
10931 \begin_layout Subsection
10932 Getting Started
10933 \end_layout
10934
10935 \begin_layout Standard
10936 Obviously, to use this document class, you need to select 
10937 \family sans
10938 FoilTeX
10939 \family default
10940  from the 
10941 \family sans
10942 Class
10943 \family default
10944  entry in the 
10945 \family sans
10946 Document
10947 \begin_inset space ~
10948 \end_inset
10949
10950 Layout
10951 \family default
10952  dialog.
10953  There are some settings in the 
10954 \family sans
10955 Document
10956 \begin_inset space ~
10957 \end_inset
10958
10959 Layout
10960 \family default
10961  dialog that you should know about that are specific to this class:
10962 \end_layout
10963
10964 \begin_layout Itemize
10965 Don't change the options 
10966 \family sans
10967 Sides
10968 \family default
10969  and 
10970 \family sans
10971 Columns
10972 \family default
10973  on the 
10974 \family sans
10975 Document
10976 \begin_inset space ~
10977 \end_inset
10978
10979 Layout
10980 \family default
10981  dialog.
10982  They're ignored by the 
10983 \family sans
10984 foils
10985 \family default
10986  class.
10987 \end_layout
10988
10989 \begin_layout Itemize
10990 The default font size is 20
10991 \begin_inset space \thinspace{}
10992 \end_inset
10993
10994 pt with the other options being 17
10995 \begin_inset space \thinspace{}
10996 \end_inset
10997
10998 pt, 25
10999 \begin_inset space \thinspace{}
11000 \end_inset
11001
11002 pt and 30
11003 \begin_inset space \thinspace{}
11004 \end_inset
11005
11006 pt.
11007 \end_layout
11008
11009 \begin_layout Itemize
11010 The default font is 
11011 \family sans
11012 sans
11013 \family default
11014  
11015 \family sans
11016 serif
11017 \family default
11018  but all math equations are still typeset in the usual roman font.
11019 \end_layout
11020
11021 \begin_layout Itemize
11022
11023 \family sans
11024 Foil\SpecialChar TeX
11025
11026 \family default
11027  supports A4 and Letter paper sizes as well as a special size for working
11028  with 35
11029 \begin_inset space \thinspace{}
11030 \end_inset
11031
11032 mm slides.
11033  It doesn't support A5, B5, legal or executive paper sizes.
11034 \end_layout
11035
11036 \begin_layout Itemize
11037 Don't bother changing the 
11038 \family sans
11039 Float Placement
11040 \family default
11041  settings because they are ignored anyway.
11042  All floats appear where they are defined in the text.
11043 \end_layout
11044
11045 \begin_layout Itemize
11046 The 
11047 \family sans
11048 Pagestyle
11049 \family default
11050  setting behaves a bit differently for this class.
11051  
11052 \family sans
11053 Foil\SpecialChar TeX
11054
11055 \family default
11056  provides extensive footer and header capabilities including a user-defined
11057  logo.
11058  See section
11059 \begin_inset space ~
11060 \end_inset
11061
11062
11063 \begin_inset CommandInset ref
11064 LatexCommand ref
11065 reference "sec:foilfoot"
11066
11067 \end_inset
11068
11069  for more details.
11070  The title page is treated differently to all other pages in the document
11071  and is 
11072 \emph on
11073 always
11074 \emph default
11075  unnumbered and 
11076 \emph on
11077 always
11078 \emph default
11079  has the logo centered at the bottom of the page (if one is defined).
11080  The possible page style choices and what they do are as follows:
11081 \end_layout
11082
11083 \begin_deeper
11084 \begin_layout Labeling
11085 \labelwidthstring MMMMMMM
11086
11087 \family sans
11088 \series bold
11089 empty
11090 \family default
11091 \series default
11092  The final output contains no page numbers, or other headers or footers
11093  (except footnotes of course).
11094  
11095 \end_layout
11096
11097 \begin_layout Labeling
11098 \labelwidthstring MMMMMMM
11099
11100 \family sans
11101 \series bold
11102 plain
11103 \family default
11104 \series default
11105  The final output contains page numbers centered at the bottom of the page.
11106  No other headings or footers (other than footnotes).
11107 \end_layout
11108
11109 \begin_layout Labeling
11110 \labelwidthstring MMMMMMM
11111
11112 \series bold
11113 foilheadings
11114 \series default
11115  Page numbers in lower right corner.
11116  Additional headers and footers are also shown.
11117  This is also the default.
11118 \end_layout
11119
11120 \begin_layout Labeling
11121 \labelwidthstring MMMMMMM
11122
11123 \series bold
11124 fancy
11125 \series default
11126  Gives you access to the 
11127 \family sans
11128 fancyheadings
11129 \family default
11130  package although its use with 
11131 \family sans
11132 Foil\SpecialChar TeX
11133
11134 \family default
11135  is discouraged by the writer of the 
11136 \family sans
11137 Foil\SpecialChar TeX
11138
11139 \family default
11140  package because of some potential page layout clashes.
11141 \end_layout
11142
11143 \end_deeper
11144 \begin_layout Subsubsection
11145 Extra Options
11146 \end_layout
11147
11148 \begin_layout Standard
11149 The following options may be used in the extra class options in the 
11150 \family sans
11151 Document\SpecialChar menuseparator
11152 Settings
11153 \family default
11154  dialog.
11155 \end_layout
11156
11157 \begin_layout Labeling
11158 \labelwidthstring MMMMMMx
11159
11160 \series bold
11161 35mmSlide
11162 \series default
11163  This sets up the page layout for 7.33
11164 \begin_inset space \thinspace{}
11165 \end_inset
11166
11167 in by 11
11168 \begin_inset space \thinspace{}
11169 \end_inset
11170
11171 in paper, which is about the same aspect ratio as a 35
11172 \begin_inset space \thinspace{}
11173 \end_inset
11174
11175 mm slide, making it a bit easier to work with this medium.
11176 \end_layout
11177
11178 \begin_layout Labeling
11179 \labelwidthstring MMMMMMx
11180
11181 \series bold
11182 headrule
11183 \series default
11184  Places a rule across the page below the header on every page except the
11185  title page.
11186 \end_layout
11187
11188 \begin_layout Labeling
11189 \labelwidthstring MMMMMMx
11190
11191 \series bold
11192 footrule
11193 \series default
11194  Places a rule across the page above the footer on every page except the
11195  title page.
11196 \end_layout
11197
11198 \begin_layout Labeling
11199 \labelwidthstring MMMMMMx
11200
11201 \series bold
11202 dvips
11203 \series default
11204  This is automatically set each time you create a new 
11205 \family sans
11206 foils
11207 \family default
11208  document.
11209  This option tells 
11210 \family sans
11211 Foil\SpecialChar TeX
11212
11213 \family default
11214  to use the dvips driver to rotate those pages that are set as landscape
11215  foils.
11216 \end_layout
11217
11218 \begin_layout Labeling
11219 \labelwidthstring MMMMMMx
11220
11221 \series bold
11222 landscape
11223 \series default
11224  Simply changes the page dimensions to those of a landscape page but doesn't
11225  do any rotation.
11226  Thus if you use this option you need to use an external program to rotate
11227  each page or feed your paper through your printer as landscape.
11228  Note that this option effectively reverses the roles of the 
11229 \family sans
11230 Foilhead
11231 \family default
11232  and 
11233 \family sans
11234 Rotatefoilhead
11235 \family default
11236  environments (don't worry these are described in the next section).
11237 \end_layout
11238
11239 \begin_layout Labeling
11240 \labelwidthstring MMMMMMx
11241
11242 \series bold
11243 leqno
11244 \series default
11245  Equation numbers on the left.
11246 \end_layout
11247
11248 \begin_layout Labeling
11249 \labelwidthstring MMMMMMx
11250
11251 \series bold
11252 fleqn
11253 \series default
11254  Flush-left equations.
11255 \end_layout
11256
11257 \begin_layout Subsection
11258 Supported Environments
11259 \end_layout
11260
11261 \begin_layout Standard
11262 Most of the environments commonly supported in other classes are also supported
11263  by the 
11264 \family sans
11265 foils
11266 \family default
11267  class.
11268  There are several additional environments provided by 
11269 \family sans
11270 Foil\SpecialChar TeX
11271
11272 \family default
11273  as well as a couple added by \SpecialChar LyX
11274 .
11275  The following environments are shared with other classes:
11276 \end_layout
11277
11278 \begin_layout Standard
11279 \begin_inset Flex Multiple Columns
11280 status open
11281
11282 \begin_layout Itemize
11283
11284 \family sans
11285 Standard
11286 \end_layout
11287
11288 \begin_layout Itemize
11289
11290 \family sans
11291 Itemize
11292 \end_layout
11293
11294 \begin_layout Itemize
11295
11296 \family sans
11297 Enumerate
11298 \end_layout
11299
11300 \begin_layout Itemize
11301
11302 \family sans
11303 Description
11304 \end_layout
11305
11306 \begin_layout Itemize
11307
11308 \family sans
11309 List
11310 \end_layout
11311
11312 \begin_layout Itemize
11313
11314 \family sans
11315 \SpecialChar LyX
11316 -Code
11317 \end_layout
11318
11319 \begin_layout Itemize
11320
11321 \family sans
11322 Verse
11323 \end_layout
11324
11325 \begin_layout Itemize
11326
11327 \family sans
11328 Quote
11329 \end_layout
11330
11331 \begin_layout Itemize
11332
11333 \family sans
11334 Quotation
11335 \end_layout
11336
11337 \begin_layout Itemize
11338
11339 \family sans
11340 TitleAuthor
11341 \end_layout
11342
11343 \begin_layout Itemize
11344
11345 \family sans
11346 Date
11347 \end_layout
11348
11349 \begin_layout Itemize
11350
11351 \family sans
11352 Abstract
11353 \end_layout
11354
11355 \begin_layout Itemize
11356
11357 \family sans
11358 Bibliography
11359 \end_layout
11360
11361 \begin_layout Itemize
11362
11363 \family sans
11364 Address
11365 \end_layout
11366
11367 \begin_layout Itemize
11368
11369 \family sans
11370 RightAddress
11371 \end_layout
11372
11373 \end_inset
11374
11375
11376 \end_layout
11377
11378 \begin_layout Standard
11379 That is, all the major environments apart from the sectioning environments.
11380  Since foils are essentially self-contained sections, with a title and body,
11381  
11382 \family sans
11383 Foil\SpecialChar TeX
11384
11385 \family default
11386  provides specific commands for starting new foils and these are:
11387 \end_layout
11388
11389 \begin_layout Itemize
11390
11391 \family sans
11392 Foilhead
11393 \end_layout
11394
11395 \begin_layout Itemize
11396
11397 \family sans
11398 Rotatefoilhead
11399 \end_layout
11400
11401 \begin_layout Standard
11402 \SpecialChar LyX
11403  also provides slightly modified versions of these two environments called:
11404 \end_layout
11405
11406 \begin_layout Itemize
11407
11408 \family sans
11409 ShortFoilhead
11410 \end_layout
11411
11412 \begin_layout Itemize
11413
11414 \family sans
11415 ShortRotatefoilhead
11416 \end_layout
11417
11418 \begin_layout Standard
11419 and the differences will be explained in the next section.
11420 \end_layout
11421
11422 \begin_layout Standard
11423 Since foils are often used in presenting ideas or new theorems and such
11424  
11425 \family sans
11426 Foil\SpecialChar TeX
11427
11428 \family default
11429  also provides a comprehensive box of goodies for presenting them:
11430 \end_layout
11431
11432 \begin_layout Standard
11433 \begin_inset Flex Multiple Columns
11434 status open
11435
11436 \begin_layout Itemize
11437
11438 \family sans
11439 Theorem
11440 \end_layout
11441
11442 \begin_layout Itemize
11443
11444 \family sans
11445 Lemma
11446 \end_layout
11447
11448 \begin_layout Itemize
11449
11450 \family sans
11451 Corollary
11452 \end_layout
11453
11454 \begin_layout Itemize
11455
11456 \family sans
11457 Proposition
11458 \end_layout
11459
11460 \begin_layout Itemize
11461
11462 \family sans
11463 Definition
11464 \end_layout
11465
11466 \begin_layout Itemize
11467
11468 \family sans
11469 Proof
11470 \end_layout
11471
11472 \begin_layout Itemize
11473
11474 \family sans
11475 Theorem*
11476 \end_layout
11477
11478 \begin_layout Itemize
11479
11480 \family sans
11481 Lemma*
11482 \end_layout
11483
11484 \begin_layout Itemize
11485
11486 \family sans
11487 Corollary*
11488 \end_layout
11489
11490 \begin_layout Itemize
11491
11492 \family sans
11493 Proposition*
11494 \end_layout
11495
11496 \begin_layout Itemize
11497
11498 \family sans
11499 Definition*
11500 \end_layout
11501
11502 \end_inset
11503
11504
11505 \end_layout
11506
11507 \begin_layout Standard
11508 The starred versions are unnumbered while the unstarred versions are numbered.
11509  There are also two list environments added by \SpecialChar LyX
11510  and these are:
11511 \end_layout
11512
11513 \begin_layout Itemize
11514
11515 \family sans
11516 TickList
11517 \end_layout
11518
11519 \begin_layout Itemize
11520
11521 \family sans
11522 CrossList
11523 \end_layout
11524
11525 \begin_layout Standard
11526
11527 \family sans
11528 Foil\SpecialChar TeX
11529
11530 \family default
11531  provides some powerful header and footer capabilities that are best set
11532  in the preamble although they may be set at any point in a document.
11533  If you want to change these settings in your document the best place to
11534  do so is at the very top of a foil, i.
11535 \begin_inset space \thinspace{}
11536 \end_inset
11537
11538 e.
11539 \emph on
11540
11541 \begin_inset space \space{}
11542 \end_inset
11543
11544
11545 \emph default
11546 straight after the foilhead.
11547 \end_layout
11548
11549 \begin_layout Standard
11550 For this purpose, the following command styles are provided [
11551 \shape smallcaps
11552 Martin Vermeer
11553 \shape default
11554 ]:
11555 \end_layout
11556
11557 \begin_layout Standard
11558 \begin_inset Flex Multiple Columns
11559 status open
11560
11561 \begin_layout Itemize
11562
11563 \family sans
11564 My
11565 \begin_inset space ~
11566 \end_inset
11567
11568 Logo
11569 \end_layout
11570
11571 \begin_layout Itemize
11572
11573 \family sans
11574 Restriction
11575 \end_layout
11576
11577 \begin_layout Itemize
11578
11579 \family sans
11580 Right
11581 \begin_inset space ~
11582 \end_inset
11583
11584 Footer
11585 \end_layout
11586
11587 \begin_layout Itemize
11588
11589 \family sans
11590 Right
11591 \begin_inset space ~
11592 \end_inset
11593
11594 Header
11595 \end_layout
11596
11597 \begin_layout Itemize
11598
11599 \family sans
11600 Left
11601 \begin_inset space ~
11602 \end_inset
11603
11604 Header
11605 \end_layout
11606
11607 \begin_deeper
11608 \begin_layout Plain Layout
11609 \begin_inset space ~
11610 \end_inset
11611
11612
11613 \end_layout
11614
11615 \end_deeper
11616 \end_inset
11617
11618
11619 \end_layout
11620
11621 \begin_layout Standard
11622 There are also a few commands provided by 
11623 \family sans
11624 Foil\SpecialChar TeX
11625
11626 \family default
11627  that aren't directly supported by \SpecialChar LyX
11628  but I'll tell you what they do and how
11629  to use them in section
11630 \begin_inset space ~
11631 \end_inset
11632
11633
11634 \begin_inset CommandInset ref
11635 LatexCommand ref
11636 reference "sec:unsuppfoils"
11637
11638 \end_inset
11639
11640 .
11641 \end_layout
11642
11643 \begin_layout Subsection
11644 Building a Set of Foils
11645 \end_layout
11646
11647 \begin_layout Standard
11648 This section will give a simple introduction to using the different environments
11649  to build a set of foils.
11650  If you want to see an example set of foils, take a look at the 
11651 \family typewriter
11652 Foils.lyx
11653 \family default
11654  file you find in \SpecialChar LyX
11655 's 
11656 \family typewriter
11657 examples
11658 \family default
11659  folder.
11660 \end_layout
11661
11662 \begin_layout Subsubsection
11663 Give It a Title Page
11664 \end_layout
11665
11666 \begin_layout Standard
11667 Unlike other classes that provide 
11668 \family sans
11669 Title
11670 \family default
11671
11672 \family sans
11673 Author
11674 \family default
11675
11676 \family sans
11677 Date
11678 \family default
11679  and 
11680 \family sans
11681 Abstract
11682 \family default
11683  environments, 
11684 \family sans
11685 foils
11686 \family default
11687  creates the title on a page of its own.
11688  If you leave out the 
11689 \family sans
11690 Date
11691 \family default
11692  environment \SpecialChar LaTeX
11693  will substitute the current date (every time you regenerate
11694  the output).
11695 \end_layout
11696
11697 \begin_layout Subsubsection
11698 Start a New Foil
11699 \end_layout
11700
11701 \begin_layout Standard
11702 As I mentioned earlier, there are four ways of starting a new foil.
11703  For portrait foils you should use 
11704 \family sans
11705 Foilhead
11706 \family default
11707  or 
11708 \family sans
11709 ShortFoilhead.
11710
11711 \family default
11712  The difference between these two environments is the amount of space between
11713  the title of the foil (the foilhead) and the body of the foil.
11714 \end_layout
11715
11716 \begin_layout Standard
11717 Landscape foils are generated using the 
11718 \family sans
11719 Rotatefoilhead
11720 \family default
11721  and 
11722 \family sans
11723 ShortRotatefoilhead
11724 \family default
11725  environments.
11726  Again the only difference is the spacing between foilhead and body.
11727  Both of the short versions have 0.5
11728 \begin_inset space ~
11729 \end_inset
11730
11731 inches less separation between the foilhead and the body.
11732  
11733 \end_layout
11734
11735 \begin_layout Standard
11736 One problem with the support for landscape foils is the requirement that
11737  you have to use the 
11738 \family typewriter
11739 dvips
11740 \family default
11741  driver to generate the PostScript output otherwise the foils won't be rotated.
11742  It is possible to get landscape foils even if you haven't got the 
11743 \family typewriter
11744 dvips
11745 \family default
11746  driver provided you can feed your foils sideways through your printer ;-)
11747 \end_layout
11748
11749 \begin_layout Subsubsection
11750 Theorems, Lemmas, Proofs and more
11751 \end_layout
11752
11753 \begin_layout Standard
11754 You can't have two of the same type of these environments directly following
11755  each other.
11756  If you use a normal paragraph break, , you will just be extending the previous
11757  environment as if you had merged the two environments together.
11758  Rather than that, you need to insert a so-called separator.
11759  Please refer to the section entitled 
11760 \emph on
11761 Separate Nestings
11762 \emph default
11763  in the 
11764 \emph on
11765 User's Guide
11766 \emph default
11767 .
11768 \end_layout
11769
11770 \begin_layout Subsubsection
11771 Lists
11772 \end_layout
11773
11774 \begin_layout Standard
11775 You get all the commonly supported list styles found in other classes as
11776  well as two new ones.
11777  I'll only describe the new ones here.
11778  If you want to find out more about the other list environments check out
11779  the 
11780 \emph on
11781 User's Guide.
11782
11783 \emph default
11784  If you intend to use itemized lists you might also want to read about the
11785  
11786 \family sans
11787 Itemize
11788 \begin_inset space ~
11789 \end_inset
11790
11791 Bullet
11792 \begin_inset space ~
11793 \end_inset
11794
11795 Selection
11796 \family default
11797  dialog described above in section
11798 \begin_inset space ~
11799 \end_inset
11800
11801
11802 \begin_inset CommandInset ref
11803 LatexCommand ref
11804 reference "sec:bullet"
11805
11806 \end_inset
11807
11808 .
11809 \end_layout
11810
11811 \begin_layout Standard
11812 The two new list styles, 
11813 \family sans
11814 TickList
11815 \family default
11816  and 
11817 \family sans
11818 CrossList
11819 \family default
11820 , are designed to make it easier for you to create lists of do's and don'ts
11821  or right and wrong by providing dedicated environments that use a tick
11822  or a cross as the label of the list.
11823  These lists are in fact dedicated variants of the 
11824 \family sans
11825 Itemize
11826 \family default
11827  environment.
11828  They do however require that you have the 
11829 \family typewriter
11830 psnfss
11831 \family default
11832  packages installed.
11833 \end_layout
11834
11835 \begin_layout Subsubsection
11836 Figures and Tables
11837 \end_layout
11838
11839 \begin_layout Standard
11840
11841 \family sans
11842 Foil\SpecialChar TeX
11843
11844 \family default
11845  redefines the floating tables and figures so that they appear exactly where
11846  they are in the text rather than pushing them to the top of the page or
11847  to some user specified location.
11848  In fact if you change the float placement settings they are simply ignored.
11849 \end_layout
11850
11851 \begin_layout Subsubsection
11852 Page Headers and Footers
11853 \begin_inset CommandInset label
11854 LatexCommand label
11855 name "sec:foilfoot"
11856
11857 \end_inset
11858
11859
11860 \end_layout
11861
11862 \begin_layout Standard
11863
11864 \family sans
11865 My
11866 \begin_inset space ~
11867 \end_inset
11868
11869 Logo
11870 \family default
11871  and 
11872 \family sans
11873 Restriction
11874 \family default
11875  are two commands used to control the left-footer text string.
11876  The first is meant to allow you to include a graphic logo on your foils
11877  and defaults to 
11878 \begin_inset Quotes eld
11879 \end_inset
11880
11881 -Typeset by 
11882 \family sans
11883 Foil\SpecialChar TeX
11884
11885 \family default
11886 -
11887 \begin_inset Quotes erd
11888 \end_inset
11889
11890 .
11891  While the second is meant to provide a classification for the audience,
11892  
11893 \emph on
11894 e.
11895 \begin_inset space \thinspace{}
11896 \end_inset
11897
11898 g.
11899 \emph default
11900
11901 \begin_inset space \space{}
11902 \end_inset
11903
11904 Confidential.
11905  It is empty by default.
11906 \end_layout
11907
11908 \begin_layout Standard
11909 The remaining page corners can be filled by 
11910 \family sans
11911 Right
11912 \begin_inset space ~
11913 \end_inset
11914
11915 Footer
11916 \family default
11917  (which defaults to page numbers), 
11918 \family sans
11919 Right
11920 \begin_inset space ~
11921 \end_inset
11922
11923 Header
11924 \family default
11925  (top right) and 
11926 \family sans
11927 Left
11928 \begin_inset space ~
11929 \end_inset
11930
11931 Header
11932 \family default
11933  (top left).
11934 \end_layout
11935
11936 \begin_layout Subsection
11937 Unsupported 
11938 \family sans
11939 Foil\SpecialChar TeX
11940
11941 \family default
11942  Goodies
11943 \begin_inset CommandInset label
11944 LatexCommand label
11945 name "sec:unsuppfoils"
11946
11947 \end_inset
11948
11949
11950 \end_layout
11951
11952 \begin_layout Standard
11953 All the commands mentioned below need to be set in a 
11954 \family sans
11955 \SpecialChar LaTeX
11956
11957 \family default
11958  environment or as 
11959 \family sans
11960 \SpecialChar TeX
11961
11962 \family default
11963  within another environment.
11964 \end_layout
11965
11966 \begin_layout Subsubsection
11967 Lengths
11968 \end_layout
11969
11970 \begin_layout Standard
11971 All lengths are adjusted using the 
11972 \family typewriter
11973
11974 \backslash
11975 setlength{
11976 \family default
11977 \emph on
11978 lengthname
11979 \family typewriter
11980 \emph default
11981 }{
11982 \family default
11983 \emph on
11984 newlength
11985 \family typewriter
11986 \emph default
11987 }
11988 \family default
11989  command.
11990  Where 
11991 \emph on
11992 lengthname
11993 \emph default
11994  should be replaced by the name given to the length you want to change and
11995  
11996 \emph on
11997 newlength
11998 \emph default
11999  is the length value.
12000  All lengths should be specified in units of length such as inches (
12001 \family typewriter
12002 in
12003 \family default
12004 ), millimeters (
12005 \family typewriter
12006 mm
12007 \family default
12008 ) or points (
12009 \family typewriter
12010 pt
12011 \family default
12012 ) or relative to some document or font-based length such as 
12013 \family typewriter
12014
12015 \backslash
12016 textwidth
12017 \family default
12018 .
12019  
12020 \end_layout
12021
12022 \begin_layout Standard
12023 It's possible to change the spacing between a foilhead and the body of the
12024  foil by adjusting the length specified by 
12025 \family typewriter
12026
12027 \backslash
12028 foilheadskip
12029 \family default
12030 .
12031  For example, to make 
12032 \emph on
12033 all
12034 \emph default
12035  foilheads 0.5
12036 \begin_inset space \space{}
12037 \end_inset
12038
12039 in closer to their bodies put the following in the preamble: 
12040 \family typewriter
12041
12042 \backslash
12043 setlength{
12044 \backslash
12045 foilheadskip}{-0.5in}
12046 \end_layout
12047
12048 \begin_layout Standard
12049 The spacings around floats can be adjusted by setting these lengths:
12050 \end_layout
12051
12052 \begin_layout Labeling
12053 \labelwidthstring MMMMMMMMMMM
12054
12055 \family typewriter
12056
12057 \backslash
12058 abovefloatskip
12059 \family default
12060  Separation between the text and the top of the float
12061 \end_layout
12062
12063 \begin_layout Labeling
12064 \labelwidthstring MMMMMMMMMMM
12065
12066 \family typewriter
12067
12068 \backslash
12069 abovecaptionskip
12070 \family default
12071  Separation between the float and the caption
12072 \end_layout
12073
12074 \begin_layout Labeling
12075 \labelwidthstring MMMMMMMMMMM
12076
12077 \family typewriter
12078
12079 \backslash
12080 belowcaptionskip
12081 \family default
12082  Separation between the caption and the following text
12083 \end_layout
12084
12085 \begin_layout Labeling
12086 \labelwidthstring MMMMMMMMMMM
12087
12088 \family typewriter
12089
12090 \backslash
12091 captionwidth
12092 \family default
12093  You can make the captions narrower than the surrounding text by adjusting
12094  this length.
12095  Best done relative to 
12096 \family typewriter
12097
12098 \backslash
12099 textwidth
12100 \family default
12101 .
12102 \end_layout
12103
12104 \begin_layout Standard
12105 There are also several title page related lengths that you may find useful
12106  if you have a long title or several authors:
12107 \end_layout
12108
12109 \begin_layout Labeling
12110 \labelwidthstring MMMMMMMMMMM
12111
12112 \family typewriter
12113
12114 \backslash
12115 abovetitleskip
12116 \family default
12117  Separation from headers to 
12118 \family sans
12119 Title
12120 \end_layout
12121
12122 \begin_layout Labeling
12123 \labelwidthstring MMMMMMMMMMM
12124
12125 \family typewriter
12126
12127 \backslash
12128 titleauthorskip
12129 \family default
12130  between 
12131 \family sans
12132 Title
12133 \family default
12134  and 
12135 \family sans
12136 Author
12137 \family default
12138  environments
12139 \end_layout
12140
12141 \begin_layout Labeling
12142 \labelwidthstring MMMMMMMMMMM
12143
12144 \family typewriter
12145
12146 \backslash
12147 authorauthorskip
12148 \family default
12149  between multiple 
12150 \family sans
12151 Author
12152 \family default
12153  lines
12154 \end_layout
12155
12156 \begin_layout Labeling
12157 \labelwidthstring MMMMMMMMMMM
12158
12159 \family typewriter
12160
12161 \backslash
12162 authordateskip
12163 \family default
12164  between the 
12165 \family sans
12166 Author
12167 \family default
12168  and the 
12169 \family sans
12170 Date
12171 \end_layout
12172
12173 \begin_layout Labeling
12174 \labelwidthstring MMMMMMMMMMM
12175
12176 \family typewriter
12177
12178 \backslash
12179 dateabstractskip
12180 \family default
12181  between the 
12182 \family sans
12183 Date
12184 \family default
12185  and the 
12186 \family sans
12187 Abstract
12188 \end_layout
12189
12190 \begin_layout Standard
12191 The last length related command affects all the list environments.
12192  If you place 
12193 \family typewriter
12194
12195 \backslash
12196 zerolistvertdimens
12197 \family default
12198  
12199 \emph on
12200 inside
12201 \emph default
12202  a list environment then all the vertical spacing between the list items
12203  is removed.
12204  Note that this is a command not a length so it doesn't require 
12205 \family typewriter
12206
12207 \backslash
12208 setlength
12209 \family default
12210  like the stuff mentioned above.
12211 \end_layout
12212
12213 \begin_layout Subsubsection
12214 Headers and Footers
12215 \end_layout
12216
12217 \begin_layout Standard
12218 The 
12219 \family typewriter
12220
12221 \backslash
12222 LogoOn
12223 \family default
12224  and 
12225 \family typewriter
12226
12227 \backslash
12228 LogoOff
12229 \family default
12230  commands control whether the logo in the 
12231 \family sans
12232 MyLogo
12233 \family default
12234  definition appear on a given page.
12235  If you put 
12236 \family typewriter
12237
12238 \backslash
12239 LogoOff
12240 \family default
12241  in the preamble then none of the foils will have the logo on them.
12242  If you don't want the logo on a particular page place the 
12243 \family typewriter
12244
12245 \backslash
12246 LogoOff
12247 \family default
12248  directly after the foilhead of that page and the 
12249 \family typewriter
12250
12251 \backslash
12252 LogoOn
12253 \family default
12254  directly after the next foilhead.
12255 \end_layout
12256
12257 \begin_layout Standard
12258 If you decide to use the 
12259 \family sans
12260 fancy
12261 \family default
12262  page style setting in the 
12263 \family sans
12264 Document
12265 \begin_inset space ~
12266 \end_inset
12267
12268 Layout
12269 \family default
12270  dialog you should probably add 
12271 \family typewriter
12272
12273 \backslash
12274 let
12275 \backslash
12276 headwidth
12277 \backslash
12278 textwidth
12279 \family default
12280  to your preamble so headers and footers on landscape pages are correctly
12281  placed when rotated.
12282  This is due to some clashes between the page layouts provided by the 
12283 \family sans
12284 fancyheadings
12285 \family default
12286  package and the 
12287 \family sans
12288 foils
12289 \family default
12290  class.
12291 \end_layout
12292
12293 \begin_layout Section
12294 Hollywood (Hollywood spec scripts)
12295 \end_layout
12296
12297 \begin_layout Standard
12298 by 
12299 \shape smallcaps
12300 Garst Reese
12301 \end_layout
12302
12303 \begin_layout Subsection
12304 Introduction
12305 \end_layout
12306
12307 \begin_layout Standard
12308 Getting the format of a Hollywood script right is a 
12309 \begin_inset Quotes eld
12310 \end_inset
12311
12312 rite of passage.
12313 \begin_inset Quotes erd
12314 \end_inset
12315
12316  It is designed to make the readers focus on content and to be easy and
12317  familiar for the actors to read.
12318  Each page of a script should be one minute of film.
12319  Nothing goes in a script that you cannot see or hear on screen.
12320  The courier 12 pt font should be used throughout.
12321  No italics.
12322 \end_layout
12323
12324 \begin_layout Subsection
12325 Special problems
12326 \end_layout
12327
12328 \begin_layout Standard
12329 Speakers' lines should NEVER break in mid-sentence.
12330  If a speaker's lines continue over a page break, repeat the 
12331 \family sans
12332 Speaker
12333 \family default
12334  title followed by (Cont'd).
12335 \end_layout
12336
12337 \begin_layout Subsection
12338 Special features
12339 \end_layout
12340
12341 \begin_layout Standard
12342 Insert the 
12343 \family sans
12344 Speaker
12345 \family default
12346  names as labels then cross-reference the label to insert the name.
12347  The cross-reference dialog will show the current cast of characters.
12348  You can use this to insert the speaker name in narratives also.
12349 \end_layout
12350
12351 \begin_layout Subsection
12352 Paper size and Margins
12353 \end_layout
12354
12355 \begin_layout Standard
12356 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
12357 \end_layout
12358
12359 \begin_layout Subsection
12360 Environments
12361 \end_layout
12362
12363 \begin_layout Standard
12364 The following environments are available.
12365  You can use hollywood.bind to get the bind keys shown at the right.
12366 \end_layout
12367
12368 \begin_layout Itemize
12369
12370 \family sans
12371 Standard
12372 \begin_inset Newline newline
12373 \end_inset
12374
12375
12376 \family default
12377 Used where nothing else works.
12378  Try to avoid it.
12379 \end_layout
12380
12381 \begin_layout Itemize
12382
12383 \family sans
12384 FADE_IN
12385 \family default
12386 :
12387 \begin_inset space \hfill{}
12388 \end_inset
12389
12390
12391 \family sans
12392 M-z S-I
12393 \family default
12394
12395 \begin_inset Newline newline
12396 \end_inset
12397
12398 Usually followed by something like 
12399 \begin_inset Quotes eld
12400 \end_inset
12401
12402 on Sally waking up.
12403 \begin_inset Quotes erd
12404 \end_inset
12405
12406
12407 \end_layout
12408
12409 \begin_layout Itemize
12410
12411 \family sans
12412 INT:
12413 \begin_inset space \hfill{}
12414 \end_inset
12415
12416 M-z i
12417 \begin_inset Newline newline
12418 \end_inset
12419
12420
12421 \family default
12422 Introduces a new INTERIOR camera set-up.
12423  Always followed by DAY or NIGHT, or something similar to define the lighting
12424  required.
12425  Everthing on this line in CAPS.
12426 \end_layout
12427
12428 \begin_layout Itemize
12429
12430 \family sans
12431 EXT:
12432 \begin_inset space \hfill{}
12433 \end_inset
12434
12435 M-z e
12436 \begin_inset Newline newline
12437 \end_inset
12438
12439
12440 \family default
12441 Introduces a new EXTERIOR camera set-up.
12442  Everthing on this line in CAPS.
12443 \end_layout
12444
12445 \begin_layout Itemize
12446
12447 \family sans
12448 Speaker
12449 \begin_inset space \hfill{}
12450 \end_inset
12451
12452 M-z s
12453 \begin_inset Newline newline
12454 \end_inset
12455
12456
12457 \family default
12458 The character speaking.
12459 \end_layout
12460
12461 \begin_layout Itemize
12462
12463 \family sans
12464 Parenthetical
12465 \begin_inset space \hfill{}
12466 \end_inset
12467
12468 M-z p
12469 \begin_inset Newline newline
12470 \end_inset
12471
12472
12473 \family default
12474 Instructions to the speaker.
12475  The () are automatically inserted.
12476 \end_layout
12477
12478 \begin_layout Itemize
12479
12480 \family sans
12481 Dialogue
12482 \begin_inset space \hfill{}
12483 \end_inset
12484
12485 M-z d
12486 \begin_inset Newline newline
12487 \end_inset
12488
12489
12490 \family default
12491 What the 
12492 \family sans
12493 Speaker
12494 \family default
12495  says.
12496 \end_layout
12497
12498 \begin_layout Itemize
12499
12500 \family sans
12501 Transition
12502 \begin_inset space \hfill{}
12503 \end_inset
12504
12505 M-z t
12506 \begin_inset Newline newline
12507 \end_inset
12508
12509
12510 \family default
12511 Camera movement instruction.
12512  e.
12513 \begin_inset space \thinspace{}
12514 \end_inset
12515
12516 g.
12517 \begin_inset space \space{}
12518 \end_inset
12519
12520 CUT TO:
12521 \end_layout
12522
12523 \begin_layout Itemize
12524
12525 \family sans
12526 FADE OUT:
12527 \begin_inset space \hfill{}
12528 \end_inset
12529
12530 M-z S-I
12531 \end_layout
12532
12533 \begin_layout Itemize
12534
12535 \family sans
12536 Author
12537 \begin_inset space \hfill{}
12538 \end_inset
12539
12540 M-z S-A
12541 \end_layout
12542
12543 \begin_layout Itemize
12544
12545 \family sans
12546 Title
12547 \begin_inset space \hfill{}
12548 \end_inset
12549
12550 M-z S-T
12551 \end_layout
12552
12553 \begin_layout Itemize
12554
12555 \family sans
12556 Right_Address
12557 \begin_inset space \hfill{}
12558 \end_inset
12559
12560 M-z r
12561 \end_layout
12562
12563 \begin_layout Subsection
12564 Script jargon
12565 \end_layout
12566
12567 \begin_layout Itemize
12568 (O.S) â€” off screen
12569 \end_layout
12570
12571 \begin_layout Itemize
12572 (V.0) â€” voice over
12573 \end_layout
12574
12575 \begin_layout Itemize
12576 b.
12577 \begin_inset space \thinspace{}
12578 \end_inset
12579
12580 g.
12581  â€” background
12582 \end_layout
12583
12584 \begin_layout Itemize
12585 C.U.
12586  â€” close-up
12587 \end_layout
12588
12589 \begin_layout Itemize
12590 PAN â€” camera movement
12591 \end_layout
12592
12593 \begin_layout Itemize
12594 INSERT â€” cut to close-up of
12595 \end_layout
12596
12597 \begin_layout Section
12598 ijmpc and ijmpd
12599 \end_layout
12600
12601 \begin_layout Standard
12602 by 
12603 \noun on
12604 Panayotis Papasotiriou
12605 \end_layout
12606
12607 \begin_layout Subsection
12608 Overview
12609 \end_layout
12610
12611 \begin_layout Standard
12612 The ijmpc package is a set of macros that facilitates electronic manuscript
12613  submission to the 
12614 \emph on
12615 International Journal of Modern Physics C
12616 \emph default
12617 .
12618  Similarly, the ijmpd package is for creating manuscripts to be submitted
12619  to the 
12620 \emph on
12621 International Journal of Modern Physics D
12622 \emph default
12623 .
12624  Both journals are published by World Scientific.
12625  The corresponding document classes are named 
12626 \family typewriter
12627 ws-ijmpc.cls
12628 \family default
12629  and 
12630 \family typewriter
12631 ws-ijmpd.cls
12632 \family default
12633 , respectively.
12634  These files, together with instructions for the authors, can be downloaded
12635  from the sites 
12636 \begin_inset Flex URL
12637 status collapsed
12638
12639 \begin_layout Plain Layout
12640
12641 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
12642 \end_layout
12643
12644 \end_inset
12645
12646  and 
12647 \begin_inset Flex URL
12648 status collapsed
12649
12650 \begin_layout Plain Layout
12651
12652 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
12653 \end_layout
12654
12655 \end_inset
12656
12657 .
12658  Both packages are modified versions of the standard 
12659 \begin_inset Quotes eld
12660 \end_inset
12661
12662 article
12663 \begin_inset Quotes erd
12664 \end_inset
12665
12666  package, and they are almost (but not exactly) identical.
12667  Most of their features are supported by \SpecialChar LyX
12668 .
12669  I have used \SpecialChar LyX
12670  successfully to write articles submitted to both journals
12671  without any problem.
12672 \end_layout
12673
12674 \begin_layout Subsection
12675 Writing a paper
12676 \end_layout
12677
12678 \begin_layout Standard
12679 As usual, the easiest way to write a paper is to start with a template.
12680  Click on 
12681 \family sans
12682 File\SpecialChar menuseparator
12683 New from
12684 \family default
12685  
12686 \family sans
12687 Template
12688 \family default
12689 , then choose the 
12690 \family typewriter
12691 ijmpc.lyx
12692 \family default
12693  or 
12694 \family typewriter
12695 ijmpd.lyx
12696 \family default
12697  template.
12698  This will give an (almost) empty document that includes the most common
12699  fields found in a manuscript.
12700  Simply overwrite the existing text (including the brackets, 
12701 \family typewriter
12702 <>
12703 \family default
12704 ) with your text.
12705  You should keep in mind the following remarks.
12706 \end_layout
12707
12708 \begin_layout Enumerate
12709 \SpecialChar LyX
12710  won't let you change the font size and the page style of the document,
12711  because such modifications are not allowed by both packages.
12712 \end_layout
12713
12714 \begin_layout Enumerate
12715 The language of the document should not be changed.
12716  Before previewing your paper, be sure that the babel package is not used.
12717  To do this, click on 
12718 \begin_inset Info
12719 type  "menu"
12720 arg   "dialog-show document"
12721 \end_inset
12722
12723  
12724 \family sans
12725 \SpecialChar menuseparator
12726 Language
12727 \family default
12728 , and select 
12729 \begin_inset Quotes eld
12730 \end_inset
12731
12732 None
12733 \begin_inset Quotes erd
12734 \end_inset
12735
12736  as 
12737 \family sans
12738 Language Package
12739 \family default
12740 .
12741 \end_layout
12742
12743 \begin_layout Enumerate
12744 The 
12745 \begin_inset Quotes eld
12746 \end_inset
12747
12748 Keywords
12749 \begin_inset Quotes erd
12750 \end_inset
12751
12752  style must be used to define keywords.
12753 \end_layout
12754
12755 \begin_layout Enumerate
12756 The ijmpc package provides a style named 
12757 \begin_inset Quotes eld
12758 \end_inset
12759
12760 Classification Codes
12761 \begin_inset Quotes erd
12762 \end_inset
12763
12764 , which can be used to define classification codes, such as PACS numbers.
12765  Note that this facility is not supported by the ijmpd package.
12766 \end_layout
12767
12768 \begin_layout Enumerate
12769 Several new environments are available: 
12770 \begin_inset Quotes eld
12771 \end_inset
12772
12773 Definition
12774 \begin_inset Quotes erd
12775 \end_inset
12776
12777
12778 \begin_inset Quotes eld
12779 \end_inset
12780
12781 Step
12782 \begin_inset Quotes erd
12783 \end_inset
12784
12785
12786 \begin_inset Quotes eld
12787 \end_inset
12788
12789 Example
12790 \begin_inset Quotes erd
12791 \end_inset
12792
12793
12794 \begin_inset Quotes eld
12795 \end_inset
12796
12797 Remark
12798 \begin_inset Quotes erd
12799 \end_inset
12800
12801
12802 \begin_inset Quotes eld
12803 \end_inset
12804
12805 Notation
12806 \begin_inset Quotes erd
12807 \end_inset
12808
12809
12810 \begin_inset Quotes eld
12811 \end_inset
12812
12813 Theorem
12814 \begin_inset Quotes erd
12815 \end_inset
12816
12817
12818 \begin_inset Quotes eld
12819 \end_inset
12820
12821 Proof
12822 \begin_inset Quotes erd
12823 \end_inset
12824
12825
12826 \begin_inset Quotes eld
12827 \end_inset
12828
12829 Corollary
12830 \begin_inset Quotes erd
12831 \end_inset
12832
12833
12834 \begin_inset Quotes eld
12835 \end_inset
12836
12837 Lemma
12838 \begin_inset Quotes erd
12839 \end_inset
12840
12841
12842 \begin_inset Quotes eld
12843 \end_inset
12844
12845 Proposition
12846 \begin_inset Quotes erd
12847 \end_inset
12848
12849
12850 \begin_inset Quotes eld
12851 \end_inset
12852
12853 Prop
12854 \begin_inset Quotes erd
12855 \end_inset
12856
12857
12858 \begin_inset Quotes eld
12859 \end_inset
12860
12861 Question
12862 \begin_inset Quotes erd
12863 \end_inset
12864
12865
12866 \begin_inset Quotes eld
12867 \end_inset
12868
12869 Claim
12870 \begin_inset Quotes erd
12871 \end_inset
12872
12873 , and 
12874 \begin_inset Quotes eld
12875 \end_inset
12876
12877 Conjecture
12878 \begin_inset Quotes erd
12879 \end_inset
12880
12881 .
12882  Their use is more or less obvious.
12883  \SpecialChar LyX
12884  supports all these environments; it will use the proper label, text style,
12885  and numbering scheme for each of them.
12886 \end_layout
12887
12888 \begin_layout Enumerate
12889 Both packages use basic citations; the natbib package should not be used.
12890  In \SpecialChar LyX
12891 , citation references are shown as usual; in the output, citations are
12892  shown as superscripts.
12893  If you want to use a citation as normal text, you should use the 
12894 \family typewriter
12895 refcite
12896 \family default
12897  command, e.
12898 \begin_inset space \thinspace{}
12899 \end_inset
12900
12901 g.
12902 \begin_inset space \space{}
12903 \end_inset
12904
12905
12906 \begin_inset Quotes eld
12907 \end_inset
12908
12909 See Ref.
12910 \begin_inset space \space{}
12911 \end_inset
12912
12913
12914 \family typewriter
12915
12916 \backslash
12917 refcite{key}
12918 \family default
12919
12920 \begin_inset Quotes erd
12921 \end_inset
12922
12923 .
12924 \end_layout
12925
12926 \begin_layout Enumerate
12927 There is no 
12928 \begin_inset Quotes eld
12929 \end_inset
12930
12931 Acknowledgments
12932 \begin_inset Quotes erd
12933 \end_inset
12934
12935  section in both packages.
12936  To put acknowledgments, just use the 
12937 \begin_inset Quotes eld
12938 \end_inset
12939
12940 Section*
12941 \begin_inset Quotes erd
12942 \end_inset
12943
12944  environment.
12945 \end_layout
12946
12947 \begin_layout Enumerate
12948 Appendices may be added to the paper, 
12949 \emph on
12950 after
12951 \emph default
12952  the Acknowledgments and 
12953 \shape italic
12954 before
12955 \shape default
12956  the References.
12957  \SpecialChar LyX
12958  provides a special environment, called 
12959 \begin_inset Quotes eld
12960 \end_inset
12961
12962 Appendices Section
12963 \begin_inset Quotes erd
12964 \end_inset
12965
12966  which marks the beginning of the appendices.
12967  This environment should be left blank; it just sends a \SpecialChar LaTeX
12968  command, but nothing
12969  is really printed.
12970  In \SpecialChar LyX
12971 , the word 
12972 \begin_inset Quotes eld
12973 \end_inset
12974
12975 Appendix
12976 \begin_inset Quotes erd
12977 \end_inset
12978
12979  is printed with blue letters, as a signal that all sections after that
12980  point are appendices.
12981  To write an appendix, use the 
12982 \begin_inset Quotes eld
12983 \end_inset
12984
12985 Appendix
12986 \begin_inset Quotes erd
12987 \end_inset
12988
12989  environment.
12990  \SpecialChar LyX
12991  will number each appendix with capital letters, as required by both journals.
12992  Note that 
12993 \begin_inset Quotes eld
12994 \end_inset
12995
12996 Appendices Section
12997 \begin_inset Quotes erd
12998 \end_inset
12999
13000  
13001 \emph on
13002 must
13003 \emph default
13004  be present before the first appendix; if not, all appendices will be numbered
13005  as normal sections in the output.
13006 \end_layout
13007
13008 \begin_layout Enumerate
13009 The ijmpc and the ijmpd packages use the 
13010 \family typewriter
13011 tbl
13012 \family default
13013  command to implement table captions.
13014  As a result, a table created by \SpecialChar LyX
13015  is printed correctly, but its caption
13016  is ignored.
13017  However, you can use some \SpecialChar TeX
13018  code to overcome this problem, so that captions
13019  are printed as expected.
13020  To do so, create a float table as usual, remove the caption, and replace
13021  it with the \SpecialChar TeX
13022  code 
13023 \family typewriter
13024
13025 \backslash
13026 tbl{
13027 \emph on
13028 your table caption
13029 \emph default
13030 }{
13031 \family default
13032  (sic); you must also the \SpecialChar TeX
13033  code 
13034 \family typewriter
13035 }
13036 \family default
13037  immediately after the tabular material.
13038  Study the example table included in the template files to see how this
13039  trick is implemented.
13040  Alternatively, If you need table captions, you should implement the whole
13041  table float in a 
13042 \family typewriter
13043 .tex
13044 \family default
13045  file, then include this file to the \SpecialChar LyX
13046  document (
13047 \family sans
13048 Insert\SpecialChar menuseparator
13049 File\SpecialChar menuseparator
13050 Child
13051 \begin_inset space ~
13052 \end_inset
13053
13054 Document
13055 \family default
13056 ).
13057  Details on how to create a table float can be found in the files 
13058 \family typewriter
13059 ws-ijmpc.tex
13060 \family default
13061  and 
13062 \family typewriter
13063 ws-ijmpd.tex
13064 \family default
13065 , included in the corresponding packages.
13066 \end_layout
13067
13068 \begin_layout Subsection
13069 Preparing a paper for submission
13070 \end_layout
13071
13072 \begin_layout Standard
13073 Before you submit your paper you must export the \SpecialChar LyX
13074  document as a \SpecialChar LaTeX
13075  file (
13076 \family sans
13077 File\SpecialChar menuseparator
13078 Export\SpecialChar menuseparator
13079 \SpecialChar LaTeX
13080
13081 \family default
13082 )
13083 \begin_inset Foot
13084 status open
13085
13086 \begin_layout Plain Layout
13087 Actually you have the choice between \SpecialChar LaTeX
13088  (plain) and pdflatex.
13089  If you intend to use pdflatex to prepare the paper, you should use the
13090  pdflatex option so that included graphics are converted to PDF format,
13091  ready for use by pdflatex.
13092 \end_layout
13093
13094 \end_inset
13095
13096 , then make the following changes to the resulting 
13097 \family typewriter
13098 .tex
13099 \family default
13100  file.
13101 \end_layout
13102
13103 \begin_layout Enumerate
13104 Remove the comment lines before the 
13105 \family typewriter
13106
13107 \backslash
13108 documentclass
13109 \family default
13110  command.
13111 \end_layout
13112
13113 \begin_layout Enumerate
13114 Remove everything between (and including) the 
13115 \family typewriter
13116
13117 \backslash
13118 makeatletter
13119 \family default
13120  and 
13121 \family typewriter
13122
13123 \backslash
13124 makeatother
13125 \family default
13126  commands, except for any commands you specifically put into the \SpecialChar LaTeX
13127  preamble.
13128 \end_layout
13129
13130 \begin_layout Standard
13131 The modified 
13132 \family typewriter
13133 .tex
13134 \family default
13135  file should be saved and processed through \SpecialChar LaTeX
13136  as many times as necessary.
13137  You may also want to check the resulting 
13138 \family typewriter
13139 .dvi
13140 \family default
13141  document.
13142 \end_layout
13143
13144 \begin_layout Section
13145 iopart
13146 \end_layout
13147
13148 \begin_layout Standard
13149 by 
13150 \noun on
13151 Uwe Stöhr
13152 \end_layout
13153
13154 \begin_layout Subsection
13155 Overview
13156 \end_layout
13157
13158 \begin_layout Standard
13159 The iopart package provides a document class to create electronic manuscript
13160  submission to the journals published by the Institute of Physics.
13161  Instructions for the authors how to create a paper using the iopart class
13162  can be downloaded together with the iopart package from the site 
13163 \begin_inset Flex URL
13164 status collapsed
13165
13166 \begin_layout Plain Layout
13167
13168 ftp://ftp.iop.org/pub/journals/latex2e
13169 \end_layout
13170
13171 \end_inset
13172
13173 .
13174 \end_layout
13175
13176 \begin_layout Subsection
13177 Writing a paper
13178 \end_layout
13179
13180 \begin_layout Standard
13181 The easiest way to write a paper is to start with the template 
13182 \emph on
13183 IOP-article.lyx
13184 \emph default
13185  that is available via 
13186 \family sans
13187 File\SpecialChar menuseparator
13188 New From Template
13189 \family default
13190  The template explains how to use the special text environments.
13191  Here are the most important advices:
13192 \end_layout
13193
13194 \begin_layout Itemize
13195 To be able to compile your document to a PDF, PS, or DVI, ensure that the
13196  no AMS packages are loaded in 
13197 \family sans
13198 Document\SpecialChar menuseparator
13199 Settings\SpecialChar menuseparator
13200 Math Options
13201 \family default
13202 !
13203 \end_layout
13204
13205 \begin_layout Itemize
13206
13207 \size normal
13208 The title environment defines the kind of your paper.
13209  So use one of the following environments for the title:
13210 \end_layout
13211
13212 \begin_deeper
13213 \begin_layout Itemize
13214
13215 \family sans
13216 \size normal
13217 Title
13218 \family default
13219  for a Paper
13220 \end_layout
13221
13222 \begin_layout Itemize
13223
13224 \family sans
13225 \size normal
13226 Review
13227 \family default
13228  for a Review
13229 \end_layout
13230
13231 \begin_layout Itemize
13232
13233 \family sans
13234 \size normal
13235 Topical
13236 \family default
13237  for a Topical review
13238 \end_layout
13239
13240 \begin_layout Itemize
13241
13242 \family sans
13243 \size normal
13244 Comment
13245 \family default
13246  for a Comment
13247 \end_layout
13248
13249 \begin_layout Itemize
13250
13251 \family sans
13252 \size normal
13253 Note
13254 \family default
13255  for a Note
13256 \end_layout
13257
13258 \begin_layout Itemize
13259
13260 \family sans
13261 \size normal
13262 Paper
13263 \family default
13264  for a Paper (same as Title)
13265 \end_layout
13266
13267 \begin_layout Itemize
13268
13269 \family sans
13270 \size normal
13271 Prelim
13272 \family default
13273  for a Preliminary communication
13274 \end_layout
13275
13276 \begin_layout Itemize
13277
13278 \family sans
13279 \size normal
13280 Rapid
13281 \family default
13282  for a Rapid communication
13283 \end_layout
13284
13285 \begin_layout Itemize
13286
13287 \family sans
13288 \size normal
13289 Letter
13290 \family default
13291  for a Letter to the editor
13292 \end_layout
13293
13294 \end_deeper
13295 \begin_layout Itemize
13296
13297 \size normal
13298 All title environments except of 
13299 \family sans
13300 Letter
13301 \family default
13302  can have an optional short title.
13303 \end_layout
13304
13305 \begin_layout Itemize
13306 There is a general title environment 
13307 \family sans
13308 Article
13309 \family default
13310  which is not directly supported by \SpecialChar LyX
13311 .
13312  This can be used as \SpecialChar TeX
13313  code when your document doesn't fit into one of the
13314  other title types.
13315 \end_layout
13316
13317 \begin_layout Standard
13318 For more informations like hints for special table and formula formatting,
13319  look at the IOP author guidelines.
13320 \end_layout
13321
13322 \begin_layout Section
13323 Kluwer
13324 \end_layout
13325
13326 \begin_layout Standard
13327 by 
13328 \noun on
13329 Panayotis Papasotiriou
13330 \end_layout
13331
13332 \begin_layout Subsection
13333 Overview
13334 \end_layout
13335
13336 \begin_layout Standard
13337 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
13338  that facilitates electronic manuscript submission to the journals they
13339  publish.
13340  Most known of them (at least in my domain of interest) are 
13341 \emph on
13342 Astrophysics and Space Science
13343 \emph default
13344  and 
13345 \emph on
13346 Solar Physics
13347 \emph default
13348 , but there are many others (see a complete list at 
13349 \begin_inset Flex URL
13350 status collapsed
13351
13352 \begin_layout Plain Layout
13353
13354 http://www.wkap.nl/jrnllist.htm/JRNLHOME
13355 \end_layout
13356
13357 \end_inset
13358
13359 ).
13360  The Kluwer package may be downloaded from the site 
13361 \begin_inset Flex URL
13362 status collapsed
13363
13364 \begin_layout Plain Layout
13365
13366 http://www.wkap.nl/kaphtml.htm/STYLEFILES
13367 \end_layout
13368
13369 \end_inset
13370
13371 .
13372  A complete user guide is contained in that package (but it can also be
13373  downloaded separately).
13374 \end_layout
13375
13376 \begin_layout Standard
13377 \SpecialChar LyX
13378  supports many features of the package but not everything.
13379  However, the \SpecialChar TeX
13380  code needed is reduced to some 
13381 \begin_inset Quotes eld
13382 \end_inset
13383
13384 peculiar
13385 \begin_inset Quotes erd
13386 \end_inset
13387
13388  commands of the package (see
13389 \begin_inset space ~
13390 \end_inset
13391
13392
13393 \begin_inset CommandInset ref
13394 LatexCommand ref
13395 reference "subsec:kluwer_peculiarities"
13396
13397 \end_inset
13398
13399 ).
13400  I have recently used \SpecialChar LyX
13401  to write an article submitted to the 
13402 \emph on
13403 Astrophysics and Space Science
13404 \emph default
13405  without any problem.
13406 \end_layout
13407
13408 \begin_layout Subsection
13409 Writing a paper
13410 \end_layout
13411
13412 \begin_layout Standard
13413 The easiest way to write a paper is to start with the Kluwer template file.
13414  Click on 
13415 \family sans
13416 File\SpecialChar menuseparator
13417 New from
13418 \family default
13419  
13420 \family sans
13421 Template
13422 \family default
13423 , then choose the 
13424 \family typewriter
13425 kluwer.lyx
13426 \family default
13427  template.
13428  This will give an (almost) empty document that includes the most common
13429  fields found in a manuscript and a short description of their use.
13430  As in most templates, simply overwrite the existing text (including the
13431  brackets, 
13432 \family typewriter
13433 <>
13434 \family default
13435 ) with the correct information.
13436 \end_layout
13437
13438 \begin_layout Subsection
13439 Preparing a paper for submission
13440 \end_layout
13441
13442 \begin_layout Standard
13443 As in the AAS\SpecialChar TeX
13444  package, before you submit your paper to a journal you must
13445  
13446 \begin_inset Quotes eld
13447 \end_inset
13448
13449 postprocess
13450 \begin_inset Quotes erd
13451 \end_inset
13452
13453  it as follows.
13454 \end_layout
13455
13456 \begin_layout Enumerate
13457 Export your paper as a \SpecialChar LaTeX
13458  file.
13459  To do this, click on 
13460 \family sans
13461 File\SpecialChar menuseparator
13462 Export\SpecialChar menuseparator
13463 \SpecialChar LaTeX
13464
13465 \family default
13466 .
13467  
13468 \end_layout
13469
13470 \begin_layout Enumerate
13471 Edit the resulting 
13472 \family typewriter
13473 .tex
13474 \family default
13475  file with a text editor and make the following changes
13476 \end_layout
13477
13478 \begin_deeper
13479 \begin_layout Enumerate
13480 remove the comment lines before the 
13481 \family typewriter
13482
13483 \backslash
13484 documentclass
13485 \family default
13486  command,
13487 \end_layout
13488
13489 \begin_layout Enumerate
13490 remove everything between (and including) the 
13491 \family typewriter
13492
13493 \backslash
13494 makeatletter
13495 \family default
13496  and 
13497 \family typewriter
13498
13499 \backslash
13500 makeatother
13501 \family default
13502  commands, except for any commands you specifically put into the \SpecialChar LaTeX
13503  preamble.
13504 \end_layout
13505
13506 \begin_layout Standard
13507 Save the resulting 
13508 \family typewriter
13509 .tex
13510 \family default
13511  file.
13512 \end_layout
13513
13514 \end_deeper
13515 \begin_layout Enumerate
13516 Run the 
13517 \family typewriter
13518 .tex
13519 \family default
13520  file through \SpecialChar LaTeX
13521  as many times as necessary (usually up to three).
13522 \end_layout
13523
13524 \begin_layout Enumerate
13525 View the resulting 
13526 \family typewriter
13527 .dvi
13528 \family default
13529  document using, e.
13530 \begin_inset space \thinspace{}
13531 \end_inset
13532
13533 g.
13534 \begin_inset space \space{}
13535 \end_inset
13536
13537
13538 \family sans
13539 xdvi
13540 \family default
13541 , and check if everything is OK (it should, if you didn't make any mistake).
13542 \end_layout
13543
13544 \begin_layout Subsection
13545 \begin_inset Quotes eld
13546 \end_inset
13547
13548 Peculiarities
13549 \begin_inset Quotes erd
13550 \end_inset
13551
13552  of the Kluwer package
13553 \begin_inset CommandInset label
13554 LatexCommand label
13555 name "subsec:kluwer_peculiarities"
13556
13557 \end_inset
13558
13559
13560 \end_layout
13561
13562 \begin_layout Standard
13563 The Kluwer package has the following 
13564 \begin_inset Quotes eld
13565 \end_inset
13566
13567 peculiarities
13568 \begin_inset Quotes erd
13569 \end_inset
13570
13571 .
13572 \end_layout
13573
13574 \begin_layout Enumerate
13575 It is possible to write multiple articles in the same \SpecialChar LaTeX
13576  file
13577 \begin_inset Foot
13578 status collapsed
13579
13580 \begin_layout Plain Layout
13581 I can't imagine any good reason to do this.
13582 \end_layout
13583
13584 \end_inset
13585
13586 .
13587  Each article must be included in the environment 
13588 \begin_inset Quotes eld
13589 \end_inset
13590
13591 article
13592 \begin_inset Quotes erd
13593 \end_inset
13594
13595 .
13596  Unfortunately, this environment cannot be omitted, even if you write just
13597  one article.
13598  Therefore, each article starts with the command 
13599 \family typewriter
13600
13601 \backslash
13602 begin{article}
13603 \family default
13604  and, obviously, ends with the command 
13605 \family typewriter
13606
13607 \backslash
13608 end{article}
13609 \family default
13610 .
13611  Although this can be implemented in \SpecialChar LyX
13612 , I didn't included it, since it looks
13613  ugly and can confuse the novice user.
13614  Therefore, you need to enter them directly and mark them as \SpecialChar LaTeX
13615  code (the
13616  well-known 
13617 \begin_inset Quotes eld
13618 \end_inset
13619
13620 \SpecialChar TeX
13621  code
13622 \begin_inset Quotes erd
13623 \end_inset
13624
13625 ).
13626 \end_layout
13627
13628 \begin_layout Enumerate
13629 Information given at the beginning of the article (i.
13630 \begin_inset space \thinspace{}
13631 \end_inset
13632
13633 e.
13634 \begin_inset space \space{}
13635 \end_inset
13636
13637 title, subtitle, author, institution, running title, running author, abstract
13638  and keywords) must be included in an environment called 
13639 \begin_inset Quotes eld
13640 \end_inset
13641
13642 opening
13643 \begin_inset Quotes erd
13644 \end_inset
13645
13646 .
13647  This is not implemented in \SpecialChar LyX
13648 , so you must enter title, subtitle etc.
13649 \begin_inset space ~
13650 \end_inset
13651
13652 between two \SpecialChar TeX
13653  code lines (
13654 \family typewriter
13655
13656 \backslash
13657 begin{opening}
13658 \family default
13659  and 
13660 \family typewriter
13661
13662 \backslash
13663 end{opening}
13664 \family default
13665 ).
13666 \end_layout
13667
13668 \begin_layout Enumerate
13669 According to the user manual, the label of each bibliography item must be
13670  written as 
13671 \family typewriter
13672
13673 \backslash
13674 protect
13675 \backslash
13676 citeauthoryear{
13677 \family default
13678 \emph on
13679 author(s)
13680 \family typewriter
13681 \emph default
13682 }{
13683 \family default
13684 \emph on
13685 year
13686 \family typewriter
13687 \emph default
13688 }
13689 \family default
13690 .
13691 \end_layout
13692
13693 \begin_layout Standard
13694 The 
13695 \family typewriter
13696 kluwer.lyx
13697 \family default
13698  template takes care of all these 
13699 \begin_inset Quotes eld
13700 \end_inset
13701
13702 peculiarities
13703 \begin_inset Quotes erd
13704 \end_inset
13705
13706 .
13707  If you start a new paper using this template you don't need to do anything
13708  special.
13709  Just 
13710 \end_layout
13711
13712 \begin_layout Enumerate
13713 don't delete the \SpecialChar TeX
13714  code included in the template, and
13715 \end_layout
13716
13717 \begin_layout Enumerate
13718 copy the example bibliography item included in the template and modify it
13719  as necessary to enter new bibliography items.
13720 \end_layout
13721
13722 \begin_layout Section
13723 Koma-Script
13724 \end_layout
13725
13726 \begin_layout Standard
13727 by 
13728 \noun on
13729 Bernd Rellermeyer
13730 \end_layout
13731
13732 \begin_layout Subsection
13733 Overview
13734 \end_layout
13735
13736 \begin_layout Standard
13737 The \SpecialChar LyX
13738  document classes 
13739 \emph on
13740 article (koma-script)
13741 \emph default
13742
13743 \emph on
13744 report (koma-script)
13745 \emph default
13746
13747 \emph on
13748 book
13749 \emph default
13750  
13751 \emph on
13752 (koma-script)
13753 \emph default
13754 , and 
13755 \emph on
13756 letter
13757 \emph default
13758  
13759 \emph on
13760 (koma-script)
13761 \emph default
13762  correspond to the \SpecialChar LaTeX
13763  document classes 
13764 \family typewriter
13765 scrartcl.cls
13766 \family default
13767
13768 \family typewriter
13769 scrreprt.cls
13770 \family default
13771
13772 \family typewriter
13773 scrbook.cls
13774 \family default
13775 , and 
13776 \family typewriter
13777 scrlettr.cls
13778 \family default
13779 , resp.
13780 \begin_inset space ~
13781 \end_inset
13782
13783 of the Koma-Script family.
13784  They are replacements for the standard document classes 
13785 \family typewriter
13786 article.cls
13787 \family default
13788
13789 \family typewriter
13790 report.cls
13791 \family default
13792
13793 \family typewriter
13794 book.cls
13795 \family default
13796  and 
13797 \family typewriter
13798 letter.cls
13799 \family default
13800 , resp., and fit better to European typography conventions in a number of
13801  points.
13802 \end_layout
13803
13804 \begin_layout Itemize
13805 Standard character size is 11pt in 
13806 \emph on
13807 article (koma-script)
13808 \emph default
13809
13810 \emph on
13811 report (koma-script)
13812 \emph default
13813 , and 
13814 \emph on
13815 book (koma-script)
13816 \emph default
13817 , and 12pt in 
13818 \emph on
13819 letter (koma-script)
13820 \emph default
13821 .
13822 \end_layout
13823
13824 \begin_layout Itemize
13825 Headings, labels of the description environment, and a number of elements
13826  of the 
13827 \emph on
13828 letter (koma-script)
13829 \emph default
13830  document class are set in a bold sans serif font.
13831 \begin_inset Foot
13832 status collapsed
13833
13834 \begin_layout Plain Layout
13835 There is a big difference between the bold sans serif old cm fonts and new
13836  ec fonts, especially in the appearance of headings.
13837  In comparison, the ec bold sans serif fonts look a bit thin.
13838  Here the \SpecialChar LaTeX
13839  package 
13840 \family typewriter
13841 cmsd.sty by
13842 \family default
13843  
13844 \shape smallcaps
13845 Walter Schmidt
13846 \shape default
13847  helps to produce the 
13848 \begin_inset Quotes eld
13849 \end_inset
13850
13851 usual
13852 \begin_inset Quotes erd
13853 \end_inset
13854
13855  appearance when using the ec fonts.
13856 \end_layout
13857
13858 \end_inset
13859
13860  The numbering of chapter headings is made in the same way as the numbering
13861  of section headings, that is without the extra line 
13862 \begin_inset Quotes eld
13863 \end_inset
13864
13865 Chapter\SpecialChar ldots
13866
13867 \begin_inset Quotes erd
13868 \end_inset
13869
13870 .
13871  In addition, the appearance of the headings can be modified by using a
13872  number of options (in \SpecialChar LyX
13873  to be entered in the field 
13874 \family sans
13875 Extra
13876 \begin_inset space ~
13877 \end_inset
13878
13879 Options
13880 \family default
13881  of the dialog 
13882 \family sans
13883 Layout\SpecialChar menuseparator
13884 Document
13885 \family default
13886 ).
13887  
13888 \end_layout
13889
13890 \begin_layout Itemize
13891 The main means in the Koma-Script document classes to design the type area
13892  are the options 
13893 \family sans
13894 BCOR
13895 \family default
13896  and 
13897 \family sans
13898 DIV
13899 \family default
13900  (in \SpecialChar LyX
13901  to be entered in the extra class options field in the dialog 
13902 \family sans
13903 Document\SpecialChar menuseparator
13904 Settings
13905 \family default
13906 ).
13907  They make a clearer modification of page margins possible as do the options
13908  of the dialog 
13909 \family sans
13910 Document\SpecialChar menuseparator
13911 Settings
13912 \family default
13913 .
13914  
13915 \end_layout
13916
13917 \begin_layout Itemize
13918 The \SpecialChar LaTeX
13919  document classes of the Koma-Script family define a number of additional
13920  commands.
13921  Those part of it which makes sense in \SpecialChar LyX
13922  is implemented in corresponding
13923  paragraph types.
13924 \end_layout
13925
13926 \begin_layout Standard
13927 Detailed descriptions of the \SpecialChar LaTeX
13928  document classes of the Koma-Script family
13929  can be found in the Koma-Script documentation 
13930 \emph on
13931 scrguide
13932 \emph default
13933  (German) and 
13934 \emph on
13935 scrguien
13936 \emph default
13937  (English).
13938 \end_layout
13939
13940 \begin_layout Subsection
13941 article (koma-script), report (koma-script), and book (koma-script)
13942 \end_layout
13943
13944 \begin_layout Standard
13945 The document classes 
13946 \emph on
13947 article (koma-script)
13948 \emph default
13949
13950 \emph on
13951 report (koma-script)
13952 \emph default
13953 , and 
13954 \emph on
13955 book
13956 \emph default
13957  
13958 \emph on
13959 (koma-script)
13960 \emph default
13961  are implemented in the layout files 
13962 \family typewriter
13963 scrartcl.layout
13964 \family default
13965
13966 \family typewriter
13967 scrreprt.layout
13968 \family default
13969 , and 
13970 \family typewriter
13971 scrbook.layout
13972 \family default
13973 , resp.
13974  They contain all the paragraph types of the corresponding standard document
13975  classes 
13976 \emph on
13977 article
13978 \emph default
13979
13980 \emph on
13981 report
13982 \emph default
13983 , and 
13984 \emph on
13985 book
13986 \emph default
13987 , resp., partly modified, with the exception of the \SpecialChar LyX
13988  specific 
13989 \family sans
13990 List
13991 \family default
13992 -type, which is replaced by the new 
13993 \family sans
13994 Labeling
13995 \family default
13996 -type having the same functionality.
13997  Beside the 
13998 \family sans
13999 Labeling
14000 \family default
14001 -Type there is a number of new paragraph types added.
14002  They are 
14003 \emph on
14004 not
14005 \emph default
14006  part of 
14007 \emph on
14008 letter (koma-script)
14009 \emph default
14010 .
14011 \end_layout
14012
14013 \begin_layout Itemize
14014
14015 \family sans
14016 Addpart, Addchap
14017 \family default
14018
14019 \family sans
14020 Addsec
14021 \family default
14022 : are equivalents to 
14023 \family sans
14024 Part*, Chapter*
14025 \family default
14026  and 
14027 \family sans
14028 Section*
14029 \family default
14030 , resp., additionally inserting an entry in the table of contents.
14031  
14032 \family sans
14033 Addpart
14034 \family default
14035  and 
14036 \family sans
14037 Addchap
14038 \family default
14039  are not contained in 
14040 \emph on
14041 article (koma-script)
14042 \emph default
14043 .
14044 \end_layout
14045
14046 \begin_layout Itemize
14047
14048 \family sans
14049 Addchap*
14050 \family default
14051
14052 \family sans
14053 Addsec*
14054 \family default
14055 : behave exactly as 
14056 \family sans
14057 Addchap
14058 \family default
14059  and 
14060 \family sans
14061 Addsec
14062 \family default
14063 , resp., additionally clearing running heads.
14064  
14065 \family sans
14066 Addchap*
14067 \family default
14068  is not contained in 
14069 \emph on
14070 article (koma-script)
14071 \emph default
14072 .
14073 \begin_inset Foot
14074 status collapsed
14075
14076 \begin_layout Plain Layout
14077 There is also an 
14078 \family typewriter
14079
14080 \backslash
14081 addpart*
14082 \family default
14083  command in 
14084 \emph on
14085 book (koma-script)
14086 \emph default
14087  and in 
14088 \emph on
14089 report (koma-script)
14090 \emph default
14091 , but since this is identical to 
14092 \family sans
14093 Part*
14094 \family default
14095 , is has not been implemented in \SpecialChar LyX
14096 .
14097 \end_layout
14098
14099 \end_inset
14100
14101
14102 \end_layout
14103
14104 \begin_layout Itemize
14105
14106 \family sans
14107 Minisec
14108 \family default
14109 : generates a heading directly above the following paragraph in the standard
14110  character size without affecting the structure of the document.
14111 \end_layout
14112
14113 \begin_layout Itemize
14114
14115 \family sans
14116 Captionabove
14117 \family default
14118  and 
14119 \family sans
14120 Captionbelow
14121 \family default
14122  are special captions which respect the different space settings needed
14123  for captions placed above or below an element (if you follow strict typographic
14124  rules, you might want to place table captions always above the table).
14125  You can also use the class option 
14126 \family typewriter
14127 tablecaptionsabove
14128 \family default
14129 , which will switch 
14130 \family sans
14131 caption
14132 \family default
14133  to 
14134 \family sans
14135 captionabove
14136 \family default
14137  for tables and 
14138 \family sans
14139 captionbelow
14140 \family default
14141  for figures.
14142  You need at least Koma-Script version 2.8q to use this.
14143 \end_layout
14144
14145 \begin_layout Itemize
14146
14147 \family sans
14148 Dictum
14149 \family default
14150 : can be used to set a bonmot, e.
14151 \begin_inset space \thinspace{}
14152 \end_inset
14153
14154 g.
14155 \begin_inset space \space{}
14156 \end_inset
14157
14158 at the beginning of a chapter.
14159  If you use the optional argument (
14160 \family sans
14161 Insert\SpecialChar menuseparator
14162 Dictum
14163 \begin_inset space ~
14164 \end_inset
14165
14166 Author
14167 \family default
14168 ), you can insert the dictum's author there.
14169  Dictum and author are separated by a line.
14170  You need at least Koma-Script version 2.8q to use this.
14171  
14172 \family sans
14173 Dictum
14174 \family default
14175  is not contained in 
14176 \emph on
14177 article (koma-script)
14178 \emph default
14179 .
14180 \end_layout
14181
14182 \begin_layout Standard
14183 The following types, together with the standard types 
14184 \family sans
14185 Title
14186 \family default
14187
14188 \family sans
14189 Author
14190 \family default
14191 , and 
14192 \family sans
14193 Date
14194 \family default
14195 , form the title area of the document.
14196  They must be entered ahead of the first 
14197 \begin_inset Quotes eld
14198 \end_inset
14199
14200 ordinary
14201 \begin_inset Quotes erd
14202 \end_inset
14203
14204  paragraph.
14205 \begin_inset Foot
14206 status collapsed
14207
14208 \begin_layout Plain Layout
14209 The corresponding \SpecialChar LaTeX
14210  commands must appear before the 
14211 \family typewriter
14212
14213 \backslash
14214 maketitle
14215 \family default
14216  command.
14217 \end_layout
14218
14219 \end_inset
14220
14221  When such a type is used more than once, the latter usage overwrites the
14222  former one, that means, for every type only the latest usage is valid.
14223  The order of the different types however has, like 
14224 \family sans
14225 Title
14226 \family default
14227
14228 \family sans
14229 Author
14230 \family default
14231 , and 
14232 \family sans
14233 Date
14234 \family default
14235 , no effect on the appearance of the produced document.
14236 \end_layout
14237
14238 \begin_layout Itemize
14239
14240 \family sans
14241 Subject
14242 \family default
14243 : produces a centered paragraph above the ordinary title (
14244 \family sans
14245 Title
14246 \family default
14247
14248 \family sans
14249 Author
14250 \family default
14251
14252 \family sans
14253 Date
14254 \family default
14255 ) for the subject of the document.
14256 \end_layout
14257
14258 \begin_layout Itemize
14259
14260 \family sans
14261 Publishers
14262 \family default
14263 : produces a centered paragraph below the ordinary title (
14264 \family sans
14265 Title
14266 \family default
14267
14268 \family sans
14269 Author
14270 \family default
14271
14272 \family sans
14273 Date
14274 \family default
14275 ) for the publishers' name.
14276 \end_layout
14277
14278 \begin_layout Itemize
14279
14280 \family sans
14281 Dedication
14282 \family default
14283 : in 
14284 \emph on
14285 report (koma-script)
14286 \emph default
14287  and 
14288 \emph on
14289 book (koma-script)
14290 \emph default
14291  produces a centered paragraph on its own page behind the title page, or
14292  in 
14293 \emph on
14294 article (koma-script)
14295 \emph default
14296  produces a centered paragraph below the ordinary title (
14297 \family sans
14298 Title
14299 \family default
14300
14301 \family sans
14302 Author
14303 \family default
14304
14305 \family sans
14306 Date
14307 \family default
14308
14309 \family sans
14310 Publishers
14311 \family default
14312 ) for a dedication.
14313 \end_layout
14314
14315 \begin_layout Itemize
14316
14317 \family sans
14318 Titlehead
14319 \family default
14320 : produces a left aligned paragraph above the ordinary title (
14321 \family sans
14322 Title
14323 \family default
14324
14325 \family sans
14326 Author
14327 \family default
14328
14329 \family sans
14330 Date
14331 \family default
14332
14333 \family sans
14334 Subject
14335 \family default
14336 ) for a document`s head.
14337 \end_layout
14338
14339 \begin_layout Itemize
14340
14341 \family sans
14342 Uppertitleback
14343 \family default
14344 : produces in a double-sided print in 
14345 \emph on
14346 report (koma-script)
14347 \emph default
14348  and 
14349 \emph on
14350 book (koma-script)
14351 \emph default
14352  a left-aligned paragraph at the top of the title page`s back or has no
14353  effect in a single-sided print or in 
14354 \emph on
14355 article (koma-script)
14356 \emph default
14357 .
14358 \end_layout
14359
14360 \begin_layout Itemize
14361
14362 \family sans
14363 Lowertitleback
14364 \family default
14365 : produces in a double-sided print in 
14366 \emph on
14367 report (koma-script)
14368 \emph default
14369  and 
14370 \emph on
14371 book (koma-script)
14372 \emph default
14373  a left-aligned paragraph at the bottom of the title page`s back or has
14374  no effect in a single-sided print or in 
14375 \emph on
14376 article (koma-script)
14377 \emph default
14378 .
14379 \end_layout
14380
14381 \begin_layout Itemize
14382
14383 \family sans
14384 Extratitle
14385 \family default
14386 : produces a special 
14387 \begin_inset Quotes eld
14388 \end_inset
14389
14390 dirty
14391 \begin_inset Quotes erd
14392 \end_inset
14393
14394  page ahead of the actual document containing a paragraph without special
14395  formatting.
14396 \end_layout
14397
14398 \begin_layout Standard
14399 The layout files for the document classes 
14400 \emph on
14401 article (koma-script)
14402 \emph default
14403
14404 \emph on
14405 report (koma-script)
14406 \emph default
14407 , and 
14408 \emph on
14409 book (koma-script)
14410 \emph default
14411  do include the file 
14412 \family typewriter
14413 scrmacros.inc
14414 \family default
14415 .
14416  This is thought of as a place to define your own types.
14417  Copy scrmacros
14418 \family typewriter
14419 .inc
14420 \family default
14421  in your personal layout directory and edit the file!
14422 \end_layout
14423
14424 \begin_layout Subsection
14425 letter (koma-script)
14426 \end_layout
14427
14428 \begin_layout Description
14429 Note: This section discusses the obsolete 
14430 \family sans
14431 KOMA-Script-Letter (v.
14432 \begin_inset space ~
14433 \end_inset
14434
14435 1)
14436 \family default
14437 , which is not even included anymore in recent KOMA releases.
14438  Please refer to the next section for the current KOMA-Script-Letter class
14439  (v.
14440 \begin_inset space ~
14441 \end_inset
14442
14443 2)!
14444 \end_layout
14445
14446 \begin_layout Standard
14447 \noindent
14448 The document class 
14449 \emph on
14450 letter (koma-script)
14451 \emph default
14452  is implemented in the layout file 
14453 \family typewriter
14454 scrlettr.layout
14455 \family default
14456 .
14457  It contains all the paragraph types of the corresponding standard document
14458  class 
14459 \emph on
14460 letter
14461 \emph default
14462 , partly modified, with the exception of the \SpecialChar LyX
14463  specific types 
14464 \family sans
14465 \SpecialChar LyX
14466 -Code
14467 \family default
14468  and 
14469 \family sans
14470 Comment
14471 \family default
14472  and the 
14473 \family sans
14474 List
14475 \family default
14476  type, which is replaced by the new 
14477 \family sans
14478 Labeling
14479 \family default
14480  type.
14481  In addition, it contains, in contrast to the standard document class, the
14482  standard types 
14483 \family sans
14484 \SpecialChar LaTeX
14485
14486 \family default
14487
14488 \family sans
14489 Quotation
14490 \family default
14491
14492 \family sans
14493 Quote
14494 \family default
14495 , and 
14496 \family sans
14497 Verse
14498 \family default
14499 .
14500  Furthermore, there are a number of new letter specific types.
14501 \end_layout
14502
14503 \begin_layout Standard
14504 The appearance of the letter produced by this document class can be controlled
14505  by a number of \SpecialChar LaTeX
14506  commands, which you can put in the \SpecialChar LaTeX
14507  preamble.
14508 \begin_inset Foot
14509 status collapsed
14510
14511 \begin_layout Plain Layout
14512 For example, the standard appearance of the letter`s heading, consisting
14513  of name and address, is quite self-willed.
14514  An 
14515 \begin_inset Quotes eld
14516 \end_inset
14517
14518 ordinary
14519 \begin_inset Quotes erd
14520 \end_inset
14521
14522  heading is produced by the following \SpecialChar LaTeX
14523  commands in the preamble:
14524 \end_layout
14525
14526 \begin_layout LyX-Code
14527
14528 \backslash
14529 firsthead{
14530 \backslash
14531 parbox[b]{
14532 \backslash
14533 textwidth}
14534 \end_layout
14535
14536 \begin_layout LyX-Code
14537   {
14538 \backslash
14539 ignorespaces 
14540 \backslash
14541 fromname
14542 \backslash
14543
14544 \backslash
14545  
14546 \backslash
14547 ignorespaces 
14548 \backslash
14549 fromaddress}} 
14550 \end_layout
14551
14552 \begin_layout LyX-Code
14553
14554 \backslash
14555 nexthead{
14556 \backslash
14557 parbox[b]{
14558 \backslash
14559 textwidth}
14560 \end_layout
14561
14562 \begin_layout LyX-Code
14563   {
14564 \backslash
14565 ignorespaces 
14566 \backslash
14567 fromname 
14568 \backslash
14569 hfill 
14570 \backslash
14571 ignorespaces 
14572 \backslash
14573 pagename
14574 \backslash
14575  
14576 \backslash
14577 thepage}}
14578 \end_layout
14579
14580 \end_inset
14581
14582  A detailed German description of such \SpecialChar LaTeX
14583  commands can be found in the Koma-Script
14584  documentation 
14585 \emph on
14586 scrguide
14587 \emph default
14588 .
14589  With it, the letter's author can produce his personal letter layout.
14590 \end_layout
14591
14592 \begin_layout Standard
14593 The types 
14594 \family sans
14595 Letter
14596 \family default
14597  and 
14598 \family sans
14599 Opening
14600 \family default
14601  define the beginning of the letter and must be used in every letter.
14602  To emphasize them in the \SpecialChar LyX
14603  document class, they are marked with the letter
14604  
14605 \shape italic
14606 L
14607 \shape default
14608  or 
14609 \shape italic
14610 O
14611 \shape default
14612 , resp.
14613 \begin_inset space ~
14614 \end_inset
14615
14616 in the left margin.
14617  It is possible to write any number of letters in one file.
14618  An 
14619 \family sans
14620 Opening
14621 \family default
14622  type produces a new letter using the same addressee and a 
14623 \family sans
14624 Letter
14625 \family default
14626  type produces a new addressee.
14627  The types 
14628 \family sans
14629 Closing
14630 \family default
14631
14632 \family sans
14633 PS
14634 \family default
14635
14636 \family sans
14637 CC
14638 \family default
14639 , and 
14640 \family sans
14641 Encl
14642 \family default
14643  are ordinary paragraph types and can also be used several times in one
14644  and the same letter.
14645 \end_layout
14646
14647 \begin_layout Itemize
14648
14649 \family sans
14650 Letter
14651 \family default
14652 : produces a paragraph for the addressee and implicitly defines the beginning
14653  of the letter.
14654 \end_layout
14655
14656 \begin_layout Itemize
14657
14658 \family sans
14659 Opening
14660 \family default
14661 : produces a paragraph for the form of address and implicitly produces a
14662  new letter.
14663 \end_layout
14664
14665 \begin_layout Itemize
14666
14667 \family sans
14668 Closing
14669 \family default
14670 : produces a paragraph for a close.
14671 \end_layout
14672
14673 \begin_layout Itemize
14674
14675 \family sans
14676 PS
14677 \family default
14678 : produces a paragraph for a postscript.
14679 \end_layout
14680
14681 \begin_layout Itemize
14682
14683 \family sans
14684 CC
14685 \family default
14686 : produces a paragraph for a distribution list.
14687 \end_layout
14688
14689 \begin_layout Itemize
14690
14691 \family sans
14692 Encl
14693 \family default
14694 : produces a paragraph for enclosures.
14695 \end_layout
14696
14697 \begin_layout Standard
14698 The types 
14699 \family sans
14700 Name
14701 \family default
14702
14703 \family sans
14704 Signature
14705 \family default
14706
14707 \family sans
14708 Address
14709 \family default
14710
14711 \family sans
14712 Telephone
14713 \family default
14714
14715 \family sans
14716 Place
14717 \family default
14718
14719 \family sans
14720 Backaddress
14721 \family default
14722
14723 \family sans
14724 Specialmail
14725 \family default
14726
14727 \family sans
14728 Location
14729 \family default
14730
14731 \family sans
14732 Title
14733 \family default
14734 , and 
14735 \family sans
14736 Subject
14737 \family default
14738  are input types provided with a label to enter information, which will
14739  be processed by the document class.
14740 \begin_inset Foot
14741 status collapsed
14742
14743 \begin_layout Plain Layout
14744 It could be seen as a matter of inconsequence, that the types 
14745 \family sans
14746 Letter
14747 \family default
14748  and 
14749 \family sans
14750 Opening
14751 \family default
14752  described above are not such input types as well.
14753  Because of the special meaning of those types, however, I have implemented
14754  them as ordinary paragraph types with a one letter mark in the left margin.
14755  Moreover, it would affect my feeling of symmetry, if the 
14756 \family sans
14757 Opening
14758 \family default
14759  type and the 
14760 \family sans
14761 Closing
14762 \family default
14763  type had such a serious different appearance.
14764 \end_layout
14765
14766 \end_inset
14767
14768  The types must be used ahead of the corresponding 
14769 \family sans
14770 Opening
14771 \family default
14772  type.
14773 \end_layout
14774
14775 \begin_layout Standard
14776 An implementation of these types in a WYSIWYG fashion does not seem to make
14777  sense, because the real appearance of the produced letter does not only
14778  depend on the usage of the particular type, but also on other factors.
14779  For example, a signature entered in the 
14780 \family sans
14781 Signature
14782 \family default
14783  type will in the standard behavior appear in the produced letter only,
14784  when in the same letter also a 
14785 \family sans
14786 Closing
14787 \family default
14788  type is used.
14789  The entered value of the 
14790 \family sans
14791 Telephone
14792 \family default
14793  type will in the standard behavior not appear in the produced letter at
14794  all.
14795  The possibility to design the letter`s heading freely is already indicated
14796  in a footnote above.
14797 \end_layout
14798
14799 \begin_layout Standard
14800 The input types can also be used as empty paragraphs.
14801  This makes sense e.
14802 \begin_inset space \thinspace{}
14803 \end_inset
14804
14805 g.
14806 \begin_inset space \space{}
14807 \end_inset
14808
14809 for the 
14810 \family sans
14811 Signature
14812 \family default
14813  type.
14814  If the 
14815 \family sans
14816 Signature
14817 \family default
14818  type is not used at all, in the standard behavior the value of the 
14819 \family sans
14820 Name
14821 \family default
14822  type is used as signature, whereas if an empty 
14823 \family sans
14824 Signature
14825 \family default
14826  type is used, no signature value is defined.
14827 \end_layout
14828
14829 \begin_layout Standard
14830 By using the input types it is possible to write a letter template, containing
14831  filled input types with your personal dates (name, address, etc.) and empty
14832  input types for other dates you want to enter.
14833 \end_layout
14834
14835 \begin_layout Itemize
14836
14837 \family sans
14838 Name
14839 \family default
14840 : sender's name, in the standard behavior appears as a centered paragraph
14841  in small caps in the letter`s heading.
14842 \end_layout
14843
14844 \begin_layout Itemize
14845
14846 \family sans
14847 Signature
14848 \family default
14849 : sender's signature, in the standard behavior appears below the 
14850 \family sans
14851 Closing
14852 \family default
14853  type.
14854  If no 
14855 \family sans
14856 Signature
14857 \family default
14858  type is used, the value of the 
14859 \family sans
14860 Name
14861 \family default
14862  type appears instead.
14863 \end_layout
14864
14865 \begin_layout Itemize
14866
14867 \family sans
14868 Address
14869 \family default
14870 : sender's address, in the standard behavior appears in a centered paragraph
14871  in the letter`s heading below the sender's name.
14872 \end_layout
14873
14874 \begin_layout Itemize
14875
14876 \family sans
14877 Telephone
14878 \family default
14879 : sender's telephone number, in the standard behavior only sets the \SpecialChar LaTeX
14880  variable
14881  
14882 \family typewriter
14883
14884 \backslash
14885 telephonenum
14886 \family default
14887 .
14888 \end_layout
14889
14890 \begin_layout Itemize
14891
14892 \family sans
14893 Place
14894 \family default
14895 : place of the letter`s making.
14896 \end_layout
14897
14898 \begin_layout Itemize
14899
14900 \family sans
14901 Date
14902 \family default
14903 : date of the letter`s making.
14904  
14905 \family sans
14906 Place
14907 \family default
14908  and 
14909 \family sans
14910 Date
14911 \family default
14912 , in the standard behavior, produce the place and the date in a right-aligned
14913  line below the addressee's field.
14914  If an empty 
14915 \family sans
14916 Date
14917 \family default
14918  type is used, neither place nor date appear, independent of the value of
14919  the 
14920 \family sans
14921 Place
14922 \family default
14923  type.
14924  If no 
14925 \family sans
14926 Date
14927 \family default
14928  type is used, the date of the letter `s production is used.
14929 \end_layout
14930
14931 \begin_layout Itemize
14932
14933 \family sans
14934 Backaddress
14935 \family default
14936 : sender`s back address, in the standard behavior appears above the addressee's
14937  field in a small sans serif font.
14938 \end_layout
14939
14940 \begin_layout Itemize
14941
14942 \family sans
14943 Specialmail
14944 \family default
14945 : special mail information, in the standard behavior appears underlined
14946  above the addressee's field below the back address.
14947 \end_layout
14948
14949 \begin_layout Itemize
14950
14951 \family sans
14952 Location
14953 \family default
14954 : additional information, in the standard behavior appears on right side
14955  below the addressee`s field.
14956 \end_layout
14957
14958 \begin_layout Itemize
14959
14960 \family sans
14961 Title
14962 \family default
14963 : the letter's title, in the standard behavior appears in a big, bold, sans
14964  serif font above the subject.
14965 \end_layout
14966
14967 \begin_layout Itemize
14968
14969 \family sans
14970 Subject
14971 \family default
14972 : the letter's subject, in the standard behavior appears in a bold font
14973  above the 
14974 \family sans
14975 Opening
14976 \family default
14977  paragraph.
14978 \end_layout
14979
14980 \begin_layout Standard
14981 The types 
14982 \family sans
14983 Yourref
14984 \family default
14985
14986 \family sans
14987 Yourmail
14988 \family default
14989
14990 \family sans
14991 Myref
14992 \family default
14993
14994 \family sans
14995 Customer
14996 \family default
14997 , and 
14998 \family sans
14999 Invoice
15000 \family default
15001  produce a business letter like line above the 
15002 \family sans
15003 Title
15004 \family default
15005  line containing the fields 
15006 \begin_inset Quotes eld
15007 \end_inset
15008
15009 Your ref.
15010 \begin_inset Quotes erd
15011 \end_inset
15012
15013
15014 \begin_inset Quotes eld
15015 \end_inset
15016
15017 Your letter of
15018 \begin_inset Quotes erd
15019 \end_inset
15020
15021
15022 \begin_inset Quotes eld
15023 \end_inset
15024
15025 Our ref.
15026 \begin_inset Quotes erd
15027 \end_inset
15028
15029
15030 \begin_inset Quotes eld
15031 \end_inset
15032
15033 Customer no.
15034 \begin_inset Quotes erd
15035 \end_inset
15036
15037
15038 \begin_inset Quotes eld
15039 \end_inset
15040
15041 Invoice no.
15042 \begin_inset Quotes erd
15043 \end_inset
15044
15045 , and 
15046 \begin_inset Quotes eld
15047 \end_inset
15048
15049 Date
15050 \begin_inset Quotes erd
15051 \end_inset
15052
15053 .
15054  For the date field, the value of the 
15055 \family sans
15056 Date
15057 \family default
15058  type is used.
15059  If one of these 
15060 \begin_inset Quotes eld
15061 \end_inset
15062
15063 business letter types
15064 \begin_inset Quotes erd
15065 \end_inset
15066
15067  is used, the value of the 
15068 \family sans
15069 Place
15070 \family default
15071  type however does not appear, but only the \SpecialChar LaTeX
15072  variable 
15073 \family typewriter
15074
15075 \backslash
15076 fromplace
15077 \family default
15078  is set.
15079  The ordinary output of place and date in a right-aligned line below the
15080  addressee`s field is suppressed.
15081  The types are implemented as input types provided with a label and must
15082  be used ahead of the corresponding 
15083 \family sans
15084 Opening
15085 \family default
15086  type.
15087 \end_layout
15088
15089 \begin_layout Itemize
15090
15091 \family sans
15092 Yourref
15093 \family default
15094 : Your ref.
15095 \end_layout
15096
15097 \begin_layout Itemize
15098
15099 \family sans
15100 Yourmail
15101 \family default
15102 : Your letter of.
15103 \end_layout
15104
15105 \begin_layout Itemize
15106
15107 \family sans
15108 Myref
15109 \family default
15110 : Our ref.
15111 \end_layout
15112
15113 \begin_layout Itemize
15114
15115 \family sans
15116 Customer
15117 \family default
15118 : Customer no.
15119 \end_layout
15120
15121 \begin_layout Itemize
15122
15123 \family sans
15124 Invoice
15125 \family default
15126 : Invoice no.
15127 \end_layout
15128
15129 \begin_layout Subsection
15130 The new letter class: letter (koma-script v.2)
15131 \end_layout
15132
15133 \begin_layout Standard
15134 by 
15135 \noun on
15136 Jürgen Spitzmüller
15137 \end_layout
15138
15139 \begin_layout Standard
15140 \begin_inset VSpace medskip
15141 \end_inset
15142
15143
15144 \end_layout
15145
15146 \begin_layout Standard
15147 \noindent
15148 Koma-Script version 2.8 has introduced a new letter class 
15149 \family typewriter
15150 scrlttr2
15151 \family default
15152  which supersedes the now unsupported 
15153 \family typewriter
15154 scrlettr
15155 \family default
15156 .
15157  It has â€” on the \SpecialChar LaTeX
15158  side â€” a completely new interface and is not compatible
15159  with the old class.
15160  Therefore, \SpecialChar LyX
15161  supports both, though it is recommended you use the new class.
15162 \end_layout
15163
15164 \begin_layout Standard
15165 This class covers the same functionality as 
15166 \emph on
15167 letter (koma-script),
15168 \emph default
15169  and a few more.
15170  The basic items are 
15171 \family sans
15172 Address
15173 \family default
15174  (receiver's address, same as 
15175 \family sans
15176 Letter
15177 \family default
15178  in the old layout), 
15179 \family sans
15180 Opening
15181 \family default
15182 , and 
15183 \family sans
15184 Closing
15185 \family default
15186 .
15187  
15188 \family sans
15189 NextAddress
15190 \family default
15191  will start a new letter (i.
15192 \begin_inset space \thinspace{}
15193 \end_inset
15194
15195 e.
15196 \begin_inset space \space{}
15197 \end_inset
15198
15199 you can write several letters per document).
15200  New elements are sender's 
15201 \family sans
15202 E-Mail
15203 \family default
15204
15205 \family sans
15206 URL
15207 \family default
15208
15209 \family sans
15210 Fax
15211 \family default
15212
15213 \family sans
15214 Bank
15215 \family default
15216  and the possibility to use a 
15217 \family sans
15218 Logo
15219 \family default
15220  (via 
15221 \family sans
15222 Insert\SpecialChar menuseparator
15223 Graphics
15224 \family default
15225 ) in the header.
15226 \end_layout
15227
15228 \begin_layout Standard
15229 The biggest improvement is, though, that the letter's layout is configurable
15230  to meet almost any needs.
15231  This can be done via the preamble or with a special style file (Letter
15232  Class Option, extension 
15233 \family typewriter
15234 *.lco
15235 \family default
15236 ), that will be read in as a class option.
15237 \begin_inset Foot
15238 status collapsed
15239
15240 \begin_layout Plain Layout
15241 The KOMA package comes with some default 
15242 \family typewriter
15243 *.lco
15244 \family default
15245  files.
15246  There is, for instance, a 
15247 \family typewriter
15248 DIN.lco
15249 \family default
15250  file that follows german typesetting rules, or a 
15251 \family typewriter
15252 KOMAold.lco
15253 \family default
15254  that provides the default layout of the old 
15255 \family typewriter
15256 scrlettr
15257 \family default
15258  class.
15259  The latter can be loaded with the class option 
15260 \family typewriter
15261 KOMAold
15262 \family default
15263 , inserted via the 
15264 \family sans
15265 Layout\SpecialChar menuseparator
15266 Document\SpecialChar menuseparator
15267 Extra Options
15268 \family default
15269  field.
15270 \end_layout
15271
15272 \end_inset
15273
15274  Have a look at the 
15275 \emph on
15276 koma-letter2
15277 \emph default
15278  template that is included in \SpecialChar LyX
15279  for examples.
15280  A detailed description is to be found in the Koma-Script documentation
15281  (
15282 \emph on
15283 scrguide
15284 \emph default
15285 ).
15286 \end_layout
15287
15288 \begin_layout Subsection
15289 Problems
15290 \end_layout
15291
15292 \begin_layout Standard
15293 Visualizing the Koma-Script document classes in \SpecialChar LyX
15294 , the \SpecialChar LyX
15295  internals cause some
15296  problems.
15297 \end_layout
15298
15299 \begin_layout Itemize
15300 The chapter number of a 
15301 \family sans
15302 Chapter
15303 \family default
15304  type appears on a line of its own above the chapter heading instead of
15305  appearing in the same line ahead of it.
15306  The cause for that is the \SpecialChar LyX
15307  internal behavior for the labeltype 
15308 \family sans
15309 Counter_Chapter
15310 \family default
15311  in the layout file.
15312 \end_layout
15313
15314 \begin_layout Itemize
15315 The headings of the types 
15316 \family sans
15317 Addchap
15318 \family default
15319  and 
15320 \family sans
15321 Addsec
15322 \family default
15323  are only put in the 
15324 \begin_inset Quotes eld
15325 \end_inset
15326
15327 true
15328 \begin_inset Quotes erd
15329 \end_inset
15330
15331  \SpecialChar LaTeX
15332  table of contents, but not in the \SpecialChar LyX
15333  table of contents (
15334 \family sans
15335 Document\SpecialChar menuseparator
15336 Table
15337 \begin_inset space ~
15338 \end_inset
15339
15340 of
15341 \begin_inset space ~
15342 \end_inset
15343
15344 Contents
15345 \family default
15346 ).
15347 \end_layout
15348
15349 \begin_layout Itemize
15350 The paragraphs in a 
15351 \emph on
15352 letter
15353 \emph default
15354  document class appear in a skip separation mode, not indented.
15355  This is the standard behavior, no special \SpecialChar LaTeX
15356  commands are needed for that.
15357  But in the 
15358 \family sans
15359 Document\SpecialChar menuseparator
15360 Settings
15361 \family default
15362  dialog the corresponding radio button indicates 
15363 \family sans
15364 Indent
15365 \family default
15366 .
15367  A 
15368 \family sans
15369 Skip
15370 \family default
15371  value always has the effect that extra \SpecialChar LaTeX
15372  commands are inserted in the document
15373  to produce the gap, which is not what is wanted in this case.
15374 \end_layout
15375
15376 \begin_layout Section
15377 Memoir
15378 \end_layout
15379
15380 \begin_layout Standard
15381 By 
15382 \noun on
15383 Jürgen Spitzmüller
15384 \end_layout
15385
15386 \begin_layout Subsection
15387 Overview
15388 \end_layout
15389
15390 \begin_layout Standard
15391 Memoir is a very powerful and constantly evolving class.
15392  It has been designed with regard to fictional and non-fictional literature.
15393  Its aim is to let the user have maximum control over the typesetting of
15394  his document.
15395  Memoir is based on the standard book class, but it can also emulate the
15396  article class (see below).
15397 \end_layout
15398
15399 \begin_layout Standard
15400 Peter Wilson, the developer of Memoir, is known as the author of lots of
15401  useful packages in the \SpecialChar LaTeX
15402  world.
15403  Most of them have been merged with Memoir.
15404  Therefore, it is much easier to layout the table of contents, appendices,
15405  chapter designs and such.
15406  \SpecialChar LyX
15407 , though, does not support all of these goodies natively.
15408  Some of them might be added to forthcoming releases
15409 \begin_inset Foot
15410 status collapsed
15411
15412 \begin_layout Plain Layout
15413 You are invited to send suggestions to 
15414 \begin_inset Flex URL
15415 status collapsed
15416
15417 \begin_layout Plain Layout
15418
15419 lyx-devel@lists.lyx.org
15420 \end_layout
15421
15422 \end_inset
15423
15424 .
15425 \end_layout
15426
15427 \end_inset
15428
15429 , lots will probably never be supported, due to the limitations of \SpecialChar LyX
15430 's framework.
15431  Of course you can still use all features with the help of some native \SpecialChar LaTeX
15432
15433  commands (\SpecialChar TeX
15434  code
15435 \begin_inset Foot
15436 status collapsed
15437
15438 \begin_layout Plain Layout
15439 Cf.
15440 \begin_inset ERT
15441 status collapsed
15442
15443 \begin_layout Plain Layout
15444
15445
15446 \backslash
15447  
15448 \end_layout
15449
15450 \end_inset
15451
15452 section
15453 \begin_inset space ~
15454 \end_inset
15455
15456
15457 \begin_inset CommandInset ref
15458 LatexCommand ref
15459 reference "sec:Inserting-TeX-Code"
15460
15461 \end_inset
15462
15463  for details.
15464 \end_layout
15465
15466 \end_inset
15467
15468 ).
15469  In this section, we can only list those features that are natively supported
15470  by \SpecialChar LyX
15471 .
15472  For detailed descriptions (and for the rest of features) we recommend you
15473  have a look at the detailed manual of the Memoir class
15474 \begin_inset Foot
15475 status collapsed
15476
15477 \begin_layout Plain Layout
15478 Cf.
15479 \begin_inset ERT
15480 status collapsed
15481
15482 \begin_layout Plain Layout
15483
15484
15485 \backslash
15486  
15487 \end_layout
15488
15489 \end_inset
15490
15491
15492 \begin_inset Flex URL
15493 status collapsed
15494
15495 \begin_layout Plain Layout
15496
15497 CTAN:/macros/latex/memoir/memman.pdf
15498 \end_layout
15499
15500 \end_inset
15501
15502 .
15503 \end_layout
15504
15505 \end_inset
15506
15507 , which is not only a user guide for the class, but also both a comprehensive
15508  description on good typesetting and a superb example for good typesetting
15509  itself.
15510 \end_layout
15511
15512 \begin_layout Subsection
15513 Basic features and restrictions
15514 \end_layout
15515
15516 \begin_layout Standard
15517 Memoir supports basically all features of the standard book classes.
15518  There are, however, some differences, as follows:
15519 \end_layout
15520
15521 \begin_layout Description
15522 Font
15523 \begin_inset space ~
15524 \end_inset
15525
15526 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
15527 \end_layout
15528
15529 \begin_layout Description
15530 Page
15531 \begin_inset space ~
15532 \end_inset
15533
15534 style: The fancy page style is not supported, due to a command clash between
15535  Memoir and the fancyhdr package (they both define a command with the same
15536  name, which confuses \SpecialChar LaTeX
15537 ).
15538  Instead, Memoir comes with a number of its own page styles (see 
15539 \family sans
15540 Document\SpecialChar menuseparator
15541 Settings\SpecialChar menuseparator
15542 Page
15543 \begin_inset space ~
15544 \end_inset
15545
15546 Style
15547 \family default
15548 ).
15549  If you want to use these for the chapter pages, you have to use the command
15550  
15551 \family typewriter
15552
15553 \backslash
15554 chapterstyle
15555 \family default
15556  in the main text or in preamble (e.
15557 \begin_inset space \thinspace{}
15558 \end_inset
15559
15560 g.
15561 \begin_inset space \space{}
15562 \end_inset
15563
15564
15565 \family typewriter
15566
15567 \backslash
15568 chapterstyle{companion}
15569 \family default
15570 ).
15571 \end_layout
15572
15573 \begin_layout Description
15574 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
15575  optional argument in the standard classes.
15576  With this, you can specify an alternative version of the title for the
15577  table of contents and the headers (for instance, if the title is too long).
15578  In \SpecialChar LyX
15579 , you can do this via 
15580 \family sans
15581 Insert\SpecialChar menuseparator
15582 Short
15583 \begin_inset space ~
15584 \end_inset
15585
15586 Title
15587 \family default
15588  at the beginning of a chapter/section.
15589  Memoir features a second optional argument and thus separates the table
15590  of contents from the header.
15591  You can define three variants of a title with this: one for the main text,
15592  one for the table of contents, and one for the headers.
15593  \SpecialChar LyX
15594  makes these available in form of specific 
15595 \family sans
15596 Short Title
15597 \family default
15598  variants in the 
15599 \family sans
15600 Insert
15601 \family default
15602  menu.
15603 \end_layout
15604
15605 \begin_layout Description
15606 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
15607  of contents, the list of figures and the list of table start a new page
15608  automatically.
15609  Memoir does not follow this route.
15610  You have to insert a page break yourself, if you want to have one.
15611 \end_layout
15612
15613 \begin_layout Description
15614 Titlepage: For some unknown reason, Memoir uses pagination on the title
15615  page (in the standard classes, title pages are 
15616 \begin_inset Quotes eld
15617 \end_inset
15618
15619 empty
15620 \begin_inset Quotes erd
15621 \end_inset
15622
15623 ).
15624  If you want an empty title page, type 
15625 \family typewriter
15626
15627 \backslash
15628 aliaspagestyle{title}{empty}
15629 \family default
15630  in the preamble.
15631 \end_layout
15632
15633 \begin_layout Description
15634 Article: With the class option 
15635 \emph on
15636 article
15637 \emph default
15638  (to be inserted in 
15639 \family sans
15640 Document\SpecialChar menuseparator
15641 Settings\SpecialChar menuseparator
15642 Class Settings\SpecialChar menuseparator
15643 Custom
15644 \begin_inset space ~
15645 \end_inset
15646
15647 Options
15648 \family default
15649 ), you can emulate article style.
15650  That is, counters (footnotes, figures, tables etc.) will not be reset on
15651  new chapters, chapters don't start a new page (but are—in contrary to 
15652 \begin_inset Quotes eld
15653 \end_inset
15654
15655 real
15656 \begin_inset Quotes erd
15657 \end_inset
15658
15659  article classes—still allowed), parts, though, use their own page, as in
15660  book.
15661 \end_layout
15662
15663 \begin_layout Description
15664 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
15665  font commands, which have been used in the old \SpecialChar LaTeX
15666  version 2.09 (e.
15667 \begin_inset space \thinspace{}
15668 \end_inset
15669
15670 g.
15671 \begin_inset space \space{}
15672 \end_inset
15673
15674
15675 \family typewriter
15676
15677 \backslash
15678 rm
15679 \family default
15680
15681 \family typewriter
15682
15683 \backslash
15684 it
15685 \family default
15686 ).
15687  It produces an error and stops \SpecialChar LaTeX
15688  whenever such a command appears.
15689  The class option 
15690 \emph on
15691 oldfontcommands
15692 \emph default
15693  reallows the commands and spits out warnings instead (which does at least
15694  not stop \SpecialChar LaTeX
15695 ).
15696  Since a lot of packages and particularly Bib\SpecialChar TeX
15697  style files are still using
15698  those commands, we have decided to use this option by default.
15699 \end_layout
15700
15701 \begin_layout Subsection
15702 Extra features
15703 \end_layout
15704
15705 \begin_layout Standard
15706 We will only describe the features supported by \SpecialChar LyX
15707  (which is not much currently).
15708  Please consult the Memoir manual
15709 \begin_inset Foot
15710 status collapsed
15711
15712 \begin_layout Plain Layout
15713 Cf.
15714 \begin_inset ERT
15715 status collapsed
15716
15717 \begin_layout Plain Layout
15718
15719
15720 \backslash
15721  
15722 \end_layout
15723
15724 \end_inset
15725
15726
15727 \begin_inset Flex URL
15728 status collapsed
15729
15730 \begin_layout Plain Layout
15731
15732 CTAN:/macros/latex/memoir/memman.pdf
15733 \end_layout
15734
15735 \end_inset
15736
15737 .
15738 \end_layout
15739
15740 \end_inset
15741
15742  for details.
15743 \end_layout
15744
15745 \begin_layout Description
15746 Abstract: You may wonder why an abstract is an extra feature.
15747  Well, it is in book class.
15748  Usually books don't have abstracts.
15749  Memoir, however, has.
15750  You can use it wherever and how often you like.
15751 \end_layout
15752
15753 \begin_layout Description
15754 Chapterprecis: You may know this older typesetting style: The contents of
15755  a chapter are summarized below the title and also in the table of contents
15756  (e.
15757 \begin_inset space \thinspace{}
15758 \end_inset
15759
15760 g.
15761 \begin_inset space \space{}
15762 \end_inset
15763
15764
15765 \emph on
15766 Our hero arrives in Troia; he loses some friends; he finds others
15767 \emph default
15768 ).
15769  Chapterprecis does exactly this.
15770  It is therefore only sensible below a chapter.
15771 \end_layout
15772
15773 \begin_layout Description
15774 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
15775  The epigraph environment provides an elegant way of typesetting such a
15776  motto.
15777  The motto itself (text) and its (optional) author (source) are divided
15778  by a short line.
15779  The author (source) can be inserted via 
15780 \family sans
15781 Insert\SpecialChar menuseparator
15782 Epigraph Source
15783 \family default
15784 \emph on
15785 .
15786 \end_layout
15787
15788 \begin_layout Description
15789 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
15790  complex figurative poems).
15791  \SpecialChar LyX
15792  can only support a few of them.
15793  One is poemtitle, which is a centered title for poems, which will also
15794  be added to the table of contents (verse is the standard environment for
15795  poems.
15796  Memoir has some enhanced versions of verse, but you need to use \SpecialChar TeX
15797  code,
15798  because they have to be nested inside regular verse environments, which
15799  is not possible with \SpecialChar LyX
15800 ).
15801 \end_layout
15802
15803 \begin_layout Description
15804 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
15805 \end_layout
15806
15807 \begin_layout Section
15808 Article (mwart), book (mwbk) and report (mwrep)
15809 \begin_inset Argument status
15810 status collapsed
15811
15812 \begin_layout Plain Layout
15813 The 
15814 \family typewriter
15815 mw
15816 \family default
15817  Classes
15818 \end_layout
15819
15820 \end_inset
15821
15822
15823 \end_layout
15824
15825 \begin_layout Standard
15826 by 
15827 \noun on
15828 Tomasz Luczak
15829 \end_layout
15830
15831 \begin_layout Standard
15832 The \SpecialChar LyX
15833  document classes 
15834 \emph on
15835 article (mwart)
15836 \emph default
15837
15838 \emph on
15839 report (mwrep)
15840 \emph default
15841  and 
15842 \emph on
15843 book
15844 \emph default
15845  
15846 \emph on
15847 (mwbk)
15848 \emph default
15849  correspond to the \SpecialChar LaTeX
15850  document classes 
15851 \family typewriter
15852 mwart.cls
15853 \family default
15854
15855 \family typewriter
15856 mwrep.cls
15857 \family default
15858  and 
15859 \family typewriter
15860 mwbk.cls
15861 \family default
15862 , resp.
15863  They are replacements for the standard document classes 
15864 \family typewriter
15865 article.cls
15866 \family default
15867
15868 \family typewriter
15869 report.cls
15870 \family default
15871  and 
15872 \family typewriter
15873 book.cls
15874 \family default
15875 , resp., and fit better to Polish typography conventions in a number of points.
15876  
15877 \end_layout
15878
15879 \begin_layout Standard
15880 Basic differences:
15881 \end_layout
15882
15883 \begin_layout Itemize
15884 Unnumbered titles (with star, e.
15885 \begin_inset space \thinspace{}
15886 \end_inset
15887
15888 g.
15889 \begin_inset space \space{}
15890 \end_inset
15891
15892
15893 \family sans
15894 Section*
15895 \family default
15896 ) are added into table of contents,
15897 \end_layout
15898
15899 \begin_layout Itemize
15900 Additional page styles:
15901 \end_layout
15902
15903 \begin_deeper
15904 \begin_layout Description
15905 uheadings header with separated lines,
15906 \end_layout
15907
15908 \begin_layout Description
15909 myheadings custom header, contents headers via commands: 
15910 \family typewriter
15911
15912 \backslash
15913 markright
15914 \family default
15915  and 
15916 \family typewriter
15917
15918 \backslash
15919 markboth
15920 \family default
15921 ,
15922 \end_layout
15923
15924 \begin_layout Description
15925 myuheadings custom header with separated lines,
15926 \end_layout
15927
15928 \begin_layout Description
15929 outer page number is placed on outer side of page
15930 \end_layout
15931
15932 \end_deeper
15933 \begin_layout Itemize
15934 Options 
15935 \end_layout
15936
15937 \begin_deeper
15938 \begin_layout Description
15939 rmheadings serif titles â€” default,
15940 \end_layout
15941
15942 \begin_layout Description
15943 sfheadings sansserif titles,
15944 \end_layout
15945
15946 \begin_layout Description
15947 authortitle on title page first placed is author next title â€” default,
15948 \end_layout
15949
15950 \begin_layout Description
15951 titleauthor on title page first placed is title next author,
15952 \end_layout
15953
15954 \begin_layout Description
15955 withmarginpar reserve place on page for margins.
15956 \end_layout
15957
15958 \end_deeper
15959 \begin_layout Section
15960 Paper
15961 \end_layout
15962
15963 \begin_layout Standard
15964 The document class 
15965 \family sans
15966 paper
15967 \family default
15968  provides an alternative to the standard 
15969 \family sans
15970 article
15971 \family default
15972  class.
15973  It provides similar functionality, but you might prefer this layout with
15974  sans serif sections, headings, and more.
15975 \end_layout
15976
15977 \begin_layout Section
15978 Rev\SpecialChar TeX
15979 4
15980 \end_layout
15981
15982 \begin_layout Standard
15983 by 
15984 \noun on
15985 Amir Karger
15986 \end_layout
15987
15988 \begin_layout Standard
15989 \begin_inset VSpace bigskip
15990 \end_inset
15991
15992
15993 \end_layout
15994
15995 \begin_layout Standard
15996 \noindent
15997 The 
15998 \family sans
15999 Revtex
16000 \begin_inset space ~
16001 \end_inset
16002
16003 4
16004 \family default
16005  textclass works with the American Physical Sociey's Rev\SpecialChar TeX
16006  4.0 (the 
16007 \begin_inset Formula $\beta$
16008 \end_inset
16009
16010  release of May, 1999) class.
16011 \end_layout
16012
16013 \begin_layout Standard
16014 \SpecialChar LyX
16015  has a 
16016 \family sans
16017 Revtex
16018 \family default
16019  textclass, which works with Rev\SpecialChar TeX
16020  3.1.
16021  However, v3.1 is basically obsolete, as it works with \SpecialChar LaTeX
16022  2.09.
16023  That means that it doesn't interact very well with \SpecialChar LyX
16024 , which requires \SpecialChar LaTeX2e
16025 , although
16026  it has been kludged to work.
16027  Since Rev\SpecialChar TeX
16028  4.0 has been designed to work much more cleanly with \SpecialChar LaTeX2e
16029 , \SpecialChar LyX
16030  with the
16031  
16032 \family sans
16033 Rev\SpecialChar TeX
16034
16035 \begin_inset space ~
16036 \end_inset
16037
16038 4
16039 \family default
16040  textclass should also be pretty easy to use.
16041 \end_layout
16042
16043 \begin_layout Standard
16044 These documents are supposed to be used in 
16045 \emph on
16046 addition
16047 \emph default
16048  to the Rev\SpecialChar TeX
16049  4.0 documents, so we don't describe any of the special Rev\SpecialChar TeX
16050  macros,
16051  and assume you'll know what to put in the preamble if necessary.
16052 \end_layout
16053
16054 \begin_layout Subsection
16055 Installation
16056 \end_layout
16057
16058 \begin_layout Standard
16059 All you need to do is install Rev\SpecialChar TeX
16060  4, as described in the package's README
16061  file.
16062  The package can be found at The Rev\SpecialChar TeX
16063  4 Web Site 
16064 \begin_inset Flex URL
16065 status collapsed
16066
16067 \begin_layout Plain Layout
16068
16069 http://publish.aps.org/revtex4/
16070 \end_layout
16071
16072 \end_inset
16073
16074 .
16075  Install it somewhere that \SpecialChar LaTeX
16076  can see it.
16077  Test it by trying to \SpecialChar LaTeX
16078  a short Rev\SpecialChar TeX
16079  4 document in some random directory (i.
16080 \begin_inset space \thinspace{}
16081 \end_inset
16082
16083 e.
16084 \begin_inset space \space{}
16085 \end_inset
16086
16087 not the directory where you installed the class file.) Then, if you reconfigure
16088  \SpecialChar LyX
16089 , it will find the class file and let you use the Rev\SpecialChar TeX
16090 4 textclass.
16091 \end_layout
16092
16093 \begin_layout Standard
16094 Probably the easiest way to get started is either to import a Rev\SpecialChar TeX
16095  4 document
16096  using 
16097 \family typewriter
16098 tex2lyx
16099 \family default
16100 , or to use the 
16101 \family sans
16102 Revtex
16103 \begin_inset space ~
16104 \end_inset
16105
16106 4
16107 \family default
16108  template, found in the templates directory.
16109 \end_layout
16110
16111 \begin_layout Subsection
16112 Preamble Matter
16113 \end_layout
16114
16115 \begin_layout Standard
16116 Optional arguments to 
16117 \family typewriter
16118
16119 \backslash
16120 documentclass
16121 \family default
16122 , like 
16123 \begin_inset Quotes eld
16124 \end_inset
16125
16126 preprint
16127 \begin_inset Quotes erd
16128 \end_inset
16129
16130  and 
16131 \begin_inset Quotes eld
16132 \end_inset
16133
16134 aps
16135 \begin_inset Quotes erd
16136 \end_inset
16137
16138 , go in the 
16139 \family sans
16140 Extra
16141 \begin_inset space ~
16142 \end_inset
16143
16144 Options
16145 \family default
16146  field in the 
16147 \family sans
16148 Document
16149 \begin_inset space ~
16150 \end_inset
16151
16152 Layout
16153 \family default
16154  dialog, as usual.
16155  Remember that in Rev\SpecialChar TeX
16156 , at least one optional argument is required! 
16157 \end_layout
16158
16159 \begin_layout Standard
16160 Other preamble matter, like 
16161 \family typewriter
16162
16163 \backslash
16164 draft
16165 \family default
16166  etc.
16167 \begin_inset space ~
16168 \end_inset
16169
16170 goes in the 
16171 \family sans
16172 \SpecialChar LaTeX
16173
16174 \begin_inset space ~
16175 \end_inset
16176
16177 Preamble
16178 \family default
16179  dialog, also as usual.
16180 \end_layout
16181
16182 \begin_layout Subsection
16183 Layouts
16184 \end_layout
16185
16186 \begin_layout Standard
16187 The layouts basically correspond to the commands in Rev\SpecialChar TeX
16188 4.0.
16189  For example, the Email layout corresponds to 
16190 \family typewriter
16191
16192 \backslash
16193 email{}
16194 \family default
16195 .
16196  Note that (at least as of Rev\SpecialChar TeX
16197  4.0 Beta), the 
16198 \family sans
16199 Address
16200 \family default
16201  and 
16202 \family sans
16203 Affiliation
16204 \family default
16205  layouts are exactly equivalent, so you shouldn't need to use both.
16206 \begin_inset Foot
16207 status collapsed
16208
16209 \begin_layout Plain Layout
16210 In case you're curious, both were included so that 
16211 \family typewriter
16212 tex2lyx
16213 \family default
16214  would be able to translate both 
16215 \family typewriter
16216
16217 \backslash
16218 address
16219 \family default
16220  and 
16221 \family typewriter
16222
16223 \backslash
16224 affiliation
16225 \family default
16226 .
16227 \end_layout
16228
16229 \end_inset
16230
16231
16232 \end_layout
16233
16234 \begin_layout Subsection
16235 Important Notes
16236 \end_layout
16237
16238 \begin_layout Standard
16239 There are a couple of important unique aspects of Rev\SpecialChar TeX
16240  4 which might cause
16241  bugs that will be even more confusing in \SpecialChar LyX
16242 .
16243 \end_layout
16244
16245 \begin_layout Standard
16246 In Rev\SpecialChar TeX
16247 , the 
16248 \family typewriter
16249
16250 \backslash
16251 thanks
16252 \family default
16253  command goes 
16254 \emph on
16255 outside
16256 \emph default
16257  the 
16258 \family typewriter
16259
16260 \backslash
16261 author
16262 \family default
16263  command.
16264  The \SpecialChar LyX
16265  equivalent is that there is a separate Thanks layout.
16266  Do 
16267 \emph on
16268 not
16269 \emph default
16270  write footnotes in the 
16271 \family sans
16272 Author
16273 \family default
16274  layout, or weird things may happen.
16275  See the Rev\SpecialChar TeX
16276  4 documentation for more details.
16277 \end_layout
16278
16279 \begin_layout Standard
16280 Also, the 
16281 \family sans
16282 Author
16283 \begin_inset space ~
16284 \end_inset
16285
16286 Email
16287 \family default
16288
16289 \family sans
16290 Author
16291 \begin_inset space ~
16292 \end_inset
16293
16294 URL
16295 \family default
16296 , and 
16297 \family sans
16298 Thanks
16299 \family default
16300  layouts must be placed 
16301 \emph on
16302 in between
16303 \emph default
16304  the 
16305 \family sans
16306 Author
16307 \family default
16308  layout and the corresponding 
16309 \family sans
16310 Address
16311 \family default
16312  (or equivalent 
16313 \family sans
16314 Affiliation
16315 \family default
16316 ) layout.
16317  If you put the 
16318 \family sans
16319 Thanks
16320 \family default
16321  after the 
16322 \family sans
16323 Address
16324 \family default
16325 , the \SpecialChar LaTeX
16326  won't compile.
16327 \end_layout
16328
16329 \begin_layout Section
16330 Springer Journals (
16331 \family sans
16332 svjour
16333 \family default
16334 )
16335 \end_layout
16336
16337 \begin_layout Standard
16338 by 
16339 \noun on
16340 Martin Vermeer
16341 \end_layout
16342
16343 \begin_layout Subsection
16344 Description
16345 \end_layout
16346
16347 \begin_layout Standard
16348 These are the layout files for some of the journal formats used by Springer
16349  Verlag and listed on 
16350 \begin_inset Flex URL
16351 status collapsed
16352
16353 \begin_layout Plain Layout
16354
16355 http://www.springer.de/author/tex/help-journals.html
16356 \end_layout
16357
16358 \end_inset
16359
16360 , where you should also go to fetch the class files (yes, these are \SpecialChar LaTeX2e
16361  now!).
16362  It is a modular system: the things common to all journals are implemented
16363  in 
16364 \family typewriter
16365 svjour.inc
16366 \family default
16367 , which journal-specific layout files (such as, e.
16368 \begin_inset space \thinspace{}
16369 \end_inset
16370
16371 g.
16372 \begin_inset space \space{}
16373 \end_inset
16374
16375
16376 \family typewriter
16377 svjog.layout
16378 \family default
16379  for Journal of Geodesy) can include.
16380 \end_layout
16381
16382 \begin_layout Standard
16383 This means that implementing support for any other Springer journal on this
16384  list is as simple as writing your own 
16385 \family typewriter
16386 sv
16387 \family default
16388 <myjournal>
16389 \family typewriter
16390 .layout
16391 \family default
16392  file following the outline given in 
16393 \family typewriter
16394 svjog.layout
16395 \family default
16396 .
16397  
16398 \end_layout
16399
16400 \begin_layout Standard
16401 It is reasonably well tested only for the Journal of Geodesy.
16402  
16403 \family typewriter
16404 svjour
16405 \family default
16406  and 
16407 \family typewriter
16408 svjog
16409 \family default
16410  come with the standard \SpecialChar LyX
16411  distribution.
16412  Install the relevant class file (downloaded from Springer) in a proper
16413  directory, reconfigure \SpecialChar LaTeX
16414  (in the te\SpecialChar TeX
16415  case by running 
16416 \family typewriter
16417 texhash
16418 \family default
16419 , as root if necessary â€” doesn't \SpecialChar LyX
16420  take care of this?), reconfigure \SpecialChar LyX
16421  and
16422  it should work.
16423 \end_layout
16424
16425 \begin_layout Subsection
16426 New styles
16427 \end_layout
16428
16429 \begin_layout Standard
16430 A large number of theorem-like styles â€” 
16431 \family sans
16432 Claim, Conjecture,
16433 \family default
16434  
16435 \family sans
16436 \SpecialChar ldots
16437 Theorem
16438 \family default
16439 .
16440 \end_layout
16441
16442 \begin_layout Standard
16443
16444 \family sans
16445 Headnote, Dedication, Subtitle, Running_\SpecialChar LaTeX
16446 _Title, Author_Running, Institute,
16447  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
16448 \family default
16449 .
16450  See the Springer class file documentation for details.
16451 \end_layout
16452
16453 \begin_layout Subsection
16454 Supported journals
16455 \end_layout
16456
16457 \begin_layout Itemize
16458
16459 \emph on
16460 Journal of Geodesy
16461 \emph default
16462
16463 \family typewriter
16464 svjog.layout
16465 \family default
16466  â€” Martin Vermeer
16467 \end_layout
16468
16469 \begin_layout Itemize
16470
16471 \emph on
16472 Probability Theory and Related Fields
16473 \emph default
16474
16475 \family typewriter
16476 svprobth.layout
16477 \family default
16478  â€” Jean-Marc Lasgouttes
16479 \end_layout
16480
16481 \begin_layout Standard
16482 Add your own, it isn't so hard!
16483 \end_layout
16484
16485 \begin_layout Subsection
16486 Credits
16487 \end_layout
16488
16489 \begin_layout Standard
16490 These files are partly based on the older 
16491 \family typewriter
16492 ejour2.layout
16493 \family default
16494 , which was again based on a tinkered-with version of an old \SpecialChar LaTeX
16495  2.09 style
16496  file from Springer.
16497  All this, and the 
16498 \family typewriter
16499 ejour2
16500 \family default
16501  layout, are now defunct.
16502  Jean-Marc Lasgouttes helped out big in making me find my way around the
16503  \SpecialChar LyX
16504  layout file mechanism.
16505 \end_layout
16506
16507 \begin_layout Subsection
16508 Bugs
16509 \end_layout
16510
16511 \begin_layout Standard
16512 Probably.
16513  But probably less than in the old hacked-\SpecialChar LaTeX
16514  
16515 \family typewriter
16516 ejour2
16517 \family default
16518 .
16519 \end_layout
16520
16521 \begin_layout Section
16522 Slides [aka 
16523 \noun on
16524 Sli\SpecialChar TeX
16525
16526 \noun default
16527 ]
16528 \begin_inset CommandInset label
16529 LatexCommand label
16530 name "sec:slitex"
16531
16532 \end_inset
16533
16534
16535 \end_layout
16536
16537 \begin_layout Standard
16538 by 
16539 \noun on
16540 John Weiss
16541 \noun default
16542  
16543 \end_layout
16544
16545 \begin_layout Subsection
16546 Introduction
16547 \end_layout
16548
16549 \begin_layout Standard
16550 This section describes how to use \SpecialChar LyX
16551  to make slides for overhead projectors.
16552  There are two document classes that can do this: the default slides class
16553  and the 
16554 \family sans
16555 Foil\SpecialChar TeX
16556
16557 \family default
16558  slides class.
16559  This section documents the former.
16560 \end_layout
16561
16562 \begin_layout Standard
16563 I'm going to say this again, nice and clear, so that there's no misunderstanding
16564 :
16565 \end_layout
16566
16567 \begin_layout Standard
16568 \begin_inset VSpace bigskip
16569 \end_inset
16570
16571
16572 \end_layout
16573
16574 \begin_layout Standard
16575 \align center
16576
16577 \size large
16578 This section documents the class 
16579 \begin_inset Quotes eld
16580 \end_inset
16581
16582
16583 \family sans
16584 slides (default)
16585 \family default
16586
16587 \begin_inset Quotes erd
16588 \end_inset
16589
16590  
16591 \emph on
16592 only.
16593 \end_layout
16594
16595 \begin_layout Standard
16596 \begin_inset VSpace bigskip
16597 \end_inset
16598
16599
16600 \end_layout
16601
16602 \begin_layout Standard
16603 If you're looking for the documentation for 
16604 \begin_inset Quotes eld
16605 \end_inset
16606
16607
16608 \family sans
16609 slides (Foil\SpecialChar TeX
16610 )
16611 \family default
16612
16613 \begin_inset Quotes erd
16614 \end_inset
16615
16616 , check out section
16617 \begin_inset space ~
16618 \end_inset
16619
16620
16621 \begin_inset CommandInset ref
16622 LatexCommand ref
16623 reference "sec:foiltex"
16624
16625 \end_inset
16626
16627 .
16628  The 
16629 \family sans
16630 foils
16631 \family default
16632  class [
16633 \begin_inset Quotes eld
16634 \end_inset
16635
16636
16637 \family sans
16638 slides (Foil\SpecialChar TeX
16639 )
16640 \family default
16641
16642 \begin_inset Quotes erd
16643 \end_inset
16644
16645 ] is actually somewhat better than the default 
16646 \family sans
16647 slides
16648 \family default
16649  class,
16650 \begin_inset Foot
16651 status collapsed
16652
16653 \begin_layout Plain Layout
16654 \SpecialChar ldots
16655 or so I've been told repeatedly by its advocates.
16656  Having never used it, I have no idea if this claim is true or not.
16657 \end_layout
16658
16659 \end_inset
16660
16661  which this section documents.
16662 \end_layout
16663
16664 \begin_layout Standard
16665 This class is the \SpecialChar LaTeX2e
16666  improvement of the old 
16667 \noun on
16668 Sli\SpecialChar TeX
16669
16670 \noun default
16671  package.
16672  Every \SpecialChar LaTeX2e
16673  distribution includes this class [which I'll just refer to as 
16674 \begin_inset Quotes eld
16675 \end_inset
16676
16677
16678 \family sans
16679 slides
16680 \family default
16681
16682 \begin_inset Quotes erd
16683 \end_inset
16684
16685  from now on], so you're bound to have it.
16686  As I noted earlier, there are other classes, such as 
16687 \family sans
16688 foils
16689 \family default
16690 , which also produce slides for overhead projectors and do a better job
16691  at it.
16692  However, there are some things which 
16693 \family sans
16694 slides
16695 \family default
16696  can do which the others can't, such as generate overlays.
16697  Read on to learn more!
16698 \end_layout
16699
16700 \begin_layout Subsection
16701 Getting Started
16702 \begin_inset CommandInset label
16703 LatexCommand label
16704 name "sec:slidesetup"
16705
16706 \end_inset
16707
16708
16709 \end_layout
16710
16711 \begin_layout Standard
16712 Obviously, to use this document class, you need to select 
16713 \begin_inset Quotes eld
16714 \end_inset
16715
16716
16717 \family sans
16718 slides (default)
16719 \family default
16720
16721 \begin_inset Quotes erd
16722 \end_inset
16723
16724  from the class list in the 
16725 \family sans
16726 Document\SpecialChar menuseparator
16727 Settings
16728 \family default
16729  dialog.
16730  There are some other special things you should know about this class:
16731 \end_layout
16732
16733 \begin_layout Itemize
16734 Don't bother changing the options 
16735 \family sans
16736 Sides and Columns
16737 \family default
16738 .
16739  They're not supported by the 
16740 \family sans
16741 slides
16742 \family default
16743  class, anyways.
16744 \end_layout
16745
16746 \begin_layout Itemize
16747 The option 
16748 \family sans
16749 Page
16750 \begin_inset space ~
16751 \end_inset
16752
16753 style
16754 \family default
16755  behaves a bit differently for this class.
16756  The possible choices and what they do are as follows:
16757 \end_layout
16758
16759 \begin_deeper
16760 \begin_layout Description
16761
16762 \family sans
16763 plain
16764 \family default
16765  The final output contains page numbers in the lower right corner.
16766 \end_layout
16767
16768 \begin_layout Description
16769
16770 \family sans
16771 headings
16772 \family default
16773  Like 
16774 \family sans
16775 plain
16776 \family default
16777 , but also prints out any time markers you've put in.
16778  This is the default.
16779 \end_layout
16780
16781 \begin_layout Description
16782
16783 \family sans
16784 empty
16785 \family default
16786  The final output contains no page numbers, time markers, or alignment markers.
16787 \end_layout
16788
16789 \end_deeper
16790 \begin_layout Itemize
16791 The 
16792 \family sans
16793 slides
16794 \family default
16795  class has an extra option: 
16796 \family typewriter
16797 clock
16798 \family default
16799 .
16800  To use it, put 
16801 \begin_inset Quotes eld
16802 \end_inset
16803
16804
16805 \family typewriter
16806 clock
16807 \family default
16808
16809 \begin_inset Quotes erd
16810 \end_inset
16811
16812  in the extra class options.
16813 \end_layout
16814
16815 \begin_deeper
16816 \begin_layout Standard
16817 Using this options allows you to add time markers to 
16818 \family sans
16819 Note
16820 \family default
16821 s.
16822  See section
16823 \begin_inset space ~
16824 \end_inset
16825
16826
16827 \begin_inset CommandInset ref
16828 LatexCommand ref
16829 reference "sec:slideNote"
16830
16831 \end_inset
16832
16833  for more details.
16834 \end_layout
16835
16836 \end_deeper
16837 \begin_layout Standard
16838 You can also use the template file 
16839 \begin_inset Quotes eld
16840 \end_inset
16841
16842
16843 \family typewriter
16844 slides.lyx
16845 \family default
16846
16847 \begin_inset Quotes erd
16848 \end_inset
16849
16850  to automatically set up a document to use the 
16851 \family sans
16852 slides
16853 \family default
16854  class [using 
16855 \family sans
16856 File\SpecialChar menuseparator
16857 New
16858 \begin_inset space ~
16859 \end_inset
16860
16861 from
16862 \begin_inset space ~
16863 \end_inset
16864
16865 Template
16866 \family default
16867  to open your new document].
16868  The template file also contains some examples of the special paragraph
16869  environments used by this class.
16870  I'll describe those next.
16871 \end_layout
16872
16873 \begin_layout Subsection
16874 Paragraph Environments
16875 \end_layout
16876
16877 \begin_layout Subsubsection
16878 Supported Environments
16879 \end_layout
16880
16881 \begin_layout Standard
16882 The first thing you'll notice when you start up a new 
16883 \family sans
16884 slides
16885 \family default
16886  document is the font size and type: it's the equivalent of the size 
16887 \begin_inset Quotes eld
16888 \end_inset
16889
16890
16891 \family sans
16892 Largest
16893 \family default
16894
16895 \begin_inset Quotes erd
16896 \end_inset
16897
16898  in the 
16899 \family sans
16900 Sans
16901 \begin_inset space ~
16902 \end_inset
16903
16904 Serif
16905 \family default
16906  font.
16907  This is also what's used in the output.
16908  Think of this as a 
16909 \begin_inset Quotes eld
16910 \end_inset
16911
16912 visual cue
16913 \begin_inset Quotes erd
16914 \end_inset
16915
16916  to remind you that this is a slide.
16917  Your final slides will use a larger font; ergo, you'll have less space.
16918  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16919 \end_layout
16920
16921 \begin_layout Standard
16922 The next thing that becomes obvious is the changes to the paragraph environment
16923  pull-down box [at the far-left end of the toolbar].
16924  Most of the paragraph environments you're used to seeing are missing.
16925  There are also five new ones.
16926  That's because the 
16927 \family sans
16928 slides
16929 \family default
16930  class itself only supports certain paragraph environments:
16931 \end_layout
16932
16933 \begin_layout Itemize
16934
16935 \family sans
16936 Standard
16937 \end_layout
16938
16939 \begin_layout Itemize
16940
16941 \family sans
16942 Itemize
16943 \end_layout
16944
16945 \begin_layout Itemize
16946
16947 \family sans
16948 Enumerate
16949 \end_layout
16950
16951 \begin_layout Itemize
16952
16953 \family sans
16954 Description
16955 \end_layout
16956
16957 \begin_layout Itemize
16958
16959 \family sans
16960 List
16961 \end_layout
16962
16963 \begin_layout Itemize
16964
16965 \family sans
16966 Quotation
16967 \end_layout
16968
16969 \begin_layout Itemize
16970
16971 \family sans
16972 Quote
16973 \end_layout
16974
16975 \begin_layout Itemize
16976
16977 \family sans
16978 Verse
16979 \end_layout
16980
16981 \begin_layout Itemize
16982
16983 \family sans
16984 Caption
16985 \end_layout
16986
16987 \begin_layout Itemize
16988
16989 \family sans
16990 \SpecialChar LyX
16991 -Code
16992 \end_layout
16993
16994 \begin_layout Standard
16995 All of the other standard environments, including the section-heading environmen
16996 ts, aren't used in the 
16997 \family sans
16998 slides
16999 \family default
17000  class.
17001 \end_layout
17002
17003 \begin_layout Standard
17004 On the other hand, you'll notice the following new environments:
17005 \end_layout
17006
17007 \begin_layout Itemize
17008
17009 \family sans
17010 Slide
17011 \end_layout
17012
17013 \begin_layout Itemize
17014
17015 \family sans
17016 Overlay
17017 \end_layout
17018
17019 \begin_layout Itemize
17020
17021 \family sans
17022 Note
17023 \end_layout
17024
17025 \begin_layout Itemize
17026
17027 \family sans
17028 InvisibleText
17029 \end_layout
17030
17031 \begin_layout Itemize
17032
17033 \family sans
17034 VisibleText
17035 \end_layout
17036
17037 \begin_layout Standard
17038 These five are kind of quirky, due to a 
17039 \begin_inset Quotes eld
17040 \end_inset
17041
17042 feature
17043 \begin_inset Quotes erd
17044 \end_inset
17045
17046  in \SpecialChar LyX
17047 .
17048  You see, \SpecialChar LyX
17049  doesn't permit you to nest any other paragraph environment into
17050  an empty environment.
17051  Now, that's fine and dandy, but it means that you wouldn't be able to start
17052  a slide with anything except plain text.
17053  To deal with this, I've performed a little 
17054 \begin_inset Quotes eld
17055 \end_inset
17056
17057 \SpecialChar LaTeX
17058  magic.
17059 \begin_inset Quotes erd
17060 \end_inset
17061
17062  
17063 \end_layout
17064
17065 \begin_layout Subsubsection
17066 Quirks of the New Environments
17067 \begin_inset CommandInset label
17068 LatexCommand label
17069 name "sec:slideQuirk"
17070
17071 \end_inset
17072
17073
17074 \end_layout
17075
17076 \begin_layout Standard
17077 All five of the new paragraph environments are somewhat quirky due to inherent
17078  limitiations in the current version of \SpecialChar LyX
17079 .
17080  As I just mentioned, \SpecialChar LyX
17081  forbids environments that begin with another environment.
17082  To get around this, the 
17083 \family sans
17084 Slide
17085 \family default
17086  environment isn't a paragraph environment as described in the 
17087 \emph on
17088 User's Guide
17089 \emph default
17090 .
17091  
17092 \end_layout
17093
17094 \begin_layout Standard
17095 You should consider 
17096 \family sans
17097 Slide
17098 \family default
17099
17100 \family sans
17101 Overlay
17102 \family default
17103 , and 
17104 \family sans
17105 Note
17106 \family default
17107  to be 
17108 \begin_inset Quotes eld
17109 \end_inset
17110
17111 pseudo-environments.
17112 \begin_inset Quotes erd
17113 \end_inset
17114
17115  They look like a section heading or a 
17116 \begin_inset Quotes eld
17117 \end_inset
17118
17119
17120 \family sans
17121 Caption
17122 \family default
17123 ,
17124 \begin_inset Quotes erd
17125 \end_inset
17126
17127  but really begin a [and, if necessary, end the previous] paragraph environment.
17128  Likewise, treat 
17129 \family sans
17130 InvisibleText
17131 \family default
17132  and 
17133 \family sans
17134 VisibleText
17135 \family default
17136  as 
17137 \begin_inset Quotes eld
17138 \end_inset
17139
17140 pseudo-commands.
17141 \begin_inset Quotes erd
17142 \end_inset
17143
17144  These two perform some action.
17145 \end_layout
17146
17147 \begin_layout Standard
17148 A common feature of all five environments, 
17149 \family sans
17150 Slide
17151 \family default
17152
17153 \family sans
17154 Overlay
17155 \family default
17156
17157 \family sans
17158 Note
17159 \family default
17160
17161 \family sans
17162 InvisibleText
17163 \family default
17164  and 
17165 \family sans
17166 VisibleText
17167 \family default
17168 , is a rather long-ish label.
17169  The text following this label â€” ordinarily the contents of the paragraph
17170  environment â€” is utterly irrelevant for 
17171 \family sans
17172 Slide
17173 \family default
17174
17175 \family sans
17176 Overlay
17177 \family default
17178
17179 \family sans
17180 Note
17181 \family default
17182
17183 \family sans
17184 InvisibleText
17185 \family default
17186  and 
17187 \family sans
17188 VisibleText
17189 \family default
17190 .
17191  \SpecialChar LyX
17192  completely ignores it.
17193  In fact, you can leave these five environments completely empty.
17194  
17195 \end_layout
17196
17197 \begin_layout Standard
17198 While you don't 
17199 \emph on
17200 have
17201 \emph default
17202  to put any text after the rather long-ish label, you might want to.
17203  This could be a short description of the contents of the 
17204 \family sans
17205 Slide
17206 \family default
17207 , for example.
17208  In that case, enter your descriptive comment and hit 
17209 \family sans
17210 Return
17211 \family default
17212  as you normally would.
17213 \end_layout
17214
17215 \begin_layout Standard
17216 If, on the other hand, you don't want to enter any descriptive text, you'll
17217  hit another \SpecialChar LyX
17218  quirk.
17219  \SpecialChar LyX
17220 , like nature, abhors a vacuum, and will not let you start a new paragraph
17221  environment until you put something in the old one.
17222  So, do this:
17223 \end_layout
17224
17225 \begin_layout Itemize
17226 Start entering the text that will 
17227 \emph on
17228 follow
17229 \emph default
17230  the new 
17231 \family sans
17232 Slide
17233 \family default
17234
17235 \family sans
17236 Overlay
17237 \family default
17238
17239 \family sans
17240 Note
17241 \family default
17242
17243 \family sans
17244 InvisibleText
17245 \family default
17246  or 
17247 \family sans
17248 VisibleText
17249 \family default
17250 .
17251  
17252 \end_layout
17253
17254 \begin_layout Itemize
17255 Now move to the beginning of that paragraph.
17256  
17257 \end_layout
17258
17259 \begin_layout Itemize
17260 Next, hit 
17261 \family sans
17262 Return
17263 \family default
17264 .
17265  
17266 \end_layout
17267
17268 \begin_layout Itemize
17269 Finally, change this new, empty paragraph to a 
17270 \family sans
17271 Slide
17272 \family default
17273
17274 \family sans
17275 Overlay
17276 \family default
17277
17278 \family sans
17279 Note
17280 \family default
17281
17282 \family sans
17283 InvisibleText
17284 \family default
17285  or 
17286 \family sans
17287 VisibleText
17288 \family default
17289 .
17290  
17291 \end_layout
17292
17293 \begin_layout Standard
17294 Some future version of \SpecialChar LyX
17295  will, hopefully, resolve this quirkiness\SpecialChar ldots
17296
17297 \end_layout
17298
17299 \begin_layout Subsection
17300 Making a Presentation with 
17301 \family sans
17302 Slide
17303 \family default
17304
17305 \family sans
17306 Overlay
17307 \family default
17308  and 
17309 \family sans
17310 Note
17311 \end_layout
17312
17313 \begin_layout Subsubsection
17314 Using the 
17315 \family sans
17316 Slide
17317 \family default
17318  Environment
17319 \end_layout
17320
17321 \begin_layout Standard
17322 If you're expecting this section to teach you how to actually make a presentatio
17323 n, you'll be sorely disappointed.
17324  Naturally, I'll describe all of the ways the 
17325 \family sans
17326 slides
17327 \family default
17328  class can assist you in preparing the materials for a presentation.
17329  Filling in the contents, however, is up to you.
17330  [Then again, that 
17331 \emph on
17332 is
17333 \emph default
17334  the \SpecialChar LyX
17335  philosophy.]
17336 \end_layout
17337
17338 \begin_layout Standard
17339 Choosing the 
17340 \family sans
17341 Slide
17342 \family default
17343  environment [in the manner described in section
17344 \begin_inset space ~
17345 \end_inset
17346
17347
17348 \begin_inset CommandInset ref
17349 LatexCommand ref
17350 reference "sec:slideQuirk"
17351
17352 \end_inset
17353
17354 ] tells \SpecialChar LyX
17355  to begin a new slide [duh].
17356  The label for this environment/
17357 \begin_inset Quotes erd
17358 \end_inset
17359
17360 pseudo-command
17361 \begin_inset Quotes erd
17362 \end_inset
17363
17364  is an 
17365 \begin_inset Quotes eld
17366 \end_inset
17367
17368 ASCII line,
17369 \begin_inset Quotes erd
17370 \end_inset
17371
17372  in cool blue, followed by the label, 
17373 \begin_inset Quotes eld
17374 \end_inset
17375
17376 NewSlide:
17377 \begin_inset Quotes erd
17378 \end_inset
17379
17380 .
17381  Any text or paragraph environments that follow this one go on the new slide.
17382  It's that simple.
17383 \end_layout
17384
17385 \begin_layout Standard
17386 Slides are probably the only time you'll need to forcibly end pages in \SpecialChar LyX
17387
17388  (this can be specified in the 
17389 \family sans
17390 Paragraph Layout
17391 \family default
17392  dialog).
17393  In fact, you'll want to, once you finish entering the contents of one slide.
17394  If you've entered more text than can physically fit on a slide, the extra
17395  overflows onto a new slide.
17396  I don't recommend doing this, however, since the overflow slide won't have
17397  any page number on it.
17398  Furthermore, it may interfere with any 
17399 \family sans
17400 Overlay
17401 \family default
17402  you've made to accompany the oversized 
17403 \family sans
17404 Slide
17405 \family default
17406 .
17407 \end_layout
17408
17409 \begin_layout Standard
17410 The 
17411 \family sans
17412 Overlay
17413 \family default
17414  and 
17415 \family sans
17416 Note
17417 \family default
17418  environments work the same way as the 
17419 \family sans
17420 Slide
17421 \family default
17422  environment.
17423  They both create an 
17424 \begin_inset Quotes eld
17425 \end_inset
17426
17427 ASCII line
17428 \begin_inset Quotes erd
17429 \end_inset
17430
17431  followed by a label [
17432 \begin_inset Quotes eld
17433 \end_inset
17434
17435 NewOverlay:
17436 \begin_inset Quotes erd
17437 \end_inset
17438
17439  and 
17440 \begin_inset Quotes eld
17441 \end_inset
17442
17443 NewNote:
17444 \begin_inset Quotes erd
17445 \end_inset
17446
17447 , respectively].
17448  The color is a stunning magenta instead of blue, and the 
17449 \begin_inset Quotes eld
17450 \end_inset
17451
17452 ASCII line
17453 \begin_inset Quotes erd
17454 \end_inset
17455
17456  will look different, in style and in length.
17457  The label fonts of all three also differ from one another.
17458 \end_layout
17459
17460 \begin_layout Standard
17461 As with a 
17462 \family sans
17463 Slide
17464 \family default
17465 , if the contents of a 
17466 \family sans
17467 Note
17468 \family default
17469  or 
17470 \family sans
17471 Overlay
17472 \family default
17473  exceed the physical size of a slide or sheet of paper, the extra will overflow
17474  onto a new sheet.
17475  Again, you should avoid this.
17476  It defeats the whole purpose of 
17477 \family sans
17478 Note
17479 \family default
17480 s and 
17481 \family sans
17482 Overlay
17483 \family default
17484 s.
17485 \end_layout
17486
17487 \begin_layout Subsubsection
17488 Using 
17489 \family sans
17490 Overlay
17491 \family default
17492  with 
17493 \family sans
17494 Slide
17495 \end_layout
17496
17497 \begin_layout Standard
17498 The idea behind an 
17499 \family sans
17500 Overlay
17501 \family default
17502  is a slide that sits atop another slide.
17503  Perhaps you wish to discuss a figure on the main 
17504 \family sans
17505 Slide
17506 \family default
17507  before displaying the text associated with it.
17508  One way to accomplish this is tape a flap of dark paper over the part of
17509  the 
17510 \family sans
17511 Slide
17512 \family default
17513  you want to display later.
17514  This method fails, however, if you wish to overlap one graph with another,
17515  for example.
17516  You would then have to fumble while speaking to align the two separate,
17517  overlapping 
17518 \family sans
17519 Slide
17520 \family default
17521 s to align the two graphs.
17522  The use of an 
17523 \family sans
17524 Overlay
17525 \family default
17526  environment in both cases makes life much easier.
17527 \end_layout
17528
17529 \begin_layout Standard
17530 Each 
17531 \family sans
17532 Overlay
17533 \family default
17534  receives the page number of its 
17535 \begin_inset Quotes eld
17536 \end_inset
17537
17538 parent
17539 \begin_inset Quotes erd
17540 \end_inset
17541
17542  
17543 \family sans
17544 Slide
17545 \family default
17546 , appended by 
17547 \begin_inset Quotes eld
17548 \end_inset
17549
17550
17551 \family typewriter
17552 -a
17553 \family default
17554
17555 \begin_inset Quotes erd
17556 \end_inset
17557
17558 .
17559 \begin_inset Foot
17560 status collapsed
17561
17562 \begin_layout Plain Layout
17563 Presumably, mutliple 
17564 \family sans
17565 Overlay
17566 \family default
17567 s would have 
17568 \begin_inset Quotes eld
17569 \end_inset
17570
17571
17572 \family typewriter
17573 -a
17574 \family default
17575
17576 \begin_inset Quotes erd
17577 \end_inset
17578
17579
17580 \begin_inset Quotes eld
17581 \end_inset
17582
17583
17584 \family typewriter
17585 -b
17586 \family default
17587
17588 \begin_inset Quotes erd
17589 \end_inset
17590
17591
17592 \begin_inset Quotes eld
17593 \end_inset
17594
17595
17596 \family typewriter
17597 -c
17598 \family default
17599
17600 \begin_inset Quotes erd
17601 \end_inset
17602
17603 , etc.
17604 \begin_inset space ~
17605 \end_inset
17606
17607 appended to the page number of the parent 
17608 \family sans
17609 Slide
17610 \family default
17611 .
17612  
17613 \end_layout
17614
17615 \end_inset
17616
17617  Clearly, you want the contents of both the 
17618 \family sans
17619 Slide
17620 \family default
17621  and the 
17622 \family sans
17623 Overlay
17624 \family default
17625  to each fit on a single physical slide! You should probably consider an
17626  
17627 \family sans
17628 Overlay
17629 \family default
17630  as 
17631 \begin_inset Quotes eld
17632 \end_inset
17633
17634 part of
17635 \begin_inset Quotes erd
17636 \end_inset
17637
17638  a 
17639 \family sans
17640 Slide
17641 \family default
17642 .
17643  Indeed, the \SpecialChar LyX
17644  
17645 \family sans
17646 slides
17647 \family default
17648  class provides a visual cue for this: the label at the start of an 
17649 \family sans
17650 Overlay
17651 \family default
17652  is shorter than that at the start of a 
17653 \family sans
17654 Slide
17655 \family default
17656 .
17657  Lastly, when you generate printable output, you'll find alignment markers
17658  in all four corners of both the 
17659 \family sans
17660 Overlay
17661 \family default
17662  page and its parent 
17663 \family sans
17664 Slide
17665 \family default
17666 .
17667  These will assist you in lining up the two physical slides.
17668 \end_layout
17669
17670 \begin_layout Standard
17671 The major problem in overlaying two slides is aligning the contents of the
17672  two transparencies.
17673  How much space should you leave for that graph on the second slide? Worse
17674  still, what if you want a graph and a sentence on second slide, but there
17675  is text on the main transparency that goes in between them? You could try
17676  and insert vertical space of the right size.
17677  The better way is to use 
17678 \family sans
17679 InvisibleText
17680 \family default
17681  and 
17682 \family sans
17683 VisibleText
17684 \family default
17685 .
17686 \end_layout
17687
17688 \begin_layout Standard
17689 As their names imply, 
17690 \family sans
17691 InvisibleText
17692 \family default
17693  and 
17694 \family sans
17695 VisibleText
17696 \family default
17697  are two command-like paragraph environments that make all subsequent text
17698  invisible and visible, respectively.
17699  Note from section
17700 \begin_inset space ~
17701 \end_inset
17702
17703
17704 \begin_inset CommandInset ref
17705 LatexCommand ref
17706 reference "sec:slideQuirk"
17707
17708 \end_inset
17709
17710  that you don't place anything 
17711 \emph on
17712 into
17713 \emph default
17714  these two environments, however.
17715  When you create an 
17716 \family sans
17717 InvisibleText
17718 \family default
17719 , it inserts a centered, sky-blue label into the page reading 
17720 \begin_inset Quotes eld
17721 \end_inset
17722
17723 <Invisible Text Follows>
17724 \begin_inset Quotes erd
17725 \end_inset
17726
17727 .
17728  For paragraphs following this label, the parts of the 
17729 \family sans
17730 Slide
17731 \family default
17732  [or 
17733 \family sans
17734 Overlay
17735 \family default
17736 ; it doesn't matter which] where they would be contain instead blank space.
17737  
17738 \end_layout
17739
17740 \begin_layout Standard
17741 For 
17742 \family sans
17743 VisibleText
17744 \family default
17745 , the corresponding centered label is 
17746 \begin_inset Quotes eld
17747 \end_inset
17748
17749 <Visible Text Follows>
17750 \begin_inset Quotes erd
17751 \end_inset
17752
17753  in blazing green.
17754  Paragraphs following this label behave normally.
17755  Note that the beginning of a new 
17756 \family sans
17757 Slide
17758 \family default
17759
17760 \family sans
17761 Overlay
17762 \family default
17763 , or 
17764 \family sans
17765 Note
17766 \family default
17767  automatically shuts off an 
17768 \family sans
17769 InvisibleText
17770 \family default
17771 .
17772  It's therefore not necessary to use 
17773 \family sans
17774 VisibleText
17775 \family default
17776  at the end of a 
17777 \family sans
17778 Slide
17779 \family default
17780 .
17781 \end_layout
17782
17783 \begin_layout Standard
17784 By now, it should be obvious how to create overlay transparencies using
17785  the proper combination of 
17786 \family sans
17787 InvisibleText
17788 \family default
17789  and 
17790 \family sans
17791 VisibleText
17792 \family default
17793  on a 
17794 \family sans
17795 Slide
17796 \family default
17797  and 
17798 \family sans
17799 Overlay
17800 \family default
17801 :
17802 \end_layout
17803
17804 \begin_layout Enumerate
17805 Create a 
17806 \family sans
17807 Slide
17808 \family default
17809 , including everything that will appear on it, whether on the main slide
17810  or on the 
17811 \family sans
17812 Overlay
17813 \family default
17814 .
17815 \end_layout
17816
17817 \begin_layout Enumerate
17818 Before each figure or paragraph that will appear only on the 
17819 \family sans
17820 Overlay
17821 \family default
17822 , insert an 
17823 \family sans
17824 InvisibleText
17825 \family default
17826  environment.
17827  If necessary, insert a 
17828 \family sans
17829 VisibleText
17830 \family default
17831  environment after the 
17832 \family sans
17833 Overlay
17834 \family default
17835 -only text.
17836 \end_layout
17837
17838 \begin_layout Enumerate
17839 Start an 
17840 \family sans
17841 Overlay
17842 \family default
17843  immediately following the 
17844 \family sans
17845 Slide
17846 \family default
17847 .
17848 \end_layout
17849
17850 \begin_layout Enumerate
17851 Copy the contents of this 
17852 \family sans
17853 Slide
17854 \family default
17855  into the 
17856 \family sans
17857 Overlay
17858 \family default
17859 .
17860 \end_layout
17861
17862 \begin_layout Enumerate
17863 Within the 
17864 \family sans
17865 Overlay
17866 \family default
17867 , change all of the 
17868 \family sans
17869 InvisibleText
17870 \family default
17871  lines to 
17872 \family sans
17873 VisibleText
17874 \family default
17875  and vice-versa.
17876 \end_layout
17877
17878 \begin_layout Standard
17879 That's it.
17880  You've just made an 
17881 \family sans
17882 Overlay
17883 \family default
17884 .
17885 \end_layout
17886
17887 \begin_layout Standard
17888 There's one problem with the way I've designed the \SpecialChar LyX
17889  
17890 \family sans
17891 slides
17892 \family default
17893  class: you can't make text in the middle of a paragraph invisible, nor
17894  make text in the middle of an invisible paragraph visible again.
17895  To accomplish this feat, you'll need to use some inlined \SpecialChar LaTeX
17896  codes.
17897 \begin_inset Foot
17898 status collapsed
17899
17900 \begin_layout Plain Layout
17901 The commands of interest are: 
17902 \end_layout
17903
17904 \begin_layout Itemize
17905
17906 \family typewriter
17907 {
17908 \backslash
17909 invisible \SpecialChar ldots
17910  }
17911 \end_layout
17912
17913 \begin_layout Itemize
17914
17915 \family typewriter
17916 {
17917 \backslash
17918 visible \SpecialChar ldots
17919  }
17920 \end_layout
17921
17922 \begin_layout Plain Layout
17923 \SpecialChar ldots
17924 and need to be marked as \SpecialChar TeX
17925 .
17926  The text whose 
17927 \begin_inset Quotes eld
17928 \end_inset
17929
17930 visibility
17931 \begin_inset Quotes erd
17932 \end_inset
17933
17934  you wish to change goes in between the brackets [and after the 
17935 \family typewriter
17936
17937 \backslash
17938 invisible
17939 \family default
17940  or 
17941 \family typewriter
17942
17943 \backslash
17944 visible
17945 \family default
17946  command].
17947  If you don't know how to mark text as \SpecialChar TeX
17948 , see the appropriate section of
17949  the 
17950 \emph on
17951 User's Guide
17952 \emph default
17953 .
17954 \end_layout
17955
17956 \end_inset
17957
17958
17959 \end_layout
17960
17961 \begin_layout Subsubsection
17962 Using 
17963 \family sans
17964 Note
17965 \family default
17966  with 
17967 \family sans
17968 Slide
17969 \family default
17970
17971 \begin_inset CommandInset label
17972 LatexCommand label
17973 name "sec:slideNote"
17974
17975 \end_inset
17976
17977
17978 \end_layout
17979
17980 \begin_layout Standard
17981 Like an 
17982 \family sans
17983 Overlay
17984 \family default
17985 , a 
17986 \family sans
17987 Note
17988 \family default
17989  is associated with a 
17990 \begin_inset Quotes eld
17991 \end_inset
17992
17993 parent
17994 \begin_inset Quotes erd
17995 \end_inset
17996
17997  
17998 \family sans
17999 Slide
18000 \family default
18001 .
18002  Here, too, the \SpecialChar LyX
18003  
18004 \family sans
18005 slides
18006 \family default
18007  class provides visual cues.
18008  The label for a 
18009 \family sans
18010 Note
18011 \family default
18012  is shorter than that of a 
18013 \family sans
18014 Slide
18015 \family default
18016  [yet longer than that of an 
18017 \family sans
18018 Overlay
18019 \family default
18020 ] and, like the label of an 
18021 \family sans
18022 Overlay
18023 \family default
18024  is shockingly magenta.
18025  Additionally, the printed 
18026 \family sans
18027 Note
18028 \family default
18029  has the page number of its 
18030 \begin_inset Quotes eld
18031 \end_inset
18032
18033 parent
18034 \begin_inset Quotes erd
18035 \end_inset
18036
18037  
18038 \family sans
18039 Slide
18040 \family default
18041 , appended by 
18042 \begin_inset Quotes eld
18043 \end_inset
18044
18045
18046 \family typewriter
18047 -
18048 \family default
18049 1
18050 \begin_inset Quotes erd
18051 \end_inset
18052
18053
18054 \begin_inset Quotes eld
18055 \end_inset
18056
18057
18058 \family typewriter
18059 -
18060 \family default
18061 2
18062 \begin_inset Quotes erd
18063 \end_inset
18064
18065
18066 \begin_inset Quotes eld
18067 \end_inset
18068
18069
18070 \family typewriter
18071 -
18072 \family default
18073 3
18074 \begin_inset Quotes erd
18075 \end_inset
18076
18077 , etc.
18078  You can have multiple 
18079 \family sans
18080 Note
18081 \family default
18082 s associated with a single 
18083 \family sans
18084 Slide
18085 \family default
18086 , and, as with 
18087 \family sans
18088 Slide
18089 \family default
18090  and 
18091 \family sans
18092 Overlay
18093 \family default
18094 , you'll probably want to break up long 
18095 \family sans
18096 Note
18097 \family default
18098 s so that they fit on a single sheet of paper.
18099 \end_layout
18100
18101 \begin_layout Standard
18102 The purpose of a 
18103 \family sans
18104 Note
18105 \family default
18106  is obvious: it contains anything additional you might want to say about
18107  a 
18108 \family sans
18109 Slide
18110 \family default
18111 .
18112  It could also be used as a sheet of reminders for a particular 
18113 \family sans
18114 Slide
18115 \family default
18116 .
18117  In the case of the latter, you might want to make use of time markers.
18118  Currently, the \SpecialChar LyX
18119  
18120 \family sans
18121 slides
18122 \family default
18123  class has no 
18124 \begin_inset Quotes eld
18125 \end_inset
18126
18127 native
18128 \begin_inset Quotes erd
18129 \end_inset
18130
18131  support for time markers, a 
18132 \noun on
18133 Sli\SpecialChar TeX
18134
18135 \noun default
18136  feature.
18137  So, you'll have to resort to using the \SpecialChar LaTeX
18138  codes.
18139 \end_layout
18140
18141 \begin_layout Standard
18142 To use time markers, you'll need to specify the extra class option 
18143 \begin_inset Quotes eld
18144 \end_inset
18145
18146
18147 \family typewriter
18148 clock
18149 \family default
18150
18151 \begin_inset Quotes erd
18152 \end_inset
18153
18154  [see section
18155 \begin_inset space ~
18156 \end_inset
18157
18158
18159 \begin_inset CommandInset ref
18160 LatexCommand ref
18161 reference "sec:slidesetup"
18162
18163 \end_inset
18164
18165 ].
18166  This option turns on timing marks, which will appear in the lower-left-hand
18167  corner of every 
18168 \family sans
18169 Note
18170 \family default
18171  you generate.
18172  To set what appears in the time marker, you use the \SpecialChar LaTeX
18173  commands 
18174 \begin_inset Quotes eld
18175 \end_inset
18176
18177
18178 \family typewriter
18179
18180 \backslash
18181 settime{}
18182 \family default
18183
18184 \begin_inset Quotes erd
18185 \end_inset
18186
18187  and 
18188 \begin_inset Quotes eld
18189 \end_inset
18190
18191
18192 \family typewriter
18193
18194 \backslash
18195 addtime{}
18196 \family default
18197
18198 \begin_inset Quotes erd
18199 \end_inset
18200
18201 .
18202  The arguments of both commands are time measured in seconds.
18203  
18204 \begin_inset Quotes eld
18205 \end_inset
18206
18207
18208 \family typewriter
18209
18210 \backslash
18211 settime{}
18212 \family default
18213
18214 \begin_inset Quotes erd
18215 \end_inset
18216
18217  sets the time marker to a given time.
18218  
18219 \begin_inset Quotes eld
18220 \end_inset
18221
18222
18223 \family typewriter
18224
18225 \backslash
18226 addtime{}
18227 \family default
18228
18229 \begin_inset Quotes erd
18230 \end_inset
18231
18232  increments the time marker by the specified amount.
18233  Using time markers and 
18234 \family sans
18235 Note
18236 \family default
18237 s in this fashion, you can remind yourself how much time to spend on a particula
18238
18239 \family sans
18240 Slide
18241 \family default
18242 .
18243 \end_layout
18244
18245 \begin_layout Standard
18246 There's one last feature to describe.
18247  Clearly, you'd like to print out all of your 
18248 \family sans
18249 Slide
18250 \family default
18251 s and 
18252 \family sans
18253 Overlay
18254 \family default
18255 s on transparencies while printing all of your 
18256 \family sans
18257 Note
18258 \family default
18259 s on plain paper.
18260  However, a 
18261 \family sans
18262 Note
18263 \family default
18264  
18265 \emph on
18266 must
18267 \emph default
18268  follow the 
18269 \family sans
18270 Slide
18271 \family default
18272  with which it is associated.
18273  What's a person to do?
18274 \end_layout
18275
18276 \begin_layout Standard
18277 Luckily, there are two \SpecialChar LaTeX
18278  commands that allow you to select what to print
18279  out.
18280  Both must be placed into the preamble of your document.
18281  The command 
18282 \begin_inset Quotes eld
18283 \end_inset
18284
18285
18286 \family typewriter
18287
18288 \backslash
18289 onlyslides{
18290 \backslash
18291 slides}
18292 \family default
18293
18294 \begin_inset Quotes erd
18295 \end_inset
18296
18297  will cause the output to contain only the 
18298 \family sans
18299 Slide
18300 \family default
18301 s and 
18302 \family sans
18303 Overlay
18304 \family default
18305 s.
18306  Correspondingly, the command 
18307 \begin_inset Quotes eld
18308 \end_inset
18309
18310
18311 \family typewriter
18312
18313 \backslash
18314 onlynotes{
18315 \backslash
18316 notes}
18317 \family default
18318
18319 \begin_inset Quotes erd
18320 \end_inset
18321
18322  prevents the output of anything but 
18323 \family sans
18324 Note
18325 \family default
18326 s.
18327  I'd advise placing both commands in the preamble and initially comment
18328  both out.
18329  You can then preview your entire presentation as you write.
18330  When you're done writing, you can then uncomment one of the two to select
18331  what you want to print.
18332  I like to uncomment 
18333 \begin_inset Quotes eld
18334 \end_inset
18335
18336
18337 \family typewriter
18338
18339 \backslash
18340 onlyslides{
18341 \backslash
18342 slides}
18343 \family default
18344
18345 \begin_inset Quotes erd
18346 \end_inset
18347
18348  , print to a file with 
18349 \begin_inset Quotes eld
18350 \end_inset
18351
18352
18353 \family typewriter
18354 -slides
18355 \family default
18356
18357 \begin_inset Quotes erd
18358 \end_inset
18359
18360  in its name, comment it back out, then uncomment 
18361 \begin_inset Quotes eld
18362 \end_inset
18363
18364
18365 \family typewriter
18366
18367 \backslash
18368 onlynotes{
18369 \backslash
18370 notes}
18371 \family default
18372
18373 \begin_inset Quotes erd
18374 \end_inset
18375
18376  and print to a 
18377 \begin_inset Quotes eld
18378 \end_inset
18379
18380
18381 \family typewriter
18382 *-notes.ps
18383 \family default
18384
18385 \begin_inset Quotes erd
18386 \end_inset
18387
18388  file.
18389  I can then send either file to a printer, loading transparencies or plain
18390  paper as appropriate.
18391 \end_layout
18392
18393 \begin_layout Standard
18394 You can also provide other arguments to the 
18395 \begin_inset Quotes eld
18396 \end_inset
18397
18398
18399 \family typewriter
18400
18401 \backslash
18402 onlyslides{}
18403 \family default
18404
18405 \begin_inset Quotes erd
18406 \end_inset
18407
18408  and 
18409 \begin_inset Quotes eld
18410 \end_inset
18411
18412
18413 \family typewriter
18414
18415 \backslash
18416 onlynotes{}
18417 \family default
18418
18419 \begin_inset Quotes erd
18420 \end_inset
18421
18422  commands.
18423  See a good \SpecialChar LaTeX
18424  book for details.
18425 \end_layout
18426
18427 \begin_layout Subsection
18428 The 
18429 \family sans
18430 slides
18431 \family default
18432  Class Template File
18433 \end_layout
18434
18435 \begin_layout Standard
18436 I have also provided a template file, 
18437 \begin_inset Quotes eld
18438 \end_inset
18439
18440
18441 \family typewriter
18442 slides.lyx
18443 \family default
18444
18445 \begin_inset Quotes erd
18446 \end_inset
18447
18448 , with the 
18449 \family sans
18450 slides
18451 \family default
18452  class.
18453  To use it, begin your new presentation with 
18454 \family sans
18455 File\SpecialChar menuseparator
18456 New
18457 \begin_inset space ~
18458 \end_inset
18459
18460 from
18461 \begin_inset space ~
18462 \end_inset
18463
18464 Template
18465 \family default
18466 .
18467  Your new \SpecialChar LyX
18468  presentation file will contain an example 
18469 \family sans
18470 Slide
18471 \family default
18472  â€“ 
18473 \family sans
18474 Overlay
18475 \family default
18476  â€“ 
18477 \family sans
18478 Note
18479 \family default
18480  triplet.
18481  The 
18482 \family sans
18483 Slide
18484 \family default
18485  and 
18486 \family sans
18487 Overlay
18488 \family default
18489  additionally contain an example of the use of 
18490 \family sans
18491 InvisibleText
18492 \family default
18493  and 
18494 \family sans
18495 VisibleText
18496 \family default
18497 .
18498  Lastly, the preamble will contain:
18499 \end_layout
18500
18501 \begin_layout LyX-Code
18502 % Uncomment to print out only slides and overlays
18503 \end_layout
18504
18505 \begin_layout LyX-Code
18506 %
18507 \end_layout
18508
18509 \begin_layout LyX-Code
18510 %
18511 \backslash
18512 onlyslides{
18513 \backslash
18514 slides}
18515 \begin_inset Newline newline
18516 \end_inset
18517
18518  
18519 \end_layout
18520
18521 \begin_layout LyX-Code
18522 % Uncomment to print out only notes
18523 \end_layout
18524
18525 \begin_layout LyX-Code
18526 %
18527 \end_layout
18528
18529 \begin_layout LyX-Code
18530 %
18531 \backslash
18532 onlynotes{
18533 \backslash
18534 notes}
18535 \end_layout
18536
18537 \begin_layout Standard
18538 One final thing: I created this class to support the \SpecialChar LaTeX2e
18539  
18540 \begin_inset Quotes eld
18541 \end_inset
18542
18543
18544 \noun on
18545 Sli\SpecialChar TeX
18546
18547 \noun default
18548  emulation
18549 \begin_inset Quotes erd
18550 \end_inset
18551
18552  class, one of the built-in \SpecialChar LaTeX2e
18553  classes.
18554  Neither I nor the rest of the \SpecialChar LyX
18555  Team endorse or oppose the use of this built-in
18556  slide class.
18557  It's here if you want it or need it.
18558  There exist other \SpecialChar LaTeX2e
18559  classes for creating presentations, such as the 
18560 \family sans
18561 Foils
18562 \family default
18563  class [see section
18564 \begin_inset space ~
18565 \end_inset
18566
18567
18568 \begin_inset CommandInset ref
18569 LatexCommand ref
18570 reference "sec:foiltex"
18571
18572 \end_inset
18573
18574 ] or the 
18575 \begin_inset Quotes eld
18576 \end_inset
18577
18578
18579 \family typewriter
18580 seminar
18581 \family default
18582
18583 \begin_inset Quotes erd
18584 \end_inset
18585
18586  package [present on some \SpecialChar TeX
18587  distributions].
18588  The latter is not yet supported under \SpecialChar LyX
18589 .
18590 \begin_inset Foot
18591 status collapsed
18592
18593 \begin_layout Plain Layout
18594 Perhaps you can take on the task\SpecialChar ldots
18595
18596 \end_layout
18597
18598 \end_inset
18599
18600  I know nothing about these other classes.
18601  Try them out to see what sort of alternative they provide.
18602 \end_layout
18603
18604 \begin_layout Chapter
18605 \SpecialChar LyX
18606  Features needing Extra Software
18607 \end_layout
18608
18609 \begin_layout Section
18610 Checking \SpecialChar TeX
18611
18612 \end_layout
18613
18614 \begin_layout Standard
18615 by 
18616 \noun on
18617 Asger Alstrup
18618 \end_layout
18619
18620 \begin_layout Subsection
18621 Introduction
18622 \end_layout
18623
18624 \begin_layout Standard
18625 If you have the 
18626 \family typewriter
18627 chktex
18628 \family default
18629  program installed
18630 \begin_inset Foot
18631 status collapsed
18632
18633 \begin_layout Plain Layout
18634
18635 \family typewriter
18636 chktex
18637 \family default
18638  is not yet available when you are using the \SpecialChar LaTeX
18639  distribution MiK\SpecialChar TeX
18640 .
18641 \end_layout
18642
18643 \end_inset
18644
18645 , you'll find in the 
18646 \family sans
18647 Tools
18648 \family default
18649  menu the entry: 
18650 \family sans
18651 Check
18652 \begin_inset space ~
18653 \end_inset
18654
18655 TeX
18656 \family default
18657 .
18658  You can get 
18659 \family typewriter
18660 chktex
18661 \family default
18662  from CTAN,
18663 \begin_inset Newline newline
18664 \end_inset
18665
18666
18667 \begin_inset CommandInset href
18668 LatexCommand href
18669 target "https://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
18670 literal "false"
18671
18672 \end_inset
18673
18674 .
18675 \end_layout
18676
18677 \begin_layout Standard
18678 The 
18679 \family sans
18680 Chk\SpecialChar TeX
18681
18682 \family default
18683  package is a program that was written by 
18684 \begin_inset Flex Noun
18685 status collapsed
18686
18687 \begin_layout Plain Layout
18688 Jens T.
18689 \begin_inset space ~
18690 \end_inset
18691
18692 Berger Thielemann
18693 \end_layout
18694
18695 \end_inset
18696
18697  in frustration because some constructs in \SpecialChar LaTeX
18698  are sometimes non-intuitive,
18699  and easy to forget.
18700  The program runs over your \SpecialChar LaTeX
18701  file, checks the integrity of the file, and
18702  flags some common errors.
18703  In other technical words, it is 
18704 \family typewriter
18705 lint
18706 \family default
18707  for \SpecialChar LaTeX
18708 .
18709 \end_layout
18710
18711 \begin_layout Standard
18712 Well, what is a syntax checker doing in \SpecialChar LyX
18713  which is supposed to produce correct
18714  \SpecialChar LaTeX
18715  anyways? The answer is simple: Just as 
18716 \family typewriter
18717 Lint
18718 \family default
18719  not only checks the 
18720 \emph on
18721 syntax
18722 \emph default
18723  of C programs, but also does 
18724 \emph on
18725 semantic
18726 \emph default
18727  checks for type-errors, 
18728 \family sans
18729 Chk\SpecialChar TeX
18730
18731 \family default
18732  catches some common 
18733 \emph on
18734 typographic
18735 \emph default
18736  errors, in addition to the syntactical ones.
18737  Specifically, 
18738 \family sans
18739 Chk\SpecialChar TeX
18740
18741 \family default
18742  is capable of detecting several common errors, such as
18743 \end_layout
18744
18745 \begin_layout Itemize
18746 Ellipsis detection:
18747 \begin_inset Newline newline
18748 \end_inset
18749
18750 Use \SpecialChar ldots
18751  instead of ...
18752 \end_layout
18753
18754 \begin_layout Itemize
18755 No space in front of/after parenthesis:
18756 \begin_inset Newline newline
18757 \end_inset
18758
18759 ( wrong spacing )
18760 \end_layout
18761
18762 \begin_layout Itemize
18763 Enforcement of normal space after common abbreviations:
18764 \begin_inset Newline newline
18765 \end_inset
18766
18767 e.
18768 \begin_inset space \thinspace{}
18769 \end_inset
18770
18771 g.
18772 \begin_inset space \space{}
18773 \end_inset
18774
18775 is too wide spacing.
18776 \end_layout
18777
18778 \begin_layout Itemize
18779 Enforcement of end-of-sentence space when the last sentence ends with a
18780  capital letter:
18781 \begin_inset Newline newline
18782 \end_inset
18783
18784 This is a TEST.
18785  And this is wrong spacing.
18786 \end_layout
18787
18788 \begin_layout Itemize
18789 Space in front of labels and similar commands:
18790 \begin_inset Newline newline
18791 \end_inset
18792
18793 The label should stick right up to the text to avoid falling to a wrong
18794  page.
18795  
18796 \begin_inset CommandInset label
18797 LatexCommand label
18798 name "sec:chktex"
18799
18800 \end_inset
18801
18802  
18803 \begin_inset Foot
18804 status collapsed
18805
18806 \begin_layout Plain Layout
18807 This footnote is in danger of falling off to a wrong page
18808 \end_layout
18809
18810 \end_inset
18811
18812  The label is separated too much.
18813 \end_layout
18814
18815 \begin_layout Itemize
18816 Space in front of references, instead of hard spaces:
18817 \begin_inset Newline newline
18818 \end_inset
18819
18820 If you have bad luck, the text will break right between the referenced text
18821  and reference number, and that's a pity.
18822  See section 
18823 \begin_inset CommandInset ref
18824 LatexCommand ref
18825 reference "sec:chktex"
18826
18827 \end_inset
18828
18829 .
18830 \end_layout
18831
18832 \begin_layout Itemize
18833 Use of 
18834 \begin_inset Quotes eld
18835 \end_inset
18836
18837 x
18838 \begin_inset Quotes erd
18839 \end_inset
18840
18841  instead of 
18842 \begin_inset Formula $\times$
18843 \end_inset
18844
18845  between numbers:
18846 \begin_inset Newline newline
18847 \end_inset
18848
18849 2x2 looks cheap compared to 
18850 \begin_inset Formula $2\times2$
18851 \end_inset
18852
18853 .
18854 \end_layout
18855
18856 \begin_layout Standard
18857 and more \SpecialChar ldots
18858  It is an invaluable tool when you are 
18859 \begin_inset Quotes eld
18860 \end_inset
18861
18862 finishing up
18863 \begin_inset Quotes erd
18864 \end_inset
18865
18866  your document before printing, and you should run it right after the obligatory
18867  spelling check, and before you go fine tuning the typesetting.
18868 \end_layout
18869
18870 \begin_layout Subsection
18871 How to use it
18872 \end_layout
18873
18874 \begin_layout Standard
18875 If you have the program installed, usage is as simple as choosing 
18876 \family sans
18877 Tools\SpecialChar menuseparator
18878 Check
18879 \begin_inset space ~
18880 \end_inset
18881
18882 TeX
18883 \family default
18884 .
18885  This will make \SpecialChar LyX
18886  generate a \SpecialChar LaTeX
18887  file of your document, start 
18888 \family sans
18889 Chk\SpecialChar TeX
18890
18891 \family default
18892  to check it, and then make \SpecialChar LyX
18893  insert 
18894 \begin_inset Quotes eld
18895 \end_inset
18896
18897 error boxes
18898 \begin_inset Quotes erd
18899 \end_inset
18900
18901  with the warnings from 
18902 \family sans
18903 Chk\SpecialChar TeX
18904
18905 \family default
18906 , if there were any.
18907  The warnings will be placed close to the point of the mistake, and you
18908  can quickly find them by using the 
18909 \family sans
18910 Navigate\SpecialChar menuseparator
18911 Error
18912 \family default
18913  menu item, or the shortcut key 
18914 \family sans
18915 C-g
18916 \family default
18917  from the default 
18918 \family typewriter
18919 cua
18920 \family default
18921  bind file.
18922  Open the error boxes by clicking on them with the mouse, or use the shortcut
18923  key 
18924 \family sans
18925 C-i
18926 \family default
18927  from 
18928 \family typewriter
18929 cua
18930 \family default
18931  bindings, or the corresponding 
18932 \family sans
18933 C-o
18934 \family default
18935  for the alternate 
18936 \family typewriter
18937 emacs
18938 \family default
18939  bind file.
18940  Read the warning and correct the mistake, if it is a mistake.
18941  If you have trouble understanding what the warning is about, you can safely
18942  ignore it.
18943  Remember that there is a hidden layer between the document on screen and
18944  the technical details in invoking 
18945 \family sans
18946 Chk\SpecialChar TeX
18947
18948 \family default
18949 , and this gap can make some warnings seem arcane or just plain silly.
18950 \end_layout
18951
18952 \begin_layout Standard
18953 This document is an excellent testing bed for the feature, and it should
18954  provide quite a few warnings for you to fiddle with.
18955  Since computers are only so smart, expect most of the warnings to be false
18956  alarms, though.
18957 \end_layout
18958
18959 \begin_layout Subsection
18960 How to fine tune it
18961 \end_layout
18962
18963 \begin_layout Standard
18964 Sometimes, you'll find that 
18965 \family sans
18966 Chk\SpecialChar TeX
18967
18968 \family default
18969  makes more noise than suits your mood.
18970  Then you can choose not to use it, wait until your mood changes, or try
18971  to customize 
18972 \family sans
18973 Chk\SpecialChar TeX
18974
18975 \family default
18976  to get better along with you.
18977 \end_layout
18978
18979 \begin_layout Standard
18980 Although 
18981 \family sans
18982 Chk\SpecialChar TeX
18983
18984 \family default
18985  
18986 \emph on
18987 is
18988 \emph default
18989  very configurable and extensible, you should not expect to solve all problems
18990  with 
18991 \family sans
18992 Chk\SpecialChar TeX
18993
18994 \family default
18995  in \SpecialChar LyX
18996  this way.
18997  Since \SpecialChar LyX
18998  has to generate a somewhat special \SpecialChar LaTeX
18999  file to be able to match the
19000  line numbers from the 
19001 \family sans
19002 Chk\SpecialChar TeX
19003
19004 \family default
19005  output
19006 \begin_inset Foot
19007 status collapsed
19008
19009 \begin_layout Plain Layout
19010 You can inspect the specific output from 
19011 \family sans
19012 chktex
19013 \family default
19014  by using 
19015 \family sans
19016 Document\SpecialChar menuseparator
19017 \SpecialChar LaTeX
19018
19019 \begin_inset space ~
19020 \end_inset
19021
19022 Log
19023 \family default
19024  right after a 
19025 \family sans
19026 chktex
19027 \family default
19028  run.
19029 \end_layout
19030
19031 \end_inset
19032
19033  to the internal document structure, some of the warnings will not appear
19034  correctly.
19035  There are two things you can do about this:
19036 \end_layout
19037
19038 \begin_layout Itemize
19039 Fine tune the 
19040 \family sans
19041 Chk\SpecialChar TeX
19042
19043 \family default
19044  invocation command line in 
19045 \begin_inset Flex Noun
19046 status collapsed
19047
19048 \begin_layout Plain Layout
19049 Tools\SpecialChar menuseparator
19050 Preferences\SpecialChar menuseparator
19051 Output\SpecialChar menuseparator
19052 LaTeX\SpecialChar menuseparator
19053 CheckTeX command
19054 \end_layout
19055
19056 \end_inset
19057
19058 , or the global 
19059 \family sans
19060 Chk\SpecialChar TeX
19061
19062 \family default
19063  installation configuration file (usually with the file 
19064 \family typewriter
19065 chktexrc
19066 \family default
19067 ).
19068  See below to learn what warnings can be enabled and disabled on the command
19069  line.
19070 \end_layout
19071
19072 \begin_layout Itemize
19073 Export your document as a raw \SpecialChar LaTeX
19074  file using 
19075 \family sans
19076 File\SpecialChar menuseparator
19077 Export\SpecialChar menuseparator
19078 \SpecialChar LaTeX
19079
19080 \family default
19081  and run 
19082 \family typewriter
19083 chktex
19084 \family default
19085  manually on that.
19086  Invoked in this way, it can be a hassle to find the corresponding place
19087  in the document inside \SpecialChar LyX
19088 , but with a little patience, you should be able
19089  to do it.
19090 \end_layout
19091
19092 \begin_layout Standard
19093 Here follows the warning messages that can be enabled and disabled in 
19094 \family sans
19095 Preferences
19096 \family default
19097 .
19098  Use 
19099 \family typewriter
19100 -n#
19101 \family default
19102  to disable a warning, and 
19103 \family typewriter
19104 -w#
19105 \family default
19106  to enable a warning.
19107  The emphasized entries are disabled by default, because the default is
19108  "
19109 \family typewriter
19110 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
19111 \family default
19112 ".
19113 \end_layout
19114
19115 \begin_layout Standard
19116 Notice that you should only use the options that enable and disable warnings,
19117  because \SpecialChar LyX
19118  relies on some of the other command line parameters to be set
19119  in a specific way to have a chance to communicate with 
19120 \family typewriter
19121 chktex
19122 \family default
19123 .
19124 \end_layout
19125
19126 \begin_layout Enumerate
19127
19128 \size small
19129 \emph on
19130 Command terminated with space.
19131 \end_layout
19132
19133 \begin_layout Enumerate
19134
19135 \size small
19136 Non-breaking space (
19137 \begin_inset Quotes eld
19138 \end_inset
19139
19140
19141 \family typewriter
19142 ~
19143 \family default
19144
19145 \begin_inset Quotes erd
19146 \end_inset
19147
19148 ) should have been used.
19149 \end_layout
19150
19151 \begin_layout Enumerate
19152
19153 \size small
19154 \emph on
19155 You should enclose the previous parenthesis with 
19156 \begin_inset Quotes eld
19157 \end_inset
19158
19159
19160 \family typewriter
19161 {}
19162 \family default
19163
19164 \begin_inset Quotes erd
19165 \end_inset
19166
19167 .
19168 \end_layout
19169
19170 \begin_layout Enumerate
19171
19172 \size small
19173 Italic correction (
19174 \begin_inset Quotes eld
19175 \end_inset
19176
19177
19178 \family typewriter
19179
19180 \backslash
19181 /
19182 \family default
19183
19184 \begin_inset Quotes erd
19185 \end_inset
19186
19187 ) found in non-italic buffer.
19188 \end_layout
19189
19190 \begin_layout Enumerate
19191
19192 \size small
19193 Italic correction (
19194 \begin_inset Quotes eld
19195 \end_inset
19196
19197
19198 \family typewriter
19199
19200 \backslash
19201 /
19202 \family default
19203
19204 \begin_inset Quotes erd
19205 \end_inset
19206
19207 ) found more than once.
19208 \end_layout
19209
19210 \begin_layout Enumerate
19211
19212 \size small
19213 \emph on
19214 No italic correction (
19215 \begin_inset Quotes eld
19216 \end_inset
19217
19218
19219 \family typewriter
19220
19221 \backslash
19222 /
19223 \family default
19224
19225 \begin_inset Quotes erd
19226 \end_inset
19227
19228 ) found.
19229 \end_layout
19230
19231 \begin_layout Enumerate
19232
19233 \size small
19234 Accent command 
19235 \begin_inset Quotes eld
19236 \end_inset
19237
19238
19239 \family typewriter
19240 cmd
19241 \family default
19242
19243 \begin_inset Quotes erd
19244 \end_inset
19245
19246  needs use of 
19247 \begin_inset Quotes eld
19248 \end_inset
19249
19250
19251 \family typewriter
19252 cmd
19253 \family default
19254
19255 \begin_inset Quotes erd
19256 \end_inset
19257
19258 .
19259 \end_layout
19260
19261 \begin_layout Enumerate
19262
19263 \size small
19264 Wrong length of dash may have been used.
19265 \end_layout
19266
19267 \begin_layout Enumerate
19268
19269 \size small
19270 \emph on
19271 \begin_inset Quotes eld
19272 \end_inset
19273
19274
19275 \family typewriter
19276 %s
19277 \family default
19278
19279 \begin_inset Quotes erd
19280 \end_inset
19281
19282  expected, found 
19283 \begin_inset Quotes eld
19284 \end_inset
19285
19286
19287 \family typewriter
19288 %s
19289 \family default
19290
19291 \begin_inset Quotes erd
19292 \end_inset
19293
19294 .
19295 \end_layout
19296
19297 \begin_layout Enumerate
19298
19299 \size small
19300 Solo 
19301 \begin_inset Quotes eld
19302 \end_inset
19303
19304
19305 \family typewriter
19306 %s
19307 \family default
19308
19309 \begin_inset Quotes erd
19310 \end_inset
19311
19312  found.
19313 \end_layout
19314
19315 \begin_layout Enumerate
19316
19317 \size small
19318 You should use 
19319 \begin_inset Quotes eld
19320 \end_inset
19321
19322
19323 \family typewriter
19324 %s
19325 \family default
19326
19327 \begin_inset Quotes erd
19328 \end_inset
19329
19330  to achieve an ellipsis.
19331 \end_layout
19332
19333 \begin_layout Enumerate
19334
19335 \size small
19336 Inter-word spacing (
19337 \begin_inset Quotes eld
19338 \end_inset
19339
19340
19341 \family typewriter
19342
19343 \backslash
19344
19345 \family default
19346  
19347 \begin_inset Quotes eld
19348 \end_inset
19349
19350 ) should perhaps be used.
19351 \end_layout
19352
19353 \begin_layout Enumerate
19354
19355 \size small
19356 Inter-sentence spacing (
19357 \begin_inset Quotes eld
19358 \end_inset
19359
19360
19361 \family typewriter
19362
19363 \backslash
19364 @
19365 \family default
19366
19367 \begin_inset Quotes erd
19368 \end_inset
19369
19370 ) should perhaps be used.
19371 \end_layout
19372
19373 \begin_layout Enumerate
19374
19375 \size small
19376 Could not find argument for command.
19377 \end_layout
19378
19379 \begin_layout Enumerate
19380
19381 \size small
19382 No match found for 
19383 \begin_inset Quotes eld
19384 \end_inset
19385
19386
19387 \family typewriter
19388 %s
19389 \family default
19390
19391 \begin_inset Quotes erd
19392 \end_inset
19393
19394 .
19395 \end_layout
19396
19397 \begin_layout Enumerate
19398
19399 \size small
19400 Math mode still on at end of \SpecialChar LaTeX
19401  file.
19402 \end_layout
19403
19404 \begin_layout Enumerate
19405
19406 \size small
19407 Number of 
19408 \begin_inset Quotes eld
19409 \end_inset
19410
19411
19412 \family typewriter
19413 char
19414 \family default
19415
19416 \begin_inset Quotes erd
19417 \end_inset
19418
19419  doesn't match the number of 
19420 \begin_inset Quotes eld
19421 \end_inset
19422
19423
19424 \family typewriter
19425 char
19426 \family default
19427
19428 \begin_inset Quotes erd
19429 \end_inset
19430
19431 .
19432 \end_layout
19433
19434 \begin_layout Enumerate
19435
19436 \size small
19437 You should use either 
19438 \family typewriter
19439
19440 \begin_inset Quotes eld
19441 \end_inset
19442
19443
19444 \family default
19445  or 
19446 \family typewriter
19447
19448 \begin_inset Quotes erd
19449 \end_inset
19450
19451
19452 \family default
19453  as an alternative to 
19454 \begin_inset Quotes eld
19455 \end_inset
19456
19457
19458 \family typewriter
19459 "
19460 \family default
19461
19462 \begin_inset Quotes erd
19463 \end_inset
19464
19465 .
19466 \end_layout
19467
19468 \begin_layout Enumerate
19469
19470 \size small
19471 You should use "
19472 \family typewriter
19473 '
19474 \family default
19475 " (ASCII 39) instead of "
19476 \family typewriter
19477 ´
19478 \family default
19479 " (ASCII 180).
19480 \end_layout
19481
19482 \begin_layout Enumerate
19483
19484 \size small
19485 User-specified pattern found.
19486 \end_layout
19487
19488 \begin_layout Enumerate
19489
19490 \size small
19491 This command might not be intended.
19492 \end_layout
19493
19494 \begin_layout Enumerate
19495
19496 \size small
19497 \emph on
19498 Comment displayed.
19499 \end_layout
19500
19501 \begin_layout Enumerate
19502
19503 \size small
19504 Either 
19505 \family typewriter
19506 ''
19507 \backslash
19508 ,'
19509 \family default
19510  or 
19511 \family typewriter
19512 '
19513 \backslash
19514 ,''
19515 \family default
19516  will look better.
19517 \end_layout
19518
19519 \begin_layout Enumerate
19520
19521 \size small
19522 Delete this space to maintain correct page references.
19523 \end_layout
19524
19525 \begin_layout Enumerate
19526
19527 \size small
19528 \emph on
19529 You might wish to put this between a pair of 
19530 \begin_inset Quotes eld
19531 \end_inset
19532
19533
19534 \family typewriter
19535 {}
19536 \family default
19537
19538 \begin_inset Quotes erd
19539 \end_inset
19540
19541 .
19542 \end_layout
19543
19544 \begin_layout Enumerate
19545
19546 \size small
19547 You ought to remove spaces in front of punctuation.
19548 \end_layout
19549
19550 \begin_layout Enumerate
19551
19552 \size small
19553 Could not execute \SpecialChar LaTeX
19554  command.
19555 \end_layout
19556
19557 \begin_layout Enumerate
19558
19559 \size small
19560 Don't use 
19561 \family typewriter
19562
19563 \backslash
19564 /
19565 \family default
19566  in front of small punctuation.
19567 \end_layout
19568
19569 \begin_layout Enumerate
19570
19571 \family typewriter
19572 \size small
19573 $
19574 \backslash
19575 times$
19576 \family default
19577  may look prettier here.
19578 \end_layout
19579
19580 \begin_layout Enumerate
19581
19582 \size small
19583 \emph on
19584 Multiple spaces detected in output.
19585 \end_layout
19586
19587 \begin_layout Enumerate
19588
19589 \size small
19590 This text may be ignored.
19591 \end_layout
19592
19593 \begin_layout Enumerate
19594
19595 \size small
19596 Use 
19597 \family typewriter
19598
19599 \begin_inset Quotes eld
19600 \end_inset
19601
19602
19603 \family default
19604  to begin quotation, not 
19605 \family typewriter
19606 '
19607 \family default
19608 .
19609 \end_layout
19610
19611 \begin_layout Enumerate
19612
19613 \size small
19614 Use 
19615 \family typewriter
19616 '
19617 \family default
19618  to end quotation, not 
19619 \family typewriter
19620
19621 \begin_inset Quotes eld
19622 \end_inset
19623
19624
19625 \family default
19626 .
19627 \end_layout
19628
19629 \begin_layout Enumerate
19630
19631 \size small
19632 Don't mix quotes.
19633 \end_layout
19634
19635 \begin_layout Enumerate
19636
19637 \size small
19638 You should perhaps use 
19639 \begin_inset Quotes eld
19640 \end_inset
19641
19642
19643 \family typewriter
19644 cmd
19645 \family default
19646
19647 \begin_inset Quotes erd
19648 \end_inset
19649
19650  instead.
19651 \end_layout
19652
19653 \begin_layout Enumerate
19654
19655 \size small
19656 You should put a space in front of/after parenthesis.
19657 \end_layout
19658
19659 \begin_layout Enumerate
19660
19661 \size small
19662 You should avoid spaces in front of/after parenthesis.
19663 \end_layout
19664
19665 \begin_layout Enumerate
19666
19667 \size small
19668 \emph on
19669 You should not use punctuation in front of/after quotes.
19670 \end_layout
19671
19672 \begin_layout Enumerate
19673
19674 \size small
19675 Double space found.
19676 \end_layout
19677
19678 \begin_layout Enumerate
19679
19680 \size small
19681 You should put punctuation outside inner/inside display math mode.
19682 \end_layout
19683
19684 \begin_layout Enumerate
19685
19686 \size small
19687 You ought to not use primitive \SpecialChar TeX
19688  in \SpecialChar LaTeX
19689  code.
19690 \end_layout
19691
19692 \begin_layout Enumerate
19693
19694 \size small
19695 You should remove spaces in front of 
19696 \begin_inset Quotes eld
19697 \end_inset
19698
19699
19700 \family typewriter
19701 %s
19702 \family default
19703
19704 \begin_inset Quotes erd
19705 \end_inset
19706
19707
19708 \end_layout
19709
19710 \begin_layout Enumerate
19711
19712 \size small
19713 \begin_inset Quotes eld
19714 \end_inset
19715
19716
19717 \family typewriter
19718 %s
19719 \family default
19720
19721 \begin_inset Quotes erd
19722 \end_inset
19723
19724  is normally not followed by 
19725 \begin_inset Quotes eld
19726 \end_inset
19727
19728
19729 \family typewriter
19730 %c
19731 \family default
19732
19733 \begin_inset Quotes erd
19734 \end_inset
19735
19736 .
19737 \end_layout
19738
19739 \begin_layout Standard
19740 In later versions of \SpecialChar LyX
19741 , we hope to provide a more complete interface to this
19742  tool (and it's smaller cousin 
19743 \family typewriter
19744 lacheck
19745 \family default
19746 ) to exploit the full power of it.
19747  But it's not exactly useless as it is now: go try it on one of your existing
19748  documents of a certain length and be surprised.
19749 \end_layout
19750
19751 \begin_layout Section
19752 Version Control in \SpecialChar LyX
19753
19754 \end_layout
19755
19756 \begin_layout Standard
19757 by
19758 \noun on
19759  Lars Gullik Bjønnes 
19760 \noun default
19761 and 
19762 \noun on
19763 Pavel Sanda
19764 \end_layout
19765
19766 \begin_layout Subsection
19767 Introduction
19768 \end_layout
19769
19770 \begin_layout Standard
19771 \SpecialChar LyX
19772  supports some of the most basic RCS/CVS/SVN/GIT commands.
19773  If you need something a bit more sophisticated you will have to do that
19774  manually in a terminal.
19775 \end_layout
19776
19777 \begin_layout Standard
19778 Also note that CVS support is not as good as subversion support, so we advise
19779  using SVN instead.
19780  A good place to start learning Subversion is the SVN Book
19781 \begin_inset Foot
19782 status collapsed
19783
19784 \begin_layout Plain Layout
19785 \begin_inset CommandInset href
19786 LatexCommand href
19787 target "http://svnbook.red-bean.com/"
19788 literal "false"
19789
19790 \end_inset
19791
19792
19793 \end_layout
19794
19795 \end_inset
19796
19797 .
19798  In the case of RCS you should read 
19799 \begin_inset Quotes eld
19800 \end_inset
19801
19802 rcsintro
19803 \begin_inset Quotes erd
19804 \end_inset
19805
19806  (a man file, read it with 
19807 \family typewriter
19808 man rcsintro
19809 \family default
19810 ).
19811  This file describes all the basic features of RCS.
19812  You should especially notice the comment about a RCS directory, and the
19813  notion of a master RCS file (the file ending in 
19814 \family typewriter
19815 ,v
19816 \family default
19817 ).
19818 \end_layout
19819
19820 \begin_layout Standard
19821 Before you begin to use the version control features in \SpecialChar LyX
19822 , you should be
19823  familiar with RCS/CVS/SVN/GIT usage.
19824  The implementation in \SpecialChar LyX
19825  assumes a recent version of the GNU RCS or CVS/SVN
19826  package â€” no guarantees are made for older versions.
19827  Most of the log messages are not currently displayed after operations â€”
19828  you can check them in the Messages pane if you are unsure.
19829  Regular users of version control will appreciate the VC toolbar, which
19830  can be enabled via 
19831 \family sans
19832 View\SpecialChar menuseparator
19833 Toolbars\SpecialChar menuseparator
19834 Version
19835 \begin_inset space ~
19836 \end_inset
19837
19838 Control
19839 \family default
19840 .
19841 \end_layout
19842
19843 \begin_layout Standard
19844 For introducing your own external commands consult 
19845 \begin_inset Flex Code
19846 status collapsed
19847
19848 \begin_layout Plain Layout
19849 vc-command
19850 \end_layout
19851
19852 \end_inset
19853
19854  in the manual 
19855 \emph on
19856 \SpecialChar LyX
19857  Functions
19858 \emph default
19859 .
19860 \end_layout
19861
19862 \begin_layout Standard
19863 It is strongly recommended to store documents in uncompressed format if
19864  using version control (uncheck 
19865 \family sans
19866 Document\SpecialChar menuseparator
19867 Compressed
19868 \family default
19869  if it is checked): Uncompressed LyX documents are text files and therefore
19870  for merging two different versions by version control systems.
19871  Compressed LyX documents are binary files, which cannot be merged by version
19872  control systems.
19873 \end_layout
19874
19875 \begin_layout Subsection
19876 RCS commands in \SpecialChar LyX
19877
19878 \end_layout
19879
19880 \begin_layout Standard
19881 The following sections describe the RCS commands supported by \SpecialChar LyX
19882 .
19883  You can find them in the 
19884 \family sans
19885 File\SpecialChar menuseparator
19886 Version
19887 \begin_inset space ~
19888 \end_inset
19889
19890 Control
19891 \family default
19892  submenu.
19893  \SpecialChar LyX
19894  was tested against RCS 5.7/5.8.
19895 \end_layout
19896
19897 \begin_layout Subsubsection
19898
19899 \family sans
19900 Register
19901 \end_layout
19902
19903 \begin_layout Standard
19904 If your document is not under revision control, this is the only item shown
19905  in the menu.
19906  And if it is under revision control, the 
19907 \family sans
19908 Register
19909 \family default
19910  item is not visible.
19911  
19912 \end_layout
19913
19914 \begin_layout Standard
19915 This command registers your document with RCS (unless you are under the
19916  directory managed by CVS)\SpecialChar endofsentence
19917  You are asked interactively to supply an initial
19918  description of the document.
19919  The document is now set in Read-Only mode and you have to 
19920 \family sans
19921 Check
19922 \begin_inset space ~
19923 \end_inset
19924
19925 Out
19926 \begin_inset space ~
19927 \end_inset
19928
19929 For
19930 \begin_inset space ~
19931 \end_inset
19932
19933 Edit
19934 \family default
19935 , before making any changes to it.
19936  A document under revision control has a 
19937 \begin_inset Quotes eld
19938 \end_inset
19939
19940 [RCS:<version> <locker>]
19941 \begin_inset Quotes erd
19942 \end_inset
19943
19944  item tagged to the filename in the minibuffer.
19945 \end_layout
19946
19947 \begin_layout Standard
19948 RCS command that is run:
19949 \end_layout
19950
19951 \begin_layout LyX-Code
19952
19953 \family typewriter
19954 ci -q -u -i -t-"<initial description>" <file-name>
19955 \end_layout
19956
19957 \begin_layout Standard
19958 Read 
19959 \family typewriter
19960 man ci
19961 \family default
19962  to understand the switches.
19963  
19964 \end_layout
19965
19966 \begin_layout Subsubsection
19967
19968 \family sans
19969 Check In Changes
19970 \end_layout
19971
19972 \begin_layout Standard
19973 When you are finished editing a file, you check in your changes.
19974  When you do this, you are asked for a description of the changes.
19975  This is stored in the history log.
19976  The version number is bumped, your changes are applied to the master RCS
19977  file, the document is unlocked and set to Read-Only mode.
19978 \end_layout
19979
19980 \begin_layout Itemize
19981 RCS command: 
19982 \family typewriter
19983 ci -q -u -m"<description>" <file-name>
19984 \end_layout
19985
19986 \begin_layout Subsubsection
19987
19988 \family sans
19989 Check Out For Edit
19990 \end_layout
19991
19992 \begin_layout Standard
19993 By doing this you lock the document so that only you can edit it.
19994  This will also make the document Read-Write only for you.
19995  You will usually continue editing for a while and when you are finished
19996  you check in your changes.
19997  The status line is changed to reflect that you have locked the file.
19998 \end_layout
19999
20000 \begin_layout Itemize
20001 RCS command: 
20002 \family typewriter
20003 co -q -l <file-name>
20004 \end_layout
20005
20006 \begin_layout Subsubsection
20007
20008 \family sans
20009 Revert To Repository Version
20010 \end_layout
20011
20012 \begin_layout Standard
20013 This will discard all changes made to the document since the last check
20014  in.
20015  You get a warning before changes are discarded.
20016 \end_layout
20017
20018 \begin_layout Itemize
20019 RCS command: 
20020 \family typewriter
20021 co -f -u<version> <file-name>
20022 \end_layout
20023
20024 \begin_layout Subsubsection
20025
20026 \family sans
20027 Copy
20028 \end_layout
20029
20030 \begin_layout Standard
20031 This will create a copy of the current document.
20032  Since RCS does not support copy operations natively, the version history
20033  is not preserved, and the copy is added as a new file.
20034  It requires a clean document without any changes since the last checkin.
20035  You are asked for a file name and a description of the copy operation.
20036  After that the copy is created, both locally and in the repository.
20037  If the parent directories of the copied and original document differ, all
20038  relative paths of included files of the copy are adjusted (like in 
20039 \family sans
20040 File\SpecialChar menuseparator
20041 Save As
20042 \family default
20043 \SpecialChar ldots
20044 ).
20045  Finally, the copy is loaded instead of the original document.
20046 \end_layout
20047
20048 \begin_layout Labeling
20049 \labelwidthstring 00.00.0000
20050 RCS
20051 \begin_inset space ~
20052 \end_inset
20053
20054 commands: 
20055 \begin_inset space ~
20056 \end_inset
20057
20058
20059 \begin_inset Newline newline
20060 \end_inset
20061
20062 Copy 
20063 \begin_inset Flex Code
20064 status collapsed
20065
20066 \begin_layout Plain Layout
20067
20068 \family typewriter
20069 \begin_inset Quotes qld
20070 \end_inset
20071
20072 <file-name>
20073 \begin_inset Quotes qld
20074 \end_inset
20075
20076
20077 \end_layout
20078
20079 \end_inset
20080
20081  to 
20082 \begin_inset Flex Code
20083 status collapsed
20084
20085 \begin_layout Plain Layout
20086
20087 \family typewriter
20088 \begin_inset Quotes qld
20089 \end_inset
20090
20091 <new-file-name>
20092 \begin_inset Quotes qld
20093 \end_inset
20094
20095
20096 \end_layout
20097
20098 \end_inset
20099
20100
20101 \begin_inset Newline newline
20102 \end_inset
20103
20104
20105 \begin_inset Flex Code
20106 status collapsed
20107
20108 \begin_layout Plain Layout
20109 ci -q -u 
20110 \family typewriter
20111 -i 
20112 \begin_inset Quotes qld
20113 \end_inset
20114
20115 <new-file-name>
20116 \begin_inset Quotes qld
20117 \end_inset
20118
20119
20120 \end_layout
20121
20122 \end_inset
20123
20124
20125 \end_layout
20126
20127 \begin_layout Subsubsection
20128
20129 \family sans
20130 Undo Last Checkin
20131 \end_layout
20132
20133 \begin_layout Standard
20134 This makes as if the last check in never happened.
20135  No changes are made to the document loaded into \SpecialChar LyX
20136 , but the last version
20137  is removed from the master RCS file.
20138 \end_layout
20139
20140 \begin_layout Itemize
20141 RCS command: 
20142 \family typewriter
20143 rcs -o<version> <file-name>
20144 \end_layout
20145
20146 \begin_layout Subsubsection
20147
20148 \family sans
20149 Show History
20150 \end_layout
20151
20152 \begin_layout Standard
20153 This shows the complete history of the RCS document.
20154  The output of 
20155 \family typewriter
20156 rlog <file-name>
20157 \family default
20158  is shown in a browser.
20159  See 
20160 \family typewriter
20161 man rlog
20162 \family default
20163  for more info.
20164 \end_layout
20165
20166 \begin_layout Subsubsection
20167 Revision info
20168 \end_layout
20169
20170 \begin_layout Standard
20171 \SpecialChar LyX
20172  supports RCS version number, author name, date and time of last commit.
20173  All those are extracted from 
20174 \family typewriter
20175 rlog -r <file-name>
20176 \family default
20177 .
20178  See 
20179 \begin_inset CommandInset ref
20180 LatexCommand ref
20181 reference "subsec:VCS-Revision-Information"
20182
20183 \end_inset
20184
20185  for details.
20186 \end_layout
20187
20188 \begin_layout Subsection
20189 CVS commands in \SpecialChar LyX
20190
20191 \end_layout
20192
20193 \begin_layout Standard
20194 A subset of CVS operations is supported by \SpecialChar LyX
20195 .
20196  You can find the commands in the 
20197 \family sans
20198 File\SpecialChar menuseparator
20199 Version
20200 \begin_inset space ~
20201 \end_inset
20202
20203 Control
20204 \family default
20205  submenu.
20206  The version control system SVN is more powerful, so please use it instead
20207  of CVS if possible.
20208 \end_layout
20209
20210 \begin_layout Subsubsection
20211
20212 \family sans
20213 General CVS usage
20214 \end_layout
20215
20216 \begin_layout Standard
20217 If you start from scratch with CVS you have to create your repository and
20218  checkout the working copy with external tools.
20219  If you're using a client-server setup you may need to login before doing
20220  the first repository checkout.
20221 \end_layout
20222
20223 \begin_layout Standard
20224 If your documents are under revision control and others are using the same
20225  repository problems arise when different changes to the same document at
20226  the same location happen.
20227  Standard CVS repositories don't operate with a file locking mechanism.
20228  This may be surprising, but conflicts only occur if people disagree on
20229  the proper content of the same part of a document.
20230  So, if co-workers are used to communicate regularly, these conflicts occur
20231  rarely.
20232  If they don't communicate they have a fundamental problem anyway.
20233  Nevertheless some people like to work with so called 
20234 \begin_inset Quotes eld
20235 \end_inset
20236
20237 reserved checkouts
20238 \begin_inset Quotes erd
20239 \end_inset
20240
20241 .
20242  If they do so the working copy of all files is readonly when checked out
20243  first and the user starts editing after using a special command to make
20244  the working copy writable.
20245  When the changes are checked in the working copy returns to readonly state.
20246  With \SpecialChar LyX
20247  one has to edit the 
20248 \begin_inset Flex Code
20249 status collapsed
20250
20251 \begin_layout Plain Layout
20252 .cvsrc
20253 \end_layout
20254
20255 \end_inset
20256
20257  file and add the line 
20258 \begin_inset Flex Code
20259 status collapsed
20260
20261 \begin_layout Plain Layout
20262 cvs -r
20263 \end_layout
20264
20265 \end_inset
20266
20267  to work with reserved checkouts.
20268  The benefit is the possibility to see who is using a writable copy of some
20269  document.
20270  It's not guaranteed only one user makes a copy writable.
20271 \end_layout
20272
20273 \begin_layout Standard
20274 \SpecialChar LyX
20275  tries to guess if you're using reserved or non-reserved checkouts.
20276  If your working copy is readonly or it is writable and an additional copy
20277  of your document exists in the CVS/Base sub-directory a reserved otherwise
20278  a non-reserved checkout is assumed.
20279  When a reserved checkout is detected you have to use 
20280 \begin_inset Flex Noun
20281 status collapsed
20282
20283 \begin_layout Plain Layout
20284 Check Out
20285 \end_layout
20286
20287 \end_inset
20288
20289  to make your working copy writable if it's readonly.
20290  After doing so the 
20291 \begin_inset Flex Noun
20292 status collapsed
20293
20294 \begin_layout Plain Layout
20295 Check In
20296 \end_layout
20297
20298 \end_inset
20299
20300  operation is possible and that makes your working copy readonly again after
20301  transferring your changes to the repository.
20302 \end_layout
20303
20304 \begin_layout Standard
20305 More information about CVS can be found here 
20306 \begin_inset Flex URL
20307 status collapsed
20308
20309 \begin_layout Plain Layout
20310
20311 http://www.nongnu.org/cvs
20312 \end_layout
20313
20314 \end_inset
20315
20316  and here 
20317 \begin_inset Flex URL
20318 status collapsed
20319
20320 \begin_layout Plain Layout
20321
20322 http://ximbiot.com/cvs
20323 \end_layout
20324
20325 \end_inset
20326
20327 .
20328 \end_layout
20329
20330 \begin_layout Standard
20331 Read 
20332 \family typewriter
20333 man cvs
20334 \family default
20335  to understand the sub-commands and the switches mentioned below.
20336 \end_layout
20337
20338 \begin_layout Subsubsection
20339
20340 \family sans
20341 Register
20342 \end_layout
20343
20344 \begin_layout Standard
20345 If your document is not under revision control, this is the only item shown
20346  in the menu.
20347  And if it is under revision control, the 
20348 \family sans
20349 Register
20350 \family default
20351  item is not visible.
20352  
20353 \end_layout
20354
20355 \begin_layout Standard
20356 This command registers in CVS your document 
20357 \begin_inset Flex Strong
20358 status collapsed
20359
20360 \begin_layout Plain Layout
20361
20362 \emph on
20363 only
20364 \end_layout
20365
20366 \end_inset
20367
20368  in the case you have already the documents directory under CVS control
20369  (in particular 
20370 \family typewriter
20371 CVS/Entries
20372 \family default
20373  file exists).
20374  This means you have to create or checkout the archive by yourself using
20375  external tools.
20376  (In case you forget that step \SpecialChar LyX
20377  registers the document with RCS.)
20378 \end_layout
20379
20380 \begin_layout Standard
20381 Then you are asked interactively to supply an initial description of the
20382  document.
20383  Don't forget that registered file is not yet checked in.
20384 \end_layout
20385
20386 \begin_layout Standard
20387 CVS command that is run: 
20388 \family typewriter
20389 cvs -q add -m"<entered message>" "<file-name>"
20390 \end_layout
20391
20392 \begin_layout Standard
20393 The term 
20394 \family typewriter
20395 "<file-name>"
20396 \family default
20397  above and for all other CVS commands is an abbreviation for 
20398 \begin_inset Quotes eld
20399 \end_inset
20400
20401 change the current working directory to file location and use the file name
20402  without path component as argument
20403 \begin_inset Quotes erd
20404 \end_inset
20405
20406 .
20407 \end_layout
20408
20409 \begin_layout Subsubsection
20410
20411 \family sans
20412 Check In Changes
20413 \end_layout
20414
20415 \begin_layout Standard
20416 When you are finished editing a file, you commit your changes.
20417  When you do this and you had changed the document, you are asked for a
20418  description of the changes.
20419  After that changes are written to the repository.
20420  In case you didn't change the document and a reserved checkout is detected
20421  the reservation made on 
20422 \begin_inset Flex Noun
20423 status collapsed
20424
20425 \begin_layout Plain Layout
20426 Check Out
20427 \end_layout
20428
20429 \end_inset
20430
20431  is undone.
20432 \end_layout
20433
20434 \begin_layout Labeling
20435 \labelwidthstring 00.00.0000
20436 CVS
20437 \begin_inset space ~
20438 \end_inset
20439
20440 command: 
20441 \begin_inset space ~
20442 \end_inset
20443
20444
20445 \begin_inset Newline newline
20446 \end_inset
20447
20448
20449 \begin_inset Flex Code
20450 status collapsed
20451
20452 \begin_layout Plain Layout
20453 cvs 
20454 \family typewriter
20455 -q commit -m"<description>" "<file-name>"
20456 \end_layout
20457
20458 \end_inset
20459
20460  or
20461 \begin_inset Newline newline
20462 \end_inset
20463
20464
20465 \begin_inset Flex Code
20466 status collapsed
20467
20468 \begin_layout Plain Layout
20469 cvs -q unedit 
20470 \family typewriter
20471 "<file-name>"
20472 \end_layout
20473
20474 \end_inset
20475
20476
20477 \end_layout
20478
20479 \begin_layout Subsubsection
20480
20481 \family sans
20482 Check Out Changes
20483 \end_layout
20484
20485 \begin_layout Standard
20486 When you are sharing a repository with others, you may have to incorporate
20487  their changes into your working copy.
20488 \end_layout
20489
20490 \begin_layout Standard
20491 CVS command: 
20492 \family typewriter
20493 cvs -q update "<file-name>"
20494 \end_layout
20495
20496 \begin_layout Standard
20497 If a readonly checkout is detected the working copy is made writable and
20498  reserved.
20499 \end_layout
20500
20501 \begin_layout Standard
20502 CVS command: 
20503 \family typewriter
20504 cvs -q edit "<file-name>"
20505 \end_layout
20506
20507 \begin_layout Subsubsection
20508
20509 \family sans
20510 Revert To Repository Version
20511 \end_layout
20512
20513 \begin_layout Standard
20514 This will discard all changes made to the document since the last check
20515  in.
20516  You get a warning before changes are discarded.
20517  Firstly the file is deleted, secondly CVS update command is run.
20518 \end_layout
20519
20520 \begin_layout Standard
20521 CVS command: 
20522 \family typewriter
20523 cvs -q update "<file-name>"
20524 \end_layout
20525
20526 \begin_layout Standard
20527 If a reserved checkout is detected and the working copy has no changes only
20528  the reservation is undone.
20529 \end_layout
20530
20531 \begin_layout Standard
20532 CVS command: 
20533 \family typewriter
20534 cvs -q unedit "<file-name>"
20535 \end_layout
20536
20537 \begin_layout Subsubsection
20538
20539 \family sans
20540 Copy
20541 \end_layout
20542
20543 \begin_layout Standard
20544 This will create a copy of the current document.
20545  Since CVS does not support copy operations natively, the version history
20546  is not preserved, and the copy is added as a new file.
20547  It requires a clean document without any changes since the last checkin.
20548  You are asked for a file name and a description of the copy operation.
20549  After that the copy is created, both locally and in the repository.
20550  If the parent directories of the copied and original document differ, all
20551  relative paths of included files of the copy are adjusted (like in 
20552 \family sans
20553 File\SpecialChar menuseparator
20554 Save As
20555 \family default
20556 \SpecialChar ldots
20557 ).
20558  Finally, the copy is loaded instead of the original document.
20559 \end_layout
20560
20561 \begin_layout Labeling
20562 \labelwidthstring 00.00.0000
20563 CVS
20564 \begin_inset space ~
20565 \end_inset
20566
20567 commands: 
20568 \begin_inset space ~
20569 \end_inset
20570
20571
20572 \begin_inset Newline newline
20573 \end_inset
20574
20575 Copy 
20576 \begin_inset Flex Code
20577 status collapsed
20578
20579 \begin_layout Plain Layout
20580
20581 \family typewriter
20582 \lang ngerman
20583 "
20584 \lang english
20585 <file-name>
20586 \lang ngerman
20587 "
20588 \end_layout
20589
20590 \end_inset
20591
20592  to 
20593 \begin_inset Flex Code
20594 status collapsed
20595
20596 \begin_layout Plain Layout
20597
20598 \family typewriter
20599 \lang ngerman
20600 "
20601 \lang english
20602 <new-file-name>
20603 \lang ngerman
20604 "
20605 \end_layout
20606
20607 \end_inset
20608
20609
20610 \begin_inset Newline newline
20611 \end_inset
20612
20613
20614 \begin_inset Flex Code
20615 status collapsed
20616
20617 \begin_layout Plain Layout
20618 cvs -q add 
20619 \family typewriter
20620 \lang ngerman
20621 "
20622 \lang english
20623 <new-file-name>
20624 \lang ngerman
20625 "
20626 \end_layout
20627
20628 \end_inset
20629
20630
20631 \end_layout
20632
20633 \begin_layout Subsubsection
20634
20635 \family sans
20636 Rename
20637 \end_layout
20638
20639 \begin_layout Standard
20640 This will rename the current document.
20641  Since CVS does not support rename operations natively, the version history
20642  is not preserved, the renamed document is added as a new file, and the
20643  original document is deleted.
20644  It requires a clean document without any changes since the last checkin.
20645  You are asked for a file name and a description of the rename operation.
20646  After that the document is renamed, both locally and in the repository.
20647  If the parent directories of the new and old file names differ, all relative
20648  paths of included files are adjusted (like in 
20649 \family sans
20650 File\SpecialChar menuseparator
20651 Save As
20652 \family default
20653 \SpecialChar ldots
20654 ).
20655  Finally, the document is reloaded using the new name.
20656 \end_layout
20657
20658 \begin_layout Labeling
20659 \labelwidthstring 00.00.0000
20660 CVS
20661 \begin_inset space ~
20662 \end_inset
20663
20664 commands: 
20665 \begin_inset space ~
20666 \end_inset
20667
20668
20669 \begin_inset Newline newline
20670 \end_inset
20671
20672 Rename 
20673 \begin_inset Flex Code
20674 status collapsed
20675
20676 \begin_layout Plain Layout
20677
20678 \family typewriter
20679 \lang ngerman
20680 "
20681 \lang english
20682 <file-name>
20683 \lang ngerman
20684 "
20685 \end_layout
20686
20687 \end_inset
20688
20689  to 
20690 \begin_inset Flex Code
20691 status collapsed
20692
20693 \begin_layout Plain Layout
20694
20695 \family typewriter
20696 \lang ngerman
20697 "
20698 \lang english
20699 <new-file-name>
20700 \lang ngerman
20701 "
20702 \end_layout
20703
20704 \end_inset
20705
20706
20707 \begin_inset Newline newline
20708 \end_inset
20709
20710
20711 \begin_inset Flex Code
20712 status collapsed
20713
20714 \begin_layout Plain Layout
20715 cvs -q add 
20716 \family typewriter
20717 \lang ngerman
20718 "
20719 \lang english
20720 <new-file-name>
20721 \lang ngerman
20722 "
20723 \end_layout
20724
20725 \end_inset
20726
20727
20728 \begin_inset Newline newline
20729 \end_inset
20730
20731
20732 \begin_inset Flex Code
20733 status collapsed
20734
20735 \begin_layout Plain Layout
20736 cvs -q remove 
20737 \family typewriter
20738 \lang ngerman
20739 "
20740 \lang english
20741 <file-name>
20742 \lang ngerman
20743 "
20744 \end_layout
20745
20746 \end_inset
20747
20748
20749 \end_layout
20750
20751 \begin_layout Subsubsection
20752 Update of the local directory checkout from repository
20753 \end_layout
20754
20755 \begin_layout Standard
20756 Once your documents gets more complex, containing sub-documents and pictures,
20757  including external 
20758 \begin_inset Flex Code
20759 status collapsed
20760
20761 \begin_layout Plain Layout
20762 .tex
20763 \end_layout
20764
20765 \end_inset
20766
20767  files and so on using version control becomes more complicated.
20768  \SpecialChar LyX
20769  supports updating the whole tree in which resides the document.
20770  This become especially useful once you cooperate with people which neither
20771  have detailed knowledge about CVS usage nor they have ambition to commit
20772  additional material to the repository.
20773  You have to organize the files structure so that all external files are
20774  in the same directory or subdirectories of the document.
20775  It's good practice anyway to store multipart documents in an extra directory.
20776 \end_layout
20777
20778 \begin_layout Standard
20779 The 
20780 \begin_inset Flex Code
20781 status collapsed
20782
20783 \begin_layout Plain Layout
20784 Update local directory from repository
20785 \end_layout
20786
20787 \end_inset
20788
20789  command updates the whole directory.
20790  If local changes are detected user is warned before update starts.
20791  In case of merge conflicts both versions of the conflicting document parts
20792  are placed in the final document.
20793  You have to review and correct the result of the merge.
20794  You'll find the conflicts enclosed in pairs of 
20795 \begin_inset Flex Code
20796 status collapsed
20797
20798 \begin_layout Plain Layout
20799 <<<<<<<
20800 \end_layout
20801
20802 \end_inset
20803
20804  and 
20805 \begin_inset Flex Code
20806 status collapsed
20807
20808 \begin_layout Plain Layout
20809 >>>>>>>
20810 \end_layout
20811
20812 \end_inset
20813
20814  separated by 
20815 \begin_inset Flex Code
20816 status collapsed
20817
20818 \begin_layout Plain Layout
20819 =======
20820 \end_layout
20821
20822 \end_inset
20823
20824 .
20825  The first part is your version as before the update operation with the
20826  document name prepended.
20827  The second one is the repository version with the version number after
20828  the sequence of 
20829 \begin_inset Flex Code
20830 status collapsed
20831
20832 \begin_layout Plain Layout
20833 >
20834 \end_layout
20835
20836 \end_inset
20837
20838  signs.
20839 \end_layout
20840
20841 \begin_layout Labeling
20842 \labelwidthstring 00.00.0000
20843 CVS
20844 \begin_inset space ~
20845 \end_inset
20846
20847 commands: 
20848 \begin_inset space ~
20849 \end_inset
20850
20851
20852 \begin_inset Newline newline
20853 \end_inset
20854
20855
20856 \begin_inset Flex Code
20857 status collapsed
20858
20859 \begin_layout Plain Layout
20860 cd $path; cvs diff 
20861 \family typewriter
20862 "."
20863 \end_layout
20864
20865 \end_inset
20866
20867  (Ask if changes are detected.)
20868 \begin_inset Newline newline
20869 \end_inset
20870
20871
20872 \begin_inset Flex Code
20873 status collapsed
20874
20875 \begin_layout Plain Layout
20876 cd $path; cvs -q update 
20877 \family typewriter
20878 "."
20879 \end_layout
20880
20881 \end_inset
20882
20883
20884 \end_layout
20885
20886 \begin_layout Standard
20887 where 
20888 \begin_inset Flex Code
20889 status collapsed
20890
20891 \begin_layout Plain Layout
20892 $path
20893 \end_layout
20894
20895 \end_inset
20896
20897  stands for the path to the document.
20898 \end_layout
20899
20900 \begin_layout Subsubsection
20901
20902 \family sans
20903 Show History
20904 \end_layout
20905
20906 \begin_layout Standard
20907 This shows the complete history of the CVS document.
20908  The output of 
20909 \family typewriter
20910 cvs log "<file-name>"
20911 \family default
20912  is shown in a browser.
20913 \end_layout
20914
20915 \begin_layout Subsubsection
20916 Revision info
20917 \end_layout
20918
20919 \begin_layout Standard
20920 \SpecialChar LyX
20921  supports CVS version number, author name, date and time of last commit.
20922  All those are extracted from 
20923 \family typewriter
20924 cvs log -r <file-name>
20925 \family default
20926 .
20927  See 
20928 \begin_inset CommandInset ref
20929 LatexCommand ref
20930 reference "subsec:VCS-Revision-Information"
20931
20932 \end_inset
20933
20934  for details.
20935 \end_layout
20936
20937 \begin_layout Subsection
20938 SVN commands in \SpecialChar LyX
20939
20940 \end_layout
20941
20942 \begin_layout Standard
20943 SVN is now partially supported by \SpecialChar LyX
20944 .
20945  You can find the commands in the 
20946 \family sans
20947 File\SpecialChar menuseparator
20948 Version
20949 \begin_inset space ~
20950 \end_inset
20951
20952 Control
20953 \family default
20954  submenu.
20955  Please note that if you use password protected access to repository via
20956  ssh, you will be asked in terminal window.
20957  \SpecialChar LyX
20958  was tested against SVN 1.5, 1.6, 1.7 and 1.8
20959 \begin_inset Foot
20960 status collapsed
20961
20962 \begin_layout Plain Layout
20963 Most of the commands will work with 1.4 too, see 
20964 \begin_inset CommandInset ref
20965 LatexCommand ref
20966 reference "subsec:SVN-Repo-Update"
20967
20968 \end_inset
20969
20970 .
20971  There seems to be currently unresolved permissions problem under SVN 1.8
20972  with reverting changes when file is locked.
20973 \end_layout
20974
20975 \end_inset
20976
20977
20978 \end_layout
20979
20980 \begin_layout Subsubsection
20981
20982 \family sans
20983 Register
20984 \end_layout
20985
20986 \begin_layout Standard
20987 If your document is not under revision control, this is the only item shown
20988  in the menu.
20989  And if it is under revision control, the 
20990 \family sans
20991 Register
20992 \family default
20993  item is not visible.
20994 \end_layout
20995
20996 \begin_layout Standard
20997 This command registers in SVN your document ONLY in case you have already
20998  the documents directory under SVN control (in particular 
20999 \family typewriter
21000 .svn/entries
21001 \family default
21002  file exists).
21003  This means you have to checkout the archive by yourself.
21004 \end_layout
21005
21006 \begin_layout Standard
21007 Then you are asked interactively to supply an initial description of the
21008  document.
21009  Don't forget that registered file is not yet commited.
21010 \end_layout
21011
21012 \begin_layout Standard
21013 SVN command that is run: 
21014 \family typewriter
21015 svn add -q 
21016 \begin_inset Quotes qld
21017 \end_inset
21018
21019 <file-name>
21020 \begin_inset Quotes qld
21021 \end_inset
21022
21023
21024 \end_layout
21025
21026 \begin_layout Standard
21027 Read 
21028 \family typewriter
21029 man svn
21030 \family default
21031  to understand the switches.
21032 \end_layout
21033
21034 \begin_layout Subsubsection
21035
21036 \family sans
21037 Check In Changes
21038 \end_layout
21039
21040 \begin_layout Standard
21041 When you are finished editing a file, you commit your changes.
21042  When you do this, you are asked for a description of the changes.
21043  After that changes are commited.
21044 \end_layout
21045
21046 \begin_layout Standard
21047 SVN command:
21048 \begin_inset Foot
21049 status collapsed
21050
21051 \begin_layout Plain Layout
21052 In case locking is not enabled.
21053  See Section 
21054 \begin_inset CommandInset ref
21055 LatexCommand ref
21056 reference "subsec:SVN-File-Locking"
21057
21058 \end_inset
21059
21060 .
21061 \end_layout
21062
21063 \end_inset
21064
21065  
21066 \family typewriter
21067 svn commit -q -m"<description>" <file-name>
21068 \end_layout
21069
21070 \begin_layout Subsubsection
21071
21072 \family sans
21073 Check Out For Edit
21074 \end_layout
21075
21076 \begin_layout Standard
21077 Updates the changes of this file from the repository.
21078  Be sure you understand SVN merging and conflicts resolving before using
21079  this function, because all conflicts has to be resolved manually by you!
21080 \end_layout
21081
21082 \begin_layout Standard
21083 SVN command:
21084 \begin_inset Foot
21085 status collapsed
21086
21087 \begin_layout Plain Layout
21088 Ditto.
21089 \end_layout
21090
21091 \end_inset
21092
21093  
21094 \family typewriter
21095 svn update --non-interactive 
21096 \begin_inset Quotes qld
21097 \end_inset
21098
21099 <file-name>
21100 \begin_inset Quotes qld
21101 \end_inset
21102
21103
21104 \end_layout
21105
21106 \begin_layout Subsubsection
21107
21108 \family sans
21109 Revert To Repository Version
21110 \end_layout
21111
21112 \begin_layout Standard
21113 This will discard all changes made to the document since the last check
21114  in.
21115  You get a warning before changes are discarded.
21116 \end_layout
21117
21118 \begin_layout Standard
21119 SVN command: 
21120 \family typewriter
21121 svn revert -q 
21122 \begin_inset Quotes qld
21123 \end_inset
21124
21125 <file-name>
21126 \begin_inset Quotes qld
21127 \end_inset
21128
21129
21130 \end_layout
21131
21132 \begin_layout Subsubsection
21133
21134 \family sans
21135 Copy
21136 \end_layout
21137
21138 \begin_layout Standard
21139 This will create a copy of the current document including the version history.
21140  It requires a clean document without any changes since the last checkin.
21141  You are asked for a file name and a description of the copy operation.
21142  After that the copy is created, both locally and in the repository.
21143  If the parent directories of the copied and original document differ, all
21144  relative paths of included files of the copy are adjusted (like in 
21145 \family sans
21146 File\SpecialChar menuseparator
21147 Save As
21148 \family default
21149 \SpecialChar ldots
21150 ).
21151  Finally, the copy is loaded instead of the original document.
21152 \end_layout
21153
21154 \begin_layout Labeling
21155 \labelwidthstring 00.00.0000
21156 SVN
21157 \begin_inset space ~
21158 \end_inset
21159
21160 commands: 
21161 \begin_inset space ~
21162 \end_inset
21163
21164
21165 \begin_inset Newline newline
21166 \end_inset
21167
21168
21169 \begin_inset Flex Code
21170 status collapsed
21171
21172 \begin_layout Plain Layout
21173 svn copy -q 
21174 \family typewriter
21175
21176 \begin_inset Quotes qld
21177 \end_inset
21178
21179 <file-name>
21180 \begin_inset Quotes qld
21181 \end_inset
21182
21183  
21184 \begin_inset Quotes qld
21185 \end_inset
21186
21187 <new-file-name>
21188 \begin_inset Quotes qld
21189 \end_inset
21190
21191
21192 \end_layout
21193
21194 \end_inset
21195
21196
21197 \begin_inset Newline newline
21198 \end_inset
21199
21200
21201 \begin_inset Flex Code
21202 status collapsed
21203
21204 \begin_layout Plain Layout
21205 svn commit
21206 \end_layout
21207
21208 \end_inset
21209
21210
21211 \end_layout
21212
21213 \begin_layout Subsubsection
21214
21215 \family sans
21216 Rename
21217 \end_layout
21218
21219 \begin_layout Standard
21220 This will rename the current document including the version history.
21221  It requires a clean document without any changes since the last checkin.
21222  You are asked for a file name and a description of the rename operation.
21223  After that the document is renamed, both locally and in the repository.
21224  If the parent directories of the new and old file names differ, all relative
21225  paths of included files are adjusted (like in 
21226 \family sans
21227 File\SpecialChar menuseparator
21228 Save As
21229 \family default
21230 \SpecialChar ldots
21231 ).
21232  Finally, the document is reloaded using the new name.
21233 \end_layout
21234
21235 \begin_layout Labeling
21236 \labelwidthstring 00.00.0000
21237 SVN
21238 \begin_inset space ~
21239 \end_inset
21240
21241 commands: 
21242 \begin_inset space ~
21243 \end_inset
21244
21245
21246 \begin_inset Newline newline
21247 \end_inset
21248
21249
21250 \begin_inset Flex Code
21251 status collapsed
21252
21253 \begin_layout Plain Layout
21254 svn move -q 
21255 \family typewriter
21256
21257 \begin_inset Quotes qld
21258 \end_inset
21259
21260 <file-name>
21261 \begin_inset Quotes qld
21262 \end_inset
21263
21264  
21265 \begin_inset Quotes qld
21266 \end_inset
21267
21268 <new-file-name>
21269 \begin_inset Quotes qld
21270 \end_inset
21271
21272
21273 \end_layout
21274
21275 \end_inset
21276
21277
21278 \begin_inset Newline newline
21279 \end_inset
21280
21281
21282 \begin_inset Flex Code
21283 status collapsed
21284
21285 \begin_layout Plain Layout
21286 svn commit
21287 \end_layout
21288
21289 \end_inset
21290
21291
21292 \end_layout
21293
21294 \begin_layout Subsubsection
21295 \begin_inset CommandInset label
21296 LatexCommand label
21297 name "subsec:SVN-Repo-Update"
21298
21299 \end_inset
21300
21301 Update of the local directory checkout from repository
21302 \begin_inset Foot
21303 status collapsed
21304
21305 \begin_layout Plain Layout
21306 Note that this command will work only with subversion 
21307 \begin_inset Formula $\geqq1.5$
21308 \end_inset
21309
21310
21311 \end_layout
21312
21313 \end_inset
21314
21315
21316 \end_layout
21317
21318 \begin_layout Standard
21319 All the commands above have one shortcoming â€“ they deal with the current
21320  document only.
21321  Once your document contains pictures, includes external 
21322 \begin_inset Flex Code
21323 status collapsed
21324
21325 \begin_layout Plain Layout
21326 .tex
21327 \end_layout
21328
21329 \end_inset
21330
21331  files and so on administration becomes more complicated.
21332  \SpecialChar LyX
21333  now supports updating the whole tree in which resides the document
21334 \begin_inset Foot
21335 status collapsed
21336
21337 \begin_layout Plain Layout
21338 One need to organize the files structure so that all external files are
21339  in the same directory or subdirectories of the document.
21340  
21341 \end_layout
21342
21343 \end_inset
21344
21345 .
21346  This become especially useful once you cooperate with people which neither
21347  know about subversion management nor they have ambition to commit additional
21348  material to the repository.
21349  
21350 \end_layout
21351
21352 \begin_layout Standard
21353 \begin_inset Flex Code
21354 status collapsed
21355
21356 \begin_layout Plain Layout
21357 Update local directory from repository
21358 \end_layout
21359
21360 \end_inset
21361
21362  command updates the whole directory and in case of merge conflicts local
21363  version of the files are left, so no unintended data loss occurs.
21364  If local changes are detected user is warned before update starts.
21365 \end_layout
21366
21367 \begin_layout Labeling
21368 \labelwidthstring 00.00.0000
21369 SVN
21370 \begin_inset space ~
21371 \end_inset
21372
21373 commands: 
21374 \begin_inset space ~
21375 \end_inset
21376
21377
21378 \begin_inset Newline newline
21379 \end_inset
21380
21381
21382 \begin_inset Flex Code
21383 status collapsed
21384
21385 \begin_layout Plain Layout
21386 svn diff $path
21387 \end_layout
21388
21389 \end_inset
21390
21391  (Ask if changes are detected.)
21392 \begin_inset Newline newline
21393 \end_inset
21394
21395
21396 \begin_inset Flex Code
21397 status collapsed
21398
21399 \begin_layout Plain Layout
21400 svn update --accept mine-full $path
21401 \end_layout
21402
21403 \end_inset
21404
21405
21406 \end_layout
21407
21408 \begin_layout Standard
21409 where 
21410 \begin_inset Flex Code
21411 status collapsed
21412
21413 \begin_layout Plain Layout
21414 $path
21415 \end_layout
21416
21417 \end_inset
21418
21419  stands for the path to the document.
21420 \end_layout
21421
21422 \begin_layout Subsubsection
21423
21424 \family sans
21425 Show History
21426 \end_layout
21427
21428 \begin_layout Standard
21429 This shows the complete history of the SVN document.
21430  The output of 
21431 \family typewriter
21432 svn log 
21433 \begin_inset Quotes qld
21434 \end_inset
21435
21436 <file-name>
21437 \begin_inset Quotes qld
21438 \end_inset
21439
21440
21441 \family default
21442  is shown in a browser.
21443 \end_layout
21444
21445 \begin_layout Subsubsection
21446 File Locking
21447 \begin_inset CommandInset label
21448 LatexCommand label
21449 name "subsec:SVN-File-Locking"
21450
21451 \end_inset
21452
21453
21454 \end_layout
21455
21456 \begin_layout Standard
21457 The file exchange through various revision control systems brings the problem
21458  of merge conflicts in case two different users try to edit the same (parts
21459  of) document.
21460  When such a conflict happens it needs manual resolving and one reasonable
21461  alternative is to provide some kind of locking mechanism, which guarantees
21462  that only one user is allowed to edit file at the given time.
21463 \end_layout
21464
21465 \begin_layout Standard
21466 SVN has two such mechanisms to provide mutual exclusivity for file access
21467  â€“ locks and automatic setting of write permissions (see sec.
21468  
21469 \begin_inset CommandInset ref
21470 LatexCommand ref
21471 reference "subsec:Automatical-Locking-Property"
21472
21473 \end_inset
21474
21475 ) based on 
21476 \begin_inset Flex Code
21477 status collapsed
21478
21479 \begin_layout Plain Layout
21480 svn:needs-lock
21481 \end_layout
21482
21483 \end_inset
21484
21485  file svn property
21486 \begin_inset Foot
21487 status collapsed
21488
21489 \begin_layout Plain Layout
21490 \begin_inset Flex URL
21491 status open
21492
21493 \begin_layout Plain Layout
21494
21495 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
21496 \end_layout
21497
21498 \end_inset
21499
21500
21501 \end_layout
21502
21503 \end_inset
21504
21505 .
21506  If this property is detected for a given document \SpecialChar LyX
21507  starts to use SVN locks
21508  for document editing automatically and the whole check-in/out mechanism
21509  switches to the same regimen as for RCS.
21510  This in particular means there are two different modes of file use in \SpecialChar LyX
21511 :
21512 \end_layout
21513
21514 \begin_layout Itemize
21515 Unlocked state.
21516  The loaded file is in the read-only mode.
21517  For editing on needs to check-out.
21518  
21519 \emph on
21520 Check-out
21521 \emph default
21522  consists of updating from the repository and gaining write lock.
21523  If the lock is not possible to obtain, we remain in unlocked state.
21524 \end_layout
21525
21526 \begin_layout Itemize
21527 Locked state.
21528  The loaded file is in the 
21529 \begin_inset Quotes els
21530 \end_inset
21531
21532 normal
21533 \begin_inset Quotes ers
21534 \end_inset
21535
21536  edit mode.
21537  No other user is allowed to edit the file.
21538  
21539 \emph on
21540 Check-in
21541 \emph default
21542  consists of commiting changes and releasing write-lock.
21543  If no changes have been made to the document, no commit will be produced
21544 \begin_inset Foot
21545 status collapsed
21546
21547 \begin_layout Plain Layout
21548 Don't be puzzled by the fact that you will be asked for commit message anyway.
21549 \end_layout
21550
21551 \end_inset
21552
21553  and only the write-lock will be released.
21554 \end_layout
21555
21556 \begin_layout Standard
21557 SVN commands:
21558 \end_layout
21559
21560 \begin_layout Labeling
21561 \labelwidthstring 00.00.0000
21562 Check-in:
21563 \family typewriter
21564  svn commit -q -m"<description>" "<file-name>"
21565 \begin_inset Newline newline
21566 \end_inset
21567
21568 svn unlock "<file-name>"
21569 \end_layout
21570
21571 \begin_layout Labeling
21572 \labelwidthstring 00.00.0000
21573 Check-out: 
21574 \family typewriter
21575 svn update "<file-name>"
21576 \begin_inset Newline newline
21577 \end_inset
21578
21579 svn lock "<file-name>"
21580 \end_layout
21581
21582 \begin_layout Subsubsection
21583
21584 \family typewriter
21585 \begin_inset CommandInset label
21586 LatexCommand label
21587 name "subsec:Automatical-Locking-Property"
21588
21589 \end_inset
21590
21591
21592 \family default
21593 Automatic Locking Property
21594 \end_layout
21595
21596 \begin_layout Standard
21597 The above mentioned automatic setting of write permissions of the .lyx file
21598  can be set through
21599 \family sans
21600  File\SpecialChar menuseparator
21601 Version
21602 \begin_inset space ~
21603 \end_inset
21604
21605 Control\SpecialChar menuseparator
21606 Use Locking Property
21607 \family default
21608 .
21609  This command is active only when the file is not locked on the svn server
21610  (i.e.
21611  you need to check-out before proceeding).
21612 \end_layout
21613
21614 \begin_layout Labeling
21615 \labelwidthstring 00.00.0000
21616 SVN
21617 \begin_inset space ~
21618 \end_inset
21619
21620 commands:
21621 \end_layout
21622
21623 \begin_layout Labeling
21624 \labelwidthstring 00.00.0000
21625 Set:
21626 \family typewriter
21627  svn propset svn:needs-lock ON "<file-name>"
21628 \end_layout
21629
21630 \begin_layout Labeling
21631 \labelwidthstring 00.00.0000
21632 Unset: 
21633 \family typewriter
21634 svn propdel svn:needs-lock "<file-name>"
21635 \end_layout
21636
21637 \begin_layout Subsubsection
21638 \begin_inset CommandInset label
21639 LatexCommand label
21640 name "subsec:VCS-Revision-Information"
21641
21642 \end_inset
21643
21644 Revision Information in Documents
21645 \end_layout
21646
21647 \begin_layout Standard
21648 There are more possibilities how to activate revision information in our
21649  document.
21650 \end_layout
21651
21652 \begin_layout Itemize
21653 \SpecialChar LyX
21654  supports directly:
21655 \end_layout
21656
21657 \begin_deeper
21658 \begin_layout Itemize
21659 tree revision information (
21660 \begin_inset Flex Code
21661 status collapsed
21662
21663 \begin_layout Plain Layout
21664 vcs-tree-revision
21665 \end_layout
21666
21667 \end_inset
21668
21669 ).
21670  The result is the output of the 
21671 \begin_inset Flex Code
21672 status collapsed
21673
21674 \begin_layout Plain Layout
21675 svnversion
21676 \end_layout
21677
21678 \end_inset
21679
21680  command, the following table gives you an idea, how to read the results.
21681 \end_layout
21682
21683 \begin_layout Standard
21684 \align center
21685 \begin_inset Tabular
21686 <lyxtabular version="3" rows="6" columns="2">
21687 <features tabularvalignment="middle">
21688 <column alignment="left" valignment="top">
21689 <column alignment="left" valignment="top">
21690 <row>
21691 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
21692 \begin_inset Text
21693
21694 \begin_layout Plain Layout
21695
21696 \series bold
21697 Output
21698 \end_layout
21699
21700 \end_inset
21701 </cell>
21702 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
21703 \begin_inset Text
21704
21705 \begin_layout Plain Layout
21706
21707 \series bold
21708 Meaning
21709 \end_layout
21710
21711 \end_inset
21712 </cell>
21713 </row>
21714 <row>
21715 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
21716 \begin_inset Text
21717
21718 \begin_layout Plain Layout
21719 4123:4168
21720 \end_layout
21721
21722 \end_inset
21723 </cell>
21724 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
21725 \begin_inset Text
21726
21727 \begin_layout Plain Layout
21728 mixed revision working copy
21729 \end_layout
21730
21731 \end_inset
21732 </cell>
21733 </row>
21734 <row>
21735 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
21736 \begin_inset Text
21737
21738 \begin_layout Plain Layout
21739 4168M
21740 \end_layout
21741
21742 \end_inset
21743 </cell>
21744 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
21745 \begin_inset Text
21746
21747 \begin_layout Plain Layout
21748 modified working copy
21749 \end_layout
21750
21751 \end_inset
21752 </cell>
21753 </row>
21754 <row>
21755 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
21756 \begin_inset Text
21757
21758 \begin_layout Plain Layout
21759 4123S
21760 \end_layout
21761
21762 \end_inset
21763 </cell>
21764 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
21765 \begin_inset Text
21766
21767 \begin_layout Plain Layout
21768 switched working copy
21769 \end_layout
21770
21771 \end_inset
21772 </cell>
21773 </row>
21774 <row>
21775 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
21776 \begin_inset Text
21777
21778 \begin_layout Plain Layout
21779 4123P
21780 \end_layout
21781
21782 \end_inset
21783 </cell>
21784 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
21785 \begin_inset Text
21786
21787 \begin_layout Plain Layout
21788 partial working copy, from a sparse checkout
21789 \end_layout
21790
21791 \end_inset
21792 </cell>
21793 </row>
21794 <row>
21795 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
21796 \begin_inset Text
21797
21798 \begin_layout Plain Layout
21799 4123:4168MS
21800 \end_layout
21801
21802 \end_inset
21803 </cell>
21804 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
21805 \begin_inset Text
21806
21807 \begin_layout Plain Layout
21808 mixed revision, modified, switched working copy
21809 \end_layout
21810
21811 \end_inset
21812 </cell>
21813 </row>
21814 </lyxtabular>
21815
21816 \end_inset
21817
21818
21819 \end_layout
21820
21821 \begin_layout Itemize
21822 file revision information.
21823  The result comes from parsing the output of 
21824 \begin_inset Flex Code
21825 status collapsed
21826
21827 \begin_layout Plain Layout
21828 svn
21829 \begin_inset space ~
21830 \end_inset
21831
21832 info
21833 \begin_inset space ~
21834 \end_inset
21835
21836 --xml
21837 \begin_inset space ~
21838 \end_inset
21839
21840 file.lyx
21841 \end_layout
21842
21843 \end_inset
21844
21845 .
21846  Supported flags are:
21847 \end_layout
21848
21849 \begin_deeper
21850 \begin_layout Itemize
21851 version number of the last commit (
21852 \begin_inset Flex Code
21853 status collapsed
21854
21855 \begin_layout Plain Layout
21856 vcs-revision
21857 \end_layout
21858
21859 \end_inset
21860
21861 )
21862 \end_layout
21863
21864 \begin_layout Itemize
21865 author of the last commit (
21866 \begin_inset Flex Code
21867 status collapsed
21868
21869 \begin_layout Plain Layout
21870 vcs-author
21871 \end_layout
21872
21873 \end_inset
21874
21875 )
21876 \end_layout
21877
21878 \begin_layout Itemize
21879 date of the last commit (
21880 \begin_inset Flex Code
21881 status collapsed
21882
21883 \begin_layout Plain Layout
21884 vcs-date
21885 \end_layout
21886
21887 \end_inset
21888
21889 )
21890 \end_layout
21891
21892 \begin_layout Itemize
21893 time of the last commit (
21894 \begin_inset Flex Code
21895 status collapsed
21896
21897 \begin_layout Plain Layout
21898 vcs-time
21899 \end_layout
21900
21901 \end_inset
21902
21903 )
21904 \end_layout
21905
21906 \end_deeper
21907 \begin_layout Standard
21908 You can obtain this info via InsetInfo (e.g.
21909  
21910 \begin_inset Flex Code
21911 status collapsed
21912
21913 \begin_layout Plain Layout
21914 info-insert buffer vcs-date
21915 \end_layout
21916
21917 \end_inset
21918
21919 ).
21920  The information will be available only when you have the file stored under
21921  svn managment (i.e.
21922  the 
21923 \begin_inset Flex Code
21924 status collapsed
21925
21926 \begin_layout Plain Layout
21927 .svn
21928 \end_layout
21929
21930 \end_inset
21931
21932  directory is available with your document).
21933 \end_layout
21934
21935 \end_deeper
21936 \begin_layout Itemize
21937 Another—a hacking one—possibility is to use svn keywords
21938 \begin_inset Foot
21939 status collapsed
21940
21941 \begin_layout Plain Layout
21942 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
21943 \end_layout
21944
21945 \end_inset
21946
21947 .
21948  In short â€“ you set file keywords property (e.g.
21949  
21950 \family sans
21951 svn propset svn:keywords 'Rev' file.lyx
21952 \family default
21953 ) and then paste keyword \SpecialChar TeX
21954  code
21955 \begin_inset Foot
21956 status collapsed
21957
21958 \begin_layout Plain Layout
21959 This is an easy way how to ensure that \SpecialChar LyX
21960  won't break the line in the middle
21961  of keyword tag.
21962 \end_layout
21963
21964 \end_inset
21965
21966  tag in your document (e.g.
21967  
21968 \begin_inset Flex Code
21969 status collapsed
21970
21971 \begin_layout Plain Layout
21972 $Rev$
21973 \end_layout
21974
21975 \end_inset
21976
21977 ).
21978  This way svn client will automatically substitute revision number (e.g.
21979  
21980 \begin_inset Flex Code
21981 status collapsed
21982
21983 \begin_layout Plain Layout
21984 $Rev: 59 $
21985 \end_layout
21986
21987 \end_inset
21988
21989 ) after each update and commit.
21990  There are more problems with this approach.
21991  Firstly, the '$' character is used in \SpecialChar TeX
21992  world for math equations, so any
21993  occurence of math formula 
21994 \begin_inset Formula $Rev$
21995 \end_inset
21996
21997  become 
21998 \begin_inset Formula $Rev:59$
21999 \end_inset
22000
22001  in your \SpecialChar LyX
22002  document.
22003  Similarly for other keywords like Id, Date, Author, etc.
22004  Secondly svn output is dependent on your locales, so its very easy that
22005  svn would produce some problematic strings once Date is used.
22006  Thirdly you get the whole 'Rev: 59' string in your document instead of
22007  the plain number.
22008  Until subversion implements user's custom keywords it will be hard to use
22009  this approach reliably or let \SpecialChar LyX
22010  to support it directly.
22011 \end_layout
22012
22013 \begin_layout Subsection
22014 SVN and Windows Environment
22015 \end_layout
22016
22017 \begin_layout Quote
22018 My inclination is to say that if the user cannot figure out the command
22019  line operations on their own fairly quickly, they would be well advised
22020  to use TortoiseSVN.
22021  â€”P.
22022  A.
22023  Rubin
22024 \end_layout
22025
22026 \begin_layout Subsubsection
22027 Preparation
22028 \end_layout
22029
22030 \begin_layout Standard
22031 In addition to installing \SpecialChar LyX
22032 , and having access to a Subversion repository,
22033  the user will need to install the Subversion client program.
22034  A Windows installer for the client program is available from 
22035 \begin_inset CommandInset href
22036 LatexCommand href
22037 name "CollabNet"
22038 target "http://www.collab.net/nonav/downloads/subversion/"
22039 literal "false"
22040
22041 \end_inset
22042
22043 .
22044  The user may also want to install 
22045 \begin_inset CommandInset href
22046 LatexCommand href
22047 name "TortoiseSVN"
22048 target "http://tortoisesvn.tigris.org/"
22049 literal "false"
22050
22051 \end_inset
22052
22053 , which integrates Subversion operations into the context (rightclick) menu
22054  of Windows Explorer.
22055  Operations done outside \SpecialChar LyX
22056  will typically be more convenient using the Explorer
22057  context menu.
22058  Note that TortoiseSVN is not a replacement for the client program, which
22059  is what \SpecialChar LyX
22060  itself will use.
22061 \end_layout
22062
22063 \begin_layout Subsubsection
22064 Bringing a document under Subversion control
22065 \end_layout
22066
22067 \begin_layout Standard
22068 Before a \SpecialChar LyX
22069  document can be brought under version control in Subversion, its
22070  parent directory needs to be under version control.
22071  If the document is being added to a project already in the repository,
22072  this is accomplished by checking the project out to the directory where
22073  the new document will be placed.
22074  If the project itself is not yet under version control (for instance, if
22075  this document starts a new project), the directory must be imported into
22076  the repository.
22077  This is done outside \SpecialChar LyX
22078 .
22079  Both import and checkout are easily accomplished from the Explorer context
22080  menu using TortoiseSVN, or alternatively can be done using the command
22081  line client at a DOS prompt.
22082  The procedure for importing the project using TortoiseSVN is described
22083  below, assuming an existing repository and a new project being started
22084  in 
22085 \family typewriter
22086 C:
22087 \backslash
22088 new project
22089 \family default
22090 .
22091  For information on using the Subversion client program, run 
22092 \family typewriter
22093 svn --help 
22094 \family default
22095 in a DOS shell.
22096 \end_layout
22097
22098 \begin_layout Enumerate
22099 Locate 
22100 \family typewriter
22101 C:
22102 \backslash
22103 new project 
22104 \family default
22105 in Windows Explorer, right click it, and select 
22106 \family sans
22107 TortoiseSVN\SpecialChar menuseparator
22108 Repo-browser
22109 \family default
22110 .
22111  If necessary, adjust the URL for the repository, then click OK.
22112 \end_layout
22113
22114 \begin_layout Enumerate
22115 Right click the level of the repository under which you want to place the
22116  new project folder (typically the top level) and click 
22117 \family sans
22118 Create folder
22119 \family default
22120  Supply a name for the project folder and click OK.
22121  Add a message for the log file if desired, then click OK again.
22122  The new project folder should appear in the repository.
22123  Finally, click OK again to exit the repository browser.
22124 \end_layout
22125
22126 \begin_layout Enumerate
22127 Once again right click 
22128 \family typewriter
22129 C:
22130 \backslash
22131 new project
22132 \family default
22133 , this time selecting SVN Checkout\SpecialChar ldots
22134  Select the URL of the project folder
22135  you just created in the repository, and set the checkout directory to 
22136 \family typewriter
22137 C:
22138 \backslash
22139 new project.
22140
22141 \family default
22142  Click OK.
22143  You will be warned about a non-empty folder; click OK to proceed.
22144  You should now have a 
22145 \family typewriter
22146 .svn
22147 \family default
22148  directory under 
22149 \family typewriter
22150 C:
22151 \backslash
22152 new project.
22153 \end_layout
22154
22155 \begin_layout Enumerate
22156 Create or open your document in \SpecialChar LyX
22157  and click 
22158 \family sans
22159 File\SpecialChar menuseparator
22160 Version
22161 \begin_inset space ~
22162 \end_inset
22163
22164 Control\SpecialChar menuseparator
22165 Register.
22166  
22167 \family default
22168 Add a log message and click OK to commit the document to version control.
22169 \end_layout
22170
22171 \begin_layout Standard
22172 From this point onward, you should have full functionality in the 
22173 \family sans
22174 File\SpecialChar menuseparator
22175 Version
22176 \begin_inset space ~
22177 \end_inset
22178
22179 Control
22180 \family default
22181  menu.
22182  You also have the option of checking the document in and out, viewing its
22183  history, etc.
22184  using the TortoiseSVN context menu in Windows Explorer or the Subversion
22185  client program from a command prompt.
22186 \end_layout
22187
22188 \begin_layout Subsubsection
22189 SSH tunnel used with SVN under Windows
22190 \end_layout
22191
22192 \begin_layout Standard
22193 Compared with Linux setting up an svn client to communicate over ssh under
22194  Windows is a rather troublesome task.
22195  We will at least offer some hints how to setup the client side but prior
22196  knowledge about ssh and the Windows command line is needed, also be prepared
22197  for a great deal of frustration\SpecialChar ldots
22198
22199 \end_layout
22200
22201 \begin_layout Enumerate
22202 Get an svn client for windows, as described in the previous sections.
22203  When it is a fresh install run some svn command (e.g.
22204  
22205 \begin_inset Flex Code
22206 status collapsed
22207
22208 \begin_layout Plain Layout
22209 svn --version
22210 \end_layout
22211
22212 \end_inset
22213
22214 ) to create config files, which you will need to change later on.
22215 \end_layout
22216
22217 \begin_layout Enumerate
22218 Choose an ssh client for Windows.
22219  There are several possibilities, we will use the one from Putty tools
22220 \begin_inset Foot
22221 status collapsed
22222
22223 \begin_layout Plain Layout
22224 \begin_inset Flex URL
22225 status collapsed
22226
22227 \begin_layout Plain Layout
22228
22229 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
22230 \end_layout
22231
22232 \end_inset
22233
22234
22235 \end_layout
22236
22237 \end_inset
22238
22239 .
22240  You will need to set the connection up so that the client doesn't ask for
22241  any password from you.
22242  To keep things easy we will use only keys without any additional password
22243  protection etc.
22244 \end_layout
22245
22246 \begin_deeper
22247 \begin_layout Enumerate
22248 Generate keys by 
22249 \begin_inset Flex Code
22250 status collapsed
22251
22252 \begin_layout Plain Layout
22253 puttygen
22254 \end_layout
22255
22256 \end_inset
22257
22258 .
22259  Save your private .ppk key file and put the public one on the server side.
22260  If the SVN server runs on Linux, note that the format of the public key
22261  is not compatible with Linux openssh and you will need to direcly copy-paste
22262  the key from the 
22263 \begin_inset Quotes eld
22264 \end_inset
22265
22266
22267 \emph on
22268 Public key for pasting into OpenSSH authorized_keys file
22269 \emph default
22270 :
22271 \begin_inset Quotes erd
22272 \end_inset
22273
22274  edit field into the server's 
22275 \begin_inset Flex Code
22276 status collapsed
22277
22278 \begin_layout Plain Layout
22279 ~/.ssh/authorized_keys
22280 \end_layout
22281
22282 \end_inset
22283
22284  / 
22285 \begin_inset Flex Code
22286 status collapsed
22287
22288 \begin_layout Plain Layout
22289 authorized_keys2
22290 \end_layout
22291
22292 \end_inset
22293
22294  file.
22295 \end_layout
22296
22297 \begin_layout Enumerate
22298 Get the Putty's 
22299 \begin_inset Flex Code
22300 status collapsed
22301
22302 \begin_layout Plain Layout
22303 plink
22304 \end_layout
22305
22306 \end_inset
22307
22308 .
22309  In the SVN config file
22310 \begin_inset Foot
22311 status collapsed
22312
22313 \begin_layout Plain Layout
22314 Exact path depends on Windows version, usually somewhere around 
22315 \begin_inset Flex Code
22316 status collapsed
22317
22318 \begin_layout Plain Layout
22319 c:
22320 \backslash
22321 Documents and Settings
22322 \backslash
22323 user
22324 \backslash
22325 Application Data
22326 \backslash
22327 Subversion
22328 \backslash
22329 config
22330 \end_layout
22331
22332 \end_inset
22333
22334  / 
22335 \begin_inset Flex Code
22336 status collapsed
22337
22338 \begin_layout Plain Layout
22339 AppData
22340 \backslash
22341 Roaming
22342 \backslash
22343 Subversion
22344 \end_layout
22345
22346 \end_inset
22347
22348 .
22349 \end_layout
22350
22351 \end_inset
22352
22353 , section [tunnels], setup ssh command, e.g.
22354  
22355 \begin_inset Flex Code
22356 status collapsed
22357
22358 \begin_layout Plain Layout
22359 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
22360 \end_layout
22361
22362 \end_inset
22363
22364 .
22365 \begin_inset Foot
22366 status collapsed
22367
22368 \begin_layout Plain Layout
22369 It will usually take a lot of time to get exact command right and it depends
22370  on many things.
22371  For example do not have some remote server saved as a default session in
22372  Putty etc.
22373  If things fail, try to connect via plink without SVN first.
22374 \end_layout
22375
22376 \end_inset
22377
22378
22379 \end_layout
22380
22381 \end_deeper
22382 \begin_layout Enumerate
22383 Checkout the SVN archive, e.
22384 \begin_inset space \thinspace{}
22385 \end_inset
22386
22387 g.
22388 \begin_inset Newline newline
22389 \end_inset
22390
22391
22392 \begin_inset Flex Code
22393 status collapsed
22394
22395 \begin_layout Plain Layout
22396 svn co svn+ssh://user@server/repository_path
22397 \end_layout
22398
22399 \end_inset
22400
22401 .
22402 \end_layout
22403
22404 \begin_layout Subsubsection
22405 End-of-Line Conversions
22406 \end_layout
22407
22408 \begin_layout Standard
22409 When the collaborators are mixing Linux and Windows environments, \SpecialChar LyX
22410  will
22411  use different line endings inside the .lyx files.
22412  This is not a problem as far as \SpecialChar LyX
22413  functionality is concerned, but the commit
22414  diffs will be huge and merge-conflicts prone.
22415  Fortunately SVN itself knows
22416 \begin_inset Foot
22417 status collapsed
22418
22419 \begin_layout Plain Layout
22420 \begin_inset Flex URL
22421 status collapsed
22422
22423 \begin_layout Plain Layout
22424
22425 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
22426 \end_layout
22427
22428 \end_inset
22429
22430
22431 \end_layout
22432
22433 \end_inset
22434
22435  how to deal with CR/LF problems when switching .lyx files to the 
22436 \begin_inset Flex Code
22437 status collapsed
22438
22439 \begin_layout Plain Layout
22440 native
22441 \end_layout
22442
22443 \end_inset
22444
22445  mode.
22446 \begin_inset Foot
22447 status collapsed
22448
22449 \begin_layout Plain Layout
22450 For the lazy guys: 
22451 \begin_inset Flex Code
22452 status collapsed
22453
22454 \begin_layout Plain Layout
22455 svn propset svn:eol-style native FILE_NAME
22456 \end_layout
22457
22458 \end_inset
22459
22460
22461 \end_layout
22462
22463 \end_inset
22464
22465
22466 \end_layout
22467
22468 \begin_layout Subsection
22469 GIT commands in \SpecialChar LyX
22470
22471 \end_layout
22472
22473 \begin_layout Standard
22474 A minimal subset of GIT commands is now supported by \SpecialChar LyX
22475 .
22476  You can find the commands in the 
22477 \family sans
22478 File\SpecialChar menuseparator
22479 Version
22480 \begin_inset space ~
22481 \end_inset
22482
22483 Control
22484 \family default
22485  submenu.
22486  Please note that if you use password protected access to repository via
22487  ssh, you will be asked in terminal window.
22488  \SpecialChar LyX
22489  was tested against GIT 1.7.
22490 \begin_inset Foot
22491 status collapsed
22492
22493 \begin_layout Plain Layout
22494 Windows users please note that you need to ensure that git is on the path.
22495  This can be set from within \SpecialChar LyX
22496  at 
22497 \family sans
22498 Tools\SpecialChar menuseparator
22499 Preferences\SpecialChar menuseparator
22500 Paths\SpecialChar menuseparator
22501 PATH prefix
22502 \family default
22503 .
22504 \end_layout
22505
22506 \end_inset
22507
22508
22509 \end_layout
22510
22511 \begin_layout Standard
22512 One big difference of GIT and the other supported version control systems
22513  is the distributed nature of GIT: With traditional version control systems
22514  there is one central server which hosts the repository.
22515  Users commit their changes to the server, and get updates made by other
22516  users from it.
22517  With GIT, users commit to a local repository.
22518  The local repository can be synchronized with one or more remote repositories
22519  using the 
22520 \begin_inset Flex Code
22521 status collapsed
22522
22523 \begin_layout Plain Layout
22524 pull
22525 \end_layout
22526
22527 \end_inset
22528
22529  and 
22530 \begin_inset Flex Code
22531 status collapsed
22532
22533 \begin_layout Plain Layout
22534 push
22535 \end_layout
22536
22537 \end_inset
22538
22539  GIT commands.
22540  \SpecialChar LyX
22541  does not interact in any way with remote GIT repositories.
22542  It works exclusively with the local repository in a very similar way as
22543  with a central CVS or SVN repository.
22544  If you use remote GIT repositories you need to do the 
22545 \begin_inset Flex Code
22546 status collapsed
22547
22548 \begin_layout Plain Layout
22549 pull
22550 \end_layout
22551
22552 \end_inset
22553
22554  and 
22555 \begin_inset Flex Code
22556 status collapsed
22557
22558 \begin_layout Plain Layout
22559 push
22560 \end_layout
22561
22562 \end_inset
22563
22564  operations with your favourite GIT client.
22565 \end_layout
22566
22567 \begin_layout Subsubsection
22568
22569 \family sans
22570 Register
22571 \end_layout
22572
22573 \begin_layout Standard
22574 If your document is not under revision control, this is the only item shown
22575  in the menu.
22576  And if it is under revision control, the 
22577 \family sans
22578 Register
22579 \family default
22580  item is not visible.
22581 \end_layout
22582
22583 \begin_layout Standard
22584 This command registers in GIT your document ONLY in case you have already
22585  the documents directory under GIT control (in particular 
22586 \family typewriter
22587 .git/index
22588 \family default
22589  file exists).
22590  This means you have to checkout the archive by yourself.
22591 \end_layout
22592
22593 \begin_layout Standard
22594 Then you are asked interactively to supply an initial description of the
22595  document.
22596  Don't forget that registered file is not yet committed.
22597 \end_layout
22598
22599 \begin_layout Standard
22600 GIT command that is run: 
22601 \family typewriter
22602 git add 
22603 \begin_inset Quotes qld
22604 \end_inset
22605
22606 <file-name>
22607 \begin_inset Quotes qld
22608 \end_inset
22609
22610
22611 \end_layout
22612
22613 \begin_layout Standard
22614 Read 
22615 \family typewriter
22616 man git
22617 \family default
22618  to understand the switches.
22619 \end_layout
22620
22621 \begin_layout Subsubsection
22622
22623 \family sans
22624 Check In Changes
22625 \end_layout
22626
22627 \begin_layout Standard
22628 When you are finished editing a file, you commit your changes.
22629  When you do this, you are asked for a description of the changes.
22630  After that changes are committed.
22631 \end_layout
22632
22633 \begin_layout Standard
22634 GIT command: 
22635 \family typewriter
22636 git commit -q -m"<description>" <file-name>
22637 \end_layout
22638
22639 \begin_layout Subsubsection
22640
22641 \family sans
22642 Revert To Repository Version
22643 \end_layout
22644
22645 \begin_layout Standard
22646 This will discard all changes made to the document since the last check
22647  in.
22648  You get a warning before changes are discarded.
22649 \end_layout
22650
22651 \begin_layout Standard
22652 GIT command: 
22653 \family typewriter
22654 git checkout -q 
22655 \begin_inset Quotes qld
22656 \end_inset
22657
22658 <file-name>
22659 \begin_inset Quotes qld
22660 \end_inset
22661
22662
22663 \end_layout
22664
22665 \begin_layout Subsubsection
22666
22667 \family sans
22668 Rename
22669 \end_layout
22670
22671 \begin_layout Standard
22672 This will rename the current document including the version history.
22673  It requires a clean document without any changes since the last checkin.
22674  You are asked for a file name and a description of the rename operation.
22675  After that the document is renamed, both locally and in the repository.
22676  If the parent directories of the new and old file names differ, all relative
22677  paths of included files are adjusted (like in 
22678 \family sans
22679 File\SpecialChar menuseparator
22680 Save As
22681 \family default
22682 \SpecialChar ldots
22683 ).
22684  Finally, the document is reloaded using the new name.
22685 \end_layout
22686
22687 \begin_layout Labeling
22688 \labelwidthstring 00.00.0000
22689 GIT
22690 \begin_inset space ~
22691 \end_inset
22692
22693 commands: 
22694 \begin_inset space ~
22695 \end_inset
22696
22697
22698 \begin_inset Newline newline
22699 \end_inset
22700
22701
22702 \begin_inset Flex Code
22703 status collapsed
22704
22705 \begin_layout Plain Layout
22706 git mv 
22707 \family typewriter
22708
22709 \begin_inset Quotes qld
22710 \end_inset
22711
22712 <file-name>
22713 \begin_inset Quotes qld
22714 \end_inset
22715
22716  
22717 \begin_inset Quotes qld
22718 \end_inset
22719
22720 <new-file-name>
22721 \begin_inset Quotes qld
22722 \end_inset
22723
22724
22725 \end_layout
22726
22727 \end_inset
22728
22729
22730 \begin_inset Newline newline
22731 \end_inset
22732
22733
22734 \begin_inset Flex Code
22735 status collapsed
22736
22737 \begin_layout Plain Layout
22738 git commit
22739 \end_layout
22740
22741 \end_inset
22742
22743
22744 \end_layout
22745
22746 \begin_layout Subsubsection
22747
22748 \family sans
22749 Show History
22750 \end_layout
22751
22752 \begin_layout Standard
22753 This shows the complete history of the GIT document.
22754  The output of 
22755 \family typewriter
22756 git log 
22757 \begin_inset Quotes qld
22758 \end_inset
22759
22760 <file-name>
22761 \begin_inset Quotes qld
22762 \end_inset
22763
22764
22765 \family default
22766  is shown in a browser.
22767 \end_layout
22768
22769 \begin_layout Subsubsection
22770 Version Info
22771 \end_layout
22772
22773 \begin_layout Standard
22774 \SpecialChar LyX
22775  supports GIT hash number of the last commit to the file, author name, date
22776  and time of last commit.
22777  All those are extracted from 
22778 \family typewriter
22779 git log -n 1 --pretty=format:%H%n%an%n%ai
22780 \family default
22781 .
22782  Tree version information is obtained via 
22783 \family typewriter
22784 git describe --abbrev --dirty --long
22785 \family default
22786 .
22787  See 
22788 \begin_inset CommandInset ref
22789 LatexCommand ref
22790 reference "subsec:VCS-Revision-Information"
22791
22792 \end_inset
22793
22794  for other details.
22795 \end_layout
22796
22797 \begin_layout Subsection
22798 Further tuning
22799 \end_layout
22800
22801 \begin_layout Standard
22802 With the recent addition of the 
22803 \begin_inset Flex Code
22804 status collapsed
22805
22806 \begin_layout Plain Layout
22807 vc-command
22808 \end_layout
22809
22810 \end_inset
22811
22812  function \SpecialChar LyX
22813  power users are allowed to create their own commands for revision
22814  control.
22815 \end_layout
22816
22817 \begin_layout Standard
22818 As an example you can see how two TortoiseSVN commands could be integrated
22819  directly:
22820 \end_layout
22821
22822 \begin_layout Description
22823 Commit: 
22824 \begin_inset Flex Code
22825 status collapsed
22826
22827 \begin_layout Plain Layout
22828 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
22829 \end_layout
22830
22831 \end_inset
22832
22833
22834 \end_layout
22835
22836 \begin_layout Description
22837 Revert: 
22838 \begin_inset Flex Code
22839 status collapsed
22840
22841 \begin_layout Plain Layout
22842 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
22843 \end_layout
22844
22845 \end_inset
22846
22847
22848 \end_layout
22849
22850 \begin_layout Subsection
22851 Version control and Document comparison
22852 \end_layout
22853
22854 \begin_layout Standard
22855 One of the typical uses of version control is to inspect the changes between
22856  revisions, usually by creating 
22857 \begin_inset Flex Code
22858 status collapsed
22859
22860 \begin_layout Plain Layout
22861 diff
22862 \end_layout
22863
22864 \end_inset
22865
22866  dumps.
22867  While this is useful for plain text files, it is much less useful in the
22868  case of \SpecialChar LyX
22869  files, which have more a complicated structure.
22870  Hence we provide binding to the Document comparison feature.
22871  There are two ways of calling this feature â€“ either by direct call of 
22872 \begin_inset Flex Code
22873 status collapsed
22874
22875 \begin_layout Plain Layout
22876 vc-compare
22877 \end_layout
22878
22879 \end_inset
22880
22881  \SpecialChar LyX
22882  function (for details see \SpecialChar LyX
22883  functions manual) or by the toolbar icon 
22884 \begin_inset Info
22885 type  "icon"
22886 arg   "vc-compare"
22887 \end_inset
22888
22889  or the menu item 
22890 \begin_inset Info
22891 type  "menu"
22892 arg   "vc-compare"
22893 \end_inset
22894
22895 , respectively.
22896  One can either compare two chosen revisions of the document or he can simply
22897  compare the current version of edited text with older revisions (where
22898  '
22899 \begin_inset Flex Noun
22900 status collapsed
22901
22902 \begin_layout Plain Layout
22903 0
22904 \end_layout
22905
22906 \end_inset
22907
22908 ' revisions back means comparison of the edited file with last commited
22909  revision).
22910  
22911 \end_layout
22912
22913 \begin_layout Standard
22914 This feature is supported for SVN and RCS though due to the more complicated
22915  versioning scheme of RCS there is a constraint â€“ when addressing the revisions
22916  in dialog, numbers always point to the last number in RCS revision number,
22917  i.e.
22918  '35' in '1.2.35'.
22919  We don't currently support GIT addressing of revisions, one can just compare
22920  edited document with its revision X steps backs, where X is addressed as
22921  
22922 \begin_inset Flex Code
22923 status collapsed
22924
22925 \begin_layout Plain Layout
22926 HEAD~X
22927 \end_layout
22928
22929 \end_inset
22930
22931 .
22932 \end_layout
22933
22934 \begin_layout Section
22935 Literate Programming
22936 \end_layout
22937
22938 \begin_layout Standard
22939 Updated by 
22940 \noun on
22941 Kayvan Sylvan 
22942 \noun default
22943 (kayvan@sylvan.com)
22944 \noun on
22945
22946 \noun default
22947 original documentation written by 
22948 \noun on
22949 Edmar Wienskoski Jr.
22950
22951 \noun default
22952  (edmar-w-jr@technologist.com)
22953 \end_layout
22954
22955 \begin_layout Subsection
22956 Introduction
22957 \end_layout
22958
22959 \begin_layout Standard
22960 The main purpose of this documentation is to show you how to use \SpecialChar LyX
22961  for literate
22962  programming, where it is assumed that you are familiar with this programming
22963  technique, and know what 
22964 \begin_inset Quotes eld
22965 \end_inset
22966
22967 tangling
22968 \begin_inset Quotes erd
22969 \end_inset
22970
22971  and 
22972 \begin_inset Quotes eld
22973 \end_inset
22974
22975 weaving
22976 \begin_inset Quotes erd
22977 \end_inset
22978
22979  means.
22980  If that is not the case, please follow the web links provided in the following
22981  sections.
22982  There is a lot of good documentation out there covering old development
22983  history to the latest tools tips.
22984 \end_layout
22985
22986 \begin_layout Standard
22987 It is also assumed that you are familiar with \SpecialChar LyX
22988  itself to a point that you
22989  are comfortable changing your \SpecialChar LyX
22990  preferences, and X resources file.
22991  If that is not the case please refer to other \SpecialChar LyX
22992  documentation to cover your
22993  specific needs.
22994 \end_layout
22995
22996 \begin_layout Subsection
22997 Literate Programming
22998 \end_layout
22999
23000 \begin_layout Standard
23001 From the Literate Programming FAQ: 
23002 \end_layout
23003
23004 \begin_layout Quotation
23005 Literate programming is the combination of documentation and source together
23006  in a fashion suited for reading by human beings.
23007  In fact, literate programs should be enjoyable reading, even inviting!
23008  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
23009  and documentation in a single file.
23010  Literate programming tools then parse the file to produce either readable
23011  documentation or compilable source.
23012  The WEB style of literate programming was created by D.
23013 \begin_inset space \thinspace{}
23014 \end_inset
23015
23016 E.
23017  Knuth during the development of his \SpecialChar TeX
23018  typesetting software.
23019  
23020 \end_layout
23021
23022 \begin_layout Standard
23023 Another excerpt says:
23024 \end_layout
23025
23026 \begin_layout Quotation
23027
23028 \emph on
23029 How is literate programming different from verbose commenting?
23030 \end_layout
23031
23032 \begin_layout Quotation
23033 There are three distinguishing characteristics.
23034  In order of importance, they are: 
23035 \end_layout
23036
23037 \begin_deeper
23038 \begin_layout Itemize
23039 flexible order of elaboration 
23040 \end_layout
23041
23042 \begin_layout Itemize
23043 automatic support for browsing 
23044 \end_layout
23045
23046 \begin_layout Itemize
23047 typeset documentation, especially diagrams and mathematics 
23048 \end_layout
23049
23050 \end_deeper
23051 \begin_layout Standard
23052 Now that I sparked your curiosity, take a look in the references.
23053 \end_layout
23054
23055 \begin_layout Subsubsection
23056 References
23057 \end_layout
23058
23059 \begin_layout Standard
23060 The complete Literate Programming FAQ can be found at:
23061 \end_layout
23062
23063 \begin_layout Quote
23064 Literate Programming FAQ 
23065 \begin_inset Flex URL
23066 status open
23067
23068 \begin_layout Plain Layout
23069
23070 http://www.literateprogramming.com/lpfaq.pdf
23071 \end_layout
23072
23073 \end_inset
23074
23075
23076 \end_layout
23077
23078 \begin_layout Standard
23079 The FAQ lists 23 (twenty three!) different literate programming tools.
23080  Where some are specialized or 
23081 \begin_inset Quotes eld
23082 \end_inset
23083
23084 tailored
23085 \begin_inset Quotes erd
23086 \end_inset
23087
23088  for particular programming languages, while other have general scope.
23089  I selected 
23090 \noun on
23091 Noweb
23092 \noun default
23093  for my own use for several reasons:
23094 \end_layout
23095
23096 \begin_layout Itemize
23097 It can generate the documentation either in \SpecialChar LaTeX
23098  or HTML.
23099 \end_layout
23100
23101 \begin_layout Itemize
23102 It has a open architecture, i.
23103 \begin_inset space \thinspace{}
23104 \end_inset
23105
23106 e.
23107 \begin_inset space \space{}
23108 \end_inset
23109
23110 it is easy to plug in new filters
23111 \begin_inset Foot
23112 status collapsed
23113
23114 \begin_layout Plain Layout
23115
23116 \emph on
23117 Filters 
23118 \emph default
23119 are programs that read a given data stream and output a manipulated data
23120  stream.
23121  That way, a WEB file (consisting of literate code) can be turned into a
23122  file consisting only of C program code or \SpecialChar LaTeX
23123  code.
23124 \end_layout
23125
23126 \end_inset
23127
23128  and to perform special processing that you may need.
23129  
23130 \end_layout
23131
23132 \begin_layout Itemize
23133 There is a good selection of filters available already (the HTML is one
23134  of them).
23135 \end_layout
23136
23137 \begin_layout Itemize
23138 It is free.
23139 \end_layout
23140
23141 \begin_layout Standard
23142 The Noweb web page can be found at: 
23143 \end_layout
23144
23145 \begin_layout Quote
23146 Noweb home page 
23147 \begin_inset Flex URL
23148 status collapsed
23149
23150 \begin_layout Plain Layout
23151
23152 https://www.cs.tufts.edu/~nr/noweb/
23153 \end_layout
23154
23155 \end_inset
23156
23157
23158 \end_layout
23159
23160 \begin_layout Standard
23161 Starting from there you can reach many other interesting links and even
23162  some literate program examples.
23163 \end_layout
23164
23165 \begin_layout Subsection
23166 \SpecialChar LyX
23167  and Literate Programming with Noweb
23168 \end_layout
23169
23170 \begin_layout Standard
23171 The \SpecialChar LyX
23172  support for Literate Programming is provided by using the generic \SpecialChar LyX
23173
23174  converters mechanism.
23175  This support is provided in a 
23176 \begin_inset Quotes eld
23177 \end_inset
23178
23179 Noweb independent
23180 \begin_inset Quotes erd
23181 \end_inset
23182
23183  way, i.
23184 \begin_inset space \thinspace{}
23185 \end_inset
23186
23187 e.
23188 \begin_inset space \space{}
23189 \end_inset
23190
23191 you will be able to use this new \SpecialChar LyX
23192  feature with some other literate programming
23193  tool of your choice by just changing your \SpecialChar LyX
23194  preferences.
23195 \end_layout
23196
23197 \begin_layout Subsubsection
23198 Generating documents and code (weaving and tangling)
23199 \end_layout
23200
23201 \begin_layout Paragraph
23202 Using the noweb module
23203 \end_layout
23204
23205 \begin_layout Standard
23206 If you have installed Noweb and \SpecialChar LyX
23207  successfully, whenever you open a new document,
23208  after you have chosen its document class, use the 
23209 \family sans
23210 Document\SpecialChar menuseparator
23211 Settings
23212 \family default
23213  menu to add the 
23214 \begin_inset Quotes eld
23215 \end_inset
23216
23217 noweb
23218 \begin_inset Quotes erd
23219 \end_inset
23220
23221  module.
23222  If Noweb is correctly installed, when you click on the 
23223 \begin_inset Quotes eld
23224 \end_inset
23225
23226 Modules
23227 \begin_inset Quotes erd
23228 \end_inset
23229
23230  link, you will see the 
23231 \begin_inset Quotes eld
23232 \end_inset
23233
23234 noweb
23235 \begin_inset Quotes erd
23236 \end_inset
23237
23238  module in the available list and you can add it to your document.
23239 \end_layout
23240
23241 \begin_layout Paragraph
23242 Typing code in
23243 \end_layout
23244
23245 \begin_layout Standard
23246 \SpecialChar LyX
23247  enables you to write code with a custom inset named 
23248 \begin_inset Flex Noun
23249 status collapsed
23250
23251 \begin_layout Plain Layout
23252 Chunk
23253 \end_layout
23254
23255 \end_inset
23256
23257 .
23258  Noweb delimits chunks like this:
23259 \end_layout
23260
23261 \begin_layout LyX-Code
23262 <<My code>>=
23263 \end_layout
23264
23265 \begin_layout LyX-Code
23266   code
23267 \end_layout
23268
23269 \begin_layout LyX-Code
23270   more code
23271 \end_layout
23272
23273 \begin_layout LyX-Code
23274   even more code
23275 \end_layout
23276
23277 \begin_layout LyX-Code
23278   @
23279 \end_layout
23280
23281 \begin_layout Standard
23282 The problem is that whatever is written in between the << and the 
23283 \family typewriter
23284 @
23285 \family default
23286  must be taken literally, i.
23287 \begin_inset space \thinspace{}
23288 \end_inset
23289
23290 e.
23291 \begin_inset space \space{}
23292 \end_inset
23293
23294 \SpecialChar LyX
23295  should be prevented from making any special interpretation of what has
23296  been written.
23297  This is also handled by 
23298 \begin_inset Flex Noun
23299 status collapsed
23300
23301 \begin_layout Plain Layout
23302 Chunk
23303 \end_layout
23304
23305 \end_inset
23306
23307 , that works like a normal text inset but has a free spacing capability.
23308 \end_layout
23309
23310 \begin_layout Standard
23311 As a special note, you can also use the 
23312 \begin_inset Quotes eld
23313 \end_inset
23314
23315 %def
23316 \begin_inset Quotes erd
23317 \end_inset
23318
23319  construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
23320 rence:
23321 \end_layout
23322
23323 \begin_layout LyX-Code
23324 <<My chunk>>=
23325 \end_layout
23326
23327 \begin_layout LyX-Code
23328 def some_function(args):
23329 \end_layout
23330
23331 \begin_layout LyX-Code
23332    "This is the doc string for this function."
23333 \end_layout
23334
23335 \begin_layout LyX-Code
23336    print "My args: ", args
23337 \end_layout
23338
23339 \begin_layout LyX-Code
23340 @ %def some_function
23341 \end_layout
23342
23343 \begin_layout Standard
23344 For an example of this usage and the resulting cross-reference output, look
23345  at the Literate python program in 
23346 \emph on
23347 LIBDIR/examples/listerrors.lyx
23348 \emph default
23349  which should make this all clear.
23350 \end_layout
23351
23352 \begin_layout Paragraph
23353 Generating the documentation
23354 \end_layout
23355
23356 \begin_layout Standard
23357 At this point you already have a new document file with a proper document
23358  class, and with some code and text on it.
23359  How do I print it? The answer is simple, you select 
23360 \family sans
23361 View\SpecialChar menuseparator
23362 DVI,
23363 \family default
23364  etc.
23365  Just like you would do for a plain document.
23366  No special procedure is required.
23367 \end_layout
23368
23369 \begin_layout Standard
23370 To help orientate you, I will now explain what happens inside \SpecialChar LyX
23371 :
23372 \end_layout
23373
23374 \begin_layout Enumerate
23375 When the 
23376 \family sans
23377 Update\SpecialChar menuseparator
23378 DVI
23379 \family default
23380  menu option is chosen, a \SpecialChar LaTeX
23381  file is generated.
23382  
23383 \end_layout
23384
23385 \begin_deeper
23386 \begin_layout Standard
23387 If the document is of any literate class the generated file will be named
23388  with an extension name defined by the 
23389 \begin_inset Quotes eld
23390 \end_inset
23391
23392 literate
23393 \begin_inset Quotes erd
23394 \end_inset
23395
23396  format (defined in the Preferences panel), otherwise the file will have
23397  the usual 
23398 \family typewriter
23399 .tex
23400 \family default
23401  extension.
23402 \end_layout
23403
23404 \end_deeper
23405 \begin_layout Enumerate
23406 Note that the only difference so far is in the name of the file, no special
23407  processing is required by \SpecialChar LyX
23408 .
23409  Given that you formatted the code using the 
23410 \begin_inset Flex Noun
23411 status collapsed
23412
23413 \begin_layout Plain Layout
23414 Chunk
23415 \end_layout
23416
23417 \end_inset
23418
23419  inset that, by itself, takes care of the business.
23420 \end_layout
23421
23422 \begin_layout Enumerate
23423 If the document is of any literate class \SpecialChar LyX
23424  will then use the internal \SpecialChar LyX
23425  to
23426  Noweb converter, followed by the Noweb to \SpecialChar LaTeX
23427  converter
23428 \begin_inset Foot
23429 status collapsed
23430
23431 \begin_layout Plain Layout
23432 The converters are defined in the 
23433 \family sans
23434 Tools\SpecialChar menuseparator
23435 Preferences
23436 \family default
23437  panel, under the 
23438 \begin_inset Quotes eld
23439 \end_inset
23440
23441 Conversion
23442 \begin_inset Quotes erd
23443 \end_inset
23444
23445  tab.
23446  See section 
23447 \emph on
23448 Converters
23449 \emph default
23450  of the 
23451 \emph on
23452 Customization
23453 \emph default
23454  manual for general information about converters.
23455 \end_layout
23456
23457 \end_inset
23458
23459  to generate the \SpecialChar LaTeX
23460  file.
23461 \end_layout
23462
23463 \begin_deeper
23464 \begin_layout Standard
23465 Otherwise it will just skip this step.
23466 \end_layout
23467
23468 \end_deeper
23469 \begin_layout Enumerate
23470 Finally, \SpecialChar LaTeX
23471  is invoked and the regular post processing continues as in a plain
23472  document.
23473 \end_layout
23474
23475 \begin_layout Standard
23476 Independence from a particular 
23477 \begin_inset Quotes eld
23478 \end_inset
23479
23480 literate tool
23481 \begin_inset Quotes erd
23482 \end_inset
23483
23484  is easily achieved by changing the commands that are run by the various
23485  converters.
23486 \end_layout
23487
23488 \begin_layout Paragraph
23489 Generating the code
23490 \end_layout
23491
23492 \begin_layout Standard
23493 When the build menu option is chosen or the corresponding button in the
23494  toolbar is pressed, a \SpecialChar LaTeX
23495  file is generated just like step 1 above.
23496  Next, \SpecialChar LyX
23497  invokes the 
23498 \family typewriter
23499 Noweb->Program
23500 \family default
23501  converter.
23502  This converter needs to be defined by the user and is not installed by
23503  default, though the Program format is.
23504  This converter (like any other converter) will have two parts:
23505 \end_layout
23506
23507 \begin_layout Enumerate
23508 The converter program itself.
23509  This program performs the conversion from the one format to the other (in
23510  this case, from the Noweb format to the Program pseudo-format).
23511 \end_layout
23512
23513 \begin_layout Enumerate
23514 The error log parser.
23515  This is a program whose sole purpose is to rewrite error messages in a
23516  format that \SpecialChar LyX
23517  understands.
23518  This makes it possible for \SpecialChar LyX
23519  to place error boxes in the right places in
23520  the file buffer.
23521 \end_layout
23522
23523 \begin_layout Standard
23524 The first part, the 
23525 \begin_inset Quotes eld
23526 \end_inset
23527
23528 Converter
23529 \begin_inset Quotes erd
23530 \end_inset
23531
23532  setting, should be set to
23533 \end_layout
23534
23535 \begin_layout LyX-Code
23536
23537 \family typewriter
23538 build-script $$i
23539 \family default
23540  $$r
23541 \end_layout
23542
23543 \begin_layout Standard
23544 This basically means that \SpecialChar LyX
23545  will call 
23546 \begin_inset Quotes eld
23547 \end_inset
23548
23549 build-script
23550 \begin_inset Quotes erd
23551 \end_inset
23552
23553  (a program or script) with the name of the Noweb file (normally a file
23554  in the \SpecialChar LyX
23555  temp directory) and the directory path of the original \SpecialChar LyX
23556  file.
23557  
23558 \end_layout
23559
23560 \begin_layout Standard
23561 This is an implementation of 
23562 \begin_inset Quotes eld
23563 \end_inset
23564
23565 build-script
23566 \begin_inset Quotes erd
23567 \end_inset
23568
23569  that you can place in a directory on your path:
23570 \end_layout
23571
23572 \begin_layout LyX-Code
23573
23574 \family sans
23575 #!/bin/sh
23576 \end_layout
23577
23578 \begin_layout LyX-Code
23579
23580 \family sans
23581 #
23582 \end_layout
23583
23584 \begin_layout LyX-Code
23585
23586 \family sans
23587 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
23588 \end_layout
23589
23590 \begin_layout Standard
23591 The next part of the converter setting is the 
23592 \begin_inset Quotes eld
23593 \end_inset
23594
23595 Flags
23596 \begin_inset Quotes erd
23597 \end_inset
23598
23599  which is to be set to
23600 \end_layout
23601
23602 \begin_layout LyX-Code
23603
23604 \family typewriter
23605 parselog=$$s/scripts/listerrors
23606 \end_layout
23607
23608 \begin_layout Standard
23609 This will run any errors that are generated by the 
23610 \begin_inset Quotes eld
23611 \end_inset
23612
23613 build-script
23614 \begin_inset Quotes erd
23615 \end_inset
23616
23617  process through the 
23618 \begin_inset Quotes eld
23619 \end_inset
23620
23621 listerrors
23622 \begin_inset Quotes erd
23623 \end_inset
23624
23625  program.
23626 \end_layout
23627
23628 \begin_layout Standard
23629 The build will normally take place in \SpecialChar LyX
23630 's temporary directory, so the files
23631  produced by the conversion will be in that directory.
23632  \SpecialChar LyX
23633  will copy out what it regards as the `main' file, but the 
23634 \family typewriter
23635 Noweb->Program
23636 \family default
23637  conversion may produce several files, and so most of these would then be
23638  deleted when \SpecialChar LyX
23639  was closed.
23640  This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
23641  the build-script chunk can place the generated files in that location.
23642 \end_layout
23643
23644 \begin_layout Paragraph
23645 Build instructions in the document
23646 \end_layout
23647
23648 \begin_layout Standard
23649 The last piece of the integration between \SpecialChar LyX
23650  and noweb is the 
23651 \begin_inset Quotes eld
23652 \end_inset
23653
23654 build-script
23655 \begin_inset Quotes erd
23656 \end_inset
23657
23658  chunk.
23659  Generally, the instructions for building your program should be embedded
23660  in a chunk of its own.
23661  The noweb-specific 
23662 \begin_inset Quotes eld
23663 \end_inset
23664
23665 build-script
23666 \begin_inset Quotes erd
23667 \end_inset
23668
23669  above uses the notangle command to look for this chunk (called 
23670 \begin_inset Quotes eld
23671 \end_inset
23672
23673 build-script
23674 \begin_inset Quotes erd
23675 \end_inset
23676
23677 ) and runs its contents through 
23678 \begin_inset Quotes eld
23679 \end_inset
23680
23681 sh
23682 \begin_inset Quotes erd
23683 \end_inset
23684
23685 .
23686 \end_layout
23687
23688 \begin_layout Standard
23689 Typically, such a chunk would look something like this:
23690 \end_layout
23691
23692 \begin_layout LyX-Code
23693 <<build-script>>=
23694 \end_layout
23695
23696 \begin_layout LyX-Code
23697 #!/bin/sh
23698 \begin_inset Newline newline
23699 \end_inset
23700
23701 if [ -z "${NOWEB_SOURCE}" ]
23702 \begin_inset Newline newline
23703 \end_inset
23704
23705 then
23706 \end_layout
23707
23708 \begin_layout LyX-Code
23709 NOWEB_SOURCE=myfile.nw
23710 \begin_inset Newline newline
23711 \end_inset
23712
23713 fi
23714 \begin_inset Newline newline
23715 \end_inset
23716
23717 [...
23718  code to extract files ...
23719  use NOWEB_OUTPUT_DIR here ...]
23720 \begin_inset Newline newline
23721 \end_inset
23722
23723 [...
23724  code to compile files ...]
23725 \begin_inset Newline newline
23726 \end_inset
23727
23728 @
23729 \end_layout
23730
23731 \begin_layout Standard
23732 Look in 
23733 \emph on
23734 LIBDIR/examples/listerrors.lyx
23735 \emph default
23736  or in 
23737 \emph on
23738 LIBDIR/examples/Literate.lyx
23739 \emph default
23740  which implement two versions of the 
23741 \begin_inset Quotes eld
23742 \end_inset
23743
23744 listerrors
23745 \begin_inset Quotes erd
23746 \end_inset
23747
23748  program for some illustrations of how all of these pieces go together or
23749  in 
23750 \emph on
23751 LIBDIR/examples/noweb2lyx.lyx.
23752
23753 \emph default
23754  Interestingly, these three files show off the language-indepence of the
23755  \SpecialChar LyX
23756  literate programming support since they are written in Python, C and Perl
23757  respectively.
23758 \end_layout
23759
23760 \begin_layout Subsubsection
23761 Configuring \SpecialChar LyX
23762
23763 \end_layout
23764
23765 \begin_layout Standard
23766 All the Literate Programming support is configured by the 
23767 \family sans
23768 Tools\SpecialChar menuseparator
23769 Preferences
23770 \family default
23771  panel in the 
23772 \begin_inset Quotes eld
23773 \end_inset
23774
23775 File Handling
23776 \begin_inset Quotes erd
23777 \end_inset
23778
23779  tab.
23780  The important parts are:
23781 \end_layout
23782
23783 \begin_layout Description
23784 the
23785 \begin_inset space ~
23786 \end_inset
23787
23788
23789 \begin_inset Quotes eld
23790 \end_inset
23791
23792 NoWeb
23793 \begin_inset Quotes erd
23794 \end_inset
23795
23796
23797 \begin_inset space ~
23798 \end_inset
23799
23800 format Set up via the File Formats tab, this is where the Noweb-specific
23801  pieces are set up.
23802  The 
23803 \family sans
23804 GUI Name
23805 \family default
23806  is set to 
23807 \family typewriter
23808 NoWeb
23809 \family default
23810 , the file extension is set to 
23811 \family typewriter
23812 .nw
23813 \family default
23814 .
23815  This tells \SpecialChar LyX
23816  to create a file with a 
23817 \family typewriter
23818 .nw
23819 \family default
23820  extension in the first step of the conversion process.
23821 \end_layout
23822
23823 \begin_layout Description
23824 the
23825 \begin_inset space ~
23826 \end_inset
23827
23828
23829 \family sans
23830 Program
23831 \family default
23832
23833 \begin_inset space ~
23834 \end_inset
23835
23836 format This is an empty format whose sole purpose is to be the endpoint
23837  of a conversion (which then allows us to set up a converter for it).
23838 \end_layout
23839
23840 \begin_layout Description
23841
23842 \family sans
23843 NoWeb
23844 \family default
23845 ->
23846 \family sans
23847 \SpecialChar LaTeX
23848
23849 \family default
23850  This converter performs the 
23851 \begin_inset Quotes eld
23852 \end_inset
23853
23854 weaving
23855 \begin_inset Quotes erd
23856 \end_inset
23857
23858  of the literate document.
23859  For Noweb, it is set to 
23860 \begin_inset Quotes eld
23861 \end_inset
23862
23863
23864 \family typewriter
23865 noweave -delay -index $$i > $$o
23866 \family default
23867
23868 \begin_inset Quotes erd
23869 \end_inset
23870
23871
23872 \end_layout
23873
23874 \begin_layout Description
23875
23876 \family sans
23877 NoWeb
23878 \family default
23879 ->
23880 \family sans
23881 Program
23882 \family default
23883  This performs the 
23884 \begin_inset Quotes eld
23885 \end_inset
23886
23887 tangling step
23888 \begin_inset Quotes erd
23889 \end_inset
23890
23891 .
23892  As stated above, the Converter is set to 
23893 \begin_inset Quotes eld
23894 \end_inset
23895
23896
23897 \family typewriter
23898 build-script $$i
23899 \family default
23900  $$r
23901 \begin_inset Quotes erd
23902 \end_inset
23903
23904 , with Flags set to
23905 \begin_inset Newline newline
23906 \end_inset
23907
23908
23909 \begin_inset Quotes eld
23910 \end_inset
23911
23912
23913 \family typewriter
23914 parselog=$$s/scripts/listerrors
23915 \family default
23916
23917 \begin_inset Quotes erd
23918 \end_inset
23919
23920 .
23921 \end_layout
23922
23923 \begin_layout Subsubsection
23924 Debug extensions
23925 \end_layout
23926
23927 \begin_layout Standard
23928 There is also a new function implemented in the \SpecialChar LyX
23929  server, the 
23930 \begin_inset Quotes eld
23931 \end_inset
23932
23933 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
23934  
23935 \end_layout
23936
23937 \begin_layout Standard
23938 When debugging code with ddd/gdb, it is possible to invoke a text editor
23939  at the current execution position with a single key stroke.
23940  The default ddd configuration for that is shift-ctrl-V.
23941  It happens that you can define the editor command line invocation in ddd
23942  by accessing the 
23943 \family sans
23944 Edit\SpecialChar menuseparator
23945 Preferences\SpecialChar menuseparator
23946 Helpers
23947 \family default
23948  dialog and changing the "Edit Sources" entry.
23949 \end_layout
23950
23951 \begin_layout Standard
23952 I take advantage of the newly created \SpecialChar LyX
23953  server function and this ddd feature,
23954  and set 
23955 \begin_inset Quotes eld
23956 \end_inset
23957
23958 Edit Sources
23959 \begin_inset Quotes erd
23960 \end_inset
23961
23962  to:
23963 \end_layout
23964
23965 \begin_layout LyX-Code
23966 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
23967 \end_layout
23968
23969 \begin_layout Standard
23970 With this, whenever you are using ddd and find a point in the program that
23971  you want to edit, you just press shift-ctrl-V (in the ddd window), and
23972  ddd will forward this information to \SpecialChar LyX
23973  through the \SpecialChar LyX
23974  server and then the
23975  \SpecialChar LyX
23976  window will show the same file with the cursor at the same position ddd
23977  was pointing to.
23978  No more guessing or long scrolling to locate a point in the program back
23979  from debugging !
23980 \end_layout
23981
23982 \begin_layout Standard
23983 Note however that you must enable the \SpecialChar LyX
23984  server to get this feature working
23985  (it is disabled by default).
23986  Sec.
23987 \begin_inset space ~
23988 \end_inset
23989
23990
23991 \begin_inset CommandInset ref
23992 LatexCommand ref
23993 reference "sec:Starting-the-Server"
23994
23995 \end_inset
23996
23997  explains how to do that.
23998 \end_layout
23999
24000 \begin_layout Subsubsection
24001 Toolbar extensions
24002 \end_layout
24003
24004 \begin_layout Standard
24005 There are six new buttons that can be added to your \SpecialChar LyX
24006  toolbar.
24007  Four of these buttons are short cuts to layout styles: 
24008 \family sans
24009 Standard
24010 \family default
24011
24012 \family sans
24013 Section
24014 \family default
24015
24016 \family sans
24017 \SpecialChar LaTeX
24018
24019 \family default
24020 , and 
24021 \family sans
24022 \SpecialChar LyX
24023 -Code
24024 \family default
24025 , one for the custom inset 
24026 \family sans
24027 Chunk
24028 \family default
24029 .
24030  The last one is a short cut to the 
24031 \begin_inset Quotes eld
24032 \end_inset
24033
24034 Build Program
24035 \begin_inset Quotes erd
24036 \end_inset
24037
24038  File menu entry.
24039  
24040 \end_layout
24041
24042 \begin_layout Standard
24043 \SpecialChar LyX
24044  has a range of buttons that are available for tool bar customization.
24045  In my toolbar I like to combine the six short cuts above with two more:
24046  One for 
24047 \family sans
24048 Document
24049 \family default
24050 \SpecialChar menuseparator
24051
24052 \family sans
24053 Update
24054 \family default
24055 \SpecialChar menuseparator
24056
24057 \family sans
24058 DVI
24059 \family default
24060  and the other for 
24061 \family sans
24062 Document\SpecialChar menuseparator
24063 View\SpecialChar menuseparator
24064 DVI
24065 \family default
24066  File menu entries.
24067  Here is how it looks like:
24068 \end_layout
24069
24070 \begin_layout LyX-Code
24071 Toolbar
24072 \end_layout
24073
24074 \begin_layout LyX-Code
24075   Layouts
24076 \end_layout
24077
24078 \begin_layout LyX-Code
24079   Icon "layout Standard"
24080 \end_layout
24081
24082 \begin_layout LyX-Code
24083   Icon "layout Section"
24084 \end_layout
24085
24086 \begin_layout LyX-Code
24087   Icon "layout \SpecialChar LaTeX
24088 "
24089 \end_layout
24090
24091 \begin_layout LyX-Code
24092   Icon "layout \SpecialChar LyX
24093 -Code"
24094 \end_layout
24095
24096 \begin_layout LyX-Code
24097   Icon "flex.insert Chunk"
24098 \end_layout
24099
24100 \begin_layout LyX-Code
24101   Separator
24102 \end_layout
24103
24104 \begin_layout LyX-Code
24105   Icon "buffer-view"
24106 \end_layout
24107
24108 \begin_layout LyX-Code
24109   Icon "buffer-typeset"
24110 \end_layout
24111
24112 \begin_layout LyX-Code
24113   Icon "build-program"
24114 \end_layout
24115
24116 \begin_layout LyX-Code
24117   Separator
24118 \end_layout
24119
24120 \begin_layout LyX-Code
24121 .
24122 \end_layout
24123
24124 \begin_layout LyX-Code
24125 .
24126 \end_layout
24127
24128 \begin_layout LyX-Code
24129 .
24130 \end_layout
24131
24132 \begin_layout LyX-Code
24133 End
24134 \end_layout
24135
24136 \begin_layout Subsubsection
24137 Colors customization
24138 \end_layout
24139
24140 \begin_layout Standard
24141 There are a number of colors in \SpecialChar LyX
24142  that can be customized in 
24143 \family sans
24144 Preferences
24145 \family default
24146 .
24147  One of the things that bothers people is the \SpecialChar LaTeX
24148  font color.
24149  The default color is red, since the chunks uses \SpecialChar LaTeX
24150  font, and there is a lot
24151  of chunks in literate documents, you may get tired of seeing everything
24152  in red.
24153  You can change it by going to the tabs 
24154 \family sans
24155 Look&Feel
24156 \family default
24157
24158 \family sans
24159 Colors.
24160 \end_layout
24161
24162 \begin_layout Standard
24163 The next thing is the visible presence of the newline character in the screen.
24164  You can choose the color of this particular character and make it blend
24165  in the background.
24166  I recommend you choosing a color that is close to the background but not
24167  equal, that way you still can see it is there, but it is not bothering
24168  you anymore.
24169 \end_layout
24170
24171 \begin_layout Subsection
24172 \SpecialChar LyX
24173  and knitr/Sweave
24174 \end_layout
24175
24176 \begin_layout Standard
24177 Support for 
24178 \family sans
24179 knitr
24180 \family default
24181  and 
24182 \family sans
24183 Sweave
24184 \family default
24185  is documented in the 
24186 \emph on
24187 knitr.lyx
24188 \emph default
24189  example file and in the Sweave manual (menu 
24190 \family sans
24191 Help\SpecialChar menuseparator
24192 Specific Manuals
24193 \family default
24194 ).
24195 \end_layout
24196
24197 \begin_layout Chapter
24198 Special features
24199 \end_layout
24200
24201 \begin_layout Standard
24202 You can do everything with \SpecialChar LyX
24203  that you can do with \SpecialChar LaTeX
24204 .
24205  However, \SpecialChar LyX
24206  cannot support every \SpecialChar LaTeX
24207  feature directly.
24208  But you can always use \SpecialChar TeX
24209  Code.
24210  This chapter shows you some more special things you might want to use.
24211  For other special things you can do with figures, tables, floats, boxes
24212  and notes, have a look at the 
24213 \emph on
24214 Embedded
24215 \begin_inset space ~
24216 \end_inset
24217
24218 Objects
24219 \emph default
24220  manual.
24221 \end_layout
24222
24223 \begin_layout Section
24224 Multiple Text Columns
24225 \end_layout
24226
24227 \begin_layout Standard
24228 This feature is independent of the option 
24229 \family sans
24230 Two-column document
24231 \family default
24232  in the document settings under 
24233 \family sans
24234 Text Layout
24235 \family default
24236 .
24237  If you want to have 2
24238 \begin_inset space ~
24239 \end_inset
24240
24241 columns for the whole document, it is recommended to use the 
24242 \family sans
24243 Two-column document
24244 \family default
24245  option.
24246  For all other cases use this feature.
24247 \end_layout
24248
24249 \begin_layout Standard
24250 To use multiple text columns in your document, you have to load the module
24251  
24252 \family sans
24253 Multiple Columns
24254 \family default
24255  (menu 
24256 \family sans
24257 Document\SpecialChar menuseparator
24258 Settings\SpecialChar menuseparator
24259 Modules
24260 \family default
24261 ) and must have the \SpecialChar LaTeX
24262 -package 
24263 \begin_inset Flex Code
24264 status collapsed
24265
24266 \begin_layout Plain Layout
24267 multicol
24268 \end_layout
24269
24270 \end_inset
24271
24272  installed.
24273 \end_layout
24274
24275 \begin_layout Standard
24276 Footnotes within multiple columns will be placed at the bottom of the page
24277  and not under each column.
24278  Within the different columns you can use everything, with the limitation
24279  that for floats you need to use the float option 
24280 \family sans
24281 Span columns
24282 \family default
24283 .
24284 \end_layout
24285
24286 \begin_layout Subsection
24287 Basics
24288 \end_layout
24289
24290 \begin_layout Standard
24291 If you want to have 2
24292 \begin_inset space ~
24293 \end_inset
24294
24295 columns in your text, insert a multicolumn inset via the menu 
24296 \family sans
24297 Insert\SpecialChar menuseparator
24298 Custom
24299 \begin_inset space ~
24300 \end_inset
24301
24302 Insets\SpecialChar menuseparator
24303 Multiple
24304 \begin_inset space ~
24305 \end_inset
24306
24307 Columns
24308 \family default
24309  where the columns should start.
24310  Write all text that should be printed in 2
24311 \begin_inset space ~
24312 \end_inset
24313
24314 columns into this inset.
24315 \end_layout
24316
24317 \begin_layout Standard
24318 Here is an example:
24319 \end_layout
24320
24321 \begin_layout Standard
24322 \noindent
24323 \begin_inset Flex Multiple Columns
24324 status open
24325
24326 \begin_layout Plain Layout
24327 \noindent
24328
24329 \series bold
24330 \size small
24331 The Adventure of the Empty House
24332 \series default
24333
24334 \begin_inset Newline newline
24335 \end_inset
24336
24337 by Sir Arthur Conan Doyle
24338 \end_layout
24339
24340 \begin_layout Plain Layout
24341
24342 \size small
24343 It was in the spring of the year 1894 that all London was interested, and
24344  the fashionable world dismayed, by the murder of the Honourable Ronald
24345  Adair under most unusual and inexplicable circumstances.
24346  The public has already learned those particulars of the crime which came
24347  out in the police investigation, but a good deal was suppressed upon that
24348  occasion, since the case for the prosecution was so overwhelmingly strong
24349  that it was not necessary to bring forward all the facts.
24350  Only now, at the end of nearly ten years, am I allowed to supply those
24351  missing links which make up the whole of that remarkable chain.
24352  The crime was of interest in itself, but that interest was as nothing to
24353  me compared to the inconceivable sequel, which afforded me the greatest
24354  shock and surprise of any event in my adventurous life.
24355  Even now, after this long interval, I find myself thrilling as I think
24356  of it, and feeling once more that sudden flood of joy, amazement, and increduli
24357 ty which utterly submerged my mind.
24358  Let me say to that public, which has shown some interest in those glimpses
24359  which I have occasionally given them of the thoughts and actions of a very
24360  remarkable man, that they are not to blame me if I have not shared my knowledge
24361  with them, for I should have considered it my first duty to do so, had
24362  I not been barred by a positive prohibition from his own lips, which was
24363  only withdrawn upon the third of last month.
24364 \end_layout
24365
24366 \end_inset
24367
24368
24369 \end_layout
24370
24371 \begin_layout Standard
24372 To get 3 or more columns, set the cursor into the multicolumn inset and
24373  use the menu 
24374 \family sans
24375 Insert\SpecialChar menuseparator
24376 Number
24377 \begin_inset space ~
24378 \end_inset
24379
24380 of
24381 \begin_inset space ~
24382 \end_inset
24383
24384 Columns
24385 \family default
24386 .
24387  The number of the desired columns is written into that inset (for 3
24388 \begin_inset space ~
24389 \end_inset
24390
24391 columns write 
24392 \begin_inset Quotes eld
24393 \end_inset
24394
24395 3
24396 \begin_inset Quotes erd
24397 \end_inset
24398
24399 ).
24400 \begin_inset Newline newline
24401 \end_inset
24402
24403 Here is an example with 3
24404 \begin_inset space ~
24405 \end_inset
24406
24407 columns:
24408 \end_layout
24409
24410 \begin_layout Standard
24411 \begin_inset Flex Multiple Columns
24412 status open
24413
24414 \begin_layout Plain Layout
24415
24416 \size footnotesize
24417 \begin_inset Argument 1
24418 status open
24419
24420 \begin_layout Plain Layout
24421
24422 3
24423 \end_layout
24424
24425 \end_inset
24426
24427 It can be imagined that my close intimacy with Sherlock Holmes had interested
24428  me deeply in crime, and that after his disappearance I never failed to
24429  read with care the various problems which came before the public.
24430  And I even attempted, more than once, for my own private satisfaction,
24431  to employ his methods in their solution, though with indifferent success.
24432  There was none, however, which appealed to me like this tragedy of Ronald
24433  Adair.
24434  As I read the evidence at the inquest, which led up to a verdict of willful
24435  murder against some person or persons unknown, I realized more clearly
24436  than I had ever done the loss which the community had sustained by the
24437  death of Sherlock Holmes.
24438  There were points about this strange business which would, I was sure,
24439  have specially appealed to him, and the efforts of the police would have
24440  been supplemented, or more probably anticipated, by the trained observation
24441  and the alert mind of the first criminal agent in Europe.
24442  All day, as I drove upon my round, I turned over the case in my mind and
24443  found no explanation which appeared to me to be adequate.
24444  At the risk of telling a twice-told tale, I will recapitulate the facts
24445  as they were known to the public at the conclusion of the inquest.
24446 \end_layout
24447
24448 \end_inset
24449
24450
24451 \end_layout
24452
24453 \begin_layout Standard
24454 You can have up to 10
24455 \begin_inset space ~
24456 \end_inset
24457
24458 columns if you want to, but that might not be very pleasant for the readers
24459  of your document.
24460 \end_layout
24461
24462 \begin_layout Standard
24463 \begin_inset Newpage newpage
24464 \end_inset
24465
24466
24467 \end_layout
24468
24469 \begin_layout Subsection
24470 Columns inside Columns
24471 \end_layout
24472
24473 \begin_layout Standard
24474 You can also have columns inside columns:
24475 \end_layout
24476
24477 \begin_layout Standard
24478 \begin_inset Flex Multiple Columns
24479 status open
24480
24481 \begin_layout Plain Layout
24482
24483 \size footnotesize
24484 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
24485  at that time governor of one of the Australian colonies.
24486  Adair's mother had returned from Australia to undergo the operation for
24487  cataract, and she, her son Ronald, and her daughter Hilda were living together
24488  at 427 Park Lane.
24489 \end_layout
24490
24491 \begin_layout Plain Layout
24492 \begin_inset Flex Multiple Columns
24493 status open
24494
24495 \begin_layout Plain Layout
24496
24497 \size footnotesize
24498 The youth moved in the best society
24499 \begin_inset space ~
24500 \end_inset
24501
24502 – had, so far as was known, no enemies and no particular vices.
24503  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
24504  had been broken off by mutual consent some months before, and there was
24505  no sign that it had left any very profound feeling behind it.
24506  For the rest {sic} the man's life moved in a narrow and conventional circle,
24507  for his habits were quiet and his nature unemotional.
24508  Yet it was upon this easy-going young aristocrat that death came, in most
24509  strange and unexpected form, between the hours of ten and eleven-twenty
24510  on the night of March 30, 1894.
24511 \end_layout
24512
24513 \end_inset
24514
24515
24516 \end_layout
24517
24518 \begin_layout Plain Layout
24519
24520 \size footnotesize
24521 Ronald Adair was fond of cards
24522 \begin_inset space ~
24523 \end_inset
24524
24525 – playing continually, but never for such stakes as would hurt him.
24526  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
24527  It was shown that, after dinner on the day of his death, he had played
24528  a rubber of whist at the latter club.
24529  He had also played there in the afternoon.
24530
24531 \size default
24532  
24533 \size footnotesize
24534 The evidence of those who had played with him
24535 \begin_inset space ~
24536 \end_inset
24537
24538 – Mr.
24539  Murray, Sir John Hardy, and Colonel Moran
24540 \begin_inset space ~
24541 \end_inset
24542
24543 – showed that the game was whist, and that there was a fairly equal fall
24544  of the cards.
24545  Adair might have lost five pounds, but not more.
24546  His fortune was a considerable one, and such a loss could not in any way
24547  affect him.
24548  He had played nearly every day at one club or other, but he was a cautious
24549  player, and usually rose a winner.
24550  It came out in evidence that, in partnership with Colonel Moran, he had
24551  actually won as much as four hundred and twenty pounds in a sitting, some
24552  weeks before, from Godfrey Milner and Lord Balmoral.
24553  So much for his recent history as it came out at the inquest.
24554 \end_layout
24555
24556 \end_inset
24557
24558
24559 \end_layout
24560
24561 \begin_layout Subsection
24562 Advanced Examples
24563 \end_layout
24564
24565 \begin_layout Standard
24566 The examples in this section show some more special features of multiple
24567  columns.
24568 \end_layout
24569
24570 \begin_layout Standard
24571 For more features of multiple columns, have a look at the 
24572 \begin_inset CommandInset href
24573 LatexCommand href
24574 name "documentation"
24575 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
24576 literal "false"
24577
24578 \end_inset
24579
24580  of the \SpecialChar LaTeX
24581 -package 
24582 \begin_inset Flex Code
24583 status collapsed
24584
24585 \begin_layout Plain Layout
24586 multicol
24587 \end_layout
24588
24589 \end_inset
24590
24591 .
24592 \end_layout
24593
24594 \begin_layout Subsubsection
24595 Preface
24596 \end_layout
24597
24598 \begin_layout Standard
24599 To add a preface text for multiple columns, set the cursor into the multicolumn
24600  inset and use the menu 
24601 \family sans
24602 Insert\SpecialChar menuseparator
24603 Preface
24604 \family default
24605 .
24606  Write your preface text into that inset.
24607 \begin_inset Newline newline
24608 \end_inset
24609
24610 This is an example with some preface text:
24611 \end_layout
24612
24613 \begin_layout Standard
24614 \begin_inset VSpace bigskip
24615 \end_inset
24616
24617
24618 \end_layout
24619
24620 \begin_layout Standard
24621 \begin_inset Flex Multiple Columns
24622 status open
24623
24624 \begin_layout Plain Layout
24625 \begin_inset Argument 2
24626 status open
24627
24628 \begin_layout Plain Layout
24629 And the story continues and continues and continues and continues\SpecialChar ldots
24630
24631 \end_layout
24632
24633 \end_inset
24634
24635
24636 \size small
24637 On the evening of the crime, he returned from the club exactly at ten.
24638  His mother and sister were out spending the evening with a relation.
24639  The servant deposed that she heard him enter the front room on the second
24640  floor, generally used as his sitting-room.
24641  She had lit a fire there, and as it smoked she had opened the window.
24642  No sound was heard from the room until eleven-twenty, the hour of the return
24643  of Lady Maynooth and her daughter.
24644  Desiring to say good-night, she attempted to enter her son's room.
24645  The door was locked on the inside, and no answer could be got to their
24646  cries and knocking.
24647  Help was obtained, and the door forced.
24648  The unfortunate young man was found lying near the table.
24649  His head had been horribly mutilated by an expanding revolver bullet, but
24650  no weapon of any sort was to be found in the room.
24651 \end_layout
24652
24653 \end_inset
24654
24655
24656 \end_layout
24657
24658 \begin_layout Standard
24659 You can also use a section heading as the preface if you use a section command
24660  as \SpecialChar TeX
24661  Code.
24662  For example the command
24663 \end_layout
24664
24665 \begin_layout LyX-Code
24666
24667 \backslash
24668 subsection{subsection title}
24669 \end_layout
24670
24671 \begin_layout Standard
24672 creates a subsection.
24673  In this example the preface is a subsubsection:
24674 \end_layout
24675
24676 \begin_layout Standard
24677 \begin_inset Flex Multiple Columns
24678 status open
24679
24680 \begin_layout Plain Layout
24681 \begin_inset Argument 2
24682 status open
24683
24684 \begin_layout Plain Layout
24685 \begin_inset ERT
24686 status collapsed
24687
24688 \begin_layout Plain Layout
24689
24690
24691 \backslash
24692 subsubsection{
24693 \end_layout
24694
24695 \end_inset
24696
24697 This is a subsubsection heading as a preface
24698 \begin_inset ERT
24699 status collapsed
24700
24701 \begin_layout Plain Layout
24702
24703 }
24704 \end_layout
24705
24706 \end_inset
24707
24708
24709 \end_layout
24710
24711 \end_inset
24712
24713
24714 \size small
24715 A minute examination of the circumstances served only to make the case more
24716  complex.
24717  In the first place, no reason could be given why the young man should have
24718  fastened the door upon the inside.
24719  There was the possibility that the murderer had done this, and had afterwards
24720  escaped by the window.
24721  The drop was at least twenty feet, however, and a bed of crocuses in full
24722  bloom lay beneath.
24723  Neither the flowers nor the earth showed any sign of having been disturbed,
24724  nor were there any marks upon the narrow strip of grass which separated
24725  the house from the road.
24726  Apparently, therefore, it was the young man himself who had fastened the
24727  door.
24728  But how did he come by his death? No one could have climbed up to the window
24729  without leaving traces.
24730  Suppose a man had fired through the window, he would indeed be a remarkable
24731  shot who could with a revolver inflict so deadly a wound.
24732  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
24733  a hundred yards of the house.
24734  No one had heard a shot.
24735 \end_layout
24736
24737 \end_inset
24738
24739
24740 \end_layout
24741
24742 \begin_layout Standard
24743 If there is less vertical space than 6
24744 \begin_inset space ~
24745 \end_inset
24746
24747 text lines is left on the page at the beginning of the multiple columns,
24748  a page break will be inserted before the multiple columns.
24749  Depending on the number of lines of the preface text, you might want to
24750  change this space.
24751  This is done by setting the cursor into the mulitcolumn inset behind the
24752  preface (if there is any) and using the menu 
24753 \family sans
24754 Insert\SpecialChar menuseparator
24755 Space
24756 \begin_inset space ~
24757 \end_inset
24758
24759 Before
24760 \begin_inset space ~
24761 \end_inset
24762
24763 Page
24764 \begin_inset space ~
24765 \end_inset
24766
24767 Break
24768 \family default
24769 .
24770  Insert into that inset the amount of space like e.
24771 \begin_inset space \thinspace{}
24772 \end_inset
24773
24774 g.
24775 \begin_inset space \space{}
24776 \end_inset
24777
24778
24779 \begin_inset Quotes eld
24780 \end_inset
24781
24782 5cm
24783 \begin_inset Quotes erd
24784 \end_inset
24785
24786 .
24787 \begin_inset Newline newline
24788 \end_inset
24789
24790 In this example the space is set to 7
24791 \begin_inset space ~
24792 \end_inset
24793
24794 text lines by using 
24795 \begin_inset Flex Code
24796 status collapsed
24797
24798 \begin_layout Plain Layout
24799 7
24800 \backslash
24801 baselineskip
24802 \end_layout
24803
24804 \end_inset
24805
24806  (where the command 
24807 \begin_inset Flex Code
24808 status collapsed
24809
24810 \begin_layout Plain Layout
24811
24812 \backslash
24813 baselineskip
24814 \end_layout
24815
24816 \end_inset
24817
24818  needs to be inserted as \SpecialChar TeX
24819  code):
24820 \end_layout
24821
24822 \begin_layout Standard
24823 \begin_inset Flex Multiple Columns
24824 status open
24825
24826 \begin_layout Plain Layout
24827 \begin_inset Argument 3
24828 status open
24829
24830 \begin_layout Plain Layout
24831 7
24832 \begin_inset ERT
24833 status collapsed
24834
24835 \begin_layout Plain Layout
24836
24837
24838 \backslash
24839 baselineskip
24840 \end_layout
24841
24842 \end_inset
24843
24844
24845 \end_layout
24846
24847 \end_inset
24848
24849
24850 \size small
24851 On the evening of the crime, he returned from the club exactly at ten.
24852  His mother and sister were out spending the evening with a relation.
24853  The servant deposed that she heard him enter the front room on the second
24854  floor, generally used as his sitting-room.
24855  She had lit a fire there, and as it smoked she had opened the window.
24856  No sound was heard from the room until eleven-twenty, the hour of the return
24857  of Lady Maynooth and her daughter.
24858  Desiring to say good-night, she attempted to enter her son's room.
24859  The door was locked on the inside, and no answer could be got to their
24860  cries and knocking.
24861  Help was obtained, and the door forced.
24862  The unfortunate young man was found lying near the table.
24863  His head had been horribly mutilated by an expanding revolver bullet, but
24864  no weapon of any sort was to be found in the room.
24865 \end_layout
24866
24867 \end_inset
24868
24869
24870 \end_layout
24871
24872 \begin_layout Subsubsection
24873 Surrounding Space
24874 \end_layout
24875
24876 \begin_layout Standard
24877 The amount of space before and after multiple columns can be changed by
24878  changing the length 
24879 \begin_inset Flex Code
24880 status collapsed
24881
24882 \begin_layout Plain Layout
24883
24884 \backslash
24885 multicolsep
24886 \end_layout
24887
24888 \end_inset
24889
24890 .
24891  For example the command
24892 \end_layout
24893
24894 \begin_layout LyX-Code
24895
24896 \backslash
24897 setlength{
24898 \backslash
24899 multicolsep}{3cm}
24900 \end_layout
24901
24902 \begin_layout Standard
24903 in \SpecialChar TeX
24904  Code changes its value to 3
24905 \begin_inset space \thinspace{}
24906 \end_inset
24907
24908 cm.
24909  The change must be made before the multiple columns' start.
24910  The predefined value is 13
24911 \begin_inset space \thinspace{}
24912 \end_inset
24913
24914 pt.
24915 \end_layout
24916
24917 \begin_layout Standard
24918 For this example 
24919 \begin_inset Flex Code
24920 status collapsed
24921
24922 \begin_layout Plain Layout
24923
24924 \backslash
24925 multicolsep
24926 \end_layout
24927
24928 \end_inset
24929
24930  was set to 2.5
24931 \begin_inset space \thinspace{}
24932 \end_inset
24933
24934 cm:
24935 \end_layout
24936
24937 \begin_layout Standard
24938 \begin_inset ERT
24939 status open
24940
24941 \begin_layout Plain Layout
24942
24943
24944 \backslash
24945 setlength{
24946 \backslash
24947 multicolsep}{2.5cm}
24948 \end_layout
24949
24950 \end_inset
24951
24952
24953 \end_layout
24954
24955 \begin_layout Standard
24956 \begin_inset Flex Multiple Columns
24957 status open
24958
24959 \begin_layout Plain Layout
24960
24961 \size small
24962 All day I turned these facts over in my mind, endeavouring to hit upon some
24963  theory which could reconcile them all, and to find that line of least resistanc
24964 e which my poor friend had declared to be the starting-point of every investigat
24965 ion.
24966  I confess that I made little progress.
24967  In the evening I strolled across the Park, and found myself about six o'clock
24968  at the Oxford Street end of Park Lane.
24969  A group of loafers upon the pavements, all staring up at a particular window,
24970  directed me to the house which I had come to see.
24971  A tall, thin man with coloured glasses, whom I strongly suspected of being
24972  a plain-clothes detective, was pointing out some theory of his own, while
24973  the others crowded round to listen to what he said.
24974  I got as near him as I could, but his observations seemed to me to be absurd,
24975  so I withdrew again in some disgust.
24976  As I did so I struck against an elderly, deformed man, who had been behind
24977  me, and I knocked down several books which he was carrying.
24978 \end_layout
24979
24980 \end_inset
24981
24982
24983 \end_layout
24984
24985 \begin_layout Standard
24986 \begin_inset Note Greyedout
24987 status open
24988
24989 \begin_layout Plain Layout
24990
24991 \series bold
24992 Note:
24993 \series default
24994  The values you set with 
24995 \begin_inset Flex Code
24996 status collapsed
24997
24998 \begin_layout Plain Layout
24999
25000 \backslash
25001 setlength
25002 \end_layout
25003
25004 \end_inset
25005
25006  will be used for all following multiple columns until you change them again.
25007 \end_layout
25008
25009 \end_inset
25010
25011
25012 \end_layout
25013
25014 \begin_layout Standard
25015 \begin_inset ERT
25016 status collapsed
25017
25018 \begin_layout Plain Layout
25019
25020
25021 \backslash
25022 setlength{
25023 \backslash
25024 multicolsep}{13pt}
25025 \end_layout
25026
25027 \end_inset
25028
25029
25030 \begin_inset Note Note
25031 status collapsed
25032
25033 \begin_layout Plain Layout
25034 go back to the default
25035 \end_layout
25036
25037 \end_inset
25038
25039
25040 \end_layout
25041
25042 \begin_layout Standard
25043 \begin_inset Newpage newpage
25044 \end_inset
25045
25046
25047 \end_layout
25048
25049 \begin_layout Subsubsection
25050 Column Breaks
25051 \end_layout
25052
25053 \begin_layout Standard
25054 A column break can be forced by inserting the command 
25055 \begin_inset Flex Code
25056 status collapsed
25057
25058 \begin_layout Plain Layout
25059
25060 \backslash
25061 columnbreak{}
25062 \end_layout
25063
25064 \end_inset
25065
25066  as \SpecialChar TeX
25067  Code to that position in the text where the column should be broken.
25068  Note that this leads in most cases to whitespace in the text.
25069 \begin_inset Newline newline
25070 \end_inset
25071
25072 Here is an example:
25073 \end_layout
25074
25075 \begin_layout Standard
25076 \begin_inset Flex Multiple Columns
25077 status open
25078
25079 \begin_layout Plain Layout
25080
25081 \size small
25082 \begin_inset Quotes eld
25083 \end_inset
25084
25085 You're surprised to see me, sir,
25086 \begin_inset Quotes erd
25087 \end_inset
25088
25089  said he, in a strange, croaking voice.
25090 \end_layout
25091
25092 \begin_layout Plain Layout
25093
25094 \size small
25095 I acknowledged that I was.
25096 \end_layout
25097
25098 \begin_layout Plain Layout
25099
25100 \size small
25101 \begin_inset Quotes eld
25102 \end_inset
25103
25104 Well, I've a conscience, sir, and when I chanced to see you go into this
25105  house, as I came hobbling after you, I thought to myself, I'll just step
25106  in and see that kind gentleman, and tell him that if I was a bit gruff
25107  in my manner there was not any harm meant, and that I am much obliged to
25108  him for picking up my books.
25109 \begin_inset Quotes erd
25110 \end_inset
25111
25112
25113 \end_layout
25114
25115 \begin_layout Plain Layout
25116
25117 \size small
25118 \begin_inset Quotes eld
25119 \end_inset
25120
25121 You make too much of a trifle,
25122 \begin_inset Quotes erd
25123 \end_inset
25124
25125  said I.
25126  
25127 \begin_inset Quotes eld
25128 \end_inset
25129
25130 May I ask how you knew who I was?
25131 \begin_inset Quotes erd
25132 \end_inset
25133
25134  AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED.
25135 \begin_inset ERT
25136 status collapsed
25137
25138 \begin_layout Plain Layout
25139
25140
25141 \backslash
25142 columnbreak{}
25143 \end_layout
25144
25145 \end_inset
25146
25147
25148 \end_layout
25149
25150 \begin_layout Plain Layout
25151
25152 \size small
25153 \begin_inset Quotes eld
25154 \end_inset
25155
25156 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
25157  you'll find my little bookshop at the corner of Church Street, and very
25158  happy to see you, I am sure.
25159  Maybe you collect yourself, sir.
25160  Here's 
25161 \noun on
25162 British
25163 \begin_inset space ~
25164 \end_inset
25165
25166 Birds
25167 \noun default
25168 , and 
25169 \noun on
25170 Catullus
25171 \noun default
25172 , and 
25173 \noun on
25174 The Holy War
25175 \noun default
25176
25177 \begin_inset space ~
25178 \end_inset
25179
25180 – a bargain, every one of them.
25181  With five volumes you could just fill that gap on that second shelf.
25182  It looks untidy, does it not, sir?
25183 \begin_inset Quotes erd
25184 \end_inset
25185
25186
25187 \end_layout
25188
25189 \end_inset
25190
25191
25192 \end_layout
25193
25194 \begin_layout Subsubsection
25195 Column Separation
25196 \end_layout
25197
25198 \begin_layout Standard
25199 The width of the columns is automatically calculated, but you can modify
25200  the space between the columns.
25201  This is done by changing the length 
25202 \begin_inset Flex Code
25203 status collapsed
25204
25205 \begin_layout Plain Layout
25206
25207 \backslash
25208 columnsep
25209 \end_layout
25210
25211 \end_inset
25212
25213 .
25214  Its predefined value is 10
25215 \begin_inset space \thinspace{}
25216 \end_inset
25217
25218 pt.
25219  Here is an example where 
25220 \begin_inset Flex Code
25221 status collapsed
25222
25223 \begin_layout Plain Layout
25224
25225 \backslash
25226 columnsep
25227 \end_layout
25228
25229 \end_inset
25230
25231  is set to 3
25232 \begin_inset space \thinspace{}
25233 \end_inset
25234
25235 cm:
25236 \end_layout
25237
25238 \begin_layout Standard
25239 \begin_inset ERT
25240 status open
25241
25242 \begin_layout Plain Layout
25243
25244
25245 \backslash
25246 setlength{
25247 \backslash
25248 columnsep}{3cm}
25249 \end_layout
25250
25251 \end_inset
25252
25253
25254 \end_layout
25255
25256 \begin_layout Standard
25257 \begin_inset Flex Multiple Columns
25258 status open
25259
25260 \begin_layout Plain Layout
25261
25262 \size small
25263 My observations of No.
25264 \begin_inset space \space{}
25265 \end_inset
25266
25267 427 Park Lane did little to clear up the problem in which I was interested.
25268  The house was separated from the street by a low wall and railing, the
25269  whole not more than five feet high.
25270  It was perfectly easy, therefore, for anyone to get into the garden, but
25271  the window was entirely inaccessible, since there was no water pipe or
25272  anything which could help the most active man to climb it.
25273  More puzzled than ever, I retraced my steps to Kensington.
25274  I had not been in my study five minutes when the maid entered to say that
25275  a person desired to see me.
25276  To my astonishment it was none other than my strange old book collector,
25277  his sharp, wizened face peering out from a frame of white hair, and his
25278  precious volumes, a dozen of them at least, wedged under his right arm.
25279 \end_layout
25280
25281 \end_inset
25282
25283
25284 \end_layout
25285
25286 \begin_layout Standard
25287 \begin_inset ERT
25288 status collapsed
25289
25290 \begin_layout Plain Layout
25291
25292
25293 \backslash
25294 setlength{
25295 \backslash
25296 columnsep}{10pt}
25297 \end_layout
25298
25299 \end_inset
25300
25301
25302 \begin_inset Note Note
25303 status collapsed
25304
25305 \begin_layout Plain Layout
25306 go back to the default
25307 \end_layout
25308
25309 \end_inset
25310
25311
25312 \end_layout
25313
25314 \begin_layout Subsubsection
25315 Vertical Lines
25316 \end_layout
25317
25318 \begin_layout Standard
25319 Between the columns a rule with a width of the length 
25320 \begin_inset Flex Code
25321 status collapsed
25322
25323 \begin_layout Plain Layout
25324
25325 \backslash
25326 columnseprule
25327 \end_layout
25328
25329 \end_inset
25330
25331  is placed.
25332  If this rule width is set to 0
25333 \begin_inset space \thinspace{}
25334 \end_inset
25335
25336 pt (this is the default), the rule is suppressed.
25337  In the following example the rule is 2
25338 \begin_inset space \thinspace{}
25339 \end_inset
25340
25341 pt wide:
25342 \end_layout
25343
25344 \begin_layout Standard
25345 \begin_inset ERT
25346 status open
25347
25348 \begin_layout Plain Layout
25349
25350
25351 \backslash
25352 setlength{
25353 \backslash
25354 columnseprule}{2pt}
25355 \end_layout
25356
25357 \end_inset
25358
25359
25360 \end_layout
25361
25362 \begin_layout Standard
25363 \begin_inset Flex Multiple Columns
25364 status open
25365
25366 \begin_layout Plain Layout
25367
25368 \size small
25369 \begin_inset Quotes eld
25370 \end_inset
25371
25372 You're surprised to see me, sir,
25373 \begin_inset Quotes erd
25374 \end_inset
25375
25376  said he, in a strange, croaking voice.
25377 \end_layout
25378
25379 \begin_layout Plain Layout
25380
25381 \size small
25382 I acknowledged that I was.
25383 \end_layout
25384
25385 \begin_layout Plain Layout
25386
25387 \size small
25388 \begin_inset Quotes eld
25389 \end_inset
25390
25391 Well, I've a conscience, sir, and when I chanced to see you go into this
25392  house, as I came hobbling after you, I thought to myself, I'll just step
25393  in and see that kind gentleman, and tell him that if I was a bit gruff
25394  in my manner there was not any harm meant, and that I am much obliged to
25395  him for picking up my books.
25396 \begin_inset Quotes erd
25397 \end_inset
25398
25399
25400 \end_layout
25401
25402 \begin_layout Plain Layout
25403
25404 \size small
25405 \begin_inset Quotes eld
25406 \end_inset
25407
25408 You make too much of a trifle,
25409 \begin_inset Quotes erd
25410 \end_inset
25411
25412  said I.
25413  
25414 \begin_inset Quotes eld
25415 \end_inset
25416
25417 May I ask how you knew who I was?
25418 \begin_inset Quotes erd
25419 \end_inset
25420
25421
25422 \end_layout
25423
25424 \begin_layout Plain Layout
25425
25426 \size small
25427 \begin_inset Quotes eld
25428 \end_inset
25429
25430 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
25431  you'll find my little bookshop at the corner of Church Street, and very
25432  happy to see you, I am sure.
25433  Maybe you collect yourself, sir.
25434  Here's 
25435 \noun on
25436 British
25437 \begin_inset space ~
25438 \end_inset
25439
25440 Birds
25441 \noun default
25442 , and 
25443 \noun on
25444 Catullus
25445 \noun default
25446 , and 
25447 \noun on
25448 The Holy War
25449 \noun default
25450
25451 \begin_inset space ~
25452 \end_inset
25453
25454 – a bargain, every one of them.
25455  With five volumes you could just fill that gap on that second shelf.
25456  It looks untidy, does it not, sir?
25457 \begin_inset Quotes erd
25458 \end_inset
25459
25460
25461 \end_layout
25462
25463 \end_inset
25464
25465
25466 \end_layout
25467
25468 \begin_layout Standard
25469 \begin_inset VSpace defskip
25470 \end_inset
25471
25472
25473 \end_layout
25474
25475 \begin_layout Standard
25476 The rule can be colored by redefining the command 
25477 \begin_inset Flex Code
25478 status collapsed
25479
25480 \begin_layout Plain Layout
25481
25482 \backslash
25483 columnseprulecolor
25484 \end_layout
25485
25486 \end_inset
25487
25488 .
25489  This is done by inserting the command
25490 \end_layout
25491
25492 \begin_layout LyX-Code
25493
25494 \backslash
25495 renewcommand{
25496 \backslash
25497 columnseprulecolor}{
25498 \backslash
25499 color{red}}
25500 \end_layout
25501
25502 \begin_layout Standard
25503 as \SpecialChar TeX
25504  Code before the multicolumn inset.
25505  Replace 
25506 \begin_inset Flex Code
25507 status collapsed
25508
25509 \begin_layout Plain Layout
25510 red
25511 \end_layout
25512
25513 \end_inset
25514
25515  in this command by a color of your choice.
25516  You can use all pre- and self-defined colors.
25517  See the 
25518 \emph on
25519 EmbeddedObjects
25520 \emph default
25521  manual, section 
25522 \emph on
25523 Colored
25524 \begin_inset space ~
25525 \end_inset
25526
25527 Tables
25528 \emph default
25529  for more information about pre- and self-defined colors.
25530  To go back to the default color insert the command
25531 \end_layout
25532
25533 \begin_layout LyX-Code
25534
25535 \backslash
25536 renewcommand{
25537 \backslash
25538 columnseprulecolor}{
25539 \backslash
25540 normalcolor}
25541 \end_layout
25542
25543 \begin_layout Standard
25544 Here is the example with a cyan rule and 1
25545 \begin_inset space \thinspace{}
25546 \end_inset
25547
25548 cm column separation:
25549 \end_layout
25550
25551 \begin_layout Standard
25552 \begin_inset ERT
25553 status open
25554
25555 \begin_layout Plain Layout
25556
25557
25558 \backslash
25559 setlength{
25560 \backslash
25561 columnsep}{1cm}
25562 \end_layout
25563
25564 \begin_layout Plain Layout
25565
25566
25567 \backslash
25568 renewcommand{
25569 \backslash
25570 columnseprulecolor}{
25571 \backslash
25572 color{cyan}}
25573 \end_layout
25574
25575 \end_inset
25576
25577
25578 \end_layout
25579
25580 \begin_layout Standard
25581 \begin_inset Flex Multiple Columns
25582 status open
25583
25584 \begin_layout Plain Layout
25585
25586 \size small
25587 \begin_inset Quotes eld
25588 \end_inset
25589
25590 You're surprised to see me, sir,
25591 \begin_inset Quotes erd
25592 \end_inset
25593
25594  said he, in a strange, croaking voice.
25595 \end_layout
25596
25597 \begin_layout Plain Layout
25598
25599 \size small
25600 I acknowledged that I was.
25601 \end_layout
25602
25603 \begin_layout Plain Layout
25604
25605 \size small
25606 \begin_inset Quotes eld
25607 \end_inset
25608
25609 Well, I've a conscience, sir, and when I chanced to see you go into this
25610  house, as I came hobbling after you, I thought to myself, I'll just step
25611  in and see that kind gentleman, and tell him that if I was a bit gruff
25612  in my manner there was not any harm meant, and that I am much obliged to
25613  him for picking up my books.
25614 \begin_inset Quotes erd
25615 \end_inset
25616
25617
25618 \end_layout
25619
25620 \begin_layout Plain Layout
25621
25622 \size small
25623 \begin_inset Quotes eld
25624 \end_inset
25625
25626 You make too much of a trifle,
25627 \begin_inset Quotes erd
25628 \end_inset
25629
25630  said I.
25631  
25632 \begin_inset Quotes eld
25633 \end_inset
25634
25635 May I ask how you knew who I was?
25636 \begin_inset Quotes erd
25637 \end_inset
25638
25639
25640 \end_layout
25641
25642 \begin_layout Plain Layout
25643
25644 \size small
25645 \begin_inset Quotes eld
25646 \end_inset
25647
25648 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
25649  you'll find my little bookshop at the corner of Church Street, and very
25650  happy to see you, I am sure.
25651  Maybe you collect yourself, sir.
25652  Here's 
25653 \noun on
25654 British
25655 \begin_inset space ~
25656 \end_inset
25657
25658 Birds
25659 \noun default
25660 , and 
25661 \noun on
25662 Catullus
25663 \noun default
25664 , and 
25665 \noun on
25666 The Holy War
25667 \noun default
25668
25669 \begin_inset space ~
25670 \end_inset
25671
25672 – a bargain, every one of them.
25673  With five volumes you could just fill that gap on that second shelf.
25674  It looks untidy, does it not, sir?
25675 \begin_inset Quotes erd
25676 \end_inset
25677
25678
25679 \end_layout
25680
25681 \end_inset
25682
25683
25684 \end_layout
25685
25686 \begin_layout Standard
25687 \begin_inset ERT
25688 status collapsed
25689
25690 \begin_layout Plain Layout
25691
25692
25693 \backslash
25694 setlength{
25695 \backslash
25696 columnseprule}{0pt}
25697 \end_layout
25698
25699 \begin_layout Plain Layout
25700
25701
25702 \backslash
25703 renewcommand{
25704 \backslash
25705 columnseprulecolor}{
25706 \backslash
25707 normalcolor}
25708 \end_layout
25709
25710 \end_inset
25711
25712
25713 \begin_inset Note Note
25714 status collapsed
25715
25716 \begin_layout Plain Layout
25717 go back to the default
25718 \end_layout
25719
25720 \end_inset
25721
25722
25723 \end_layout
25724
25725 \begin_layout Section
25726 Non-standard Paragraph Shapes
25727 \end_layout
25728
25729 \begin_layout Standard
25730 \noindent
25731 \SpecialChar LaTeX
25732  as well as any other text processor uses by default rectangular paragraphs.
25733  For special cases like for example posters, invitation cards or poems you
25734  can modify the paragraph shape to one of your choice.
25735  This can be done by using the \SpecialChar LaTeX
25736 -package 
25737 \begin_inset Flex Code
25738 status collapsed
25739
25740 \begin_layout Plain Layout
25741 \noindent
25742 shapepar
25743 \end_layout
25744
25745 \end_inset
25746
25747  which is loaded by using in the document settings the module 
25748 \family sans
25749 Custom paragraph shapes
25750 \family default
25751 .
25752 \end_layout
25753
25754 \begin_layout Subsection
25755 Predefined shapes
25756 \end_layout
25757
25758 \begin_layout Standard
25759
25760 \series bold
25761 shapepar
25762 \series default
25763  provides the following shapes:
25764 \end_layout
25765
25766 \begin_layout Standard
25767 \begin_inset Tabular
25768 <lyxtabular version="3" rows="13" columns="3">
25769 <features booktabs="true" islongtable="true" longtabularalignment="center">
25770 <column alignment="left" valignment="middle" width="16col%">
25771 <column alignment="left" valignment="middle" width="40col%">
25772 <column alignment="left" valignment="middle" width="35col%">
25773 <row endhead="true">
25774 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25775 \begin_inset Text
25776
25777 \begin_layout Plain Layout
25778
25779 \series bold
25780 \size small
25781 Name
25782 \end_layout
25783
25784 \end_inset
25785 </cell>
25786 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25787 \begin_inset Text
25788
25789 \begin_layout Plain Layout
25790
25791 \series bold
25792 \size small
25793 Description
25794 \end_layout
25795
25796 \end_inset
25797 </cell>
25798 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
25799 \begin_inset Text
25800
25801 \begin_layout Plain Layout
25802
25803 \series bold
25804 \size small
25805 Annotation
25806 \end_layout
25807
25808 \end_inset
25809 </cell>
25810 </row>
25811 <row interlinespace="default">
25812 <cell alignment="left" valignment="top" usebox="none">
25813 \begin_inset Text
25814
25815 \begin_layout Plain Layout
25816
25817 \size small
25818 CDlabel
25819 \end_layout
25820
25821 \end_inset
25822 </cell>
25823 <cell alignment="left" valignment="top" usebox="none">
25824 \begin_inset Text
25825
25826 \begin_layout Plain Layout
25827
25828 \size small
25829 Circle with circular hole (in the size of a CD/DVD)
25830 \end_layout
25831
25832 \end_inset
25833 </cell>
25834 <cell alignment="left" valignment="top" usebox="none">
25835 \begin_inset Text
25836
25837 \begin_layout Plain Layout
25838
25839 \size small
25840 Cannot be scaled, take care there is not too much text
25841 \end_layout
25842
25843 \end_inset
25844 </cell>
25845 </row>
25846 <row interlinespace="default">
25847 <cell alignment="left" valignment="top" usebox="none">
25848 \begin_inset Text
25849
25850 \begin_layout Plain Layout
25851
25852 \size small
25853 Circle
25854 \end_layout
25855
25856 \end_inset
25857 </cell>
25858 <cell alignment="left" valignment="top" usebox="none">
25859 \begin_inset Text
25860
25861 \begin_layout Plain Layout
25862
25863 \size small
25864 Circle
25865 \end_layout
25866
25867 \end_inset
25868 </cell>
25869 <cell alignment="left" valignment="top" usebox="none">
25870 \begin_inset Text
25871
25872 \begin_layout Plain Layout
25873
25874 \size small
25875 Fragile, calculation might fail
25876 \end_layout
25877
25878 \end_inset
25879 </cell>
25880 </row>
25881 <row interlinespace="default">
25882 <cell alignment="left" valignment="top" usebox="none">
25883 \begin_inset Text
25884
25885 \begin_layout Plain Layout
25886
25887 \size small
25888 Diamond
25889 \end_layout
25890
25891 \end_inset
25892 </cell>
25893 <cell alignment="left" valignment="top" usebox="none">
25894 \begin_inset Text
25895
25896 \begin_layout Plain Layout
25897
25898 \size small
25899 Rhomboid (symbolizing a 
25900 \begin_inset Quotes eld
25901 \end_inset
25902
25903 diamond
25904 \begin_inset Quotes erd
25905 \end_inset
25906
25907 )
25908 \end_layout
25909
25910 \end_inset
25911 </cell>
25912 <cell alignment="left" valignment="top" usebox="none">
25913 \begin_inset Text
25914
25915 \begin_layout Plain Layout
25916
25917 \size small
25918 -
25919 \end_layout
25920
25921 \end_inset
25922 </cell>
25923 </row>
25924 <row interlinespace="default">
25925 <cell alignment="left" valignment="top" usebox="none">
25926 \begin_inset Text
25927
25928 \begin_layout Plain Layout
25929
25930 \size small
25931 Heart
25932 \end_layout
25933
25934 \end_inset
25935 </cell>
25936 <cell alignment="left" valignment="top" usebox="none">
25937 \begin_inset Text
25938
25939 \begin_layout Plain Layout
25940
25941 \size small
25942 Heart-like shape
25943 \end_layout
25944
25945 \end_inset
25946 </cell>
25947 <cell alignment="left" valignment="top" usebox="none">
25948 \begin_inset Text
25949
25950 \begin_layout Plain Layout
25951
25952 \size small
25953 -
25954 \end_layout
25955
25956 \end_inset
25957 </cell>
25958 </row>
25959 <row interlinespace="default">
25960 <cell alignment="left" valignment="top" usebox="none">
25961 \begin_inset Text
25962
25963 \begin_layout Plain Layout
25964
25965 \size small
25966 Hexagon
25967 \end_layout
25968
25969 \end_inset
25970 </cell>
25971 <cell alignment="left" valignment="top" usebox="none">
25972 \begin_inset Text
25973
25974 \begin_layout Plain Layout
25975
25976 \size small
25977 Hexagon
25978 \end_layout
25979
25980 \end_inset
25981 </cell>
25982 <cell alignment="left" valignment="top" usebox="none">
25983 \begin_inset Text
25984
25985 \begin_layout Plain Layout
25986
25987 \size small
25988 -
25989 \end_layout
25990
25991 \end_inset
25992 </cell>
25993 </row>
25994 <row interlinespace="default">
25995 <cell alignment="left" valignment="top" usebox="none">
25996 \begin_inset Text
25997
25998 \begin_layout Plain Layout
25999
26000 \size small
26001 Nut
26002 \end_layout
26003
26004 \end_inset
26005 </cell>
26006 <cell alignment="left" valignment="top" usebox="none">
26007 \begin_inset Text
26008
26009 \begin_layout Plain Layout
26010
26011 \size small
26012 Nut for bolt (hexagon with circular hole)
26013 \end_layout
26014
26015 \end_inset
26016 </cell>
26017 <cell alignment="left" valignment="top" usebox="none">
26018 \begin_inset Text
26019
26020 \begin_layout Plain Layout
26021
26022 \size small
26023 -
26024 \end_layout
26025
26026 \end_inset
26027 </cell>
26028 </row>
26029 <row interlinespace="default">
26030 <cell alignment="left" valignment="top" usebox="none">
26031 \begin_inset Text
26032
26033 \begin_layout Plain Layout
26034
26035 \size small
26036 Square
26037 \end_layout
26038
26039 \end_inset
26040 </cell>
26041 <cell alignment="left" valignment="top" usebox="none">
26042 \begin_inset Text
26043
26044 \begin_layout Plain Layout
26045
26046 \size small
26047 Square
26048 \end_layout
26049
26050 \end_inset
26051 </cell>
26052 <cell alignment="left" valignment="top" usebox="none">
26053 \begin_inset Text
26054
26055 \begin_layout Plain Layout
26056
26057 \size small
26058 -
26059 \end_layout
26060
26061 \end_inset
26062 </cell>
26063 </row>
26064 <row interlinespace="default">
26065 <cell alignment="left" valignment="top" usebox="none">
26066 \begin_inset Text
26067
26068 \begin_layout Plain Layout
26069
26070 \size small
26071 Star
26072 \end_layout
26073
26074 \end_inset
26075 </cell>
26076 <cell alignment="left" valignment="top" usebox="none">
26077 \begin_inset Text
26078
26079 \begin_layout Plain Layout
26080
26081 \size small
26082 Five-point star
26083 \end_layout
26084
26085 \end_inset
26086 </cell>
26087 <cell alignment="left" valignment="top" usebox="none">
26088 \begin_inset Text
26089
26090 \begin_layout Plain Layout
26091
26092 \size small
26093 -
26094 \end_layout
26095
26096 \end_inset
26097 </cell>
26098 </row>
26099 <row interlinespace="default">
26100 <cell alignment="left" valignment="top" usebox="none">
26101 \begin_inset Text
26102
26103 \begin_layout Plain Layout
26104
26105 \size small
26106 Candle
26107 \end_layout
26108
26109 \end_inset
26110 </cell>
26111 <cell alignment="left" valignment="top" usebox="none">
26112 \begin_inset Text
26113
26114 \begin_layout Plain Layout
26115
26116 \size small
26117 Burning candle
26118 \end_layout
26119
26120 \end_inset
26121 </cell>
26122 <cell alignment="left" valignment="top" usebox="none">
26123 \begin_inset Text
26124
26125 \begin_layout Plain Layout
26126
26127 \size small
26128 -
26129 \end_layout
26130
26131 \end_inset
26132 </cell>
26133 </row>
26134 <row interlinespace="default">
26135 <cell alignment="left" valignment="top" usebox="none">
26136 \begin_inset Text
26137
26138 \begin_layout Plain Layout
26139
26140 \size small
26141 Drop down/up
26142 \end_layout
26143
26144 \end_inset
26145 </cell>
26146 <cell alignment="left" valignment="top" usebox="none">
26147 \begin_inset Text
26148
26149 \begin_layout Plain Layout
26150
26151 \size small
26152 Normal/reversed rain drop
26153 \end_layout
26154
26155 \end_inset
26156 </cell>
26157 <cell alignment="left" valignment="top" usebox="none">
26158 \begin_inset Text
26159
26160 \begin_layout Plain Layout
26161
26162 \size small
26163 Fragile, calculation might fail
26164 \end_layout
26165
26166 \end_inset
26167 </cell>
26168 </row>
26169 <row interlinespace="default">
26170 <cell alignment="left" valignment="top" usebox="none">
26171 \begin_inset Text
26172
26173 \begin_layout Plain Layout
26174
26175 \size small
26176 \SpecialChar TeX
26177
26178 \end_layout
26179
26180 \end_inset
26181 </cell>
26182 <cell alignment="left" valignment="top" usebox="none">
26183 \begin_inset Text
26184
26185 \begin_layout Plain Layout
26186
26187 \size small
26188 The \SpecialChar TeX
26189  logo
26190 \end_layout
26191
26192 \end_inset
26193 </cell>
26194 <cell alignment="left" valignment="top" usebox="none">
26195 \begin_inset Text
26196
26197 \begin_layout Plain Layout
26198
26199 \size small
26200 -
26201 \end_layout
26202
26203 \end_inset
26204 </cell>
26205 </row>
26206 <row interlinespace="default">
26207 <cell alignment="left" valignment="top" bottomline="true" usebox="none">
26208 \begin_inset Text
26209
26210 \begin_layout Plain Layout
26211
26212 \size small
26213 Triangle up/down/
26214 \begin_inset Newline newline
26215 \end_inset
26216
26217 left/right
26218 \end_layout
26219
26220 \end_inset
26221 </cell>
26222 <cell alignment="left" valignment="top" bottomline="true" usebox="none">
26223 \begin_inset Text
26224
26225 \begin_layout Plain Layout
26226
26227 \size small
26228 Triangles in different orientations
26229 \end_layout
26230
26231 \end_inset
26232 </cell>
26233 <cell alignment="left" valignment="top" bottomline="true" usebox="none">
26234 \begin_inset Text
26235
26236 \begin_layout Plain Layout
26237
26238 \size small
26239 -
26240 \end_layout
26241
26242 \end_inset
26243 </cell>
26244 </row>
26245 </lyxtabular>
26246
26247 \end_inset
26248
26249
26250 \end_layout
26251
26252 \begin_layout Standard
26253 To use a shape for your paragraph, simply select it in \SpecialChar LyX
26254 's pull-down box
26255  for environments in the toolbar.
26256 \end_layout
26257
26258 \begin_layout Standard
26259 \begin_inset Newpage newpage
26260 \end_inset
26261
26262
26263 \end_layout
26264
26265 \begin_layout Standard
26266 Here is an example paragraph in the shape of a nut:
26267 \end_layout
26268
26269 \begin_layout Standard
26270 \begin_inset VSpace bigskip
26271 \end_inset
26272
26273
26274 \end_layout
26275
26276 \begin_layout Nut
26277
26278 \lang latin
26279 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26280  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26281  voluptua.
26282  At vero eos et accusam et justo duo dolores et ea rebum.
26283  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26284  sit amet.
26285  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26286  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26287  voluptua.
26288 \end_layout
26289
26290 \begin_layout Standard
26291 \begin_inset VSpace bigskip
26292 \end_inset
26293
26294
26295 \end_layout
26296
26297 \begin_layout Standard
26298 \begin_inset Note Greyedout
26299 status open
26300
26301 \begin_layout Plain Layout
26302
26303 \series bold
26304 Note
26305 \series default
26306
26307 \family sans
26308 shapepar
26309 \family default
26310  paragraphs cannot run over a page break.
26311 \end_layout
26312
26313 \end_inset
26314
26315
26316 \end_layout
26317
26318 \begin_layout Standard
26319 \begin_inset VSpace bigskip
26320 \end_inset
26321
26322
26323 \end_layout
26324
26325 \begin_layout Standard
26326 The package 
26327 \begin_inset Flex Code
26328 status collapsed
26329
26330 \begin_layout Plain Layout
26331 shapepar
26332 \end_layout
26333
26334 \end_inset
26335
26336  takes care that the shape will always be preserved, no matter how much
26337  text is in the paragraph.
26338  Therefore the paragraph size changes with the amount of contained text.
26339  This can lead to paragraph sizes exceeding the page margins.
26340  To demonstrate the size scaling, here is the same example paragraph but
26341  with twice as much text:
26342 \end_layout
26343
26344 \begin_layout Standard
26345 \begin_inset Newpage newpage
26346 \end_inset
26347
26348
26349 \end_layout
26350
26351 \begin_layout Nut
26352
26353 \lang latin
26354 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26355  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26356  voluptua.
26357  At vero eos et accusam et justo duo dolores et ea rebum.
26358  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26359  sit amet.
26360  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26361  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26362  voluptua.
26363  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26364  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26365  voluptua.
26366  At vero eos et accusam et justo duo dolores et ea rebum.
26367  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26368  sit amet.
26369  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26370  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26371  voluptua.
26372 \end_layout
26373
26374 \begin_layout Standard
26375 \begin_inset VSpace bigskip
26376 \end_inset
26377
26378
26379 \end_layout
26380
26381 \begin_layout Standard
26382 An exception is the shape 
26383 \family sans
26384 CDlabel
26385 \family default
26386 .
26387  It cannot be scaled because it must fit the size of a CD/DVD.
26388  Therefore the amount of text that fits into the shape is limited.
26389 \begin_inset Newline newline
26390 \end_inset
26391
26392 The 
26393 \family sans
26394 drop
26395 \family default
26396  shapes and the 
26397 \family sans
26398 circle
26399 \family default
26400  shape are fragile, meaning that the calculation of their size can fail,
26401  depending on the amount of text.
26402  You will then get the \SpecialChar LaTeX
26403  error 
26404 \begin_inset Quotes eld
26405 \end_inset
26406
26407 Arithmetic overflow
26408 \begin_inset Quotes erd
26409 \end_inset
26410
26411 .
26412  In this case one can try to remove or add some text; if nothing works one
26413  has to use another shape.
26414 \end_layout
26415
26416 \begin_layout Standard
26417 \begin_inset VSpace bigskip
26418 \end_inset
26419
26420
26421 \end_layout
26422
26423 \begin_layout Standard
26424 For shapes with tips you will maybe see that \SpecialChar LaTeX
26425 's hyphenation routine fails
26426  for text in the tips.
26427  Therefore it is often necessary to add hyphenation points 
26428 \family sans
26429 (
26430 \begin_inset Info
26431 type  "shortcut"
26432 arg   "specialchar-insert hyphenation"
26433 \end_inset
26434
26435
26436 \family default
26437 ) to the corresponding text parts.
26438 \end_layout
26439
26440 \begin_layout Standard
26441 \begin_inset VSpace bigskip
26442 \end_inset
26443
26444
26445 \end_layout
26446
26447 \begin_layout Standard
26448 Shapepar paragraphs are either always centered or placed on the page so
26449  that their left border touches the left page margin.
26450  You can therefore not use the paragraph dialog to align such paragraphs.
26451  A solution is to put the paragraph into a minipage or parbox and align
26452  the box.
26453  The problem is hereby to find the right width for the box.
26454  Because if it is too wide and you center the box, the paragraph is not
26455  centered too because it sticks at the left side of the box.
26456  So you might have to play a bit with the width until it fits.
26457  Here are two heart-shaped paragraphs, the first one is not aligned, the
26458  second one is right-aligned:
26459 \end_layout
26460
26461 \begin_layout Standard
26462 \begin_inset Newpage newpage
26463 \end_inset
26464
26465
26466 \end_layout
26467
26468 \begin_layout Heart
26469 \noindent
26470
26471 \lang latin
26472 Lo\SpecialChar softhyphen
26473 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26474  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26475  voluptua.
26476  At vero eos et accusam et justo duo dolores et ea rebum.
26477  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26478  sit amet.
26479 \end_layout
26480
26481 \begin_layout Standard
26482 \begin_inset VSpace bigskip
26483 \end_inset
26484
26485
26486 \end_layout
26487
26488 \begin_layout Standard
26489 \noindent
26490 \align right
26491 \begin_inset Box Frameless
26492 position "t"
26493 hor_pos "c"
26494 has_inner_box 1
26495 inner_pos "t"
26496 use_parbox 1
26497 use_makebox 0
26498 width "42col%"
26499 special "none"
26500 height "1in"
26501 height_special "totalheight"
26502 thickness "0.4pt"
26503 separation "3pt"
26504 shadowsize "4pt"
26505 framecolor "black"
26506 backgroundcolor "none"
26507 status open
26508
26509 \begin_layout Heart
26510 \noindent
26511
26512 \lang latin
26513 Lo\SpecialChar softhyphen
26514 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26515  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26516  voluptua.
26517  At vero eos et accusam et justo duo dolores et ea rebum.
26518  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26519  sit amet.
26520 \end_layout
26521
26522 \end_inset
26523
26524
26525 \end_layout
26526
26527 \begin_layout Subsection
26528 Custom shapes
26529 \end_layout
26530
26531 \begin_layout Standard
26532 You can define any shape you want.
26533  Doing this manually is a lot of work because every coordinate must be specified.
26534  But there is a way to let the computer calculate the coordinates:
26535 \end_layout
26536
26537 \begin_layout Enumerate
26538 Install the program 
26539 \begin_inset CommandInset href
26540 LatexCommand href
26541 name "Jpgfdraw"
26542 target "https://www.ctan.org/tex-archive/graphics/jpgfdraw"
26543 literal "false"
26544
26545 \end_inset
26546
26547 .
26548 \end_layout
26549
26550 \begin_layout Enumerate
26551 In 
26552 \family sans
26553 Jpgfdraw
26554 \family default
26555  go to the menu 
26556 \family sans
26557 TeX/LaTeX\SpecialChar menuseparator
26558 Settings\SpecialChar menuseparator
26559 Set Normal Size
26560 \family default
26561  and select the font size you are using in your document.
26562  For example this document uses the size 12
26563 \begin_inset space \thinspace{}
26564 \end_inset
26565
26566 pt.
26567 \end_layout
26568
26569 \begin_layout Enumerate
26570 Draw a shape.
26571 \end_layout
26572
26573 \begin_layout Enumerate
26574 Use the menu 
26575 \family sans
26576 TeX/LaTeX\SpecialChar menuseparator
26577 Shapepar
26578 \family default
26579  to export the shape to coordinates.
26580  In the appearing dialog use either the outline of your shape for the coordinate
26581 s or the path itself.
26582 \begin_inset Foot
26583 status collapsed
26584
26585 \begin_layout Plain Layout
26586 For more information see 
26587 \begin_inset CommandInset href
26588 LatexCommand href
26589 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
26590 literal "false"
26591
26592 \end_inset
26593
26594
26595 \end_layout
26596
26597 \end_inset
26598
26599
26600 \end_layout
26601
26602 \begin_layout Standard
26603 The coordinates are written into a \SpecialChar TeX
26604  file.
26605  To use it for your \SpecialChar LyX
26606  document
26607 \end_layout
26608
26609 \begin_layout Enumerate
26610 Place the cursor before the first character of your paragraph (or into a
26611  new empty one).
26612 \end_layout
26613
26614 \begin_layout Enumerate
26615 Open in \SpecialChar LyX
26616  the menu 
26617 \family sans
26618 Insert\SpecialChar menuseparator
26619 File\SpecialChar menuseparator
26620 Child
26621 \begin_inset space ~
26622 \end_inset
26623
26624 Document
26625 \family default
26626 , select the file and use 
26627 \family sans
26628 Input
26629 \family default
26630  as 
26631 \family sans
26632 Include Type.
26633 \end_layout
26634
26635 \begin_layout Standard
26636 \begin_inset VSpace defskip
26637 \end_inset
26638
26639
26640 \end_layout
26641
26642 \begin_layout Standard
26643 \begin_inset Note Greyedout
26644 status open
26645
26646 \begin_layout Plain Layout
26647
26648 \series bold
26649 Note
26650 \series default
26651 : The changed shape only applies to the current paragraph; everything is
26652  reset to normal for the next paragraph.
26653  Therefore the shape definition file must be input into every paragraph
26654  with the desired shape.
26655 \end_layout
26656
26657 \end_inset
26658
26659
26660 \end_layout
26661
26662 \begin_layout Standard
26663 \begin_inset VSpace bigskip
26664 \end_inset
26665
26666
26667 \end_layout
26668
26669 \begin_layout Standard
26670 Here is an example:
26671 \end_layout
26672
26673 \begin_layout Standard
26674 \begin_inset VSpace bigskip
26675 \end_inset
26676
26677
26678 \end_layout
26679
26680 \begin_layout Standard
26681 \begin_inset CommandInset include
26682 LatexCommand input
26683 filename "SpecialParagraphShape.tex"
26684
26685 \end_inset
26686
26687
26688 \lang latin
26689 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26690  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26691  voluptua.
26692  At vero eos et accusam et justo duo dolores et ea rebum.
26693  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26694  sit amet.
26695  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26696  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26697  voluptua.
26698 \end_layout
26699
26700 \begin_layout Standard
26701 \begin_inset VSpace bigskip
26702 \end_inset
26703
26704
26705 \end_layout
26706
26707 \begin_layout Standard
26708
26709 \series bold
26710 A tip:
26711 \series default
26712  to draw complexer shapes in 
26713 \family sans
26714 Jpgfdraw
26715 \family default
26716  you can draw the shape in a program of your choice and import the resulting
26717  image to 
26718 \family sans
26719 Jpgfdraw
26720 \family default
26721 .
26722  Then you only need to draw a line or spline along the outline of the image.
26723 \end_layout
26724
26725 \begin_layout Standard
26726 \begin_inset VSpace bigskip
26727 \end_inset
26728
26729
26730 \end_layout
26731
26732 \begin_layout Standard
26733 The module 
26734 \family sans
26735 Custom paragraph shapes
26736 \family default
26737  also provides the two commands 
26738 \family sans
26739 shapepar
26740 \family default
26741  and 
26742 \family sans
26743 Shapepar
26744 \family default
26745  which can be used to define custom shapes coordinate by coordinate.
26746 \begin_inset Foot
26747 status collapsed
26748
26749 \begin_layout Plain Layout
26750 These commands are internally used for all shapes described here.
26751 \end_layout
26752
26753 \end_inset
26754
26755  For information how these styles are used and about further customization
26756  possibilities, have a look at the 
26757 \begin_inset CommandInset href
26758 LatexCommand href
26759 name "documentation"
26760 target "https://www.ctan.org/tex-archive/macros/latex/contrib/shapepar/shapepar.pdf"
26761 literal "false"
26762
26763 \end_inset
26764
26765  of the package 
26766 \begin_inset Flex Code
26767 status collapsed
26768
26769 \begin_layout Plain Layout
26770 shapepar
26771 \end_layout
26772
26773 \end_inset
26774
26775 .
26776 \end_layout
26777
26778 \end_body
26779 \end_document