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