]> git.lyx.org Git - features.git/blob - lib/doc/Additional.lyx
DocBook: add some documentation in Additional.
[features.git] / lib / doc / Additional.lyx
1 #LyX 2.4 created this file. For more info see https://www.lyx.org/
2 \lyxformat 608
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 no
41 \language english
42 \language_package default
43 \inputencoding utf8
44 \fontencoding auto
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_roman_osf false
53 \font_sans_osf false
54 \font_typewriter_osf false
55 \font_sf_scale 100 100
56 \font_tt_scale 100 100
57 \use_microtype false
58 \use_dash_ligatures true
59 \graphics default
60 \default_output_format pdf2
61 \output_sync 0
62 \bibtex_command default
63 \index_command default
64 \paperfontsize 12
65 \spacing single
66 \use_hyperref true
67 \pdf_title "LyX's Additional Features manual"
68 \pdf_author "LyX Team"
69 \pdf_subject "LyX's additional features documentation"
70 \pdf_keywords "LyX, Documentation, Additional"
71 \pdf_bookmarks true
72 \pdf_bookmarksnumbered true
73 \pdf_bookmarksopen false
74 \pdf_bookmarksopenlevel 1
75 \pdf_breaklinks false
76 \pdf_pdfborder false
77 \pdf_colorlinks true
78 \pdf_backref false
79 \pdf_pdfusetitle false
80 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
81 \papersize a4
82 \use_geometry false
83 \use_package amsmath 1
84 \use_package amssymb 1
85 \use_package cancel 1
86 \use_package esint 1
87 \use_package mathdots 1
88 \use_package mathtools 1
89 \use_package mhchem 1
90 \use_package stackrel 1
91 \use_package stmaryrd 1
92 \use_package undertilde 1
93 \cite_engine basic
94 \cite_engine_type default
95 \biblio_style plain
96 \use_bibtopic false
97 \use_indices false
98 \paperorientation portrait
99 \suppress_date false
100 \justification true
101 \use_refstyle 0
102 \use_minted 0
103 \use_lineno 0
104 \notefontcolor #0000ff
105 \index Index
106 \shortcut idx
107 \color #008000
108 \end_index
109 \secnumdepth 3
110 \tocdepth 3
111 \paragraph_separation indent
112 \paragraph_indentation default
113 \is_math_indent 1
114 \math_indentation default
115 \math_numbering_side default
116 \quotes_style english
117 \dynamic_quotes 0
118 \papercolumns 1
119 \papersides 2
120 \paperpagestyle headings
121 \tablestyle default
122 \tracking_changes true
123 \output_changes false
124 \change_bars false
125 \postpone_fragile_content false
126 \html_math_output 0
127 \html_css_as_file 0
128 \html_be_strict true
129 \docbook_table_output 0
130 \docbook_mathml_prefix 1
131 \author -712698321 "Jürgen Spitzmüller"
132 \author 5863208 "ab"
133 \author 244031559 "Yuriy"
134 \author 1075283030 "Thibaut"
135 \author 1119979965 "Joel A. Kulesza"
136 \end_header
137
138 \begin_body
139
140 \begin_layout Title
141 Additional \SpecialChar LyX
142  Features
143 \end_layout
144
145 \begin_layout Subtitle
146 Version 2.3.x
147 \end_layout
148
149 \begin_layout Author
150 by the \SpecialChar LyX
151  Team
152 \begin_inset Foot
153 status collapsed
154
155 \begin_layout Plain Layout
156 \noindent
157 Principal maintainer of this file is
158 \noun on
159  Richard Kimberly Heck
160 \noun default
161 .
162  If you have comments or error corrections, please send them to the \SpecialChar LyX
163  Documentati
164 on mailing list, 
165 \begin_inset Flex Code
166 status collapsed
167
168 \begin_layout Plain Layout
169 <lyx-docs@lists.lyx.org>
170 \end_layout
171
172 \end_inset
173
174 .
175 \end_layout
176
177 \end_inset
178
179
180 \end_layout
181
182 \begin_layout Standard
183 \begin_inset CommandInset toc
184 LatexCommand tableofcontents
185
186 \end_inset
187
188
189 \end_layout
190
191 \begin_layout Chapter
192 Introduction
193 \end_layout
194
195 \begin_layout Standard
196 This manual is essentially Part II of the 
197 \emph on
198 User's Guide\SpecialChar endofsentence
199
200 \emph default
201  The reason for separating the two documents is simple: the 
202 \emph on
203 User's Guide
204 \emph default
205  is already quite lengthy, and it contains information on all of the basic
206  features one needs to know in order to prepare most documents.
207  However, the \SpecialChar LyX
208  Team has worked to make \SpecialChar LyX
209  extensible through various configuration
210  files and external packages.
211  That means that if you want to support the Fizzwizzle \SpecialChar LaTeX
212  package, you can
213  create a layout file (or module) for it without having to alter \SpecialChar LyX
214  itself.
215  We've already had contributions of several new features this way, and some
216  of them are documented here.
217  There are also some more `advanced' features, such as how to control the
218  presentation of bibliographies and how to work with multi-part documents,
219  that are not covered in the 
220 \emph on
221 User's Guide
222 \emph default
223  and are discussed here.
224 \end_layout
225
226 \begin_layout Standard
227 This manual also documents some special features, like fax support
228 \change_deleted 244031559 1603802929
229 ,
230 \change_inserted 244031559 1603802931
231  and
232 \change_unchanged
233  version control
234 \change_deleted 244031559 1603802954
235 , and SGML support
236 \change_unchanged
237 , which require additional software to work properly.
238  There is also a chapter on \SpecialChar LyX
239 's support for HTML.
240  And lastly, there's a chapter of \SpecialChar LaTeX
241  tools and tips, things you can use to
242  spruce up your documents by directly using the powerful features of \SpecialChar LaTeX
243 .
244  After all, \SpecialChar LyX
245  
246 \emph on
247 is
248 \emph default
249  only WYSIWYM and will only ever interface to some, not all, \SpecialChar LaTeX
250  features.
251 \end_layout
252
253 \begin_layout Standard
254 If you haven't read the 
255 \emph on
256 Introduction
257 \emph default
258  yet, you are definitely in the wrong manual.
259  The 
260 \emph on
261 Introduction
262 \emph default
263  is the first place to go, since it describes the notation and format of
264  all of the manuals.
265  You should also be thoroughly familiar with the 
266 \emph on
267 User's Guide
268 \emph default
269  and all of the basic features of \SpecialChar LyX
270  before attempting to read this one.
271 \end_layout
272
273 \begin_layout Standard
274 Since many of the topics in this manual depend heavily on \SpecialChar LyX
275 's interaction
276  with \SpecialChar LaTeX
277 , this first chapter covers the inner workings of \SpecialChar LyX
278  and how to direct
279  \SpecialChar LyX
280  to generate exactly the \SpecialChar LaTeX
281  code you want.
282  It is obviously for more seasoned \SpecialChar LyX
283  users.
284 \end_layout
285
286 \begin_layout Chapter
287 \SpecialChar LyX
288  and \SpecialChar LaTeX
289
290 \end_layout
291
292 \begin_layout Section
293 How \SpecialChar LyX
294  Uses \SpecialChar LaTeX
295
296 \end_layout
297
298 \begin_layout Standard
299 This chapter is for both \SpecialChar TeX
300 -nicians and the \SpecialChar LaTeX
301 -curious.
302  In it, we'll explain how \SpecialChar LyX
303  and \SpecialChar LaTeX
304  work together to produce printable output.
305  This is the only place in any of the manuals where we assume you know something
306  about \SpecialChar LaTeX
307 .
308 \end_layout
309
310 \begin_layout Standard
311 At one time, \SpecialChar LyX
312  was called a 
313 \begin_inset Quotes eld
314 \end_inset
315
316 WYSIWYM frontend to \SpecialChar LaTeX
317 ,
318 \begin_inset Quotes erd
319 \end_inset
320
321  but that's no longer true.
322  There are frontends to \SpecialChar LaTeX
323  out there.
324 \begin_inset Foot
325 status collapsed
326
327 \begin_layout Plain Layout
328 Some familar ones are \SpecialChar TeX
329 maker and kile, on Linux, and \SpecialChar TeX
330 shop, OSX.
331  There are also the \SpecialChar LaTeX
332  modes for vi and emacs, of course.
333 \end_layout
334
335 \end_inset
336
337  These are basically text editors with the ability to run \SpecialChar LaTeX
338  and mark any
339  errors in the file you're editing.
340  Although \SpecialChar LyX
341  
342 \emph on
343 is
344 \emph default
345  an editor, and it 
346 \emph on
347 does
348 \emph default
349  run \SpecialChar LaTeX
350 , and it also indicates errors in the file, it also does much, much
351  more.
352  For one thing, you don't need to know \SpecialChar LaTeX
353  to use \SpecialChar LyX
354  effectively.
355  And \SpecialChar LyX
356  has added its own extensions to \SpecialChar LaTeX
357 .
358  Try the following sometime: select 
359 \begin_inset Flex Noun
360 status collapsed
361
362 \begin_layout Plain Layout
363 Export\SpecialChar menuseparator
364 LaTeX
365 \end_layout
366
367 \end_inset
368
369  from the 
370 \begin_inset Flex Noun
371 status collapsed
372
373 \begin_layout Plain Layout
374 File
375 \end_layout
376
377 \end_inset
378
379  menu (or 
380 \begin_inset Flex Noun
381 status collapsed
382
383 \begin_layout Plain Layout
384 View\SpecialChar menuseparator
385 Source
386 \begin_inset space ~
387 \end_inset
388
389 Pane
390 \end_layout
391
392 \end_inset
393
394 ), then look at the preamble of the resulting 
395 \begin_inset Flex Code
396 status collapsed
397
398 \begin_layout Plain Layout
399 .tex
400 \end_layout
401
402 \end_inset
403
404  file.
405  You'll notice a variety of new macros defined specifically by \SpecialChar LyX
406 .
407  These macros are defined automatically, according to the features you use
408  in the document.
409 \end_layout
410
411 \begin_layout Standard
412 There are several commands that automatically invoke \SpecialChar LaTeX
413 .
414  They are:
415 \end_layout
416
417 \begin_layout Itemize
418 \begin_inset Flex Noun
419 status collapsed
420
421 \begin_layout Plain Layout
422 Document\SpecialChar menuseparator
423 View
424 \end_layout
425
426 \end_inset
427
428
429 \end_layout
430
431 \begin_layout Itemize
432 \begin_inset Flex Noun
433 status collapsed
434
435 \begin_layout Plain Layout
436 Document\SpecialChar menuseparator
437 Update
438 \end_layout
439
440 \end_inset
441
442
443 \end_layout
444
445 \begin_layout Standard
446 They will only invoke \SpecialChar LaTeX
447  if the file has changed since the last time \SpecialChar LaTeX
448  was
449  run.
450  
451 \end_layout
452
453 \begin_layout Standard
454 When \SpecialChar LyX
455  runs \SpecialChar LaTeX
456  on the file you're editing, it performs these steps:
457 \end_layout
458
459 \begin_layout Enumerate
460 Convert the document to \SpecialChar LaTeX
461  and save to a file with the extension 
462 \begin_inset Flex Code
463 status collapsed
464
465 \begin_layout Plain Layout
466 .tex
467 \end_layout
468
469 \end_inset
470
471  in place of 
472 \begin_inset Flex Code
473 status collapsed
474
475 \begin_layout Plain Layout
476 .lyx
477 \end_layout
478
479 \end_inset
480
481 .
482 \end_layout
483
484 \begin_layout Enumerate
485 Run \SpecialChar LaTeX
486  on the 
487 \begin_inset Flex Code
488 status collapsed
489
490 \begin_layout Plain Layout
491 .tex
492 \end_layout
493
494 \end_inset
495
496  file (maybe several times), and run any other commands (such as 
497 \begin_inset Flex Code
498 status collapsed
499
500 \begin_layout Plain Layout
501 bibtex
502 \end_layout
503
504 \end_inset
505
506  or 
507 \begin_inset Flex Code
508 status collapsed
509
510 \begin_layout Plain Layout
511 makeindex
512 \end_layout
513
514 \end_inset
515
516 ) needed to compile the \SpecialChar LaTeX
517  file.
518 \end_layout
519
520 \begin_layout Enumerate
521 If there are any errors, show the error log.
522 \end_layout
523
524 \begin_layout Standard
525 If you have run \SpecialChar LaTeX
526  using 
527 \begin_inset Flex Noun
528 status collapsed
529
530 \begin_layout Plain Layout
531 View\SpecialChar menuseparator
532 DVI
533 \end_layout
534
535 \end_inset
536
537 , \SpecialChar LyX
538  then runs a DVI viewer to display the DVI-file.
539  If you have used 
540 \begin_inset Flex Noun
541 status collapsed
542
543 \begin_layout Plain Layout
544 View\SpecialChar menuseparator
545 PostScript
546 \end_layout
547
548 \end_inset
549
550 , \SpecialChar LyX
551  performs further steps:
552 \end_layout
553
554 \begin_layout Enumerate
555 Run 
556 \begin_inset Flex Code
557 status collapsed
558
559 \begin_layout Plain Layout
560 dvips
561 \end_layout
562
563 \end_inset
564
565  to convert the DVI file to PostScript.
566 \end_layout
567
568 \begin_layout Enumerate
569 Run a PostScript viewer, such as 
570 \begin_inset Flex Code
571 status collapsed
572
573 \begin_layout Plain Layout
574 ghostview
575 \end_layout
576
577 \end_inset
578
579 , to display the PostScript file.
580 \end_layout
581
582 \begin_layout Standard
583 \SpecialChar LyX
584  does similar things when viewing, or exporting, other formats.
585 \end_layout
586
587 \begin_layout Section
588 Translating \SpecialChar LaTeX
589  files into \SpecialChar LyX
590
591 \end_layout
592
593 \begin_layout Standard
594 You can import a \SpecialChar LaTeX
595  file into \SpecialChar LyX
596  by using the 
597 \begin_inset Flex Noun
598 status collapsed
599
600 \begin_layout Plain Layout
601 File\SpecialChar menuseparator
602 Import\SpecialChar menuseparator
603 LaTeX
604 \end_layout
605
606 \end_inset
607
608  command in \SpecialChar LyX
609 .
610  This will call a program named 
611 \begin_inset Flex Code
612 status collapsed
613
614 \begin_layout Plain Layout
615 tex2lyx
616 \end_layout
617
618 \end_inset
619
620  which will create a file 
621 \begin_inset Flex Code
622 status collapsed
623
624 \begin_layout Plain Layout
625 foo.lyx
626 \end_layout
627
628 \end_inset
629
630  from the file 
631 \begin_inset Flex Code
632 status collapsed
633
634 \begin_layout Plain Layout
635 foo.tex
636 \end_layout
637
638 \end_inset
639
640 .
641  \SpecialChar LyX
642  will then open that file.
643 \begin_inset Foot
644 status collapsed
645
646 \begin_layout Plain Layout
647 \begin_inset Flex Code
648 status collapsed
649
650 \begin_layout Plain Layout
651 tex2lyx
652 \end_layout
653
654 \end_inset
655
656  can also be run from the command line, of course.
657 \end_layout
658
659 \end_inset
660
661
662 \end_layout
663
664 \begin_layout Standard
665 \begin_inset Flex Code
666 status collapsed
667
668 \begin_layout Plain Layout
669 tex2lyx
670 \end_layout
671
672 \end_inset
673
674  will translate most legal \SpecialChar LaTeX
675 , but not everything.
676  It will put things it doesn't understand into \SpecialChar TeX
677  code, so after translating
678  a file with 
679 \begin_inset Flex Code
680 status collapsed
681
682 \begin_layout Plain Layout
683 tex2lyx
684 \end_layout
685
686 \end_inset
687
688 , you can look for \SpecialChar TeX
689  code and hand-edit it until it looks right.
690 \end_layout
691
692 \begin_layout Standard
693 If you don't know what \SpecialChar TeX
694  code is, read the next section.
695 \end_layout
696
697 \begin_layout Section
698 \begin_inset CommandInset label
699 LatexCommand label
700 name "sec:Inserting-TeX-Code"
701
702 \end_inset
703
704 Inserting \SpecialChar TeX
705  Code into \SpecialChar LyX
706  Documents 
707 \end_layout
708
709 \begin_layout Standard
710 Anything you can do in \SpecialChar LaTeX
711  you can do in \SpecialChar LyX
712 , for a very simple reason: You can
713  always insert \SpecialChar TeX
714  code into any \SpecialChar LyX
715  document.
716  \SpecialChar LyX
717  cannot, and will never be able to, display every possible \SpecialChar LaTeX
718  construct.
719  If ever you need to insert \SpecialChar LaTeX
720  commands into your \SpecialChar LyX
721  document, you can use the
722  
723 \begin_inset Flex Code
724 status collapsed
725
726 \begin_layout Plain Layout
727 \SpecialChar TeX
728  Code
729 \end_layout
730
731 \end_inset
732
733  box, which you can insert into your document with 
734 \begin_inset Flex Noun
735 status collapsed
736
737 \begin_layout Plain Layout
738 Insert\SpecialChar menuseparator
739
740 \family sans
741 TeX
742 \family default
743  Code
744 \end_layout
745
746 \end_inset
747
748  or the keyboard shortcut 
749 \begin_inset Info
750 type  "shortcut"
751 arg   "ert-insert"
752 \end_inset
753
754 .
755 \end_layout
756
757 \begin_layout Standard
758 Here's an example of inserting \SpecialChar LaTeX
759  commands in a \SpecialChar LyX
760  document.
761  The code looks like this:
762 \end_layout
763
764 \begin_layout LyX-Code
765
766 \backslash
767 begin{tabular}{ll}
768 \begin_inset Newline newline
769 \end_inset
770
771
772 \backslash
773 begin{minipage}{5cm}
774 \begin_inset Newline newline
775 \end_inset
776
777 This is an example of a minipage environment.
778  You 
779 \begin_inset Newline newline
780 \end_inset
781
782 can put nearly everything in it, even (non-floating) 
783 \begin_inset Newline newline
784 \end_inset
785
786 figures and tables.
787  
788 \begin_inset Newline newline
789 \end_inset
790
791
792 \backslash
793 end{minipage}
794 \begin_inset Newline newline
795 \end_inset
796
797 &
798 \begin_inset Newline newline
799 \end_inset
800
801
802 \backslash
803 begin{minipage}{5cm}
804 \begin_inset Newline newline
805 \end_inset
806
807
808 \backslash
809 begin{verbatim}
810 \begin_inset Newline newline
811 \end_inset
812
813
814 \backslash
815 begin{minipage}{5cm}
816 \begin_inset Newline newline
817 \end_inset
818
819 This ...
820  
821 \begin_inset Newline newline
822 \end_inset
823
824
825 \backslash
826 end{minipage}
827 \begin_inset Newline newline
828 \end_inset
829
830
831 \backslash
832 end{verbatim}
833 \begin_inset Newline newline
834 \end_inset
835
836
837 \backslash
838 end{minipage}
839 \begin_inset Newline newline
840 \end_inset
841
842
843 \backslash
844 end{tabular}
845 \end_layout
846
847 \begin_layout LyX-Code
848
849 \end_layout
850
851 \begin_layout Standard
852 The 
853 \begin_inset Flex Code
854 status collapsed
855
856 \begin_layout Plain Layout
857 \SpecialChar TeX
858  Code
859 \end_layout
860
861 \end_inset
862
863  box containing this text is directly after this paragraph.
864  Those of you reading the manual in \SpecialChar LyX
865  will only see the \SpecialChar TeX
866  code inset.
867  Those reading a printed version of the manuals will see the actual results:
868 \begin_inset VSpace bigskip
869 \end_inset
870
871
872 \end_layout
873
874 \begin_layout Standard
875 \begin_inset ERT
876 status open
877
878 \begin_layout Plain Layout
879
880
881 \backslash
882 begin{tabular}{ll}
883 \end_layout
884
885 \begin_layout Plain Layout
886
887
888 \backslash
889 begin{minipage}{5cm}
890 \end_layout
891
892 \begin_layout Plain Layout
893
894 This is an example of a minipage environment.
895  You can put nearly everything in it, even (non-floating) figures and tables.
896  
897 \end_layout
898
899 \begin_layout Plain Layout
900
901
902 \backslash
903 end{minipage}
904 \end_layout
905
906 \begin_layout Plain Layout
907
908 &
909 \end_layout
910
911 \begin_layout Plain Layout
912
913
914 \backslash
915 begin{minipage}{5cm}
916 \end_layout
917
918 \begin_layout Plain Layout
919
920
921 \backslash
922 begin{verbatim}
923 \end_layout
924
925 \begin_layout Plain Layout
926
927
928 \backslash
929 begin{minipage}{5cm}
930 \end_layout
931
932 \begin_layout Plain Layout
933
934 This ...
935  
936 \end_layout
937
938 \begin_layout Plain Layout
939
940
941 \backslash
942 end{minipage}
943 \end_layout
944
945 \begin_layout Plain Layout
946
947
948 \backslash
949 end{verbatim}
950 \end_layout
951
952 \begin_layout Plain Layout
953
954
955 \backslash
956 end{minipage}
957 \end_layout
958
959 \begin_layout Plain Layout
960
961
962 \backslash
963 end{tabular}
964 \end_layout
965
966 \end_inset
967
968
969 \begin_inset VSpace bigskip
970 \end_inset
971
972
973 \end_layout
974
975 \begin_layout Standard
976 In addition to using \SpecialChar TeX
977  code, you can also create a separate file containing
978  some complex \SpecialChar LaTeX
979  structure and then use 
980 \begin_inset Flex Noun
981 status collapsed
982
983 \begin_layout Plain Layout
984 Insert\SpecialChar menuseparator
985 Child
986 \begin_inset space ~
987 \end_inset
988
989 Document
990 \end_layout
991
992 \end_inset
993
994  to include your file (you should select the type 
995 \begin_inset Flex Code
996 status collapsed
997
998 \begin_layout Plain Layout
999 Input
1000 \end_layout
1001
1002 \end_inset
1003
1004 ).
1005  We recommend that you only do this if you have a 
1006 \begin_inset Flex Code
1007 status collapsed
1008
1009 \begin_layout Plain Layout
1010 .tex
1011 \end_layout
1012
1013 \end_inset
1014
1015  file which you 
1016 \emph on
1017 know
1018 \emph default
1019  works already.
1020  Otherwise, you'll have a big job tracking down \SpecialChar LaTeX
1021  errors.
1022 \end_layout
1023
1024 \begin_layout Standard
1025 There are a few last points to emphasize:
1026 \end_layout
1027
1028 \begin_layout Itemize
1029 \SpecialChar LyX
1030  
1031 \emph on
1032 does not
1033 \emph default
1034  check if your \SpecialChar LaTeX
1035  code is correct.
1036 \end_layout
1037
1038 \begin_layout Itemize
1039 Beware of reinventing the wheel.
1040 \end_layout
1041
1042 \begin_layout Standard
1043 On that last point, \SpecialChar LyX
1044  does have quite a few features tucked into it, and
1045  more are coming.
1046  Be sure to check the manuals to make sure that \SpecialChar LyX
1047  doesn't have such-and-such
1048  feature before you decide you have to do it by hand.
1049  Moreover, there are numerous \SpecialChar LaTeX
1050  packages out there to do all sorts of things,
1051  from labels to envelopes to fancy multipage tables.
1052  Check out 
1053 \change_inserted 244031559 1603815732
1054
1055 \begin_inset CommandInset href
1056 LatexCommand href
1057 name "CTAN"
1058 target "https://www.ctan.org/"
1059 literal "false"
1060
1061 \end_inset
1062
1063
1064 \change_deleted 244031559 1603815732
1065
1066 \begin_inset CommandInset href
1067 LatexCommand href
1068 name "CTAN"
1069 target "http://www.ctan.org/"
1070 literal "false"
1071
1072 \end_inset
1073
1074
1075 \change_unchanged
1076  for details.
1077 \end_layout
1078
1079 \begin_layout Standard
1080 If you do need to do some wild and fancy things within your document, be
1081  sure to check out a good \SpecialChar LaTeX
1082  book for assistance.
1083  There are a number of them listed in the bibliography of the 
1084 \emph on
1085 User's Guide
1086 \emph default
1087 .
1088 \end_layout
1089
1090 \begin_layout Section
1091 \SpecialChar LyX
1092  and the \SpecialChar LaTeX
1093  Preamble
1094 \end_layout
1095
1096 \begin_layout Subsection
1097 About the \SpecialChar LaTeX
1098  Preamble
1099 \end_layout
1100
1101 \begin_layout Standard
1102 If you already know \SpecialChar LaTeX
1103 , there is no need to explain here what the preamble
1104  is good for.
1105  If you don't, the following will give you some ideas—we recommend again
1106  that you consult a \SpecialChar LaTeX
1107  book for further information.
1108  In any case, you should read the points below, because they explain what
1109  you can do and what you don't need to do in the \SpecialChar LaTeX
1110  preamble of a \SpecialChar LyX
1111  document.
1112 \end_layout
1113
1114 \begin_layout Standard
1115 The \SpecialChar LaTeX
1116  preamble comes at the very beginning of a document, 
1117 \emph on
1118 before
1119 \emph default
1120  the text.
1121  It serves to:
1122 \end_layout
1123
1124 \begin_layout Itemize
1125 Declare the document class.
1126  
1127 \begin_inset Newline newline
1128 \end_inset
1129
1130 \SpecialChar LyX
1131  already does this for you.
1132  If you're a seasoned \SpecialChar LaTeX
1133 -nician, and you have a custom document class you
1134  want to use, check out the 
1135 \emph on
1136 Customization Manual
1137 \emph default
1138  for information on how to make \SpecialChar LyX
1139  interface to it.
1140 \end_layout
1141
1142 \begin_layout Itemize
1143 Declare the usage of packages.
1144  
1145 \begin_inset Newline newline
1146 \end_inset
1147
1148 \SpecialChar LaTeX
1149  packages provide special commands, which are only available within a document
1150  when the package has been declared in the preamble.
1151  In addition to providing special commands, the inclusion of a package can
1152  change the document.
1153  For example, the package 
1154 \begin_inset Flex Code
1155 status collapsed
1156
1157 \begin_layout Plain Layout
1158 indentfirst
1159 \end_layout
1160
1161 \end_inset
1162
1163  forces all paragraphs to be indented.
1164  There are other packages for labels, envelopes, margins, etc.
1165  
1166 \end_layout
1167
1168 \begin_layout Itemize
1169 Set counters, variables, lengths and widths.
1170  
1171 \begin_inset Newline newline
1172 \end_inset
1173
1174 There are several \SpecialChar LaTeX
1175  counters and variables that 
1176 \emph on
1177 must
1178 \emph default
1179  be set globally from within the preamble in order to have the desired effect.
1180  (There are variables that you can set and reset inside the document, too.)
1181  Margins are a good example of something that must be set in the preamble.
1182  Another example is the label format for lists.
1183  You can actually set these just about anywhere, but it's best to do it
1184  just once, inside the preamble.
1185 \end_layout
1186
1187 \begin_layout Itemize
1188 Declare user defined commands (with 
1189 \begin_inset Flex Code
1190 status collapsed
1191
1192 \begin_layout Plain Layout
1193
1194 \backslash
1195 newcommand
1196 \end_layout
1197
1198 \end_inset
1199
1200  or 
1201 \begin_inset Flex Code
1202 status collapsed
1203
1204 \begin_layout Plain Layout
1205
1206 \backslash
1207 renewcommand
1208 \end_layout
1209
1210 \end_inset
1211
1212 ).
1213 \begin_inset Newline newline
1214 \end_inset
1215
1216 These are abbreviations for \SpecialChar LaTeX
1217  commands which appear very often inside a document.
1218  Although the preamble is a good place to declare such commands, they 
1219 \emph on
1220 can
1221 \emph default
1222  be declared anywhere (before they are used for the first time, of course).
1223  This can be useful if there is a lot of raw \SpecialChar LaTeX
1224  code in your document, which
1225  normally should not be the case.
1226 \end_layout
1227
1228 \begin_layout Standard
1229 \SpecialChar LyX
1230  adds its own set of definitions to the preamble of the 
1231 \begin_inset Flex Code
1232 status collapsed
1233
1234 \begin_layout Plain Layout
1235 .tex
1236 \end_layout
1237
1238 \end_inset
1239
1240  file it produces.
1241  This makes \SpecialChar LaTeX
1242  files generated by \SpecialChar LyX
1243  portable.
1244 \end_layout
1245
1246 \begin_layout Subsection
1247 Changing the Preamble
1248 \end_layout
1249
1250 \begin_layout Standard
1251 The commands which \SpecialChar LyX
1252  adds to the preamble of a \SpecialChar LaTeX
1253  file are fixed; you can't
1254  change them without patching \SpecialChar LyX
1255  itself.
1256  You can, however, add your own stuff to the preamble by selecting 
1257 \begin_inset Flex Noun
1258 status collapsed
1259
1260 \begin_layout Plain Layout
1261 \SpecialChar LaTeX
1262
1263 \begin_inset space ~
1264 \end_inset
1265
1266 Preamble
1267 \end_layout
1268
1269 \end_inset
1270
1271  in the 
1272 \begin_inset Flex Noun
1273 status collapsed
1274
1275 \begin_layout Plain Layout
1276 Document\SpecialChar menuseparator
1277 Settings
1278 \end_layout
1279
1280 \end_inset
1281
1282  dialog.
1283  \SpecialChar LyX
1284  adds anything in the 
1285 \begin_inset Flex Noun
1286 status collapsed
1287
1288 \begin_layout Plain Layout
1289 Preamble
1290 \end_layout
1291
1292 \end_inset
1293
1294  dialog to its own built-in preamble.
1295  Before adding your own declarations in the preamble, you should make sure
1296  that \SpecialChar LyX
1297  doesn't already support what you want to do.
1298  (Remember what we said about reinventing the wheel?) Also, 
1299 \emph on
1300 make sure your preamble code is correct
1301 \emph default
1302 .
1303  \SpecialChar LyX
1304  doesn't check it for you.
1305  If there is an error, you're likely to get an error like 
1306 \begin_inset Quotes eld
1307 \end_inset
1308
1309
1310 \begin_inset Flex Code
1311 status collapsed
1312
1313 \begin_layout Plain Layout
1314 Missing 
1315 \backslash
1316 begin{document}
1317 \end_layout
1318
1319 \end_inset
1320
1321
1322 \begin_inset Quotes erd
1323 \end_inset
1324
1325 .
1326  If you see this error, check your preamble.
1327 \end_layout
1328
1329 \begin_layout Subsection
1330 Examples
1331 \end_layout
1332
1333 \begin_layout Standard
1334 Here are some examples of what you can add to a preamble, and what they
1335  do.
1336 \end_layout
1337
1338 \begin_layout Subsubsection
1339 Example #1: Offsets
1340 \end_layout
1341
1342 \begin_layout Standard
1343 There are two variables under \SpecialChar LaTeX
1344  that control page position: 
1345 \begin_inset Flex Code
1346 status collapsed
1347
1348 \begin_layout Plain Layout
1349
1350 \backslash
1351 hoffset
1352 \end_layout
1353
1354 \end_inset
1355
1356  and 
1357 \begin_inset Flex Code
1358 status collapsed
1359
1360 \begin_layout Plain Layout
1361
1362 \backslash
1363 voffset
1364 \end_layout
1365
1366 \end_inset
1367
1368 .
1369  Their names should be self-explanatory.
1370  These variables are useful if you think for a moment about computer labels.
1371  Sometimes, the size of a print medium and the area of the medium that you
1372  can actually print on aren't the same.
1373  This is where 
1374 \begin_inset Flex Code
1375 status collapsed
1376
1377 \begin_layout Plain Layout
1378
1379 \backslash
1380 hoffset
1381 \end_layout
1382
1383 \end_inset
1384
1385  and 
1386 \begin_inset Flex Code
1387 status collapsed
1388
1389 \begin_layout Plain Layout
1390
1391 \backslash
1392 voffset
1393 \end_layout
1394
1395 \end_inset
1396
1397  come in.
1398 \end_layout
1399
1400 \begin_layout Standard
1401 The default values for 
1402 \begin_inset Flex Code
1403 status collapsed
1404
1405 \begin_layout Plain Layout
1406
1407 \backslash
1408 hoffset
1409 \end_layout
1410
1411 \end_inset
1412
1413  and 
1414 \begin_inset Flex Code
1415 status collapsed
1416
1417 \begin_layout Plain Layout
1418
1419 \backslash
1420 voffset
1421 \end_layout
1422
1423 \end_inset
1424
1425  are both 0
1426 \begin_inset space \thinspace{}
1427 \end_inset
1428
1429 points, i.
1430 \begin_inset space \thinspace{}
1431 \end_inset
1432
1433 e.
1434 \begin_inset space \space{}
1435 \end_inset
1436
1437 the page isn't shifted.
1438  Unfortunately, some DVI drivers always seem to shift the page.
1439  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1440  If you're using \SpecialChar LyX
1441  on a system that you don't personally maintain, and your
1442  sysadmin is a doofus, 
1443 \begin_inset Flex Code
1444 status collapsed
1445
1446 \begin_layout Plain Layout
1447
1448 \backslash
1449 hoffset
1450 \end_layout
1451
1452 \end_inset
1453
1454  and 
1455 \begin_inset Flex Code
1456 status collapsed
1457
1458 \begin_layout Plain Layout
1459
1460 \backslash
1461 voffset
1462 \end_layout
1463
1464 \end_inset
1465
1466  can save the day.
1467  Suppose your left and top margins are always 0.5
1468 \begin_inset space \thinspace{}
1469 \end_inset
1470
1471 inches too big.
1472  You can add this to the preamble:
1473 \end_layout
1474
1475 \begin_layout LyX-Code
1476
1477 \backslash
1478 setlength{
1479 \backslash
1480 hoffset}{-0.5 in}
1481 \end_layout
1482
1483 \begin_layout LyX-Code
1484
1485 \backslash
1486 setlength{
1487 \backslash
1488 voffset}{-0.5 in}
1489 \end_layout
1490
1491 \begin_layout Standard
1492 and your margins should now be correct.
1493 \end_layout
1494
1495 \begin_layout Subsubsection
1496 Example #2: Labels
1497 \end_layout
1498
1499 \begin_layout Standard
1500 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1501  There's a rather nice package, available at your nearest CTAN archive,
1502  for printing sheets of labels: 
1503 \begin_inset Flex Code
1504 status collapsed
1505
1506 \begin_layout Plain Layout
1507 labels.sty
1508 \end_layout
1509
1510 \end_inset
1511
1512 .
1513  Now, your system may not have this package installed by default.
1514  We leave that up to you to check.
1515  You'll also want to read the documentation for it; we're not going to do
1516  that for you.
1517  Since this is an example, however, we'll give you an example of how you
1518  use this package.
1519 \end_layout
1520
1521 \begin_layout Standard
1522 First, make sure you're using the 
1523 \begin_inset Flex Code
1524 status collapsed
1525
1526 \begin_layout Plain Layout
1527 article
1528 \end_layout
1529
1530 \end_inset
1531
1532  document class.
1533  Next, you need to put the following in your preamble:
1534 \end_layout
1535
1536 \begin_layout LyX-Code
1537
1538 \backslash
1539 usepackage{labels}
1540 \end_layout
1541
1542 \begin_layout LyX-Code
1543
1544 \backslash
1545 LabelCols=3
1546 \end_layout
1547
1548 \begin_layout LyX-Code
1549
1550 \backslash
1551 LabelRows=7
1552 \end_layout
1553
1554 \begin_layout LyX-Code
1555
1556 \backslash
1557 LeftBorder=8mm
1558 \end_layout
1559
1560 \begin_layout LyX-Code
1561
1562 \backslash
1563 RightBorder=8mm
1564 \end_layout
1565
1566 \begin_layout LyX-Code
1567
1568 \backslash
1569 TopBorder=9mm
1570 \end_layout
1571
1572 \begin_layout LyX-Code
1573
1574 \backslash
1575 BottomBorder=2mm
1576 \end_layout
1577
1578 \begin_layout Standard
1579 This sets things up for Avery label sheets, stock #5360.
1580  You're now ready to print labels, but you'll need to insert \SpecialChar LaTeX
1581  code, placing
1582  the commands 
1583 \begin_inset Flex Code
1584 status collapsed
1585
1586 \begin_layout Plain Layout
1587
1588 \backslash
1589 begin{labels}
1590 \end_layout
1591
1592 \end_inset
1593
1594  and 
1595 \begin_inset Flex Code
1596 status collapsed
1597
1598 \begin_layout Plain Layout
1599
1600 \backslash
1601 end{labels}
1602 \end_layout
1603
1604 \end_inset
1605
1606  around each label text.
1607  This and other special features of 
1608 \begin_inset Flex Code
1609 status collapsed
1610
1611 \begin_layout Plain Layout
1612 labels.sty
1613 \end_layout
1614
1615 \end_inset
1616
1617  are explained in its documentation.
1618 \end_layout
1619
1620 \begin_layout Standard
1621 Someday, someone may write a \SpecialChar LyX
1622  layout file to support this package directly.
1623  Maybe that someone is you.
1624 \end_layout
1625
1626 \begin_layout Subsubsection
1627 Example #3: Paragraph Indentation
1628 \end_layout
1629
1630 \begin_layout Standard
1631 Americans are trained to indent the first line of 
1632 \emph on
1633 every
1634 \emph default
1635  paragraph.
1636  As with all of their other weird quirks, most Americans will whine and
1637  moan until they can have their way and indent the first line of all paragraphs.
1638  (Yes, we're joking.
1639  (We are?) 
1640 \emph on
1641 Yeah
1642 \emph default
1643 , we are.)
1644 \end_layout
1645
1646 \begin_layout Standard
1647 Of course, this behavior isn't standard typography.
1648  In books, you typically only indent the first line of a paragraph 
1649 \emph on
1650 if
1651 \emph default
1652  it follows another one.
1653  The idea behind indenting the first line of a paragraph is to distinguish
1654  neighboring paragraphs from one another.
1655  If there is no previous paragraph—for example, if it follows a figure or
1656  is the first paragraph in a section—then there is no need for indentation.
1657  
1658 \end_layout
1659
1660 \begin_layout Standard
1661 If you're a typical American (we're still joking!), though, you don't care
1662  about such esoteric things; you want your indentation! Add this to the
1663  preamble:
1664 \end_layout
1665
1666 \begin_layout LyX-Code
1667
1668 \backslash
1669 usepackage{indentfirst}
1670 \end_layout
1671
1672 \begin_layout Standard
1673 If your \SpecialChar TeX
1674  distribution isn't braindead, you'll have this package, and all
1675  of your paragraphs will get the indentation the Founding Fathers intended
1676  they should have.
1677 \end_layout
1678
1679 \begin_layout Subsubsection
1680 Example #4: This Document
1681 \end_layout
1682
1683 \begin_layout Standard
1684 You can also check out the preamble of this document to get an idea of some
1685  of the advanced things you can do.
1686 \end_layout
1687
1688 \begin_layout Section
1689 \SpecialChar LyX
1690  and \SpecialChar LaTeX
1691  Errors
1692 \end_layout
1693
1694 \begin_layout Standard
1695 When \SpecialChar LyX
1696  calls \SpecialChar LaTeX
1697 , it tells \SpecialChar LaTeX
1698  to blithely ignore any errors and keep going.
1699  It then uses the logfile from the \SpecialChar LaTeX
1700  run to do a post-mortem.
1701  After analyzing the logfile, \SpecialChar LyX
1702  displays a dialog listing the errors.
1703  Clicking on any one of them will take you to the position in your \SpecialChar LyX
1704  file
1705  where the error occurred.
1706 \begin_inset Foot
1707 status collapsed
1708
1709 \begin_layout Plain Layout
1710 Well, usually.
1711  Analyzing the logfile is a tough job, and \SpecialChar LyX
1712  doesn't always go to the right
1713  line.
1714  There are also cases where \SpecialChar LaTeX
1715  reports the error on one line, but the actual
1716  error is earlier.
1717  This is not unlike forgetting a closing brace in a program: You'll get
1718  an error, but only later.
1719 \end_layout
1720
1721 \end_inset
1722
1723
1724 \end_layout
1725
1726 \begin_layout Standard
1727 Some folks also like to look at the log file directly: It is available from
1728  
1729 \begin_inset Flex Noun
1730 status collapsed
1731
1732 \begin_layout Plain Layout
1733 Document\SpecialChar menuseparator
1734 LaTeX
1735 \begin_inset space ~
1736 \end_inset
1737
1738 Log
1739 \end_layout
1740
1741 \end_inset
1742
1743 .
1744  There are some fairly common error messages and warnings.
1745  We'll cover those here.
1746  You should look at a good \SpecialChar LaTeX
1747  book for a complete listing.
1748 \end_layout
1749
1750 \begin_layout Itemize
1751 \begin_inset Flex Code
1752 status collapsed
1753
1754 \begin_layout Plain Layout
1755 LaTeX Warning
1756 \end_layout
1757
1758 \end_inset
1759
1760
1761 \begin_inset Newline newline
1762 \end_inset
1763
1764 Anything beginning with these words is a warning message for the purpose
1765  of 
1766 \begin_inset Quotes eld
1767 \end_inset
1768
1769 debugging
1770 \begin_inset Quotes erd
1771 \end_inset
1772
1773  the \SpecialChar LaTeX
1774  code itself.
1775  You'll get messages like this if you added or changed cross-references
1776  or bibliography entries, in which case, \SpecialChar LaTeX
1777  is trying to tell you that you
1778  need to make another run.
1779  You can by-and-large ignore these.
1780 \end_layout
1781
1782 \begin_layout Itemize
1783 \begin_inset Flex Code
1784 status collapsed
1785
1786 \begin_layout Plain Layout
1787 LaTeX Font Warning
1788 \end_layout
1789
1790 \end_inset
1791
1792
1793 \begin_inset Newline newline
1794 \end_inset
1795
1796 Another warning message, this time about fonts which \SpecialChar LaTeX
1797  couldn't find.
1798  The rest of the message will often say something about a replacement font
1799  that \SpecialChar LaTeX
1800  used.
1801  You can safely ignore these, too.
1802 \end_layout
1803
1804 \begin_layout Itemize
1805 \begin_inset Flex Code
1806 status collapsed
1807
1808 \begin_layout Plain Layout
1809 Overfull 
1810 \backslash
1811 hbox
1812 \end_layout
1813
1814 \end_inset
1815
1816
1817 \begin_inset Newline newline
1818 \end_inset
1819
1820 \SpecialChar LaTeX
1821  absolutely 
1822 \emph on
1823 loves
1824 \emph default
1825  to spew these out.
1826  It seems to generate at least one of these messages for just about any
1827  document you write.
1828  They are warnings about lines that were too long and run past the right
1829  margin.
1830  This happens if \SpecialChar LaTeX
1831  does not find a reasonable way to break the lines (notoriously
1832  often with typewriter font, since this does not allow for automatic break
1833  points).
1834  In many cases, this is unnoticeable in the final output.
1835  (It can be just a point or two.) Sometimes, however, the lines run rather
1836  visibly into the margin; something you will not want to have in your final
1837  print.
1838  
1839 \begin_inset Newline newline
1840 \end_inset
1841
1842 There are several global ways to try to minimize the overfull lines.
1843  Clicking 
1844 \family sans
1845 Enable micro-typographic extensions
1846 \family default
1847  in 
1848 \family sans
1849 Document\SpecialChar menuseparator
1850 Settings\SpecialChar menuseparator
1851 Fonts
1852 \family default
1853  might already improve things a lot.
1854  Furthermore, \SpecialChar LaTeX
1855  code such as the following in 
1856 \family sans
1857 Document\SpecialChar menuseparator
1858 Settings\SpecialChar menuseparator
1859 Preamble
1860 \family default
1861  usually reduces the overfull lines drastically (we use this in the preamble
1862  of this document):
1863 \end_layout
1864
1865 \begin_deeper
1866 \begin_layout LyX-Code
1867
1868 \backslash
1869 tolerance 1414
1870 \begin_inset Newline newline
1871 \end_inset
1872
1873
1874 \backslash
1875 hbadness 1414
1876 \begin_inset Newline newline
1877 \end_inset
1878
1879
1880 \backslash
1881 emergencystretch 1.5em
1882 \begin_inset Newline newline
1883 \end_inset
1884
1885
1886 \backslash
1887 hfuzz 0.3pt
1888 \end_layout
1889
1890 \begin_layout Standard
1891 In some cases, however, you eventually have to rewrite the text to get the
1892  line breaking right.
1893 \begin_inset Foot
1894 status collapsed
1895
1896 \begin_layout Plain Layout
1897 For more information, see 
1898 \begin_inset Flex URL
1899 status open
1900
1901 \begin_layout Plain Layout
1902
1903 http://www.tex.ac.uk/FAQ-overfull.html
1904 \end_layout
1905
1906 \end_inset
1907
1908
1909 \end_layout
1910
1911 \end_inset
1912
1913
1914 \end_layout
1915
1916 \begin_layout Standard
1917 In any case, you should check the respective lines, at least for the final
1918  version of your document.
1919  Your eyes will tell you if there's a problem with something that's too
1920  wide.
1921 \begin_inset Foot
1922 status collapsed
1923
1924 \begin_layout Plain Layout
1925 You can also enable the `draft' option in 
1926 \begin_inset Flex Noun
1927 status collapsed
1928
1929 \begin_layout Plain Layout
1930 Document\SpecialChar menuseparator
1931 Settings
1932 \end_layout
1933
1934 \end_inset
1935
1936 , and then \SpecialChar LaTeX
1937  will draw a black box in the margin of lines that are overfull.
1938 \end_layout
1939
1940 \end_inset
1941
1942  
1943 \end_layout
1944
1945 \end_deeper
1946 \begin_layout Itemize
1947 \begin_inset Flex Code
1948 status collapsed
1949
1950 \begin_layout Plain Layout
1951 Underfull 
1952 \backslash
1953 hbox
1954 \end_layout
1955
1956 \end_inset
1957
1958
1959 \begin_inset Newline newline
1960 \end_inset
1961
1962 Not quite as common as its cousin.
1963  This happens again if \SpecialChar LaTeX
1964  does not find a reasonable break point and consequently
1965  generates too loose lines.
1966  As with the overfull lines, you should check if this is a visible problem.
1967 \end_layout
1968
1969 \begin_layout Itemize
1970 \begin_inset Flex Code
1971 status collapsed
1972
1973 \begin_layout Plain Layout
1974 Overfull 
1975 \backslash
1976 vbox
1977 \end_layout
1978
1979 \end_inset
1980
1981  and 
1982 \begin_inset Flex Code
1983 status collapsed
1984
1985 \begin_layout Plain Layout
1986 Underfull 
1987 \backslash
1988 vbox
1989 \end_layout
1990
1991 \end_inset
1992
1993
1994 \begin_inset Newline newline
1995 \end_inset
1996
1997 Warnings about troubles breaking the page.
1998  Once again, just look at the output.
1999  Your eyes will tell you where something has gone wrong.
2000 \end_layout
2001
2002 \begin_layout Itemize
2003 \begin_inset Flex Code
2004 status collapsed
2005
2006 \begin_layout Plain Layout
2007 LaTeX Error: File 
2008 \begin_inset Quotes els
2009 \end_inset
2010
2011 Xxxx
2012 \begin_inset Quotes ers
2013 \end_inset
2014
2015  not found
2016 \end_layout
2017
2018 \end_inset
2019
2020
2021 \begin_inset Newline newline
2022 \end_inset
2023
2024 The file 
2025 \begin_inset Quotes eld
2026 \end_inset
2027
2028 Xxxx
2029 \begin_inset Quotes erd
2030 \end_inset
2031
2032  isn't installed on this system.
2033  This usually appears because some package your document needs isn't installed.
2034  If you didn't touch the preamble or didn't use the 
2035 \begin_inset Flex Code
2036 status collapsed
2037
2038 \begin_layout Plain Layout
2039
2040 \backslash
2041 usepackage{}
2042 \end_layout
2043
2044 \end_inset
2045
2046  command, then one of the packages \SpecialChar LyX
2047  tried to load is missing.
2048  Use 
2049 \begin_inset Flex Noun
2050 status collapsed
2051
2052 \begin_layout Plain Layout
2053 Help\SpecialChar menuseparator
2054 \SpecialChar LaTeX
2055  Configuration
2056 \end_layout
2057
2058 \end_inset
2059
2060  to get a list of packages that \SpecialChar LyX
2061  knows about.
2062  This file is updated whenever you reconfigure \SpecialChar LyX
2063  (using 
2064 \begin_inset Flex Noun
2065 status collapsed
2066
2067 \begin_layout Plain Layout
2068 Tools\SpecialChar menuseparator
2069 Reconfigure
2070 \end_layout
2071
2072 \end_inset
2073
2074 ) and tells you which packages have been detected and what they do.
2075 \begin_inset Newline newline
2076 \end_inset
2077
2078 If you did use the 
2079 \begin_inset Flex Code
2080 status collapsed
2081
2082 \begin_layout Plain Layout
2083
2084 \backslash
2085 usepackage{}
2086 \end_layout
2087
2088 \end_inset
2089
2090  command and the package in question isn't installed, then you'll need to
2091  install it yourself.
2092 \end_layout
2093
2094 \begin_layout Itemize
2095 \begin_inset Flex Code
2096 status collapsed
2097
2098 \begin_layout Plain Layout
2099 LaTeX Error: Unknown option
2100 \end_layout
2101
2102 \end_inset
2103
2104
2105 \begin_inset Newline newline
2106 \end_inset
2107
2108 Error messages beginning with this are trying to tell you that you specified
2109  a bad or undefined option to a package.
2110  Check the package's documentation.
2111 \end_layout
2112
2113 \begin_layout Itemize
2114 \begin_inset Flex Code
2115 status collapsed
2116
2117 \begin_layout Plain Layout
2118 Undefined control sequence
2119 \end_layout
2120
2121 \end_inset
2122
2123
2124 \begin_inset Newline newline
2125 \end_inset
2126
2127 If you've inserted \SpecialChar LaTeX
2128  code into your document, but made a typo, you'll get
2129  one of these.
2130  You may have forgotten to load a package.
2131  In any case, this error message usually means that you used an undefined
2132  command.
2133  
2134 \end_layout
2135
2136 \begin_layout Standard
2137 There are other error and warning messages.
2138  Some are self-explanatory.
2139  These are usually \SpecialChar LaTeX
2140  messages.
2141  Others are downright cryptic.
2142  These are usually \SpecialChar TeX
2143  error messages, and we really have 
2144 \emph on
2145 no clue
2146 \emph default
2147  what they mean or how to decipher them.
2148  No-one does.
2149 \end_layout
2150
2151 \begin_layout Standard
2152 There's a general sequence you should follow if you get error messages:
2153 \end_layout
2154
2155 \begin_layout Enumerate
2156 Look at the \SpecialChar LaTeX
2157  code you inserted for typos.
2158 \end_layout
2159
2160 \begin_layout Enumerate
2161 If there are no typos, check that you used the command(s) correctly.
2162 \end_layout
2163
2164 \begin_layout Enumerate
2165 If you get a bunch of error boxes piled up at the very top of the document—and
2166  especially if you see a 
2167 \begin_inset Quotes eld
2168 \end_inset
2169
2170
2171 \begin_inset Flex Code
2172 status collapsed
2173
2174 \begin_layout Plain Layout
2175 Missing 
2176 \backslash
2177 begin{document}
2178 \end_layout
2179
2180 \end_inset
2181
2182
2183 \begin_inset Quotes erd
2184 \end_inset
2185
2186  error—it means that there are errors in the preamble.
2187  Start debugging your preamble.
2188 \end_layout
2189
2190 \begin_layout Enumerate
2191 If you didn't add anything to the preamble and didn't add any \SpecialChar LaTeX
2192  code to the
2193  document, the first suspect is your \SpecialChar LaTeX
2194  distribution itself.
2195  Check for missing packages and install them.
2196 \end_layout
2197
2198 \begin_layout Enumerate
2199 Okay, so there are no missing packages.
2200  Did you use any of the fine-tuning options in \SpecialChar LyX
2201 ? Specifically, did you 
2202 \emph on
2203 misuse
2204 \emph default
2205  any of them, like trying to manually insert lots of 
2206 \begin_inset Flex Code
2207 status collapsed
2208
2209 \begin_layout Plain Layout
2210 Protected
2211 \begin_inset space ~
2212 \end_inset
2213
2214 Blanks
2215 \end_layout
2216
2217 \end_inset
2218
2219
2220 \begin_inset Flex Code
2221 status collapsed
2222
2223 \begin_layout Plain Layout
2224 Linebreaks
2225 \end_layout
2226
2227 \end_inset
2228
2229 , or 
2230 \begin_inset Flex Code
2231 status collapsed
2232
2233 \begin_layout Plain Layout
2234 Pagebreaks
2235 \end_layout
2236
2237 \end_inset
2238
2239 ? Did you try to kludge something together with these instead of using the
2240  appropriate paragraph environment?
2241 \end_layout
2242
2243 \begin_layout Enumerate
2244 All right, you didn't use any of the fine-tuning options, you played by
2245  the rules.
2246  Did you try to pull a fancy maneuver? Did you do something funky inside
2247  a table or an equation, like inserting a graphic into a table cell?
2248 \end_layout
2249
2250 \begin_layout Enumerate
2251 Do you have long sections of text where \SpecialChar LaTeX
2252  cannot find a place to break a
2253  line? By default, \SpecialChar LaTeX
2254  is rather strict about how much extra inter-word spacing
2255  it will add in order to break a line.
2256  Preferably, you should rework the paragraph to avoid the problem.
2257 \end_layout
2258
2259 \begin_layout Enumerate
2260 Did you go overboard with the nesting? \SpecialChar LyX
2261  (currently) doesn't check to make
2262  sure you're in the limits for nesting environments.
2263  If you nested a bunch of environments to the 
2264 \begin_inset Formula $17^{\mathrm{th}}$
2265 \end_inset
2266
2267  level, that's the problem.
2268  (The limit in \SpecialChar LaTeX
2269  is five.)
2270 \end_layout
2271
2272 \begin_layout Enumerate
2273 Okay, you didn't get any error messages, but your output looks awful.
2274  If you have a table or figure that's too wide or long for the page, you
2275  need to:
2276 \end_layout
2277
2278 \begin_deeper
2279 \begin_layout Enumerate
2280 rescale the figure so it fits.
2281 \end_layout
2282
2283 \begin_layout Enumerate
2284 trim down the table so it fits.
2285 \end_layout
2286
2287 \end_deeper
2288 \begin_layout Enumerate
2289 If something else is wrong with the output, and you didn't try to pull anything
2290  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2291 \end_layout
2292
2293 \begin_layout Standard
2294 If all this doesn't help—well, then 
2295 \emph on
2296 perhaps
2297 \emph default
2298  you might have found a bug in \SpecialChar LyX
2299 \SpecialChar ldots
2300 .
2301 \end_layout
2302
2303 \begin_layout Chapter
2304 Supplemental Tools
2305 \end_layout
2306
2307 \begin_layout Section
2308 Customizing Bibliographies with Bib\SpecialChar TeX
2309  or Biblatex
2310 \end_layout
2311
2312 \begin_layout Standard
2313 The most basic information about how to use Bib\SpecialChar TeX
2314  or 
2315 \family sans
2316 Biblatex
2317 \family default
2318  with \SpecialChar LyX
2319  is contained in the section 
2320 \emph on
2321 Bibliography databases
2322 \emph default
2323  of the 
2324 \emph on
2325 User's Guide
2326 \emph default
2327 .
2328  The following subsections explain special bibliography features supported
2329  by \SpecialChar LyX
2330 .
2331 \end_layout
2332
2333 \begin_layout Subsection
2334 Alternative Citation Styles
2335 \end_layout
2336
2337 \begin_layout Standard
2338 Standard Bib\SpecialChar TeX
2339  uses numbers (e.
2340 \begin_inset space \thinspace{}
2341 \end_inset
2342
2343 g.
2344 \begin_inset space \space{}
2345 \end_inset
2346
2347
2348 \begin_inset Quotes eld
2349 \end_inset
2350
2351 [12]
2352 \begin_inset Quotes erd
2353 \end_inset
2354
2355 ) to refer to a cited work.
2356  However, in many scientific disciplines, other citation styles are in use.
2357  The most common one is the author-year style (e.
2358 \begin_inset space \thinspace{}
2359 \end_inset
2360
2361 g.
2362 \begin_inset space \space{}
2363 \end_inset
2364
2365
2366 \begin_inset Quotes eld
2367 \end_inset
2368
2369 Knuth 1984a
2370 \begin_inset Quotes erd
2371 \end_inset
2372
2373 ).
2374  \SpecialChar LyX
2375  supports three packages that provide this style, 
2376 \begin_inset Flex Code
2377 status collapsed
2378
2379 \begin_layout Plain Layout
2380 biblatex
2381 \end_layout
2382
2383 \end_inset
2384
2385
2386 \begin_inset Flex Code
2387 status collapsed
2388
2389 \begin_layout Plain Layout
2390 natbib
2391 \end_layout
2392
2393 \end_inset
2394
2395 , and 
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 .
2406  Each of these packages has their pros and cons, which cannot be listed
2407  in detail.
2408  If you only want to have simple author-year (or author-numerical) style,
2409  or if you want to use one of the countless style files for 
2410 \begin_inset Flex Code
2411 status collapsed
2412
2413 \begin_layout Plain Layout
2414 natbib
2415 \end_layout
2416
2417 \end_inset
2418
2419 , then the established 
2420 \begin_inset Flex Code
2421 status collapsed
2422
2423 \begin_layout Plain Layout
2424 natbib
2425 \end_layout
2426
2427 \end_inset
2428
2429  package is probably your choice.
2430  If you look for specific citation styles common in law studies, you might
2431  consider the 
2432 \begin_inset Flex Code
2433 status collapsed
2434
2435 \begin_layout Plain Layout
2436 jurabib
2437 \end_layout
2438
2439 \end_inset
2440
2441  package.
2442  If you want to have full control over the formatting or look for advanced
2443  features such as ibidem, footnote citations, full title citations, advanced
2444  date formats (such as 400 BC) or full localization to other languages than
2445  English, you should definitely consider 
2446 \begin_inset Flex Code
2447 status collapsed
2448
2449 \begin_layout Plain Layout
2450 biblatex
2451 \end_layout
2452
2453 \end_inset
2454
2455 , which exceeds all other packages in terms of features, but is also quite
2456  heavy and more resource-hungry.
2457 \end_layout
2458
2459 \begin_layout Standard
2460 The handling of these packages in \SpecialChar LyX
2461  is basically the same.
2462  Go to 
2463 \begin_inset Flex Noun
2464 status collapsed
2465
2466 \begin_layout Plain Layout
2467 Document\SpecialChar menuseparator
2468 Settings
2469 \end_layout
2470
2471 \end_inset
2472
2473  and select under 
2474 \begin_inset Flex Noun
2475 status collapsed
2476
2477 \begin_layout Plain Layout
2478 Bibliography
2479 \end_layout
2480
2481 \end_inset
2482
2483  the 
2484 \begin_inset Flex Noun
2485 status collapsed
2486
2487 \begin_layout Plain Layout
2488 Style Format
2489 \end_layout
2490
2491 \end_inset
2492
2493  
2494 \begin_inset Flex Noun
2495 status collapsed
2496
2497 \begin_layout Plain Layout
2498 Basic (BibTeX)
2499 \end_layout
2500
2501 \end_inset
2502
2503
2504 \begin_inset Flex Noun
2505 status collapsed
2506
2507 \begin_layout Plain Layout
2508 Biblatex
2509 \end_layout
2510
2511 \end_inset
2512
2513
2514 \begin_inset Flex Noun
2515 status collapsed
2516
2517 \begin_layout Plain Layout
2518 Biblatex (Natbib mode)
2519 \end_layout
2520
2521 \end_inset
2522
2523
2524 \begin_inset Flex Noun
2525 status collapsed
2526
2527 \begin_layout Plain Layout
2528 Natbib (BibTeX)
2529 \end_layout
2530
2531 \end_inset
2532
2533  or 
2534 \begin_inset Flex Noun
2535 status collapsed
2536
2537 \begin_layout Plain Layout
2538 Jurabib (BibTeX)
2539 \end_layout
2540
2541 \end_inset
2542
2543  (see sec.
2544 \begin_inset space ~
2545 \end_inset
2546
2547 6.5.3 in the User's Guide for more information on these choices).
2548  With all these packages, you will get some extra features in the citation
2549  dialog and you can select the style of the reference (
2550 \begin_inset Quotes eld
2551 \end_inset
2552
2553 Knuth 1984
2554 \begin_inset Quotes erd
2555 \end_inset
2556
2557
2558 \begin_inset Quotes eld
2559 \end_inset
2560
2561 Knuth (1984)
2562 \begin_inset Quotes erd
2563 \end_inset
2564
2565
2566 \begin_inset Quotes eld
2567 \end_inset
2568
2569 Knuth, 1984
2570 \begin_inset Quotes erd
2571 \end_inset
2572
2573
2574 \begin_inset Quotes eld
2575 \end_inset
2576
2577 1984
2578 \begin_inset Quotes erd
2579 \end_inset
2580
2581  etc.).
2582  Note that either package needs specifically designed style files.
2583  They all ship their own, but there are lots of additional style files,
2584  and there is even an interactive style file builder
2585 \begin_inset Foot
2586 status collapsed
2587
2588 \begin_layout Plain Layout
2589 See 
2590 \begin_inset Flex URL
2591 status open
2592
2593 \begin_layout Plain Layout
2594
2595 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2596 \end_layout
2597
2598 \end_inset
2599
2600
2601 \end_layout
2602
2603 \end_inset
2604
2605  for 
2606 \begin_inset Flex Code
2607 status collapsed
2608
2609 \begin_layout Plain Layout
2610 natbib
2611 \end_layout
2612
2613 \end_inset
2614
2615 .
2616 \end_layout
2617
2618 \begin_layout Subsection
2619 Subdivided Bibliographies
2620 \end_layout
2621
2622 \begin_layout Standard
2623 Sometimes you might need to divide your bibliography into several sections.
2624  If you are for instance a historian, the possibility to separate sources
2625  and scientific works is most likely a 
2626 \begin_inset Quotes eld
2627 \end_inset
2628
2629 must have
2630 \begin_inset Quotes erd
2631 \end_inset
2632
2633 .
2634  Unfortunately, Bib\SpecialChar TeX
2635  itself does not allow you to do this.
2636  But with the help of some \SpecialChar LaTeX
2637  packages, Bib\SpecialChar TeX
2638  can be extended to fit your needs.
2639 \end_layout
2640
2641 \begin_layout Standard
2642 \SpecialChar LyX
2643  provides native support for one of these packages, 
2644 \family typewriter
2645 bibtopic
2646 \family default
2647 .
2648 \begin_inset Foot
2649 status collapsed
2650
2651 \begin_layout Plain Layout
2652 Available from 
2653 \begin_inset Flex URL
2654 status open
2655
2656 \begin_layout Plain Layout
2657
2658 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2659 \end_layout
2660
2661 \end_inset
2662
2663
2664 \end_layout
2665
2666 \end_inset
2667
2668  The advantage of this package (compared to other packages such as 
2669 \family typewriter
2670 multibib
2671 \family default
2672 ) is that you don't need to define new citation commands.
2673  Instead, you need to prepare different bibliographic databases which include
2674  the entries for the different sections of the bibliography.
2675  For example: If you want to divide your bibliography into the sections
2676  
2677 \begin_inset Quotes eld
2678 \end_inset
2679
2680 Sources
2681 \begin_inset Quotes erd
2682 \end_inset
2683
2684  and 
2685 \begin_inset Quotes eld
2686 \end_inset
2687
2688 Scientific works
2689 \begin_inset Quotes erd
2690 \end_inset
2691
2692 , you first need to create two bibliographic databases, e.
2693 \begin_inset space \thinspace{}
2694 \end_inset
2695
2696 g.
2697 \begin_inset space \space{}
2698 \end_inset
2699
2700
2701 \begin_inset Flex Code
2702 status collapsed
2703
2704 \begin_layout Plain Layout
2705 sources.bib
2706 \end_layout
2707
2708 \end_inset
2709
2710  and 
2711 \begin_inset Flex Code
2712 status collapsed
2713
2714 \begin_layout Plain Layout
2715 scientific.bib
2716 \end_layout
2717
2718 \end_inset
2719
2720 .
2721  
2722 \end_layout
2723
2724 \begin_layout Standard
2725 Go to 
2726 \begin_inset Flex Noun
2727 status collapsed
2728
2729 \begin_layout Plain Layout
2730 Document\SpecialChar menuseparator
2731 Settings
2732 \end_layout
2733
2734 \end_inset
2735
2736  and check under 
2737 \begin_inset Flex Noun
2738 status collapsed
2739
2740 \begin_layout Plain Layout
2741 Bibliography
2742 \end_layout
2743
2744 \end_inset
2745
2746  the option 
2747 \begin_inset Flex Noun
2748 status collapsed
2749
2750 \begin_layout Plain Layout
2751 Subdivided bibliography
2752 \end_layout
2753
2754 \end_inset
2755
2756 .
2757  Now you can insert multiple Bib\SpecialChar TeX
2758  bibliographies, one for each section of
2759  your bibliography.
2760  Returning to our example: Insert the Bib\SpecialChar TeX
2761  bibliography 
2762 \begin_inset Flex Code
2763 status collapsed
2764
2765 \begin_layout Plain Layout
2766 sources.bib
2767 \end_layout
2768
2769 \end_inset
2770
2771  and a second one for the database 
2772 \begin_inset Flex Code
2773 status collapsed
2774
2775 \begin_layout Plain Layout
2776 scientific.bib
2777 \end_layout
2778
2779 \end_inset
2780
2781 .
2782  You are free to use the same or different styles for each section.
2783  Additionally, you can choose if the bibliography section should contain
2784  
2785 \begin_inset Quotes eld
2786 \end_inset
2787
2788 all cited references
2789 \begin_inset Quotes erd
2790 \end_inset
2791
2792  of the specified database(s) (which is the default), 
2793 \begin_inset Quotes eld
2794 \end_inset
2795
2796 all uncited references
2797 \begin_inset Quotes erd
2798 \end_inset
2799
2800  or even 
2801 \begin_inset Quotes eld
2802 \end_inset
2803
2804 all references
2805 \begin_inset Quotes erd
2806 \end_inset
2807
2808 .
2809  This might be useful if you would like to separate your bibliography into
2810  three sections: 
2811 \begin_inset Quotes eld
2812 \end_inset
2813
2814 Cited sources
2815 \begin_inset Quotes erd
2816 \end_inset
2817
2818
2819 \begin_inset Quotes eld
2820 \end_inset
2821
2822 Uncited sources
2823 \begin_inset Quotes erd
2824 \end_inset
2825
2826 , and 
2827 \begin_inset Quotes eld
2828 \end_inset
2829
2830 Scientific works
2831 \begin_inset Quotes erd
2832 \end_inset
2833
2834 .
2835  The titles for the sections can be added as ordinary sections or subsections.
2836  Since 
2837 \begin_inset Flex Code
2838 status collapsed
2839
2840 \begin_layout Plain Layout
2841 bibtopic
2842 \end_layout
2843
2844 \end_inset
2845
2846  removes the bibliography title, you have to manually re-add that, too (as
2847  a chapter* or section*, for instance).
2848 \end_layout
2849
2850 \begin_layout Standard
2851 With 
2852 \family sans
2853 Biblatex
2854 \family default
2855 , the procedure is a bit different.
2856  Since 
2857 \family typewriter
2858 bibtopic
2859 \family default
2860  does not work with 
2861 \family sans
2862 Biblatex
2863 \family default
2864 , the aforementioned 
2865 \begin_inset Flex Noun
2866 status collapsed
2867
2868 \begin_layout Plain Layout
2869 Subdivided bibliography
2870 \end_layout
2871
2872 \end_inset
2873
2874  option is disabled if you use 
2875 \family sans
2876 Biblatex
2877 \family default
2878 .
2879  However, 
2880 \family sans
2881 Biblatex
2882 \family default
2883  provides its own means to generate subdivided bibliographies.
2884  You can either add keywords to bibliography entries via the 
2885 \begin_inset Flex Code
2886 status collapsed
2887
2888 \begin_layout Plain Layout
2889 keywords
2890 \end_layout
2891
2892 \end_inset
2893
2894  entry option and then filter bibliography sections by keyword (by adding
2895  
2896 \begin_inset Flex Code
2897 status collapsed
2898
2899 \begin_layout Plain Layout
2900 keyword=mykeyword
2901 \end_layout
2902
2903 \end_inset
2904
2905  to the 
2906 \begin_inset Flex Noun
2907 status collapsed
2908
2909 \begin_layout Plain Layout
2910 Options
2911 \end_layout
2912
2913 \end_inset
2914
2915  field of the dialog that opens if you left-click on the 
2916 \begin_inset Flex Noun
2917 status collapsed
2918
2919 \begin_layout Plain Layout
2920 Biblatex Generated Bibliography
2921 \end_layout
2922
2923 \end_inset
2924
2925  button), or you can filter by entry types (such as 
2926 \emph on
2927 book
2928 \emph default
2929  or 
2930 \emph on
2931 article
2932 \emph default
2933 ) by entering e.
2934 \begin_inset space \thinspace{}
2935 \end_inset
2936
2937 g.
2938  
2939 \begin_inset Flex Code
2940 status collapsed
2941
2942 \begin_layout Plain Layout
2943 type=book
2944 \end_layout
2945
2946 \end_inset
2947
2948  or 
2949 \begin_inset Flex Code
2950 status collapsed
2951
2952 \begin_layout Plain Layout
2953 nottype=collection
2954 \end_layout
2955
2956 \end_inset
2957
2958  to the mentioned 
2959 \begin_inset Flex Noun
2960 status collapsed
2961
2962 \begin_layout Plain Layout
2963 Options
2964 \end_layout
2965
2966 \end_inset
2967
2968  field, or you can create so-called 
2969 \begin_inset Quotes eld
2970 \end_inset
2971
2972 Bibliography Categories
2973 \begin_inset Quotes erd
2974 \end_inset
2975
2976  to which you can assign individual entries.
2977  Please refer to the Biblatex manual, section 
2978 \emph on
2979 Subdivided Bibliographies
2980 \emph default
2981 , for details.
2982 \end_layout
2983
2984 \begin_layout Subsection
2985 Multiple Bibliographies
2986 \begin_inset CommandInset label
2987 LatexCommand label
2988 name "subsec:Multiple-Bibliographies"
2989
2990 \end_inset
2991
2992
2993 \end_layout
2994
2995 \begin_layout Standard
2996 Multiple bibliographies, e.
2997 \begin_inset space \thinspace{}
2998 \end_inset
2999
3000 g.
3001 \begin_inset space \space{}
3002 \end_inset
3003
3004 a bibliography for each part, chapter, section, subsection or child (sub-documen
3005 t) of the document, are also supported by \SpecialChar LyX
3006 .
3007  In order to enable it, go to 
3008 \begin_inset Flex Noun
3009 status collapsed
3010
3011 \begin_layout Plain Layout
3012 Document\SpecialChar menuseparator
3013 Settings\SpecialChar menuseparator
3014 Bibliography
3015 \end_layout
3016
3017 \end_inset
3018
3019  and select the relevant unit (e.
3020 \begin_inset space \thinspace{}
3021 \end_inset
3022
3023 g., 
3024 \begin_inset Quotes eld
3025 \end_inset
3026
3027 per section
3028 \begin_inset Quotes erd
3029 \end_inset
3030
3031 ) in the 
3032 \begin_inset Flex Noun
3033 status collapsed
3034
3035 \begin_layout Plain Layout
3036 Multiple Bibliographies
3037 \end_layout
3038
3039 \end_inset
3040
3041  combo box.
3042  Then add a Bib(la)\SpecialChar TeX
3043  bibliography to each unit (e.
3044 \begin_inset space \thinspace{}
3045 \end_inset
3046
3047 g., section) of your document.
3048  In the output, a separate bibliography, containing only the references
3049  done in the current unit is generated.
3050 \end_layout
3051
3052 \begin_layout Standard
3053 If you use Bib\SpecialChar TeX
3054 , either the 
3055 \begin_inset Flex Code
3056 status collapsed
3057
3058 \begin_layout Plain Layout
3059 chapterbib
3060 \end_layout
3061
3062 \end_inset
3063
3064  or the 
3065 \begin_inset Flex Code
3066 status collapsed
3067
3068 \begin_layout Plain Layout
3069 bibtopic
3070 \end_layout
3071
3072 \end_inset
3073
3074  package is used to create multiple bibliographies.
3075  The former package is used if you select 
3076 \begin_inset Quotes eld
3077 \end_inset
3078
3079 per child document
3080 \begin_inset Quotes erd
3081 \end_inset
3082
3083  and do 
3084 \emph on
3085 not
3086 \emph default
3087  check 
3088 \begin_inset Flex Noun
3089 status collapsed
3090
3091 \begin_layout Plain Layout
3092 Sectioned Bibliography
3093 \end_layout
3094
3095 \end_inset
3096
3097 .
3098  In all other cases, 
3099 \begin_inset Flex Code
3100 status collapsed
3101
3102 \begin_layout Plain Layout
3103 bibtopic
3104 \end_layout
3105
3106 \end_inset
3107
3108  is used.
3109 \begin_inset Foot
3110 status collapsed
3111
3112 \begin_layout Plain Layout
3113 An alternative approach, if you are willing to use some 
3114 \begin_inset Flex Noun
3115 status collapsed
3116
3117 \begin_layout Plain Layout
3118 \SpecialChar TeX
3119  Code
3120 \end_layout
3121
3122 \end_inset
3123
3124  (see section
3125 \begin_inset space ~
3126 \end_inset
3127
3128
3129 \begin_inset CommandInset ref
3130 LatexCommand ref
3131 reference "sec:Inserting-TeX-Code"
3132
3133 \end_inset
3134
3135 ), is to use the 
3136 \begin_inset Flex Code
3137 status collapsed
3138
3139 \begin_layout Plain Layout
3140 bibunits
3141 \end_layout
3142
3143 \end_inset
3144
3145  package.
3146 \end_layout
3147
3148 \end_inset
3149
3150  If 
3151 \begin_inset Flex Code
3152 status collapsed
3153
3154 \begin_layout Plain Layout
3155 bibtopic
3156 \end_layout
3157
3158 \end_inset
3159
3160  is used, \SpecialChar LyX
3161  encloses the specified units in 
3162 \begin_inset Flex Code
3163 status collapsed
3164
3165 \begin_layout Plain Layout
3166 bibtopic
3167 \end_layout
3168
3169 \end_inset
3170
3171 's 
3172 \begin_inset Flex Code
3173 status collapsed
3174
3175 \begin_layout Plain Layout
3176
3177 \backslash
3178 begin{btUnit}
3179 \end_layout
3180
3181 \end_inset
3182
3183  and 
3184 \begin_inset Flex Code
3185 status collapsed
3186
3187 \begin_layout Plain Layout
3188
3189 \backslash
3190 end{btUnit}
3191 \end_layout
3192
3193 \end_inset
3194
3195  in order to create the units.
3196  Note that this approach has some limitations.
3197  First, every citation reference has to be inside some 
3198 \begin_inset Flex Code
3199 status collapsed
3200
3201 \begin_layout Plain Layout
3202 btUnit
3203 \end_layout
3204
3205 \end_inset
3206
3207 .
3208  So citations outside a defined unit (e.
3209 \begin_inset space \thinspace{}
3210 \end_inset
3211
3212 g., before the first section if you use 
3213 \begin_inset Quotes eld
3214 \end_inset
3215
3216 by section
3217 \begin_inset Quotes erd
3218 \end_inset
3219
3220 ) will appear as 
3221 \begin_inset Quotes eld
3222 \end_inset
3223
3224 ???
3225 \begin_inset Quotes erd
3226 \end_inset
3227
3228 .
3229  You can also create your own units by entering 
3230 \begin_inset Flex Code
3231 status collapsed
3232
3233 \begin_layout Plain Layout
3234
3235 \backslash
3236 begin{btUnit}
3237 \end_layout
3238
3239 \end_inset
3240
3241  and 
3242 \begin_inset Flex Code
3243 status collapsed
3244
3245 \begin_layout Plain Layout
3246
3247 \backslash
3248 end{btUnit}
3249 \end_layout
3250
3251 \end_inset
3252
3253  as \SpecialChar TeX
3254  code (for instance to work around the mentioned limitation).
3255  Note, though, that 
3256 \begin_inset Flex Code
3257 status collapsed
3258
3259 \begin_layout Plain Layout
3260 btUnit
3261 \end_layout
3262
3263 \end_inset
3264
3265 s cannot be nested.
3266  A second limitation is that 
3267 \begin_inset Flex Code
3268 status collapsed
3269
3270 \begin_layout Plain Layout
3271 bibtopic
3272 \end_layout
3273
3274 \end_inset
3275
3276  always processes all references of a bibliography database, even if they
3277  are not cited.
3278  This can result in odd labels (e.
3279 \begin_inset space \thinspace{}
3280 \end_inset
3281
3282 g.
3283  
3284 \begin_inset Quotes eld
3285 \end_inset
3286
3287 Miller 2014b
3288 \begin_inset Quotes erd
3289 \end_inset
3290
3291  if two works of this author from 2014 are in the database, even if only
3292  one is cited).
3293 \end_layout
3294
3295 \begin_layout Standard
3296 If you use 
3297 \family sans
3298 Biblatex
3299 \family default
3300 , the 
3301 \begin_inset Flex Code
3302 status collapsed
3303
3304 \begin_layout Plain Layout
3305 refsection
3306 \end_layout
3307
3308 \end_inset
3309
3310  option is used instead.
3311  If you need specific units, you can start them with the \SpecialChar TeX
3312  code 
3313 \begin_inset Flex Code
3314 status collapsed
3315
3316 \begin_layout Plain Layout
3317
3318 \backslash
3319 newrefsection
3320 \end_layout
3321
3322 \end_inset
3323
3324  or 
3325 \begin_inset Flex Code
3326 status collapsed
3327
3328 \begin_layout Plain Layout
3329
3330 \backslash
3331 newrefsegment
3332 \end_layout
3333
3334 \end_inset
3335
3336 , respectively.
3337  If you also want to control the end of the unit, use the environment 
3338 \begin_inset Flex Code
3339 status collapsed
3340
3341 \begin_layout Plain Layout
3342
3343 \backslash
3344 begin{refsection}
3345 \end_layout
3346
3347 \end_inset
3348
3349  \SpecialChar ldots
3350  
3351 \begin_inset Flex Code
3352 status collapsed
3353
3354 \begin_layout Plain Layout
3355
3356 \backslash
3357 end{refsection}
3358 \end_layout
3359
3360 \end_inset
3361
3362  instead.
3363  Note, though, that 
3364 \begin_inset Flex Code
3365 status collapsed
3366
3367 \begin_layout Plain Layout
3368 refsection
3369 \end_layout
3370
3371 \end_inset
3372
3373 s cannot be nested.
3374  In addition to the individual bibliography of the current unit, 
3375 \family sans
3376 Biblatex
3377 \family default
3378  also provides an easy way to output all bibliographies, subsequently, at
3379  one place (e.
3380 \begin_inset space \thinspace{}
3381 \end_inset
3382
3383 g., at the end of the document).
3384  Select 
3385 \begin_inset Quotes eld
3386 \end_inset
3387
3388 all reference units
3389 \begin_inset Quotes erd
3390 \end_inset
3391
3392  from the Content combo box of the Bib(la)TeX inset dialog in order to achieve
3393  this.
3394  Please refer to the 
3395 \family sans
3396 Biblatex
3397 \family default
3398  manual for more information on this topic.
3399 \end_layout
3400
3401 \begin_layout Section
3402 Multipart Documents
3403 \end_layout
3404
3405 \begin_layout Subsection
3406 General Operation
3407 \end_layout
3408
3409 \begin_layout Standard
3410 When you are working on a large file with many sections, it is often convenient
3411  to break up the document into several files, or perhaps you have something
3412  where a table may change from time to time, but the preceding text does
3413  not.
3414  In these cases, you should seriously consider using multipart documents.
3415  For example, scientific papers often have five major sections: the introduction
3416 , observations, results, discussion, and conclusion.
3417  Each of these could be its own separate \SpecialChar LyX
3418  file, with one 
3419 \begin_inset Quotes eld
3420 \end_inset
3421
3422 master
3423 \begin_inset Quotes erd
3424 \end_inset
3425
3426  file which contains the title, authors, abstract, references, etc., plus
3427  the five included files.
3428  It is important to note that each of these files is a full \SpecialChar LyX
3429  file which
3430  can be formatted and printed on its own, as well as included in a master
3431  file.
3432  Each of these files must have the same document class, however—don't attempt
3433  to mix book classes with article classes.
3434  You may also include \SpecialChar LaTeX
3435  files; however, these files must not have their own
3436  preamble (i.
3437 \begin_inset space \thinspace{}
3438 \end_inset
3439
3440 e.
3441 \begin_inset space \space{}
3442 \end_inset
3443
3444 everything up to and including the 
3445 \begin_inset Flex Code
3446 status collapsed
3447
3448 \begin_layout Plain Layout
3449
3450 \backslash
3451 begin{document}
3452 \end_layout
3453
3454 \end_inset
3455
3456  line as well as the 
3457 \begin_inset Flex Code
3458 status collapsed
3459
3460 \begin_layout Plain Layout
3461
3462 \backslash
3463 end{document}
3464 \end_layout
3465
3466 \end_inset
3467
3468  line must be deleted) or else errors will be generated when you try to
3469  make a DVI file.
3470 \end_layout
3471
3472 \begin_layout Standard
3473 \SpecialChar LyX
3474  allows you to include files quite easily with 
3475 \begin_inset Flex Noun
3476 status collapsed
3477
3478 \begin_layout Plain Layout
3479 Insert\SpecialChar menuseparator
3480 Child
3481 \begin_inset space ~
3482 \end_inset
3483
3484 Document
3485 \end_layout
3486
3487 \end_inset
3488
3489 .
3490  When you click on this selection a small box is inserted into the file
3491  at the current cursor location.
3492  Clicking on the box raises a dialog which allows you to select the file
3493  to be included, and the method of its inclusion.
3494  
3495 \end_layout
3496
3497 \begin_layout Standard
3498 The file selection box should by now be obvious.
3499  The three inclusion methods are 
3500 \begin_inset Quotes eld
3501 \end_inset
3502
3503 include
3504 \begin_inset Quotes erd
3505 \end_inset
3506
3507
3508 \begin_inset Quotes eld
3509 \end_inset
3510
3511 input
3512 \begin_inset Quotes erd
3513 \end_inset
3514
3515 , and 
3516 \begin_inset Quotes eld
3517 \end_inset
3518
3519 verbatim
3520 \begin_inset Quotes erd
3521 \end_inset
3522
3523 .
3524  The methods 
3525 \begin_inset Quotes eld
3526 \end_inset
3527
3528 include
3529 \begin_inset Quotes erd
3530 \end_inset
3531
3532  and 
3533 \begin_inset Quotes eld
3534 \end_inset
3535
3536 input
3537 \begin_inset Quotes erd
3538 \end_inset
3539
3540  are similar in many ways, but there are also some notable differences:
3541 \end_layout
3542
3543 \begin_layout Enumerate
3544 Files that are 
3545 \begin_inset Quotes eld
3546 \end_inset
3547
3548 included
3549 \begin_inset Quotes erd
3550 \end_inset
3551
3552  are typeset beginning on a new page, while files that are 
3553 \begin_inset Quotes eld
3554 \end_inset
3555
3556 inputted
3557 \begin_inset Quotes erd
3558 \end_inset
3559
3560  are typeset starting on the current page.
3561 \end_layout
3562
3563 \begin_layout Enumerate
3564 \begin_inset Quotes eld
3565 \end_inset
3566
3567 Included
3568 \begin_inset Quotes erd
3569 \end_inset
3570
3571  files cannot themselves 
3572 \begin_inset Quotes eld
3573 \end_inset
3574
3575 include
3576 \begin_inset Quotes erd
3577 \end_inset
3578
3579  further files (
3580 \begin_inset Quotes eld
3581 \end_inset
3582
3583 grandchilds
3584 \begin_inset Quotes erd
3585 \end_inset
3586
3587 ).
3588  With 
3589 \begin_inset Quotes eld
3590 \end_inset
3591
3592 input
3593 \begin_inset Quotes erd
3594 \end_inset
3595
3596 , on the other hand, infinite sub-inputting is possible.
3597 \end_layout
3598
3599 \begin_layout Enumerate
3600 \begin_inset Quotes eld
3601 \end_inset
3602
3603 Include
3604 \begin_inset Quotes erd
3605 \end_inset
3606
3607  allow for the output of only selected 
3608 \begin_inset Quotes eld
3609 \end_inset
3610
3611 included
3612 \begin_inset Quotes erd
3613 \end_inset
3614
3615  files, while maintaining the actual counters (pagination etc.) and references
3616  (please refer to the section 
3617 \emph on
3618 Child
3619 \begin_inset space ~
3620 \end_inset
3621
3622 Documents
3623 \emph default
3624  of the 
3625 \emph on
3626 Embedded
3627 \begin_inset space ~
3628 \end_inset
3629
3630 Objects
3631 \emph default
3632  manual for details).
3633 \end_layout
3634
3635 \begin_layout Standard
3636 Hence, 
3637 \begin_inset Quotes eld
3638 \end_inset
3639
3640 include
3641 \begin_inset Quotes erd
3642 \end_inset
3643
3644  is the preferred method for chapters that are outsourced to child documents,
3645  while 
3646 \begin_inset Quotes eld
3647 \end_inset
3648
3649 input
3650 \begin_inset Quotes erd
3651 \end_inset
3652
3653  is more suitable for arbitrary file inheritance.
3654 \end_layout
3655
3656 \begin_layout Standard
3657
3658 \begin_inset Quotes eld
3659 \end_inset
3660
3661 verbatim
3662 \begin_inset Quotes erd
3663 \end_inset
3664
3665  included file allows you to include a file typeset exactly as it appears
3666  in the file, i.
3667 \begin_inset space \thinspace{}
3668 \end_inset
3669
3670 e.
3671 \begin_inset space \space{}
3672 \end_inset
3673
3674 in 
3675 \begin_inset Flex Code
3676 status collapsed
3677
3678 \begin_layout Plain Layout
3679 verbatim
3680 \end_layout
3681
3682 \end_inset
3683
3684  mode, with the characters set in a fixed-width typewriter font.
3685  Normally, spaces in this file are invisible, though two consecutive spaces
3686  are conserved, unlike \SpecialChar LyX
3687 's normal treatment of spaces.
3688  However, setting the 
3689 \begin_inset Flex Noun
3690 status collapsed
3691
3692 \begin_layout Plain Layout
3693 Mark
3694 \begin_inset space ~
3695 \end_inset
3696
3697 spaces
3698 \begin_inset space ~
3699 \end_inset
3700
3701 in
3702 \begin_inset space ~
3703 \end_inset
3704
3705 output
3706 \end_layout
3707
3708 \end_inset
3709
3710  checkbox typesets a mark to unambiguously define the presence of a space.
3711  
3712 \end_layout
3713
3714 \begin_layout Standard
3715 Generally, the master file is converted into a full \SpecialChar LaTeX
3716  file before typesetting,
3717  while the included files are converted to \SpecialChar LaTeX
3718  files that do not have all the
3719  preamble information.
3720 \end_layout
3721
3722 \begin_layout Subsection
3723 Cross-References Between Files
3724 \end_layout
3725
3726 \begin_layout Standard
3727 \begin_inset Box Shadowbox
3728 position "t"
3729 hor_pos "c"
3730 has_inner_box 1
3731 inner_pos "t"
3732 use_parbox 0
3733 use_makebox 0
3734 width "100col%"
3735 special "none"
3736 height "1in"
3737 height_special "totalheight"
3738 thickness "0.4pt"
3739 separation "3pt"
3740 shadowsize "4pt"
3741 framecolor "black"
3742 backgroundcolor "none"
3743 status open
3744
3745 \begin_layout Plain Layout
3746 This section is somewhat out of date.
3747  Need to describe default master documents and how children are opened when
3748  the master is.
3749  [[FIXME]]
3750 \end_layout
3751
3752 \end_inset
3753
3754
3755 \end_layout
3756
3757 \begin_layout Standard
3758 It is possible to set up cross-references between the different files.
3759  First, open all the files in question: let's call them A and B in a two
3760  file example, where B is included in A.
3761  Let's say you insert a label in A, then want to reference it in B.
3762  Open the cross-reference dialog whilst in document B, and you can select
3763  the 
3764 \begin_inset Quotes eld
3765 \end_inset
3766
3767 buffer
3768 \begin_inset Quotes erd
3769 \end_inset
3770
3771  to use.
3772 \end_layout
3773
3774 \begin_layout Subsection
3775 Bibliography Lists in all Subdocuments
3776 \end_layout
3777
3778 \begin_layout Standard
3779 If you work with child documents, you might want to have only one main bibliogra
3780 phy at the end, but still be able to have a selected bibliography for the
3781  child if you output it on its own.
3782  Here is how to achieve this.
3783 \end_layout
3784
3785 \begin_layout Standard
3786 For the main document, you just insert a bibliography inset at the place
3787  where the main bibliography has to appear (within the master file or within
3788  a child).
3789  If the bibliography inset is in the master file, the references will be
3790  inherited by all children, so they are available in the citation dialog
3791  within each child.
3792 \end_layout
3793
3794 \begin_layout Standard
3795 For child-specific bibliographies, insert bibliography insets within the
3796  child documents, at the place where the bibliography should appear when
3797  the child is compiled separately.
3798  However, the trick is to insert them into a branch (
3799 \family sans
3800 Insert\SpecialChar menuseparator
3801 Branch\SpecialChar menuseparator
3802 Insert New Branch...
3803 \family default
3804 ), e.
3805 \begin_inset space \thinspace{}
3806 \end_inset
3807
3808 g.
3809  called 
3810 \begin_inset Quotes eld
3811 \end_inset
3812
3813 Childonly
3814 \begin_inset Quotes erd
3815 \end_inset
3816
3817 .
3818  Within the children, activate the branch (
3819 \family sans
3820 Document\SpecialChar menuseparator
3821 Settings...\SpecialChar menuseparator
3822 Branches
3823 \family default
3824 ).
3825  Within the master, deactivate the branch (
3826 \family sans
3827 Document\SpecialChar menuseparator
3828 Settings...\SpecialChar menuseparator
3829 Branches
3830 \family default
3831 ).
3832  Now the child's bibliography will be ignored by the master, but considered
3833  by the child.
3834 \end_layout
3835
3836 \begin_layout Standard
3837 If you need multiple bibliographies (e.
3838 \begin_inset space \thinspace{}
3839 \end_inset
3840
3841 g., one per child in the 
3842 \emph on
3843 main document
3844 \emph default
3845 ), please refer to sec.
3846 \begin_inset space ~
3847 \end_inset
3848
3849
3850 \begin_inset CommandInset ref
3851 LatexCommand ref
3852 reference "subsec:Multiple-Bibliographies"
3853
3854 \end_inset
3855
3856 .
3857 \end_layout
3858
3859 \begin_layout Section
3860 \SpecialChar LyX
3861  Archives
3862 \end_layout
3863
3864 \begin_layout Standard
3865 Users sometimes need to be able to 
3866 \begin_inset Quotes eld
3867 \end_inset
3868
3869 bundle
3870 \begin_inset Quotes erd
3871 \end_inset
3872
3873  a \SpecialChar LyX
3874  file together with all the images (and other files) on which it depends,
3875  either for sending to a publisher or for sharing with a co-author.
3876  \SpecialChar LyX
3877  includes a Python script (
3878 \begin_inset Flex Code
3879 status collapsed
3880
3881 \begin_layout Plain Layout
3882 lyxpak.py
3883 \end_layout
3884
3885 \end_inset
3886
3887 ) that automates this process.
3888  To use it, you must have either the 
3889 \begin_inset Flex Code
3890 status collapsed
3891
3892 \begin_layout Plain Layout
3893 zipfile
3894 \end_layout
3895
3896 \end_inset
3897
3898  or 
3899 \begin_inset Flex Code
3900 status collapsed
3901
3902 \begin_layout Plain Layout
3903 tarfile
3904 \end_layout
3905
3906 \end_inset
3907
3908  python modules installed on your system.
3909  By default, the script prefers the 
3910 \begin_inset Flex Code
3911 status collapsed
3912
3913 \begin_layout Plain Layout
3914 gzip
3915 \end_layout
3916
3917 \end_inset
3918
3919 -compressed 
3920 \begin_inset Flex Code
3921 status collapsed
3922
3923 \begin_layout Plain Layout
3924 tar
3925 \end_layout
3926
3927 \end_inset
3928
3929  format on Unix-like systems and the 
3930 \begin_inset Flex Code
3931 status collapsed
3932
3933 \begin_layout Plain Layout
3934 zip
3935 \end_layout
3936
3937 \end_inset
3938
3939  format on Windows.
3940 \end_layout
3941
3942 \begin_layout Standard
3943 \SpecialChar LyX
3944 's configuration process will set the script up to export a `\SpecialChar LyX
3945  Archive',
3946  and this format will then be available under 
3947 \begin_inset Flex Code
3948 status collapsed
3949
3950 \begin_layout Plain Layout
3951 File\SpecialChar menuseparator
3952 Export
3953 \end_layout
3954
3955 \end_inset
3956
3957 .
3958 \end_layout
3959
3960 \begin_layout Standard
3961 Independently of the platform, the generation of a particular archive format
3962  can be forced by adding either the 
3963 \begin_inset Flex Code
3964 status collapsed
3965
3966 \begin_layout Plain Layout
3967 -t
3968 \end_layout
3969
3970 \end_inset
3971
3972  (for the 
3973 \begin_inset Flex Code
3974 status collapsed
3975
3976 \begin_layout Plain Layout
3977 tar
3978 \end_layout
3979
3980 \end_inset
3981
3982  format) or 
3983 \begin_inset Flex Code
3984 status collapsed
3985
3986 \begin_layout Plain Layout
3987 -z
3988 \end_layout
3989
3990 \end_inset
3991
3992  (for the 
3993 \begin_inset Flex Code
3994 status collapsed
3995
3996 \begin_layout Plain Layout
3997 zip
3998 \end_layout
3999
4000 \end_inset
4001
4002  format) switch to the 
4003 \begin_inset Flex Code
4004 status collapsed
4005
4006 \begin_layout Plain Layout
4007 \SpecialChar LyX
4008 \SpecialChar menuseparator
4009 \SpecialChar LyX
4010  Archive
4011 \end_layout
4012
4013 \end_inset
4014
4015  converter in 
4016 \begin_inset Flex Code
4017 status collapsed
4018
4019 \begin_layout Plain Layout
4020 Tools\SpecialChar menuseparator
4021 Preferences\SpecialChar menuseparator
4022 File Handling\SpecialChar menuseparator
4023 Converters
4024 \end_layout
4025
4026 \end_inset
4027
4028 .
4029  (Make sure you add the switch after the script name, not before it.)
4030 \end_layout
4031
4032 \begin_layout Section
4033 Fancy Headers and Footers
4034 \end_layout
4035
4036 \begin_layout Standard
4037 The default page layout is rather plain; for an 
4038 \begin_inset Flex Code
4039 status collapsed
4040
4041 \begin_layout Plain Layout
4042 article
4043 \end_layout
4044
4045 \end_inset
4046
4047  document class, all you get is a centered page number at the bottom of
4048  the page.
4049  This document uses KOMA-script's book class, so it appears to be a bit
4050  fancier.
4051  But to really put on a show, you need to set the document page style to
4052  
4053 \begin_inset Quotes eld
4054 \end_inset
4055
4056 fancy
4057 \begin_inset Quotes erd
4058 \end_inset
4059
4060 , as mentioned in the 
4061 \emph on
4062 User Guide
4063 \emph default
4064 .
4065  This section describes the \SpecialChar LaTeX
4066  code you need to insert in your \SpecialChar LaTeX
4067  preamble in
4068  order to get the desired effects.
4069 \end_layout
4070
4071 \begin_layout Standard
4072 For more information on fancy headers, see the 
4073 \begin_inset Flex Code
4074 status collapsed
4075
4076 \begin_layout Plain Layout
4077 fancyhdr
4078 \end_layout
4079
4080 \end_inset
4081
4082  package documentation.
4083  (
4084 \begin_inset Flex URL
4085 status collapsed
4086
4087 \begin_layout Plain Layout
4088
4089 https://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
4090 \end_layout
4091
4092 \end_inset
4093
4094 )
4095 \end_layout
4096
4097 \begin_layout Standard
4098 The page header is divided into three fields, not surprisingly labeled 
4099 \begin_inset Quotes eld
4100 \end_inset
4101
4102 left
4103 \begin_inset Quotes erd
4104 \end_inset
4105
4106
4107 \begin_inset Quotes eld
4108 \end_inset
4109
4110 center
4111 \begin_inset Quotes erd
4112 \end_inset
4113
4114 , and 
4115 \begin_inset Quotes eld
4116 \end_inset
4117
4118 right
4119 \begin_inset Quotes erd
4120 \end_inset
4121
4122 .
4123  The footer is also divided into these three fields.
4124  The \SpecialChar LaTeX
4125  commands to set these fields in the simplest manner are 
4126 \begin_inset Flex Code
4127 status collapsed
4128
4129 \begin_layout Plain Layout
4130
4131 \backslash
4132 lhead
4133 \end_layout
4134
4135 \end_inset
4136
4137
4138 \begin_inset Flex Code
4139 status collapsed
4140
4141 \begin_layout Plain Layout
4142
4143 \backslash
4144 chead
4145 \end_layout
4146
4147 \end_inset
4148
4149
4150 \begin_inset Flex Code
4151 status collapsed
4152
4153 \begin_layout Plain Layout
4154
4155 \backslash
4156 rhead
4157 \end_layout
4158
4159 \end_inset
4160
4161
4162 \begin_inset Flex Code
4163 status collapsed
4164
4165 \begin_layout Plain Layout
4166
4167 \backslash
4168 lfoot
4169 \end_layout
4170
4171 \end_inset
4172
4173 , etc.
4174  Suppose you wish to put your name in the upper left hand corner of each
4175  page.
4176  Simply insert the following command in the preamble: 
4177 \end_layout
4178
4179 \begin_layout Standard
4180
4181 \family typewriter
4182
4183 \backslash
4184 lhead{John Q.
4185  DocWriter}
4186 \end_layout
4187
4188 \begin_layout Standard
4189 You will now see your name in the upper left.
4190  If a field has a default entry that you would like to get rid of (often
4191  the page number appears in the central footer) simply include a command
4192  with a blank argument, e.
4193 \begin_inset space \thinspace{}
4194 \end_inset
4195
4196 g.:
4197 \end_layout
4198
4199 \begin_layout Standard
4200
4201 \family typewriter
4202
4203 \backslash
4204 cfoot{}
4205 \end_layout
4206
4207 \begin_layout Standard
4208 Let's get really fancy: lets put the section number with the word 
4209 \begin_inset Quotes eld
4210 \end_inset
4211
4212 Section
4213 \begin_inset Quotes erd
4214 \end_inset
4215
4216  (e.
4217 \begin_inset space \thinspace{}
4218 \end_inset
4219
4220 g.
4221 \begin_inset space \space{}
4222 \end_inset
4223
4224 Section 3) in the upper left, the page number (e.
4225 \begin_inset space \thinspace{}
4226 \end_inset
4227
4228 g.
4229 \begin_inset space \space{}
4230 \end_inset
4231
4232 Page 4) in the upper right, your name in the lower left, and the date in
4233  the lower right.
4234  The following commands should now appear in the preamble:
4235 \end_layout
4236
4237 \begin_layout Standard
4238
4239 \family typewriter
4240
4241 \backslash
4242 lhead{Section 
4243 \backslash
4244 thesection}
4245 \end_layout
4246
4247 \begin_layout Standard
4248
4249 \family typewriter
4250
4251 \backslash
4252 chead{}
4253 \end_layout
4254
4255 \begin_layout Standard
4256
4257 \family typewriter
4258
4259 \backslash
4260 rhead{Page 
4261 \backslash
4262 thepage}
4263 \end_layout
4264
4265 \begin_layout Standard
4266
4267 \family typewriter
4268
4269 \backslash
4270 lfoot{John Q.
4271  DocWriter}
4272 \end_layout
4273
4274 \begin_layout Standard
4275
4276 \family typewriter
4277
4278 \backslash
4279 cfoot{}
4280 \end_layout
4281
4282 \begin_layout Standard
4283
4284 \family typewriter
4285
4286 \backslash
4287 rfoot{
4288 \backslash
4289 today}
4290 \end_layout
4291
4292 \begin_layout Standard
4293 The commands 
4294 \begin_inset Flex Code
4295 status collapsed
4296
4297 \begin_layout Plain Layout
4298
4299 \backslash
4300 thesection
4301 \end_layout
4302
4303 \end_inset
4304
4305  and 
4306 \begin_inset Flex Code
4307 status collapsed
4308
4309 \begin_layout Plain Layout
4310
4311 \backslash
4312 thepage
4313 \end_layout
4314
4315 \end_inset
4316
4317  access \SpecialChar LaTeX
4318 's section and page counters, and so print out the current section
4319  and page number.
4320  
4321 \begin_inset Flex Code
4322 status collapsed
4323
4324 \begin_layout Plain Layout
4325
4326 \backslash
4327 today
4328 \end_layout
4329
4330 \end_inset
4331
4332  simply prints out today's date.
4333 \end_layout
4334
4335 \begin_layout Standard
4336 The thicknesses of the horizontal rules drawn beneath the header and above
4337  the footer can also be modified.
4338  If you don't want one of the rules, set its thickness to 0.
4339  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
4340  Use commands
4341 \family typewriter
4342  
4343 \family default
4344 like 
4345 \begin_inset Flex Code
4346 status collapsed
4347
4348 \begin_layout Plain Layout
4349
4350 \backslash
4351 renewcommand{
4352 \backslash
4353 headrulewidth}{0.4pt}
4354 \end_layout
4355
4356 \end_inset
4357
4358  and 
4359 \begin_inset Flex Code
4360 status collapsed
4361
4362 \begin_layout Plain Layout
4363
4364 \backslash
4365 renewcommand{
4366 \backslash
4367 footrulewidth}{0.4pt}
4368 \end_layout
4369
4370 \end_inset
4371
4372  to set the thicknesses.
4373 \end_layout
4374
4375 \begin_layout Standard
4376 You can switch the header/footer settings on and off for individual pages
4377  using commands like 
4378 \begin_inset Flex Code
4379 status collapsed
4380
4381 \begin_layout Plain Layout
4382
4383 \backslash
4384 thispagestyle{empty}
4385 \end_layout
4386
4387 \end_inset
4388
4389
4390 \begin_inset Flex Code
4391 status collapsed
4392
4393 \begin_layout Plain Layout
4394
4395 \backslash
4396 thispagestyle{plain}
4397 \end_layout
4398
4399 \end_inset
4400
4401 , and 
4402 \begin_inset Flex Code
4403 status collapsed
4404
4405 \begin_layout Plain Layout
4406
4407 \backslash
4408 thispagestyle{fancy}
4409 \end_layout
4410
4411 \end_inset
4412
4413 .
4414  Simply insert them in the text on the page you want changed and mark them
4415  as \SpecialChar TeX
4416  code.
4417  In fact, title pages are marked as plain by default, while following pages
4418  are marked fancy when using the global fancy setting.
4419 \end_layout
4420
4421 \begin_layout Standard
4422 As a final example, it is possible to include an image in the header or
4423  footer.
4424  Suppose you want to put a company logo in the upper lefthand corner.
4425  You might try something like
4426 \end_layout
4427
4428 \begin_layout Standard
4429
4430 \family typewriter
4431
4432 \backslash
4433 lhead{
4434 \backslash
4435 resizebox{1in}{!}{
4436 \backslash
4437 includegraphics{logo.eps}}}
4438 \end_layout
4439
4440 \begin_layout Standard
4441 \noindent
4442 (you may need to preface this with 
4443 \begin_inset Flex Code
4444 status collapsed
4445
4446 \begin_layout Plain Layout
4447
4448 \backslash
4449 usepackage{graphics}
4450 \end_layout
4451
4452 \end_inset
4453
4454  if you don't include graphics elsewhere in your document).
4455 \end_layout
4456
4457 \begin_layout Section
4458 Itemize Bullet Selection
4459 \begin_inset CommandInset label
4460 LatexCommand label
4461 name "sec:bullet"
4462
4463 \end_inset
4464
4465
4466 \end_layout
4467
4468 \begin_layout Standard
4469 by
4470 \noun on
4471  Allan Rae
4472 \end_layout
4473
4474 \begin_layout Subsection
4475 Introduction
4476 \end_layout
4477
4478 \begin_layout Standard
4479 \SpecialChar LyX
4480  provides 216 bullet shapes that can be accessed from a simple dialog.
4481  Using this dialog you can easily specify what bullet shape to use at each
4482  level of an itemized list.
4483  These settings are document-wide so you won't be able to specify different
4484  sets of bullets for different paragraphs.
4485 \begin_inset Foot
4486 status collapsed
4487
4488 \begin_layout Plain Layout
4489 Well, actually you can but you'll have to do it by hand.
4490 \end_layout
4491
4492 \end_inset
4493
4494
4495 \end_layout
4496
4497 \begin_layout Subsection
4498 How it looks
4499 \end_layout
4500
4501 \begin_layout Standard
4502 Open the dialog by selecting the 
4503 \begin_inset Flex Noun
4504 status collapsed
4505
4506 \begin_layout Plain Layout
4507 Document\SpecialChar menuseparator
4508 Settings
4509 \end_layout
4510
4511 \end_inset
4512
4513  menu item and then select the 
4514 \begin_inset Flex Noun
4515 status collapsed
4516
4517 \begin_layout Plain Layout
4518 Bullets
4519 \end_layout
4520
4521 \end_inset
4522
4523  tab.
4524 \end_layout
4525
4526 \begin_layout Standard
4527 The dialog provides you with a table of bullet shapes.
4528  A column of buttons on the left of the table provides access to the six
4529  different panels of bullet shapes.
4530  The row of buttons across the top is used to select which bullet depth
4531  you are changing.
4532
4533 \change_deleted 244031559 1603875981
4534  A text entry under the table shows the currently selected bullet shape's
4535  \SpecialChar LaTeX
4536  equivalent and this can be edited if desired.
4537  If you do modify the text you will also need to specify any needed packages
4538  in the \SpecialChar LaTeX
4539  preamble.
4540 \change_unchanged
4541
4542 \end_layout
4543
4544 \begin_layout Standard
4545 The six panels are divided up by the packages they require.
4546  The following table shows the mappings from button name to \SpecialChar LaTeX
4547  package.
4548 \end_layout
4549
4550 \begin_layout Standard
4551 \align center
4552 \begin_inset Tabular
4553 <lyxtabular version="3" rows="7" columns="2">
4554 <features tabularvalignment="middle">
4555 <column alignment="center" valignment="top" width="0pt">
4556 <column alignment="center" valignment="top" width="0pt">
4557 <row>
4558 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4559 \begin_inset Text
4560
4561 \begin_layout Plain Layout
4562
4563 \family roman
4564 \series medium
4565 \shape up
4566 \size normal
4567 \emph off
4568 \bar no
4569 \noun off
4570 \color none
4571 Button
4572 \end_layout
4573
4574 \end_inset
4575 </cell>
4576 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4577 \begin_inset Text
4578
4579 \begin_layout Plain Layout
4580
4581 \family roman
4582 \series medium
4583 \shape up
4584 \size normal
4585 \emph off
4586 \bar no
4587 \noun off
4588 \color none
4589 Packages Required
4590 \end_layout
4591
4592 \end_inset
4593 </cell>
4594 </row>
4595 <row>
4596 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4597 \begin_inset Text
4598
4599 \begin_layout Plain Layout
4600
4601 \family sans
4602 \series medium
4603 \shape up
4604 \size normal
4605 \emph off
4606 \bar no
4607 \noun off
4608 \color none
4609 Standard
4610 \end_layout
4611
4612 \end_inset
4613 </cell>
4614 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4615 \begin_inset Text
4616
4617 \begin_layout Plain Layout
4618
4619 \series medium
4620 \shape up
4621 \size normal
4622 \emph off
4623 \bar no
4624 \noun off
4625 \color none
4626 base \SpecialChar LaTeX
4627
4628 \end_layout
4629
4630 \end_inset
4631 </cell>
4632 </row>
4633 <row>
4634 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4635 \begin_inset Text
4636
4637 \begin_layout Plain Layout
4638
4639 \family sans
4640 \series medium
4641 \shape up
4642 \size normal
4643 \emph off
4644 \bar no
4645 \noun off
4646 \color none
4647 Maths
4648 \end_layout
4649
4650 \end_inset
4651 </cell>
4652 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4653 \begin_inset Text
4654
4655 \begin_layout Plain Layout
4656
4657 \family typewriter
4658 \series medium
4659 \shape up
4660 \size normal
4661 \emph off
4662 \bar no
4663 \noun off
4664 \color none
4665 amssymb.sty
4666 \end_layout
4667
4668 \end_inset
4669 </cell>
4670 </row>
4671 <row>
4672 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4673 \begin_inset Text
4674
4675 \begin_layout Plain Layout
4676
4677 \family sans
4678 \series medium
4679 \shape up
4680 \size normal
4681 \emph off
4682 \bar no
4683 \noun off
4684 \color none
4685 Ding1
4686 \end_layout
4687
4688 \end_inset
4689 </cell>
4690 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4691 \begin_inset Text
4692
4693 \begin_layout Plain Layout
4694
4695 \family typewriter
4696 \series medium
4697 \shape up
4698 \size normal
4699 \emph off
4700 \bar no
4701 \noun off
4702 \color none
4703 pifont.sty
4704 \end_layout
4705
4706 \end_inset
4707 </cell>
4708 </row>
4709 <row>
4710 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4711 \begin_inset Text
4712
4713 \begin_layout Plain Layout
4714
4715 \family sans
4716 \series medium
4717 \shape up
4718 \size normal
4719 \emph off
4720 \bar no
4721 \noun off
4722 \color none
4723 Ding2
4724 \end_layout
4725
4726 \end_inset
4727 </cell>
4728 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4729 \begin_inset Text
4730
4731 \begin_layout Plain Layout
4732
4733 \family typewriter
4734 \series medium
4735 \shape up
4736 \size normal
4737 \emph off
4738 \bar no
4739 \noun off
4740 \color none
4741 pifont.sty
4742 \end_layout
4743
4744 \end_inset
4745 </cell>
4746 </row>
4747 <row>
4748 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4749 \begin_inset Text
4750
4751 \begin_layout Plain Layout
4752
4753 \family sans
4754 \series medium
4755 \shape up
4756 \size normal
4757 \emph off
4758 \bar no
4759 \noun off
4760 \color none
4761 Ding3
4762 \end_layout
4763
4764 \end_inset
4765 </cell>
4766 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4767 \begin_inset Text
4768
4769 \begin_layout Plain Layout
4770
4771 \family typewriter
4772 \series medium
4773 \shape up
4774 \size normal
4775 \emph off
4776 \bar no
4777 \noun off
4778 \color none
4779 pifont.sty
4780 \end_layout
4781
4782 \end_inset
4783 </cell>
4784 </row>
4785 <row>
4786 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4787 \begin_inset Text
4788
4789 \begin_layout Plain Layout
4790
4791 \family sans
4792 \series medium
4793 \shape up
4794 \size normal
4795 \emph off
4796 \bar no
4797 \noun off
4798 \color none
4799 Ding4
4800 \end_layout
4801
4802 \end_inset
4803 </cell>
4804 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4805 \begin_inset Text
4806
4807 \begin_layout Plain Layout
4808
4809 \family typewriter
4810 \series medium
4811 \shape up
4812 \size normal
4813 \emph off
4814 \bar no
4815 \noun off
4816 \color none
4817 pifont.sty
4818 \end_layout
4819
4820 \end_inset
4821 </cell>
4822 </row>
4823 </lyxtabular>
4824
4825 \end_inset
4826
4827
4828 \end_layout
4829
4830 \begin_layout Standard
4831 \SpecialChar LyX
4832  doesn't stop you using bullets from packages you don't have.
4833  If you get errors from \SpecialChar LaTeX
4834  when you try to view or print the file, then it
4835  is likely you are missing a package.
4836 \begin_inset Foot
4837 status collapsed
4838
4839 \begin_layout Plain Layout
4840 \SpecialChar LyX
4841  doesn't restrict your use since you may be editing locally and exporting
4842  elsewhere.
4843 \end_layout
4844
4845 \end_inset
4846
4847
4848 \end_layout
4849
4850 \begin_layout Subsection
4851 How to use it
4852 \end_layout
4853
4854 \begin_layout Standard
4855 Select which bullet depth you want to change then select the bullet shape
4856  and size.
4857  Any changes will not be visible in \SpecialChar LyX
4858 , but are visible when viewing the document.
4859 \end_layout
4860
4861 \begin_layout Standard
4862 You can reset a bullet shape to the default simply by clicking your right
4863  mouse button on the appropriate bullet depth button.
4864 \begin_inset Foot
4865 status open
4866
4867 \begin_layout Plain Layout
4868 If you 
4869 \emph on
4870 really
4871 \emph default
4872  want to have multiple sets of paragraphs with different sets of bullets
4873  in each, then you're going to have to get your hands dirty with \SpecialChar TeX
4874  code.
4875  The bullet selection dialog can help though because it provides you with
4876  the \SpecialChar LaTeX
4877  code for a wide range of bullet shapes.
4878  To make your own custom paragraphs you have the following options:
4879 \end_layout
4880
4881 \begin_layout Plain Layout
4882 \begin_inset ERT
4883 status open
4884
4885 \begin_layout Plain Layout
4886
4887
4888 \backslash
4889 let
4890 \backslash
4891 savelabelitemi=
4892 \backslash
4893 labelitemi
4894 \end_layout
4895
4896 \end_inset
4897
4898
4899 \end_layout
4900
4901 \begin_layout Plain Layout
4902 \begin_inset ERT
4903 status open
4904
4905 \begin_layout Plain Layout
4906
4907
4908 \backslash
4909 renewcommand
4910 \backslash
4911 labelitemi[0]{
4912 \backslash
4913 small
4914 \backslash
4915 (
4916 \backslash
4917 sharp
4918 \backslash
4919 )}
4920 \end_layout
4921
4922 \end_inset
4923
4924
4925 \end_layout
4926
4927 \begin_layout Itemize
4928 Use the \SpecialChar LaTeX
4929  command 
4930 \begin_inset Flex Code
4931 status collapsed
4932
4933 \begin_layout Plain Layout
4934
4935 \backslash
4936 renewcommand{}{}
4937 \end_layout
4938
4939 \end_inset
4940
4941  to specify a new bullet shape for a given depth.
4942  You'll also need to save the current bullet shape so you can restore it
4943  again afterwards.
4944  In this itemized list the following \SpecialChar LaTeX
4945  code was used to change the bullet
4946  used for the first depth.
4947 \end_layout
4948
4949 \begin_deeper
4950 \begin_layout LyX-Code
4951
4952 \backslash
4953 let
4954 \backslash
4955 savelabelitemi=
4956 \backslash
4957 labelitemi 
4958 \end_layout
4959
4960 \begin_layout LyX-Code
4961
4962 \backslash
4963 renewcommand
4964 \backslash
4965 labelitemi[0]{
4966 \backslash
4967 small
4968 \backslash
4969 (
4970 \backslash
4971 sharp
4972 \backslash
4973 )}
4974 \end_layout
4975
4976 \end_deeper
4977 \begin_layout Itemize
4978 Note that the itemize depth is specified in Roman numerals as part of the
4979  
4980 \family typewriter
4981
4982 \backslash
4983 labelitem
4984 \family default
4985  command.
4986 \end_layout
4987
4988 \begin_layout Itemize
4989 \begin_inset Argument item:1
4990 status open
4991
4992 \begin_layout Plain Layout
4993 \begin_inset ERT
4994 status open
4995
4996 \begin_layout Plain Layout
4997
4998
4999 \backslash
5000 (
5001 \backslash
5002 star
5003 \backslash
5004 )
5005 \end_layout
5006
5007 \end_inset
5008
5009
5010 \end_layout
5011
5012 \end_inset
5013
5014  Specify each individual entry by starting each item with the bullet shape
5015  enclosed in a 
5016 \begin_inset Quotes eld
5017 \end_inset
5018
5019 Custom Item
5020 \begin_inset Quotes erd
5021 \end_inset
5022
5023  inset (available at 
5024 \family sans
5025 Insert\SpecialChar menuseparator
5026 Custom Item
5027 \family default
5028 ) and set as 
5029 \begin_inset Flex Noun
5030 status collapsed
5031
5032 \begin_layout Plain Layout
5033 \SpecialChar TeX
5034  Code
5035 \end_layout
5036
5037 \end_inset
5038
5039 .
5040  For example, this item was started with 
5041 \begin_inset Flex Code
5042 status collapsed
5043
5044 \begin_layout Plain Layout
5045
5046 \backslash
5047 (
5048 \backslash
5049 star
5050 \backslash
5051 )
5052 \end_layout
5053
5054 \end_inset
5055
5056 .
5057 \end_layout
5058
5059 \begin_layout Plain Layout
5060 \begin_inset ERT
5061 status open
5062
5063 \begin_layout Plain Layout
5064
5065
5066 \backslash
5067 renewcommand
5068 \backslash
5069 labelitemi[0]{
5070 \backslash
5071 savelabelitemi}
5072 \end_layout
5073
5074 \end_inset
5075
5076
5077 \end_layout
5078
5079 \begin_layout Plain Layout
5080 You'll also need to revert the labelitem back to its previous setting for
5081  the global bullet shape settings to remain in effect.
5082  The way used here was:
5083 \end_layout
5084
5085 \begin_layout LyX-Code
5086
5087 \backslash
5088 renewcommand
5089 \backslash
5090 labelitemi[0]{
5091 \backslash
5092 savelabelitemi}
5093 \end_layout
5094
5095 \end_inset
5096
5097
5098 \end_layout
5099
5100 \begin_layout Chapter
5101 \SpecialChar LyX
5102  and the World Wide Web
5103 \end_layout
5104
5105 \begin_layout Standard
5106 \SpecialChar LyX
5107  has long supported the export of documents to various web-friendly formats,
5108  such as HTML.
5109  Before version 2.0, however, HTML export was always accomplished by the
5110  use of external converters.
5111 \begin_inset Foot
5112 status collapsed
5113
5114 \begin_layout Plain Layout
5115 For details on the use of external converters with \SpecialChar LyX
5116 , see the 
5117 \emph on
5118 Converters
5119 \emph default
5120  section of the Customization manual.
5121 \end_layout
5122
5123 \end_inset
5124
5125  These fall into two large groups: there are converters that use \SpecialChar LaTeX
5126  as an
5127  intermediate format, such as 
5128 \begin_inset Flex Code
5129 status collapsed
5130
5131 \begin_layout Plain Layout
5132 htlatex
5133 \end_layout
5134
5135 \end_inset
5136
5137
5138 \begin_inset Flex Code
5139 status collapsed
5140
5141 \begin_layout Plain Layout
5142 html2latex
5143 \end_layout
5144
5145 \end_inset
5146
5147 , and 
5148 \begin_inset Flex Code
5149 status collapsed
5150
5151 \begin_layout Plain Layout
5152 plastex
5153 \end_layout
5154
5155 \end_inset
5156
5157 , relying upon \SpecialChar LyX
5158  to produce the \SpecialChar LaTeX
5159 ; and there is a converter that works directly
5160  on \SpecialChar LyX
5161  files, 
5162 \begin_inset Flex Code
5163 status collapsed
5164
5165 \begin_layout Plain Layout
5166 e\SpecialChar LyX
5167 er
5168 \end_layout
5169
5170 \end_inset
5171
5172 .
5173  All of these have different advantages and disadvantages.
5174  
5175 \end_layout
5176
5177 \begin_layout Standard
5178 The \SpecialChar LaTeX
5179 -based converters have the advantage that, in principle, they know everythin
5180 g about the exported document that \SpecialChar LaTeX
5181  does.
5182  Such converters do not care, for example, if a certain block of code was
5183  produced by \SpecialChar LyX
5184  or was Evil Red Text.
5185  These converters know about 
5186 \begin_inset Flex Code
5187 status collapsed
5188
5189 \begin_layout Plain Layout
5190 aux
5191 \end_layout
5192
5193 \end_inset
5194
5195  files, counters, and references, and can often make use of the 
5196 \begin_inset Flex Code
5197 status collapsed
5198
5199 \begin_layout Plain Layout
5200 bbl
5201 \end_layout
5202
5203 \end_inset
5204
5205  files generated by Bib\SpecialChar TeX
5206 .
5207  On the other hand, \SpecialChar LaTeX
5208  is a very hard language to parse—it is sometimes said
5209  that only \SpecialChar TeX
5210  itself understands \SpecialChar TeX
5211 —and \SpecialChar LaTeX
5212 -based converters will often choke on
5213  what seem to be quite simple constructs; complex ones can throw them completely
5214 , and as of this writing, for example, the 
5215 \emph on
5216 Embedded Objects
5217 \emph default
5218  manual will not export with 
5219 \begin_inset Flex Code
5220 status collapsed
5221
5222 \begin_layout Plain Layout
5223 htlatex
5224 \end_layout
5225
5226 \end_inset
5227
5228 , though the others will.
5229  The other issue concerns how math is handled.
5230  These converters typically convert the formulae into little pictures that
5231  are then linked from the HTML document.
5232  Since these are actually generated by \SpecialChar LaTeX
5233 , they are accurate.
5234  But they do not scale well, and just getting them to look as if they are
5235  actually meant to be in your document—so that the font sizes seem to be
5236  roughly the same—can be a challenge.
5237 \end_layout
5238
5239 \begin_layout Standard
5240 Alex Fernandez's 
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  (
5252 \begin_inset CommandInset href
5253 LatexCommand href
5254 name "http://pinchito.es/elyxer/"
5255 target "http://pinchito.es/elyxer/"
5256 literal "false"
5257
5258 \end_inset
5259
5260 ) solves some of these problems.
5261  In particular, the formulae it produces scale perfectly, since it renders
5262  math using a combination of HTML and CSS rather than converting the formulae
5263  to images.
5264  But even moderately complex formula are rendered less well than with 
5265 \begin_inset Flex Code
5266 status collapsed
5267
5268 \begin_layout Plain Layout
5269 htlatex
5270 \end_layout
5271
5272 \end_inset
5273
5274 ; this reflects the limitations of HTML.
5275 \begin_inset Foot
5276 status collapsed
5277
5278 \begin_layout Plain Layout
5279 That said, 
5280 \begin_inset Flex Code
5281 status collapsed
5282
5283 \begin_layout Plain Layout
5284 e\SpecialChar LyX
5285 er
5286 \end_layout
5287
5288 \end_inset
5289
5290  can also use jsMath and MathJax for equations, but this setting is only
5291  available globally and requires one to have access to a server that runs
5292  the backend.
5293 \end_layout
5294
5295 \end_inset
5296
5297  More importantly (as of version 1.1.1, at least), 
5298 \begin_inset Flex Code
5299 status collapsed
5300
5301 \begin_layout Plain Layout
5302 e\SpecialChar LyX
5303 er
5304 \end_layout
5305
5306 \end_inset
5307
5308  has limited support for math macros and no support for user-defined paragraph
5309  or character styles.
5310  These limitations make 
5311 \begin_inset Flex Code
5312 status collapsed
5313
5314 \begin_layout Plain Layout
5315 e\SpecialChar LyX
5316 er
5317 \end_layout
5318
5319 \end_inset
5320
5321  unsuitable for many of the documents \SpecialChar LyX
5322  users produce.
5323  In principle, of course, these problems could be solved, but the \SpecialChar LyX
5324  developers
5325  have decided to follow a different path and have made \SpecialChar LyX
5326  itself capable of
5327  writing XHTML, just as it is capable of writing \SpecialChar LaTeX
5328 , DocBook, and plaintext.
5329 \end_layout
5330
5331 \begin_layout Standard
5332 As of this writing, XHTML output remains under development and should probably
5333  be regarded as 
5334 \begin_inset Quotes eld
5335 \end_inset
5336
5337 experimental
5338 \begin_inset Quotes erd
5339 \end_inset
5340
5341 .
5342 \begin_inset Foot
5343 status collapsed
5344
5345 \begin_layout Plain Layout
5346 The file 
5347 \begin_inset Flex Code
5348 status collapsed
5349
5350 \begin_layout Plain Layout
5351 development/HTML/HTML.notes
5352 \end_layout
5353
5354 \end_inset
5355
5356 , which can be found in the \SpecialChar LyX
5357  source tree or 
5358 \begin_inset CommandInset href
5359 LatexCommand href
5360 name "accessed online"
5361 target "https://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
5362 literal "false"
5363
5364 \end_inset
5365
5366 , usually contains up-to-date information about the state of XHTML output.
5367  See also the list of XHTML bugs on 
5368 \begin_inset CommandInset href
5369 LatexCommand href
5370 name "the bug tracker"
5371 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"
5372 literal "false"
5373
5374 \end_inset
5375
5376 .
5377 \end_layout
5378
5379 \end_inset
5380
5381  Still, the developers have chosen this approach because it has several
5382  potential advantages over the other two.
5383 \end_layout
5384
5385 \begin_layout Standard
5386 These advantages are primarily due to the fact that the XHTML output routines,
5387  since they are part of \SpecialChar LyX
5388 , know everything \SpecialChar LyX
5389  knows about the document being
5390  exported.
5391 \begin_inset Foot
5392 status collapsed
5393
5394 \begin_layout Plain Layout
5395 Another advantage is that, since these routines are internal to \SpecialChar LyX
5396 , they are
5397  immune to changes in \SpecialChar LyX
5398 's file format, or to changes in the semantics of
5399  existing insets.
5400 \end_layout
5401
5402 \end_inset
5403
5404  So they know about the table of contents (as displayed in the outline),
5405  about the counters associated with different paragraph styles, and about
5406  user-defined styles.
5407  The XHTML output routines know what \SpecialChar LyX
5408  knows about internationalization,
5409  too, so they will output 
5410 \begin_inset Quotes eld
5411 \end_inset
5412
5413 Chapter 1
5414 \begin_inset Quotes erd
5415 \end_inset
5416
5417  or 
5418 \begin_inset Quotes eld
5419 \end_inset
5420
5421
5422 \lang ngerman
5423 Kapitel
5424 \lang english
5425  1
5426 \begin_inset Quotes erd
5427 \end_inset
5428
5429 , depending upon the language in effect at the time.
5430  
5431 \end_layout
5432
5433 \begin_layout Standard
5434 Quite generally, the output routines know what \SpecialChar LyX
5435  knows about document layout,
5436  that is, about how the document is to be rendered on screen.
5437  We use this information when we output the document as XHTML.
5438  In particular, \SpecialChar LyX
5439  
5440 \emph on
5441 automatically
5442 \emph default
5443  generates CSS style information corresponding to the layout information
5444  it uses to render the document on screen: if section headings are supposed
5445  to be sans-serif and bold as seen in \SpecialChar LyX
5446 , then (by default) they will be sans-seri
5447 f and bold when viewed in a web browser, too.
5448  And this is true not just for pre-defined styles, like Section, but for
5449  any style, including user-defined styles.
5450  Indeed, the XHTML output routines make no distinction between user-defined
5451  paragraph and 
5452 \change_deleted 244031559 1603876931
5453 character
5454 \change_inserted 244031559 1603876940
5455 text
5456 \change_unchanged
5457  styles and \SpecialChar LyX
5458 's own pre-defined styles: in each case, everything \SpecialChar LyX
5459  knows about
5460  the styles is contained in the layout files.
5461  And much the same is true as regards pre-defined textual insets, such as
5462  footnotes, and various custom insets.
5463  
5464 \end_layout
5465
5466 \begin_layout Standard
5467 The result is that XHTML output can be customized and extended in exactly
5468  the same way \SpecialChar LaTeX
5469  output can be customized and extended: through layout files
5470  and modules.
5471  See chapter five of the 
5472 \emph on
5473 Customization 
5474 \emph default
5475 manual for the details.
5476 \end_layout
5477
5478 \begin_layout Standard
5479 The remainder of this chapter contains more detailed information on XHTML
5480  output, its limitations, and ways to work around those limitations.
5481 \end_layout
5482
5483 \begin_layout Section
5484 Math Output in XHTML
5485 \end_layout
5486
5487 \begin_layout Standard
5488 \SpecialChar LyX
5489  offers four choices for how math is rendered.
5490  These have various advantages and disadvantages:
5491 \end_layout
5492
5493 \begin_layout Itemize
5494 MathML
5495 \begin_inset Newline newline
5496 \end_inset
5497
5498 MathML is a dialect of XML designed specifically for mathematics on the
5499  web, and it typically renders very well in browsers that support it.
5500  The disadvantage is that not all browsers support MathML, and support is
5501  not complete even in the Gecko-based browsers, such as Firefox.
5502 \begin_inset Newline newline
5503 \end_inset
5504
5505 If \SpecialChar LyX
5506  is unable to render a formula as MathML—for example, if the formula
5507  uses the 
5508 \begin_inset Flex Code
5509 status collapsed
5510
5511 \begin_layout Plain Layout
5512 xymatrix
5513 \end_layout
5514
5515 \end_inset
5516
5517  package or ERT—then it will instead output the formula as an image.
5518  
5519 \end_layout
5520
5521 \begin_layout Itemize
5522 HTML
5523 \begin_inset Newline newline
5524 \end_inset
5525
5526 As mentioned above, 
5527 \begin_inset Flex Code
5528 status collapsed
5529
5530 \begin_layout Plain Layout
5531 elyxer
5532 \end_layout
5533
5534 \end_inset
5535
5536  outputs math as HTML, styled by CSS.
5537 \begin_inset Foot
5538 status collapsed
5539
5540 \begin_layout Plain Layout
5541 \SpecialChar LyX
5542  has borrowed some of the CSS for its HTML output from 
5543 \begin_inset Flex Code
5544 status collapsed
5545
5546 \begin_layout Plain Layout
5547 elyxer
5548 \end_layout
5549
5550 \end_inset
5551
5552 .
5553 \end_layout
5554
5555 \end_inset
5556
5557  For simple formulae, this can work quite well, though with more complicated
5558  formulae it tends to break down.
5559  Still, this method has the advantage that it is very widely supported and
5560  so it may be appropriate for documents that contain only a little, fairly
5561  simple math.
5562 \begin_inset Newline newline
5563 \end_inset
5564
5565 If Lyx is unable to render a formula as HTML—for example, if the formula
5566  uses the 
5567 \begin_inset Flex Code
5568 status collapsed
5569
5570 \begin_layout Plain Layout
5571 xymatrix
5572 \end_layout
5573
5574 \end_inset
5575
5576  package or ERT—then it will instead output the formula as an image.
5577  
5578 \end_layout
5579
5580 \begin_layout Itemize
5581 Images
5582 \begin_inset Newline newline
5583 \end_inset
5584
5585 Like 
5586 \begin_inset Flex Code
5587 status collapsed
5588
5589 \begin_layout Plain Layout
5590 htlatex
5591 \end_layout
5592
5593 \end_inset
5594
5595 , \SpecialChar LyX
5596  will output formulae as images, the very same images, in fact, that are
5597  used for instant preview.
5598 \begin_inset Foot
5599 status collapsed
5600
5601 \begin_layout Plain Layout
5602 Instant preview does 
5603 \emph on
5604 not 
5605 \emph default
5606 have to be on for images to be output, however.
5607 \end_layout
5608
5609 \end_inset
5610
5611  The advantage to this method is that the images are simply generated by
5612  \SpecialChar LaTeX
5613 , so they are very accurate.
5614  The disadvantage, as mentioned earlier, is that these are bitmapped images,
5615  so they do not scale terribly well, and one cannot copy them, etc.
5616 \begin_inset Newline newline
5617 \end_inset
5618
5619 The size of the images can be controlled by setting the 
5620 \begin_inset Quotes eld
5621 \end_inset
5622
5623 Math Images Scaling
5624 \begin_inset Quotes erd
5625 \end_inset
5626
5627  parameter under 
5628 \begin_inset Flex Noun
5629 status collapsed
5630
5631 \begin_layout Plain Layout
5632 Document\SpecialChar menuseparator
5633 Settings\SpecialChar menuseparator
5634 Formats
5635 \end_layout
5636
5637 \end_inset
5638
5639 .
5640 \begin_inset Foot
5641 status collapsed
5642
5643 \begin_layout Plain Layout
5644 For those who want to know, this controls the resolution of the image in
5645  dots per inch and is based upon a default of 75 dpi.
5646 \end_layout
5647
5648 \end_inset
5649
5650
5651 \begin_inset Newline newline
5652 \end_inset
5653
5654 If \SpecialChar LyX
5655  for some reason fails to create an image for a formula (e.g., if a required
5656  \SpecialChar LaTeX
5657  package is not installed), then it will fall back to outputing the raw
5658  \SpecialChar LaTeX
5659 .
5660 \end_layout
5661
5662 \begin_layout Itemize
5663 \SpecialChar LaTeX
5664
5665 \begin_inset Newline newline
5666 \end_inset
5667
5668 Finally, \SpecialChar LyX
5669  will happily output math as \SpecialChar LaTeX
5670 .
5671  As well as being the output of last resort, this method can be used with
5672  such tools as 
5673 \begin_inset CommandInset href
5674 LatexCommand href
5675 name "jsMath"
5676 target "http://www.math.union.edu/~dpvc/jsMath/"
5677 literal "false"
5678
5679 \end_inset
5680
5681 , which uses JavaScript to render \SpecialChar LaTeX
5682  embedded in HTML documents.
5683  \SpecialChar LyX
5684  wraps the \SpecialChar LaTeX
5685  in either a 
5686 \begin_inset Flex Code
5687 status collapsed
5688
5689 \begin_layout Plain Layout
5690 span
5691 \end_layout
5692
5693 \end_inset
5694
5695  (for inline formulas) or 
5696 \begin_inset Flex Code
5697 status collapsed
5698
5699 \begin_layout Plain Layout
5700 div
5701 \end_layout
5702
5703 \end_inset
5704
5705  (for displayed formulas) with 
5706 \begin_inset Flex Code
5707 status collapsed
5708
5709 \begin_layout Plain Layout
5710 class='math'
5711 \end_layout
5712
5713 \end_inset
5714
5715 , as is required for jsMath.
5716 \end_layout
5717
5718 \begin_layout Standard
5719 One of these output methods must be selected under 
5720 \begin_inset Flex Noun
5721 status collapsed
5722
5723 \begin_layout Plain Layout
5724 Document\SpecialChar menuseparator
5725 Settings\SpecialChar menuseparator
5726 Formats
5727 \end_layout
5728
5729 \end_inset
5730
5731 .
5732  By default, \SpecialChar LyX
5733  outputs MathML.
5734  This is a document-wide setting, therefore.
5735 \end_layout
5736
5737 \begin_layout Standard
5738 Eventually, \SpecialChar LyX
5739  will offer the user the option to select an alternate output
5740  method for a particular inset, say, one that isn't being rendered very
5741  well by MathML.
5742 \begin_inset Foot
5743 status collapsed
5744
5745 \begin_layout Plain Layout
5746 That said, since \SpecialChar LyX
5747  falls back to images if the inset contains ERT, then one
5748  can force output as an image by putting some harmless ERT into the math,
5749  for example: 
5750 \begin_inset Formula $a=b\relax$
5751 \end_inset
5752
5753 .
5754 \end_layout
5755
5756 \end_inset
5757
5758
5759 \end_layout
5760
5761 \begin_layout Section
5762 Bibliography and Citations
5763 \end_layout
5764
5765 \begin_layout Standard
5766 XHTML output fully supports bibliographies and citations.
5767  
5768 \end_layout
5769
5770 \begin_layout Standard
5771 Citation labels are generated by the same machinery that generates \SpecialChar LyX
5772 's on-screen
5773  labels, so the labels will look in the output much as they do in \SpecialChar LyX
5774 , though
5775  better.
5776  If you are using numerical citations, then \SpecialChar LyX
5777  will output numerical labels,
5778  such as [1] or [17], rather than simply showing the citation key in square
5779  brackets, as it does on-screen.
5780  If you are using author-year citations, then \SpecialChar LyX
5781  will add lowercase letters
5782  to the years, just as Bib\SpecialChar TeX
5783  does, if it finds more than one citation for
5784  a given author-year combination.
5785  The labels will be printed with the bibliography entries.
5786  Note that there is, at present, no way to customize the appearance of the
5787  labels, for example, to choose between square brackets and parentheses.
5788 \end_layout
5789
5790 \begin_layout Standard
5791 Bibliography output is handled by the same machinery that handles the presentati
5792 on of reference information in the citation dialog, so you will see in the
5793  XHTML output pretty much what you would see if you were to look at a given
5794  entry in the citation dialog.
5795  The formatting can be customized in your layout file or, preferably, in
5796  a module.
5797  See the 
5798 \emph on
5799 Customization
5800 \emph default
5801  manual for the details.
5802 \end_layout
5803
5804 \begin_layout Standard
5805 The main defect at present is that cross-referenced information is printed
5806  with every entry with which it is associated.
5807  So you can see things like this:
5808 \end_layout
5809
5810 \begin_layout Quote
5811 Jason Stanley, 
5812 \begin_inset Quotes eld
5813 \end_inset
5814
5815 Context and Logical Form
5816 \begin_inset Quotes erd
5817 \end_inset
5818
5819 , in 
5820 \emph on
5821 Language in Context: Selected Essays
5822 \emph default
5823  (Oxford: Oxford University Press, 2007), pp.
5824  30–68.
5825 \end_layout
5826
5827 \begin_layout Quote
5828 Jason Stanley, 
5829 \begin_inset Quotes eld
5830 \end_inset
5831
5832 Semantics in Context
5833 \begin_inset Quotes erd
5834 \end_inset
5835
5836 , in 
5837 \emph on
5838 Language in Context: Selected Essays
5839 \emph default
5840  (Oxford: Oxford University Press, 2007), pp.
5841  201–30.
5842 \end_layout
5843
5844 \begin_layout Standard
5845 This should be fixed before long.
5846 \end_layout
5847
5848 \begin_layout Standard
5849 There is no support at present for sectioned bibliographies.
5850  If you have multiple bibliographies, then \SpecialChar LyX
5851  will print the same bibliography
5852  over and over.
5853 \end_layout
5854
5855 \begin_layout Section
5856 Indexes
5857 \end_layout
5858
5859 \begin_layout Standard
5860 \SpecialChar LyX
5861  will happily export indexes as XHTML, but with certain limitations at the
5862  moment.
5863 \end_layout
5864
5865 \begin_layout Standard
5866 Index export will be most reliable when you do not attempt to use the fancy
5867  constructs that are described in the section on indexes in the 
5868 \emph on
5869 User's Guide
5870 \emph default
5871 .
5872 \begin_inset Foot
5873 status collapsed
5874
5875 \begin_layout Plain Layout
5876 The main issue here is that \SpecialChar LyX
5877  itself does not really handle these.
5878  It just lets you enter what you would have to enter in raw \SpecialChar LaTeX
5879 .
5880 \end_layout
5881
5882 \end_inset
5883
5884  We'll describe how they are handled using the subsection headings from
5885  that section.
5886 \end_layout
5887
5888 \begin_layout Itemize
5889 Grouping Index Entries (aka, sub-entries): \SpecialChar LyX
5890  makes an effort to support these,
5891  but the entries must be separated by 
5892 \begin_inset Quotes eld
5893 \end_inset
5894
5895  ! 
5896 \begin_inset Quotes erd
5897 \end_inset
5898
5899 , that is, there must be spaces around the exclamation point.
5900  This is because it is otherwise too difficult to check for escaped exclamation
5901  points, ones in math, and so forth.
5902 \end_layout
5903
5904 \begin_layout Itemize
5905 Page Ranges: There is no support at all for page ranges, since these make
5906  no sense with XHMTL.
5907  Instead, you will just get two index entries, one at either end.
5908 \end_layout
5909
5910 \begin_layout Itemize
5911 Cross-referencing: There is no support for cross-referencing.
5912  If \SpecialChar LyX
5913  finds an entry containing the 
5914 \begin_inset Quotes eld
5915 \end_inset
5916
5917 |see\SpecialChar ldots
5918
5919 \begin_inset Quotes erd
5920 \end_inset
5921
5922  construct, it is just dropped, and the rest is treated as an ordinary index
5923  entry.
5924 \end_layout
5925
5926 \begin_layout Itemize
5927 Index Entry Order: \SpecialChar LyX
5928  does support attempts to fix the sorting order.
5929  It will take what is before the first `@' it finds and use that for sorting,
5930  taking what follows the first `@' to be the actual entry.
5931  At present, \SpecialChar LyX
5932  does not check for escaped `@', so do not try to index email
5933  addresses.
5934 \end_layout
5935
5936 \begin_layout Itemize
5937 Index Entry Layout: You can format entries by using the text style dialog,
5938  or by using any other method available within \SpecialChar LyX
5939  itself.
5940  There is no support for constructs like: 
5941 \begin_inset Quotes eld
5942 \end_inset
5943
5944 entry|textbf
5945 \begin_inset Quotes erd
5946 \end_inset
5947
5948 .
5949  Indeed, if \SpecialChar LyX
5950  finds a pipe symbol, `|', in an entry, it will delete it and
5951  everything that follows it.
5952 \end_layout
5953
5954 \begin_layout Itemize
5955 Multiple Indexes: There is no support for multiple indexes.
5956  Rather, all index entries will be printed as one large index.
5957  To avoid our printing several versions of the index, we print only the
5958  main index, so make sure you have one.
5959 \end_layout
5960
5961 \begin_layout Section
5962 Nomenclature and Glossary
5963 \end_layout
5964
5965 \begin_layout Standard
5966 There is at present no support for glossaries.
5967  Adding it would be fairly trivial, and welcome.
5968 \end_layout
5969
5970 \begin_layout Chapter
5971
5972 \change_inserted 1075283030 1616534180
5973 DocBook Output
5974 \end_layout
5975
5976 \begin_layout Standard
5977
5978 \change_inserted 1075283030 1616534386
5979 Apart from HTML, \SpecialChar LyX
5980  can generate documents in the DocBook XML vocabulary.
5981  With versions 2.3 and before, only select templates could be used to generate
5982  DocBook documents (only version 4).
5983  Starting with \SpecialChar LyX
5984  2.4, most \SpecialChar LyX
5985  layouts can generate valid DocBook documents (only
5986  version 5).
5987  This feature is built into \SpecialChar LyX
5988  and does not require the use of external tools.
5989 \end_layout
5990
5991 \begin_layout Standard
5992
5993 \change_inserted 1075283030 1616534437
5994 The result is that the DocBook output can be customized and extended in
5995  exactly the same way \SpecialChar LaTeX
5996  output can be customized and extended: through layout
5997  files and modules.
5998  See chapter five of the 
5999 \emph on
6000 Customization 
6001 \emph default
6002 manual for the details.
6003 \end_layout
6004
6005 \begin_layout Standard
6006
6007 \change_inserted 1075283030 1616534475
6008 Most \SpecialChar LyX
6009  features are supported with DocBook, like math output.
6010 \end_layout
6011
6012 \begin_layout Itemize
6013
6014 \change_inserted 1075283030 1616534741
6015 Math output is performed mostly in MathML (the major exception being constructio
6016 ns not supported by \SpecialChar LyX
6017 , i.e.
6018  ERTs).
6019  All formulae are also available in raw \SpecialChar TeX
6020  in the DocBook output for further
6021  processing.
6022 \end_layout
6023
6024 \begin_layout Itemize
6025
6026 \change_inserted 1075283030 1616534852
6027 Bibliographies and citations are implemented, including with an external
6028  BibTeX file.
6029  Bibliography entries are not prerendered when the detailed information
6030  are available, but rather output with the standard DocBook constructs.
6031  The external DocBook processor is expected to handle the rendering of entries.
6032 \end_layout
6033
6034 \begin_layout Itemize
6035
6036 \change_inserted 1075283030 1616534863
6037 Indexes are supported, including multiple indices.
6038  Grouping (with 
6039 \family typewriter
6040 !
6041 \family default
6042 ), page ranges, and cross-references (
6043 \family typewriter
6044 |see
6045 \family default
6046 ) are supported, with the exception of the same symbols escaped.
6047  Entry order (
6048 \family typewriter
6049 @
6050 \family default
6051 ) and layout (
6052 \family typewriter
6053 |mathbf
6054 \family default
6055 ) are not supported.
6056  There is no support for escaping of index entries.
6057 \end_layout
6058
6059 \begin_layout Itemize
6060
6061 \change_inserted 1075283030 1616534884
6062 Glossaries are implemented.
6063 \end_layout
6064
6065 \begin_layout Standard
6066
6067 \change_inserted 1075283030 1616534894
6068 Two major parameters can be set at the document level.
6069 \end_layout
6070
6071 \begin_layout Itemize
6072
6073 \change_inserted 1075283030 1616534948
6074 Format for tables: \SpecialChar LyX
6075  can generate tables either as HTML (default value) or
6076  CALS, depending on the user's requirements.
6077  Most DocBook processors accept both formats.
6078 \end_layout
6079
6080 \begin_layout Itemize
6081
6082 \change_inserted 1075283030 1616535006
6083 MathML prefix: in DocBook, MathML is included within its own name space,
6084  unlike HTML.
6085  The implication is that there must be an indication of the tags belonging
6086  to the MathML standard.
6087  Three choices are offered: 
6088 \end_layout
6089
6090 \begin_deeper
6091 \begin_layout Itemize
6092
6093 \change_inserted 1075283030 1616535044
6094 Inline: the MathML name space is defined for each formula (using the 
6095 \family typewriter
6096 xmlns
6097 \family default
6098  attribute on each formula)
6099 \end_layout
6100
6101 \begin_layout Itemize
6102
6103 \change_inserted 1075283030 1616535090
6104 With the 
6105 \family typewriter
6106 m
6107 \family default
6108  prefix (default): the MathML name space is defined at the document level
6109  (using the 
6110 \family typewriter
6111 xmlns:m
6112 \family default
6113  attribute on the root element).
6114  Each MathML is prefixed with 
6115 \family typewriter
6116 m
6117 \family default
6118 : for instance, 
6119 \family typewriter
6120 m:math
6121 \end_layout
6122
6123 \begin_layout Itemize
6124
6125 \change_inserted 1075283030 1616535102
6126 With the 
6127 \family typewriter
6128 mml
6129 \family default
6130  prefix: similar to the 
6131 \family typewriter
6132 m
6133 \family default
6134  option, but with 
6135 \family typewriter
6136 mml
6137 \change_unchanged
6138
6139 \end_layout
6140
6141 \end_deeper
6142 \begin_layout Chapter
6143 The \SpecialChar LyX
6144  Server
6145 \end_layout
6146
6147 \begin_layout Section
6148 Introduction
6149 \end_layout
6150
6151 \begin_layout Standard
6152 The `\SpecialChar LyX
6153  server' allows other programs to talk to \SpecialChar LyX
6154 , invoke \SpecialChar LyX
6155  commands, and retrieve
6156  information about the \SpecialChar LyX
6157  internal state.
6158  This is only intended for advanced users, but they should find it useful.
6159  It is by writing to the \SpecialChar LyX
6160  server, for example, that bibliography managers,
6161  such as JabRef, are able to 
6162 \begin_inset Quotes eld
6163 \end_inset
6164
6165 push
6166 \begin_inset Quotes erd
6167 \end_inset
6168
6169  citations to \SpecialChar LyX
6170 .
6171 \end_layout
6172
6173 \begin_layout Section
6174 Starting the \SpecialChar LyX
6175  Server
6176 \begin_inset CommandInset label
6177 LatexCommand label
6178 name "sec:Starting-the-Server"
6179
6180 \end_inset
6181
6182
6183 \end_layout
6184
6185 \begin_layout Standard
6186 The \SpecialChar LyX
6187  server works through the use of a pair of named pipes.
6188  These are usually located in 
6189 \begin_inset Flex Code
6190 status collapsed
6191
6192 \begin_layout Plain Layout
6193 UserDir
6194 \end_layout
6195
6196 \end_inset
6197
6198 , (except on Windows, where 
6199 \emph on
6200 local
6201 \emph default
6202  named pipes are special objects located in 
6203 \begin_inset Flex Code
6204 status collapsed
6205
6206 \begin_layout Plain Layout
6207
6208 \backslash
6209
6210 \backslash
6211 .
6212 \backslash
6213 pipe
6214 \end_layout
6215
6216 \end_inset
6217
6218 ) and have the names 
6219 \begin_inset Quotes eld
6220 \end_inset
6221
6222
6223 \begin_inset Flex Code
6224 status collapsed
6225
6226 \begin_layout Plain Layout
6227 lyxpipe.in
6228 \end_layout
6229
6230 \end_inset
6231
6232
6233 \begin_inset Quotes erd
6234 \end_inset
6235
6236  and 
6237 \begin_inset Quotes eld
6238 \end_inset
6239
6240
6241 \begin_inset Flex Code
6242 status collapsed
6243
6244 \begin_layout Plain Layout
6245 lyxpipe.out
6246 \end_layout
6247
6248 \end_inset
6249
6250
6251 \begin_inset Quotes erd
6252 \end_inset
6253
6254 .
6255  External programs write into 
6256 \begin_inset Flex Code
6257 status collapsed
6258
6259 \begin_layout Plain Layout
6260 lyxpipe.in
6261 \end_layout
6262
6263 \end_inset
6264
6265  and read back data from 
6266 \begin_inset Flex Code
6267 status collapsed
6268
6269 \begin_layout Plain Layout
6270 lyxpipe.out
6271 \end_layout
6272
6273 \end_inset
6274
6275 .
6276  The stem of the pipe names can be defined in the 
6277 \begin_inset Flex Noun
6278 status collapsed
6279
6280 \begin_layout Plain Layout
6281 Tools\SpecialChar menuseparator
6282 Preferences
6283 \end_layout
6284
6285 \end_inset
6286
6287  dialog, for example 
6288 \begin_inset Flex Code
6289 status collapsed
6290
6291 \begin_layout Plain Layout
6292 "/home/myhome/lyxpipe"
6293 \end_layout
6294
6295 \end_inset
6296
6297 , or 
6298 \begin_inset Flex Code
6299 status collapsed
6300
6301 \begin_layout Plain Layout
6302 "
6303 \backslash
6304
6305 \backslash
6306 .
6307 \backslash
6308 pipe
6309 \backslash
6310 lyxpipe"
6311 \end_layout
6312
6313 \end_inset
6314
6315  on Windows (where any working path instead of lyxpipe can be used, for
6316  example 
6317 \begin_inset Flex Code
6318 status collapsed
6319
6320 \begin_layout Plain Layout
6321 "
6322 \backslash
6323
6324 \backslash
6325 .
6326 \backslash
6327 pipe
6328 \backslash
6329 my
6330 \backslash
6331 lyx
6332 \backslash
6333 pipe"
6334 \end_layout
6335
6336 \end_inset
6337
6338  would also work).
6339  You 
6340 \emph on
6341 must
6342 \emph default
6343  configure this manually in order for the server to start.
6344 \end_layout
6345
6346 \begin_layout Standard
6347 \SpecialChar LyX
6348  will add the '
6349 \begin_inset Flex Code
6350 status collapsed
6351
6352 \begin_layout Plain Layout
6353 .in
6354 \end_layout
6355
6356 \end_inset
6357
6358 ' and '
6359 \begin_inset Flex Code
6360 status collapsed
6361
6362 \begin_layout Plain Layout
6363 .out
6364 \end_layout
6365
6366 \end_inset
6367
6368 ' to create the pipes.
6369  If one of the pipes already exists, \SpecialChar LyX
6370  will assume that another \SpecialChar LyX
6371  process
6372  is already running and will not start the server.
6373  On POSIX (Unix like) systems, if for some other reason, an unused 
6374 \begin_inset Quotes eld
6375 \end_inset
6376
6377 stale
6378 \begin_inset Quotes erd
6379 \end_inset
6380
6381  pipe is left in existence when \SpecialChar LyX
6382  closes, then \SpecialChar LyX
6383  will try to delete it.
6384  If this fails for some reason, you will need to delete the pipes manually
6385  and then restart \SpecialChar LyX
6386 .
6387  On Windows, pipes are deleted by the OS on program termination or crash,
6388  so 
6389 \begin_inset Quotes eld
6390 \end_inset
6391
6392 stale
6393 \begin_inset Quotes erd
6394 \end_inset
6395
6396  pipes should not be possible.
6397 \end_layout
6398
6399 \begin_layout Standard
6400 To have several \SpecialChar LyX
6401  processes with servers at the same time, you have to use
6402  different configurations, perhaps by using separate user directories, each
6403  with its own 
6404 \begin_inset Flex Code
6405 status collapsed
6406
6407 \begin_layout Plain Layout
6408 preferences
6409 \end_layout
6410
6411 \end_inset
6412
6413  file, for each process.
6414 \end_layout
6415
6416 \begin_layout Standard
6417 If you are developing a client program, you might find it useful to enable
6418  debugging information from the \SpecialChar LyX
6419  server.
6420  Do this by starting \SpecialChar LyX
6421  as 
6422 \begin_inset Flex Code
6423 status collapsed
6424
6425 \begin_layout Plain Layout
6426 lyx -dbg lyxserver
6427 \end_layout
6428
6429 \end_inset
6430
6431 .
6432 \end_layout
6433
6434 \begin_layout Standard
6435 You can find a complete example client written in C++ in the source distribution
6436  as 
6437 \begin_inset Flex Code
6438 status collapsed
6439
6440 \begin_layout Plain Layout
6441 development/lyxserver/server_monitor.cpp
6442 \end_layout
6443
6444 \end_inset
6445
6446 .
6447 \end_layout
6448
6449 \begin_layout Standard
6450 Another useful tool is the command-line based client found in 
6451 \begin_inset Flex Code
6452 status collapsed
6453
6454 \begin_layout Plain Layout
6455 src/client/lyxclient
6456 \end_layout
6457
6458 \end_inset
6459
6460 .
6461 \end_layout
6462
6463 \begin_layout Section
6464 Normal communication
6465 \end_layout
6466
6467 \begin_layout Standard
6468 To issue a \SpecialChar LyX
6469  call, the client writes a line of ASCII text into the input
6470  pipe.
6471  This line has the following format:
6472 \end_layout
6473
6474 \begin_layout Quote
6475 LYXCMD:
6476 \emph on
6477 clientname
6478 \emph default
6479 :
6480 \emph on
6481 function
6482 \emph default
6483 :
6484 \emph on
6485 argument
6486 \end_layout
6487
6488 \begin_layout Description
6489 clientname is a name that the client can choose arbitrarily.
6490  Its only use is that \SpecialChar LyX
6491  will echo it if it sends an answer—so a client can
6492  dispatch results from different requesters.
6493 \end_layout
6494
6495 \begin_layout Description
6496 function is the function you want \SpecialChar LyX
6497  to perform.
6498  It is the same as the commands you'd use in the minibuffer.
6499 \end_layout
6500
6501 \begin_layout Description
6502 argument is an optional argument which is meaningful only to some functions
6503  (for instance, the 
6504 \begin_inset Quotes eld
6505 \end_inset
6506
6507 self-insert
6508 \begin_inset Quotes erd
6509 \end_inset
6510
6511  LFUN will insert the argument as text at the cursor position).
6512 \end_layout
6513
6514 \begin_layout Standard
6515 The answer from \SpecialChar LyX
6516  will arrive in the output pipe and be of the form
6517 \end_layout
6518
6519 \begin_layout Quote
6520 INFO:
6521 \emph on
6522 clientname
6523 \emph default
6524 :
6525 \emph on
6526 function
6527 \emph default
6528 :
6529 \emph on
6530 data
6531 \end_layout
6532
6533 \begin_layout Standard
6534 where 
6535 \emph on
6536 clientname
6537 \emph default
6538  and 
6539 \emph on
6540 function
6541 \emph default
6542  are just echoed from the command request, while 
6543 \emph on
6544 data
6545 \emph default
6546  is more or less useful information filled according to how the command
6547  execution worked out.
6548  Some commands, such as 
6549 \begin_inset Quotes eld
6550 \end_inset
6551
6552 font-state
6553 \begin_inset Quotes erd
6554 \end_inset
6555
6556 , will return information about the internal state of \SpecialChar LyX
6557 , while other will
6558  return an empty data-response.
6559  This means that the command execution went fine.
6560 \end_layout
6561
6562 \begin_layout Standard
6563 In case of errors, the response from \SpecialChar LyX
6564  will have this form
6565 \end_layout
6566
6567 \begin_layout Quote
6568 ERROR:
6569 \emph on
6570 clientname
6571 \emph default
6572 :
6573 \emph on
6574 function
6575 \emph default
6576 :
6577 \emph on
6578 error message
6579 \end_layout
6580
6581 \begin_layout Standard
6582 where the 
6583 \emph on
6584 error message
6585 \emph default
6586  should contain an explanation of why the command failed.
6587 \end_layout
6588
6589 \begin_layout Standard
6590 Examples:
6591 \end_layout
6592
6593 \begin_layout LyX-Code
6594 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
6595 \begin_inset Newline newline
6596 \end_inset
6597
6598 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
6599 \begin_inset Newline newline
6600 \end_inset
6601
6602 read a <~/.lyxpipe.out
6603 \begin_inset Newline newline
6604 \end_inset
6605
6606 echo $a
6607 \end_layout
6608
6609 \begin_layout Subsection
6610 AppleScript (Mac OS X)
6611 \end_layout
6612
6613 \begin_layout Standard
6614 Since \SpecialChar LyX
6615  2.1, \SpecialChar LyX
6616  supports basic interactions with AppleScript for normal communicatio
6617 n through the command run.
6618  This command takes a direct argument (the 
6619 \series bold
6620 function
6621 \series default
6622  to perform) and an optional argument.
6623  It either returns the output of the function or triggers an error with
6624  the error message and code.
6625 \end_layout
6626
6627 \begin_layout Standard
6628 Example:
6629 \end_layout
6630
6631 \begin_layout LyX-Code
6632 tell application "\SpecialChar LyX
6633 "
6634 \end_layout
6635
6636 \begin_layout LyX-Code
6637   try
6638 \end_layout
6639
6640 \begin_layout LyX-Code
6641     -- Stores the current file name into f
6642 \end_layout
6643
6644 \begin_layout LyX-Code
6645     set f to (run "server-get-filename" with argument "")
6646 \end_layout
6647
6648 \begin_layout LyX-Code
6649     on error the error_message number the error_number
6650 \end_layout
6651
6652 \begin_layout LyX-Code
6653       display dialog "Error: " & the error_number & ".
6654  " ¬
6655 \end_layout
6656
6657 \begin_layout LyX-Code
6658               & the error_message buttons {"OK"} default button 1
6659 \end_layout
6660
6661 \begin_layout LyX-Code
6662   end try
6663 \end_layout
6664
6665 \begin_layout LyX-Code
6666 end tell
6667 \end_layout
6668
6669 \begin_layout Section
6670 Notification
6671 \end_layout
6672
6673 \begin_layout Standard
6674 \SpecialChar LyX
6675  can notify clients of events going on asynchronously.
6676  Currently it will only do this if the user binds a key sequence with the
6677  function 
6678 \begin_inset Quotes eld
6679 \end_inset
6680
6681 notify
6682 \begin_inset Quotes erd
6683 \end_inset
6684
6685 .
6686  The format of the string \SpecialChar LyX
6687  sends is as follows:
6688 \end_layout
6689
6690 \begin_layout Quote
6691 \begin_inset Flex Code
6692 status collapsed
6693
6694 \begin_layout Plain Layout
6695 NOTIFY:
6696 \end_layout
6697
6698 \end_inset
6699
6700
6701 \emph on
6702 key-sequence
6703 \end_layout
6704
6705 \begin_layout Standard
6706 where 
6707 \emph on
6708 key-sequence
6709 \emph default
6710  is the printed representation of the key sequence that was actually typed
6711  by the user.
6712 \end_layout
6713
6714 \begin_layout Standard
6715 This mechanism can be used to extend \SpecialChar LyX
6716 's command set and implement macros.
6717  Bind some key sequence to 
6718 \begin_inset Quotes eld
6719 \end_inset
6720
6721 notify
6722 \begin_inset Quotes erd
6723 \end_inset
6724
6725 .
6726  Then start a client that listens on the output pipe, dispatches the command
6727  according to the sequence, and starts a function that may use \SpecialChar LyX
6728  calls and
6729  \SpecialChar LyX
6730  requests to issue a command or a series of commands to \SpecialChar LyX
6731 .
6732 \end_layout
6733
6734 \begin_layout Section
6735 The simple \SpecialChar LyX
6736  Server Protocol
6737 \end_layout
6738
6739 \begin_layout Standard
6740 \SpecialChar LyX
6741  implements a simple protocol that can be used for session management.
6742  All messages are of the form
6743 \end_layout
6744
6745 \begin_layout Quote
6746 LYXSRV:
6747 \emph on
6748 clientname
6749 \emph default
6750 :
6751 \emph on
6752 protocol message
6753 \end_layout
6754
6755 \begin_layout Standard
6756 where 
6757 \emph on
6758 protocol message
6759 \emph default
6760  can be 
6761 \begin_inset Quotes eld
6762 \end_inset
6763
6764 hello
6765 \begin_inset Quotes erd
6766 \end_inset
6767
6768  or 
6769 \begin_inset Quotes eld
6770 \end_inset
6771
6772 bye
6773 \begin_inset Quotes erd
6774 \end_inset
6775
6776 .
6777  If 
6778 \begin_inset Quotes eld
6779 \end_inset
6780
6781 hello
6782 \begin_inset Quotes erd
6783 \end_inset
6784
6785  is received from a client, \SpecialChar LyX
6786  will report back to inform the client that
6787  it's listening to it's messages, while 
6788 \begin_inset Quotes eld
6789 \end_inset
6790
6791 bye
6792 \begin_inset Quotes erd
6793 \end_inset
6794
6795  sent from \SpecialChar LyX
6796  will inform clients that \SpecialChar LyX
6797  is closing.
6798 \end_layout
6799
6800 \begin_layout Section
6801 Reverse DVI/PDF search
6802 \end_layout
6803
6804 \begin_layout Standard
6805 Some DVI/PDF viewers
6806 \begin_inset Foot
6807 status collapsed
6808
6809 \begin_layout Plain Layout
6810 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
6811  Qpdfview on Unix, Skim on Mac OSX and SumatraPDF on Windows.
6812 \end_layout
6813
6814 \end_inset
6815
6816  provide 
6817 \emph on
6818 reverse search
6819 \emph default
6820  facility (also called 
6821 \emph on
6822 inverse search
6823 \emph default
6824 ).
6825  This means that you can tell \SpecialChar LyX
6826  to put the cursor to a specific line in the
6827  document by clicking at the respective position in the DVI/PDF output.
6828  To achieve this, the viewer must be able to communicate with \SpecialChar LyX
6829 .
6830  This is done via the \SpecialChar LyX
6831  server either by using the named pipe (
6832 \emph on
6833 lyxpipe
6834 \emph default
6835 ), or the UNIX domain socket (
6836 \emph on
6837 lyxsocket
6838 \emph default
6839 ) that \SpecialChar LyX
6840  creates in its temporary directory (this is the way the 
6841 \begin_inset Flex Code
6842 status collapsed
6843
6844 \begin_layout Plain Layout
6845 lyxclient
6846 \end_layout
6847
6848 \end_inset
6849
6850  program communicates with \SpecialChar LyX
6851 ).
6852  In some cases, you need a helper script that mediates between the viewer
6853  and \SpecialChar LyX
6854 , in others, the viewer can communicate with \SpecialChar LyX
6855  directly.
6856  This depends on the selected viewer and on your operating system.
6857  The same applies to the way viewers need to be configured and the way the
6858  reverse search is actually performed.
6859  In what follows, we will thus describe how to setup reverse search for
6860  specific viewers.
6861  Before we turn to this, though, we will explain what needs to be done generally
6862  to enable reverse search in the DVI/PDF output.
6863 \end_layout
6864
6865 \begin_layout Subsection
6866 Automatic setup
6867 \begin_inset CommandInset label
6868 LatexCommand label
6869 name "subsec:rev-search"
6870
6871 \end_inset
6872
6873
6874 \end_layout
6875
6876 \begin_layout Standard
6877 In most cases \SpecialChar LyX
6878  will do the work for you by pressing the following button
6879  in the toolbar: 
6880 \begin_inset Info
6881 type  "icon"
6882 arg   "buffer-toggle-output-sync"
6883 \end_inset
6884
6885 .
6886  Alternatively, you can also enable the feature by checking 
6887 \family sans
6888 Synchronize with Output
6889 \family default
6890  in 
6891 \begin_inset Flex Noun
6892 status collapsed
6893
6894 \begin_layout Plain Layout
6895 Document\SpecialChar menuseparator
6896 Settings\SpecialChar menuseparator
6897 Formats
6898 \end_layout
6899
6900 \end_inset
6901
6902 .
6903  In such a case \SpecialChar LyX
6904  will automatically insert the necessary Sync\SpecialChar TeX
6905  macro (for
6906  PDF) or load the srcltx package (for DVI) respectively.
6907  This option can be easily reached also on 
6908 \begin_inset Flex Code
6909 status collapsed
6910
6911 \begin_layout Plain Layout
6912 View/Update
6913 \end_layout
6914
6915 \end_inset
6916
6917  Toolbar.
6918 \end_layout
6919
6920 \begin_layout Standard
6921 If you need a different setting, you can select or input a custom macro
6922  from the drop down box just below 
6923 \begin_inset Flex Noun
6924 status collapsed
6925
6926 \begin_layout Plain Layout
6927 Document\SpecialChar menuseparator
6928 Settings\SpecialChar menuseparator
6929 Output\SpecialChar menuseparator
6930 Synchronize with Output
6931 \end_layout
6932
6933 \end_inset
6934
6935 .
6936 \end_layout
6937
6938 \begin_layout Standard
6939 Note that the method 
6940 \begin_inset Flex Code
6941 status collapsed
6942
6943 \begin_layout Plain Layout
6944
6945 \backslash
6946 synctex=1
6947 \end_layout
6948
6949 \end_inset
6950
6951  enables gzip compression.
6952  If your viewer does not support it, you should instead use 
6953 \begin_inset Flex Code
6954 status collapsed
6955
6956 \begin_layout Plain Layout
6957
6958 \backslash
6959 synctex=-1
6960 \end_layout
6961
6962 \end_inset
6963
6964 .
6965 \end_layout
6966
6967 \begin_layout Standard
6968 Please also note that including the 
6969 \begin_inset Flex Code
6970 status collapsed
6971
6972 \begin_layout Plain Layout
6973 srcltx
6974 \end_layout
6975
6976 \end_inset
6977
6978  package or 
6979 \begin_inset Flex Code
6980 status collapsed
6981
6982 \begin_layout Plain Layout
6983 src-specials
6984 \end_layout
6985
6986 \end_inset
6987
6988  sometimes has an undesired impact on the typesetting.
6989  Thus, you should switch output synchronization off for the final typesetting
6990  if you use the 
6991 \begin_inset Flex Code
6992 status collapsed
6993
6994 \begin_layout Plain Layout
6995 srcltx
6996 \end_layout
6997
6998 \end_inset
6999
7000  package or 
7001 \begin_inset Flex Code
7002 status collapsed
7003
7004 \begin_layout Plain Layout
7005 src-specials
7006 \end_layout
7007
7008 \end_inset
7009
7010 .
7011  
7012 \end_layout
7013
7014 \begin_layout Standard
7015 In case you need some more special settings that are not covered by the
7016  automatic settings, read the next section about how to set up output synchroniz
7017 ation manually.
7018  If the automatic setup suits your needs, you can readily jump to section
7019 \begin_inset space ~
7020 \end_inset
7021
7022
7023 \begin_inset CommandInset ref
7024 LatexCommand ref
7025 reference "subsec:configuring-viewers"
7026
7027 \end_inset
7028
7029 , where the necessary configuration steps in your viewer – needed both with
7030  the automatic and the manual setup – are described.
7031 \end_layout
7032
7033 \begin_layout Subsection
7034 Manual setup
7035 \end_layout
7036
7037 \begin_layout Standard
7038 \SpecialChar LaTeX
7039  provides several different methods for reverse search.
7040  Some are built-in in the 
7041 \begin_inset Flex Code
7042 status collapsed
7043
7044 \begin_layout Plain Layout
7045 latex/pdflatex
7046 \end_layout
7047
7048 \end_inset
7049
7050  program, some are provided by external packages.
7051  Your choice depends on whether your \SpecialChar LaTeX
7052  distribution already provides a given
7053  method (the built-in methods are rather new) and whether your viewer can
7054  cope with it.
7055  The available methods are described in the following.
7056 \end_layout
7057
7058 \begin_layout Subsubsection*
7059 Built-in DVI-search via src-specials (DVI only) 
7060 \end_layout
7061
7062 \begin_layout Standard
7063 This method provides the DVI file with the necessary information for reverse
7064  search.
7065  It is available in \SpecialChar LaTeX
7066  since quite some time (any somewhat recent \SpecialChar LaTeX
7067  distribution
7068  should include it), and it works reliably.
7069  To enable it, 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 -src-specials $$i
7115 \end_layout
7116
7117 \end_inset
7118
7119 .
7120  If this doesn't work, check if your \SpecialChar TeX
7121  engine needs different options (the
7122  syntax might differ in some distributions).
7123 \end_layout
7124
7125 \begin_layout Subsubsection*
7126 External Packages (PDFSync and scrltx) 
7127 \end_layout
7128
7129 \begin_layout Standard
7130 The packages 
7131 \emph on
7132 pdfsync
7133 \emph default
7134  and 
7135 \emph on
7136 scrltx
7137 \emph default
7138  provide reverse search facility for PDF output (via pdflatex) and DVI output,
7139  respectively.
7140  In order to enable it, load the packages in the \SpecialChar LyX
7141  preamble: 
7142 \end_layout
7143
7144 \begin_layout Itemize
7145 \begin_inset Flex Code
7146 status collapsed
7147
7148 \begin_layout Plain Layout
7149
7150 \backslash
7151 usepackage{pdfsync}
7152 \end_layout
7153
7154 \end_inset
7155
7156  for reverse PDF search,
7157 \end_layout
7158
7159 \begin_layout Itemize
7160 \begin_inset Flex Code
7161 status collapsed
7162
7163 \begin_layout Plain Layout
7164
7165 \backslash
7166 usepackage[active]{srcltx}
7167 \end_layout
7168
7169 \end_inset
7170
7171  for reverse DVI search.
7172 \end_layout
7173
7174 \begin_layout Standard
7175 If you want to be able to perform both DVI and PDF reverse searches, you
7176  can also insert in the preamble the following lines
7177 \end_layout
7178
7179 \begin_layout LyX-Code
7180
7181 \backslash
7182 usepackage{ifpdf}
7183 \begin_inset Newline newline
7184 \end_inset
7185
7186
7187 \backslash
7188 ifpdf
7189 \begin_inset Newline newline
7190 \end_inset
7191
7192   
7193 \backslash
7194 usepackage{pdfsync}
7195 \begin_inset Newline newline
7196 \end_inset
7197
7198
7199 \backslash
7200 else
7201 \begin_inset Newline newline
7202 \end_inset
7203
7204   
7205 \backslash
7206 usepackage[active]{srcltx}
7207 \begin_inset Newline newline
7208 \end_inset
7209
7210
7211 \backslash
7212 fi
7213 \end_layout
7214
7215 \begin_layout Standard
7216 This way, you can preview the file as either DVI or PDF (pdflatex) and the
7217  right package will be used.
7218 \end_layout
7219
7220 \begin_layout Standard
7221 Note that PDFSync might affect the output layout of your document.
7222  It is therefore advised to disable PDFsync for final documents.
7223 \end_layout
7224
7225 \begin_layout Subsubsection*
7226 Built-in reverse search via Sync\SpecialChar TeX
7227  (DVI and PDF) 
7228 \end_layout
7229
7230 \begin_layout Standard
7231 Recent versions of 
7232 \begin_inset Flex Code
7233 status collapsed
7234
7235 \begin_layout Plain Layout
7236 (pdf)latex
7237 \end_layout
7238
7239 \end_inset
7240
7241  have built-in support for both PDF and DVI reverse search.
7242  This so-called 
7243 \emph on
7244 Sync\SpecialChar TeX
7245
7246 \emph default
7247  facility is basically the result of the integration of the PDFSync package
7248  to the pdftex program and its merge with the 
7249 \emph on
7250 scr-specials
7251 \emph default
7252  approach.
7253  You need at least \SpecialChar TeX
7254 Live 2008 or a recent Mik\SpecialChar TeX
7255  distribution in order to use
7256  it.
7257 \begin_inset Foot
7258 status collapsed
7259
7260 \begin_layout Plain Layout
7261 For some reason, Mik\SpecialChar TeX
7262  does not understand/obey the command \SpecialChar LyX
7263  inserts into
7264  the preamble when you check the "Enable Forward/Reverse Search" button
7265  in the toolbar and does not generate the necessary info.
7266 \end_layout
7267
7268 \begin_layout Plain Layout
7269 The generation of the required info can be forced by changing the converter
7270  "\SpecialChar LaTeX
7271  (pdflatex) -> PDF (pdflatex)" in Preferences->File handling->Converters
7272  from the default "pdflatex $$i" to "pdflatex -synctex=1 $$i" (i.e., by adding
7273  the -synctex=1 switch).
7274 \end_layout
7275
7276 \end_inset
7277
7278  Also note that only a few PDF viewers (such as Okular and Qpdfview on Unix,
7279  Skim on the Mac, SumatraPDF on Windows; see the next section for details)
7280  already provide Sync\SpecialChar TeX
7281  support.
7282 \end_layout
7283
7284 \begin_layout Standard
7285 To enable Sync\SpecialChar TeX
7286  for DVI output, change the 
7287 \begin_inset Flex Noun
7288 status collapsed
7289
7290 \begin_layout Plain Layout
7291 La
7292 \family sans
7293 TeX
7294 \family default
7295  (plain) -> DVI
7296 \end_layout
7297
7298 \end_inset
7299
7300  or 
7301 \begin_inset Flex Noun
7302 status collapsed
7303
7304 \begin_layout Plain Layout
7305 La
7306 \family sans
7307 TeX
7308 \family default
7309  (plain) -> DraftDVI
7310 \end_layout
7311
7312 \end_inset
7313
7314  converter in 
7315 \begin_inset Flex Noun
7316 status collapsed
7317
7318 \begin_layout Plain Layout
7319 Preferences\SpecialChar menuseparator
7320 File Handling\SpecialChar menuseparator
7321 Converters
7322 \end_layout
7323
7324 \end_inset
7325
7326  to 
7327 \begin_inset Flex Code
7328 status collapsed
7329
7330 \begin_layout Plain Layout
7331 latex -synctex=1 $$i
7332 \end_layout
7333
7334 \end_inset
7335
7336 , and for PDF output, change the 
7337 \begin_inset Flex Noun
7338 status collapsed
7339
7340 \begin_layout Plain Layout
7341 La
7342 \family sans
7343 TeX
7344 \family default
7345  (pdflatex) -> PDF (pdflatex)
7346 \end_layout
7347
7348 \end_inset
7349
7350  converter to 
7351 \begin_inset Flex Code
7352 status collapsed
7353
7354 \begin_layout Plain Layout
7355 pdflatex -synctex=1 $$i
7356 \end_layout
7357
7358 \end_inset
7359
7360 .
7361  Should your viewer not be considered in the following description, or in
7362  case of missing success, please check the documentation of your viewer
7363  whether the viewer needs to be configured for the use with Sync\SpecialChar TeX
7364 .
7365 \begin_inset Foot
7366 status collapsed
7367
7368 \begin_layout Plain Layout
7369 Note that the option 
7370 \begin_inset Flex Code
7371 status collapsed
7372
7373 \begin_layout Plain Layout
7374 -synctex=1
7375 \end_layout
7376
7377 \end_inset
7378
7379  option enables gzip compression.
7380  If your viewer does not support it, you should instead use 
7381 \begin_inset Flex Code
7382 status collapsed
7383
7384 \begin_layout Plain Layout
7385 -synctex=-1
7386 \end_layout
7387
7388 \end_inset
7389
7390 .
7391 \end_layout
7392
7393 \end_inset
7394
7395
7396 \end_layout
7397
7398 \begin_layout Subsection
7399 Configuring and using specific viewers
7400 \begin_inset CommandInset label
7401 LatexCommand label
7402 name "subsec:configuring-viewers"
7403
7404 \end_inset
7405
7406
7407 \end_layout
7408
7409 \begin_layout Subsubsection*
7410 Xdvi (all platforms)
7411 \end_layout
7412
7413 \begin_layout Standard
7414 If you use 
7415 \begin_inset Flex Code
7416 status collapsed
7417
7418 \begin_layout Plain Layout
7419 xdvi
7420 \end_layout
7421
7422 \end_inset
7423
7424 , you don't need to do anything else for performing a reverse DVI search,
7425  as \SpecialChar LyX
7426  already provides the necessary hooks for automatically using the 
7427 \begin_inset Flex Code
7428 status collapsed
7429
7430 \begin_layout Plain Layout
7431 lyxclient
7432 \end_layout
7433
7434 \end_inset
7435
7436  program.
7437  Just setup your document as described above (reverse search is triggered
7438  by Ctrl-click or Alt-click on Mac OSX, respectively).
7439 \end_layout
7440
7441 \begin_layout Standard
7442 However, if for whatever reason you want to use the named pipe instead of
7443  the socket for communicating with \SpecialChar LyX
7444 , simply change the DVI viewer in 
7445 \begin_inset Flex Noun
7446 status collapsed
7447
7448 \begin_layout Plain Layout
7449 Preferences\SpecialChar menuseparator
7450 File Handling\SpecialChar menuseparator
7451 File formats
7452 \end_layout
7453
7454 \end_inset
7455
7456  to
7457 \begin_inset Foot
7458 status collapsed
7459
7460 \begin_layout Plain Layout
7461 On Mac OSX you have to use 
7462 \begin_inset Flex Code
7463 status collapsed
7464
7465 \begin_layout Plain Layout
7466 DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l"
7467 \end_layout
7468
7469 \end_inset
7470
7471
7472 \end_layout
7473
7474 \end_inset
7475
7476  
7477 \begin_inset Flex Code
7478 status collapsed
7479
7480 \begin_layout Plain Layout
7481 xdvi -editor "lyxeditor.sh %f %l"
7482 \end_layout
7483
7484 \end_inset
7485
7486 , where 
7487 \begin_inset Flex Code
7488 status collapsed
7489
7490 \begin_layout Plain Layout
7491 lyxeditor.sh
7492 \end_layout
7493
7494 \end_inset
7495
7496  is a suitable script.
7497  For example, a minimal shell script is the following one:
7498 \end_layout
7499
7500 \begin_layout LyX-Code
7501 #!/bin/sh
7502 \begin_inset Newline newline
7503 \end_inset
7504
7505 LYXPIPE="/path/to/lyxpipe"
7506 \begin_inset Newline newline
7507 \end_inset
7508
7509 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
7510 \begin_inset Newline newline
7511 \end_inset
7512
7513 echo "$COMMAND" > "${LYXPIPE}".in || exit
7514 \begin_inset Newline newline
7515 \end_inset
7516
7517 read TMP < "${LYXPIPE}".out || exit
7518 \end_layout
7519
7520 \begin_layout Standard
7521 where 
7522 \begin_inset Flex Code
7523 status collapsed
7524
7525 \begin_layout Plain Layout
7526 /path/to/lyxpipe
7527 \end_layout
7528
7529 \end_inset
7530
7531  is the LyXServer pipe path specified in 
7532 \begin_inset Flex Noun
7533 status collapsed
7534
7535 \begin_layout Plain Layout
7536 Preferences\SpecialChar menuseparator
7537 Paths
7538 \end_layout
7539
7540 \end_inset
7541
7542 .
7543 \begin_inset Foot
7544 status collapsed
7545
7546 \begin_layout Plain Layout
7547 In the 
7548 \begin_inset Flex Code
7549 status collapsed
7550
7551 \begin_layout Plain Layout
7552 development/tools
7553 \end_layout
7554
7555 \end_inset
7556
7557  folder of a source distribution you can find a 
7558 \begin_inset Flex Code
7559 status collapsed
7560
7561 \begin_layout Plain Layout
7562 lyxeditor
7563 \end_layout
7564
7565 \end_inset
7566
7567  script which is able to locate the 
7568 \emph on
7569 lyxpipe
7570 \emph default
7571  based on your preferences.
7572 \end_layout
7573
7574 \end_inset
7575
7576
7577 \end_layout
7578
7579 \begin_layout Subsubsection*
7580 MacDviX (Mac OSX)
7581 \end_layout
7582
7583 \begin_layout Standard
7584 At the end of 
7585 \begin_inset Flex Code
7586 status collapsed
7587
7588 \begin_layout Plain Layout
7589 /Applications/MacDviX_Folder/calleditor.script
7590 \end_layout
7591
7592 \end_inset
7593
7594 , add the following lines:
7595 \end_layout
7596
7597 \begin_layout LyX-Code
7598 /Applications/LyX.app/Contents/MacOS/lyxeditor "$2" $1
7599 \begin_inset Newline newline
7600 \end_inset
7601
7602 exit 1
7603 \end_layout
7604
7605 \begin_layout Standard
7606 Modify the lines accordingly if you install \SpecialChar LyX
7607  somewhere else than in the
7608  Applications folder.
7609 \end_layout
7610
7611 \begin_layout Standard
7612 Reverse search is triggered by Alt-click (OPTION-click).
7613 \end_layout
7614
7615 \begin_layout Subsubsection*
7616 Skim (Mac OSX)
7617 \end_layout
7618
7619 \begin_layout Standard
7620 Enter 
7621 \begin_inset Flex Code
7622 status collapsed
7623
7624 \begin_layout Plain Layout
7625 open -a Skim.app $$i
7626 \end_layout
7627
7628 \end_inset
7629
7630  to the viewer setting in 
7631 \begin_inset Flex Noun
7632 status collapsed
7633
7634 \begin_layout Plain Layout
7635 Preferences\SpecialChar menuseparator
7636 File Handling\SpecialChar menuseparator
7637 File formats\SpecialChar menuseparator
7638 PDF (pdflatex)
7639 \end_layout
7640
7641 \end_inset
7642
7643 , and then in 
7644 \begin_inset Flex Noun
7645 status collapsed
7646
7647 \begin_layout Plain Layout
7648 Skim\SpecialChar menuseparator
7649 Preferences\SpecialChar menuseparator
7650 Sync
7651 \end_layout
7652
7653 \end_inset
7654
7655  choose 
7656 \begin_inset Flex Noun
7657 status collapsed
7658
7659 \begin_layout Plain Layout
7660 custom
7661 \end_layout
7662
7663 \end_inset
7664
7665  preset and enter command 
7666 \begin_inset Flex Noun
7667 status collapsed
7668
7669 \begin_layout Plain Layout
7670 /Applications/\SpecialChar LyX
7671 .app/Contents/MacOS/lyxeditor
7672 \end_layout
7673
7674 \end_inset
7675
7676 .
7677 \end_layout
7678
7679 \begin_layout Standard
7680 Reverse search is triggered by COMMAND-SHIFT-click
7681 \end_layout
7682
7683 \begin_layout Subsubsection*
7684 Evince (GNOME)
7685 \end_layout
7686
7687 \begin_layout Standard
7688 Reverse search with evince does not work out of the box, but it can be achieved
7689  by means of some third party helper scripts.
7690  Please refer to 
7691 \begin_inset CommandInset href
7692 LatexCommand href
7693 target "https://wiki.lyx.org/LyX/SyncTeX"
7694 literal "false"
7695
7696 \end_inset
7697
7698  for details.
7699 \end_layout
7700
7701 \begin_layout Subsubsection*
7702 Okular (KDE)
7703 \end_layout
7704
7705 \begin_layout Standard
7706 Go to 
7707 \begin_inset Flex Noun
7708 status collapsed
7709
7710 \begin_layout Plain Layout
7711 Settings\SpecialChar menuseparator
7712 Configure Okular\SpecialChar menuseparator
7713 Editor
7714 \end_layout
7715
7716 \end_inset
7717
7718  and select LyX
7719 \begin_inset Quotes erd
7720 \end_inset
7721
7722  as editor.
7723  This inserts the appropriate command (
7724 \begin_inset Flex Code
7725 status collapsed
7726
7727 \begin_layout Plain Layout
7728 lyxclient -g %f %l
7729 \end_layout
7730
7731 \end_inset
7732
7733 ).
7734 \end_layout
7735
7736 \begin_layout Standard
7737 Reverse search is triggered by SHIFT-click.
7738
7739 \change_inserted -712698321 1578211026
7740  Note that this only works if Okular is in 
7741 \begin_inset Quotes eld
7742 \end_inset
7743
7744 Browse
7745 \begin_inset Quotes erd
7746 \end_inset
7747
7748  mode (i.
7749 \begin_inset space \thinspace{}
7750 \end_inset
7751
7752 e., the hand symbol is clicked).
7753 \change_unchanged
7754
7755 \end_layout
7756
7757 \begin_layout Subsubsection*
7758 Qpdfview (Unix)
7759 \end_layout
7760
7761 \begin_layout Standard
7762 Qpdfview supports Sync\SpecialChar TeX
7763  since version 0.3.5.
7764  Go to 
7765 \begin_inset Flex Noun
7766 status collapsed
7767
7768 \begin_layout Plain Layout
7769 Edit\SpecialChar menuseparator
7770 Settings\SpecialChar menuseparator
7771 Behavior
7772 \end_layout
7773
7774 \end_inset
7775
7776 , click on the input field of the 
7777 \begin_inset Quotes eld
7778 \end_inset
7779
7780 Source editor
7781 \begin_inset Quotes erd
7782 \end_inset
7783
7784  item and add the command 
7785 \begin_inset Flex Code
7786 status collapsed
7787
7788 \begin_layout Plain Layout
7789 lyxclient -g %1 %2
7790 \end_layout
7791
7792 \end_inset
7793
7794 .
7795 \end_layout
7796
7797 \begin_layout Standard
7798 Reverse search is triggered by double-click or, in more recent versions,
7799  by context menu.
7800 \end_layout
7801
7802 \begin_layout Subsubsection*
7803 YAP (Windows)
7804 \end_layout
7805
7806 \begin_layout Standard
7807 Launch yap, choose its 
7808 \begin_inset Flex Noun
7809 status collapsed
7810
7811 \begin_layout Plain Layout
7812 View\SpecialChar menuseparator
7813 Options
7814 \end_layout
7815
7816 \end_inset
7817
7818  menu and select the 
7819 \begin_inset Quotes eld
7820 \end_inset
7821
7822 Inverse DVI Search
7823 \begin_inset Quotes erd
7824 \end_inset
7825
7826  tab.
7827  Click on the 
7828 \begin_inset Quotes eld
7829 \end_inset
7830
7831 New\SpecialChar ldots
7832
7833 \begin_inset Quotes erd
7834 \end_inset
7835
7836  button and, in the window that opens, enter 
7837 \begin_inset Quotes eld
7838 \end_inset
7839
7840 \SpecialChar LyX
7841  Editor
7842 \begin_inset Quotes erd
7843 \end_inset
7844
7845  (or any other name you like) in the 
7846 \begin_inset Quotes eld
7847 \end_inset
7848
7849 Name:
7850 \begin_inset Quotes erd
7851 \end_inset
7852
7853  field.
7854  Now click on the button labeled 
7855 \begin_inset Quotes eld
7856 \end_inset
7857
7858 \SpecialChar ldots
7859
7860 \begin_inset Quotes erd
7861 \end_inset
7862
7863  to open a file dialog and navigate to the directory containing the batch
7864  file 
7865 \begin_inset Flex Code
7866 status collapsed
7867
7868 \begin_layout Plain Layout
7869 lyxeditor.bat
7870 \end_layout
7871
7872 \end_inset
7873
7874  (see below).
7875  Select 
7876 \begin_inset Flex Code
7877 status collapsed
7878
7879 \begin_layout Plain Layout
7880 lyxeditor.bat
7881 \end_layout
7882
7883 \end_inset
7884
7885  and then specify the program arguments as 
7886 \begin_inset Flex Code
7887 status collapsed
7888
7889 \begin_layout Plain Layout
7890 %f %l
7891 \end_layout
7892
7893 \end_inset
7894
7895 .
7896  The 
7897 \begin_inset Flex Code
7898 status collapsed
7899
7900 \begin_layout Plain Layout
7901 lyxeditor.bat
7902 \end_layout
7903
7904 \end_inset
7905
7906  wrapper is used for communicating with \SpecialChar LyX
7907  through the 
7908 \emph on
7909 lyxpipe
7910 \emph default
7911  and is as follows:
7912 \end_layout
7913
7914 \begin_layout LyX-Code
7915 @echo off
7916 \begin_inset Newline newline
7917 \end_inset
7918
7919 echo LYXCMD:revdvi:server-goto-file-row:%~1 %2> 
7920 \backslash
7921
7922 \backslash
7923 .
7924 \backslash
7925 pipe
7926 \backslash
7927 lyxpipe.in
7928 \begin_inset Newline newline
7929 \end_inset
7930
7931 type 
7932 \backslash
7933
7934 \backslash
7935 .
7936 \backslash
7937 pipe
7938 \backslash
7939 lyxpipe.out
7940 \end_layout
7941
7942 \begin_layout Standard
7943 Make sure that the \SpecialChar LyX
7944 Server pipe path you specified in \SpecialChar LyX
7945  is 
7946 \begin_inset Flex Code
7947 status collapsed
7948
7949 \begin_layout Plain Layout
7950
7951 \backslash
7952
7953 \backslash
7954 .
7955 \backslash
7956 pipe
7957 \backslash
7958 lyxpipe
7959 \end_layout
7960
7961 \end_inset
7962
7963 , otherwise change the 
7964 \begin_inset Flex Code
7965 status collapsed
7966
7967 \begin_layout Plain Layout
7968 lyxeditor.bat
7969 \end_layout
7970
7971 \end_inset
7972
7973  wrapper accordingly.
7974 \end_layout
7975
7976 \begin_layout Standard
7977 In yap, reverse search is triggered by double-click.
7978 \end_layout
7979
7980 \begin_layout Subsubsection*
7981 SumatraPDF (Windows)
7982 \end_layout
7983
7984 \begin_layout Standard
7985 In order to use SumatraPDF for inverse search, enter 
7986 \begin_inset Flex Code
7987 status collapsed
7988
7989 \begin_layout Plain Layout
7990 SumatraPDF -inverse-search "lyxeditor.bat "%f" %l"
7991 \end_layout
7992
7993 \end_inset
7994
7995  in the viewer setting in 
7996 \begin_inset Flex Noun
7997 status collapsed
7998
7999 \begin_layout Plain Layout
8000 Preferences\SpecialChar menuseparator
8001 File Handling\SpecialChar menuseparator
8002 File formats\SpecialChar menuseparator
8003 PDF (pdflatex)
8004 \end_layout
8005
8006 \end_inset
8007
8008 , where 
8009 \begin_inset Flex Code
8010 status collapsed
8011
8012 \begin_layout Plain Layout
8013 lyxeditor.bat
8014 \end_layout
8015
8016 \end_inset
8017
8018  is the previous wrapper.
8019  If SumatraPDF.exe is not in your command PATH, use its full file name.
8020 \end_layout
8021
8022 \begin_layout Standard
8023 Reverse search is triggered by double-click.
8024 \end_layout
8025
8026 \begin_layout Subsubsection*
8027 YAP (Cygwin)
8028 \end_layout
8029
8030 \begin_layout Standard
8031 First of all, make sure that yap is your default DVI viewer in the Windows
8032  environment, then launch it, choose its 
8033 \begin_inset Flex Noun
8034 status collapsed
8035
8036 \begin_layout Plain Layout
8037 View\SpecialChar menuseparator
8038 Options
8039 \end_layout
8040
8041 \end_inset
8042
8043  menu and select the 
8044 \begin_inset Quotes eld
8045 \end_inset
8046
8047 Inverse DVI Search
8048 \begin_inset Quotes erd
8049 \end_inset
8050
8051  tab.
8052  Click on the 
8053 \begin_inset Quotes eld
8054 \end_inset
8055
8056 New\SpecialChar ldots
8057
8058 \begin_inset Quotes erd
8059 \end_inset
8060
8061  button and, in the window that opens, enter 
8062 \begin_inset Quotes eld
8063 \end_inset
8064
8065 \SpecialChar LyX
8066  Editor
8067 \begin_inset Quotes erd
8068 \end_inset
8069
8070  (or any other name you like) in the 
8071 \begin_inset Quotes eld
8072 \end_inset
8073
8074 Name:
8075 \begin_inset Quotes erd
8076 \end_inset
8077
8078  field.
8079  Now click on the button labeled 
8080 \begin_inset Quotes eld
8081 \end_inset
8082
8083 \SpecialChar ldots
8084
8085 \begin_inset Quotes erd
8086 \end_inset
8087
8088  to open a file dialog and navigate to the directory containing the 
8089 \begin_inset Flex Code
8090 status collapsed
8091
8092 \begin_layout Plain Layout
8093 lyxeditor.exe
8094 \end_layout
8095
8096 \end_inset
8097
8098  program (which is installed by default on Cygwin along with the \SpecialChar LyX
8099  executable).
8100  Select 
8101 \begin_inset Flex Code
8102 status collapsed
8103
8104 \begin_layout Plain Layout
8105 lyxeditor.exe
8106 \end_layout
8107
8108 \end_inset
8109
8110  and then specify the program arguments as 
8111 \begin_inset Flex Code
8112 status collapsed
8113
8114 \begin_layout Plain Layout
8115 -g %f %l
8116 \end_layout
8117
8118 \end_inset
8119
8120 .
8121  In this way, you will be using the 
8122 \emph on
8123 lyxsocket
8124 \emph default
8125  for communicating with \SpecialChar LyX
8126 .
8127  If, for whatever reason, you want to use the 
8128 \emph on
8129 lyxpipe
8130 \emph default
8131 , omit the 
8132 \begin_inset Flex Code
8133 status collapsed
8134
8135 \begin_layout Plain Layout
8136 -g
8137 \end_layout
8138
8139 \end_inset
8140
8141  option and be sure to specify the \SpecialChar LyX
8142 Server pipe path in the \SpecialChar LyX
8143  preferences.
8144 \end_layout
8145
8146 \begin_layout Standard
8147 In yap, reverse search is triggered by double-click.
8148 \end_layout
8149
8150 \begin_layout Subsubsection*
8151 SumatraPDF (Cygwin)
8152 \end_layout
8153
8154 \begin_layout Standard
8155 In order to use SumatraPDF for inverse search, enter 
8156 \begin_inset Flex Code
8157 status collapsed
8158
8159 \begin_layout Plain Layout
8160 SumatraPDF -inverse-search "lyxeditor -g %f %l"
8161 \end_layout
8162
8163 \end_inset
8164
8165  in the viewer setting in 
8166 \begin_inset Flex Noun
8167 status collapsed
8168
8169 \begin_layout Plain Layout
8170 Preferences\SpecialChar menuseparator
8171 File Handling\SpecialChar menuseparator
8172 File formats\SpecialChar menuseparator
8173 PDF (pdflatex)
8174 \end_layout
8175
8176 \end_inset
8177
8178 .
8179  If SumatraPDF.exe is not in your command PATH, use its full posix path.
8180  The 
8181 \begin_inset Flex Code
8182 status collapsed
8183
8184 \begin_layout Plain Layout
8185 -g
8186 \end_layout
8187
8188 \end_inset
8189
8190  enables communication via the 
8191 \emph on
8192 lyxsocket
8193 \emph default
8194 .
8195  Again, omit the 
8196 \begin_inset Flex Code
8197 status collapsed
8198
8199 \begin_layout Plain Layout
8200 -g
8201 \end_layout
8202
8203 \end_inset
8204
8205  option if you want to use the 
8206 \emph on
8207 lyxpipe
8208 \emph default
8209 , and be sure to specify the \SpecialChar LyX
8210 Server pipe path in the \SpecialChar LyX
8211  preferences.
8212 \end_layout
8213
8214 \begin_layout Standard
8215 Reverse search is triggered by double-click.
8216 \end_layout
8217
8218 \begin_layout Section
8219 Forward search
8220 \end_layout
8221
8222 \begin_layout Standard
8223 Forward search is, as the name implies, in a sense the 
8224 \begin_inset Quotes eld
8225 \end_inset
8226
8227 opposite
8228 \begin_inset Quotes erd
8229 \end_inset
8230
8231  of reverse search.
8232  It allows you to let the viewer jump to a given position from within \SpecialChar LyX
8233 .
8234  If forward search is set up (as described in what follows), you can put
8235  the cursor anywhere in your \SpecialChar LyX
8236  document, and hit 
8237 \begin_inset Flex Noun
8238 status collapsed
8239
8240 \begin_layout Plain Layout
8241 Navigate\SpecialChar menuseparator
8242 Forward search
8243 \end_layout
8244
8245 \end_inset
8246
8247  (or select 
8248 \begin_inset Flex Noun
8249 status collapsed
8250
8251 \begin_layout Plain Layout
8252 Forward search
8253 \end_layout
8254
8255 \end_inset
8256
8257  in the context menu via right mouse click), and then the viewer will jump
8258  to that position as well.
8259  This implies, of course, that your viewer supports this function.
8260 \end_layout
8261
8262 \begin_layout Standard
8263 To make forward search possible, you first need to provide the generated
8264  output PDF/DVI file with additional information about the \SpecialChar TeX
8265  sources.
8266  This can be done via the methods described in the section 
8267 \begin_inset CommandInset ref
8268 LatexCommand ref
8269 reference "subsec:rev-search"
8270
8271 \end_inset
8272
8273 .
8274 \end_layout
8275
8276 \begin_layout Standard
8277 Additionally, you need to configure \SpecialChar LyX
8278  for using your viewers in 
8279 \begin_inset Flex Noun
8280 status collapsed
8281
8282 \begin_layout Plain Layout
8283 Tools\SpecialChar menuseparator
8284 Preferences\SpecialChar menuseparator
8285 Output\SpecialChar menuseparator
8286 General
8287 \end_layout
8288
8289 \end_inset
8290
8291 .
8292  We provide a range of tested configurations for some viewers, which you
8293  can select from the drop down list.
8294  If none of these configurations suits you, you have to find out and enter
8295  a suitable configuration yourself.
8296  The definition syntax uses the following placeholders:
8297 \end_layout
8298
8299 \begin_layout Itemize
8300 \noindent
8301 \begin_inset Flex Code
8302 status collapsed
8303
8304 \begin_layout Plain Layout
8305 $$n
8306 \end_layout
8307
8308 \end_inset
8309
8310 : row number
8311 \end_layout
8312
8313 \begin_layout Itemize
8314 \noindent
8315 \begin_inset Flex Code
8316 status collapsed
8317
8318 \begin_layout Plain Layout
8319 $$t
8320 \end_layout
8321
8322 \end_inset
8323
8324 : name of the (temporary) exported .tex file (without path)
8325 \end_layout
8326
8327 \begin_layout Itemize
8328 \noindent
8329 \begin_inset Flex Code
8330 status collapsed
8331
8332 \begin_layout Plain Layout
8333 $$f
8334 \end_layout
8335
8336 \end_inset
8337
8338 : name of the (temporary) exported .tex file (including path)
8339 \end_layout
8340
8341 \begin_layout Itemize
8342 \noindent
8343 \begin_inset Flex Code
8344 status collapsed
8345
8346 \begin_layout Plain Layout
8347 $$o
8348 \end_layout
8349
8350 \end_inset
8351
8352 : name of the exported output file (either dvi or pdf, depending on which
8353  one exists in the temporary directory)
8354 \end_layout
8355
8356 \begin_layout Standard
8357 Note that only some of the viewers provide full and usable forward search
8358  functionality out of the box, among them yap, xdvi, okular
8359 \begin_inset Foot
8360 status collapsed
8361
8362 \begin_layout Plain Layout
8363 You might want to set 
8364 \begin_inset Flex Code
8365 status collapsed
8366
8367 \begin_layout Plain Layout
8368 okular --unique
8369 \end_layout
8370
8371 \end_inset
8372
8373  in 
8374 \begin_inset Flex Noun
8375 status collapsed
8376
8377 \begin_layout Plain Layout
8378 Tools\SpecialChar menuseparator
8379 Preferences\SpecialChar menuseparator
8380 File Handling\SpecialChar menuseparator
8381 File
8382 \begin_inset space ~
8383 \end_inset
8384
8385 Formats
8386 \end_layout
8387
8388 \end_inset
8389
8390
8391 \end_layout
8392
8393 \end_inset
8394
8395 , qpdfview, and SumatraPDF
8396 \begin_inset Foot
8397 status collapsed
8398
8399 \begin_layout Plain Layout
8400 SumatraPDF can also use DDE commands through the external program CMCDDE
8401  — downloadable from 
8402 \begin_inset CommandInset href
8403 LatexCommand href
8404 target "http://www.istri.fr/spip/zip/CMCDDE.zip"
8405 literal "false"
8406
8407 \end_inset
8408
8409
8410 \end_layout
8411
8412 \end_inset
8413
8414 .
8415  Others, such as evince
8416 \begin_inset Foot
8417 status collapsed
8418
8419 \begin_layout Plain Layout
8420 Forward search with evince can be achieved by means of third party helper
8421  scripts.
8422  Please refer to 
8423 \begin_inset CommandInset href
8424 LatexCommand href
8425 target "https://wiki.lyx.org/LyX/SyncTeX"
8426 literal "false"
8427
8428 \end_inset
8429
8430  for details.
8431 \end_layout
8432
8433 \end_inset
8434
8435 , require some extra tools in order to use forward search.
8436  While many of the widespread PDF viewers (most notably Adobe Reader) do
8437  not support forward search at all, some other viewers – e.
8438 \begin_inset space \thinspace{}
8439 \end_inset
8440
8441 g.
8442  xpdf – allow at least to reload the document and jump to a specific page
8443  of the file, so you can at least navigate 
8444 \begin_inset Quotes eld
8445 \end_inset
8446
8447 near
8448 \begin_inset Quotes erd
8449 \end_inset
8450
8451 .
8452  This latter functionality is provided by an external call of synctex (see
8453  the predefined example configurations).
8454  
8455 \end_layout
8456
8457 \begin_layout Standard
8458 Forward search works both with DVI and PDF output.
8459  \SpecialChar LyX
8460  simply checks which preview format you have used before (i.
8461 \begin_inset space \thinspace{}
8462 \end_inset
8463
8464 e., which format is already there in the temporary directory) and chooses
8465  the appropriate configuration for the respective format.
8466 \end_layout
8467
8468 \begin_layout Chapter
8469 Special Document Classes
8470 \end_layout
8471
8472 \begin_layout Section
8473 A&A Paper
8474 \end_layout
8475
8476 \begin_layout Standard
8477 by 
8478 \noun on
8479 Peter Sütterlin
8480 \end_layout
8481
8482 \begin_layout Subsection
8483 Introduction
8484 \end_layout
8485
8486 \begin_layout Standard
8487 This section describes how \SpecialChar LyX
8488  can be used to write articles for submission
8489  to the scientific journal 
8490 \emph on
8491 Astronomy and Astrophysics
8492 \emph default
8493  (
8494 \begin_inset Flex URL
8495 status collapsed
8496
8497 \begin_layout Plain Layout
8498
8499 https://www.aanda.org/
8500 \end_layout
8501
8502 \end_inset
8503
8504 ) using Version 5.01 of the document class 
8505 \family typewriter
8506 aa.cls
8507 \family default
8508 .
8509  This package can be downloaded from the ftp site
8510 \end_layout
8511
8512 \begin_layout Standard
8513 \begin_inset VSpace medskip
8514 \end_inset
8515
8516
8517 \end_layout
8518
8519 \begin_layout Standard
8520 \align center
8521 \begin_inset Flex URL
8522 status collapsed
8523
8524 \begin_layout Plain Layout
8525
8526 ftp://ftp.edpsciences.org/pub/aa/readme.html
8527 \end_layout
8528
8529 \end_inset
8530
8531
8532 \end_layout
8533
8534 \begin_layout Standard
8535 \begin_inset VSpace medskip
8536 \end_inset
8537
8538
8539 \end_layout
8540
8541 \begin_layout Standard
8542 A manual comes together with that package, and this text is not meant to
8543  replace the original manual but is merely a short guide in how to realize
8544  the correct form of your paper.
8545  
8546 \end_layout
8547
8548 \begin_layout Standard
8549 Please note that the publisher of the journal was changed from Springer
8550  to EDP Sciences starting January 1, 2001.
8551  That change involved also some slight changes to the style files, namely
8552  the removal of the thesaurus command.
8553  The \SpecialChar LyX
8554  class aa supports the newest version of these style files, V 5.01.
8555  If you have an older version installed, please upgrade.
8556  For compatibility, the old (version 4) layout has been kept as 
8557 \family sans
8558 article (A&A V4)
8559 \family default
8560 .
8561  Please refer to the comments in 
8562 \family typewriter
8563 \SpecialChar LyX
8564 Dir/layouts/aapaper.layout
8565 \family default
8566 .
8567 \end_layout
8568
8569 \begin_layout Subsection
8570 Getting started
8571 \end_layout
8572
8573 \begin_layout Standard
8574 It is recommended you start from the example template distributed with \SpecialChar LyX
8575 .
8576  If you are not using a template, note the following settings:
8577 \end_layout
8578
8579 \begin_layout Itemize
8580 Select 
8581 \family sans
8582 article (A&A)
8583 \family default
8584  in the 
8585 \family sans
8586 Document\SpecialChar menuseparator
8587 Settings
8588 \family default
8589  dialog (OK, that one was obvious).
8590 \end_layout
8591
8592 \begin_layout Itemize
8593 Don't change the option 
8594 \family sans
8595 Page
8596 \begin_inset space ~
8597 \end_inset
8598
8599 style
8600 \family default
8601 : Leave it set to 
8602 \family sans
8603 default
8604 \family default
8605 .
8606  The whole layout is done by the macros, you shouldn't change anything.
8607 \end_layout
8608
8609 \begin_layout Subsection
8610 The header block
8611 \end_layout
8612
8613 \begin_layout Standard
8614 First thing to enter is the header information.
8615  It consists of seven entries, of which some are optional.
8616  They are
8617 \end_layout
8618
8619 \begin_layout Itemize
8620
8621 \family sans
8622 Title
8623 \family default
8624 : [required] 
8625 \end_layout
8626
8627 \begin_layout Itemize
8628
8629 \family sans
8630 Subtitle
8631 \family default
8632 : [optional] 
8633 \end_layout
8634
8635 \begin_layout Itemize
8636
8637 \family sans
8638 Author
8639 \family default
8640 : [required]
8641 \end_layout
8642
8643 \begin_layout Itemize
8644
8645 \family sans
8646 Address
8647 \family default
8648 : [required]
8649 \end_layout
8650
8651 \begin_layout Itemize
8652
8653 \family sans
8654 Offprints
8655 \family default
8656 : [optional] if more than one author: whom to contact for offprint requests.
8657 \end_layout
8658
8659 \begin_layout Itemize
8660
8661 \family sans
8662 Mail
8663 \family default
8664 : [optional] mail address for contacts.
8665 \end_layout
8666
8667 \begin_layout Itemize
8668
8669 \family sans
8670 Date
8671 \family default
8672 : [required].
8673  Suggested format is 
8674 \family typewriter
8675 Received: <date>; Accepted <date> 
8676 \end_layout
8677
8678 \begin_layout Standard
8679 There is no need to issue the 
8680 \family typewriter
8681
8682 \backslash
8683 maketitle
8684 \family default
8685  command, this is done automatically by \SpecialChar LyX
8686  when the header is finished.
8687  Although the order of the single header entries doesn't matter it is advised
8688  to keep the above sequence, just to get the best optics and meets the layout
8689  of the real document.
8690 \end_layout
8691
8692 \begin_layout Standard
8693 If you want to place footnotes in the header block, e.
8694 \begin_inset space \thinspace{}
8695 \end_inset
8696
8697 g.
8698 \begin_inset space \space{}
8699 \end_inset
8700
8701 to state your present address, just use the standard footnote via the menu
8702  
8703 \family sans
8704 Insert\SpecialChar menuseparator
8705 Footnote.
8706
8707 \family default
8708  \SpecialChar LyX
8709  will automagically use the term 
8710 \family typewriter
8711
8712 \backslash
8713 thanks{}
8714 \family default
8715  in that case.
8716 \end_layout
8717
8718 \begin_layout Standard
8719 Under 
8720 \family sans
8721 Edit\SpecialChar menuseparator
8722 Text Style
8723 \family default
8724 , you'll find two insets which are relevant for the titling:
8725 \end_layout
8726
8727 \begin_layout Itemize
8728
8729 \family sans
8730 Institute
8731 \family typewriter
8732  
8733 \family default
8734 to mark corresponding author\SpecialChar breakableslash
8735 institute pairs.
8736  The institutes are numbered sequentially as they appear in the 
8737 \family sans
8738 Address
8739 \family default
8740  field, so you have to put a marker to each author.
8741 \end_layout
8742
8743 \begin_layout Itemize
8744
8745 \family sans
8746 Email
8747 \family default
8748  to supply an email address for fast contact.
8749 \end_layout
8750
8751 \begin_layout Standard
8752 In addition to these topics, the macros use one additional \SpecialChar LaTeX
8753  command that
8754  has no counterpart in \SpecialChar LyX
8755 :
8756 \end_layout
8757
8758 \begin_layout Itemize
8759
8760 \family typewriter
8761
8762 \backslash
8763 and
8764 \family default
8765  to separate different names for more than one author and institute, respectivel
8766 y.
8767 \end_layout
8768
8769 \begin_layout Standard
8770 The appropriate command has to be entered in \SpecialChar LyX
8771  and marked as \SpecialChar LaTeX
8772  code.
8773  See the examples.
8774  
8775 \end_layout
8776
8777 \begin_layout Subsection
8778 The abstract
8779 \end_layout
8780
8781 \begin_layout Standard
8782 The abstract should immediately follow the header block.
8783  With version 5 the abstract environment was changed to a command, and there
8784  is now a restriction to only one paragraph.
8785  In addition, it should contain an entry with the keywords.
8786  This is done via the paragraph style 
8787 \family sans
8788 Keywords
8789 \family default
8790 .
8791  Refer to the example paper.
8792 \end_layout
8793
8794 \begin_layout Subsection
8795 Supported environments
8796 \end_layout
8797
8798 \begin_layout Standard
8799 The A&A paper layout supports the following environments for structuring
8800  your text:
8801 \end_layout
8802
8803 \begin_layout Itemize
8804
8805 \family sans
8806 Standard
8807 \end_layout
8808
8809 \begin_layout Itemize
8810
8811 \family sans
8812 Section
8813 \end_layout
8814
8815 \begin_layout Itemize
8816
8817 \family sans
8818 Subsection
8819 \end_layout
8820
8821 \begin_layout Itemize
8822
8823 \family sans
8824 Subsubsection
8825 \end_layout
8826
8827 \begin_layout Itemize
8828
8829 \family sans
8830 Itemize
8831 \end_layout
8832
8833 \begin_layout Itemize
8834
8835 \family sans
8836 Enumerate
8837 \end_layout
8838
8839 \begin_layout Itemize
8840
8841 \family sans
8842 Description
8843 \end_layout
8844
8845 \begin_layout Itemize
8846
8847 \family sans
8848 Caption
8849 \end_layout
8850
8851 \begin_layout Itemize
8852
8853 \family sans
8854 Abstract
8855 \end_layout
8856
8857 \begin_layout Itemize
8858
8859 \family sans
8860 Acknowledgment
8861 \end_layout
8862
8863 \begin_layout Itemize
8864
8865 \family sans
8866 Bibliography
8867 \end_layout
8868
8869 \begin_layout Itemize
8870
8871 \family sans
8872 \SpecialChar LaTeX
8873
8874 \end_layout
8875
8876 \begin_layout Subsection
8877 Commands not supported by \SpecialChar LyX
8878
8879 \end_layout
8880
8881 \begin_layout Standard
8882 Some commands are not yet supported by the 
8883 \family sans
8884 paper (A&A)
8885 \family default
8886  layout for \SpecialChar LyX
8887 .
8888  Some have already been mentioned.
8889  For the sake of completeness, they are listed all together here:
8890 \end_layout
8891
8892 \begin_layout Itemize
8893
8894 \family typewriter
8895
8896 \backslash
8897 and
8898 \end_layout
8899
8900 \begin_layout Itemize
8901
8902 \family typewriter
8903
8904 \backslash
8905 authorrunning
8906 \end_layout
8907
8908 \begin_layout Itemize
8909
8910 \family typewriter
8911
8912 \backslash
8913 object{}
8914 \end_layout
8915
8916 \begin_layout Itemize
8917
8918 \family typewriter
8919
8920 \backslash
8921 titlerunning{}
8922 \end_layout
8923
8924 \begin_layout Standard
8925 If you want to use any of these commands, you have to enter them yourself.
8926  
8927 \series bold
8928 Do not forget to mark them as \SpecialChar LaTeX
8929  code!
8930 \end_layout
8931
8932 \begin_layout Subsection
8933 Figure and Table Floats
8934 \end_layout
8935
8936 \begin_layout Standard
8937 \SpecialChar LyX
8938  provides support for the necessary float environments 
8939 \family sans
8940 figure, figure*, table
8941 \family default
8942  and 
8943 \family sans
8944 table*
8945 \family default
8946 , therefore we won't tell much about it here.
8947  Refer to the 
8948 \emph on
8949 User's
8950 \begin_inset space ~
8951 \end_inset
8952
8953 Guide
8954 \emph default
8955 .
8956  Just remember that tables should be left-aligned.
8957  For that, select the table and change the alignment in 
8958 \family sans
8959 Edit\SpecialChar menuseparator
8960 Paragraph
8961 \begin_inset space ~
8962 \end_inset
8963
8964 Settings.
8965 \end_layout
8966
8967 \begin_layout Standard
8968 There is only one special thing: the figures with caption besides the figure.
8969  To create such a figure, you have to do the following:
8970 \end_layout
8971
8972 \begin_layout Enumerate
8973 Create a wide figure float: 
8974 \family sans
8975 Insert\SpecialChar menuseparator
8976 Float\SpecialChar menuseparator
8977 Figure
8978 \family default
8979 , then right click in the figure and select 
8980 \family sans
8981 Span
8982 \begin_inset space ~
8983 \end_inset
8984
8985 columns
8986 \family default
8987 .
8988 \end_layout
8989
8990 \begin_layout Enumerate
8991 Enter your caption text.
8992 \end_layout
8993
8994 \begin_layout Enumerate
8995 Press 
8996 \family sans
8997 Return
8998 \family default
8999  to move the cursor above the caption.
9000 \end_layout
9001
9002 \begin_layout Enumerate
9003 Insert your figure
9004 \end_layout
9005
9006 \begin_layout Enumerate
9007 Position the cursor behind the figure and insert a horizontal fill: 
9008 \family sans
9009 Insert\SpecialChar menuseparator
9010 Special
9011 \begin_inset space ~
9012 \end_inset
9013
9014 Character\SpecialChar menuseparator
9015 Horizontal
9016 \begin_inset space ~
9017 \end_inset
9018
9019 Fill
9020 \family default
9021 .
9022 \end_layout
9023
9024 \begin_layout Enumerate
9025 Switch to \SpecialChar LaTeX
9026  mode: 
9027 \family sans
9028 M-c
9029 \begin_inset space ~
9030 \end_inset
9031
9032 t
9033 \family default
9034 .
9035 \end_layout
9036
9037 \begin_layout Enumerate
9038 Enter 
9039 \family typewriter
9040
9041 \backslash
9042 parbox[b]{55mm}{
9043 \family default
9044 .
9045  
9046 \series bold
9047 Do not close the brace!
9048 \end_layout
9049
9050 \begin_layout Enumerate
9051 Position the cursor behind the caption text, switch to \SpecialChar LaTeX
9052  mode and insert
9053  the closing brace: 
9054 \family sans
9055 M-c
9056 \begin_inset space ~
9057 \end_inset
9058
9059 t
9060 \family default
9061  
9062 \family typewriter
9063 }
9064 \family default
9065 .
9066 \end_layout
9067
9068 \begin_layout Standard
9069 Also, refer to the figures in the example paper.
9070 \end_layout
9071
9072 \begin_layout Subsection
9073 Referee layout
9074 \end_layout
9075
9076 \begin_layout Standard
9077 For submission, the paper has to be formated in a special double-spacing
9078  layout.
9079  For this purpose, you have to give the option 
9080 \family typewriter
9081 referee
9082 \family default
9083  to the document class.
9084  This must be done using the custom class options field in the 
9085 \family sans
9086 Document\SpecialChar menuseparator
9087 Settings
9088 \family default
9089  dialog.
9090  Just enter the string 
9091 \family typewriter
9092 referee
9093 \family default
9094  there.
9095 \end_layout
9096
9097 \begin_layout Subsection
9098 The example paper
9099 \end_layout
9100
9101 \begin_layout Standard
9102 The 
9103 \family sans
9104 Examples
9105 \family default
9106  directory contains an example paper written with \SpecialChar LyX
9107 .
9108  It is the example paper from the original macro package, translated to
9109  \SpecialChar LyX
9110 .
9111  Use it for inspiration, and compare the original \SpecialChar LaTeX
9112  code with \SpecialChar LyX
9113  way of writing.
9114 \end_layout
9115
9116 \begin_layout Section
9117 AAS\SpecialChar TeX
9118
9119 \end_layout
9120
9121 \begin_layout Standard
9122 by 
9123 \noun on
9124 Mike Ressler
9125 \end_layout
9126
9127 \begin_layout Subsection
9128 Introduction
9129 \end_layout
9130
9131 \begin_layout Standard
9132 AAS\SpecialChar TeX
9133  is a set of macros produced by the American Astronomical Society to
9134  facilitate electronic manuscript submission to the three journals they
9135  publish: the Astrophysical Journal (including the Letters and Supplement),
9136  the Astronomical Journal, and the Publications of the Astronomical Society
9137  of the Pacific.
9138  \SpecialChar LyX
9139  has proven to be an excellent tool for generating these documents, especially
9140  given its equation, citation, and figure handling capabilities.
9141  \SpecialChar LyX
9142  requires version 5.0 (or higher) of these macros; preferably 6.0, which
9143  is the version described here, or higher.
9144  Versions prior to 5.0 are intended for use with \SpecialChar LaTeX
9145 2.09 and are fundamentally
9146  incompatible with \SpecialChar LyX
9147 .
9148  The AAS\SpecialChar TeX
9149  package may be downloaded from the AAS\SpecialChar TeX
9150  Web site
9151 \end_layout
9152
9153 \begin_layout Standard
9154 \begin_inset VSpace medskip
9155 \end_inset
9156
9157
9158 \end_layout
9159
9160 \begin_layout Standard
9161 \align center
9162 \begin_inset Flex URL
9163 status collapsed
9164
9165 \begin_layout Plain Layout
9166
9167 https://aas.org/aastex/aastex-downloads
9168 \end_layout
9169
9170 \end_inset
9171
9172
9173 \end_layout
9174
9175 \begin_layout Standard
9176 \begin_inset VSpace medskip
9177 \end_inset
9178
9179
9180 \end_layout
9181
9182 \begin_layout Standard
9183 A complete user guide is contained in that package and you should familiarize
9184  yourself with it thoroughly before embarking on writing a paper in \SpecialChar LyX
9185 .
9186  \SpecialChar LyX
9187  will not reduce the need to figure out all the AAS\SpecialChar TeX
9188  commands, it will only
9189  reduce the drudgery of typing everything in.
9190  It is your responsibility to ensure that the final exported \SpecialChar LaTeX
9191  document conforms
9192  completely to the requirements of the journal to which you are submitting
9193  your paper.
9194 \end_layout
9195
9196 \begin_layout Subsection
9197 Starting a New Paper
9198 \end_layout
9199
9200 \begin_layout Standard
9201 I strongly suggest that you start with the AAS\SpecialChar TeX
9202  template file.
9203  Click on 
9204 \family sans
9205 File\SpecialChar menuseparator
9206 New from
9207 \family default
9208  
9209 \family sans
9210 Template
9211 \family default
9212 , enter the new file name, then choose the 
9213 \family typewriter
9214 aastex6.lyx
9215 \family default
9216  template.
9217  This will show the most common fields found in a manuscript.
9218  Simply overwrite the existing text (including the brackets, 
9219 \family typewriter
9220 <>
9221 \family default
9222 ) with the correct information.
9223  Many of the AAS\SpecialChar TeX
9224  commands and environments can be implemented directly in
9225  \SpecialChar LyX
9226 , but some cannot.
9227  For commands such as these, the \SpecialChar LaTeX
9228  code must be entered directly and marked
9229  as such.
9230  Such commands are referred to as \SpecialChar TeX
9231  code, or Evil Red Text.
9232  I tried to minimize the amount of \SpecialChar TeX
9233  code needed in an AAS\SpecialChar TeX
9234  document.
9235 \end_layout
9236
9237 \begin_layout Subsection
9238 Finishing Your Paper
9239 \end_layout
9240
9241 \begin_layout Standard
9242 When the paper is finished to your satisfaction and previews/prints correctly,
9243  there are a few 
9244 \begin_inset Quotes eld
9245 \end_inset
9246
9247 postprocessing
9248 \begin_inset Quotes erd
9249 \end_inset
9250
9251  actions which need to be done before you submit it to the journals.
9252  
9253 \end_layout
9254
9255 \begin_layout Enumerate
9256 Export your paper as a \SpecialChar LaTeX
9257  file (
9258 \family sans
9259 File\SpecialChar menuseparator
9260 Export\SpecialChar menuseparator
9261 \SpecialChar LaTeX
9262
9263 \family default
9264 ).
9265  
9266 \end_layout
9267
9268 \begin_layout Enumerate
9269 Edit the resulting 
9270 \family typewriter
9271 .tex
9272 \family default
9273  file with your favorite text editor
9274 \end_layout
9275
9276 \begin_deeper
9277 \begin_layout Enumerate
9278 remove the comment lines before the 
9279 \family typewriter
9280
9281 \backslash
9282 documentclass
9283 \family default
9284  command
9285 \end_layout
9286
9287 \begin_layout Enumerate
9288 remove the 
9289 \family typewriter
9290
9291 \backslash
9292 usepackage...{fontenc}
9293 \family default
9294  line if it appears (usually just after 
9295 \family typewriter
9296
9297 \backslash
9298 documentclass
9299 \family default
9300 }; also remove the 
9301 \family typewriter
9302
9303 \backslash
9304 secnumdepth
9305 \family default
9306  line if it appears.
9307 \end_layout
9308
9309 \begin_layout Enumerate
9310 remove everything between (and including) the 
9311 \family typewriter
9312
9313 \backslash
9314 makeatletter
9315 \family default
9316  and 
9317 \family typewriter
9318
9319 \backslash
9320 makeatother
9321 \family default
9322  commands, except for any commands you specifically put into the \SpecialChar LaTeX
9323  preamble
9324  (which should appear immediately after the 
9325 \begin_inset Quotes eld
9326 \end_inset
9327
9328 User specified \SpecialChar LaTeX
9329  commands
9330 \begin_inset Quotes erd
9331 \end_inset
9332
9333  comment in the 
9334 \family typewriter
9335 .tex
9336 \family default
9337  file).
9338 \end_layout
9339
9340 \end_deeper
9341 \begin_layout Enumerate
9342 Run the resulting file through \SpecialChar LaTeX
9343  to make sure it still processes correctly.
9344 \end_layout
9345
9346 \begin_layout Enumerate
9347 Reread the journal requirements to make sure your filenames and formats
9348  are correct.
9349 \end_layout
9350
9351 \begin_layout Enumerate
9352 Submit it.
9353 \end_layout
9354
9355 \begin_layout Subsection
9356 Comments On Specific Commands
9357 \end_layout
9358
9359 \begin_layout Standard
9360 I will not describe the detailed usage of the individual AAS\SpecialChar TeX
9361  commands: the
9362  AAS\SpecialChar TeX
9363  User Guide (
9364 \family typewriter
9365 aasguide.tex
9366 \family default
9367 ) gives a good description of each.
9368  Thus it's probably easiest for me to go down the list as found in the guide
9369  and offer comments where necessary.
9370  So let's begin \SpecialChar ldots
9371
9372 \end_layout
9373
9374 \begin_layout Subsubsection
9375 Things that work as expected
9376 \end_layout
9377
9378 \begin_layout Standard
9379 Because they work as you might expect, I simply list them and the section
9380  they are found in: 
9381 \family typewriter
9382
9383 \backslash
9384 documentclass
9385 \family default
9386  (2.1.1), 
9387 \family typewriter
9388
9389 \backslash
9390 begin{document}
9391 \family default
9392  (2.2), 
9393 \family typewriter
9394
9395 \backslash
9396 title
9397 \family default
9398  (2.3), 
9399 \family typewriter
9400
9401 \backslash
9402 author
9403 \family default
9404  (2.3), 
9405 \family typewriter
9406
9407 \backslash
9408 affil
9409 \family default
9410  (2.3), 
9411 \family typewriter
9412
9413 \backslash
9414 abstract
9415 \family default
9416  (2.4), 
9417 \family typewriter
9418
9419 \backslash
9420 keywords
9421 \family default
9422  (2.5), 
9423 \family typewriter
9424
9425 \backslash
9426 section
9427 \family default
9428  (2.7), 
9429 \family typewriter
9430
9431 \backslash
9432 subsection
9433 \family default
9434  (2.7), 
9435 \family typewriter
9436
9437 \backslash
9438 subsubsection
9439 \family default
9440  (2.7), 
9441 \family typewriter
9442
9443 \backslash
9444 paragraph
9445 \family default
9446  (2.7), 
9447 \family typewriter
9448
9449 \backslash
9450 facility
9451 \family default
9452  (2.10), 
9453 \family typewriter
9454
9455 \backslash
9456 begin{displaymath}
9457 \family default
9458  (2.12), 
9459 \family typewriter
9460
9461 \backslash
9462 begin{equation}
9463 \family default
9464  (2.12), 
9465 \family typewriter
9466
9467 \backslash
9468 begin{eqnarray}
9469 \family default
9470  (2.12), 
9471 \family typewriter
9472
9473 \backslash
9474 begin{mathletters}
9475 \family default
9476  (2.12), 
9477 \family typewriter
9478
9479 \backslash
9480 begin{thebibliography}
9481 \family default
9482  (2.13.1), 
9483 \family typewriter
9484
9485 \backslash
9486 bibitem
9487 \family default
9488  (2.13.2), all the cite commands and their variations (2.13.2), the generic
9489  graphicx figure commands (2.14.1), 
9490 \family typewriter
9491
9492 \backslash
9493 begin{table}
9494 \family default
9495  (2.15.4), 
9496 \family typewriter
9497
9498 \backslash
9499 begin{tabular}
9500 \family default
9501  (2.15.4), 
9502 \family typewriter
9503
9504 \backslash
9505 caption
9506 \family default
9507  (2.15.4), 
9508 \family typewriter
9509
9510 \backslash
9511 label
9512 \family default
9513  (2.15.4, amongst other places), 
9514 \family typewriter
9515
9516 \backslash
9517 tablerefs
9518 \family default
9519  (2.15.5), 
9520 \family typewriter
9521
9522 \backslash
9523 tablecomments
9524 \family default
9525  (2.15.5), 
9526 \family typewriter
9527
9528 \backslash
9529 url
9530 \family default
9531  (2.17.4), 
9532 \family typewriter
9533
9534 \backslash
9535 end{document}
9536 \family default
9537  (2.18).
9538 \end_layout
9539
9540 \begin_layout Standard
9541 The following style options also work correctly: 
9542 \family typewriter
9543 longabstract
9544 \family default
9545  (2.4), 
9546 \family typewriter
9547 preprint
9548 \family default
9549  (3.2.1), 
9550 \family typewriter
9551 preprint2
9552 \family default
9553  (3.2.2), 
9554 \family typewriter
9555 eqsecnum
9556 \family default
9557  (3.3), 
9558 \family typewriter
9559 flushrt
9560 \family default
9561  (3.4).
9562  Simply put them in the 
9563 \family sans
9564 Options
9565 \family default
9566  box in 
9567 \family sans
9568 Layout\SpecialChar menuseparator
9569 Document
9570 \family default
9571 .
9572 \end_layout
9573
9574 \begin_layout Subsubsection
9575 Things that work, but require more comment
9576 \end_layout
9577
9578 \begin_layout Standard
9579 The following items work, but require a little more discussion:
9580 \end_layout
9581
9582 \begin_layout Itemize
9583 These items are reserved for use by the journal editors, but you can put
9584  them into the \SpecialChar LaTeX
9585  preamble if you feel compelled to do so: 
9586 \family typewriter
9587
9588 \backslash
9589 received
9590 \family default
9591
9592 \family typewriter
9593
9594 \backslash
9595 revised
9596 \family default
9597
9598 \family typewriter
9599
9600 \backslash
9601 accepted
9602 \family default
9603
9604 \family typewriter
9605
9606 \backslash
9607 ccc
9608 \family default
9609
9610 \family typewriter
9611
9612 \backslash
9613 cpright
9614 \family default
9615  (all from 2.1.3)
9616 \end_layout
9617
9618 \begin_layout Itemize
9619 These items may be placed in the \SpecialChar LaTeX
9620  preamble, and are included as blanks in
9621  the template file: 
9622 \family typewriter
9623
9624 \backslash
9625 slugcomment
9626 \family default
9627  (2.1.4), 
9628 \family typewriter
9629
9630 \backslash
9631 shorttitle
9632 \family default
9633  (2.1.5), 
9634 \family typewriter
9635
9636 \backslash
9637 shortauthors
9638 \family default
9639  (2.1.5)
9640 \end_layout
9641
9642 \begin_layout Itemize
9643
9644 \family typewriter
9645
9646 \backslash
9647 email
9648 \family default
9649  (2.3) – can only be used 
9650 \begin_inset Quotes eld
9651 \end_inset
9652
9653 standalone
9654 \begin_inset Quotes erd
9655 \end_inset
9656
9657 , not in the middle of a paragraph.
9658  Use \SpecialChar TeX
9659  code if you need to embed it.
9660 \end_layout
9661
9662 \begin_layout Itemize
9663
9664 \family typewriter
9665
9666 \backslash
9667 and
9668 \family default
9669  (2.3) – will have extra {} after it.
9670  This should not cause an error.
9671 \end_layout
9672
9673 \begin_layout Itemize
9674
9675 \family typewriter
9676
9677 \backslash
9678 notetoeditor
9679 \family default
9680  (2.6) – can only be used 
9681 \begin_inset Quotes eld
9682 \end_inset
9683
9684 standalone
9685 \begin_inset Quotes erd
9686 \end_inset
9687
9688 , not in the middle of a paragraph.
9689  Use \SpecialChar TeX
9690  code if you need to embed it.
9691 \end_layout
9692
9693 \begin_layout Itemize
9694
9695 \family typewriter
9696
9697 \backslash
9698 placetable
9699 \family default
9700  (2.8) – can't insert a cross-reference tag, you must type the tag name by
9701  hand
9702 \end_layout
9703
9704 \begin_layout Itemize
9705
9706 \family typewriter
9707
9708 \backslash
9709 placefigure
9710 \family default
9711  (2.8) – same as for 
9712 \family typewriter
9713
9714 \backslash
9715 placetable
9716 \end_layout
9717
9718 \begin_layout Itemize
9719
9720 \family typewriter
9721
9722 \backslash
9723 acknowledgements
9724 \family default
9725  (2.9) – will have extra {} after it.
9726  This should not cause an error.
9727 \end_layout
9728
9729 \begin_layout Itemize
9730
9731 \family typewriter
9732
9733 \backslash
9734 appendix
9735 \family default
9736  (2.11) – will have extra {} after it.
9737  This should not cause an error.
9738 \end_layout
9739
9740 \begin_layout Itemize
9741
9742 \family typewriter
9743
9744 \backslash
9745 figcaption
9746 \family default
9747  (2.14.2) – you can insert an optional filename argument by placing the cursor
9748  at the beginning of the text and selecting 
9749 \family sans
9750 Insert\SpecialChar menuseparator
9751 Short Title
9752 \family default
9753 .
9754  
9755 \begin_inset Quotes eld
9756 \end_inset
9757
9758 Short Title
9759 \begin_inset Quotes erd
9760 \end_inset
9761
9762  inserts an optional argument of the type needed by 
9763 \family typewriter
9764
9765 \backslash
9766 figcaption
9767 \family default
9768 .
9769  Hopefully it will be renamed someday.
9770 \end_layout
9771
9772 \begin_layout Itemize
9773
9774 \family typewriter
9775
9776 \backslash
9777 objectname
9778 \family default
9779  (2.17.1) – same as 
9780 \family typewriter
9781
9782 \backslash
9783 figcaption
9784 \family default
9785  for the catalog ID optional parameter
9786 \end_layout
9787
9788 \begin_layout Itemize
9789
9790 \family typewriter
9791
9792 \backslash
9793 dataset
9794 \family default
9795  (2.17.1) – same as 
9796 \family typewriter
9797
9798 \backslash
9799 figcaption
9800 \family default
9801  for the catalog ID optional parameter
9802 \end_layout
9803
9804 \begin_layout Subsubsection
9805 Things not implemented, use \SpecialChar TeX
9806  code
9807 \end_layout
9808
9809 \begin_layout Standard
9810
9811 \family typewriter
9812
9813 \backslash
9814 eqnum
9815 \family default
9816  (2.12), 
9817 \family typewriter
9818
9819 \backslash
9820 setcounter{equation}
9821 \family default
9822  (2.12), Journal name abbreviations (2.13.4), 
9823 \family typewriter
9824
9825 \backslash
9826 figurenum
9827 \family default
9828  (2.14.1), 
9829 \family typewriter
9830
9831 \backslash
9832 epsscale
9833 \family default
9834  (2.14.1), 
9835 \family typewriter
9836
9837 \backslash
9838 plotone
9839 \family default
9840  (2.14.1), 
9841 \family typewriter
9842
9843 \backslash
9844 plottwo
9845 \family default
9846  (2.14.1), 
9847 \family typewriter
9848
9849 \backslash
9850 tablenum
9851 \family default
9852  (2.15.4), 
9853 \family typewriter
9854
9855 \backslash
9856 tableline
9857 \family default
9858  (2.15.4, insert it as the first element in the lefthand cell after where
9859  you want it.
9860  Don't use any of \SpecialChar LyX
9861 's rules in the table), 
9862 \family typewriter
9863
9864 \backslash
9865 tablenotemark
9866 \family default
9867  (2.15.5), 
9868 \family typewriter
9869
9870 \backslash
9871 tablenotetext
9872 \family default
9873  (2.15.5), much of Misc (2.17, except 
9874 \family typewriter
9875
9876 \backslash
9877 objectname
9878 \family default
9879
9880 \family typewriter
9881
9882 \backslash
9883 dataset
9884 \family default
9885
9886 \family typewriter
9887
9888 \backslash
9889 url
9890 \family default
9891 , and 
9892 \family typewriter
9893
9894 \backslash
9895 email
9896 \family default
9897 ; see above), 
9898 \family typewriter
9899
9900 \backslash
9901 singlespace
9902 \family default
9903  (3.1), 
9904 \family typewriter
9905
9906 \backslash
9907 doublespace
9908 \family default
9909  (3.1), 
9910 \family typewriter
9911
9912 \backslash
9913 onecolumn
9914 \family default
9915  (3.2), 
9916 \family typewriter
9917
9918 \backslash
9919 twocolumn
9920 \family default
9921  (3.2)
9922 \end_layout
9923
9924 \begin_layout Subsubsection
9925 Things that cannot be implemented
9926 \end_layout
9927
9928 \begin_layout Standard
9929 \SpecialChar ldots
9930  at least in any meaningful sort of way, so I suggest ignoring them.
9931  They are the references environment (2.13.3), and the deluxetable environment
9932  (2.15).
9933  If you really, really need to use deluxetable, I suggest editing it in
9934  a separate file with a text editor, then using 
9935 \family sans
9936 Insert\SpecialChar menuseparator
9937 Child
9938 \begin_inset space ~
9939 \end_inset
9940
9941 Document
9942 \family default
9943  to include it in your \SpecialChar LyX
9944  document.
9945  See the 
9946 \family typewriter
9947 aas_sample.lyx
9948 \family default
9949  file to see an example of this.
9950 \end_layout
9951
9952 \begin_layout Subsection
9953 FAQs, Tips, Tricks, and Other Ruminations
9954 \end_layout
9955
9956 \begin_layout Subsubsection
9957 Getting \SpecialChar LyX
9958  and AAS\SpecialChar TeX
9959  to cooperate
9960 \end_layout
9961
9962 \begin_layout Standard
9963 It can be a bit tricky to get \SpecialChar LyX
9964  to recognize a new layout and document class.
9965  When all else fails, do this:
9966 \end_layout
9967
9968 \begin_layout Enumerate
9969 Make certain that \SpecialChar LaTeX
9970  can find AAS\SpecialChar TeX
9971 .
9972  Copy sample.tex (and perhaps table.tex) from the AAS\SpecialChar TeX
9973  distribution into a
9974  directory completely unrelated to \SpecialChar LaTeX
9975  or AAS\SpecialChar TeX
9976  and run \SpecialChar LaTeX
9977  on 
9978 \family typewriter
9979 sample.tex
9980 \family default
9981 .
9982 \end_layout
9983
9984 \begin_layout Enumerate
9985 Make certain that 
9986 \family typewriter
9987 aastex.layout
9988 \family default
9989  appears in \SpecialChar LyX
9990 's 
9991 \family typewriter
9992 layouts
9993 \family default
9994  folder
9995 \end_layout
9996
9997 \begin_layout Enumerate
9998 Rerun 
9999 \family sans
10000 Tools\SpecialChar menuseparator
10001 Reconfigure
10002 \family default
10003  in \SpecialChar LyX
10004 , then restart \SpecialChar LyX
10005 .
10006 \end_layout
10007
10008 \begin_layout Enumerate
10009 Open a regular new file, not from a template.
10010  Does AAS\SpecialChar TeX
10011  appear in the class list in 
10012 \family sans
10013 Document\SpecialChar menuseparator
10014 Settings
10015 \family default
10016 ?
10017 \end_layout
10018
10019 \begin_layout Standard
10020 If you get a warning from an existing AAS\SpecialChar TeX
10021  document about not being able
10022  to find the AAS\SpecialChar TeX
10023  layout or a message about 
10024 \begin_inset Quotes eld
10025 \end_inset
10026
10027 You should not mix title layouts with normal ones
10028 \begin_inset Quotes erd
10029 \end_inset
10030
10031 , things haven't been installed correctly.
10032 \end_layout
10033
10034 \begin_layout Subsubsection
10035 \SpecialChar LaTeX
10036  error processing a table 
10037 \end_layout
10038
10039 \begin_layout Standard
10040 \SpecialChar LyX
10041 , by default, attempts to center the table caption/title.
10042  This seems to produce a bad interaction in AAS\SpecialChar TeX
10043  so you should click somewhere
10044  in the caption/title, then select 
10045 \family sans
10046 Edit\SpecialChar menuseparator
10047 Paragraph
10048 \begin_inset space ~
10049 \end_inset
10050
10051 Settings
10052 \family default
10053 , then set the 
10054 \family sans
10055 Alignment
10056 \family default
10057  to 
10058 \family sans
10059 Block
10060 \family default
10061 .
10062  This took care of it for me.
10063 \end_layout
10064
10065 \begin_layout Subsubsection
10066 References
10067 \end_layout
10068
10069 \begin_layout Standard
10070 A couple of things: 1) I have noticed some funny spacing in the reference
10071  entries in the text.
10072  When you enter the bibliography item data, make sure their is 
10073 \emph on
10074 no
10075 \emph default
10076  space between the last author and the parenthesis setting off the year;
10077  
10078 \emph on
10079 e.
10080 \begin_inset space \thinspace{}
10081 \end_inset
10082
10083 g.
10084 \begin_inset space \space{}
10085 \end_inset
10086
10087
10088 \emph default
10089 type 
10090 \family typewriter
10091 Ressler(1992)
10092 \family default
10093 , not 
10094 \family typewriter
10095 Ressler (1992)
10096 \family default
10097 .
10098  2) Entering the references at all is not obvious.
10099  The easiest thing is to start typing your first reference at the end of
10100  the document, then mark it as type 
10101 \family sans
10102 References
10103 \family default
10104 .
10105  That will put a small gray box in front of what you just typed.
10106  Click on the box to fill in the rest of the information.
10107  For new references, go to the end of an existing reference and press return.
10108  That will create a new line with its own box, etc.
10109 \end_layout
10110
10111 \begin_layout Subsubsection
10112 Including EPS files
10113 \end_layout
10114
10115 \begin_layout Standard
10116 Even though AAS\SpecialChar TeX
10117  provides its own figure commands (
10118 \family typewriter
10119
10120 \backslash
10121 plotone
10122 \family default
10123 , for example), I much prefer \SpecialChar LaTeX
10124 's standard figure commands (with the default
10125  graphicx).
10126  You can insert the 
10127 \family typewriter
10128
10129 \backslash
10130 plotone
10131 \family default
10132 , etc.
10133 \begin_inset space ~
10134 \end_inset
10135
10136 commands as \SpecialChar TeX
10137  code into a Figure Float box if you desire, but I never have
10138  much luck getting the layout right.
10139  With the standard graphics, \SpecialChar LyX
10140  will insert a 
10141 \family typewriter
10142
10143 \backslash
10144 usepackage{graphicx}
10145 \family default
10146  command into the \SpecialChar LaTeX
10147  preamble and handle the figures in the standard \SpecialChar LaTeX2e
10148  way,
10149  interspersing the figures in the text.
10150  I believe ApJ accepts figures exactly this way now; AJ might still use
10151  the 
10152 \begin_inset Quotes eld
10153 \end_inset
10154
10155 stack everything at the end
10156 \begin_inset Quotes erd
10157 \end_inset
10158
10159  technique.
10160 \end_layout
10161
10162 \begin_layout Subsubsection
10163 Things I could have done, but didn't
10164 \end_layout
10165
10166 \begin_layout Standard
10167 There are a few 
10168 \begin_inset Quotes eld
10169 \end_inset
10170
10171 pretty
10172 \begin_inset Quotes erd
10173 \end_inset
10174
10175  things I could have implemented, but chose not to.
10176  For instance, I saw no point in double-spacing the text in the \SpecialChar LyX
10177  window,
10178  even though it is double-spaced in the paper manuscript.
10179  Also, I chose not to make separate layouts for the preprint and preprint2
10180  styles.
10181  Since I assume you will spend most of your time in the plain manuscript
10182  mode anyway, I decided not to chew up more disk space with this.
10183  
10184 \end_layout
10185
10186 \begin_layout Subsection
10187 Final Caveat
10188 \end_layout
10189
10190 \begin_layout Standard
10191 Your mileage may vary.
10192  I've now had papers published by both ApJ and AJ that have had 98% of the
10193  effort done in \SpecialChar LyX
10194 ; the last 2% was the \SpecialChar LaTeX
10195  post-processing and a few cleanups.
10196  I have had no trouble with the submission process, and I'm sure the journals
10197  were never aware that there might be a difference.
10198  So, go forth and publish!
10199 \end_layout
10200
10201 \begin_layout Section
10202 AMS \SpecialChar LaTeX
10203
10204 \end_layout
10205
10206 \begin_layout Standard
10207 by 
10208 \noun on
10209 David Johnson
10210 \noun default
10211 ; updated by 
10212 \noun on
10213 Richard Kimberly Heck
10214 \end_layout
10215
10216 \begin_layout Standard
10217 \begin_inset VSpace bigskip
10218 \end_inset
10219
10220
10221 \end_layout
10222
10223 \begin_layout Standard
10224 \noindent
10225 The AMS \SpecialChar LaTeX
10226  layouts are set up to conform to suggested styles for mathematical
10227  papers to be submitted to American Mathematical Society publications.
10228  The layouts are not tailored to a specific journal, but easily can be.
10229  You should refer to the AMS documentation for specific instructions for
10230  each journal (usually it will entail only changing a single line in the
10231  \SpecialChar TeX
10232  output).
10233  That documentation is available on the Web at 
10234 \begin_inset Flex URL
10235 status open
10236
10237 \begin_layout Plain Layout
10238
10239 http://www.ams.org
10240 \end_layout
10241
10242 \end_inset
10243
10244  or by ftp at 
10245 \begin_inset Flex URL
10246 status open
10247
10248 \begin_layout Plain Layout
10249
10250 ftp://ftp.ams.org/pub/tex/amslatex/
10251 \end_layout
10252
10253 \end_inset
10254
10255 .
10256  These layouts are appropriate, and useful, for any mathematical writing.
10257  
10258 \end_layout
10259
10260 \begin_layout Standard
10261 There are two basic AMS \SpecialChar LaTeX
10262  layouts: 
10263 \end_layout
10264
10265 \begin_layout Itemize
10266 amsart: The standard AMS article format.
10267 \end_layout
10268
10269 \begin_layout Itemize
10270 amsbook: the standard AMS book (really, monograph) format.
10271  
10272 \end_layout
10273
10274 \begin_layout Standard
10275 The layouts themselves contain only the minimum necessary to use the AMS
10276  classes.
10277  They do not, in particular, contain any of the `theorem' environments used
10278  for setting theorems, lemmas, and the like.
10279  These are contained, instead, in the 
10280 \begin_inset Flex Code
10281 status collapsed
10282
10283 \begin_layout Plain Layout
10284 Theorems (AMS)
10285 \end_layout
10286
10287 \end_inset
10288
10289  module, which is loaded by default when you select one of the AMS classes.
10290  (It can also be used with other classes and can be removed, if you would
10291  rather use something else.) Less commonly used environments are in the 
10292 \begin_inset Flex Code
10293 status collapsed
10294
10295 \begin_layout Plain Layout
10296 Theorems (AMS-Extended)
10297 \end_layout
10298
10299 \end_inset
10300
10301  module, which must be loaded manually.
10302 \end_layout
10303
10304 \begin_layout Standard
10305 By default, theorems and the like are numbered consecutively throughout
10306  the document, but this may be modified by loading the module 
10307 \begin_inset Flex Code
10308 status collapsed
10309
10310 \begin_layout Plain Layout
10311 Theorems (Order by Section)
10312 \end_layout
10313
10314 \end_inset
10315
10316  or, if you are using 
10317 \begin_inset Flex Code
10318 status collapsed
10319
10320 \begin_layout Plain Layout
10321 book (AMS)
10322 \end_layout
10323
10324 \end_inset
10325
10326 , the module 
10327 \begin_inset Flex Code
10328 status collapsed
10329
10330 \begin_layout Plain Layout
10331 Theorems (Order by Chapter)
10332 \end_layout
10333
10334 \end_inset
10335
10336 .
10337  These will number the results as 
10338 \begin_inset Formula $n.m$
10339 \end_inset
10340
10341 , where the first number refers to the section (or chapter) and the second
10342  refers to the total number of results so far in that section (or chapter).
10343  Many environments are also available unnumbered.
10344  These are indicated by an asterisk at the end.
10345  If you happen to want 
10346 \emph on
10347 only
10348 \emph default
10349  unnumbered results, the module 
10350 \begin_inset Flex Code
10351 status collapsed
10352
10353 \begin_layout Plain Layout
10354 Theorems (Starred)
10355 \end_layout
10356
10357 \end_inset
10358
10359  provides that option.
10360 \end_layout
10361
10362 \begin_layout Standard
10363 Note that these modules do not 
10364 \emph on
10365 have
10366 \emph default
10367  to be used with the AMS classes.
10368  It is perfectly possible to use the 
10369 \begin_inset Flex Code
10370 status collapsed
10371
10372 \begin_layout Plain Layout
10373 Theorems (AMS)
10374 \end_layout
10375
10376 \end_inset
10377
10378  module, and the others mentioned, with other classes, such as 
10379 \begin_inset Flex Code
10380 status collapsed
10381
10382 \begin_layout Plain Layout
10383 article
10384 \end_layout
10385
10386 \end_inset
10387
10388
10389 \begin_inset Flex Code
10390 status collapsed
10391
10392 \begin_layout Plain Layout
10393 report
10394 \end_layout
10395
10396 \end_inset
10397
10398
10399 \begin_inset Flex Code
10400 status collapsed
10401
10402 \begin_layout Plain Layout
10403 book (KOMA-script)
10404 \end_layout
10405
10406 \end_inset
10407
10408 , and so forth.
10409 \end_layout
10410
10411 \begin_layout Subsection
10412 What these layouts provide
10413 \end_layout
10414
10415 \begin_layout Standard
10416 There is a long list of included environments provided by these layouts.
10417  In AMS-\SpecialChar LaTeX
10418 , there is, in fact, an opportunity to define an unlimited variety
10419  of `theorem' environments.
10420  However, the AMS recommends the environments that are available in \SpecialChar LyX
10421 .
10422  
10423 \end_layout
10424
10425 \begin_layout Standard
10426 The following environments—as well as the standard environments, such as
10427  
10428 \begin_inset Flex Noun
10429 status collapsed
10430
10431 \begin_layout Plain Layout
10432 section
10433 \end_layout
10434
10435 \end_inset
10436
10437
10438 \begin_inset Flex Noun
10439 status collapsed
10440
10441 \begin_layout Plain Layout
10442 bibliography
10443 \end_layout
10444
10445 \end_inset
10446
10447
10448 \begin_inset Flex Noun
10449 status collapsed
10450
10451 \begin_layout Plain Layout
10452 title
10453 \end_layout
10454
10455 \end_inset
10456
10457
10458 \begin_inset Flex Noun
10459 status collapsed
10460
10461 \begin_layout Plain Layout
10462 author
10463 \end_layout
10464
10465 \end_inset
10466
10467 , and 
10468 \begin_inset Flex Noun
10469 status collapsed
10470
10471 \begin_layout Plain Layout
10472 date
10473 \end_layout
10474
10475 \end_inset
10476
10477 —are provided by 
10478 \begin_inset Flex Code
10479 status collapsed
10480
10481 \begin_layout Plain Layout
10482 article (AMS)
10483 \end_layout
10484
10485 \end_inset
10486
10487  and 
10488 \begin_inset Flex Code
10489 status collapsed
10490
10491 \begin_layout Plain Layout
10492 book (AMS)
10493 \end_layout
10494
10495 \end_inset
10496
10497 :
10498 \end_layout
10499
10500 \begin_layout Description
10501 Address This should be the author's permanent address.
10502 \end_layout
10503
10504 \begin_layout Description
10505 Current
10506 \begin_inset space ~
10507 \end_inset
10508
10509 Address This should be the author's temporary address at the time of submission,
10510  if different from the Address.
10511 \end_layout
10512
10513 \begin_layout Description
10514 Email Author's e-mail address
10515 \end_layout
10516
10517 \begin_layout Description
10518 URL Author's Web address, if desired.
10519 \end_layout
10520
10521 \begin_layout Description
10522 Keywords Key words or phrases used to identify specific topics discussed
10523  in the paper.
10524 \end_layout
10525
10526 \begin_layout Description
10527 Subjectclass These refer to the AMS Subject Classifications, published and
10528  described in 
10529 \emph on
10530 Mathematical Reviews
10531 \emph default
10532 .
10533  These are also available online at the AMS cites listed above.
10534 \end_layout
10535
10536 \begin_layout Description
10537 Thanks
10538 \end_layout
10539
10540 \begin_layout Description
10541 Dedicatory
10542 \end_layout
10543
10544 \begin_layout Description
10545 Translator
10546 \end_layout
10547
10548 \begin_layout Standard
10549 The following environments are provided by both the 
10550 \begin_inset Flex Code
10551 status collapsed
10552
10553 \begin_layout Plain Layout
10554 Theorems
10555 \end_layout
10556
10557 \end_inset
10558
10559  and 
10560 \begin_inset Flex Code
10561 status collapsed
10562
10563 \begin_layout Plain Layout
10564 Theorems (AMS)
10565 \end_layout
10566
10567 \end_inset
10568
10569  modules, in the latter case in both starred (unnumbered) and unstarred
10570  (numbered) versions.
10571  These same environments are provided only in the starred versions by the
10572  
10573 \begin_inset Flex Code
10574 status collapsed
10575
10576 \begin_layout Plain Layout
10577 Theorems (Starred)
10578 \end_layout
10579
10580 \end_inset
10581
10582  module:
10583 \end_layout
10584
10585 \begin_layout Theorem
10586 This is typically used for the statements of major results.
10587  
10588 \end_layout
10589
10590 \begin_layout Corollary*
10591 This is used for statements which follow fairly directly from previous statement
10592 s.
10593  Again, these can be major results.
10594  
10595 \end_layout
10596
10597 \begin_layout Lemma
10598 These are smaller results needed to prove other statements.
10599 \end_layout
10600
10601 \begin_layout Proposition
10602 These are less major results which (hopefully) add to the general theory
10603  being discussed.
10604 \end_layout
10605
10606 \begin_layout Conjecture
10607 These are statements provided without justification, which the author does
10608  not know how to prove, but which seem to be true (to the author, at least).
10609 \end_layout
10610
10611 \begin_layout Definition*
10612 Guess what this is for.
10613  The font is different for this environment than for the previous ones.
10614  
10615 \end_layout
10616
10617 \begin_layout Example*
10618 Used for examples illustrating proven results.
10619 \end_layout
10620
10621 \begin_layout Problem
10622 It's not really known what this is for.
10623  You should figure it out.
10624 \end_layout
10625
10626 \begin_layout Exercise*
10627 Write a description for this one.
10628 \end_layout
10629
10630 \begin_layout Remark
10631 This environment is also a type of theorem, usually a lesser sort of observation.
10632 \end_layout
10633
10634 \begin_layout Claim*
10635 Often used in the course of giving a proof of a larger result.
10636 \end_layout
10637
10638 \begin_layout Case
10639 Generally, these are used to break up long arguments, using specific instances
10640  of some condition.
10641  
10642 \end_layout
10643
10644 \begin_layout Case
10645 The numbering scheme for cases is on its own, not together with other numbered
10646  statements.
10647  
10648 \end_layout
10649
10650 \begin_layout Proof
10651 At the end of this environment, a QED symbol (usually a square, but it can
10652  vary with different styles) is placed.
10653  If you want to have other environments within this one—for example, Case
10654  environments—and have the QED symbol appear only after them, then the other
10655  environments need to be nested within the proof environment.
10656  See the section 
10657 \emph on
10658 Nesting Environments
10659 \emph default
10660  of the 
10661 \emph on
10662 User's Guide
10663 \emph default
10664  for information on nesting.
10665 \end_layout
10666
10667 \begin_layout Standard
10668 And these environments are provided by 
10669 \begin_inset Flex Code
10670 status collapsed
10671
10672 \begin_layout Plain Layout
10673 Theorems (AMS-Extended)
10674 \end_layout
10675
10676 \end_inset
10677
10678 :
10679 \end_layout
10680
10681 \begin_layout Criterion*
10682 A required condition.
10683 \end_layout
10684
10685 \begin_layout Algorithm*
10686 A general procedure to be used.
10687 \end_layout
10688
10689 \begin_layout Axiom*
10690 This is a property or statement taken as true within the system being discussed.
10691 \end_layout
10692
10693 \begin_layout Condition*
10694 Sometimes used to state a condition assumed within the present context of
10695  discussion.
10696 \end_layout
10697
10698 \begin_layout Note*
10699 Similar to a Remark.
10700 \end_layout
10701
10702 \begin_layout Notation*
10703 Used for the explanation of, yes, notation.
10704 \end_layout
10705
10706 \begin_layout Summary
10707 Do we really need to tell you? 
10708 \end_layout
10709
10710 \begin_layout Acknowledgement*
10711 Acknowledgement.
10712 \end_layout
10713
10714 \begin_layout Conclusion*
10715 Sometimes used at the end of a long train of argument.
10716 \end_layout
10717
10718 \begin_layout Fact
10719 Used in a way similar to Proposition, though perhaps lower on the scale.
10720 \end_layout
10721
10722 \begin_layout Standard
10723 In addition, the AMS classes automatically provide the AMS \SpecialChar LaTeX
10724  and AMS fonts
10725  packages.
10726  They need to be available on your system in order to use these environments.
10727 \end_layout
10728
10729 \begin_layout Section
10730 Broadway
10731 \end_layout
10732
10733 \begin_layout Standard
10734 by 
10735 \shape smallcaps
10736 Garst Reese
10737 \end_layout
10738
10739 \begin_layout Subsection
10740 Introduction
10741 \end_layout
10742
10743 \begin_layout Standard
10744 Broadway is for writing plays.
10745  The format is more decorative than Hollywood, and much less standardized.
10746  This format should be suitable for workshops.
10747 \end_layout
10748
10749 \begin_layout Subsection
10750 Special problems
10751 \end_layout
10752
10753 \begin_layout Standard
10754 The same as in Hollywood.
10755 \end_layout
10756
10757 \begin_layout Subsection
10758 Special features
10759 \end_layout
10760
10761 \begin_layout Standard
10762 Insert the 
10763 \family sans
10764 Speaker
10765 \family default
10766  names as labels then cross-reference the label to insert the name.
10767  The cross-reference dialog will show the current cast of characters.
10768 \end_layout
10769
10770 \begin_layout Subsection
10771 Paper size and Margins
10772 \end_layout
10773
10774 \begin_layout Standard
10775 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
10776 \end_layout
10777
10778 \begin_layout Subsection
10779 Environments
10780 \end_layout
10781
10782 \begin_layout Standard
10783 The following environments are available.
10784  You can use broadway.bind to get the bind keys shown at the right.
10785 \end_layout
10786
10787 \begin_layout Itemize
10788
10789 \family sans
10790 Standard
10791 \begin_inset Newline newline
10792 \end_inset
10793
10794
10795 \family default
10796 You should not have to use this, but it is here for anything that does not
10797  fit otherwise.
10798 \end_layout
10799
10800 \begin_layout Itemize
10801
10802 \family sans
10803 Narrative
10804 \begin_inset space \hfill{}
10805 \end_inset
10806
10807 M-z n
10808 \begin_inset Newline newline
10809 \end_inset
10810
10811
10812 \family default
10813 Used to describe stage setting and the action.
10814  First use of speaker names in all CAPs.
10815 \end_layout
10816
10817 \begin_layout Itemize
10818
10819 \family sans
10820 ACT
10821 \begin_inset space \hfill{}
10822 \end_inset
10823
10824 M-z a
10825 \begin_inset Newline newline
10826 \end_inset
10827
10828
10829 \family default
10830 Automatically numbered.
10831  On screen it will be arabic, but will print as Roman.
10832 \end_layout
10833
10834 \begin_layout Itemize
10835
10836 \family sans
10837 ACT*
10838 \begin_inset space \hfill{}
10839 \end_inset
10840
10841 M-z S at
10842 \begin_inset Newline newline
10843 \end_inset
10844
10845
10846 \family default
10847 Subtitle for 
10848 \family sans
10849 ACT.
10850
10851 \family default
10852  It is just centered text.
10853 \end_layout
10854
10855 \begin_layout Itemize
10856
10857 \family sans
10858 SCENE
10859 \begin_inset space \hfill{}
10860 \end_inset
10861
10862 M-z S-S
10863 \begin_inset Newline newline
10864 \end_inset
10865
10866
10867 \family default
10868 Not automatically numbered.
10869  You supply the number.
10870  This is because I couldn't figure out how.
10871 \end_layout
10872
10873 \begin_layout Itemize
10874
10875 \family sans
10876 AT_RISE:
10877 \begin_inset space \hfill{}
10878 \end_inset
10879
10880 M-z S-R
10881 \begin_inset Newline newline
10882 \end_inset
10883
10884
10885 \family default
10886 A special case of Narrative to describe the setting and action as the curtain
10887  rises.
10888 \end_layout
10889
10890 \begin_layout Itemize
10891
10892 \family sans
10893 Speaker
10894 \begin_inset space \hfill{}
10895 \end_inset
10896
10897 M-z s
10898 \begin_inset Newline newline
10899 \end_inset
10900
10901
10902 \family default
10903 The speaker's (actor's) title, centered in all CAPS.
10904 \end_layout
10905
10906 \begin_layout Itemize
10907
10908 \family sans
10909 Parenthetical
10910 \begin_inset space \hfill{}
10911 \end_inset
10912
10913 M-z p
10914 \begin_inset Newline newline
10915 \end_inset
10916
10917
10918 \family default
10919 Instructions to the speaker.
10920  The parentheses are automatically inserted.
10921  The ( will appear on screen, but both will be in the printed play.
10922  This environment is only used within 
10923 \family sans
10924 Dialogue
10925 \family default
10926 .
10927 \end_layout
10928
10929 \begin_layout Itemize
10930
10931 \family sans
10932 Dialogue
10933 \begin_inset space \hfill{}
10934 \end_inset
10935
10936 M-z d
10937 \begin_inset Newline newline
10938 \end_inset
10939
10940
10941 \family default
10942 What the Speaker says.
10943 \end_layout
10944
10945 \begin_layout Itemize
10946
10947 \family sans
10948 CURTAIN
10949 \begin_inset space \hfill{}
10950 \end_inset
10951
10952 M-z S-C
10953 \begin_inset Newline newline
10954 \end_inset
10955
10956
10957 \family default
10958 The curtain comes down.
10959 \end_layout
10960
10961 \begin_layout Itemize
10962
10963 \family sans
10964 Title
10965 \begin_inset space \hfill{}
10966 \end_inset
10967
10968 M-z S-T
10969 \end_layout
10970
10971 \begin_layout Itemize
10972
10973 \family sans
10974 Author
10975 \begin_inset space \hfill{}
10976 \end_inset
10977
10978 M-z S-A
10979 \end_layout
10980
10981 \begin_layout Itemize
10982
10983 \family sans
10984 Right_Address
10985 \begin_inset space \hfill{}
10986 \end_inset
10987
10988 M-z r
10989 \end_layout
10990
10991 \begin_layout Standard
10992 Hello there.
10993 \end_layout
10994
10995 \begin_layout Section
10996 Dinbrief
10997 \end_layout
10998
10999 \begin_layout Standard
11000 The document class 
11001 \family sans
11002 dinbrief
11003 \family default
11004  can be used to type letters according to German conventions.
11005  A template file is included in 
11006 \family typewriter
11007 .../lyx/share/templates
11008 \family default
11009  for you to use as a starting point.
11010 \end_layout
11011
11012 \begin_layout Section
11013 Elsevier Journals
11014 \end_layout
11015
11016 \begin_layout Standard
11017 See the \SpecialChar LyX
11018  template file 
11019 \family typewriter
11020 elsarticle.lyx
11021 \family default
11022 .
11023  It contains all infos you need.
11024 \end_layout
11025
11026 \begin_layout Section
11027 Foils [aka 
11028 \family sans
11029 Foil\SpecialChar TeX
11030
11031 \family default
11032 ]
11033 \begin_inset CommandInset label
11034 LatexCommand label
11035 name "sec:foiltex"
11036
11037 \end_inset
11038
11039
11040 \end_layout
11041
11042 \begin_layout Standard
11043 by 
11044 \noun on
11045 Allan Rae
11046 \end_layout
11047
11048 \begin_layout Subsection
11049 Introduction
11050 \end_layout
11051
11052 \begin_layout Standard
11053 This section describes how to use \SpecialChar LyX
11054  to make slides for overhead projectors.
11055  There are two document classes that can do this: the default slides class
11056  and the 
11057 \family sans
11058 Foil\SpecialChar TeX
11059
11060 \family default
11061  slides class.
11062  This section documents the latter.
11063 \end_layout
11064
11065 \begin_layout Standard
11066 I'm going to say this again, nice and clear, so that there's no misunderstanding
11067 :
11068 \end_layout
11069
11070 \begin_layout Standard
11071 \begin_inset VSpace bigskip
11072 \end_inset
11073
11074
11075 \end_layout
11076
11077 \begin_layout Standard
11078 \align center
11079
11080 \size large
11081 This section documents the class 
11082 \begin_inset Quotes eld
11083 \end_inset
11084
11085
11086 \family sans
11087 FoilTeX
11088 \family default
11089
11090 \begin_inset Quotes erd
11091 \end_inset
11092
11093  
11094 \emph on
11095 only.
11096 \end_layout
11097
11098 \begin_layout Standard
11099 \begin_inset VSpace bigskip
11100 \end_inset
11101
11102
11103 \end_layout
11104
11105 \begin_layout Standard
11106 If you're looking for the documentation for 
11107 \begin_inset Quotes eld
11108 \end_inset
11109
11110
11111 \family sans
11112 slides (default)
11113 \family default
11114
11115 \begin_inset Quotes erd
11116 \end_inset
11117
11118 , check out section
11119 \begin_inset space ~
11120 \end_inset
11121
11122
11123 \begin_inset CommandInset ref
11124 LatexCommand ref
11125 reference "sec:slitex"
11126
11127 \end_inset
11128
11129 .
11130  If your machine doesn't have the 
11131 \family sans
11132 foils
11133 \family default
11134  class 
11135 \family sans
11136 FoilTeX
11137 \family default
11138  installed, you'll probably have to use the default 
11139 \family sans
11140 slides
11141 \family default
11142  class, which isn't quite as good as 
11143 \family sans
11144 foils.
11145 \end_layout
11146
11147 \begin_layout Standard
11148 The 
11149 \family sans
11150 foils
11151 \family default
11152  class is designed for use with version
11153 \begin_inset space ~
11154 \end_inset
11155
11156 2.1 of the 
11157 \family sans
11158 foils.cls
11159 \family default
11160  \SpecialChar LaTeX
11161  class file which is now an integral part of \SpecialChar LaTeX2e
11162 .
11163 \end_layout
11164
11165 \begin_layout Subsection
11166 Getting Started
11167 \end_layout
11168
11169 \begin_layout Standard
11170 Obviously, to use this document class, you need to select 
11171 \family sans
11172 FoilTeX
11173 \family default
11174  from the 
11175 \family sans
11176 Class
11177 \family default
11178  entry in the 
11179 \family sans
11180 Document
11181 \begin_inset space ~
11182 \end_inset
11183
11184 Layout
11185 \family default
11186  dialog.
11187  There are some settings in the 
11188 \family sans
11189 Document
11190 \begin_inset space ~
11191 \end_inset
11192
11193 Layout
11194 \family default
11195  dialog that you should know about that are specific to this class:
11196 \end_layout
11197
11198 \begin_layout Itemize
11199 Don't change the options 
11200 \family sans
11201 Sides
11202 \family default
11203  and 
11204 \family sans
11205 Columns
11206 \family default
11207  on the 
11208 \family sans
11209 Document
11210 \begin_inset space ~
11211 \end_inset
11212
11213 Layout
11214 \family default
11215  dialog.
11216  They're ignored by the 
11217 \family sans
11218 foils
11219 \family default
11220  class.
11221 \end_layout
11222
11223 \begin_layout Itemize
11224 The default font size is 20
11225 \begin_inset space \thinspace{}
11226 \end_inset
11227
11228 pt with the other options being 17
11229 \begin_inset space \thinspace{}
11230 \end_inset
11231
11232 pt, 25
11233 \begin_inset space \thinspace{}
11234 \end_inset
11235
11236 pt and 30
11237 \begin_inset space \thinspace{}
11238 \end_inset
11239
11240 pt.
11241 \end_layout
11242
11243 \begin_layout Itemize
11244 The default font is 
11245 \family sans
11246 sans
11247 \family default
11248  
11249 \family sans
11250 serif
11251 \family default
11252  but all math equations are still typeset in the usual roman font.
11253 \end_layout
11254
11255 \begin_layout Itemize
11256
11257 \family sans
11258 Foil\SpecialChar TeX
11259
11260 \family default
11261  supports A4 and Letter paper sizes as well as a special size for working
11262  with 35
11263 \begin_inset space \thinspace{}
11264 \end_inset
11265
11266 mm slides.
11267  It doesn't support A5, B5, legal or executive paper sizes.
11268 \end_layout
11269
11270 \begin_layout Itemize
11271 Don't bother changing the 
11272 \family sans
11273 Float Placement
11274 \family default
11275  settings because they are ignored anyway.
11276  All floats appear where they are defined in the text.
11277 \end_layout
11278
11279 \begin_layout Itemize
11280 The 
11281 \family sans
11282 Pagestyle
11283 \family default
11284  setting behaves a bit differently for this class.
11285  
11286 \family sans
11287 Foil\SpecialChar TeX
11288
11289 \family default
11290  provides extensive footer and header capabilities including a user-defined
11291  logo.
11292  See section
11293 \begin_inset space ~
11294 \end_inset
11295
11296
11297 \begin_inset CommandInset ref
11298 LatexCommand ref
11299 reference "sec:foilfoot"
11300
11301 \end_inset
11302
11303  for more details.
11304  The title page is treated differently to all other pages in the document
11305  and is 
11306 \emph on
11307 always
11308 \emph default
11309  unnumbered and 
11310 \emph on
11311 always
11312 \emph default
11313  has the logo centered at the bottom of the page (if one is defined).
11314  The possible page style choices and what they do are as follows:
11315 \end_layout
11316
11317 \begin_deeper
11318 \begin_layout Labeling
11319 \labelwidthstring MMMMMMM
11320
11321 \family sans
11322 \series bold
11323 empty
11324 \family default
11325 \series default
11326  The final output contains no page numbers, or other headers or footers
11327  (except footnotes of course).
11328  
11329 \end_layout
11330
11331 \begin_layout Labeling
11332 \labelwidthstring MMMMMMM
11333
11334 \family sans
11335 \series bold
11336 plain
11337 \family default
11338 \series default
11339  The final output contains page numbers centered at the bottom of the page.
11340  No other headings or footers (other than footnotes).
11341 \end_layout
11342
11343 \begin_layout Labeling
11344 \labelwidthstring MMMMMMM
11345
11346 \series bold
11347 foilheadings
11348 \series default
11349  Page numbers in lower right corner.
11350  Additional headers and footers are also shown.
11351  This is also the default.
11352 \end_layout
11353
11354 \begin_layout Labeling
11355 \labelwidthstring MMMMMMM
11356
11357 \series bold
11358 fancy
11359 \series default
11360  Gives you access to the 
11361 \family sans
11362 fancyheadings
11363 \family default
11364  package although its use with 
11365 \family sans
11366 Foil\SpecialChar TeX
11367
11368 \family default
11369  is discouraged by the writer of the 
11370 \family sans
11371 Foil\SpecialChar TeX
11372
11373 \family default
11374  package because of some potential page layout clashes.
11375 \end_layout
11376
11377 \end_deeper
11378 \begin_layout Subsubsection
11379 Extra Options
11380 \end_layout
11381
11382 \begin_layout Standard
11383 The following options may be used in the extra class options in the 
11384 \family sans
11385 Document\SpecialChar menuseparator
11386 Settings
11387 \family default
11388  dialog.
11389 \end_layout
11390
11391 \begin_layout Labeling
11392 \labelwidthstring MMMMMMx
11393
11394 \series bold
11395 35mmSlide
11396 \series default
11397  This sets up the page layout for 7.33
11398 \begin_inset space \thinspace{}
11399 \end_inset
11400
11401 in by 11
11402 \begin_inset space \thinspace{}
11403 \end_inset
11404
11405 in paper, which is about the same aspect ratio as a 35
11406 \begin_inset space \thinspace{}
11407 \end_inset
11408
11409 mm slide, making it a bit easier to work with this medium.
11410 \end_layout
11411
11412 \begin_layout Labeling
11413 \labelwidthstring MMMMMMx
11414
11415 \series bold
11416 headrule
11417 \series default
11418  Places a rule across the page below the header on every page except the
11419  title page.
11420 \end_layout
11421
11422 \begin_layout Labeling
11423 \labelwidthstring MMMMMMx
11424
11425 \series bold
11426 footrule
11427 \series default
11428  Places a rule across the page above the footer on every page except the
11429  title page.
11430 \end_layout
11431
11432 \begin_layout Labeling
11433 \labelwidthstring MMMMMMx
11434
11435 \series bold
11436 dvips
11437 \series default
11438  This is automatically set each time you create a new 
11439 \family sans
11440 foils
11441 \family default
11442  document.
11443  This option tells 
11444 \family sans
11445 Foil\SpecialChar TeX
11446
11447 \family default
11448  to use the dvips driver to rotate those pages that are set as landscape
11449  foils.
11450 \end_layout
11451
11452 \begin_layout Labeling
11453 \labelwidthstring MMMMMMx
11454
11455 \series bold
11456 landscape
11457 \series default
11458  Simply changes the page dimensions to those of a landscape page but doesn't
11459  do any rotation.
11460  Thus if you use this option you need to use an external program to rotate
11461  each page or feed your paper through your printer as landscape.
11462  Note that this option effectively reverses the roles of the 
11463 \family sans
11464 Foilhead
11465 \family default
11466  and 
11467 \family sans
11468 Rotatefoilhead
11469 \family default
11470  environments (don't worry these are described in the next section).
11471 \end_layout
11472
11473 \begin_layout Labeling
11474 \labelwidthstring MMMMMMx
11475
11476 \series bold
11477 leqno
11478 \series default
11479  Equation numbers on the left.
11480 \end_layout
11481
11482 \begin_layout Labeling
11483 \labelwidthstring MMMMMMx
11484
11485 \series bold
11486 fleqn
11487 \series default
11488  Flush-left equations.
11489 \end_layout
11490
11491 \begin_layout Subsection
11492 Supported Environments
11493 \end_layout
11494
11495 \begin_layout Standard
11496 Most of the environments commonly supported in other classes are also supported
11497  by the 
11498 \family sans
11499 foils
11500 \family default
11501  class.
11502  There are several additional environments provided by 
11503 \family sans
11504 Foil\SpecialChar TeX
11505
11506 \family default
11507  as well as a couple added by \SpecialChar LyX
11508 .
11509  The following environments are shared with other classes:
11510 \end_layout
11511
11512 \begin_layout Standard
11513 \begin_inset Flex Multiple Columns
11514 status open
11515
11516 \begin_layout Itemize
11517
11518 \family sans
11519 Standard
11520 \end_layout
11521
11522 \begin_layout Itemize
11523
11524 \family sans
11525 Itemize
11526 \end_layout
11527
11528 \begin_layout Itemize
11529
11530 \family sans
11531 Enumerate
11532 \end_layout
11533
11534 \begin_layout Itemize
11535
11536 \family sans
11537 Description
11538 \end_layout
11539
11540 \begin_layout Itemize
11541
11542 \family sans
11543 List
11544 \end_layout
11545
11546 \begin_layout Itemize
11547
11548 \family sans
11549 \SpecialChar LyX
11550 -Code
11551 \end_layout
11552
11553 \begin_layout Itemize
11554
11555 \family sans
11556 Verse
11557 \end_layout
11558
11559 \begin_layout Itemize
11560
11561 \family sans
11562 Quote
11563 \end_layout
11564
11565 \begin_layout Itemize
11566
11567 \family sans
11568 Quotation
11569 \end_layout
11570
11571 \begin_layout Itemize
11572
11573 \family sans
11574 TitleAuthor
11575 \end_layout
11576
11577 \begin_layout Itemize
11578
11579 \family sans
11580 Date
11581 \end_layout
11582
11583 \begin_layout Itemize
11584
11585 \family sans
11586 Abstract
11587 \end_layout
11588
11589 \begin_layout Itemize
11590
11591 \family sans
11592 Bibliography
11593 \end_layout
11594
11595 \begin_layout Itemize
11596
11597 \family sans
11598 Address
11599 \end_layout
11600
11601 \begin_layout Itemize
11602
11603 \family sans
11604 RightAddress
11605 \end_layout
11606
11607 \end_inset
11608
11609
11610 \end_layout
11611
11612 \begin_layout Standard
11613 That is, all the major environments apart from the sectioning environments.
11614  Since foils are essentially self-contained sections, with a title and body,
11615  
11616 \family sans
11617 Foil\SpecialChar TeX
11618
11619 \family default
11620  provides specific commands for starting new foils and these are:
11621 \end_layout
11622
11623 \begin_layout Itemize
11624
11625 \family sans
11626 Foilhead
11627 \end_layout
11628
11629 \begin_layout Itemize
11630
11631 \family sans
11632 Rotatefoilhead
11633 \end_layout
11634
11635 \begin_layout Standard
11636 \SpecialChar LyX
11637  also provides slightly modified versions of these two environments called:
11638 \end_layout
11639
11640 \begin_layout Itemize
11641
11642 \family sans
11643 ShortFoilhead
11644 \end_layout
11645
11646 \begin_layout Itemize
11647
11648 \family sans
11649 ShortRotatefoilhead
11650 \end_layout
11651
11652 \begin_layout Standard
11653 and the differences will be explained in the next section.
11654 \end_layout
11655
11656 \begin_layout Standard
11657 Since foils are often used in presenting ideas or new theorems and such
11658  
11659 \family sans
11660 Foil\SpecialChar TeX
11661
11662 \family default
11663  also provides a comprehensive box of goodies for presenting them:
11664 \end_layout
11665
11666 \begin_layout Standard
11667 \begin_inset Flex Multiple Columns
11668 status open
11669
11670 \begin_layout Itemize
11671
11672 \family sans
11673 Theorem
11674 \end_layout
11675
11676 \begin_layout Itemize
11677
11678 \family sans
11679 Lemma
11680 \end_layout
11681
11682 \begin_layout Itemize
11683
11684 \family sans
11685 Corollary
11686 \end_layout
11687
11688 \begin_layout Itemize
11689
11690 \family sans
11691 Proposition
11692 \end_layout
11693
11694 \begin_layout Itemize
11695
11696 \family sans
11697 Definition
11698 \end_layout
11699
11700 \begin_layout Itemize
11701
11702 \family sans
11703 Proof
11704 \end_layout
11705
11706 \begin_layout Itemize
11707
11708 \family sans
11709 Theorem*
11710 \end_layout
11711
11712 \begin_layout Itemize
11713
11714 \family sans
11715 Lemma*
11716 \end_layout
11717
11718 \begin_layout Itemize
11719
11720 \family sans
11721 Corollary*
11722 \end_layout
11723
11724 \begin_layout Itemize
11725
11726 \family sans
11727 Proposition*
11728 \end_layout
11729
11730 \begin_layout Itemize
11731
11732 \family sans
11733 Definition*
11734 \end_layout
11735
11736 \end_inset
11737
11738
11739 \end_layout
11740
11741 \begin_layout Standard
11742 The starred versions are unnumbered while the unstarred versions are numbered.
11743  There are also two list environments added by \SpecialChar LyX
11744  and these are:
11745 \end_layout
11746
11747 \begin_layout Itemize
11748
11749 \family sans
11750 TickList
11751 \end_layout
11752
11753 \begin_layout Itemize
11754
11755 \family sans
11756 CrossList
11757 \end_layout
11758
11759 \begin_layout Standard
11760
11761 \family sans
11762 Foil\SpecialChar TeX
11763
11764 \family default
11765  provides some powerful header and footer capabilities that are best set
11766  in the preamble although they may be set at any point in a document.
11767  If you want to change these settings in your document the best place to
11768  do so is at the very top of a foil, i.
11769 \begin_inset space \thinspace{}
11770 \end_inset
11771
11772 e.
11773 \emph on
11774
11775 \begin_inset space \space{}
11776 \end_inset
11777
11778
11779 \emph default
11780 straight after the foilhead.
11781 \end_layout
11782
11783 \begin_layout Standard
11784 For this purpose, the following command styles are provided [
11785 \shape smallcaps
11786 Martin Vermeer
11787 \shape default
11788 ]:
11789 \end_layout
11790
11791 \begin_layout Standard
11792 \begin_inset Flex Multiple Columns
11793 status open
11794
11795 \begin_layout Itemize
11796
11797 \family sans
11798 My
11799 \begin_inset space ~
11800 \end_inset
11801
11802 Logo
11803 \end_layout
11804
11805 \begin_layout Itemize
11806
11807 \family sans
11808 Restriction
11809 \end_layout
11810
11811 \begin_layout Itemize
11812
11813 \family sans
11814 Right
11815 \begin_inset space ~
11816 \end_inset
11817
11818 Footer
11819 \end_layout
11820
11821 \begin_layout Itemize
11822
11823 \family sans
11824 Right
11825 \begin_inset space ~
11826 \end_inset
11827
11828 Header
11829 \end_layout
11830
11831 \begin_layout Itemize
11832
11833 \family sans
11834 Left
11835 \begin_inset space ~
11836 \end_inset
11837
11838 Header
11839 \end_layout
11840
11841 \begin_deeper
11842 \begin_layout Plain Layout
11843 \begin_inset space ~
11844 \end_inset
11845
11846
11847 \end_layout
11848
11849 \end_deeper
11850 \end_inset
11851
11852
11853 \end_layout
11854
11855 \begin_layout Standard
11856 There are also a few commands provided by 
11857 \family sans
11858 Foil\SpecialChar TeX
11859
11860 \family default
11861  that aren't directly supported by \SpecialChar LyX
11862  but I'll tell you what they do and how
11863  to use them in section
11864 \begin_inset space ~
11865 \end_inset
11866
11867
11868 \begin_inset CommandInset ref
11869 LatexCommand ref
11870 reference "sec:unsuppfoils"
11871
11872 \end_inset
11873
11874 .
11875 \end_layout
11876
11877 \begin_layout Subsection
11878 Building a Set of Foils
11879 \end_layout
11880
11881 \begin_layout Standard
11882 This section will give a simple introduction to using the different environments
11883  to build a set of foils.
11884  If you want to see an example set of foils, take a look at the 
11885 \family typewriter
11886 Foils.lyx
11887 \family default
11888  file you find in \SpecialChar LyX
11889 's 
11890 \family typewriter
11891 examples
11892 \family default
11893  folder.
11894 \end_layout
11895
11896 \begin_layout Subsubsection
11897 Give It a Title Page
11898 \end_layout
11899
11900 \begin_layout Standard
11901 Unlike other classes that provide 
11902 \family sans
11903 Title
11904 \family default
11905
11906 \family sans
11907 Author
11908 \family default
11909
11910 \family sans
11911 Date
11912 \family default
11913  and 
11914 \family sans
11915 Abstract
11916 \family default
11917  environments, 
11918 \family sans
11919 foils
11920 \family default
11921  creates the title on a page of its own.
11922  If you leave out the 
11923 \family sans
11924 Date
11925 \family default
11926  environment \SpecialChar LaTeX
11927  will substitute the current date (every time you regenerate
11928  the output).
11929 \end_layout
11930
11931 \begin_layout Subsubsection
11932 Start a New Foil
11933 \end_layout
11934
11935 \begin_layout Standard
11936 As I mentioned earlier, there are four ways of starting a new foil.
11937  For portrait foils you should use 
11938 \family sans
11939 Foilhead
11940 \family default
11941  or 
11942 \family sans
11943 ShortFoilhead.
11944
11945 \family default
11946  The difference between these two environments is the amount of space between
11947  the title of the foil (the foilhead) and the body of the foil.
11948 \end_layout
11949
11950 \begin_layout Standard
11951 Landscape foils are generated using the 
11952 \family sans
11953 Rotatefoilhead
11954 \family default
11955  and 
11956 \family sans
11957 ShortRotatefoilhead
11958 \family default
11959  environments.
11960  Again the only difference is the spacing between foilhead and body.
11961  Both of the short versions have 0.5
11962 \begin_inset space ~
11963 \end_inset
11964
11965 inches less separation between the foilhead and the body.
11966  
11967 \end_layout
11968
11969 \begin_layout Standard
11970 One problem with the support for landscape foils is the requirement that
11971  you have to use the 
11972 \family typewriter
11973 dvips
11974 \family default
11975  driver to generate the PostScript output otherwise the foils won't be rotated.
11976  It is possible to get landscape foils even if you haven't got the 
11977 \family typewriter
11978 dvips
11979 \family default
11980  driver provided you can feed your foils sideways through your printer ;-)
11981 \end_layout
11982
11983 \begin_layout Subsubsection
11984 Theorems, Lemmas, Proofs and more
11985 \end_layout
11986
11987 \begin_layout Standard
11988 You can't have two of the same type of these environments directly following
11989  each other.
11990  If you use a normal paragraph break, , you will just be extending the previous
11991  environment as if you had merged the two environments together.
11992  Rather than that, you need to insert a so-called separator.
11993  Please refer to the section entitled 
11994 \emph on
11995 Separate Nestings
11996 \emph default
11997  in the 
11998 \emph on
11999 User's Guide
12000 \emph default
12001 .
12002 \end_layout
12003
12004 \begin_layout Subsubsection
12005 Lists
12006 \end_layout
12007
12008 \begin_layout Standard
12009 You get all the commonly supported list styles found in other classes as
12010  well as two new ones.
12011  I'll only describe the new ones here.
12012  If you want to find out more about the other list environments check out
12013  the 
12014 \emph on
12015 User's Guide.
12016
12017 \emph default
12018  If you intend to use itemized lists you might also want to read about the
12019  
12020 \family sans
12021 Itemize
12022 \begin_inset space ~
12023 \end_inset
12024
12025 Bullet
12026 \begin_inset space ~
12027 \end_inset
12028
12029 Selection
12030 \family default
12031  dialog described above in section
12032 \begin_inset space ~
12033 \end_inset
12034
12035
12036 \begin_inset CommandInset ref
12037 LatexCommand ref
12038 reference "sec:bullet"
12039
12040 \end_inset
12041
12042 .
12043 \end_layout
12044
12045 \begin_layout Standard
12046 The two new list styles, 
12047 \family sans
12048 TickList
12049 \family default
12050  and 
12051 \family sans
12052 CrossList
12053 \family default
12054 , are designed to make it easier for you to create lists of do's and don'ts
12055  or right and wrong by providing dedicated environments that use a tick
12056  or a cross as the label of the list.
12057  These lists are in fact dedicated variants of the 
12058 \family sans
12059 Itemize
12060 \family default
12061  environment.
12062  They do however require that you have the 
12063 \family typewriter
12064 psnfss
12065 \family default
12066  packages installed.
12067 \end_layout
12068
12069 \begin_layout Subsubsection
12070 Figures and Tables
12071 \end_layout
12072
12073 \begin_layout Standard
12074
12075 \family sans
12076 Foil\SpecialChar TeX
12077
12078 \family default
12079  redefines the floating tables and figures so that they appear exactly where
12080  they are in the text rather than pushing them to the top of the page or
12081  to some user specified location.
12082  In fact if you change the float placement settings they are simply ignored.
12083 \end_layout
12084
12085 \begin_layout Subsubsection
12086 Page Headers and Footers
12087 \begin_inset CommandInset label
12088 LatexCommand label
12089 name "sec:foilfoot"
12090
12091 \end_inset
12092
12093
12094 \end_layout
12095
12096 \begin_layout Standard
12097
12098 \family sans
12099 My
12100 \begin_inset space ~
12101 \end_inset
12102
12103 Logo
12104 \family default
12105  and 
12106 \family sans
12107 Restriction
12108 \family default
12109  are two commands used to control the left-footer text string.
12110  The first is meant to allow you to include a graphic logo on your foils
12111  and defaults to 
12112 \begin_inset Quotes eld
12113 \end_inset
12114
12115 -Typeset by 
12116 \family sans
12117 Foil\SpecialChar TeX
12118
12119 \family default
12120 -
12121 \begin_inset Quotes erd
12122 \end_inset
12123
12124 .
12125  While the second is meant to provide a classification for the audience,
12126  
12127 \emph on
12128 e.
12129 \begin_inset space \thinspace{}
12130 \end_inset
12131
12132 g.
12133 \emph default
12134
12135 \begin_inset space \space{}
12136 \end_inset
12137
12138 Confidential.
12139  It is empty by default.
12140 \end_layout
12141
12142 \begin_layout Standard
12143 The remaining page corners can be filled by 
12144 \family sans
12145 Right
12146 \begin_inset space ~
12147 \end_inset
12148
12149 Footer
12150 \family default
12151  (which defaults to page numbers), 
12152 \family sans
12153 Right
12154 \begin_inset space ~
12155 \end_inset
12156
12157 Header
12158 \family default
12159  (top right) and 
12160 \family sans
12161 Left
12162 \begin_inset space ~
12163 \end_inset
12164
12165 Header
12166 \family default
12167  (top left).
12168 \end_layout
12169
12170 \begin_layout Subsection
12171 Unsupported 
12172 \family sans
12173 Foil\SpecialChar TeX
12174
12175 \family default
12176  Goodies
12177 \begin_inset CommandInset label
12178 LatexCommand label
12179 name "sec:unsuppfoils"
12180
12181 \end_inset
12182
12183
12184 \end_layout
12185
12186 \begin_layout Standard
12187 All the commands mentioned below need to be set in a 
12188 \family sans
12189 \SpecialChar LaTeX
12190
12191 \family default
12192  environment or as 
12193 \family sans
12194 \SpecialChar TeX
12195
12196 \family default
12197  within another environment.
12198 \end_layout
12199
12200 \begin_layout Subsubsection
12201 Lengths
12202 \end_layout
12203
12204 \begin_layout Standard
12205 All lengths are adjusted using the 
12206 \family typewriter
12207
12208 \backslash
12209 setlength{
12210 \family default
12211 \emph on
12212 lengthname
12213 \family typewriter
12214 \emph default
12215 }{
12216 \family default
12217 \emph on
12218 newlength
12219 \family typewriter
12220 \emph default
12221 }
12222 \family default
12223  command.
12224  Where 
12225 \emph on
12226 lengthname
12227 \emph default
12228  should be replaced by the name given to the length you want to change and
12229  
12230 \emph on
12231 newlength
12232 \emph default
12233  is the length value.
12234  All lengths should be specified in units of length such as inches (
12235 \family typewriter
12236 in
12237 \family default
12238 ), millimeters (
12239 \family typewriter
12240 mm
12241 \family default
12242 ) or points (
12243 \family typewriter
12244 pt
12245 \family default
12246 ) or relative to some document or font-based length such as 
12247 \family typewriter
12248
12249 \backslash
12250 textwidth
12251 \family default
12252 .
12253  
12254 \end_layout
12255
12256 \begin_layout Standard
12257 It's possible to change the spacing between a foilhead and the body of the
12258  foil by adjusting the length specified by 
12259 \family typewriter
12260
12261 \backslash
12262 foilheadskip
12263 \family default
12264 .
12265  For example, to make 
12266 \emph on
12267 all
12268 \emph default
12269  foilheads 0.5
12270 \begin_inset space \space{}
12271 \end_inset
12272
12273 in closer to their bodies put the following in the preamble: 
12274 \family typewriter
12275
12276 \backslash
12277 setlength{
12278 \backslash
12279 foilheadskip}{-0.5in}
12280 \end_layout
12281
12282 \begin_layout Standard
12283 The spacings around floats can be adjusted by setting these lengths:
12284 \end_layout
12285
12286 \begin_layout Labeling
12287 \labelwidthstring MMMMMMMMMMM
12288
12289 \family typewriter
12290
12291 \backslash
12292 abovefloatskip
12293 \family default
12294  Separation between the text and the top of the float
12295 \end_layout
12296
12297 \begin_layout Labeling
12298 \labelwidthstring MMMMMMMMMMM
12299
12300 \family typewriter
12301
12302 \backslash
12303 abovecaptionskip
12304 \family default
12305  Separation between the float and the caption
12306 \end_layout
12307
12308 \begin_layout Labeling
12309 \labelwidthstring MMMMMMMMMMM
12310
12311 \family typewriter
12312
12313 \backslash
12314 belowcaptionskip
12315 \family default
12316  Separation between the caption and the following text
12317 \end_layout
12318
12319 \begin_layout Labeling
12320 \labelwidthstring MMMMMMMMMMM
12321
12322 \family typewriter
12323
12324 \backslash
12325 captionwidth
12326 \family default
12327  You can make the captions narrower than the surrounding text by adjusting
12328  this length.
12329  Best done relative to 
12330 \family typewriter
12331
12332 \backslash
12333 textwidth
12334 \family default
12335 .
12336 \end_layout
12337
12338 \begin_layout Standard
12339 There are also several title page related lengths that you may find useful
12340  if you have a long title or several authors:
12341 \end_layout
12342
12343 \begin_layout Labeling
12344 \labelwidthstring MMMMMMMMMMM
12345
12346 \family typewriter
12347
12348 \backslash
12349 abovetitleskip
12350 \family default
12351  Separation from headers to 
12352 \family sans
12353 Title
12354 \end_layout
12355
12356 \begin_layout Labeling
12357 \labelwidthstring MMMMMMMMMMM
12358
12359 \family typewriter
12360
12361 \backslash
12362 titleauthorskip
12363 \family default
12364  between 
12365 \family sans
12366 Title
12367 \family default
12368  and 
12369 \family sans
12370 Author
12371 \family default
12372  environments
12373 \end_layout
12374
12375 \begin_layout Labeling
12376 \labelwidthstring MMMMMMMMMMM
12377
12378 \family typewriter
12379
12380 \backslash
12381 authorauthorskip
12382 \family default
12383  between multiple 
12384 \family sans
12385 Author
12386 \family default
12387  lines
12388 \end_layout
12389
12390 \begin_layout Labeling
12391 \labelwidthstring MMMMMMMMMMM
12392
12393 \family typewriter
12394
12395 \backslash
12396 authordateskip
12397 \family default
12398  between the 
12399 \family sans
12400 Author
12401 \family default
12402  and the 
12403 \family sans
12404 Date
12405 \end_layout
12406
12407 \begin_layout Labeling
12408 \labelwidthstring MMMMMMMMMMM
12409
12410 \family typewriter
12411
12412 \backslash
12413 dateabstractskip
12414 \family default
12415  between the 
12416 \family sans
12417 Date
12418 \family default
12419  and the 
12420 \family sans
12421 Abstract
12422 \end_layout
12423
12424 \begin_layout Standard
12425 The last length related command affects all the list environments.
12426  If you place 
12427 \family typewriter
12428
12429 \backslash
12430 zerolistvertdimens
12431 \family default
12432  
12433 \emph on
12434 inside
12435 \emph default
12436  a list environment then all the vertical spacing between the list items
12437  is removed.
12438  Note that this is a command not a length so it doesn't require 
12439 \family typewriter
12440
12441 \backslash
12442 setlength
12443 \family default
12444  like the stuff mentioned above.
12445 \end_layout
12446
12447 \begin_layout Subsubsection
12448 Headers and Footers
12449 \end_layout
12450
12451 \begin_layout Standard
12452 The 
12453 \family typewriter
12454
12455 \backslash
12456 LogoOn
12457 \family default
12458  and 
12459 \family typewriter
12460
12461 \backslash
12462 LogoOff
12463 \family default
12464  commands control whether the logo in the 
12465 \family sans
12466 MyLogo
12467 \family default
12468  definition appear on a given page.
12469  If you put 
12470 \family typewriter
12471
12472 \backslash
12473 LogoOff
12474 \family default
12475  in the preamble then none of the foils will have the logo on them.
12476  If you don't want the logo on a particular page place the 
12477 \family typewriter
12478
12479 \backslash
12480 LogoOff
12481 \family default
12482  directly after the foilhead of that page and the 
12483 \family typewriter
12484
12485 \backslash
12486 LogoOn
12487 \family default
12488  directly after the next foilhead.
12489 \end_layout
12490
12491 \begin_layout Standard
12492 If you decide to use the 
12493 \family sans
12494 fancy
12495 \family default
12496  page style setting in the 
12497 \family sans
12498 Document
12499 \begin_inset space ~
12500 \end_inset
12501
12502 Layout
12503 \family default
12504  dialog you should probably add 
12505 \family typewriter
12506
12507 \backslash
12508 let
12509 \backslash
12510 headwidth
12511 \backslash
12512 textwidth
12513 \family default
12514  to your preamble so headers and footers on landscape pages are correctly
12515  placed when rotated.
12516  This is due to some clashes between the page layouts provided by the 
12517 \family sans
12518 fancyheadings
12519 \family default
12520  package and the 
12521 \family sans
12522 foils
12523 \family default
12524  class.
12525 \end_layout
12526
12527 \begin_layout Section
12528 Hollywood (Hollywood spec scripts)
12529 \end_layout
12530
12531 \begin_layout Standard
12532 by 
12533 \shape smallcaps
12534 Garst Reese
12535 \end_layout
12536
12537 \begin_layout Subsection
12538 Introduction
12539 \end_layout
12540
12541 \begin_layout Standard
12542 Getting the format of a Hollywood script right is a 
12543 \begin_inset Quotes eld
12544 \end_inset
12545
12546 rite of passage.
12547 \begin_inset Quotes erd
12548 \end_inset
12549
12550  It is designed to make the readers focus on content and to be easy and
12551  familiar for the actors to read.
12552  Each page of a script should be one minute of film.
12553  Nothing goes in a script that you cannot see or hear on screen.
12554  The courier 12 pt font should be used throughout.
12555  No italics.
12556 \end_layout
12557
12558 \begin_layout Subsection
12559 Special problems
12560 \end_layout
12561
12562 \begin_layout Standard
12563 Speakers' lines should NEVER break in mid-sentence.
12564  If a speaker's lines continue over a page break, repeat the 
12565 \family sans
12566 Speaker
12567 \family default
12568  title followed by (Cont'd).
12569 \end_layout
12570
12571 \begin_layout Subsection
12572 Special features
12573 \end_layout
12574
12575 \begin_layout Standard
12576 Insert the 
12577 \family sans
12578 Speaker
12579 \family default
12580  names as labels then cross-reference the label to insert the name.
12581  The cross-reference dialog will show the current cast of characters.
12582  You can use this to insert the speaker name in narratives also.
12583 \end_layout
12584
12585 \begin_layout Subsection
12586 Paper size and Margins
12587 \end_layout
12588
12589 \begin_layout Standard
12590 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
12591 \end_layout
12592
12593 \begin_layout Subsection
12594 Environments
12595 \end_layout
12596
12597 \begin_layout Standard
12598 The following environments are available.
12599  You can use hollywood.bind to get the bind keys shown at the right.
12600 \end_layout
12601
12602 \begin_layout Itemize
12603
12604 \family sans
12605 Standard
12606 \begin_inset Newline newline
12607 \end_inset
12608
12609
12610 \family default
12611 Used where nothing else works.
12612  Try to avoid it.
12613 \end_layout
12614
12615 \begin_layout Itemize
12616
12617 \family sans
12618 FADE_IN
12619 \family default
12620 :
12621 \begin_inset space \hfill{}
12622 \end_inset
12623
12624
12625 \family sans
12626 M-z S-I
12627 \family default
12628
12629 \begin_inset Newline newline
12630 \end_inset
12631
12632 Usually followed by something like 
12633 \begin_inset Quotes eld
12634 \end_inset
12635
12636 on Sally waking up.
12637 \begin_inset Quotes erd
12638 \end_inset
12639
12640
12641 \end_layout
12642
12643 \begin_layout Itemize
12644
12645 \family sans
12646 INT:
12647 \begin_inset space \hfill{}
12648 \end_inset
12649
12650 M-z i
12651 \begin_inset Newline newline
12652 \end_inset
12653
12654
12655 \family default
12656 Introduces a new INTERIOR camera set-up.
12657  Always followed by DAY or NIGHT, or something similar to define the lighting
12658  required.
12659  Everthing on this line in CAPS.
12660 \end_layout
12661
12662 \begin_layout Itemize
12663
12664 \family sans
12665 EXT:
12666 \begin_inset space \hfill{}
12667 \end_inset
12668
12669 M-z e
12670 \begin_inset Newline newline
12671 \end_inset
12672
12673
12674 \family default
12675 Introduces a new EXTERIOR camera set-up.
12676  Everthing on this line in CAPS.
12677 \end_layout
12678
12679 \begin_layout Itemize
12680
12681 \family sans
12682 Speaker
12683 \begin_inset space \hfill{}
12684 \end_inset
12685
12686 M-z s
12687 \begin_inset Newline newline
12688 \end_inset
12689
12690
12691 \family default
12692 The character speaking.
12693 \end_layout
12694
12695 \begin_layout Itemize
12696
12697 \family sans
12698 Parenthetical
12699 \begin_inset space \hfill{}
12700 \end_inset
12701
12702 M-z p
12703 \begin_inset Newline newline
12704 \end_inset
12705
12706
12707 \family default
12708 Instructions to the speaker.
12709  The () are automatically inserted.
12710 \end_layout
12711
12712 \begin_layout Itemize
12713
12714 \family sans
12715 Dialogue
12716 \begin_inset space \hfill{}
12717 \end_inset
12718
12719 M-z d
12720 \begin_inset Newline newline
12721 \end_inset
12722
12723
12724 \family default
12725 What the 
12726 \family sans
12727 Speaker
12728 \family default
12729  says.
12730 \end_layout
12731
12732 \begin_layout Itemize
12733
12734 \family sans
12735 Transition
12736 \begin_inset space \hfill{}
12737 \end_inset
12738
12739 M-z t
12740 \begin_inset Newline newline
12741 \end_inset
12742
12743
12744 \family default
12745 Camera movement instruction.
12746  e.
12747 \begin_inset space \thinspace{}
12748 \end_inset
12749
12750 g.
12751 \begin_inset space \space{}
12752 \end_inset
12753
12754 CUT TO:
12755 \end_layout
12756
12757 \begin_layout Itemize
12758
12759 \family sans
12760 FADE OUT:
12761 \begin_inset space \hfill{}
12762 \end_inset
12763
12764 M-z S-I
12765 \end_layout
12766
12767 \begin_layout Itemize
12768
12769 \family sans
12770 Author
12771 \begin_inset space \hfill{}
12772 \end_inset
12773
12774 M-z S-A
12775 \end_layout
12776
12777 \begin_layout Itemize
12778
12779 \family sans
12780 Title
12781 \begin_inset space \hfill{}
12782 \end_inset
12783
12784 M-z S-T
12785 \end_layout
12786
12787 \begin_layout Itemize
12788
12789 \family sans
12790 Right_Address
12791 \begin_inset space \hfill{}
12792 \end_inset
12793
12794 M-z r
12795 \end_layout
12796
12797 \begin_layout Subsection
12798 Script jargon
12799 \end_layout
12800
12801 \begin_layout Itemize
12802 (O.S) — off screen
12803 \end_layout
12804
12805 \begin_layout Itemize
12806 (V.0) — voice over
12807 \end_layout
12808
12809 \begin_layout Itemize
12810 b.
12811 \begin_inset space \thinspace{}
12812 \end_inset
12813
12814 g.
12815  — background
12816 \end_layout
12817
12818 \begin_layout Itemize
12819 C.U.
12820  — close-up
12821 \end_layout
12822
12823 \begin_layout Itemize
12824 PAN — camera movement
12825 \end_layout
12826
12827 \begin_layout Itemize
12828 INSERT — cut to close-up of
12829 \end_layout
12830
12831 \begin_layout Section
12832 ijmpc and ijmpd
12833 \end_layout
12834
12835 \begin_layout Standard
12836 by 
12837 \noun on
12838 Panayotis Papasotiriou
12839 \end_layout
12840
12841 \begin_layout Subsection
12842 Overview
12843 \end_layout
12844
12845 \begin_layout Standard
12846 The ijmpc package is a set of macros that facilitates electronic manuscript
12847  submission to the 
12848 \emph on
12849 International Journal of Modern Physics C
12850 \emph default
12851 .
12852  Similarly, the ijmpd package is for creating manuscripts to be submitted
12853  to the 
12854 \emph on
12855 International Journal of Modern Physics D
12856 \emph default
12857 .
12858  Both journals are published by World Scientific.
12859  The corresponding document classes are named 
12860 \family typewriter
12861 ws-ijmpc.cls
12862 \family default
12863  and 
12864 \family typewriter
12865 ws-ijmpd.cls
12866 \family default
12867 , respectively.
12868  These files, together with instructions for the authors, can be downloaded
12869  from the sites 
12870 \begin_inset Flex URL
12871 status collapsed
12872
12873 \begin_layout Plain Layout
12874
12875 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
12876 \end_layout
12877
12878 \end_inset
12879
12880  and 
12881 \begin_inset Flex URL
12882 status collapsed
12883
12884 \begin_layout Plain Layout
12885
12886 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
12887 \end_layout
12888
12889 \end_inset
12890
12891 .
12892  Both packages are modified versions of the standard 
12893 \begin_inset Quotes eld
12894 \end_inset
12895
12896 article
12897 \begin_inset Quotes erd
12898 \end_inset
12899
12900  package, and they are almost (but not exactly) identical.
12901  Most of their features are supported by \SpecialChar LyX
12902 .
12903  I have used \SpecialChar LyX
12904  successfully to write articles submitted to both journals
12905  without any problem.
12906 \end_layout
12907
12908 \begin_layout Subsection
12909 Writing a paper
12910 \end_layout
12911
12912 \begin_layout Standard
12913 As usual, the easiest way to write a paper is to start with a template.
12914  Click on 
12915 \family sans
12916 File\SpecialChar menuseparator
12917 New from
12918 \family default
12919  
12920 \family sans
12921 Template
12922 \family default
12923 , then choose the 
12924 \family typewriter
12925 ijmpc.lyx
12926 \family default
12927  or 
12928 \family typewriter
12929 ijmpd.lyx
12930 \family default
12931  template.
12932  This will give an (almost) empty document that includes the most common
12933  fields found in a manuscript.
12934  Simply overwrite the existing text (including the brackets, 
12935 \family typewriter
12936 <>
12937 \family default
12938 ) with your text.
12939  You should keep in mind the following remarks.
12940 \end_layout
12941
12942 \begin_layout Enumerate
12943 \SpecialChar LyX
12944  won't let you change the font size and the page style of the document,
12945  because such modifications are not allowed by both packages.
12946 \end_layout
12947
12948 \begin_layout Enumerate
12949 The language of the document should not be changed.
12950  Before previewing your paper, be sure that the babel package is not used.
12951  To do this, click on 
12952 \begin_inset Info
12953 type  "menu"
12954 arg   "dialog-show document"
12955 \end_inset
12956
12957  
12958 \family sans
12959 \SpecialChar menuseparator
12960 Language
12961 \family default
12962 , and select 
12963 \begin_inset Quotes eld
12964 \end_inset
12965
12966 None
12967 \begin_inset Quotes erd
12968 \end_inset
12969
12970  as 
12971 \family sans
12972 Language Package
12973 \family default
12974 .
12975 \end_layout
12976
12977 \begin_layout Enumerate
12978 The 
12979 \begin_inset Quotes eld
12980 \end_inset
12981
12982 Keywords
12983 \begin_inset Quotes erd
12984 \end_inset
12985
12986  style must be used to define keywords.
12987 \end_layout
12988
12989 \begin_layout Enumerate
12990 The ijmpc package provides a style named 
12991 \begin_inset Quotes eld
12992 \end_inset
12993
12994 Classification Codes
12995 \begin_inset Quotes erd
12996 \end_inset
12997
12998 , which can be used to define classification codes, such as PACS numbers.
12999  Note that this facility is not supported by the ijmpd package.
13000 \end_layout
13001
13002 \begin_layout Enumerate
13003 Several new environments are available: 
13004 \begin_inset Quotes eld
13005 \end_inset
13006
13007 Definition
13008 \begin_inset Quotes erd
13009 \end_inset
13010
13011
13012 \begin_inset Quotes eld
13013 \end_inset
13014
13015 Step
13016 \begin_inset Quotes erd
13017 \end_inset
13018
13019
13020 \begin_inset Quotes eld
13021 \end_inset
13022
13023 Example
13024 \begin_inset Quotes erd
13025 \end_inset
13026
13027
13028 \begin_inset Quotes eld
13029 \end_inset
13030
13031 Remark
13032 \begin_inset Quotes erd
13033 \end_inset
13034
13035
13036 \begin_inset Quotes eld
13037 \end_inset
13038
13039 Notation
13040 \begin_inset Quotes erd
13041 \end_inset
13042
13043
13044 \begin_inset Quotes eld
13045 \end_inset
13046
13047 Theorem
13048 \begin_inset Quotes erd
13049 \end_inset
13050
13051
13052 \begin_inset Quotes eld
13053 \end_inset
13054
13055 Proof
13056 \begin_inset Quotes erd
13057 \end_inset
13058
13059
13060 \begin_inset Quotes eld
13061 \end_inset
13062
13063 Corollary
13064 \begin_inset Quotes erd
13065 \end_inset
13066
13067
13068 \begin_inset Quotes eld
13069 \end_inset
13070
13071 Lemma
13072 \begin_inset Quotes erd
13073 \end_inset
13074
13075
13076 \begin_inset Quotes eld
13077 \end_inset
13078
13079 Proposition
13080 \begin_inset Quotes erd
13081 \end_inset
13082
13083
13084 \begin_inset Quotes eld
13085 \end_inset
13086
13087 Prop
13088 \begin_inset Quotes erd
13089 \end_inset
13090
13091
13092 \begin_inset Quotes eld
13093 \end_inset
13094
13095 Question
13096 \begin_inset Quotes erd
13097 \end_inset
13098
13099
13100 \begin_inset Quotes eld
13101 \end_inset
13102
13103 Claim
13104 \begin_inset Quotes erd
13105 \end_inset
13106
13107 , and 
13108 \begin_inset Quotes eld
13109 \end_inset
13110
13111 Conjecture
13112 \begin_inset Quotes erd
13113 \end_inset
13114
13115 .
13116  Their use is more or less obvious.
13117  \SpecialChar LyX
13118  supports all these environments; it will use the proper label, text style,
13119  and numbering scheme for each of them.
13120 \end_layout
13121
13122 \begin_layout Enumerate
13123 Both packages use basic citations; the natbib package should not be used.
13124  In \SpecialChar LyX
13125 , citation references are shown as usual; in the output, citations are
13126  shown as superscripts.
13127  If you want to use a citation as normal text, you should use the 
13128 \family typewriter
13129 refcite
13130 \family default
13131  command, e.
13132 \begin_inset space \thinspace{}
13133 \end_inset
13134
13135 g.
13136 \begin_inset space \space{}
13137 \end_inset
13138
13139
13140 \begin_inset Quotes eld
13141 \end_inset
13142
13143 See Ref.
13144 \begin_inset space \space{}
13145 \end_inset
13146
13147
13148 \family typewriter
13149
13150 \backslash
13151 refcite{key}
13152 \family default
13153
13154 \begin_inset Quotes erd
13155 \end_inset
13156
13157 .
13158 \end_layout
13159
13160 \begin_layout Enumerate
13161 There is no 
13162 \begin_inset Quotes eld
13163 \end_inset
13164
13165 Acknowledgments
13166 \begin_inset Quotes erd
13167 \end_inset
13168
13169  section in both packages.
13170  To put acknowledgments, just use the 
13171 \begin_inset Quotes eld
13172 \end_inset
13173
13174 Section*
13175 \begin_inset Quotes erd
13176 \end_inset
13177
13178  environment.
13179 \end_layout
13180
13181 \begin_layout Enumerate
13182 Appendices may be added to the paper, 
13183 \emph on
13184 after
13185 \emph default
13186  the Acknowledgments and 
13187 \shape italic
13188 before
13189 \shape default
13190  the References.
13191  \SpecialChar LyX
13192  provides a special environment, called 
13193 \begin_inset Quotes eld
13194 \end_inset
13195
13196 Appendices Section
13197 \begin_inset Quotes erd
13198 \end_inset
13199
13200  which marks the beginning of the appendices.
13201  This environment should be left blank; it just sends a \SpecialChar LaTeX
13202  command, but nothing
13203  is really printed.
13204  In \SpecialChar LyX
13205 , the word 
13206 \begin_inset Quotes eld
13207 \end_inset
13208
13209 Appendix
13210 \begin_inset Quotes erd
13211 \end_inset
13212
13213  is printed with blue letters, as a signal that all sections after that
13214  point are appendices.
13215  To write an appendix, use the 
13216 \begin_inset Quotes eld
13217 \end_inset
13218
13219 Appendix
13220 \begin_inset Quotes erd
13221 \end_inset
13222
13223  environment.
13224  \SpecialChar LyX
13225  will number each appendix with capital letters, as required by both journals.
13226  Note that 
13227 \begin_inset Quotes eld
13228 \end_inset
13229
13230 Appendices Section
13231 \begin_inset Quotes erd
13232 \end_inset
13233
13234  
13235 \emph on
13236 must
13237 \emph default
13238  be present before the first appendix; if not, all appendices will be numbered
13239  as normal sections in the output.
13240 \end_layout
13241
13242 \begin_layout Enumerate
13243 The ijmpc and the ijmpd packages use the 
13244 \family typewriter
13245 tbl
13246 \family default
13247  command to implement table captions.
13248  As a result, a table created by \SpecialChar LyX
13249  is printed correctly, but its caption
13250  is ignored.
13251  However, you can use some \SpecialChar TeX
13252  code to overcome this problem, so that captions
13253  are printed as expected.
13254  To do so, create a float table as usual, remove the caption, and replace
13255  it with the \SpecialChar TeX
13256  code 
13257 \family typewriter
13258
13259 \backslash
13260 tbl{
13261 \emph on
13262 your table caption
13263 \emph default
13264 }{
13265 \family default
13266  (sic); you must also the \SpecialChar TeX
13267  code 
13268 \family typewriter
13269 }
13270 \family default
13271  immediately after the tabular material.
13272  Study the example table included in the template files to see how this
13273  trick is implemented.
13274  Alternatively, If you need table captions, you should implement the whole
13275  table float in a 
13276 \family typewriter
13277 .tex
13278 \family default
13279  file, then include this file to the \SpecialChar LyX
13280  document (
13281 \family sans
13282 Insert\SpecialChar menuseparator
13283 File\SpecialChar menuseparator
13284 Child
13285 \begin_inset space ~
13286 \end_inset
13287
13288 Document
13289 \family default
13290 ).
13291  Details on how to create a table float can be found in the files 
13292 \family typewriter
13293 ws-ijmpc.tex
13294 \family default
13295  and 
13296 \family typewriter
13297 ws-ijmpd.tex
13298 \family default
13299 , included in the corresponding packages.
13300 \end_layout
13301
13302 \begin_layout Subsection
13303 Preparing a paper for submission
13304 \end_layout
13305
13306 \begin_layout Standard
13307 Before you submit your paper you must export the \SpecialChar LyX
13308  document as a \SpecialChar LaTeX
13309  file (
13310 \family sans
13311 File\SpecialChar menuseparator
13312 Export\SpecialChar menuseparator
13313 \SpecialChar LaTeX
13314
13315 \family default
13316 )
13317 \begin_inset Foot
13318 status open
13319
13320 \begin_layout Plain Layout
13321 Actually you have the choice between \SpecialChar LaTeX
13322  (plain) and pdflatex.
13323  If you intend to use pdflatex to prepare the paper, you should use the
13324  pdflatex option so that included graphics are converted to PDF format,
13325  ready for use by pdflatex.
13326 \end_layout
13327
13328 \end_inset
13329
13330 , then make the following changes to the resulting 
13331 \family typewriter
13332 .tex
13333 \family default
13334  file.
13335 \end_layout
13336
13337 \begin_layout Enumerate
13338 Remove the comment lines before the 
13339 \family typewriter
13340
13341 \backslash
13342 documentclass
13343 \family default
13344  command.
13345 \end_layout
13346
13347 \begin_layout Enumerate
13348 Remove everything between (and including) the 
13349 \family typewriter
13350
13351 \backslash
13352 makeatletter
13353 \family default
13354  and 
13355 \family typewriter
13356
13357 \backslash
13358 makeatother
13359 \family default
13360  commands, except for any commands you specifically put into the \SpecialChar LaTeX
13361  preamble.
13362 \end_layout
13363
13364 \begin_layout Standard
13365 The modified 
13366 \family typewriter
13367 .tex
13368 \family default
13369  file should be saved and processed through \SpecialChar LaTeX
13370  as many times as necessary.
13371  You may also want to check the resulting 
13372 \family typewriter
13373 .dvi
13374 \family default
13375  document.
13376 \end_layout
13377
13378 \begin_layout Section
13379 iopart
13380 \end_layout
13381
13382 \begin_layout Standard
13383 by 
13384 \noun on
13385 Uwe Stöhr
13386 \end_layout
13387
13388 \begin_layout Subsection
13389 Overview
13390 \end_layout
13391
13392 \begin_layout Standard
13393 The iopart package provides a document class to create electronic manuscript
13394  submission to the journals published by the Institute of Physics.
13395  Instructions for the authors how to create a paper using the iopart class
13396  can be downloaded together with the iopart package from the site 
13397 \begin_inset Flex URL
13398 status collapsed
13399
13400 \begin_layout Plain Layout
13401
13402 ftp://ftp.iop.org/pub/journals/latex2e
13403 \end_layout
13404
13405 \end_inset
13406
13407 .
13408 \end_layout
13409
13410 \begin_layout Subsection
13411 Writing a paper
13412 \end_layout
13413
13414 \begin_layout Standard
13415 The easiest way to write a paper is to start with the template 
13416 \emph on
13417 IOP-article.lyx
13418 \emph default
13419  that is available via 
13420 \family sans
13421 File\SpecialChar menuseparator
13422 New From Template
13423 \family default
13424  The template explains how to use the special text environments.
13425  Here are the most important advices:
13426 \end_layout
13427
13428 \begin_layout Itemize
13429 To be able to compile your document to a PDF, PS, or DVI, ensure that the
13430  no AMS packages are loaded in 
13431 \family sans
13432 Document\SpecialChar menuseparator
13433 Settings\SpecialChar menuseparator
13434 Math Options
13435 \family default
13436 !
13437 \end_layout
13438
13439 \begin_layout Itemize
13440
13441 \size normal
13442 The title environment defines the kind of your paper.
13443  So use one of the following environments for the title:
13444 \end_layout
13445
13446 \begin_deeper
13447 \begin_layout Itemize
13448
13449 \family sans
13450 \size normal
13451 Title
13452 \family default
13453  for a Paper
13454 \end_layout
13455
13456 \begin_layout Itemize
13457
13458 \family sans
13459 \size normal
13460 Review
13461 \family default
13462  for a Review
13463 \end_layout
13464
13465 \begin_layout Itemize
13466
13467 \family sans
13468 \size normal
13469 Topical
13470 \family default
13471  for a Topical review
13472 \end_layout
13473
13474 \begin_layout Itemize
13475
13476 \family sans
13477 \size normal
13478 Comment
13479 \family default
13480  for a Comment
13481 \end_layout
13482
13483 \begin_layout Itemize
13484
13485 \family sans
13486 \size normal
13487 Note
13488 \family default
13489  for a Note
13490 \end_layout
13491
13492 \begin_layout Itemize
13493
13494 \family sans
13495 \size normal
13496 Paper
13497 \family default
13498  for a Paper (same as Title)
13499 \end_layout
13500
13501 \begin_layout Itemize
13502
13503 \family sans
13504 \size normal
13505 Prelim
13506 \family default
13507  for a Preliminary communication
13508 \end_layout
13509
13510 \begin_layout Itemize
13511
13512 \family sans
13513 \size normal
13514 Rapid
13515 \family default
13516  for a Rapid communication
13517 \end_layout
13518
13519 \begin_layout Itemize
13520
13521 \family sans
13522 \size normal
13523 Letter
13524 \family default
13525  for a Letter to the editor
13526 \end_layout
13527
13528 \end_deeper
13529 \begin_layout Itemize
13530
13531 \size normal
13532 All title environments except of 
13533 \family sans
13534 Letter
13535 \family default
13536  can have an optional short title.
13537 \end_layout
13538
13539 \begin_layout Itemize
13540 There is a general title environment 
13541 \family sans
13542 Article
13543 \family default
13544  which is not directly supported by \SpecialChar LyX
13545 .
13546  This can be used as \SpecialChar TeX
13547  code when your document doesn't fit into one of the
13548  other title types.
13549 \end_layout
13550
13551 \begin_layout Standard
13552 For more informations like hints for special table and formula formatting,
13553  look at the IOP author guidelines.
13554 \end_layout
13555
13556 \begin_layout Section
13557 Kluwer
13558 \end_layout
13559
13560 \begin_layout Standard
13561 by 
13562 \noun on
13563 Panayotis Papasotiriou
13564 \end_layout
13565
13566 \begin_layout Subsection
13567 Overview
13568 \end_layout
13569
13570 \begin_layout Standard
13571 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
13572  that facilitates electronic manuscript submission to the journals they
13573  publish.
13574  Most known of them (at least in my domain of interest) are 
13575 \emph on
13576 Astrophysics and Space Science
13577 \emph default
13578  and 
13579 \emph on
13580 Solar Physics
13581 \emph default
13582 , but there are many others (see a complete list at 
13583 \begin_inset Flex URL
13584 status collapsed
13585
13586 \begin_layout Plain Layout
13587
13588 http://www.wkap.nl/jrnllist.htm/JRNLHOME
13589 \end_layout
13590
13591 \end_inset
13592
13593 ).
13594  The Kluwer package may be downloaded from the site 
13595 \begin_inset Flex URL
13596 status collapsed
13597
13598 \begin_layout Plain Layout
13599
13600 http://www.wkap.nl/kaphtml.htm/STYLEFILES
13601 \end_layout
13602
13603 \end_inset
13604
13605 .
13606  A complete user guide is contained in that package (but it can also be
13607  downloaded separately).
13608 \end_layout
13609
13610 \begin_layout Standard
13611 \SpecialChar LyX
13612  supports many features of the package but not everything.
13613  However, the \SpecialChar TeX
13614  code needed is reduced to some 
13615 \begin_inset Quotes eld
13616 \end_inset
13617
13618 peculiar
13619 \begin_inset Quotes erd
13620 \end_inset
13621
13622  commands of the package (see
13623 \begin_inset space ~
13624 \end_inset
13625
13626
13627 \begin_inset CommandInset ref
13628 LatexCommand ref
13629 reference "subsec:kluwer_peculiarities"
13630
13631 \end_inset
13632
13633 ).
13634  I have recently used \SpecialChar LyX
13635  to write an article submitted to the 
13636 \emph on
13637 Astrophysics and Space Science
13638 \emph default
13639  without any problem.
13640 \end_layout
13641
13642 \begin_layout Subsection
13643 Writing a paper
13644 \end_layout
13645
13646 \begin_layout Standard
13647 The easiest way to write a paper is to start with the Kluwer template file.
13648  Click on 
13649 \family sans
13650 File\SpecialChar menuseparator
13651 New from
13652 \family default
13653  
13654 \family sans
13655 Template
13656 \family default
13657 , then choose the 
13658 \family typewriter
13659 kluwer.lyx
13660 \family default
13661  template.
13662  This will give an (almost) empty document that includes the most common
13663  fields found in a manuscript and a short description of their use.
13664  As in most templates, simply overwrite the existing text (including the
13665  brackets, 
13666 \family typewriter
13667 <>
13668 \family default
13669 ) with the correct information.
13670 \end_layout
13671
13672 \begin_layout Subsection
13673 Preparing a paper for submission
13674 \end_layout
13675
13676 \begin_layout Standard
13677 As in the AAS\SpecialChar TeX
13678  package, before you submit your paper to a journal you must
13679  
13680 \begin_inset Quotes eld
13681 \end_inset
13682
13683 postprocess
13684 \begin_inset Quotes erd
13685 \end_inset
13686
13687  it as follows.
13688 \end_layout
13689
13690 \begin_layout Enumerate
13691 Export your paper as a \SpecialChar LaTeX
13692  file.
13693  To do this, click on 
13694 \family sans
13695 File\SpecialChar menuseparator
13696 Export\SpecialChar menuseparator
13697 \SpecialChar LaTeX
13698
13699 \family default
13700 .
13701  
13702 \end_layout
13703
13704 \begin_layout Enumerate
13705 Edit the resulting 
13706 \family typewriter
13707 .tex
13708 \family default
13709  file with a text editor and make the following changes
13710 \end_layout
13711
13712 \begin_deeper
13713 \begin_layout Enumerate
13714 remove the comment lines before the 
13715 \family typewriter
13716
13717 \backslash
13718 documentclass
13719 \family default
13720  command,
13721 \end_layout
13722
13723 \begin_layout Enumerate
13724 remove everything between (and including) the 
13725 \family typewriter
13726
13727 \backslash
13728 makeatletter
13729 \family default
13730  and 
13731 \family typewriter
13732
13733 \backslash
13734 makeatother
13735 \family default
13736  commands, except for any commands you specifically put into the \SpecialChar LaTeX
13737  preamble.
13738 \end_layout
13739
13740 \begin_layout Standard
13741 Save the resulting 
13742 \family typewriter
13743 .tex
13744 \family default
13745  file.
13746 \end_layout
13747
13748 \end_deeper
13749 \begin_layout Enumerate
13750 Run the 
13751 \family typewriter
13752 .tex
13753 \family default
13754  file through \SpecialChar LaTeX
13755  as many times as necessary (usually up to three).
13756 \end_layout
13757
13758 \begin_layout Enumerate
13759 View the resulting 
13760 \family typewriter
13761 .dvi
13762 \family default
13763  document using, e.
13764 \begin_inset space \thinspace{}
13765 \end_inset
13766
13767 g.
13768 \begin_inset space \space{}
13769 \end_inset
13770
13771
13772 \family sans
13773 xdvi
13774 \family default
13775 , and check if everything is OK (it should, if you didn't make any mistake).
13776 \end_layout
13777
13778 \begin_layout Subsection
13779 \begin_inset Quotes eld
13780 \end_inset
13781
13782 Peculiarities
13783 \begin_inset Quotes erd
13784 \end_inset
13785
13786  of the Kluwer package
13787 \begin_inset CommandInset label
13788 LatexCommand label
13789 name "subsec:kluwer_peculiarities"
13790
13791 \end_inset
13792
13793
13794 \end_layout
13795
13796 \begin_layout Standard
13797 The Kluwer package has the following 
13798 \begin_inset Quotes eld
13799 \end_inset
13800
13801 peculiarities
13802 \begin_inset Quotes erd
13803 \end_inset
13804
13805 .
13806 \end_layout
13807
13808 \begin_layout Enumerate
13809 It is possible to write multiple articles in the same \SpecialChar LaTeX
13810  file
13811 \begin_inset Foot
13812 status collapsed
13813
13814 \begin_layout Plain Layout
13815 I can't imagine any good reason to do this.
13816 \end_layout
13817
13818 \end_inset
13819
13820 .
13821  Each article must be included in the environment 
13822 \begin_inset Quotes eld
13823 \end_inset
13824
13825 article
13826 \begin_inset Quotes erd
13827 \end_inset
13828
13829 .
13830  Unfortunately, this environment cannot be omitted, even if you write just
13831  one article.
13832  Therefore, each article starts with the command 
13833 \family typewriter
13834
13835 \backslash
13836 begin{article}
13837 \family default
13838  and, obviously, ends with the command 
13839 \family typewriter
13840
13841 \backslash
13842 end{article}
13843 \family default
13844 .
13845  Although this can be implemented in \SpecialChar LyX
13846 , I didn't included it, since it looks
13847  ugly and can confuse the novice user.
13848  Therefore, you need to enter them directly and mark them as \SpecialChar LaTeX
13849  code (the
13850  well-known 
13851 \begin_inset Quotes eld
13852 \end_inset
13853
13854 \SpecialChar TeX
13855  code
13856 \begin_inset Quotes erd
13857 \end_inset
13858
13859 ).
13860 \end_layout
13861
13862 \begin_layout Enumerate
13863 Information given at the beginning of the article (i.
13864 \begin_inset space \thinspace{}
13865 \end_inset
13866
13867 e.
13868 \begin_inset space \space{}
13869 \end_inset
13870
13871 title, subtitle, author, institution, running title, running author, abstract
13872  and keywords) must be included in an environment called 
13873 \begin_inset Quotes eld
13874 \end_inset
13875
13876 opening
13877 \begin_inset Quotes erd
13878 \end_inset
13879
13880 .
13881  This is not implemented in \SpecialChar LyX
13882 , so you must enter title, subtitle etc.
13883 \begin_inset space ~
13884 \end_inset
13885
13886 between two \SpecialChar TeX
13887  code lines (
13888 \family typewriter
13889
13890 \backslash
13891 begin{opening}
13892 \family default
13893  and 
13894 \family typewriter
13895
13896 \backslash
13897 end{opening}
13898 \family default
13899 ).
13900 \end_layout
13901
13902 \begin_layout Enumerate
13903 According to the user manual, the label of each bibliography item must be
13904  written as 
13905 \family typewriter
13906
13907 \backslash
13908 protect
13909 \backslash
13910 citeauthoryear{
13911 \family default
13912 \emph on
13913 author(s)
13914 \family typewriter
13915 \emph default
13916 }{
13917 \family default
13918 \emph on
13919 year
13920 \family typewriter
13921 \emph default
13922 }
13923 \family default
13924 .
13925 \end_layout
13926
13927 \begin_layout Standard
13928 The 
13929 \family typewriter
13930 kluwer.lyx
13931 \family default
13932  template takes care of all these 
13933 \begin_inset Quotes eld
13934 \end_inset
13935
13936 peculiarities
13937 \begin_inset Quotes erd
13938 \end_inset
13939
13940 .
13941  If you start a new paper using this template you don't need to do anything
13942  special.
13943  Just 
13944 \end_layout
13945
13946 \begin_layout Enumerate
13947 don't delete the \SpecialChar TeX
13948  code included in the template, and
13949 \end_layout
13950
13951 \begin_layout Enumerate
13952 copy the example bibliography item included in the template and modify it
13953  as necessary to enter new bibliography items.
13954 \end_layout
13955
13956 \begin_layout Section
13957 Koma-Script
13958 \end_layout
13959
13960 \begin_layout Standard
13961 by 
13962 \noun on
13963 Bernd Rellermeyer
13964 \end_layout
13965
13966 \begin_layout Subsection
13967 Overview
13968 \end_layout
13969
13970 \begin_layout Standard
13971 The \SpecialChar LyX
13972  document classes 
13973 \emph on
13974 article (koma-script)
13975 \emph default
13976
13977 \emph on
13978 report (koma-script)
13979 \emph default
13980
13981 \emph on
13982 book
13983 \emph default
13984  
13985 \emph on
13986 (koma-script)
13987 \emph default
13988 , and 
13989 \emph on
13990 letter
13991 \emph default
13992  
13993 \emph on
13994 (koma-script)
13995 \emph default
13996  correspond to the \SpecialChar LaTeX
13997  document classes 
13998 \family typewriter
13999 scrartcl.cls
14000 \family default
14001
14002 \family typewriter
14003 scrreprt.cls
14004 \family default
14005
14006 \family typewriter
14007 scrbook.cls
14008 \family default
14009 , and 
14010 \family typewriter
14011 scrlettr.cls
14012 \family default
14013 , resp.
14014 \begin_inset space ~
14015 \end_inset
14016
14017 of the Koma-Script family.
14018  They are replacements for the standard document classes 
14019 \family typewriter
14020 article.cls
14021 \family default
14022
14023 \family typewriter
14024 report.cls
14025 \family default
14026
14027 \family typewriter
14028 book.cls
14029 \family default
14030  and 
14031 \family typewriter
14032 letter.cls
14033 \family default
14034 , resp., and fit better to European typography conventions in a number of
14035  points.
14036 \end_layout
14037
14038 \begin_layout Itemize
14039 Standard character size is 11pt in 
14040 \emph on
14041 article (koma-script)
14042 \emph default
14043
14044 \emph on
14045 report (koma-script)
14046 \emph default
14047 , and 
14048 \emph on
14049 book (koma-script)
14050 \emph default
14051 , and 12pt in 
14052 \emph on
14053 letter (koma-script)
14054 \emph default
14055 .
14056 \end_layout
14057
14058 \begin_layout Itemize
14059 Headings, labels of the description environment, and a number of elements
14060  of the 
14061 \emph on
14062 letter (koma-script)
14063 \emph default
14064  document class are set in a bold sans serif font.
14065 \begin_inset Foot
14066 status collapsed
14067
14068 \begin_layout Plain Layout
14069 There is a big difference between the bold sans serif old cm fonts and new
14070  ec fonts, especially in the appearance of headings.
14071  In comparison, the ec bold sans serif fonts look a bit thin.
14072  Here the \SpecialChar LaTeX
14073  package 
14074 \family typewriter
14075 cmsd.sty by
14076 \family default
14077  
14078 \shape smallcaps
14079 Walter Schmidt
14080 \shape default
14081  helps to produce the 
14082 \begin_inset Quotes eld
14083 \end_inset
14084
14085 usual
14086 \begin_inset Quotes erd
14087 \end_inset
14088
14089  appearance when using the ec fonts.
14090 \end_layout
14091
14092 \end_inset
14093
14094  The numbering of chapter headings is made in the same way as the numbering
14095  of section headings, that is without the extra line 
14096 \begin_inset Quotes eld
14097 \end_inset
14098
14099 Chapter\SpecialChar ldots
14100
14101 \begin_inset Quotes erd
14102 \end_inset
14103
14104 .
14105  In addition, the appearance of the headings can be modified by using a
14106  number of options (in \SpecialChar LyX
14107  to be entered in the field 
14108 \family sans
14109 Extra
14110 \begin_inset space ~
14111 \end_inset
14112
14113 Options
14114 \family default
14115  of the dialog 
14116 \family sans
14117 Layout\SpecialChar menuseparator
14118 Document
14119 \family default
14120 ).
14121  
14122 \end_layout
14123
14124 \begin_layout Itemize
14125 The main means in the Koma-Script document classes to design the type area
14126  are the options 
14127 \family sans
14128 BCOR
14129 \family default
14130  and 
14131 \family sans
14132 DIV
14133 \family default
14134  (in \SpecialChar LyX
14135  to be entered in the extra class options field in the dialog 
14136 \family sans
14137 Document\SpecialChar menuseparator
14138 Settings
14139 \family default
14140 ).
14141  They make a clearer modification of page margins possible as do the options
14142  of the dialog 
14143 \family sans
14144 Document\SpecialChar menuseparator
14145 Settings
14146 \family default
14147 .
14148  
14149 \end_layout
14150
14151 \begin_layout Itemize
14152 The \SpecialChar LaTeX
14153  document classes of the Koma-Script family define a number of additional
14154  commands.
14155  Those part of it which makes sense in \SpecialChar LyX
14156  is implemented in corresponding
14157  paragraph types.
14158 \end_layout
14159
14160 \begin_layout Standard
14161 Detailed descriptions of the \SpecialChar LaTeX
14162  document classes of the Koma-Script family
14163  can be found in the Koma-Script documentation 
14164 \emph on
14165 scrguide
14166 \emph default
14167  (German) and 
14168 \emph on
14169 scrguien
14170 \emph default
14171  (English).
14172 \end_layout
14173
14174 \begin_layout Subsection
14175 article (koma-script), report (koma-script), and book (koma-script)
14176 \end_layout
14177
14178 \begin_layout Standard
14179 The document classes 
14180 \emph on
14181 article (koma-script)
14182 \emph default
14183
14184 \emph on
14185 report (koma-script)
14186 \emph default
14187 , and 
14188 \emph on
14189 book
14190 \emph default
14191  
14192 \emph on
14193 (koma-script)
14194 \emph default
14195  are implemented in the layout files 
14196 \family typewriter
14197 scrartcl.layout
14198 \family default
14199
14200 \family typewriter
14201 scrreprt.layout
14202 \family default
14203 , and 
14204 \family typewriter
14205 scrbook.layout
14206 \family default
14207 , resp.
14208  They contain all the paragraph types of the corresponding standard document
14209  classes 
14210 \emph on
14211 article
14212 \emph default
14213
14214 \emph on
14215 report
14216 \emph default
14217 , and 
14218 \emph on
14219 book
14220 \emph default
14221 , resp., partly modified, with the exception of the \SpecialChar LyX
14222  specific 
14223 \family sans
14224 List
14225 \family default
14226 -type, which is replaced by the new 
14227 \family sans
14228 Labeling
14229 \family default
14230 -type having the same functionality.
14231  Beside the 
14232 \family sans
14233 Labeling
14234 \family default
14235 -Type there is a number of new paragraph types added.
14236  They are 
14237 \emph on
14238 not
14239 \emph default
14240  part of 
14241 \emph on
14242 letter (koma-script)
14243 \emph default
14244 .
14245 \end_layout
14246
14247 \begin_layout Itemize
14248
14249 \family sans
14250 Addpart, Addchap
14251 \family default
14252
14253 \family sans
14254 Addsec
14255 \family default
14256 : are equivalents to 
14257 \family sans
14258 Part*, Chapter*
14259 \family default
14260  and 
14261 \family sans
14262 Section*
14263 \family default
14264 , resp., additionally inserting an entry in the table of contents.
14265  
14266 \family sans
14267 Addpart
14268 \family default
14269  and 
14270 \family sans
14271 Addchap
14272 \family default
14273  are not contained in 
14274 \emph on
14275 article (koma-script)
14276 \emph default
14277 .
14278 \end_layout
14279
14280 \begin_layout Itemize
14281
14282 \family sans
14283 Addchap*
14284 \family default
14285
14286 \family sans
14287 Addsec*
14288 \family default
14289 : behave exactly as 
14290 \family sans
14291 Addchap
14292 \family default
14293  and 
14294 \family sans
14295 Addsec
14296 \family default
14297 , resp., additionally clearing running heads.
14298  
14299 \family sans
14300 Addchap*
14301 \family default
14302  is not contained in 
14303 \emph on
14304 article (koma-script)
14305 \emph default
14306 .
14307 \begin_inset Foot
14308 status collapsed
14309
14310 \begin_layout Plain Layout
14311 There is also an 
14312 \family typewriter
14313
14314 \backslash
14315 addpart*
14316 \family default
14317  command in 
14318 \emph on
14319 book (koma-script)
14320 \emph default
14321  and in 
14322 \emph on
14323 report (koma-script)
14324 \emph default
14325 , but since this is identical to 
14326 \family sans
14327 Part*
14328 \family default
14329 , is has not been implemented in \SpecialChar LyX
14330 .
14331 \end_layout
14332
14333 \end_inset
14334
14335
14336 \end_layout
14337
14338 \begin_layout Itemize
14339
14340 \family sans
14341 Minisec
14342 \family default
14343 : generates a heading directly above the following paragraph in the standard
14344  character size without affecting the structure of the document.
14345 \end_layout
14346
14347 \begin_layout Itemize
14348
14349 \family sans
14350 Captionabove
14351 \family default
14352  and 
14353 \family sans
14354 Captionbelow
14355 \family default
14356  are special captions which respect the different space settings needed
14357  for captions placed above or below an element (if you follow strict typographic
14358  rules, you might want to place table captions always above the table).
14359  You can also use the class option 
14360 \family typewriter
14361 tablecaptionsabove
14362 \family default
14363 , which will switch 
14364 \family sans
14365 caption
14366 \family default
14367  to 
14368 \family sans
14369 captionabove
14370 \family default
14371  for tables and 
14372 \family sans
14373 captionbelow
14374 \family default
14375  for figures.
14376  You need at least Koma-Script version 2.8q to use this.
14377 \end_layout
14378
14379 \begin_layout Itemize
14380
14381 \family sans
14382 Dictum
14383 \family default
14384 : can be used to set a bonmot, e.
14385 \begin_inset space \thinspace{}
14386 \end_inset
14387
14388 g.
14389 \begin_inset space \space{}
14390 \end_inset
14391
14392 at the beginning of a chapter.
14393  If you use the optional argument (
14394 \family sans
14395 Insert\SpecialChar menuseparator
14396 Dictum
14397 \begin_inset space ~
14398 \end_inset
14399
14400 Author
14401 \family default
14402 ), you can insert the dictum's author there.
14403  Dictum and author are separated by a line.
14404  You need at least Koma-Script version 2.8q to use this.
14405  
14406 \family sans
14407 Dictum
14408 \family default
14409  is not contained in 
14410 \emph on
14411 article (koma-script)
14412 \emph default
14413 .
14414 \end_layout
14415
14416 \begin_layout Standard
14417 The following types, together with the standard types 
14418 \family sans
14419 Title
14420 \family default
14421
14422 \family sans
14423 Author
14424 \family default
14425 , and 
14426 \family sans
14427 Date
14428 \family default
14429 , form the title area of the document.
14430  They must be entered ahead of the first 
14431 \begin_inset Quotes eld
14432 \end_inset
14433
14434 ordinary
14435 \begin_inset Quotes erd
14436 \end_inset
14437
14438  paragraph.
14439 \begin_inset Foot
14440 status collapsed
14441
14442 \begin_layout Plain Layout
14443 The corresponding \SpecialChar LaTeX
14444  commands must appear before the 
14445 \family typewriter
14446
14447 \backslash
14448 maketitle
14449 \family default
14450  command.
14451 \end_layout
14452
14453 \end_inset
14454
14455  When such a type is used more than once, the latter usage overwrites the
14456  former one, that means, for every type only the latest usage is valid.
14457  The order of the different types however has, like 
14458 \family sans
14459 Title
14460 \family default
14461
14462 \family sans
14463 Author
14464 \family default
14465 , and 
14466 \family sans
14467 Date
14468 \family default
14469 , no effect on the appearance of the produced document.
14470 \end_layout
14471
14472 \begin_layout Itemize
14473
14474 \family sans
14475 Subject
14476 \family default
14477 : produces a centered paragraph above the ordinary title (
14478 \family sans
14479 Title
14480 \family default
14481
14482 \family sans
14483 Author
14484 \family default
14485
14486 \family sans
14487 Date
14488 \family default
14489 ) for the subject of the document.
14490 \end_layout
14491
14492 \begin_layout Itemize
14493
14494 \family sans
14495 Publishers
14496 \family default
14497 : produces a centered paragraph below the ordinary title (
14498 \family sans
14499 Title
14500 \family default
14501
14502 \family sans
14503 Author
14504 \family default
14505
14506 \family sans
14507 Date
14508 \family default
14509 ) for the publishers' name.
14510 \end_layout
14511
14512 \begin_layout Itemize
14513
14514 \family sans
14515 Dedication
14516 \family default
14517 : in 
14518 \emph on
14519 report (koma-script)
14520 \emph default
14521  and 
14522 \emph on
14523 book (koma-script)
14524 \emph default
14525  produces a centered paragraph on its own page behind the title page, or
14526  in 
14527 \emph on
14528 article (koma-script)
14529 \emph default
14530  produces a centered paragraph below the ordinary title (
14531 \family sans
14532 Title
14533 \family default
14534
14535 \family sans
14536 Author
14537 \family default
14538
14539 \family sans
14540 Date
14541 \family default
14542
14543 \family sans
14544 Publishers
14545 \family default
14546 ) for a dedication.
14547 \end_layout
14548
14549 \begin_layout Itemize
14550
14551 \family sans
14552 Titlehead
14553 \family default
14554 : produces a left aligned paragraph above the ordinary title (
14555 \family sans
14556 Title
14557 \family default
14558
14559 \family sans
14560 Author
14561 \family default
14562
14563 \family sans
14564 Date
14565 \family default
14566
14567 \family sans
14568 Subject
14569 \family default
14570 ) for a document`s head.
14571 \end_layout
14572
14573 \begin_layout Itemize
14574
14575 \family sans
14576 Uppertitleback
14577 \family default
14578 : produces in a double-sided print in 
14579 \emph on
14580 report (koma-script)
14581 \emph default
14582  and 
14583 \emph on
14584 book (koma-script)
14585 \emph default
14586  a left-aligned paragraph at the top of the title page`s back or has no
14587  effect in a single-sided print or in 
14588 \emph on
14589 article (koma-script)
14590 \emph default
14591 .
14592 \end_layout
14593
14594 \begin_layout Itemize
14595
14596 \family sans
14597 Lowertitleback
14598 \family default
14599 : produces in a double-sided print in 
14600 \emph on
14601 report (koma-script)
14602 \emph default
14603  and 
14604 \emph on
14605 book (koma-script)
14606 \emph default
14607  a left-aligned paragraph at the bottom of the title page`s back or has
14608  no effect in a single-sided print or in 
14609 \emph on
14610 article (koma-script)
14611 \emph default
14612 .
14613 \end_layout
14614
14615 \begin_layout Itemize
14616
14617 \family sans
14618 Extratitle
14619 \family default
14620 : produces a special 
14621 \begin_inset Quotes eld
14622 \end_inset
14623
14624 dirty
14625 \begin_inset Quotes erd
14626 \end_inset
14627
14628  page ahead of the actual document containing a paragraph without special
14629  formatting.
14630 \end_layout
14631
14632 \begin_layout Standard
14633 The layout files for the document classes 
14634 \emph on
14635 article (koma-script)
14636 \emph default
14637
14638 \emph on
14639 report (koma-script)
14640 \emph default
14641 , and 
14642 \emph on
14643 book (koma-script)
14644 \emph default
14645  do include the file 
14646 \family typewriter
14647 scrmacros.inc
14648 \family default
14649 .
14650  This is thought of as a place to define your own types.
14651  Copy scrmacros
14652 \family typewriter
14653 .inc
14654 \family default
14655  in your personal layout directory and edit the file!
14656 \end_layout
14657
14658 \begin_layout Subsection
14659 letter (koma-script)
14660 \end_layout
14661
14662 \begin_layout Description
14663 Note: This section discusses the obsolete 
14664 \family sans
14665 KOMA-Script-Letter (v.
14666 \begin_inset space ~
14667 \end_inset
14668
14669 1)
14670 \family default
14671 , which is not even included anymore in recent KOMA releases.
14672  Please refer to the next section for the current KOMA-Script-Letter class
14673  (v.
14674 \begin_inset space ~
14675 \end_inset
14676
14677 2)!
14678 \end_layout
14679
14680 \begin_layout Standard
14681 \noindent
14682 The document class 
14683 \emph on
14684 letter (koma-script)
14685 \emph default
14686  is implemented in the layout file 
14687 \family typewriter
14688 scrlettr.layout
14689 \family default
14690 .
14691  It contains all the paragraph types of the corresponding standard document
14692  class 
14693 \emph on
14694 letter
14695 \emph default
14696 , partly modified, with the exception of the \SpecialChar LyX
14697  specific types 
14698 \family sans
14699 \SpecialChar LyX
14700 -Code
14701 \family default
14702  and 
14703 \family sans
14704 Comment
14705 \family default
14706  and the 
14707 \family sans
14708 List
14709 \family default
14710  type, which is replaced by the new 
14711 \family sans
14712 Labeling
14713 \family default
14714  type.
14715  In addition, it contains, in contrast to the standard document class, the
14716  standard types 
14717 \family sans
14718 \SpecialChar LaTeX
14719
14720 \family default
14721
14722 \family sans
14723 Quotation
14724 \family default
14725
14726 \family sans
14727 Quote
14728 \family default
14729 , and 
14730 \family sans
14731 Verse
14732 \family default
14733 .
14734  Furthermore, there are a number of new letter specific types.
14735 \end_layout
14736
14737 \begin_layout Standard
14738 The appearance of the letter produced by this document class can be controlled
14739  by a number of \SpecialChar LaTeX
14740  commands, which you can put in the \SpecialChar LaTeX
14741  preamble.
14742 \begin_inset Foot
14743 status collapsed
14744
14745 \begin_layout Plain Layout
14746 For example, the standard appearance of the letter`s heading, consisting
14747  of name and address, is quite self-willed.
14748  An 
14749 \begin_inset Quotes eld
14750 \end_inset
14751
14752 ordinary
14753 \begin_inset Quotes erd
14754 \end_inset
14755
14756  heading is produced by the following \SpecialChar LaTeX
14757  commands in the preamble:
14758 \end_layout
14759
14760 \begin_layout LyX-Code
14761
14762 \backslash
14763 firsthead{
14764 \backslash
14765 parbox[b]{
14766 \backslash
14767 textwidth}
14768 \end_layout
14769
14770 \begin_layout LyX-Code
14771   {
14772 \backslash
14773 ignorespaces 
14774 \backslash
14775 fromname
14776 \backslash
14777
14778 \backslash
14779  
14780 \backslash
14781 ignorespaces 
14782 \backslash
14783 fromaddress}} 
14784 \end_layout
14785
14786 \begin_layout LyX-Code
14787
14788 \backslash
14789 nexthead{
14790 \backslash
14791 parbox[b]{
14792 \backslash
14793 textwidth}
14794 \end_layout
14795
14796 \begin_layout LyX-Code
14797   {
14798 \backslash
14799 ignorespaces 
14800 \backslash
14801 fromname 
14802 \backslash
14803 hfill 
14804 \backslash
14805 ignorespaces 
14806 \backslash
14807 pagename
14808 \backslash
14809  
14810 \backslash
14811 thepage}}
14812 \end_layout
14813
14814 \end_inset
14815
14816  A detailed German description of such \SpecialChar LaTeX
14817  commands can be found in the Koma-Script
14818  documentation 
14819 \emph on
14820 scrguide
14821 \emph default
14822 .
14823  With it, the letter's author can produce his personal letter layout.
14824 \end_layout
14825
14826 \begin_layout Standard
14827 The types 
14828 \family sans
14829 Letter
14830 \family default
14831  and 
14832 \family sans
14833 Opening
14834 \family default
14835  define the beginning of the letter and must be used in every letter.
14836  To emphasize them in the \SpecialChar LyX
14837  document class, they are marked with the letter
14838  
14839 \shape italic
14840 L
14841 \shape default
14842  or 
14843 \shape italic
14844 O
14845 \shape default
14846 , resp.
14847 \begin_inset space ~
14848 \end_inset
14849
14850 in the left margin.
14851  It is possible to write any number of letters in one file.
14852  An 
14853 \family sans
14854 Opening
14855 \family default
14856  type produces a new letter using the same addressee and a 
14857 \family sans
14858 Letter
14859 \family default
14860  type produces a new addressee.
14861  The types 
14862 \family sans
14863 Closing
14864 \family default
14865
14866 \family sans
14867 PS
14868 \family default
14869
14870 \family sans
14871 CC
14872 \family default
14873 , and 
14874 \family sans
14875 Encl
14876 \family default
14877  are ordinary paragraph types and can also be used several times in one
14878  and the same letter.
14879 \end_layout
14880
14881 \begin_layout Itemize
14882
14883 \family sans
14884 Letter
14885 \family default
14886 : produces a paragraph for the addressee and implicitly defines the beginning
14887  of the letter.
14888 \end_layout
14889
14890 \begin_layout Itemize
14891
14892 \family sans
14893 Opening
14894 \family default
14895 : produces a paragraph for the form of address and implicitly produces a
14896  new letter.
14897 \end_layout
14898
14899 \begin_layout Itemize
14900
14901 \family sans
14902 Closing
14903 \family default
14904 : produces a paragraph for a close.
14905 \end_layout
14906
14907 \begin_layout Itemize
14908
14909 \family sans
14910 PS
14911 \family default
14912 : produces a paragraph for a postscript.
14913 \end_layout
14914
14915 \begin_layout Itemize
14916
14917 \family sans
14918 CC
14919 \family default
14920 : produces a paragraph for a distribution list.
14921 \end_layout
14922
14923 \begin_layout Itemize
14924
14925 \family sans
14926 Encl
14927 \family default
14928 : produces a paragraph for enclosures.
14929 \end_layout
14930
14931 \begin_layout Standard
14932 The types 
14933 \family sans
14934 Name
14935 \family default
14936
14937 \family sans
14938 Signature
14939 \family default
14940
14941 \family sans
14942 Address
14943 \family default
14944
14945 \family sans
14946 Telephone
14947 \family default
14948
14949 \family sans
14950 Place
14951 \family default
14952
14953 \family sans
14954 Backaddress
14955 \family default
14956
14957 \family sans
14958 Specialmail
14959 \family default
14960
14961 \family sans
14962 Location
14963 \family default
14964
14965 \family sans
14966 Title
14967 \family default
14968 , and 
14969 \family sans
14970 Subject
14971 \family default
14972  are input types provided with a label to enter information, which will
14973  be processed by the document class.
14974 \begin_inset Foot
14975 status collapsed
14976
14977 \begin_layout Plain Layout
14978 It could be seen as a matter of inconsequence, that the types 
14979 \family sans
14980 Letter
14981 \family default
14982  and 
14983 \family sans
14984 Opening
14985 \family default
14986  described above are not such input types as well.
14987  Because of the special meaning of those types, however, I have implemented
14988  them as ordinary paragraph types with a one letter mark in the left margin.
14989  Moreover, it would affect my feeling of symmetry, if the 
14990 \family sans
14991 Opening
14992 \family default
14993  type and the 
14994 \family sans
14995 Closing
14996 \family default
14997  type had such a serious different appearance.
14998 \end_layout
14999
15000 \end_inset
15001
15002  The types must be used ahead of the corresponding 
15003 \family sans
15004 Opening
15005 \family default
15006  type.
15007 \end_layout
15008
15009 \begin_layout Standard
15010 An implementation of these types in a WYSIWYG fashion does not seem to make
15011  sense, because the real appearance of the produced letter does not only
15012  depend on the usage of the particular type, but also on other factors.
15013  For example, a signature entered in the 
15014 \family sans
15015 Signature
15016 \family default
15017  type will in the standard behavior appear in the produced letter only,
15018  when in the same letter also a 
15019 \family sans
15020 Closing
15021 \family default
15022  type is used.
15023  The entered value of the 
15024 \family sans
15025 Telephone
15026 \family default
15027  type will in the standard behavior not appear in the produced letter at
15028  all.
15029  The possibility to design the letter`s heading freely is already indicated
15030  in a footnote above.
15031 \end_layout
15032
15033 \begin_layout Standard
15034 The input types can also be used as empty paragraphs.
15035  This makes sense e.
15036 \begin_inset space \thinspace{}
15037 \end_inset
15038
15039 g.
15040 \begin_inset space \space{}
15041 \end_inset
15042
15043 for the 
15044 \family sans
15045 Signature
15046 \family default
15047  type.
15048  If the 
15049 \family sans
15050 Signature
15051 \family default
15052  type is not used at all, in the standard behavior the value of the 
15053 \family sans
15054 Name
15055 \family default
15056  type is used as signature, whereas if an empty 
15057 \family sans
15058 Signature
15059 \family default
15060  type is used, no signature value is defined.
15061 \end_layout
15062
15063 \begin_layout Standard
15064 By using the input types it is possible to write a letter template, containing
15065  filled input types with your personal dates (name, address, etc.) and empty
15066  input types for other dates you want to enter.
15067 \end_layout
15068
15069 \begin_layout Itemize
15070
15071 \family sans
15072 Name
15073 \family default
15074 : sender's name, in the standard behavior appears as a centered paragraph
15075  in small caps in the letter`s heading.
15076 \end_layout
15077
15078 \begin_layout Itemize
15079
15080 \family sans
15081 Signature
15082 \family default
15083 : sender's signature, in the standard behavior appears below the 
15084 \family sans
15085 Closing
15086 \family default
15087  type.
15088  If no 
15089 \family sans
15090 Signature
15091 \family default
15092  type is used, the value of the 
15093 \family sans
15094 Name
15095 \family default
15096  type appears instead.
15097 \end_layout
15098
15099 \begin_layout Itemize
15100
15101 \family sans
15102 Address
15103 \family default
15104 : sender's address, in the standard behavior appears in a centered paragraph
15105  in the letter`s heading below the sender's name.
15106 \end_layout
15107
15108 \begin_layout Itemize
15109
15110 \family sans
15111 Telephone
15112 \family default
15113 : sender's telephone number, in the standard behavior only sets the \SpecialChar LaTeX
15114  variable
15115  
15116 \family typewriter
15117
15118 \backslash
15119 telephonenum
15120 \family default
15121 .
15122 \end_layout
15123
15124 \begin_layout Itemize
15125
15126 \family sans
15127 Place
15128 \family default
15129 : place of the letter`s making.
15130 \end_layout
15131
15132 \begin_layout Itemize
15133
15134 \family sans
15135 Date
15136 \family default
15137 : date of the letter`s making.
15138  
15139 \family sans
15140 Place
15141 \family default
15142  and 
15143 \family sans
15144 Date
15145 \family default
15146 , in the standard behavior, produce the place and the date in a right-aligned
15147  line below the addressee's field.
15148  If an empty 
15149 \family sans
15150 Date
15151 \family default
15152  type is used, neither place nor date appear, independent of the value of
15153  the 
15154 \family sans
15155 Place
15156 \family default
15157  type.
15158  If no 
15159 \family sans
15160 Date
15161 \family default
15162  type is used, the date of the letter `s production is used.
15163 \end_layout
15164
15165 \begin_layout Itemize
15166
15167 \family sans
15168 Backaddress
15169 \family default
15170 : sender`s back address, in the standard behavior appears above the addressee's
15171  field in a small sans serif font.
15172 \end_layout
15173
15174 \begin_layout Itemize
15175
15176 \family sans
15177 Specialmail
15178 \family default
15179 : special mail information, in the standard behavior appears underlined
15180  above the addressee's field below the back address.
15181 \end_layout
15182
15183 \begin_layout Itemize
15184
15185 \family sans
15186 Location
15187 \family default
15188 : additional information, in the standard behavior appears on right side
15189  below the addressee`s field.
15190 \end_layout
15191
15192 \begin_layout Itemize
15193
15194 \family sans
15195 Title
15196 \family default
15197 : the letter's title, in the standard behavior appears in a big, bold, sans
15198  serif font above the subject.
15199 \end_layout
15200
15201 \begin_layout Itemize
15202
15203 \family sans
15204 Subject
15205 \family default
15206 : the letter's subject, in the standard behavior appears in a bold font
15207  above the 
15208 \family sans
15209 Opening
15210 \family default
15211  paragraph.
15212 \end_layout
15213
15214 \begin_layout Standard
15215 The types 
15216 \family sans
15217 Yourref
15218 \family default
15219
15220 \family sans
15221 Yourmail
15222 \family default
15223
15224 \family sans
15225 Myref
15226 \family default
15227
15228 \family sans
15229 Customer
15230 \family default
15231 , and 
15232 \family sans
15233 Invoice
15234 \family default
15235  produce a business letter like line above the 
15236 \family sans
15237 Title
15238 \family default
15239  line containing the fields 
15240 \begin_inset Quotes eld
15241 \end_inset
15242
15243 Your ref.
15244 \begin_inset Quotes erd
15245 \end_inset
15246
15247
15248 \begin_inset Quotes eld
15249 \end_inset
15250
15251 Your letter of
15252 \begin_inset Quotes erd
15253 \end_inset
15254
15255
15256 \begin_inset Quotes eld
15257 \end_inset
15258
15259 Our ref.
15260 \begin_inset Quotes erd
15261 \end_inset
15262
15263
15264 \begin_inset Quotes eld
15265 \end_inset
15266
15267 Customer no.
15268 \begin_inset Quotes erd
15269 \end_inset
15270
15271
15272 \begin_inset Quotes eld
15273 \end_inset
15274
15275 Invoice no.
15276 \begin_inset Quotes erd
15277 \end_inset
15278
15279 , and 
15280 \begin_inset Quotes eld
15281 \end_inset
15282
15283 Date
15284 \begin_inset Quotes erd
15285 \end_inset
15286
15287 .
15288  For the date field, the value of the 
15289 \family sans
15290 Date
15291 \family default
15292  type is used.
15293  If one of these 
15294 \begin_inset Quotes eld
15295 \end_inset
15296
15297 business letter types
15298 \begin_inset Quotes erd
15299 \end_inset
15300
15301  is used, the value of the 
15302 \family sans
15303 Place
15304 \family default
15305  type however does not appear, but only the \SpecialChar LaTeX
15306  variable 
15307 \family typewriter
15308
15309 \backslash
15310 fromplace
15311 \family default
15312  is set.
15313  The ordinary output of place and date in a right-aligned line below the
15314  addressee`s field is suppressed.
15315  The types are implemented as input types provided with a label and must
15316  be used ahead of the corresponding 
15317 \family sans
15318 Opening
15319 \family default
15320  type.
15321 \end_layout
15322
15323 \begin_layout Itemize
15324
15325 \family sans
15326 Yourref
15327 \family default
15328 : Your ref.
15329 \end_layout
15330
15331 \begin_layout Itemize
15332
15333 \family sans
15334 Yourmail
15335 \family default
15336 : Your letter of.
15337 \end_layout
15338
15339 \begin_layout Itemize
15340
15341 \family sans
15342 Myref
15343 \family default
15344 : Our ref.
15345 \end_layout
15346
15347 \begin_layout Itemize
15348
15349 \family sans
15350 Customer
15351 \family default
15352 : Customer no.
15353 \end_layout
15354
15355 \begin_layout Itemize
15356
15357 \family sans
15358 Invoice
15359 \family default
15360 : Invoice no.
15361 \end_layout
15362
15363 \begin_layout Subsection
15364 The new letter class: letter (koma-script v.2)
15365 \end_layout
15366
15367 \begin_layout Standard
15368 by 
15369 \noun on
15370 Jürgen Spitzmüller
15371 \end_layout
15372
15373 \begin_layout Standard
15374 \begin_inset VSpace medskip
15375 \end_inset
15376
15377
15378 \end_layout
15379
15380 \begin_layout Standard
15381 \noindent
15382 Koma-Script version 2.8 has introduced a new letter class 
15383 \family typewriter
15384 scrlttr2
15385 \family default
15386  which supersedes the now unsupported 
15387 \family typewriter
15388 scrlettr
15389 \family default
15390 .
15391  It has — on the \SpecialChar LaTeX
15392  side — a completely new interface and is not compatible
15393  with the old class.
15394  Therefore, \SpecialChar LyX
15395  supports both, though it is recommended you use the new class.
15396 \end_layout
15397
15398 \begin_layout Standard
15399 This class covers the same functionality as 
15400 \emph on
15401 letter (koma-script),
15402 \emph default
15403  and a few more.
15404  The basic items are 
15405 \family sans
15406 Address
15407 \family default
15408  (receiver's address, same as 
15409 \family sans
15410 Letter
15411 \family default
15412  in the old layout), 
15413 \family sans
15414 Opening
15415 \family default
15416 , and 
15417 \family sans
15418 Closing
15419 \family default
15420 .
15421  
15422 \family sans
15423 NextAddress
15424 \family default
15425  will start a new letter (i.
15426 \begin_inset space \thinspace{}
15427 \end_inset
15428
15429 e.
15430 \begin_inset space \space{}
15431 \end_inset
15432
15433 you can write several letters per document).
15434  New elements are sender's 
15435 \family sans
15436 E-Mail
15437 \family default
15438
15439 \family sans
15440 URL
15441 \family default
15442
15443 \family sans
15444 Fax
15445 \family default
15446
15447 \family sans
15448 Bank
15449 \family default
15450  and the possibility to use a 
15451 \family sans
15452 Logo
15453 \family default
15454  (via 
15455 \family sans
15456 Insert\SpecialChar menuseparator
15457 Graphics
15458 \family default
15459 ) in the header.
15460 \end_layout
15461
15462 \begin_layout Standard
15463 The biggest improvement is, though, that the letter's layout is configurable
15464  to meet almost any needs.
15465  This can be done via the preamble or with a special style file (Letter
15466  Class Option, extension 
15467 \family typewriter
15468 *.lco
15469 \family default
15470 ), that will be read in as a class option.
15471 \begin_inset Foot
15472 status collapsed
15473
15474 \begin_layout Plain Layout
15475 The KOMA package comes with some default 
15476 \family typewriter
15477 *.lco
15478 \family default
15479  files.
15480  There is, for instance, a 
15481 \family typewriter
15482 DIN.lco
15483 \family default
15484  file that follows german typesetting rules, or a 
15485 \family typewriter
15486 KOMAold.lco
15487 \family default
15488  that provides the default layout of the old 
15489 \family typewriter
15490 scrlettr
15491 \family default
15492  class.
15493  The latter can be loaded with the class option 
15494 \family typewriter
15495 KOMAold
15496 \family default
15497 , inserted via the 
15498 \family sans
15499 Layout\SpecialChar menuseparator
15500 Document\SpecialChar menuseparator
15501 Extra Options
15502 \family default
15503  field.
15504 \end_layout
15505
15506 \end_inset
15507
15508  Have a look at the 
15509 \emph on
15510 koma-letter2
15511 \emph default
15512  template that is included in \SpecialChar LyX
15513  for examples.
15514  A detailed description is to be found in the Koma-Script documentation
15515  (
15516 \emph on
15517 scrguide
15518 \emph default
15519 ).
15520 \end_layout
15521
15522 \begin_layout Subsection
15523 Problems
15524 \end_layout
15525
15526 \begin_layout Standard
15527 Visualizing the Koma-Script document classes in \SpecialChar LyX
15528 , the \SpecialChar LyX
15529  internals cause some
15530  problems.
15531 \end_layout
15532
15533 \begin_layout Itemize
15534 The chapter number of a 
15535 \family sans
15536 Chapter
15537 \family default
15538  type appears on a line of its own above the chapter heading instead of
15539  appearing in the same line ahead of it.
15540  The cause for that is the \SpecialChar LyX
15541  internal behavior for the labeltype 
15542 \family sans
15543 Counter_Chapter
15544 \family default
15545  in the layout file.
15546 \end_layout
15547
15548 \begin_layout Itemize
15549 The headings of the types 
15550 \family sans
15551 Addchap
15552 \family default
15553  and 
15554 \family sans
15555 Addsec
15556 \family default
15557  are only put in the 
15558 \begin_inset Quotes eld
15559 \end_inset
15560
15561 true
15562 \begin_inset Quotes erd
15563 \end_inset
15564
15565  \SpecialChar LaTeX
15566  table of contents, but not in the \SpecialChar LyX
15567  table of contents (
15568 \family sans
15569 Document\SpecialChar menuseparator
15570 Table
15571 \begin_inset space ~
15572 \end_inset
15573
15574 of
15575 \begin_inset space ~
15576 \end_inset
15577
15578 Contents
15579 \family default
15580 ).
15581 \end_layout
15582
15583 \begin_layout Itemize
15584 The paragraphs in a 
15585 \emph on
15586 letter
15587 \emph default
15588  document class appear in a skip separation mode, not indented.
15589  This is the standard behavior, no special \SpecialChar LaTeX
15590  commands are needed for that.
15591  But in the 
15592 \family sans
15593 Document\SpecialChar menuseparator
15594 Settings
15595 \family default
15596  dialog the corresponding radio button indicates 
15597 \family sans
15598 Indent
15599 \family default
15600 .
15601  A 
15602 \family sans
15603 Skip
15604 \family default
15605  value always has the effect that extra \SpecialChar LaTeX
15606  commands are inserted in the document
15607  to produce the gap, which is not what is wanted in this case.
15608 \end_layout
15609
15610 \begin_layout Section
15611 Memoir
15612 \end_layout
15613
15614 \begin_layout Standard
15615 By 
15616 \noun on
15617 Jürgen Spitzmüller
15618 \end_layout
15619
15620 \begin_layout Subsection
15621 Overview
15622 \end_layout
15623
15624 \begin_layout Standard
15625 Memoir is a very powerful and constantly evolving class.
15626  It has been designed with regard to fictional and non-fictional literature.
15627  Its aim is to let the user have maximum control over the typesetting of
15628  his document.
15629  Memoir is based on the standard book class, but it can also emulate the
15630  article class (see below).
15631 \end_layout
15632
15633 \begin_layout Standard
15634 Peter Wilson, the developer of Memoir, is known as the author of lots of
15635  useful packages in the \SpecialChar LaTeX
15636  world.
15637  Most of them have been merged with Memoir.
15638  Therefore, it is much easier to layout the table of contents, appendices,
15639  chapter designs and such.
15640  \SpecialChar LyX
15641 , though, does not support all of these goodies natively.
15642  Some of them might be added to forthcoming releases
15643 \begin_inset Foot
15644 status collapsed
15645
15646 \begin_layout Plain Layout
15647 You are invited to send suggestions to 
15648 \begin_inset Flex URL
15649 status collapsed
15650
15651 \begin_layout Plain Layout
15652
15653 lyx-devel@lists.lyx.org
15654 \end_layout
15655
15656 \end_inset
15657
15658 .
15659 \end_layout
15660
15661 \end_inset
15662
15663 , lots will probably never be supported, due to the limitations of \SpecialChar LyX
15664 's framework.
15665  Of course you can still use all features with the help of some native \SpecialChar LaTeX
15666
15667  commands (\SpecialChar TeX
15668  code
15669 \begin_inset Foot
15670 status collapsed
15671
15672 \begin_layout Plain Layout
15673 Cf.
15674 \begin_inset ERT
15675 status collapsed
15676
15677 \begin_layout Plain Layout
15678
15679
15680 \backslash
15681  
15682 \end_layout
15683
15684 \end_inset
15685
15686 section
15687 \begin_inset space ~
15688 \end_inset
15689
15690
15691 \begin_inset CommandInset ref
15692 LatexCommand ref
15693 reference "sec:Inserting-TeX-Code"
15694
15695 \end_inset
15696
15697  for details.
15698 \end_layout
15699
15700 \end_inset
15701
15702 ).
15703  In this section, we can only list those features that are natively supported
15704  by \SpecialChar LyX
15705 .
15706  For detailed descriptions (and for the rest of features) we recommend you
15707  have a look at the detailed manual of the Memoir class
15708 \begin_inset Foot
15709 status collapsed
15710
15711 \begin_layout Plain Layout
15712 Cf.
15713 \begin_inset ERT
15714 status collapsed
15715
15716 \begin_layout Plain Layout
15717
15718
15719 \backslash
15720  
15721 \end_layout
15722
15723 \end_inset
15724
15725
15726 \begin_inset Flex URL
15727 status collapsed
15728
15729 \begin_layout Plain Layout
15730
15731 CTAN:/macros/latex/memoir/memman.pdf
15732 \end_layout
15733
15734 \end_inset
15735
15736 .
15737 \end_layout
15738
15739 \end_inset
15740
15741 , which is not only a user guide for the class, but also both a comprehensive
15742  description on good typesetting and a superb example for good typesetting
15743  itself.
15744 \end_layout
15745
15746 \begin_layout Subsection
15747 Basic features and restrictions
15748 \end_layout
15749
15750 \begin_layout Standard
15751 Memoir supports basically all features of the standard book classes.
15752  There are, however, some differences, as follows:
15753 \end_layout
15754
15755 \begin_layout Description
15756 Font
15757 \begin_inset space ~
15758 \end_inset
15759
15760 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
15761 \end_layout
15762
15763 \begin_layout Description
15764 Page
15765 \begin_inset space ~
15766 \end_inset
15767
15768 style: The fancy page style is not supported, due to a command clash between
15769  Memoir and the fancyhdr package (they both define a command with the same
15770  name, which confuses \SpecialChar LaTeX
15771 ).
15772  Instead, Memoir comes with a number of its own page styles (see 
15773 \family sans
15774 Document\SpecialChar menuseparator
15775 Settings\SpecialChar menuseparator
15776 Page
15777 \begin_inset space ~
15778 \end_inset
15779
15780 Style
15781 \family default
15782 ).
15783  If you want to use these for the chapter pages, you have to use the command
15784  
15785 \family typewriter
15786
15787 \backslash
15788 chapterstyle
15789 \family default
15790  in the main text or in preamble (e.
15791 \begin_inset space \thinspace{}
15792 \end_inset
15793
15794 g.
15795 \begin_inset space \space{}
15796 \end_inset
15797
15798
15799 \family typewriter
15800
15801 \backslash
15802 chapterstyle{companion}
15803 \family default
15804 ).
15805 \end_layout
15806
15807 \begin_layout Description
15808 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
15809  optional argument in the standard classes.
15810  With this, you can specify an alternative version of the title for the
15811  table of contents and the headers (for instance, if the title is too long).
15812  In \SpecialChar LyX
15813 , you can do this via 
15814 \family sans
15815 Insert\SpecialChar menuseparator
15816 Short
15817 \begin_inset space ~
15818 \end_inset
15819
15820 Title
15821 \family default
15822  at the beginning of a chapter/section.
15823  Memoir features a second optional argument and thus separates the table
15824  of contents from the header.
15825  You can define three variants of a title with this: one for the main text,
15826  one for the table of contents, and one for the headers.
15827  \SpecialChar LyX
15828  makes these available in form of specific 
15829 \family sans
15830 Short Title
15831 \family default
15832  variants in the 
15833 \family sans
15834 Insert
15835 \family default
15836  menu.
15837 \end_layout
15838
15839 \begin_layout Description
15840 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
15841  of contents, the list of figures and the list of table start a new page
15842  automatically.
15843  Memoir does not follow this route.
15844  You have to insert a page break yourself, if you want to have one.
15845 \end_layout
15846
15847 \begin_layout Description
15848 Titlepage: For some unknown reason, Memoir uses pagination on the title
15849  page (in the standard classes, title pages are 
15850 \begin_inset Quotes eld
15851 \end_inset
15852
15853 empty
15854 \begin_inset Quotes erd
15855 \end_inset
15856
15857 ).
15858  If you want an empty title page, type 
15859 \family typewriter
15860
15861 \backslash
15862 aliaspagestyle{title}{empty}
15863 \family default
15864  in the preamble.
15865 \end_layout
15866
15867 \begin_layout Description
15868 Article: With the class option 
15869 \emph on
15870 article
15871 \emph default
15872  (to be inserted in 
15873 \family sans
15874 Document\SpecialChar menuseparator
15875 Settings\SpecialChar menuseparator
15876 Class Settings\SpecialChar menuseparator
15877 Custom
15878 \begin_inset space ~
15879 \end_inset
15880
15881 Options
15882 \family default
15883 ), you can emulate article style.
15884  That is, counters (footnotes, figures, tables etc.) will not be reset on
15885  new chapters, chapters don't start a new page (but are—in contrary to 
15886 \begin_inset Quotes eld
15887 \end_inset
15888
15889 real
15890 \begin_inset Quotes erd
15891 \end_inset
15892
15893  article classes—still allowed), parts, though, use their own page, as in
15894  book.
15895 \end_layout
15896
15897 \begin_layout Description
15898 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
15899  font commands, which have been used in the old \SpecialChar LaTeX
15900  version 2.09 (e.
15901 \begin_inset space \thinspace{}
15902 \end_inset
15903
15904 g.
15905 \begin_inset space \space{}
15906 \end_inset
15907
15908
15909 \family typewriter
15910
15911 \backslash
15912 rm
15913 \family default
15914
15915 \family typewriter
15916
15917 \backslash
15918 it
15919 \family default
15920 ).
15921  It produces an error and stops \SpecialChar LaTeX
15922  whenever such a command appears.
15923  The class option 
15924 \emph on
15925 oldfontcommands
15926 \emph default
15927  reallows the commands and spits out warnings instead (which does at least
15928  not stop \SpecialChar LaTeX
15929 ).
15930  Since a lot of packages and particularly Bib\SpecialChar TeX
15931  style files are still using
15932  those commands, we have decided to use this option by default.
15933 \end_layout
15934
15935 \begin_layout Subsection
15936 Extra features
15937 \end_layout
15938
15939 \begin_layout Standard
15940 We will only describe the features supported by \SpecialChar LyX
15941  (which is not much currently).
15942  Please consult the Memoir manual
15943 \begin_inset Foot
15944 status collapsed
15945
15946 \begin_layout Plain Layout
15947 Cf.
15948 \begin_inset ERT
15949 status collapsed
15950
15951 \begin_layout Plain Layout
15952
15953
15954 \backslash
15955  
15956 \end_layout
15957
15958 \end_inset
15959
15960
15961 \begin_inset Flex URL
15962 status collapsed
15963
15964 \begin_layout Plain Layout
15965
15966 CTAN:/macros/latex/memoir/memman.pdf
15967 \end_layout
15968
15969 \end_inset
15970
15971 .
15972 \end_layout
15973
15974 \end_inset
15975
15976  for details.
15977 \end_layout
15978
15979 \begin_layout Description
15980 Abstract: You may wonder why an abstract is an extra feature.
15981  Well, it is in book class.
15982  Usually books don't have abstracts.
15983  Memoir, however, has.
15984  You can use it wherever and how often you like.
15985 \end_layout
15986
15987 \begin_layout Description
15988 Chapterprecis: You may know this older typesetting style: The contents of
15989  a chapter are summarized below the title and also in the table of contents
15990  (e.
15991 \begin_inset space \thinspace{}
15992 \end_inset
15993
15994 g.
15995 \begin_inset space \space{}
15996 \end_inset
15997
15998
15999 \emph on
16000 Our hero arrives in Troia; he loses some friends; he finds others
16001 \emph default
16002 ).
16003  Chapterprecis does exactly this.
16004  It is therefore only sensible below a chapter.
16005 \end_layout
16006
16007 \begin_layout Description
16008 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
16009  The epigraph environment provides an elegant way of typesetting such a
16010  motto.
16011  The motto itself (text) and its (optional) author (source) are divided
16012  by a short line.
16013  The author (source) can be inserted via 
16014 \family sans
16015 Insert\SpecialChar menuseparator
16016 Epigraph Source
16017 \family default
16018 \emph on
16019 .
16020 \end_layout
16021
16022 \begin_layout Description
16023 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
16024  complex figurative poems).
16025  \SpecialChar LyX
16026  can only support a few of them.
16027  One is poemtitle, which is a centered title for poems, which will also
16028  be added to the table of contents (verse is the standard environment for
16029  poems.
16030  Memoir has some enhanced versions of verse, but you need to use \SpecialChar TeX
16031  code,
16032  because they have to be nested inside regular verse environments, which
16033  is not possible with \SpecialChar LyX
16034 ).
16035 \end_layout
16036
16037 \begin_layout Description
16038 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
16039 \end_layout
16040
16041 \begin_layout Section
16042 Article (mwart), book (mwbk) and report (mwrep)
16043 \begin_inset Argument status
16044 status collapsed
16045
16046 \begin_layout Plain Layout
16047 The 
16048 \family typewriter
16049 mw
16050 \family default
16051  Classes
16052 \end_layout
16053
16054 \end_inset
16055
16056
16057 \end_layout
16058
16059 \begin_layout Standard
16060 by 
16061 \noun on
16062 Tomasz Luczak
16063 \end_layout
16064
16065 \begin_layout Standard
16066 The \SpecialChar LyX
16067  document classes 
16068 \emph on
16069 article (mwart)
16070 \emph default
16071
16072 \emph on
16073 report (mwrep)
16074 \emph default
16075  and 
16076 \emph on
16077 book
16078 \emph default
16079  
16080 \emph on
16081 (mwbk)
16082 \emph default
16083  correspond to the \SpecialChar LaTeX
16084  document classes 
16085 \family typewriter
16086 mwart.cls
16087 \family default
16088
16089 \family typewriter
16090 mwrep.cls
16091 \family default
16092  and 
16093 \family typewriter
16094 mwbk.cls
16095 \family default
16096 , resp.
16097  They are replacements for the standard document classes 
16098 \family typewriter
16099 article.cls
16100 \family default
16101
16102 \family typewriter
16103 report.cls
16104 \family default
16105  and 
16106 \family typewriter
16107 book.cls
16108 \family default
16109 , resp., and fit better to Polish typography conventions in a number of points.
16110  
16111 \end_layout
16112
16113 \begin_layout Standard
16114 Basic differences:
16115 \end_layout
16116
16117 \begin_layout Itemize
16118 Unnumbered titles (with star, e.
16119 \begin_inset space \thinspace{}
16120 \end_inset
16121
16122 g.
16123 \begin_inset space \space{}
16124 \end_inset
16125
16126
16127 \family sans
16128 Section*
16129 \family default
16130 ) are added into table of contents,
16131 \end_layout
16132
16133 \begin_layout Itemize
16134 Additional page styles:
16135 \end_layout
16136
16137 \begin_deeper
16138 \begin_layout Description
16139 uheadings header with separated lines,
16140 \end_layout
16141
16142 \begin_layout Description
16143 myheadings custom header, contents headers via commands: 
16144 \family typewriter
16145
16146 \backslash
16147 markright
16148 \family default
16149  and 
16150 \family typewriter
16151
16152 \backslash
16153 markboth
16154 \family default
16155 ,
16156 \end_layout
16157
16158 \begin_layout Description
16159 myuheadings custom header with separated lines,
16160 \end_layout
16161
16162 \begin_layout Description
16163 outer page number is placed on outer side of page
16164 \end_layout
16165
16166 \end_deeper
16167 \begin_layout Itemize
16168 Options 
16169 \end_layout
16170
16171 \begin_deeper
16172 \begin_layout Description
16173 rmheadings serif titles — default,
16174 \end_layout
16175
16176 \begin_layout Description
16177 sfheadings sansserif titles,
16178 \end_layout
16179
16180 \begin_layout Description
16181 authortitle on title page first placed is author next title — default,
16182 \end_layout
16183
16184 \begin_layout Description
16185 titleauthor on title page first placed is title next author,
16186 \end_layout
16187
16188 \begin_layout Description
16189 withmarginpar reserve place on page for margins.
16190 \end_layout
16191
16192 \end_deeper
16193 \begin_layout Section
16194 Paper
16195 \end_layout
16196
16197 \begin_layout Standard
16198 The document class 
16199 \family sans
16200 paper
16201 \family default
16202  provides an alternative to the standard 
16203 \family sans
16204 article
16205 \family default
16206  class.
16207  It provides similar functionality, but you might prefer this layout with
16208  sans serif sections, headings, and more.
16209 \end_layout
16210
16211 \begin_layout Section
16212 Rev\SpecialChar TeX
16213 4
16214 \end_layout
16215
16216 \begin_layout Standard
16217 by 
16218 \noun on
16219 Amir Karger
16220 \end_layout
16221
16222 \begin_layout Standard
16223 \begin_inset VSpace bigskip
16224 \end_inset
16225
16226
16227 \end_layout
16228
16229 \begin_layout Standard
16230 \noindent
16231 The 
16232 \family sans
16233 Revtex
16234 \begin_inset space ~
16235 \end_inset
16236
16237 4
16238 \family default
16239  textclass works with the American Physical Sociey's Rev\SpecialChar TeX
16240  4.0 (the 
16241 \begin_inset Formula $\beta$
16242 \end_inset
16243
16244  release of May, 1999) class.
16245 \end_layout
16246
16247 \begin_layout Standard
16248 \SpecialChar LyX
16249  has a 
16250 \family sans
16251 Revtex
16252 \family default
16253  textclass, which works with Rev\SpecialChar TeX
16254  3.1.
16255  However, v3.1 is basically obsolete, as it works with \SpecialChar LaTeX
16256  2.09.
16257  That means that it doesn't interact very well with \SpecialChar LyX
16258 , which requires \SpecialChar LaTeX2e
16259 , although
16260  it has been kludged to work.
16261  Since Rev\SpecialChar TeX
16262  4.0 has been designed to work much more cleanly with \SpecialChar LaTeX2e
16263 , \SpecialChar LyX
16264  with the
16265  
16266 \family sans
16267 Rev\SpecialChar TeX
16268
16269 \begin_inset space ~
16270 \end_inset
16271
16272 4
16273 \family default
16274  textclass should also be pretty easy to use.
16275 \end_layout
16276
16277 \begin_layout Standard
16278 These documents are supposed to be used in 
16279 \emph on
16280 addition
16281 \emph default
16282  to the Rev\SpecialChar TeX
16283  4.0 documents, so we don't describe any of the special Rev\SpecialChar TeX
16284  macros,
16285  and assume you'll know what to put in the preamble if necessary.
16286 \end_layout
16287
16288 \begin_layout Subsection
16289 Installation
16290 \end_layout
16291
16292 \begin_layout Standard
16293 All you need to do is install Rev\SpecialChar TeX
16294  4, as described in the package's README
16295  file.
16296  The package can be found at The Rev\SpecialChar TeX
16297  4 Web Site 
16298 \begin_inset Flex URL
16299 status collapsed
16300
16301 \begin_layout Plain Layout
16302
16303 http://publish.aps.org/revtex4/
16304 \end_layout
16305
16306 \end_inset
16307
16308 .
16309  Install it somewhere that \SpecialChar LaTeX
16310  can see it.
16311  Test it by trying to \SpecialChar LaTeX
16312  a short Rev\SpecialChar TeX
16313  4 document in some random directory (i.
16314 \begin_inset space \thinspace{}
16315 \end_inset
16316
16317 e.
16318 \begin_inset space \space{}
16319 \end_inset
16320
16321 not the directory where you installed the class file.) Then, if you reconfigure
16322  \SpecialChar LyX
16323 , it will find the class file and let you use the Rev\SpecialChar TeX
16324 4 textclass.
16325 \end_layout
16326
16327 \begin_layout Standard
16328 Probably the easiest way to get started is either to import a Rev\SpecialChar TeX
16329  4 document
16330  using 
16331 \family typewriter
16332 tex2lyx
16333 \family default
16334 , or to use the 
16335 \family sans
16336 Revtex
16337 \begin_inset space ~
16338 \end_inset
16339
16340 4
16341 \family default
16342  template, found in the templates directory.
16343 \end_layout
16344
16345 \begin_layout Subsection
16346 Preamble Matter
16347 \end_layout
16348
16349 \begin_layout Standard
16350 Optional arguments to 
16351 \family typewriter
16352
16353 \backslash
16354 documentclass
16355 \family default
16356 , like 
16357 \begin_inset Quotes eld
16358 \end_inset
16359
16360 preprint
16361 \begin_inset Quotes erd
16362 \end_inset
16363
16364  and 
16365 \begin_inset Quotes eld
16366 \end_inset
16367
16368 aps
16369 \begin_inset Quotes erd
16370 \end_inset
16371
16372 , go in the 
16373 \family sans
16374 Extra
16375 \begin_inset space ~
16376 \end_inset
16377
16378 Options
16379 \family default
16380  field in the 
16381 \family sans
16382 Document
16383 \begin_inset space ~
16384 \end_inset
16385
16386 Layout
16387 \family default
16388  dialog, as usual.
16389  Remember that in Rev\SpecialChar TeX
16390 , at least one optional argument is required! 
16391 \end_layout
16392
16393 \begin_layout Standard
16394 Other preamble matter, like 
16395 \family typewriter
16396
16397 \backslash
16398 draft
16399 \family default
16400  etc.
16401 \begin_inset space ~
16402 \end_inset
16403
16404 goes in the 
16405 \family sans
16406 \SpecialChar LaTeX
16407
16408 \begin_inset space ~
16409 \end_inset
16410
16411 Preamble
16412 \family default
16413  dialog, also as usual.
16414 \end_layout
16415
16416 \begin_layout Subsection
16417 Layouts
16418 \end_layout
16419
16420 \begin_layout Standard
16421 The layouts basically correspond to the commands in Rev\SpecialChar TeX
16422 4.0.
16423  For example, the Email layout corresponds to 
16424 \family typewriter
16425
16426 \backslash
16427 email{}
16428 \family default
16429 .
16430  Note that (at least as of Rev\SpecialChar TeX
16431  4.0 Beta), the 
16432 \family sans
16433 Address
16434 \family default
16435  and 
16436 \family sans
16437 Affiliation
16438 \family default
16439  layouts are exactly equivalent, so you shouldn't need to use both.
16440 \begin_inset Foot
16441 status collapsed
16442
16443 \begin_layout Plain Layout
16444 In case you're curious, both were included so that 
16445 \family typewriter
16446 tex2lyx
16447 \family default
16448  would be able to translate both 
16449 \family typewriter
16450
16451 \backslash
16452 address
16453 \family default
16454  and 
16455 \family typewriter
16456
16457 \backslash
16458 affiliation
16459 \family default
16460 .
16461 \end_layout
16462
16463 \end_inset
16464
16465
16466 \end_layout
16467
16468 \begin_layout Subsection
16469 Important Notes
16470 \end_layout
16471
16472 \begin_layout Standard
16473 There are a couple of important unique aspects of Rev\SpecialChar TeX
16474  4 which might cause
16475  bugs that will be even more confusing in \SpecialChar LyX
16476 .
16477 \end_layout
16478
16479 \begin_layout Standard
16480 In Rev\SpecialChar TeX
16481 , the 
16482 \family typewriter
16483
16484 \backslash
16485 thanks
16486 \family default
16487  command goes 
16488 \emph on
16489 outside
16490 \emph default
16491  the 
16492 \family typewriter
16493
16494 \backslash
16495 author
16496 \family default
16497  command.
16498  The \SpecialChar LyX
16499  equivalent is that there is a separate Thanks layout.
16500  Do 
16501 \emph on
16502 not
16503 \emph default
16504  write footnotes in the 
16505 \family sans
16506 Author
16507 \family default
16508  layout, or weird things may happen.
16509  See the Rev\SpecialChar TeX
16510  4 documentation for more details.
16511 \end_layout
16512
16513 \begin_layout Standard
16514 Also, the 
16515 \family sans
16516 Author
16517 \begin_inset space ~
16518 \end_inset
16519
16520 Email
16521 \family default
16522
16523 \family sans
16524 Author
16525 \begin_inset space ~
16526 \end_inset
16527
16528 URL
16529 \family default
16530 , and 
16531 \family sans
16532 Thanks
16533 \family default
16534  layouts must be placed 
16535 \emph on
16536 in between
16537 \emph default
16538  the 
16539 \family sans
16540 Author
16541 \family default
16542  layout and the corresponding 
16543 \family sans
16544 Address
16545 \family default
16546  (or equivalent 
16547 \family sans
16548 Affiliation
16549 \family default
16550 ) layout.
16551  If you put the 
16552 \family sans
16553 Thanks
16554 \family default
16555  after the 
16556 \family sans
16557 Address
16558 \family default
16559 , the \SpecialChar LaTeX
16560  won't compile.
16561 \end_layout
16562
16563 \begin_layout Section
16564 Springer Journals (
16565 \family sans
16566 svjour
16567 \family default
16568 )
16569 \end_layout
16570
16571 \begin_layout Standard
16572 by 
16573 \noun on
16574 Martin Vermeer
16575 \end_layout
16576
16577 \begin_layout Subsection
16578 Description
16579 \end_layout
16580
16581 \begin_layout Standard
16582 These are the layout files for some of the journal formats used by Springer
16583  Verlag and listed on 
16584 \begin_inset Flex URL
16585 status collapsed
16586
16587 \begin_layout Plain Layout
16588
16589 http://www.springer.de/author/tex/help-journals.html
16590 \end_layout
16591
16592 \end_inset
16593
16594 , where you should also go to fetch the class files (yes, these are \SpecialChar LaTeX2e
16595  now!).
16596  It is a modular system: the things common to all journals are implemented
16597  in 
16598 \family typewriter
16599 svjour.inc
16600 \family default
16601 , which journal-specific layout files (such as, e.
16602 \begin_inset space \thinspace{}
16603 \end_inset
16604
16605 g.
16606 \begin_inset space \space{}
16607 \end_inset
16608
16609
16610 \family typewriter
16611 svjog.layout
16612 \family default
16613  for Journal of Geodesy) can include.
16614 \end_layout
16615
16616 \begin_layout Standard
16617 This means that implementing support for any other Springer journal on this
16618  list is as simple as writing your own 
16619 \family typewriter
16620 sv
16621 \family default
16622 <myjournal>
16623 \family typewriter
16624 .layout
16625 \family default
16626  file following the outline given in 
16627 \family typewriter
16628 svjog.layout
16629 \family default
16630 .
16631  
16632 \end_layout
16633
16634 \begin_layout Standard
16635 It is reasonably well tested only for the Journal of Geodesy.
16636  
16637 \family typewriter
16638 svjour
16639 \family default
16640  and 
16641 \family typewriter
16642 svjog
16643 \family default
16644  come with the standard \SpecialChar LyX
16645  distribution.
16646  Install the relevant class file (downloaded from Springer) in a proper
16647  directory, reconfigure \SpecialChar LaTeX
16648  (in the te\SpecialChar TeX
16649  case by running 
16650 \family typewriter
16651 texhash
16652 \family default
16653 , as root if necessary — doesn't \SpecialChar LyX
16654  take care of this?), reconfigure \SpecialChar LyX
16655  and
16656  it should work.
16657 \end_layout
16658
16659 \begin_layout Subsection
16660 New styles
16661 \end_layout
16662
16663 \begin_layout Standard
16664 A large number of theorem-like styles — 
16665 \family sans
16666 Claim, Conjecture,
16667 \family default
16668  
16669 \family sans
16670 \SpecialChar ldots
16671 Theorem
16672 \family default
16673 .
16674 \end_layout
16675
16676 \begin_layout Standard
16677
16678 \family sans
16679 Headnote, Dedication, Subtitle, Running_\SpecialChar LaTeX
16680 _Title, Author_Running, Institute,
16681  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
16682 \family default
16683 .
16684  See the Springer class file documentation for details.
16685 \end_layout
16686
16687 \begin_layout Subsection
16688 Supported journals
16689 \end_layout
16690
16691 \begin_layout Itemize
16692
16693 \emph on
16694 Journal of Geodesy
16695 \emph default
16696
16697 \family typewriter
16698 svjog.layout
16699 \family default
16700  — Martin Vermeer
16701 \end_layout
16702
16703 \begin_layout Itemize
16704
16705 \emph on
16706 Probability Theory and Related Fields
16707 \emph default
16708
16709 \family typewriter
16710 svprobth.layout
16711 \family default
16712  — Jean-Marc Lasgouttes
16713 \end_layout
16714
16715 \begin_layout Standard
16716 Add your own, it isn't so hard!
16717 \end_layout
16718
16719 \begin_layout Subsection
16720 Credits
16721 \end_layout
16722
16723 \begin_layout Standard
16724 These files are partly based on the older 
16725 \family typewriter
16726 ejour2.layout
16727 \family default
16728 , which was again based on a tinkered-with version of an old \SpecialChar LaTeX
16729  2.09 style
16730  file from Springer.
16731  All this, and the 
16732 \family typewriter
16733 ejour2
16734 \family default
16735  layout, are now defunct.
16736  Jean-Marc Lasgouttes helped out big in making me find my way around the
16737  \SpecialChar LyX
16738  layout file mechanism.
16739 \end_layout
16740
16741 \begin_layout Subsection
16742 Bugs
16743 \end_layout
16744
16745 \begin_layout Standard
16746 Probably.
16747  But probably less than in the old hacked-\SpecialChar LaTeX
16748  
16749 \family typewriter
16750 ejour2
16751 \family default
16752 .
16753 \end_layout
16754
16755 \begin_layout Section
16756 Slides [aka 
16757 \noun on
16758 Sli\SpecialChar TeX
16759
16760 \noun default
16761 ]
16762 \begin_inset CommandInset label
16763 LatexCommand label
16764 name "sec:slitex"
16765
16766 \end_inset
16767
16768
16769 \end_layout
16770
16771 \begin_layout Standard
16772 by 
16773 \noun on
16774 John Weiss
16775 \noun default
16776  
16777 \end_layout
16778
16779 \begin_layout Subsection
16780 Introduction
16781 \end_layout
16782
16783 \begin_layout Standard
16784 This section describes how to use \SpecialChar LyX
16785  to make slides for overhead projectors.
16786  There are two document classes that can do this: the default slides class
16787  and the 
16788 \family sans
16789 Foil\SpecialChar TeX
16790
16791 \family default
16792  slides class.
16793  This section documents the former.
16794 \end_layout
16795
16796 \begin_layout Standard
16797 I'm going to say this again, nice and clear, so that there's no misunderstanding
16798 :
16799 \end_layout
16800
16801 \begin_layout Standard
16802 \begin_inset VSpace bigskip
16803 \end_inset
16804
16805
16806 \end_layout
16807
16808 \begin_layout Standard
16809 \align center
16810
16811 \size large
16812 This section documents the class 
16813 \begin_inset Quotes eld
16814 \end_inset
16815
16816
16817 \family sans
16818 slides (default)
16819 \family default
16820
16821 \begin_inset Quotes erd
16822 \end_inset
16823
16824  
16825 \emph on
16826 only.
16827 \end_layout
16828
16829 \begin_layout Standard
16830 \begin_inset VSpace bigskip
16831 \end_inset
16832
16833
16834 \end_layout
16835
16836 \begin_layout Standard
16837 If you're looking for the documentation for 
16838 \begin_inset Quotes eld
16839 \end_inset
16840
16841
16842 \family sans
16843 slides (Foil\SpecialChar TeX
16844 )
16845 \family default
16846
16847 \begin_inset Quotes erd
16848 \end_inset
16849
16850 , check out section
16851 \begin_inset space ~
16852 \end_inset
16853
16854
16855 \begin_inset CommandInset ref
16856 LatexCommand ref
16857 reference "sec:foiltex"
16858
16859 \end_inset
16860
16861 .
16862  The 
16863 \family sans
16864 foils
16865 \family default
16866  class [
16867 \begin_inset Quotes eld
16868 \end_inset
16869
16870
16871 \family sans
16872 slides (Foil\SpecialChar TeX
16873 )
16874 \family default
16875
16876 \begin_inset Quotes erd
16877 \end_inset
16878
16879 ] is actually somewhat better than the default 
16880 \family sans
16881 slides
16882 \family default
16883  class,
16884 \begin_inset Foot
16885 status collapsed
16886
16887 \begin_layout Plain Layout
16888 \SpecialChar ldots
16889 or so I've been told repeatedly by its advocates.
16890  Having never used it, I have no idea if this claim is true or not.
16891 \end_layout
16892
16893 \end_inset
16894
16895  which this section documents.
16896 \end_layout
16897
16898 \begin_layout Standard
16899 This class is the \SpecialChar LaTeX2e
16900  improvement of the old 
16901 \noun on
16902 Sli\SpecialChar TeX
16903
16904 \noun default
16905  package.
16906  Every \SpecialChar LaTeX2e
16907  distribution includes this class [which I'll just refer to as 
16908 \begin_inset Quotes eld
16909 \end_inset
16910
16911
16912 \family sans
16913 slides
16914 \family default
16915
16916 \begin_inset Quotes erd
16917 \end_inset
16918
16919  from now on], so you're bound to have it.
16920  As I noted earlier, there are other classes, such as 
16921 \family sans
16922 foils
16923 \family default
16924 , which also produce slides for overhead projectors and do a better job
16925  at it.
16926  However, there are some things which 
16927 \family sans
16928 slides
16929 \family default
16930  can do which the others can't, such as generate overlays.
16931  Read on to learn more!
16932 \end_layout
16933
16934 \begin_layout Subsection
16935 Getting Started
16936 \begin_inset CommandInset label
16937 LatexCommand label
16938 name "sec:slidesetup"
16939
16940 \end_inset
16941
16942
16943 \end_layout
16944
16945 \begin_layout Standard
16946 Obviously, to use this document class, you need to select 
16947 \begin_inset Quotes eld
16948 \end_inset
16949
16950
16951 \family sans
16952 slides (default)
16953 \family default
16954
16955 \begin_inset Quotes erd
16956 \end_inset
16957
16958  from the class list in the 
16959 \family sans
16960 Document\SpecialChar menuseparator
16961 Settings
16962 \family default
16963  dialog.
16964  There are some other special things you should know about this class:
16965 \end_layout
16966
16967 \begin_layout Itemize
16968 Don't bother changing the options 
16969 \family sans
16970 Sides and Columns
16971 \family default
16972 .
16973  They're not supported by the 
16974 \family sans
16975 slides
16976 \family default
16977  class, anyways.
16978 \end_layout
16979
16980 \begin_layout Itemize
16981 The option 
16982 \family sans
16983 Page
16984 \begin_inset space ~
16985 \end_inset
16986
16987 style
16988 \family default
16989  behaves a bit differently for this class.
16990  The possible choices and what they do are as follows:
16991 \end_layout
16992
16993 \begin_deeper
16994 \begin_layout Description
16995
16996 \family sans
16997 plain
16998 \family default
16999  The final output contains page numbers in the lower right corner.
17000 \end_layout
17001
17002 \begin_layout Description
17003
17004 \family sans
17005 headings
17006 \family default
17007  Like 
17008 \family sans
17009 plain
17010 \family default
17011 , but also prints out any time markers you've put in.
17012  This is the default.
17013 \end_layout
17014
17015 \begin_layout Description
17016
17017 \family sans
17018 empty
17019 \family default
17020  The final output contains no page numbers, time markers, or alignment markers.
17021 \end_layout
17022
17023 \end_deeper
17024 \begin_layout Itemize
17025 The 
17026 \family sans
17027 slides
17028 \family default
17029  class has an extra option: 
17030 \family typewriter
17031 clock
17032 \family default
17033 .
17034  To use it, put 
17035 \begin_inset Quotes eld
17036 \end_inset
17037
17038
17039 \family typewriter
17040 clock
17041 \family default
17042
17043 \begin_inset Quotes erd
17044 \end_inset
17045
17046  in the extra class options.
17047 \end_layout
17048
17049 \begin_deeper
17050 \begin_layout Standard
17051 Using this options allows you to add time markers to 
17052 \family sans
17053 Note
17054 \family default
17055 s.
17056  See section
17057 \begin_inset space ~
17058 \end_inset
17059
17060
17061 \begin_inset CommandInset ref
17062 LatexCommand ref
17063 reference "sec:slideNote"
17064
17065 \end_inset
17066
17067  for more details.
17068 \end_layout
17069
17070 \end_deeper
17071 \begin_layout Standard
17072 You can also use the template file 
17073 \begin_inset Quotes eld
17074 \end_inset
17075
17076
17077 \family typewriter
17078 slides.lyx
17079 \family default
17080
17081 \begin_inset Quotes erd
17082 \end_inset
17083
17084  to automatically set up a document to use the 
17085 \family sans
17086 slides
17087 \family default
17088  class [using 
17089 \family sans
17090 File\SpecialChar menuseparator
17091 New
17092 \begin_inset space ~
17093 \end_inset
17094
17095 from
17096 \begin_inset space ~
17097 \end_inset
17098
17099 Template
17100 \family default
17101  to open your new document].
17102  The template file also contains some examples of the special paragraph
17103  environments used by this class.
17104  I'll describe those next.
17105 \end_layout
17106
17107 \begin_layout Subsection
17108 Paragraph Environments
17109 \end_layout
17110
17111 \begin_layout Subsubsection
17112 Supported Environments
17113 \end_layout
17114
17115 \begin_layout Standard
17116 The first thing you'll notice when you start up a new 
17117 \family sans
17118 slides
17119 \family default
17120  document is the font size and type: it's the equivalent of the size 
17121 \begin_inset Quotes eld
17122 \end_inset
17123
17124
17125 \family sans
17126 Largest
17127 \family default
17128
17129 \begin_inset Quotes erd
17130 \end_inset
17131
17132  in the 
17133 \family sans
17134 Sans
17135 \begin_inset space ~
17136 \end_inset
17137
17138 Serif
17139 \family default
17140  font.
17141  This is also what's used in the output.
17142  Think of this as a 
17143 \begin_inset Quotes eld
17144 \end_inset
17145
17146 visual cue
17147 \begin_inset Quotes erd
17148 \end_inset
17149
17150  to remind you that this is a slide.
17151  Your final slides will use a larger font; ergo, you'll have less space.
17152  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
17153 \end_layout
17154
17155 \begin_layout Standard
17156 The next thing that becomes obvious is the changes to the paragraph environment
17157  pull-down box [at the far-left end of the toolbar].
17158  Most of the paragraph environments you're used to seeing are missing.
17159  There are also five new ones.
17160  That's because the 
17161 \family sans
17162 slides
17163 \family default
17164  class itself only supports certain paragraph environments:
17165 \end_layout
17166
17167 \begin_layout Itemize
17168
17169 \family sans
17170 Standard
17171 \end_layout
17172
17173 \begin_layout Itemize
17174
17175 \family sans
17176 Itemize
17177 \end_layout
17178
17179 \begin_layout Itemize
17180
17181 \family sans
17182 Enumerate
17183 \end_layout
17184
17185 \begin_layout Itemize
17186
17187 \family sans
17188 Description
17189 \end_layout
17190
17191 \begin_layout Itemize
17192
17193 \family sans
17194 List
17195 \end_layout
17196
17197 \begin_layout Itemize
17198
17199 \family sans
17200 Quotation
17201 \end_layout
17202
17203 \begin_layout Itemize
17204
17205 \family sans
17206 Quote
17207 \end_layout
17208
17209 \begin_layout Itemize
17210
17211 \family sans
17212 Verse
17213 \end_layout
17214
17215 \begin_layout Itemize
17216
17217 \family sans
17218 Caption
17219 \end_layout
17220
17221 \begin_layout Itemize
17222
17223 \family sans
17224 \SpecialChar LyX
17225 -Code
17226 \end_layout
17227
17228 \begin_layout Standard
17229 All of the other standard environments, including the section-heading environmen
17230 ts, aren't used in the 
17231 \family sans
17232 slides
17233 \family default
17234  class.
17235 \end_layout
17236
17237 \begin_layout Standard
17238 On the other hand, you'll notice the following new environments:
17239 \end_layout
17240
17241 \begin_layout Itemize
17242
17243 \family sans
17244 Slide
17245 \end_layout
17246
17247 \begin_layout Itemize
17248
17249 \family sans
17250 Overlay
17251 \end_layout
17252
17253 \begin_layout Itemize
17254
17255 \family sans
17256 Note
17257 \end_layout
17258
17259 \begin_layout Itemize
17260
17261 \family sans
17262 InvisibleText
17263 \end_layout
17264
17265 \begin_layout Itemize
17266
17267 \family sans
17268 VisibleText
17269 \end_layout
17270
17271 \begin_layout Standard
17272 These five are kind of quirky, due to a 
17273 \begin_inset Quotes eld
17274 \end_inset
17275
17276 feature
17277 \begin_inset Quotes erd
17278 \end_inset
17279
17280  in \SpecialChar LyX
17281 .
17282  You see, \SpecialChar LyX
17283  doesn't permit you to nest any other paragraph environment into
17284  an empty environment.
17285  Now, that's fine and dandy, but it means that you wouldn't be able to start
17286  a slide with anything except plain text.
17287  To deal with this, I've performed a little 
17288 \begin_inset Quotes eld
17289 \end_inset
17290
17291 \SpecialChar LaTeX
17292  magic.
17293 \begin_inset Quotes erd
17294 \end_inset
17295
17296  
17297 \end_layout
17298
17299 \begin_layout Subsubsection
17300 Quirks of the New Environments
17301 \begin_inset CommandInset label
17302 LatexCommand label
17303 name "sec:slideQuirk"
17304
17305 \end_inset
17306
17307
17308 \end_layout
17309
17310 \begin_layout Standard
17311 All five of the new paragraph environments are somewhat quirky due to inherent
17312  limitiations in the current version of \SpecialChar LyX
17313 .
17314  As I just mentioned, \SpecialChar LyX
17315  forbids environments that begin with another environment.
17316  To get around this, the 
17317 \family sans
17318 Slide
17319 \family default
17320  environment isn't a paragraph environment as described in the 
17321 \emph on
17322 User's Guide
17323 \emph default
17324 .
17325  
17326 \end_layout
17327
17328 \begin_layout Standard
17329 You should consider 
17330 \family sans
17331 Slide
17332 \family default
17333
17334 \family sans
17335 Overlay
17336 \family default
17337 , and 
17338 \family sans
17339 Note
17340 \family default
17341  to be 
17342 \begin_inset Quotes eld
17343 \end_inset
17344
17345 pseudo-environments.
17346 \begin_inset Quotes erd
17347 \end_inset
17348
17349  They look like a section heading or a 
17350 \begin_inset Quotes eld
17351 \end_inset
17352
17353
17354 \family sans
17355 Caption
17356 \family default
17357 ,
17358 \begin_inset Quotes erd
17359 \end_inset
17360
17361  but really begin a [and, if necessary, end the previous] paragraph environment.
17362  Likewise, treat 
17363 \family sans
17364 InvisibleText
17365 \family default
17366  and 
17367 \family sans
17368 VisibleText
17369 \family default
17370  as 
17371 \begin_inset Quotes eld
17372 \end_inset
17373
17374 pseudo-commands.
17375 \begin_inset Quotes erd
17376 \end_inset
17377
17378  These two perform some action.
17379 \end_layout
17380
17381 \begin_layout Standard
17382 A common feature of all five environments, 
17383 \family sans
17384 Slide
17385 \family default
17386
17387 \family sans
17388 Overlay
17389 \family default
17390
17391 \family sans
17392 Note
17393 \family default
17394
17395 \family sans
17396 InvisibleText
17397 \family default
17398  and 
17399 \family sans
17400 VisibleText
17401 \family default
17402 , is a rather long-ish label.
17403  The text following this label — ordinarily the contents of the paragraph
17404  environment — is utterly irrelevant for 
17405 \family sans
17406 Slide
17407 \family default
17408
17409 \family sans
17410 Overlay
17411 \family default
17412
17413 \family sans
17414 Note
17415 \family default
17416
17417 \family sans
17418 InvisibleText
17419 \family default
17420  and 
17421 \family sans
17422 VisibleText
17423 \family default
17424 .
17425  \SpecialChar LyX
17426  completely ignores it.
17427  In fact, you can leave these five environments completely empty.
17428  
17429 \end_layout
17430
17431 \begin_layout Standard
17432 While you don't 
17433 \emph on
17434 have
17435 \emph default
17436  to put any text after the rather long-ish label, you might want to.
17437  This could be a short description of the contents of the 
17438 \family sans
17439 Slide
17440 \family default
17441 , for example.
17442  In that case, enter your descriptive comment and hit 
17443 \family sans
17444 Return
17445 \family default
17446  as you normally would.
17447 \end_layout
17448
17449 \begin_layout Standard
17450 If, on the other hand, you don't want to enter any descriptive text, you'll
17451  hit another \SpecialChar LyX
17452  quirk.
17453  \SpecialChar LyX
17454 , like nature, abhors a vacuum, and will not let you start a new paragraph
17455  environment until you put something in the old one.
17456  So, do this:
17457 \end_layout
17458
17459 \begin_layout Itemize
17460 Start entering the text that will 
17461 \emph on
17462 follow
17463 \emph default
17464  the new 
17465 \family sans
17466 Slide
17467 \family default
17468
17469 \family sans
17470 Overlay
17471 \family default
17472
17473 \family sans
17474 Note
17475 \family default
17476
17477 \family sans
17478 InvisibleText
17479 \family default
17480  or 
17481 \family sans
17482 VisibleText
17483 \family default
17484 .
17485  
17486 \end_layout
17487
17488 \begin_layout Itemize
17489 Now move to the beginning of that paragraph.
17490  
17491 \end_layout
17492
17493 \begin_layout Itemize
17494 Next, hit 
17495 \family sans
17496 Return
17497 \family default
17498 .
17499  
17500 \end_layout
17501
17502 \begin_layout Itemize
17503 Finally, change this new, empty paragraph to a 
17504 \family sans
17505 Slide
17506 \family default
17507
17508 \family sans
17509 Overlay
17510 \family default
17511
17512 \family sans
17513 Note
17514 \family default
17515
17516 \family sans
17517 InvisibleText
17518 \family default
17519  or 
17520 \family sans
17521 VisibleText
17522 \family default
17523 .
17524  
17525 \end_layout
17526
17527 \begin_layout Standard
17528 Some future version of \SpecialChar LyX
17529  will, hopefully, resolve this quirkiness\SpecialChar ldots
17530
17531 \end_layout
17532
17533 \begin_layout Subsection
17534 Making a Presentation with 
17535 \family sans
17536 Slide
17537 \family default
17538
17539 \family sans
17540 Overlay
17541 \family default
17542  and 
17543 \family sans
17544 Note
17545 \end_layout
17546
17547 \begin_layout Subsubsection
17548 Using the 
17549 \family sans
17550 Slide
17551 \family default
17552  Environment
17553 \end_layout
17554
17555 \begin_layout Standard
17556 If you're expecting this section to teach you how to actually make a presentatio
17557 n, you'll be sorely disappointed.
17558  Naturally, I'll describe all of the ways the 
17559 \family sans
17560 slides
17561 \family default
17562  class can assist you in preparing the materials for a presentation.
17563  Filling in the contents, however, is up to you.
17564  [Then again, that 
17565 \emph on
17566 is
17567 \emph default
17568  the \SpecialChar LyX
17569  philosophy.]
17570 \end_layout
17571
17572 \begin_layout Standard
17573 Choosing the 
17574 \family sans
17575 Slide
17576 \family default
17577  environment [in the manner described in section
17578 \begin_inset space ~
17579 \end_inset
17580
17581
17582 \begin_inset CommandInset ref
17583 LatexCommand ref
17584 reference "sec:slideQuirk"
17585
17586 \end_inset
17587
17588 ] tells \SpecialChar LyX
17589  to begin a new slide [duh].
17590  The label for this environment/
17591 \begin_inset Quotes erd
17592 \end_inset
17593
17594 pseudo-command
17595 \begin_inset Quotes erd
17596 \end_inset
17597
17598  is an 
17599 \begin_inset Quotes eld
17600 \end_inset
17601
17602 ASCII line,
17603 \begin_inset Quotes erd
17604 \end_inset
17605
17606  in cool blue, followed by the label, 
17607 \begin_inset Quotes eld
17608 \end_inset
17609
17610 NewSlide:
17611 \begin_inset Quotes erd
17612 \end_inset
17613
17614 .
17615  Any text or paragraph environments that follow this one go on the new slide.
17616  It's that simple.
17617 \end_layout
17618
17619 \begin_layout Standard
17620 Slides are probably the only time you'll need to forcibly end pages in \SpecialChar LyX
17621
17622  (this can be specified in the 
17623 \family sans
17624 Paragraph Layout
17625 \family default
17626  dialog).
17627  In fact, you'll want to, once you finish entering the contents of one slide.
17628  If you've entered more text than can physically fit on a slide, the extra
17629  overflows onto a new slide.
17630  I don't recommend doing this, however, since the overflow slide won't have
17631  any page number on it.
17632  Furthermore, it may interfere with any 
17633 \family sans
17634 Overlay
17635 \family default
17636  you've made to accompany the oversized 
17637 \family sans
17638 Slide
17639 \family default
17640 .
17641 \end_layout
17642
17643 \begin_layout Standard
17644 The 
17645 \family sans
17646 Overlay
17647 \family default
17648  and 
17649 \family sans
17650 Note
17651 \family default
17652  environments work the same way as the 
17653 \family sans
17654 Slide
17655 \family default
17656  environment.
17657  They both create an 
17658 \begin_inset Quotes eld
17659 \end_inset
17660
17661 ASCII line
17662 \begin_inset Quotes erd
17663 \end_inset
17664
17665  followed by a label [
17666 \begin_inset Quotes eld
17667 \end_inset
17668
17669 NewOverlay:
17670 \begin_inset Quotes erd
17671 \end_inset
17672
17673  and 
17674 \begin_inset Quotes eld
17675 \end_inset
17676
17677 NewNote:
17678 \begin_inset Quotes erd
17679 \end_inset
17680
17681 , respectively].
17682  The color is a stunning magenta instead of blue, and the 
17683 \begin_inset Quotes eld
17684 \end_inset
17685
17686 ASCII line
17687 \begin_inset Quotes erd
17688 \end_inset
17689
17690  will look different, in style and in length.
17691  The label fonts of all three also differ from one another.
17692 \end_layout
17693
17694 \begin_layout Standard
17695 As with a 
17696 \family sans
17697 Slide
17698 \family default
17699 , if the contents of a 
17700 \family sans
17701 Note
17702 \family default
17703  or 
17704 \family sans
17705 Overlay
17706 \family default
17707  exceed the physical size of a slide or sheet of paper, the extra will overflow
17708  onto a new sheet.
17709  Again, you should avoid this.
17710  It defeats the whole purpose of 
17711 \family sans
17712 Note
17713 \family default
17714 s and 
17715 \family sans
17716 Overlay
17717 \family default
17718 s.
17719 \end_layout
17720
17721 \begin_layout Subsubsection
17722 Using 
17723 \family sans
17724 Overlay
17725 \family default
17726  with 
17727 \family sans
17728 Slide
17729 \end_layout
17730
17731 \begin_layout Standard
17732 The idea behind an 
17733 \family sans
17734 Overlay
17735 \family default
17736  is a slide that sits atop another slide.
17737  Perhaps you wish to discuss a figure on the main 
17738 \family sans
17739 Slide
17740 \family default
17741  before displaying the text associated with it.
17742  One way to accomplish this is tape a flap of dark paper over the part of
17743  the 
17744 \family sans
17745 Slide
17746 \family default
17747  you want to display later.
17748  This method fails, however, if you wish to overlap one graph with another,
17749  for example.
17750  You would then have to fumble while speaking to align the two separate,
17751  overlapping 
17752 \family sans
17753 Slide
17754 \family default
17755 s to align the two graphs.
17756  The use of an 
17757 \family sans
17758 Overlay
17759 \family default
17760  environment in both cases makes life much easier.
17761 \end_layout
17762
17763 \begin_layout Standard
17764 Each 
17765 \family sans
17766 Overlay
17767 \family default
17768  receives the page number of its 
17769 \begin_inset Quotes eld
17770 \end_inset
17771
17772 parent
17773 \begin_inset Quotes erd
17774 \end_inset
17775
17776  
17777 \family sans
17778 Slide
17779 \family default
17780 , appended by 
17781 \begin_inset Quotes eld
17782 \end_inset
17783
17784
17785 \family typewriter
17786 -a
17787 \family default
17788
17789 \begin_inset Quotes erd
17790 \end_inset
17791
17792 .
17793 \begin_inset Foot
17794 status collapsed
17795
17796 \begin_layout Plain Layout
17797 Presumably, mutliple 
17798 \family sans
17799 Overlay
17800 \family default
17801 s would have 
17802 \begin_inset Quotes eld
17803 \end_inset
17804
17805
17806 \family typewriter
17807 -a
17808 \family default
17809
17810 \begin_inset Quotes erd
17811 \end_inset
17812
17813
17814 \begin_inset Quotes eld
17815 \end_inset
17816
17817
17818 \family typewriter
17819 -b
17820 \family default
17821
17822 \begin_inset Quotes erd
17823 \end_inset
17824
17825
17826 \begin_inset Quotes eld
17827 \end_inset
17828
17829
17830 \family typewriter
17831 -c
17832 \family default
17833
17834 \begin_inset Quotes erd
17835 \end_inset
17836
17837 , etc.
17838 \begin_inset space ~
17839 \end_inset
17840
17841 appended to the page number of the parent 
17842 \family sans
17843 Slide
17844 \family default
17845 .
17846  
17847 \end_layout
17848
17849 \end_inset
17850
17851  Clearly, you want the contents of both the 
17852 \family sans
17853 Slide
17854 \family default
17855  and the 
17856 \family sans
17857 Overlay
17858 \family default
17859  to each fit on a single physical slide! You should probably consider an
17860  
17861 \family sans
17862 Overlay
17863 \family default
17864  as 
17865 \begin_inset Quotes eld
17866 \end_inset
17867
17868 part of
17869 \begin_inset Quotes erd
17870 \end_inset
17871
17872  a 
17873 \family sans
17874 Slide
17875 \family default
17876 .
17877  Indeed, the \SpecialChar LyX
17878  
17879 \family sans
17880 slides
17881 \family default
17882  class provides a visual cue for this: the label at the start of an 
17883 \family sans
17884 Overlay
17885 \family default
17886  is shorter than that at the start of a 
17887 \family sans
17888 Slide
17889 \family default
17890 .
17891  Lastly, when you generate printable output, you'll find alignment markers
17892  in all four corners of both the 
17893 \family sans
17894 Overlay
17895 \family default
17896  page and its parent 
17897 \family sans
17898 Slide
17899 \family default
17900 .
17901  These will assist you in lining up the two physical slides.
17902 \end_layout
17903
17904 \begin_layout Standard
17905 The major problem in overlaying two slides is aligning the contents of the
17906  two transparencies.
17907  How much space should you leave for that graph on the second slide? Worse
17908  still, what if you want a graph and a sentence on second slide, but there
17909  is text on the main transparency that goes in between them? You could try
17910  and insert vertical space of the right size.
17911  The better way is to use 
17912 \family sans
17913 InvisibleText
17914 \family default
17915  and 
17916 \family sans
17917 VisibleText
17918 \family default
17919 .
17920 \end_layout
17921
17922 \begin_layout Standard
17923 As their names imply, 
17924 \family sans
17925 InvisibleText
17926 \family default
17927  and 
17928 \family sans
17929 VisibleText
17930 \family default
17931  are two command-like paragraph environments that make all subsequent text
17932  invisible and visible, respectively.
17933  Note from section
17934 \begin_inset space ~
17935 \end_inset
17936
17937
17938 \begin_inset CommandInset ref
17939 LatexCommand ref
17940 reference "sec:slideQuirk"
17941
17942 \end_inset
17943
17944  that you don't place anything 
17945 \emph on
17946 into
17947 \emph default
17948  these two environments, however.
17949  When you create an 
17950 \family sans
17951 InvisibleText
17952 \family default
17953 , it inserts a centered, sky-blue label into the page reading 
17954 \begin_inset Quotes eld
17955 \end_inset
17956
17957 <Invisible Text Follows>
17958 \begin_inset Quotes erd
17959 \end_inset
17960
17961 .
17962  For paragraphs following this label, the parts of the 
17963 \family sans
17964 Slide
17965 \family default
17966  [or 
17967 \family sans
17968 Overlay
17969 \family default
17970 ; it doesn't matter which] where they would be contain instead blank space.
17971  
17972 \end_layout
17973
17974 \begin_layout Standard
17975 For 
17976 \family sans
17977 VisibleText
17978 \family default
17979 , the corresponding centered label is 
17980 \begin_inset Quotes eld
17981 \end_inset
17982
17983 <Visible Text Follows>
17984 \begin_inset Quotes erd
17985 \end_inset
17986
17987  in blazing green.
17988  Paragraphs following this label behave normally.
17989  Note that the beginning of a new 
17990 \family sans
17991 Slide
17992 \family default
17993
17994 \family sans
17995 Overlay
17996 \family default
17997 , or 
17998 \family sans
17999 Note
18000 \family default
18001  automatically shuts off an 
18002 \family sans
18003 InvisibleText
18004 \family default
18005 .
18006  It's therefore not necessary to use 
18007 \family sans
18008 VisibleText
18009 \family default
18010  at the end of a 
18011 \family sans
18012 Slide
18013 \family default
18014 .
18015 \end_layout
18016
18017 \begin_layout Standard
18018 By now, it should be obvious how to create overlay transparencies using
18019  the proper combination of 
18020 \family sans
18021 InvisibleText
18022 \family default
18023  and 
18024 \family sans
18025 VisibleText
18026 \family default
18027  on a 
18028 \family sans
18029 Slide
18030 \family default
18031  and 
18032 \family sans
18033 Overlay
18034 \family default
18035 :
18036 \end_layout
18037
18038 \begin_layout Enumerate
18039 Create a 
18040 \family sans
18041 Slide
18042 \family default
18043 , including everything that will appear on it, whether on the main slide
18044  or on the 
18045 \family sans
18046 Overlay
18047 \family default
18048 .
18049 \end_layout
18050
18051 \begin_layout Enumerate
18052 Before each figure or paragraph that will appear only on the 
18053 \family sans
18054 Overlay
18055 \family default
18056 , insert an 
18057 \family sans
18058 InvisibleText
18059 \family default
18060  environment.
18061  If necessary, insert a 
18062 \family sans
18063 VisibleText
18064 \family default
18065  environment after the 
18066 \family sans
18067 Overlay
18068 \family default
18069 -only text.
18070 \end_layout
18071
18072 \begin_layout Enumerate
18073 Start an 
18074 \family sans
18075 Overlay
18076 \family default
18077  immediately following the 
18078 \family sans
18079 Slide
18080 \family default
18081 .
18082 \end_layout
18083
18084 \begin_layout Enumerate
18085 Copy the contents of this 
18086 \family sans
18087 Slide
18088 \family default
18089  into the 
18090 \family sans
18091 Overlay
18092 \family default
18093 .
18094 \end_layout
18095
18096 \begin_layout Enumerate
18097 Within the 
18098 \family sans
18099 Overlay
18100 \family default
18101 , change all of the 
18102 \family sans
18103 InvisibleText
18104 \family default
18105  lines to 
18106 \family sans
18107 VisibleText
18108 \family default
18109  and vice-versa.
18110 \end_layout
18111
18112 \begin_layout Standard
18113 That's it.
18114  You've just made an 
18115 \family sans
18116 Overlay
18117 \family default
18118 .
18119 \end_layout
18120
18121 \begin_layout Standard
18122 There's one problem with the way I've designed the \SpecialChar LyX
18123  
18124 \family sans
18125 slides
18126 \family default
18127  class: you can't make text in the middle of a paragraph invisible, nor
18128  make text in the middle of an invisible paragraph visible again.
18129  To accomplish this feat, you'll need to use some inlined \SpecialChar LaTeX
18130  codes.
18131 \begin_inset Foot
18132 status collapsed
18133
18134 \begin_layout Plain Layout
18135 The commands of interest are: 
18136 \end_layout
18137
18138 \begin_layout Itemize
18139
18140 \family typewriter
18141 {
18142 \backslash
18143 invisible \SpecialChar ldots
18144  }
18145 \end_layout
18146
18147 \begin_layout Itemize
18148
18149 \family typewriter
18150 {
18151 \backslash
18152 visible \SpecialChar ldots
18153  }
18154 \end_layout
18155
18156 \begin_layout Plain Layout
18157 \SpecialChar ldots
18158 and need to be marked as \SpecialChar TeX
18159 .
18160  The text whose 
18161 \begin_inset Quotes eld
18162 \end_inset
18163
18164 visibility
18165 \begin_inset Quotes erd
18166 \end_inset
18167
18168  you wish to change goes in between the brackets [and after the 
18169 \family typewriter
18170
18171 \backslash
18172 invisible
18173 \family default
18174  or 
18175 \family typewriter
18176
18177 \backslash
18178 visible
18179 \family default
18180  command].
18181  If you don't know how to mark text as \SpecialChar TeX
18182 , see the appropriate section of
18183  the 
18184 \emph on
18185 User's Guide
18186 \emph default
18187 .
18188 \end_layout
18189
18190 \end_inset
18191
18192
18193 \end_layout
18194
18195 \begin_layout Subsubsection
18196 Using 
18197 \family sans
18198 Note
18199 \family default
18200  with 
18201 \family sans
18202 Slide
18203 \family default
18204
18205 \begin_inset CommandInset label
18206 LatexCommand label
18207 name "sec:slideNote"
18208
18209 \end_inset
18210
18211
18212 \end_layout
18213
18214 \begin_layout Standard
18215 Like an 
18216 \family sans
18217 Overlay
18218 \family default
18219 , a 
18220 \family sans
18221 Note
18222 \family default
18223  is associated with a 
18224 \begin_inset Quotes eld
18225 \end_inset
18226
18227 parent
18228 \begin_inset Quotes erd
18229 \end_inset
18230
18231  
18232 \family sans
18233 Slide
18234 \family default
18235 .
18236  Here, too, the \SpecialChar LyX
18237  
18238 \family sans
18239 slides
18240 \family default
18241  class provides visual cues.
18242  The label for a 
18243 \family sans
18244 Note
18245 \family default
18246  is shorter than that of a 
18247 \family sans
18248 Slide
18249 \family default
18250  [yet longer than that of an 
18251 \family sans
18252 Overlay
18253 \family default
18254 ] and, like the label of an 
18255 \family sans
18256 Overlay
18257 \family default
18258  is shockingly magenta.
18259  Additionally, the printed 
18260 \family sans
18261 Note
18262 \family default
18263  has the page number of its 
18264 \begin_inset Quotes eld
18265 \end_inset
18266
18267 parent
18268 \begin_inset Quotes erd
18269 \end_inset
18270
18271  
18272 \family sans
18273 Slide
18274 \family default
18275 , appended by 
18276 \begin_inset Quotes eld
18277 \end_inset
18278
18279
18280 \family typewriter
18281 -
18282 \family default
18283 1
18284 \begin_inset Quotes erd
18285 \end_inset
18286
18287
18288 \begin_inset Quotes eld
18289 \end_inset
18290
18291
18292 \family typewriter
18293 -
18294 \family default
18295 2
18296 \begin_inset Quotes erd
18297 \end_inset
18298
18299
18300 \begin_inset Quotes eld
18301 \end_inset
18302
18303
18304 \family typewriter
18305 -
18306 \family default
18307 3
18308 \begin_inset Quotes erd
18309 \end_inset
18310
18311 , etc.
18312  You can have multiple 
18313 \family sans
18314 Note
18315 \family default
18316 s associated with a single 
18317 \family sans
18318 Slide
18319 \family default
18320 , and, as with 
18321 \family sans
18322 Slide
18323 \family default
18324  and 
18325 \family sans
18326 Overlay
18327 \family default
18328 , you'll probably want to break up long 
18329 \family sans
18330 Note
18331 \family default
18332 s so that they fit on a single sheet of paper.
18333 \end_layout
18334
18335 \begin_layout Standard
18336 The purpose of a 
18337 \family sans
18338 Note
18339 \family default
18340  is obvious: it contains anything additional you might want to say about
18341  a 
18342 \family sans
18343 Slide
18344 \family default
18345 .
18346  It could also be used as a sheet of reminders for a particular 
18347 \family sans
18348 Slide
18349 \family default
18350 .
18351  In the case of the latter, you might want to make use of time markers.
18352  Currently, the \SpecialChar LyX
18353  
18354 \family sans
18355 slides
18356 \family default
18357  class has no 
18358 \begin_inset Quotes eld
18359 \end_inset
18360
18361 native
18362 \begin_inset Quotes erd
18363 \end_inset
18364
18365  support for time markers, a 
18366 \noun on
18367 Sli\SpecialChar TeX
18368
18369 \noun default
18370  feature.
18371  So, you'll have to resort to using the \SpecialChar LaTeX
18372  codes.
18373 \end_layout
18374
18375 \begin_layout Standard
18376 To use time markers, you'll need to specify the extra class option 
18377 \begin_inset Quotes eld
18378 \end_inset
18379
18380
18381 \family typewriter
18382 clock
18383 \family default
18384
18385 \begin_inset Quotes erd
18386 \end_inset
18387
18388  [see section
18389 \begin_inset space ~
18390 \end_inset
18391
18392
18393 \begin_inset CommandInset ref
18394 LatexCommand ref
18395 reference "sec:slidesetup"
18396
18397 \end_inset
18398
18399 ].
18400  This option turns on timing marks, which will appear in the lower-left-hand
18401  corner of every 
18402 \family sans
18403 Note
18404 \family default
18405  you generate.
18406  To set what appears in the time marker, you use the \SpecialChar LaTeX
18407  commands 
18408 \begin_inset Quotes eld
18409 \end_inset
18410
18411
18412 \family typewriter
18413
18414 \backslash
18415 settime{}
18416 \family default
18417
18418 \begin_inset Quotes erd
18419 \end_inset
18420
18421  and 
18422 \begin_inset Quotes eld
18423 \end_inset
18424
18425
18426 \family typewriter
18427
18428 \backslash
18429 addtime{}
18430 \family default
18431
18432 \begin_inset Quotes erd
18433 \end_inset
18434
18435 .
18436  The arguments of both commands are time measured in seconds.
18437  
18438 \begin_inset Quotes eld
18439 \end_inset
18440
18441
18442 \family typewriter
18443
18444 \backslash
18445 settime{}
18446 \family default
18447
18448 \begin_inset Quotes erd
18449 \end_inset
18450
18451  sets the time marker to a given time.
18452  
18453 \begin_inset Quotes eld
18454 \end_inset
18455
18456
18457 \family typewriter
18458
18459 \backslash
18460 addtime{}
18461 \family default
18462
18463 \begin_inset Quotes erd
18464 \end_inset
18465
18466  increments the time marker by the specified amount.
18467  Using time markers and 
18468 \family sans
18469 Note
18470 \family default
18471 s in this fashion, you can remind yourself how much time to spend on a particula
18472
18473 \family sans
18474 Slide
18475 \family default
18476 .
18477 \end_layout
18478
18479 \begin_layout Standard
18480 There's one last feature to describe.
18481  Clearly, you'd like to print out all of your 
18482 \family sans
18483 Slide
18484 \family default
18485 s and 
18486 \family sans
18487 Overlay
18488 \family default
18489 s on transparencies while printing all of your 
18490 \family sans
18491 Note
18492 \family default
18493 s on plain paper.
18494  However, a 
18495 \family sans
18496 Note
18497 \family default
18498  
18499 \emph on
18500 must
18501 \emph default
18502  follow the 
18503 \family sans
18504 Slide
18505 \family default
18506  with which it is associated.
18507  What's a person to do?
18508 \end_layout
18509
18510 \begin_layout Standard
18511 Luckily, there are two \SpecialChar LaTeX
18512  commands that allow you to select what to print
18513  out.
18514  Both must be placed into the preamble of your document.
18515  The command 
18516 \begin_inset Quotes eld
18517 \end_inset
18518
18519
18520 \family typewriter
18521
18522 \backslash
18523 onlyslides{
18524 \backslash
18525 slides}
18526 \family default
18527
18528 \begin_inset Quotes erd
18529 \end_inset
18530
18531  will cause the output to contain only the 
18532 \family sans
18533 Slide
18534 \family default
18535 s and 
18536 \family sans
18537 Overlay
18538 \family default
18539 s.
18540  Correspondingly, the command 
18541 \begin_inset Quotes eld
18542 \end_inset
18543
18544
18545 \family typewriter
18546
18547 \backslash
18548 onlynotes{
18549 \backslash
18550 notes}
18551 \family default
18552
18553 \begin_inset Quotes erd
18554 \end_inset
18555
18556  prevents the output of anything but 
18557 \family sans
18558 Note
18559 \family default
18560 s.
18561  I'd advise placing both commands in the preamble and initially comment
18562  both out.
18563  You can then preview your entire presentation as you write.
18564  When you're done writing, you can then uncomment one of the two to select
18565  what you want to print.
18566  I like to uncomment 
18567 \begin_inset Quotes eld
18568 \end_inset
18569
18570
18571 \family typewriter
18572
18573 \backslash
18574 onlyslides{
18575 \backslash
18576 slides}
18577 \family default
18578
18579 \begin_inset Quotes erd
18580 \end_inset
18581
18582  , print to a file with 
18583 \begin_inset Quotes eld
18584 \end_inset
18585
18586
18587 \family typewriter
18588 -slides
18589 \family default
18590
18591 \begin_inset Quotes erd
18592 \end_inset
18593
18594  in its name, comment it back out, then uncomment 
18595 \begin_inset Quotes eld
18596 \end_inset
18597
18598
18599 \family typewriter
18600
18601 \backslash
18602 onlynotes{
18603 \backslash
18604 notes}
18605 \family default
18606
18607 \begin_inset Quotes erd
18608 \end_inset
18609
18610  and print to a 
18611 \begin_inset Quotes eld
18612 \end_inset
18613
18614
18615 \family typewriter
18616 *-notes.ps
18617 \family default
18618
18619 \begin_inset Quotes erd
18620 \end_inset
18621
18622  file.
18623  I can then send either file to a printer, loading transparencies or plain
18624  paper as appropriate.
18625 \end_layout
18626
18627 \begin_layout Standard
18628 You can also provide other arguments to the 
18629 \begin_inset Quotes eld
18630 \end_inset
18631
18632
18633 \family typewriter
18634
18635 \backslash
18636 onlyslides{}
18637 \family default
18638
18639 \begin_inset Quotes erd
18640 \end_inset
18641
18642  and 
18643 \begin_inset Quotes eld
18644 \end_inset
18645
18646
18647 \family typewriter
18648
18649 \backslash
18650 onlynotes{}
18651 \family default
18652
18653 \begin_inset Quotes erd
18654 \end_inset
18655
18656  commands.
18657  See a good \SpecialChar LaTeX
18658  book for details.
18659 \end_layout
18660
18661 \begin_layout Subsection
18662 The 
18663 \family sans
18664 slides
18665 \family default
18666  Class Template File
18667 \end_layout
18668
18669 \begin_layout Standard
18670 I have also provided a template file, 
18671 \begin_inset Quotes eld
18672 \end_inset
18673
18674
18675 \family typewriter
18676 slides.lyx
18677 \family default
18678
18679 \begin_inset Quotes erd
18680 \end_inset
18681
18682 , with the 
18683 \family sans
18684 slides
18685 \family default
18686  class.
18687  To use it, begin your new presentation with 
18688 \family sans
18689 File\SpecialChar menuseparator
18690 New
18691 \begin_inset space ~
18692 \end_inset
18693
18694 from
18695 \begin_inset space ~
18696 \end_inset
18697
18698 Template
18699 \family default
18700 .
18701  Your new \SpecialChar LyX
18702  presentation file will contain an example 
18703 \family sans
18704 Slide
18705 \family default
18706  – 
18707 \family sans
18708 Overlay
18709 \family default
18710  – 
18711 \family sans
18712 Note
18713 \family default
18714  triplet.
18715  The 
18716 \family sans
18717 Slide
18718 \family default
18719  and 
18720 \family sans
18721 Overlay
18722 \family default
18723  additionally contain an example of the use of 
18724 \family sans
18725 InvisibleText
18726 \family default
18727  and 
18728 \family sans
18729 VisibleText
18730 \family default
18731 .
18732  Lastly, the preamble will contain:
18733 \end_layout
18734
18735 \begin_layout LyX-Code
18736 % Uncomment to print out only slides and overlays
18737 \end_layout
18738
18739 \begin_layout LyX-Code
18740 %
18741 \end_layout
18742
18743 \begin_layout LyX-Code
18744 %
18745 \backslash
18746 onlyslides{
18747 \backslash
18748 slides}
18749 \begin_inset Newline newline
18750 \end_inset
18751
18752  
18753 \end_layout
18754
18755 \begin_layout LyX-Code
18756 % Uncomment to print out only notes
18757 \end_layout
18758
18759 \begin_layout LyX-Code
18760 %
18761 \end_layout
18762
18763 \begin_layout LyX-Code
18764 %
18765 \backslash
18766 onlynotes{
18767 \backslash
18768 notes}
18769 \end_layout
18770
18771 \begin_layout Standard
18772 One final thing: I created this class to support the \SpecialChar LaTeX2e
18773  
18774 \begin_inset Quotes eld
18775 \end_inset
18776
18777
18778 \noun on
18779 Sli\SpecialChar TeX
18780
18781 \noun default
18782  emulation
18783 \begin_inset Quotes erd
18784 \end_inset
18785
18786  class, one of the built-in \SpecialChar LaTeX2e
18787  classes.
18788  Neither I nor the rest of the \SpecialChar LyX
18789  Team endorse or oppose the use of this built-in
18790  slide class.
18791  It's here if you want it or need it.
18792  There exist other \SpecialChar LaTeX2e
18793  classes for creating presentations, such as the 
18794 \family sans
18795 Foils
18796 \family default
18797  class [see section
18798 \begin_inset space ~
18799 \end_inset
18800
18801
18802 \begin_inset CommandInset ref
18803 LatexCommand ref
18804 reference "sec:foiltex"
18805
18806 \end_inset
18807
18808 ] or the 
18809 \begin_inset Quotes eld
18810 \end_inset
18811
18812
18813 \family typewriter
18814 seminar
18815 \family default
18816
18817 \begin_inset Quotes erd
18818 \end_inset
18819
18820  package [present on some \SpecialChar TeX
18821  distributions].
18822  The latter is not yet supported under \SpecialChar LyX
18823 .
18824 \begin_inset Foot
18825 status collapsed
18826
18827 \begin_layout Plain Layout
18828 Perhaps you can take on the task\SpecialChar ldots
18829
18830 \end_layout
18831
18832 \end_inset
18833
18834  I know nothing about these other classes.
18835  Try them out to see what sort of alternative they provide.
18836 \end_layout
18837
18838 \begin_layout Chapter
18839 \SpecialChar LyX
18840  Features needing Extra Software
18841 \end_layout
18842
18843 \begin_layout Section
18844 Checking \SpecialChar TeX
18845
18846 \end_layout
18847
18848 \begin_layout Standard
18849 by 
18850 \noun on
18851 Asger Alstrup
18852 \end_layout
18853
18854 \begin_layout Subsection
18855 Introduction
18856 \end_layout
18857
18858 \begin_layout Standard
18859 If you have the 
18860 \family typewriter
18861 chktex
18862 \family default
18863  program installed
18864 \begin_inset Foot
18865 status collapsed
18866
18867 \begin_layout Plain Layout
18868
18869 \family typewriter
18870 chktex
18871 \family default
18872  is not yet available when you are using the \SpecialChar LaTeX
18873  distribution MiK\SpecialChar TeX
18874 .
18875 \end_layout
18876
18877 \end_inset
18878
18879 , you'll find in the 
18880 \family sans
18881 Tools
18882 \family default
18883  menu the entry: 
18884 \family sans
18885 Check
18886 \begin_inset space ~
18887 \end_inset
18888
18889 TeX
18890 \family default
18891 .
18892  You can get 
18893 \family typewriter
18894 chktex
18895 \family default
18896  from CTAN,
18897 \begin_inset Newline newline
18898 \end_inset
18899
18900
18901 \begin_inset CommandInset href
18902 LatexCommand href
18903 target "https://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
18904 literal "false"
18905
18906 \end_inset
18907
18908 .
18909 \end_layout
18910
18911 \begin_layout Standard
18912 The 
18913 \family sans
18914 Chk\SpecialChar TeX
18915
18916 \family default
18917  package is a program that was written by 
18918 \begin_inset Flex Noun
18919 status collapsed
18920
18921 \begin_layout Plain Layout
18922 Jens T.
18923 \begin_inset space ~
18924 \end_inset
18925
18926 Berger Thielemann
18927 \end_layout
18928
18929 \end_inset
18930
18931  in frustration because some constructs in \SpecialChar LaTeX
18932  are sometimes non-intuitive,
18933  and easy to forget.
18934  The program runs over your \SpecialChar LaTeX
18935  file, checks the integrity of the file, and
18936  flags some common errors.
18937  In other technical words, it is 
18938 \family typewriter
18939 lint
18940 \family default
18941  for \SpecialChar LaTeX
18942 .
18943 \end_layout
18944
18945 \begin_layout Standard
18946 Well, what is a syntax checker doing in \SpecialChar LyX
18947  which is supposed to produce correct
18948  \SpecialChar LaTeX
18949  anyways? The answer is simple: Just as 
18950 \family typewriter
18951 Lint
18952 \family default
18953  not only checks the 
18954 \emph on
18955 syntax
18956 \emph default
18957  of C programs, but also does 
18958 \emph on
18959 semantic
18960 \emph default
18961  checks for type-errors, 
18962 \family sans
18963 Chk\SpecialChar TeX
18964
18965 \family default
18966  catches some common 
18967 \emph on
18968 typographic
18969 \emph default
18970  errors, in addition to the syntactical ones.
18971  Specifically, 
18972 \family sans
18973 Chk\SpecialChar TeX
18974
18975 \family default
18976  is capable of detecting several common errors, such as
18977 \end_layout
18978
18979 \begin_layout Itemize
18980 Ellipsis detection:
18981 \begin_inset Newline newline
18982 \end_inset
18983
18984 Use \SpecialChar ldots
18985  instead of ...
18986 \end_layout
18987
18988 \begin_layout Itemize
18989 No space in front of/after parenthesis:
18990 \begin_inset Newline newline
18991 \end_inset
18992
18993 ( wrong spacing )
18994 \end_layout
18995
18996 \begin_layout Itemize
18997 Enforcement of normal space after common abbreviations:
18998 \begin_inset Newline newline
18999 \end_inset
19000
19001 e.
19002 \begin_inset space \thinspace{}
19003 \end_inset
19004
19005 g.
19006 \begin_inset space \space{}
19007 \end_inset
19008
19009 is too wide spacing.
19010 \end_layout
19011
19012 \begin_layout Itemize
19013 Enforcement of end-of-sentence space when the last sentence ends with a
19014  capital letter:
19015 \begin_inset Newline newline
19016 \end_inset
19017
19018 This is a TEST.
19019  And this is wrong spacing.
19020 \end_layout
19021
19022 \begin_layout Itemize
19023 Space in front of labels and similar commands:
19024 \begin_inset Newline newline
19025 \end_inset
19026
19027 The label should stick right up to the text to avoid falling to a wrong
19028  page.
19029  
19030 \begin_inset CommandInset label
19031 LatexCommand label
19032 name "sec:chktex"
19033
19034 \end_inset
19035
19036  
19037 \begin_inset Foot
19038 status collapsed
19039
19040 \begin_layout Plain Layout
19041 This footnote is in danger of falling off to a wrong page
19042 \end_layout
19043
19044 \end_inset
19045
19046  The label is separated too much.
19047 \end_layout
19048
19049 \begin_layout Itemize
19050 Space in front of references, instead of hard spaces:
19051 \begin_inset Newline newline
19052 \end_inset
19053
19054 If you have bad luck, the text will break right between the referenced text
19055  and reference number, and that's a pity.
19056  See section 
19057 \begin_inset CommandInset ref
19058 LatexCommand ref
19059 reference "sec:chktex"
19060
19061 \end_inset
19062
19063 .
19064 \end_layout
19065
19066 \begin_layout Itemize
19067 Use of 
19068 \begin_inset Quotes eld
19069 \end_inset
19070
19071 x
19072 \begin_inset Quotes erd
19073 \end_inset
19074
19075  instead of 
19076 \begin_inset Formula $\times$
19077 \end_inset
19078
19079  between numbers:
19080 \begin_inset Newline newline
19081 \end_inset
19082
19083 2x2 looks cheap compared to 
19084 \begin_inset Formula $2\times2$
19085 \end_inset
19086
19087 .
19088 \end_layout
19089
19090 \begin_layout Standard
19091 and more \SpecialChar ldots
19092  It is an invaluable tool when you are 
19093 \begin_inset Quotes eld
19094 \end_inset
19095
19096 finishing up
19097 \begin_inset Quotes erd
19098 \end_inset
19099
19100  your document before printing, and you should run it right after the obligatory
19101  spelling check, and before you go fine tuning the typesetting.
19102 \end_layout
19103
19104 \begin_layout Subsection
19105 How to use it
19106 \end_layout
19107
19108 \begin_layout Standard
19109 If you have the program installed, usage is as simple as choosing 
19110 \family sans
19111 Tools\SpecialChar menuseparator
19112 Check
19113 \begin_inset space ~
19114 \end_inset
19115
19116 TeX
19117 \family default
19118 .
19119  This will make \SpecialChar LyX
19120  generate a \SpecialChar LaTeX
19121  file of your document, start 
19122 \family sans
19123 Chk\SpecialChar TeX
19124
19125 \family default
19126  to check it, and then make \SpecialChar LyX
19127  insert 
19128 \begin_inset Quotes eld
19129 \end_inset
19130
19131 error boxes
19132 \begin_inset Quotes erd
19133 \end_inset
19134
19135  with the warnings from 
19136 \family sans
19137 Chk\SpecialChar TeX
19138
19139 \family default
19140 , if there were any.
19141  The warnings will be placed close to the point of the mistake, and you
19142  can quickly find them by using the 
19143 \family sans
19144 Navigate\SpecialChar menuseparator
19145 Error
19146 \family default
19147  menu item, or the shortcut key 
19148 \family sans
19149 C-g
19150 \family default
19151  from the default 
19152 \family typewriter
19153 cua
19154 \family default
19155  bind file.
19156  Open the error boxes by clicking on them with the mouse, or use the shortcut
19157  key 
19158 \family sans
19159 C-i
19160 \family default
19161  from 
19162 \family typewriter
19163 cua
19164 \family default
19165  bindings, or the corresponding 
19166 \family sans
19167 C-o
19168 \family default
19169  for the alternate 
19170 \family typewriter
19171 emacs
19172 \family default
19173  bind file.
19174  Read the warning and correct the mistake, if it is a mistake.
19175  If you have trouble understanding what the warning is about, you can safely
19176  ignore it.
19177  Remember that there is a hidden layer between the document on screen and
19178  the technical details in invoking 
19179 \family sans
19180 Chk\SpecialChar TeX
19181
19182 \family default
19183 , and this gap can make some warnings seem arcane or just plain silly.
19184 \end_layout
19185
19186 \begin_layout Standard
19187 This document is an excellent testing bed for the feature, and it should
19188  provide quite a few warnings for you to fiddle with.
19189  Since computers are only so smart, expect most of the warnings to be false
19190  alarms, though.
19191 \end_layout
19192
19193 \begin_layout Subsection
19194 How to fine tune it
19195 \end_layout
19196
19197 \begin_layout Standard
19198 Sometimes, you'll find that 
19199 \family sans
19200 Chk\SpecialChar TeX
19201
19202 \family default
19203  makes more noise than suits your mood.
19204  Then you can choose not to use it, wait until your mood changes, or try
19205  to customize 
19206 \family sans
19207 Chk\SpecialChar TeX
19208
19209 \family default
19210  to get better along with you.
19211 \end_layout
19212
19213 \begin_layout Standard
19214 Although 
19215 \family sans
19216 Chk\SpecialChar TeX
19217
19218 \family default
19219  
19220 \emph on
19221 is
19222 \emph default
19223  very configurable and extensible, you should not expect to solve all problems
19224  with 
19225 \family sans
19226 Chk\SpecialChar TeX
19227
19228 \family default
19229  in \SpecialChar LyX
19230  this way.
19231  Since \SpecialChar LyX
19232  has to generate a somewhat special \SpecialChar LaTeX
19233  file to be able to match the
19234  line numbers from the 
19235 \family sans
19236 Chk\SpecialChar TeX
19237
19238 \family default
19239  output
19240 \begin_inset Foot
19241 status collapsed
19242
19243 \begin_layout Plain Layout
19244 You can inspect the specific output from 
19245 \family sans
19246 chktex
19247 \family default
19248  by using 
19249 \family sans
19250 Document\SpecialChar menuseparator
19251 \SpecialChar LaTeX
19252
19253 \begin_inset space ~
19254 \end_inset
19255
19256 Log
19257 \family default
19258  right after a 
19259 \family sans
19260 chktex
19261 \family default
19262  run.
19263 \end_layout
19264
19265 \end_inset
19266
19267  to the internal document structure, some of the warnings will not appear
19268  correctly.
19269  There are two things you can do about this:
19270 \end_layout
19271
19272 \begin_layout Itemize
19273 Fine tune the 
19274 \family sans
19275 Chk\SpecialChar TeX
19276
19277 \family default
19278  invocation command line in 
19279 \begin_inset Flex Noun
19280 status collapsed
19281
19282 \begin_layout Plain Layout
19283 Tools\SpecialChar menuseparator
19284 Preferences\SpecialChar menuseparator
19285 Output\SpecialChar menuseparator
19286 LaTeX\SpecialChar menuseparator
19287 CheckTeX command
19288 \end_layout
19289
19290 \end_inset
19291
19292 , or the global 
19293 \family sans
19294 Chk\SpecialChar TeX
19295
19296 \family default
19297  installation configuration file (usually with the file 
19298 \family typewriter
19299 chktexrc
19300 \family default
19301 ).
19302  See below to learn what warnings can be enabled and disabled on the command
19303  line.
19304 \end_layout
19305
19306 \begin_layout Itemize
19307 Export your document as a raw \SpecialChar LaTeX
19308  file using 
19309 \family sans
19310 File\SpecialChar menuseparator
19311 Export\SpecialChar menuseparator
19312 \SpecialChar LaTeX
19313
19314 \family default
19315  and run 
19316 \family typewriter
19317 chktex
19318 \family default
19319  manually on that.
19320  Invoked in this way, it can be a hassle to find the corresponding place
19321  in the document inside \SpecialChar LyX
19322 , but with a little patience, you should be able
19323  to do it.
19324 \end_layout
19325
19326 \begin_layout Standard
19327 Here follows the warning messages that can be enabled and disabled in 
19328 \family sans
19329 Preferences
19330 \family default
19331 .
19332  Use 
19333 \family typewriter
19334 -n#
19335 \family default
19336  to disable a warning, and 
19337 \family typewriter
19338 -w#
19339 \family default
19340  to enable a warning.
19341  The emphasized entries are disabled by default, because the default is
19342  "
19343 \family typewriter
19344 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
19345 \family default
19346 ".
19347 \end_layout
19348
19349 \begin_layout Standard
19350 Notice that you should only use the options that enable and disable warnings,
19351  because \SpecialChar LyX
19352  relies on some of the other command line parameters to be set
19353  in a specific way to have a chance to communicate with 
19354 \family typewriter
19355 chktex
19356 \family default
19357 .
19358 \end_layout
19359
19360 \begin_layout Enumerate
19361
19362 \size small
19363 \emph on
19364 Command terminated with space.
19365 \end_layout
19366
19367 \begin_layout Enumerate
19368
19369 \size small
19370 Non-breaking space (
19371 \begin_inset Quotes eld
19372 \end_inset
19373
19374
19375 \family typewriter
19376 ~
19377 \family default
19378
19379 \begin_inset Quotes erd
19380 \end_inset
19381
19382 ) should have been used.
19383 \end_layout
19384
19385 \begin_layout Enumerate
19386
19387 \size small
19388 \emph on
19389 You should enclose the previous parenthesis with 
19390 \begin_inset Quotes eld
19391 \end_inset
19392
19393
19394 \family typewriter
19395 {}
19396 \family default
19397
19398 \begin_inset Quotes erd
19399 \end_inset
19400
19401 .
19402 \end_layout
19403
19404 \begin_layout Enumerate
19405
19406 \size small
19407 Italic correction (
19408 \begin_inset Quotes eld
19409 \end_inset
19410
19411
19412 \family typewriter
19413
19414 \backslash
19415 /
19416 \family default
19417
19418 \begin_inset Quotes erd
19419 \end_inset
19420
19421 ) found in non-italic buffer.
19422 \end_layout
19423
19424 \begin_layout Enumerate
19425
19426 \size small
19427 Italic correction (
19428 \begin_inset Quotes eld
19429 \end_inset
19430
19431
19432 \family typewriter
19433
19434 \backslash
19435 /
19436 \family default
19437
19438 \begin_inset Quotes erd
19439 \end_inset
19440
19441 ) found more than once.
19442 \end_layout
19443
19444 \begin_layout Enumerate
19445
19446 \size small
19447 \emph on
19448 No italic correction (
19449 \begin_inset Quotes eld
19450 \end_inset
19451
19452
19453 \family typewriter
19454
19455 \backslash
19456 /
19457 \family default
19458
19459 \begin_inset Quotes erd
19460 \end_inset
19461
19462 ) found.
19463 \end_layout
19464
19465 \begin_layout Enumerate
19466
19467 \size small
19468 Accent command 
19469 \begin_inset Quotes eld
19470 \end_inset
19471
19472
19473 \family typewriter
19474 cmd
19475 \family default
19476
19477 \begin_inset Quotes erd
19478 \end_inset
19479
19480  needs use of 
19481 \begin_inset Quotes eld
19482 \end_inset
19483
19484
19485 \family typewriter
19486 cmd
19487 \family default
19488
19489 \begin_inset Quotes erd
19490 \end_inset
19491
19492 .
19493 \end_layout
19494
19495 \begin_layout Enumerate
19496
19497 \size small
19498 Wrong length of dash may have been used.
19499 \end_layout
19500
19501 \begin_layout Enumerate
19502
19503 \size small
19504 \emph on
19505 \begin_inset Quotes eld
19506 \end_inset
19507
19508
19509 \family typewriter
19510 %s
19511 \family default
19512
19513 \begin_inset Quotes erd
19514 \end_inset
19515
19516  expected, found 
19517 \begin_inset Quotes eld
19518 \end_inset
19519
19520
19521 \family typewriter
19522 %s
19523 \family default
19524
19525 \begin_inset Quotes erd
19526 \end_inset
19527
19528 .
19529 \end_layout
19530
19531 \begin_layout Enumerate
19532
19533 \size small
19534 Solo 
19535 \begin_inset Quotes eld
19536 \end_inset
19537
19538
19539 \family typewriter
19540 %s
19541 \family default
19542
19543 \begin_inset Quotes erd
19544 \end_inset
19545
19546  found.
19547 \end_layout
19548
19549 \begin_layout Enumerate
19550
19551 \size small
19552 You should use 
19553 \begin_inset Quotes eld
19554 \end_inset
19555
19556
19557 \family typewriter
19558 %s
19559 \family default
19560
19561 \begin_inset Quotes erd
19562 \end_inset
19563
19564  to achieve an ellipsis.
19565 \end_layout
19566
19567 \begin_layout Enumerate
19568
19569 \size small
19570 Inter-word spacing (
19571 \begin_inset Quotes eld
19572 \end_inset
19573
19574
19575 \family typewriter
19576
19577 \backslash
19578
19579 \family default
19580  
19581 \begin_inset Quotes eld
19582 \end_inset
19583
19584 ) should perhaps be used.
19585 \end_layout
19586
19587 \begin_layout Enumerate
19588
19589 \size small
19590 Inter-sentence spacing (
19591 \begin_inset Quotes eld
19592 \end_inset
19593
19594
19595 \family typewriter
19596
19597 \backslash
19598 @
19599 \family default
19600
19601 \begin_inset Quotes erd
19602 \end_inset
19603
19604 ) should perhaps be used.
19605 \end_layout
19606
19607 \begin_layout Enumerate
19608
19609 \size small
19610 Could not find argument for command.
19611 \end_layout
19612
19613 \begin_layout Enumerate
19614
19615 \size small
19616 No match found for 
19617 \begin_inset Quotes eld
19618 \end_inset
19619
19620
19621 \family typewriter
19622 %s
19623 \family default
19624
19625 \begin_inset Quotes erd
19626 \end_inset
19627
19628 .
19629 \end_layout
19630
19631 \begin_layout Enumerate
19632
19633 \size small
19634 Math mode still on at end of \SpecialChar LaTeX
19635  file.
19636 \end_layout
19637
19638 \begin_layout Enumerate
19639
19640 \size small
19641 Number of 
19642 \begin_inset Quotes eld
19643 \end_inset
19644
19645
19646 \family typewriter
19647 char
19648 \family default
19649
19650 \begin_inset Quotes erd
19651 \end_inset
19652
19653  doesn't match the number of 
19654 \begin_inset Quotes eld
19655 \end_inset
19656
19657
19658 \family typewriter
19659 char
19660 \family default
19661
19662 \begin_inset Quotes erd
19663 \end_inset
19664
19665 .
19666 \end_layout
19667
19668 \begin_layout Enumerate
19669
19670 \size small
19671 You should use either 
19672 \family typewriter
19673
19674 \begin_inset Quotes eld
19675 \end_inset
19676
19677
19678 \family default
19679  or 
19680 \family typewriter
19681
19682 \begin_inset Quotes erd
19683 \end_inset
19684
19685
19686 \family default
19687  as an alternative to 
19688 \begin_inset Quotes eld
19689 \end_inset
19690
19691
19692 \family typewriter
19693 "
19694 \family default
19695
19696 \begin_inset Quotes erd
19697 \end_inset
19698
19699 .
19700 \end_layout
19701
19702 \begin_layout Enumerate
19703
19704 \size small
19705 You should use "
19706 \family typewriter
19707 '
19708 \family default
19709 " (ASCII 39) instead of "
19710 \family typewriter
19711 ´
19712 \family default
19713 " (ASCII 180).
19714 \end_layout
19715
19716 \begin_layout Enumerate
19717
19718 \size small
19719 User-specified pattern found.
19720 \end_layout
19721
19722 \begin_layout Enumerate
19723
19724 \size small
19725 This command might not be intended.
19726 \end_layout
19727
19728 \begin_layout Enumerate
19729
19730 \size small
19731 \emph on
19732 Comment displayed.
19733 \end_layout
19734
19735 \begin_layout Enumerate
19736
19737 \size small
19738 Either 
19739 \family typewriter
19740 ''
19741 \backslash
19742 ,'
19743 \family default
19744  or 
19745 \family typewriter
19746 '
19747 \backslash
19748 ,''
19749 \family default
19750  will look better.
19751 \end_layout
19752
19753 \begin_layout Enumerate
19754
19755 \size small
19756 Delete this space to maintain correct page references.
19757 \end_layout
19758
19759 \begin_layout Enumerate
19760
19761 \size small
19762 \emph on
19763 You might wish to put this between a pair of 
19764 \begin_inset Quotes eld
19765 \end_inset
19766
19767
19768 \family typewriter
19769 {}
19770 \family default
19771
19772 \begin_inset Quotes erd
19773 \end_inset
19774
19775 .
19776 \end_layout
19777
19778 \begin_layout Enumerate
19779
19780 \size small
19781 You ought to remove spaces in front of punctuation.
19782 \end_layout
19783
19784 \begin_layout Enumerate
19785
19786 \size small
19787 Could not execute \SpecialChar LaTeX
19788  command.
19789 \end_layout
19790
19791 \begin_layout Enumerate
19792
19793 \size small
19794 Don't use 
19795 \family typewriter
19796
19797 \backslash
19798 /
19799 \family default
19800  in front of small punctuation.
19801 \end_layout
19802
19803 \begin_layout Enumerate
19804
19805 \family typewriter
19806 \size small
19807 $
19808 \backslash
19809 times$
19810 \family default
19811  may look prettier here.
19812 \end_layout
19813
19814 \begin_layout Enumerate
19815
19816 \size small
19817 \emph on
19818 Multiple spaces detected in output.
19819 \end_layout
19820
19821 \begin_layout Enumerate
19822
19823 \size small
19824 This text may be ignored.
19825 \end_layout
19826
19827 \begin_layout Enumerate
19828
19829 \size small
19830 Use 
19831 \family typewriter
19832
19833 \begin_inset Quotes eld
19834 \end_inset
19835
19836
19837 \family default
19838  to begin quotation, not 
19839 \family typewriter
19840 '
19841 \family default
19842 .
19843 \end_layout
19844
19845 \begin_layout Enumerate
19846
19847 \size small
19848 Use 
19849 \family typewriter
19850 '
19851 \family default
19852  to end quotation, not 
19853 \family typewriter
19854
19855 \begin_inset Quotes eld
19856 \end_inset
19857
19858
19859 \family default
19860 .
19861 \end_layout
19862
19863 \begin_layout Enumerate
19864
19865 \size small
19866 Don't mix quotes.
19867 \end_layout
19868
19869 \begin_layout Enumerate
19870
19871 \size small
19872 You should perhaps use 
19873 \begin_inset Quotes eld
19874 \end_inset
19875
19876
19877 \family typewriter
19878 cmd
19879 \family default
19880
19881 \begin_inset Quotes erd
19882 \end_inset
19883
19884  instead.
19885 \end_layout
19886
19887 \begin_layout Enumerate
19888
19889 \size small
19890 You should put a space in front of/after parenthesis.
19891 \end_layout
19892
19893 \begin_layout Enumerate
19894
19895 \size small
19896 You should avoid spaces in front of/after parenthesis.
19897 \end_layout
19898
19899 \begin_layout Enumerate
19900
19901 \size small
19902 \emph on
19903 You should not use punctuation in front of/after quotes.
19904 \end_layout
19905
19906 \begin_layout Enumerate
19907
19908 \size small
19909 Double space found.
19910 \end_layout
19911
19912 \begin_layout Enumerate
19913
19914 \size small
19915 You should put punctuation outside inner/inside display math mode.
19916 \end_layout
19917
19918 \begin_layout Enumerate
19919
19920 \size small
19921 You ought to not use primitive \SpecialChar TeX
19922  in \SpecialChar LaTeX
19923  code.
19924 \end_layout
19925
19926 \begin_layout Enumerate
19927
19928 \size small
19929 You should remove spaces in front of 
19930 \begin_inset Quotes eld
19931 \end_inset
19932
19933
19934 \family typewriter
19935 %s
19936 \family default
19937
19938 \begin_inset Quotes erd
19939 \end_inset
19940
19941
19942 \end_layout
19943
19944 \begin_layout Enumerate
19945
19946 \size small
19947 \begin_inset Quotes eld
19948 \end_inset
19949
19950
19951 \family typewriter
19952 %s
19953 \family default
19954
19955 \begin_inset Quotes erd
19956 \end_inset
19957
19958  is normally not followed by 
19959 \begin_inset Quotes eld
19960 \end_inset
19961
19962
19963 \family typewriter
19964 %c
19965 \family default
19966
19967 \begin_inset Quotes erd
19968 \end_inset
19969
19970 .
19971 \end_layout
19972
19973 \begin_layout Standard
19974 In later versions of \SpecialChar LyX
19975 , we hope to provide a more complete interface to this
19976  tool (and it's smaller cousin 
19977 \family typewriter
19978 lacheck
19979 \family default
19980 ) to exploit the full power of it.
19981  But it's not exactly useless as it is now: go try it on one of your existing
19982  documents of a certain length and be surprised.
19983 \end_layout
19984
19985 \begin_layout Section
19986 Version Control in \SpecialChar LyX
19987
19988 \end_layout
19989
19990 \begin_layout Standard
19991 by
19992 \noun on
19993  Lars Gullik Bjønnes 
19994 \noun default
19995 and 
19996 \noun on
19997 Pavel Sanda
19998 \end_layout
19999
20000 \begin_layout Subsection
20001 Introduction
20002 \end_layout
20003
20004 \begin_layout Standard
20005 \SpecialChar LyX
20006  supports some of the most basic RCS/CVS/SVN/GIT commands.
20007  If you need something a bit more sophisticated you will have to do that
20008  manually in a terminal.
20009 \end_layout
20010
20011 \begin_layout Standard
20012 Also note that CVS support is not as good as subversion support, so we advise
20013  using SVN instead.
20014  A good place to start learning Subversion is the SVN Book
20015 \begin_inset Foot
20016 status collapsed
20017
20018 \begin_layout Plain Layout
20019 \begin_inset CommandInset href
20020 LatexCommand href
20021 target "http://svnbook.red-bean.com/"
20022 literal "false"
20023
20024 \end_inset
20025
20026
20027 \end_layout
20028
20029 \end_inset
20030
20031 .
20032  In the case of RCS you should read 
20033 \begin_inset Quotes eld
20034 \end_inset
20035
20036 rcsintro
20037 \begin_inset Quotes erd
20038 \end_inset
20039
20040  (a man file, read it with 
20041 \family typewriter
20042 man rcsintro
20043 \family default
20044 ).
20045  This file describes all the basic features of RCS.
20046  You should especially notice the comment about a RCS directory, and the
20047  notion of a master RCS file (the file ending in 
20048 \family typewriter
20049 ,v
20050 \family default
20051 ).
20052 \end_layout
20053
20054 \begin_layout Standard
20055 Before you begin to use the version control features in \SpecialChar LyX
20056 , you should be
20057  familiar with RCS/CVS/SVN/GIT usage.
20058  The implementation in \SpecialChar LyX
20059  assumes a recent version of the GNU RCS or CVS/SVN
20060  package — no guarantees are made for older versions.
20061  Most of the log messages are not currently displayed after operations —
20062  you can check them in the Messages pane if you are unsure.
20063  Regular users of version control will appreciate the VC toolbar, which
20064  can be enabled via 
20065 \family sans
20066 View\SpecialChar menuseparator
20067 Toolbars\SpecialChar menuseparator
20068 Version
20069 \begin_inset space ~
20070 \end_inset
20071
20072 Control
20073 \family default
20074 .
20075 \end_layout
20076
20077 \begin_layout Standard
20078 For introducing your own external commands consult 
20079 \begin_inset Flex Code
20080 status collapsed
20081
20082 \begin_layout Plain Layout
20083 vc-command
20084 \end_layout
20085
20086 \end_inset
20087
20088  in the manual 
20089 \emph on
20090 \SpecialChar LyX
20091  Functions
20092 \emph default
20093 .
20094 \end_layout
20095
20096 \begin_layout Standard
20097 It is strongly recommended to store documents in uncompressed format if
20098  using version control (uncheck 
20099 \family sans
20100 Document\SpecialChar menuseparator
20101 Compressed
20102 \family default
20103  if it is checked): Uncompressed LyX documents are text files and therefore
20104  for merging two different versions by version control systems.
20105  Compressed LyX documents are binary files, which cannot be merged by version
20106  control systems.
20107 \end_layout
20108
20109 \begin_layout Subsection
20110 RCS commands in \SpecialChar LyX
20111
20112 \end_layout
20113
20114 \begin_layout Standard
20115 The following sections describe the RCS commands supported by \SpecialChar LyX
20116 .
20117  You can find them in the 
20118 \family sans
20119 File\SpecialChar menuseparator
20120 Version
20121 \begin_inset space ~
20122 \end_inset
20123
20124 Control
20125 \family default
20126  submenu.
20127  \SpecialChar LyX
20128  was tested against RCS 5.7/5.8.
20129 \end_layout
20130
20131 \begin_layout Subsubsection
20132
20133 \family sans
20134 Register
20135 \end_layout
20136
20137 \begin_layout Standard
20138 If your document is not under revision control, this is the only item shown
20139  in the menu.
20140  And if it is under revision control, the 
20141 \family sans
20142 Register
20143 \family default
20144  item is not visible.
20145  
20146 \end_layout
20147
20148 \begin_layout Standard
20149 This command registers your document with RCS (unless you are under the
20150  directory managed by CVS)\SpecialChar endofsentence
20151  You are asked interactively to supply an initial
20152  description of the document.
20153  The document is now set in Read-Only mode and you have to 
20154 \family sans
20155 Check
20156 \begin_inset space ~
20157 \end_inset
20158
20159 Out
20160 \begin_inset space ~
20161 \end_inset
20162
20163 For
20164 \begin_inset space ~
20165 \end_inset
20166
20167 Edit
20168 \family default
20169 , before making any changes to it.
20170  A document under revision control has a 
20171 \begin_inset Quotes eld
20172 \end_inset
20173
20174 [RCS:<version> <locker>]
20175 \begin_inset Quotes erd
20176 \end_inset
20177
20178  item tagged to the filename in the minibuffer.
20179 \end_layout
20180
20181 \begin_layout Standard
20182 RCS command that is run:
20183 \end_layout
20184
20185 \begin_layout LyX-Code
20186
20187 \family typewriter
20188 ci -q -u -i -t-"<initial description>" <file-name>
20189 \end_layout
20190
20191 \begin_layout Standard
20192 Read 
20193 \family typewriter
20194 man ci
20195 \family default
20196  to understand the switches.
20197  
20198 \end_layout
20199
20200 \begin_layout Subsubsection
20201
20202 \family sans
20203 Check In Changes
20204 \end_layout
20205
20206 \begin_layout Standard
20207 When you are finished editing a file, you check in your changes.
20208  When you do this, you are asked for a description of the changes.
20209  This is stored in the history log.
20210  The version number is bumped, your changes are applied to the master RCS
20211  file, the document is unlocked and set to Read-Only mode.
20212 \end_layout
20213
20214 \begin_layout Itemize
20215 RCS command: 
20216 \family typewriter
20217 ci -q -u -m"<description>" <file-name>
20218 \end_layout
20219
20220 \begin_layout Subsubsection
20221
20222 \family sans
20223 Check Out For Edit
20224 \end_layout
20225
20226 \begin_layout Standard
20227 By doing this you lock the document so that only you can edit it.
20228  This will also make the document Read-Write only for you.
20229  You will usually continue editing for a while and when you are finished
20230  you check in your changes.
20231  The status line is changed to reflect that you have locked the file.
20232 \end_layout
20233
20234 \begin_layout Itemize
20235 RCS command: 
20236 \family typewriter
20237 co -q -l <file-name>
20238 \end_layout
20239
20240 \begin_layout Subsubsection
20241
20242 \family sans
20243 Revert To Repository Version
20244 \end_layout
20245
20246 \begin_layout Standard
20247 This will discard all changes made to the document since the last check
20248  in.
20249  You get a warning before changes are discarded.
20250 \end_layout
20251
20252 \begin_layout Itemize
20253 RCS command: 
20254 \family typewriter
20255 co -f -u<version> <file-name>
20256 \end_layout
20257
20258 \begin_layout Subsubsection
20259
20260 \family sans
20261 Copy
20262 \end_layout
20263
20264 \begin_layout Standard
20265 This will create a copy of the current document.
20266  Since RCS does not support copy operations natively, the version history
20267  is not preserved, and the copy is added as a new file.
20268  It requires a clean document without any changes since the last checkin.
20269  You are asked for a file name and a description of the copy operation.
20270  After that the copy is created, both locally and in the repository.
20271  If the parent directories of the copied and original document differ, all
20272  relative paths of included files of the copy are adjusted (like in 
20273 \family sans
20274 File\SpecialChar menuseparator
20275 Save As
20276 \family default
20277 \SpecialChar ldots
20278 ).
20279  Finally, the copy is loaded instead of the original document.
20280 \end_layout
20281
20282 \begin_layout Labeling
20283 \labelwidthstring 00.00.0000
20284 RCS
20285 \begin_inset space ~
20286 \end_inset
20287
20288 commands: 
20289 \begin_inset space ~
20290 \end_inset
20291
20292
20293 \begin_inset Newline newline
20294 \end_inset
20295
20296 Copy 
20297 \begin_inset Flex Code
20298 status collapsed
20299
20300 \begin_layout Plain Layout
20301
20302 \family typewriter
20303 \begin_inset Quotes qld
20304 \end_inset
20305
20306 <file-name>
20307 \begin_inset Quotes qld
20308 \end_inset
20309
20310
20311 \end_layout
20312
20313 \end_inset
20314
20315  to 
20316 \begin_inset Flex Code
20317 status collapsed
20318
20319 \begin_layout Plain Layout
20320
20321 \family typewriter
20322 \begin_inset Quotes qld
20323 \end_inset
20324
20325 <new-file-name>
20326 \begin_inset Quotes qld
20327 \end_inset
20328
20329
20330 \end_layout
20331
20332 \end_inset
20333
20334
20335 \begin_inset Newline newline
20336 \end_inset
20337
20338
20339 \begin_inset Flex Code
20340 status collapsed
20341
20342 \begin_layout Plain Layout
20343 ci -q -u 
20344 \family typewriter
20345 -i 
20346 \begin_inset Quotes qld
20347 \end_inset
20348
20349 <new-file-name>
20350 \begin_inset Quotes qld
20351 \end_inset
20352
20353
20354 \end_layout
20355
20356 \end_inset
20357
20358
20359 \end_layout
20360
20361 \begin_layout Subsubsection
20362
20363 \family sans
20364 Undo Last Checkin
20365 \end_layout
20366
20367 \begin_layout Standard
20368 This makes as if the last check in never happened.
20369  No changes are made to the document loaded into \SpecialChar LyX
20370 , but the last version
20371  is removed from the master RCS file.
20372 \end_layout
20373
20374 \begin_layout Itemize
20375 RCS command: 
20376 \family typewriter
20377 rcs -o<version> <file-name>
20378 \end_layout
20379
20380 \begin_layout Subsubsection
20381
20382 \family sans
20383 Show History
20384 \end_layout
20385
20386 \begin_layout Standard
20387 This shows the complete history of the RCS document.
20388  The output of 
20389 \family typewriter
20390 rlog <file-name>
20391 \family default
20392  is shown in a browser.
20393  See 
20394 \family typewriter
20395 man rlog
20396 \family default
20397  for more info.
20398 \end_layout
20399
20400 \begin_layout Subsubsection
20401 Revision info
20402 \end_layout
20403
20404 \begin_layout Standard
20405 \SpecialChar LyX
20406  supports RCS version number, author name, date and time of last commit.
20407  All those are extracted from 
20408 \family typewriter
20409 rlog -r <file-name>
20410 \family default
20411 .
20412  See 
20413 \begin_inset CommandInset ref
20414 LatexCommand ref
20415 reference "subsec:VCS-Revision-Information"
20416
20417 \end_inset
20418
20419  for details.
20420 \end_layout
20421
20422 \begin_layout Subsection
20423 CVS commands in \SpecialChar LyX
20424
20425 \end_layout
20426
20427 \begin_layout Standard
20428 A subset of CVS operations is supported by \SpecialChar LyX
20429 .
20430  You can find the commands in the 
20431 \family sans
20432 File\SpecialChar menuseparator
20433 Version
20434 \begin_inset space ~
20435 \end_inset
20436
20437 Control
20438 \family default
20439  submenu.
20440  The version control system SVN is more powerful, so please use it instead
20441  of CVS if possible.
20442 \end_layout
20443
20444 \begin_layout Subsubsection
20445
20446 \family sans
20447 General CVS usage
20448 \end_layout
20449
20450 \begin_layout Standard
20451 If you start from scratch with CVS you have to create your repository and
20452  checkout the working copy with external tools.
20453  If you're using a client-server setup you may need to login before doing
20454  the first repository checkout.
20455 \end_layout
20456
20457 \begin_layout Standard
20458 If your documents are under revision control and others are using the same
20459  repository problems arise when different changes to the same document at
20460  the same location happen.
20461  Standard CVS repositories don't operate with a file locking mechanism.
20462  This may be surprising, but conflicts only occur if people disagree on
20463  the proper content of the same part of a document.
20464  So, if co-workers are used to communicate regularly, these conflicts occur
20465  rarely.
20466  If they don't communicate they have a fundamental problem anyway.
20467  Nevertheless some people like to work with so called 
20468 \begin_inset Quotes eld
20469 \end_inset
20470
20471 reserved checkouts
20472 \begin_inset Quotes erd
20473 \end_inset
20474
20475 .
20476  If they do so the working copy of all files is readonly when checked out
20477  first and the user starts editing after using a special command to make
20478  the working copy writable.
20479  When the changes are checked in the working copy returns to readonly state.
20480  With \SpecialChar LyX
20481  one has to edit the 
20482 \begin_inset Flex Code
20483 status collapsed
20484
20485 \begin_layout Plain Layout
20486 .cvsrc
20487 \end_layout
20488
20489 \end_inset
20490
20491  file and add the line 
20492 \begin_inset Flex Code
20493 status collapsed
20494
20495 \begin_layout Plain Layout
20496 cvs -r
20497 \end_layout
20498
20499 \end_inset
20500
20501  to work with reserved checkouts.
20502  The benefit is the possibility to see who is using a writable copy of some
20503  document.
20504  It's not guaranteed only one user makes a copy writable.
20505 \end_layout
20506
20507 \begin_layout Standard
20508 \SpecialChar LyX
20509  tries to guess if you're using reserved or non-reserved checkouts.
20510  If your working copy is readonly or it is writable and an additional copy
20511  of your document exists in the CVS/Base sub-directory a reserved otherwise
20512  a non-reserved checkout is assumed.
20513  When a reserved checkout is detected you have to use 
20514 \begin_inset Flex Noun
20515 status collapsed
20516
20517 \begin_layout Plain Layout
20518 Check Out
20519 \end_layout
20520
20521 \end_inset
20522
20523  to make your working copy writable if it's readonly.
20524  After doing so the 
20525 \begin_inset Flex Noun
20526 status collapsed
20527
20528 \begin_layout Plain Layout
20529 Check In
20530 \end_layout
20531
20532 \end_inset
20533
20534  operation is possible and that makes your working copy readonly again after
20535  transferring your changes to the repository.
20536 \end_layout
20537
20538 \begin_layout Standard
20539 More information about CVS can be found here 
20540 \begin_inset Flex URL
20541 status collapsed
20542
20543 \begin_layout Plain Layout
20544
20545 http://www.nongnu.org/cvs
20546 \end_layout
20547
20548 \end_inset
20549
20550  and here 
20551 \begin_inset Flex URL
20552 status collapsed
20553
20554 \begin_layout Plain Layout
20555
20556 http://ximbiot.com/cvs
20557 \end_layout
20558
20559 \end_inset
20560
20561 .
20562 \end_layout
20563
20564 \begin_layout Standard
20565 Read 
20566 \family typewriter
20567 man cvs
20568 \family default
20569  to understand the sub-commands and the switches mentioned below.
20570 \end_layout
20571
20572 \begin_layout Subsubsection
20573
20574 \family sans
20575 Register
20576 \end_layout
20577
20578 \begin_layout Standard
20579 If your document is not under revision control, this is the only item shown
20580  in the menu.
20581  And if it is under revision control, the 
20582 \family sans
20583 Register
20584 \family default
20585  item is not visible.
20586  
20587 \end_layout
20588
20589 \begin_layout Standard
20590 This command registers in CVS your document 
20591 \begin_inset Flex Strong
20592 status collapsed
20593
20594 \begin_layout Plain Layout
20595
20596 \emph on
20597 only
20598 \end_layout
20599
20600 \end_inset
20601
20602  in the case you have already the documents directory under CVS control
20603  (in particular 
20604 \family typewriter
20605 CVS/Entries
20606 \family default
20607  file exists).
20608  This means you have to create or checkout the archive by yourself using
20609  external tools.
20610  (In case you forget that step \SpecialChar LyX
20611  registers the document with RCS.)
20612 \end_layout
20613
20614 \begin_layout Standard
20615 Then you are asked interactively to supply an initial description of the
20616  document.
20617  Don't forget that registered file is not yet checked in.
20618 \end_layout
20619
20620 \begin_layout Standard
20621 CVS command that is run: 
20622 \family typewriter
20623 cvs -q add -m"<entered message>" "<file-name>"
20624 \end_layout
20625
20626 \begin_layout Standard
20627 The term 
20628 \family typewriter
20629 "<file-name>"
20630 \family default
20631  above and for all other CVS commands is an abbreviation for 
20632 \begin_inset Quotes eld
20633 \end_inset
20634
20635 change the current working directory to file location and use the file name
20636  without path component as argument
20637 \begin_inset Quotes erd
20638 \end_inset
20639
20640 .
20641 \end_layout
20642
20643 \begin_layout Subsubsection
20644
20645 \family sans
20646 Check In Changes
20647 \end_layout
20648
20649 \begin_layout Standard
20650 When you are finished editing a file, you commit your changes.
20651  When you do this and you had changed the document, you are asked for a
20652  description of the changes.
20653  After that changes are written to the repository.
20654  In case you didn't change the document and a reserved checkout is detected
20655  the reservation made on 
20656 \begin_inset Flex Noun
20657 status collapsed
20658
20659 \begin_layout Plain Layout
20660 Check Out
20661 \end_layout
20662
20663 \end_inset
20664
20665  is undone.
20666 \end_layout
20667
20668 \begin_layout Labeling
20669 \labelwidthstring 00.00.0000
20670 CVS
20671 \begin_inset space ~
20672 \end_inset
20673
20674 command: 
20675 \begin_inset space ~
20676 \end_inset
20677
20678
20679 \begin_inset Newline newline
20680 \end_inset
20681
20682
20683 \begin_inset Flex Code
20684 status collapsed
20685
20686 \begin_layout Plain Layout
20687 cvs 
20688 \family typewriter
20689 -q commit -m"<description>" "<file-name>"
20690 \end_layout
20691
20692 \end_inset
20693
20694  or
20695 \begin_inset Newline newline
20696 \end_inset
20697
20698
20699 \begin_inset Flex Code
20700 status collapsed
20701
20702 \begin_layout Plain Layout
20703 cvs -q unedit 
20704 \family typewriter
20705 "<file-name>"
20706 \end_layout
20707
20708 \end_inset
20709
20710
20711 \end_layout
20712
20713 \begin_layout Subsubsection
20714
20715 \family sans
20716 Check Out Changes
20717 \end_layout
20718
20719 \begin_layout Standard
20720 When you are sharing a repository with others, you may have to incorporate
20721  their changes into your working copy.
20722 \end_layout
20723
20724 \begin_layout Standard
20725 CVS command: 
20726 \family typewriter
20727 cvs -q update "<file-name>"
20728 \end_layout
20729
20730 \begin_layout Standard
20731 If a readonly checkout is detected the working copy is made writable and
20732  reserved.
20733 \end_layout
20734
20735 \begin_layout Standard
20736 CVS command: 
20737 \family typewriter
20738 cvs -q edit "<file-name>"
20739 \end_layout
20740
20741 \begin_layout Subsubsection
20742
20743 \family sans
20744 Revert To Repository Version
20745 \end_layout
20746
20747 \begin_layout Standard
20748 This will discard all changes made to the document since the last check
20749  in.
20750  You get a warning before changes are discarded.
20751  Firstly the file is deleted, secondly CVS update command is run.
20752 \end_layout
20753
20754 \begin_layout Standard
20755 CVS command: 
20756 \family typewriter
20757 cvs -q update "<file-name>"
20758 \end_layout
20759
20760 \begin_layout Standard
20761 If a reserved checkout is detected and the working copy has no changes only
20762  the reservation is undone.
20763 \end_layout
20764
20765 \begin_layout Standard
20766 CVS command: 
20767 \family typewriter
20768 cvs -q unedit "<file-name>"
20769 \end_layout
20770
20771 \begin_layout Subsubsection
20772
20773 \family sans
20774 Copy
20775 \end_layout
20776
20777 \begin_layout Standard
20778 This will create a copy of the current document.
20779  Since CVS does not support copy operations natively, the version history
20780  is not preserved, and the copy is added as a new file.
20781  It requires a clean document without any changes since the last checkin.
20782  You are asked for a file name and a description of the copy operation.
20783  After that the copy is created, both locally and in the repository.
20784  If the parent directories of the copied and original document differ, all
20785  relative paths of included files of the copy are adjusted (like in 
20786 \family sans
20787 File\SpecialChar menuseparator
20788 Save As
20789 \family default
20790 \SpecialChar ldots
20791 ).
20792  Finally, the copy is loaded instead of the original document.
20793 \end_layout
20794
20795 \begin_layout Labeling
20796 \labelwidthstring 00.00.0000
20797 CVS
20798 \begin_inset space ~
20799 \end_inset
20800
20801 commands: 
20802 \begin_inset space ~
20803 \end_inset
20804
20805
20806 \begin_inset Newline newline
20807 \end_inset
20808
20809 Copy 
20810 \begin_inset Flex Code
20811 status collapsed
20812
20813 \begin_layout Plain Layout
20814 "<file-name>"
20815 \end_layout
20816
20817 \end_inset
20818
20819  to 
20820 \begin_inset Flex Code
20821 status collapsed
20822
20823 \begin_layout Plain Layout
20824 "<new-file-name>"
20825 \end_layout
20826
20827 \end_inset
20828
20829
20830 \begin_inset Newline newline
20831 \end_inset
20832
20833
20834 \begin_inset Flex Code
20835 status collapsed
20836
20837 \begin_layout Plain Layout
20838 cvs -q add "<new-file-name>"
20839 \end_layout
20840
20841 \end_inset
20842
20843
20844 \end_layout
20845
20846 \begin_layout Subsubsection
20847
20848 \family sans
20849 Rename
20850 \end_layout
20851
20852 \begin_layout Standard
20853 This will rename the current document.
20854  Since CVS does not support rename operations natively, the version history
20855  is not preserved, the renamed document is added as a new file, and the
20856  original document is deleted.
20857  It requires a clean document without any changes since the last checkin.
20858  You are asked for a file name and a description of the rename operation.
20859  After that the document is renamed, both locally and in the repository.
20860  If the parent directories of the new and old file names differ, all relative
20861  paths of included files are adjusted (like in 
20862 \family sans
20863 File\SpecialChar menuseparator
20864 Save As
20865 \family default
20866 \SpecialChar ldots
20867 ).
20868  Finally, the document is reloaded using the new name.
20869 \end_layout
20870
20871 \begin_layout Labeling
20872 \labelwidthstring 00.00.0000
20873 CVS
20874 \begin_inset space ~
20875 \end_inset
20876
20877 commands: 
20878 \begin_inset space ~
20879 \end_inset
20880
20881
20882 \begin_inset Newline newline
20883 \end_inset
20884
20885 Rename 
20886 \begin_inset Flex Code
20887 status collapsed
20888
20889 \begin_layout Plain Layout
20890 "<file-name>"
20891 \end_layout
20892
20893 \end_inset
20894
20895  to 
20896 \begin_inset Flex Code
20897 status collapsed
20898
20899 \begin_layout Plain Layout
20900 "<new-file-name>"
20901 \end_layout
20902
20903 \end_inset
20904
20905
20906 \begin_inset Newline newline
20907 \end_inset
20908
20909
20910 \begin_inset Flex Code
20911 status collapsed
20912
20913 \begin_layout Plain Layout
20914 cvs -q add "<new-file-name>"
20915 \end_layout
20916
20917 \end_inset
20918
20919
20920 \begin_inset Newline newline
20921 \end_inset
20922
20923
20924 \begin_inset Flex Code
20925 status collapsed
20926
20927 \begin_layout Plain Layout
20928 cvs -q remove "<file-name>"
20929 \end_layout
20930
20931 \end_inset
20932
20933
20934 \end_layout
20935
20936 \begin_layout Subsubsection
20937 Update of the local directory checkout from repository
20938 \end_layout
20939
20940 \begin_layout Standard
20941 Once your documents gets more complex, containing sub-documents and pictures,
20942  including external 
20943 \begin_inset Flex Code
20944 status collapsed
20945
20946 \begin_layout Plain Layout
20947 .tex
20948 \end_layout
20949
20950 \end_inset
20951
20952  files and so on using version control becomes more complicated.
20953  \SpecialChar LyX
20954  supports updating the whole tree in which resides the document.
20955  This become especially useful once you cooperate with people which neither
20956  have detailed knowledge about CVS usage nor they have ambition to commit
20957  additional material to the repository.
20958  You have to organize the files structure so that all external files are
20959  in the same directory or subdirectories of the document.
20960  It's good practice anyway to store multipart documents in an extra directory.
20961 \end_layout
20962
20963 \begin_layout Standard
20964 The 
20965 \begin_inset Flex Code
20966 status collapsed
20967
20968 \begin_layout Plain Layout
20969 Update local directory from repository
20970 \end_layout
20971
20972 \end_inset
20973
20974  command updates the whole directory.
20975  If local changes are detected user is warned before update starts.
20976  In case of merge conflicts both versions of the conflicting document parts
20977  are placed in the final document.
20978  You have to review and correct the result of the merge.
20979  You'll find the conflicts enclosed in pairs of 
20980 \begin_inset Flex Code
20981 status collapsed
20982
20983 \begin_layout Plain Layout
20984 <<<<<<<
20985 \end_layout
20986
20987 \end_inset
20988
20989  and 
20990 \begin_inset Flex Code
20991 status collapsed
20992
20993 \begin_layout Plain Layout
20994 >>>>>>>
20995 \end_layout
20996
20997 \end_inset
20998
20999  separated by 
21000 \begin_inset Flex Code
21001 status collapsed
21002
21003 \begin_layout Plain Layout
21004 =======
21005 \end_layout
21006
21007 \end_inset
21008
21009 .
21010  The first part is your version as before the update operation with the
21011  document name prepended.
21012  The second one is the repository version with the version number after
21013  the sequence of 
21014 \begin_inset Flex Code
21015 status collapsed
21016
21017 \begin_layout Plain Layout
21018 >
21019 \end_layout
21020
21021 \end_inset
21022
21023  signs.
21024 \end_layout
21025
21026 \begin_layout Labeling
21027 \labelwidthstring 00.00.0000
21028 CVS
21029 \begin_inset space ~
21030 \end_inset
21031
21032 commands: 
21033 \begin_inset space ~
21034 \end_inset
21035
21036
21037 \begin_inset Newline newline
21038 \end_inset
21039
21040
21041 \begin_inset Flex Code
21042 status collapsed
21043
21044 \begin_layout Plain Layout
21045 cd $path; cvs diff 
21046 \family typewriter
21047 "."
21048 \end_layout
21049
21050 \end_inset
21051
21052  (Ask if changes are detected.)
21053 \begin_inset Newline newline
21054 \end_inset
21055
21056
21057 \begin_inset Flex Code
21058 status collapsed
21059
21060 \begin_layout Plain Layout
21061 cd $path; cvs -q update 
21062 \family typewriter
21063 "."
21064 \end_layout
21065
21066 \end_inset
21067
21068
21069 \end_layout
21070
21071 \begin_layout Standard
21072 where 
21073 \begin_inset Flex Code
21074 status collapsed
21075
21076 \begin_layout Plain Layout
21077 $path
21078 \end_layout
21079
21080 \end_inset
21081
21082  stands for the path to the document.
21083 \end_layout
21084
21085 \begin_layout Subsubsection
21086
21087 \family sans
21088 Show History
21089 \end_layout
21090
21091 \begin_layout Standard
21092 This shows the complete history of the CVS document.
21093  The output of 
21094 \family typewriter
21095 cvs log "<file-name>"
21096 \family default
21097  is shown in a browser.
21098 \end_layout
21099
21100 \begin_layout Subsubsection
21101 Revision info
21102 \end_layout
21103
21104 \begin_layout Standard
21105 \SpecialChar LyX
21106  supports CVS version number, author name, date and time of last commit.
21107  All those are extracted from 
21108 \family typewriter
21109 cvs log -r <file-name>
21110 \family default
21111 .
21112  See 
21113 \begin_inset CommandInset ref
21114 LatexCommand ref
21115 reference "subsec:VCS-Revision-Information"
21116
21117 \end_inset
21118
21119  for details.
21120 \end_layout
21121
21122 \begin_layout Subsection
21123 SVN commands in \SpecialChar LyX
21124
21125 \end_layout
21126
21127 \begin_layout Standard
21128 SVN is now partially supported by \SpecialChar LyX
21129 .
21130  You can find the commands in the 
21131 \family sans
21132 File\SpecialChar menuseparator
21133 Version
21134 \begin_inset space ~
21135 \end_inset
21136
21137 Control
21138 \family default
21139  submenu.
21140  Please note that if you use password protected access to repository via
21141  ssh, you will be asked in terminal window.
21142  \SpecialChar LyX
21143  was tested against SVN 1.5, 1.6, 1.7 and 1.8
21144 \begin_inset Foot
21145 status collapsed
21146
21147 \begin_layout Plain Layout
21148 Most of the commands will work with 1.4 too, see 
21149 \begin_inset CommandInset ref
21150 LatexCommand ref
21151 reference "subsec:SVN-Repo-Update"
21152
21153 \end_inset
21154
21155 .
21156  There seems to be currently unresolved permissions problem under SVN 1.8
21157  with reverting changes when file is locked.
21158 \end_layout
21159
21160 \end_inset
21161
21162
21163 \end_layout
21164
21165 \begin_layout Subsubsection
21166
21167 \family sans
21168 Register
21169 \end_layout
21170
21171 \begin_layout Standard
21172 If your document is not under revision control, this is the only item shown
21173  in the menu.
21174  And if it is under revision control, the 
21175 \family sans
21176 Register
21177 \family default
21178  item is not visible.
21179 \end_layout
21180
21181 \begin_layout Standard
21182 This command registers in SVN your document ONLY in case you have already
21183  the documents directory under SVN control (in particular 
21184 \family typewriter
21185 .svn/entries
21186 \family default
21187  file exists).
21188  This means you have to checkout the archive by yourself.
21189 \end_layout
21190
21191 \begin_layout Standard
21192 Then you are asked interactively to supply an initial description of the
21193  document.
21194  Don't forget that registered file is not yet commited.
21195 \end_layout
21196
21197 \begin_layout Standard
21198 SVN command that is run: 
21199 \family typewriter
21200 svn add -q 
21201 \begin_inset Quotes qld
21202 \end_inset
21203
21204 <file-name>
21205 \begin_inset Quotes qld
21206 \end_inset
21207
21208
21209 \end_layout
21210
21211 \begin_layout Standard
21212 Read 
21213 \family typewriter
21214 man svn
21215 \family default
21216  to understand the switches.
21217 \end_layout
21218
21219 \begin_layout Subsubsection
21220
21221 \family sans
21222 Check In Changes
21223 \end_layout
21224
21225 \begin_layout Standard
21226 When you are finished editing a file, you commit your changes.
21227  When you do this, you are asked for a description of the changes.
21228  After that changes are commited.
21229 \end_layout
21230
21231 \begin_layout Standard
21232 SVN command:
21233 \begin_inset Foot
21234 status collapsed
21235
21236 \begin_layout Plain Layout
21237 In case locking is not enabled.
21238  See Section 
21239 \begin_inset CommandInset ref
21240 LatexCommand ref
21241 reference "subsec:SVN-File-Locking"
21242
21243 \end_inset
21244
21245 .
21246 \end_layout
21247
21248 \end_inset
21249
21250  
21251 \family typewriter
21252 svn commit -q -m"<description>" <file-name>
21253 \end_layout
21254
21255 \begin_layout Subsubsection
21256
21257 \family sans
21258 Check Out For Edit
21259 \end_layout
21260
21261 \begin_layout Standard
21262 Updates the changes of this file from the repository.
21263  Be sure you understand SVN merging and conflicts resolving before using
21264  this function, because all conflicts has to be resolved manually by you!
21265 \end_layout
21266
21267 \begin_layout Standard
21268 SVN command:
21269 \begin_inset Foot
21270 status collapsed
21271
21272 \begin_layout Plain Layout
21273 Ditto.
21274 \end_layout
21275
21276 \end_inset
21277
21278  
21279 \family typewriter
21280 svn update --non-interactive 
21281 \begin_inset Quotes qld
21282 \end_inset
21283
21284 <file-name>
21285 \begin_inset Quotes qld
21286 \end_inset
21287
21288
21289 \end_layout
21290
21291 \begin_layout Subsubsection
21292
21293 \family sans
21294 Revert To Repository Version
21295 \end_layout
21296
21297 \begin_layout Standard
21298 This will discard all changes made to the document since the last check
21299  in.
21300  You get a warning before changes are discarded.
21301 \end_layout
21302
21303 \begin_layout Standard
21304 SVN command: 
21305 \family typewriter
21306 svn revert -q 
21307 \begin_inset Quotes qld
21308 \end_inset
21309
21310 <file-name>
21311 \begin_inset Quotes qld
21312 \end_inset
21313
21314
21315 \end_layout
21316
21317 \begin_layout Subsubsection
21318
21319 \family sans
21320 Copy
21321 \end_layout
21322
21323 \begin_layout Standard
21324 This will create a copy of the current document including the version history.
21325  It requires a clean document without any changes since the last checkin.
21326  You are asked for a file name and a description of the copy operation.
21327  After that the copy is created, both locally and in the repository.
21328  If the parent directories of the copied and original document differ, all
21329  relative paths of included files of the copy are adjusted (like in 
21330 \family sans
21331 File\SpecialChar menuseparator
21332 Save As
21333 \family default
21334 \SpecialChar ldots
21335 ).
21336  Finally, the copy is loaded instead of the original document.
21337 \end_layout
21338
21339 \begin_layout Labeling
21340 \labelwidthstring 00.00.0000
21341 SVN
21342 \begin_inset space ~
21343 \end_inset
21344
21345 commands: 
21346 \begin_inset space ~
21347 \end_inset
21348
21349
21350 \begin_inset Newline newline
21351 \end_inset
21352
21353
21354 \begin_inset Flex Code
21355 status collapsed
21356
21357 \begin_layout Plain Layout
21358 svn copy -q 
21359 \family typewriter
21360
21361 \begin_inset Quotes qld
21362 \end_inset
21363
21364 <file-name>
21365 \begin_inset Quotes qld
21366 \end_inset
21367
21368  
21369 \begin_inset Quotes qld
21370 \end_inset
21371
21372 <new-file-name>
21373 \begin_inset Quotes qld
21374 \end_inset
21375
21376
21377 \end_layout
21378
21379 \end_inset
21380
21381
21382 \begin_inset Newline newline
21383 \end_inset
21384
21385
21386 \begin_inset Flex Code
21387 status collapsed
21388
21389 \begin_layout Plain Layout
21390 svn commit
21391 \end_layout
21392
21393 \end_inset
21394
21395
21396 \end_layout
21397
21398 \begin_layout Subsubsection
21399
21400 \family sans
21401 Rename
21402 \end_layout
21403
21404 \begin_layout Standard
21405 This will rename the current document including the version history.
21406  It requires a clean document without any changes since the last checkin.
21407  You are asked for a file name and a description of the rename operation.
21408  After that the document is renamed, both locally and in the repository.
21409  If the parent directories of the new and old file names differ, all relative
21410  paths of included files are adjusted (like in 
21411 \family sans
21412 File\SpecialChar menuseparator
21413 Save As
21414 \family default
21415 \SpecialChar ldots
21416 ).
21417  Finally, the document is reloaded using the new name.
21418 \end_layout
21419
21420 \begin_layout Labeling
21421 \labelwidthstring 00.00.0000
21422 SVN
21423 \begin_inset space ~
21424 \end_inset
21425
21426 commands: 
21427 \begin_inset space ~
21428 \end_inset
21429
21430
21431 \begin_inset Newline newline
21432 \end_inset
21433
21434
21435 \begin_inset Flex Code
21436 status collapsed
21437
21438 \begin_layout Plain Layout
21439 svn move -q 
21440 \family typewriter
21441
21442 \begin_inset Quotes qld
21443 \end_inset
21444
21445 <file-name>
21446 \begin_inset Quotes qld
21447 \end_inset
21448
21449  
21450 \begin_inset Quotes qld
21451 \end_inset
21452
21453 <new-file-name>
21454 \begin_inset Quotes qld
21455 \end_inset
21456
21457
21458 \end_layout
21459
21460 \end_inset
21461
21462
21463 \begin_inset Newline newline
21464 \end_inset
21465
21466
21467 \begin_inset Flex Code
21468 status collapsed
21469
21470 \begin_layout Plain Layout
21471 svn commit
21472 \end_layout
21473
21474 \end_inset
21475
21476
21477 \end_layout
21478
21479 \begin_layout Subsubsection
21480 \begin_inset CommandInset label
21481 LatexCommand label
21482 name "subsec:SVN-Repo-Update"
21483
21484 \end_inset
21485
21486 Update of the local directory checkout from repository
21487 \begin_inset Foot
21488 status collapsed
21489
21490 \begin_layout Plain Layout
21491 Note that this command will work only with subversion 
21492 \begin_inset Formula $\geqq1.5$
21493 \end_inset
21494
21495
21496 \end_layout
21497
21498 \end_inset
21499
21500
21501 \end_layout
21502
21503 \begin_layout Standard
21504 All the commands above have one shortcoming – they deal with the current
21505  document only.
21506  Once your document contains pictures, includes external 
21507 \begin_inset Flex Code
21508 status collapsed
21509
21510 \begin_layout Plain Layout
21511 .tex
21512 \end_layout
21513
21514 \end_inset
21515
21516  files and so on administration becomes more complicated.
21517  \SpecialChar LyX
21518  now supports updating the whole tree in which resides the document
21519 \begin_inset Foot
21520 status collapsed
21521
21522 \begin_layout Plain Layout
21523 One need to organize the files structure so that all external files are
21524  in the same directory or subdirectories of the document.
21525  
21526 \end_layout
21527
21528 \end_inset
21529
21530 .
21531  This become especially useful once you cooperate with people which neither
21532  know about subversion management nor they have ambition to commit additional
21533  material to the repository.
21534  
21535 \end_layout
21536
21537 \begin_layout Standard
21538 \begin_inset Flex Code
21539 status collapsed
21540
21541 \begin_layout Plain Layout
21542 Update local directory from repository
21543 \end_layout
21544
21545 \end_inset
21546
21547  command updates the whole directory and in case of merge conflicts local
21548  version of the files are left, so no unintended data loss occurs.
21549  If local changes are detected user is warned before update starts.
21550 \end_layout
21551
21552 \begin_layout Labeling
21553 \labelwidthstring 00.00.0000
21554 SVN
21555 \begin_inset space ~
21556 \end_inset
21557
21558 commands: 
21559 \begin_inset space ~
21560 \end_inset
21561
21562
21563 \begin_inset Newline newline
21564 \end_inset
21565
21566
21567 \begin_inset Flex Code
21568 status collapsed
21569
21570 \begin_layout Plain Layout
21571 svn diff $path
21572 \end_layout
21573
21574 \end_inset
21575
21576  (Ask if changes are detected.)
21577 \begin_inset Newline newline
21578 \end_inset
21579
21580
21581 \begin_inset Flex Code
21582 status collapsed
21583
21584 \begin_layout Plain Layout
21585 svn update --accept mine-full $path
21586 \end_layout
21587
21588 \end_inset
21589
21590
21591 \end_layout
21592
21593 \begin_layout Standard
21594 where 
21595 \begin_inset Flex Code
21596 status collapsed
21597
21598 \begin_layout Plain Layout
21599 $path
21600 \end_layout
21601
21602 \end_inset
21603
21604  stands for the path to the document.
21605 \end_layout
21606
21607 \begin_layout Subsubsection
21608
21609 \family sans
21610 Show History
21611 \end_layout
21612
21613 \begin_layout Standard
21614 This shows the complete history of the SVN document.
21615  The output of 
21616 \family typewriter
21617 svn log 
21618 \begin_inset Quotes qld
21619 \end_inset
21620
21621 <file-name>
21622 \begin_inset Quotes qld
21623 \end_inset
21624
21625
21626 \family default
21627  is shown in a browser.
21628 \end_layout
21629
21630 \begin_layout Subsubsection
21631 File Locking
21632 \begin_inset CommandInset label
21633 LatexCommand label
21634 name "subsec:SVN-File-Locking"
21635
21636 \end_inset
21637
21638
21639 \end_layout
21640
21641 \begin_layout Standard
21642 The file exchange through various revision control systems brings the problem
21643  of merge conflicts in case two different users try to edit the same (parts
21644  of) document.
21645  When such a conflict happens it needs manual resolving and one reasonable
21646  alternative is to provide some kind of locking mechanism, which guarantees
21647  that only one user is allowed to edit file at the given time.
21648 \end_layout
21649
21650 \begin_layout Standard
21651 SVN has two such mechanisms to provide mutual exclusivity for file access
21652  – locks and automatic setting of write permissions (see sec.
21653  
21654 \begin_inset CommandInset ref
21655 LatexCommand ref
21656 reference "subsec:Automatical-Locking-Property"
21657
21658 \end_inset
21659
21660 ) based on 
21661 \begin_inset Flex Code
21662 status collapsed
21663
21664 \begin_layout Plain Layout
21665 svn:needs-lock
21666 \end_layout
21667
21668 \end_inset
21669
21670  file svn property
21671 \begin_inset Foot
21672 status collapsed
21673
21674 \begin_layout Plain Layout
21675 \begin_inset Flex URL
21676 status open
21677
21678 \begin_layout Plain Layout
21679
21680 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
21681 \end_layout
21682
21683 \end_inset
21684
21685
21686 \end_layout
21687
21688 \end_inset
21689
21690 .
21691  If this property is detected for a given document \SpecialChar LyX
21692  starts to use SVN locks
21693  for document editing automatically and the whole check-in/out mechanism
21694  switches to the same regimen as for RCS.
21695  This in particular means there are two different modes of file use in \SpecialChar LyX
21696 :
21697 \end_layout
21698
21699 \begin_layout Itemize
21700 Unlocked state.
21701  The loaded file is in the read-only mode.
21702  For editing on needs to check-out.
21703  
21704 \emph on
21705 Check-out
21706 \emph default
21707  consists of updating from the repository and gaining write lock.
21708  If the lock is not possible to obtain, we remain in unlocked state.
21709 \end_layout
21710
21711 \begin_layout Itemize
21712 Locked state.
21713  The loaded file is in the 
21714 \begin_inset Quotes els
21715 \end_inset
21716
21717 normal
21718 \begin_inset Quotes ers
21719 \end_inset
21720
21721  edit mode.
21722  No other user is allowed to edit the file.
21723  
21724 \emph on
21725 Check-in
21726 \emph default
21727  consists of commiting changes and releasing write-lock.
21728  If no changes have been made to the document, no commit will be produced
21729 \begin_inset Foot
21730 status collapsed
21731
21732 \begin_layout Plain Layout
21733 Don't be puzzled by the fact that you will be asked for commit message anyway.
21734 \end_layout
21735
21736 \end_inset
21737
21738  and only the write-lock will be released.
21739 \end_layout
21740
21741 \begin_layout Standard
21742 SVN commands:
21743 \end_layout
21744
21745 \begin_layout Labeling
21746 \labelwidthstring 00.00.0000
21747 Check-in:
21748 \family typewriter
21749  svn commit -q -m"<description>" "<file-name>"
21750 \begin_inset Newline newline
21751 \end_inset
21752
21753 svn unlock "<file-name>"
21754 \end_layout
21755
21756 \begin_layout Labeling
21757 \labelwidthstring 00.00.0000
21758 Check-out: 
21759 \family typewriter
21760 svn update "<file-name>"
21761 \begin_inset Newline newline
21762 \end_inset
21763
21764 svn lock "<file-name>"
21765 \end_layout
21766
21767 \begin_layout Subsubsection
21768
21769 \family typewriter
21770 \begin_inset CommandInset label
21771 LatexCommand label
21772 name "subsec:Automatical-Locking-Property"
21773
21774 \end_inset
21775
21776
21777 \family default
21778 Automatic Locking Property
21779 \end_layout
21780
21781 \begin_layout Standard
21782 The above mentioned automatic setting of write permissions of the .lyx file
21783  can be set through
21784 \family sans
21785  File\SpecialChar menuseparator
21786 Version
21787 \begin_inset space ~
21788 \end_inset
21789
21790 Control\SpecialChar menuseparator
21791 Use Locking Property
21792 \family default
21793 .
21794  This command is active only when the file is not locked on the svn server
21795  (i.e.
21796  you need to check-out before proceeding).
21797 \end_layout
21798
21799 \begin_layout Labeling
21800 \labelwidthstring 00.00.0000
21801 SVN
21802 \begin_inset space ~
21803 \end_inset
21804
21805 commands:
21806 \end_layout
21807
21808 \begin_layout Labeling
21809 \labelwidthstring 00.00.0000
21810 Set:
21811 \family typewriter
21812  svn propset svn:needs-lock ON "<file-name>"
21813 \end_layout
21814
21815 \begin_layout Labeling
21816 \labelwidthstring 00.00.0000
21817 Unset: 
21818 \family typewriter
21819 svn propdel svn:needs-lock "<file-name>"
21820 \end_layout
21821
21822 \begin_layout Subsubsection
21823 \begin_inset CommandInset label
21824 LatexCommand label
21825 name "subsec:VCS-Revision-Information"
21826
21827 \end_inset
21828
21829 Revision Information in Documents
21830 \end_layout
21831
21832 \begin_layout Standard
21833 There are more possibilities how to activate revision information in our
21834  document.
21835 \end_layout
21836
21837 \begin_layout Itemize
21838 \SpecialChar LyX
21839  supports directly:
21840 \end_layout
21841
21842 \begin_deeper
21843 \begin_layout Itemize
21844 tree revision information (
21845 \begin_inset Flex Code
21846 status collapsed
21847
21848 \begin_layout Plain Layout
21849 vcs-tree-revision
21850 \end_layout
21851
21852 \end_inset
21853
21854 ).
21855  The result is the output of the 
21856 \begin_inset Flex Code
21857 status collapsed
21858
21859 \begin_layout Plain Layout
21860 svnversion
21861 \end_layout
21862
21863 \end_inset
21864
21865  command, the following table gives you an idea, how to read the results.
21866 \end_layout
21867
21868 \begin_layout Standard
21869 \align center
21870 \begin_inset Tabular
21871 <lyxtabular version="3" rows="6" columns="2">
21872 <features tabularvalignment="middle">
21873 <column alignment="left" valignment="top">
21874 <column alignment="left" valignment="top">
21875 <row>
21876 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
21877 \begin_inset Text
21878
21879 \begin_layout Plain Layout
21880
21881 \series bold
21882 Output
21883 \end_layout
21884
21885 \end_inset
21886 </cell>
21887 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
21888 \begin_inset Text
21889
21890 \begin_layout Plain Layout
21891
21892 \series bold
21893 Meaning
21894 \end_layout
21895
21896 \end_inset
21897 </cell>
21898 </row>
21899 <row>
21900 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
21901 \begin_inset Text
21902
21903 \begin_layout Plain Layout
21904 4123:4168
21905 \end_layout
21906
21907 \end_inset
21908 </cell>
21909 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
21910 \begin_inset Text
21911
21912 \begin_layout Plain Layout
21913 mixed revision working copy
21914 \end_layout
21915
21916 \end_inset
21917 </cell>
21918 </row>
21919 <row>
21920 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
21921 \begin_inset Text
21922
21923 \begin_layout Plain Layout
21924 4168M
21925 \end_layout
21926
21927 \end_inset
21928 </cell>
21929 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
21930 \begin_inset Text
21931
21932 \begin_layout Plain Layout
21933 modified working copy
21934 \end_layout
21935
21936 \end_inset
21937 </cell>
21938 </row>
21939 <row>
21940 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
21941 \begin_inset Text
21942
21943 \begin_layout Plain Layout
21944 4123S
21945 \end_layout
21946
21947 \end_inset
21948 </cell>
21949 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
21950 \begin_inset Text
21951
21952 \begin_layout Plain Layout
21953 switched working copy
21954 \end_layout
21955
21956 \end_inset
21957 </cell>
21958 </row>
21959 <row>
21960 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
21961 \begin_inset Text
21962
21963 \begin_layout Plain Layout
21964 4123P
21965 \end_layout
21966
21967 \end_inset
21968 </cell>
21969 <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
21970 \begin_inset Text
21971
21972 \begin_layout Plain Layout
21973 partial working copy, from a sparse checkout
21974 \end_layout
21975
21976 \end_inset
21977 </cell>
21978 </row>
21979 <row>
21980 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
21981 \begin_inset Text
21982
21983 \begin_layout Plain Layout
21984 4123:4168MS
21985 \end_layout
21986
21987 \end_inset
21988 </cell>
21989 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
21990 \begin_inset Text
21991
21992 \begin_layout Plain Layout
21993 mixed revision, modified, switched working copy
21994 \end_layout
21995
21996 \end_inset
21997 </cell>
21998 </row>
21999 </lyxtabular>
22000
22001 \end_inset
22002
22003
22004 \end_layout
22005
22006 \begin_layout Itemize
22007 file revision information.
22008  The result comes from parsing the output of 
22009 \begin_inset Flex Code
22010 status collapsed
22011
22012 \begin_layout Plain Layout
22013 svn
22014 \begin_inset space ~
22015 \end_inset
22016
22017 info
22018 \begin_inset space ~
22019 \end_inset
22020
22021 --xml
22022 \begin_inset space ~
22023 \end_inset
22024
22025 file.lyx
22026 \end_layout
22027
22028 \end_inset
22029
22030 .
22031  Supported flags are:
22032 \end_layout
22033
22034 \begin_deeper
22035 \begin_layout Itemize
22036 version number of the last commit (
22037 \begin_inset Flex Code
22038 status collapsed
22039
22040 \begin_layout Plain Layout
22041 vcs-revision
22042 \end_layout
22043
22044 \end_inset
22045
22046 )
22047 \end_layout
22048
22049 \begin_layout Itemize
22050 author of the last commit (
22051 \begin_inset Flex Code
22052 status collapsed
22053
22054 \begin_layout Plain Layout
22055 vcs-author
22056 \end_layout
22057
22058 \end_inset
22059
22060 )
22061 \end_layout
22062
22063 \begin_layout Itemize
22064 date of the last commit (
22065 \begin_inset Flex Code
22066 status collapsed
22067
22068 \begin_layout Plain Layout
22069 vcs-date
22070 \end_layout
22071
22072 \end_inset
22073
22074 )
22075 \end_layout
22076
22077 \begin_layout Itemize
22078 time of the last commit (
22079 \begin_inset Flex Code
22080 status collapsed
22081
22082 \begin_layout Plain Layout
22083 vcs-time
22084 \end_layout
22085
22086 \end_inset
22087
22088 )
22089 \end_layout
22090
22091 \end_deeper
22092 \begin_layout Standard
22093 You can obtain this info via InsetInfo (
22094 \change_inserted 5863208 1564400022
22095
22096 \lang american
22097 Insert\SpecialChar menuseparator
22098 Field\SpecialChar menuseparator
22099 Version Control Revision
22100 \change_deleted 5863208 1564399852
22101
22102 \lang english
22103 e.g.
22104  
22105 \begin_inset Flex Code
22106 status collapsed
22107
22108 \begin_layout Plain Layout
22109 info-insert buffer vcs-date
22110 \end_layout
22111
22112 \end_inset
22113
22114
22115 \change_unchanged
22116 ).
22117  The information will be available only when you have the file stored under
22118  svn managment (i.e.
22119  the 
22120 \begin_inset Flex Code
22121 status collapsed
22122
22123 \begin_layout Plain Layout
22124 .svn
22125 \end_layout
22126
22127 \end_inset
22128
22129  directory is available with your document).
22130 \end_layout
22131
22132 \end_deeper
22133 \begin_layout Itemize
22134 Another—a hacking one—possibility is to use svn keywords
22135 \begin_inset Foot
22136 status collapsed
22137
22138 \begin_layout Plain Layout
22139 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
22140 \end_layout
22141
22142 \end_inset
22143
22144 .
22145  In short – you set file keywords property (e.g.
22146  
22147 \family sans
22148 svn propset svn:keywords 'Rev' file.lyx
22149 \family default
22150 ) and then paste keyword \SpecialChar TeX
22151  code
22152 \begin_inset Foot
22153 status collapsed
22154
22155 \begin_layout Plain Layout
22156 This is an easy way how to ensure that \SpecialChar LyX
22157  won't break the line in the middle
22158  of keyword tag.
22159 \end_layout
22160
22161 \end_inset
22162
22163  tag in your document (e.g.
22164  
22165 \begin_inset Flex Code
22166 status collapsed
22167
22168 \begin_layout Plain Layout
22169 $Rev$
22170 \end_layout
22171
22172 \end_inset
22173
22174 ).
22175  This way svn client will automatically substitute revision number (e.g.
22176  
22177 \begin_inset Flex Code
22178 status collapsed
22179
22180 \begin_layout Plain Layout
22181 $Rev: 59 $
22182 \end_layout
22183
22184 \end_inset
22185
22186 ) after each update and commit.
22187  There are more problems with this approach.
22188  Firstly, the '$' character is used in \SpecialChar TeX
22189  world for math equations, so any
22190  occurence of math formula 
22191 \begin_inset Formula $Rev$
22192 \end_inset
22193
22194  become 
22195 \begin_inset Formula $Rev:59$
22196 \end_inset
22197
22198  in your \SpecialChar LyX
22199  document.
22200  Similarly for other keywords like Id, Date, Author, etc.
22201  Secondly svn output is dependent on your locales, so its very easy that
22202  svn would produce some problematic strings once Date is used.
22203  Thirdly you get the whole 'Rev: 59' string in your document instead of
22204  the plain number.
22205  Until subversion implements user's custom keywords it will be hard to use
22206  this approach reliably or let \SpecialChar LyX
22207  to support it directly.
22208 \end_layout
22209
22210 \begin_layout Subsection
22211 SVN and Windows Environment
22212 \end_layout
22213
22214 \begin_layout Quote
22215 My inclination is to say that if the user cannot figure out the command
22216  line operations on their own fairly quickly, they would be well advised
22217  to use TortoiseSVN.
22218  —P.
22219  A.
22220  Rubin
22221 \end_layout
22222
22223 \begin_layout Subsubsection
22224 Preparation
22225 \end_layout
22226
22227 \begin_layout Standard
22228 In addition to installing \SpecialChar LyX
22229 , and having access to a Subversion repository,
22230  the user will need to install the Subversion client program.
22231  A Windows installer for the client program is available from 
22232 \begin_inset CommandInset href
22233 LatexCommand href
22234 name "CollabNet"
22235 target "http://www.collab.net/nonav/downloads/subversion/"
22236 literal "false"
22237
22238 \end_inset
22239
22240 .
22241  The user may also want to install 
22242 \begin_inset CommandInset href
22243 LatexCommand href
22244 name "TortoiseSVN"
22245 target "http://tortoisesvn.tigris.org/"
22246 literal "false"
22247
22248 \end_inset
22249
22250 , which integrates Subversion operations into the context (rightclick) menu
22251  of Windows Explorer.
22252  Operations done outside \SpecialChar LyX
22253  will typically be more convenient using the Explorer
22254  context menu.
22255  Note that TortoiseSVN is not a replacement for the client program, which
22256  is what \SpecialChar LyX
22257  itself will use.
22258 \end_layout
22259
22260 \begin_layout Subsubsection
22261 Bringing a document under Subversion control
22262 \end_layout
22263
22264 \begin_layout Standard
22265 Before a \SpecialChar LyX
22266  document can be brought under version control in Subversion, its
22267  parent directory needs to be under version control.
22268  If the document is being added to a project already in the repository,
22269  this is accomplished by checking the project out to the directory where
22270  the new document will be placed.
22271  If the project itself is not yet under version control (for instance, if
22272  this document starts a new project), the directory must be imported into
22273  the repository.
22274  This is done outside \SpecialChar LyX
22275 .
22276  Both import and checkout are easily accomplished from the Explorer context
22277  menu using TortoiseSVN, or alternatively can be done using the command
22278  line client at a DOS prompt.
22279  The procedure for importing the project using TortoiseSVN is described
22280  below, assuming an existing repository and a new project being started
22281  in 
22282 \family typewriter
22283 C:
22284 \backslash
22285 new project
22286 \family default
22287 .
22288  For information on using the Subversion client program, run 
22289 \family typewriter
22290 svn --help 
22291 \family default
22292 in a DOS shell.
22293 \end_layout
22294
22295 \begin_layout Enumerate
22296 Locate 
22297 \family typewriter
22298 C:
22299 \backslash
22300 new project 
22301 \family default
22302 in Windows Explorer, right click it, and select 
22303 \family sans
22304 TortoiseSVN\SpecialChar menuseparator
22305 Repo-browser
22306 \family default
22307 .
22308  If necessary, adjust the URL for the repository, then click OK.
22309 \end_layout
22310
22311 \begin_layout Enumerate
22312 Right click the level of the repository under which you want to place the
22313  new project folder (typically the top level) and click 
22314 \family sans
22315 Create folder
22316 \family default
22317  Supply a name for the project folder and click OK.
22318  Add a message for the log file if desired, then click OK again.
22319  The new project folder should appear in the repository.
22320  Finally, click OK again to exit the repository browser.
22321 \end_layout
22322
22323 \begin_layout Enumerate
22324 Once again right click 
22325 \family typewriter
22326 C:
22327 \backslash
22328 new project
22329 \family default
22330 , this time selecting SVN Checkout\SpecialChar ldots
22331  Select the URL of the project folder
22332  you just created in the repository, and set the checkout directory to 
22333 \family typewriter
22334 C:
22335 \backslash
22336 new project.
22337
22338 \family default
22339  Click OK.
22340  You will be warned about a non-empty folder; click OK to proceed.
22341  You should now have a 
22342 \family typewriter
22343 .svn
22344 \family default
22345  directory under 
22346 \family typewriter
22347 C:
22348 \backslash
22349 new project.
22350 \end_layout
22351
22352 \begin_layout Enumerate
22353 Create or open your document in \SpecialChar LyX
22354  and click 
22355 \family sans
22356 File\SpecialChar menuseparator
22357 Version
22358 \begin_inset space ~
22359 \end_inset
22360
22361 Control\SpecialChar menuseparator
22362 Register.
22363  
22364 \family default
22365 Add a log message and click OK to commit the document to version control.
22366 \end_layout
22367
22368 \begin_layout Standard
22369 From this point onward, you should have full functionality in the 
22370 \family sans
22371 File\SpecialChar menuseparator
22372 Version
22373 \begin_inset space ~
22374 \end_inset
22375
22376 Control
22377 \family default
22378  menu.
22379  You also have the option of checking the document in and out, viewing its
22380  history, etc.
22381  using the TortoiseSVN context menu in Windows Explorer or the Subversion
22382  client program from a command prompt.
22383 \end_layout
22384
22385 \begin_layout Subsubsection
22386 SSH tunnel used with SVN under Windows
22387 \end_layout
22388
22389 \begin_layout Standard
22390 Compared with Linux setting up an svn client to communicate over ssh under
22391  Windows is a rather troublesome task.
22392  We will at least offer some hints how to setup the client side but prior
22393  knowledge about ssh and the Windows command line is needed, also be prepared
22394  for a great deal of frustration\SpecialChar ldots
22395
22396 \end_layout
22397
22398 \begin_layout Enumerate
22399 Get an svn client for windows, as described in the previous sections.
22400  When it is a fresh install run some svn command (e.g.
22401  
22402 \begin_inset Flex Code
22403 status collapsed
22404
22405 \begin_layout Plain Layout
22406 svn --version
22407 \end_layout
22408
22409 \end_inset
22410
22411 ) to create config files, which you will need to change later on.
22412 \end_layout
22413
22414 \begin_layout Enumerate
22415 Choose an ssh client for Windows.
22416  There are several possibilities, we will use the one from Putty tools
22417 \begin_inset Foot
22418 status collapsed
22419
22420 \begin_layout Plain Layout
22421 \begin_inset Flex URL
22422 status collapsed
22423
22424 \begin_layout Plain Layout
22425
22426 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
22427 \end_layout
22428
22429 \end_inset
22430
22431
22432 \end_layout
22433
22434 \end_inset
22435
22436 .
22437  You will need to set the connection up so that the client doesn't ask for
22438  any password from you.
22439  To keep things easy we will use only keys without any additional password
22440  protection etc.
22441 \end_layout
22442
22443 \begin_deeper
22444 \begin_layout Enumerate
22445 Generate keys by 
22446 \begin_inset Flex Code
22447 status collapsed
22448
22449 \begin_layout Plain Layout
22450 puttygen
22451 \end_layout
22452
22453 \end_inset
22454
22455 .
22456  Save your private .ppk key file and put the public one on the server side.
22457  If the SVN server runs on Linux, note that the format of the public key
22458  is not compatible with Linux openssh and you will need to direcly copy-paste
22459  the key from the 
22460 \begin_inset Quotes eld
22461 \end_inset
22462
22463
22464 \emph on
22465 Public key for pasting into OpenSSH authorized_keys file
22466 \emph default
22467 :
22468 \begin_inset Quotes erd
22469 \end_inset
22470
22471  edit field into the server's 
22472 \begin_inset Flex Code
22473 status collapsed
22474
22475 \begin_layout Plain Layout
22476 ~/.ssh/authorized_keys
22477 \end_layout
22478
22479 \end_inset
22480
22481  / 
22482 \begin_inset Flex Code
22483 status collapsed
22484
22485 \begin_layout Plain Layout
22486 authorized_keys2
22487 \end_layout
22488
22489 \end_inset
22490
22491  file.
22492 \end_layout
22493
22494 \begin_layout Enumerate
22495 Get the Putty's 
22496 \begin_inset Flex Code
22497 status collapsed
22498
22499 \begin_layout Plain Layout
22500 plink
22501 \end_layout
22502
22503 \end_inset
22504
22505 .
22506  In the SVN config file
22507 \begin_inset Foot
22508 status collapsed
22509
22510 \begin_layout Plain Layout
22511 Exact path depends on Windows version, usually somewhere around 
22512 \begin_inset Flex Code
22513 status collapsed
22514
22515 \begin_layout Plain Layout
22516 c:
22517 \backslash
22518 Documents and Settings
22519 \backslash
22520 user
22521 \backslash
22522 Application Data
22523 \backslash
22524 Subversion
22525 \backslash
22526 config
22527 \end_layout
22528
22529 \end_inset
22530
22531  / 
22532 \begin_inset Flex Code
22533 status collapsed
22534
22535 \begin_layout Plain Layout
22536 AppData
22537 \backslash
22538 Roaming
22539 \backslash
22540 Subversion
22541 \end_layout
22542
22543 \end_inset
22544
22545 .
22546 \end_layout
22547
22548 \end_inset
22549
22550 , section [tunnels], setup ssh command, e.g.
22551  
22552 \begin_inset Flex Code
22553 status collapsed
22554
22555 \begin_layout Plain Layout
22556 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
22557 \end_layout
22558
22559 \end_inset
22560
22561 .
22562 \begin_inset Foot
22563 status collapsed
22564
22565 \begin_layout Plain Layout
22566 It will usually take a lot of time to get exact command right and it depends
22567  on many things.
22568  For example do not have some remote server saved as a default session in
22569  Putty etc.
22570  If things fail, try to connect via plink without SVN first.
22571 \end_layout
22572
22573 \end_inset
22574
22575
22576 \end_layout
22577
22578 \end_deeper
22579 \begin_layout Enumerate
22580 Checkout the SVN archive, e.
22581 \begin_inset space \thinspace{}
22582 \end_inset
22583
22584 g.
22585 \begin_inset Newline newline
22586 \end_inset
22587
22588
22589 \begin_inset Flex Code
22590 status collapsed
22591
22592 \begin_layout Plain Layout
22593 svn co svn+ssh://user@server/repository_path
22594 \end_layout
22595
22596 \end_inset
22597
22598 .
22599 \end_layout
22600
22601 \begin_layout Subsubsection
22602 End-of-Line Conversions
22603 \end_layout
22604
22605 \begin_layout Standard
22606 When the collaborators are mixing Linux and Windows environments, \SpecialChar LyX
22607  will
22608  use different line endings inside the .lyx files.
22609  This is not a problem as far as \SpecialChar LyX
22610  functionality is concerned, but the commit
22611  diffs will be huge and merge-conflicts prone.
22612  Fortunately SVN itself knows
22613 \begin_inset Foot
22614 status collapsed
22615
22616 \begin_layout Plain Layout
22617 \begin_inset Flex URL
22618 status collapsed
22619
22620 \begin_layout Plain Layout
22621
22622 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
22623 \end_layout
22624
22625 \end_inset
22626
22627
22628 \end_layout
22629
22630 \end_inset
22631
22632  how to deal with CR/LF problems when switching .lyx files to the 
22633 \begin_inset Flex Code
22634 status collapsed
22635
22636 \begin_layout Plain Layout
22637 native
22638 \end_layout
22639
22640 \end_inset
22641
22642  mode.
22643 \begin_inset Foot
22644 status collapsed
22645
22646 \begin_layout Plain Layout
22647 For the lazy guys: 
22648 \begin_inset Flex Code
22649 status collapsed
22650
22651 \begin_layout Plain Layout
22652 svn propset svn:eol-style native FILE_NAME
22653 \end_layout
22654
22655 \end_inset
22656
22657
22658 \end_layout
22659
22660 \end_inset
22661
22662
22663 \end_layout
22664
22665 \begin_layout Subsection
22666 GIT commands in \SpecialChar LyX
22667
22668 \end_layout
22669
22670 \begin_layout Standard
22671 A minimal subset of GIT commands is now supported by \SpecialChar LyX
22672 .
22673  You can find the commands in the 
22674 \family sans
22675 File\SpecialChar menuseparator
22676 Version
22677 \begin_inset space ~
22678 \end_inset
22679
22680 Control
22681 \family default
22682  submenu.
22683  Please note that if you use password protected access to repository via
22684  ssh, you will be asked in terminal window.
22685  \SpecialChar LyX
22686  was tested against GIT 1.7.
22687 \begin_inset Foot
22688 status collapsed
22689
22690 \begin_layout Plain Layout
22691 Windows users please note that you need to ensure that git is on the path.
22692  This can be set from within \SpecialChar LyX
22693  at 
22694 \family sans
22695 Tools\SpecialChar menuseparator
22696 Preferences\SpecialChar menuseparator
22697 Paths\SpecialChar menuseparator
22698 PATH prefix
22699 \family default
22700 .
22701 \end_layout
22702
22703 \end_inset
22704
22705
22706 \end_layout
22707
22708 \begin_layout Standard
22709 One big difference of GIT and the other supported version control systems
22710  is the distributed nature of GIT: With traditional version control systems
22711  there is one central server which hosts the repository.
22712  Users commit their changes to the server, and get updates made by other
22713  users from it.
22714  With GIT, users commit to a local repository.
22715  The local repository can be synchronized with one or more remote repositories
22716  using the 
22717 \begin_inset Flex Code
22718 status collapsed
22719
22720 \begin_layout Plain Layout
22721 pull
22722 \end_layout
22723
22724 \end_inset
22725
22726  and 
22727 \begin_inset Flex Code
22728 status collapsed
22729
22730 \begin_layout Plain Layout
22731 push
22732 \end_layout
22733
22734 \end_inset
22735
22736  GIT commands.
22737  \SpecialChar LyX
22738  does not interact in any way with remote GIT repositories.
22739  It works exclusively with the local repository in a very similar way as
22740  with a central CVS or SVN repository.
22741  If you use remote GIT repositories you need to do the 
22742 \begin_inset Flex Code
22743 status collapsed
22744
22745 \begin_layout Plain Layout
22746 pull
22747 \end_layout
22748
22749 \end_inset
22750
22751  and 
22752 \begin_inset Flex Code
22753 status collapsed
22754
22755 \begin_layout Plain Layout
22756 push
22757 \end_layout
22758
22759 \end_inset
22760
22761  operations with your favourite GIT client.
22762 \end_layout
22763
22764 \begin_layout Subsubsection
22765
22766 \family sans
22767 Register
22768 \end_layout
22769
22770 \begin_layout Standard
22771 If your document is not under revision control, this is the only item shown
22772  in the menu.
22773  And if it is under revision control, the 
22774 \family sans
22775 Register
22776 \family default
22777  item is not visible.
22778 \end_layout
22779
22780 \begin_layout Standard
22781 This command registers in GIT your document ONLY in case you have already
22782  the documents directory under GIT control (in particular 
22783 \family typewriter
22784 .git/index
22785 \family default
22786  file exists).
22787  This means you have to checkout the archive by yourself.
22788 \end_layout
22789
22790 \begin_layout Standard
22791 Then you are asked interactively to supply an initial description of the
22792  document.
22793  Don't forget that registered file is not yet committed.
22794 \end_layout
22795
22796 \begin_layout Standard
22797 GIT command that is run: 
22798 \family typewriter
22799 git add 
22800 \begin_inset Quotes qld
22801 \end_inset
22802
22803 <file-name>
22804 \begin_inset Quotes qld
22805 \end_inset
22806
22807
22808 \end_layout
22809
22810 \begin_layout Standard
22811 Read 
22812 \family typewriter
22813 man git
22814 \family default
22815  to understand the switches.
22816 \end_layout
22817
22818 \begin_layout Subsubsection
22819
22820 \family sans
22821 Check In Changes
22822 \end_layout
22823
22824 \begin_layout Standard
22825 When you are finished editing a file, you commit your changes.
22826  When you do this, you are asked for a description of the changes.
22827  After that changes are committed.
22828 \end_layout
22829
22830 \begin_layout Standard
22831 GIT command: 
22832 \family typewriter
22833 git commit -q -m"<description>" <file-name>
22834 \end_layout
22835
22836 \begin_layout Subsubsection
22837
22838 \family sans
22839 Revert To Repository Version
22840 \end_layout
22841
22842 \begin_layout Standard
22843 This will discard all changes made to the document since the last check
22844  in.
22845  You get a warning before changes are discarded.
22846 \end_layout
22847
22848 \begin_layout Standard
22849 GIT command: 
22850 \family typewriter
22851 git checkout -q 
22852 \begin_inset Quotes qld
22853 \end_inset
22854
22855 <file-name>
22856 \begin_inset Quotes qld
22857 \end_inset
22858
22859
22860 \end_layout
22861
22862 \begin_layout Subsubsection
22863
22864 \family sans
22865 Rename
22866 \end_layout
22867
22868 \begin_layout Standard
22869 This will rename the current document including the version history.
22870  It requires a clean document without any changes since the last checkin.
22871  You are asked for a file name and a description of the rename operation.
22872  After that the document is renamed, both locally and in the repository.
22873  If the parent directories of the new and old file names differ, all relative
22874  paths of included files are adjusted (like in 
22875 \family sans
22876 File\SpecialChar menuseparator
22877 Save As
22878 \family default
22879 \SpecialChar ldots
22880 ).
22881  Finally, the document is reloaded using the new name.
22882 \end_layout
22883
22884 \begin_layout Labeling
22885 \labelwidthstring 00.00.0000
22886 GIT
22887 \begin_inset space ~
22888 \end_inset
22889
22890 commands: 
22891 \begin_inset space ~
22892 \end_inset
22893
22894
22895 \begin_inset Newline newline
22896 \end_inset
22897
22898
22899 \begin_inset Flex Code
22900 status collapsed
22901
22902 \begin_layout Plain Layout
22903 git mv 
22904 \family typewriter
22905
22906 \begin_inset Quotes qld
22907 \end_inset
22908
22909 <file-name>
22910 \begin_inset Quotes qld
22911 \end_inset
22912
22913  
22914 \begin_inset Quotes qld
22915 \end_inset
22916
22917 <new-file-name>
22918 \begin_inset Quotes qld
22919 \end_inset
22920
22921
22922 \end_layout
22923
22924 \end_inset
22925
22926
22927 \begin_inset Newline newline
22928 \end_inset
22929
22930
22931 \begin_inset Flex Code
22932 status collapsed
22933
22934 \begin_layout Plain Layout
22935 git commit
22936 \end_layout
22937
22938 \end_inset
22939
22940
22941 \end_layout
22942
22943 \begin_layout Subsubsection
22944
22945 \family sans
22946 Show History
22947 \end_layout
22948
22949 \begin_layout Standard
22950 This shows the complete history of the GIT document.
22951  The output of 
22952 \family typewriter
22953 git log 
22954 \begin_inset Quotes qld
22955 \end_inset
22956
22957 <file-name>
22958 \begin_inset Quotes qld
22959 \end_inset
22960
22961
22962 \family default
22963  is shown in a browser.
22964 \end_layout
22965
22966 \begin_layout Subsubsection
22967 Version Info
22968 \end_layout
22969
22970 \begin_layout Standard
22971 \SpecialChar LyX
22972  supports GIT hash number of the last commit to the file, 
22973 \change_inserted 1119979965 1564297456
22974 its abbreviated form, 
22975 \change_unchanged
22976 author name, date and time of last commit.
22977  All those are extracted from 
22978 \family typewriter
22979 git log -n 1 --pretty=format:%H%n
22980 \change_inserted 1119979965 1564297427
22981 %h%n
22982 \change_unchanged
22983 %an%n%ai
22984 \family default
22985 .
22986  Tree version information is obtained via 
22987 \family typewriter
22988 git describe --abbrev --dirty --long
22989 \family default
22990 .
22991  See 
22992 \begin_inset CommandInset ref
22993 LatexCommand ref
22994 reference "subsec:VCS-Revision-Information"
22995
22996 \end_inset
22997
22998  for other details.
22999 \end_layout
23000
23001 \begin_layout Subsection
23002 Further tuning
23003 \end_layout
23004
23005 \begin_layout Standard
23006 With the recent addition of the 
23007 \begin_inset Flex Code
23008 status collapsed
23009
23010 \begin_layout Plain Layout
23011 vc-command
23012 \end_layout
23013
23014 \end_inset
23015
23016  function \SpecialChar LyX
23017  power users are allowed to create their own commands for revision
23018  control.
23019 \end_layout
23020
23021 \begin_layout Standard
23022 As an example you can see how two TortoiseSVN commands could be integrated
23023  directly:
23024 \end_layout
23025
23026 \begin_layout Description
23027 Commit: 
23028 \begin_inset Flex Code
23029 status collapsed
23030
23031 \begin_layout Plain Layout
23032 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
23033 \end_layout
23034
23035 \end_inset
23036
23037
23038 \end_layout
23039
23040 \begin_layout Description
23041 Revert: 
23042 \begin_inset Flex Code
23043 status collapsed
23044
23045 \begin_layout Plain Layout
23046 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
23047 \end_layout
23048
23049 \end_inset
23050
23051
23052 \end_layout
23053
23054 \begin_layout Subsection
23055 Version control and Document comparison
23056 \end_layout
23057
23058 \begin_layout Standard
23059 One of the typical uses of version control is to inspect the changes between
23060  revisions, usually by creating 
23061 \begin_inset Flex Code
23062 status collapsed
23063
23064 \begin_layout Plain Layout
23065 diff
23066 \end_layout
23067
23068 \end_inset
23069
23070  dumps.
23071  While this is useful for plain text files, it is much less useful in the
23072  case of \SpecialChar LyX
23073  files, which have more a complicated structure.
23074  Hence we provide binding to the Document comparison feature.
23075  There are two ways of calling this feature – either by direct call of 
23076 \begin_inset Flex Code
23077 status collapsed
23078
23079 \begin_layout Plain Layout
23080 vc-compare
23081 \end_layout
23082
23083 \end_inset
23084
23085  \SpecialChar LyX
23086  function (for details see \SpecialChar LyX
23087  functions manual) or by the toolbar icon 
23088 \begin_inset Info
23089 type  "icon"
23090 arg   "vc-compare"
23091 \end_inset
23092
23093  or the menu item 
23094 \begin_inset Info
23095 type  "menu"
23096 arg   "vc-compare"
23097 \end_inset
23098
23099 , respectively.
23100  One can either compare two chosen revisions of the document or he can simply
23101  compare the current version of edited text with older revisions (where
23102  '
23103 \begin_inset Flex Noun
23104 status collapsed
23105
23106 \begin_layout Plain Layout
23107 0
23108 \end_layout
23109
23110 \end_inset
23111
23112 ' revisions back means comparison of the edited file with last commited
23113  revision).
23114  
23115 \end_layout
23116
23117 \begin_layout Standard
23118 This feature is supported for SVN and RCS though due to the more complicated
23119  versioning scheme of RCS there is a constraint – when addressing the revisions
23120  in dialog, numbers always point to the last number in RCS revision number,
23121  i.e.
23122  '35' in '1.2.35'.
23123  We don't currently support GIT addressing of revisions, one can just compare
23124  edited document with its revision X steps backs, where X is addressed as
23125  
23126 \begin_inset Flex Code
23127 status collapsed
23128
23129 \begin_layout Plain Layout
23130 HEAD~X
23131 \end_layout
23132
23133 \end_inset
23134
23135 .
23136 \end_layout
23137
23138 \begin_layout Section
23139 Literate Programming
23140 \end_layout
23141
23142 \begin_layout Standard
23143 Updated by 
23144 \noun on
23145 Kayvan Sylvan 
23146 \noun default
23147 (kayvan@sylvan.com)
23148 \noun on
23149
23150 \noun default
23151 original documentation written by 
23152 \noun on
23153 Edmar Wienskoski Jr.
23154
23155 \noun default
23156  (edmar-w-jr@technologist.com)
23157 \end_layout
23158
23159 \begin_layout Subsection
23160 Introduction
23161 \end_layout
23162
23163 \begin_layout Standard
23164 The main purpose of this documentation is to show you how to use \SpecialChar LyX
23165  for literate
23166  programming, where it is assumed that you are familiar with this programming
23167  technique, and know what 
23168 \begin_inset Quotes eld
23169 \end_inset
23170
23171 tangling
23172 \begin_inset Quotes erd
23173 \end_inset
23174
23175  and 
23176 \begin_inset Quotes eld
23177 \end_inset
23178
23179 weaving
23180 \begin_inset Quotes erd
23181 \end_inset
23182
23183  means.
23184  If that is not the case, please follow the web links provided in the following
23185  sections.
23186  There is a lot of good documentation out there covering old development
23187  history to the latest tools tips.
23188 \end_layout
23189
23190 \begin_layout Standard
23191 It is also assumed that you are familiar with \SpecialChar LyX
23192  itself to a point that you
23193  are comfortable changing your \SpecialChar LyX
23194  preferences, and X resources file.
23195  If that is not the case please refer to other \SpecialChar LyX
23196  documentation to cover your
23197  specific needs.
23198 \end_layout
23199
23200 \begin_layout Subsection
23201 Literate Programming
23202 \end_layout
23203
23204 \begin_layout Standard
23205 From the Literate Programming FAQ: 
23206 \end_layout
23207
23208 \begin_layout Quotation
23209 Literate programming is the combination of documentation and source together
23210  in a fashion suited for reading by human beings.
23211  In fact, literate programs should be enjoyable reading, even inviting!
23212  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
23213  and documentation in a single file.
23214  Literate programming tools then parse the file to produce either readable
23215  documentation or compilable source.
23216  The WEB style of literate programming was created by D.
23217 \begin_inset space \thinspace{}
23218 \end_inset
23219
23220 E.
23221  Knuth during the development of his \SpecialChar TeX
23222  typesetting software.
23223  
23224 \end_layout
23225
23226 \begin_layout Standard
23227 Another excerpt says:
23228 \end_layout
23229
23230 \begin_layout Quotation
23231
23232 \emph on
23233 How is literate programming different from verbose commenting?
23234 \end_layout
23235
23236 \begin_layout Quotation
23237 There are three distinguishing characteristics.
23238  In order of importance, they are: 
23239 \end_layout
23240
23241 \begin_deeper
23242 \begin_layout Itemize
23243 flexible order of elaboration 
23244 \end_layout
23245
23246 \begin_layout Itemize
23247 automatic support for browsing 
23248 \end_layout
23249
23250 \begin_layout Itemize
23251 typeset documentation, especially diagrams and mathematics 
23252 \end_layout
23253
23254 \end_deeper
23255 \begin_layout Standard
23256 Now that I sparked your curiosity, take a look in the references.
23257 \end_layout
23258
23259 \begin_layout Subsubsection
23260 References
23261 \end_layout
23262
23263 \begin_layout Standard
23264 The complete Literate Programming FAQ can be found at:
23265 \end_layout
23266
23267 \begin_layout Quote
23268 Literate Programming FAQ 
23269 \begin_inset Flex URL
23270 status open
23271
23272 \begin_layout Plain Layout
23273
23274 http://www.literateprogramming.com/lpfaq.pdf
23275 \end_layout
23276
23277 \end_inset
23278
23279
23280 \end_layout
23281
23282 \begin_layout Standard
23283 The FAQ lists 23 (twenty three!) different literate programming tools.
23284  Where some are specialized or 
23285 \begin_inset Quotes eld
23286 \end_inset
23287
23288 tailored
23289 \begin_inset Quotes erd
23290 \end_inset
23291
23292  for particular programming languages, while other have general scope.
23293  I selected 
23294 \noun on
23295 Noweb
23296 \noun default
23297  for my own use for several reasons:
23298 \end_layout
23299
23300 \begin_layout Itemize
23301 It can generate the documentation either in \SpecialChar LaTeX
23302  or HTML.
23303 \end_layout
23304
23305 \begin_layout Itemize
23306 It has a open architecture, i.
23307 \begin_inset space \thinspace{}
23308 \end_inset
23309
23310 e.
23311 \begin_inset space \space{}
23312 \end_inset
23313
23314 it is easy to plug in new filters
23315 \begin_inset Foot
23316 status collapsed
23317
23318 \begin_layout Plain Layout
23319
23320 \emph on
23321 Filters 
23322 \emph default
23323 are programs that read a given data stream and output a manipulated data
23324  stream.
23325  That way, a WEB file (consisting of literate code) can be turned into a
23326  file consisting only of C program code or \SpecialChar LaTeX
23327  code.
23328 \end_layout
23329
23330 \end_inset
23331
23332  and to perform special processing that you may need.
23333  
23334 \end_layout
23335
23336 \begin_layout Itemize
23337 There is a good selection of filters available already (the HTML is one
23338  of them).
23339 \end_layout
23340
23341 \begin_layout Itemize
23342 It is free.
23343 \end_layout
23344
23345 \begin_layout Standard
23346 The Noweb web page can be found at: 
23347 \end_layout
23348
23349 \begin_layout Quote
23350 Noweb home page 
23351 \begin_inset Flex URL
23352 status collapsed
23353
23354 \begin_layout Plain Layout
23355
23356 https://www.cs.tufts.edu/~nr/noweb/
23357 \end_layout
23358
23359 \end_inset
23360
23361
23362 \end_layout
23363
23364 \begin_layout Standard
23365 Starting from there you can reach many other interesting links and even
23366  some literate program examples.
23367 \end_layout
23368
23369 \begin_layout Subsection
23370 \SpecialChar LyX
23371  and Literate Programming with Noweb
23372 \end_layout
23373
23374 \begin_layout Standard
23375 The \SpecialChar LyX
23376  support for Literate Programming is provided by using the generic \SpecialChar LyX
23377
23378  converters mechanism.
23379  This support is provided in a 
23380 \begin_inset Quotes eld
23381 \end_inset
23382
23383 Noweb independent
23384 \begin_inset Quotes erd
23385 \end_inset
23386
23387  way, i.
23388 \begin_inset space \thinspace{}
23389 \end_inset
23390
23391 e.
23392 \begin_inset space \space{}
23393 \end_inset
23394
23395 you will be able to use this new \SpecialChar LyX
23396  feature with some other literate programming
23397  tool of your choice by just changing your \SpecialChar LyX
23398  preferences.
23399 \end_layout
23400
23401 \begin_layout Subsubsection
23402 Generating documents and code (weaving and tangling)
23403 \end_layout
23404
23405 \begin_layout Paragraph
23406 Using the noweb module
23407 \end_layout
23408
23409 \begin_layout Standard
23410 If you have installed Noweb and \SpecialChar LyX
23411  successfully, whenever you open a new document,
23412  after you have chosen its document class, use the 
23413 \family sans
23414 Document\SpecialChar menuseparator
23415 Settings
23416 \family default
23417  menu to add the 
23418 \begin_inset Quotes eld
23419 \end_inset
23420
23421 noweb
23422 \begin_inset Quotes erd
23423 \end_inset
23424
23425  module.
23426  If Noweb is correctly installed, when you click on the 
23427 \begin_inset Quotes eld
23428 \end_inset
23429
23430 Modules
23431 \begin_inset Quotes erd
23432 \end_inset
23433
23434  link, you will see the 
23435 \begin_inset Quotes eld
23436 \end_inset
23437
23438 noweb
23439 \begin_inset Quotes erd
23440 \end_inset
23441
23442  module in the available list and you can add it to your document.
23443 \end_layout
23444
23445 \begin_layout Paragraph
23446 Typing code in
23447 \end_layout
23448
23449 \begin_layout Standard
23450 \SpecialChar LyX
23451  enables you to write code with a custom inset named 
23452 \begin_inset Flex Noun
23453 status collapsed
23454
23455 \begin_layout Plain Layout
23456 Chunk
23457 \end_layout
23458
23459 \end_inset
23460
23461 .
23462  Noweb delimits chunks like this:
23463 \end_layout
23464
23465 \begin_layout LyX-Code
23466 <<My code>>=
23467 \end_layout
23468
23469 \begin_layout LyX-Code
23470   code
23471 \end_layout
23472
23473 \begin_layout LyX-Code
23474   more code
23475 \end_layout
23476
23477 \begin_layout LyX-Code
23478   even more code
23479 \end_layout
23480
23481 \begin_layout LyX-Code
23482   @
23483 \end_layout
23484
23485 \begin_layout Standard
23486 The problem is that whatever is written in between the << and the 
23487 \family typewriter
23488 @
23489 \family default
23490  must be taken literally, i.
23491 \begin_inset space \thinspace{}
23492 \end_inset
23493
23494 e.
23495 \begin_inset space \space{}
23496 \end_inset
23497
23498 \SpecialChar LyX
23499  should be prevented from making any special interpretation of what has
23500  been written.
23501  This is also handled by 
23502 \begin_inset Flex Noun
23503 status collapsed
23504
23505 \begin_layout Plain Layout
23506 Chunk
23507 \end_layout
23508
23509 \end_inset
23510
23511 , that works like a normal text inset but has a free spacing capability.
23512 \end_layout
23513
23514 \begin_layout Standard
23515 As a special note, you can also use the 
23516 \begin_inset Quotes eld
23517 \end_inset
23518
23519 %def
23520 \begin_inset Quotes erd
23521 \end_inset
23522
23523  construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
23524 rence:
23525 \end_layout
23526
23527 \begin_layout LyX-Code
23528 <<My chunk>>=
23529 \end_layout
23530
23531 \begin_layout LyX-Code
23532 def some_function(args):
23533 \end_layout
23534
23535 \begin_layout LyX-Code
23536    "This is the doc string for this function."
23537 \end_layout
23538
23539 \begin_layout LyX-Code
23540    print "My args: ", args
23541 \end_layout
23542
23543 \begin_layout LyX-Code
23544 @ %def some_function
23545 \end_layout
23546
23547 \begin_layout Standard
23548 For an example of this usage and the resulting cross-reference output, look
23549  at the Literate python program in 
23550 \emph on
23551 LIBDIR/examples/listerrors.lyx
23552 \emph default
23553  which should make this all clear.
23554 \end_layout
23555
23556 \begin_layout Paragraph
23557 Generating the documentation
23558 \end_layout
23559
23560 \begin_layout Standard
23561 At this point you already have a new document file with a proper document
23562  class, and with some code and text on it.
23563  How do I print it? The answer is simple, you select 
23564 \family sans
23565 View\SpecialChar menuseparator
23566 DVI,
23567 \family default
23568  etc.
23569  Just like you would do for a plain document.
23570  No special procedure is required.
23571 \end_layout
23572
23573 \begin_layout Standard
23574 To help orientate you, I will now explain what happens inside \SpecialChar LyX
23575 :
23576 \end_layout
23577
23578 \begin_layout Enumerate
23579 When the 
23580 \family sans
23581 Update\SpecialChar menuseparator
23582 DVI
23583 \family default
23584  menu option is chosen, a \SpecialChar LaTeX
23585  file is generated.
23586  
23587 \end_layout
23588
23589 \begin_deeper
23590 \begin_layout Standard
23591 If the document is of any literate class the generated file will be named
23592  with an extension name defined by the 
23593 \begin_inset Quotes eld
23594 \end_inset
23595
23596 literate
23597 \begin_inset Quotes erd
23598 \end_inset
23599
23600  format (defined in the Preferences panel), otherwise the file will have
23601  the usual 
23602 \family typewriter
23603 .tex
23604 \family default
23605  extension.
23606 \end_layout
23607
23608 \end_deeper
23609 \begin_layout Enumerate
23610 Note that the only difference so far is in the name of the file, no special
23611  processing is required by \SpecialChar LyX
23612 .
23613  Given that you formatted the code using the 
23614 \begin_inset Flex Noun
23615 status collapsed
23616
23617 \begin_layout Plain Layout
23618 Chunk
23619 \end_layout
23620
23621 \end_inset
23622
23623  inset that, by itself, takes care of the business.
23624 \end_layout
23625
23626 \begin_layout Enumerate
23627 If the document is of any literate class \SpecialChar LyX
23628  will then use the internal \SpecialChar LyX
23629  to
23630  Noweb converter, followed by the Noweb to \SpecialChar LaTeX
23631  converter
23632 \begin_inset Foot
23633 status collapsed
23634
23635 \begin_layout Plain Layout
23636 The converters are defined in the 
23637 \family sans
23638 Tools\SpecialChar menuseparator
23639 Preferences
23640 \family default
23641  panel, under the 
23642 \begin_inset Quotes eld
23643 \end_inset
23644
23645 Conversion
23646 \begin_inset Quotes erd
23647 \end_inset
23648
23649  tab.
23650  See section 
23651 \emph on
23652 Converters
23653 \emph default
23654  of the 
23655 \emph on
23656 Customization
23657 \emph default
23658  manual for general information about converters.
23659 \end_layout
23660
23661 \end_inset
23662
23663  to generate the \SpecialChar LaTeX
23664  file.
23665 \end_layout
23666
23667 \begin_deeper
23668 \begin_layout Standard
23669 Otherwise it will just skip this step.
23670 \end_layout
23671
23672 \end_deeper
23673 \begin_layout Enumerate
23674 Finally, \SpecialChar LaTeX
23675  is invoked and the regular post processing continues as in a plain
23676  document.
23677 \end_layout
23678
23679 \begin_layout Standard
23680 Independence from a particular 
23681 \begin_inset Quotes eld
23682 \end_inset
23683
23684 literate tool
23685 \begin_inset Quotes erd
23686 \end_inset
23687
23688  is easily achieved by changing the commands that are run by the various
23689  converters.
23690 \end_layout
23691
23692 \begin_layout Paragraph
23693 Generating the code
23694 \end_layout
23695
23696 \begin_layout Standard
23697 When the build menu option is chosen or the corresponding button in the
23698  toolbar is pressed, a \SpecialChar LaTeX
23699  file is generated just like step 1 above.
23700  Next, \SpecialChar LyX
23701  invokes the 
23702 \family typewriter
23703 Noweb->Program
23704 \family default
23705  converter.
23706  This converter needs to be defined by the user and is not installed by
23707  default, though the Program format is.
23708  This converter (like any other converter) will have two parts:
23709 \end_layout
23710
23711 \begin_layout Enumerate
23712 The converter program itself.
23713  This program performs the conversion from the one format to the other (in
23714  this case, from the Noweb format to the Program pseudo-format).
23715 \end_layout
23716
23717 \begin_layout Enumerate
23718 The error log parser.
23719  This is a program whose sole purpose is to rewrite error messages in a
23720  format that \SpecialChar LyX
23721  understands.
23722  This makes it possible for \SpecialChar LyX
23723  to place error boxes in the right places in
23724  the file buffer.
23725 \end_layout
23726
23727 \begin_layout Standard
23728 The first part, the 
23729 \begin_inset Quotes eld
23730 \end_inset
23731
23732 Converter
23733 \begin_inset Quotes erd
23734 \end_inset
23735
23736  setting, should be set to
23737 \end_layout
23738
23739 \begin_layout LyX-Code
23740
23741 \family typewriter
23742 build-script $$i
23743 \family default
23744  $$r
23745 \end_layout
23746
23747 \begin_layout Standard
23748 This basically means that \SpecialChar LyX
23749  will call 
23750 \begin_inset Quotes eld
23751 \end_inset
23752
23753 build-script
23754 \begin_inset Quotes erd
23755 \end_inset
23756
23757  (a program or script) with the name of the Noweb file (normally a file
23758  in the \SpecialChar LyX
23759  temp directory) and the directory path of the original \SpecialChar LyX
23760  file.
23761  
23762 \end_layout
23763
23764 \begin_layout Standard
23765 This is an implementation of 
23766 \begin_inset Quotes eld
23767 \end_inset
23768
23769 build-script
23770 \begin_inset Quotes erd
23771 \end_inset
23772
23773  that you can place in a directory on your path:
23774 \end_layout
23775
23776 \begin_layout LyX-Code
23777
23778 \family sans
23779 #!/bin/sh
23780 \end_layout
23781
23782 \begin_layout LyX-Code
23783
23784 \family sans
23785 #
23786 \end_layout
23787
23788 \begin_layout LyX-Code
23789
23790 \family sans
23791 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
23792 \end_layout
23793
23794 \begin_layout Standard
23795 The next part of the converter setting is the 
23796 \begin_inset Quotes eld
23797 \end_inset
23798
23799 Flags
23800 \begin_inset Quotes erd
23801 \end_inset
23802
23803  which is to be set to
23804 \end_layout
23805
23806 \begin_layout LyX-Code
23807
23808 \family typewriter
23809 parselog=$$s/scripts/listerrors
23810 \end_layout
23811
23812 \begin_layout Standard
23813 This will run any errors that are generated by the 
23814 \begin_inset Quotes eld
23815 \end_inset
23816
23817 build-script
23818 \begin_inset Quotes erd
23819 \end_inset
23820
23821  process through the 
23822 \begin_inset Quotes eld
23823 \end_inset
23824
23825 listerrors
23826 \begin_inset Quotes erd
23827 \end_inset
23828
23829  program.
23830 \end_layout
23831
23832 \begin_layout Standard
23833 The build will normally take place in \SpecialChar LyX
23834 's temporary directory, so the files
23835  produced by the conversion will be in that directory.
23836  \SpecialChar LyX
23837  will copy out what it regards as the `main' file, but the 
23838 \family typewriter
23839 Noweb->Program
23840 \family default
23841  conversion may produce several files, and so most of these would then be
23842  deleted when \SpecialChar LyX
23843  was closed.
23844  This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
23845  the build-script chunk can place the generated files in that location.
23846 \end_layout
23847
23848 \begin_layout Paragraph
23849 Build instructions in the document
23850 \end_layout
23851
23852 \begin_layout Standard
23853 The last piece of the integration between \SpecialChar LyX
23854  and noweb is the 
23855 \begin_inset Quotes eld
23856 \end_inset
23857
23858 build-script
23859 \begin_inset Quotes erd
23860 \end_inset
23861
23862  chunk.
23863  Generally, the instructions for building your program should be embedded
23864  in a chunk of its own.
23865  The noweb-specific 
23866 \begin_inset Quotes eld
23867 \end_inset
23868
23869 build-script
23870 \begin_inset Quotes erd
23871 \end_inset
23872
23873  above uses the notangle command to look for this chunk (called 
23874 \begin_inset Quotes eld
23875 \end_inset
23876
23877 build-script
23878 \begin_inset Quotes erd
23879 \end_inset
23880
23881 ) and runs its contents through 
23882 \begin_inset Quotes eld
23883 \end_inset
23884
23885 sh
23886 \begin_inset Quotes erd
23887 \end_inset
23888
23889 .
23890 \end_layout
23891
23892 \begin_layout Standard
23893 Typically, such a chunk would look something like this:
23894 \end_layout
23895
23896 \begin_layout LyX-Code
23897 <<build-script>>=
23898 \end_layout
23899
23900 \begin_layout LyX-Code
23901 #!/bin/sh
23902 \begin_inset Newline newline
23903 \end_inset
23904
23905 if [ -z "${NOWEB_SOURCE}" ]
23906 \begin_inset Newline newline
23907 \end_inset
23908
23909 then
23910 \end_layout
23911
23912 \begin_layout LyX-Code
23913 NOWEB_SOURCE=myfile.nw
23914 \begin_inset Newline newline
23915 \end_inset
23916
23917 fi
23918 \begin_inset Newline newline
23919 \end_inset
23920
23921 [...
23922  code to extract files ...
23923  use NOWEB_OUTPUT_DIR here ...]
23924 \begin_inset Newline newline
23925 \end_inset
23926
23927 [...
23928  code to compile files ...]
23929 \begin_inset Newline newline
23930 \end_inset
23931
23932 @
23933 \end_layout
23934
23935 \begin_layout Standard
23936 Look in 
23937 \emph on
23938 LIBDIR/examples/listerrors.lyx
23939 \emph default
23940  or in 
23941 \emph on
23942 LIBDIR/examples/Literate.lyx
23943 \emph default
23944  which implement two versions of the 
23945 \begin_inset Quotes eld
23946 \end_inset
23947
23948 listerrors
23949 \begin_inset Quotes erd
23950 \end_inset
23951
23952  program for some illustrations of how all of these pieces go together or
23953  in 
23954 \emph on
23955 LIBDIR/examples/noweb2lyx.lyx.
23956
23957 \emph default
23958  Interestingly, these three files show off the language-indepence of the
23959  \SpecialChar LyX
23960  literate programming support since they are written in Python, C and Perl
23961  respectively.
23962 \end_layout
23963
23964 \begin_layout Subsubsection
23965 Configuring \SpecialChar LyX
23966
23967 \end_layout
23968
23969 \begin_layout Standard
23970 All the Literate Programming support is configured by the 
23971 \family sans
23972 Tools\SpecialChar menuseparator
23973 Preferences
23974 \family default
23975  panel in the 
23976 \begin_inset Quotes eld
23977 \end_inset
23978
23979 File Handling
23980 \begin_inset Quotes erd
23981 \end_inset
23982
23983  tab.
23984  The important parts are:
23985 \end_layout
23986
23987 \begin_layout Description
23988 the
23989 \begin_inset space ~
23990 \end_inset
23991
23992
23993 \begin_inset Quotes eld
23994 \end_inset
23995
23996 NoWeb
23997 \begin_inset Quotes erd
23998 \end_inset
23999
24000
24001 \begin_inset space ~
24002 \end_inset
24003
24004 format Set up via the File Formats tab, this is where the Noweb-specific
24005  pieces are set up.
24006  The 
24007 \family sans
24008 GUI Name
24009 \family default
24010  is set to 
24011 \family typewriter
24012 NoWeb
24013 \family default
24014 , the file extension is set to 
24015 \family typewriter
24016 .nw
24017 \family default
24018 .
24019  This tells \SpecialChar LyX
24020  to create a file with a 
24021 \family typewriter
24022 .nw
24023 \family default
24024  extension in the first step of the conversion process.
24025 \end_layout
24026
24027 \begin_layout Description
24028 the
24029 \begin_inset space ~
24030 \end_inset
24031
24032
24033 \family sans
24034 Program
24035 \family default
24036
24037 \begin_inset space ~
24038 \end_inset
24039
24040 format This is an empty format whose sole purpose is to be the endpoint
24041  of a conversion (which then allows us to set up a converter for it).
24042 \end_layout
24043
24044 \begin_layout Description
24045
24046 \family sans
24047 NoWeb
24048 \family default
24049 ->
24050 \family sans
24051 \SpecialChar LaTeX
24052
24053 \family default
24054  This converter performs the 
24055 \begin_inset Quotes eld
24056 \end_inset
24057
24058 weaving
24059 \begin_inset Quotes erd
24060 \end_inset
24061
24062  of the literate document.
24063  For Noweb, it is set to 
24064 \begin_inset Quotes eld
24065 \end_inset
24066
24067
24068 \family typewriter
24069 noweave -delay -index $$i > $$o
24070 \family default
24071
24072 \begin_inset Quotes erd
24073 \end_inset
24074
24075
24076 \end_layout
24077
24078 \begin_layout Description
24079
24080 \family sans
24081 NoWeb
24082 \family default
24083 ->
24084 \family sans
24085 Program
24086 \family default
24087  This performs the 
24088 \begin_inset Quotes eld
24089 \end_inset
24090
24091 tangling step
24092 \begin_inset Quotes erd
24093 \end_inset
24094
24095 .
24096  As stated above, the Converter is set to 
24097 \begin_inset Quotes eld
24098 \end_inset
24099
24100
24101 \family typewriter
24102 build-script $$i
24103 \family default
24104  $$r
24105 \begin_inset Quotes erd
24106 \end_inset
24107
24108 , with Flags set to
24109 \begin_inset Newline newline
24110 \end_inset
24111
24112
24113 \begin_inset Quotes eld
24114 \end_inset
24115
24116
24117 \family typewriter
24118 parselog=$$s/scripts/listerrors
24119 \family default
24120
24121 \begin_inset Quotes erd
24122 \end_inset
24123
24124 .
24125 \end_layout
24126
24127 \begin_layout Subsubsection
24128 Debug extensions
24129 \end_layout
24130
24131 \begin_layout Standard
24132 There is also a new function implemented in the \SpecialChar LyX
24133  server, the 
24134 \begin_inset Quotes eld
24135 \end_inset
24136
24137 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
24138  
24139 \end_layout
24140
24141 \begin_layout Standard
24142 When debugging code with ddd/gdb, it is possible to invoke a text editor
24143  at the current execution position with a single key stroke.
24144  The default ddd configuration for that is shift-ctrl-V.
24145  It happens that you can define the editor command line invocation in ddd
24146  by accessing the 
24147 \family sans
24148 Edit\SpecialChar menuseparator
24149 Preferences\SpecialChar menuseparator
24150 Helpers
24151 \family default
24152  dialog and changing the "Edit Sources" entry.
24153 \end_layout
24154
24155 \begin_layout Standard
24156 I take advantage of the newly created \SpecialChar LyX
24157  server function and this ddd feature,
24158  and set 
24159 \begin_inset Quotes eld
24160 \end_inset
24161
24162 Edit Sources
24163 \begin_inset Quotes erd
24164 \end_inset
24165
24166  to:
24167 \end_layout
24168
24169 \begin_layout LyX-Code
24170 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
24171 \end_layout
24172
24173 \begin_layout Standard
24174 With this, whenever you are using ddd and find a point in the program that
24175  you want to edit, you just press shift-ctrl-V (in the ddd window), and
24176  ddd will forward this information to \SpecialChar LyX
24177  through the \SpecialChar LyX
24178  server and then the
24179  \SpecialChar LyX
24180  window will show the same file with the cursor at the same position ddd
24181  was pointing to.
24182  No more guessing or long scrolling to locate a point in the program back
24183  from debugging !
24184 \end_layout
24185
24186 \begin_layout Standard
24187 Note however that you must enable the \SpecialChar LyX
24188  server to get this feature working
24189  (it is disabled by default).
24190  Sec.
24191 \begin_inset space ~
24192 \end_inset
24193
24194
24195 \begin_inset CommandInset ref
24196 LatexCommand ref
24197 reference "sec:Starting-the-Server"
24198
24199 \end_inset
24200
24201  explains how to do that.
24202 \end_layout
24203
24204 \begin_layout Subsubsection
24205 Toolbar extensions
24206 \end_layout
24207
24208 \begin_layout Standard
24209 There are six new buttons that can be added to your \SpecialChar LyX
24210  toolbar.
24211  Four of these buttons are short cuts to layout styles: 
24212 \family sans
24213 Standard
24214 \family default
24215
24216 \family sans
24217 Section
24218 \family default
24219
24220 \family sans
24221 \SpecialChar LaTeX
24222
24223 \family default
24224 , and 
24225 \family sans
24226 \SpecialChar LyX
24227 -Code
24228 \family default
24229 , one for the custom inset 
24230 \family sans
24231 Chunk
24232 \family default
24233 .
24234  The last one is a short cut to the 
24235 \begin_inset Quotes eld
24236 \end_inset
24237
24238 Build Program
24239 \begin_inset Quotes erd
24240 \end_inset
24241
24242  File menu entry.
24243  
24244 \end_layout
24245
24246 \begin_layout Standard
24247 \SpecialChar LyX
24248  has a range of buttons that are available for tool bar customization.
24249  In my toolbar I like to combine the six short cuts above with two more:
24250  One for 
24251 \family sans
24252 Document
24253 \family default
24254 \SpecialChar menuseparator
24255
24256 \family sans
24257 Update
24258 \family default
24259 \SpecialChar menuseparator
24260
24261 \family sans
24262 DVI
24263 \family default
24264  and the other for 
24265 \family sans
24266 Document\SpecialChar menuseparator
24267 View\SpecialChar menuseparator
24268 DVI
24269 \family default
24270  File menu entries.
24271  Here is how it looks like:
24272 \end_layout
24273
24274 \begin_layout LyX-Code
24275 Toolbar
24276 \end_layout
24277
24278 \begin_layout LyX-Code
24279   Layouts
24280 \end_layout
24281
24282 \begin_layout LyX-Code
24283   Icon "layout Standard"
24284 \end_layout
24285
24286 \begin_layout LyX-Code
24287   Icon "layout Section"
24288 \end_layout
24289
24290 \begin_layout LyX-Code
24291   Icon "layout \SpecialChar LaTeX
24292 "
24293 \end_layout
24294
24295 \begin_layout LyX-Code
24296   Icon "layout \SpecialChar LyX
24297 -Code"
24298 \end_layout
24299
24300 \begin_layout LyX-Code
24301   Icon "flex.insert Chunk"
24302 \end_layout
24303
24304 \begin_layout LyX-Code
24305   Separator
24306 \end_layout
24307
24308 \begin_layout LyX-Code
24309   Icon "buffer-view"
24310 \end_layout
24311
24312 \begin_layout LyX-Code
24313   Icon "buffer-typeset"
24314 \end_layout
24315
24316 \begin_layout LyX-Code
24317   Icon "build-program"
24318 \end_layout
24319
24320 \begin_layout LyX-Code
24321   Separator
24322 \end_layout
24323
24324 \begin_layout LyX-Code
24325 .
24326 \end_layout
24327
24328 \begin_layout LyX-Code
24329 .
24330 \end_layout
24331
24332 \begin_layout LyX-Code
24333 .
24334 \end_layout
24335
24336 \begin_layout LyX-Code
24337 End
24338 \end_layout
24339
24340 \begin_layout Subsubsection
24341 Colors customization
24342 \end_layout
24343
24344 \begin_layout Standard
24345 There are a number of colors in \SpecialChar LyX
24346  that can be customized in 
24347 \family sans
24348 Preferences
24349 \family default
24350 .
24351  One of the things that bothers people is the \SpecialChar LaTeX
24352  font color.
24353  The default color is red, since the chunks uses \SpecialChar LaTeX
24354  font, and there is a lot
24355  of chunks in literate documents, you may get tired of seeing everything
24356  in red.
24357  You can change it by going to the tabs 
24358 \family sans
24359 Look&Feel
24360 \family default
24361
24362 \family sans
24363 Colors.
24364 \end_layout
24365
24366 \begin_layout Standard
24367 The next thing is the visible presence of the newline character in the screen.
24368  You can choose the color of this particular character and make it blend
24369  in the background.
24370  I recommend you choosing a color that is close to the background but not
24371  equal, that way you still can see it is there, but it is not bothering
24372  you anymore.
24373 \end_layout
24374
24375 \begin_layout Subsection
24376 \SpecialChar LyX
24377  and knitr/Sweave
24378 \end_layout
24379
24380 \begin_layout Standard
24381 Support for 
24382 \family sans
24383 knitr
24384 \family default
24385  and 
24386 \family sans
24387 Sweave
24388 \family default
24389  is documented in the 
24390 \emph on
24391 knitr.lyx
24392 \emph default
24393  example file and in the Sweave manual (menu 
24394 \family sans
24395 Help\SpecialChar menuseparator
24396 Specific Manuals
24397 \family default
24398 ).
24399 \end_layout
24400
24401 \begin_layout Chapter
24402 Special features
24403 \end_layout
24404
24405 \begin_layout Standard
24406 You can do everything with \SpecialChar LyX
24407  that you can do with \SpecialChar LaTeX
24408 .
24409  However, \SpecialChar LyX
24410  cannot support every \SpecialChar LaTeX
24411  feature directly.
24412  But you can always use \SpecialChar TeX
24413  Code.
24414  This chapter shows you some more special things you might want to use.
24415  For other special things you can do with figures, tables, floats, boxes
24416  and notes, have a look at the 
24417 \emph on
24418 Embedded
24419 \begin_inset space ~
24420 \end_inset
24421
24422 Objects
24423 \emph default
24424  manual.
24425 \end_layout
24426
24427 \begin_layout Section
24428 Multiple Text Columns
24429 \end_layout
24430
24431 \begin_layout Standard
24432 This feature is independent of the option 
24433 \family sans
24434 Two-column document
24435 \family default
24436  in the document settings under 
24437 \family sans
24438 Text Layout
24439 \family default
24440 .
24441  If you want to have 2
24442 \begin_inset space ~
24443 \end_inset
24444
24445 columns for the whole document, it is recommended to use the 
24446 \family sans
24447 Two-column document
24448 \family default
24449  option.
24450  For all other cases use this feature.
24451 \end_layout
24452
24453 \begin_layout Standard
24454 To use multiple text columns in your document, you have to load the module
24455  
24456 \family sans
24457 Multiple Columns
24458 \family default
24459  (menu 
24460 \family sans
24461 Document\SpecialChar menuseparator
24462 Settings\SpecialChar menuseparator
24463 Modules
24464 \family default
24465 ) and must have the \SpecialChar LaTeX
24466 -package 
24467 \begin_inset Flex Code
24468 status collapsed
24469
24470 \begin_layout Plain Layout
24471 multicol
24472 \end_layout
24473
24474 \end_inset
24475
24476  installed.
24477 \end_layout
24478
24479 \begin_layout Standard
24480 Footnotes within multiple columns will be placed at the bottom of the page
24481  and not under each column.
24482  Within the different columns you can use everything, with the limitation
24483  that for floats you need to use the float option 
24484 \family sans
24485 Span columns
24486 \family default
24487 .
24488 \end_layout
24489
24490 \begin_layout Subsection
24491 Basics
24492 \end_layout
24493
24494 \begin_layout Standard
24495 If you want to have 2
24496 \begin_inset space ~
24497 \end_inset
24498
24499 columns in your text, insert a multicolumn inset via the menu 
24500 \family sans
24501 Insert\SpecialChar menuseparator
24502 Custom
24503 \begin_inset space ~
24504 \end_inset
24505
24506 Insets\SpecialChar menuseparator
24507 Multiple
24508 \begin_inset space ~
24509 \end_inset
24510
24511 Columns
24512 \family default
24513  where the columns should start.
24514  Write all text that should be printed in 2
24515 \begin_inset space ~
24516 \end_inset
24517
24518 columns into this inset.
24519 \end_layout
24520
24521 \begin_layout Standard
24522 Here is an example:
24523 \end_layout
24524
24525 \begin_layout Standard
24526 \noindent
24527 \begin_inset Flex Multiple Columns
24528 status open
24529
24530 \begin_layout Plain Layout
24531 \noindent
24532
24533 \series bold
24534 \size small
24535 The Adventure of the Empty House
24536 \series default
24537
24538 \begin_inset Newline newline
24539 \end_inset
24540
24541 by Sir Arthur Conan Doyle
24542 \end_layout
24543
24544 \begin_layout Plain Layout
24545
24546 \size small
24547 It was in the spring of the year 1894 that all London was interested, and
24548  the fashionable world dismayed, by the murder of the Honourable Ronald
24549  Adair under most unusual and inexplicable circumstances.
24550  The public has already learned those particulars of the crime which came
24551  out in the police investigation, but a good deal was suppressed upon that
24552  occasion, since the case for the prosecution was so overwhelmingly strong
24553  that it was not necessary to bring forward all the facts.
24554  Only now, at the end of nearly ten years, am I allowed to supply those
24555  missing links which make up the whole of that remarkable chain.
24556  The crime was of interest in itself, but that interest was as nothing to
24557  me compared to the inconceivable sequel, which afforded me the greatest
24558  shock and surprise of any event in my adventurous life.
24559  Even now, after this long interval, I find myself thrilling as I think
24560  of it, and feeling once more that sudden flood of joy, amazement, and increduli
24561 ty which utterly submerged my mind.
24562  Let me say to that public, which has shown some interest in those glimpses
24563  which I have occasionally given them of the thoughts and actions of a very
24564  remarkable man, that they are not to blame me if I have not shared my knowledge
24565  with them, for I should have considered it my first duty to do so, had
24566  I not been barred by a positive prohibition from his own lips, which was
24567  only withdrawn upon the third of last month.
24568 \end_layout
24569
24570 \end_inset
24571
24572
24573 \end_layout
24574
24575 \begin_layout Standard
24576 To get 3 or more columns, set the cursor into the multicolumn inset and
24577  use the menu 
24578 \family sans
24579 Insert\SpecialChar menuseparator
24580 Number
24581 \begin_inset space ~
24582 \end_inset
24583
24584 of
24585 \begin_inset space ~
24586 \end_inset
24587
24588 Columns
24589 \family default
24590 .
24591  The number of the desired columns is written into that inset (for 3
24592 \begin_inset space ~
24593 \end_inset
24594
24595 columns write 
24596 \begin_inset Quotes eld
24597 \end_inset
24598
24599 3
24600 \begin_inset Quotes erd
24601 \end_inset
24602
24603 ).
24604 \begin_inset Newline newline
24605 \end_inset
24606
24607 Here is an example with 3
24608 \begin_inset space ~
24609 \end_inset
24610
24611 columns:
24612 \end_layout
24613
24614 \begin_layout Standard
24615 \begin_inset Flex Multiple Columns
24616 status open
24617
24618 \begin_layout Plain Layout
24619
24620 \size footnotesize
24621 \begin_inset Argument 1
24622 status open
24623
24624 \begin_layout Plain Layout
24625
24626 3
24627 \end_layout
24628
24629 \end_inset
24630
24631 It can be imagined that my close intimacy with Sherlock Holmes had interested
24632  me deeply in crime, and that after his disappearance I never failed to
24633  read with care the various problems which came before the public.
24634  And I even attempted, more than once, for my own private satisfaction,
24635  to employ his methods in their solution, though with indifferent success.
24636  There was none, however, which appealed to me like this tragedy of Ronald
24637  Adair.
24638  As I read the evidence at the inquest, which led up to a verdict of willful
24639  murder against some person or persons unknown, I realized more clearly
24640  than I had ever done the loss which the community had sustained by the
24641  death of Sherlock Holmes.
24642  There were points about this strange business which would, I was sure,
24643  have specially appealed to him, and the efforts of the police would have
24644  been supplemented, or more probably anticipated, by the trained observation
24645  and the alert mind of the first criminal agent in Europe.
24646  All day, as I drove upon my round, I turned over the case in my mind and
24647  found no explanation which appeared to me to be adequate.
24648  At the risk of telling a twice-told tale, I will recapitulate the facts
24649  as they were known to the public at the conclusion of the inquest.
24650 \end_layout
24651
24652 \end_inset
24653
24654
24655 \end_layout
24656
24657 \begin_layout Standard
24658 You can have up to 10
24659 \begin_inset space ~
24660 \end_inset
24661
24662 columns if you want to, but that might not be very pleasant for the readers
24663  of your document.
24664 \end_layout
24665
24666 \begin_layout Standard
24667 \begin_inset Newpage newpage
24668 \end_inset
24669
24670
24671 \end_layout
24672
24673 \begin_layout Subsection
24674 Columns inside Columns
24675 \end_layout
24676
24677 \begin_layout Standard
24678 You can also have columns inside columns:
24679 \end_layout
24680
24681 \begin_layout Standard
24682 \begin_inset Flex Multiple Columns
24683 status open
24684
24685 \begin_layout Plain Layout
24686
24687 \size footnotesize
24688 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
24689  at that time governor of one of the Australian colonies.
24690  Adair's mother had returned from Australia to undergo the operation for
24691  cataract, and she, her son Ronald, and her daughter Hilda were living together
24692  at 427 Park Lane.
24693 \end_layout
24694
24695 \begin_layout Plain Layout
24696 \begin_inset Flex Multiple Columns
24697 status open
24698
24699 \begin_layout Plain Layout
24700
24701 \size footnotesize
24702 The youth moved in the best society
24703 \begin_inset space ~
24704 \end_inset
24705
24706 – had, so far as was known, no enemies and no particular vices.
24707  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
24708  had been broken off by mutual consent some months before, and there was
24709  no sign that it had left any very profound feeling behind it.
24710  For the rest {sic} the man's life moved in a narrow and conventional circle,
24711  for his habits were quiet and his nature unemotional.
24712  Yet it was upon this easy-going young aristocrat that death came, in most
24713  strange and unexpected form, between the hours of ten and eleven-twenty
24714  on the night of March 30, 1894.
24715 \end_layout
24716
24717 \end_inset
24718
24719
24720 \end_layout
24721
24722 \begin_layout Plain Layout
24723
24724 \size footnotesize
24725 Ronald Adair was fond of cards
24726 \begin_inset space ~
24727 \end_inset
24728
24729 – playing continually, but never for such stakes as would hurt him.
24730  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
24731  It was shown that, after dinner on the day of his death, he had played
24732  a rubber of whist at the latter club.
24733  He had also played there in the afternoon.
24734
24735 \size default
24736  
24737 \size footnotesize
24738 The evidence of those who had played with him
24739 \begin_inset space ~
24740 \end_inset
24741
24742 – Mr.
24743  Murray, Sir John Hardy, and Colonel Moran
24744 \begin_inset space ~
24745 \end_inset
24746
24747 – showed that the game was whist, and that there was a fairly equal fall
24748  of the cards.
24749  Adair might have lost five pounds, but not more.
24750  His fortune was a considerable one, and such a loss could not in any way
24751  affect him.
24752  He had played nearly every day at one club or other, but he was a cautious
24753  player, and usually rose a winner.
24754  It came out in evidence that, in partnership with Colonel Moran, he had
24755  actually won as much as four hundred and twenty pounds in a sitting, some
24756  weeks before, from Godfrey Milner and Lord Balmoral.
24757  So much for his recent history as it came out at the inquest.
24758 \end_layout
24759
24760 \end_inset
24761
24762
24763 \end_layout
24764
24765 \begin_layout Subsection
24766 Advanced Examples
24767 \end_layout
24768
24769 \begin_layout Standard
24770 The examples in this section show some more special features of multiple
24771  columns.
24772 \end_layout
24773
24774 \begin_layout Standard
24775 For more features of multiple columns, have a look at the 
24776 \begin_inset CommandInset href
24777 LatexCommand href
24778 name "documentation"
24779 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
24780 literal "false"
24781
24782 \end_inset
24783
24784  of the \SpecialChar LaTeX
24785 -package 
24786 \begin_inset Flex Code
24787 status collapsed
24788
24789 \begin_layout Plain Layout
24790 multicol
24791 \end_layout
24792
24793 \end_inset
24794
24795 .
24796 \end_layout
24797
24798 \begin_layout Subsubsection
24799 Preface
24800 \end_layout
24801
24802 \begin_layout Standard
24803 To add a preface text for multiple columns, set the cursor into the multicolumn
24804  inset and use the menu 
24805 \family sans
24806 Insert\SpecialChar menuseparator
24807 Preface
24808 \family default
24809 .
24810  Write your preface text into that inset.
24811 \begin_inset Newline newline
24812 \end_inset
24813
24814 This is an example with some preface text:
24815 \end_layout
24816
24817 \begin_layout Standard
24818 \begin_inset VSpace bigskip
24819 \end_inset
24820
24821
24822 \end_layout
24823
24824 \begin_layout Standard
24825 \begin_inset Flex Multiple Columns
24826 status open
24827
24828 \begin_layout Plain Layout
24829 \begin_inset Argument 2
24830 status open
24831
24832 \begin_layout Plain Layout
24833 And the story continues and continues and continues and continues\SpecialChar ldots
24834
24835 \end_layout
24836
24837 \end_inset
24838
24839
24840 \size small
24841 On the evening of the crime, he returned from the club exactly at ten.
24842  His mother and sister were out spending the evening with a relation.
24843  The servant deposed that she heard him enter the front room on the second
24844  floor, generally used as his sitting-room.
24845  She had lit a fire there, and as it smoked she had opened the window.
24846  No sound was heard from the room until eleven-twenty, the hour of the return
24847  of Lady Maynooth and her daughter.
24848  Desiring to say good-night, she attempted to enter her son's room.
24849  The door was locked on the inside, and no answer could be got to their
24850  cries and knocking.
24851  Help was obtained, and the door forced.
24852  The unfortunate young man was found lying near the table.
24853  His head had been horribly mutilated by an expanding revolver bullet, but
24854  no weapon of any sort was to be found in the room.
24855 \end_layout
24856
24857 \end_inset
24858
24859
24860 \end_layout
24861
24862 \begin_layout Standard
24863 You can also use a section heading as the preface if you use a section command
24864  as \SpecialChar TeX
24865  Code.
24866  For example the command
24867 \end_layout
24868
24869 \begin_layout LyX-Code
24870
24871 \backslash
24872 subsection{subsection title}
24873 \end_layout
24874
24875 \begin_layout Standard
24876 creates a subsection.
24877  In this example the preface is a subsubsection:
24878 \end_layout
24879
24880 \begin_layout Standard
24881 \begin_inset Flex Multiple Columns
24882 status open
24883
24884 \begin_layout Plain Layout
24885 \begin_inset Argument 2
24886 status open
24887
24888 \begin_layout Plain Layout
24889 \begin_inset ERT
24890 status collapsed
24891
24892 \begin_layout Plain Layout
24893
24894
24895 \backslash
24896 subsubsection{
24897 \end_layout
24898
24899 \end_inset
24900
24901 This is a subsubsection heading as a preface
24902 \begin_inset ERT
24903 status collapsed
24904
24905 \begin_layout Plain Layout
24906
24907 }
24908 \end_layout
24909
24910 \end_inset
24911
24912
24913 \end_layout
24914
24915 \end_inset
24916
24917
24918 \size small
24919 A minute examination of the circumstances served only to make the case more
24920  complex.
24921  In the first place, no reason could be given why the young man should have
24922  fastened the door upon the inside.
24923  There was the possibility that the murderer had done this, and had afterwards
24924  escaped by the window.
24925  The drop was at least twenty feet, however, and a bed of crocuses in full
24926  bloom lay beneath.
24927  Neither the flowers nor the earth showed any sign of having been disturbed,
24928  nor were there any marks upon the narrow strip of grass which separated
24929  the house from the road.
24930  Apparently, therefore, it was the young man himself who had fastened the
24931  door.
24932  But how did he come by his death? No one could have climbed up to the window
24933  without leaving traces.
24934  Suppose a man had fired through the window, he would indeed be a remarkable
24935  shot who could with a revolver inflict so deadly a wound.
24936  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
24937  a hundred yards of the house.
24938  No one had heard a shot.
24939 \end_layout
24940
24941 \end_inset
24942
24943
24944 \end_layout
24945
24946 \begin_layout Standard
24947 If there is less vertical space than 6
24948 \begin_inset space ~
24949 \end_inset
24950
24951 text lines is left on the page at the beginning of the multiple columns,
24952  a page break will be inserted before the multiple columns.
24953  Depending on the number of lines of the preface text, you might want to
24954  change this space.
24955  This is done by setting the cursor into the mulitcolumn inset behind the
24956  preface (if there is any) and using the menu 
24957 \family sans
24958 Insert\SpecialChar menuseparator
24959 Space
24960 \begin_inset space ~
24961 \end_inset
24962
24963 Before
24964 \begin_inset space ~
24965 \end_inset
24966
24967 Page
24968 \begin_inset space ~
24969 \end_inset
24970
24971 Break
24972 \family default
24973 .
24974  Insert into that inset the amount of space like e.
24975 \begin_inset space \thinspace{}
24976 \end_inset
24977
24978 g.
24979 \begin_inset space \space{}
24980 \end_inset
24981
24982
24983 \begin_inset Quotes eld
24984 \end_inset
24985
24986 5cm
24987 \begin_inset Quotes erd
24988 \end_inset
24989
24990 .
24991 \begin_inset Newline newline
24992 \end_inset
24993
24994 In this example the space is set to 7
24995 \begin_inset space ~
24996 \end_inset
24997
24998 text lines by using 
24999 \begin_inset Flex Code
25000 status collapsed
25001
25002 \begin_layout Plain Layout
25003 7
25004 \backslash
25005 baselineskip
25006 \end_layout
25007
25008 \end_inset
25009
25010  (where the command 
25011 \begin_inset Flex Code
25012 status collapsed
25013
25014 \begin_layout Plain Layout
25015
25016 \backslash
25017 baselineskip
25018 \end_layout
25019
25020 \end_inset
25021
25022  needs to be inserted as \SpecialChar TeX
25023  code):
25024 \end_layout
25025
25026 \begin_layout Standard
25027 \begin_inset Flex Multiple Columns
25028 status open
25029
25030 \begin_layout Plain Layout
25031 \begin_inset Argument 3
25032 status open
25033
25034 \begin_layout Plain Layout
25035 7
25036 \begin_inset ERT
25037 status collapsed
25038
25039 \begin_layout Plain Layout
25040
25041
25042 \backslash
25043 baselineskip
25044 \end_layout
25045
25046 \end_inset
25047
25048
25049 \end_layout
25050
25051 \end_inset
25052
25053
25054 \size small
25055 On the evening of the crime, he returned from the club exactly at ten.
25056  His mother and sister were out spending the evening with a relation.
25057  The servant deposed that she heard him enter the front room on the second
25058  floor, generally used as his sitting-room.
25059  She had lit a fire there, and as it smoked she had opened the window.
25060  No sound was heard from the room until eleven-twenty, the hour of the return
25061  of Lady Maynooth and her daughter.
25062  Desiring to say good-night, she attempted to enter her son's room.
25063  The door was locked on the inside, and no answer could be got to their
25064  cries and knocking.
25065  Help was obtained, and the door forced.
25066  The unfortunate young man was found lying near the table.
25067  His head had been horribly mutilated by an expanding revolver bullet, but
25068  no weapon of any sort was to be found in the room.
25069 \end_layout
25070
25071 \end_inset
25072
25073
25074 \end_layout
25075
25076 \begin_layout Subsubsection
25077 Surrounding Space
25078 \end_layout
25079
25080 \begin_layout Standard
25081 The amount of space before and after multiple columns can be changed by
25082  changing the length 
25083 \begin_inset Flex Code
25084 status collapsed
25085
25086 \begin_layout Plain Layout
25087
25088 \backslash
25089 multicolsep
25090 \end_layout
25091
25092 \end_inset
25093
25094 .
25095  For example the command
25096 \end_layout
25097
25098 \begin_layout LyX-Code
25099
25100 \backslash
25101 setlength{
25102 \backslash
25103 multicolsep}{3cm}
25104 \end_layout
25105
25106 \begin_layout Standard
25107 in \SpecialChar TeX
25108  Code changes its value to 3
25109 \begin_inset space \thinspace{}
25110 \end_inset
25111
25112 cm.
25113  The change must be made before the multiple columns' start.
25114  The predefined value is 13
25115 \begin_inset space \thinspace{}
25116 \end_inset
25117
25118 pt.
25119 \end_layout
25120
25121 \begin_layout Standard
25122 For this example 
25123 \begin_inset Flex Code
25124 status collapsed
25125
25126 \begin_layout Plain Layout
25127
25128 \backslash
25129 multicolsep
25130 \end_layout
25131
25132 \end_inset
25133
25134  was set to 2.5
25135 \begin_inset space \thinspace{}
25136 \end_inset
25137
25138 cm:
25139 \end_layout
25140
25141 \begin_layout Standard
25142 \begin_inset ERT
25143 status open
25144
25145 \begin_layout Plain Layout
25146
25147
25148 \backslash
25149 setlength{
25150 \backslash
25151 multicolsep}{2.5cm}
25152 \end_layout
25153
25154 \end_inset
25155
25156
25157 \end_layout
25158
25159 \begin_layout Standard
25160 \begin_inset Flex Multiple Columns
25161 status open
25162
25163 \begin_layout Plain Layout
25164
25165 \size small
25166 All day I turned these facts over in my mind, endeavouring to hit upon some
25167  theory which could reconcile them all, and to find that line of least resistanc
25168 e which my poor friend had declared to be the starting-point of every investigat
25169 ion.
25170  I confess that I made little progress.
25171  In the evening I strolled across the Park, and found myself about six o'clock
25172  at the Oxford Street end of Park Lane.
25173  A group of loafers upon the pavements, all staring up at a particular window,
25174  directed me to the house which I had come to see.
25175  A tall, thin man with coloured glasses, whom I strongly suspected of being
25176  a plain-clothes detective, was pointing out some theory of his own, while
25177  the others crowded round to listen to what he said.
25178  I got as near him as I could, but his observations seemed to me to be absurd,
25179  so I withdrew again in some disgust.
25180  As I did so I struck against an elderly, deformed man, who had been behind
25181  me, and I knocked down several books which he was carrying.
25182 \end_layout
25183
25184 \end_inset
25185
25186
25187 \end_layout
25188
25189 \begin_layout Standard
25190 \begin_inset Note Greyedout
25191 status open
25192
25193 \begin_layout Plain Layout
25194
25195 \series bold
25196 Note:
25197 \series default
25198  The values you set with 
25199 \begin_inset Flex Code
25200 status collapsed
25201
25202 \begin_layout Plain Layout
25203
25204 \backslash
25205 setlength
25206 \end_layout
25207
25208 \end_inset
25209
25210  will be used for all following multiple columns until you change them again.
25211 \end_layout
25212
25213 \end_inset
25214
25215
25216 \end_layout
25217
25218 \begin_layout Standard
25219 \begin_inset ERT
25220 status collapsed
25221
25222 \begin_layout Plain Layout
25223
25224
25225 \backslash
25226 setlength{
25227 \backslash
25228 multicolsep}{13pt}
25229 \end_layout
25230
25231 \end_inset
25232
25233
25234 \begin_inset Note Note
25235 status collapsed
25236
25237 \begin_layout Plain Layout
25238 go back to the default
25239 \end_layout
25240
25241 \end_inset
25242
25243
25244 \end_layout
25245
25246 \begin_layout Standard
25247 \begin_inset Newpage newpage
25248 \end_inset
25249
25250
25251 \end_layout
25252
25253 \begin_layout Subsubsection
25254 Column Breaks
25255 \end_layout
25256
25257 \begin_layout Standard
25258 A column break can be forced by inserting the command 
25259 \begin_inset Flex Code
25260 status collapsed
25261
25262 \begin_layout Plain Layout
25263
25264 \backslash
25265 columnbreak{}
25266 \end_layout
25267
25268 \end_inset
25269
25270  as \SpecialChar TeX
25271  Code to that position in the text where the column should be broken.
25272  Note that this leads in most cases to whitespace in the text.
25273 \begin_inset Newline newline
25274 \end_inset
25275
25276 Here is an example:
25277 \end_layout
25278
25279 \begin_layout Standard
25280 \begin_inset Flex Multiple Columns
25281 status open
25282
25283 \begin_layout Plain Layout
25284
25285 \size small
25286 \begin_inset Quotes eld
25287 \end_inset
25288
25289 You're surprised to see me, sir,
25290 \begin_inset Quotes erd
25291 \end_inset
25292
25293  said he, in a strange, croaking voice.
25294 \end_layout
25295
25296 \begin_layout Plain Layout
25297
25298 \size small
25299 I acknowledged that I was.
25300 \end_layout
25301
25302 \begin_layout Plain Layout
25303
25304 \size small
25305 \begin_inset Quotes eld
25306 \end_inset
25307
25308 Well, I've a conscience, sir, and when I chanced to see you go into this
25309  house, as I came hobbling after you, I thought to myself, I'll just step
25310  in and see that kind gentleman, and tell him that if I was a bit gruff
25311  in my manner there was not any harm meant, and that I am much obliged to
25312  him for picking up my books.
25313 \begin_inset Quotes erd
25314 \end_inset
25315
25316
25317 \end_layout
25318
25319 \begin_layout Plain Layout
25320
25321 \size small
25322 \begin_inset Quotes eld
25323 \end_inset
25324
25325 You make too much of a trifle,
25326 \begin_inset Quotes erd
25327 \end_inset
25328
25329  said I.
25330  
25331 \begin_inset Quotes eld
25332 \end_inset
25333
25334 May I ask how you knew who I was?
25335 \begin_inset Quotes erd
25336 \end_inset
25337
25338  AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED.
25339 \begin_inset ERT
25340 status collapsed
25341
25342 \begin_layout Plain Layout
25343
25344
25345 \backslash
25346 columnbreak{}
25347 \end_layout
25348
25349 \end_inset
25350
25351
25352 \end_layout
25353
25354 \begin_layout Plain Layout
25355
25356 \size small
25357 \begin_inset Quotes eld
25358 \end_inset
25359
25360 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
25361  you'll find my little bookshop at the corner of Church Street, and very
25362  happy to see you, I am sure.
25363  Maybe you collect yourself, sir.
25364  Here's 
25365 \noun on
25366 British
25367 \begin_inset space ~
25368 \end_inset
25369
25370 Birds
25371 \noun default
25372 , and 
25373 \noun on
25374 Catullus
25375 \noun default
25376 , and 
25377 \noun on
25378 The Holy War
25379 \noun default
25380
25381 \begin_inset space ~
25382 \end_inset
25383
25384 – a bargain, every one of them.
25385  With five volumes you could just fill that gap on that second shelf.
25386  It looks untidy, does it not, sir?
25387 \begin_inset Quotes erd
25388 \end_inset
25389
25390
25391 \end_layout
25392
25393 \end_inset
25394
25395
25396 \end_layout
25397
25398 \begin_layout Subsubsection
25399 Column Separation
25400 \end_layout
25401
25402 \begin_layout Standard
25403 The width of the columns is automatically calculated, but you can modify
25404  the space between the columns.
25405  This is done by changing the length 
25406 \begin_inset Flex Code
25407 status collapsed
25408
25409 \begin_layout Plain Layout
25410
25411 \backslash
25412 columnsep
25413 \end_layout
25414
25415 \end_inset
25416
25417 .
25418  Its predefined value is 10
25419 \begin_inset space \thinspace{}
25420 \end_inset
25421
25422 pt.
25423  Here is an example where 
25424 \begin_inset Flex Code
25425 status collapsed
25426
25427 \begin_layout Plain Layout
25428
25429 \backslash
25430 columnsep
25431 \end_layout
25432
25433 \end_inset
25434
25435  is set to 3
25436 \begin_inset space \thinspace{}
25437 \end_inset
25438
25439 cm:
25440 \end_layout
25441
25442 \begin_layout Standard
25443 \begin_inset ERT
25444 status open
25445
25446 \begin_layout Plain Layout
25447
25448
25449 \backslash
25450 setlength{
25451 \backslash
25452 columnsep}{3cm}
25453 \end_layout
25454
25455 \end_inset
25456
25457
25458 \end_layout
25459
25460 \begin_layout Standard
25461 \begin_inset Flex Multiple Columns
25462 status open
25463
25464 \begin_layout Plain Layout
25465
25466 \size small
25467 My observations of No.
25468 \begin_inset space \space{}
25469 \end_inset
25470
25471 427 Park Lane did little to clear up the problem in which I was interested.
25472  The house was separated from the street by a low wall and railing, the
25473  whole not more than five feet high.
25474  It was perfectly easy, therefore, for anyone to get into the garden, but
25475  the window was entirely inaccessible, since there was no water pipe or
25476  anything which could help the most active man to climb it.
25477  More puzzled than ever, I retraced my steps to Kensington.
25478  I had not been in my study five minutes when the maid entered to say that
25479  a person desired to see me.
25480  To my astonishment it was none other than my strange old book collector,
25481  his sharp, wizened face peering out from a frame of white hair, and his
25482  precious volumes, a dozen of them at least, wedged under his right arm.
25483 \end_layout
25484
25485 \end_inset
25486
25487
25488 \end_layout
25489
25490 \begin_layout Standard
25491 \begin_inset ERT
25492 status collapsed
25493
25494 \begin_layout Plain Layout
25495
25496
25497 \backslash
25498 setlength{
25499 \backslash
25500 columnsep}{10pt}
25501 \end_layout
25502
25503 \end_inset
25504
25505
25506 \begin_inset Note Note
25507 status collapsed
25508
25509 \begin_layout Plain Layout
25510 go back to the default
25511 \end_layout
25512
25513 \end_inset
25514
25515
25516 \end_layout
25517
25518 \begin_layout Subsubsection
25519 Vertical Lines
25520 \end_layout
25521
25522 \begin_layout Standard
25523 Between the columns a rule with a width of the length 
25524 \begin_inset Flex Code
25525 status collapsed
25526
25527 \begin_layout Plain Layout
25528
25529 \backslash
25530 columnseprule
25531 \end_layout
25532
25533 \end_inset
25534
25535  is placed.
25536  If this rule width is set to 0
25537 \begin_inset space \thinspace{}
25538 \end_inset
25539
25540 pt (this is the default), the rule is suppressed.
25541  In the following example the rule is 2
25542 \begin_inset space \thinspace{}
25543 \end_inset
25544
25545 pt wide:
25546 \end_layout
25547
25548 \begin_layout Standard
25549 \begin_inset ERT
25550 status open
25551
25552 \begin_layout Plain Layout
25553
25554
25555 \backslash
25556 setlength{
25557 \backslash
25558 columnseprule}{2pt}
25559 \end_layout
25560
25561 \end_inset
25562
25563
25564 \end_layout
25565
25566 \begin_layout Standard
25567 \begin_inset Flex Multiple Columns
25568 status open
25569
25570 \begin_layout Plain Layout
25571
25572 \size small
25573 \begin_inset Quotes eld
25574 \end_inset
25575
25576 You're surprised to see me, sir,
25577 \begin_inset Quotes erd
25578 \end_inset
25579
25580  said he, in a strange, croaking voice.
25581 \end_layout
25582
25583 \begin_layout Plain Layout
25584
25585 \size small
25586 I acknowledged that I was.
25587 \end_layout
25588
25589 \begin_layout Plain Layout
25590
25591 \size small
25592 \begin_inset Quotes eld
25593 \end_inset
25594
25595 Well, I've a conscience, sir, and when I chanced to see you go into this
25596  house, as I came hobbling after you, I thought to myself, I'll just step
25597  in and see that kind gentleman, and tell him that if I was a bit gruff
25598  in my manner there was not any harm meant, and that I am much obliged to
25599  him for picking up my books.
25600 \begin_inset Quotes erd
25601 \end_inset
25602
25603
25604 \end_layout
25605
25606 \begin_layout Plain Layout
25607
25608 \size small
25609 \begin_inset Quotes eld
25610 \end_inset
25611
25612 You make too much of a trifle,
25613 \begin_inset Quotes erd
25614 \end_inset
25615
25616  said I.
25617  
25618 \begin_inset Quotes eld
25619 \end_inset
25620
25621 May I ask how you knew who I was?
25622 \begin_inset Quotes erd
25623 \end_inset
25624
25625
25626 \end_layout
25627
25628 \begin_layout Plain Layout
25629
25630 \size small
25631 \begin_inset Quotes eld
25632 \end_inset
25633
25634 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
25635  you'll find my little bookshop at the corner of Church Street, and very
25636  happy to see you, I am sure.
25637  Maybe you collect yourself, sir.
25638  Here's 
25639 \noun on
25640 British
25641 \begin_inset space ~
25642 \end_inset
25643
25644 Birds
25645 \noun default
25646 , and 
25647 \noun on
25648 Catullus
25649 \noun default
25650 , and 
25651 \noun on
25652 The Holy War
25653 \noun default
25654
25655 \begin_inset space ~
25656 \end_inset
25657
25658 – a bargain, every one of them.
25659  With five volumes you could just fill that gap on that second shelf.
25660  It looks untidy, does it not, sir?
25661 \begin_inset Quotes erd
25662 \end_inset
25663
25664
25665 \end_layout
25666
25667 \end_inset
25668
25669
25670 \end_layout
25671
25672 \begin_layout Standard
25673 \begin_inset VSpace defskip
25674 \end_inset
25675
25676
25677 \end_layout
25678
25679 \begin_layout Standard
25680 The rule can be colored by redefining the command 
25681 \begin_inset Flex Code
25682 status collapsed
25683
25684 \begin_layout Plain Layout
25685
25686 \backslash
25687 columnseprulecolor
25688 \end_layout
25689
25690 \end_inset
25691
25692 .
25693  This is done by inserting the command
25694 \end_layout
25695
25696 \begin_layout LyX-Code
25697
25698 \backslash
25699 renewcommand{
25700 \backslash
25701 columnseprulecolor}{
25702 \backslash
25703 color{red}}
25704 \end_layout
25705
25706 \begin_layout Standard
25707 as \SpecialChar TeX
25708  Code before the multicolumn inset.
25709  Replace 
25710 \begin_inset Flex Code
25711 status collapsed
25712
25713 \begin_layout Plain Layout
25714 red
25715 \end_layout
25716
25717 \end_inset
25718
25719  in this command by a color of your choice.
25720  You can use all pre- and self-defined colors.
25721  See the 
25722 \emph on
25723 EmbeddedObjects
25724 \emph default
25725  manual, section 
25726 \emph on
25727 Colored
25728 \begin_inset space ~
25729 \end_inset
25730
25731 Tables
25732 \emph default
25733  for more information about pre- and self-defined colors.
25734  To go back to the default color insert the command
25735 \end_layout
25736
25737 \begin_layout LyX-Code
25738
25739 \backslash
25740 renewcommand{
25741 \backslash
25742 columnseprulecolor}{
25743 \backslash
25744 normalcolor}
25745 \end_layout
25746
25747 \begin_layout Standard
25748 Here is the example with a cyan rule and 1
25749 \begin_inset space \thinspace{}
25750 \end_inset
25751
25752 cm column separation:
25753 \end_layout
25754
25755 \begin_layout Standard
25756 \begin_inset ERT
25757 status open
25758
25759 \begin_layout Plain Layout
25760
25761
25762 \backslash
25763 setlength{
25764 \backslash
25765 columnsep}{1cm}
25766 \end_layout
25767
25768 \begin_layout Plain Layout
25769
25770
25771 \backslash
25772 renewcommand{
25773 \backslash
25774 columnseprulecolor}{
25775 \backslash
25776 color{cyan}}
25777 \end_layout
25778
25779 \end_inset
25780
25781
25782 \end_layout
25783
25784 \begin_layout Standard
25785 \begin_inset Flex Multiple Columns
25786 status open
25787
25788 \begin_layout Plain Layout
25789
25790 \size small
25791 \begin_inset Quotes eld
25792 \end_inset
25793
25794 You're surprised to see me, sir,
25795 \begin_inset Quotes erd
25796 \end_inset
25797
25798  said he, in a strange, croaking voice.
25799 \end_layout
25800
25801 \begin_layout Plain Layout
25802
25803 \size small
25804 I acknowledged that I was.
25805 \end_layout
25806
25807 \begin_layout Plain Layout
25808
25809 \size small
25810 \begin_inset Quotes eld
25811 \end_inset
25812
25813 Well, I've a conscience, sir, and when I chanced to see you go into this
25814  house, as I came hobbling after you, I thought to myself, I'll just step
25815  in and see that kind gentleman, and tell him that if I was a bit gruff
25816  in my manner there was not any harm meant, and that I am much obliged to
25817  him for picking up my books.
25818 \begin_inset Quotes erd
25819 \end_inset
25820
25821
25822 \end_layout
25823
25824 \begin_layout Plain Layout
25825
25826 \size small
25827 \begin_inset Quotes eld
25828 \end_inset
25829
25830 You make too much of a trifle,
25831 \begin_inset Quotes erd
25832 \end_inset
25833
25834  said I.
25835  
25836 \begin_inset Quotes eld
25837 \end_inset
25838
25839 May I ask how you knew who I was?
25840 \begin_inset Quotes erd
25841 \end_inset
25842
25843
25844 \end_layout
25845
25846 \begin_layout Plain Layout
25847
25848 \size small
25849 \begin_inset Quotes eld
25850 \end_inset
25851
25852 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
25853  you'll find my little bookshop at the corner of Church Street, and very
25854  happy to see you, I am sure.
25855  Maybe you collect yourself, sir.
25856  Here's 
25857 \noun on
25858 British
25859 \begin_inset space ~
25860 \end_inset
25861
25862 Birds
25863 \noun default
25864 , and 
25865 \noun on
25866 Catullus
25867 \noun default
25868 , and 
25869 \noun on
25870 The Holy War
25871 \noun default
25872
25873 \begin_inset space ~
25874 \end_inset
25875
25876 – a bargain, every one of them.
25877  With five volumes you could just fill that gap on that second shelf.
25878  It looks untidy, does it not, sir?
25879 \begin_inset Quotes erd
25880 \end_inset
25881
25882
25883 \end_layout
25884
25885 \end_inset
25886
25887
25888 \end_layout
25889
25890 \begin_layout Standard
25891 \begin_inset ERT
25892 status collapsed
25893
25894 \begin_layout Plain Layout
25895
25896
25897 \backslash
25898 setlength{
25899 \backslash
25900 columnseprule}{0pt}
25901 \end_layout
25902
25903 \begin_layout Plain Layout
25904
25905
25906 \backslash
25907 renewcommand{
25908 \backslash
25909 columnseprulecolor}{
25910 \backslash
25911 normalcolor}
25912 \end_layout
25913
25914 \end_inset
25915
25916
25917 \begin_inset Note Note
25918 status collapsed
25919
25920 \begin_layout Plain Layout
25921 go back to the default
25922 \end_layout
25923
25924 \end_inset
25925
25926
25927 \end_layout
25928
25929 \begin_layout Section
25930 Non-standard Paragraph Shapes
25931 \end_layout
25932
25933 \begin_layout Standard
25934 \noindent
25935 \SpecialChar LaTeX
25936  as well as any other text processor uses by default rectangular paragraphs.
25937  For special cases like for example posters, invitation cards or poems you
25938  can modify the paragraph shape to one of your choice.
25939  This can be done by using the \SpecialChar LaTeX
25940 -package 
25941 \begin_inset Flex Code
25942 status collapsed
25943
25944 \begin_layout Plain Layout
25945 shapepar
25946 \end_layout
25947
25948 \end_inset
25949
25950  which is loaded by using in the document settings the module 
25951 \family sans
25952 Custom paragraph shapes
25953 \family default
25954 .
25955 \end_layout
25956
25957 \begin_layout Subsection
25958 Predefined shapes
25959 \end_layout
25960
25961 \begin_layout Standard
25962
25963 \series bold
25964 shapepar
25965 \series default
25966  provides the following shapes:
25967 \end_layout
25968
25969 \begin_layout Standard
25970 \begin_inset Tabular
25971 <lyxtabular version="3" rows="13" columns="3">
25972 <features booktabs="true" islongtable="true" longtabularalignment="center">
25973 <column alignment="left" valignment="middle" width="16col%">
25974 <column alignment="left" valignment="middle" width="40col%">
25975 <column alignment="left" valignment="middle" width="35col%">
25976 <row endhead="true">
25977 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25978 \begin_inset Text
25979
25980 \begin_layout Plain Layout
25981
25982 \series bold
25983 \size small
25984 Name
25985 \end_layout
25986
25987 \end_inset
25988 </cell>
25989 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25990 \begin_inset Text
25991
25992 \begin_layout Plain Layout
25993
25994 \series bold
25995 \size small
25996 Description
25997 \end_layout
25998
25999 \end_inset
26000 </cell>
26001 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
26002 \begin_inset Text
26003
26004 \begin_layout Plain Layout
26005
26006 \series bold
26007 \size small
26008 Annotation
26009 \end_layout
26010
26011 \end_inset
26012 </cell>
26013 </row>
26014 <row interlinespace="default">
26015 <cell alignment="left" valignment="top" usebox="none">
26016 \begin_inset Text
26017
26018 \begin_layout Plain Layout
26019
26020 \size small
26021 CDlabel
26022 \end_layout
26023
26024 \end_inset
26025 </cell>
26026 <cell alignment="left" valignment="top" usebox="none">
26027 \begin_inset Text
26028
26029 \begin_layout Plain Layout
26030
26031 \size small
26032 Circle with circular hole (in the size of a CD/DVD)
26033 \end_layout
26034
26035 \end_inset
26036 </cell>
26037 <cell alignment="left" valignment="top" usebox="none">
26038 \begin_inset Text
26039
26040 \begin_layout Plain Layout
26041
26042 \size small
26043 Cannot be scaled, take care there is not too much text
26044 \end_layout
26045
26046 \end_inset
26047 </cell>
26048 </row>
26049 <row interlinespace="default">
26050 <cell alignment="left" valignment="top" usebox="none">
26051 \begin_inset Text
26052
26053 \begin_layout Plain Layout
26054
26055 \size small
26056 Circle
26057 \end_layout
26058
26059 \end_inset
26060 </cell>
26061 <cell alignment="left" valignment="top" usebox="none">
26062 \begin_inset Text
26063
26064 \begin_layout Plain Layout
26065
26066 \size small
26067 Circle
26068 \end_layout
26069
26070 \end_inset
26071 </cell>
26072 <cell alignment="left" valignment="top" usebox="none">
26073 \begin_inset Text
26074
26075 \begin_layout Plain Layout
26076
26077 \size small
26078 Fragile, calculation might fail
26079 \end_layout
26080
26081 \end_inset
26082 </cell>
26083 </row>
26084 <row interlinespace="default">
26085 <cell alignment="left" valignment="top" usebox="none">
26086 \begin_inset Text
26087
26088 \begin_layout Plain Layout
26089
26090 \size small
26091 Diamond
26092 \end_layout
26093
26094 \end_inset
26095 </cell>
26096 <cell alignment="left" valignment="top" usebox="none">
26097 \begin_inset Text
26098
26099 \begin_layout Plain Layout
26100
26101 \size small
26102 Rhomboid (symbolizing a 
26103 \begin_inset Quotes eld
26104 \end_inset
26105
26106 diamond
26107 \begin_inset Quotes erd
26108 \end_inset
26109
26110 )
26111 \end_layout
26112
26113 \end_inset
26114 </cell>
26115 <cell alignment="left" valignment="top" usebox="none">
26116 \begin_inset Text
26117
26118 \begin_layout Plain Layout
26119
26120 \size small
26121 -
26122 \end_layout
26123
26124 \end_inset
26125 </cell>
26126 </row>
26127 <row interlinespace="default">
26128 <cell alignment="left" valignment="top" usebox="none">
26129 \begin_inset Text
26130
26131 \begin_layout Plain Layout
26132
26133 \size small
26134 Heart
26135 \end_layout
26136
26137 \end_inset
26138 </cell>
26139 <cell alignment="left" valignment="top" usebox="none">
26140 \begin_inset Text
26141
26142 \begin_layout Plain Layout
26143
26144 \size small
26145 Heart-like shape
26146 \end_layout
26147
26148 \end_inset
26149 </cell>
26150 <cell alignment="left" valignment="top" usebox="none">
26151 \begin_inset Text
26152
26153 \begin_layout Plain Layout
26154
26155 \size small
26156 -
26157 \end_layout
26158
26159 \end_inset
26160 </cell>
26161 </row>
26162 <row interlinespace="default">
26163 <cell alignment="left" valignment="top" usebox="none">
26164 \begin_inset Text
26165
26166 \begin_layout Plain Layout
26167
26168 \size small
26169 Hexagon
26170 \end_layout
26171
26172 \end_inset
26173 </cell>
26174 <cell alignment="left" valignment="top" usebox="none">
26175 \begin_inset Text
26176
26177 \begin_layout Plain Layout
26178
26179 \size small
26180 Hexagon
26181 \end_layout
26182
26183 \end_inset
26184 </cell>
26185 <cell alignment="left" valignment="top" usebox="none">
26186 \begin_inset Text
26187
26188 \begin_layout Plain Layout
26189
26190 \size small
26191 -
26192 \end_layout
26193
26194 \end_inset
26195 </cell>
26196 </row>
26197 <row interlinespace="default">
26198 <cell alignment="left" valignment="top" usebox="none">
26199 \begin_inset Text
26200
26201 \begin_layout Plain Layout
26202
26203 \size small
26204 Nut
26205 \end_layout
26206
26207 \end_inset
26208 </cell>
26209 <cell alignment="left" valignment="top" usebox="none">
26210 \begin_inset Text
26211
26212 \begin_layout Plain Layout
26213
26214 \size small
26215 Nut for bolt (hexagon with circular hole)
26216 \end_layout
26217
26218 \end_inset
26219 </cell>
26220 <cell alignment="left" valignment="top" usebox="none">
26221 \begin_inset Text
26222
26223 \begin_layout Plain Layout
26224
26225 \size small
26226 -
26227 \end_layout
26228
26229 \end_inset
26230 </cell>
26231 </row>
26232 <row interlinespace="default">
26233 <cell alignment="left" valignment="top" usebox="none">
26234 \begin_inset Text
26235
26236 \begin_layout Plain Layout
26237
26238 \size small
26239 Square
26240 \end_layout
26241
26242 \end_inset
26243 </cell>
26244 <cell alignment="left" valignment="top" usebox="none">
26245 \begin_inset Text
26246
26247 \begin_layout Plain Layout
26248
26249 \size small
26250 Square
26251 \end_layout
26252
26253 \end_inset
26254 </cell>
26255 <cell alignment="left" valignment="top" usebox="none">
26256 \begin_inset Text
26257
26258 \begin_layout Plain Layout
26259
26260 \size small
26261 -
26262 \end_layout
26263
26264 \end_inset
26265 </cell>
26266 </row>
26267 <row interlinespace="default">
26268 <cell alignment="left" valignment="top" usebox="none">
26269 \begin_inset Text
26270
26271 \begin_layout Plain Layout
26272
26273 \size small
26274 Star
26275 \end_layout
26276
26277 \end_inset
26278 </cell>
26279 <cell alignment="left" valignment="top" usebox="none">
26280 \begin_inset Text
26281
26282 \begin_layout Plain Layout
26283
26284 \size small
26285 Five-point star
26286 \end_layout
26287
26288 \end_inset
26289 </cell>
26290 <cell alignment="left" valignment="top" usebox="none">
26291 \begin_inset Text
26292
26293 \begin_layout Plain Layout
26294
26295 \size small
26296 -
26297 \end_layout
26298
26299 \end_inset
26300 </cell>
26301 </row>
26302 <row interlinespace="default">
26303 <cell alignment="left" valignment="top" usebox="none">
26304 \begin_inset Text
26305
26306 \begin_layout Plain Layout
26307
26308 \size small
26309 Candle
26310 \end_layout
26311
26312 \end_inset
26313 </cell>
26314 <cell alignment="left" valignment="top" usebox="none">
26315 \begin_inset Text
26316
26317 \begin_layout Plain Layout
26318
26319 \size small
26320 Burning candle
26321 \end_layout
26322
26323 \end_inset
26324 </cell>
26325 <cell alignment="left" valignment="top" usebox="none">
26326 \begin_inset Text
26327
26328 \begin_layout Plain Layout
26329
26330 \size small
26331 -
26332 \end_layout
26333
26334 \end_inset
26335 </cell>
26336 </row>
26337 <row interlinespace="default">
26338 <cell alignment="left" valignment="top" usebox="none">
26339 \begin_inset Text
26340
26341 \begin_layout Plain Layout
26342
26343 \size small
26344 Drop down/up
26345 \end_layout
26346
26347 \end_inset
26348 </cell>
26349 <cell alignment="left" valignment="top" usebox="none">
26350 \begin_inset Text
26351
26352 \begin_layout Plain Layout
26353
26354 \size small
26355 Normal/reversed rain drop
26356 \end_layout
26357
26358 \end_inset
26359 </cell>
26360 <cell alignment="left" valignment="top" usebox="none">
26361 \begin_inset Text
26362
26363 \begin_layout Plain Layout
26364
26365 \size small
26366 Fragile, calculation might fail
26367 \end_layout
26368
26369 \end_inset
26370 </cell>
26371 </row>
26372 <row interlinespace="default">
26373 <cell alignment="left" valignment="top" usebox="none">
26374 \begin_inset Text
26375
26376 \begin_layout Plain Layout
26377
26378 \size small
26379 \SpecialChar TeX
26380
26381 \end_layout
26382
26383 \end_inset
26384 </cell>
26385 <cell alignment="left" valignment="top" usebox="none">
26386 \begin_inset Text
26387
26388 \begin_layout Plain Layout
26389
26390 \size small
26391 The \SpecialChar TeX
26392  logo
26393 \end_layout
26394
26395 \end_inset
26396 </cell>
26397 <cell alignment="left" valignment="top" usebox="none">
26398 \begin_inset Text
26399
26400 \begin_layout Plain Layout
26401
26402 \size small
26403 -
26404 \end_layout
26405
26406 \end_inset
26407 </cell>
26408 </row>
26409 <row interlinespace="default">
26410 <cell alignment="left" valignment="top" bottomline="true" usebox="none">
26411 \begin_inset Text
26412
26413 \begin_layout Plain Layout
26414
26415 \size small
26416 Triangle up/down/
26417 \begin_inset Newline newline
26418 \end_inset
26419
26420 left/right
26421 \end_layout
26422
26423 \end_inset
26424 </cell>
26425 <cell alignment="left" valignment="top" bottomline="true" usebox="none">
26426 \begin_inset Text
26427
26428 \begin_layout Plain Layout
26429
26430 \size small
26431 Triangles in different orientations
26432 \end_layout
26433
26434 \end_inset
26435 </cell>
26436 <cell alignment="left" valignment="top" bottomline="true" usebox="none">
26437 \begin_inset Text
26438
26439 \begin_layout Plain Layout
26440
26441 \size small
26442 -
26443 \end_layout
26444
26445 \end_inset
26446 </cell>
26447 </row>
26448 </lyxtabular>
26449
26450 \end_inset
26451
26452
26453 \end_layout
26454
26455 \begin_layout Standard
26456 To use a shape for your paragraph, simply select it in \SpecialChar LyX
26457 's pull-down box
26458  for environments in the toolbar.
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 Standard
26469 Here is an example paragraph in the shape of a nut:
26470 \end_layout
26471
26472 \begin_layout Standard
26473 \begin_inset VSpace bigskip
26474 \end_inset
26475
26476
26477 \end_layout
26478
26479 \begin_layout Nut
26480
26481 \lang latin
26482 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26483  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26484  voluptua.
26485  At vero eos et accusam et justo duo dolores et ea rebum.
26486  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26487  sit amet.
26488  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26489  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26490  voluptua.
26491 \end_layout
26492
26493 \begin_layout Standard
26494 \begin_inset VSpace bigskip
26495 \end_inset
26496
26497
26498 \end_layout
26499
26500 \begin_layout Standard
26501 \begin_inset Note Greyedout
26502 status open
26503
26504 \begin_layout Plain Layout
26505
26506 \series bold
26507 Note
26508 \series default
26509
26510 \family sans
26511 shapepar
26512 \family default
26513  paragraphs cannot run over a page break.
26514 \end_layout
26515
26516 \end_inset
26517
26518
26519 \end_layout
26520
26521 \begin_layout Standard
26522 \begin_inset VSpace bigskip
26523 \end_inset
26524
26525
26526 \end_layout
26527
26528 \begin_layout Standard
26529 The package 
26530 \begin_inset Flex Code
26531 status collapsed
26532
26533 \begin_layout Plain Layout
26534 shapepar
26535 \end_layout
26536
26537 \end_inset
26538
26539  takes care that the shape will always be preserved, no matter how much
26540  text is in the paragraph.
26541  Therefore the paragraph size changes with the amount of contained text.
26542  This can lead to paragraph sizes exceeding the page margins.
26543  To demonstrate the size scaling, here is the same example paragraph but
26544  with twice as much text:
26545 \end_layout
26546
26547 \begin_layout Standard
26548 \begin_inset Newpage newpage
26549 \end_inset
26550
26551
26552 \end_layout
26553
26554 \begin_layout Nut
26555
26556 \lang latin
26557 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26558  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26559  voluptua.
26560  At vero eos et accusam et justo duo dolores et ea rebum.
26561  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26562  sit amet.
26563  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26564  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26565  voluptua.
26566  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26567  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26568  voluptua.
26569  At vero eos et accusam et justo duo dolores et ea rebum.
26570  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26571  sit amet.
26572  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26573  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26574  voluptua.
26575 \end_layout
26576
26577 \begin_layout Standard
26578 \begin_inset VSpace bigskip
26579 \end_inset
26580
26581
26582 \end_layout
26583
26584 \begin_layout Standard
26585 An exception is the shape 
26586 \family sans
26587 CDlabel
26588 \family default
26589 .
26590  It cannot be scaled because it must fit the size of a CD/DVD.
26591  Therefore the amount of text that fits into the shape is limited.
26592 \begin_inset Newline newline
26593 \end_inset
26594
26595 The 
26596 \family sans
26597 drop
26598 \family default
26599  shapes and the 
26600 \family sans
26601 circle
26602 \family default
26603  shape are fragile, meaning that the calculation of their size can fail,
26604  depending on the amount of text.
26605  You will then get the \SpecialChar LaTeX
26606  error 
26607 \begin_inset Quotes eld
26608 \end_inset
26609
26610 Arithmetic overflow
26611 \begin_inset Quotes erd
26612 \end_inset
26613
26614 .
26615  In this case one can try to remove or add some text; if nothing works one
26616  has to use another shape.
26617 \end_layout
26618
26619 \begin_layout Standard
26620 \begin_inset VSpace bigskip
26621 \end_inset
26622
26623
26624 \end_layout
26625
26626 \begin_layout Standard
26627 For shapes with tips you will maybe see that \SpecialChar LaTeX
26628 's hyphenation routine fails
26629  for text in the tips.
26630  Therefore it is often necessary to add hyphenation points 
26631 \family sans
26632 (
26633 \begin_inset Info
26634 type  "shortcut"
26635 arg   "specialchar-insert hyphenation"
26636 \end_inset
26637
26638
26639 \family default
26640 ) to the corresponding text parts.
26641 \end_layout
26642
26643 \begin_layout Standard
26644 \begin_inset VSpace bigskip
26645 \end_inset
26646
26647
26648 \end_layout
26649
26650 \begin_layout Standard
26651 Shapepar paragraphs are either always centered or placed on the page so
26652  that their left border touches the left page margin.
26653  You can therefore not use the paragraph dialog to align such paragraphs.
26654  A solution is to put the paragraph into a minipage or parbox and align
26655  the box.
26656  The problem is hereby to find the right width for the box.
26657  Because if it is too wide and you center the box, the paragraph is not
26658  centered too because it sticks at the left side of the box.
26659  So you might have to play a bit with the width until it fits.
26660  Here are two heart-shaped paragraphs, the first one is not aligned, the
26661  second one is right-aligned:
26662 \end_layout
26663
26664 \begin_layout Standard
26665 \begin_inset Newpage newpage
26666 \end_inset
26667
26668
26669 \end_layout
26670
26671 \begin_layout Heart
26672 \noindent
26673
26674 \lang latin
26675 Lo\SpecialChar softhyphen
26676 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26677  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26678  voluptua.
26679  At vero eos et accusam et justo duo dolores et ea rebum.
26680  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26681  sit amet.
26682 \end_layout
26683
26684 \begin_layout Standard
26685 \begin_inset VSpace bigskip
26686 \end_inset
26687
26688
26689 \end_layout
26690
26691 \begin_layout Standard
26692 \noindent
26693 \align right
26694 \begin_inset Box Frameless
26695 position "t"
26696 hor_pos "c"
26697 has_inner_box 1
26698 inner_pos "t"
26699 use_parbox 1
26700 use_makebox 0
26701 width "42col%"
26702 special "none"
26703 height "1in"
26704 height_special "totalheight"
26705 thickness "0.4pt"
26706 separation "3pt"
26707 shadowsize "4pt"
26708 framecolor "black"
26709 backgroundcolor "none"
26710 status open
26711
26712 \begin_layout Heart
26713 \noindent
26714
26715 \lang latin
26716 Lo\SpecialChar softhyphen
26717 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26718  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26719  voluptua.
26720  At vero eos et accusam et justo duo dolores et ea rebum.
26721  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26722  sit amet.
26723 \end_layout
26724
26725 \end_inset
26726
26727
26728 \end_layout
26729
26730 \begin_layout Subsection
26731 Custom shapes
26732 \end_layout
26733
26734 \begin_layout Standard
26735 You can define any shape you want.
26736  Doing this manually is a lot of work because every coordinate must be specified.
26737  But there is a way to let the computer calculate the coordinates:
26738 \end_layout
26739
26740 \begin_layout Enumerate
26741 Install the program 
26742 \begin_inset CommandInset href
26743 LatexCommand href
26744 name "Jpgfdraw"
26745 target "https://www.ctan.org/tex-archive/graphics/jpgfdraw"
26746 literal "false"
26747
26748 \end_inset
26749
26750 .
26751 \end_layout
26752
26753 \begin_layout Enumerate
26754 In 
26755 \family sans
26756 Jpgfdraw
26757 \family default
26758  go to the menu 
26759 \family sans
26760 TeX/LaTeX\SpecialChar menuseparator
26761 Settings\SpecialChar menuseparator
26762 Set Normal Size
26763 \family default
26764  and select the font size you are using in your document.
26765  For example this document uses the size 12
26766 \begin_inset space \thinspace{}
26767 \end_inset
26768
26769 pt.
26770 \end_layout
26771
26772 \begin_layout Enumerate
26773 Draw a shape.
26774 \end_layout
26775
26776 \begin_layout Enumerate
26777 Use the menu 
26778 \family sans
26779 TeX/LaTeX\SpecialChar menuseparator
26780 Shapepar
26781 \family default
26782  to export the shape to coordinates.
26783  In the appearing dialog use either the outline of your shape for the coordinate
26784 s or the path itself.
26785 \begin_inset Foot
26786 status collapsed
26787
26788 \begin_layout Plain Layout
26789 For more information see 
26790 \begin_inset CommandInset href
26791 LatexCommand href
26792 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
26793 literal "false"
26794
26795 \end_inset
26796
26797
26798 \end_layout
26799
26800 \end_inset
26801
26802
26803 \end_layout
26804
26805 \begin_layout Standard
26806 The coordinates are written into a \SpecialChar TeX
26807  file.
26808  To use it for your \SpecialChar LyX
26809  document
26810 \end_layout
26811
26812 \begin_layout Enumerate
26813 Place the cursor before the first character of your paragraph (or into a
26814  new empty one).
26815 \end_layout
26816
26817 \begin_layout Enumerate
26818 Open in \SpecialChar LyX
26819  the menu 
26820 \family sans
26821 Insert\SpecialChar menuseparator
26822 File\SpecialChar menuseparator
26823 Child
26824 \begin_inset space ~
26825 \end_inset
26826
26827 Document
26828 \family default
26829 , select the file and use 
26830 \family sans
26831 Input
26832 \family default
26833  as 
26834 \family sans
26835 Include Type.
26836 \end_layout
26837
26838 \begin_layout Standard
26839 \begin_inset VSpace defskip
26840 \end_inset
26841
26842
26843 \end_layout
26844
26845 \begin_layout Standard
26846 \begin_inset Note Greyedout
26847 status open
26848
26849 \begin_layout Plain Layout
26850
26851 \series bold
26852 Note
26853 \series default
26854 : The changed shape only applies to the current paragraph; everything is
26855  reset to normal for the next paragraph.
26856  Therefore the shape definition file must be input into every paragraph
26857  with the desired shape.
26858 \end_layout
26859
26860 \end_inset
26861
26862
26863 \end_layout
26864
26865 \begin_layout Standard
26866 \begin_inset VSpace bigskip
26867 \end_inset
26868
26869
26870 \end_layout
26871
26872 \begin_layout Standard
26873 Here is an example:
26874 \end_layout
26875
26876 \begin_layout Standard
26877 \begin_inset VSpace bigskip
26878 \end_inset
26879
26880
26881 \end_layout
26882
26883 \begin_layout Standard
26884 \begin_inset CommandInset include
26885 LatexCommand input
26886 filename "SpecialParagraphShape.tex"
26887 literal "true"
26888
26889 \end_inset
26890
26891
26892 \lang latin
26893 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26894  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26895  voluptua.
26896  At vero eos et accusam et justo duo dolores et ea rebum.
26897  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26898  sit amet.
26899  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26900  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26901  voluptua.
26902 \end_layout
26903
26904 \begin_layout Standard
26905 \begin_inset VSpace bigskip
26906 \end_inset
26907
26908
26909 \end_layout
26910
26911 \begin_layout Standard
26912
26913 \series bold
26914 A tip:
26915 \series default
26916  to draw complexer shapes in 
26917 \family sans
26918 Jpgfdraw
26919 \family default
26920  you can draw the shape in a program of your choice and import the resulting
26921  image to 
26922 \family sans
26923 Jpgfdraw
26924 \family default
26925 .
26926  Then you only need to draw a line or spline along the outline of the image.
26927 \end_layout
26928
26929 \begin_layout Standard
26930 \begin_inset VSpace bigskip
26931 \end_inset
26932
26933
26934 \end_layout
26935
26936 \begin_layout Standard
26937 The module 
26938 \family sans
26939 Custom paragraph shapes
26940 \family default
26941  also provides the two commands 
26942 \family sans
26943 shapepar
26944 \family default
26945  and 
26946 \family sans
26947 Shapepar
26948 \family default
26949  which can be used to define custom shapes coordinate by coordinate.
26950 \begin_inset Foot
26951 status collapsed
26952
26953 \begin_layout Plain Layout
26954 These commands are internally used for all shapes described here.
26955 \end_layout
26956
26957 \end_inset
26958
26959  For information how these styles are used and about further customization
26960  possibilities, have a look at the 
26961 \begin_inset CommandInset href
26962 LatexCommand href
26963 name "documentation"
26964 target "https://www.ctan.org/tex-archive/macros/latex/contrib/shapepar/shapepar.pdf"
26965 literal "false"
26966
26967 \end_inset
26968
26969  of the package 
26970 \begin_inset Flex Code
26971 status collapsed
26972
26973 \begin_layout Plain Layout
26974 shapepar
26975 \end_layout
26976
26977 \end_inset
26978
26979 .
26980 \end_layout
26981
26982 \end_body
26983 \end_document