]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
Merge branch 'master' into biblatex2
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
2 \lyxformat 508
3 \begin_document
4 \begin_header
5 \save_transient_properties true
6 \origin /systemlyxdir/doc/
7 \textclass scrbook
8 \begin_preamble
9 % DO NOT ALTER THIS PREAMBLE!!!
10 %
11 % This preamble is designed to ensure that the manual prints
12 % out as advertised. If you mess with this preamble,
13 % parts of the manual may not print out as expected.  If you
14 % have problems LaTeXing this file, please contact 
15 % the documentation team
16 % email: lyx-docs@lists.lyx.org
17
18 % the pages of the TOC are numbered roman
19 % and a PDF-bookmark for the TOC is added
20 \pagenumbering{roman}
21 \let\myTOC\tableofcontents
22 \renewcommand{\tableofcontents}{%
23  \pdfbookmark[1]{\contentsname}{}
24  \myTOC
25  \cleardoublepage
26  \pagenumbering{arabic}}
27
28 % extra space for tables
29 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
30 \end_preamble
31 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
32 \use_default_options false
33 \begin_modules
34 logicalmkup
35 theorems-ams
36 theorems-ams-extended
37 multicol
38 shapepar
39 \end_modules
40 \maintain_unincluded_children false
41 \language english
42 \language_package default
43 \inputencoding auto
44 \fontencoding global
45 \font_roman "lmodern" "default"
46 \font_sans "lmss" "default"
47 \font_typewriter "lmtt" "default"
48 \font_math "auto" "auto"
49 \font_default_family default
50 \use_non_tex_fonts false
51 \font_sc false
52 \font_osf false
53 \font_sf_scale 100 100
54 \font_tt_scale 100 100
55 \graphics default
56 \default_output_format pdf2
57 \output_sync 0
58 \bibtex_command default
59 \index_command default
60 \paperfontsize 12
61 \spacing single
62 \use_hyperref true
63 \pdf_title "LyX's Additional Features manual"
64 \pdf_author "LyX Team"
65 \pdf_subject "LyX's additional features documentation"
66 \pdf_keywords "LyX, Documentation, Additional"
67 \pdf_bookmarks true
68 \pdf_bookmarksnumbered true
69 \pdf_bookmarksopen false
70 \pdf_bookmarksopenlevel 1
71 \pdf_breaklinks false
72 \pdf_pdfborder false
73 \pdf_colorlinks true
74 \pdf_backref false
75 \pdf_pdfusetitle false
76 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
77 \papersize a4paper
78 \use_geometry false
79 \use_package amsmath 1
80 \use_package amssymb 1
81 \use_package cancel 0
82 \use_package esint 0
83 \use_package mathdots 1
84 \use_package mathtools 0
85 \use_package mhchem 1
86 \use_package stackrel 0
87 \use_package stmaryrd 0
88 \use_package undertilde 0
89 \cite_engine basic
90 \cite_engine_type default
91 \biblio_style plain
92 \use_bibtopic false
93 \use_indices false
94 \paperorientation portrait
95 \suppress_date false
96 \justification true
97 \use_refstyle 0
98 \notefontcolor #0000ff
99 \index Index
100 \shortcut idx
101 \color #008000
102 \end_index
103 \secnumdepth 3
104 \tocdepth 3
105 \paragraph_separation indent
106 \paragraph_indentation default
107 \quotes_language english
108 \papercolumns 1
109 \papersides 2
110 \paperpagestyle headings
111 \tracking_changes false
112 \output_changes false
113 \html_math_output 0
114 \html_css_as_file 0
115 \html_be_strict true
116 \end_header
117
118 \begin_body
119
120 \begin_layout Title
121 Additional \SpecialChar LyX
122  Features
123 \end_layout
124
125 \begin_layout Subtitle
126 Version 2.2.x
127 \end_layout
128
129 \begin_layout Author
130 by the \SpecialChar LyX
131  Team
132 \begin_inset Foot
133 status collapsed
134
135 \begin_layout Plain Layout
136 \noindent
137 Principal maintainer of this file is
138 \noun on
139  Richard Heck
140 \noun default
141 .
142  If you have comments or error corrections, please send them to the \SpecialChar LyX
143  Documentati
144 on mailing list, 
145 \begin_inset Flex Code
146 status collapsed
147
148 \begin_layout Plain Layout
149 \noindent
150 <lyx-docs@lists.lyx.org>
151 \end_layout
152
153 \end_inset
154
155 .
156 \end_layout
157
158 \end_inset
159
160
161 \end_layout
162
163 \begin_layout Standard
164 \begin_inset CommandInset toc
165 LatexCommand tableofcontents
166
167 \end_inset
168
169
170 \end_layout
171
172 \begin_layout Chapter
173 Introduction
174 \end_layout
175
176 \begin_layout Standard
177 This manual is essentially Part II of the 
178 \emph on
179 User's Guide\SpecialChar endofsentence
180
181 \emph default
182  The reason for separating the two documents is simple: the 
183 \emph on
184 User's Guide
185 \emph default
186  is already quite lengthy, and it contains information on all of the basic
187  features one needs to know in order to prepare most documents.
188  However, the \SpecialChar LyX
189  Team has worked to make \SpecialChar LyX
190  extensible through various configuration
191  files and external packages.
192  That means that if you want to support the Fizzwizzle \SpecialChar LaTeX
193  package, you can
194  create a layout file (or module) for it without having to alter \SpecialChar LyX
195  itself.
196  We've already had contributions of several new features this way, and some
197  of them are documented here.
198  There are also some more `advanced' features, such as how to control the
199  presentation of bibliographies and how to work with multi-part documents,
200  that are not covered in the 
201 \emph on
202 User's Guide
203 \emph default
204  and are discussed here.
205 \end_layout
206
207 \begin_layout Standard
208 This manual also documents some special features, like fax support, version
209  control, and SGML support, which require additional software to work properly.
210  There is also a chapter on \SpecialChar LyX
211 's support for HTML.
212  And lastly, there's a chapter of \SpecialChar LaTeX
213  tools and tips, things you can use to
214  spruce up your documents by directly using the powerful features of \SpecialChar LaTeX
215 .
216  After all, \SpecialChar LyX
217  
218 \emph on
219 is
220 \emph default
221  only WYSIWYM and will only ever interface to some, not all, \SpecialChar LaTeX
222  features.
223 \end_layout
224
225 \begin_layout Standard
226 If you haven't read the 
227 \emph on
228 Introduction
229 \emph default
230  yet, you are definitely in the wrong manual.
231  The 
232 \emph on
233 Introduction
234 \emph default
235  is the first place to go, since it describes the notation and format of
236  all of the manuals.
237  You should also be thoroughly familiar with the 
238 \emph on
239 User's Guide
240 \emph default
241  and all of the basic features of \SpecialChar LyX
242  before attempting to read this one.
243 \end_layout
244
245 \begin_layout Standard
246 Since many of the topics in this manual depend heavily on \SpecialChar LyX
247 's interaction
248  with \SpecialChar LaTeX
249 , this first chapter covers the inner workings of \SpecialChar LyX
250  and how to direct
251  \SpecialChar LyX
252  to generate exactly the \SpecialChar LaTeX
253  code you want.
254  It is obviously for more seasoned \SpecialChar LyX
255  users.
256 \end_layout
257
258 \begin_layout Chapter
259 \SpecialChar LyX
260  and \SpecialChar LaTeX
261
262 \end_layout
263
264 \begin_layout Section
265 How \SpecialChar LyX
266  Uses \SpecialChar LaTeX
267
268 \end_layout
269
270 \begin_layout Standard
271 This chapter is for both \SpecialChar TeX
272 -nicians and the \SpecialChar LaTeX
273 -curious.
274  In it, we'll explain how \SpecialChar LyX
275  and \SpecialChar LaTeX
276  work together to produce printable output.
277  This is the only place in any of the manuals where we assume you know something
278  about \SpecialChar LaTeX
279 .
280 \end_layout
281
282 \begin_layout Standard
283 At one time, \SpecialChar LyX
284  was called a 
285 \begin_inset Quotes eld
286 \end_inset
287
288 WYSIWYM frontend to \SpecialChar LaTeX
289 ,
290 \begin_inset Quotes erd
291 \end_inset
292
293  but that's no longer true.
294  There are frontends to \SpecialChar LaTeX
295  out there.
296 \begin_inset Foot
297 status collapsed
298
299 \begin_layout Plain Layout
300 Some familar ones are \SpecialChar TeX
301 maker and kile, on Linux, and \SpecialChar TeX
302 shop, OSX.
303  There are also the \SpecialChar LaTeX
304  modes for vi and emacs, of course.
305 \end_layout
306
307 \end_inset
308
309  These are basically text editors with the ability to run \SpecialChar LaTeX
310  and mark any
311  errors in the file you're editing.
312  Although \SpecialChar LyX
313  
314 \emph on
315 is
316 \emph default
317  an editor, and it 
318 \emph on
319 does
320 \emph default
321  run \SpecialChar LaTeX
322 , and it also indicates errors in the file, it also does much, much
323  more.
324  For one thing, you don't need to know \SpecialChar LaTeX
325  to use \SpecialChar LyX
326  effectively.
327  And \SpecialChar LyX
328  has added its own extensions to \SpecialChar LaTeX
329 .
330  Try the following sometime: select 
331 \begin_inset Flex Noun
332 status collapsed
333
334 \begin_layout Plain Layout
335 Export\SpecialChar menuseparator
336 LaTeX
337 \end_layout
338
339 \end_inset
340
341  from the 
342 \begin_inset Flex Noun
343 status collapsed
344
345 \begin_layout Plain Layout
346 File
347 \end_layout
348
349 \end_inset
350
351  menu (or 
352 \begin_inset Flex Noun
353 status collapsed
354
355 \begin_layout Plain Layout
356 View\SpecialChar menuseparator
357 Source
358 \begin_inset space ~
359 \end_inset
360
361 Pane
362 \end_layout
363
364 \end_inset
365
366 ), then look at the preamble of the resulting 
367 \begin_inset Flex Code
368 status collapsed
369
370 \begin_layout Plain Layout
371 .tex
372 \end_layout
373
374 \end_inset
375
376  file.
377  You'll notice a variety of new macros defined specifically by \SpecialChar LyX
378 .
379  These macros are defined automatically, according to the features you use
380  in the document.
381 \end_layout
382
383 \begin_layout Standard
384 There are several commands that automatically invoke \SpecialChar LaTeX
385 .
386  They are:
387 \end_layout
388
389 \begin_layout Itemize
390 \begin_inset Flex Noun
391 status collapsed
392
393 \begin_layout Plain Layout
394 Document\SpecialChar menuseparator
395 View
396 \end_layout
397
398 \end_inset
399
400
401 \end_layout
402
403 \begin_layout Itemize
404 \begin_inset Flex Noun
405 status collapsed
406
407 \begin_layout Plain Layout
408 Document\SpecialChar menuseparator
409 Update
410 \end_layout
411
412 \end_inset
413
414
415 \end_layout
416
417 \begin_layout Standard
418 They will only invoke \SpecialChar LaTeX
419  if the file has changed since the last time \SpecialChar LaTeX
420  was
421  run.
422  
423 \end_layout
424
425 \begin_layout Standard
426 When \SpecialChar LyX
427  runs \SpecialChar LaTeX
428  on the file you're editing, it performs these steps:
429 \end_layout
430
431 \begin_layout Enumerate
432 Convert the document to \SpecialChar LaTeX
433  and save to a file with the extension 
434 \begin_inset Flex Code
435 status collapsed
436
437 \begin_layout Plain Layout
438 .tex
439 \end_layout
440
441 \end_inset
442
443  in place of 
444 \begin_inset Flex Code
445 status collapsed
446
447 \begin_layout Plain Layout
448 .lyx
449 \end_layout
450
451 \end_inset
452
453 .
454 \end_layout
455
456 \begin_layout Enumerate
457 Run \SpecialChar LaTeX
458  on the 
459 \begin_inset Flex Code
460 status collapsed
461
462 \begin_layout Plain Layout
463 .tex
464 \end_layout
465
466 \end_inset
467
468  file (maybe several times), and run any other commands (such as 
469 \begin_inset Flex Code
470 status collapsed
471
472 \begin_layout Plain Layout
473 bibtex
474 \end_layout
475
476 \end_inset
477
478  or 
479 \begin_inset Flex Code
480 status collapsed
481
482 \begin_layout Plain Layout
483 makeindex
484 \end_layout
485
486 \end_inset
487
488 ) needed to compile the \SpecialChar LaTeX
489  file.
490 \end_layout
491
492 \begin_layout Enumerate
493 If there are any errors, show the error log.
494 \end_layout
495
496 \begin_layout Standard
497 If you have run \SpecialChar LaTeX
498  using 
499 \begin_inset Flex Noun
500 status collapsed
501
502 \begin_layout Plain Layout
503 View\SpecialChar menuseparator
504 DVI
505 \end_layout
506
507 \end_inset
508
509 , \SpecialChar LyX
510  then runs a DVI viewer to display the DVI-file.
511  If you have used 
512 \begin_inset Flex Noun
513 status collapsed
514
515 \begin_layout Plain Layout
516 View\SpecialChar menuseparator
517 PostScript
518 \end_layout
519
520 \end_inset
521
522 , \SpecialChar LyX
523  performs further steps:
524 \end_layout
525
526 \begin_layout Itemize
527 Run 
528 \begin_inset Flex Code
529 status collapsed
530
531 \begin_layout Plain Layout
532 dvips
533 \end_layout
534
535 \end_inset
536
537  to convert the DVI file to PostScript.
538 \end_layout
539
540 \begin_layout Itemize
541 Run a PostScript viewer, such as 
542 \begin_inset Flex Code
543 status collapsed
544
545 \begin_layout Plain Layout
546 ghostview
547 \end_layout
548
549 \end_inset
550
551 , to display the PostScript file.
552 \end_layout
553
554 \begin_layout Standard
555 \SpecialChar LyX
556  does similar things when viewing, or exporting, other formats.
557 \end_layout
558
559 \begin_layout Section
560 Translating \SpecialChar LaTeX
561  files into \SpecialChar LyX
562
563 \end_layout
564
565 \begin_layout Standard
566 You can import a \SpecialChar LaTeX
567  file into \SpecialChar LyX
568  by using the 
569 \begin_inset Flex Noun
570 status collapsed
571
572 \begin_layout Plain Layout
573 File\SpecialChar menuseparator
574 Import\SpecialChar menuseparator
575 LaTeX
576 \end_layout
577
578 \end_inset
579
580  command in \SpecialChar LyX
581 .
582  This will call a program named 
583 \begin_inset Flex Code
584 status collapsed
585
586 \begin_layout Plain Layout
587 tex2lyx
588 \end_layout
589
590 \end_inset
591
592  which will create a file 
593 \begin_inset Flex Code
594 status collapsed
595
596 \begin_layout Plain Layout
597 foo.lyx
598 \end_layout
599
600 \end_inset
601
602  from the file 
603 \begin_inset Flex Code
604 status collapsed
605
606 \begin_layout Plain Layout
607 foo.tex
608 \end_layout
609
610 \end_inset
611
612 .
613  \SpecialChar LyX
614  will then open that file.
615 \begin_inset Foot
616 status collapsed
617
618 \begin_layout Plain Layout
619 \begin_inset Flex Code
620 status collapsed
621
622 \begin_layout Plain Layout
623 tex2lyx
624 \end_layout
625
626 \end_inset
627
628  can also be run from the command line, of course.
629 \end_layout
630
631 \end_inset
632
633
634 \end_layout
635
636 \begin_layout Standard
637 \begin_inset Flex Code
638 status collapsed
639
640 \begin_layout Plain Layout
641 tex2lyx
642 \end_layout
643
644 \end_inset
645
646  will translate most legal \SpecialChar LaTeX
647 , but not everything.
648  It will put things it doesn't understand into \SpecialChar TeX
649  code, so after translating
650  a file with 
651 \begin_inset Flex Code
652 status collapsed
653
654 \begin_layout Plain Layout
655 tex2lyx
656 \end_layout
657
658 \end_inset
659
660 , you can look for \SpecialChar TeX
661  code and hand-edit it until it looks right.
662 \end_layout
663
664 \begin_layout Standard
665 If you don't know what \SpecialChar TeX
666  code is, read the next section.
667 \end_layout
668
669 \begin_layout Section
670 \begin_inset CommandInset label
671 LatexCommand label
672 name "sec:Inserting-TeX-Code"
673
674 \end_inset
675
676 Inserting \SpecialChar TeX
677  Code into \SpecialChar LyX
678  Documents 
679 \end_layout
680
681 \begin_layout Standard
682 Anything you can do in \SpecialChar LaTeX
683  you can do in \SpecialChar LyX
684 , for a very simple reason: You can
685  always insert \SpecialChar TeX
686  code into any \SpecialChar LyX
687  document.
688  \SpecialChar LyX
689  cannot, and will never be able to, display every possible \SpecialChar LaTeX
690  construct.
691  If ever you need to insert \SpecialChar LaTeX
692  commands into your \SpecialChar LyX
693  document, you can use the
694  
695 \begin_inset Flex Code
696 status collapsed
697
698 \begin_layout Plain Layout
699 \SpecialChar TeX
700  Code
701 \end_layout
702
703 \end_inset
704
705  box, which you can insert into your document with 
706 \begin_inset Flex Noun
707 status collapsed
708
709 \begin_layout Plain Layout
710 Insert\SpecialChar menuseparator
711
712 \family sans
713 TeX
714 \family default
715  Code
716 \end_layout
717
718 \end_inset
719
720  or the keyboard shortcut 
721 \begin_inset Info
722 type  "shortcut"
723 arg   "ert-insert"
724 \end_inset
725
726 .
727 \end_layout
728
729 \begin_layout Standard
730 Here's an example of inserting \SpecialChar LaTeX
731  commands in a \SpecialChar LyX
732  document.
733  The code looks like this:
734 \end_layout
735
736 \begin_layout LyX-Code
737
738 \backslash
739 begin{tabular}{ll}
740 \begin_inset Newline newline
741 \end_inset
742
743
744 \backslash
745 begin{minipage}{5cm}
746 \begin_inset Newline newline
747 \end_inset
748
749 This is an example of a minipage environment.
750  You 
751 \begin_inset Newline newline
752 \end_inset
753
754 can put nearly everything in it, even (non-floating) 
755 \begin_inset Newline newline
756 \end_inset
757
758 figures and tables.
759  
760 \begin_inset Newline newline
761 \end_inset
762
763
764 \backslash
765 end{minipage}
766 \begin_inset Newline newline
767 \end_inset
768
769 &
770 \begin_inset Newline newline
771 \end_inset
772
773
774 \backslash
775 begin{minipage}{5cm}
776 \begin_inset Newline newline
777 \end_inset
778
779
780 \backslash
781 begin{verbatim}
782 \begin_inset Newline newline
783 \end_inset
784
785
786 \backslash
787 begin{minipage}{5cm}
788 \begin_inset Newline newline
789 \end_inset
790
791 This ...
792  
793 \begin_inset Newline newline
794 \end_inset
795
796
797 \backslash
798 end{minipage}
799 \begin_inset Newline newline
800 \end_inset
801
802
803 \backslash
804 end{verbatim}
805 \begin_inset Newline newline
806 \end_inset
807
808
809 \backslash
810 end{minipage}
811 \begin_inset Newline newline
812 \end_inset
813
814
815 \backslash
816 end{tabular}
817 \end_layout
818
819 \begin_layout LyX-Code
820
821 \end_layout
822
823 \begin_layout Standard
824 The 
825 \begin_inset Flex Code
826 status collapsed
827
828 \begin_layout Plain Layout
829 \SpecialChar TeX
830  Code
831 \end_layout
832
833 \end_inset
834
835  box containing this text is directly after this paragraph.
836  Those of you reading the manual in \SpecialChar LyX
837  will only see the \SpecialChar TeX
838  code inset.
839  Those reading a printed version of the manuals will see the actual results:
840 \begin_inset VSpace bigskip
841 \end_inset
842
843
844 \end_layout
845
846 \begin_layout Standard
847 \begin_inset ERT
848 status open
849
850 \begin_layout Plain Layout
851
852
853 \backslash
854 begin{tabular}{ll}
855 \end_layout
856
857 \begin_layout Plain Layout
858
859
860 \backslash
861 begin{minipage}{5cm}
862 \end_layout
863
864 \begin_layout Plain Layout
865
866 This is an example of a minipage environment.
867  You can put nearly everything in it, even (non-floating) figures and tables.
868  
869 \end_layout
870
871 \begin_layout Plain Layout
872
873
874 \backslash
875 end{minipage}
876 \end_layout
877
878 \begin_layout Plain Layout
879
880 &
881 \end_layout
882
883 \begin_layout Plain Layout
884
885
886 \backslash
887 begin{minipage}{5cm}
888 \end_layout
889
890 \begin_layout Plain Layout
891
892
893 \backslash
894 begin{verbatim}
895 \end_layout
896
897 \begin_layout Plain Layout
898
899
900 \backslash
901 begin{minipage}{5cm}
902 \end_layout
903
904 \begin_layout Plain Layout
905
906 This ...
907  
908 \end_layout
909
910 \begin_layout Plain Layout
911
912
913 \backslash
914 end{minipage}
915 \end_layout
916
917 \begin_layout Plain Layout
918
919
920 \backslash
921 end{verbatim}
922 \end_layout
923
924 \begin_layout Plain Layout
925
926
927 \backslash
928 end{minipage}
929 \end_layout
930
931 \begin_layout Plain Layout
932
933
934 \backslash
935 end{tabular}
936 \end_layout
937
938 \end_inset
939
940
941 \begin_inset VSpace bigskip
942 \end_inset
943
944
945 \end_layout
946
947 \begin_layout Standard
948 In addition to using \SpecialChar TeX
949  code, you can also create a separate file containing
950  some complex \SpecialChar LaTeX
951  structure and then use 
952 \begin_inset Flex Noun
953 status collapsed
954
955 \begin_layout Plain Layout
956 Insert\SpecialChar menuseparator
957 Child
958 \begin_inset space ~
959 \end_inset
960
961 Document
962 \end_layout
963
964 \end_inset
965
966  to include your file (you should select the type 
967 \begin_inset Flex Code
968 status collapsed
969
970 \begin_layout Plain Layout
971 Input
972 \end_layout
973
974 \end_inset
975
976 ).
977  We recommend that you only do this if you have a 
978 \begin_inset Flex Code
979 status collapsed
980
981 \begin_layout Plain Layout
982 .tex
983 \end_layout
984
985 \end_inset
986
987  file which you 
988 \emph on
989 know
990 \emph default
991  works already.
992  Otherwise, you'll have a big job tracking down \SpecialChar LaTeX
993  errors.
994 \end_layout
995
996 \begin_layout Standard
997 There are a few last points to emphasize:
998 \end_layout
999
1000 \begin_layout Itemize
1001 \SpecialChar LyX
1002  
1003 \emph on
1004 does not
1005 \emph default
1006  check if your \SpecialChar LaTeX
1007  code is correct.
1008 \end_layout
1009
1010 \begin_layout Itemize
1011 Beware of reinventing the wheel.
1012 \end_layout
1013
1014 \begin_layout Standard
1015 On that last point, \SpecialChar LyX
1016  does have quite a few features tucked into it, and
1017  more are coming.
1018  Be sure to check the manuals to make sure that \SpecialChar LyX
1019  doesn't have such-and-such
1020  feature before you decide you have to do it by hand.
1021  Moreover, there are numerous \SpecialChar LaTeX
1022  packages out there to do all sorts of things,
1023  from labels to envelopes to fancy multipage tables.
1024  Check out 
1025 \begin_inset CommandInset href
1026 LatexCommand href
1027 name "CTAN"
1028 target "http://www.ctan.org/"
1029
1030 \end_inset
1031
1032  for details.
1033 \end_layout
1034
1035 \begin_layout Standard
1036 If you do need to do some wild and fancy things within your document, be
1037  sure to check out a good \SpecialChar LaTeX
1038  book for assistance.
1039  There are a number of them listed in the bibliography of the 
1040 \emph on
1041 User's Guide
1042 \emph default
1043 .
1044 \end_layout
1045
1046 \begin_layout Section
1047 \SpecialChar LyX
1048  and the \SpecialChar LaTeX
1049  Preamble
1050 \end_layout
1051
1052 \begin_layout Subsection
1053 About the \SpecialChar LaTeX
1054  Preamble
1055 \end_layout
1056
1057 \begin_layout Standard
1058 If you already know \SpecialChar LaTeX
1059 , there is no need to explain here what the preamble
1060  is good for.
1061  If you don't, the following will give you some ideas—we recommend again
1062  that you consult a \SpecialChar LaTeX
1063  book for further information.
1064  In any case, you should read the points below, because they explain what
1065  you can do and what you don't need to do in the \SpecialChar LaTeX
1066  preamble of a \SpecialChar LyX
1067  document.
1068 \end_layout
1069
1070 \begin_layout Standard
1071 The \SpecialChar LaTeX
1072  preamble comes at the very beginning of a document, 
1073 \emph on
1074 before
1075 \emph default
1076  the text.
1077  It serves to:
1078 \end_layout
1079
1080 \begin_layout Itemize
1081 Declare the document class.
1082  
1083 \begin_inset Newline newline
1084 \end_inset
1085
1086 \SpecialChar LyX
1087  already does this for you.
1088  If you're a seasoned \SpecialChar LaTeX
1089 -nician, and you have a custom document class you
1090  want to use, check out the 
1091 \emph on
1092 Customization Manual
1093 \emph default
1094  for information on how to make \SpecialChar LyX
1095  interface to it.
1096 \end_layout
1097
1098 \begin_layout Itemize
1099 Declare the usage of packages.
1100  
1101 \begin_inset Newline newline
1102 \end_inset
1103
1104 \SpecialChar LaTeX
1105  packages provide special commands, which are only available within a document
1106  when the package has been declared in the preamble.
1107  In addition to providing special commands, the inclusion of a package can
1108  change the document.
1109  For example, the package 
1110 \begin_inset Flex Code
1111 status collapsed
1112
1113 \begin_layout Plain Layout
1114 indentfirst
1115 \end_layout
1116
1117 \end_inset
1118
1119  forces all paragraphs to be indented.
1120  There are other packages for labels, envelopes, margins, etc.
1121  
1122 \end_layout
1123
1124 \begin_layout Itemize
1125 Set counters, variables, lengths and widths.
1126  
1127 \begin_inset Newline newline
1128 \end_inset
1129
1130 There are several \SpecialChar LaTeX
1131  counters and variables that 
1132 \emph on
1133 must
1134 \emph default
1135  be set globally from within the preamble in order to have the desired effect.
1136  (There are variables that you can set and reset inside the document, too.)
1137  Margins are a good example of something that must be set in the preamble.
1138  Another example is the label format for lists.
1139  You can actually set these just about anywhere, but it's best to do it
1140  just once, inside the preamble.
1141 \end_layout
1142
1143 \begin_layout Itemize
1144 Declare user defined commands (with 
1145 \begin_inset Flex Code
1146 status collapsed
1147
1148 \begin_layout Plain Layout
1149
1150 \backslash
1151 newcommand
1152 \end_layout
1153
1154 \end_inset
1155
1156  or 
1157 \begin_inset Flex Code
1158 status collapsed
1159
1160 \begin_layout Plain Layout
1161
1162 \backslash
1163 renewcommand
1164 \end_layout
1165
1166 \end_inset
1167
1168 ).
1169 \begin_inset Newline newline
1170 \end_inset
1171
1172 These are abbreviations for \SpecialChar LaTeX
1173  commands which appear very often inside a document.
1174  Although the preamble is a good place to declare such commands, they 
1175 \emph on
1176 can
1177 \emph default
1178  be declared anywhere (before they are used for the first time, of course).
1179  This can be useful if there is a lot of raw \SpecialChar LaTeX
1180  code in your document, which
1181  normally should not be the case.
1182 \end_layout
1183
1184 \begin_layout Standard
1185 \SpecialChar LyX
1186  adds its own set of definitions to the preamble of the 
1187 \begin_inset Flex Code
1188 status collapsed
1189
1190 \begin_layout Plain Layout
1191 .tex
1192 \end_layout
1193
1194 \end_inset
1195
1196  file it produces.
1197  This makes \SpecialChar LaTeX
1198  files generated by \SpecialChar LyX
1199  portable.
1200 \end_layout
1201
1202 \begin_layout Subsection
1203 Changing the Preamble
1204 \end_layout
1205
1206 \begin_layout Standard
1207 The commands which \SpecialChar LyX
1208  adds to the preamble of a \SpecialChar LaTeX
1209  file are fixed; you can't
1210  change them without patching \SpecialChar LyX
1211  itself.
1212  You can, however, add your own stuff to the preamble by selecting 
1213 \begin_inset Flex Noun
1214 status collapsed
1215
1216 \begin_layout Plain Layout
1217 \SpecialChar LaTeX
1218
1219 \begin_inset space ~
1220 \end_inset
1221
1222 Preamble
1223 \end_layout
1224
1225 \end_inset
1226
1227  in the 
1228 \begin_inset Flex Noun
1229 status collapsed
1230
1231 \begin_layout Plain Layout
1232 Document\SpecialChar menuseparator
1233 Settings
1234 \end_layout
1235
1236 \end_inset
1237
1238  dialog.
1239  \SpecialChar LyX
1240  adds anything in the 
1241 \begin_inset Flex Noun
1242 status collapsed
1243
1244 \begin_layout Plain Layout
1245 Preamble
1246 \end_layout
1247
1248 \end_inset
1249
1250  dialog to its own built-in preamble.
1251  Before adding your own declarations in the preamble, you should make sure
1252  that \SpecialChar LyX
1253  doesn't already support what you want to do.
1254  (Remember what we said about reinventing the wheel?) Also, 
1255 \emph on
1256 make sure your preamble code is correct
1257 \emph default
1258 .
1259  \SpecialChar LyX
1260  doesn't check it for you.
1261  If there is an error, you're likely to get an error like 
1262 \begin_inset Quotes eld
1263 \end_inset
1264
1265
1266 \begin_inset Flex Code
1267 status collapsed
1268
1269 \begin_layout Plain Layout
1270 Missing 
1271 \backslash
1272 begin{document}
1273 \end_layout
1274
1275 \end_inset
1276
1277
1278 \begin_inset Quotes erd
1279 \end_inset
1280
1281 .
1282  If you see this error, check your preamble.
1283 \end_layout
1284
1285 \begin_layout Subsection
1286 Examples
1287 \end_layout
1288
1289 \begin_layout Standard
1290 Here are some examples of what you can add to a preamble, and what they
1291  do.
1292 \end_layout
1293
1294 \begin_layout Subsubsection
1295 Example #1: Offsets
1296 \end_layout
1297
1298 \begin_layout Standard
1299 There are two variables under \SpecialChar LaTeX
1300  that control page position: 
1301 \begin_inset Flex Code
1302 status collapsed
1303
1304 \begin_layout Plain Layout
1305
1306 \backslash
1307 hoffset
1308 \end_layout
1309
1310 \end_inset
1311
1312  and 
1313 \begin_inset Flex Code
1314 status collapsed
1315
1316 \begin_layout Plain Layout
1317
1318 \backslash
1319 voffset
1320 \end_layout
1321
1322 \end_inset
1323
1324 .
1325  Their names should be self-explanatory.
1326  These variables are useful if you think for a moment about computer labels.
1327  Sometimes, the size of a print medium and the area of the medium that you
1328  can actually print on aren't the same.
1329  This is where 
1330 \begin_inset Flex Code
1331 status collapsed
1332
1333 \begin_layout Plain Layout
1334
1335 \backslash
1336 hoffset
1337 \end_layout
1338
1339 \end_inset
1340
1341  and 
1342 \begin_inset Flex Code
1343 status collapsed
1344
1345 \begin_layout Plain Layout
1346
1347 \backslash
1348 voffset
1349 \end_layout
1350
1351 \end_inset
1352
1353  come in.
1354 \end_layout
1355
1356 \begin_layout Standard
1357 The default values for 
1358 \begin_inset Flex Code
1359 status collapsed
1360
1361 \begin_layout Plain Layout
1362
1363 \backslash
1364 hoffset
1365 \end_layout
1366
1367 \end_inset
1368
1369  and 
1370 \begin_inset Flex Code
1371 status collapsed
1372
1373 \begin_layout Plain Layout
1374
1375 \backslash
1376 voffset
1377 \end_layout
1378
1379 \end_inset
1380
1381  are both 0
1382 \begin_inset space \thinspace{}
1383 \end_inset
1384
1385 points, i.
1386 \begin_inset space \thinspace{}
1387 \end_inset
1388
1389 e.
1390 \begin_inset space \space{}
1391 \end_inset
1392
1393 the page isn't shifted.
1394  Unfortunately, some DVI drivers always seem to shift the page.
1395  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1396  If you're using \SpecialChar LyX
1397  on a system that you don't personally maintain, and your
1398  sysadmin is a doofus, 
1399 \begin_inset Flex Code
1400 status collapsed
1401
1402 \begin_layout Plain Layout
1403
1404 \backslash
1405 hoffset
1406 \end_layout
1407
1408 \end_inset
1409
1410  and 
1411 \begin_inset Flex Code
1412 status collapsed
1413
1414 \begin_layout Plain Layout
1415
1416 \backslash
1417 voffset
1418 \end_layout
1419
1420 \end_inset
1421
1422  can save the day.
1423  Suppose your left and top margins are always 0.5
1424 \begin_inset space \thinspace{}
1425 \end_inset
1426
1427 inches too big.
1428  You can add this to the preamble:
1429 \end_layout
1430
1431 \begin_layout LyX-Code
1432
1433 \backslash
1434 setlength{
1435 \backslash
1436 hoffset}{-0.5 in}
1437 \end_layout
1438
1439 \begin_layout LyX-Code
1440
1441 \backslash
1442 setlength{
1443 \backslash
1444 voffset}{-0.5 in}
1445 \end_layout
1446
1447 \begin_layout Standard
1448 and your margins should now be correct.
1449 \end_layout
1450
1451 \begin_layout Subsubsection
1452 Example #2: Labels
1453 \end_layout
1454
1455 \begin_layout Standard
1456 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1457  There's a rather nice package, available at your nearest CTAN archive,
1458  for printing sheets of labels: 
1459 \begin_inset Flex Code
1460 status collapsed
1461
1462 \begin_layout Plain Layout
1463 labels.sty
1464 \end_layout
1465
1466 \end_inset
1467
1468 .
1469  Now, your system may not have this package installed by default.
1470  We leave that up to you to check.
1471  You'll also want to read the documentation for it; we're not going to do
1472  that for you.
1473  Since this is an example, however, we'll give you an example of how you
1474  use this package.
1475 \end_layout
1476
1477 \begin_layout Standard
1478 First, make sure you're using the 
1479 \begin_inset Flex Code
1480 status collapsed
1481
1482 \begin_layout Plain Layout
1483 article
1484 \end_layout
1485
1486 \end_inset
1487
1488  document class.
1489  Next, you need to put the following in your preamble:
1490 \end_layout
1491
1492 \begin_layout LyX-Code
1493
1494 \backslash
1495 usepackage{labels}
1496 \end_layout
1497
1498 \begin_layout LyX-Code
1499
1500 \backslash
1501 LabelCols=3
1502 \end_layout
1503
1504 \begin_layout LyX-Code
1505
1506 \backslash
1507 LabelRows=7
1508 \end_layout
1509
1510 \begin_layout LyX-Code
1511
1512 \backslash
1513 LeftBorder=8mm
1514 \end_layout
1515
1516 \begin_layout LyX-Code
1517
1518 \backslash
1519 RightBorder=8mm
1520 \end_layout
1521
1522 \begin_layout LyX-Code
1523
1524 \backslash
1525 TopBorder=9mm
1526 \end_layout
1527
1528 \begin_layout LyX-Code
1529
1530 \backslash
1531 BottomBorder=2mm
1532 \end_layout
1533
1534 \begin_layout Standard
1535 This sets things up for Avery label sheets, stock #5360.
1536  You're now ready to print labels, but you'll need to insert \SpecialChar LaTeX
1537  code, placing
1538  the commands 
1539 \begin_inset Flex Code
1540 status collapsed
1541
1542 \begin_layout Plain Layout
1543
1544 \backslash
1545 begin{labels}
1546 \end_layout
1547
1548 \end_inset
1549
1550  and 
1551 \begin_inset Flex Code
1552 status collapsed
1553
1554 \begin_layout Plain Layout
1555
1556 \backslash
1557 end{labels}
1558 \end_layout
1559
1560 \end_inset
1561
1562  around each label text.
1563  This and other special features of 
1564 \begin_inset Flex Code
1565 status collapsed
1566
1567 \begin_layout Plain Layout
1568 labels.sty
1569 \end_layout
1570
1571 \end_inset
1572
1573  are explained in its documentation.
1574 \end_layout
1575
1576 \begin_layout Standard
1577 Someday, someone may write a \SpecialChar LyX
1578  layout file to support this package directly.
1579  Maybe that someone is you.
1580 \end_layout
1581
1582 \begin_layout Subsubsection
1583 Example #3: Paragraph Indentation
1584 \end_layout
1585
1586 \begin_layout Standard
1587 Americans are trained to indent the first line of 
1588 \emph on
1589 every
1590 \emph default
1591  paragraph.
1592  As with all of their other weird quirks, most Americans will whine and
1593  moan until they can have their way and indent the first line of all paragraphs.
1594  (Yes, we're joking.
1595  (We are?) 
1596 \emph on
1597 Yeah
1598 \emph default
1599 , we are.)
1600 \end_layout
1601
1602 \begin_layout Standard
1603 Of course, this behavior isn't standard typography.
1604  In books, you typically only indent the first line of a paragraph 
1605 \emph on
1606 if
1607 \emph default
1608  it follows another one.
1609  The idea behind indenting the first line of a paragraph is to distinguish
1610  neighboring paragraphs from one another.
1611  If there is no previous paragraph—for example, if it follows a figure or
1612  is the first paragraph in a section—then there is no need for indentation.
1613  
1614 \end_layout
1615
1616 \begin_layout Standard
1617 If you're a typical American (we're still joking!), though, you don't care
1618  about such esoteric things; you want your indentation! Add this to the
1619  preamble:
1620 \end_layout
1621
1622 \begin_layout LyX-Code
1623
1624 \backslash
1625 usepackage{indentfirst}
1626 \end_layout
1627
1628 \begin_layout Standard
1629 If your \SpecialChar TeX
1630  distribution isn't braindead, you'll have this package, and all
1631  of your paragraphs will get the indentation the Founding Fathers intended
1632  they should have.
1633 \end_layout
1634
1635 \begin_layout Subsubsection
1636 Example #4: This Document
1637 \end_layout
1638
1639 \begin_layout Standard
1640 You can also check out the preamble of this document to get an idea of some
1641  of the advanced things you can do.
1642 \end_layout
1643
1644 \begin_layout Section
1645 \SpecialChar LyX
1646  and \SpecialChar LaTeX
1647  Errors
1648 \end_layout
1649
1650 \begin_layout Standard
1651 When \SpecialChar LyX
1652  calls \SpecialChar LaTeX
1653 , it tells \SpecialChar LaTeX
1654  to blithely ignore any errors and keep going.
1655  It then uses the logfile from the \SpecialChar LaTeX
1656  run to do a post-mortem.
1657  After analyzing the logfile, \SpecialChar LyX
1658  displays a dialog listing the errors.
1659  Clicking on any one of them will take you to the position in your \SpecialChar LyX
1660  file
1661  where the error occurred.
1662 \begin_inset Foot
1663 status collapsed
1664
1665 \begin_layout Plain Layout
1666 Well, usually.
1667  Analyzing the logfile is a tough job, and \SpecialChar LyX
1668  doesn't always go to the right
1669  line.
1670  There are also cases where \SpecialChar LaTeX
1671  reports the error on one line, but the actual
1672  error is earlier.
1673  This is not unlike forgetting a closing brace in a program: You'll get
1674  an error, but only later.
1675 \end_layout
1676
1677 \end_inset
1678
1679
1680 \end_layout
1681
1682 \begin_layout Standard
1683 Some folks also like to look at the log file directly: It is available from
1684  
1685 \begin_inset Flex Noun
1686 status collapsed
1687
1688 \begin_layout Plain Layout
1689 Document\SpecialChar menuseparator
1690 LaTeX
1691 \begin_inset space ~
1692 \end_inset
1693
1694 Log
1695 \end_layout
1696
1697 \end_inset
1698
1699 .
1700  There are some fairly common error messages and warnings.
1701  We'll cover those here.
1702  You should look at a good \SpecialChar LaTeX
1703  book for a complete listing.
1704 \end_layout
1705
1706 \begin_layout Itemize
1707 \begin_inset Flex Code
1708 status collapsed
1709
1710 \begin_layout Plain Layout
1711 LaTeX Warning
1712 \end_layout
1713
1714 \end_inset
1715
1716
1717 \begin_inset Newline newline
1718 \end_inset
1719
1720 Anything beginning with these words is a warning message for the purpose
1721  of 
1722 \begin_inset Quotes eld
1723 \end_inset
1724
1725 debugging
1726 \begin_inset Quotes erd
1727 \end_inset
1728
1729  the \SpecialChar LaTeX
1730  code itself.
1731  You'll get messages like this if you added or changed cross-references
1732  or bibliography entries, in which case, \SpecialChar LaTeX
1733  is trying to tell you that you
1734  need to make another run.
1735  You can by-and-large ignore these.
1736 \end_layout
1737
1738 \begin_layout Itemize
1739 \begin_inset Flex Code
1740 status collapsed
1741
1742 \begin_layout Plain Layout
1743 LaTeX Font Warning
1744 \end_layout
1745
1746 \end_inset
1747
1748
1749 \begin_inset Newline newline
1750 \end_inset
1751
1752 Another warning message, this time about fonts which \SpecialChar LaTeX
1753  couldn't find.
1754  The rest of the message will often say something about a replacement font
1755  that \SpecialChar LaTeX
1756  used.
1757  You can safely ignore these, too.
1758 \end_layout
1759
1760 \begin_layout Itemize
1761 \begin_inset Flex Code
1762 status collapsed
1763
1764 \begin_layout Plain Layout
1765 Overfull 
1766 \backslash
1767 hbox
1768 \end_layout
1769
1770 \end_inset
1771
1772
1773 \begin_inset Newline newline
1774 \end_inset
1775
1776 \SpecialChar LaTeX
1777  absolutely 
1778 \emph on
1779 loves
1780 \emph default
1781  to spew these out.
1782  They are warnings about lines that were too long and run past the right
1783  margin.
1784  Almost always, this is unnoticeable in the final output.
1785  (It can be just a point or two.) Or, only one or two characters extend past
1786  the margin.
1787  \SpecialChar LaTeX
1788  seems to generate at least one of these messages for just about any document
1789  you write.
1790 \begin_inset Newline newline
1791 \end_inset
1792
1793 You can ignore these messages.
1794  Your eyes will tell you if there's a problem with something that's too
1795  wide; just look at the output.
1796 \begin_inset Foot
1797 status collapsed
1798
1799 \begin_layout Plain Layout
1800 You can also enable the `draft' option in 
1801 \begin_inset Flex Noun
1802 status collapsed
1803
1804 \begin_layout Plain Layout
1805 Document\SpecialChar menuseparator
1806 Settings
1807 \end_layout
1808
1809 \end_inset
1810
1811 , and then \SpecialChar LaTeX
1812  will draw a black box in the margin of lines that are overfull.
1813 \end_layout
1814
1815 \end_inset
1816
1817
1818 \end_layout
1819
1820 \begin_layout Itemize
1821 \begin_inset Flex Code
1822 status collapsed
1823
1824 \begin_layout Plain Layout
1825 Underfull 
1826 \backslash
1827 hbox
1828 \end_layout
1829
1830 \end_inset
1831
1832
1833 \begin_inset Newline newline
1834 \end_inset
1835
1836 Not quite as common as its cousin.
1837  \SpecialChar LaTeX
1838  seems to like to print lines that are a bit too wide as opposed to ones
1839  that are a bit too narrow.
1840  We have no idea why.
1841 \end_layout
1842
1843 \begin_layout Itemize
1844 \begin_inset Flex Code
1845 status collapsed
1846
1847 \begin_layout Plain Layout
1848 Overfull 
1849 \backslash
1850 vbox
1851 \end_layout
1852
1853 \end_inset
1854
1855  and 
1856 \begin_inset Flex Code
1857 status collapsed
1858
1859 \begin_layout Plain Layout
1860 Underfull 
1861 \backslash
1862 vbox
1863 \end_layout
1864
1865 \end_inset
1866
1867
1868 \begin_inset Newline newline
1869 \end_inset
1870
1871 Warnings about troubles breaking the page.
1872  Once again, just look at the output.
1873  Your eyes will tell you where something has gone wrong.
1874 \end_layout
1875
1876 \begin_layout Itemize
1877 \begin_inset Flex Code
1878 status collapsed
1879
1880 \begin_layout Plain Layout
1881 LaTeX Error: File 
1882 \begin_inset Quotes els
1883 \end_inset
1884
1885 Xxxx
1886 \begin_inset Quotes ers
1887 \end_inset
1888
1889  not found
1890 \end_layout
1891
1892 \end_inset
1893
1894
1895 \begin_inset Newline newline
1896 \end_inset
1897
1898 The file 
1899 \begin_inset Quotes eld
1900 \end_inset
1901
1902 Xxxx
1903 \begin_inset Quotes erd
1904 \end_inset
1905
1906  isn't installed on this system.
1907  This usually appears because some package your document needs isn't installed.
1908  If you didn't touch the preamble or didn't use the 
1909 \begin_inset Flex Code
1910 status collapsed
1911
1912 \begin_layout Plain Layout
1913
1914 \backslash
1915 usepackage{}
1916 \end_layout
1917
1918 \end_inset
1919
1920  command, then one of the packages \SpecialChar LyX
1921  tried to load is missing.
1922  Use 
1923 \begin_inset Flex Noun
1924 status collapsed
1925
1926 \begin_layout Plain Layout
1927 Help\SpecialChar menuseparator
1928 \SpecialChar LaTeX
1929  Configuration
1930 \end_layout
1931
1932 \end_inset
1933
1934  to get a list of packages that \SpecialChar LyX
1935  knows about.
1936  This file is updated whenever you reconfigure \SpecialChar LyX
1937  (using 
1938 \begin_inset Flex Noun
1939 status collapsed
1940
1941 \begin_layout Plain Layout
1942 Tools\SpecialChar menuseparator
1943 Reconfigure
1944 \end_layout
1945
1946 \end_inset
1947
1948 ) and tells you which packages have been detected and what they do.
1949 \begin_inset Newline newline
1950 \end_inset
1951
1952 If you did use the 
1953 \begin_inset Flex Code
1954 status collapsed
1955
1956 \begin_layout Plain Layout
1957
1958 \backslash
1959 usepackage{}
1960 \end_layout
1961
1962 \end_inset
1963
1964  command and the package in question isn't installed, then you'll need to
1965  install it yourself.
1966 \end_layout
1967
1968 \begin_layout Itemize
1969 \begin_inset Flex Code
1970 status collapsed
1971
1972 \begin_layout Plain Layout
1973 LaTeX Error: Unknown option
1974 \end_layout
1975
1976 \end_inset
1977
1978
1979 \begin_inset Newline newline
1980 \end_inset
1981
1982 Error messages beginning with this are trying to tell you that you specified
1983  a bad or undefined option to a package.
1984  Check the package's documentation.
1985 \end_layout
1986
1987 \begin_layout Itemize
1988 \begin_inset Flex Code
1989 status collapsed
1990
1991 \begin_layout Plain Layout
1992 Undefined control sequence
1993 \end_layout
1994
1995 \end_inset
1996
1997
1998 \begin_inset Newline newline
1999 \end_inset
2000
2001 If you've inserted \SpecialChar LaTeX
2002  code into your document, but made a typo, you'll get
2003  one of these.
2004  You may have forgotten to load a package.
2005  In any case, this error message usually means that you used an undefined
2006  command.
2007  
2008 \end_layout
2009
2010 \begin_layout Standard
2011 There are other error and warning messages.
2012  Some are self-explanatory.
2013  These are usually \SpecialChar LaTeX
2014  messages.
2015  Others are downright cryptic.
2016  These are usually \SpecialChar TeX
2017  error messages, and we really have 
2018 \emph on
2019 no clue
2020 \emph default
2021  what they mean or how to decipher them.
2022  No-one does.
2023 \end_layout
2024
2025 \begin_layout Standard
2026 There's a general sequence you should follow if you get error messages:
2027 \end_layout
2028
2029 \begin_layout Enumerate
2030 Look at the \SpecialChar LaTeX
2031  code you inserted for typos.
2032 \end_layout
2033
2034 \begin_layout Enumerate
2035 If there are no typos, check that you used the command(s) correctly.
2036 \end_layout
2037
2038 \begin_layout Enumerate
2039 If you get a bunch of error boxes piled up at the very top of the document—and
2040  especially if you see a 
2041 \begin_inset Quotes eld
2042 \end_inset
2043
2044
2045 \begin_inset Flex Code
2046 status collapsed
2047
2048 \begin_layout Plain Layout
2049 Missing 
2050 \backslash
2051 begin{document}
2052 \end_layout
2053
2054 \end_inset
2055
2056
2057 \begin_inset Quotes erd
2058 \end_inset
2059
2060  error—it means that there are errors in the preamble.
2061  Start debugging your preamble.
2062 \end_layout
2063
2064 \begin_layout Enumerate
2065 If you didn't add anything to the preamble and didn't add any \SpecialChar LaTeX
2066  code to the
2067  document, the first suspect is your \SpecialChar LaTeX
2068  distribution itself.
2069  Check for missing packages and install them.
2070 \end_layout
2071
2072 \begin_layout Enumerate
2073 Okay, so there are no missing packages.
2074  Did you use any of the fine-tuning options in \SpecialChar LyX
2075 ? Specifically, did you 
2076 \emph on
2077 misuse
2078 \emph default
2079  any of them, like trying to manually insert lots of 
2080 \begin_inset Flex Code
2081 status collapsed
2082
2083 \begin_layout Plain Layout
2084 Protected
2085 \begin_inset space ~
2086 \end_inset
2087
2088 Blanks
2089 \end_layout
2090
2091 \end_inset
2092
2093
2094 \begin_inset Flex Code
2095 status collapsed
2096
2097 \begin_layout Plain Layout
2098 Linebreaks
2099 \end_layout
2100
2101 \end_inset
2102
2103 , or 
2104 \begin_inset Flex Code
2105 status collapsed
2106
2107 \begin_layout Plain Layout
2108 Pagebreaks
2109 \end_layout
2110
2111 \end_inset
2112
2113 ? Did you try to kludge something together with these instead of using the
2114  appropriate paragraph environment?
2115 \end_layout
2116
2117 \begin_layout Enumerate
2118 All right, you didn't use any of the fine-tuning options, you played by
2119  the rules.
2120  Did you try to pull a fancy maneuver? Did you do something funky inside
2121  a table or an equation, like inserting a graphic into a table cell?
2122 \end_layout
2123
2124 \begin_layout Enumerate
2125 Do you have long sections of text where \SpecialChar LaTeX
2126  cannot find a place to break a
2127  line? By default, \SpecialChar LaTeX
2128  is rather strict about how much extra inter-word spacing
2129  it will add in order to break a line.
2130  Preferably, you should rework the paragraph to avoid the problem.
2131 \end_layout
2132
2133 \begin_layout Enumerate
2134 Did you go overboard with the nesting? \SpecialChar LyX
2135  (currently) doesn't check to make
2136  sure you're in the limits for nesting environments.
2137  If you nested a bunch of environments to the 
2138 \begin_inset Formula $17^{\mathrm{th}}$
2139 \end_inset
2140
2141  level, that's the problem.
2142  (The limit in \SpecialChar LaTeX
2143  is five.)
2144 \end_layout
2145
2146 \begin_layout Enumerate
2147 Okay, you didn't get any error messages, but your output looks awful.
2148  If you have a table or figure that's too wide or long for the page, you
2149  need to:
2150 \end_layout
2151
2152 \begin_deeper
2153 \begin_layout Enumerate
2154 rescale the figure so it fits.
2155 \end_layout
2156
2157 \begin_layout Enumerate
2158 trim down the table so it fits.
2159 \end_layout
2160
2161 \end_deeper
2162 \begin_layout Enumerate
2163 If something else is wrong with the output, and you didn't try to pull anything
2164  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2165 \end_layout
2166
2167 \begin_layout Standard
2168 If all this doesn't help—well, then 
2169 \emph on
2170 perhaps
2171 \emph default
2172  you might have found a bug in \SpecialChar LyX
2173 \SpecialChar ldots
2174 .
2175 \end_layout
2176
2177 \begin_layout Chapter
2178 Supplemental Tools
2179 \end_layout
2180
2181 \begin_layout Section
2182 Customizing Bibliographies with Bib\SpecialChar TeX
2183
2184 \end_layout
2185
2186 \begin_layout Standard
2187 The most basic information about how to use Bib\SpecialChar TeX
2188  with \SpecialChar LyX
2189  is contained in the
2190  section 
2191 \emph on
2192 Bibliography databases (Bib\SpecialChar TeX
2193 )
2194 \emph default
2195  of the 
2196 \emph on
2197 User's Guide
2198 \emph default
2199 .
2200  The following subsections explain special bibliography features supported
2201  by \SpecialChar LyX
2202 .
2203 \end_layout
2204
2205 \begin_layout Subsection
2206 Alternative Citation Styles
2207 \end_layout
2208
2209 \begin_layout Standard
2210 Standard Bib\SpecialChar TeX
2211  uses numbers (e.
2212 \begin_inset space \thinspace{}
2213 \end_inset
2214
2215 g.
2216 \begin_inset space \space{}
2217 \end_inset
2218
2219
2220 \begin_inset Quotes eld
2221 \end_inset
2222
2223 [12]
2224 \begin_inset Quotes erd
2225 \end_inset
2226
2227 ) to refer to a cited work.
2228  However, in many scientific disciplines, other citation styles are in use.
2229  The most common one is the author-year style (e.
2230 \begin_inset space \thinspace{}
2231 \end_inset
2232
2233 g.
2234 \begin_inset space \space{}
2235 \end_inset
2236
2237
2238 \begin_inset Quotes eld
2239 \end_inset
2240
2241 Knuth 1984a
2242 \begin_inset Quotes erd
2243 \end_inset
2244
2245 ).
2246  \SpecialChar LyX
2247  supports two packages that provide this style, 
2248 \begin_inset Flex Code
2249 status collapsed
2250
2251 \begin_layout Plain Layout
2252 natbib
2253 \end_layout
2254
2255 \end_inset
2256
2257  and 
2258 \begin_inset Flex Code
2259 status collapsed
2260
2261 \begin_layout Plain Layout
2262 jurabib
2263 \end_layout
2264
2265 \end_inset
2266
2267 .
2268  Both packages have their pros and cons, which cannot be listed in detail.
2269  If you only want to have simple author-year (or author-numerical) style,
2270  or if you want to use one of the countless style files for 
2271 \begin_inset Flex Code
2272 status collapsed
2273
2274 \begin_layout Plain Layout
2275 natbib
2276 \end_layout
2277
2278 \end_inset
2279
2280 , then the established 
2281 \begin_inset Flex Code
2282 status collapsed
2283
2284 \begin_layout Plain Layout
2285 natbib
2286 \end_layout
2287
2288 \end_inset
2289
2290  package is probably your choice.
2291  If you need special features like short title references, ibidem etc., you
2292  might consider the 
2293 \begin_inset Flex Code
2294 status collapsed
2295
2296 \begin_layout Plain Layout
2297 jurabib
2298 \end_layout
2299
2300 \end_inset
2301
2302  package.
2303 \end_layout
2304
2305 \begin_layout Standard
2306 The handling of both packages in \SpecialChar LyX
2307  is basically the same.
2308  Go to 
2309 \begin_inset Flex Noun
2310 status collapsed
2311
2312 \begin_layout Plain Layout
2313 Document\SpecialChar menuseparator
2314 Settings
2315 \end_layout
2316
2317 \end_inset
2318
2319  and select under 
2320 \begin_inset Flex Noun
2321 status collapsed
2322
2323 \begin_layout Plain Layout
2324 Bibliography
2325 \end_layout
2326
2327 \end_inset
2328
2329  the option 
2330 \begin_inset Flex Noun
2331 status collapsed
2332
2333 \begin_layout Plain Layout
2334 Natbib
2335 \end_layout
2336
2337 \end_inset
2338
2339  or 
2340 \begin_inset Flex Noun
2341 status collapsed
2342
2343 \begin_layout Plain Layout
2344 Jurabib
2345 \end_layout
2346
2347 \end_inset
2348
2349 .
2350  With both packages, you will get some extra features in the citation dialog
2351  and you can select the style of the reference (
2352 \begin_inset Quotes eld
2353 \end_inset
2354
2355 Knuth 1984
2356 \begin_inset Quotes erd
2357 \end_inset
2358
2359
2360 \begin_inset Quotes eld
2361 \end_inset
2362
2363 Knuth (1984)
2364 \begin_inset Quotes erd
2365 \end_inset
2366
2367
2368 \begin_inset Quotes eld
2369 \end_inset
2370
2371 Knuth, 1984
2372 \begin_inset Quotes erd
2373 \end_inset
2374
2375
2376 \begin_inset Quotes eld
2377 \end_inset
2378
2379 1984
2380 \begin_inset Quotes erd
2381 \end_inset
2382
2383  etc.).
2384  Note that both packages need specifically designed style files.
2385  They both ship their own, but there are lots of additional style files,
2386  and there is even an interactive style file builder
2387 \begin_inset Foot
2388 status collapsed
2389
2390 \begin_layout Plain Layout
2391 See 
2392 \begin_inset Flex URL
2393 status open
2394
2395 \begin_layout Plain Layout
2396
2397 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2398 \end_layout
2399
2400 \end_inset
2401
2402
2403 \end_layout
2404
2405 \end_inset
2406
2407  for 
2408 \begin_inset Flex Code
2409 status collapsed
2410
2411 \begin_layout Plain Layout
2412 natbib
2413 \end_layout
2414
2415 \end_inset
2416
2417 .
2418 \end_layout
2419
2420 \begin_layout Subsection
2421 Sectioned Bibliographies
2422 \end_layout
2423
2424 \begin_layout Standard
2425 Sometimes you might need to divide your bibliography into several sections.
2426  If you are for instance a historian, the possibility to separate sources
2427  and scientific works is most likely a 
2428 \begin_inset Quotes eld
2429 \end_inset
2430
2431 must have
2432 \begin_inset Quotes erd
2433 \end_inset
2434
2435 .
2436  Unfortunately, Bib\SpecialChar TeX
2437  itself does not allow you to do this.
2438  But with the help of some \SpecialChar LaTeX
2439  packages, Bib\SpecialChar TeX
2440  can be extended to fit your needs.
2441 \end_layout
2442
2443 \begin_layout Standard
2444 \SpecialChar LyX
2445  provides native support for one of these packages, 
2446 \family typewriter
2447 bibtopic
2448 \family default
2449 .
2450 \begin_inset Foot
2451 status collapsed
2452
2453 \begin_layout Plain Layout
2454 Available from 
2455 \begin_inset Flex URL
2456 status open
2457
2458 \begin_layout Plain Layout
2459
2460 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2461 \end_layout
2462
2463 \end_inset
2464
2465
2466 \end_layout
2467
2468 \end_inset
2469
2470  The advantage of this package (compared to other packages like 
2471 \family typewriter
2472 multibib
2473 \family default
2474 ) is that you don't need to define new citation commands.
2475  Instead, you need to prepare different bibliographic databases which include
2476  the entries for the different sections of the bibliography.
2477  For example: If you want to divide your bibliography into the sections
2478  
2479 \begin_inset Quotes eld
2480 \end_inset
2481
2482 Sources
2483 \begin_inset Quotes erd
2484 \end_inset
2485
2486  and 
2487 \begin_inset Quotes eld
2488 \end_inset
2489
2490 Scientific works
2491 \begin_inset Quotes erd
2492 \end_inset
2493
2494 , you first need to create two bibliographic databases, e.
2495 \begin_inset space \thinspace{}
2496 \end_inset
2497
2498 g.
2499 \begin_inset space \space{}
2500 \end_inset
2501
2502
2503 \begin_inset Flex Code
2504 status collapsed
2505
2506 \begin_layout Plain Layout
2507 sources.bib
2508 \end_layout
2509
2510 \end_inset
2511
2512  and 
2513 \begin_inset Flex Code
2514 status collapsed
2515
2516 \begin_layout Plain Layout
2517 scientific.bib
2518 \end_layout
2519
2520 \end_inset
2521
2522 .
2523  
2524 \end_layout
2525
2526 \begin_layout Standard
2527 Go to 
2528 \begin_inset Flex Noun
2529 status collapsed
2530
2531 \begin_layout Plain Layout
2532 Document\SpecialChar menuseparator
2533 Settings
2534 \end_layout
2535
2536 \end_inset
2537
2538  and check under 
2539 \begin_inset Flex Noun
2540 status collapsed
2541
2542 \begin_layout Plain Layout
2543 Bibliography
2544 \end_layout
2545
2546 \end_inset
2547
2548  the option 
2549 \begin_inset Flex Noun
2550 status collapsed
2551
2552 \begin_layout Plain Layout
2553 Sectioned bibliography
2554 \end_layout
2555
2556 \end_inset
2557
2558 .
2559  Now you can insert multiple Bib\SpecialChar TeX
2560  bibliographies, one for each section of
2561  your bibliography.
2562  Returning to our example: Insert the Bib\SpecialChar TeX
2563  bibliography 
2564 \begin_inset Flex Code
2565 status collapsed
2566
2567 \begin_layout Plain Layout
2568 sources.bib
2569 \end_layout
2570
2571 \end_inset
2572
2573  and a second one for the database 
2574 \begin_inset Flex Code
2575 status collapsed
2576
2577 \begin_layout Plain Layout
2578 scientific.bib
2579 \end_layout
2580
2581 \end_inset
2582
2583 .
2584  You are free to use the same or different styles for each section.
2585  Additionally, you can choose if the bibliography section should contain
2586  
2587 \begin_inset Quotes eld
2588 \end_inset
2589
2590 all cited references
2591 \begin_inset Quotes erd
2592 \end_inset
2593
2594  of the specified database(s) (which is the default), 
2595 \begin_inset Quotes eld
2596 \end_inset
2597
2598 all uncited references
2599 \begin_inset Quotes erd
2600 \end_inset
2601
2602  or even 
2603 \begin_inset Quotes eld
2604 \end_inset
2605
2606 all references
2607 \begin_inset Quotes erd
2608 \end_inset
2609
2610 .
2611  This might be useful if you would like to separate your bibliography into
2612  three sections: 
2613 \begin_inset Quotes eld
2614 \end_inset
2615
2616 Cited sources
2617 \begin_inset Quotes erd
2618 \end_inset
2619
2620
2621 \begin_inset Quotes eld
2622 \end_inset
2623
2624 Uncited sources
2625 \begin_inset Quotes erd
2626 \end_inset
2627
2628 , and 
2629 \begin_inset Quotes eld
2630 \end_inset
2631
2632 Scientific works
2633 \begin_inset Quotes erd
2634 \end_inset
2635
2636 .
2637  The titles for the sections can be added as ordinary sections or subsections.
2638  Since 
2639 \begin_inset Flex Code
2640 status collapsed
2641
2642 \begin_layout Plain Layout
2643 bibtopic
2644 \end_layout
2645
2646 \end_inset
2647
2648  removes the bibliography title, you have to manually re-add that, too (as
2649  a chapter* or section*, for instance).
2650 \end_layout
2651
2652 \begin_layout Subsection
2653 Multiple Bibliographies
2654 \end_layout
2655
2656 \begin_layout Standard
2657 Multiple bibliographies, e.
2658 \begin_inset space \thinspace{}
2659 \end_inset
2660
2661 g.
2662 \begin_inset space \space{}
2663 \end_inset
2664
2665 a bibliography for each section or chapter of the document, are not supported
2666  by Bib\SpecialChar TeX
2667  itself.
2668  But the 
2669 \begin_inset Flex Code
2670 status collapsed
2671
2672 \begin_layout Plain Layout
2673 bibtopic
2674 \end_layout
2675
2676 \end_inset
2677
2678  package, which is used for the creation of sectioned bibliographies in
2679  \SpecialChar LyX
2680  (see the previous section), provides an easy way to solve this task, if
2681  you are willing to use some 
2682 \begin_inset Flex Noun
2683 status collapsed
2684
2685 \begin_layout Plain Layout
2686 \SpecialChar TeX
2687  Code
2688 \end_layout
2689
2690 \end_inset
2691
2692  (see section
2693 \begin_inset space ~
2694 \end_inset
2695
2696
2697 \begin_inset CommandInset ref
2698 LatexCommand ref
2699 reference "sec:Inserting-TeX-Code"
2700
2701 \end_inset
2702
2703 ).
2704 \begin_inset Foot
2705 status collapsed
2706
2707 \begin_layout Plain Layout
2708 An alternative approach is to use the 
2709 \begin_inset Flex Code
2710 status collapsed
2711
2712 \begin_layout Plain Layout
2713 chapterbib
2714 \end_layout
2715
2716 \end_inset
2717
2718  or 
2719 \begin_inset Flex Code
2720 status collapsed
2721
2722 \begin_layout Plain Layout
2723 bibunits
2724 \end_layout
2725
2726 \end_inset
2727
2728  package, respectively.
2729 \end_layout
2730
2731 \end_inset
2732
2733
2734 \end_layout
2735
2736 \begin_layout Standard
2737 First go to 
2738 \begin_inset Flex Noun
2739 status collapsed
2740
2741 \begin_layout Plain Layout
2742 Document\SpecialChar menuseparator
2743 Settings
2744 \end_layout
2745
2746 \end_inset
2747
2748  and under 
2749 \begin_inset Flex Noun
2750 status collapsed
2751
2752 \begin_layout Plain Layout
2753 Bibliography
2754 \end_layout
2755
2756 \end_inset
2757
2758  check 
2759 \begin_inset Flex Noun
2760 status collapsed
2761
2762 \begin_layout Plain Layout
2763 Sectioned bibliography
2764 \end_layout
2765
2766 \end_inset
2767
2768 .
2769  In the document, you have to enclose the sections, which shall contain
2770  their own bibliography (including the Bib\SpecialChar TeX
2771  bibliography itself), between
2772  
2773 \begin_inset Flex Code
2774 status collapsed
2775
2776 \begin_layout Plain Layout
2777
2778 \backslash
2779 begin{btUnit}
2780 \end_layout
2781
2782 \end_inset
2783
2784  and 
2785 \begin_inset Flex Code
2786 status collapsed
2787
2788 \begin_layout Plain Layout
2789
2790 \backslash
2791 end{btUnit}
2792 \end_layout
2793
2794 \end_inset
2795
2796  (those commands have to be inserted as \SpecialChar TeX
2797  code).
2798  The bibliography will contain all references that have been cited in the
2799  current 
2800 \begin_inset Flex Code
2801 status collapsed
2802
2803 \begin_layout Plain Layout
2804 btUnit
2805 \end_layout
2806
2807 \end_inset
2808
2809 .
2810  
2811 \series bold
2812 Note:
2813 \series default
2814  If you are using this approach, then every citation reference has to be
2815  inside some 
2816 \begin_inset Flex Code
2817 status collapsed
2818
2819 \begin_layout Plain Layout
2820 btUnit
2821 \end_layout
2822
2823 \end_inset
2824
2825 .
2826  Also, the 
2827 \begin_inset Flex Code
2828 status collapsed
2829
2830 \begin_layout Plain Layout
2831 btUnit
2832 \end_layout
2833
2834 \end_inset
2835
2836 s cannot be nested.
2837 \end_layout
2838
2839 \begin_layout Section
2840 Multipart Documents
2841 \end_layout
2842
2843 \begin_layout Subsection
2844 General Operation
2845 \end_layout
2846
2847 \begin_layout Standard
2848 When you are working on a large file with many sections, it is often convenient
2849  to break up the document into several files, or perhaps you have something
2850  where a table may change from time to time, but the preceding text does
2851  not.
2852  In these cases, you should seriously consider using multipart documents.
2853  For example, scientific papers often have five major sections: the introduction
2854 , observations, results, discussion, and conclusion.
2855  Each of these could be its own separate \SpecialChar LyX
2856  file, with one 
2857 \begin_inset Quotes eld
2858 \end_inset
2859
2860 master
2861 \begin_inset Quotes erd
2862 \end_inset
2863
2864  file which contains the title, authors, abstract, references, etc., plus
2865  the five included files.
2866  It is important to note that each of these files is a full \SpecialChar LyX
2867  file which
2868  can be formatted and printed on its own, as well as included in a master
2869  file.
2870  Each of these files must have the same document class, however—don't attempt
2871  to mix book classes with article classes.
2872  You may also include \SpecialChar LaTeX
2873  files; however, these files must not have their own
2874  preamble (i.
2875 \begin_inset space \thinspace{}
2876 \end_inset
2877
2878 e.
2879 \begin_inset space \space{}
2880 \end_inset
2881
2882 everything up to and including the 
2883 \begin_inset Flex Code
2884 status collapsed
2885
2886 \begin_layout Plain Layout
2887
2888 \backslash
2889 begin{document}
2890 \end_layout
2891
2892 \end_inset
2893
2894  line as well as the 
2895 \begin_inset Flex Code
2896 status collapsed
2897
2898 \begin_layout Plain Layout
2899
2900 \backslash
2901 end{document}
2902 \end_layout
2903
2904 \end_inset
2905
2906  line must be deleted) or else errors will be generated when you try to
2907  make a DVI file.
2908 \end_layout
2909
2910 \begin_layout Standard
2911 \SpecialChar LyX
2912  allows you to include files quite easily with 
2913 \begin_inset Flex Noun
2914 status collapsed
2915
2916 \begin_layout Plain Layout
2917 Insert\SpecialChar menuseparator
2918 ChiId
2919 \begin_inset space ~
2920 \end_inset
2921
2922 Document
2923 \end_layout
2924
2925 \end_inset
2926
2927 .
2928  When you click on this selection a small box is inserted into the file
2929  at the current cursor location.
2930  Clicking on the box raises a dialog which allows you to select the file
2931  to be included, and the method of its inclusion.
2932  
2933 \end_layout
2934
2935 \begin_layout Standard
2936 The file selection box should by now be obvious.
2937  The three inclusion methods are 
2938 \begin_inset Quotes eld
2939 \end_inset
2940
2941 include
2942 \begin_inset Quotes erd
2943 \end_inset
2944
2945
2946 \begin_inset Quotes eld
2947 \end_inset
2948
2949 input
2950 \begin_inset Quotes erd
2951 \end_inset
2952
2953 , and 
2954 \begin_inset Quotes eld
2955 \end_inset
2956
2957 verbatim
2958 \begin_inset Quotes erd
2959 \end_inset
2960
2961 .
2962  The difference between 
2963 \begin_inset Quotes eld
2964 \end_inset
2965
2966 include
2967 \begin_inset Quotes erd
2968 \end_inset
2969
2970  and 
2971 \begin_inset Quotes eld
2972 \end_inset
2973
2974 input
2975 \begin_inset Quotes erd
2976 \end_inset
2977
2978  is really only meaningful to \SpecialChar LaTeX
2979 perts, but the practical difference is that
2980  files that are 
2981 \begin_inset Quotes eld
2982 \end_inset
2983
2984 included
2985 \begin_inset Quotes erd
2986 \end_inset
2987
2988  are typeset beginning on a new page, while files that are 
2989 \begin_inset Quotes eld
2990 \end_inset
2991
2992 inputted
2993 \begin_inset Quotes erd
2994 \end_inset
2995
2996  are typeset starting on the current page.
2997 \end_layout
2998
2999 \begin_layout Standard
3000 Generally, the master file is converted into a full \SpecialChar LaTeX
3001  file before typesetting,
3002  while the included files are converted to \SpecialChar LaTeX
3003  files that do not have all the
3004  preamble information.
3005 \end_layout
3006
3007 \begin_layout Standard
3008
3009 \begin_inset Quotes eld
3010 \end_inset
3011
3012 verbatim
3013 \begin_inset Quotes erd
3014 \end_inset
3015
3016  included file allows you to include a file typeset exactly as it appears
3017  in the file, i.
3018 \begin_inset space \thinspace{}
3019 \end_inset
3020
3021 e.
3022 \begin_inset space \space{}
3023 \end_inset
3024
3025 in 
3026 \begin_inset Flex Code
3027 status collapsed
3028
3029 \begin_layout Plain Layout
3030 verbatim
3031 \end_layout
3032
3033 \end_inset
3034
3035  mode, with the characters set in a fixed-width typewriter font.
3036  Normally, spaces in this file are invisible, though two consecutive spaces
3037  are conserved, unlike \SpecialChar LyX
3038 's normal treatment of spaces.
3039  However, setting the 
3040 \begin_inset Flex Noun
3041 status collapsed
3042
3043 \begin_layout Plain Layout
3044 Mark
3045 \begin_inset space ~
3046 \end_inset
3047
3048 spaces
3049 \begin_inset space ~
3050 \end_inset
3051
3052 in
3053 \begin_inset space ~
3054 \end_inset
3055
3056 output
3057 \end_layout
3058
3059 \end_inset
3060
3061  checkbox typesets a mark to unambiguously define the presence of a space.
3062  
3063 \end_layout
3064
3065 \begin_layout Subsection
3066 Cross-References Between Files
3067 \end_layout
3068
3069 \begin_layout Standard
3070 \begin_inset Box Shadowbox
3071 position "t"
3072 hor_pos "c"
3073 has_inner_box 1
3074 inner_pos "t"
3075 use_parbox 0
3076 use_makebox 0
3077 width "100col%"
3078 special "none"
3079 height "1in"
3080 height_special "totalheight"
3081 thickness "0.4pt"
3082 separation "3pt"
3083 shadowsize "4pt"
3084 framecolor "black"
3085 backgroundcolor "none"
3086 status open
3087
3088 \begin_layout Plain Layout
3089 This section is somewhat out of date.
3090  Need to describe default master documents and how children are opened when
3091  the master is.
3092  [[FIXME]]
3093 \end_layout
3094
3095 \end_inset
3096
3097
3098 \end_layout
3099
3100 \begin_layout Standard
3101 It is possible to set up cross-references between the different files.
3102  First, open all the files in question: let's call them A and B in a two
3103  file example, where B is included in A.
3104  Let's say you insert a label in A, then want to reference it in B.
3105  Open the cross-reference dialog whilst in document B, and you can select
3106  the 
3107 \begin_inset Quotes eld
3108 \end_inset
3109
3110 buffer
3111 \begin_inset Quotes erd
3112 \end_inset
3113
3114  to use.
3115 \end_layout
3116
3117 \begin_layout Subsection
3118 Bibliography Lists in all Subdocuments
3119 \end_layout
3120
3121 \begin_layout Standard
3122 \begin_inset Box Frameless
3123 position "t"
3124 hor_pos "c"
3125 has_inner_box 1
3126 inner_pos "t"
3127 use_parbox 0
3128 use_makebox 0
3129 width "100col%"
3130 special "none"
3131 height "1in"
3132 height_special "totalheight"
3133 thickness "0.4pt"
3134 separation "3pt"
3135 shadowsize "4pt"
3136 framecolor "black"
3137 backgroundcolor "none"
3138 status open
3139
3140 \begin_layout Plain Layout
3141 This section also needs updating.
3142  There is now material about this on the wiki, and it could be copied here.
3143 \end_layout
3144
3145 \end_inset
3146
3147
3148 \end_layout
3149
3150 \begin_layout Standard
3151 Copy the bibliography list with all entries to all subdocuments and transform
3152  them to a comment.
3153  This way \SpecialChar LyX
3154  will find the 
3155 \begin_inset Flex Code
3156 status collapsed
3157
3158 \begin_layout Plain Layout
3159 .bib
3160 \end_layout
3161
3162 \end_inset
3163
3164 -files and you can easily insert references without making the bibliography
3165  list visible.
3166 \end_layout
3167
3168 \begin_layout Standard
3169 As the bibliography list is in a comment, \SpecialChar LaTeX
3170  won't use it and the references
3171  will look like this: [?], instead of like this: [1].
3172  One solution is to use the \SpecialChar LaTeX
3173 -package 
3174 \begin_inset Flex Code
3175 status collapsed
3176
3177 \begin_layout Plain Layout
3178 comment
3179 \end_layout
3180
3181 \end_inset
3182
3183  that will only include comments by processing the files separately.
3184  To do this, add in the \SpecialChar LaTeX
3185  preamble of every subdocument the following:
3186 \end_layout
3187
3188 \begin_layout LyX-Code
3189
3190 \backslash
3191 usepackage{comment}
3192 \end_layout
3193
3194 \begin_layout LyX-Code
3195
3196 \backslash
3197 includecomment{comment}
3198 \end_layout
3199
3200 \begin_layout Standard
3201 See also 
3202 \begin_inset Flex URL
3203 status collapsed
3204
3205 \begin_layout Plain Layout
3206
3207 http://wiki.lyx.org/FAQ/Unsorted#toc31
3208 \end_layout
3209
3210 \end_inset
3211
3212 .
3213 \end_layout
3214
3215 \begin_layout Section
3216 \SpecialChar LyX
3217  Archives
3218 \end_layout
3219
3220 \begin_layout Standard
3221 Users sometimes need to be able to 
3222 \begin_inset Quotes eld
3223 \end_inset
3224
3225 bundle
3226 \begin_inset Quotes erd
3227 \end_inset
3228
3229  a \SpecialChar LyX
3230  file together with all the images (and other files) on which it depends,
3231  either for sending to a publisher or for sharing with a co-author.
3232  \SpecialChar LyX
3233  2.0 includes a Python script (
3234 \begin_inset Flex Code
3235 status collapsed
3236
3237 \begin_layout Plain Layout
3238 lyxpak.py
3239 \end_layout
3240
3241 \end_inset
3242
3243 ) that automates this process.
3244  To use it, you must have either the 
3245 \begin_inset Flex Code
3246 status collapsed
3247
3248 \begin_layout Plain Layout
3249 zipfile
3250 \end_layout
3251
3252 \end_inset
3253
3254  or 
3255 \begin_inset Flex Code
3256 status collapsed
3257
3258 \begin_layout Plain Layout
3259 tarfile
3260 \end_layout
3261
3262 \end_inset
3263
3264  python modules installed on your system.
3265  By default, the script prefers the 
3266 \begin_inset Flex Code
3267 status collapsed
3268
3269 \begin_layout Plain Layout
3270 gzip
3271 \end_layout
3272
3273 \end_inset
3274
3275 -compressed 
3276 \begin_inset Flex Code
3277 status collapsed
3278
3279 \begin_layout Plain Layout
3280 tar
3281 \end_layout
3282
3283 \end_inset
3284
3285  format on Unix-like systems and the 
3286 \begin_inset Flex Code
3287 status collapsed
3288
3289 \begin_layout Plain Layout
3290 zip
3291 \end_layout
3292
3293 \end_inset
3294
3295  format on Windows.
3296 \end_layout
3297
3298 \begin_layout Standard
3299 \SpecialChar LyX
3300 's configuration process will set the script up to export a `\SpecialChar LyX
3301  Archive',
3302  and this format will then be available under 
3303 \begin_inset Flex Code
3304 status collapsed
3305
3306 \begin_layout Plain Layout
3307 File\SpecialChar menuseparator
3308 Export
3309 \end_layout
3310
3311 \end_inset
3312
3313 .
3314 \end_layout
3315
3316 \begin_layout Standard
3317 Independently of the platform, the generation of a particular archive format
3318  can be forced by adding either the 
3319 \begin_inset Flex Code
3320 status collapsed
3321
3322 \begin_layout Plain Layout
3323 -t
3324 \end_layout
3325
3326 \end_inset
3327
3328  (for the 
3329 \begin_inset Flex Code
3330 status collapsed
3331
3332 \begin_layout Plain Layout
3333 tar
3334 \end_layout
3335
3336 \end_inset
3337
3338  format) or 
3339 \begin_inset Flex Code
3340 status collapsed
3341
3342 \begin_layout Plain Layout
3343 -z
3344 \end_layout
3345
3346 \end_inset
3347
3348  (for the 
3349 \begin_inset Flex Code
3350 status collapsed
3351
3352 \begin_layout Plain Layout
3353 zip
3354 \end_layout
3355
3356 \end_inset
3357
3358  format) switch to the 
3359 \begin_inset Flex Code
3360 status collapsed
3361
3362 \begin_layout Plain Layout
3363 \SpecialChar LyX
3364 \SpecialChar menuseparator
3365 \SpecialChar LyX
3366  Archive
3367 \end_layout
3368
3369 \end_inset
3370
3371  converter in 
3372 \begin_inset Flex Code
3373 status collapsed
3374
3375 \begin_layout Plain Layout
3376 Tools\SpecialChar menuseparator
3377 Preferences\SpecialChar menuseparator
3378 File Handling\SpecialChar menuseparator
3379 Converters
3380 \end_layout
3381
3382 \end_inset
3383
3384 .
3385  (Make sure you add the switch after the script name, not before it.)
3386 \end_layout
3387
3388 \begin_layout Section
3389 Fancy Headers and Footers
3390 \end_layout
3391
3392 \begin_layout Standard
3393 The default page layout is rather plain; for an 
3394 \begin_inset Flex Code
3395 status collapsed
3396
3397 \begin_layout Plain Layout
3398 article
3399 \end_layout
3400
3401 \end_inset
3402
3403  document class, all you get is a centered page number at the bottom of
3404  the page.
3405  This document uses KOMA-script's book class, so it appears to be a bit
3406  fancier.
3407  But to really put on a show, you need to set the document page style to
3408  
3409 \begin_inset Quotes eld
3410 \end_inset
3411
3412 fancy
3413 \begin_inset Quotes erd
3414 \end_inset
3415
3416 , as mentioned in the 
3417 \emph on
3418 User Guide
3419 \emph default
3420 .
3421  This section describes the \SpecialChar LaTeX
3422  code you need to insert in your \SpecialChar LaTeX
3423  preamble in
3424  order to get the desired effects.
3425 \end_layout
3426
3427 \begin_layout Standard
3428 For more information on fancy headers, see the 
3429 \begin_inset Flex Code
3430 status collapsed
3431
3432 \begin_layout Plain Layout
3433 fancyhdr
3434 \end_layout
3435
3436 \end_inset
3437
3438  package documentation.
3439  (
3440 \begin_inset Flex URL
3441 status collapsed
3442
3443 \begin_layout Plain Layout
3444
3445 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3446 \end_layout
3447
3448 \end_inset
3449
3450 )
3451 \end_layout
3452
3453 \begin_layout Standard
3454 The page header is divided into three fields, not surprisingly labeled 
3455 \begin_inset Quotes eld
3456 \end_inset
3457
3458 left
3459 \begin_inset Quotes erd
3460 \end_inset
3461
3462
3463 \begin_inset Quotes eld
3464 \end_inset
3465
3466 center
3467 \begin_inset Quotes erd
3468 \end_inset
3469
3470 , and 
3471 \begin_inset Quotes eld
3472 \end_inset
3473
3474 right
3475 \begin_inset Quotes erd
3476 \end_inset
3477
3478 .
3479  The footer is also divided into these three fields.
3480  The \SpecialChar LaTeX
3481  commands to set these fields in the simplest manner are 
3482 \begin_inset Flex Code
3483 status collapsed
3484
3485 \begin_layout Plain Layout
3486
3487 \backslash
3488 lhead
3489 \end_layout
3490
3491 \end_inset
3492
3493
3494 \begin_inset Flex Code
3495 status collapsed
3496
3497 \begin_layout Plain Layout
3498
3499 \backslash
3500 chead
3501 \end_layout
3502
3503 \end_inset
3504
3505
3506 \begin_inset Flex Code
3507 status collapsed
3508
3509 \begin_layout Plain Layout
3510
3511 \backslash
3512 rhead
3513 \end_layout
3514
3515 \end_inset
3516
3517
3518 \begin_inset Flex Code
3519 status collapsed
3520
3521 \begin_layout Plain Layout
3522
3523 \backslash
3524 lfoot
3525 \end_layout
3526
3527 \end_inset
3528
3529 , etc.
3530  Suppose you wish to put your name in the upper left hand corner of each
3531  page.
3532  Simply insert the following command in the preamble: 
3533 \end_layout
3534
3535 \begin_layout Standard
3536
3537 \family typewriter
3538
3539 \backslash
3540 lhead{John Q.
3541  DocWriter}
3542 \end_layout
3543
3544 \begin_layout Standard
3545 You will now see your name in the upper left.
3546  If a field has a default entry that you would like to get rid of (often
3547  the page number appears in the central footer) simply include a command
3548  with a blank argument, e.
3549 \begin_inset space \thinspace{}
3550 \end_inset
3551
3552 g.:
3553 \end_layout
3554
3555 \begin_layout Standard
3556
3557 \family typewriter
3558
3559 \backslash
3560 cfoot{}
3561 \end_layout
3562
3563 \begin_layout Standard
3564 Let's get really fancy: lets put the section number with the word 
3565 \begin_inset Quotes eld
3566 \end_inset
3567
3568 Section
3569 \begin_inset Quotes erd
3570 \end_inset
3571
3572  (e.
3573 \begin_inset space \thinspace{}
3574 \end_inset
3575
3576 g.
3577 \begin_inset space \space{}
3578 \end_inset
3579
3580 Section 3) in the upper left, the page number (e.
3581 \begin_inset space \thinspace{}
3582 \end_inset
3583
3584 g.
3585 \begin_inset space \space{}
3586 \end_inset
3587
3588 Page 4) in the upper right, your name in the lower left, and the date in
3589  the lower right.
3590  The following commands should now appear in the preamble:
3591 \end_layout
3592
3593 \begin_layout Standard
3594
3595 \family typewriter
3596
3597 \backslash
3598 lhead{Section 
3599 \backslash
3600 thesection}
3601 \end_layout
3602
3603 \begin_layout Standard
3604
3605 \family typewriter
3606
3607 \backslash
3608 chead{}
3609 \end_layout
3610
3611 \begin_layout Standard
3612
3613 \family typewriter
3614
3615 \backslash
3616 rhead{Page 
3617 \backslash
3618 thepage}
3619 \end_layout
3620
3621 \begin_layout Standard
3622
3623 \family typewriter
3624
3625 \backslash
3626 lfoot{John Q.
3627  DocWriter}
3628 \end_layout
3629
3630 \begin_layout Standard
3631
3632 \family typewriter
3633
3634 \backslash
3635 cfoot{}
3636 \end_layout
3637
3638 \begin_layout Standard
3639
3640 \family typewriter
3641
3642 \backslash
3643 rfoot{
3644 \backslash
3645 today}
3646 \end_layout
3647
3648 \begin_layout Standard
3649 The commands 
3650 \begin_inset Flex Code
3651 status collapsed
3652
3653 \begin_layout Plain Layout
3654
3655 \backslash
3656 thesection
3657 \end_layout
3658
3659 \end_inset
3660
3661  and 
3662 \begin_inset Flex Code
3663 status collapsed
3664
3665 \begin_layout Plain Layout
3666
3667 \backslash
3668 thepage
3669 \end_layout
3670
3671 \end_inset
3672
3673  access \SpecialChar LaTeX
3674 's section and page counters, and so print out the current section
3675  and page numbers.
3676  
3677 \begin_inset Flex Code
3678 status collapsed
3679
3680 \begin_layout Plain Layout
3681
3682 \backslash
3683 today
3684 \end_layout
3685
3686 \end_inset
3687
3688  simply prints out today's date.
3689 \end_layout
3690
3691 \begin_layout Standard
3692 The thicknesses of the horizontal rules drawn beneath the header and above
3693  the footer can also be modified.
3694  If you don't want one of the rules, set its thickness to 0.
3695  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3696  Use commands
3697 \family typewriter
3698  
3699 \family default
3700 like 
3701 \begin_inset Flex Code
3702 status collapsed
3703
3704 \begin_layout Plain Layout
3705
3706 \backslash
3707 renewcommand{
3708 \backslash
3709 headrulewidth}{0.4pt}
3710 \end_layout
3711
3712 \end_inset
3713
3714  and 
3715 \begin_inset Flex Code
3716 status collapsed
3717
3718 \begin_layout Plain Layout
3719
3720 \backslash
3721 renewcommand{
3722 \backslash
3723 footrulewidth}{0.4pt}
3724 \end_layout
3725
3726 \end_inset
3727
3728  to set the thicknesses.
3729 \end_layout
3730
3731 \begin_layout Standard
3732 You can switch the header/footer settings on and off for individual pages
3733  using commands like 
3734 \begin_inset Flex Code
3735 status collapsed
3736
3737 \begin_layout Plain Layout
3738
3739 \backslash
3740 thispagestyle{empty}
3741 \end_layout
3742
3743 \end_inset
3744
3745
3746 \begin_inset Flex Code
3747 status collapsed
3748
3749 \begin_layout Plain Layout
3750
3751 \backslash
3752 thispagestyle{plain}
3753 \end_layout
3754
3755 \end_inset
3756
3757 , and 
3758 \begin_inset Flex Code
3759 status collapsed
3760
3761 \begin_layout Plain Layout
3762
3763 \backslash
3764 thispagestyle{fancy}
3765 \end_layout
3766
3767 \end_inset
3768
3769 .
3770  Simply insert them in the text on the page you want changed and mark them
3771  as \SpecialChar TeX
3772  code.
3773  In fact, title pages are marked as plain by default, while following pages
3774  are marked fancy when using the global fancy setting.
3775 \end_layout
3776
3777 \begin_layout Standard
3778 As a final example, it is possible to include an image in the header or
3779  footer.
3780  Suppose you want to put a company logo in the upper lefthand corner.
3781  You might try something like
3782 \end_layout
3783
3784 \begin_layout Standard
3785
3786 \family typewriter
3787
3788 \backslash
3789 lhead{
3790 \backslash
3791 resizebox{1in}{!}{
3792 \backslash
3793 includegraphics{logo.eps}}}
3794 \end_layout
3795
3796 \begin_layout Standard
3797 \noindent
3798 (you may need to preface this with 
3799 \begin_inset Flex Code
3800 status collapsed
3801
3802 \begin_layout Plain Layout
3803 \noindent
3804
3805 \backslash
3806 usepackage{graphics}
3807 \end_layout
3808
3809 \end_inset
3810
3811  if you don't include graphics elsewhere in your document).
3812 \end_layout
3813
3814 \begin_layout Section
3815 Itemize Bullet Selection
3816 \begin_inset CommandInset label
3817 LatexCommand label
3818 name "sec:bullet"
3819
3820 \end_inset
3821
3822
3823 \end_layout
3824
3825 \begin_layout Standard
3826 by
3827 \noun on
3828  Allan Rae
3829 \end_layout
3830
3831 \begin_layout Subsection
3832 Introduction
3833 \end_layout
3834
3835 \begin_layout Standard
3836 \SpecialChar LyX
3837  provides 216 bullet shapes that can be accessed from a simple dialog.
3838  Using this dialog you can easily specify what bullet shape to use at each
3839  level of an itemized list.
3840  These settings are document-wide so you won't be able to specify different
3841  sets of bullets for different paragraphs.
3842 \begin_inset Foot
3843 status collapsed
3844
3845 \begin_layout Plain Layout
3846 Well, actually you can but you'll have to do it by hand.
3847 \end_layout
3848
3849 \end_inset
3850
3851
3852 \end_layout
3853
3854 \begin_layout Subsection
3855 How it looks
3856 \end_layout
3857
3858 \begin_layout Standard
3859 Open the dialog by selecting the 
3860 \begin_inset Flex Noun
3861 status collapsed
3862
3863 \begin_layout Plain Layout
3864 Document\SpecialChar menuseparator
3865 Settings
3866 \end_layout
3867
3868 \end_inset
3869
3870  menu item and then select the 
3871 \begin_inset Flex Noun
3872 status collapsed
3873
3874 \begin_layout Plain Layout
3875 Bullets
3876 \end_layout
3877
3878 \end_inset
3879
3880  tab.
3881 \end_layout
3882
3883 \begin_layout Standard
3884 The dialog provides you with a table of bullet shapes.
3885  A column of buttons on the left of the table provides access to the six
3886  different panels of bullet shapes.
3887  The row of buttons across the top is used to select which bullet depth
3888  you are changing.
3889  A text entry under the table shows the currently selected bullet shape's
3890  \SpecialChar LaTeX
3891  equivalent and this can be edited if desired.
3892  If you do modify the text you will also need to specify any needed packages
3893  in the \SpecialChar LaTeX
3894  preamble.
3895 \end_layout
3896
3897 \begin_layout Standard
3898 The six panels are divided up by the packages they require.
3899  The following table shows the mappings from button name to \SpecialChar LaTeX
3900  package.
3901 \end_layout
3902
3903 \begin_layout Standard
3904 \align center
3905 \begin_inset Tabular
3906 <lyxtabular version="3" rows="7" columns="2">
3907 <features tabularvalignment="middle">
3908 <column alignment="center" valignment="top" width="0pt">
3909 <column alignment="center" valignment="top" width="0pt">
3910 <row>
3911 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3912 \begin_inset Text
3913
3914 \begin_layout Plain Layout
3915
3916 \family roman
3917 \series medium
3918 \shape up
3919 \size normal
3920 \emph off
3921 \bar no
3922 \noun off
3923 \color none
3924 Button
3925 \end_layout
3926
3927 \end_inset
3928 </cell>
3929 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3930 \begin_inset Text
3931
3932 \begin_layout Plain Layout
3933
3934 \family roman
3935 \series medium
3936 \shape up
3937 \size normal
3938 \emph off
3939 \bar no
3940 \noun off
3941 \color none
3942 Packages Required
3943 \end_layout
3944
3945 \end_inset
3946 </cell>
3947 </row>
3948 <row>
3949 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3950 \begin_inset Text
3951
3952 \begin_layout Plain Layout
3953
3954 \family sans
3955 \series medium
3956 \shape up
3957 \size normal
3958 \emph off
3959 \bar no
3960 \noun off
3961 \color none
3962 Standard
3963 \end_layout
3964
3965 \end_inset
3966 </cell>
3967 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3968 \begin_inset Text
3969
3970 \begin_layout Plain Layout
3971
3972 \series medium
3973 \shape up
3974 \size normal
3975 \emph off
3976 \bar no
3977 \noun off
3978 \color none
3979 base \SpecialChar LaTeX
3980
3981 \end_layout
3982
3983 \end_inset
3984 </cell>
3985 </row>
3986 <row>
3987 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3988 \begin_inset Text
3989
3990 \begin_layout Plain Layout
3991
3992 \family sans
3993 \series medium
3994 \shape up
3995 \size normal
3996 \emph off
3997 \bar no
3998 \noun off
3999 \color none
4000 Maths
4001 \end_layout
4002
4003 \end_inset
4004 </cell>
4005 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4006 \begin_inset Text
4007
4008 \begin_layout Plain Layout
4009
4010 \family typewriter
4011 \series medium
4012 \shape up
4013 \size normal
4014 \emph off
4015 \bar no
4016 \noun off
4017 \color none
4018 amssymb.sty
4019 \end_layout
4020
4021 \end_inset
4022 </cell>
4023 </row>
4024 <row>
4025 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4026 \begin_inset Text
4027
4028 \begin_layout Plain Layout
4029
4030 \family sans
4031 \series medium
4032 \shape up
4033 \size normal
4034 \emph off
4035 \bar no
4036 \noun off
4037 \color none
4038 Ding1
4039 \end_layout
4040
4041 \end_inset
4042 </cell>
4043 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4044 \begin_inset Text
4045
4046 \begin_layout Plain Layout
4047
4048 \family typewriter
4049 \series medium
4050 \shape up
4051 \size normal
4052 \emph off
4053 \bar no
4054 \noun off
4055 \color none
4056 pifont.sty
4057 \end_layout
4058
4059 \end_inset
4060 </cell>
4061 </row>
4062 <row>
4063 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4064 \begin_inset Text
4065
4066 \begin_layout Plain Layout
4067
4068 \family sans
4069 \series medium
4070 \shape up
4071 \size normal
4072 \emph off
4073 \bar no
4074 \noun off
4075 \color none
4076 Ding2
4077 \end_layout
4078
4079 \end_inset
4080 </cell>
4081 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4082 \begin_inset Text
4083
4084 \begin_layout Plain Layout
4085
4086 \family typewriter
4087 \series medium
4088 \shape up
4089 \size normal
4090 \emph off
4091 \bar no
4092 \noun off
4093 \color none
4094 pifont.sty
4095 \end_layout
4096
4097 \end_inset
4098 </cell>
4099 </row>
4100 <row>
4101 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4102 \begin_inset Text
4103
4104 \begin_layout Plain Layout
4105
4106 \family sans
4107 \series medium
4108 \shape up
4109 \size normal
4110 \emph off
4111 \bar no
4112 \noun off
4113 \color none
4114 Ding3
4115 \end_layout
4116
4117 \end_inset
4118 </cell>
4119 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4120 \begin_inset Text
4121
4122 \begin_layout Plain Layout
4123
4124 \family typewriter
4125 \series medium
4126 \shape up
4127 \size normal
4128 \emph off
4129 \bar no
4130 \noun off
4131 \color none
4132 pifont.sty
4133 \end_layout
4134
4135 \end_inset
4136 </cell>
4137 </row>
4138 <row>
4139 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4140 \begin_inset Text
4141
4142 \begin_layout Plain Layout
4143
4144 \family sans
4145 \series medium
4146 \shape up
4147 \size normal
4148 \emph off
4149 \bar no
4150 \noun off
4151 \color none
4152 Ding4
4153 \end_layout
4154
4155 \end_inset
4156 </cell>
4157 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4158 \begin_inset Text
4159
4160 \begin_layout Plain Layout
4161
4162 \family typewriter
4163 \series medium
4164 \shape up
4165 \size normal
4166 \emph off
4167 \bar no
4168 \noun off
4169 \color none
4170 pifont.sty
4171 \end_layout
4172
4173 \end_inset
4174 </cell>
4175 </row>
4176 </lyxtabular>
4177
4178 \end_inset
4179
4180
4181 \end_layout
4182
4183 \begin_layout Standard
4184 \SpecialChar LyX
4185  doesn't stop you using bullets from packages you don't have.
4186  If you get errors from \SpecialChar LaTeX
4187  when you try to view or print the file, then it
4188  is likely you are missing a package.
4189 \begin_inset Foot
4190 status collapsed
4191
4192 \begin_layout Plain Layout
4193 \SpecialChar LyX
4194  doesn't restrict your use since you may be editing locally and exporting
4195  elsewhere.
4196 \end_layout
4197
4198 \end_inset
4199
4200
4201 \end_layout
4202
4203 \begin_layout Subsection
4204 How to use it
4205 \end_layout
4206
4207 \begin_layout Standard
4208 Select which bullet depth you want to change then select the bullet shape
4209  and size.
4210  Any changes will not be visible in \SpecialChar LyX
4211 , but are visible when viewing the document.
4212 \end_layout
4213
4214 \begin_layout Standard
4215 You can reset a bullet shape to the default simply by clicking your right
4216  mouse button on the appropriate bullet depth button.
4217 \begin_inset Foot
4218 status collapsed
4219
4220 \begin_layout Plain Layout
4221 If you 
4222 \emph on
4223 really
4224 \emph default
4225  want to have multiple sets of paragraphs with different sets of bullets
4226  in each, then you're going to have to get your hands dirty with \SpecialChar TeX
4227  code.
4228  The bullet selection dialog can help though because it provides you with
4229  the \SpecialChar LaTeX
4230  code for a wide range of bullet shapes.
4231  To make your own custom paragraphs you have the following options:
4232 \end_layout
4233
4234 \begin_layout Plain Layout
4235 \begin_inset ERT
4236 status open
4237
4238 \begin_layout Plain Layout
4239
4240
4241 \backslash
4242 let
4243 \backslash
4244 savelabelitemi=
4245 \backslash
4246 labelitemi
4247 \end_layout
4248
4249 \end_inset
4250
4251
4252 \end_layout
4253
4254 \begin_layout Plain Layout
4255 \begin_inset ERT
4256 status open
4257
4258 \begin_layout Plain Layout
4259
4260
4261 \backslash
4262 renewcommand
4263 \backslash
4264 labelitemi[0]{
4265 \backslash
4266 small
4267 \backslash
4268 (
4269 \backslash
4270 sharp
4271 \backslash
4272 )}
4273 \end_layout
4274
4275 \end_inset
4276
4277
4278 \end_layout
4279
4280 \begin_layout Itemize
4281 Use the \SpecialChar LaTeX
4282  command 
4283 \begin_inset Flex Code
4284 status collapsed
4285
4286 \begin_layout Plain Layout
4287
4288 \backslash
4289 renewcommand{}{}
4290 \end_layout
4291
4292 \end_inset
4293
4294  to specify a new bullet shape for a given depth.
4295  You'll also need to save the current bullet shape so you can restore it
4296  again afterwards.
4297  In this itemized list the following \SpecialChar LaTeX
4298  code was used to change the bullet
4299  used for the first depth.
4300 \end_layout
4301
4302 \begin_deeper
4303 \begin_layout LyX-Code
4304
4305 \backslash
4306 let
4307 \backslash
4308 savelabelitemi=
4309 \backslash
4310 labelitemi 
4311 \end_layout
4312
4313 \begin_layout LyX-Code
4314
4315 \backslash
4316 renewcommand
4317 \backslash
4318 labelitemi[0]{
4319 \backslash
4320 small
4321 \backslash
4322 (
4323 \backslash
4324 sharp
4325 \backslash
4326 )}
4327 \end_layout
4328
4329 \end_deeper
4330 \begin_layout Itemize
4331 Note that the itemize depth is specified in Roman numerals as part of the
4332  
4333 \family typewriter
4334
4335 \backslash
4336 labelitem
4337 \family default
4338  command.
4339 \end_layout
4340
4341 \begin_layout Itemize
4342 \begin_inset ERT
4343 status open
4344
4345 \begin_layout Plain Layout
4346
4347 [
4348 \backslash
4349 (
4350 \backslash
4351 star
4352 \backslash
4353 )]
4354 \end_layout
4355
4356 \end_inset
4357
4358  Specify each individual entry by starting each item with the bullet shape
4359  enclosed in square brackets and set as 
4360 \begin_inset Flex Noun
4361 status collapsed
4362
4363 \begin_layout Plain Layout
4364 \SpecialChar TeX
4365  Code
4366 \end_layout
4367
4368 \end_inset
4369
4370 .
4371  For example, this item was started with 
4372 \begin_inset Flex Code
4373 status collapsed
4374
4375 \begin_layout Plain Layout
4376 [
4377 \backslash
4378 (
4379 \backslash
4380 star
4381 \backslash
4382 )]
4383 \end_layout
4384
4385 \end_inset
4386
4387 .
4388 \end_layout
4389
4390 \begin_layout Plain Layout
4391 \begin_inset ERT
4392 status open
4393
4394 \begin_layout Plain Layout
4395
4396
4397 \backslash
4398 renewcommand
4399 \backslash
4400 labelitemi[0]{
4401 \backslash
4402 savelabelitemi}
4403 \end_layout
4404
4405 \end_inset
4406
4407
4408 \end_layout
4409
4410 \begin_layout Plain Layout
4411 You'll also need to revert the labelitem back to its previous setting for
4412  the global bullet shape settings to remain in effect.
4413  The way used here was:
4414 \end_layout
4415
4416 \begin_layout LyX-Code
4417
4418 \backslash
4419 renewcommand
4420 \backslash
4421 labelitemi[0]{
4422 \backslash
4423 savelabelitemi}
4424 \end_layout
4425
4426 \end_inset
4427
4428
4429 \end_layout
4430
4431 \begin_layout Chapter
4432 \SpecialChar LyX
4433  and the World Wide Web
4434 \end_layout
4435
4436 \begin_layout Standard
4437 \SpecialChar LyX
4438  has long supported the export of documents to various web-friendly formats,
4439  such as HTML.
4440  Before verson 2.0, however, HTML export was always accomplished by the use
4441  of external converters.
4442 \begin_inset Foot
4443 status collapsed
4444
4445 \begin_layout Plain Layout
4446 For details on the use of external converters with \SpecialChar LyX
4447 , see the 
4448 \emph on
4449 Converters
4450 \emph default
4451  section of the Customization manual.
4452 \end_layout
4453
4454 \end_inset
4455
4456  These fall into two large groups: there are converters that use \SpecialChar LaTeX
4457  as an
4458  intermediate format, such as 
4459 \begin_inset Flex Code
4460 status collapsed
4461
4462 \begin_layout Plain Layout
4463 htlatex
4464 \end_layout
4465
4466 \end_inset
4467
4468
4469 \begin_inset Flex Code
4470 status collapsed
4471
4472 \begin_layout Plain Layout
4473 html2latex
4474 \end_layout
4475
4476 \end_inset
4477
4478 , and 
4479 \begin_inset Flex Code
4480 status collapsed
4481
4482 \begin_layout Plain Layout
4483 plastex
4484 \end_layout
4485
4486 \end_inset
4487
4488 , relying upon \SpecialChar LyX
4489  to produce the \SpecialChar LaTeX
4490 ; and there is a converter that works directly
4491  on \SpecialChar LyX
4492  files, 
4493 \begin_inset Flex Code
4494 status collapsed
4495
4496 \begin_layout Plain Layout
4497 e\SpecialChar LyX
4498 er
4499 \end_layout
4500
4501 \end_inset
4502
4503 .
4504  All of these have different advantages and disadvantages.
4505  
4506 \end_layout
4507
4508 \begin_layout Standard
4509 The \SpecialChar LaTeX
4510 -based converters have the advantage that, in principle, they know everythin
4511 g about the exported document that \SpecialChar LaTeX
4512  does.
4513  Such converters do not care, for example, if a certain block of code was
4514  produced by \SpecialChar LyX
4515  or was Evil Red Text.
4516  These converters know about 
4517 \begin_inset Flex Code
4518 status collapsed
4519
4520 \begin_layout Plain Layout
4521 aux
4522 \end_layout
4523
4524 \end_inset
4525
4526  files, counters, and references, and can often make use of the 
4527 \begin_inset Flex Code
4528 status collapsed
4529
4530 \begin_layout Plain Layout
4531 bbl
4532 \end_layout
4533
4534 \end_inset
4535
4536  files generated by Bib\SpecialChar TeX
4537 .
4538  On the other hand, \SpecialChar LaTeX
4539  is a very hard language to parse—it is sometimes said
4540  that only \SpecialChar TeX
4541  itself understands \SpecialChar TeX
4542 —and \SpecialChar LaTeX
4543 -based converters will often choke on
4544  what seem to be quite simple constructs; complex ones can throw them completely
4545 , and as of this writing, for example, the 
4546 \emph on
4547 Embedded Objects
4548 \emph default
4549  manual will not export with 
4550 \begin_inset Flex Code
4551 status collapsed
4552
4553 \begin_layout Plain Layout
4554 htlatex
4555 \end_layout
4556
4557 \end_inset
4558
4559 , though the others will.
4560  The other issue concerns how math is handled.
4561  These converters typically convert the formulae into little pictures that
4562  are then linked from the HTML document.
4563  Since these are actually generated by \SpecialChar LaTeX
4564 , they are accurate.
4565  But they do not scale well, and just getting them to look as if they are
4566  actually meant to be in your document—so that the font sizes seem to be
4567  roughly the same—can be a challenge.
4568 \end_layout
4569
4570 \begin_layout Standard
4571 Alex Fernandez's 
4572 \begin_inset Flex Code
4573 status collapsed
4574
4575 \begin_layout Plain Layout
4576 e\SpecialChar LyX
4577 er
4578 \end_layout
4579
4580 \end_inset
4581
4582  (
4583 \begin_inset CommandInset href
4584 LatexCommand href
4585 name "http://elyxer.nongnu.org/"
4586 target "http://elyxer.nongnu.org/"
4587
4588 \end_inset
4589
4590 ) solves some of these problems.
4591  In particular, the formulae it produces scale perfectly, since it renders
4592  math using a combination of HTML and CSS rather than converting the formulae
4593  to images.
4594  But even moderately complex formula are rendered less well than with 
4595 \begin_inset Flex Code
4596 status collapsed
4597
4598 \begin_layout Plain Layout
4599 htlatex
4600 \end_layout
4601
4602 \end_inset
4603
4604 ; this reflects the limitations of HTML.
4605 \begin_inset Foot
4606 status collapsed
4607
4608 \begin_layout Plain Layout
4609 That said, 
4610 \begin_inset Flex Code
4611 status collapsed
4612
4613 \begin_layout Plain Layout
4614 e\SpecialChar LyX
4615 er
4616 \end_layout
4617
4618 \end_inset
4619
4620  can also use jsMath and MathJax for equations, but this setting is only
4621  available globally and requires one to have access to a server that runs
4622  the backend.
4623 \end_layout
4624
4625 \end_inset
4626
4627  More importantly (as of version 1.1.1, at least), 
4628 \begin_inset Flex Code
4629 status collapsed
4630
4631 \begin_layout Plain Layout
4632 e\SpecialChar LyX
4633 er
4634 \end_layout
4635
4636 \end_inset
4637
4638  has limited support for math macros and no support for user-defined paragraph
4639  or character styles.
4640  These limitations make 
4641 \begin_inset Flex Code
4642 status collapsed
4643
4644 \begin_layout Plain Layout
4645 e\SpecialChar LyX
4646 er
4647 \end_layout
4648
4649 \end_inset
4650
4651  unsuitable for many of the documents \SpecialChar LyX
4652  users produce.
4653  In principle, of course, these problems could be solved, but the \SpecialChar LyX
4654  developers
4655  have decided to follow a different path and have made \SpecialChar LyX
4656  itself capable of
4657  writing XHTML, just as it is capable of writing \SpecialChar LaTeX
4658 , DocBook, and plaintext.
4659 \end_layout
4660
4661 \begin_layout Standard
4662 As of this writing, XHTML output remains under development and should probably
4663  be regarded as 
4664 \begin_inset Quotes eld
4665 \end_inset
4666
4667 experimental
4668 \begin_inset Quotes erd
4669 \end_inset
4670
4671 .
4672 \begin_inset Foot
4673 status collapsed
4674
4675 \begin_layout Plain Layout
4676 The file 
4677 \begin_inset Flex Code
4678 status collapsed
4679
4680 \begin_layout Plain Layout
4681 development/HTML.notes
4682 \end_layout
4683
4684 \end_inset
4685
4686 , which can be found in the \SpecialChar LyX
4687  source tree or 
4688 \begin_inset CommandInset href
4689 LatexCommand href
4690 name "accessed online"
4691 target "http://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
4692
4693 \end_inset
4694
4695 , usually contains up-to-date information about the state of XHTML output.
4696  See also the list of XHTML bugs on 
4697 \begin_inset CommandInset href
4698 LatexCommand href
4699 name "the bug tracker"
4700 target "http://www.lyx.org/trac/query?status=reopened&status=assigned&status=new&max=0&component=xhtml+export&order=id&col=id&col=summary&col=reporter&col=keywords&keywords=%21%7Efixedintrunk&desc=1"
4701
4702 \end_inset
4703
4704 .
4705 \end_layout
4706
4707 \end_inset
4708
4709  Still, the developers have chosen this approach because it has several
4710  potential advantages over the other two.
4711 \end_layout
4712
4713 \begin_layout Standard
4714 These advantages are primarily due to the fact that the XHTML output routines,
4715  since they are part of \SpecialChar LyX
4716 , know everything \SpecialChar LyX
4717  knows about the document being
4718  exported.
4719 \begin_inset Foot
4720 status collapsed
4721
4722 \begin_layout Plain Layout
4723 Another advantage is that, since these routines are internal to \SpecialChar LyX
4724 , they are
4725  immune to changes in \SpecialChar LyX
4726 's file format, or to changes in the semantics of
4727  existing insets.
4728 \end_layout
4729
4730 \end_inset
4731
4732  So they know about the table of contents (as displayed in the outline),
4733  about the counters associated with different paragraph styles, and about
4734  user-defined styles.
4735  The XHTML output routines know what \SpecialChar LyX
4736  knows about internationalization,
4737  too, so they will output 
4738 \begin_inset Quotes eld
4739 \end_inset
4740
4741 Chapter 1
4742 \begin_inset Quotes erd
4743 \end_inset
4744
4745  or 
4746 \begin_inset Quotes eld
4747 \end_inset
4748
4749
4750 \lang ngerman
4751 Kapitel
4752 \lang english
4753  1
4754 \begin_inset Quotes erd
4755 \end_inset
4756
4757 , depending upon the language in effect at the time.
4758  
4759 \end_layout
4760
4761 \begin_layout Standard
4762 Quite generally, the output routines know what \SpecialChar LyX
4763  knows about document layout,
4764  that is, about how the document is to be rendered on screen.
4765  We use this information when we output the document as XHTML.
4766  In particular, \SpecialChar LyX
4767  
4768 \emph on
4769 automatically
4770 \emph default
4771  generates CSS style information corresponding to the layout information
4772  it uses to render the document on screen: if section headings are supposed
4773  to be sans-serif and bold as seen in \SpecialChar LyX
4774 , then (by default) they will be sans-seri
4775 f and bold when viewed in a web browser, too.
4776  And this is true not just for pre-defined styles, like Section, but for
4777  any style, including user-defined styles.
4778  Indeed, the XHTML output routines make no distinction between user-defined
4779  paragraph and character styles and \SpecialChar LyX
4780 's own pre-defined styles: in each case,
4781  everything \SpecialChar LyX
4782  knows about the styles is contained in the layout files.
4783  And much the same is true as regards pre-defined textual insets, such as
4784  footnotes, and various custom insets.
4785  
4786 \end_layout
4787
4788 \begin_layout Standard
4789 The result is that XHTML output can be customized and extended in exactly
4790  the same way \SpecialChar LaTeX
4791  output can be customized and extended: through layout files
4792  and modules.
4793  See chapter five of the 
4794 \emph on
4795 Customization 
4796 \emph default
4797 manual for the details.
4798 \end_layout
4799
4800 \begin_layout Standard
4801 The remainder of this chapter contains more detailed information on XHTML
4802  output, its limitations, and ways to work around those limitations.
4803 \end_layout
4804
4805 \begin_layout Section
4806 Math Output in XHTML
4807 \end_layout
4808
4809 \begin_layout Standard
4810 \SpecialChar LyX
4811  offers four choices for how math is rendered.
4812  These have various advantages and disadvantages:
4813 \end_layout
4814
4815 \begin_layout Itemize
4816 MathML
4817 \begin_inset Newline newline
4818 \end_inset
4819
4820 MathML is a dialect of XML designed specifically for mathematics on the
4821  web, and it typically renders very well in browsers that support it.
4822  The disadvantage is that not all browsers support MathML, and support is
4823  not complete even in the Gecko-based browsers, such as Firefox.
4824 \begin_inset Newline newline
4825 \end_inset
4826
4827 If \SpecialChar LyX
4828  is unable to render a formula as MathML—for example, if the formula
4829  uses the 
4830 \begin_inset Flex Code
4831 status collapsed
4832
4833 \begin_layout Plain Layout
4834 xymatrix
4835 \end_layout
4836
4837 \end_inset
4838
4839  package or ERT—then it will instead output the formula as an image.
4840  
4841 \end_layout
4842
4843 \begin_layout Itemize
4844 HTML
4845 \begin_inset Newline newline
4846 \end_inset
4847
4848 As mentioned above, 
4849 \begin_inset Flex Code
4850 status collapsed
4851
4852 \begin_layout Plain Layout
4853 elyxer
4854 \end_layout
4855
4856 \end_inset
4857
4858  outputs math as HTML, styled by CSS.
4859 \begin_inset Foot
4860 status collapsed
4861
4862 \begin_layout Plain Layout
4863 \SpecialChar LyX
4864  has borrowed some of the CSS for its HTML output from 
4865 \begin_inset Flex Code
4866 status collapsed
4867
4868 \begin_layout Plain Layout
4869 elyxer
4870 \end_layout
4871
4872 \end_inset
4873
4874 .
4875 \end_layout
4876
4877 \end_inset
4878
4879  For simple formulae, this can work quite well, though with more complicated
4880  formulae it tends to break down.
4881  Still, this method has the advantage that it is very widely supported and
4882  so it may be appropriate for documents that contain only a little, fairly
4883  simple math.
4884 \begin_inset Newline newline
4885 \end_inset
4886
4887 If Lyx is unable to render a formula as HTML—for example, if the formula
4888  uses the 
4889 \begin_inset Flex Code
4890 status collapsed
4891
4892 \begin_layout Plain Layout
4893 xymatrix
4894 \end_layout
4895
4896 \end_inset
4897
4898  package or ERT—then it will instead output the formula as an image.
4899  
4900 \end_layout
4901
4902 \begin_layout Itemize
4903 Images
4904 \begin_inset Newline newline
4905 \end_inset
4906
4907 Like 
4908 \begin_inset Flex Code
4909 status collapsed
4910
4911 \begin_layout Plain Layout
4912 htlatex
4913 \end_layout
4914
4915 \end_inset
4916
4917 , \SpecialChar LyX
4918  will output formulae as images, the very same images, in fact, that are
4919  used for instant preview.
4920 \begin_inset Foot
4921 status collapsed
4922
4923 \begin_layout Plain Layout
4924 Instant preview does 
4925 \emph on
4926 not 
4927 \emph default
4928 have to be on for images to be output, however.
4929 \end_layout
4930
4931 \end_inset
4932
4933  The advantage to this method is that the images are simply generated by
4934  \SpecialChar LaTeX
4935 , so they are very accurate.
4936  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4937  so they do not scale terribly well, and one cannot copy them, etc.
4938  (As of this writing, there are also problems about equation numbering.
4939  See 
4940 \begin_inset CommandInset href
4941 LatexCommand href
4942 name "bug 6894"
4943 target "http://www.lyx.org/trac/ticket/6894"
4944
4945 \end_inset
4946
4947 .)
4948 \begin_inset Newline newline
4949 \end_inset
4950
4951 The size of the images can be controlled by setting the 
4952 \begin_inset Quotes eld
4953 \end_inset
4954
4955 Math Images Scaling
4956 \begin_inset Quotes erd
4957 \end_inset
4958
4959  parameter under 
4960 \begin_inset Flex Noun
4961 status collapsed
4962
4963 \begin_layout Plain Layout
4964 Document\SpecialChar menuseparator
4965 Settings\SpecialChar menuseparator
4966 Output
4967 \end_layout
4968
4969 \end_inset
4970
4971 .
4972 \begin_inset Foot
4973 status collapsed
4974
4975 \begin_layout Plain Layout
4976 For those who want to know, this controls the resolution of the image in
4977  dots per inch and is based upon a default of 75 dpi.
4978 \end_layout
4979
4980 \end_inset
4981
4982
4983 \begin_inset Newline newline
4984 \end_inset
4985
4986 If \SpecialChar LyX
4987  for some reason fails to create an image for a formula (e.g., if a required
4988  \SpecialChar LaTeX
4989  package is not installed), then it will fall back to outputing the raw
4990  \SpecialChar LaTeX
4991 .
4992 \end_layout
4993
4994 \begin_layout Itemize
4995 \SpecialChar LaTeX
4996
4997 \begin_inset Newline newline
4998 \end_inset
4999
5000 Finally, \SpecialChar LyX
5001  will happily output math as \SpecialChar LaTeX
5002 .
5003  As well as being the output of last resort, this method can be used with
5004  such tools as 
5005 \begin_inset CommandInset href
5006 LatexCommand href
5007 name "jsMath"
5008 target "http://www.math.union.edu/~dpvc/jsMath/"
5009
5010 \end_inset
5011
5012 , which uses JavaScript to render \SpecialChar LaTeX
5013  embedded in HTML documents.
5014  \SpecialChar LyX
5015  wraps the \SpecialChar LaTeX
5016  in either a 
5017 \begin_inset Flex Code
5018 status collapsed
5019
5020 \begin_layout Plain Layout
5021 span
5022 \end_layout
5023
5024 \end_inset
5025
5026  (for inline formulas) or 
5027 \begin_inset Flex Code
5028 status collapsed
5029
5030 \begin_layout Plain Layout
5031 div
5032 \end_layout
5033
5034 \end_inset
5035
5036  (for displayed formulas) with 
5037 \begin_inset Flex Code
5038 status collapsed
5039
5040 \begin_layout Plain Layout
5041 class='math'
5042 \end_layout
5043
5044 \end_inset
5045
5046 , as is required for jsMath.
5047 \end_layout
5048
5049 \begin_layout Standard
5050 One of these output methods must be selected under 
5051 \begin_inset Flex Noun
5052 status collapsed
5053
5054 \begin_layout Plain Layout
5055 Document\SpecialChar menuseparator
5056 Settings\SpecialChar menuseparator
5057 Output
5058 \end_layout
5059
5060 \end_inset
5061
5062 .
5063  By default, \SpecialChar LyX
5064  outputs MathML.
5065  This is a document-wide setting, therefore.
5066 \end_layout
5067
5068 \begin_layout Standard
5069 Eventually, \SpecialChar LyX
5070  will offer the user the option to select an alternate output
5071  method for a particular inset, say, one that isn't being rendered very
5072  well by MathML.
5073 \begin_inset Foot
5074 status collapsed
5075
5076 \begin_layout Plain Layout
5077 That said, since \SpecialChar LyX
5078  falls back to images if the inset contains ERT, then one
5079  can force output as an image by putting some harmless ERT into the math,
5080  for example: 
5081 \begin_inset Formula $a=b\relax$
5082 \end_inset
5083
5084 .
5085 \end_layout
5086
5087 \end_inset
5088
5089
5090 \end_layout
5091
5092 \begin_layout Section
5093 Bibliography and Citations
5094 \end_layout
5095
5096 \begin_layout Standard
5097 XHTML output fully supports bibliographies and citations.
5098  
5099 \end_layout
5100
5101 \begin_layout Standard
5102 Citation labels are generated by the same machinery that generates \SpecialChar LyX
5103 's on-screen
5104  labels, so the labels will look in the output much as they do in \SpecialChar LyX
5105 , though
5106  better.
5107  If you are using numerical citations, then \SpecialChar LyX
5108  will output numerical labels,
5109  such as [1] or [17], rather than simply showing the citation key in square
5110  brackets, as it does on-screen.
5111  If you are using author-year citations, then \SpecialChar LyX
5112  will add lowercase letters
5113  to the years, just as Bib\SpecialChar TeX
5114  does, if it finds more than one citation for
5115  a given author-year combination.
5116  The labels will be printed with the bibliography entries.
5117  Note that there is, at present, no way to customize the appearance of the
5118  labels, for example, to choose between square brackets and parentheses.
5119 \end_layout
5120
5121 \begin_layout Standard
5122 Bibliography output is handled by the same machinery that handles the presentati
5123 on of reference information in the citation dialog, so you will see in the
5124  XHTML output pretty much what you would see if you were to look at a given
5125  entry in the citation dialog.
5126  The formatting can be customized in your layout file or, preferably, in
5127  a module.
5128  See the 
5129 \emph on
5130 Customization
5131 \emph default
5132  manual for the details.
5133 \end_layout
5134
5135 \begin_layout Standard
5136 The main defect at present is that cross-referenced information is printed
5137  with every entry with which it is associated.
5138  So you can see things like this:
5139 \end_layout
5140
5141 \begin_layout Quote
5142 Jason Stanley, 
5143 \begin_inset Quotes eld
5144 \end_inset
5145
5146 Context and Logical Form
5147 \begin_inset Quotes erd
5148 \end_inset
5149
5150 , in 
5151 \emph on
5152 Language in Context: Selected Essays
5153 \emph default
5154  (Oxford: Oxford University Press, 2007), pp.
5155  30–68.
5156 \end_layout
5157
5158 \begin_layout Quote
5159 Jason Stanley, 
5160 \begin_inset Quotes eld
5161 \end_inset
5162
5163 Semantics in Context
5164 \begin_inset Quotes erd
5165 \end_inset
5166
5167 , in 
5168 \emph on
5169 Language in Context: Selected Essays
5170 \emph default
5171  (Oxford: Oxford University Press, 2007), pp.
5172  201–30.
5173 \end_layout
5174
5175 \begin_layout Standard
5176 This should be fixed before long.
5177 \end_layout
5178
5179 \begin_layout Standard
5180 There is no support at present for sectioned bibliographies.
5181  If you have multiple bibliographies, then \SpecialChar LyX
5182  will print the same bibliography
5183  over and over.
5184 \end_layout
5185
5186 \begin_layout Section
5187 Indexes
5188 \end_layout
5189
5190 \begin_layout Standard
5191 \SpecialChar LyX
5192  will happily export indexes as XHTML, but with certain limitations at the
5193  moment.
5194 \end_layout
5195
5196 \begin_layout Standard
5197 Index export will be most reliable when you do not attempt to use the fancy
5198  constructs that are described in the section on indexes in the 
5199 \emph on
5200 User's Guide
5201 \emph default
5202 .
5203 \begin_inset Foot
5204 status collapsed
5205
5206 \begin_layout Plain Layout
5207 The main issue here is that \SpecialChar LyX
5208  itself does not really handle these.
5209  It just lets you enter what you would have to enter in raw \SpecialChar LaTeX
5210 .
5211 \end_layout
5212
5213 \end_inset
5214
5215  We'll describe how they are handled using the subsection headings from
5216  that section.
5217 \end_layout
5218
5219 \begin_layout Itemize
5220 Grouping Index Entries (aka, sub-entries): \SpecialChar LyX
5221  makes an effort to support these,
5222  but the entries must be separated by 
5223 \begin_inset Quotes eld
5224 \end_inset
5225
5226  ! 
5227 \begin_inset Quotes erd
5228 \end_inset
5229
5230 , that is, there must be spaces around the exclamation point.
5231  This is because it is otherwise too difficult to check for escaped exclamation
5232  points, ones in math, and so forth.
5233 \end_layout
5234
5235 \begin_layout Itemize
5236 Page Ranges: There is no support at all for page ranges, since these make
5237  no sense with XHMTL.
5238  Instead, you will just get two index entries, one at either end.
5239 \end_layout
5240
5241 \begin_layout Itemize
5242 Cross-referencing: There is no support for cross-referencing.
5243  If \SpecialChar LyX
5244  finds an entry containing the 
5245 \begin_inset Quotes eld
5246 \end_inset
5247
5248 |see\SpecialChar ldots
5249
5250 \begin_inset Quotes erd
5251 \end_inset
5252
5253  construct, it is just dropped, and the rest is treated as an ordinary index
5254  entry.
5255 \end_layout
5256
5257 \begin_layout Itemize
5258 Index Entry Order: \SpecialChar LyX
5259  does support attempts to fix the sorting order.
5260  It will take what is before the first `@' it finds and use that for sorting,
5261  taking what follows the first `@' to be the actual entry.
5262  At present, \SpecialChar LyX
5263  does not check for escaped `@', so do not try to index email
5264  addresses.
5265 \end_layout
5266
5267 \begin_layout Itemize
5268 Index Entry Layout: You can format entries by using the text style dialog,
5269  or by using any other method available within \SpecialChar LyX
5270  itself.
5271  There is no support for constructs like: 
5272 \begin_inset Quotes eld
5273 \end_inset
5274
5275 entry|textbf
5276 \begin_inset Quotes erd
5277 \end_inset
5278
5279 .
5280  Indeed, if \SpecialChar LyX
5281  finds a pipe symbol, `|', in an entry, it will delete it and
5282  everything that follows it.
5283 \end_layout
5284
5285 \begin_layout Itemize
5286 Multiple Indexes: There is no support for multiple indexes.
5287  Rather, all index entries will be printed as one large index.
5288  To avoid our printing several versions of the index, we print only the
5289  main index, so make sure you have one.
5290 \end_layout
5291
5292 \begin_layout Section
5293 Nomenclature and Glossary
5294 \end_layout
5295
5296 \begin_layout Standard
5297 There is at present no support for glossaries.
5298  Adding it would be fairly trivial, and welcome.
5299 \end_layout
5300
5301 \begin_layout Chapter
5302 The \SpecialChar LyX
5303  Server
5304 \end_layout
5305
5306 \begin_layout Section
5307 Introduction
5308 \end_layout
5309
5310 \begin_layout Standard
5311 The `\SpecialChar LyX
5312  server' allows other programs to talk to \SpecialChar LyX
5313 , invoke \SpecialChar LyX
5314  commands, and retrieve
5315  information about the \SpecialChar LyX
5316  internal state.
5317  This is only intended for advanced users, but they should find it useful.
5318  It is by writing to the \SpecialChar LyX
5319  server, for example, that bibliography managers,
5320  such as JabRef, are able to 
5321 \begin_inset Quotes eld
5322 \end_inset
5323
5324 push
5325 \begin_inset Quotes erd
5326 \end_inset
5327
5328  citations to \SpecialChar LyX
5329 .
5330 \end_layout
5331
5332 \begin_layout Section
5333 Starting the \SpecialChar LyX
5334  Server
5335 \end_layout
5336
5337 \begin_layout Standard
5338 The \SpecialChar LyX
5339  server works through the use of a pair of named pipes.
5340  These are usually located in 
5341 \begin_inset Flex Code
5342 status collapsed
5343
5344 \begin_layout Plain Layout
5345 UserDir
5346 \end_layout
5347
5348 \end_inset
5349
5350 , (except on Windows, where 
5351 \emph on
5352 local
5353 \emph default
5354  named pipes are special objects located in 
5355 \begin_inset Flex Code
5356 status collapsed
5357
5358 \begin_layout Plain Layout
5359
5360 \backslash
5361
5362 \backslash
5363 .
5364 \backslash
5365 pipe
5366 \end_layout
5367
5368 \end_inset
5369
5370 ) and have the names 
5371 \begin_inset Quotes eld
5372 \end_inset
5373
5374
5375 \begin_inset Flex Code
5376 status collapsed
5377
5378 \begin_layout Plain Layout
5379 lyxpipe.in
5380 \end_layout
5381
5382 \end_inset
5383
5384
5385 \begin_inset Quotes erd
5386 \end_inset
5387
5388  and 
5389 \begin_inset Quotes eld
5390 \end_inset
5391
5392
5393 \begin_inset Flex Code
5394 status collapsed
5395
5396 \begin_layout Plain Layout
5397 lyxpipe.out
5398 \end_layout
5399
5400 \end_inset
5401
5402
5403 \begin_inset Quotes erd
5404 \end_inset
5405
5406 .
5407  External programs write into 
5408 \begin_inset Flex Code
5409 status collapsed
5410
5411 \begin_layout Plain Layout
5412 lyxpipe.in
5413 \end_layout
5414
5415 \end_inset
5416
5417  and read back data from 
5418 \begin_inset Flex Code
5419 status collapsed
5420
5421 \begin_layout Plain Layout
5422 lyxpipe.out
5423 \end_layout
5424
5425 \end_inset
5426
5427 .
5428  The stem of the pipe names can be defined in the 
5429 \begin_inset Flex Noun
5430 status collapsed
5431
5432 \begin_layout Plain Layout
5433 Tools\SpecialChar menuseparator
5434 Preferences
5435 \end_layout
5436
5437 \end_inset
5438
5439  dialog, for example 
5440 \begin_inset Flex Code
5441 status collapsed
5442
5443 \begin_layout Plain Layout
5444 "/home/myhome/lyxpipe"
5445 \end_layout
5446
5447 \end_inset
5448
5449 , or 
5450 \begin_inset Flex Code
5451 status collapsed
5452
5453 \begin_layout Plain Layout
5454 "
5455 \backslash
5456
5457 \backslash
5458 .
5459 \backslash
5460 pipe
5461 \backslash
5462 lyxpipe"
5463 \end_layout
5464
5465 \end_inset
5466
5467  on Windows (where any working path instead of lyxpipe can be used, for
5468  example 
5469 \begin_inset Flex Code
5470 status collapsed
5471
5472 \begin_layout Plain Layout
5473 "
5474 \backslash
5475
5476 \backslash
5477 .
5478 \backslash
5479 pipe
5480 \backslash
5481 my
5482 \backslash
5483 lyx
5484 \backslash
5485 pipe"
5486 \end_layout
5487
5488 \end_inset
5489
5490  would also work).
5491  You 
5492 \emph on
5493 must
5494 \emph default
5495  configure this manually in order for the server to start.
5496 \end_layout
5497
5498 \begin_layout Standard
5499 \SpecialChar LyX
5500  will add the '
5501 \begin_inset Flex Code
5502 status collapsed
5503
5504 \begin_layout Plain Layout
5505 .in
5506 \end_layout
5507
5508 \end_inset
5509
5510 ' and '
5511 \begin_inset Flex Code
5512 status collapsed
5513
5514 \begin_layout Plain Layout
5515 .out
5516 \end_layout
5517
5518 \end_inset
5519
5520 ' to create the pipes.
5521  If one of the pipes already exists, \SpecialChar LyX
5522  will assume that another \SpecialChar LyX
5523  process
5524  is already running and will not start the server.
5525  On POSIX (Unix like) systems, if for some other reason, an unused 
5526 \begin_inset Quotes eld
5527 \end_inset
5528
5529 stale
5530 \begin_inset Quotes erd
5531 \end_inset
5532
5533  pipe is left in existence when \SpecialChar LyX
5534  closes, then \SpecialChar LyX
5535  will try to delete it.
5536  If this fails for some reason, you will need to delete the pipes manually
5537  and then restart \SpecialChar LyX
5538 .
5539  On Windows, pipes are deleted by the OS on program termination or crash,
5540  so 
5541 \begin_inset Quotes eld
5542 \end_inset
5543
5544 stale
5545 \begin_inset Quotes erd
5546 \end_inset
5547
5548  pipes should not be possible.
5549 \end_layout
5550
5551 \begin_layout Standard
5552 To have several \SpecialChar LyX
5553  processes with servers at the same time, you have to use
5554  different configurations, perhaps by using separate user directories, each
5555  with its own 
5556 \begin_inset Flex Code
5557 status collapsed
5558
5559 \begin_layout Plain Layout
5560 preferences
5561 \end_layout
5562
5563 \end_inset
5564
5565  file, for each process.
5566 \end_layout
5567
5568 \begin_layout Standard
5569 If you are developing a client program, you might find it useful to enable
5570  debugging information from the \SpecialChar LyX
5571  server.
5572  Do this by starting \SpecialChar LyX
5573  as 
5574 \begin_inset Flex Code
5575 status collapsed
5576
5577 \begin_layout Plain Layout
5578 lyx -dbg lyxserver
5579 \end_layout
5580
5581 \end_inset
5582
5583 .
5584 \end_layout
5585
5586 \begin_layout Standard
5587 You can find a complete example client written in C++ in the source distribution
5588  as 
5589 \begin_inset Flex Code
5590 status collapsed
5591
5592 \begin_layout Plain Layout
5593 development/lyxserver/server_monitor.cpp
5594 \end_layout
5595
5596 \end_inset
5597
5598 .
5599 \end_layout
5600
5601 \begin_layout Standard
5602 Another useful tool is the command-line based client found in 
5603 \begin_inset Flex Code
5604 status collapsed
5605
5606 \begin_layout Plain Layout
5607 src/client/lyxclient
5608 \end_layout
5609
5610 \end_inset
5611
5612 .
5613 \end_layout
5614
5615 \begin_layout Section
5616 Normal communication
5617 \end_layout
5618
5619 \begin_layout Standard
5620 To issue a \SpecialChar LyX
5621  call, the client writes a line of ASCII text into the input
5622  pipe.
5623  This line has the following format:
5624 \end_layout
5625
5626 \begin_layout Quote
5627 LYXCMD:
5628 \emph on
5629 clientname
5630 \emph default
5631 :
5632 \emph on
5633 function
5634 \emph default
5635 :
5636 \emph on
5637 argument
5638 \end_layout
5639
5640 \begin_layout Description
5641 clientname is a name that the client can choose arbitrarily.
5642  Its only use is that \SpecialChar LyX
5643  will echo it if it sends an answer—so a client can
5644  dispatch results from different requesters.
5645 \end_layout
5646
5647 \begin_layout Description
5648 function is the function you want \SpecialChar LyX
5649  to perform.
5650  It is the same as the commands you'd use in the minibuffer.
5651 \end_layout
5652
5653 \begin_layout Description
5654 argument is an optional argument which is meaningful only to some functions
5655  (for instance, the 
5656 \begin_inset Quotes eld
5657 \end_inset
5658
5659 self-insert
5660 \begin_inset Quotes erd
5661 \end_inset
5662
5663  LFUN will insert the argument as text at the cursor position).
5664 \end_layout
5665
5666 \begin_layout Standard
5667 The answer from \SpecialChar LyX
5668  will arrive in the output pipe and be of the form
5669 \end_layout
5670
5671 \begin_layout Quote
5672 INFO:
5673 \emph on
5674 clientname
5675 \emph default
5676 :
5677 \emph on
5678 function
5679 \emph default
5680 :
5681 \emph on
5682 data
5683 \end_layout
5684
5685 \begin_layout Standard
5686 where 
5687 \emph on
5688 clientname
5689 \emph default
5690  and 
5691 \emph on
5692 function
5693 \emph default
5694  are just echoed from the command request, while 
5695 \emph on
5696 data
5697 \emph default
5698  is more or less useful information filled according to how the command
5699  execution worked out.
5700  Some commands, such as 
5701 \begin_inset Quotes eld
5702 \end_inset
5703
5704 font-state
5705 \begin_inset Quotes erd
5706 \end_inset
5707
5708 , will return information about the internal state of \SpecialChar LyX
5709 , while other will
5710  return an empty data-response.
5711  This means that the command execution went fine.
5712 \end_layout
5713
5714 \begin_layout Standard
5715 In case of errors, the response from \SpecialChar LyX
5716  will have this form
5717 \end_layout
5718
5719 \begin_layout Quote
5720 ERROR:
5721 \emph on
5722 clientname
5723 \emph default
5724 :
5725 \emph on
5726 function
5727 \emph default
5728 :
5729 \emph on
5730 error message
5731 \end_layout
5732
5733 \begin_layout Standard
5734 where the 
5735 \emph on
5736 error message
5737 \emph default
5738  should contain an explanation of why the command failed.
5739 \end_layout
5740
5741 \begin_layout Standard
5742 Examples:
5743 \end_layout
5744
5745 \begin_layout LyX-Code
5746 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5747 \begin_inset Newline newline
5748 \end_inset
5749
5750 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5751 \begin_inset Newline newline
5752 \end_inset
5753
5754 read a <~/.lyxpipe.out
5755 \begin_inset Newline newline
5756 \end_inset
5757
5758 echo $a
5759 \end_layout
5760
5761 \begin_layout Subsection
5762 AppleScript (Mac OS X)
5763 \end_layout
5764
5765 \begin_layout Standard
5766 Since \SpecialChar LyX
5767  2.1, \SpecialChar LyX
5768  supports basic interactions with AppleScript for normal communicatio
5769 n through the command run.
5770  This command takes a direct argument (the 
5771 \series bold
5772 function
5773 \series default
5774  to perform) and an optional argument.
5775  It either returns the output of the function or triggers an error with
5776  the error message and code.
5777 \end_layout
5778
5779 \begin_layout Standard
5780 Example:
5781 \end_layout
5782
5783 \begin_layout LyX-Code
5784 tell application "\SpecialChar LyX
5785 "
5786 \end_layout
5787
5788 \begin_layout LyX-Code
5789   try
5790 \end_layout
5791
5792 \begin_layout LyX-Code
5793     -- Stores the current file name into f
5794 \end_layout
5795
5796 \begin_layout LyX-Code
5797     set f to (run "server-get-filename" with argument "")
5798 \end_layout
5799
5800 \begin_layout LyX-Code
5801     on error the error_message number the error_number
5802 \end_layout
5803
5804 \begin_layout LyX-Code
5805       display dialog "Error: " & the error_number & ".
5806  " ¬
5807 \end_layout
5808
5809 \begin_layout LyX-Code
5810               & the error_message buttons {"OK"} default button 1
5811 \end_layout
5812
5813 \begin_layout LyX-Code
5814   end try
5815 \end_layout
5816
5817 \begin_layout LyX-Code
5818 end tell
5819 \end_layout
5820
5821 \begin_layout Section
5822 Notification
5823 \end_layout
5824
5825 \begin_layout Standard
5826 \SpecialChar LyX
5827  can notify clients of events going on asynchronously.
5828  Currently it will only do this if the user binds a key sequence with the
5829  function 
5830 \begin_inset Quotes eld
5831 \end_inset
5832
5833 notify
5834 \begin_inset Quotes erd
5835 \end_inset
5836
5837 .
5838  The format of the string \SpecialChar LyX
5839  sends is as follows:
5840 \end_layout
5841
5842 \begin_layout Quote
5843 \begin_inset Flex Code
5844 status collapsed
5845
5846 \begin_layout Plain Layout
5847 NOTIFY:
5848 \end_layout
5849
5850 \end_inset
5851
5852
5853 \emph on
5854 key-sequence
5855 \end_layout
5856
5857 \begin_layout Standard
5858 where 
5859 \emph on
5860 key-sequence
5861 \emph default
5862  is the printed representation of the key sequence that was actually typed
5863  by the user.
5864 \end_layout
5865
5866 \begin_layout Standard
5867 This mechanism can be used to extend \SpecialChar LyX
5868 's command set and implement macros.
5869  Bind some key sequence to 
5870 \begin_inset Quotes eld
5871 \end_inset
5872
5873 notify
5874 \begin_inset Quotes erd
5875 \end_inset
5876
5877 .
5878  Then start a client that listens on the output pipe, dispatches the command
5879  according to the sequence, and starts a function that may use \SpecialChar LyX
5880  calls and
5881  \SpecialChar LyX
5882  requests to issue a command or a series of commands to \SpecialChar LyX
5883 .
5884 \end_layout
5885
5886 \begin_layout Section
5887 The simple \SpecialChar LyX
5888  Server Protocol
5889 \end_layout
5890
5891 \begin_layout Standard
5892 \SpecialChar LyX
5893  implements a simple protocol that can be used for session management.
5894  All messages are of the form
5895 \end_layout
5896
5897 \begin_layout Quote
5898 LYXSRV:
5899 \emph on
5900 clientname
5901 \emph default
5902 :
5903 \emph on
5904 protocol message
5905 \end_layout
5906
5907 \begin_layout Standard
5908 where 
5909 \emph on
5910 protocol message
5911 \emph default
5912  can be 
5913 \begin_inset Quotes eld
5914 \end_inset
5915
5916 hello
5917 \begin_inset Quotes erd
5918 \end_inset
5919
5920  or 
5921 \begin_inset Quotes eld
5922 \end_inset
5923
5924 bye
5925 \begin_inset Quotes erd
5926 \end_inset
5927
5928 .
5929  If 
5930 \begin_inset Quotes eld
5931 \end_inset
5932
5933 hello
5934 \begin_inset Quotes erd
5935 \end_inset
5936
5937  is received from a client, \SpecialChar LyX
5938  will report back to inform the client that
5939  it's listening to it's messages, while 
5940 \begin_inset Quotes eld
5941 \end_inset
5942
5943 bye
5944 \begin_inset Quotes erd
5945 \end_inset
5946
5947  sent from \SpecialChar LyX
5948  will inform clients that \SpecialChar LyX
5949  is closing.
5950 \end_layout
5951
5952 \begin_layout Section
5953 Reverse DVI/PDF search
5954 \end_layout
5955
5956 \begin_layout Standard
5957 Some DVI/PDF viewers
5958 \begin_inset Foot
5959 status collapsed
5960
5961 \begin_layout Plain Layout
5962 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5963  Qpdfview on Unix, Skim on Mac OSX and SumatraPDF on Windows.
5964 \end_layout
5965
5966 \end_inset
5967
5968  provide 
5969 \emph on
5970 reverse search
5971 \emph default
5972  facility (also called 
5973 \emph on
5974 inverse search
5975 \emph default
5976 ).
5977  This means that you can tell \SpecialChar LyX
5978  to put the cursor to a specific line in the
5979  document by clicking at the respective position in the DVI/PDF output.
5980  To achieve this, the viewer must be able to communicate with \SpecialChar LyX
5981 .
5982  This is done via the \SpecialChar LyX
5983  server either by using the named pipe (
5984 \emph on
5985 lyxpipe
5986 \emph default
5987 ), or the UNIX domain socket (
5988 \emph on
5989 lyxsocket
5990 \emph default
5991 ) that \SpecialChar LyX
5992  creates in its temporary directory (this is the way the 
5993 \begin_inset Flex Code
5994 status collapsed
5995
5996 \begin_layout Plain Layout
5997 lyxclient
5998 \end_layout
5999
6000 \end_inset
6001
6002  program communicates with \SpecialChar LyX
6003 ).
6004  In some cases, you need a helper script that mediates between the viewer
6005  and \SpecialChar LyX
6006 , in others, the viewer can communicate with \SpecialChar LyX
6007  directly.
6008  This depends on the selected viewer and on your operating system.
6009  The same applies to the way viewers need to be configured and the way the
6010  reverse search is actually performed.
6011  In what follows, we will thus describe how to setup reverse search for
6012  specific viewers.
6013  Before we turn to this, though, we will explain what needs to be done generally
6014  to enable reverse search in the DVI/PDF output.
6015 \end_layout
6016
6017 \begin_layout Subsection
6018 Automatic setup
6019 \begin_inset CommandInset label
6020 LatexCommand label
6021 name "subsec:rev-search"
6022
6023 \end_inset
6024
6025
6026 \end_layout
6027
6028 \begin_layout Standard
6029 In most cases \SpecialChar LyX
6030  will do the work for you by enabling the option 
6031 \begin_inset Flex Noun
6032 status collapsed
6033
6034 \begin_layout Plain Layout
6035 Synchronize with Output
6036 \end_layout
6037
6038 \end_inset
6039
6040  in the menu 
6041 \begin_inset Flex Noun
6042 status collapsed
6043
6044 \begin_layout Plain Layout
6045 Document\SpecialChar menuseparator
6046 Settings\SpecialChar menuseparator
6047 Output
6048 \end_layout
6049
6050 \end_inset
6051
6052 .
6053  In such a case \SpecialChar LyX
6054  will automatically insert the necessary Sync\SpecialChar TeX
6055  macro (for
6056  PDF) or load the srcltx package (for DVI) respectively.
6057  This option can be easily reached also on 
6058 \begin_inset Flex Code
6059 status collapsed
6060
6061 \begin_layout Plain Layout
6062 View/Update
6063 \end_layout
6064
6065 \end_inset
6066
6067  Toolbar.
6068 \end_layout
6069
6070 \begin_layout Standard
6071 If you need a different setting, you can select or input a custom macro
6072  from the drop down box just below 
6073 \begin_inset Flex Noun
6074 status collapsed
6075
6076 \begin_layout Plain Layout
6077 Document\SpecialChar menuseparator
6078 Settings\SpecialChar menuseparator
6079 Output\SpecialChar menuseparator
6080 Synchronize with Output
6081 \end_layout
6082
6083 \end_inset
6084
6085 .
6086 \end_layout
6087
6088 \begin_layout Standard
6089 Note that the method 
6090 \begin_inset Flex Code
6091 status collapsed
6092
6093 \begin_layout Plain Layout
6094
6095 \backslash
6096 synctex=1
6097 \end_layout
6098
6099 \end_inset
6100
6101  enables gzip compression.
6102  If your viewer does not support it, you should instead use 
6103 \begin_inset Flex Code
6104 status collapsed
6105
6106 \begin_layout Plain Layout
6107
6108 \backslash
6109 synctex=-1
6110 \end_layout
6111
6112 \end_inset
6113
6114 .
6115 \end_layout
6116
6117 \begin_layout Standard
6118 Please also note that including the 
6119 \begin_inset Flex Code
6120 status collapsed
6121
6122 \begin_layout Plain Layout
6123 srcltx
6124 \end_layout
6125
6126 \end_inset
6127
6128  package or 
6129 \begin_inset Flex Code
6130 status collapsed
6131
6132 \begin_layout Plain Layout
6133 src-specials
6134 \end_layout
6135
6136 \end_inset
6137
6138  sometimes has an undesired impact on the typesetting.
6139  Thus, you should switch output synchronization off for the final typesetting
6140  if you use the 
6141 \begin_inset Flex Code
6142 status collapsed
6143
6144 \begin_layout Plain Layout
6145 srcltx
6146 \end_layout
6147
6148 \end_inset
6149
6150  package or 
6151 \begin_inset Flex Code
6152 status collapsed
6153
6154 \begin_layout Plain Layout
6155 src-specials
6156 \end_layout
6157
6158 \end_inset
6159
6160 .
6161  
6162 \end_layout
6163
6164 \begin_layout Standard
6165 In case you need some more special settings that are not covered by the
6166  automatic settings, read the next section about how to set up output synchroniz
6167 ation manually.
6168  If the automatic setup suits your needs, you can readily jump to section
6169 \begin_inset space ~
6170 \end_inset
6171
6172
6173 \begin_inset CommandInset ref
6174 LatexCommand ref
6175 reference "subsec:configuring-viewers"
6176
6177 \end_inset
6178
6179 , where the necessary configuration steps in your viewer – needed both with
6180  the automatic and the manual setup – are described.
6181 \end_layout
6182
6183 \begin_layout Subsection
6184 Manual setup
6185 \end_layout
6186
6187 \begin_layout Standard
6188 \SpecialChar LaTeX
6189  provides several different methods for reverse search.
6190  Some are built-in in the 
6191 \begin_inset Flex Code
6192 status collapsed
6193
6194 \begin_layout Plain Layout
6195 latex/pdflatex
6196 \end_layout
6197
6198 \end_inset
6199
6200  program, some are provided by external packages.
6201  Your choice depends on whether your \SpecialChar LaTeX
6202  distribution already provides a given
6203  method (the built-in methods are rather new) and whether your viewer can
6204  cope with it.
6205  The available methods are described in the following.
6206 \end_layout
6207
6208 \begin_layout Subsubsection*
6209 Built-in DVI-search via src-specials (DVI only) 
6210 \end_layout
6211
6212 \begin_layout Standard
6213 This method provides the DVI file with the necessary information for reverse
6214  search.
6215  It is available in \SpecialChar LaTeX
6216  since quite some time (any somewhat recent \SpecialChar LaTeX
6217  distribution
6218  should include it), and it works reliably.
6219  To enable it, change the 
6220 \begin_inset Flex Noun
6221 status collapsed
6222
6223 \begin_layout Plain Layout
6224 La
6225 \family sans
6226 TeX
6227 \family default
6228  (plain)->DVI
6229 \end_layout
6230
6231 \end_inset
6232
6233  or 
6234 \begin_inset Flex Noun
6235 status collapsed
6236
6237 \begin_layout Plain Layout
6238 La
6239 \family sans
6240 TeX
6241 \family default
6242  (plain)->DraftDVI
6243 \end_layout
6244
6245 \end_inset
6246
6247  converter in 
6248 \begin_inset Flex Noun
6249 status collapsed
6250
6251 \begin_layout Plain Layout
6252 Preferences\SpecialChar menuseparator
6253 File Handling\SpecialChar menuseparator
6254 Converters
6255 \end_layout
6256
6257 \end_inset
6258
6259  to 
6260 \begin_inset Flex Code
6261 status collapsed
6262
6263 \begin_layout Plain Layout
6264 latex -src-specials $$i
6265 \end_layout
6266
6267 \end_inset
6268
6269 .
6270  If this doesn't work, check if your \SpecialChar TeX
6271  engine needs different options (the
6272  syntax might differ in some distributions).
6273 \end_layout
6274
6275 \begin_layout Subsubsection*
6276 External Packages (PDFSync and scrltx) 
6277 \end_layout
6278
6279 \begin_layout Standard
6280 The packages 
6281 \emph on
6282 pdfsync
6283 \emph default
6284  and 
6285 \emph on
6286 scrltx
6287 \emph default
6288  provide reverse search facility for PDF output (via pdflatex) and DVI output,
6289  respectively.
6290  In order to enable it, load the packages in the \SpecialChar LyX
6291  preamble: 
6292 \end_layout
6293
6294 \begin_layout Itemize
6295 \begin_inset Flex Code
6296 status collapsed
6297
6298 \begin_layout Plain Layout
6299
6300 \backslash
6301 usepackage{pdfsync}
6302 \end_layout
6303
6304 \end_inset
6305
6306  for reverse PDF search,
6307 \end_layout
6308
6309 \begin_layout Itemize
6310 \begin_inset Flex Code
6311 status collapsed
6312
6313 \begin_layout Plain Layout
6314
6315 \backslash
6316 usepackage[active]{srcltx}
6317 \end_layout
6318
6319 \end_inset
6320
6321  for reverse DVI search.
6322 \end_layout
6323
6324 \begin_layout Standard
6325 If you want to be able to perform both DVI and PDF reverse searches, you
6326  can also insert in the preamble the following lines
6327 \end_layout
6328
6329 \begin_layout LyX-Code
6330
6331 \backslash
6332 usepackage{ifpdf}
6333 \begin_inset Newline newline
6334 \end_inset
6335
6336
6337 \backslash
6338 ifpdf
6339 \begin_inset Newline newline
6340 \end_inset
6341
6342   
6343 \backslash
6344 usepackage{pdfsync}
6345 \begin_inset Newline newline
6346 \end_inset
6347
6348
6349 \backslash
6350 else
6351 \begin_inset Newline newline
6352 \end_inset
6353
6354   
6355 \backslash
6356 usepackage[active]{srcltx}
6357 \begin_inset Newline newline
6358 \end_inset
6359
6360
6361 \backslash
6362 fi
6363 \end_layout
6364
6365 \begin_layout Standard
6366 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6367  right package will be used.
6368 \end_layout
6369
6370 \begin_layout Standard
6371 Note that PDFSync might affect the output layout of your document.
6372  It is therefore advised to disable PDFsync for final documents.
6373 \end_layout
6374
6375 \begin_layout Subsubsection*
6376 Built-in reverse search via Sync\SpecialChar TeX
6377  (DVI and PDF) 
6378 \end_layout
6379
6380 \begin_layout Standard
6381 Recent versions of 
6382 \begin_inset Flex Code
6383 status collapsed
6384
6385 \begin_layout Plain Layout
6386 (pdf)latex
6387 \end_layout
6388
6389 \end_inset
6390
6391  have built-in support for both PDF and DVI reverse search.
6392  This so-called 
6393 \emph on
6394 Sync\SpecialChar TeX
6395
6396 \emph default
6397  facility is basically the result of the integration of the PDFSync package
6398  to the pdftex program and its merge with the 
6399 \emph on
6400 scr-specials
6401 \emph default
6402  approach.
6403  You need at least \SpecialChar TeX
6404 Live 2008 or a recent Mik\SpecialChar TeX
6405  distribution in order to use
6406  it.
6407 \begin_inset Foot
6408 status collapsed
6409
6410 \begin_layout Plain Layout
6411 For some reason, Mik\SpecialChar TeX
6412  does not understand/obey the command \SpecialChar LyX
6413  inserts into
6414  the preamble when you check the "Enable Forward/Reverse Search" button
6415  in the toolbar and does not generate the necessary info.
6416 \end_layout
6417
6418 \begin_layout Plain Layout
6419 The generation of the required info can be forced by changing the converter
6420  "\SpecialChar LaTeX
6421  (pdflatex) -> PDF (pdflatex)" in Preferences->File handling->Converters
6422  from the default "pdflatex $$i" to "pdflatex -synctex=1 $$i" (i.e., by adding
6423  the -synctex=1 switch).
6424 \end_layout
6425
6426 \end_inset
6427
6428  Also note that only a few PDF viewers (Okular and Qpdfview on Unix, Skim
6429  on the Mac, SumatraPDF on Windows) already provide Sync\SpecialChar TeX
6430  support.
6431 \end_layout
6432
6433 \begin_layout Standard
6434 To enable Sync\SpecialChar TeX
6435  for DVI output, change the 
6436 \begin_inset Flex Noun
6437 status collapsed
6438
6439 \begin_layout Plain Layout
6440 La
6441 \family sans
6442 TeX
6443 \family default
6444  (plain) -> DVI
6445 \end_layout
6446
6447 \end_inset
6448
6449  or 
6450 \begin_inset Flex Noun
6451 status collapsed
6452
6453 \begin_layout Plain Layout
6454 La
6455 \family sans
6456 TeX
6457 \family default
6458  (plain) -> DraftDVI
6459 \end_layout
6460
6461 \end_inset
6462
6463  converter in 
6464 \begin_inset Flex Noun
6465 status collapsed
6466
6467 \begin_layout Plain Layout
6468 Preferences\SpecialChar menuseparator
6469 File Handling\SpecialChar menuseparator
6470 Converters
6471 \end_layout
6472
6473 \end_inset
6474
6475  to 
6476 \begin_inset Flex Code
6477 status collapsed
6478
6479 \begin_layout Plain Layout
6480 latex -synctex=1 $$i
6481 \end_layout
6482
6483 \end_inset
6484
6485 , and for PDF output, change the 
6486 \begin_inset Flex Noun
6487 status collapsed
6488
6489 \begin_layout Plain Layout
6490 La
6491 \family sans
6492 TeX
6493 \family default
6494  (pdflatex) -> PDF (pdflatex)
6495 \end_layout
6496
6497 \end_inset
6498
6499  or converter to 
6500 \begin_inset Flex Code
6501 status collapsed
6502
6503 \begin_layout Plain Layout
6504 pdflatex -synctex=1 $$i
6505 \end_layout
6506
6507 \end_inset
6508
6509 .
6510  Check the documentation of your viewer whether the viewer needs to be configure
6511 d for the use with Sync\SpecialChar TeX
6512 .
6513 \begin_inset Foot
6514 status collapsed
6515
6516 \begin_layout Plain Layout
6517 Note that the option 
6518 \begin_inset Flex Code
6519 status collapsed
6520
6521 \begin_layout Plain Layout
6522 -synctex=1
6523 \end_layout
6524
6525 \end_inset
6526
6527  option enables gzip compression.
6528  If your viewer does not support it, you should instead use 
6529 \begin_inset Flex Code
6530 status collapsed
6531
6532 \begin_layout Plain Layout
6533 -synctex=-1
6534 \end_layout
6535
6536 \end_inset
6537
6538 .
6539 \end_layout
6540
6541 \end_inset
6542
6543
6544 \end_layout
6545
6546 \begin_layout Subsection
6547 Configuring and using specific viewers
6548 \begin_inset CommandInset label
6549 LatexCommand label
6550 name "subsec:configuring-viewers"
6551
6552 \end_inset
6553
6554
6555 \end_layout
6556
6557 \begin_layout Subsubsection*
6558 Xdvi (all platforms)
6559 \end_layout
6560
6561 \begin_layout Standard
6562 If you use 
6563 \begin_inset Flex Code
6564 status collapsed
6565
6566 \begin_layout Plain Layout
6567 xdvi
6568 \end_layout
6569
6570 \end_inset
6571
6572 , you don't need to do anything else for performing a reverse DVI search,
6573  as \SpecialChar LyX
6574  already provides the necessary hooks for automatically using the 
6575 \begin_inset Flex Code
6576 status collapsed
6577
6578 \begin_layout Plain Layout
6579 lyxclient
6580 \end_layout
6581
6582 \end_inset
6583
6584  program.
6585  Just setup your document as described above (reverse search is triggered
6586  by Ctrl-click or Alt-click on Mac OSX, respectively).
6587 \end_layout
6588
6589 \begin_layout Standard
6590 However, if for whatever reason you want to use the named pipe instead of
6591  the socket for communicating with \SpecialChar LyX
6592 , simply change the DVI viewer in 
6593 \begin_inset Flex Noun
6594 status collapsed
6595
6596 \begin_layout Plain Layout
6597 Preferences\SpecialChar menuseparator
6598 File Handling\SpecialChar menuseparator
6599 File formats
6600 \end_layout
6601
6602 \end_inset
6603
6604  to
6605 \begin_inset Foot
6606 status collapsed
6607
6608 \begin_layout Plain Layout
6609 On Mac OSX you have to use 
6610 \begin_inset Flex Code
6611 status collapsed
6612
6613 \begin_layout Plain Layout
6614 DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l"
6615 \end_layout
6616
6617 \end_inset
6618
6619
6620 \end_layout
6621
6622 \end_inset
6623
6624  
6625 \begin_inset Flex Code
6626 status collapsed
6627
6628 \begin_layout Plain Layout
6629 xdvi -editor "lyxeditor.sh %f %l"
6630 \end_layout
6631
6632 \end_inset
6633
6634 , where 
6635 \begin_inset Flex Code
6636 status collapsed
6637
6638 \begin_layout Plain Layout
6639 lyxeditor.sh
6640 \end_layout
6641
6642 \end_inset
6643
6644  is a suitable script.
6645  For example, a minimal shell script is the following one:
6646 \end_layout
6647
6648 \begin_layout LyX-Code
6649 #!/bin/sh
6650 \begin_inset Newline newline
6651 \end_inset
6652
6653 LYXPIPE="/path/to/lyxpipe"
6654 \begin_inset Newline newline
6655 \end_inset
6656
6657 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6658 \begin_inset Newline newline
6659 \end_inset
6660
6661 echo "$COMMAND" > "${LYXPIPE}".in || exit
6662 \begin_inset Newline newline
6663 \end_inset
6664
6665 read TMP < "${LYXPIPE}".out || exit
6666 \end_layout
6667
6668 \begin_layout Standard
6669 where 
6670 \begin_inset Flex Code
6671 status collapsed
6672
6673 \begin_layout Plain Layout
6674 /path/to/lyxpipe
6675 \end_layout
6676
6677 \end_inset
6678
6679  is the LyXServer pipe path specified in 
6680 \begin_inset Flex Noun
6681 status collapsed
6682
6683 \begin_layout Plain Layout
6684 Preferences\SpecialChar menuseparator
6685 Paths
6686 \end_layout
6687
6688 \end_inset
6689
6690 .
6691 \begin_inset Foot
6692 status collapsed
6693
6694 \begin_layout Plain Layout
6695 In the 
6696 \begin_inset Flex Code
6697 status collapsed
6698
6699 \begin_layout Plain Layout
6700 development/tools
6701 \end_layout
6702
6703 \end_inset
6704
6705  folder of a source distribution you can find a 
6706 \begin_inset Flex Code
6707 status collapsed
6708
6709 \begin_layout Plain Layout
6710 lyxeditor
6711 \end_layout
6712
6713 \end_inset
6714
6715  script which is able to locate the 
6716 \emph on
6717 lyxpipe
6718 \emph default
6719  based on your preferences.
6720 \end_layout
6721
6722 \end_inset
6723
6724
6725 \end_layout
6726
6727 \begin_layout Subsubsection*
6728 MacDviX (Mac OSX)
6729 \end_layout
6730
6731 \begin_layout Standard
6732 At the end of 
6733 \begin_inset Flex Code
6734 status collapsed
6735
6736 \begin_layout Plain Layout
6737 /Applications/MacDviX_Folder/calleditor.script
6738 \end_layout
6739
6740 \end_inset
6741
6742 , add the following lines:
6743 \end_layout
6744
6745 \begin_layout LyX-Code
6746 /Applications/LyX.app/Contents/MacOS/lyxeditor "$2" $1
6747 \begin_inset Newline newline
6748 \end_inset
6749
6750 exit 1
6751 \end_layout
6752
6753 \begin_layout Standard
6754 Modify the lines accordingly if you install \SpecialChar LyX
6755  somewhere else than in the
6756  Applications folder.
6757 \end_layout
6758
6759 \begin_layout Standard
6760 Reverse search is triggered by Alt-click (OPTION-click).
6761 \end_layout
6762
6763 \begin_layout Subsubsection*
6764 Skim (Mac OSX)
6765 \end_layout
6766
6767 \begin_layout Standard
6768 Enter 
6769 \begin_inset Flex Code
6770 status collapsed
6771
6772 \begin_layout Plain Layout
6773 open -a Skim.app $$i
6774 \end_layout
6775
6776 \end_inset
6777
6778  to the viewer setting in 
6779 \begin_inset Flex Noun
6780 status collapsed
6781
6782 \begin_layout Plain Layout
6783 Preferences\SpecialChar menuseparator
6784 File Handling\SpecialChar menuseparator
6785 File formats\SpecialChar menuseparator
6786 PDF (pdflatex)
6787 \end_layout
6788
6789 \end_inset
6790
6791 , and then in 
6792 \begin_inset Flex Noun
6793 status collapsed
6794
6795 \begin_layout Plain Layout
6796 Skim\SpecialChar menuseparator
6797 Preferences\SpecialChar menuseparator
6798 Sync
6799 \end_layout
6800
6801 \end_inset
6802
6803  choose 
6804 \begin_inset Flex Noun
6805 status collapsed
6806
6807 \begin_layout Plain Layout
6808 custom
6809 \end_layout
6810
6811 \end_inset
6812
6813  preset and enter command 
6814 \begin_inset Flex Noun
6815 status collapsed
6816
6817 \begin_layout Plain Layout
6818 /Applications/\SpecialChar LyX
6819 .app/Contents/MacOS/lyxeditor
6820 \end_layout
6821
6822 \end_inset
6823
6824 .
6825 \end_layout
6826
6827 \begin_layout Standard
6828 Reverse search is triggered by COMMAND-SHIFT-click
6829 \end_layout
6830
6831 \begin_layout Subsubsection*
6832 Okular (KDE)
6833 \end_layout
6834
6835 \begin_layout Standard
6836 Go to 
6837 \begin_inset Flex Noun
6838 status collapsed
6839
6840 \begin_layout Plain Layout
6841 Settings\SpecialChar menuseparator
6842 Configure Okular\SpecialChar menuseparator
6843 Editor
6844 \end_layout
6845
6846 \end_inset
6847
6848 , select 
6849 \begin_inset Quotes eld
6850 \end_inset
6851
6852 Custom Text Editor
6853 \begin_inset Quotes erd
6854 \end_inset
6855
6856  and add the command 
6857 \begin_inset Flex Code
6858 status collapsed
6859
6860 \begin_layout Plain Layout
6861 lyxclient -g %f %l
6862 \end_layout
6863
6864 \end_inset
6865
6866 .
6867 \end_layout
6868
6869 \begin_layout Standard
6870 Reverse search is triggered by SHIFT-click.
6871 \end_layout
6872
6873 \begin_layout Subsubsection*
6874 Qpdfview (Unix)
6875 \end_layout
6876
6877 \begin_layout Standard
6878 Qpdfview supports Sync\SpecialChar TeX
6879  since version 0.3.5.
6880  Go to 
6881 \begin_inset Flex Noun
6882 status collapsed
6883
6884 \begin_layout Plain Layout
6885 Edit\SpecialChar menuseparator
6886 Settings\SpecialChar menuseparator
6887 Behavior
6888 \end_layout
6889
6890 \end_inset
6891
6892 , click on the input field of the 
6893 \begin_inset Quotes eld
6894 \end_inset
6895
6896 Source editor
6897 \begin_inset Quotes erd
6898 \end_inset
6899
6900  item and add the command 
6901 \begin_inset Flex Code
6902 status collapsed
6903
6904 \begin_layout Plain Layout
6905 lyxclient -g %1 %2
6906 \end_layout
6907
6908 \end_inset
6909
6910 .
6911 \end_layout
6912
6913 \begin_layout Standard
6914 Reverse search is triggered by double-click or, in more recent versions,
6915  by context menu.
6916 \end_layout
6917
6918 \begin_layout Subsubsection*
6919 YAP (Windows)
6920 \end_layout
6921
6922 \begin_layout Standard
6923 Launch yap, choose its 
6924 \begin_inset Flex Noun
6925 status collapsed
6926
6927 \begin_layout Plain Layout
6928 View\SpecialChar menuseparator
6929 Options
6930 \end_layout
6931
6932 \end_inset
6933
6934  menu and select the 
6935 \begin_inset Quotes eld
6936 \end_inset
6937
6938 Inverse DVI Search
6939 \begin_inset Quotes erd
6940 \end_inset
6941
6942  tab.
6943  Click on the 
6944 \begin_inset Quotes eld
6945 \end_inset
6946
6947 New\SpecialChar ldots
6948
6949 \begin_inset Quotes erd
6950 \end_inset
6951
6952  button and, in the window that opens, enter 
6953 \begin_inset Quotes eld
6954 \end_inset
6955
6956 \SpecialChar LyX
6957  Editor
6958 \begin_inset Quotes erd
6959 \end_inset
6960
6961  (or any other name you like) in the 
6962 \begin_inset Quotes eld
6963 \end_inset
6964
6965 Name:
6966 \begin_inset Quotes erd
6967 \end_inset
6968
6969  field.
6970  Now click on the button labeled 
6971 \begin_inset Quotes eld
6972 \end_inset
6973
6974 \SpecialChar ldots
6975
6976 \begin_inset Quotes erd
6977 \end_inset
6978
6979  to open a file dialog and navigate to the directory containing the batch
6980  file 
6981 \begin_inset Flex Code
6982 status collapsed
6983
6984 \begin_layout Plain Layout
6985 lyxeditor.bat
6986 \end_layout
6987
6988 \end_inset
6989
6990  (see below).
6991  Select 
6992 \begin_inset Flex Code
6993 status collapsed
6994
6995 \begin_layout Plain Layout
6996 lyxeditor.bat
6997 \end_layout
6998
6999 \end_inset
7000
7001  and then specify the program arguments as 
7002 \begin_inset Flex Code
7003 status collapsed
7004
7005 \begin_layout Plain Layout
7006 %f %l
7007 \end_layout
7008
7009 \end_inset
7010
7011 .
7012  The 
7013 \begin_inset Flex Code
7014 status collapsed
7015
7016 \begin_layout Plain Layout
7017 lyxeditor.bat
7018 \end_layout
7019
7020 \end_inset
7021
7022  wrapper is used for communicating with \SpecialChar LyX
7023  through the 
7024 \emph on
7025 lyxpipe
7026 \emph default
7027  and is as follows:
7028 \end_layout
7029
7030 \begin_layout LyX-Code
7031 @echo off
7032 \begin_inset Newline newline
7033 \end_inset
7034
7035 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
7036 \backslash
7037
7038 \backslash
7039 .
7040 \backslash
7041 pipe
7042 \backslash
7043 lyxpipe.in
7044 \begin_inset Newline newline
7045 \end_inset
7046
7047 type 
7048 \backslash
7049
7050 \backslash
7051 .
7052 \backslash
7053 pipe
7054 \backslash
7055 lyxpipe.out
7056 \end_layout
7057
7058 \begin_layout Standard
7059 Make sure that the \SpecialChar LyX
7060 Server pipe path you specified in \SpecialChar LyX
7061  is 
7062 \begin_inset Flex Code
7063 status collapsed
7064
7065 \begin_layout Plain Layout
7066
7067 \backslash
7068
7069 \backslash
7070 .
7071 \backslash
7072 pipe
7073 \backslash
7074 lyxpipe
7075 \end_layout
7076
7077 \end_inset
7078
7079 , otherwise change the 
7080 \begin_inset Flex Code
7081 status collapsed
7082
7083 \begin_layout Plain Layout
7084 lyxeditor.bat
7085 \end_layout
7086
7087 \end_inset
7088
7089  wrapper accordingly.
7090 \end_layout
7091
7092 \begin_layout Standard
7093 In yap, reverse search is triggered by double-click.
7094 \end_layout
7095
7096 \begin_layout Subsubsection*
7097 SumatraPDF (Windows)
7098 \end_layout
7099
7100 \begin_layout Standard
7101 In order to use SumatraPDF for inverse search, enter 
7102 \begin_inset Flex Code
7103 status collapsed
7104
7105 \begin_layout Plain Layout
7106 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
7107 \end_layout
7108
7109 \end_inset
7110
7111  in the viewer setting in 
7112 \begin_inset Flex Noun
7113 status collapsed
7114
7115 \begin_layout Plain Layout
7116 Preferences\SpecialChar menuseparator
7117 File Handling\SpecialChar menuseparator
7118 File formats\SpecialChar menuseparator
7119 PDF (pdflatex)
7120 \end_layout
7121
7122 \end_inset
7123
7124 , where 
7125 \begin_inset Flex Code
7126 status collapsed
7127
7128 \begin_layout Plain Layout
7129 lyxeditor.bat
7130 \end_layout
7131
7132 \end_inset
7133
7134  is the previous wrapper.
7135  If SumatraPDF.exe is not in your command PATH, use its full file name.
7136 \end_layout
7137
7138 \begin_layout Standard
7139 Reverse search is triggered by double-click.
7140 \end_layout
7141
7142 \begin_layout Subsubsection*
7143 YAP (Cygwin)
7144 \end_layout
7145
7146 \begin_layout Standard
7147 First of all, make sure that yap is your default DVI viewer in the Windows
7148  environment, then launch it, choose its 
7149 \begin_inset Flex Noun
7150 status collapsed
7151
7152 \begin_layout Plain Layout
7153 View\SpecialChar menuseparator
7154 Options
7155 \end_layout
7156
7157 \end_inset
7158
7159  menu and select the 
7160 \begin_inset Quotes eld
7161 \end_inset
7162
7163 Inverse DVI Search
7164 \begin_inset Quotes erd
7165 \end_inset
7166
7167  tab.
7168  Click on the 
7169 \begin_inset Quotes eld
7170 \end_inset
7171
7172 New\SpecialChar ldots
7173
7174 \begin_inset Quotes erd
7175 \end_inset
7176
7177  button and, in the window that opens, enter 
7178 \begin_inset Quotes eld
7179 \end_inset
7180
7181 \SpecialChar LyX
7182  Editor
7183 \begin_inset Quotes erd
7184 \end_inset
7185
7186  (or any other name you like) in the 
7187 \begin_inset Quotes eld
7188 \end_inset
7189
7190 Name:
7191 \begin_inset Quotes erd
7192 \end_inset
7193
7194  field.
7195  Now click on the button labeled 
7196 \begin_inset Quotes eld
7197 \end_inset
7198
7199 \SpecialChar ldots
7200
7201 \begin_inset Quotes erd
7202 \end_inset
7203
7204  to open a file dialog and navigate to the directory containing the 
7205 \begin_inset Flex Code
7206 status collapsed
7207
7208 \begin_layout Plain Layout
7209 lyxeditor.exe
7210 \end_layout
7211
7212 \end_inset
7213
7214  program (which is installed by default on Cygwin along with the \SpecialChar LyX
7215  executable).
7216  Select 
7217 \begin_inset Flex Code
7218 status collapsed
7219
7220 \begin_layout Plain Layout
7221 lyxeditor.exe
7222 \end_layout
7223
7224 \end_inset
7225
7226  and then specify the program arguments as 
7227 \begin_inset Flex Code
7228 status collapsed
7229
7230 \begin_layout Plain Layout
7231 -g %f %l
7232 \end_layout
7233
7234 \end_inset
7235
7236 .
7237  In this way, you will be using the 
7238 \emph on
7239 lyxsocket
7240 \emph default
7241  for communicating with \SpecialChar LyX
7242 .
7243  If, for whatever reason, you want to use the 
7244 \emph on
7245 lyxpipe
7246 \emph default
7247 , omit the 
7248 \begin_inset Flex Code
7249 status collapsed
7250
7251 \begin_layout Plain Layout
7252 -g
7253 \end_layout
7254
7255 \end_inset
7256
7257  option and be sure to specify the \SpecialChar LyX
7258 Server pipe path in the \SpecialChar LyX
7259  preferences.
7260 \end_layout
7261
7262 \begin_layout Standard
7263 In yap, reverse search is triggered by double-click.
7264 \end_layout
7265
7266 \begin_layout Subsubsection*
7267 SumatraPDF (Cygwin)
7268 \end_layout
7269
7270 \begin_layout Standard
7271 In order to use SumatraPDF for inverse search, enter 
7272 \begin_inset Flex Code
7273 status collapsed
7274
7275 \begin_layout Plain Layout
7276 SumatraPDF -inverse-search "lyxeditor -g %f %l"
7277 \end_layout
7278
7279 \end_inset
7280
7281  in the viewer setting in 
7282 \begin_inset Flex Noun
7283 status collapsed
7284
7285 \begin_layout Plain Layout
7286 Preferences\SpecialChar menuseparator
7287 File Handling\SpecialChar menuseparator
7288 File formats\SpecialChar menuseparator
7289 PDF (pdflatex)
7290 \end_layout
7291
7292 \end_inset
7293
7294 .
7295  If SumatraPDF.exe is not in your command PATH, use its full posix path.
7296  The 
7297 \begin_inset Flex Code
7298 status collapsed
7299
7300 \begin_layout Plain Layout
7301 -g
7302 \end_layout
7303
7304 \end_inset
7305
7306  enables communication via the 
7307 \emph on
7308 lyxsocket
7309 \emph default
7310 .
7311  Again, omit the 
7312 \begin_inset Flex Code
7313 status collapsed
7314
7315 \begin_layout Plain Layout
7316 -g
7317 \end_layout
7318
7319 \end_inset
7320
7321  option if you want to use the 
7322 \emph on
7323 lyxpipe
7324 \emph default
7325 , and be sure to specify the \SpecialChar LyX
7326 Server pipe path in the \SpecialChar LyX
7327  preferences.
7328 \end_layout
7329
7330 \begin_layout Standard
7331 Reverse search is triggered by double-click.
7332 \end_layout
7333
7334 \begin_layout Section
7335 Forward search
7336 \end_layout
7337
7338 \begin_layout Standard
7339 Forward search is, as the name implies, in a sense the 
7340 \begin_inset Quotes eld
7341 \end_inset
7342
7343 opposite
7344 \begin_inset Quotes erd
7345 \end_inset
7346
7347  of reverse search.
7348  It allows you to let the viewer jump to a given position from within \SpecialChar LyX
7349 .
7350  If forward search is set up (as described in what follows), you can put
7351  the cursor anywhere in your \SpecialChar LyX
7352  document, and hit 
7353 \begin_inset Flex Noun
7354 status collapsed
7355
7356 \begin_layout Plain Layout
7357 Navigate\SpecialChar menuseparator
7358 Forward search
7359 \end_layout
7360
7361 \end_inset
7362
7363  (or select 
7364 \begin_inset Flex Noun
7365 status collapsed
7366
7367 \begin_layout Plain Layout
7368 Forward search
7369 \end_layout
7370
7371 \end_inset
7372
7373  in the context menu via right mouse click), and then the viewer will jump
7374  to that position as well.
7375  This implies, of course, that your viewer supports this function.
7376 \end_layout
7377
7378 \begin_layout Standard
7379 To make forward search possible, you first need to provide the generated
7380  output PDF/DVI file with additional information about the \SpecialChar TeX
7381  sources.
7382  This can be done via the methods described in the section 
7383 \begin_inset CommandInset ref
7384 LatexCommand ref
7385 reference "subsec:rev-search"
7386
7387 \end_inset
7388
7389 .
7390 \end_layout
7391
7392 \begin_layout Standard
7393 Additionally, you need to configure \SpecialChar LyX
7394  for using your viewers in 
7395 \begin_inset Flex Noun
7396 status collapsed
7397
7398 \begin_layout Plain Layout
7399 Tools\SpecialChar menuseparator
7400 Preferences\SpecialChar menuseparator
7401 Output\SpecialChar menuseparator
7402 General
7403 \end_layout
7404
7405 \end_inset
7406
7407 .
7408  We provide a range of tested configurations for some viewers, which you
7409  can select from the drop down list.
7410  If none of these configurations suits you, you have to find out and enter
7411  a suitable configuration yourself.
7412  The definition syntax uses the following placeholders:
7413 \end_layout
7414
7415 \begin_layout Itemize
7416 \noindent
7417 \begin_inset Flex Code
7418 status collapsed
7419
7420 \begin_layout Plain Layout
7421 $$n
7422 \end_layout
7423
7424 \end_inset
7425
7426 : row number
7427 \end_layout
7428
7429 \begin_layout Itemize
7430 \noindent
7431 \begin_inset Flex Code
7432 status collapsed
7433
7434 \begin_layout Plain Layout
7435 $$t
7436 \end_layout
7437
7438 \end_inset
7439
7440 : name of the (temporary) exported .tex file (without path)
7441 \end_layout
7442
7443 \begin_layout Itemize
7444 \noindent
7445 \begin_inset Flex Code
7446 status collapsed
7447
7448 \begin_layout Plain Layout
7449 $$f
7450 \end_layout
7451
7452 \end_inset
7453
7454 : name of the (temporary) exported .tex file (including path)
7455 \end_layout
7456
7457 \begin_layout Itemize
7458 \noindent
7459 \begin_inset Flex Code
7460 status collapsed
7461
7462 \begin_layout Plain Layout
7463 $$o
7464 \end_layout
7465
7466 \end_inset
7467
7468 : name of the exported output file (either dvi or pdf, depending on which
7469  one exists in the temporary directory)
7470 \end_layout
7471
7472 \begin_layout Standard
7473 Note that only some of the viewers provide full forward search functionality,
7474  among them yap, xdvi, okular
7475 \begin_inset Foot
7476 status collapsed
7477
7478 \begin_layout Plain Layout
7479 You might want to set 
7480 \begin_inset Flex Code
7481 status collapsed
7482
7483 \begin_layout Plain Layout
7484 okular –unique
7485 \end_layout
7486
7487 \end_inset
7488
7489  in 
7490 \begin_inset Flex Noun
7491 status collapsed
7492
7493 \begin_layout Plain Layout
7494 Tools\SpecialChar menuseparator
7495 Preferences\SpecialChar menuseparator
7496 File Handling\SpecialChar menuseparator
7497 File
7498 \begin_inset space ~
7499 \end_inset
7500
7501 Formats
7502 \end_layout
7503
7504 \end_inset
7505
7506
7507 \end_layout
7508
7509 \end_inset
7510
7511 , qpdfview and SumatraPDF
7512 \begin_inset Foot
7513 status collapsed
7514
7515 \begin_layout Plain Layout
7516 SumatraPDF can also use DDE commands through the external program CMCDDE
7517  — downloadable from 
7518 \begin_inset CommandInset href
7519 LatexCommand href
7520 target "http://www.istri.fr/spip/zip/CMCDDE.zip"
7521
7522 \end_inset
7523
7524
7525 \end_layout
7526
7527 \end_inset
7528
7529 .
7530  While many of the widespread PDF viewers (most notably Adobe Reader) do
7531  not support forward search at all, some other viewers – e.
7532 \begin_inset space \thinspace{}
7533 \end_inset
7534
7535 g.
7536  evince and xpdf – allow at least to reload the document and jump to a specific
7537  page of the file, so you can at least navigate 
7538 \begin_inset Quotes eld
7539 \end_inset
7540
7541 near
7542 \begin_inset Quotes erd
7543 \end_inset
7544
7545 .
7546  This latter functionality is provided by an external call of synctex (see
7547  the predefined example configurations).
7548  
7549 \end_layout
7550
7551 \begin_layout Standard
7552 Forward search works both with DVI and PDF output.
7553  \SpecialChar LyX
7554  simply checks which preview format you have used before (i.
7555 \begin_inset space \thinspace{}
7556 \end_inset
7557
7558 e., which format is already there in the temporary directory) and chooses
7559  the appropriate configuration for the respective format.
7560 \end_layout
7561
7562 \begin_layout Chapter
7563 Special Document Classes
7564 \end_layout
7565
7566 \begin_layout Section
7567 A&A Paper
7568 \end_layout
7569
7570 \begin_layout Standard
7571 by 
7572 \noun on
7573 Peter Sütterlin
7574 \end_layout
7575
7576 \begin_layout Subsection
7577 Introduction
7578 \end_layout
7579
7580 \begin_layout Standard
7581 This section describes how \SpecialChar LyX
7582  can be used to write articles for submission
7583  to the scientific journal 
7584 \emph on
7585 Astronomy and Astrophysics
7586 \emph default
7587  (
7588 \begin_inset Flex URL
7589 status collapsed
7590
7591 \begin_layout Plain Layout
7592
7593 http://www.edpsciences.fr/aa/
7594 \end_layout
7595
7596 \end_inset
7597
7598 ) using Version 5.01 of the document class 
7599 \family typewriter
7600 aa.cls
7601 \family default
7602 .
7603  This package can be downloaded from the ftp site
7604 \end_layout
7605
7606 \begin_layout Standard
7607 \begin_inset VSpace medskip
7608 \end_inset
7609
7610
7611 \end_layout
7612
7613 \begin_layout Standard
7614 \align center
7615 \begin_inset Flex URL
7616 status collapsed
7617
7618 \begin_layout Plain Layout
7619
7620 ftp://ftp.edpsciences.org/pub/aa/readme.html
7621 \end_layout
7622
7623 \end_inset
7624
7625
7626 \end_layout
7627
7628 \begin_layout Standard
7629 \begin_inset VSpace medskip
7630 \end_inset
7631
7632
7633 \end_layout
7634
7635 \begin_layout Standard
7636 A manual comes together with that package, and this text is not meant to
7637  replace the original manual but is merely a short guide in how to realize
7638  the correct form of your paper.
7639  
7640 \end_layout
7641
7642 \begin_layout Standard
7643 Please note that the publisher of the journal was changed from Springer
7644  to EDP Sciences starting January 1, 2001.
7645  That change involved also some slight changes to the style files, namely
7646  the removal of the thesaurus command.
7647  The \SpecialChar LyX
7648  class aa supports the newest version of these style files, V 5.01.
7649  If you have an older version installed, please upgrade.
7650  For compatibility, the old (version 4) layout has been kept as 
7651 \family sans
7652 article (A&A V4)
7653 \family default
7654 .
7655  Please refer to the comments in 
7656 \family typewriter
7657 \SpecialChar LyX
7658 Dir/layouts/aapaper.layout
7659 \family default
7660 .
7661 \end_layout
7662
7663 \begin_layout Subsection
7664 Getting started
7665 \end_layout
7666
7667 \begin_layout Standard
7668 It is recommended you start from the example template distributed with \SpecialChar LyX
7669 .
7670  If you are not using a template, note the following settings:
7671 \end_layout
7672
7673 \begin_layout Itemize
7674 Select 
7675 \family sans
7676 article (A&A)
7677 \family default
7678  in the 
7679 \family sans
7680 Document\SpecialChar menuseparator
7681 Settings
7682 \family default
7683  dialog (OK, that one was obvious).
7684 \end_layout
7685
7686 \begin_layout Itemize
7687 Don't change the option 
7688 \family sans
7689 Page
7690 \begin_inset space ~
7691 \end_inset
7692
7693 style
7694 \family default
7695 : Leave it set to 
7696 \family sans
7697 default
7698 \family default
7699 .
7700  The whole layout is done by the macros, you shouldn't change anything.
7701 \end_layout
7702
7703 \begin_layout Subsection
7704 The header block
7705 \end_layout
7706
7707 \begin_layout Standard
7708 First thing to enter is the header information.
7709  It consists of seven entries, of which some are optional.
7710  They are
7711 \end_layout
7712
7713 \begin_layout Itemize
7714
7715 \family sans
7716 Title
7717 \family default
7718 : [required] 
7719 \end_layout
7720
7721 \begin_layout Itemize
7722
7723 \family sans
7724 Subtitle
7725 \family default
7726 : [optional] 
7727 \end_layout
7728
7729 \begin_layout Itemize
7730
7731 \family sans
7732 Author
7733 \family default
7734 : [required]
7735 \end_layout
7736
7737 \begin_layout Itemize
7738
7739 \family sans
7740 Address
7741 \family default
7742 : [required]
7743 \end_layout
7744
7745 \begin_layout Itemize
7746
7747 \family sans
7748 Offprints
7749 \family default
7750 : [optional] if more than one author: whom to contact for offprint requests.
7751 \end_layout
7752
7753 \begin_layout Itemize
7754
7755 \family sans
7756 Mail
7757 \family default
7758 : [optional] mail address for contacts.
7759 \end_layout
7760
7761 \begin_layout Itemize
7762
7763 \family sans
7764 Date
7765 \family default
7766 : [required].
7767  Suggested format is 
7768 \family typewriter
7769 Received: <date>; Accepted <date> 
7770 \end_layout
7771
7772 \begin_layout Standard
7773 There is no need to issue the 
7774 \family typewriter
7775
7776 \backslash
7777 maketitle
7778 \family default
7779  command, this is done automatically by \SpecialChar LyX
7780  when the header is finished.
7781  Although the order of the single header entries doesn't matter it is advised
7782  to keep the above sequence, just to get the best optics and meets the layout
7783  of the real document.
7784 \end_layout
7785
7786 \begin_layout Standard
7787 If you want to place footnotes in the header block, e.
7788 \begin_inset space \thinspace{}
7789 \end_inset
7790
7791 g.
7792 \begin_inset space \space{}
7793 \end_inset
7794
7795 to state your present address, just use the standard footnote via the menu
7796  
7797 \family sans
7798 Insert\SpecialChar menuseparator
7799 Footnote.
7800
7801 \family default
7802  \SpecialChar LyX
7803  will automagically use the term 
7804 \family typewriter
7805
7806 \backslash
7807 thanks{}
7808 \family default
7809  in that case.
7810 \end_layout
7811
7812 \begin_layout Standard
7813 In addition to these topics, the macros use three additional \SpecialChar LaTeX
7814  commands that
7815  have no counterpart in \SpecialChar LyX
7816 :
7817 \end_layout
7818
7819 \begin_layout Itemize
7820
7821 \family typewriter
7822
7823 \backslash
7824 and
7825 \family default
7826  to separate different names for more than one author and institute, respectivel
7827 y.
7828 \end_layout
7829
7830 \begin_layout Itemize
7831
7832 \family typewriter
7833
7834 \backslash
7835 inst{<nr>}
7836 \family default
7837 to mark corresponding author/institute pairs.
7838  The institutes are numbered sequentially as they appear in the 
7839 \family sans
7840 Address
7841 \family default
7842  field, so you have to put a marker to each author.
7843 \end_layout
7844
7845 \begin_layout Itemize
7846
7847 \family typewriter
7848
7849 \backslash
7850 email{address}
7851 \family default
7852  to supply an email address for fast contact.
7853 \end_layout
7854
7855 \begin_layout Standard
7856 In all cases, the appropriate command has to be entered in \SpecialChar LyX
7857  and marked as
7858  \SpecialChar LaTeX
7859  code.
7860  See the examples.
7861  
7862 \end_layout
7863
7864 \begin_layout Subsection
7865 The abstract
7866 \end_layout
7867
7868 \begin_layout Standard
7869 The abstract should immediately follow the header block.
7870  With version 5 the abstract environment was changed to a command, and there
7871  is now a resctriction to only one paragraph.
7872  In addition, it should contain an entry with the keywords.
7873  This is not yet implemented for \SpecialChar LyX
7874 , therefore you have to enter the \SpecialChar LaTeX
7875  command
7876  
7877 \family typewriter
7878
7879 \backslash
7880 keywords{}
7881 \family default
7882  by hand and mark it as \SpecialChar LaTeX
7883  code.
7884  Refer to the example paper.
7885 \end_layout
7886
7887 \begin_layout Subsection
7888 Supported environments
7889 \end_layout
7890
7891 \begin_layout Standard
7892 The A&A paper layout supports the following environments for structuring
7893  your text:
7894 \end_layout
7895
7896 \begin_layout Itemize
7897
7898 \family sans
7899 Standard
7900 \end_layout
7901
7902 \begin_layout Itemize
7903
7904 \family sans
7905 Section
7906 \end_layout
7907
7908 \begin_layout Itemize
7909
7910 \family sans
7911 Subsection
7912 \end_layout
7913
7914 \begin_layout Itemize
7915
7916 \family sans
7917 Subsubsection
7918 \end_layout
7919
7920 \begin_layout Itemize
7921
7922 \family sans
7923 Itemize
7924 \end_layout
7925
7926 \begin_layout Itemize
7927
7928 \family sans
7929 Enumerate
7930 \end_layout
7931
7932 \begin_layout Itemize
7933
7934 \family sans
7935 Description
7936 \end_layout
7937
7938 \begin_layout Itemize
7939
7940 \family sans
7941 Caption
7942 \end_layout
7943
7944 \begin_layout Itemize
7945
7946 \family sans
7947 Abstract
7948 \end_layout
7949
7950 \begin_layout Itemize
7951
7952 \family sans
7953 Acknowledgment
7954 \end_layout
7955
7956 \begin_layout Itemize
7957
7958 \family sans
7959 Bibliography
7960 \end_layout
7961
7962 \begin_layout Itemize
7963
7964 \family sans
7965 \SpecialChar LaTeX
7966
7967 \end_layout
7968
7969 \begin_layout Subsection
7970 Commands not supported by \SpecialChar LyX
7971
7972 \end_layout
7973
7974 \begin_layout Standard
7975 Some commands are not yet supported by the 
7976 \family sans
7977 paper (A&A)
7978 \family default
7979  layout for \SpecialChar LyX
7980 .
7981  Some have already been mentioned.
7982  For the sake of completeness, they are listed all together here:
7983 \end_layout
7984
7985 \begin_layout Itemize
7986
7987 \family typewriter
7988
7989 \backslash
7990 and
7991 \end_layout
7992
7993 \begin_layout Itemize
7994
7995 \family typewriter
7996
7997 \backslash
7998 email
7999 \end_layout
8000
8001 \begin_layout Itemize
8002
8003 \family typewriter
8004
8005 \backslash
8006 appendix
8007 \end_layout
8008
8009 \begin_layout Itemize
8010
8011 \family typewriter
8012
8013 \backslash
8014 authorrunning
8015 \end_layout
8016
8017 \begin_layout Itemize
8018
8019 \family typewriter
8020
8021 \backslash
8022 inst{}
8023 \end_layout
8024
8025 \begin_layout Itemize
8026
8027 \family typewriter
8028
8029 \backslash
8030 keywords{}
8031 \end_layout
8032
8033 \begin_layout Itemize
8034
8035 \family typewriter
8036
8037 \backslash
8038 object{}
8039 \end_layout
8040
8041 \begin_layout Itemize
8042
8043 \family typewriter
8044
8045 \backslash
8046 titlerunning{}
8047 \end_layout
8048
8049 \begin_layout Standard
8050 If you want to use any of these commands, you have to enter them yourself.
8051  
8052 \series bold
8053 Do not forget to mark them as \SpecialChar LaTeX
8054  code!
8055 \end_layout
8056
8057 \begin_layout Subsection
8058 Figure and Table Floats
8059 \end_layout
8060
8061 \begin_layout Standard
8062 \SpecialChar LyX
8063  provides support for the necessary float environments 
8064 \family sans
8065 figure, figure*, table
8066 \family default
8067  and 
8068 \family sans
8069 table*
8070 \family default
8071 , therefore we won't tell much about it here.
8072  Refer to the 
8073 \emph on
8074 User's
8075 \begin_inset space ~
8076 \end_inset
8077
8078 Guide
8079 \emph default
8080 .
8081  Just remember that tables should be left-aligned.
8082  For that, select the table and change the alignment in 
8083 \family sans
8084 Edit\SpecialChar menuseparator
8085 Paragraph
8086 \begin_inset space ~
8087 \end_inset
8088
8089 Settings.
8090 \end_layout
8091
8092 \begin_layout Standard
8093 There is only one special thing: the figures with caption besides the figure.
8094  To create such a figure, you have to do the following:
8095 \end_layout
8096
8097 \begin_layout Enumerate
8098 Create a wide figure float: 
8099 \family sans
8100 Insert\SpecialChar menuseparator
8101 Float\SpecialChar menuseparator
8102 Figure
8103 \family default
8104 , then right click in the figure and select 
8105 \family sans
8106 Span
8107 \begin_inset space ~
8108 \end_inset
8109
8110 columns
8111 \family default
8112 .
8113 \end_layout
8114
8115 \begin_layout Enumerate
8116 Enter your caption text.
8117 \end_layout
8118
8119 \begin_layout Enumerate
8120 Press 
8121 \family sans
8122 Return
8123 \family default
8124  to move the cursor above the caption.
8125 \end_layout
8126
8127 \begin_layout Enumerate
8128 Insert your figure
8129 \end_layout
8130
8131 \begin_layout Enumerate
8132 Position the cursor behind the figure and insert a horizontal fill: 
8133 \family sans
8134 Insert\SpecialChar menuseparator
8135 Special
8136 \begin_inset space ~
8137 \end_inset
8138
8139 Character\SpecialChar menuseparator
8140 Horizontal
8141 \begin_inset space ~
8142 \end_inset
8143
8144 Fill
8145 \family default
8146 .
8147 \end_layout
8148
8149 \begin_layout Enumerate
8150 Switch to \SpecialChar LaTeX
8151  mode: 
8152 \family sans
8153 M-c
8154 \begin_inset space ~
8155 \end_inset
8156
8157 t
8158 \family default
8159 .
8160 \end_layout
8161
8162 \begin_layout Enumerate
8163 Enter 
8164 \family typewriter
8165
8166 \backslash
8167 parbox[b]{55mm}{
8168 \family default
8169 .
8170  
8171 \series bold
8172 Do not close the brace!
8173 \end_layout
8174
8175 \begin_layout Enumerate
8176 Position the cursor behind the caption text, switch to \SpecialChar LaTeX
8177  mode and insert
8178  the closing brace: 
8179 \family sans
8180 M-c
8181 \begin_inset space ~
8182 \end_inset
8183
8184 t
8185 \family default
8186  
8187 \family typewriter
8188 }
8189 \family default
8190 .
8191 \end_layout
8192
8193 \begin_layout Standard
8194 Also, refer to the figures in the example paper.
8195 \end_layout
8196
8197 \begin_layout Subsection
8198 Referee layout
8199 \end_layout
8200
8201 \begin_layout Standard
8202 For submission, the paper has to be formated in a special double-spacing
8203  layout.
8204  For this purpose, you have to give the option 
8205 \family typewriter
8206 referee
8207 \family default
8208  to the documentclass.
8209  This must be done using the extra class options field in the 
8210 \family sans
8211 Document\SpecialChar menuseparator
8212 Settings
8213 \family default
8214  dialog.
8215  Just enter the string 
8216 \family typewriter
8217 referee
8218 \family default
8219  there.
8220 \end_layout
8221
8222 \begin_layout Subsection
8223 The example paper
8224 \end_layout
8225
8226 \begin_layout Standard
8227 The 
8228 \family sans
8229 Examples
8230 \family default
8231  directory contains an example paper written with \SpecialChar LyX
8232 .
8233  It is the example paper from the original macro package, translated to
8234  \SpecialChar LyX
8235 .
8236  Use it for inspiration, and compare the original \SpecialChar LaTeX
8237  code with \SpecialChar LyX
8238  way of writing.
8239 \end_layout
8240
8241 \begin_layout Section
8242 AAS\SpecialChar TeX
8243
8244 \end_layout
8245
8246 \begin_layout Standard
8247 by 
8248 \noun on
8249 Mike Ressler
8250 \end_layout
8251
8252 \begin_layout Subsection
8253 Introduction
8254 \end_layout
8255
8256 \begin_layout Standard
8257 AAS\SpecialChar TeX
8258  is a set of macros produced by the American Astronomical Society to
8259  facilitate electronic manuscript submission to the three journals they
8260  publish: the Astrophysical Journal (including the Letters and Supplement),
8261  the Astronomical Journal, and the Publications of the Astronomical Society
8262  of the Pacific.
8263  \SpecialChar LyX
8264  has proven to be an excellent tool for generating these documents, especially
8265  given its equation, citation, and figure handling capabilities.
8266  \SpecialChar LyX
8267  requires version 5.0 (or higher) of these macros; preferably 5.2, which
8268  is the version described here, or higher.
8269  Versions prior to 5.0 are intended for use with \SpecialChar LaTeX
8270 2.09 and are fundamentally
8271  incompatible with \SpecialChar LyX
8272 .
8273  The AAS\SpecialChar TeX
8274  package may be downloaded from the AAS\SpecialChar TeX
8275  Web site
8276 \end_layout
8277
8278 \begin_layout Standard
8279 \begin_inset VSpace medskip
8280 \end_inset
8281
8282
8283 \end_layout
8284
8285 \begin_layout Standard
8286 \align center
8287 \begin_inset Flex URL
8288 status collapsed
8289
8290 \begin_layout Plain Layout
8291
8292 https://aas.org/aastex/aastex-downloads
8293 \end_layout
8294
8295 \end_inset
8296
8297
8298 \end_layout
8299
8300 \begin_layout Standard
8301 \begin_inset VSpace medskip
8302 \end_inset
8303
8304
8305 \end_layout
8306
8307 \begin_layout Standard
8308 A complete user guide is contained in that package and you should familiarize
8309  yourself with it thoroughly before embarking on writing a paper in \SpecialChar LyX
8310 .
8311  \SpecialChar LyX
8312  will not reduce the need to figure out all the AAS\SpecialChar TeX
8313  commands, it will only
8314  reduce the drudgery of typing everything in.
8315  It is your responsibility to ensure that the final exported \SpecialChar LaTeX
8316  document conforms
8317  completely to the requirements of the journal to which you are submitting
8318  your paper.
8319 \end_layout
8320
8321 \begin_layout Subsection
8322 Starting a New Paper
8323 \end_layout
8324
8325 \begin_layout Standard
8326 I strongly suggest that you start with the AAS\SpecialChar TeX
8327  template file.
8328  Click on 
8329 \family sans
8330 File\SpecialChar menuseparator
8331 New from
8332 \family default
8333  
8334 \family sans
8335 Template
8336 \family default
8337 , enter the new file name, then choose the 
8338 \family typewriter
8339 aastex.lyx
8340 \family default
8341  template.
8342  This will show the most common fields found in a manuscript.
8343  Simply overwrite the existing text (including the brackets, 
8344 \family typewriter
8345 <>
8346 \family default
8347 ) with the correct information.
8348  Many of the AAS\SpecialChar TeX
8349  commands and environments can be implemented directly in
8350  \SpecialChar LyX
8351 , but some cannot: most noticeably 
8352 \family typewriter
8353
8354 \backslash
8355 altaffilmark
8356 \family default
8357  and 
8358 \family typewriter
8359
8360 \backslash
8361 altaffiltext
8362 \family default
8363 , which should stick out like a sore thumb if you actually just opened the
8364  template file.
8365  For commands such as these, the \SpecialChar LaTeX
8366  code must be entered directly and marked
8367  as such.
8368  Such commands are referred to as \SpecialChar TeX
8369  code, or Evil Red Text.
8370  I tried to minimize the amount of \SpecialChar TeX
8371  code needed in an AAS\SpecialChar TeX
8372  document, but
8373  there is still a bit more required than any of us would like.
8374 \end_layout
8375
8376 \begin_layout Subsection
8377 Finishing Your Paper
8378 \end_layout
8379
8380 \begin_layout Standard
8381 When the paper is finished to your satisfaction and previews/prints correctly,
8382  there are a few 
8383 \begin_inset Quotes eld
8384 \end_inset
8385
8386 postprocessing
8387 \begin_inset Quotes erd
8388 \end_inset
8389
8390  actions which need to be done before you submit it to the journals.
8391  
8392 \end_layout
8393
8394 \begin_layout Enumerate
8395 Export your paper as a \SpecialChar LaTeX
8396  file (
8397 \family sans
8398 File\SpecialChar menuseparator
8399 Export\SpecialChar menuseparator
8400 \SpecialChar LaTeX
8401
8402 \family default
8403 ).
8404  
8405 \end_layout
8406
8407 \begin_layout Enumerate
8408 Edit the resulting 
8409 \family typewriter
8410 .tex
8411 \family default
8412  file with your favorite text editor
8413 \end_layout
8414
8415 \begin_deeper
8416 \begin_layout Enumerate
8417 remove the comment lines before the 
8418 \family typewriter
8419
8420 \backslash
8421 documentclass
8422 \family default
8423  command
8424 \end_layout
8425
8426 \begin_layout Enumerate
8427 remove the 
8428 \family typewriter
8429
8430 \backslash
8431 usepackage...{fontenc}
8432 \family default
8433  line if it appears (usually just after 
8434 \family typewriter
8435
8436 \backslash
8437 documentclass
8438 \family default
8439 }; also remove the 
8440 \family typewriter
8441
8442 \backslash
8443 secnumdepth
8444 \family default
8445  line if it appears.
8446 \end_layout
8447
8448 \begin_layout Enumerate
8449 remove everything between (and including) the 
8450 \family typewriter
8451
8452 \backslash
8453 makeatletter
8454 \family default
8455  and 
8456 \family typewriter
8457
8458 \backslash
8459 makeatother
8460 \family default
8461  commands, except for any commands you specifically put into the \SpecialChar LaTeX
8462  preamble
8463  (which should appear immediately after the 
8464 \begin_inset Quotes eld
8465 \end_inset
8466
8467 User specified \SpecialChar LaTeX
8468  commands
8469 \begin_inset Quotes erd
8470 \end_inset
8471
8472  comment in the 
8473 \family typewriter
8474 .tex
8475 \family default
8476  file).
8477 \end_layout
8478
8479 \end_deeper
8480 \begin_layout Enumerate
8481 Run the resulting file through \SpecialChar LaTeX
8482  to make sure it still processes correctly.
8483 \end_layout
8484
8485 \begin_layout Enumerate
8486 Reread the journal requirements to make sure your filenames and formats
8487  are correct.
8488 \end_layout
8489
8490 \begin_layout Enumerate
8491 Submit it.
8492 \end_layout
8493
8494 \begin_layout Subsection
8495 Comments On Specific Commands
8496 \end_layout
8497
8498 \begin_layout Standard
8499 I will not describe the detailed usage of the individual AAS\SpecialChar TeX
8500  commands: the
8501  AAS\SpecialChar TeX
8502  User Guide (
8503 \family typewriter
8504 aasguide.tex
8505 \family default
8506 ) gives a good description of each.
8507  Thus it's probably easiest for me to go down the list as found in the guide
8508  and offer comments where necessary.
8509  So let's begin \SpecialChar ldots
8510
8511 \end_layout
8512
8513 \begin_layout Subsubsection
8514 Things that work as expected
8515 \end_layout
8516
8517 \begin_layout Standard
8518 Because they work as you might expect, I simply list them and the section
8519  they are found in: 
8520 \family typewriter
8521
8522 \backslash
8523 documentclass
8524 \family default
8525  (2.1.1), 
8526 \family typewriter
8527
8528 \backslash
8529 begin{document}
8530 \family default
8531  (2.2), 
8532 \family typewriter
8533
8534 \backslash
8535 title
8536 \family default
8537  (2.3), 
8538 \family typewriter
8539
8540 \backslash
8541 author
8542 \family default
8543  (2.3), 
8544 \family typewriter
8545
8546 \backslash
8547 affil
8548 \family default
8549  (2.3), 
8550 \family typewriter
8551
8552 \backslash
8553 abstract
8554 \family default
8555  (2.4), 
8556 \family typewriter
8557
8558 \backslash
8559 keywords
8560 \family default
8561  (2.5), 
8562 \family typewriter
8563
8564 \backslash
8565 section
8566 \family default
8567  (2.7), 
8568 \family typewriter
8569
8570 \backslash
8571 subsection
8572 \family default
8573  (2.7), 
8574 \family typewriter
8575
8576 \backslash
8577 subsubsection
8578 \family default
8579  (2.7), 
8580 \family typewriter
8581
8582 \backslash
8583 paragraph
8584 \family default
8585  (2.7), 
8586 \family typewriter
8587
8588 \backslash
8589 facility
8590 \family default
8591  (2.10), 
8592 \family typewriter
8593
8594 \backslash
8595 begin{displaymath}
8596 \family default
8597  (2.12), 
8598 \family typewriter
8599
8600 \backslash
8601 begin{equation}
8602 \family default
8603  (2.12), 
8604 \family typewriter
8605
8606 \backslash
8607 begin{eqnarray}
8608 \family default
8609  (2.12), 
8610 \family typewriter
8611
8612 \backslash
8613 begin{mathletters}
8614 \family default
8615  (2.12), 
8616 \family typewriter
8617
8618 \backslash
8619 begin{thebibliography}
8620 \family default
8621  (2.13.1), 
8622 \family typewriter
8623
8624 \backslash
8625 bibitem
8626 \family default
8627  (2.13.2), all the cite commands and their variations (2.13.2), the generic
8628  graphicx figure commands (2.14.1), 
8629 \family typewriter
8630
8631 \backslash
8632 begin{table}
8633 \family default
8634  (2.15.4), 
8635 \family typewriter
8636
8637 \backslash
8638 begin{tabular}
8639 \family default
8640  (2.15.4), 
8641 \family typewriter
8642
8643 \backslash
8644 caption
8645 \family default
8646  (2.15.4), 
8647 \family typewriter
8648
8649 \backslash
8650 label
8651 \family default
8652  (2.15.4, amongst other places), 
8653 \family typewriter
8654
8655 \backslash
8656 tablerefs
8657 \family default
8658  (2.15.5), 
8659 \family typewriter
8660
8661 \backslash
8662 tablecomments
8663 \family default
8664  (2.15.5), 
8665 \family typewriter
8666
8667 \backslash
8668 url
8669 \family default
8670  (2.17.4), 
8671 \family typewriter
8672
8673 \backslash
8674 end{document}
8675 \family default
8676  (2.18).
8677 \end_layout
8678
8679 \begin_layout Standard
8680 The following style options also work correctly: 
8681 \family typewriter
8682 longabstract
8683 \family default
8684  (2.4), 
8685 \family typewriter
8686 preprint
8687 \family default
8688  (3.2.1), 
8689 \family typewriter
8690 preprint2
8691 \family default
8692  (3.2.2), 
8693 \family typewriter
8694 eqsecnum
8695 \family default
8696  (3.3), 
8697 \family typewriter
8698 flushrt
8699 \family default
8700  (3.4).
8701  Simply put them in the 
8702 \family sans
8703 Options
8704 \family default
8705  box in 
8706 \family sans
8707 Layout\SpecialChar menuseparator
8708 Document
8709 \family default
8710 .
8711 \end_layout
8712
8713 \begin_layout Subsubsection
8714 Things that work, but require more comment
8715 \end_layout
8716
8717 \begin_layout Standard
8718 The following items work, but require a little more discussion:
8719 \end_layout
8720
8721 \begin_layout Itemize
8722 These items are reserved for use by the journal editors, but you can put
8723  them into the \SpecialChar LaTeX
8724  preamble if you feel compelled to do so: 
8725 \family typewriter
8726
8727 \backslash
8728 received
8729 \family default
8730
8731 \family typewriter
8732
8733 \backslash
8734 revised
8735 \family default
8736
8737 \family typewriter
8738
8739 \backslash
8740 accepted
8741 \family default
8742
8743 \family typewriter
8744
8745 \backslash
8746 ccc
8747 \family default
8748
8749 \family typewriter
8750
8751 \backslash
8752 cpright
8753 \family default
8754  (all from 2.1.3)
8755 \end_layout
8756
8757 \begin_layout Itemize
8758 These items may be placed in the \SpecialChar LaTeX
8759  preamble, and are included as blanks in
8760  the template file: 
8761 \family typewriter
8762
8763 \backslash
8764 slugcomment
8765 \family default
8766  (2.1.4), 
8767 \family typewriter
8768
8769 \backslash
8770 shorttitle
8771 \family default
8772  (2.1.5), 
8773 \family typewriter
8774
8775 \backslash
8776 shortauthors
8777 \family default
8778  (2.1.5)
8779 \end_layout
8780
8781 \begin_layout Itemize
8782
8783 \family typewriter
8784
8785 \backslash
8786 email
8787 \family default
8788  (2.3) – can only be used 
8789 \begin_inset Quotes eld
8790 \end_inset
8791
8792 standalone
8793 \begin_inset Quotes erd
8794 \end_inset
8795
8796 , not in the middle of a paragraph.
8797  Use \SpecialChar TeX
8798  code if you need to embed it.
8799 \end_layout
8800
8801 \begin_layout Itemize
8802
8803 \family typewriter
8804
8805 \backslash
8806 and
8807 \family default
8808  (2.3) – will have extra {} after it.
8809  This should not cause an error.
8810 \end_layout
8811
8812 \begin_layout Itemize
8813
8814 \family typewriter
8815
8816 \backslash
8817 notetoeditor
8818 \family default
8819  (2.6) – can only be used 
8820 \begin_inset Quotes eld
8821 \end_inset
8822
8823 standalone
8824 \begin_inset Quotes erd
8825 \end_inset
8826
8827 , not in the middle of a paragraph.
8828  Use \SpecialChar TeX
8829  code if you need to embed it.
8830 \end_layout
8831
8832 \begin_layout Itemize
8833
8834 \family typewriter
8835
8836 \backslash
8837 placetable
8838 \family default
8839  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8840  hand
8841 \end_layout
8842
8843 \begin_layout Itemize
8844
8845 \family typewriter
8846
8847 \backslash
8848 placefigure
8849 \family default
8850  (2.8) – same as for 
8851 \family typewriter
8852
8853 \backslash
8854 placetable
8855 \end_layout
8856
8857 \begin_layout Itemize
8858
8859 \family typewriter
8860
8861 \backslash
8862 acknowledgements
8863 \family default
8864  (2.9) – will have extra {} after it.
8865  This should not cause an error.
8866 \end_layout
8867
8868 \begin_layout Itemize
8869
8870 \family typewriter
8871
8872 \backslash
8873 appendix
8874 \family default
8875  (2.11) – will have extra {} after it.
8876  This should not cause an error.
8877 \end_layout
8878
8879 \begin_layout Itemize
8880
8881 \family typewriter
8882
8883 \backslash
8884 figcaption
8885 \family default
8886  (2.14.2) – you can insert an optional filename argument by placing the cursor
8887  at the beginning of the text and selecting 
8888 \family sans
8889 Insert\SpecialChar menuseparator
8890 Short Title
8891 \family default
8892 .
8893  
8894 \begin_inset Quotes eld
8895 \end_inset
8896
8897 Short Title
8898 \begin_inset Quotes erd
8899 \end_inset
8900
8901  inserts an optional argument of the type needed by 
8902 \family typewriter
8903
8904 \backslash
8905 figcaption
8906 \family default
8907 .
8908  Hopefully it will be renamed someday.
8909 \end_layout
8910
8911 \begin_layout Itemize
8912
8913 \family typewriter
8914
8915 \backslash
8916 objectname
8917 \family default
8918  (2.17.1) – same as 
8919 \family typewriter
8920
8921 \backslash
8922 figcaption
8923 \family default
8924  for the catalog ID optional parameter
8925 \end_layout
8926
8927 \begin_layout Itemize
8928
8929 \family typewriter
8930
8931 \backslash
8932 dataset
8933 \family default
8934  (2.17.1) – same as 
8935 \family typewriter
8936
8937 \backslash
8938 figcaption
8939 \family default
8940  for the catalog ID optional parameter
8941 \end_layout
8942
8943 \begin_layout Subsubsection
8944 Things not implemented, use \SpecialChar TeX
8945  code
8946 \end_layout
8947
8948 \begin_layout Standard
8949
8950 \family typewriter
8951
8952 \backslash
8953 altaffilmark
8954 \family default
8955  (2.3), 
8956 \family typewriter
8957
8958 \backslash
8959 altaffiltext
8960 \family default
8961  (2.3), 
8962 \family typewriter
8963
8964 \backslash
8965 eqnum
8966 \family default
8967  (2.12), 
8968 \family typewriter
8969
8970 \backslash
8971 setcounter{equation}
8972 \family default
8973  (2.12), Journal name abbreviations (2.13.4), 
8974 \family typewriter
8975
8976 \backslash
8977 figurenum
8978 \family default
8979  (2.14.1), 
8980 \family typewriter
8981
8982 \backslash
8983 epsscale
8984 \family default
8985  (2.14.1), 
8986 \family typewriter
8987
8988 \backslash
8989 plotone
8990 \family default
8991  (2.14.1), 
8992 \family typewriter
8993
8994 \backslash
8995 plottwo
8996 \family default
8997  (2.14.1), 
8998 \family typewriter
8999
9000 \backslash
9001 tablenum
9002 \family default
9003  (2.15.4), 
9004 \family typewriter
9005
9006 \backslash
9007 tableline
9008 \family default
9009  (2.15.4, insert it as the first element in the lefthand cell after where
9010  you want it.
9011  Don't use any of \SpecialChar LyX
9012 's rules in the table), 
9013 \family typewriter
9014
9015 \backslash
9016 tablenotemark
9017 \family default
9018  (2.15.5), 
9019 \family typewriter
9020
9021 \backslash
9022 tablenotetext
9023 \family default
9024  (2.15.5), much of Misc (2.17, except 
9025 \family typewriter
9026
9027 \backslash
9028 objectname
9029 \family default
9030
9031 \family typewriter
9032
9033 \backslash
9034 dataset
9035 \family default
9036
9037 \family typewriter
9038
9039 \backslash
9040 url
9041 \family default
9042 , and 
9043 \family typewriter
9044
9045 \backslash
9046 email
9047 \family default
9048 ; see above), 
9049 \family typewriter
9050
9051 \backslash
9052 singlespace
9053 \family default
9054  (3.1), 
9055 \family typewriter
9056
9057 \backslash
9058 doublespace
9059 \family default
9060  (3.1), 
9061 \family typewriter
9062
9063 \backslash
9064 onecolumn
9065 \family default
9066  (3.2), 
9067 \family typewriter
9068
9069 \backslash
9070 twocolumn
9071 \family default
9072  (3.2)
9073 \end_layout
9074
9075 \begin_layout Subsubsection
9076 Things that cannot be implemented
9077 \end_layout
9078
9079 \begin_layout Standard
9080 \SpecialChar ldots
9081  at least in any meaningful sort of way, so I suggest ignoring them.
9082  They are the references environment (2.13.3), and the deluxetable environment
9083  (2.15).
9084  If you really, really need to use deluxetable, I suggest editing it in
9085  a separate file with a text editor, then using 
9086 \family sans
9087 Insert\SpecialChar menuseparator
9088 Child
9089 \begin_inset space ~
9090 \end_inset
9091
9092 Document
9093 \family default
9094  to include it in your \SpecialChar LyX
9095  document.
9096  See the 
9097 \family typewriter
9098 aas_sample.lyx
9099 \family default
9100  file to see an example of this.
9101 \end_layout
9102
9103 \begin_layout Subsection
9104 FAQs, Tips, Tricks, and Other Ruminations
9105 \end_layout
9106
9107 \begin_layout Subsubsection
9108 Getting \SpecialChar LyX
9109  and AAS\SpecialChar TeX
9110  to cooperate
9111 \end_layout
9112
9113 \begin_layout Standard
9114 It can be a bit tricky to get \SpecialChar LyX
9115  to recognize a new layout and document class.
9116  When all else fails, do this:
9117 \end_layout
9118
9119 \begin_layout Enumerate
9120 Make certain that \SpecialChar LaTeX
9121  can find AAS\SpecialChar TeX
9122 .
9123  Copy sample.tex (and perhaps table.tex) from the AAS\SpecialChar TeX
9124  distribution into a
9125  directory completely unrelated to \SpecialChar LaTeX
9126  or AAS\SpecialChar TeX
9127  and run \SpecialChar LaTeX
9128  on 
9129 \family typewriter
9130 sample.tex
9131 \family default
9132 .
9133 \end_layout
9134
9135 \begin_layout Enumerate
9136 Make certain that 
9137 \family typewriter
9138 aastex.layout
9139 \family default
9140  appears in \SpecialChar LyX
9141 's 
9142 \family typewriter
9143 layouts
9144 \family default
9145  folder
9146 \end_layout
9147
9148 \begin_layout Enumerate
9149 Rerun 
9150 \family sans
9151 Tools\SpecialChar menuseparator
9152 Reconfigure
9153 \family default
9154  in \SpecialChar LyX
9155 , then restart \SpecialChar LyX
9156 .
9157 \end_layout
9158
9159 \begin_layout Enumerate
9160 Open a regular new file, not from a template.
9161  Does AAS\SpecialChar TeX
9162  appear in the class list in 
9163 \family sans
9164 Document\SpecialChar menuseparator
9165 Settings
9166 \family default
9167 ?
9168 \end_layout
9169
9170 \begin_layout Standard
9171 If you get a warning from an existing AAS\SpecialChar TeX
9172  document about not being able
9173  to find the AAS\SpecialChar TeX
9174  layout or a message about 
9175 \begin_inset Quotes eld
9176 \end_inset
9177
9178 You should not mix title layouts with normal ones
9179 \begin_inset Quotes erd
9180 \end_inset
9181
9182 , things haven't been installed correctly.
9183 \end_layout
9184
9185 \begin_layout Subsubsection
9186 \SpecialChar LaTeX
9187  error processing a table 
9188 \end_layout
9189
9190 \begin_layout Standard
9191 \SpecialChar LyX
9192 , by default, attempts to center the table caption/title.
9193  This seems to produce a bad interaction in AAS\SpecialChar TeX
9194  so you should click somewhere
9195  in the caption/title, then select 
9196 \family sans
9197 Edit\SpecialChar menuseparator
9198 Paragraph
9199 \begin_inset space ~
9200 \end_inset
9201
9202 Settings
9203 \family default
9204 , then set the 
9205 \family sans
9206 Alignment
9207 \family default
9208  to 
9209 \family sans
9210 Block
9211 \family default
9212 .
9213  This took care of it for me.
9214 \end_layout
9215
9216 \begin_layout Subsubsection
9217 References
9218 \end_layout
9219
9220 \begin_layout Standard
9221 A couple of things: 1) I have noticed some funny spacing in the reference
9222  entries in the text.
9223  When you enter the bibliography item data, make sure their is 
9224 \emph on
9225 no
9226 \emph default
9227  space between the last author and the parenthesis setting off the year;
9228  
9229 \emph on
9230 e.
9231 \begin_inset space \thinspace{}
9232 \end_inset
9233
9234 g.
9235 \begin_inset space \space{}
9236 \end_inset
9237
9238
9239 \emph default
9240 type 
9241 \family typewriter
9242 Ressler(1992)
9243 \family default
9244 , not 
9245 \family typewriter
9246 Ressler (1992)
9247 \family default
9248 .
9249  2) Entering the references at all is not obvious.
9250  The easiest thing is to start typing your first reference at the end of
9251  the document, then mark it as type 
9252 \family sans
9253 References
9254 \family default
9255 .
9256  That will put a small gray box in front of what you just typed.
9257  Click on the box to fill in the rest of the information.
9258  For new references, go to the end of an existing reference and press return.
9259  That will create a new line with its own box, etc.
9260 \end_layout
9261
9262 \begin_layout Subsubsection
9263 Including EPS files
9264 \end_layout
9265
9266 \begin_layout Standard
9267 Even though AAS\SpecialChar TeX
9268  provides its own figure commands (
9269 \family typewriter
9270
9271 \backslash
9272 plotone
9273 \family default
9274 , for example), I much prefer \SpecialChar LaTeX
9275 's standard figure commands (with the default
9276  graphicx).
9277  You can insert the 
9278 \family typewriter
9279
9280 \backslash
9281 plotone
9282 \family default
9283 , etc.
9284 \begin_inset space ~
9285 \end_inset
9286
9287 commands as \SpecialChar TeX
9288  code into a Figure Float box if you desire, but I never have
9289  much luck getting the layout right.
9290  With the standard graphics, \SpecialChar LyX
9291  will insert a 
9292 \family typewriter
9293
9294 \backslash
9295 usepackage{graphicx}
9296 \family default
9297  command into the \SpecialChar LaTeX
9298  preamble and handle the figures in the standard \SpecialChar LaTeX2e
9299  way,
9300  interspersing the figures in the text.
9301  I believe ApJ accepts figures exactly this way now; AJ might still use
9302  the 
9303 \begin_inset Quotes eld
9304 \end_inset
9305
9306 stack everything at the end
9307 \begin_inset Quotes erd
9308 \end_inset
9309
9310  technique.
9311 \end_layout
9312
9313 \begin_layout Subsubsection
9314 Things I could have done, but didn't
9315 \end_layout
9316
9317 \begin_layout Standard
9318 There are a few 
9319 \begin_inset Quotes eld
9320 \end_inset
9321
9322 pretty
9323 \begin_inset Quotes erd
9324 \end_inset
9325
9326  things I could have implemented, but chose not to.
9327  For instance, I saw no point in double-spacing the text in the \SpecialChar LyX
9328  window,
9329  even though it is double-spaced in the paper manuscript.
9330  Also, I chose not to make separate layouts for the preprint and preprint2
9331  styles.
9332  Since I assume you will spend most of your time in the plain manuscript
9333  mode anyway, I decided not to chew up more disk space with this.
9334  
9335 \end_layout
9336
9337 \begin_layout Subsection
9338 Final Caveat
9339 \end_layout
9340
9341 \begin_layout Standard
9342 Your mileage may vary.
9343  I've now had papers published by both ApJ and AJ that have had 98% of the
9344  effort done in \SpecialChar LyX
9345 ; the last 2% was the \SpecialChar LaTeX
9346  post-processing and a few cleanups.
9347  I have had no trouble with the submission process, and I'm sure the journals
9348  were never aware that there might be a difference.
9349  So, go forth and publish!
9350 \end_layout
9351
9352 \begin_layout Section
9353 AMS \SpecialChar LaTeX
9354
9355 \end_layout
9356
9357 \begin_layout Standard
9358 by 
9359 \noun on
9360 David Johnson
9361 \noun default
9362 ; updated by 
9363 \noun on
9364 Richard Heck
9365 \end_layout
9366
9367 \begin_layout Standard
9368 \begin_inset VSpace bigskip
9369 \end_inset
9370
9371
9372 \end_layout
9373
9374 \begin_layout Standard
9375 \noindent
9376 The AMS \SpecialChar LaTeX
9377  layouts are set up to conform to suggested styles for mathematical
9378  papers to be submitted to American Mathematical Society publications.
9379  The layouts are not tailored to a specific journal, but easily can be.
9380  You should refer to the AMS documentation for specific instructions for
9381  each journal (usually it will entail only changing a single line in the
9382  \SpecialChar TeX
9383  output).
9384  That documentation is available on the Web at 
9385 \begin_inset Flex URL
9386 status open
9387
9388 \begin_layout Plain Layout
9389
9390 http://www.ams.org
9391 \end_layout
9392
9393 \end_inset
9394
9395  or by ftp at 
9396 \begin_inset Flex URL
9397 status open
9398
9399 \begin_layout Plain Layout
9400
9401 ftp://ftp.ams.org/pub/tex/amslatex/
9402 \end_layout
9403
9404 \end_inset
9405
9406 .
9407  These layouts are appropriate, and useful, for any mathematical writing.
9408  
9409 \end_layout
9410
9411 \begin_layout Standard
9412 There are two basic AMS \SpecialChar LaTeX
9413  layouts: 
9414 \end_layout
9415
9416 \begin_layout Itemize
9417 amsart: The standard AMS article format.
9418 \end_layout
9419
9420 \begin_layout Itemize
9421 amsbook: the standard AMS book (really, monograph) format.
9422  
9423 \end_layout
9424
9425 \begin_layout Standard
9426 The layouts themselves contain only the minimum necessary to use the AMS
9427  classes.
9428  They do not, in particular, contain any of the `theorem' environments used
9429  for setting theorems, lemmas, and the like.
9430  These are contained, instead, in the 
9431 \begin_inset Flex Code
9432 status collapsed
9433
9434 \begin_layout Plain Layout
9435 Theorems (AMS)
9436 \end_layout
9437
9438 \end_inset
9439
9440  module, which is loaded by default when you select one of the AMS classes.
9441  (It can also be used with other classes and can be removed, if you would
9442  rather use something else.) Less commonly used environments are in the 
9443 \begin_inset Flex Code
9444 status collapsed
9445
9446 \begin_layout Plain Layout
9447 Theorems (AMS-Extended)
9448 \end_layout
9449
9450 \end_inset
9451
9452  module, which must be loaded manually.
9453 \end_layout
9454
9455 \begin_layout Standard
9456 By default, theorems and the like are numbered consecutively throughout
9457  the document, but this may be modified by loading the module 
9458 \begin_inset Flex Code
9459 status collapsed
9460
9461 \begin_layout Plain Layout
9462 Theorems (Order by Section)
9463 \end_layout
9464
9465 \end_inset
9466
9467  or, if you are using 
9468 \begin_inset Flex Code
9469 status collapsed
9470
9471 \begin_layout Plain Layout
9472 book (AMS)
9473 \end_layout
9474
9475 \end_inset
9476
9477 , the module 
9478 \begin_inset Flex Code
9479 status collapsed
9480
9481 \begin_layout Plain Layout
9482 Theorems (Order by Chapter)
9483 \end_layout
9484
9485 \end_inset
9486
9487 .
9488  These will number the results as 
9489 \begin_inset Formula $n.m$
9490 \end_inset
9491
9492 , where the first number refers to the section (or chapter) and the second
9493  refers to the total number of results so far in that section (or chapter).
9494  Many environments are also available unnumbered.
9495  These are indicated by an asterisk at the end.
9496  If you happen to want 
9497 \emph on
9498 only
9499 \emph default
9500  unnumbered results, the module 
9501 \begin_inset Flex Code
9502 status collapsed
9503
9504 \begin_layout Plain Layout
9505 Theorems (Starred)
9506 \end_layout
9507
9508 \end_inset
9509
9510  provides that option.
9511 \end_layout
9512
9513 \begin_layout Standard
9514 Note that these modules do not 
9515 \emph on
9516 have
9517 \emph default
9518  to be used with the AMS classes.
9519  It is perfectly possible to use the 
9520 \begin_inset Flex Code
9521 status collapsed
9522
9523 \begin_layout Plain Layout
9524 Theorems (AMS)
9525 \end_layout
9526
9527 \end_inset
9528
9529  module, and the others mentioned, with other classes, such as 
9530 \begin_inset Flex Code
9531 status collapsed
9532
9533 \begin_layout Plain Layout
9534 article
9535 \end_layout
9536
9537 \end_inset
9538
9539
9540 \begin_inset Flex Code
9541 status collapsed
9542
9543 \begin_layout Plain Layout
9544 report
9545 \end_layout
9546
9547 \end_inset
9548
9549
9550 \begin_inset Flex Code
9551 status collapsed
9552
9553 \begin_layout Plain Layout
9554 book (KOMA-script)
9555 \end_layout
9556
9557 \end_inset
9558
9559 , and so forth.
9560 \end_layout
9561
9562 \begin_layout Subsection
9563 What these layouts provide
9564 \end_layout
9565
9566 \begin_layout Standard
9567 There is a long list of included environments provided by these layouts.
9568  In AMS-\SpecialChar LaTeX
9569 , there is, in fact, an opportunity to define an unlimited variety
9570  of `theorem' environments.
9571  However, the AMS recommends the environments that are available in \SpecialChar LyX
9572 .
9573  
9574 \end_layout
9575
9576 \begin_layout Standard
9577 The following environments—as well as the standard environments, such as
9578  
9579 \begin_inset Flex Noun
9580 status collapsed
9581
9582 \begin_layout Plain Layout
9583 section
9584 \end_layout
9585
9586 \end_inset
9587
9588
9589 \begin_inset Flex Noun
9590 status collapsed
9591
9592 \begin_layout Plain Layout
9593 bibliography
9594 \end_layout
9595
9596 \end_inset
9597
9598
9599 \begin_inset Flex Noun
9600 status collapsed
9601
9602 \begin_layout Plain Layout
9603 title
9604 \end_layout
9605
9606 \end_inset
9607
9608
9609 \begin_inset Flex Noun
9610 status collapsed
9611
9612 \begin_layout Plain Layout
9613 author
9614 \end_layout
9615
9616 \end_inset
9617
9618 , and 
9619 \begin_inset Flex Noun
9620 status collapsed
9621
9622 \begin_layout Plain Layout
9623 date
9624 \end_layout
9625
9626 \end_inset
9627
9628 —are provided by 
9629 \begin_inset Flex Code
9630 status collapsed
9631
9632 \begin_layout Plain Layout
9633 article (AMS)
9634 \end_layout
9635
9636 \end_inset
9637
9638  and 
9639 \begin_inset Flex Code
9640 status collapsed
9641
9642 \begin_layout Plain Layout
9643 book (AMS)
9644 \end_layout
9645
9646 \end_inset
9647
9648 :
9649 \end_layout
9650
9651 \begin_layout Description
9652 Address This should be the author's permanent address.
9653 \end_layout
9654
9655 \begin_layout Description
9656 Current
9657 \begin_inset space ~
9658 \end_inset
9659
9660 Address This should be the author's temporary address at the time of submission,
9661  if different from the Address.
9662 \end_layout
9663
9664 \begin_layout Description
9665 Email Author's e-mail address
9666 \end_layout
9667
9668 \begin_layout Description
9669 URL Author's Web address, if desired.
9670 \end_layout
9671
9672 \begin_layout Description
9673 Keywords Key words or phrases used to identify specific topics discussed
9674  in the paper.
9675 \end_layout
9676
9677 \begin_layout Description
9678 Subjectclass These refer to the AMS Subject Classifications, published and
9679  described in 
9680 \emph on
9681 Mathematical Reviews
9682 \emph default
9683 .
9684  These are also available online at the AMS cites listed above.
9685 \end_layout
9686
9687 \begin_layout Description
9688 Thanks
9689 \end_layout
9690
9691 \begin_layout Description
9692 Dedicatory
9693 \end_layout
9694
9695 \begin_layout Description
9696 Translator
9697 \end_layout
9698
9699 \begin_layout Standard
9700 The following environments are provided by both the 
9701 \begin_inset Flex Code
9702 status collapsed
9703
9704 \begin_layout Plain Layout
9705 Theorems
9706 \end_layout
9707
9708 \end_inset
9709
9710  and 
9711 \begin_inset Flex Code
9712 status collapsed
9713
9714 \begin_layout Plain Layout
9715 Theorems (AMS)
9716 \end_layout
9717
9718 \end_inset
9719
9720  modules, in the latter case in both starred (unnumbered) and unstarred
9721  (numbered) versions.
9722  These same environments are provided only in the starred versions by the
9723  
9724 \begin_inset Flex Code
9725 status collapsed
9726
9727 \begin_layout Plain Layout
9728 Theorems (Starred)
9729 \end_layout
9730
9731 \end_inset
9732
9733  module:
9734 \end_layout
9735
9736 \begin_layout Theorem
9737 This is typically used for the statements of major results.
9738  
9739 \end_layout
9740
9741 \begin_layout Corollary*
9742 This is used for statements which follow fairly directly from previous statement
9743 s.
9744  Again, these can be major results.
9745  
9746 \end_layout
9747
9748 \begin_layout Lemma
9749 These are smaller results needed to prove other statements.
9750 \end_layout
9751
9752 \begin_layout Proposition
9753 These are less major results which (hopefully) add to the general theory
9754  being discussed.
9755 \end_layout
9756
9757 \begin_layout Conjecture
9758 These are statements provided without justification, which the author does
9759  not know how to prove, but which seem to be true (to the author, at least).
9760 \end_layout
9761
9762 \begin_layout Definition*
9763 Guess what this is for.
9764  The font is different for this environment than for the previous ones.
9765  
9766 \end_layout
9767
9768 \begin_layout Example*
9769 Used for examples illustrating proven results.
9770 \end_layout
9771
9772 \begin_layout Problem
9773 It's not really known what this is for.
9774  You should figure it out.
9775 \end_layout
9776
9777 \begin_layout Exercise*
9778 Write a description for this one.
9779 \end_layout
9780
9781 \begin_layout Remark
9782 This environment is also a type of theorem, usually a lesser sort of observation.
9783 \end_layout
9784
9785 \begin_layout Claim*
9786 Often used in the course of giving a proof of a larger result.
9787 \end_layout
9788
9789 \begin_layout Case
9790 Generally, these are used to break up long arguments, using specific instances
9791  of some condition.
9792  
9793 \end_layout
9794
9795 \begin_layout Case
9796 The numbering scheme for cases is on its own, not together with other numbered
9797  statements.
9798  
9799 \end_layout
9800
9801 \begin_layout Proof
9802 At the end of this environment, a QED symbol (usually a square, but it can
9803  vary with different styles) is placed.
9804  If you want to have other environments within this one—for example, Case
9805  environments—and have the QED symbol appear only after them, then the other
9806  environments need to be nested within the proof environment.
9807  See the section 
9808 \emph on
9809 Nesting Environments
9810 \emph default
9811  of the 
9812 \emph on
9813 User's Guide
9814 \emph default
9815  for information on nesting.
9816 \end_layout
9817
9818 \begin_layout Standard
9819 And these environments are provided by 
9820 \begin_inset Flex Code
9821 status collapsed
9822
9823 \begin_layout Plain Layout
9824 Theorems (AMS-Extended)
9825 \end_layout
9826
9827 \end_inset
9828
9829 :
9830 \end_layout
9831
9832 \begin_layout Criterion*
9833 A required condition.
9834 \end_layout
9835
9836 \begin_layout Algorithm*
9837 A general procedure to be used.
9838 \end_layout
9839
9840 \begin_layout Axiom*
9841 This is a property or statement taken as true within the system being discussed.
9842 \end_layout
9843
9844 \begin_layout Condition*
9845 Sometimes used to state a condition assumed within the present context of
9846  discussion.
9847 \end_layout
9848
9849 \begin_layout Note*
9850 Similar to a Remark.
9851 \end_layout
9852
9853 \begin_layout Notation*
9854 Used for the explanation of, yes, notation.
9855 \end_layout
9856
9857 \begin_layout Summary
9858 Do we really need to tell you? 
9859 \end_layout
9860
9861 \begin_layout Acknowledgement*
9862 Acknowledgement.
9863 \end_layout
9864
9865 \begin_layout Conclusion*
9866 Sometimes used at the end of a long train of argument.
9867 \end_layout
9868
9869 \begin_layout Fact
9870 Used in a way similar to Proposition, though perhaps lower on the scale.
9871 \end_layout
9872
9873 \begin_layout Standard
9874 In addition, the AMS classes automatically provide the AMS \SpecialChar LaTeX
9875  and AMS fonts
9876  packages.
9877  They need to be available on your system in order to use these environments.
9878 \end_layout
9879
9880 \begin_layout Section
9881 AGU journals (
9882 \family sans
9883 aguplus
9884 \family default
9885 )
9886 \end_layout
9887
9888 \begin_layout Standard
9889 by 
9890 \shape smallcaps
9891 Martin Vermeer
9892 \end_layout
9893
9894 \begin_layout Subsection
9895 Description
9896 \end_layout
9897
9898 \begin_layout Standard
9899 These are the layout files for some of the journals of the American Geophysical
9900  Society.
9901  It is assumed that you have both the AGU's own class files and AGUplus
9902  installed (everything to be found at
9903 \begin_inset Flex URL
9904 status collapsed
9905
9906 \begin_layout Plain Layout
9907
9908 http://publications.agu.org/files/2013/08/AGU-LaTeX.zip
9909 \end_layout
9910
9911 \end_inset
9912
9913 ).
9914 \end_layout
9915
9916 \begin_layout Subsection
9917 New styles
9918 \end_layout
9919
9920 \begin_layout Standard
9921 Redefined are 
9922 \family sans
9923 Paragraph
9924 \family default
9925
9926 \family sans
9927 Paragraph*
9928 \family default
9929 .
9930  They are still called this in the \SpecialChar LyX
9931  GUI, though their \SpecialChar LaTeX
9932  equivalents in the
9933  AGU classes are 
9934 \family sans
9935 Subsubsubsection
9936 \family default
9937  and 
9938 \family sans
9939 Subsubsubsection*
9940 \family default
9941 .
9942 \end_layout
9943
9944 \begin_layout Standard
9945 Newly defined styles are 
9946 \family sans
9947 Left_Header
9948 \family default
9949
9950 \family sans
9951 Right_Header
9952 \family default
9953
9954 \family sans
9955 Received
9956 \family default
9957
9958 \family sans
9959 Revised
9960 \family default
9961
9962 \family sans
9963 Accepted
9964 \family default
9965
9966 \family sans
9967 CCC
9968 \family default
9969
9970 \family sans
9971 PaperId
9972 \family default
9973
9974 \family sans
9975 AuthorAddr
9976 \family default
9977
9978 \family sans
9979 SlugComment
9980 \family default
9981 .
9982  These are mostly manuscript attributes and defined in the AGU class documentati
9983 on.
9984 \end_layout
9985
9986 \begin_layout Standard
9987 I suspect this is still badly incomplete.
9988 \end_layout
9989
9990 \begin_layout Subsection
9991 New floats
9992 \end_layout
9993
9994 \begin_layout Standard
9995
9996 \family sans
9997 Planotable
9998 \family default
9999  and 
10000 \family sans
10001 Plate
10002 \family default
10003 .
10004  We also have a new 
10005 \family sans
10006 Table_Caption
10007 \family default
10008 .
10009 \end_layout
10010
10011 \begin_layout Subsection
10012 Supported journals
10013 \end_layout
10014
10015 \begin_layout Itemize
10016
10017 \emph on
10018 Journal of Geophysical Research
10019 \emph default
10020
10021 \family typewriter
10022 jgrga.layout
10023 \family default
10024  — Martin Vermeer
10025 \end_layout
10026
10027 \begin_layout Standard
10028 Add your own, it isn't so hard! Look at the 
10029 \family typewriter
10030 jgrga.layout
10031 \family default
10032  example and 
10033 \family typewriter
10034 aguplus.inc
10035 \family default
10036 .
10037 \end_layout
10038
10039 \begin_layout Subsection
10040 Bugs and things to remember
10041 \end_layout
10042
10043 \begin_layout Standard
10044 In order to use the new layouts, you must remember to do the following for
10045  a new document:
10046 \end_layout
10047
10048 \begin_layout Enumerate
10049
10050 \emph on
10051 Turn off babel
10052 \emph default
10053 .
10054  This can be done in the 
10055 \family sans
10056 Layout\SpecialChar menuseparator
10057 Document
10058 \family default
10059  or 
10060 \family sans
10061 Document\SpecialChar menuseparator
10062 Settings
10063 \family default
10064  menu item.
10065  (AGU articles are always in English, right? So 
10066 \emph on
10067 don't
10068 \emph default
10069  choose a language.)
10070 \end_layout
10071
10072 \begin_layout Enumerate
10073 Enter 
10074 \family typewriter
10075 jgrga
10076 \family default
10077  into the document's 
10078 \family sans
10079 Extra Options
10080 \family default
10081  field.
10082  (Yes, this is a bug.)
10083 \end_layout
10084
10085 \begin_layout Enumerate
10086 Make sure you use the 
10087 \family typewriter
10088 agu.bst
10089 \family default
10090  bibliography style, by entering 
10091 \family sans
10092 agu
10093 \family default
10094  into the second field of the Bib\SpecialChar TeX
10095  inset.
10096  None of the standard styles will do.
10097 \end_layout
10098
10099 \begin_layout Section
10100 Broadway
10101 \end_layout
10102
10103 \begin_layout Standard
10104 by 
10105 \shape smallcaps
10106 Garst Reese
10107 \end_layout
10108
10109 \begin_layout Subsection
10110 Introduction
10111 \end_layout
10112
10113 \begin_layout Standard
10114 Broadway is for writing plays.
10115  The format is more decorative than Hollywood, and much less standardized.
10116  This format should be suitable for workshops.
10117 \end_layout
10118
10119 \begin_layout Subsection
10120 Special problems
10121 \end_layout
10122
10123 \begin_layout Standard
10124 The same as in Hollywood.
10125 \end_layout
10126
10127 \begin_layout Subsection
10128 Special features
10129 \end_layout
10130
10131 \begin_layout Standard
10132 Insert the 
10133 \family sans
10134 Speaker
10135 \family default
10136  names as labels then cross-reference the label to insert the name.
10137  The cross-reference dialog will show the current cast of characters.
10138 \end_layout
10139
10140 \begin_layout Subsection
10141 Paper size and Margins
10142 \end_layout
10143
10144 \begin_layout Standard
10145 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
10146 \end_layout
10147
10148 \begin_layout Subsection
10149 Environments
10150 \end_layout
10151
10152 \begin_layout Standard
10153 The following environments are available.
10154  You can use broadway.bind to get the bind keys shown at the right.
10155 \end_layout
10156
10157 \begin_layout Itemize
10158
10159 \family sans
10160 Standard
10161 \begin_inset Newline newline
10162 \end_inset
10163
10164
10165 \family default
10166 You should not have to use this, but it is here for anything that does not
10167  fit otherwise.
10168 \end_layout
10169
10170 \begin_layout Itemize
10171
10172 \family sans
10173 Narrative
10174 \begin_inset space \hfill{}
10175 \end_inset
10176
10177 M-z n
10178 \begin_inset Newline newline
10179 \end_inset
10180
10181
10182 \family default
10183 Used to describe stage setting and the action.
10184  First use of speaker names in all CAPs.
10185 \end_layout
10186
10187 \begin_layout Itemize
10188
10189 \family sans
10190 ACT
10191 \begin_inset space \hfill{}
10192 \end_inset
10193
10194 M-z a
10195 \begin_inset Newline newline
10196 \end_inset
10197
10198
10199 \family default
10200 Automatically numbered.
10201  On screen it will be arabic, but will print as Roman.
10202 \end_layout
10203
10204 \begin_layout Itemize
10205
10206 \family sans
10207 ACT*
10208 \begin_inset space \hfill{}
10209 \end_inset
10210
10211 M-z S at
10212 \begin_inset Newline newline
10213 \end_inset
10214
10215
10216 \family default
10217 Subtitle for 
10218 \family sans
10219 ACT.
10220
10221 \family default
10222  It is just centered text.
10223 \end_layout
10224
10225 \begin_layout Itemize
10226
10227 \family sans
10228 SCENE
10229 \begin_inset space \hfill{}
10230 \end_inset
10231
10232 M-z S-S
10233 \begin_inset Newline newline
10234 \end_inset
10235
10236
10237 \family default
10238 Not automatically numbered.
10239  You supply the number.
10240  This is because I couldn't figure out how.
10241 \end_layout
10242
10243 \begin_layout Itemize
10244
10245 \family sans
10246 AT_RISE:
10247 \begin_inset space \hfill{}
10248 \end_inset
10249
10250 M-z S-R
10251 \begin_inset Newline newline
10252 \end_inset
10253
10254
10255 \family default
10256 A special case of Narrative to describe the setting and action as the curtain
10257  rises.
10258 \end_layout
10259
10260 \begin_layout Itemize
10261
10262 \family sans
10263 Speaker
10264 \begin_inset space \hfill{}
10265 \end_inset
10266
10267 M-z s
10268 \begin_inset Newline newline
10269 \end_inset
10270
10271
10272 \family default
10273 The speaker's (actor's) title, centered in all CAPS.
10274 \end_layout
10275
10276 \begin_layout Itemize
10277
10278 \family sans
10279 Parenthetical
10280 \begin_inset space \hfill{}
10281 \end_inset
10282
10283 M-z p
10284 \begin_inset Newline newline
10285 \end_inset
10286
10287
10288 \family default
10289 Instructions to the speaker.
10290  The parentheses are automatically inserted.
10291  The ( will appear on screen, but both will be in the printed play.
10292  This environment is only used within 
10293 \family sans
10294 Dialogue
10295 \family default
10296 .
10297 \end_layout
10298
10299 \begin_layout Itemize
10300
10301 \family sans
10302 Dialogue
10303 \begin_inset space \hfill{}
10304 \end_inset
10305
10306 M-z d
10307 \begin_inset Newline newline
10308 \end_inset
10309
10310
10311 \family default
10312 What the Speaker says.
10313 \end_layout
10314
10315 \begin_layout Itemize
10316
10317 \family sans
10318 CURTAIN
10319 \begin_inset space \hfill{}
10320 \end_inset
10321
10322 M-z S-C
10323 \begin_inset Newline newline
10324 \end_inset
10325
10326
10327 \family default
10328 The curtain comes down.
10329 \end_layout
10330
10331 \begin_layout Itemize
10332
10333 \family sans
10334 Title
10335 \begin_inset space \hfill{}
10336 \end_inset
10337
10338 M-z S-T
10339 \end_layout
10340
10341 \begin_layout Itemize
10342
10343 \family sans
10344 Author
10345 \begin_inset space \hfill{}
10346 \end_inset
10347
10348 M-z S-A
10349 \end_layout
10350
10351 \begin_layout Itemize
10352
10353 \family sans
10354 Right_Address
10355 \begin_inset space \hfill{}
10356 \end_inset
10357
10358 M-z r
10359 \end_layout
10360
10361 \begin_layout Standard
10362 Hello there.
10363 \end_layout
10364
10365 \begin_layout Section
10366 Dinbrief
10367 \end_layout
10368
10369 \begin_layout Standard
10370 The document class 
10371 \family sans
10372 dinbrief
10373 \family default
10374  can be used to type letters according to German conventions.
10375  A template file is included in 
10376 \family typewriter
10377 .../lyx/share/templates
10378 \family default
10379  for you to use as a starting point.
10380 \end_layout
10381
10382 \begin_layout Section
10383 EGS journals (
10384 \family sans
10385 egs
10386 \family default
10387 )
10388 \end_layout
10389
10390 \begin_layout Standard
10391 by 
10392 \shape smallcaps
10393 Martin Vermeer
10394 \end_layout
10395
10396 \begin_layout Subsection
10397 Description
10398 \end_layout
10399
10400 \begin_layout Standard
10401 This is the layout file for the European Geophysical Society journals.
10402  The needed 
10403 \family typewriter
10404 egs.cls
10405 \family default
10406  can be downloaded from the web site of the EGS under 
10407 \begin_inset Flex URL
10408 status collapsed
10409
10410 \begin_layout Plain Layout
10411
10412 www.copernicus.org
10413 \end_layout
10414
10415 \end_inset
10416
10417 .
10418 \end_layout
10419
10420 \begin_layout Subsection
10421 New styles
10422 \end_layout
10423
10424 \begin_layout Standard
10425
10426 \family sans
10427 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
10428  Accepted
10429 \family default
10430
10431 \family sans
10432 Offsets
10433 \family default
10434 .
10435  The current layout file is unfortunately very unmodular and would benefit
10436  from using the various 
10437 \family typewriter
10438 std*.inc
10439 \family default
10440  file inclusions.
10441 \end_layout
10442
10443 \begin_layout Section
10444 Elsevier Journals
10445 \end_layout
10446
10447 \begin_layout Standard
10448 See the \SpecialChar LyX
10449  template file 
10450 \family typewriter
10451 elsarticle.lyx
10452 \family default
10453 .
10454  It contains all infos you need.
10455 \end_layout
10456
10457 \begin_layout Section
10458 Foils [aka 
10459 \family sans
10460 Foil\SpecialChar TeX
10461
10462 \family default
10463 ]
10464 \begin_inset CommandInset label
10465 LatexCommand label
10466 name "sec:foiltex"
10467
10468 \end_inset
10469
10470
10471 \end_layout
10472
10473 \begin_layout Standard
10474 by 
10475 \noun on
10476 Allan Rae
10477 \end_layout
10478
10479 \begin_layout Subsection
10480 Introduction
10481 \end_layout
10482
10483 \begin_layout Standard
10484 This section describes how to use \SpecialChar LyX
10485  to make slides for overhead projectors.
10486  There are two document classes that can do this: the default slides class
10487  and the 
10488 \family sans
10489 Foil\SpecialChar TeX
10490
10491 \family default
10492  slides class.
10493  This section documents the latter.
10494 \end_layout
10495
10496 \begin_layout Standard
10497 I'm going to say this again, nice and clear, so that there's no misunderstanding
10498 :
10499 \end_layout
10500
10501 \begin_layout Standard
10502 \begin_inset VSpace bigskip
10503 \end_inset
10504
10505
10506 \end_layout
10507
10508 \begin_layout Standard
10509 \align center
10510
10511 \size large
10512 This section documents the class 
10513 \begin_inset Quotes eld
10514 \end_inset
10515
10516
10517 \family sans
10518 FoilTeX
10519 \family default
10520
10521 \begin_inset Quotes erd
10522 \end_inset
10523
10524  
10525 \emph on
10526 only.
10527 \end_layout
10528
10529 \begin_layout Standard
10530 \begin_inset VSpace bigskip
10531 \end_inset
10532
10533
10534 \end_layout
10535
10536 \begin_layout Standard
10537 If you're looking for the documentation for 
10538 \begin_inset Quotes eld
10539 \end_inset
10540
10541
10542 \family sans
10543 slides (default)
10544 \family default
10545
10546 \begin_inset Quotes erd
10547 \end_inset
10548
10549 , check out section
10550 \begin_inset space ~
10551 \end_inset
10552
10553
10554 \begin_inset CommandInset ref
10555 LatexCommand ref
10556 reference "sec:slitex"
10557
10558 \end_inset
10559
10560 .
10561  If your machine doesn't have the 
10562 \family sans
10563 foils
10564 \family default
10565  class 
10566 \family sans
10567 FoilTeX
10568 \family default
10569  installed, you'll probably have to use the default 
10570 \family sans
10571 slides
10572 \family default
10573  class, which isn't quite as good as 
10574 \family sans
10575 foils.
10576 \end_layout
10577
10578 \begin_layout Standard
10579 The 
10580 \family sans
10581 foils
10582 \family default
10583  class is designed for use with version
10584 \begin_inset space ~
10585 \end_inset
10586
10587 2.1 of the 
10588 \family sans
10589 foils.cls
10590 \family default
10591  \SpecialChar LaTeX
10592  class file which is now an integral part of \SpecialChar LaTeX2e
10593 .
10594 \end_layout
10595
10596 \begin_layout Subsection
10597 Getting Started
10598 \end_layout
10599
10600 \begin_layout Standard
10601 Obviously, to use this document class, you need to select 
10602 \family sans
10603 FoilTeX
10604 \family default
10605  from the 
10606 \family sans
10607 Class
10608 \family default
10609  entry in the 
10610 \family sans
10611 Document
10612 \begin_inset space ~
10613 \end_inset
10614
10615 Layout
10616 \family default
10617  dialog.
10618  There are some settings in the 
10619 \family sans
10620 Document
10621 \begin_inset space ~
10622 \end_inset
10623
10624 Layout
10625 \family default
10626  dialog that you should know about that are specific to this class:
10627 \end_layout
10628
10629 \begin_layout Itemize
10630 Don't change the options 
10631 \family sans
10632 Sides
10633 \family default
10634  and 
10635 \family sans
10636 Columns
10637 \family default
10638  on the 
10639 \family sans
10640 Document
10641 \begin_inset space ~
10642 \end_inset
10643
10644 Layout
10645 \family default
10646  dialog.
10647  They're ignored by the 
10648 \family sans
10649 foils
10650 \family default
10651  class.
10652 \end_layout
10653
10654 \begin_layout Itemize
10655 The default font size is 20
10656 \begin_inset space \thinspace{}
10657 \end_inset
10658
10659 pt with the other options being 17
10660 \begin_inset space \thinspace{}
10661 \end_inset
10662
10663 pt, 25
10664 \begin_inset space \thinspace{}
10665 \end_inset
10666
10667 pt and 30
10668 \begin_inset space \thinspace{}
10669 \end_inset
10670
10671 pt.
10672 \end_layout
10673
10674 \begin_layout Itemize
10675 The default font is 
10676 \family sans
10677 sans
10678 \family default
10679  
10680 \family sans
10681 serif
10682 \family default
10683  but all math equations are still typeset in the usual roman font.
10684 \end_layout
10685
10686 \begin_layout Itemize
10687
10688 \family sans
10689 Foil\SpecialChar TeX
10690
10691 \family default
10692  supports A4 and Letter paper sizes as well as a special size for working
10693  with 35
10694 \begin_inset space \thinspace{}
10695 \end_inset
10696
10697 mm slides.
10698  It doesn't support A5, B5, legal or executive paper sizes.
10699 \end_layout
10700
10701 \begin_layout Itemize
10702 Don't bother changing the 
10703 \family sans
10704 Float Placement
10705 \family default
10706  settings because they are ignored anyway.
10707  All floats appear where they are defined in the text.
10708 \end_layout
10709
10710 \begin_layout Itemize
10711 The 
10712 \family sans
10713 Pagestyle
10714 \family default
10715  setting behaves a bit differently for this class.
10716  
10717 \family sans
10718 Foil\SpecialChar TeX
10719
10720 \family default
10721  provides extensive footer and header capabilities including a user-defined
10722  logo.
10723  See section
10724 \begin_inset space ~
10725 \end_inset
10726
10727
10728 \begin_inset CommandInset ref
10729 LatexCommand ref
10730 reference "sec:foilfoot"
10731
10732 \end_inset
10733
10734  for more details.
10735  The title page is treated differently to all other pages in the document
10736  and is 
10737 \emph on
10738 always
10739 \emph default
10740  unnumbered and 
10741 \emph on
10742 always
10743 \emph default
10744  has the logo centered at the bottom of the page (if one is defined).
10745  The possible page style choices and what they do are as follows:
10746 \end_layout
10747
10748 \begin_deeper
10749 \begin_layout Labeling
10750 \labelwidthstring MMMMMMM
10751
10752 \family sans
10753 \series bold
10754 empty
10755 \family default
10756 \series default
10757  The final output contains no page numbers, or other headers or footers
10758  (except footnotes of course).
10759  
10760 \end_layout
10761
10762 \begin_layout Labeling
10763 \labelwidthstring MMMMMMM
10764
10765 \family sans
10766 \series bold
10767 plain
10768 \family default
10769 \series default
10770  The final output contains page numbers centered at the bottom of the page.
10771  No other headings or footers (other than footnotes).
10772 \end_layout
10773
10774 \begin_layout Labeling
10775 \labelwidthstring MMMMMMM
10776
10777 \series bold
10778 foilheadings
10779 \series default
10780  Page numbers in lower right corner.
10781  Additional headers and footers are also shown.
10782  This is also the default.
10783 \end_layout
10784
10785 \begin_layout Labeling
10786 \labelwidthstring MMMMMMM
10787
10788 \series bold
10789 fancy
10790 \series default
10791  Gives you access to the 
10792 \family sans
10793 fancyheadings
10794 \family default
10795  package although its use with 
10796 \family sans
10797 Foil\SpecialChar TeX
10798
10799 \family default
10800  is discouraged by the writer of the 
10801 \family sans
10802 Foil\SpecialChar TeX
10803
10804 \family default
10805  package because of some potential page layout clashes.
10806 \end_layout
10807
10808 \end_deeper
10809 \begin_layout Subsubsection
10810 Extra Options
10811 \end_layout
10812
10813 \begin_layout Standard
10814 The following options may be used in the extra class options in the 
10815 \family sans
10816 Document\SpecialChar menuseparator
10817 Settings
10818 \family default
10819  dialog.
10820 \end_layout
10821
10822 \begin_layout Labeling
10823 \labelwidthstring MMMMMMx
10824
10825 \series bold
10826 35mmSlide
10827 \series default
10828  This sets up the page layout for 7.33
10829 \begin_inset space \thinspace{}
10830 \end_inset
10831
10832 in by 11
10833 \begin_inset space \thinspace{}
10834 \end_inset
10835
10836 in paper, which is about the same aspect ratio as a 35
10837 \begin_inset space \thinspace{}
10838 \end_inset
10839
10840 mm slide, making it a bit easier to work with this medium.
10841 \end_layout
10842
10843 \begin_layout Labeling
10844 \labelwidthstring MMMMMMx
10845
10846 \series bold
10847 headrule
10848 \series default
10849  Places a rule across the page below the header on every page except the
10850  title page.
10851 \end_layout
10852
10853 \begin_layout Labeling
10854 \labelwidthstring MMMMMMx
10855
10856 \series bold
10857 footrule
10858 \series default
10859  Places a rule across the page above the footer on every page except the
10860  title page.
10861 \end_layout
10862
10863 \begin_layout Labeling
10864 \labelwidthstring MMMMMMx
10865
10866 \series bold
10867 dvips
10868 \series default
10869  This is automatically set each time you create a new 
10870 \family sans
10871 foils
10872 \family default
10873  document.
10874  This option tells 
10875 \family sans
10876 Foil\SpecialChar TeX
10877
10878 \family default
10879  to use the dvips driver to rotate those pages that are set as landscape
10880  foils.
10881 \end_layout
10882
10883 \begin_layout Labeling
10884 \labelwidthstring MMMMMMx
10885
10886 \series bold
10887 landscape
10888 \series default
10889  Simply changes the page dimensions to those of a landscape page but doesn't
10890  do any rotation.
10891  Thus if you use this option you need to use an external program to rotate
10892  each page or feed your paper through your printer as landscape.
10893  Note that this option effectively reverses the roles of the 
10894 \family sans
10895 Foilhead
10896 \family default
10897  and 
10898 \family sans
10899 Rotatefoilhead
10900 \family default
10901  environments (don't worry these are described in the next section).
10902 \end_layout
10903
10904 \begin_layout Labeling
10905 \labelwidthstring MMMMMMx
10906
10907 \series bold
10908 leqno
10909 \series default
10910  Equation numbers on the left.
10911 \end_layout
10912
10913 \begin_layout Labeling
10914 \labelwidthstring MMMMMMx
10915
10916 \series bold
10917 fleqn
10918 \series default
10919  Flush-left equations.
10920 \end_layout
10921
10922 \begin_layout Subsection
10923 Supported Environments
10924 \end_layout
10925
10926 \begin_layout Standard
10927 Most of the environments commonly supported in other classes are also supported
10928  by the 
10929 \family sans
10930 foils
10931 \family default
10932  class.
10933  There are several additional environments provided by 
10934 \family sans
10935 Foil\SpecialChar TeX
10936
10937 \family default
10938  as well as a couple added by \SpecialChar LyX
10939 .
10940  The following environments are shared with other classes:
10941 \end_layout
10942
10943 \begin_layout Standard
10944 \begin_inset Flex Multiple Columns
10945 status open
10946
10947 \begin_layout Itemize
10948
10949 \family sans
10950 Standard
10951 \end_layout
10952
10953 \begin_layout Itemize
10954
10955 \family sans
10956 Itemize
10957 \end_layout
10958
10959 \begin_layout Itemize
10960
10961 \family sans
10962 Enumerate
10963 \end_layout
10964
10965 \begin_layout Itemize
10966
10967 \family sans
10968 Description
10969 \end_layout
10970
10971 \begin_layout Itemize
10972
10973 \family sans
10974 List
10975 \end_layout
10976
10977 \begin_layout Itemize
10978
10979 \family sans
10980 \SpecialChar LyX
10981 -Code
10982 \end_layout
10983
10984 \begin_layout Itemize
10985
10986 \family sans
10987 Verse
10988 \end_layout
10989
10990 \begin_layout Itemize
10991
10992 \family sans
10993 Quote
10994 \end_layout
10995
10996 \begin_layout Itemize
10997
10998 \family sans
10999 Quotation
11000 \end_layout
11001
11002 \begin_layout Itemize
11003
11004 \family sans
11005 Title
11006 \end_layout
11007
11008 \begin_layout Itemize
11009
11010 \family sans
11011 Author
11012 \end_layout
11013
11014 \begin_layout Itemize
11015
11016 \family sans
11017 Date
11018 \end_layout
11019
11020 \begin_layout Itemize
11021
11022 \family sans
11023 Abstract
11024 \end_layout
11025
11026 \begin_layout Itemize
11027
11028 \family sans
11029 Bibliography
11030 \end_layout
11031
11032 \begin_layout Itemize
11033
11034 \family sans
11035 Address
11036 \end_layout
11037
11038 \begin_layout Itemize
11039
11040 \family sans
11041 RightAddress
11042 \end_layout
11043
11044 \begin_layout Itemize
11045
11046 \family sans
11047 Caption
11048 \end_layout
11049
11050 \begin_layout Itemize
11051
11052 \family sans
11053 Comment
11054 \end_layout
11055
11056 \end_inset
11057
11058
11059 \end_layout
11060
11061 \begin_layout Standard
11062 That is, all the major environments apart from the sectioning environments.
11063  Since foils are essentially self-contained sections, with a title and body,
11064  
11065 \family sans
11066 Foil\SpecialChar TeX
11067
11068 \family default
11069  provides specific commands for starting new foils and these are:
11070 \end_layout
11071
11072 \begin_layout Itemize
11073
11074 \family sans
11075 Foilhead
11076 \end_layout
11077
11078 \begin_layout Itemize
11079
11080 \family sans
11081 Rotatefoilhead
11082 \end_layout
11083
11084 \begin_layout Standard
11085 \SpecialChar LyX
11086  also provides slightly modified versions of these two environments called:
11087 \end_layout
11088
11089 \begin_layout Itemize
11090
11091 \family sans
11092 ShortFoilhead
11093 \end_layout
11094
11095 \begin_layout Itemize
11096
11097 \family sans
11098 ShortRotatefoilhead
11099 \end_layout
11100
11101 \begin_layout Standard
11102 and the differences will be explained in the next section.
11103 \end_layout
11104
11105 \begin_layout Standard
11106 Since foils are often used in presenting ideas or new theorems and such
11107  
11108 \family sans
11109 Foil\SpecialChar TeX
11110
11111 \family default
11112  also provides a comprehensive box of goodies for presenting them:
11113 \end_layout
11114
11115 \begin_layout Standard
11116 \begin_inset Flex Multiple Columns
11117 status open
11118
11119 \begin_layout Itemize
11120
11121 \family sans
11122 Theorem
11123 \end_layout
11124
11125 \begin_layout Itemize
11126
11127 \family sans
11128 Lemma
11129 \end_layout
11130
11131 \begin_layout Itemize
11132
11133 \family sans
11134 Corollary
11135 \end_layout
11136
11137 \begin_layout Itemize
11138
11139 \family sans
11140 Proposition
11141 \end_layout
11142
11143 \begin_layout Itemize
11144
11145 \family sans
11146 Definition
11147 \end_layout
11148
11149 \begin_layout Itemize
11150
11151 \family sans
11152 Proof
11153 \end_layout
11154
11155 \begin_layout Itemize
11156
11157 \family sans
11158 Theorem*
11159 \end_layout
11160
11161 \begin_layout Itemize
11162
11163 \family sans
11164 Lemma*
11165 \end_layout
11166
11167 \begin_layout Itemize
11168
11169 \family sans
11170 Corollary*
11171 \end_layout
11172
11173 \begin_layout Itemize
11174
11175 \family sans
11176 Proposition*
11177 \end_layout
11178
11179 \begin_layout Itemize
11180
11181 \family sans
11182 Definition*
11183 \end_layout
11184
11185 \end_inset
11186
11187
11188 \end_layout
11189
11190 \begin_layout Standard
11191 The starred versions are unnumbered while the unstarred versions are numbered.
11192  There are also two list environments added by \SpecialChar LyX
11193  and these are:
11194 \end_layout
11195
11196 \begin_layout Itemize
11197
11198 \family sans
11199 TickList
11200 \end_layout
11201
11202 \begin_layout Itemize
11203
11204 \family sans
11205 CrossList
11206 \end_layout
11207
11208 \begin_layout Standard
11209
11210 \family sans
11211 Foil\SpecialChar TeX
11212
11213 \family default
11214  provides some powerful header and footer capabilities that are best set
11215  in the preamble although they may be set at any point in a document.
11216  If you want to change these settings in your document the best place to
11217  do so is at the very top of a foil, i.
11218 \begin_inset space \thinspace{}
11219 \end_inset
11220
11221 e.
11222 \emph on
11223
11224 \begin_inset space \space{}
11225 \end_inset
11226
11227
11228 \emph default
11229 straight after the foilhead.
11230 \end_layout
11231
11232 \begin_layout Standard
11233 For this purpose, the following command styles are provided [
11234 \shape smallcaps
11235 Martin Vermeer
11236 \shape default
11237 ]:
11238 \end_layout
11239
11240 \begin_layout Standard
11241 \begin_inset Flex Multiple Columns
11242 status open
11243
11244 \begin_layout Itemize
11245
11246 \family sans
11247 My
11248 \begin_inset space ~
11249 \end_inset
11250
11251 Logo
11252 \end_layout
11253
11254 \begin_layout Itemize
11255
11256 \family sans
11257 Restriction
11258 \end_layout
11259
11260 \begin_layout Itemize
11261
11262 \family sans
11263 Right
11264 \begin_inset space ~
11265 \end_inset
11266
11267 Footer
11268 \end_layout
11269
11270 \begin_layout Itemize
11271
11272 \family sans
11273 Right
11274 \begin_inset space ~
11275 \end_inset
11276
11277 Header
11278 \end_layout
11279
11280 \begin_layout Itemize
11281
11282 \family sans
11283 Left
11284 \begin_inset space ~
11285 \end_inset
11286
11287 Header
11288 \end_layout
11289
11290 \begin_deeper
11291 \begin_layout Plain Layout
11292 \begin_inset space ~
11293 \end_inset
11294
11295
11296 \end_layout
11297
11298 \end_deeper
11299 \end_inset
11300
11301
11302 \end_layout
11303
11304 \begin_layout Standard
11305 There are also a few commands provided by 
11306 \family sans
11307 Foil\SpecialChar TeX
11308
11309 \family default
11310  that aren't directly supported by \SpecialChar LyX
11311  but I'll tell you what they do and how
11312  to use them in section
11313 \begin_inset space ~
11314 \end_inset
11315
11316
11317 \begin_inset CommandInset ref
11318 LatexCommand ref
11319 reference "sec:unsuppfoils"
11320
11321 \end_inset
11322
11323 .
11324 \end_layout
11325
11326 \begin_layout Subsection
11327 Building a Set of Foils
11328 \end_layout
11329
11330 \begin_layout Standard
11331 This section will give a simple introduction to using the different environments
11332  to build a set of foils.
11333  If you want to see an example set of foils, take a look at the 
11334 \family typewriter
11335 Foils.lyx
11336 \family default
11337  file you find in \SpecialChar LyX
11338 's 
11339 \family typewriter
11340 examples
11341 \family default
11342  folder.
11343 \end_layout
11344
11345 \begin_layout Subsubsection
11346 Give It a Title Page
11347 \end_layout
11348
11349 \begin_layout Standard
11350 Unlike other classes that provide 
11351 \family sans
11352 Title
11353 \family default
11354
11355 \family sans
11356 Author
11357 \family default
11358
11359 \family sans
11360 Date
11361 \family default
11362  and 
11363 \family sans
11364 Abstract
11365 \family default
11366  environments, 
11367 \family sans
11368 foils
11369 \family default
11370  creates the title on a page of its own.
11371  If you leave out the 
11372 \family sans
11373 Date
11374 \family default
11375  environment \SpecialChar LaTeX
11376  will substitute the current date (every time you regenerate
11377  the output).
11378 \end_layout
11379
11380 \begin_layout Subsubsection
11381 Start a New Foil
11382 \end_layout
11383
11384 \begin_layout Standard
11385 As I mentioned earlier, there are four ways of starting a new foil.
11386  For portrait foils you should use 
11387 \family sans
11388 Foilhead
11389 \family default
11390  or 
11391 \family sans
11392 ShortFoilhead.
11393
11394 \family default
11395  The difference between these two environments is the amount of space between
11396  the title of the foil (the foilhead) and the body of the foil.
11397 \end_layout
11398
11399 \begin_layout Standard
11400 Landscape foils are generated using the 
11401 \family sans
11402 Rotatefoilhead
11403 \family default
11404  and 
11405 \family sans
11406 ShortRotatefoilhead
11407 \family default
11408  environments.
11409  Again the only difference is the spacing between foilhead and body.
11410  Both of the short versions have 0.5
11411 \begin_inset space ~
11412 \end_inset
11413
11414 inches less separation between the foilhead and the body.
11415  
11416 \end_layout
11417
11418 \begin_layout Standard
11419 One problem with the support for landscape foils is the requirement that
11420  you have to use the 
11421 \family typewriter
11422 dvips
11423 \family default
11424  driver to generate the PostScript output otherwise the foils won't be rotated.
11425  It is possible to get landscape foils even if you haven't got the 
11426 \family typewriter
11427 dvips
11428 \family default
11429  driver provided you can feed your foils sideways through your printer ;-)
11430 \end_layout
11431
11432 \begin_layout Subsubsection
11433 Theorems, Lemmas, Proofs and more
11434 \end_layout
11435
11436 \begin_layout Standard
11437 Due to a small bug in \SpecialChar LyX
11438  you can't have two of the same type of these environments
11439  directly following each other.
11440  They must be separated by something.
11441  If you try, you will just be extending the previous environment as if you
11442  had merged the two environments together.
11443  So, how do you get around this problem? The simplest option is to insert
11444  some text between the two environments or add a 
11445 \family sans
11446 \SpecialChar LaTeX
11447
11448 \family default
11449  environment between the two with just a 
11450 \begin_inset Quotes eld
11451 \end_inset
11452
11453
11454 \family typewriter
11455 %
11456 \family default
11457
11458 \begin_inset Quotes erd
11459 \end_inset
11460
11461  in it.
11462  This will force \SpecialChar LyX
11463  to produce two separate environments and hence the correct
11464  \SpecialChar LaTeX
11465  output.
11466  An example is provided in the example file included with the \SpecialChar LyX
11467  distribution.
11468  Remember, this problem only occurs if you are trying to place two of the
11469  same type of theorem-like environments one directly after the other.
11470 \end_layout
11471
11472 \begin_layout Subsubsection
11473 Lists
11474 \end_layout
11475
11476 \begin_layout Standard
11477 You get all the commonly supported list styles found in other classes as
11478  well as two new ones.
11479  I'll only describe the new ones here.
11480  If you want to find out more about the other list environments check out
11481  the 
11482 \emph on
11483 User's Guide.
11484
11485 \emph default
11486  If you intend to use itemized lists you might also want to read about the
11487  
11488 \family sans
11489 Itemize
11490 \begin_inset space ~
11491 \end_inset
11492
11493 Bullet
11494 \begin_inset space ~
11495 \end_inset
11496
11497 Selection
11498 \family default
11499  dialog described above in section
11500 \begin_inset space ~
11501 \end_inset
11502
11503
11504 \begin_inset CommandInset ref
11505 LatexCommand ref
11506 reference "sec:bullet"
11507
11508 \end_inset
11509
11510 .
11511 \end_layout
11512
11513 \begin_layout Standard
11514 The two new list styles, 
11515 \family sans
11516 TickList
11517 \family default
11518  and 
11519 \family sans
11520 CrossList
11521 \family default
11522 , are designed to make it easier for you to create lists of do's and don'ts
11523  or right and wrong by providing dedicated environments that use a tick
11524  or a cross as the label of the list.
11525  These lists are in fact dedicated variants of the 
11526 \family sans
11527 Itemize
11528 \family default
11529  environment.
11530  They do however require that you have the 
11531 \family typewriter
11532 psnfss
11533 \family default
11534  packages installed.
11535 \end_layout
11536
11537 \begin_layout Subsubsection
11538 Figures and Tables
11539 \end_layout
11540
11541 \begin_layout Standard
11542
11543 \family sans
11544 Foil\SpecialChar TeX
11545
11546 \family default
11547  redefines the floating tables and figures so that they appear exactly where
11548  they are in the text rather than pushing them to the top of the page or
11549  to some user specified location.
11550  In fact if you change the float placement settings they are simply ignored.
11551 \end_layout
11552
11553 \begin_layout Subsubsection
11554 Page Headers and Footers
11555 \begin_inset CommandInset label
11556 LatexCommand label
11557 name "sec:foilfoot"
11558
11559 \end_inset
11560
11561
11562 \end_layout
11563
11564 \begin_layout Standard
11565
11566 \family sans
11567 My
11568 \begin_inset space ~
11569 \end_inset
11570
11571 Logo
11572 \family default
11573  and 
11574 \family sans
11575 Restriction
11576 \family default
11577  are two commands used to control the left-footer text string.
11578  The first is meant to allow you to include a graphic logo on your foils
11579  and defaults to 
11580 \begin_inset Quotes eld
11581 \end_inset
11582
11583 -Typeset by 
11584 \family sans
11585 Foil\SpecialChar TeX
11586
11587 \family default
11588 -
11589 \begin_inset Quotes erd
11590 \end_inset
11591
11592 .
11593  While the second is meant to provide a classification for the audience,
11594  
11595 \emph on
11596 e.
11597 \begin_inset space \thinspace{}
11598 \end_inset
11599
11600 g.
11601 \emph default
11602
11603 \begin_inset space \space{}
11604 \end_inset
11605
11606 Confidential.
11607  It is empty by default.
11608 \end_layout
11609
11610 \begin_layout Standard
11611 The remaining page corners can be filled by 
11612 \family sans
11613 Right
11614 \begin_inset space ~
11615 \end_inset
11616
11617 Footer
11618 \family default
11619  (which defaults to page numbers), 
11620 \family sans
11621 Right
11622 \begin_inset space ~
11623 \end_inset
11624
11625 Header
11626 \family default
11627  (top right) and 
11628 \family sans
11629 Left
11630 \begin_inset space ~
11631 \end_inset
11632
11633 Header
11634 \family default
11635  (top left).
11636 \end_layout
11637
11638 \begin_layout Subsection
11639 Unsupported 
11640 \family sans
11641 Foil\SpecialChar TeX
11642
11643 \family default
11644  Goodies
11645 \begin_inset CommandInset label
11646 LatexCommand label
11647 name "sec:unsuppfoils"
11648
11649 \end_inset
11650
11651
11652 \end_layout
11653
11654 \begin_layout Standard
11655 All the commands mentioned below need to be set in a 
11656 \family sans
11657 \SpecialChar LaTeX
11658
11659 \family default
11660  environment or as 
11661 \family sans
11662 \SpecialChar TeX
11663
11664 \family default
11665  within another environment.
11666 \end_layout
11667
11668 \begin_layout Subsubsection
11669 Lengths
11670 \end_layout
11671
11672 \begin_layout Standard
11673 All lengths are adjusted using the 
11674 \family typewriter
11675
11676 \backslash
11677 setlength{
11678 \family default
11679 \emph on
11680 lengthname
11681 \family typewriter
11682 \emph default
11683 }{
11684 \family default
11685 \emph on
11686 newlength
11687 \family typewriter
11688 \emph default
11689 }
11690 \family default
11691  command.
11692  Where 
11693 \emph on
11694 lengthname
11695 \emph default
11696  should be replaced by the name given to the length you want to change and
11697  
11698 \emph on
11699 newlength
11700 \emph default
11701  is the length value.
11702  All lengths should be specified in units of length such as inches (
11703 \family typewriter
11704 in
11705 \family default
11706 ), millimeters (
11707 \family typewriter
11708 mm
11709 \family default
11710 ) or points (
11711 \family typewriter
11712 pt
11713 \family default
11714 ) or relative to some document or font-based length such as 
11715 \family typewriter
11716
11717 \backslash
11718 textwidth
11719 \family default
11720 .
11721  
11722 \end_layout
11723
11724 \begin_layout Standard
11725 It's possible to change the spacing between a foilhead and the body of the
11726  foil by adjusting the length specified by 
11727 \family typewriter
11728
11729 \backslash
11730 foilheadskip
11731 \family default
11732 .
11733  For example, to make 
11734 \emph on
11735 all
11736 \emph default
11737  foilheads 0.5
11738 \begin_inset space \space{}
11739 \end_inset
11740
11741 in closer to their bodies put the following in the preamble: 
11742 \family typewriter
11743
11744 \backslash
11745 setlength{
11746 \backslash
11747 foilheadskip}{-0.5in}
11748 \end_layout
11749
11750 \begin_layout Standard
11751 The spacings around floats can be adjusted by setting these lengths:
11752 \end_layout
11753
11754 \begin_layout Labeling
11755 \labelwidthstring MMMMMMMMMMM
11756
11757 \family typewriter
11758
11759 \backslash
11760 abovefloatskip
11761 \family default
11762  Separation between the text and the top of the float
11763 \end_layout
11764
11765 \begin_layout Labeling
11766 \labelwidthstring MMMMMMMMMMM
11767
11768 \family typewriter
11769
11770 \backslash
11771 abovecaptionskip
11772 \family default
11773  Separation between the float and the caption
11774 \end_layout
11775
11776 \begin_layout Labeling
11777 \labelwidthstring MMMMMMMMMMM
11778
11779 \family typewriter
11780
11781 \backslash
11782 belowcaptionskip
11783 \family default
11784  Separation between the caption and the following text
11785 \end_layout
11786
11787 \begin_layout Labeling
11788 \labelwidthstring MMMMMMMMMMM
11789
11790 \family typewriter
11791
11792 \backslash
11793 captionwidth
11794 \family default
11795  You can make the captions narrower than the surrounding text by adjusting
11796  this length.
11797  Best done relative to 
11798 \family typewriter
11799
11800 \backslash
11801 textwidth
11802 \family default
11803 .
11804 \end_layout
11805
11806 \begin_layout Standard
11807 There are also several title page related lengths that you may find useful
11808  if you have a long title or several authors:
11809 \end_layout
11810
11811 \begin_layout Labeling
11812 \labelwidthstring MMMMMMMMMMM
11813
11814 \family typewriter
11815
11816 \backslash
11817 abovetitleskip
11818 \family default
11819  Separation from headers to 
11820 \family sans
11821 Title
11822 \end_layout
11823
11824 \begin_layout Labeling
11825 \labelwidthstring MMMMMMMMMMM
11826
11827 \family typewriter
11828
11829 \backslash
11830 titleauthorskip
11831 \family default
11832  between 
11833 \family sans
11834 Title
11835 \family default
11836  and 
11837 \family sans
11838 Author
11839 \family default
11840  environments
11841 \end_layout
11842
11843 \begin_layout Labeling
11844 \labelwidthstring MMMMMMMMMMM
11845
11846 \family typewriter
11847
11848 \backslash
11849 authorauthorskip
11850 \family default
11851  between multiple 
11852 \family sans
11853 Author
11854 \family default
11855  lines
11856 \end_layout
11857
11858 \begin_layout Labeling
11859 \labelwidthstring MMMMMMMMMMM
11860
11861 \family typewriter
11862
11863 \backslash
11864 authordateskip
11865 \family default
11866  between the 
11867 \family sans
11868 Author
11869 \family default
11870  and the 
11871 \family sans
11872 Date
11873 \end_layout
11874
11875 \begin_layout Labeling
11876 \labelwidthstring MMMMMMMMMMM
11877
11878 \family typewriter
11879
11880 \backslash
11881 dateabstractskip
11882 \family default
11883  between the 
11884 \family sans
11885 Date
11886 \family default
11887  and the 
11888 \family sans
11889 Abstract
11890 \end_layout
11891
11892 \begin_layout Standard
11893 The last length related command affects all the list environments.
11894  If you place 
11895 \family typewriter
11896
11897 \backslash
11898 zerolistvertdimens
11899 \family default
11900  
11901 \emph on
11902 inside
11903 \emph default
11904  a list environment then all the vertical spacing between the list items
11905  is removed.
11906  Note that this is a command not a length so it doesn't require 
11907 \family typewriter
11908
11909 \backslash
11910 setlength
11911 \family default
11912  like the stuff mentioned above.
11913 \end_layout
11914
11915 \begin_layout Subsubsection
11916 Headers and Footers
11917 \end_layout
11918
11919 \begin_layout Standard
11920 The 
11921 \family typewriter
11922
11923 \backslash
11924 LogoOn
11925 \family default
11926  and 
11927 \family typewriter
11928
11929 \backslash
11930 LogoOff
11931 \family default
11932  commands control whether the logo in the 
11933 \family sans
11934 MyLogo
11935 \family default
11936  definition appear on a given page.
11937  If you put 
11938 \family typewriter
11939
11940 \backslash
11941 LogoOff
11942 \family default
11943  in the preamble then none of the foils will have the logo on them.
11944  If you don't want the logo on a particular page place the 
11945 \family typewriter
11946
11947 \backslash
11948 LogoOff
11949 \family default
11950  directly after the foilhead of that page and the 
11951 \family typewriter
11952
11953 \backslash
11954 LogoOn
11955 \family default
11956  directly after the next foilhead.
11957 \end_layout
11958
11959 \begin_layout Standard
11960 If you decide to use the 
11961 \family sans
11962 fancy
11963 \family default
11964  page style setting in the 
11965 \family sans
11966 Document
11967 \begin_inset space ~
11968 \end_inset
11969
11970 Layout
11971 \family default
11972  dialog you should probably add 
11973 \family typewriter
11974
11975 \backslash
11976 let
11977 \backslash
11978 headwidth
11979 \backslash
11980 textwidth
11981 \family default
11982  to your preamble so headers and footers on landscape pages are correctly
11983  placed when rotated.
11984  This is due to some clashes between the page layouts provided by the 
11985 \family sans
11986 fancyheadings
11987 \family default
11988  package and the 
11989 \family sans
11990 foils
11991 \family default
11992  class.
11993 \end_layout
11994
11995 \begin_layout Section
11996 Hollywood (Hollywood spec scripts)
11997 \end_layout
11998
11999 \begin_layout Standard
12000 by 
12001 \shape smallcaps
12002 Garst Reese
12003 \end_layout
12004
12005 \begin_layout Subsection
12006 Introduction
12007 \end_layout
12008
12009 \begin_layout Standard
12010 Getting the format of a Hollywood script right is a 
12011 \begin_inset Quotes eld
12012 \end_inset
12013
12014 rite of passage.
12015 \begin_inset Quotes erd
12016 \end_inset
12017
12018  It is designed to make the readers focus on content and to be easy and
12019  familiar for the actors to read.
12020  Each page of a script should be one minute of film.
12021  Nothing goes in a script that you cannot see or hear on screen.
12022  The courier 12 pt font should be used throughout.
12023  No italics.
12024 \end_layout
12025
12026 \begin_layout Subsection
12027 Special problems
12028 \end_layout
12029
12030 \begin_layout Standard
12031 Speakers' lines should NEVER break in mid-sentence.
12032  If a speaker's lines continue over a page break, repeat the 
12033 \family sans
12034 Speaker
12035 \family default
12036  title followed by (Cont'd).
12037 \end_layout
12038
12039 \begin_layout Subsection
12040 Special features
12041 \end_layout
12042
12043 \begin_layout Standard
12044 Insert the 
12045 \family sans
12046 Speaker
12047 \family default
12048  names as labels then cross-reference the label to insert the name.
12049  The cross-reference dialog will show the current cast of characters.
12050  You can use this to insert the speaker name in narratives also.
12051 \end_layout
12052
12053 \begin_layout Subsection
12054 Paper size and Margins
12055 \end_layout
12056
12057 \begin_layout Standard
12058 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
12059 \end_layout
12060
12061 \begin_layout Subsection
12062 Environments
12063 \end_layout
12064
12065 \begin_layout Standard
12066 The following environments are available.
12067  You can use hollywood.bind to get the bind keys shown at the right.
12068 \end_layout
12069
12070 \begin_layout Itemize
12071
12072 \family sans
12073 Standard
12074 \begin_inset Newline newline
12075 \end_inset
12076
12077
12078 \family default
12079 Used where nothing else works.
12080  Try to avoid it.
12081 \end_layout
12082
12083 \begin_layout Itemize
12084
12085 \family sans
12086 FADE_IN
12087 \family default
12088 :
12089 \begin_inset space \hfill{}
12090 \end_inset
12091
12092
12093 \family sans
12094 M-z S-I
12095 \family default
12096
12097 \begin_inset Newline newline
12098 \end_inset
12099
12100 Usually followed by something like 
12101 \begin_inset Quotes eld
12102 \end_inset
12103
12104 on Sally waking up.
12105 \begin_inset Quotes erd
12106 \end_inset
12107
12108
12109 \end_layout
12110
12111 \begin_layout Itemize
12112
12113 \family sans
12114 INT:
12115 \begin_inset space \hfill{}
12116 \end_inset
12117
12118 M-z i
12119 \begin_inset Newline newline
12120 \end_inset
12121
12122
12123 \family default
12124 Introduces a new INTERIOR camera set-up.
12125  Always followed by DAY or NIGHT, or something similar to define the lighting
12126  required.
12127  Everthing on this line in CAPS.
12128 \end_layout
12129
12130 \begin_layout Itemize
12131
12132 \family sans
12133 EXT:
12134 \begin_inset space \hfill{}
12135 \end_inset
12136
12137 M-z e
12138 \begin_inset Newline newline
12139 \end_inset
12140
12141
12142 \family default
12143 Introduces a new EXTERIOR camera set-up.
12144  Everthing on this line in CAPS.
12145 \end_layout
12146
12147 \begin_layout Itemize
12148
12149 \family sans
12150 Speaker
12151 \begin_inset space \hfill{}
12152 \end_inset
12153
12154 M-z s
12155 \begin_inset Newline newline
12156 \end_inset
12157
12158
12159 \family default
12160 The character speaking.
12161 \end_layout
12162
12163 \begin_layout Itemize
12164
12165 \family sans
12166 Parenthetical
12167 \begin_inset space \hfill{}
12168 \end_inset
12169
12170 M-z p
12171 \begin_inset Newline newline
12172 \end_inset
12173
12174
12175 \family default
12176 Instructions to the speaker.
12177  The () are automatically inserted, but only the ( will show in \SpecialChar LyX
12178 .
12179  Both will be printed.
12180 \end_layout
12181
12182 \begin_layout Itemize
12183
12184 \family sans
12185 Dialogue
12186 \begin_inset space \hfill{}
12187 \end_inset
12188
12189 M-z d
12190 \begin_inset Newline newline
12191 \end_inset
12192
12193
12194 \family default
12195 What the 
12196 \family sans
12197 Speaker
12198 \family default
12199  says.
12200 \end_layout
12201
12202 \begin_layout Itemize
12203
12204 \family sans
12205 Transition
12206 \begin_inset space \hfill{}
12207 \end_inset
12208
12209 M-z t
12210 \begin_inset Newline newline
12211 \end_inset
12212
12213
12214 \family default
12215 Camera movement instruction.
12216  e.
12217 \begin_inset space \thinspace{}
12218 \end_inset
12219
12220 g.
12221 \begin_inset space \space{}
12222 \end_inset
12223
12224 CUT TO:
12225 \end_layout
12226
12227 \begin_layout Itemize
12228
12229 \family sans
12230 FADE OUT:
12231 \begin_inset space \hfill{}
12232 \end_inset
12233
12234 M-z S-I
12235 \end_layout
12236
12237 \begin_layout Itemize
12238
12239 \family sans
12240 Author
12241 \begin_inset space \hfill{}
12242 \end_inset
12243
12244 M-z S-A
12245 \end_layout
12246
12247 \begin_layout Itemize
12248
12249 \family sans
12250 Title
12251 \begin_inset space \hfill{}
12252 \end_inset
12253
12254 M-z S-T
12255 \end_layout
12256
12257 \begin_layout Itemize
12258
12259 \family sans
12260 Right_Address
12261 \begin_inset space \hfill{}
12262 \end_inset
12263
12264 M-z r
12265 \end_layout
12266
12267 \begin_layout Subsection
12268 Script jargon
12269 \end_layout
12270
12271 \begin_layout Itemize
12272 (O.S) — off screen
12273 \end_layout
12274
12275 \begin_layout Itemize
12276 (V.0) — voice over
12277 \end_layout
12278
12279 \begin_layout Itemize
12280 b.
12281 \begin_inset space \thinspace{}
12282 \end_inset
12283
12284 g.
12285  — background
12286 \end_layout
12287
12288 \begin_layout Itemize
12289 C.U.
12290  — close-up
12291 \end_layout
12292
12293 \begin_layout Itemize
12294 PAN — camera movement
12295 \end_layout
12296
12297 \begin_layout Itemize
12298 INSERT — cut to close-up of
12299 \end_layout
12300
12301 \begin_layout Section
12302 ijmpc and ijmpd
12303 \end_layout
12304
12305 \begin_layout Standard
12306 by 
12307 \noun on
12308 Panayotis Papasotiriou
12309 \end_layout
12310
12311 \begin_layout Subsection
12312 Overview
12313 \end_layout
12314
12315 \begin_layout Standard
12316 The ijmpc package is a set of macros that facilitates electronic manuscript
12317  submission to the 
12318 \emph on
12319 International Journal of Modern Physics C
12320 \emph default
12321 .
12322  Similarly, the ijmpd package is for creating manuscripts to be submitted
12323  to the 
12324 \emph on
12325 International Journal of Modern Physics D
12326 \emph default
12327 .
12328  Both journals are published by World Scientific.
12329  The corresponding document classes are named 
12330 \family typewriter
12331 ws-ijmpc.cls
12332 \family default
12333  and 
12334 \family typewriter
12335 ws-ijmpd.cls
12336 \family default
12337 , respectively.
12338  These files, together with instructions for the authors, can be downloaded
12339  from the sites 
12340 \begin_inset Flex URL
12341 status collapsed
12342
12343 \begin_layout Plain Layout
12344
12345 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
12346 \end_layout
12347
12348 \end_inset
12349
12350  and 
12351 \begin_inset Flex URL
12352 status collapsed
12353
12354 \begin_layout Plain Layout
12355
12356 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
12357 \end_layout
12358
12359 \end_inset
12360
12361 .
12362  Both packages are modified versions of the standard 
12363 \begin_inset Quotes eld
12364 \end_inset
12365
12366 article
12367 \begin_inset Quotes erd
12368 \end_inset
12369
12370  package, and they are almost (but not exactly) identical.
12371  Most of their features are supported by \SpecialChar LyX
12372 .
12373  I have used \SpecialChar LyX
12374  successfully to write articles submitted to both journals
12375  without any problem.
12376 \end_layout
12377
12378 \begin_layout Subsection
12379 Writing a paper
12380 \end_layout
12381
12382 \begin_layout Standard
12383 As usual, the easiest way to write a paper is to start with a template.
12384  Click on 
12385 \family sans
12386 File\SpecialChar menuseparator
12387 New from
12388 \family default
12389  
12390 \family sans
12391 Template
12392 \family default
12393 , then choose the 
12394 \family typewriter
12395 ijmpc.lyx
12396 \family default
12397  or 
12398 \family typewriter
12399 ijmpd.lyx
12400 \family default
12401  template.
12402  This will give an (almost) empty document that includes the most common
12403  fields found in a manuscript.
12404  Simply overwrite the existing text (including the brackets, 
12405 \family typewriter
12406 <>
12407 \family default
12408 ) with your text.
12409  You should keep in mind the following remarks.
12410 \end_layout
12411
12412 \begin_layout Enumerate
12413 \SpecialChar LyX
12414  won't let you change the font size and the page style of the document,
12415  because such modifications are not allowed by both packages.
12416 \end_layout
12417
12418 \begin_layout Enumerate
12419 The language of the document should not be changed.
12420  Before previewing your paper, be sure that the babel package is not used.
12421  To do this, click on 
12422 \family sans
12423 Tools\SpecialChar menuseparator
12424 Preferences
12425 \family default
12426 , select the 
12427 \family sans
12428 Lang Opts
12429 \family default
12430  tab, deselect the 
12431 \family sans
12432 Use babel
12433 \family default
12434  checkbox in the language settings, and click on 
12435 \family sans
12436 Apply
12437 \family default
12438  (or 
12439 \family sans
12440 Save
12441 \family default
12442 , if you wish to make this change permanent).
12443 \end_layout
12444
12445 \begin_layout Enumerate
12446 The 
12447 \begin_inset Quotes eld
12448 \end_inset
12449
12450 Keywords
12451 \begin_inset Quotes erd
12452 \end_inset
12453
12454  style must be used to define keywords.
12455 \end_layout
12456
12457 \begin_layout Enumerate
12458 The ijmpc package provides a style named 
12459 \begin_inset Quotes eld
12460 \end_inset
12461
12462 Classification Codes
12463 \begin_inset Quotes erd
12464 \end_inset
12465
12466 , which can be used to define classification codes, such as PACS numbers.
12467  Note that this facility is not supported by the ijmpd package.
12468 \end_layout
12469
12470 \begin_layout Enumerate
12471 Several new environments are available: 
12472 \begin_inset Quotes eld
12473 \end_inset
12474
12475 Definition
12476 \begin_inset Quotes erd
12477 \end_inset
12478
12479
12480 \begin_inset Quotes eld
12481 \end_inset
12482
12483 Step
12484 \begin_inset Quotes erd
12485 \end_inset
12486
12487
12488 \begin_inset Quotes eld
12489 \end_inset
12490
12491 Example
12492 \begin_inset Quotes erd
12493 \end_inset
12494
12495
12496 \begin_inset Quotes eld
12497 \end_inset
12498
12499 Remark
12500 \begin_inset Quotes erd
12501 \end_inset
12502
12503
12504 \begin_inset Quotes eld
12505 \end_inset
12506
12507 Notation
12508 \begin_inset Quotes erd
12509 \end_inset
12510
12511
12512 \begin_inset Quotes eld
12513 \end_inset
12514
12515 Theorem
12516 \begin_inset Quotes erd
12517 \end_inset
12518
12519
12520 \begin_inset Quotes eld
12521 \end_inset
12522
12523 Proof
12524 \begin_inset Quotes erd
12525 \end_inset
12526
12527
12528 \begin_inset Quotes eld
12529 \end_inset
12530
12531 Corollary
12532 \begin_inset Quotes erd
12533 \end_inset
12534
12535
12536 \begin_inset Quotes eld
12537 \end_inset
12538
12539 Lemma
12540 \begin_inset Quotes erd
12541 \end_inset
12542
12543
12544 \begin_inset Quotes eld
12545 \end_inset
12546
12547 Proposition
12548 \begin_inset Quotes erd
12549 \end_inset
12550
12551
12552 \begin_inset Quotes eld
12553 \end_inset
12554
12555 Prop
12556 \begin_inset Quotes erd
12557 \end_inset
12558
12559
12560 \begin_inset Quotes eld
12561 \end_inset
12562
12563 Question
12564 \begin_inset Quotes erd
12565 \end_inset
12566
12567
12568 \begin_inset Quotes eld
12569 \end_inset
12570
12571 Claim
12572 \begin_inset Quotes erd
12573 \end_inset
12574
12575 , and 
12576 \begin_inset Quotes eld
12577 \end_inset
12578
12579 Conjecture
12580 \begin_inset Quotes erd
12581 \end_inset
12582
12583 .
12584  Their use is more or less obvious.
12585  \SpecialChar LyX
12586  supports all these environments; it will use the proper label, text style,
12587  and numbering scheme for each of them.
12588 \end_layout
12589
12590 \begin_layout Enumerate
12591 Both packages use basic citations; the natbib package should not be used.
12592  In \SpecialChar LyX
12593 , citation references are shown as usual; in the output, citations are
12594  shown as superscripts.
12595  If you want to use a citation as normal text, you should use the 
12596 \family typewriter
12597 refcite
12598 \family default
12599  command, e.
12600 \begin_inset space \thinspace{}
12601 \end_inset
12602
12603 g.
12604 \begin_inset space \space{}
12605 \end_inset
12606
12607
12608 \begin_inset Quotes eld
12609 \end_inset
12610
12611 See Ref.
12612 \begin_inset space \space{}
12613 \end_inset
12614
12615
12616 \family typewriter
12617
12618 \backslash
12619 refcite{key}
12620 \family default
12621
12622 \begin_inset Quotes erd
12623 \end_inset
12624
12625 .
12626 \end_layout
12627
12628 \begin_layout Enumerate
12629 There is no 
12630 \begin_inset Quotes eld
12631 \end_inset
12632
12633 Acknowledgments
12634 \begin_inset Quotes erd
12635 \end_inset
12636
12637  section in both packages.
12638  To put acknowledgments, just use the 
12639 \begin_inset Quotes eld
12640 \end_inset
12641
12642 Section*
12643 \begin_inset Quotes erd
12644 \end_inset
12645
12646  environment.
12647 \end_layout
12648
12649 \begin_layout Enumerate
12650 Appendices may be added to the paper, 
12651 \emph on
12652 after
12653 \emph default
12654  the Acknowledgments and 
12655 \shape italic
12656 before
12657 \shape default
12658  the References.
12659  \SpecialChar LyX
12660  provides a special environment, called 
12661 \begin_inset Quotes eld
12662 \end_inset
12663
12664 Appendices Section
12665 \begin_inset Quotes erd
12666 \end_inset
12667
12668  which marks the beginning of the appendices.
12669  This environment should be left blank; it just sends a \SpecialChar LaTeX
12670  command, but nothing
12671  is really printed.
12672  In \SpecialChar LyX
12673 , the word 
12674 \begin_inset Quotes eld
12675 \end_inset
12676
12677 Appendix
12678 \begin_inset Quotes erd
12679 \end_inset
12680
12681  is printed with blue letters, as a signal that all sections after that
12682  point are appendices.
12683  To write an appendix, use the 
12684 \begin_inset Quotes eld
12685 \end_inset
12686
12687 Appendix
12688 \begin_inset Quotes erd
12689 \end_inset
12690
12691  environment.
12692  \SpecialChar LyX
12693  will number each appendix with capital letters, as required by both journals.
12694  Note that 
12695 \begin_inset Quotes eld
12696 \end_inset
12697
12698 Appendices Section
12699 \begin_inset Quotes erd
12700 \end_inset
12701
12702  
12703 \emph on
12704 must
12705 \emph default
12706  be present before the first appendix; if not, all appendices will be numbered
12707  as normal sections in the output.
12708 \end_layout
12709
12710 \begin_layout Enumerate
12711 The ijmpc and the ijmpd packages use the 
12712 \family typewriter
12713 tbl
12714 \family default
12715  command to implement table captions.
12716  As a result, a table created by \SpecialChar LyX
12717  is printed correctly, but its caption
12718  is ignored.
12719  However, you can use some \SpecialChar TeX
12720  code to overcome this problem, so that captions
12721  are printed as expected.
12722  To do so, create a float table as usual, remove the caption, and replace
12723  it with the \SpecialChar TeX
12724  code 
12725 \family typewriter
12726
12727 \backslash
12728 tbl{
12729 \emph on
12730 your table caption
12731 \emph default
12732 }{
12733 \family default
12734  (sic); you must also the \SpecialChar TeX
12735  code 
12736 \family typewriter
12737 }
12738 \family default
12739  immediately after the tabular material.
12740  Study the example table included in the template files to see how this
12741  trick is implemented.
12742  Alternatively, If you need table captions, you should implement the whole
12743  table float in a 
12744 \family typewriter
12745 .tex
12746 \family default
12747  file, then include this file to the \SpecialChar LyX
12748  document (
12749 \family sans
12750 Insert\SpecialChar menuseparator
12751 File\SpecialChar menuseparator
12752 Child
12753 \begin_inset space ~
12754 \end_inset
12755
12756 Document
12757 \family default
12758 ).
12759  Details on how to create a table float can be found in the files 
12760 \family typewriter
12761 ws-ijmpc.tex
12762 \family default
12763  and 
12764 \family typewriter
12765 ws-ijmpd.tex
12766 \family default
12767 , included in the corresponding packages.
12768 \end_layout
12769
12770 \begin_layout Subsection
12771 Preparing a paper for submission
12772 \end_layout
12773
12774 \begin_layout Standard
12775 Before you submit your paper you must export the \SpecialChar LyX
12776  document as a \SpecialChar LaTeX
12777  file (
12778 \family sans
12779 File\SpecialChar menuseparator
12780 Export\SpecialChar menuseparator
12781 \SpecialChar LaTeX
12782
12783 \family default
12784 )
12785 \begin_inset Foot
12786 status open
12787
12788 \begin_layout Plain Layout
12789 Actually you have the choice between \SpecialChar LaTeX
12790  (plain) and pdflatex.
12791  If you intend to use pdflatex to prepare the paper, you should use the
12792  pdflatex option so that included graphics are converted to PDF format,
12793  ready for use by pdflatex.
12794 \end_layout
12795
12796 \end_inset
12797
12798 , then make the following changes to the resulting 
12799 \family typewriter
12800 .tex
12801 \family default
12802  file.
12803 \end_layout
12804
12805 \begin_layout Enumerate
12806 Remove the comment lines before the 
12807 \family typewriter
12808
12809 \backslash
12810 documentclass
12811 \family default
12812  command.
12813 \end_layout
12814
12815 \begin_layout Enumerate
12816 Remove everything between (and including) the 
12817 \family typewriter
12818
12819 \backslash
12820 makeatletter
12821 \family default
12822  and 
12823 \family typewriter
12824
12825 \backslash
12826 makeatother
12827 \family default
12828  commands, except for any commands you specifically put into the \SpecialChar LaTeX
12829  preamble.
12830 \end_layout
12831
12832 \begin_layout Standard
12833 The modified 
12834 \family typewriter
12835 .tex
12836 \family default
12837  file should be saved and processed through \SpecialChar LaTeX
12838  as many times as necessary.
12839  You may also want to check the resulting 
12840 \family typewriter
12841 .dvi
12842 \family default
12843  document.
12844 \end_layout
12845
12846 \begin_layout Subsection
12847 Use of \SpecialChar TeX
12848  code
12849 \end_layout
12850
12851 \begin_layout Standard
12852 The use of \SpecialChar TeX
12853  code is reduced to two commands, which must be placed at the
12854  top of the document.
12855  If you started writing your paper by using the 
12856 \family typewriter
12857 ijmpc.lyx
12858 \family default
12859  or the 
12860 \family typewriter
12861 ijmpd.lyx
12862 \family default
12863  template, the \SpecialChar TeX
12864  code needed is already in its place; you usually don't need
12865  to delete it.
12866  You may only modify the first \SpecialChar TeX
12867  code to specify the information printed
12868  to the top of odd and even pages (authors' names and short paper's title,
12869  respectively).
12870  This \SpecialChar TeX
12871  code must have the form 
12872 \family typewriter
12873
12874 \backslash
12875 markboth{Authors' Names}{Short Paper's Title}
12876 \family default
12877 .
12878 \end_layout
12879
12880 \begin_layout Section
12881 iopart
12882 \end_layout
12883
12884 \begin_layout Standard
12885 by 
12886 \noun on
12887 Uwe Stöhr
12888 \end_layout
12889
12890 \begin_layout Subsection
12891 Overview
12892 \end_layout
12893
12894 \begin_layout Standard
12895 The iopart package provides a document class to create electronic manuscript
12896  submission to the journals published by the Institute of Physics.
12897  Instructions for the authors how to create a paper using the iopart class
12898  can be downloaded together with the iopart package from the site 
12899 \begin_inset Flex URL
12900 status collapsed
12901
12902 \begin_layout Plain Layout
12903
12904 ftp://ftp.iop.org/pub/journals/latex2e
12905 \end_layout
12906
12907 \end_inset
12908
12909 .
12910 \end_layout
12911
12912 \begin_layout Subsection
12913 Writing a paper
12914 \end_layout
12915
12916 \begin_layout Standard
12917 The easiest way to write a paper is to start with the file 
12918 \emph on
12919 IOP-article.lyx
12920 \emph default
12921  that is available in \SpecialChar LyX
12922 's examples files folder.
12923  Open this file, save it under a new name, and start writing.
12924  The example file explains how to use the special text environments.
12925  Here are the most important advices:
12926 \end_layout
12927
12928 \begin_layout Itemize
12929 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12930  two options 
12931 \family sans
12932 Use AMS math package
12933 \family default
12934  in the document settings under 
12935 \family sans
12936 Math Options
12937 \family default
12938  are not used!
12939 \end_layout
12940
12941 \begin_layout Itemize
12942
12943 \size normal
12944 The title environment defines the kind of your paper.
12945  So use one of the following environments for the title:
12946 \end_layout
12947
12948 \begin_deeper
12949 \begin_layout Itemize
12950
12951 \family sans
12952 \size normal
12953 Title
12954 \family default
12955  for a Paper
12956 \end_layout
12957
12958 \begin_layout Itemize
12959
12960 \family sans
12961 \size normal
12962 Review
12963 \family default
12964  for a Review
12965 \end_layout
12966
12967 \begin_layout Itemize
12968
12969 \family sans
12970 \size normal
12971 Topical
12972 \family default
12973  for a Topical review
12974 \end_layout
12975
12976 \begin_layout Itemize
12977
12978 \family sans
12979 \size normal
12980 Comment
12981 \family default
12982  for a Comment
12983 \end_layout
12984
12985 \begin_layout Itemize
12986
12987 \family sans
12988 \size normal
12989 Note
12990 \family default
12991  for a Note
12992 \end_layout
12993
12994 \begin_layout Itemize
12995
12996 \family sans
12997 \size normal
12998 Paper
12999 \family default
13000  for a Paper (same as Title)
13001 \end_layout
13002
13003 \begin_layout Itemize
13004
13005 \family sans
13006 \size normal
13007 Prelim
13008 \family default
13009  for a Preliminary communication
13010 \end_layout
13011
13012 \begin_layout Itemize
13013
13014 \family sans
13015 \size normal
13016 Rapid
13017 \family default
13018  for a Rapid communication
13019 \end_layout
13020
13021 \begin_layout Itemize
13022
13023 \family sans
13024 \size normal
13025 Letter
13026 \family default
13027  for a Letter to the editor
13028 \end_layout
13029
13030 \end_deeper
13031 \begin_layout Itemize
13032
13033 \size normal
13034 All title environments except of 
13035 \family sans
13036 Letter
13037 \family default
13038  can have an optional short title.
13039 \end_layout
13040
13041 \begin_layout Itemize
13042 There is a general title environment 
13043 \family sans
13044 Article
13045 \family default
13046  which is not directly supported by the \SpecialChar LyX
13047 .
13048  This can be used as \SpecialChar TeX
13049  code when your document doesn't fit into one of the
13050  other title types.
13051 \end_layout
13052
13053 \begin_layout Standard
13054 For more informations like hints for special table and formula formatting,
13055  look at the IOP author guidelines.
13056 \end_layout
13057
13058 \begin_layout Section
13059 Kluwer
13060 \end_layout
13061
13062 \begin_layout Standard
13063 by 
13064 \noun on
13065 Panayotis Papasotiriou
13066 \end_layout
13067
13068 \begin_layout Subsection
13069 Overview
13070 \end_layout
13071
13072 \begin_layout Standard
13073 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
13074  that facilitates electronic manuscript submission to the journals they
13075  publish.
13076  Most known of them (at least in my domain of interest) are 
13077 \emph on
13078 Astrophysics and Space Science
13079 \emph default
13080  and 
13081 \emph on
13082 Solar Physics
13083 \emph default
13084 , but there are many others (see a complete list at 
13085 \begin_inset Flex URL
13086 status open
13087
13088 \begin_layout Plain Layout
13089
13090 http://www.wkap.nl/jrnllist.htm/JRNLHOME
13091 \end_layout
13092
13093 \end_inset
13094
13095 ).
13096  The Kluwer package may be downloaded from the site 
13097 \begin_inset Flex URL
13098 status collapsed
13099
13100 \begin_layout Plain Layout
13101
13102 http://www.wkap.nl/kaphtml.htm/STYLEFILES
13103 \end_layout
13104
13105 \end_inset
13106
13107 .
13108  A complete user guide is contained in that package (but it can also be
13109  downloaded separately).
13110 \end_layout
13111
13112 \begin_layout Standard
13113 \SpecialChar LyX
13114  supports many features of the package but not everything.
13115  However, the \SpecialChar TeX
13116  code needed is reduced to some 
13117 \begin_inset Quotes eld
13118 \end_inset
13119
13120 peculiar
13121 \begin_inset Quotes erd
13122 \end_inset
13123
13124  commands of the package (see
13125 \begin_inset space ~
13126 \end_inset
13127
13128
13129 \begin_inset CommandInset ref
13130 LatexCommand ref
13131 reference "subsec:kluwer_peculiarities"
13132
13133 \end_inset
13134
13135 ).
13136  I have recently used \SpecialChar LyX
13137  to write an article submitted to the 
13138 \emph on
13139 Astrophysics and Space Science
13140 \emph default
13141  without any problem.
13142 \end_layout
13143
13144 \begin_layout Subsection
13145 Writing a paper
13146 \end_layout
13147
13148 \begin_layout Standard
13149 The easiest way to write a paper is to start with the Kluwer template file.
13150  Click on 
13151 \family sans
13152 File\SpecialChar menuseparator
13153 New from
13154 \family default
13155  
13156 \family sans
13157 Template
13158 \family default
13159 , then choose the 
13160 \family typewriter
13161 kluwer.lyx
13162 \family default
13163  template.
13164  This will give an (almost) empty document that includes the most common
13165  fields found in a manuscript and a short description of their use.
13166  As in most templates, simply overwrite the existing text (including the
13167  brackets, 
13168 \family typewriter
13169 <>
13170 \family default
13171 ) with the correct information.
13172 \end_layout
13173
13174 \begin_layout Subsection
13175 Preparing a paper for submission
13176 \end_layout
13177
13178 \begin_layout Standard
13179 As in the AAS\SpecialChar TeX
13180  package, before you submit your paper to a journal you must
13181  
13182 \begin_inset Quotes eld
13183 \end_inset
13184
13185 postprocess
13186 \begin_inset Quotes erd
13187 \end_inset
13188
13189  it as follows.
13190 \end_layout
13191
13192 \begin_layout Enumerate
13193 Export your paper as a \SpecialChar LaTeX
13194  file.
13195  To do this, click on 
13196 \family sans
13197 File\SpecialChar menuseparator
13198 Export\SpecialChar menuseparator
13199 \SpecialChar LaTeX
13200
13201 \family default
13202 .
13203  
13204 \end_layout
13205
13206 \begin_layout Enumerate
13207 Edit the resulting 
13208 \family typewriter
13209 .tex
13210 \family default
13211  file with a text editor and make the following changes
13212 \end_layout
13213
13214 \begin_deeper
13215 \begin_layout Enumerate
13216 remove the comment lines before the 
13217 \family typewriter
13218
13219 \backslash
13220 documentclass
13221 \family default
13222  command,
13223 \end_layout
13224
13225 \begin_layout Enumerate
13226 remove everything between (and including) the 
13227 \family typewriter
13228
13229 \backslash
13230 makeatletter
13231 \family default
13232  and 
13233 \family typewriter
13234
13235 \backslash
13236 makeatother
13237 \family default
13238  commands, except for any commands you specifically put into the \SpecialChar LaTeX
13239  preamble.
13240 \end_layout
13241
13242 \begin_layout Standard
13243 Save the resulting 
13244 \family typewriter
13245 .tex
13246 \family default
13247  file.
13248 \end_layout
13249
13250 \end_deeper
13251 \begin_layout Enumerate
13252 Run the 
13253 \family typewriter
13254 .tex
13255 \family default
13256  file through \SpecialChar LaTeX
13257  as many times as necessary (usually up to three).
13258 \end_layout
13259
13260 \begin_layout Enumerate
13261 View the resulting 
13262 \family typewriter
13263 .dvi
13264 \family default
13265  document using, e.
13266 \begin_inset space \thinspace{}
13267 \end_inset
13268
13269 g.
13270 \begin_inset space \space{}
13271 \end_inset
13272
13273
13274 \family sans
13275 xdvi
13276 \family default
13277 , and check if everything is OK (it should, if you didn't make any mistake).
13278 \end_layout
13279
13280 \begin_layout Subsection
13281 \begin_inset Quotes eld
13282 \end_inset
13283
13284 Peculiarities
13285 \begin_inset Quotes erd
13286 \end_inset
13287
13288  of the Kluwer package
13289 \begin_inset CommandInset label
13290 LatexCommand label
13291 name "subsec:kluwer_peculiarities"
13292
13293 \end_inset
13294
13295
13296 \end_layout
13297
13298 \begin_layout Standard
13299 The Kluwer package has the following 
13300 \begin_inset Quotes eld
13301 \end_inset
13302
13303 peculiarities
13304 \begin_inset Quotes erd
13305 \end_inset
13306
13307 .
13308 \end_layout
13309
13310 \begin_layout Enumerate
13311 It is possible to write multiple articles in the same \SpecialChar LaTeX
13312  file
13313 \begin_inset Foot
13314 status collapsed
13315
13316 \begin_layout Plain Layout
13317 I can't imagine any good reason to do this.
13318 \end_layout
13319
13320 \end_inset
13321
13322 .
13323  Each article must be included in the environment 
13324 \begin_inset Quotes eld
13325 \end_inset
13326
13327 article
13328 \begin_inset Quotes erd
13329 \end_inset
13330
13331 .
13332  Unfortunately, this environment cannot be omitted, even if you write just
13333  one article.
13334  Therefore, each article starts with the command 
13335 \family typewriter
13336
13337 \backslash
13338 begin{article}
13339 \family default
13340  and, obviously, ends with the command 
13341 \family typewriter
13342
13343 \backslash
13344 end{article}
13345 \family default
13346 .
13347  Although this can be implemented in \SpecialChar LyX
13348 , I didn't included it, since it looks
13349  ugly and can confuse the novice user.
13350  Therefore, you need to enter them directly and mark them as \SpecialChar LaTeX
13351  code (the
13352  well-known 
13353 \begin_inset Quotes eld
13354 \end_inset
13355
13356 \SpecialChar TeX
13357  code
13358 \begin_inset Quotes erd
13359 \end_inset
13360
13361 ).
13362 \end_layout
13363
13364 \begin_layout Enumerate
13365 Information given at the beginning of the article (i.
13366 \begin_inset space \thinspace{}
13367 \end_inset
13368
13369 e.
13370 \begin_inset space \space{}
13371 \end_inset
13372
13373 title, subtitle, author, institution, running title, running author, abstract
13374  and keywords) must be included in an environment called 
13375 \begin_inset Quotes eld
13376 \end_inset
13377
13378 opening
13379 \begin_inset Quotes erd
13380 \end_inset
13381
13382 .
13383  This is not implemented in \SpecialChar LyX
13384 , so you must enter title, subtitle etc.
13385 \begin_inset space ~
13386 \end_inset
13387
13388 between two \SpecialChar TeX
13389  code lines (
13390 \family typewriter
13391
13392 \backslash
13393 begin{opening}
13394 \family default
13395  and 
13396 \family typewriter
13397
13398 \backslash
13399 end{opening}
13400 \family default
13401 ).
13402 \end_layout
13403
13404 \begin_layout Enumerate
13405 According to the user manual, the label of each bibliography item must be
13406  written as 
13407 \family typewriter
13408
13409 \backslash
13410 protect
13411 \backslash
13412 citeauthoryear{
13413 \family default
13414 \emph on
13415 author(s)
13416 \family typewriter
13417 \emph default
13418 }{
13419 \family default
13420 \emph on
13421 year
13422 \family typewriter
13423 \emph default
13424 }
13425 \family default
13426 .
13427 \end_layout
13428
13429 \begin_layout Standard
13430 The 
13431 \family typewriter
13432 kluwer.lyx
13433 \family default
13434  template takes care of all these 
13435 \begin_inset Quotes eld
13436 \end_inset
13437
13438 peculiarities
13439 \begin_inset Quotes erd
13440 \end_inset
13441
13442 .
13443  If you start a new paper using this template you don't need to do anything
13444  special.
13445  Just 
13446 \end_layout
13447
13448 \begin_layout Enumerate
13449 don't delete the \SpecialChar TeX
13450  code included in the template, and
13451 \end_layout
13452
13453 \begin_layout Enumerate
13454 copy the example bibliography item included in the template and modify it
13455  as necessary to enter new bibliography items.
13456 \end_layout
13457
13458 \begin_layout Section
13459 Koma-Script
13460 \end_layout
13461
13462 \begin_layout Standard
13463 by 
13464 \noun on
13465 Bernd Rellermeyer
13466 \end_layout
13467
13468 \begin_layout Subsection
13469 Overview
13470 \end_layout
13471
13472 \begin_layout Standard
13473 The \SpecialChar LyX
13474  document classes 
13475 \emph on
13476 article (koma-script)
13477 \emph default
13478
13479 \emph on
13480 report (koma-script)
13481 \emph default
13482
13483 \emph on
13484 book
13485 \emph default
13486  
13487 \emph on
13488 (koma-script)
13489 \emph default
13490 , and 
13491 \emph on
13492 letter
13493 \emph default
13494  
13495 \emph on
13496 (koma-script)
13497 \emph default
13498  correspond to the \SpecialChar LaTeX
13499  document classes 
13500 \family typewriter
13501 scrartcl.cls
13502 \family default
13503
13504 \family typewriter
13505 scrreprt.cls
13506 \family default
13507
13508 \family typewriter
13509 scrbook.cls
13510 \family default
13511 , and 
13512 \family typewriter
13513 scrlettr.cls
13514 \family default
13515 , resp.
13516 \begin_inset space ~
13517 \end_inset
13518
13519 of the Koma-Script family.
13520  They are replacements for the standard document classes 
13521 \family typewriter
13522 article.cls
13523 \family default
13524
13525 \family typewriter
13526 report.cls
13527 \family default
13528
13529 \family typewriter
13530 book.cls
13531 \family default
13532  and 
13533 \family typewriter
13534 letter.cls
13535 \family default
13536 , resp., and fit better to European typography conventions in a number of
13537  points.
13538 \end_layout
13539
13540 \begin_layout Itemize
13541 Standard character size is 11pt in 
13542 \emph on
13543 article (koma-script)
13544 \emph default
13545
13546 \emph on
13547 report (koma-script)
13548 \emph default
13549 , and 
13550 \emph on
13551 book (koma-script)
13552 \emph default
13553 , and 12pt in 
13554 \emph on
13555 letter (koma-script)
13556 \emph default
13557 .
13558 \end_layout
13559
13560 \begin_layout Itemize
13561 Headings, labels of the description environment, and a number of elements
13562  of the 
13563 \emph on
13564 letter (koma-script)
13565 \emph default
13566  document class are set in a bold sans serif font.
13567 \begin_inset Foot
13568 status collapsed
13569
13570 \begin_layout Plain Layout
13571 There is a big difference between the bold sans serif old cm fonts and new
13572  ec fonts, especially in the appearance of headings.
13573  In comparison, the ec bold sans serif fonts look a bit thin.
13574  Here the \SpecialChar LaTeX
13575  package 
13576 \family typewriter
13577 cmsd.sty by
13578 \family default
13579  
13580 \shape smallcaps
13581 Walter Schmidt
13582 \shape default
13583  helps to produce the 
13584 \begin_inset Quotes eld
13585 \end_inset
13586
13587 usual
13588 \begin_inset Quotes erd
13589 \end_inset
13590
13591  appearance when using the ec fonts.
13592 \end_layout
13593
13594 \end_inset
13595
13596  The numbering of chapter headings is made in the same way as the numbering
13597  of section headings, that is without the extra line 
13598 \begin_inset Quotes eld
13599 \end_inset
13600
13601 Chapter\SpecialChar ldots
13602
13603 \begin_inset Quotes erd
13604 \end_inset
13605
13606 .
13607  In addition, the appearance of the headings can be modified by using a
13608  number of options (in \SpecialChar LyX
13609  to be entered in the field 
13610 \family sans
13611 Extra
13612 \begin_inset space ~
13613 \end_inset
13614
13615 Options
13616 \family default
13617  of the dialog 
13618 \family sans
13619 Layout\SpecialChar menuseparator
13620 Document
13621 \family default
13622 ).
13623  
13624 \end_layout
13625
13626 \begin_layout Itemize
13627 The main means in the Koma-Script document classes to design the type area
13628  are the options 
13629 \family sans
13630 BCOR
13631 \family default
13632  and 
13633 \family sans
13634 DIV
13635 \family default
13636  (in \SpecialChar LyX
13637  to be entered in the extra class options field in the dialog 
13638 \family sans
13639 Document\SpecialChar menuseparator
13640 Settings
13641 \family default
13642 ).
13643  They make a clearer modification of page margins possible as do the options
13644  of the dialog 
13645 \family sans
13646 Document\SpecialChar menuseparator
13647 Settings
13648 \family default
13649 .
13650  
13651 \end_layout
13652
13653 \begin_layout Itemize
13654 The \SpecialChar LaTeX
13655  document classes of the Koma-Script family define a number of additional
13656  commands.
13657  Those part of it which makes sense in \SpecialChar LyX
13658  is implemented in corresponding
13659  paragraph types.
13660 \end_layout
13661
13662 \begin_layout Standard
13663 Detailed descriptions of the \SpecialChar LaTeX
13664  document classes of the Koma-Script family
13665  can be found in the Koma-Script documentation 
13666 \emph on
13667 scrguide
13668 \emph default
13669  (German) and 
13670 \emph on
13671 scrguien
13672 \emph default
13673  (English).
13674 \end_layout
13675
13676 \begin_layout Subsection
13677 article (koma-script), report (koma-script), and book (koma-script)
13678 \end_layout
13679
13680 \begin_layout Standard
13681 The document classes 
13682 \emph on
13683 article (koma-script)
13684 \emph default
13685
13686 \emph on
13687 report (koma-script)
13688 \emph default
13689 , and 
13690 \emph on
13691 book
13692 \emph default
13693  
13694 \emph on
13695 (koma-script)
13696 \emph default
13697  are implemented in the layout files 
13698 \family typewriter
13699 scrartcl.layout
13700 \family default
13701
13702 \family typewriter
13703 scrreprt.layout
13704 \family default
13705 , and 
13706 \family typewriter
13707 scrbook.layout
13708 \family default
13709 , resp.
13710  They contain all the paragraph types of the corresponding standard document
13711  classes 
13712 \emph on
13713 article
13714 \emph default
13715
13716 \emph on
13717 report
13718 \emph default
13719 , and 
13720 \emph on
13721 book
13722 \emph default
13723 , resp., partly modified, with the exception of the \SpecialChar LyX
13724  specific 
13725 \family sans
13726 List
13727 \family default
13728 -type, which is replaced by the new 
13729 \family sans
13730 Labeling
13731 \family default
13732 -type having the same functionality.
13733  Beside the 
13734 \family sans
13735 Labeling
13736 \family default
13737 -Type there is a number of new paragraph types added.
13738  They are 
13739 \emph on
13740 not
13741 \emph default
13742  part of 
13743 \emph on
13744 letter (koma-script)
13745 \emph default
13746 .
13747 \end_layout
13748
13749 \begin_layout Itemize
13750
13751 \family sans
13752 Addpart, Addchap
13753 \family default
13754
13755 \family sans
13756 Addsec
13757 \family default
13758 : are equivalents to 
13759 \family sans
13760 Part*, Chapter*
13761 \family default
13762  and 
13763 \family sans
13764 Section*
13765 \family default
13766 , resp., additionally inserting an entry in the table of contents.
13767  
13768 \family sans
13769 Addpart
13770 \family default
13771  and 
13772 \family sans
13773 Addchap
13774 \family default
13775  are not contained in 
13776 \emph on
13777 article (koma-script)
13778 \emph default
13779 .
13780 \end_layout
13781
13782 \begin_layout Itemize
13783
13784 \family sans
13785 Addchap*
13786 \family default
13787
13788 \family sans
13789 Addsec*
13790 \family default
13791 : behave exactly as 
13792 \family sans
13793 Addchap
13794 \family default
13795  and 
13796 \family sans
13797 Addsec
13798 \family default
13799 , resp., additionally clearing running heads.
13800  
13801 \family sans
13802 Addchap*
13803 \family default
13804  is not contained in 
13805 \emph on
13806 article (koma-script)
13807 \emph default
13808 .
13809 \begin_inset Foot
13810 status collapsed
13811
13812 \begin_layout Plain Layout
13813 There is also an 
13814 \family typewriter
13815
13816 \backslash
13817 addpart*
13818 \family default
13819  command in 
13820 \emph on
13821 book (koma-script)
13822 \emph default
13823  and in 
13824 \emph on
13825 report (koma-script)
13826 \emph default
13827 , but since this is identical to 
13828 \family sans
13829 Part*
13830 \family default
13831 , is has not been implemented in \SpecialChar LyX
13832 .
13833 \end_layout
13834
13835 \end_inset
13836
13837
13838 \end_layout
13839
13840 \begin_layout Itemize
13841
13842 \family sans
13843 Minisec
13844 \family default
13845 : generates a heading directly above the following paragraph in the standard
13846  character size without affecting the structure of the document.
13847 \end_layout
13848
13849 \begin_layout Itemize
13850
13851 \family sans
13852 Captionabove
13853 \family default
13854  and 
13855 \family sans
13856 Captionbelow
13857 \family default
13858  are special captions which respect the different space settings needed
13859  for captions placed above or below an element (if you follow strict typographic
13860  rules, you might want to place table captions always above the table).
13861  You can also use the class option 
13862 \family typewriter
13863 tablecaptionsabove
13864 \family default
13865 , which will switch 
13866 \family sans
13867 caption
13868 \family default
13869  to 
13870 \family sans
13871 captionabove
13872 \family default
13873  for tables and 
13874 \family sans
13875 captionbelow
13876 \family default
13877  for figures.
13878  You need at least Koma-Script version 2.8q to use this.
13879 \end_layout
13880
13881 \begin_layout Itemize
13882
13883 \family sans
13884 Dictum
13885 \family default
13886 : can be used to set a bonmot, e.
13887 \begin_inset space \thinspace{}
13888 \end_inset
13889
13890 g.
13891 \begin_inset space \space{}
13892 \end_inset
13893
13894 at the beginning of a chapter.
13895  If you use the optional argument (
13896 \family sans
13897 Insert\SpecialChar menuseparator
13898 Short
13899 \begin_inset space ~
13900 \end_inset
13901
13902 Title
13903 \family default
13904 ), you can insert the dictum's author there.
13905  Dictum and author are separated by a line.
13906  You need at least Koma-Script version 2.8q to use this.
13907  
13908 \family sans
13909 Dictum
13910 \family default
13911  is not contained in 
13912 \emph on
13913 article (koma-script)
13914 \emph default
13915 .
13916 \end_layout
13917
13918 \begin_layout Standard
13919 The following types, together with the standard types 
13920 \family sans
13921 Title
13922 \family default
13923
13924 \family sans
13925 Author
13926 \family default
13927 , and 
13928 \family sans
13929 Date
13930 \family default
13931 , form the title area of the document.
13932  They must be entered ahead of the first 
13933 \begin_inset Quotes eld
13934 \end_inset
13935
13936 ordinary
13937 \begin_inset Quotes erd
13938 \end_inset
13939
13940  paragraph.
13941 \begin_inset Foot
13942 status collapsed
13943
13944 \begin_layout Plain Layout
13945 The corresponding \SpecialChar LaTeX
13946  commands must appear before the 
13947 \family typewriter
13948
13949 \backslash
13950 maketitle
13951 \family default
13952  command.
13953 \end_layout
13954
13955 \end_inset
13956
13957  When such a type is used more than once, the latter usage overwrites the
13958  former one, that means, for every type only the latest usage is valid.
13959  The order of the different types however has, like 
13960 \family sans
13961 Title
13962 \family default
13963
13964 \family sans
13965 Author
13966 \family default
13967 , and 
13968 \family sans
13969 Date
13970 \family default
13971 , no effect on the appearance of the produced document.
13972 \end_layout
13973
13974 \begin_layout Itemize
13975
13976 \family sans
13977 Subject
13978 \family default
13979 : produces a centered paragraph above the ordinary title (
13980 \family sans
13981 Title
13982 \family default
13983
13984 \family sans
13985 Author
13986 \family default
13987
13988 \family sans
13989 Date
13990 \family default
13991 ) for the subject of the document.
13992 \end_layout
13993
13994 \begin_layout Itemize
13995
13996 \family sans
13997 Publishers
13998 \family default
13999 : produces a centered paragraph below the ordinary title (
14000 \family sans
14001 Title
14002 \family default
14003
14004 \family sans
14005 Author
14006 \family default
14007
14008 \family sans
14009 Date
14010 \family default
14011 ) for the publishers' name.
14012 \end_layout
14013
14014 \begin_layout Itemize
14015
14016 \family sans
14017 Dedication
14018 \family default
14019 : in 
14020 \emph on
14021 report (koma-script)
14022 \emph default
14023  and 
14024 \emph on
14025 book (koma-script)
14026 \emph default
14027  produces a centered paragraph on its own page behind the title page, or
14028  in 
14029 \emph on
14030 article (koma-script)
14031 \emph default
14032  produces a centered paragraph below the ordinary title (
14033 \family sans
14034 Title
14035 \family default
14036
14037 \family sans
14038 Author
14039 \family default
14040
14041 \family sans
14042 Date
14043 \family default
14044
14045 \family sans
14046 Publishers
14047 \family default
14048 ) for a dedication.
14049 \end_layout
14050
14051 \begin_layout Itemize
14052
14053 \family sans
14054 Titlehead
14055 \family default
14056 : produces a left aligned paragraph above the ordinary title (
14057 \family sans
14058 Title
14059 \family default
14060
14061 \family sans
14062 Author
14063 \family default
14064
14065 \family sans
14066 Date
14067 \family default
14068
14069 \family sans
14070 Subject
14071 \family default
14072 ) for a document`s head.
14073 \end_layout
14074
14075 \begin_layout Itemize
14076
14077 \family sans
14078 Uppertitleback
14079 \family default
14080 : produces in a double-sided print in 
14081 \emph on
14082 report (koma-script)
14083 \emph default
14084  and 
14085 \emph on
14086 book (koma-script)
14087 \emph default
14088  a left-aligned paragraph at the top of the title page`s back or has no
14089  effect in a single-sided print or in 
14090 \emph on
14091 article (koma-script)
14092 \emph default
14093 .
14094 \end_layout
14095
14096 \begin_layout Itemize
14097
14098 \family sans
14099 Lowertitleback
14100 \family default
14101 : produces in a double-sided print in 
14102 \emph on
14103 report (koma-script)
14104 \emph default
14105  and 
14106 \emph on
14107 book (koma-script)
14108 \emph default
14109  a left-aligned paragraph at the bottom of the title page`s back or has
14110  no effect in a single-sided print or in 
14111 \emph on
14112 article (koma-script)
14113 \emph default
14114 .
14115 \end_layout
14116
14117 \begin_layout Itemize
14118
14119 \family sans
14120 Extratitle
14121 \family default
14122 : produces a special 
14123 \begin_inset Quotes eld
14124 \end_inset
14125
14126 dirty
14127 \begin_inset Quotes erd
14128 \end_inset
14129
14130  page ahead of the actual document containing a paragraph without special
14131  formatting.
14132 \end_layout
14133
14134 \begin_layout Standard
14135 The layout files for the document classes 
14136 \emph on
14137 article (koma-script)
14138 \emph default
14139
14140 \emph on
14141 report (koma-script)
14142 \emph default
14143 , and 
14144 \emph on
14145 book (koma-script)
14146 \emph default
14147  do include the file 
14148 \family typewriter
14149 scrmacros.inc
14150 \family default
14151 .
14152  This is thought of as a place to define your own types.
14153  Copy scrmacros
14154 \family typewriter
14155 .inc
14156 \family default
14157  in your personal layout directory and edit the file!
14158 \end_layout
14159
14160 \begin_layout Subsection
14161 letter (koma-script)
14162 \end_layout
14163
14164 \begin_layout Standard
14165 \noindent
14166 The document class 
14167 \emph on
14168 letter (koma-script)
14169 \emph default
14170  is implemented in the layout file 
14171 \family typewriter
14172 scrlettr.layout
14173 \family default
14174 .
14175  It contains all the paragraph types of the corresponding standard document
14176  class 
14177 \emph on
14178 letter
14179 \emph default
14180 , partly modified, with the exception of the \SpecialChar LyX
14181  specific types 
14182 \family sans
14183 \SpecialChar LyX
14184 -Code
14185 \family default
14186  and 
14187 \family sans
14188 Comment
14189 \family default
14190  and the 
14191 \family sans
14192 List
14193 \family default
14194  type, which is replaced by the new 
14195 \family sans
14196 Labeling
14197 \family default
14198  type.
14199  In addition, it contains, in contrast to the standard document class, the
14200  standard types 
14201 \family sans
14202 \SpecialChar LaTeX
14203
14204 \family default
14205
14206 \family sans
14207 Quotation
14208 \family default
14209
14210 \family sans
14211 Quote
14212 \family default
14213 , and 
14214 \family sans
14215 Verse
14216 \family default
14217 .
14218  Furthermore, there are a number of new letter specific types.
14219 \end_layout
14220
14221 \begin_layout Standard
14222 The appearance of the letter produced by this document class can be controlled
14223  by a number of \SpecialChar LaTeX
14224  commands, which you can put in the \SpecialChar LaTeX
14225  preamble.
14226 \begin_inset Foot
14227 status collapsed
14228
14229 \begin_layout Plain Layout
14230 For example, the standard appearance of the letter`s heading, consisting
14231  of name and address, is quite self-willed.
14232  An 
14233 \begin_inset Quotes eld
14234 \end_inset
14235
14236 ordinary
14237 \begin_inset Quotes erd
14238 \end_inset
14239
14240  heading is produced by the following \SpecialChar LaTeX
14241  commands in the preamble:
14242 \end_layout
14243
14244 \begin_layout LyX-Code
14245
14246 \backslash
14247 firsthead{
14248 \backslash
14249 parbox[b]{
14250 \backslash
14251 textwidth}
14252 \end_layout
14253
14254 \begin_layout LyX-Code
14255   {
14256 \backslash
14257 ignorespaces 
14258 \backslash
14259 fromname
14260 \backslash
14261
14262 \backslash
14263  
14264 \backslash
14265 ignorespaces 
14266 \backslash
14267 fromaddress}} 
14268 \end_layout
14269
14270 \begin_layout LyX-Code
14271
14272 \backslash
14273 nexthead{
14274 \backslash
14275 parbox[b]{
14276 \backslash
14277 textwidth}
14278 \end_layout
14279
14280 \begin_layout LyX-Code
14281   {
14282 \backslash
14283 ignorespaces 
14284 \backslash
14285 fromname 
14286 \backslash
14287 hfill 
14288 \backslash
14289 ignorespaces 
14290 \backslash
14291 pagename
14292 \backslash
14293  
14294 \backslash
14295 thepage}}
14296 \end_layout
14297
14298 \end_inset
14299
14300  A detailed German description of such \SpecialChar LaTeX
14301  commands can be found in the Koma-Script
14302  documentation 
14303 \emph on
14304 scrguide
14305 \emph default
14306 .
14307  With it, the letter's author can produce his personal letter layout.
14308 \end_layout
14309
14310 \begin_layout Standard
14311 The types 
14312 \family sans
14313 Letter
14314 \family default
14315  and 
14316 \family sans
14317 Opening
14318 \family default
14319  define the beginning of the letter and must be used in every letter.
14320  To emphasize them in the \SpecialChar LyX
14321  document class, they are marked with the letter
14322  
14323 \shape italic
14324 L
14325 \shape default
14326  or 
14327 \shape italic
14328 O
14329 \shape default
14330 , resp.
14331 \begin_inset space ~
14332 \end_inset
14333
14334 in the left margin.
14335  It is possible to write any number of letters in one file.
14336  An 
14337 \family sans
14338 Opening
14339 \family default
14340  type produces a new letter using the same addressee and a 
14341 \family sans
14342 Letter
14343 \family default
14344  type produces a new addressee.
14345  The types 
14346 \family sans
14347 Closing
14348 \family default
14349
14350 \family sans
14351 PS
14352 \family default
14353
14354 \family sans
14355 CC
14356 \family default
14357 , and 
14358 \family sans
14359 Encl
14360 \family default
14361  are ordinary paragraph types and can also be used several times in one
14362  and the same letter.
14363 \end_layout
14364
14365 \begin_layout Itemize
14366
14367 \family sans
14368 Letter
14369 \family default
14370 : produces a paragraph for the addressee and implicitly defines the beginning
14371  of the letter.
14372 \end_layout
14373
14374 \begin_layout Itemize
14375
14376 \family sans
14377 Opening
14378 \family default
14379 : produces a paragraph for the form of address and implicitly produces a
14380  new letter.
14381 \end_layout
14382
14383 \begin_layout Itemize
14384
14385 \family sans
14386 Closing
14387 \family default
14388 : produces a paragraph for a close.
14389 \end_layout
14390
14391 \begin_layout Itemize
14392
14393 \family sans
14394 PS
14395 \family default
14396 : produces a paragraph for a postscript.
14397 \end_layout
14398
14399 \begin_layout Itemize
14400
14401 \family sans
14402 CC
14403 \family default
14404 : produces a paragraph for a distribution list.
14405 \end_layout
14406
14407 \begin_layout Itemize
14408
14409 \family sans
14410 Encl
14411 \family default
14412 : produces a paragraph for enclosures.
14413 \end_layout
14414
14415 \begin_layout Standard
14416 The types 
14417 \family sans
14418 Name
14419 \family default
14420
14421 \family sans
14422 Signature
14423 \family default
14424
14425 \family sans
14426 Address
14427 \family default
14428
14429 \family sans
14430 Telephone
14431 \family default
14432
14433 \family sans
14434 Place
14435 \family default
14436
14437 \family sans
14438 Backaddress
14439 \family default
14440
14441 \family sans
14442 Specialmail
14443 \family default
14444
14445 \family sans
14446 Location
14447 \family default
14448
14449 \family sans
14450 Title
14451 \family default
14452 , and 
14453 \family sans
14454 Subject
14455 \family default
14456  are input types provided with a label to enter information, which will
14457  be processed by the document class.
14458 \begin_inset Foot
14459 status open
14460
14461 \begin_layout Plain Layout
14462 It could be seen as a matter of inconsequence, that the types 
14463 \family sans
14464 Letter
14465 \family default
14466  and 
14467 \family sans
14468 Opening
14469 \family default
14470  described above are not such input types as well.
14471  Because of the special meaning of those types, however, I have implemented
14472  them as ordinary paragraph types with a one letter mark in the left margin.
14473  Moreover, it would affect my feeling of symmetry, if the 
14474 \family sans
14475 Opening
14476 \family default
14477  type and the 
14478 \family sans
14479 Closing
14480 \family default
14481  type had such a serious different appearance.
14482 \end_layout
14483
14484 \end_inset
14485
14486  The types must be used ahead of the corresponding 
14487 \family sans
14488 Opening
14489 \family default
14490  type.
14491 \end_layout
14492
14493 \begin_layout Standard
14494 An implementation of these types in a WYSIWYG fashion does not seem to make
14495  sense, because the real appearance of the produced letter does not only
14496  depend on the usage of the particular type, but also on other factors.
14497  For example, a signature entered in the 
14498 \family sans
14499 Signature
14500 \family default
14501  type will in the standard behavior appear in the produced letter only,
14502  when in the same letter also a 
14503 \family sans
14504 Closing
14505 \family default
14506  type is used.
14507  The entered value of the 
14508 \family sans
14509 Telephone
14510 \family default
14511  type will in the standard behavior not appear in the produced letter at
14512  all.
14513  The possibility to design the letter`s heading freely is already indicated
14514  in a footnote above.
14515 \end_layout
14516
14517 \begin_layout Standard
14518 The input types can also be used as empty paragraphs.
14519  This makes sense e.
14520 \begin_inset space \thinspace{}
14521 \end_inset
14522
14523 g.
14524 \begin_inset space \space{}
14525 \end_inset
14526
14527 for the 
14528 \family sans
14529 Signature
14530 \family default
14531  type.
14532  If the 
14533 \family sans
14534 Signature
14535 \family default
14536  type is not used at all, in the standard behavior the value of the 
14537 \family sans
14538 Name
14539 \family default
14540  type is used as signature, whereas if an empty 
14541 \family sans
14542 Signature
14543 \family default
14544  type is used, no signature value is defined.
14545 \end_layout
14546
14547 \begin_layout Standard
14548 By using the input types it is possible to write a letter template, containing
14549  filled input types with your personal dates (name, address, etc.) and empty
14550  input types for other dates you want to enter.
14551 \end_layout
14552
14553 \begin_layout Itemize
14554
14555 \family sans
14556 Name
14557 \family default
14558 : sender's name, in the standard behavior appears as a centered paragraph
14559  in small caps in the letter`s heading.
14560 \end_layout
14561
14562 \begin_layout Itemize
14563
14564 \family sans
14565 Signature
14566 \family default
14567 : sender's signature, in the standard behavior appears below the 
14568 \family sans
14569 Closing
14570 \family default
14571  type.
14572  If no 
14573 \family sans
14574 Signature
14575 \family default
14576  type is used, the value of the 
14577 \family sans
14578 Name
14579 \family default
14580  type appears instead.
14581 \end_layout
14582
14583 \begin_layout Itemize
14584
14585 \family sans
14586 Address
14587 \family default
14588 : sender's address, in the standard behavior appears in a centered paragraph
14589  in the letter`s heading below the sender's name.
14590 \end_layout
14591
14592 \begin_layout Itemize
14593
14594 \family sans
14595 Telephone
14596 \family default
14597 : sender's telephone number, in the standard behavior only sets the \SpecialChar LaTeX
14598  variable
14599  
14600 \family typewriter
14601
14602 \backslash
14603 telephonenum
14604 \family default
14605 .
14606 \end_layout
14607
14608 \begin_layout Itemize
14609
14610 \family sans
14611 Place
14612 \family default
14613 : place of the letter`s making.
14614 \end_layout
14615
14616 \begin_layout Itemize
14617
14618 \family sans
14619 Date
14620 \family default
14621 : date of the letter`s making.
14622  
14623 \family sans
14624 Place
14625 \family default
14626  and 
14627 \family sans
14628 Date
14629 \family default
14630 , in the standard behavior, produce the place and the date in a right-aligned
14631  line below the addressee's field.
14632  If an empty 
14633 \family sans
14634 Date
14635 \family default
14636  type is used, neither place nor date appear, independent of the value of
14637  the 
14638 \family sans
14639 Place
14640 \family default
14641  type.
14642  If no 
14643 \family sans
14644 Date
14645 \family default
14646  type is used, the date of the letter `s production is used.
14647 \end_layout
14648
14649 \begin_layout Itemize
14650
14651 \family sans
14652 Backaddress
14653 \family default
14654 : sender`s back address, in the standard behavior appears above the addressee's
14655  field in a small sans serif font.
14656 \end_layout
14657
14658 \begin_layout Itemize
14659
14660 \family sans
14661 Specialmail
14662 \family default
14663 : special mail information, in the standard behavior appears underlined
14664  above the addressee's field below the back address.
14665 \end_layout
14666
14667 \begin_layout Itemize
14668
14669 \family sans
14670 Location
14671 \family default
14672 : additional information, in the standard behavior appears on right side
14673  below the addressee`s field.
14674 \end_layout
14675
14676 \begin_layout Itemize
14677
14678 \family sans
14679 Title
14680 \family default
14681 : the letter's title, in the standard behavior appears in a big, bold, sans
14682  serif font above the subject.
14683 \end_layout
14684
14685 \begin_layout Itemize
14686
14687 \family sans
14688 Subject
14689 \family default
14690 : the letter's subject, in the standard behavior appears in a bold font
14691  above the 
14692 \family sans
14693 Opening
14694 \family default
14695  paragraph.
14696 \end_layout
14697
14698 \begin_layout Standard
14699 The types 
14700 \family sans
14701 Yourref
14702 \family default
14703
14704 \family sans
14705 Yourmail
14706 \family default
14707
14708 \family sans
14709 Myref
14710 \family default
14711
14712 \family sans
14713 Customer
14714 \family default
14715 , and 
14716 \family sans
14717 Invoice
14718 \family default
14719  produce a business letter like line above the 
14720 \family sans
14721 Title
14722 \family default
14723  line containing the fields 
14724 \begin_inset Quotes eld
14725 \end_inset
14726
14727 Your ref.
14728 \begin_inset Quotes erd
14729 \end_inset
14730
14731
14732 \begin_inset Quotes eld
14733 \end_inset
14734
14735 Your letter of
14736 \begin_inset Quotes erd
14737 \end_inset
14738
14739
14740 \begin_inset Quotes eld
14741 \end_inset
14742
14743 Our ref.
14744 \begin_inset Quotes erd
14745 \end_inset
14746
14747
14748 \begin_inset Quotes eld
14749 \end_inset
14750
14751 Customer no.
14752 \begin_inset Quotes erd
14753 \end_inset
14754
14755
14756 \begin_inset Quotes eld
14757 \end_inset
14758
14759 Invoice no.
14760 \begin_inset Quotes erd
14761 \end_inset
14762
14763 , and 
14764 \begin_inset Quotes eld
14765 \end_inset
14766
14767 Date
14768 \begin_inset Quotes erd
14769 \end_inset
14770
14771 .
14772  For the date field, the value of the 
14773 \family sans
14774 Date
14775 \family default
14776  type is used.
14777  If one of these 
14778 \begin_inset Quotes eld
14779 \end_inset
14780
14781 business letter types
14782 \begin_inset Quotes erd
14783 \end_inset
14784
14785  is used, the value of the 
14786 \family sans
14787 Place
14788 \family default
14789  type however does not appear, but only the \SpecialChar LaTeX
14790  variable 
14791 \family typewriter
14792
14793 \backslash
14794 fromplace
14795 \family default
14796  is set.
14797  The ordinary output of place and date in a right-aligned line below the
14798  addressee`s field is suppressed.
14799  The types are implemented as input types provided with a label and must
14800  be used ahead of the corresponding 
14801 \family sans
14802 Opening
14803 \family default
14804  type.
14805 \end_layout
14806
14807 \begin_layout Itemize
14808
14809 \family sans
14810 Yourref
14811 \family default
14812 : Your ref.
14813 \end_layout
14814
14815 \begin_layout Itemize
14816
14817 \family sans
14818 Yourmail
14819 \family default
14820 : Your letter of.
14821 \end_layout
14822
14823 \begin_layout Itemize
14824
14825 \family sans
14826 Myref
14827 \family default
14828 : Our ref.
14829 \end_layout
14830
14831 \begin_layout Itemize
14832
14833 \family sans
14834 Customer
14835 \family default
14836 : Customer no.
14837 \end_layout
14838
14839 \begin_layout Itemize
14840
14841 \family sans
14842 Invoice
14843 \family default
14844 : Invoice no.
14845 \end_layout
14846
14847 \begin_layout Subsection
14848 The new letter class: letter (koma-script v.2)
14849 \end_layout
14850
14851 \begin_layout Standard
14852 by 
14853 \noun on
14854 Jürgen Spitzmüller
14855 \end_layout
14856
14857 \begin_layout Standard
14858 \begin_inset VSpace medskip
14859 \end_inset
14860
14861
14862 \end_layout
14863
14864 \begin_layout Standard
14865 \noindent
14866 Koma-Script version 2.8 has introduced a new letter class 
14867 \family typewriter
14868 scrlttr2
14869 \family default
14870  which supersedes the now unsupported 
14871 \family typewriter
14872 scrlettr
14873 \family default
14874 .
14875  It has — on the \SpecialChar LaTeX
14876  side — a completely new interface and is not compatible
14877  with the old class.
14878  Therefore, \SpecialChar LyX
14879  supports both, though it is recommended you use the new class.
14880 \end_layout
14881
14882 \begin_layout Standard
14883 This class covers the same functionality as 
14884 \emph on
14885 letter (koma-script),
14886 \emph default
14887  and a few more.
14888  The basic items are 
14889 \family sans
14890 Address
14891 \family default
14892  (receiver's address, same as 
14893 \family sans
14894 Letter
14895 \family default
14896  in the old layout), 
14897 \family sans
14898 Opening
14899 \family default
14900 , and 
14901 \family sans
14902 Closing
14903 \family default
14904 .
14905  
14906 \family sans
14907 NextAddress
14908 \family default
14909  will start a new letter (i.
14910 \begin_inset space \thinspace{}
14911 \end_inset
14912
14913 e.
14914 \begin_inset space \space{}
14915 \end_inset
14916
14917 you can write several letters per document).
14918  New elements are sender's 
14919 \family sans
14920 E-Mail
14921 \family default
14922
14923 \family sans
14924 URL
14925 \family default
14926
14927 \family sans
14928 Fax
14929 \family default
14930
14931 \family sans
14932 Bank
14933 \family default
14934  and the possibility to use a 
14935 \family sans
14936 Logo
14937 \family default
14938  (via 
14939 \family sans
14940 Insert\SpecialChar menuseparator
14941 Graphics
14942 \family default
14943 ) in the header.
14944 \end_layout
14945
14946 \begin_layout Standard
14947 The biggest improvement is, though, that the letter's layout is configurable
14948  to meet almost any needs.
14949  This can be done via the preamble or with a special style file (Letter
14950  Class Option, extension 
14951 \family typewriter
14952 *.lco
14953 \family default
14954 ), that will be read in as a class option.
14955 \begin_inset Foot
14956 status collapsed
14957
14958 \begin_layout Plain Layout
14959 The KOMA package comes with some default 
14960 \family typewriter
14961 *.lco
14962 \family default
14963  files.
14964  There is, for instance, a 
14965 \family typewriter
14966 DIN.lco
14967 \family default
14968  file that follows german typesetting rules, or a 
14969 \family typewriter
14970 KOMAold.lco
14971 \family default
14972  that provides the default layout of the old 
14973 \family typewriter
14974 scrlettr
14975 \family default
14976  class.
14977  The latter can be loaded with the class option 
14978 \family typewriter
14979 KOMAold
14980 \family default
14981 , inserted via the 
14982 \family sans
14983 Layout\SpecialChar menuseparator
14984 Document\SpecialChar menuseparator
14985 Extra Options
14986 \family default
14987  field.
14988 \end_layout
14989
14990 \end_inset
14991
14992  Have a look at the 
14993 \emph on
14994 koma-letter2
14995 \emph default
14996  template that is included in \SpecialChar LyX
14997  for examples.
14998  A detailed description is to be found in the Koma-Script documentation
14999  (
15000 \emph on
15001 scrguide
15002 \emph default
15003 ).
15004 \end_layout
15005
15006 \begin_layout Subsection
15007 Problems
15008 \end_layout
15009
15010 \begin_layout Standard
15011 Visualizing the Koma-Script document classes in \SpecialChar LyX
15012 , the \SpecialChar LyX
15013  internals cause some
15014  problems.
15015 \end_layout
15016
15017 \begin_layout Itemize
15018 The chapter number of a 
15019 \family sans
15020 Chapter
15021 \family default
15022  type appears on a line of its own above the chapter heading instead of
15023  appearing in the same line ahead of it.
15024  The cause for that is the \SpecialChar LyX
15025  internal behavior for the labeltype 
15026 \family sans
15027 Counter_Chapter
15028 \family default
15029  in the layout file.
15030 \end_layout
15031
15032 \begin_layout Itemize
15033 The headings of the types 
15034 \family sans
15035 Addchap
15036 \family default
15037  and 
15038 \family sans
15039 Addsec
15040 \family default
15041  are only put in the 
15042 \begin_inset Quotes eld
15043 \end_inset
15044
15045 true
15046 \begin_inset Quotes erd
15047 \end_inset
15048
15049  \SpecialChar LaTeX
15050  table of contents, but not in the \SpecialChar LyX
15051  table of contents (
15052 \family sans
15053 Document\SpecialChar menuseparator
15054 Table
15055 \begin_inset space ~
15056 \end_inset
15057
15058 of
15059 \begin_inset space ~
15060 \end_inset
15061
15062 Contents
15063 \family default
15064 ).
15065 \end_layout
15066
15067 \begin_layout Itemize
15068 The paragraphs in a 
15069 \emph on
15070 letter
15071 \emph default
15072  document class appear in a skip separation mode, not indented.
15073  This is the standard behavior, no special \SpecialChar LaTeX
15074  commands are needed for that.
15075  But in the 
15076 \family sans
15077 Document\SpecialChar menuseparator
15078 Settings
15079 \family default
15080  dialog the corresponding radio button indicates 
15081 \family sans
15082 Indent
15083 \family default
15084 .
15085  A 
15086 \family sans
15087 Skip
15088 \family default
15089  value always has the effect that extra \SpecialChar LaTeX
15090  commands are inserted in the document
15091  to produce the gap, which is not what is wanted in this case.
15092 \end_layout
15093
15094 \begin_layout Section
15095 Memoir
15096 \end_layout
15097
15098 \begin_layout Standard
15099 By 
15100 \noun on
15101 Jürgen Spitzmüller
15102 \end_layout
15103
15104 \begin_layout Subsection
15105 Overview
15106 \end_layout
15107
15108 \begin_layout Standard
15109 Memoir is a very powerful and constantly evolving class.
15110  It has been designed with regard to fictional and non-fictional literature.
15111  Its aim is to let the user have maximum control over the typesetting of
15112  his document.
15113  Memoir is based on the standard book class, but it can also emulate the
15114  article class (see below).
15115 \end_layout
15116
15117 \begin_layout Standard
15118 Peter Wilson, the developer of Memoir, is known as the author of lots of
15119  useful packages in the \SpecialChar LaTeX
15120  world.
15121  Most of them have been merged with Memoir.
15122  Therefore, it is much easier to layout the table of contents, appendices,
15123  chapter designs and such.
15124  \SpecialChar LyX
15125 , though, does not support all of these goodies natively.
15126  Some of them might be added to forthcoming releases
15127 \begin_inset Foot
15128 status collapsed
15129
15130 \begin_layout Plain Layout
15131 You are invited to send suggestions to 
15132 \begin_inset Flex URL
15133 status collapsed
15134
15135 \begin_layout Plain Layout
15136
15137 lyx-devel@lists.lyx.org
15138 \end_layout
15139
15140 \end_inset
15141
15142 .
15143 \end_layout
15144
15145 \end_inset
15146
15147 , lots will probably never be supported, due to the limitations of \SpecialChar LyX
15148 's framework.
15149  Of course you can still use all features with the help of some native \SpecialChar LaTeX
15150
15151  commands (\SpecialChar TeX
15152  code
15153 \begin_inset Foot
15154 status collapsed
15155
15156 \begin_layout Plain Layout
15157 Cf.
15158 \begin_inset ERT
15159 status collapsed
15160
15161 \begin_layout Plain Layout
15162
15163
15164 \backslash
15165  
15166 \end_layout
15167
15168 \end_inset
15169
15170 section
15171 \begin_inset space ~
15172 \end_inset
15173
15174
15175 \begin_inset CommandInset ref
15176 LatexCommand ref
15177 reference "sec:Inserting-TeX-Code"
15178
15179 \end_inset
15180
15181  for details.
15182 \end_layout
15183
15184 \end_inset
15185
15186 ).
15187  In this section, we can only list those features that are natively supported
15188  by \SpecialChar LyX
15189 .
15190  For detailed descriptions (and for the rest of features) we recommend you
15191  have a look at the detailed manual of the Memoir class
15192 \begin_inset Foot
15193 status collapsed
15194
15195 \begin_layout Plain Layout
15196 Cf.
15197 \begin_inset ERT
15198 status collapsed
15199
15200 \begin_layout Plain Layout
15201
15202
15203 \backslash
15204  
15205 \end_layout
15206
15207 \end_inset
15208
15209
15210 \begin_inset Flex URL
15211 status collapsed
15212
15213 \begin_layout Plain Layout
15214
15215 CTAN:/macros/latex/memoir/memman.pdf
15216 \end_layout
15217
15218 \end_inset
15219
15220 .
15221 \end_layout
15222
15223 \end_inset
15224
15225 , which is not only a user guide for the class, but also both a comprehensive
15226  description on good typesetting and a superb example for good typesetting
15227  itself.
15228 \end_layout
15229
15230 \begin_layout Subsection
15231 Basic features and restrictions
15232 \end_layout
15233
15234 \begin_layout Standard
15235 Memoir supports basically all features of the standard book classes.
15236  There are, however, some differences, as follows:
15237 \end_layout
15238
15239 \begin_layout Description
15240 Font
15241 \begin_inset space ~
15242 \end_inset
15243
15244 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
15245 \end_layout
15246
15247 \begin_layout Description
15248 Page
15249 \begin_inset space ~
15250 \end_inset
15251
15252 style: The fancy page style is not supported, due to a command clash between
15253  Memoir and the fancyhdr package (they both define a command with the same
15254  name, which confuses \SpecialChar LaTeX
15255 ).
15256  Instead, Memoir comes with a number of its own page styles (see 
15257 \family sans
15258 Layout\SpecialChar menuseparator
15259 Document\SpecialChar menuseparator
15260 Page
15261 \begin_inset space ~
15262 \end_inset
15263
15264 Style
15265 \family default
15266 ).
15267  If you want to use these for the chapter pages, you have to use the command
15268  
15269 \family typewriter
15270
15271 \backslash
15272 chapterstyle
15273 \family default
15274  in the main text or in preamble (e.
15275 \begin_inset space \thinspace{}
15276 \end_inset
15277
15278 g.
15279 \begin_inset space \space{}
15280 \end_inset
15281
15282
15283 \family typewriter
15284
15285 \backslash
15286 chapterstyle{companion}
15287 \family default
15288 ).
15289 \end_layout
15290
15291 \begin_layout Description
15292 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
15293  optional argument in the standard classes.
15294  With this, you can specify an alternative version of the title for the
15295  table of contents and the headers (for instance, if the title is too long).
15296  In \SpecialChar LyX
15297 , you can do this via 
15298 \family sans
15299 Insert\SpecialChar menuseparator
15300 Short
15301 \begin_inset space ~
15302 \end_inset
15303
15304 Title
15305 \family default
15306  at the beginning of a chapter/section.
15307  Memoir features a second optional argument and thus separates the table
15308  of contents from the header.
15309  You can define three variants of a title with this: one for the main text,
15310  one for the table of contents, and one for the headers.
15311  Simply insert two optional arguments if you need this feature, the first
15312  one containing the short title for the Table of Contents, the second one
15313  containing an alternative short title for the headers.
15314 \end_layout
15315
15316 \begin_layout Description
15317 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
15318  of contents, the list of figures and the list of table start a new page
15319  automatically.
15320  Memoir does not follow this route.
15321  You have to insert a page break yourself, if you want to have one.
15322 \end_layout
15323
15324 \begin_layout Description
15325 Titlepage: For some unknown reason, Memoir uses pagination on the title
15326  page (in the standard classes, title pages are 
15327 \begin_inset Quotes eld
15328 \end_inset
15329
15330 empty
15331 \begin_inset Quotes erd
15332 \end_inset
15333
15334 ).
15335  If you want an empty title page, type 
15336 \family typewriter
15337
15338 \backslash
15339 aliaspagestyle{title}{empty}
15340 \family default
15341  in the preamble.
15342 \end_layout
15343
15344 \begin_layout Description
15345 Article: With the class option 
15346 \emph on
15347 article
15348 \emph default
15349  (to be inserted in 
15350 \family sans
15351 Layout\SpecialChar menuseparator
15352 Document\SpecialChar menuseparator
15353 Extra
15354 \begin_inset space ~
15355 \end_inset
15356
15357 Options
15358 \family default
15359 ), you can emulate article style.
15360  That is, counters (footnotes, figures, tables etc.) will not be reset on
15361  new chapters, chapters don't start a new page (but are—in contrary to 
15362 \begin_inset Quotes eld
15363 \end_inset
15364
15365 real
15366 \begin_inset Quotes erd
15367 \end_inset
15368
15369  article classes—still allowed), parts, though, use their own page, as in
15370  book.
15371 \end_layout
15372
15373 \begin_layout Description
15374 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
15375  font commands, which have been used in the old \SpecialChar LaTeX
15376  version 2.09 (e.
15377 \begin_inset space \thinspace{}
15378 \end_inset
15379
15380 g.
15381 \begin_inset space \space{}
15382 \end_inset
15383
15384
15385 \family typewriter
15386
15387 \backslash
15388 rm
15389 \family default
15390
15391 \family typewriter
15392
15393 \backslash
15394 it
15395 \family default
15396 ).
15397  It produces an error and stops \SpecialChar LaTeX
15398  whenever such a command appears.
15399  The class option 
15400 \emph on
15401 oldfontcommands
15402 \emph default
15403  reallows the commands and spits out warnings instead (which does at least
15404  not stop \SpecialChar LaTeX
15405 ).
15406  Since a lot of packages and particularly Bib\SpecialChar TeX
15407  style files are still using
15408  those commands, we have decided to use this option by default.
15409 \end_layout
15410
15411 \begin_layout Subsection
15412 Extra features
15413 \end_layout
15414
15415 \begin_layout Standard
15416 We will only describe the features supported by \SpecialChar LyX
15417  (which is not much currently).
15418  Please consult the Memoir manual
15419 \begin_inset Foot
15420 status collapsed
15421
15422 \begin_layout Plain Layout
15423 Cf.
15424 \begin_inset ERT
15425 status collapsed
15426
15427 \begin_layout Plain Layout
15428
15429
15430 \backslash
15431  
15432 \end_layout
15433
15434 \end_inset
15435
15436
15437 \begin_inset Flex URL
15438 status collapsed
15439
15440 \begin_layout Plain Layout
15441
15442 CTAN:/macros/latex/memoir/memman.pdf
15443 \end_layout
15444
15445 \end_inset
15446
15447 .
15448 \end_layout
15449
15450 \end_inset
15451
15452  for details.
15453 \end_layout
15454
15455 \begin_layout Description
15456 Abstract: You may wonder why an abstract is an extra feature.
15457  Well, it is in book class.
15458  Usually books don't have abstracts.
15459  Memoir, however, has.
15460  You can use it wherever and how often you like.
15461 \end_layout
15462
15463 \begin_layout Description
15464 Chapterprecis: You may know this older typesetting style: The contents of
15465  a chapter are summarized below the title and also in the table of contents
15466  (e.
15467 \begin_inset space \thinspace{}
15468 \end_inset
15469
15470 g.
15471 \begin_inset space \space{}
15472 \end_inset
15473
15474
15475 \emph on
15476 Our hero arrives in Troia; he loses some friends; he finds others
15477 \emph default
15478 ).
15479  Chapterprecis does exactly this.
15480  It is therefore only sensible below a chapter.
15481 \end_layout
15482
15483 \begin_layout Description
15484 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
15485  The epigraph environment provides an elegant way of typesetting such a
15486  motto.
15487  The motto itself (text) and its author (source) are divided by a short
15488  line.
15489  Unfortunately, we have to fool \SpecialChar LyX
15490  a bit here again, since the environment
15491  needs two arguments (text and source).
15492  In this case, we have to use curly brackets (in \SpecialChar TeX
15493  mode) between the two
15494  arguments: 
15495 \emph on
15496 <smart slogan>
15497 \emph default
15498  
15499 \family typewriter
15500 }{
15501 \family default
15502  
15503 \emph on
15504 <author of the slogan>.
15505 \end_layout
15506
15507 \begin_layout Description
15508 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
15509  complex figurative poems).
15510  \SpecialChar LyX
15511  can only support a few of them.
15512  One is poemtitle, which is a centered title for poems, which will also
15513  be added to the table of contents (verse is the standard environment for
15514  poems.
15515  Memoir has some enhanced versions of verse, but you need to use \SpecialChar TeX
15516  code,
15517  because they have to be nested inside regular verse environments, which
15518  is not possible with \SpecialChar LyX
15519 ).
15520 \end_layout
15521
15522 \begin_layout Description
15523 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
15524 \end_layout
15525
15526 \begin_layout Section
15527 Article (mwart), book (mwbk) and report (mwrep)
15528 \begin_inset Argument status
15529 status collapsed
15530
15531 \begin_layout Plain Layout
15532 The 
15533 \family typewriter
15534 mw
15535 \family default
15536  Classes
15537 \end_layout
15538
15539 \end_inset
15540
15541
15542 \end_layout
15543
15544 \begin_layout Standard
15545 by 
15546 \noun on
15547 Tomasz Luczak
15548 \end_layout
15549
15550 \begin_layout Standard
15551 The \SpecialChar LyX
15552  document classes 
15553 \emph on
15554 article (mwart)
15555 \emph default
15556
15557 \emph on
15558 report (mwrep)
15559 \emph default
15560  and 
15561 \emph on
15562 book
15563 \emph default
15564  
15565 \emph on
15566 (mwbk)
15567 \emph default
15568  correspond to the \SpecialChar LaTeX
15569  document classes 
15570 \family typewriter
15571 mwart.cls
15572 \family default
15573
15574 \family typewriter
15575 mwrep.cls
15576 \family default
15577  and 
15578 \family typewriter
15579 mwbk.cls
15580 \family default
15581 , resp.
15582  They are replacements for the standard document classes 
15583 \family typewriter
15584 article.cls
15585 \family default
15586
15587 \family typewriter
15588 report.cls
15589 \family default
15590  and 
15591 \family typewriter
15592 book.cls
15593 \family default
15594 , resp., and fit better to Polish typography conventions in a number of points.
15595  
15596 \end_layout
15597
15598 \begin_layout Standard
15599 Basic differences:
15600 \end_layout
15601
15602 \begin_layout Itemize
15603 Unnumbered titles (with star, e.
15604 \begin_inset space \thinspace{}
15605 \end_inset
15606
15607 g.
15608 \begin_inset space \space{}
15609 \end_inset
15610
15611
15612 \family sans
15613 Section*
15614 \family default
15615 ) are added into table of contents,
15616 \end_layout
15617
15618 \begin_layout Itemize
15619 Additional page styles:
15620 \end_layout
15621
15622 \begin_deeper
15623 \begin_layout Description
15624 uheadings header with separated lines,
15625 \end_layout
15626
15627 \begin_layout Description
15628 myheadings custom header, contents headers via commands: 
15629 \family typewriter
15630
15631 \backslash
15632 markright
15633 \family default
15634  and 
15635 \family typewriter
15636
15637 \backslash
15638 markboth
15639 \family default
15640 ,
15641 \end_layout
15642
15643 \begin_layout Description
15644 myuheadings custom header with separated lines,
15645 \end_layout
15646
15647 \begin_layout Description
15648 outer page number is placed on outer side of page
15649 \end_layout
15650
15651 \end_deeper
15652 \begin_layout Itemize
15653 Options 
15654 \end_layout
15655
15656 \begin_deeper
15657 \begin_layout Description
15658 rmheadings serif titles — default,
15659 \end_layout
15660
15661 \begin_layout Description
15662 sfheadings sansserif titles,
15663 \end_layout
15664
15665 \begin_layout Description
15666 authortitle on title page first placed is author next title — default,
15667 \end_layout
15668
15669 \begin_layout Description
15670 titleauthor on title page first placed is title next author,
15671 \end_layout
15672
15673 \begin_layout Description
15674 withmarginpar reserve place on page for margins.
15675 \end_layout
15676
15677 \end_deeper
15678 \begin_layout Section
15679 Paper
15680 \end_layout
15681
15682 \begin_layout Standard
15683 The document class 
15684 \family sans
15685 paper
15686 \family default
15687  provides an alternative to the standard 
15688 \family sans
15689 article
15690 \family default
15691  class.
15692  It provides similar functionality, but you might prefer this layout with
15693  sans serif sections, headings, and more.
15694 \end_layout
15695
15696 \begin_layout Section
15697 Rev\SpecialChar TeX
15698 4
15699 \end_layout
15700
15701 \begin_layout Standard
15702 by 
15703 \noun on
15704 Amir Karger
15705 \end_layout
15706
15707 \begin_layout Standard
15708 \begin_inset VSpace bigskip
15709 \end_inset
15710
15711
15712 \end_layout
15713
15714 \begin_layout Standard
15715 \noindent
15716 The 
15717 \family sans
15718 Revtex
15719 \begin_inset space ~
15720 \end_inset
15721
15722 4
15723 \family default
15724  textclass works with the American Physical Sociey's Rev\SpecialChar TeX
15725  4.0 (the 
15726 \begin_inset Formula $\beta$
15727 \end_inset
15728
15729  release of May, 1999) class.
15730 \end_layout
15731
15732 \begin_layout Standard
15733 \SpecialChar LyX
15734  has a 
15735 \family sans
15736 Revtex
15737 \family default
15738  textclass, which works with Rev\SpecialChar TeX
15739  3.1.
15740  However, v3.1 is basically obsolete, as it works with \SpecialChar LaTeX
15741  2.09.
15742  That means that it doesn't interact very well with \SpecialChar LyX
15743 , which requires \SpecialChar LaTeX2e
15744 , although
15745  it has been kludged to work.
15746  Since Rev\SpecialChar TeX
15747  4.0 has been designed to work much more cleanly with \SpecialChar LaTeX2e
15748 , \SpecialChar LyX
15749  with the
15750  
15751 \family sans
15752 Rev\SpecialChar TeX
15753
15754 \begin_inset space ~
15755 \end_inset
15756
15757 4
15758 \family default
15759  textclass should also be pretty easy to use.
15760 \end_layout
15761
15762 \begin_layout Standard
15763 These documents are supposed to be used in 
15764 \emph on
15765 addition
15766 \emph default
15767  to the Rev\SpecialChar TeX
15768  4.0 documents, so we don't describe any of the special Rev\SpecialChar TeX
15769  macros,
15770  and assume you'll know what to put in the preamble if necessary.
15771 \end_layout
15772
15773 \begin_layout Subsection
15774 Installation
15775 \end_layout
15776
15777 \begin_layout Standard
15778 All you need to do is install Rev\SpecialChar TeX
15779  4, as described in the package's README
15780  file.
15781  The package can be found at The Rev\SpecialChar TeX
15782  4 Web Site 
15783 \begin_inset Flex URL
15784 status collapsed
15785
15786 \begin_layout Plain Layout
15787
15788 http://publish.aps.org/revtex4/
15789 \end_layout
15790
15791 \end_inset
15792
15793 .
15794  Install it somewhere that \SpecialChar LaTeX
15795  can see it.
15796  Test it by trying to \SpecialChar LaTeX
15797  a short Rev\SpecialChar TeX
15798  4 document in some random directory (i.
15799 \begin_inset space \thinspace{}
15800 \end_inset
15801
15802 e.
15803 \begin_inset space \space{}
15804 \end_inset
15805
15806 not the directory where you installed the class file.) Then, if you reconfigure
15807  \SpecialChar LyX
15808 , it will find the class file and let you use the Rev\SpecialChar TeX
15809 4 textclass.
15810 \end_layout
15811
15812 \begin_layout Standard
15813 Probably the easiest way to get started is either to import a Rev\SpecialChar TeX
15814  4 document
15815  using 
15816 \family typewriter
15817 tex2lyx
15818 \family default
15819 , or to use the 
15820 \family sans
15821 Revtex
15822 \begin_inset space ~
15823 \end_inset
15824
15825 4
15826 \family default
15827  template, found in the templates directory.
15828 \end_layout
15829
15830 \begin_layout Subsection
15831 Preamble Matter
15832 \end_layout
15833
15834 \begin_layout Standard
15835 Optional arguments to 
15836 \family typewriter
15837
15838 \backslash
15839 documentclass
15840 \family default
15841 , like 
15842 \begin_inset Quotes eld
15843 \end_inset
15844
15845 preprint
15846 \begin_inset Quotes erd
15847 \end_inset
15848
15849  and 
15850 \begin_inset Quotes eld
15851 \end_inset
15852
15853 aps
15854 \begin_inset Quotes erd
15855 \end_inset
15856
15857 , go in the 
15858 \family sans
15859 Extra
15860 \begin_inset space ~
15861 \end_inset
15862
15863 Options
15864 \family default
15865  field in the 
15866 \family sans
15867 Document
15868 \begin_inset space ~
15869 \end_inset
15870
15871 Layout
15872 \family default
15873  dialog, as usual.
15874  Remember that in Rev\SpecialChar TeX
15875 , at least one optional argument is required! 
15876 \end_layout
15877
15878 \begin_layout Standard
15879 Other preamble matter, like 
15880 \family typewriter
15881
15882 \backslash
15883 draft
15884 \family default
15885  etc.
15886 \begin_inset space ~
15887 \end_inset
15888
15889 goes in the 
15890 \family sans
15891 \SpecialChar LaTeX
15892
15893 \begin_inset space ~
15894 \end_inset
15895
15896 Preamble
15897 \family default
15898  dialog, also as usual.
15899 \end_layout
15900
15901 \begin_layout Subsection
15902 Layouts
15903 \end_layout
15904
15905 \begin_layout Standard
15906 The layouts basically correspond to the commands in Rev\SpecialChar TeX
15907 4.0.
15908  For example, the Email layout corresponds to 
15909 \family typewriter
15910
15911 \backslash
15912 email{}
15913 \family default
15914 .
15915  Note that (at least as of Rev\SpecialChar TeX
15916  4.0 Beta), the 
15917 \family sans
15918 Address
15919 \family default
15920  and 
15921 \family sans
15922 Affiliation
15923 \family default
15924  layouts are exactly equivalent, so you shouldn't need to use both.
15925 \begin_inset Foot
15926 status collapsed
15927
15928 \begin_layout Plain Layout
15929 In case you're curious, both were included so that 
15930 \family typewriter
15931 tex2lyx
15932 \family default
15933  would be able to translate both 
15934 \family typewriter
15935
15936 \backslash
15937 address
15938 \family default
15939  and 
15940 \family typewriter
15941
15942 \backslash
15943 affiliation
15944 \family default
15945 .
15946 \end_layout
15947
15948 \end_inset
15949
15950
15951 \end_layout
15952
15953 \begin_layout Subsection
15954 Important Notes
15955 \end_layout
15956
15957 \begin_layout Standard
15958 There are a couple of important unique aspects of Rev\SpecialChar TeX
15959  4 which might cause
15960  bugs that will be even more confusing in \SpecialChar LyX
15961 .
15962 \end_layout
15963
15964 \begin_layout Standard
15965 In Rev\SpecialChar TeX
15966 , the 
15967 \family typewriter
15968
15969 \backslash
15970 thanks
15971 \family default
15972  command goes 
15973 \emph on
15974 outside
15975 \emph default
15976  the 
15977 \family typewriter
15978
15979 \backslash
15980 author
15981 \family default
15982  command.
15983  The \SpecialChar LyX
15984  equivalent is that there is a separate Thanks layout.
15985  Do 
15986 \emph on
15987 not
15988 \emph default
15989  write footnotes in the 
15990 \family sans
15991 Author
15992 \family default
15993  layout, or weird things may happen.
15994  See the Rev\SpecialChar TeX
15995  4 documentation for more details.
15996 \end_layout
15997
15998 \begin_layout Standard
15999 Also, the 
16000 \family sans
16001 Author
16002 \begin_inset space ~
16003 \end_inset
16004
16005 Email
16006 \family default
16007
16008 \family sans
16009 Author
16010 \begin_inset space ~
16011 \end_inset
16012
16013 URL
16014 \family default
16015 , and 
16016 \family sans
16017 Thanks
16018 \family default
16019  layouts must be placed 
16020 \emph on
16021 in between
16022 \emph default
16023  the 
16024 \family sans
16025 Author
16026 \family default
16027  layout and the corresponding 
16028 \family sans
16029 Address
16030 \family default
16031  (or equivalent 
16032 \family sans
16033 Affiliation
16034 \family default
16035 ) layout.
16036  If you put the 
16037 \family sans
16038 Thanks
16039 \family default
16040  after the 
16041 \family sans
16042 Address
16043 \family default
16044 , the \SpecialChar LaTeX
16045  won't compile.
16046 \end_layout
16047
16048 \begin_layout Subsection
16049 Drawbacks
16050 \end_layout
16051
16052 \begin_layout Standard
16053 The main problem with this layout is that you can't use the optional arguments
16054  to layouts like Email and Title.
16055  (The problem is not unique to this layout; you can't use optional arguments
16056  to the Section layouts either.) This means that after you export that file
16057  to \SpecialChar LaTeX
16058  (which you'll need to do eventually to send it in to APS), you'll need
16059  to edit the \SpecialChar LaTeX
16060  file with a text editor to add the optional arguments to set,
16061  e.
16062 \begin_inset space \thinspace{}
16063 \end_inset
16064
16065 g.
16066 \begin_inset space \space{}
16067 \end_inset
16068
16069 the running title for the page headers.
16070  Lacking these layouts makes the 
16071 \family typewriter
16072
16073 \backslash
16074 altaffiliation
16075 \family default
16076  (and the equivalent 
16077 \family typewriter
16078
16079 \backslash
16080 altaddress
16081 \family default
16082 ) useless, so the corresponding layouts don't exist, and will have to be
16083  added by hand.
16084 \begin_inset Foot
16085 status collapsed
16086
16087 \begin_layout Plain Layout
16088
16089 \emph on
16090 Note from JMarc:
16091 \emph default
16092  actually, \SpecialChar LyX
16093  1.3.0 supports some forms of optional arguments, but this layout
16094  has not been updated yet to take advantage of it.
16095 \end_layout
16096
16097 \end_inset
16098
16099  
16100 \end_layout
16101
16102 \begin_layout Section
16103 Springer Journals (
16104 \family sans
16105 svjour
16106 \family default
16107 )
16108 \end_layout
16109
16110 \begin_layout Standard
16111 by 
16112 \noun on
16113 Martin Vermeer
16114 \end_layout
16115
16116 \begin_layout Subsection
16117 Description
16118 \end_layout
16119
16120 \begin_layout Standard
16121 These are the layout files for some of the journal formats used by Springer
16122  Verlag and listed on 
16123 \begin_inset Flex URL
16124 status collapsed
16125
16126 \begin_layout Plain Layout
16127
16128 http://www.springer.de/author/tex/help-journals.html
16129 \end_layout
16130
16131 \end_inset
16132
16133 , where you should also go to fetch the class files (yes, these are \SpecialChar LaTeX2e
16134  now!).
16135  It is a modular system: the things common to all journals are implemented
16136  in 
16137 \family typewriter
16138 svjour.inc
16139 \family default
16140 , which journal-specific layout files (such as, e.
16141 \begin_inset space \thinspace{}
16142 \end_inset
16143
16144 g.
16145 \begin_inset space \space{}
16146 \end_inset
16147
16148
16149 \family typewriter
16150 svjog.layout
16151 \family default
16152  for Journal of Geodesy) can include.
16153 \end_layout
16154
16155 \begin_layout Standard
16156 This means that implementing support for any other Springer journal on this
16157  list is as simple as writing your own 
16158 \family typewriter
16159 sv
16160 \family default
16161 <myjournal>
16162 \family typewriter
16163 .layout
16164 \family default
16165  file following the outline given in 
16166 \family typewriter
16167 svjog.layout
16168 \family default
16169 .
16170  
16171 \end_layout
16172
16173 \begin_layout Standard
16174 It is reasonably well tested only for the Journal of Geodesy.
16175  
16176 \family typewriter
16177 svjour
16178 \family default
16179  and 
16180 \family typewriter
16181 svjog
16182 \family default
16183  come with the standard \SpecialChar LyX
16184  distribution.
16185  Install the relevant class file (downloaded from Springer) in a proper
16186  directory, reconfigure \SpecialChar LaTeX
16187  (in the te\SpecialChar TeX
16188  case by running 
16189 \family typewriter
16190 texhash
16191 \family default
16192 , as root if necessary — doesn't \SpecialChar LyX
16193  take care of this?), reconfigure \SpecialChar LyX
16194  and
16195  it should work.
16196 \end_layout
16197
16198 \begin_layout Subsection
16199 New styles
16200 \end_layout
16201
16202 \begin_layout Standard
16203 A large number of theorem-like styles — 
16204 \family sans
16205 Claim, Conjecture,
16206 \family default
16207  
16208 \family sans
16209 \SpecialChar ldots
16210 Theorem
16211 \family default
16212 .
16213 \end_layout
16214
16215 \begin_layout Standard
16216
16217 \family sans
16218 Headnote, Dedication, Subtitle, Running_\SpecialChar LaTeX
16219 _Title, Author_Running, Institute,
16220  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
16221 \family default
16222 .
16223  See the Springer class file documentation for details.
16224 \end_layout
16225
16226 \begin_layout Subsection
16227 Supported journals
16228 \end_layout
16229
16230 \begin_layout Itemize
16231
16232 \emph on
16233 Journal of Geodesy
16234 \emph default
16235
16236 \family typewriter
16237 svjog.layout
16238 \family default
16239  — Martin Vermeer
16240 \end_layout
16241
16242 \begin_layout Itemize
16243
16244 \emph on
16245 Probability Theory and Related Fields
16246 \emph default
16247
16248 \family typewriter
16249 svprobth.layout
16250 \family default
16251  — Jean-Marc Lasgouttes
16252 \end_layout
16253
16254 \begin_layout Standard
16255 Add your own, it isn't so hard!
16256 \end_layout
16257
16258 \begin_layout Subsection
16259 Credits
16260 \end_layout
16261
16262 \begin_layout Standard
16263 These files are partly based on the older 
16264 \family typewriter
16265 ejour2.layout
16266 \family default
16267 , which was again based on a tinkered-with version of an old \SpecialChar LaTeX
16268  2.09 style
16269  file from Springer.
16270  All this, and the 
16271 \family typewriter
16272 ejour2
16273 \family default
16274  layout, are now defunct.
16275  Jean-Marc Lasgouttes helped out big in making me find my way around the
16276  \SpecialChar LyX
16277  layout file mechanism.
16278 \end_layout
16279
16280 \begin_layout Subsection
16281 Bugs
16282 \end_layout
16283
16284 \begin_layout Standard
16285 Probably.
16286  But probably less than in the old hacked-\SpecialChar LaTeX
16287  
16288 \family typewriter
16289 ejour2
16290 \family default
16291 .
16292 \end_layout
16293
16294 \begin_layout Standard
16295 Limitations e.
16296 \begin_inset space \thinspace{}
16297 \end_inset
16298
16299 g.: does not display the number for theorem-like layouts, just #.
16300 \end_layout
16301
16302 \begin_layout Section
16303 Slides [aka 
16304 \noun on
16305 Sli\SpecialChar TeX
16306
16307 \noun default
16308 ]
16309 \begin_inset CommandInset label
16310 LatexCommand label
16311 name "sec:slitex"
16312
16313 \end_inset
16314
16315
16316 \end_layout
16317
16318 \begin_layout Standard
16319 by 
16320 \noun on
16321 John Weiss
16322 \noun default
16323  
16324 \end_layout
16325
16326 \begin_layout Subsection
16327 Introduction
16328 \end_layout
16329
16330 \begin_layout Standard
16331 This section describes how to use \SpecialChar LyX
16332  to make slides for overhead projectors.
16333  There are two document classes that can do this: the default slides class
16334  and the 
16335 \family sans
16336 Foil\SpecialChar TeX
16337
16338 \family default
16339  slides class.
16340  This section documents the former.
16341 \end_layout
16342
16343 \begin_layout Standard
16344 I'm going to say this again, nice and clear, so that there's no misunderstanding
16345 :
16346 \end_layout
16347
16348 \begin_layout Standard
16349 \begin_inset VSpace bigskip
16350 \end_inset
16351
16352
16353 \end_layout
16354
16355 \begin_layout Standard
16356 \align center
16357
16358 \size large
16359 This section documents the class 
16360 \begin_inset Quotes eld
16361 \end_inset
16362
16363
16364 \family sans
16365 slides (default)
16366 \family default
16367
16368 \begin_inset Quotes erd
16369 \end_inset
16370
16371  
16372 \emph on
16373 only.
16374 \end_layout
16375
16376 \begin_layout Standard
16377 \begin_inset VSpace bigskip
16378 \end_inset
16379
16380
16381 \end_layout
16382
16383 \begin_layout Standard
16384 If you're looking for the documentation for 
16385 \begin_inset Quotes eld
16386 \end_inset
16387
16388
16389 \family sans
16390 slides (Foil\SpecialChar TeX
16391 )
16392 \family default
16393
16394 \begin_inset Quotes erd
16395 \end_inset
16396
16397 , check out section
16398 \begin_inset space ~
16399 \end_inset
16400
16401
16402 \begin_inset CommandInset ref
16403 LatexCommand ref
16404 reference "sec:foiltex"
16405
16406 \end_inset
16407
16408 .
16409  The 
16410 \family sans
16411 foils
16412 \family default
16413  class [
16414 \begin_inset Quotes eld
16415 \end_inset
16416
16417
16418 \family sans
16419 slides (Foil\SpecialChar TeX
16420 )
16421 \family default
16422
16423 \begin_inset Quotes erd
16424 \end_inset
16425
16426 ] is actually somewhat better than the default 
16427 \family sans
16428 slides
16429 \family default
16430  class,
16431 \begin_inset Foot
16432 status collapsed
16433
16434 \begin_layout Plain Layout
16435 \SpecialChar ldots
16436 or so I've been told repeatedly by its advocates.
16437  Having never used it, I have no idea if this claim is true or not.
16438 \end_layout
16439
16440 \end_inset
16441
16442  which this section documents.
16443 \end_layout
16444
16445 \begin_layout Standard
16446 This class is the \SpecialChar LaTeX2e
16447  improvement of the old 
16448 \noun on
16449 Sli\SpecialChar TeX
16450
16451 \noun default
16452  package.
16453  Every \SpecialChar LaTeX2e
16454  distribution includes this class [which I'll just refer to as 
16455 \begin_inset Quotes eld
16456 \end_inset
16457
16458
16459 \family sans
16460 slides
16461 \family default
16462
16463 \begin_inset Quotes erd
16464 \end_inset
16465
16466  from now on], so you're bound to have it.
16467  As I noted earlier, there are other classes, such as 
16468 \family sans
16469 foils
16470 \family default
16471 , which also produce slides for overhead projectors and do a better job
16472  at it.
16473  However, there are some things which 
16474 \family sans
16475 slides
16476 \family default
16477  can do which the others can't, such as generate overlays.
16478  Read on to learn more!
16479 \end_layout
16480
16481 \begin_layout Subsection
16482 Getting Started
16483 \begin_inset CommandInset label
16484 LatexCommand label
16485 name "sec:slidesetup"
16486
16487 \end_inset
16488
16489
16490 \end_layout
16491
16492 \begin_layout Standard
16493 Obviously, to use this document class, you need to select 
16494 \begin_inset Quotes eld
16495 \end_inset
16496
16497
16498 \family sans
16499 slides (default)
16500 \family default
16501
16502 \begin_inset Quotes erd
16503 \end_inset
16504
16505  from the class list in the 
16506 \family sans
16507 Document\SpecialChar menuseparator
16508 Settings
16509 \family default
16510  dialog.
16511  There are some other special things you should know about this class:
16512 \end_layout
16513
16514 \begin_layout Itemize
16515 Don't bother changing the options 
16516 \family sans
16517 Sides and Columns
16518 \family default
16519 .
16520  They're not supported by the 
16521 \family sans
16522 slides
16523 \family default
16524  class, anyways.
16525 \end_layout
16526
16527 \begin_layout Itemize
16528 The option 
16529 \family sans
16530 Page
16531 \begin_inset space ~
16532 \end_inset
16533
16534 style
16535 \family default
16536  behaves a bit differently for this class.
16537  The possible choices and what they do are as follows:
16538 \end_layout
16539
16540 \begin_deeper
16541 \begin_layout Description
16542
16543 \family sans
16544 plain
16545 \family default
16546  The final output contains page numbers in the lower right corner.
16547 \end_layout
16548
16549 \begin_layout Description
16550
16551 \family sans
16552 headings
16553 \family default
16554  Like 
16555 \family sans
16556 plain
16557 \family default
16558 , but also prints out any time markers you've put in.
16559  This is the default.
16560 \end_layout
16561
16562 \begin_layout Description
16563
16564 \family sans
16565 empty
16566 \family default
16567  The final output contains no page numbers, time markers, or alignment markers.
16568 \end_layout
16569
16570 \end_deeper
16571 \begin_layout Itemize
16572 The 
16573 \family sans
16574 slides
16575 \family default
16576  class has an extra option: 
16577 \family typewriter
16578 clock
16579 \family default
16580 .
16581  To use it, put 
16582 \begin_inset Quotes eld
16583 \end_inset
16584
16585
16586 \family typewriter
16587 clock
16588 \family default
16589
16590 \begin_inset Quotes erd
16591 \end_inset
16592
16593  in the extra class options.
16594 \end_layout
16595
16596 \begin_deeper
16597 \begin_layout Standard
16598 Using this options allows you to add time markers to 
16599 \family sans
16600 Note
16601 \family default
16602 s.
16603  See section
16604 \begin_inset space ~
16605 \end_inset
16606
16607
16608 \begin_inset CommandInset ref
16609 LatexCommand ref
16610 reference "sec:slideNote"
16611
16612 \end_inset
16613
16614  for more details.
16615 \end_layout
16616
16617 \end_deeper
16618 \begin_layout Standard
16619 You can also use the template file 
16620 \begin_inset Quotes eld
16621 \end_inset
16622
16623
16624 \family typewriter
16625 slides.lyx
16626 \family default
16627
16628 \begin_inset Quotes erd
16629 \end_inset
16630
16631  to automatically set up a document to use the 
16632 \family sans
16633 slides
16634 \family default
16635  class [using 
16636 \family sans
16637 File\SpecialChar menuseparator
16638 New
16639 \begin_inset space ~
16640 \end_inset
16641
16642 from
16643 \begin_inset space ~
16644 \end_inset
16645
16646 Template
16647 \family default
16648  to open your new document].
16649  The template file also contains some examples of the special paragraph
16650  environments used by this class.
16651  I'll describe those next.
16652 \end_layout
16653
16654 \begin_layout Subsection
16655 Paragraph Environments
16656 \end_layout
16657
16658 \begin_layout Subsubsection
16659 Supported Environments
16660 \end_layout
16661
16662 \begin_layout Standard
16663 The first thing you'll notice when you start up a new 
16664 \family sans
16665 slides
16666 \family default
16667  document is the font size and type: it's the equivalent of the size 
16668 \begin_inset Quotes eld
16669 \end_inset
16670
16671
16672 \family sans
16673 Largest
16674 \family default
16675
16676 \begin_inset Quotes erd
16677 \end_inset
16678
16679  in the 
16680 \family sans
16681 Sans
16682 \begin_inset space ~
16683 \end_inset
16684
16685 Serif
16686 \family default
16687  font.
16688  This is also what's used in the output.
16689  Think of this as a 
16690 \begin_inset Quotes eld
16691 \end_inset
16692
16693 visual cue
16694 \begin_inset Quotes erd
16695 \end_inset
16696
16697  to remind you that this is a slide.
16698  Your final slides will use a larger font; ergo, you'll have less space.
16699  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16700 \end_layout
16701
16702 \begin_layout Standard
16703 The next thing that becomes obvious is the changes to the paragraph environment
16704  pull-down box [at the far-left end of the toolbar].
16705  Most of the paragraph environments you're used to seeing are missing.
16706  There are also five new ones.
16707  That's because the 
16708 \family sans
16709 slides
16710 \family default
16711  class itself only supports certain paragraph environments:
16712 \end_layout
16713
16714 \begin_layout Itemize
16715
16716 \family sans
16717 Standard
16718 \end_layout
16719
16720 \begin_layout Itemize
16721
16722 \family sans
16723 Itemize
16724 \end_layout
16725
16726 \begin_layout Itemize
16727
16728 \family sans
16729 Enumerate
16730 \end_layout
16731
16732 \begin_layout Itemize
16733
16734 \family sans
16735 Description
16736 \end_layout
16737
16738 \begin_layout Itemize
16739
16740 \family sans
16741 List
16742 \end_layout
16743
16744 \begin_layout Itemize
16745
16746 \family sans
16747 Quotation
16748 \end_layout
16749
16750 \begin_layout Itemize
16751
16752 \family sans
16753 Quote
16754 \end_layout
16755
16756 \begin_layout Itemize
16757
16758 \family sans
16759 Verse
16760 \end_layout
16761
16762 \begin_layout Itemize
16763
16764 \family sans
16765 Caption
16766 \end_layout
16767
16768 \begin_layout Itemize
16769
16770 \family sans
16771 \SpecialChar LyX
16772 -Code
16773 \end_layout
16774
16775 \begin_layout Itemize
16776
16777 \family sans
16778 Comment
16779 \end_layout
16780
16781 \begin_layout Standard
16782 All of the other standard environments, including the section-heading environmen
16783 ts, aren't used in the 
16784 \family sans
16785 slides
16786 \family default
16787  class.
16788 \end_layout
16789
16790 \begin_layout Standard
16791 On the other hand, you'll notice the following new environments:
16792 \end_layout
16793
16794 \begin_layout Itemize
16795
16796 \family sans
16797 Slide
16798 \end_layout
16799
16800 \begin_layout Itemize
16801
16802 \family sans
16803 Overlay
16804 \end_layout
16805
16806 \begin_layout Itemize
16807
16808 \family sans
16809 Note
16810 \end_layout
16811
16812 \begin_layout Itemize
16813
16814 \family sans
16815 InvisibleText
16816 \end_layout
16817
16818 \begin_layout Itemize
16819
16820 \family sans
16821 VisibleText
16822 \end_layout
16823
16824 \begin_layout Standard
16825 These five are kind of quirky, due to a 
16826 \begin_inset Quotes eld
16827 \end_inset
16828
16829 feature
16830 \begin_inset Quotes erd
16831 \end_inset
16832
16833  in \SpecialChar LyX
16834 .
16835  You see, \SpecialChar LyX
16836  doesn't permit you to nest any other paragraph environment into
16837  an empty environment.
16838  Now, that's fine and dandy, but it means that you wouldn't be able to start
16839  a slide with anything except plain text.
16840  To deal with this, I've performed a little 
16841 \begin_inset Quotes eld
16842 \end_inset
16843
16844 \SpecialChar LaTeX
16845  magic.
16846 \begin_inset Quotes erd
16847 \end_inset
16848
16849  
16850 \end_layout
16851
16852 \begin_layout Subsubsection
16853 Quirks of the New Environments
16854 \begin_inset CommandInset label
16855 LatexCommand label
16856 name "sec:slideQuirk"
16857
16858 \end_inset
16859
16860
16861 \end_layout
16862
16863 \begin_layout Standard
16864 All five of the new paragraph environments are somewhat quirky due to inherent
16865  limitiations in the current version of \SpecialChar LyX
16866 .
16867  As I just mentioned, \SpecialChar LyX
16868  forbids environments that begin with another environment.
16869  To get around this, the 
16870 \family sans
16871 Slide
16872 \family default
16873  environment isn't a paragraph environment as described in the 
16874 \emph on
16875 User's Guide
16876 \emph default
16877 .
16878  
16879 \end_layout
16880
16881 \begin_layout Standard
16882 You should consider 
16883 \family sans
16884 Slide
16885 \family default
16886
16887 \family sans
16888 Overlay
16889 \family default
16890 , and 
16891 \family sans
16892 Note
16893 \family default
16894  to be 
16895 \begin_inset Quotes eld
16896 \end_inset
16897
16898 pseudo-environments.
16899 \begin_inset Quotes erd
16900 \end_inset
16901
16902  They look like a section heading or a 
16903 \begin_inset Quotes eld
16904 \end_inset
16905
16906
16907 \family sans
16908 Caption
16909 \family default
16910 ,
16911 \begin_inset Quotes erd
16912 \end_inset
16913
16914  but really begin a [and, if necessary, end the previous] paragraph environment.
16915  Likewise, treat 
16916 \family sans
16917 InvisibleText
16918 \family default
16919  and 
16920 \family sans
16921 VisibleText
16922 \family default
16923  as 
16924 \begin_inset Quotes eld
16925 \end_inset
16926
16927 pseudo-commands.
16928 \begin_inset Quotes erd
16929 \end_inset
16930
16931  These two perform some action.
16932 \end_layout
16933
16934 \begin_layout Standard
16935 A common feature of all five environments, 
16936 \family sans
16937 Slide
16938 \family default
16939
16940 \family sans
16941 Overlay
16942 \family default
16943
16944 \family sans
16945 Note
16946 \family default
16947
16948 \family sans
16949 InvisibleText
16950 \family default
16951  and 
16952 \family sans
16953 VisibleText
16954 \family default
16955 , is a rather long-ish label.
16956  The text following this label — ordinarily the contents of the paragraph
16957  environment — is utterly irrelevant for 
16958 \family sans
16959 Slide
16960 \family default
16961
16962 \family sans
16963 Overlay
16964 \family default
16965
16966 \family sans
16967 Note
16968 \family default
16969
16970 \family sans
16971 InvisibleText
16972 \family default
16973  and 
16974 \family sans
16975 VisibleText
16976 \family default
16977 .
16978  \SpecialChar LyX
16979  completely ignores it.
16980  In fact, you can leave these five environments completely empty.
16981  
16982 \end_layout
16983
16984 \begin_layout Standard
16985 While you don't 
16986 \emph on
16987 have
16988 \emph default
16989  to put any text after the rather long-ish label, you might want to.
16990  This could be a short description of the contents of the 
16991 \family sans
16992 Slide
16993 \family default
16994 , for example.
16995  In that case, enter your descriptive comment and hit 
16996 \family sans
16997 Return
16998 \family default
16999  as you normally would.
17000 \end_layout
17001
17002 \begin_layout Standard
17003 If, on the other hand, you don't want to enter any descriptive text, you'll
17004  hit another \SpecialChar LyX
17005  quirk.
17006  \SpecialChar LyX
17007 , like nature, abhors a vacuum, and will not let you start a new paragraph
17008  environment until you put something in the old one.
17009  So, do this:
17010 \end_layout
17011
17012 \begin_layout Itemize
17013 Start entering the text that will 
17014 \emph on
17015 follow
17016 \emph default
17017  the new 
17018 \family sans
17019 Slide
17020 \family default
17021
17022 \family sans
17023 Overlay
17024 \family default
17025
17026 \family sans
17027 Note
17028 \family default
17029
17030 \family sans
17031 InvisibleText
17032 \family default
17033  or 
17034 \family sans
17035 VisibleText
17036 \family default
17037 .
17038  
17039 \end_layout
17040
17041 \begin_layout Itemize
17042 Now move to the beginning of that paragraph.
17043  
17044 \end_layout
17045
17046 \begin_layout Itemize
17047 Next, hit 
17048 \family sans
17049 Return
17050 \family default
17051 .
17052  
17053 \end_layout
17054
17055 \begin_layout Itemize
17056 Finally, change this new, empty paragraph to a 
17057 \family sans
17058 Slide
17059 \family default
17060
17061 \family sans
17062 Overlay
17063 \family default
17064
17065 \family sans
17066 Note
17067 \family default
17068
17069 \family sans
17070 InvisibleText
17071 \family default
17072  or 
17073 \family sans
17074 VisibleText
17075 \family default
17076 .
17077  
17078 \end_layout
17079
17080 \begin_layout Standard
17081 Some future version of \SpecialChar LyX
17082  will, hopefully, resolve this quirkiness\SpecialChar ldots
17083
17084 \end_layout
17085
17086 \begin_layout Subsection
17087 Making a Presentation with 
17088 \family sans
17089 Slide
17090 \family default
17091
17092 \family sans
17093 Overlay
17094 \family default
17095  and 
17096 \family sans
17097 Note
17098 \end_layout
17099
17100 \begin_layout Subsubsection
17101 Using the 
17102 \family sans
17103 Slide
17104 \family default
17105  Environment
17106 \end_layout
17107
17108 \begin_layout Standard
17109 If you're expecting this section to teach you how to actually make a presentatio
17110 n, you'll be sorely disappointed.
17111  Naturally, I'll describe all of the ways the 
17112 \family sans
17113 slides
17114 \family default
17115  class can assist you in preparing the materials for a presentation.
17116  Filling in the contents, however, is up to you.
17117  [Then again, that 
17118 \emph on
17119 is
17120 \emph default
17121  the \SpecialChar LyX
17122  philosophy.]
17123 \end_layout
17124
17125 \begin_layout Standard
17126 Choosing the 
17127 \family sans
17128 Slide
17129 \family default
17130  environment [in the manner described in section
17131 \begin_inset space ~
17132 \end_inset
17133
17134
17135 \begin_inset CommandInset ref
17136 LatexCommand ref
17137 reference "sec:slideQuirk"
17138
17139 \end_inset
17140
17141 ] tells \SpecialChar LyX
17142  to begin a new slide [duh].
17143  The label for this environment/
17144 \begin_inset Quotes erd
17145 \end_inset
17146
17147 pseudo-command
17148 \begin_inset Quotes erd
17149 \end_inset
17150
17151  is an 
17152 \begin_inset Quotes eld
17153 \end_inset
17154
17155 ASCII line,
17156 \begin_inset Quotes erd
17157 \end_inset
17158
17159  in cool blue, followed by the label, 
17160 \begin_inset Quotes eld
17161 \end_inset
17162
17163 NewSlide:
17164 \begin_inset Quotes erd
17165 \end_inset
17166
17167 .
17168  Any text or paragraph environments that follow this one go on the new slide.
17169  It's that simple.
17170 \end_layout
17171
17172 \begin_layout Standard
17173 Slides are probably the only time you'll need to forcibly end pages in \SpecialChar LyX
17174
17175  (this can be specified in the 
17176 \family sans
17177 Paragraph Layout
17178 \family default
17179  dialog).
17180  In fact, you'll want to, once you finish entering the contents of one slide.
17181  If you've entered more text than can physically fit on a slide, the extra
17182  overflows onto a new slide.
17183  I don't recommend doing this, however, since the overflow slide won't have
17184  any page number on it.
17185  Furthermore, it may interfere with any 
17186 \family sans
17187 Overlay
17188 \family default
17189  you've made to accompany the oversized 
17190 \family sans
17191 Slide
17192 \family default
17193 .
17194 \end_layout
17195
17196 \begin_layout Standard
17197 The 
17198 \family sans
17199 Overlay
17200 \family default
17201  and 
17202 \family sans
17203 Note
17204 \family default
17205  environments work the same way as the 
17206 \family sans
17207 Slide
17208 \family default
17209  environment.
17210  They both create an 
17211 \begin_inset Quotes eld
17212 \end_inset
17213
17214 ASCII line
17215 \begin_inset Quotes erd
17216 \end_inset
17217
17218  followed by a label [
17219 \begin_inset Quotes eld
17220 \end_inset
17221
17222 NewOverlay:
17223 \begin_inset Quotes erd
17224 \end_inset
17225
17226  and 
17227 \begin_inset Quotes eld
17228 \end_inset
17229
17230 NewNote:
17231 \begin_inset Quotes erd
17232 \end_inset
17233
17234 , respectively].
17235  The color is a stunning magenta instead of blue, and the 
17236 \begin_inset Quotes eld
17237 \end_inset
17238
17239 ASCII line
17240 \begin_inset Quotes erd
17241 \end_inset
17242
17243  will look different, in style and in length.
17244  The label fonts of all three also differ from one another.
17245 \end_layout
17246
17247 \begin_layout Standard
17248 As with a 
17249 \family sans
17250 Slide
17251 \family default
17252 , if the contents of a 
17253 \family sans
17254 Note
17255 \family default
17256  or 
17257 \family sans
17258 Overlay
17259 \family default
17260  exceed the physical size of a slide or sheet of paper, the extra will overflow
17261  onto a new sheet.
17262  Again, you should avoid this.
17263  It defeats the whole purpose of 
17264 \family sans
17265 Note
17266 \family default
17267 s and 
17268 \family sans
17269 Overlay
17270 \family default
17271 s.
17272 \end_layout
17273
17274 \begin_layout Subsubsection
17275 Using 
17276 \family sans
17277 Overlay
17278 \family default
17279  with 
17280 \family sans
17281 Slide
17282 \end_layout
17283
17284 \begin_layout Standard
17285 The idea behind an 
17286 \family sans
17287 Overlay
17288 \family default
17289  is a slide that sits atop another slide.
17290  Perhaps you wish to discuss a figure on the main 
17291 \family sans
17292 Slide
17293 \family default
17294  before displaying the text associated with it.
17295  One way to accomplish this is tape a flap of dark paper over the part of
17296  the 
17297 \family sans
17298 Slide
17299 \family default
17300  you want to display later.
17301  This method fails, however, if you wish to overlap one graph with another,
17302  for example.
17303  You would then have to fumble while speaking to align the two separate,
17304  overlapping 
17305 \family sans
17306 Slide
17307 \family default
17308 s to align the two graphs.
17309  The use of an 
17310 \family sans
17311 Overlay
17312 \family default
17313  environment in both cases makes life much easier.
17314 \end_layout
17315
17316 \begin_layout Standard
17317 Each 
17318 \family sans
17319 Overlay
17320 \family default
17321  receives the page number of its 
17322 \begin_inset Quotes eld
17323 \end_inset
17324
17325 parent
17326 \begin_inset Quotes erd
17327 \end_inset
17328
17329  
17330 \family sans
17331 Slide
17332 \family default
17333 , appended by 
17334 \begin_inset Quotes eld
17335 \end_inset
17336
17337
17338 \family typewriter
17339 -a
17340 \family default
17341
17342 \begin_inset Quotes erd
17343 \end_inset
17344
17345 .
17346 \begin_inset Foot
17347 status collapsed
17348
17349 \begin_layout Plain Layout
17350 Presumably, mutliple 
17351 \family sans
17352 Overlay
17353 \family default
17354 s would have 
17355 \begin_inset Quotes eld
17356 \end_inset
17357
17358
17359 \family typewriter
17360 -a
17361 \family default
17362
17363 \begin_inset Quotes erd
17364 \end_inset
17365
17366
17367 \begin_inset Quotes eld
17368 \end_inset
17369
17370
17371 \family typewriter
17372 -b
17373 \family default
17374
17375 \begin_inset Quotes erd
17376 \end_inset
17377
17378
17379 \begin_inset Quotes eld
17380 \end_inset
17381
17382
17383 \family typewriter
17384 -c
17385 \family default
17386
17387 \begin_inset Quotes erd
17388 \end_inset
17389
17390 , etc.
17391 \begin_inset space ~
17392 \end_inset
17393
17394 appended to the page number of the parent 
17395 \family sans
17396 Slide
17397 \family default
17398 .
17399  
17400 \end_layout
17401
17402 \end_inset
17403
17404  Clearly, you want the contents of both the 
17405 \family sans
17406 Slide
17407 \family default
17408  and the 
17409 \family sans
17410 Overlay
17411 \family default
17412  to each fit on a single physical slide! You should probably consider an
17413  
17414 \family sans
17415 Overlay
17416 \family default
17417  as 
17418 \begin_inset Quotes eld
17419 \end_inset
17420
17421 part of
17422 \begin_inset Quotes erd
17423 \end_inset
17424
17425  a 
17426 \family sans
17427 Slide
17428 \family default
17429 .
17430  Indeed, the \SpecialChar LyX
17431  
17432 \family sans
17433 slides
17434 \family default
17435  class provides a visual cue for this: the label at the start of an 
17436 \family sans
17437 Overlay
17438 \family default
17439  is shorter than that at the start of a 
17440 \family sans
17441 Slide
17442 \family default
17443 .
17444  Lastly, when you generate printable output, you'll find alignment markers
17445  in all four corners of both the 
17446 \family sans
17447 Overlay
17448 \family default
17449  page and its parent 
17450 \family sans
17451 Slide
17452 \family default
17453 .
17454  These will assist you in lining up the two physical slides.
17455 \end_layout
17456
17457 \begin_layout Standard
17458 The major problem in overlaying two slides is aligning the contents of the
17459  two transparencies.
17460  How much space should you leave for that graph on the second slide? Worse
17461  still, what if you want a graph and a sentence on second slide, but there
17462  is text on the main transparency that goes in between them? You could try
17463  and insert vertical space of the right size.
17464  The better way is to use 
17465 \family sans
17466 InvisibleText
17467 \family default
17468  and 
17469 \family sans
17470 VisibleText
17471 \family default
17472 .
17473 \end_layout
17474
17475 \begin_layout Standard
17476 As their names imply, 
17477 \family sans
17478 InvisibleText
17479 \family default
17480  and 
17481 \family sans
17482 VisibleText
17483 \family default
17484  are two command-like paragraph environments that make all subsequent text
17485  invisible and visible, respectively.
17486  Note from section
17487 \begin_inset space ~
17488 \end_inset
17489
17490
17491 \begin_inset CommandInset ref
17492 LatexCommand ref
17493 reference "sec:slideQuirk"
17494
17495 \end_inset
17496
17497  that you don't place anything 
17498 \emph on
17499 into
17500 \emph default
17501  these two environments, however.
17502  When you create an 
17503 \family sans
17504 InvisibleText
17505 \family default
17506 , it inserts a centered, sky-blue label into the page reading 
17507 \begin_inset Quotes eld
17508 \end_inset
17509
17510 <Invisible Text Follows>
17511 \begin_inset Quotes erd
17512 \end_inset
17513
17514 .
17515  For paragraphs following this label, the parts of the 
17516 \family sans
17517 Slide
17518 \family default
17519  [or 
17520 \family sans
17521 Overlay
17522 \family default
17523 ; it doesn't matter which] where they would be contain instead blank space.
17524  
17525 \end_layout
17526
17527 \begin_layout Standard
17528 For 
17529 \family sans
17530 VisibleText
17531 \family default
17532 , the corresponding centered label is 
17533 \begin_inset Quotes eld
17534 \end_inset
17535
17536 <Visible Text Follows>
17537 \begin_inset Quotes erd
17538 \end_inset
17539
17540  in blazing green.
17541  Paragraphs following this label behave normally.
17542  Note that the beginning of a new 
17543 \family sans
17544 Slide
17545 \family default
17546
17547 \family sans
17548 Overlay
17549 \family default
17550 , or 
17551 \family sans
17552 Note
17553 \family default
17554  automatically shuts off an 
17555 \family sans
17556 InvisibleText
17557 \family default
17558 .
17559  It's therefore not necessary to use 
17560 \family sans
17561 VisibleText
17562 \family default
17563  at the end of a 
17564 \family sans
17565 Slide
17566 \family default
17567 .
17568 \end_layout
17569
17570 \begin_layout Standard
17571 By now, it should be obvious how to create overlay transparencies using
17572  the proper combination of 
17573 \family sans
17574 InvisibleText
17575 \family default
17576  and 
17577 \family sans
17578 VisibleText
17579 \family default
17580  on a 
17581 \family sans
17582 Slide
17583 \family default
17584  and 
17585 \family sans
17586 Overlay
17587 \family default
17588 :
17589 \end_layout
17590
17591 \begin_layout Enumerate
17592 Create a 
17593 \family sans
17594 Slide
17595 \family default
17596 , including everything that will appear on it, whether on the main slide
17597  or on the 
17598 \family sans
17599 Overlay
17600 \family default
17601 .
17602 \end_layout
17603
17604 \begin_layout Enumerate
17605 Before each figure or paragraph that will appear only on the 
17606 \family sans
17607 Overlay
17608 \family default
17609 , insert an 
17610 \family sans
17611 InvisibleText
17612 \family default
17613  environment.
17614  If necessary, insert a 
17615 \family sans
17616 VisibleText
17617 \family default
17618  environment after the 
17619 \family sans
17620 Overlay
17621 \family default
17622 -only text.
17623 \end_layout
17624
17625 \begin_layout Enumerate
17626 Start an 
17627 \family sans
17628 Overlay
17629 \family default
17630  immediately following the 
17631 \family sans
17632 Slide
17633 \family default
17634 .
17635 \end_layout
17636
17637 \begin_layout Enumerate
17638 Copy the contents of this 
17639 \family sans
17640 Slide
17641 \family default
17642  into the 
17643 \family sans
17644 Overlay
17645 \family default
17646 .
17647 \end_layout
17648
17649 \begin_layout Enumerate
17650 Within the 
17651 \family sans
17652 Overlay
17653 \family default
17654 , change all of the 
17655 \family sans
17656 InvisibleText
17657 \family default
17658  lines to 
17659 \family sans
17660 VisibleText
17661 \family default
17662  and vice-versa.
17663 \end_layout
17664
17665 \begin_layout Standard
17666 That's it.
17667  You've just made an 
17668 \family sans
17669 Overlay
17670 \family default
17671 .
17672 \end_layout
17673
17674 \begin_layout Standard
17675 There's one problem with the way I've designed the \SpecialChar LyX
17676  
17677 \family sans
17678 slides
17679 \family default
17680  class: you can't make text in the middle of a paragraph invisible, nor
17681  make text in the middle of an invisible paragraph visible again.
17682  To accomplish this feat, you'll need to use some inlined \SpecialChar LaTeX
17683  codes.
17684 \begin_inset Foot
17685 status collapsed
17686
17687 \begin_layout Plain Layout
17688 The commands of interest are: 
17689 \end_layout
17690
17691 \begin_layout Itemize
17692
17693 \family typewriter
17694 {
17695 \backslash
17696 invisible \SpecialChar ldots
17697  }
17698 \end_layout
17699
17700 \begin_layout Itemize
17701
17702 \family typewriter
17703 {
17704 \backslash
17705 visible \SpecialChar ldots
17706  }
17707 \end_layout
17708
17709 \begin_layout Plain Layout
17710 \SpecialChar ldots
17711 and need to be marked as \SpecialChar TeX
17712 .
17713  The text whose 
17714 \begin_inset Quotes eld
17715 \end_inset
17716
17717 visibility
17718 \begin_inset Quotes erd
17719 \end_inset
17720
17721  you wish to change goes in between the brackets [and after the 
17722 \family typewriter
17723
17724 \backslash
17725 invisible
17726 \family default
17727  or 
17728 \family typewriter
17729
17730 \backslash
17731 visible
17732 \family default
17733  command].
17734  If you don't know how to mark text as \SpecialChar TeX
17735 , see the appropriate section of
17736  the 
17737 \emph on
17738 User's Guide
17739 \emph default
17740 .
17741 \end_layout
17742
17743 \end_inset
17744
17745
17746 \end_layout
17747
17748 \begin_layout Subsubsection
17749 Using 
17750 \family sans
17751 Note
17752 \family default
17753  with 
17754 \family sans
17755 Slide
17756 \family default
17757
17758 \begin_inset CommandInset label
17759 LatexCommand label
17760 name "sec:slideNote"
17761
17762 \end_inset
17763
17764
17765 \end_layout
17766
17767 \begin_layout Standard
17768 Like an 
17769 \family sans
17770 Overlay
17771 \family default
17772 , a 
17773 \family sans
17774 Note
17775 \family default
17776  is associated with a 
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 .
17789  Here, too, the \SpecialChar LyX
17790  
17791 \family sans
17792 slides
17793 \family default
17794  class provides visual cues.
17795  The label for a 
17796 \family sans
17797 Note
17798 \family default
17799  is shorter than that of a 
17800 \family sans
17801 Slide
17802 \family default
17803  [yet longer than that of an 
17804 \family sans
17805 Overlay
17806 \family default
17807 ] and, like the label of an 
17808 \family sans
17809 Overlay
17810 \family default
17811  is shockingly magenta.
17812  Additionally, the printed 
17813 \family sans
17814 Note
17815 \family default
17816  has the page number of its 
17817 \begin_inset Quotes eld
17818 \end_inset
17819
17820 parent
17821 \begin_inset Quotes erd
17822 \end_inset
17823
17824  
17825 \family sans
17826 Slide
17827 \family default
17828 , appended by 
17829 \begin_inset Quotes eld
17830 \end_inset
17831
17832
17833 \family typewriter
17834 -
17835 \family default
17836 1
17837 \begin_inset Quotes erd
17838 \end_inset
17839
17840
17841 \begin_inset Quotes eld
17842 \end_inset
17843
17844
17845 \family typewriter
17846 -
17847 \family default
17848 2
17849 \begin_inset Quotes erd
17850 \end_inset
17851
17852
17853 \begin_inset Quotes eld
17854 \end_inset
17855
17856
17857 \family typewriter
17858 -
17859 \family default
17860 3
17861 \begin_inset Quotes erd
17862 \end_inset
17863
17864 , etc.
17865  You can have multiple 
17866 \family sans
17867 Note
17868 \family default
17869 s associated with a single 
17870 \family sans
17871 Slide
17872 \family default
17873 , and, as with 
17874 \family sans
17875 Slide
17876 \family default
17877  and 
17878 \family sans
17879 Overlay
17880 \family default
17881 , you'll probably want to break up long 
17882 \family sans
17883 Note
17884 \family default
17885 s so that they fit on a single sheet of paper.
17886 \end_layout
17887
17888 \begin_layout Standard
17889 The purpose of a 
17890 \family sans
17891 Note
17892 \family default
17893  is obvious: it contains anything additional you might want to say about
17894  a 
17895 \family sans
17896 Slide
17897 \family default
17898 .
17899  It could also be used as a sheet of reminders for a particular 
17900 \family sans
17901 Slide
17902 \family default
17903 .
17904  In the case of the latter, you might want to make use of time markers.
17905  Currently, the \SpecialChar LyX
17906  
17907 \family sans
17908 slides
17909 \family default
17910  class has no 
17911 \begin_inset Quotes eld
17912 \end_inset
17913
17914 native
17915 \begin_inset Quotes erd
17916 \end_inset
17917
17918  support for time markers, a 
17919 \noun on
17920 Sli\SpecialChar TeX
17921
17922 \noun default
17923  feature.
17924  So, you'll have to resort to using the \SpecialChar LaTeX
17925  codes.
17926 \end_layout
17927
17928 \begin_layout Standard
17929 To use time markers, you'll need to specify the extra class option 
17930 \begin_inset Quotes eld
17931 \end_inset
17932
17933
17934 \family typewriter
17935 clock
17936 \family default
17937
17938 \begin_inset Quotes erd
17939 \end_inset
17940
17941  [see section
17942 \begin_inset space ~
17943 \end_inset
17944
17945
17946 \begin_inset CommandInset ref
17947 LatexCommand ref
17948 reference "sec:slidesetup"
17949
17950 \end_inset
17951
17952 ].
17953  This option turns on timing marks, which will appear in the lower-left-hand
17954  corner of every 
17955 \family sans
17956 Note
17957 \family default
17958  you generate.
17959  To set what appears in the time marker, you use the \SpecialChar LaTeX
17960  commands 
17961 \begin_inset Quotes eld
17962 \end_inset
17963
17964
17965 \family typewriter
17966
17967 \backslash
17968 settime{}
17969 \family default
17970
17971 \begin_inset Quotes erd
17972 \end_inset
17973
17974  and 
17975 \begin_inset Quotes eld
17976 \end_inset
17977
17978
17979 \family typewriter
17980
17981 \backslash
17982 addtime{}
17983 \family default
17984
17985 \begin_inset Quotes erd
17986 \end_inset
17987
17988 .
17989  The arguments of both commands are time measured in seconds.
17990  
17991 \begin_inset Quotes eld
17992 \end_inset
17993
17994
17995 \family typewriter
17996
17997 \backslash
17998 settime{}
17999 \family default
18000
18001 \begin_inset Quotes erd
18002 \end_inset
18003
18004  sets the time marker to a given time.
18005  
18006 \begin_inset Quotes eld
18007 \end_inset
18008
18009
18010 \family typewriter
18011
18012 \backslash
18013 addtime{}
18014 \family default
18015
18016 \begin_inset Quotes erd
18017 \end_inset
18018
18019  increments the time marker by the specified amount.
18020  Using time markers and 
18021 \family sans
18022 Note
18023 \family default
18024 s in this fashion, you can remind yourself how much time to spend on a particula
18025
18026 \family sans
18027 Slide
18028 \family default
18029 .
18030 \end_layout
18031
18032 \begin_layout Standard
18033 There's one last feature to describe.
18034  Clearly, you'd like to print out all of your 
18035 \family sans
18036 Slide
18037 \family default
18038 s and 
18039 \family sans
18040 Overlay
18041 \family default
18042 s on transparencies while printing all of your 
18043 \family sans
18044 Note
18045 \family default
18046 s on plain paper.
18047  However, a 
18048 \family sans
18049 Note
18050 \family default
18051  
18052 \emph on
18053 must
18054 \emph default
18055  follow the 
18056 \family sans
18057 Slide
18058 \family default
18059  with which it is associated.
18060  What's a person to do?
18061 \end_layout
18062
18063 \begin_layout Standard
18064 Luckily, there are two \SpecialChar LaTeX
18065  commands that allow you to select what to print
18066  out.
18067  Both must be placed into the preamble of your document.
18068  The command 
18069 \begin_inset Quotes eld
18070 \end_inset
18071
18072
18073 \family typewriter
18074
18075 \backslash
18076 onlyslides{
18077 \backslash
18078 slides}
18079 \family default
18080
18081 \begin_inset Quotes erd
18082 \end_inset
18083
18084  will cause the output to contain only the 
18085 \family sans
18086 Slide
18087 \family default
18088 s and 
18089 \family sans
18090 Overlay
18091 \family default
18092 s.
18093  Correspondingly, the command 
18094 \begin_inset Quotes eld
18095 \end_inset
18096
18097
18098 \family typewriter
18099
18100 \backslash
18101 onlynotes{
18102 \backslash
18103 notes}
18104 \family default
18105
18106 \begin_inset Quotes erd
18107 \end_inset
18108
18109  prevents the output of anything but 
18110 \family sans
18111 Note
18112 \family default
18113 s.
18114  I'd advise placing both commands in the preamble and initially comment
18115  both out.
18116  You can then preview your entire presentation as you write.
18117  When you're done writing, you can then uncomment one of the two to select
18118  what you want to print.
18119  I like to uncomment 
18120 \begin_inset Quotes eld
18121 \end_inset
18122
18123
18124 \family typewriter
18125
18126 \backslash
18127 onlyslides{
18128 \backslash
18129 slides}
18130 \family default
18131
18132 \begin_inset Quotes erd
18133 \end_inset
18134
18135  , print to a file with 
18136 \begin_inset Quotes eld
18137 \end_inset
18138
18139
18140 \family typewriter
18141 -slides
18142 \family default
18143
18144 \begin_inset Quotes erd
18145 \end_inset
18146
18147  in its name, comment it back out, then uncomment 
18148 \begin_inset Quotes eld
18149 \end_inset
18150
18151
18152 \family typewriter
18153
18154 \backslash
18155 onlynotes{
18156 \backslash
18157 notes}
18158 \family default
18159
18160 \begin_inset Quotes erd
18161 \end_inset
18162
18163  and print to a 
18164 \begin_inset Quotes eld
18165 \end_inset
18166
18167
18168 \family typewriter
18169 *-notes.ps
18170 \family default
18171
18172 \begin_inset Quotes erd
18173 \end_inset
18174
18175  file.
18176  I can then send either file to a printer, loading transparencies or plain
18177  paper as appropriate.
18178 \end_layout
18179
18180 \begin_layout Standard
18181 You can also provide other arguments to the 
18182 \begin_inset Quotes eld
18183 \end_inset
18184
18185
18186 \family typewriter
18187
18188 \backslash
18189 onlyslides{}
18190 \family default
18191
18192 \begin_inset Quotes erd
18193 \end_inset
18194
18195  and 
18196 \begin_inset Quotes eld
18197 \end_inset
18198
18199
18200 \family typewriter
18201
18202 \backslash
18203 onlynotes{}
18204 \family default
18205
18206 \begin_inset Quotes erd
18207 \end_inset
18208
18209  commands.
18210  See a good \SpecialChar LaTeX
18211  book for details.
18212 \end_layout
18213
18214 \begin_layout Subsection
18215 The 
18216 \family sans
18217 slides
18218 \family default
18219  Class Template File
18220 \end_layout
18221
18222 \begin_layout Standard
18223 I have also provided a template file, 
18224 \begin_inset Quotes eld
18225 \end_inset
18226
18227
18228 \family typewriter
18229 slides.lyx
18230 \family default
18231
18232 \begin_inset Quotes erd
18233 \end_inset
18234
18235 , with the 
18236 \family sans
18237 slides
18238 \family default
18239  class.
18240  To use it, begin your new presentation with 
18241 \family sans
18242 File\SpecialChar menuseparator
18243 New
18244 \begin_inset space ~
18245 \end_inset
18246
18247 from
18248 \begin_inset space ~
18249 \end_inset
18250
18251 Template
18252 \family default
18253 .
18254  Your new \SpecialChar LyX
18255  presentation file will contain an example 
18256 \family sans
18257 Slide
18258 \family default
18259  – 
18260 \family sans
18261 Overlay
18262 \family default
18263  – 
18264 \family sans
18265 Note
18266 \family default
18267  triplet.
18268  The 
18269 \family sans
18270 Slide
18271 \family default
18272  and 
18273 \family sans
18274 Overlay
18275 \family default
18276  additionally contain an example of the use of 
18277 \family sans
18278 InvisibleText
18279 \family default
18280  and 
18281 \family sans
18282 VisibleText
18283 \family default
18284 .
18285  Lastly, the preamble will contain:
18286 \end_layout
18287
18288 \begin_layout LyX-Code
18289 % Uncomment to print out only slides and overlays
18290 \end_layout
18291
18292 \begin_layout LyX-Code
18293 %
18294 \end_layout
18295
18296 \begin_layout LyX-Code
18297 %
18298 \backslash
18299 onlyslides{
18300 \backslash
18301 slides}
18302 \begin_inset Newline newline
18303 \end_inset
18304
18305  
18306 \end_layout
18307
18308 \begin_layout LyX-Code
18309 % Uncomment to print out only notes
18310 \end_layout
18311
18312 \begin_layout LyX-Code
18313 %
18314 \end_layout
18315
18316 \begin_layout LyX-Code
18317 %
18318 \backslash
18319 onlynotes{
18320 \backslash
18321 notes}
18322 \end_layout
18323
18324 \begin_layout Standard
18325 One final thing: I created this class to support the \SpecialChar LaTeX2e
18326  
18327 \begin_inset Quotes eld
18328 \end_inset
18329
18330
18331 \noun on
18332 Sli\SpecialChar TeX
18333
18334 \noun default
18335  emulation
18336 \begin_inset Quotes erd
18337 \end_inset
18338
18339  class, one of the built-in \SpecialChar LaTeX2e
18340  classes.
18341  Neither I nor the rest of the \SpecialChar LyX
18342  Team endorse or oppose the use of this built-in
18343  slide class.
18344  It's here if you want it or need it.
18345  There exist other \SpecialChar LaTeX2e
18346  classes for creating presentations, such as the 
18347 \family sans
18348 Foils
18349 \family default
18350  class [see section
18351 \begin_inset space ~
18352 \end_inset
18353
18354
18355 \begin_inset CommandInset ref
18356 LatexCommand ref
18357 reference "sec:foiltex"
18358
18359 \end_inset
18360
18361 ] or the 
18362 \begin_inset Quotes eld
18363 \end_inset
18364
18365
18366 \family typewriter
18367 seminar
18368 \family default
18369
18370 \begin_inset Quotes erd
18371 \end_inset
18372
18373  package [present on some \SpecialChar TeX
18374  distributions].
18375  The latter is not yet supported under \SpecialChar LyX
18376 .
18377 \begin_inset Foot
18378 status collapsed
18379
18380 \begin_layout Plain Layout
18381 Perhaps you can take on the task\SpecialChar ldots
18382
18383 \end_layout
18384
18385 \end_inset
18386
18387  I know nothing about these other classes.
18388  Try them out to see what sort of alternative they provide.
18389 \end_layout
18390
18391 \begin_layout Chapter
18392 \SpecialChar LyX
18393  Features needing Extra Software
18394 \end_layout
18395
18396 \begin_layout Section
18397 Checking \SpecialChar TeX
18398
18399 \end_layout
18400
18401 \begin_layout Standard
18402 by 
18403 \noun on
18404 Asger Alstrup
18405 \end_layout
18406
18407 \begin_layout Subsection
18408 Introduction
18409 \end_layout
18410
18411 \begin_layout Standard
18412 If you have the 
18413 \family typewriter
18414 chktex
18415 \family default
18416  program installed
18417 \begin_inset Foot
18418 status collapsed
18419
18420 \begin_layout Plain Layout
18421
18422 \family typewriter
18423 chktex
18424 \family default
18425  is not yet available when you are using the \SpecialChar LaTeX
18426  distribution MiK\SpecialChar TeX
18427 .
18428 \end_layout
18429
18430 \end_inset
18431
18432 , you'll find in the 
18433 \family sans
18434 Tools
18435 \family default
18436  menu the entry: 
18437 \family sans
18438 Check
18439 \begin_inset space ~
18440 \end_inset
18441
18442 TeX
18443 \family default
18444 .
18445  You can get 
18446 \family typewriter
18447 chktex
18448 \family default
18449  from CTAN,
18450 \begin_inset Newline newline
18451 \end_inset
18452
18453
18454 \begin_inset CommandInset href
18455 LatexCommand href
18456 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
18457
18458 \end_inset
18459
18460 .
18461 \end_layout
18462
18463 \begin_layout Standard
18464 The 
18465 \family sans
18466 Chk\SpecialChar TeX
18467
18468 \family default
18469  package is a program that was written by 
18470 \begin_inset Flex Noun
18471 status collapsed
18472
18473 \begin_layout Plain Layout
18474 Jens T.
18475 \begin_inset space ~
18476 \end_inset
18477
18478 Berger Thielemann
18479 \end_layout
18480
18481 \end_inset
18482
18483  in frustration because some constructs in \SpecialChar LaTeX
18484  are sometimes non-intuitive,
18485  and easy to forget.
18486  The program runs over your \SpecialChar LaTeX
18487  file, checks the integrity of the file, and
18488  flags some common errors.
18489  In other technical words, it is 
18490 \family typewriter
18491 lint
18492 \family default
18493  for \SpecialChar LaTeX
18494 .
18495 \end_layout
18496
18497 \begin_layout Standard
18498 Well, what is a syntax checker doing in \SpecialChar LyX
18499  which is supposed to produce correct
18500  \SpecialChar LaTeX
18501  anyways? The answer is simple: Just as 
18502 \family typewriter
18503 Lint
18504 \family default
18505  not only checks the 
18506 \emph on
18507 syntax
18508 \emph default
18509  of C programs, but also does 
18510 \emph on
18511 semantic
18512 \emph default
18513  checks for type-errors, 
18514 \family sans
18515 Chk\SpecialChar TeX
18516
18517 \family default
18518  catches some common 
18519 \emph on
18520 typographic
18521 \emph default
18522  errors, in addition to the syntactical ones.
18523  Specifically, 
18524 \family sans
18525 Chk\SpecialChar TeX
18526
18527 \family default
18528  is capable of detecting several common errors, such as
18529 \end_layout
18530
18531 \begin_layout Itemize
18532 Ellipsis detection:
18533 \begin_inset Newline newline
18534 \end_inset
18535
18536 Use \SpecialChar ldots
18537  instead of ...
18538 \end_layout
18539
18540 \begin_layout Itemize
18541 No space in front of/after parenthesis:
18542 \begin_inset Newline newline
18543 \end_inset
18544
18545 ( wrong spacing )
18546 \end_layout
18547
18548 \begin_layout Itemize
18549 Enforcement of normal space after common abbreviations:
18550 \begin_inset Newline newline
18551 \end_inset
18552
18553 e.
18554 \begin_inset space \thinspace{}
18555 \end_inset
18556
18557 g.
18558 \begin_inset space \space{}
18559 \end_inset
18560
18561 is too wide spacing.
18562 \end_layout
18563
18564 \begin_layout Itemize
18565 Enforcement of end-of-sentence space when the last sentence ends with a
18566  capital letter:
18567 \begin_inset Newline newline
18568 \end_inset
18569
18570 This is a TEST.
18571  And this is wrong spacing.
18572 \end_layout
18573
18574 \begin_layout Itemize
18575 Space in front of labels and similar commands:
18576 \begin_inset Newline newline
18577 \end_inset
18578
18579 The label should stick right up to the text to avoid falling to a wrong
18580  page.
18581  
18582 \begin_inset CommandInset label
18583 LatexCommand label
18584 name "sec:chktex"
18585
18586 \end_inset
18587
18588  
18589 \begin_inset Foot
18590 status collapsed
18591
18592 \begin_layout Plain Layout
18593 This footnote is in danger of falling off to a wrong page
18594 \end_layout
18595
18596 \end_inset
18597
18598  The label is separated too much.
18599 \end_layout
18600
18601 \begin_layout Itemize
18602 Space in front of references, instead of hard spaces:
18603 \begin_inset Newline newline
18604 \end_inset
18605
18606 If you have bad luck, the text will break right between the referenced text
18607  and reference number, and that's a pity.
18608  See section 
18609 \begin_inset CommandInset ref
18610 LatexCommand ref
18611 reference "sec:chktex"
18612
18613 \end_inset
18614
18615 .
18616 \end_layout
18617
18618 \begin_layout Itemize
18619 Use of 
18620 \begin_inset Quotes eld
18621 \end_inset
18622
18623 x
18624 \begin_inset Quotes erd
18625 \end_inset
18626
18627  instead of 
18628 \begin_inset Formula $\times$
18629 \end_inset
18630
18631  between numbers:
18632 \begin_inset Newline newline
18633 \end_inset
18634
18635 2x2 looks cheap compared to 
18636 \begin_inset Formula $2\times2$
18637 \end_inset
18638
18639 .
18640 \end_layout
18641
18642 \begin_layout Standard
18643 and more \SpecialChar ldots
18644  It is an invaluable tool when you are 
18645 \begin_inset Quotes eld
18646 \end_inset
18647
18648 finishing up
18649 \begin_inset Quotes erd
18650 \end_inset
18651
18652  your document before printing, and you should run it right after the obligatory
18653  spelling check, and before you go fine tuning the typesetting.
18654 \end_layout
18655
18656 \begin_layout Subsection
18657 How to use it
18658 \end_layout
18659
18660 \begin_layout Standard
18661 If you have the program installed, usage is as simple as choosing 
18662 \family sans
18663 Tools\SpecialChar menuseparator
18664 Check
18665 \begin_inset space ~
18666 \end_inset
18667
18668 TeX
18669 \family default
18670 .
18671  This will make \SpecialChar LyX
18672  generate a \SpecialChar LaTeX
18673  file of your document, start 
18674 \family sans
18675 Chk\SpecialChar TeX
18676
18677 \family default
18678  to check it, and then make \SpecialChar LyX
18679  insert 
18680 \begin_inset Quotes eld
18681 \end_inset
18682
18683 error boxes
18684 \begin_inset Quotes erd
18685 \end_inset
18686
18687  with the warnings from 
18688 \family sans
18689 Chk\SpecialChar TeX
18690
18691 \family default
18692 , if there were any.
18693  The warnings will be placed close to the point of the mistake, and you
18694  can quickly find them by using the 
18695 \family sans
18696 Navigate\SpecialChar menuseparator
18697 Error
18698 \family default
18699  menu item, or the shortcut key 
18700 \family sans
18701 C-g
18702 \family default
18703  from the default 
18704 \family typewriter
18705 cua
18706 \family default
18707  bind file.
18708  Open the error boxes by clicking on them with the mouse, or use the shortcut
18709  key 
18710 \family sans
18711 C-i
18712 \family default
18713  from 
18714 \family typewriter
18715 cua
18716 \family default
18717  bindings, or the corresponding 
18718 \family sans
18719 C-o
18720 \family default
18721  for the alternate 
18722 \family typewriter
18723 emacs
18724 \family default
18725  bind file.
18726  Read the warning and correct the mistake, if it is a mistake.
18727  If you have trouble understanding what the warning is about, you can safely
18728  ignore it.
18729  Remember that there is a hidden layer between the document on screen and
18730  the technical details in invoking 
18731 \family sans
18732 Chk\SpecialChar TeX
18733
18734 \family default
18735 , and this gap can make some warnings seem arcane or just plain silly.
18736 \end_layout
18737
18738 \begin_layout Standard
18739 This document is an excellent testing bed for the feature, and it should
18740  provide quite a few warnings for you to fiddle with.
18741  Since computers are only so smart, expect most of the warnings to be false
18742  alarms, though.
18743 \end_layout
18744
18745 \begin_layout Subsection
18746 How to fine tune it
18747 \end_layout
18748
18749 \begin_layout Standard
18750 Sometimes, you'll find that 
18751 \family sans
18752 Chk\SpecialChar TeX
18753
18754 \family default
18755  makes more noise than suits your mood.
18756  Then you can choose not to use it, wait until your mood changes, or try
18757  to customize 
18758 \family sans
18759 Chk\SpecialChar TeX
18760
18761 \family default
18762  to get better along with you.
18763 \end_layout
18764
18765 \begin_layout Standard
18766 Although 
18767 \family sans
18768 Chk\SpecialChar TeX
18769
18770 \family default
18771  
18772 \emph on
18773 is
18774 \emph default
18775  very configurable and extensible, you should not expect to solve all problems
18776  with 
18777 \family sans
18778 Chk\SpecialChar TeX
18779
18780 \family default
18781  in \SpecialChar LyX
18782  this way.
18783  Since \SpecialChar LyX
18784  has to generate a somewhat special \SpecialChar LaTeX
18785  file to be able to match the
18786  line numbers from the 
18787 \family sans
18788 Chk\SpecialChar TeX
18789
18790 \family default
18791  output
18792 \begin_inset Foot
18793 status collapsed
18794
18795 \begin_layout Plain Layout
18796 You can inspect the specific output from 
18797 \family sans
18798 chktex
18799 \family default
18800  by using 
18801 \family sans
18802 Document\SpecialChar menuseparator
18803 \SpecialChar LaTeX
18804
18805 \begin_inset space ~
18806 \end_inset
18807
18808 Log
18809 \family default
18810  right after a 
18811 \family sans
18812 chktex
18813 \family default
18814  run.
18815 \end_layout
18816
18817 \end_inset
18818
18819  to the internal document structure, some of the warnings will not appear
18820  correctly.
18821  There are two things you can do about this:
18822 \end_layout
18823
18824 \begin_layout Itemize
18825 Fine tune the 
18826 \family sans
18827 Chk\SpecialChar TeX
18828
18829 \family default
18830  invocation command line in 
18831 \begin_inset Flex Noun
18832 status collapsed
18833
18834 \begin_layout Plain Layout
18835 Tools\SpecialChar menuseparator
18836 Preferences\SpecialChar menuseparator
18837 Output\SpecialChar menuseparator
18838 LaTeX\SpecialChar menuseparator
18839 CheckTeX command
18840 \end_layout
18841
18842 \end_inset
18843
18844 , or the global 
18845 \family sans
18846 Chk\SpecialChar TeX
18847
18848 \family default
18849  installation configuration file (usually with the file 
18850 \family typewriter
18851 chktexrc
18852 \family default
18853 ).
18854  See below to learn what warnings can be enabled and disabled on the command
18855  line.
18856 \end_layout
18857
18858 \begin_layout Itemize
18859 Export your document as a raw \SpecialChar LaTeX
18860  file using 
18861 \family sans
18862 File\SpecialChar menuseparator
18863 Export\SpecialChar menuseparator
18864 \SpecialChar LaTeX
18865
18866 \family default
18867  and run 
18868 \family typewriter
18869 chktex
18870 \family default
18871  manually on that.
18872  Invoked in this way, it can be a hassle to find the corresponding place
18873  in the document inside \SpecialChar LyX
18874 , but with a little patience, you should be able
18875  to do it.
18876 \end_layout
18877
18878 \begin_layout Standard
18879 Here follows the warning messages that can be enabled and disabled in 
18880 \family sans
18881 Preferences
18882 \family default
18883 .
18884  Use 
18885 \family typewriter
18886 -n#
18887 \family default
18888  to disable a warning, and 
18889 \family typewriter
18890 -w#
18891 \family default
18892  to enable a warning.
18893  The emphasized entries are disabled by default, because the default is
18894  "
18895 \family typewriter
18896 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18897 \family default
18898 ".
18899 \end_layout
18900
18901 \begin_layout Standard
18902 Notice that you should only use the options that enable and disable warnings,
18903  because \SpecialChar LyX
18904  relies on some of the other command line parameters to be set
18905  in a specific way to have a chance to communicate with 
18906 \family typewriter
18907 chktex
18908 \family default
18909 .
18910 \end_layout
18911
18912 \begin_layout Enumerate
18913
18914 \size small
18915 \emph on
18916 Command terminated with space.
18917 \end_layout
18918
18919 \begin_layout Enumerate
18920
18921 \size small
18922 Non-breaking space (
18923 \begin_inset Quotes eld
18924 \end_inset
18925
18926
18927 \family typewriter
18928 ~
18929 \family default
18930
18931 \begin_inset Quotes erd
18932 \end_inset
18933
18934 ) should have been used.
18935 \end_layout
18936
18937 \begin_layout Enumerate
18938
18939 \size small
18940 \emph on
18941 You should enclose the previous parenthesis with 
18942 \begin_inset Quotes eld
18943 \end_inset
18944
18945
18946 \family typewriter
18947 {}
18948 \family default
18949
18950 \begin_inset Quotes erd
18951 \end_inset
18952
18953 .
18954 \end_layout
18955
18956 \begin_layout Enumerate
18957
18958 \size small
18959 Italic correction (
18960 \begin_inset Quotes eld
18961 \end_inset
18962
18963
18964 \family typewriter
18965
18966 \backslash
18967 /
18968 \family default
18969
18970 \begin_inset Quotes erd
18971 \end_inset
18972
18973 ) found in non-italic buffer.
18974 \end_layout
18975
18976 \begin_layout Enumerate
18977
18978 \size small
18979 Italic correction (
18980 \begin_inset Quotes eld
18981 \end_inset
18982
18983
18984 \family typewriter
18985
18986 \backslash
18987 /
18988 \family default
18989
18990 \begin_inset Quotes erd
18991 \end_inset
18992
18993 ) found more than once.
18994 \end_layout
18995
18996 \begin_layout Enumerate
18997
18998 \size small
18999 \emph on
19000 No italic correction (
19001 \begin_inset Quotes eld
19002 \end_inset
19003
19004
19005 \family typewriter
19006
19007 \backslash
19008 /
19009 \family default
19010
19011 \begin_inset Quotes erd
19012 \end_inset
19013
19014 ) found.
19015 \end_layout
19016
19017 \begin_layout Enumerate
19018
19019 \size small
19020 Accent command 
19021 \begin_inset Quotes eld
19022 \end_inset
19023
19024
19025 \family typewriter
19026 cmd
19027 \family default
19028
19029 \begin_inset Quotes erd
19030 \end_inset
19031
19032  needs use of 
19033 \begin_inset Quotes eld
19034 \end_inset
19035
19036
19037 \family typewriter
19038 cmd
19039 \family default
19040
19041 \begin_inset Quotes erd
19042 \end_inset
19043
19044 .
19045 \end_layout
19046
19047 \begin_layout Enumerate
19048
19049 \size small
19050 Wrong length of dash may have been used.
19051 \end_layout
19052
19053 \begin_layout Enumerate
19054
19055 \size small
19056 \emph on
19057 \begin_inset Quotes eld
19058 \end_inset
19059
19060
19061 \family typewriter
19062 %s
19063 \family default
19064
19065 \begin_inset Quotes erd
19066 \end_inset
19067
19068  expected, found 
19069 \begin_inset Quotes eld
19070 \end_inset
19071
19072
19073 \family typewriter
19074 %s
19075 \family default
19076
19077 \begin_inset Quotes erd
19078 \end_inset
19079
19080 .
19081 \end_layout
19082
19083 \begin_layout Enumerate
19084
19085 \size small
19086 Solo 
19087 \begin_inset Quotes eld
19088 \end_inset
19089
19090
19091 \family typewriter
19092 %s
19093 \family default
19094
19095 \begin_inset Quotes erd
19096 \end_inset
19097
19098  found.
19099 \end_layout
19100
19101 \begin_layout Enumerate
19102
19103 \size small
19104 You should use 
19105 \begin_inset Quotes eld
19106 \end_inset
19107
19108
19109 \family typewriter
19110 %s
19111 \family default
19112
19113 \begin_inset Quotes erd
19114 \end_inset
19115
19116  to achieve an ellipsis.
19117 \end_layout
19118
19119 \begin_layout Enumerate
19120
19121 \size small
19122 Inter-word spacing (
19123 \begin_inset Quotes eld
19124 \end_inset
19125
19126
19127 \family typewriter
19128
19129 \backslash
19130
19131 \family default
19132  
19133 \begin_inset Quotes eld
19134 \end_inset
19135
19136 ) should perhaps be used.
19137 \end_layout
19138
19139 \begin_layout Enumerate
19140
19141 \size small
19142 Inter-sentence spacing (
19143 \begin_inset Quotes eld
19144 \end_inset
19145
19146
19147 \family typewriter
19148
19149 \backslash
19150 @
19151 \family default
19152
19153 \begin_inset Quotes erd
19154 \end_inset
19155
19156 ) should perhaps be used.
19157 \end_layout
19158
19159 \begin_layout Enumerate
19160
19161 \size small
19162 Could not find argument for command.
19163 \end_layout
19164
19165 \begin_layout Enumerate
19166
19167 \size small
19168 No match found for 
19169 \begin_inset Quotes eld
19170 \end_inset
19171
19172
19173 \family typewriter
19174 %s
19175 \family default
19176
19177 \begin_inset Quotes erd
19178 \end_inset
19179
19180 .
19181 \end_layout
19182
19183 \begin_layout Enumerate
19184
19185 \size small
19186 Math mode still on at end of \SpecialChar LaTeX
19187  file.
19188 \end_layout
19189
19190 \begin_layout Enumerate
19191
19192 \size small
19193 Number of 
19194 \begin_inset Quotes eld
19195 \end_inset
19196
19197
19198 \family typewriter
19199 char
19200 \family default
19201
19202 \begin_inset Quotes erd
19203 \end_inset
19204
19205  doesn't match the number of 
19206 \begin_inset Quotes eld
19207 \end_inset
19208
19209
19210 \family typewriter
19211 char
19212 \family default
19213
19214 \begin_inset Quotes erd
19215 \end_inset
19216
19217 .
19218 \end_layout
19219
19220 \begin_layout Enumerate
19221
19222 \size small
19223 You should use either 
19224 \family typewriter
19225
19226 \begin_inset Quotes eld
19227 \end_inset
19228
19229
19230 \family default
19231  or 
19232 \family typewriter
19233
19234 \begin_inset Quotes erd
19235 \end_inset
19236
19237
19238 \family default
19239  as an alternative to 
19240 \begin_inset Quotes eld
19241 \end_inset
19242
19243
19244 \family typewriter
19245 "
19246 \family default
19247
19248 \begin_inset Quotes erd
19249 \end_inset
19250
19251 .
19252 \end_layout
19253
19254 \begin_layout Enumerate
19255
19256 \size small
19257 You should use "
19258 \family typewriter
19259 '
19260 \family default
19261 " (ASCII 39) instead of "
19262 \family typewriter
19263 ´
19264 \family default
19265 " (ASCII 180).
19266 \end_layout
19267
19268 \begin_layout Enumerate
19269
19270 \size small
19271 User-specified pattern found.
19272 \end_layout
19273
19274 \begin_layout Enumerate
19275
19276 \size small
19277 This command might not be intended.
19278 \end_layout
19279
19280 \begin_layout Enumerate
19281
19282 \size small
19283 \emph on
19284 Comment displayed.
19285 \end_layout
19286
19287 \begin_layout Enumerate
19288
19289 \size small
19290 Either 
19291 \family typewriter
19292 ''
19293 \backslash
19294 ,'
19295 \family default
19296  or 
19297 \family typewriter
19298 '
19299 \backslash
19300 ,''
19301 \family default
19302  will look better.
19303 \end_layout
19304
19305 \begin_layout Enumerate
19306
19307 \size small
19308 Delete this space to maintain correct page references.
19309 \end_layout
19310
19311 \begin_layout Enumerate
19312
19313 \size small
19314 \emph on
19315 You might wish to put this between a pair of 
19316 \begin_inset Quotes eld
19317 \end_inset
19318
19319
19320 \family typewriter
19321 {}
19322 \family default
19323
19324 \begin_inset Quotes erd
19325 \end_inset
19326
19327 .
19328 \end_layout
19329
19330 \begin_layout Enumerate
19331
19332 \size small
19333 You ought to remove spaces in front of punctuation.
19334 \end_layout
19335
19336 \begin_layout Enumerate
19337
19338 \size small
19339 Could not execute \SpecialChar LaTeX
19340  command.
19341 \end_layout
19342
19343 \begin_layout Enumerate
19344
19345 \size small
19346 Don't use 
19347 \family typewriter
19348
19349 \backslash
19350 /
19351 \family default
19352  in front of small punctuation.
19353 \end_layout
19354
19355 \begin_layout Enumerate
19356
19357 \family typewriter
19358 \size small
19359 $
19360 \backslash
19361 times$
19362 \family default
19363  may look prettier here.
19364 \end_layout
19365
19366 \begin_layout Enumerate
19367
19368 \size small
19369 \emph on
19370 Multiple spaces detected in output.
19371 \end_layout
19372
19373 \begin_layout Enumerate
19374
19375 \size small
19376 This text may be ignored.
19377 \end_layout
19378
19379 \begin_layout Enumerate
19380
19381 \size small
19382 Use 
19383 \family typewriter
19384
19385 \begin_inset Quotes eld
19386 \end_inset
19387
19388
19389 \family default
19390  to begin quotation, not 
19391 \family typewriter
19392 '
19393 \family default
19394 .
19395 \end_layout
19396
19397 \begin_layout Enumerate
19398
19399 \size small
19400 Use 
19401 \family typewriter
19402 '
19403 \family default
19404  to end quotation, not 
19405 \family typewriter
19406
19407 \begin_inset Quotes eld
19408 \end_inset
19409
19410
19411 \family default
19412 .
19413 \end_layout
19414
19415 \begin_layout Enumerate
19416
19417 \size small
19418 Don't mix quotes.
19419 \end_layout
19420
19421 \begin_layout Enumerate
19422
19423 \size small
19424 You should perhaps use 
19425 \begin_inset Quotes eld
19426 \end_inset
19427
19428
19429 \family typewriter
19430 cmd
19431 \family default
19432
19433 \begin_inset Quotes erd
19434 \end_inset
19435
19436  instead.
19437 \end_layout
19438
19439 \begin_layout Enumerate
19440
19441 \size small
19442 You should put a space in front of/after parenthesis.
19443 \end_layout
19444
19445 \begin_layout Enumerate
19446
19447 \size small
19448 You should avoid spaces in front of/after parenthesis.
19449 \end_layout
19450
19451 \begin_layout Enumerate
19452
19453 \size small
19454 \emph on
19455 You should not use punctuation in front of/after quotes.
19456 \end_layout
19457
19458 \begin_layout Enumerate
19459
19460 \size small
19461 Double space found.
19462 \end_layout
19463
19464 \begin_layout Enumerate
19465
19466 \size small
19467 You should put punctuation outside inner/inside display math mode.
19468 \end_layout
19469
19470 \begin_layout Enumerate
19471
19472 \size small
19473 You ought to not use primitive \SpecialChar TeX
19474  in \SpecialChar LaTeX
19475  code.
19476 \end_layout
19477
19478 \begin_layout Enumerate
19479
19480 \size small
19481 You should remove spaces in front of 
19482 \begin_inset Quotes eld
19483 \end_inset
19484
19485
19486 \family typewriter
19487 %s
19488 \family default
19489
19490 \begin_inset Quotes erd
19491 \end_inset
19492
19493
19494 \end_layout
19495
19496 \begin_layout Enumerate
19497
19498 \size small
19499 \begin_inset Quotes eld
19500 \end_inset
19501
19502
19503 \family typewriter
19504 %s
19505 \family default
19506
19507 \begin_inset Quotes erd
19508 \end_inset
19509
19510  is normally not followed by 
19511 \begin_inset Quotes eld
19512 \end_inset
19513
19514
19515 \family typewriter
19516 %c
19517 \family default
19518
19519 \begin_inset Quotes erd
19520 \end_inset
19521
19522 .
19523 \end_layout
19524
19525 \begin_layout Standard
19526 In later versions of \SpecialChar LyX
19527 , we hope to provide a more complete interface to this
19528  tool (and it's smaller cousin 
19529 \family typewriter
19530 lacheck
19531 \family default
19532 ) to exploit the full power of it.
19533  But it's not exactly useless as it is now: go try it on one of your existing
19534  documents of a certain length and be surprised.
19535 \end_layout
19536
19537 \begin_layout Section
19538 Version Control in \SpecialChar LyX
19539
19540 \end_layout
19541
19542 \begin_layout Standard
19543 by
19544 \noun on
19545  Lars Gullik Bjønnes 
19546 \noun default
19547 and 
19548 \noun on
19549 Pavel Sanda
19550 \end_layout
19551
19552 \begin_layout Subsection
19553 Introduction
19554 \end_layout
19555
19556 \begin_layout Standard
19557 \SpecialChar LyX
19558  supports some of the most basic RCS/CVS/SVN/GIT commands.
19559  If you need something a bit more sophisticated you will have to do that
19560  manually in a terminal.
19561 \end_layout
19562
19563 \begin_layout Standard
19564 Also note that CVS support is not as good as subversion support so we advise
19565  using SVN instead.
19566  A good place to start learning Subversion is SVN Book
19567 \begin_inset Foot
19568 status collapsed
19569
19570 \begin_layout Plain Layout
19571 \begin_inset CommandInset href
19572 LatexCommand href
19573 target "http://svnbook.red-bean.com/"
19574
19575 \end_inset
19576
19577
19578 \end_layout
19579
19580 \end_inset
19581
19582 .
19583  In the case of RCS you should read 
19584 \begin_inset Quotes eld
19585 \end_inset
19586
19587 rcsintro
19588 \begin_inset Quotes erd
19589 \end_inset
19590
19591  (a man file, read it with 
19592 \family typewriter
19593 man rcsintro
19594 \family default
19595 ).
19596  This file describes all the basic features of RCS.
19597  You should especially notice the comment about a RCS directory, and the
19598  notion of a master RCS file (the file ending in 
19599 \family typewriter
19600 ,v
19601 \family default
19602 ).
19603 \end_layout
19604
19605 \begin_layout Standard
19606 Before you begin to use the version control features in \SpecialChar LyX
19607 , you should be
19608  familiar with RCS/CVS/SVN/GIT usage.
19609  The implementation in \SpecialChar LyX
19610  assumes a recent version of the GNU RCS or CVS/SVN
19611  package — no guarantees are made for older versions.
19612  Most of the log messages are not currently displayed after operations —
19613  you can check them in the Messages pane if unsure.
19614  Regular users of version control will appreciate VC toolbar, which can
19615  be enabled via 
19616 \family sans
19617 View\SpecialChar menuseparator
19618 Toolbars\SpecialChar menuseparator
19619 Version
19620 \begin_inset space ~
19621 \end_inset
19622
19623 Control
19624 \family default
19625 .
19626 \end_layout
19627
19628 \begin_layout Standard
19629 For introducing your own external commands consult vc-command in the manual
19630  of \SpecialChar LyX
19631  functions.
19632 \end_layout
19633
19634 \begin_layout Standard
19635 It is strongly recommended to store documents in uncompressed format if
19636  using version control (uncheck 
19637 \family sans
19638 Document\SpecialChar menuseparator
19639 Compressed
19640 \family default
19641  if it is checked): Uncompressed LyX documents are text files and therefore
19642  for merging two different versions by version control systems.
19643  Compressed LyX documents are binary files, which cannot be merged by version
19644  control systems.
19645 \end_layout
19646
19647 \begin_layout Subsection
19648 RCS commands in \SpecialChar LyX
19649
19650 \end_layout
19651
19652 \begin_layout Standard
19653 The following sections describe the RCS commands supported by \SpecialChar LyX
19654 .
19655  You can find them in the 
19656 \family sans
19657 File\SpecialChar menuseparator
19658 Version
19659 \begin_inset space ~
19660 \end_inset
19661
19662 Control
19663 \family default
19664  submenu.
19665  \SpecialChar LyX
19666  was tested against RCS 5.7/5.8.
19667 \end_layout
19668
19669 \begin_layout Subsubsection
19670
19671 \family sans
19672 Register
19673 \end_layout
19674
19675 \begin_layout Standard
19676 If your document is not under revision control, this is the only item shown
19677  in the menu.
19678  And if it is under revision control, the 
19679 \family sans
19680 Register
19681 \family default
19682  item is not visible.
19683  
19684 \end_layout
19685
19686 \begin_layout Standard
19687 This command registers your document with RCS (unless you are under the
19688  directory managed by CVS)\SpecialChar endofsentence
19689  You are asked interactively to supply an initial
19690  description of the document.
19691  The document is now set in Read-Only mode and you have to 
19692 \family sans
19693 Check
19694 \begin_inset space ~
19695 \end_inset
19696
19697 Out
19698 \begin_inset space ~
19699 \end_inset
19700
19701 For
19702 \begin_inset space ~
19703 \end_inset
19704
19705 Edit
19706 \family default
19707 , before making any changes to it.
19708  A document under revision control has a 
19709 \begin_inset Quotes eld
19710 \end_inset
19711
19712 [RCS:<version> <locker>]
19713 \begin_inset Quotes erd
19714 \end_inset
19715
19716  item tagged to the filename in the minibuffer.
19717 \end_layout
19718
19719 \begin_layout Standard
19720 RCS command that is run: 
19721 \family typewriter
19722 ci -q -u -i -t-"<initial description>" <file-name>
19723 \end_layout
19724
19725 \begin_layout Standard
19726 Read 
19727 \family typewriter
19728 man ci
19729 \family default
19730  to understand the switches.
19731  
19732 \end_layout
19733
19734 \begin_layout Subsubsection
19735
19736 \family sans
19737 Check In Changes
19738 \end_layout
19739
19740 \begin_layout Standard
19741 When you are finished editing a file, you check in your changes.
19742  When you do this, you are asked for a description of the changes.
19743  This is stored in the history log.
19744  The version number is bumped, your changes are applied to the master RCS
19745  file, the document is unlocked and set to Read-Only mode.
19746 \end_layout
19747
19748 \begin_layout Standard
19749 RCS command: 
19750 \family typewriter
19751 ci -q -u -m"<description>" <file-name>
19752 \end_layout
19753
19754 \begin_layout Subsubsection
19755
19756 \family sans
19757 Check Out For Edit
19758 \end_layout
19759
19760 \begin_layout Standard
19761 By doing this you lock the document so that only you can edit it.
19762  This will also make the document Read-Write only for you.
19763  You will usually continue editing for a while and when you are finished
19764  you check in your changes.
19765  The status line is changed to reflect that you have locked the file.
19766 \end_layout
19767
19768 \begin_layout Standard
19769 RCS command: 
19770 \family typewriter
19771 co -q -l <file-name>
19772 \end_layout
19773
19774 \begin_layout Subsubsection
19775
19776 \family sans
19777 Revert To Repository Version
19778 \end_layout
19779
19780 \begin_layout Standard
19781 This will discard all changes made to the document since the last check
19782  in.
19783  You get a warning before changes are discarded.
19784 \end_layout
19785
19786 \begin_layout Standard
19787 RCS command: 
19788 \family typewriter
19789 co -f -u<version> <file-name>
19790 \end_layout
19791
19792 \begin_layout Subsubsection
19793
19794 \family sans
19795 Copy
19796 \end_layout
19797
19798 \begin_layout Standard
19799 This will create a copy of the current document.
19800  Since RCS does not support copy operations natively, the version history
19801  is not preserved, and the copy is added as a new file.
19802  It requires a clean document without any changes since the last checkin.
19803  You are asked for a file name and a description of the copy operation.
19804  After that the copy is created, both locally and in the repository.
19805  If the parent directories of the copied and original document differ, all
19806  relative paths of included files of the copy are adjusted (like in 
19807 \family sans
19808 File\SpecialChar menuseparator
19809 Save As
19810 \family default
19811 \SpecialChar ldots
19812 ).
19813  Finally, the copy is loaded instead of the original document.
19814 \end_layout
19815
19816 \begin_layout Labeling
19817 \labelwidthstring 00.00.0000
19818 RCS
19819 \begin_inset space ~
19820 \end_inset
19821
19822 commands: 
19823 \begin_inset space ~
19824 \end_inset
19825
19826
19827 \begin_inset Newline newline
19828 \end_inset
19829
19830 Copy 
19831 \begin_inset Flex Code
19832 status collapsed
19833
19834 \begin_layout Plain Layout
19835
19836 \family typewriter
19837 \begin_inset Quotes eld
19838 \end_inset
19839
19840 <file-name>
19841 \begin_inset Quotes erd
19842 \end_inset
19843
19844
19845 \end_layout
19846
19847 \end_inset
19848
19849  to 
19850 \begin_inset Flex Code
19851 status collapsed
19852
19853 \begin_layout Plain Layout
19854
19855 \family typewriter
19856 \begin_inset Quotes eld
19857 \end_inset
19858
19859 <new-file-name>
19860 \begin_inset Quotes erd
19861 \end_inset
19862
19863
19864 \end_layout
19865
19866 \end_inset
19867
19868
19869 \begin_inset Newline newline
19870 \end_inset
19871
19872
19873 \begin_inset Flex Code
19874 status collapsed
19875
19876 \begin_layout Plain Layout
19877 ci -q -u 
19878 \family typewriter
19879 -i 
19880 \begin_inset Quotes eld
19881 \end_inset
19882
19883 <new-file-name>
19884 \begin_inset Quotes erd
19885 \end_inset
19886
19887
19888 \end_layout
19889
19890 \end_inset
19891
19892
19893 \end_layout
19894
19895 \begin_layout Subsubsection
19896
19897 \family sans
19898 Undo Last Checkin
19899 \end_layout
19900
19901 \begin_layout Standard
19902 This makes as if the last check in never happened.
19903  No changes are made to the document loaded into \SpecialChar LyX
19904 , but the last version
19905  is removed from the master RCS file.
19906 \end_layout
19907
19908 \begin_layout Standard
19909 RCS command: 
19910 \family typewriter
19911 rcs -o<version> <file-name>
19912 \end_layout
19913
19914 \begin_layout Subsubsection
19915
19916 \family sans
19917 Show History
19918 \end_layout
19919
19920 \begin_layout Standard
19921 This shows the complete history of the RCS document.
19922  The output of 
19923 \family typewriter
19924 rlog <file-name>
19925 \family default
19926  is shown in a browser.
19927  See 
19928 \family typewriter
19929 man rlog
19930 \family default
19931  for more info.
19932 \end_layout
19933
19934 \begin_layout Subsubsection
19935 Revision info
19936 \end_layout
19937
19938 \begin_layout Standard
19939 \SpecialChar LyX
19940  supports RCS version number, author name, date and time of last commit.
19941  All those are extracted from 
19942 \family typewriter
19943 rlog -r <file-name>
19944 \family default
19945 .
19946  See 
19947 \begin_inset CommandInset ref
19948 LatexCommand ref
19949 reference "subsec:VCS-Revision-Information"
19950
19951 \end_inset
19952
19953  for details.
19954 \end_layout
19955
19956 \begin_layout Subsection
19957 CVS commands in \SpecialChar LyX
19958
19959 \end_layout
19960
19961 \begin_layout Standard
19962 A subset of CVS operations is supported by \SpecialChar LyX
19963 .
19964  You can find the commands in the 
19965 \family sans
19966 File\SpecialChar menuseparator
19967 Version
19968 \begin_inset space ~
19969 \end_inset
19970
19971 Control
19972 \family default
19973  submenu.
19974  The version control system SVN is more powerful, so please use it instead
19975  of CVS if possible.
19976 \end_layout
19977
19978 \begin_layout Subsubsection
19979
19980 \family sans
19981 General CVS usage
19982 \end_layout
19983
19984 \begin_layout Standard
19985 If you start from scratch with CVS you have to create your repository and
19986  checkout the working copy with external tools.
19987  If you're using a client-server setup you may need to login before doing
19988  the first repository checkout.
19989 \end_layout
19990
19991 \begin_layout Standard
19992 If your documents are under revision control and others are using the same
19993  repository problems arise when different changes to the same document at
19994  the same location happen.
19995  Standard CVS repositories don't operate with a file locking mechanism.
19996  This may be surprising, but conflicts only occur if people disagree on
19997  the proper content of the same part of a document.
19998  So, if co-workers are used to communicate regularly, these conflicts occur
19999  rarely.
20000  If they don't communicate they have a fundamental problem anyway.
20001  Nevertheless some people like to work with so called 
20002 \begin_inset Quotes eld
20003 \end_inset
20004
20005 reserved checkouts
20006 \begin_inset Quotes erd
20007 \end_inset
20008
20009 .
20010  If they do so the working copy of all files is readonly when checked out
20011  first and the user starts editing after using a special command to make
20012  the working copy writable.
20013  When the changes are checked in the working copy returns to readonly state.
20014  With \SpecialChar LyX
20015  one has to edit the 
20016 \begin_inset Flex Code
20017 status collapsed
20018
20019 \begin_layout Plain Layout
20020 .cvsrc
20021 \end_layout
20022
20023 \end_inset
20024
20025  file and add the line 
20026 \begin_inset Flex Code
20027 status collapsed
20028
20029 \begin_layout Plain Layout
20030 cvs -r
20031 \end_layout
20032
20033 \end_inset
20034
20035  to work with reserved checkouts.
20036  The benefit is the possibility to see who is using a writable copy of some
20037  document.
20038  It's not guaranteed only one user makes a copy writable.
20039 \end_layout
20040
20041 \begin_layout Standard
20042 \SpecialChar LyX
20043  tries to guess if you're using reserved or non-reserved checkouts.
20044  If your working copy is readonly or it is writable and an additional copy
20045  of your document exists in the CVS/Base sub-directory a reserved otherwise
20046  a non-reserved checkout is assumed.
20047  When a reserved checkout is detected you have to use 
20048 \begin_inset Flex Noun
20049 status collapsed
20050
20051 \begin_layout Plain Layout
20052 Check Out
20053 \end_layout
20054
20055 \end_inset
20056
20057  to make your working copy writable if it's readonly.
20058  After doing so the 
20059 \begin_inset Flex Noun
20060 status collapsed
20061
20062 \begin_layout Plain Layout
20063 Check In
20064 \end_layout
20065
20066 \end_inset
20067
20068  operation is possible and that makes your working copy readonly again after
20069  transferring your changes to the repository.
20070 \end_layout
20071
20072 \begin_layout Standard
20073 More information about CVS can be found here 
20074 \begin_inset Flex URL
20075 status collapsed
20076
20077 \begin_layout Plain Layout
20078
20079 http://www.nongnu.org/cvs
20080 \end_layout
20081
20082 \end_inset
20083
20084  and here 
20085 \begin_inset Flex URL
20086 status collapsed
20087
20088 \begin_layout Plain Layout
20089
20090 http://ximbiot.com/cvs
20091 \end_layout
20092
20093 \end_inset
20094
20095 .
20096 \end_layout
20097
20098 \begin_layout Standard
20099 Read 
20100 \family typewriter
20101 man cvs
20102 \family default
20103  to understand the sub-commands and the switches mentioned below.
20104 \end_layout
20105
20106 \begin_layout Subsubsection
20107
20108 \family sans
20109 Register
20110 \end_layout
20111
20112 \begin_layout Standard
20113 If your document is not under revision control, this is the only item shown
20114  in the menu.
20115  And if it is under revision control, the 
20116 \family sans
20117 Register
20118 \family default
20119  item is not visible.
20120  
20121 \end_layout
20122
20123 \begin_layout Standard
20124 This command registers in CVS your document 
20125 \begin_inset Flex Strong
20126 status collapsed
20127
20128 \begin_layout Plain Layout
20129
20130 \emph on
20131 only
20132 \end_layout
20133
20134 \end_inset
20135
20136  in the case you have already the documents directory under CVS control
20137  (in particular 
20138 \family typewriter
20139 CVS/Entries
20140 \family default
20141  file exists).
20142  This means you have to create or checkout the archive by yourself using
20143  external tools.
20144  (In case you forget that step \SpecialChar LyX
20145  registers the document with RCS.)
20146 \end_layout
20147
20148 \begin_layout Standard
20149 Then you are asked interactively to supply an initial description of the
20150  document.
20151  Don't forget that registered file is not yet checked in.
20152 \end_layout
20153
20154 \begin_layout Standard
20155 CVS command that is run: 
20156 \family typewriter
20157 cvs -q add -m"<entered message>" "<file-name>"
20158 \end_layout
20159
20160 \begin_layout Standard
20161 The term 
20162 \family typewriter
20163 "<file-name>"
20164 \family default
20165  above and for all other CVS commands is an abbreviation for 
20166 \begin_inset Quotes eld
20167 \end_inset
20168
20169 change the current working directory to file location and use the file name
20170  without path component as argument
20171 \begin_inset Quotes erd
20172 \end_inset
20173
20174 .
20175 \end_layout
20176
20177 \begin_layout Subsubsection
20178
20179 \family sans
20180 Check In Changes
20181 \end_layout
20182
20183 \begin_layout Standard
20184 When you are finished editing a file, you commit your changes.
20185  When you do this and you had changed the document, you are asked for a
20186  description of the changes.
20187  After that changes are written to the repository.
20188  In case you didn't change the document and a reserved checkout is detected
20189  the reservation made on 
20190 \begin_inset Flex Noun
20191 status collapsed
20192
20193 \begin_layout Plain Layout
20194 Check Out
20195 \end_layout
20196
20197 \end_inset
20198
20199  is undone.
20200 \end_layout
20201
20202 \begin_layout Labeling
20203 \labelwidthstring 00.00.0000
20204 CVS
20205 \begin_inset space ~
20206 \end_inset
20207
20208 command: 
20209 \begin_inset space ~
20210 \end_inset
20211
20212
20213 \begin_inset Newline newline
20214 \end_inset
20215
20216
20217 \begin_inset Flex Code
20218 status collapsed
20219
20220 \begin_layout Plain Layout
20221 cvs 
20222 \family typewriter
20223 -q commit -m"<description>" "<file-name>"
20224 \end_layout
20225
20226 \end_inset
20227
20228  or
20229 \begin_inset Newline newline
20230 \end_inset
20231
20232
20233 \begin_inset Flex Code
20234 status collapsed
20235
20236 \begin_layout Plain Layout
20237 cvs -q unedit 
20238 \family typewriter
20239 "<file-name>"
20240 \end_layout
20241
20242 \end_inset
20243
20244
20245 \end_layout
20246
20247 \begin_layout Subsubsection
20248
20249 \family sans
20250 Check Out Changes
20251 \end_layout
20252
20253 \begin_layout Standard
20254 When you are sharing a repository with others, you may have to incorporate
20255  their changes into your working copy.
20256 \end_layout
20257
20258 \begin_layout Standard
20259 CVS command: 
20260 \family typewriter
20261 cvs -q update "<file-name>"
20262 \end_layout
20263
20264 \begin_layout Standard
20265 If a readonly checkout is detected the working copy is made writable and
20266  reserved.
20267 \end_layout
20268
20269 \begin_layout Standard
20270 CVS command: 
20271 \family typewriter
20272 cvs -q edit "<file-name>"
20273 \end_layout
20274
20275 \begin_layout Subsubsection
20276
20277 \family sans
20278 Revert To Repository Version
20279 \end_layout
20280
20281 \begin_layout Standard
20282 This will discard all changes made to the document since the last check
20283  in.
20284  You get a warning before changes are discarded.
20285  Firstly the file is deleted, secondly CVS update command is run.
20286 \end_layout
20287
20288 \begin_layout Standard
20289 CVS command: 
20290 \family typewriter
20291 cvs -q update "<file-name>"
20292 \end_layout
20293
20294 \begin_layout Standard
20295 If a reserved checkout is detected and the working copy has no changes only
20296  the reservation is undone.
20297 \end_layout
20298
20299 \begin_layout Standard
20300 CVS command: 
20301 \family typewriter
20302 cvs -q unedit "<file-name>"
20303 \end_layout
20304
20305 \begin_layout Subsubsection
20306
20307 \family sans
20308 Copy
20309 \end_layout
20310
20311 \begin_layout Standard
20312 This will create a copy of the current document.
20313  Since CVS does not support copy operations natively, the version history
20314  is not preserved, and the copy is added as a new file.
20315  It requires a clean document without any changes since the last checkin.
20316  You are asked for a file name and a description of the copy operation.
20317  After that the copy is created, both locally and in the repository.
20318  If the parent directories of the copied and original document differ, all
20319  relative paths of included files of the copy are adjusted (like in 
20320 \family sans
20321 File\SpecialChar menuseparator
20322 Save As
20323 \family default
20324 \SpecialChar ldots
20325 ).
20326  Finally, the copy is loaded instead of the original document.
20327 \end_layout
20328
20329 \begin_layout Labeling
20330 \labelwidthstring 00.00.0000
20331 CVS
20332 \begin_inset space ~
20333 \end_inset
20334
20335 commands: 
20336 \begin_inset space ~
20337 \end_inset
20338
20339
20340 \begin_inset Newline newline
20341 \end_inset
20342
20343 Copy 
20344 \begin_inset Flex Code
20345 status collapsed
20346
20347 \begin_layout Plain Layout
20348
20349 \family typewriter
20350 \begin_inset Quotes eld
20351 \end_inset
20352
20353 <file-name>
20354 \begin_inset Quotes erd
20355 \end_inset
20356
20357
20358 \end_layout
20359
20360 \end_inset
20361
20362  to 
20363 \begin_inset Flex Code
20364 status collapsed
20365
20366 \begin_layout Plain Layout
20367
20368 \family typewriter
20369 \begin_inset Quotes eld
20370 \end_inset
20371
20372 <new-file-name>
20373 \begin_inset Quotes erd
20374 \end_inset
20375
20376
20377 \end_layout
20378
20379 \end_inset
20380
20381
20382 \begin_inset Newline newline
20383 \end_inset
20384
20385
20386 \begin_inset Flex Code
20387 status collapsed
20388
20389 \begin_layout Plain Layout
20390 cvs -q add 
20391 \family typewriter
20392
20393 \begin_inset Quotes eld
20394 \end_inset
20395
20396 <new-file-name>
20397 \begin_inset Quotes erd
20398 \end_inset
20399
20400
20401 \end_layout
20402
20403 \end_inset
20404
20405
20406 \end_layout
20407
20408 \begin_layout Subsubsection
20409
20410 \family sans
20411 Rename
20412 \end_layout
20413
20414 \begin_layout Standard
20415 This will rename the current document.
20416  Since CVS does not support rename operations natively, the version history
20417  is not preserved, the renamed document is added as a new file, and the
20418  original document is deleted.
20419  It requires a clean document without any changes since the last checkin.
20420  You are asked for a file name and a description of the rename operation.
20421  After that the document is renamed, both locally and in the repository.
20422  If the parent directories of the new and old file names differ, all relative
20423  paths of included files are adjusted (like in 
20424 \family sans
20425 File\SpecialChar menuseparator
20426 Save As
20427 \family default
20428 \SpecialChar ldots
20429 ).
20430  Finally, the document is reloaded using the new name.
20431 \end_layout
20432
20433 \begin_layout Labeling
20434 \labelwidthstring 00.00.0000
20435 CVS
20436 \begin_inset space ~
20437 \end_inset
20438
20439 commands: 
20440 \begin_inset space ~
20441 \end_inset
20442
20443
20444 \begin_inset Newline newline
20445 \end_inset
20446
20447 Rename 
20448 \begin_inset Flex Code
20449 status collapsed
20450
20451 \begin_layout Plain Layout
20452
20453 \family typewriter
20454 \begin_inset Quotes eld
20455 \end_inset
20456
20457 <file-name>
20458 \begin_inset Quotes erd
20459 \end_inset
20460
20461
20462 \end_layout
20463
20464 \end_inset
20465
20466  to 
20467 \begin_inset Flex Code
20468 status collapsed
20469
20470 \begin_layout Plain Layout
20471
20472 \family typewriter
20473 \begin_inset Quotes eld
20474 \end_inset
20475
20476 <new-file-name>
20477 \begin_inset Quotes erd
20478 \end_inset
20479
20480
20481 \end_layout
20482
20483 \end_inset
20484
20485
20486 \begin_inset Newline newline
20487 \end_inset
20488
20489
20490 \begin_inset Flex Code
20491 status collapsed
20492
20493 \begin_layout Plain Layout
20494 cvs -q add 
20495 \family typewriter
20496
20497 \begin_inset Quotes eld
20498 \end_inset
20499
20500 <new-file-name>
20501 \begin_inset Quotes erd
20502 \end_inset
20503
20504
20505 \end_layout
20506
20507 \end_inset
20508
20509
20510 \begin_inset Newline newline
20511 \end_inset
20512
20513
20514 \begin_inset Flex Code
20515 status collapsed
20516
20517 \begin_layout Plain Layout
20518 cvs -q remove 
20519 \family typewriter
20520
20521 \begin_inset Quotes eld
20522 \end_inset
20523
20524 <file-name>
20525 \begin_inset Quotes erd
20526 \end_inset
20527
20528
20529 \end_layout
20530
20531 \end_inset
20532
20533
20534 \end_layout
20535
20536 \begin_layout Subsubsection
20537 Update of the local directory checkout from repository
20538 \end_layout
20539
20540 \begin_layout Standard
20541 Once your documents gets more complex, containing sub-documents and pictures,
20542  including external 
20543 \begin_inset Flex Code
20544 status collapsed
20545
20546 \begin_layout Plain Layout
20547 .tex
20548 \end_layout
20549
20550 \end_inset
20551
20552  files and so on using version control becomes more complicated.
20553  \SpecialChar LyX
20554  supports updating the whole tree in which resides the document.
20555  This become especially useful once you cooperate with people which neither
20556  have detailed knowledge about CVS usage nor they have ambition to commit
20557  additional material to the repository.
20558  You have to organize the files structure so that all external files are
20559  in the same directory or subdirectories of the document.
20560  It's good practice anyway to store multipart documents in an extra directory.
20561 \end_layout
20562
20563 \begin_layout Standard
20564 The 
20565 \begin_inset Flex Code
20566 status collapsed
20567
20568 \begin_layout Plain Layout
20569 Update local directory from repository
20570 \end_layout
20571
20572 \end_inset
20573
20574  command updates the whole directory.
20575  If local changes are detected user is warned before update starts.
20576  In case of merge conflicts both versions of the conflicting document parts
20577  are placed in the final document.
20578  You have to review and correct the result of the merge.
20579  You'll find the conflicts enclosed in pairs of 
20580 \begin_inset Flex Code
20581 status collapsed
20582
20583 \begin_layout Plain Layout
20584 <<<<<<<
20585 \end_layout
20586
20587 \end_inset
20588
20589  and 
20590 \begin_inset Flex Code
20591 status collapsed
20592
20593 \begin_layout Plain Layout
20594 >>>>>>>
20595 \end_layout
20596
20597 \end_inset
20598
20599  separated by 
20600 \begin_inset Flex Code
20601 status collapsed
20602
20603 \begin_layout Plain Layout
20604 =======
20605 \end_layout
20606
20607 \end_inset
20608
20609 .
20610  The first part is your version as before the update operation with the
20611  document name prepended.
20612  The second one is the repository version with the version number after
20613  the sequence of 
20614 \begin_inset Flex Code
20615 status collapsed
20616
20617 \begin_layout Plain Layout
20618 >
20619 \end_layout
20620
20621 \end_inset
20622
20623  signs.
20624 \end_layout
20625
20626 \begin_layout Labeling
20627 \labelwidthstring 00.00.0000
20628 CVS
20629 \begin_inset space ~
20630 \end_inset
20631
20632 commands: 
20633 \begin_inset space ~
20634 \end_inset
20635
20636
20637 \begin_inset Newline newline
20638 \end_inset
20639
20640
20641 \begin_inset Flex Code
20642 status collapsed
20643
20644 \begin_layout Plain Layout
20645 cd $path; cvs diff 
20646 \family typewriter
20647 "."
20648 \end_layout
20649
20650 \end_inset
20651
20652  (Ask if changes are detected.)
20653 \begin_inset Newline newline
20654 \end_inset
20655
20656
20657 \begin_inset Flex Code
20658 status collapsed
20659
20660 \begin_layout Plain Layout
20661 cd $path; cvs -q update 
20662 \family typewriter
20663 "."
20664 \end_layout
20665
20666 \end_inset
20667
20668
20669 \end_layout
20670
20671 \begin_layout Standard
20672 where 
20673 \begin_inset Flex Code
20674 status collapsed
20675
20676 \begin_layout Plain Layout
20677 $path
20678 \end_layout
20679
20680 \end_inset
20681
20682  stands for the path to the document.
20683 \end_layout
20684
20685 \begin_layout Subsubsection
20686
20687 \family sans
20688 Show History
20689 \end_layout
20690
20691 \begin_layout Standard
20692 This shows the complete history of the CVS document.
20693  The output of 
20694 \family typewriter
20695 cvs log "<file-name>"
20696 \family default
20697  is shown in a browser.
20698 \end_layout
20699
20700 \begin_layout Subsubsection
20701 Revision info
20702 \end_layout
20703
20704 \begin_layout Standard
20705 \SpecialChar LyX
20706  supports CVS version number, author name, date and time of last commit.
20707  All those are extracted from 
20708 \family typewriter
20709 cvs log -r <file-name>
20710 \family default
20711 .
20712  See 
20713 \begin_inset CommandInset ref
20714 LatexCommand ref
20715 reference "subsec:VCS-Revision-Information"
20716
20717 \end_inset
20718
20719  for details.
20720 \end_layout
20721
20722 \begin_layout Subsection
20723 SVN commands in \SpecialChar LyX
20724
20725 \end_layout
20726
20727 \begin_layout Standard
20728 SVN is now partially supported by \SpecialChar LyX
20729 .
20730  You can find the commands in the 
20731 \family sans
20732 File\SpecialChar menuseparator
20733 Version
20734 \begin_inset space ~
20735 \end_inset
20736
20737 Control
20738 \family default
20739  submenu.
20740  Please note that if you use password protected access to repository via
20741  ssh, you will be asked in terminal window.
20742  \SpecialChar LyX
20743  was tested against SVN 1.5, 1.6, 1.7 and 1.8
20744 \begin_inset Foot
20745 status open
20746
20747 \begin_layout Plain Layout
20748 Most of the commands will work with 1.4 too, see 
20749 \begin_inset CommandInset ref
20750 LatexCommand ref
20751 reference "subsec:SVN-Repo-Update"
20752
20753 \end_inset
20754
20755 .
20756  There seems to be currently unresolved permissions problem under SVN 1.8
20757  with reverting changes when file is locked.
20758 \end_layout
20759
20760 \end_inset
20761
20762
20763 \end_layout
20764
20765 \begin_layout Subsubsection
20766
20767 \family sans
20768 Register
20769 \end_layout
20770
20771 \begin_layout Standard
20772 If your document is not under revision control, this is the only item shown
20773  in the menu.
20774  And if it is under revision control, the 
20775 \family sans
20776 Register
20777 \family default
20778  item is not visible.
20779 \end_layout
20780
20781 \begin_layout Standard
20782 This command registers in SVN your document ONLY in case you have already
20783  the documents directory under SVN control (in particular 
20784 \family typewriter
20785 .svn/entries
20786 \family default
20787  file exists).
20788  This means you have to checkout the archive by yourself.
20789 \end_layout
20790
20791 \begin_layout Standard
20792 Then you are asked interactively to supply an initial description of the
20793  document.
20794  Don't forget that registered file is not yet commited.
20795 \end_layout
20796
20797 \begin_layout Standard
20798 SVN command that is run: 
20799 \family typewriter
20800 svn add -q 
20801 \begin_inset Quotes eld
20802 \end_inset
20803
20804 <file-name>
20805 \begin_inset Quotes erd
20806 \end_inset
20807
20808
20809 \end_layout
20810
20811 \begin_layout Standard
20812 Read 
20813 \family typewriter
20814 man svn
20815 \family default
20816  to understand the switches.
20817 \end_layout
20818
20819 \begin_layout Subsubsection
20820
20821 \family sans
20822 Check In Changes
20823 \end_layout
20824
20825 \begin_layout Standard
20826 When you are finished editing a file, you commit your changes.
20827  When you do this, you are asked for a description of the changes.
20828  After that changes are commited.
20829 \end_layout
20830
20831 \begin_layout Standard
20832 SVN command:
20833 \begin_inset Foot
20834 status collapsed
20835
20836 \begin_layout Plain Layout
20837 In case locking is not enabled.
20838  See Section 
20839 \begin_inset CommandInset ref
20840 LatexCommand ref
20841 reference "subsec:SVN-File-Locking"
20842
20843 \end_inset
20844
20845 .
20846 \end_layout
20847
20848 \end_inset
20849
20850  
20851 \family typewriter
20852 svn commit -q -m"<description>" <file-name>
20853 \end_layout
20854
20855 \begin_layout Subsubsection
20856
20857 \family sans
20858 Check Out For Edit
20859 \end_layout
20860
20861 \begin_layout Standard
20862 Updates the changes of this file from the repository.
20863  Be sure you understand SVN merging and conflicts resolving before using
20864  this function, because all conflicts has to be resolved manually by you!
20865 \end_layout
20866
20867 \begin_layout Standard
20868 SVN command:
20869 \begin_inset Foot
20870 status collapsed
20871
20872 \begin_layout Plain Layout
20873 Ditto.
20874 \end_layout
20875
20876 \end_inset
20877
20878  
20879 \family typewriter
20880 svn update --non-interactive 
20881 \begin_inset Quotes eld
20882 \end_inset
20883
20884 <file-name>
20885 \begin_inset Quotes erd
20886 \end_inset
20887
20888
20889 \end_layout
20890
20891 \begin_layout Subsubsection
20892
20893 \family sans
20894 Revert To Repository Version
20895 \end_layout
20896
20897 \begin_layout Standard
20898 This will discard all changes made to the document since the last check
20899  in.
20900  You get a warning before changes are discarded.
20901 \end_layout
20902
20903 \begin_layout Standard
20904 SVN command: 
20905 \family typewriter
20906 svn revert -q 
20907 \begin_inset Quotes eld
20908 \end_inset
20909
20910 <file-name>
20911 \begin_inset Quotes erd
20912 \end_inset
20913
20914
20915 \end_layout
20916
20917 \begin_layout Subsubsection
20918
20919 \family sans
20920 Copy
20921 \end_layout
20922
20923 \begin_layout Standard
20924 This will create a copy of the current document including the version history.
20925  It requires a clean document without any changes since the last checkin.
20926  You are asked for a file name and a description of the copy operation.
20927  After that the copy is created, both locally and in the repository.
20928  If the parent directories of the copied and original document differ, all
20929  relative paths of included files of the copy are adjusted (like in 
20930 \family sans
20931 File\SpecialChar menuseparator
20932 Save As
20933 \family default
20934 \SpecialChar ldots
20935 ).
20936  Finally, the copy is loaded instead of the original document.
20937 \end_layout
20938
20939 \begin_layout Labeling
20940 \labelwidthstring 00.00.0000
20941 SVN
20942 \begin_inset space ~
20943 \end_inset
20944
20945 commands: 
20946 \begin_inset space ~
20947 \end_inset
20948
20949
20950 \begin_inset Newline newline
20951 \end_inset
20952
20953
20954 \begin_inset Flex Code
20955 status collapsed
20956
20957 \begin_layout Plain Layout
20958 svn copy -q 
20959 \family typewriter
20960
20961 \begin_inset Quotes eld
20962 \end_inset
20963
20964 <file-name>
20965 \begin_inset Quotes erd
20966 \end_inset
20967
20968  
20969 \begin_inset Quotes eld
20970 \end_inset
20971
20972 <new-file-name>
20973 \begin_inset Quotes erd
20974 \end_inset
20975
20976
20977 \end_layout
20978
20979 \end_inset
20980
20981
20982 \begin_inset Newline newline
20983 \end_inset
20984
20985
20986 \begin_inset Flex Code
20987 status collapsed
20988
20989 \begin_layout Plain Layout
20990 svn commit
20991 \end_layout
20992
20993 \end_inset
20994
20995
20996 \end_layout
20997
20998 \begin_layout Subsubsection
20999
21000 \family sans
21001 Rename
21002 \end_layout
21003
21004 \begin_layout Standard
21005 This will rename the current document including the version history.
21006  It requires a clean document without any changes since the last checkin.
21007  You are asked for a file name and a description of the rename operation.
21008  After that the document is renamed, both locally and in the repository.
21009  If the parent directories of the new and old file names differ, all relative
21010  paths of included files are adjusted (like in 
21011 \family sans
21012 File\SpecialChar menuseparator
21013 Save As
21014 \family default
21015 \SpecialChar ldots
21016 ).
21017  Finally, the document is reloaded using the new name.
21018 \end_layout
21019
21020 \begin_layout Labeling
21021 \labelwidthstring 00.00.0000
21022 SVN
21023 \begin_inset space ~
21024 \end_inset
21025
21026 commands: 
21027 \begin_inset space ~
21028 \end_inset
21029
21030
21031 \begin_inset Newline newline
21032 \end_inset
21033
21034
21035 \begin_inset Flex Code
21036 status collapsed
21037
21038 \begin_layout Plain Layout
21039 svn move -q 
21040 \family typewriter
21041
21042 \begin_inset Quotes eld
21043 \end_inset
21044
21045 <file-name>
21046 \begin_inset Quotes erd
21047 \end_inset
21048
21049  
21050 \begin_inset Quotes eld
21051 \end_inset
21052
21053 <new-file-name>
21054 \begin_inset Quotes erd
21055 \end_inset
21056
21057
21058 \end_layout
21059
21060 \end_inset
21061
21062
21063 \begin_inset Newline newline
21064 \end_inset
21065
21066
21067 \begin_inset Flex Code
21068 status collapsed
21069
21070 \begin_layout Plain Layout
21071 svn commit
21072 \end_layout
21073
21074 \end_inset
21075
21076
21077 \end_layout
21078
21079 \begin_layout Subsubsection
21080 \begin_inset CommandInset label
21081 LatexCommand label
21082 name "subsec:SVN-Repo-Update"
21083
21084 \end_inset
21085
21086 Update of the local directory checkout from repository
21087 \begin_inset Foot
21088 status collapsed
21089
21090 \begin_layout Plain Layout
21091 Note that this command will work only with subversion 
21092 \begin_inset Formula $\geqq1.5$
21093 \end_inset
21094
21095
21096 \end_layout
21097
21098 \end_inset
21099
21100
21101 \end_layout
21102
21103 \begin_layout Standard
21104 All the commands above have one shortcomming - they deal with the current
21105  document only.
21106  Once your document contains pictures, includes external 
21107 \begin_inset Flex Code
21108 status collapsed
21109
21110 \begin_layout Plain Layout
21111 .tex
21112 \end_layout
21113
21114 \end_inset
21115
21116  files and so on administration becomes more complicated.
21117  \SpecialChar LyX
21118  now supports updating the whole tree in which resides the document
21119 \begin_inset Foot
21120 status collapsed
21121
21122 \begin_layout Plain Layout
21123 One need to organize the files structure so that all external files are
21124  in the same directory or subdirectories of the document.
21125  
21126 \end_layout
21127
21128 \end_inset
21129
21130 .
21131  This become especially useful once you cooperate with people which neither
21132  know about subversion management nor they have ambition to commit additional
21133  material to the repository.
21134  
21135 \end_layout
21136
21137 \begin_layout Standard
21138 \begin_inset Flex Code
21139 status collapsed
21140
21141 \begin_layout Plain Layout
21142 Update local directory from repository
21143 \end_layout
21144
21145 \end_inset
21146
21147  command updates the whole directory and in case of merge conflicts local
21148  version of the files are left, so no unintended data loss occurs.
21149  If local changes are detected user is warned before update starts.
21150 \end_layout
21151
21152 \begin_layout Labeling
21153 \labelwidthstring 00.00.0000
21154 SVN
21155 \begin_inset space ~
21156 \end_inset
21157
21158 commands: 
21159 \begin_inset space ~
21160 \end_inset
21161
21162
21163 \begin_inset Newline newline
21164 \end_inset
21165
21166
21167 \begin_inset Flex Code
21168 status collapsed
21169
21170 \begin_layout Plain Layout
21171 svn diff $path
21172 \end_layout
21173
21174 \end_inset
21175
21176  (Ask if changes are detected.)
21177 \begin_inset Newline newline
21178 \end_inset
21179
21180
21181 \begin_inset Flex Code
21182 status collapsed
21183
21184 \begin_layout Plain Layout
21185 svn update –accept mine-full $path
21186 \end_layout
21187
21188 \end_inset
21189
21190
21191 \end_layout
21192
21193 \begin_layout Standard
21194 where 
21195 \begin_inset Flex Code
21196 status collapsed
21197
21198 \begin_layout Plain Layout
21199 $path
21200 \end_layout
21201
21202 \end_inset
21203
21204  stands for the path to the document.
21205 \end_layout
21206
21207 \begin_layout Subsubsection
21208
21209 \family sans
21210 Show History
21211 \end_layout
21212
21213 \begin_layout Standard
21214 This shows the complete history of the SVN document.
21215  The output of 
21216 \family typewriter
21217 svn log 
21218 \begin_inset Quotes eld
21219 \end_inset
21220
21221 <file-name>
21222 \begin_inset Quotes erd
21223 \end_inset
21224
21225
21226 \family default
21227  is shown in a browser.
21228 \end_layout
21229
21230 \begin_layout Subsubsection
21231 File Locking
21232 \begin_inset CommandInset label
21233 LatexCommand label
21234 name "subsec:SVN-File-Locking"
21235
21236 \end_inset
21237
21238
21239 \end_layout
21240
21241 \begin_layout Standard
21242 The file exchange through various revision control systems brings the problem
21243  of merge conflicts in case two different users try to edit the same (parts
21244  of) document.
21245  When such a conflict happens it needs manual resolving and one reasonable
21246  alternative is to provide some kind of locking mechanism, which guarantees
21247  that only one user is allowed to edit file at the given time.
21248 \end_layout
21249
21250 \begin_layout Standard
21251 SVN has two such mechanisms to provide mutual exclusivity for file access
21252  - locks and automatic setting of write permissions (see sec.
21253  
21254 \begin_inset CommandInset ref
21255 LatexCommand ref
21256 reference "subsec:Automatical-Locking-Property"
21257
21258 \end_inset
21259
21260 ) based on 
21261 \begin_inset Flex Code
21262 status collapsed
21263
21264 \begin_layout Plain Layout
21265 svn:needs-lock
21266 \end_layout
21267
21268 \end_inset
21269
21270  file svn property
21271 \begin_inset Foot
21272 status open
21273
21274 \begin_layout Plain Layout
21275 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
21276 \end_layout
21277
21278 \end_inset
21279
21280 .
21281  If this property is detected for a given document \SpecialChar LyX
21282  starts to use SVN locks
21283  for document editing automatically and the whole check-in/out mechanism
21284  switches to the same regimen as for RCS.
21285  This in particular means there are two different modes of file use in \SpecialChar LyX
21286 :
21287 \end_layout
21288
21289 \begin_layout Itemize
21290 Unlocked state.
21291  The loaded file is in the read-only mode.
21292  For editing on needs to check-out.
21293  
21294 \emph on
21295 Check-out
21296 \emph default
21297  consists of updating from the repository and gaining write lock.
21298  If the lock is not possible to obtain, we remain in unlocked state.
21299 \end_layout
21300
21301 \begin_layout Itemize
21302 Locked state.
21303  The loaded file is in the 'normal' edit mode.
21304  No other user is allowed to edit the file.
21305  
21306 \emph on
21307 Check-in
21308 \emph default
21309  consists of commiting changes and releasing write-lock.
21310  If no changes have been made to the document, no commit will be produced
21311 \begin_inset Foot
21312 status collapsed
21313
21314 \begin_layout Plain Layout
21315 Don't be puzzled by the fact that you will be asked for commit message anyway.
21316 \end_layout
21317
21318 \end_inset
21319
21320  and only the write-lock will be released.
21321 \end_layout
21322
21323 \begin_layout Standard
21324 SVN commands:
21325 \end_layout
21326
21327 \begin_layout Labeling
21328 \labelwidthstring 00.00.0000
21329 Check-in:
21330 \family typewriter
21331  svn commit -q -m"<description>" "<file-name>"
21332 \begin_inset Newline newline
21333 \end_inset
21334
21335 svn unlock "<file-name>"
21336 \end_layout
21337
21338 \begin_layout Labeling
21339 \labelwidthstring 00.00.0000
21340 Check-out: 
21341 \family typewriter
21342 svn update "<file-name>"
21343 \begin_inset Newline newline
21344 \end_inset
21345
21346 svn lock "<file-name>"
21347 \end_layout
21348
21349 \begin_layout Subsubsection
21350
21351 \family typewriter
21352 \begin_inset CommandInset label
21353 LatexCommand label
21354 name "subsec:Automatical-Locking-Property"
21355
21356 \end_inset
21357
21358
21359 \family default
21360 Automatic Locking Property
21361 \end_layout
21362
21363 \begin_layout Standard
21364 The above mentioned automatic setting of write permissions of the .lyx file
21365  can be set through
21366 \family sans
21367  File\SpecialChar menuseparator
21368 Version
21369 \begin_inset space ~
21370 \end_inset
21371
21372 Control\SpecialChar menuseparator
21373 Toggle locking property
21374 \family default
21375 .
21376  This command is active only when the file is not locked on the svn server
21377  (i.e.
21378  you need to check-out before proceeding).
21379 \end_layout
21380
21381 \begin_layout Labeling
21382 \labelwidthstring 00.00.0000
21383 SVN
21384 \begin_inset space ~
21385 \end_inset
21386
21387 commands:
21388 \end_layout
21389
21390 \begin_layout Labeling
21391 \labelwidthstring 00.00.0000
21392 Set:
21393 \family typewriter
21394  svn propset svn:needs-lock ON "<file-name>"
21395 \end_layout
21396
21397 \begin_layout Labeling
21398 \labelwidthstring 00.00.0000
21399 Unset: 
21400 \family typewriter
21401 svn propdel svn:needs-lock "<file-name>"
21402 \end_layout
21403
21404 \begin_layout Subsubsection
21405 \begin_inset CommandInset label
21406 LatexCommand label
21407 name "subsec:VCS-Revision-Information"
21408
21409 \end_inset
21410
21411 Revision Information in Documents
21412 \end_layout
21413
21414 \begin_layout Standard
21415 There are more possibilities how to activate revision information in our
21416  document.
21417 \end_layout
21418
21419 \begin_layout Itemize
21420 \SpecialChar LyX
21421  supports directly:
21422 \end_layout
21423
21424 \begin_deeper
21425 \begin_layout Itemize
21426 tree revision information (
21427 \begin_inset Flex Code
21428 status collapsed
21429
21430 \begin_layout Plain Layout
21431 vcs-tree-revision
21432 \end_layout
21433
21434 \end_inset
21435
21436 ).
21437  The result is the output of the 
21438 \begin_inset Flex Code
21439 status collapsed
21440
21441 \begin_layout Plain Layout
21442 svnversion
21443 \end_layout
21444
21445 \end_inset
21446
21447  command, the following table gives you an idea, how to read the results.
21448 \end_layout
21449
21450 \begin_layout Standard
21451 \align center
21452 \begin_inset Tabular
21453 <lyxtabular version="3" rows="6" columns="2">
21454 <features tabularvalignment="middle">
21455 <column alignment="center" valignment="top">
21456 <column alignment="center" valignment="top">
21457 <row>
21458 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
21459 \begin_inset Text
21460
21461 \begin_layout Plain Layout
21462 Output
21463 \end_layout
21464
21465 \end_inset
21466 </cell>
21467 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
21468 \begin_inset Text
21469
21470 \begin_layout Plain Layout
21471 Meaning
21472 \end_layout
21473
21474 \end_inset
21475 </cell>
21476 </row>
21477 <row>
21478 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
21479 \begin_inset Text
21480
21481 \begin_layout Plain Layout
21482 4123:4168
21483 \end_layout
21484
21485 \end_inset
21486 </cell>
21487 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
21488 \begin_inset Text
21489
21490 \begin_layout Plain Layout
21491 mixed revision working copy
21492 \end_layout
21493
21494 \end_inset
21495 </cell>
21496 </row>
21497 <row>
21498 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
21499 \begin_inset Text
21500
21501 \begin_layout Plain Layout
21502 4168M
21503 \end_layout
21504
21505 \end_inset
21506 </cell>
21507 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
21508 \begin_inset Text
21509
21510 \begin_layout Plain Layout
21511 modified working copy
21512 \end_layout
21513
21514 \end_inset
21515 </cell>
21516 </row>
21517 <row>
21518 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
21519 \begin_inset Text
21520
21521 \begin_layout Plain Layout
21522 4123S
21523 \end_layout
21524
21525 \end_inset
21526 </cell>
21527 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
21528 \begin_inset Text
21529
21530 \begin_layout Plain Layout
21531 switched working copy
21532 \end_layout
21533
21534 \end_inset
21535 </cell>
21536 </row>
21537 <row>
21538 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
21539 \begin_inset Text
21540
21541 \begin_layout Plain Layout
21542 4123P
21543 \end_layout
21544
21545 \end_inset
21546 </cell>
21547 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
21548 \begin_inset Text
21549
21550 \begin_layout Plain Layout
21551 partial working copy, from a sparse checkout
21552 \end_layout
21553
21554 \end_inset
21555 </cell>
21556 </row>
21557 <row>
21558 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
21559 \begin_inset Text
21560
21561 \begin_layout Plain Layout
21562 4123:4168MS
21563 \end_layout
21564
21565 \end_inset
21566 </cell>
21567 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
21568 \begin_inset Text
21569
21570 \begin_layout Plain Layout
21571 mixed revision, modified, switched working copy
21572 \end_layout
21573
21574 \end_inset
21575 </cell>
21576 </row>
21577 </lyxtabular>
21578
21579 \end_inset
21580
21581
21582 \end_layout
21583
21584 \begin_layout Itemize
21585 file revision information.
21586  The result comes from parsing the output of 
21587 \begin_inset Flex Code
21588 status collapsed
21589
21590 \begin_layout Plain Layout
21591 svn
21592 \begin_inset space ~
21593 \end_inset
21594
21595 info
21596 \begin_inset space ~
21597 \end_inset
21598
21599 –xml
21600 \begin_inset space ~
21601 \end_inset
21602
21603 file.lyx
21604 \end_layout
21605
21606 \end_inset
21607
21608 .
21609  Supported flags are:
21610 \end_layout
21611
21612 \begin_deeper
21613 \begin_layout Itemize
21614 version number of the last commit (
21615 \begin_inset Flex Code
21616 status collapsed
21617
21618 \begin_layout Plain Layout
21619 vcs-revision
21620 \end_layout
21621
21622 \end_inset
21623
21624 )
21625 \end_layout
21626
21627 \begin_layout Itemize
21628 author of the last commit (
21629 \begin_inset Flex Code
21630 status collapsed
21631
21632 \begin_layout Plain Layout
21633 vcs-author
21634 \end_layout
21635
21636 \end_inset
21637
21638 )
21639 \end_layout
21640
21641 \begin_layout Itemize
21642 date of the last commit (
21643 \begin_inset Flex Code
21644 status collapsed
21645
21646 \begin_layout Plain Layout
21647 vcs-date
21648 \end_layout
21649
21650 \end_inset
21651
21652 )
21653 \end_layout
21654
21655 \begin_layout Itemize
21656 time of the last commit (
21657 \begin_inset Flex Code
21658 status collapsed
21659
21660 \begin_layout Plain Layout
21661 vcs-time
21662 \end_layout
21663
21664 \end_inset
21665
21666 )
21667 \end_layout
21668
21669 \end_deeper
21670 \begin_layout Standard
21671 You can obtain this info via InsetInfo (e.g.
21672  
21673 \begin_inset Flex Code
21674 status collapsed
21675
21676 \begin_layout Plain Layout
21677 info-insert buffer vcs-date
21678 \end_layout
21679
21680 \end_inset
21681
21682 ).
21683  The information will be available only when you have the file stored under
21684  svn managment (i.e.
21685  the 
21686 \begin_inset Flex Code
21687 status collapsed
21688
21689 \begin_layout Plain Layout
21690 .svn
21691 \end_layout
21692
21693 \end_inset
21694
21695  directory is available with your document).
21696 \end_layout
21697
21698 \end_deeper
21699 \begin_layout Itemize
21700 Another—a hacking one—possibility is to use svn keywords
21701 \begin_inset Foot
21702 status collapsed
21703
21704 \begin_layout Plain Layout
21705 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
21706 \end_layout
21707
21708 \end_inset
21709
21710 .
21711  In short – you set file keywords property (e.g.
21712  
21713 \family sans
21714 svn propset svn:keywords 'Rev' file.lyx
21715 \family default
21716 ) and then paste keyword \SpecialChar TeX
21717  code
21718 \begin_inset Foot
21719 status collapsed
21720
21721 \begin_layout Plain Layout
21722 This is an easy way how to ensure that \SpecialChar LyX
21723  won't break the line in the middle
21724  of keyword tag.
21725 \end_layout
21726
21727 \end_inset
21728
21729  tag in your document (e.g.
21730  
21731 \begin_inset ERT
21732 status open
21733
21734 \begin_layout Plain Layout
21735
21736 $Rev$
21737 \end_layout
21738
21739 \end_inset
21740
21741 ).
21742  This way svn client will automatically substitute revision number (e.g.
21743  
21744 \begin_inset ERT
21745 status open
21746
21747 \begin_layout Plain Layout
21748
21749 $Rev: 59 $
21750 \end_layout
21751
21752 \end_inset
21753
21754 ) after each update and commit.
21755  There are more problems with this approach.
21756  Firstly, the '$' character is used in \SpecialChar TeX
21757  world for math equations, so any
21758  occurence of math formula 
21759 \begin_inset Formula $Rev$
21760 \end_inset
21761
21762  become 
21763 \begin_inset Formula $Rev:59$
21764 \end_inset
21765
21766  in your \SpecialChar LyX
21767  document.
21768  Similarly for other keywords like Id, Date, Author, etc.
21769  Secondly svn output is dependent on your locales, so its very easy that
21770  svn would produce some problematic strings once Date is used.
21771  Thirdly you get the whole 'Rev: 59' string in your document instead of
21772  the plain number.
21773  Until subversion implements user's custom keywords it will be hard to use
21774  this approach reliably or let \SpecialChar LyX
21775  to support it directly.
21776 \end_layout
21777
21778 \begin_layout Subsection
21779 SVN and Windows Environment
21780 \end_layout
21781
21782 \begin_layout Quote
21783 My inclination is to say that if the user cannot figure out the command
21784  line operations on their own fairly quickly, they would be well advised
21785  to use TortoiseSVN.
21786  —P.
21787  A.
21788  Rubin
21789 \end_layout
21790
21791 \begin_layout Subsubsection
21792 Preparation
21793 \end_layout
21794
21795 \begin_layout Standard
21796 In addition to installing \SpecialChar LyX
21797 , and having access to a Subversion repository,
21798  the user will need to install the Subversion client program.
21799  A Windows installer for the client program is available from 
21800 \begin_inset CommandInset href
21801 LatexCommand href
21802 name "CollabNet"
21803 target "http://www.collab.net/nonav/downloads/subversion/"
21804
21805 \end_inset
21806
21807 .
21808  The user may also want to install 
21809 \begin_inset CommandInset href
21810 LatexCommand href
21811 name "TortoiseSVN"
21812 target "http://tortoisesvn.tigris.org/"
21813
21814 \end_inset
21815
21816 , which integrates Subversion operations into the context (rightclick) menu
21817  of Windows Explorer.
21818  Operations done outside \SpecialChar LyX
21819  will typically be more convenient using the Explorer
21820  context menu.
21821  Note that TortoiseSVN is not a replacement for the client program, which
21822  is what \SpecialChar LyX
21823  itself will use.
21824 \end_layout
21825
21826 \begin_layout Subsubsection
21827 Bringing a document under Subversion control
21828 \end_layout
21829
21830 \begin_layout Standard
21831 Before a \SpecialChar LyX
21832  document can be brought under version control in Subversion, its
21833  parent directory needs to be under version control.
21834  If the document is being added to a project already in the repository,
21835  this is accomplished by checking the project out to the directory where
21836  the new document will be placed.
21837  If the project itself is not yet under version control (for instance, if
21838  this document starts a new project), the directory must be imported into
21839  the repository.
21840  This is done outside \SpecialChar LyX
21841 .
21842  Both import and checkout are easily accomplished from the Explorer context
21843  menu using TortoiseSVN, or alternatively can be done using the command
21844  line client at a DOS prompt.
21845  The procedure for importing the project using TortoiseSVN is described
21846  below, assuming an existing repository and a new project being started
21847  in 
21848 \family typewriter
21849 C:
21850 \backslash
21851 new project
21852 \family default
21853 .
21854  For information on using the Subversion client program, run 
21855 \family typewriter
21856 svn --help 
21857 \family default
21858 in a DOS shell.
21859 \end_layout
21860
21861 \begin_layout Enumerate
21862 Locate 
21863 \family typewriter
21864 C:
21865 \backslash
21866 new project 
21867 \family default
21868 in Windows Explorer, right click it, and select 
21869 \family sans
21870 TortoiseSVN\SpecialChar menuseparator
21871 Repo-browser
21872 \family default
21873 .
21874  If necessary, adjust the URL for the repository, then click OK.
21875 \end_layout
21876
21877 \begin_layout Enumerate
21878 Right click the level of the repository under which you want to place the
21879  new project folder (typically the top level) and click 
21880 \family sans
21881 Create folder
21882 \family default
21883  Supply a name for the project folder and click OK.
21884  Add a message for the log file if desired, then click OK again.
21885  The new project folder should appear in the repository.
21886  Finally, click OK again to exit the repository browser.
21887 \end_layout
21888
21889 \begin_layout Enumerate
21890 Once again right click 
21891 \family typewriter
21892 C:
21893 \backslash
21894 new project
21895 \family default
21896 , this time selecting SVN Checkout\SpecialChar ldots
21897  Select the URL of the project folder
21898  you just created in the repository, and set the checkout directory to 
21899 \family typewriter
21900 C:
21901 \backslash
21902 new project.
21903
21904 \family default
21905  Click OK.
21906  You will be warned about a non-empty folder; click OK to proceed.
21907  You should now have a 
21908 \family typewriter
21909 .svn
21910 \family default
21911  directory under 
21912 \family typewriter
21913 C:
21914 \backslash
21915 new project.
21916 \end_layout
21917
21918 \begin_layout Enumerate
21919 Create or open your document in \SpecialChar LyX
21920  and click 
21921 \family sans
21922 File\SpecialChar menuseparator
21923 Version
21924 \begin_inset space ~
21925 \end_inset
21926
21927 Control\SpecialChar menuseparator
21928 Register.
21929  
21930 \family default
21931 Add a log message and click OK to commit the document to version control.
21932 \end_layout
21933
21934 \begin_layout Standard
21935 From this point onward, you should have full functionality in the 
21936 \family sans
21937 File\SpecialChar menuseparator
21938 Version
21939 \begin_inset space ~
21940 \end_inset
21941
21942 Control
21943 \family default
21944  menu.
21945  You also have the option of checking the document in and out, viewing its
21946  history, etc.
21947  using the TortoiseSVN context menu in Windows Explorer or the Subversion
21948  client program from a command prompt.
21949 \end_layout
21950
21951 \begin_layout Subsubsection
21952 SSH tunnel used with SVN under Windows
21953 \end_layout
21954
21955 \begin_layout Standard
21956 Compared with Linux setting up an svn client to communicate over ssh under
21957  Windows is a rather troublesome task.
21958  We will at least offer some hints how to setup the client side but prior
21959  knowledge about ssh and the Windows command line is needed, also be prepared
21960  for a great deal of frustration\SpecialChar ldots
21961
21962 \end_layout
21963
21964 \begin_layout Enumerate
21965 Get an svn client for windows, as described in the previous sections.
21966  When it is a fresh install run some svn command (e.g.
21967  
21968 \begin_inset Flex Code
21969 status collapsed
21970
21971 \begin_layout Plain Layout
21972 svn –version
21973 \end_layout
21974
21975 \end_inset
21976
21977 ) to create config files, which you will need to change later on.
21978 \end_layout
21979
21980 \begin_layout Enumerate
21981 Choose an ssh client for Windows.
21982  There are several possibilities, we will use the one from Putty tools
21983 \begin_inset Foot
21984 status collapsed
21985
21986 \begin_layout Plain Layout
21987 \begin_inset Flex URL
21988 status collapsed
21989
21990 \begin_layout Plain Layout
21991
21992 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21993 \end_layout
21994
21995 \end_inset
21996
21997
21998 \end_layout
21999
22000 \end_inset
22001
22002 .
22003  You will need to set the connection up so that the client doesn't ask for
22004  any password from you.
22005  To keep things easy we will use only keys without any additional password
22006  protection etc.
22007 \end_layout
22008
22009 \begin_deeper
22010 \begin_layout Enumerate
22011 Generate keys by 
22012 \begin_inset Flex Code
22013 status collapsed
22014
22015 \begin_layout Plain Layout
22016 puttygen
22017 \end_layout
22018
22019 \end_inset
22020
22021 .
22022  Save your private .ppk key file and put the public one on the server side.
22023  If the SVN server runs on Linux, note that the format of the public key
22024  is not compatible with Linux openssh and you will need to direcly copy-paste
22025  the key from the “
22026 \emph on
22027 Public key for pasting into OpenSSH authorized_keys file
22028 \emph default
22029 :” edit field into the server's 
22030 \begin_inset Flex Code
22031 status collapsed
22032
22033 \begin_layout Plain Layout
22034 ~/.ssh/authorized_keys
22035 \end_layout
22036
22037 \end_inset
22038
22039  / 
22040 \begin_inset Flex Code
22041 status collapsed
22042
22043 \begin_layout Plain Layout
22044 authorized_keys2
22045 \end_layout
22046
22047 \end_inset
22048
22049  file.
22050 \end_layout
22051
22052 \begin_layout Enumerate
22053 Get the Putty's 
22054 \begin_inset Flex Code
22055 status collapsed
22056
22057 \begin_layout Plain Layout
22058 plink
22059 \end_layout
22060
22061 \end_inset
22062
22063 .
22064  In the SVN config file
22065 \begin_inset Foot
22066 status collapsed
22067
22068 \begin_layout Plain Layout
22069 Exact path depends on Windows version, usually somewhere around 
22070 \begin_inset Flex Code
22071 status collapsed
22072
22073 \begin_layout Plain Layout
22074 c:
22075 \backslash
22076 Documents and Settings
22077 \backslash
22078 user
22079 \backslash
22080 Application Data
22081 \backslash
22082 Subversion
22083 \backslash
22084 config
22085 \end_layout
22086
22087 \end_inset
22088
22089  / 
22090 \begin_inset Flex Code
22091 status collapsed
22092
22093 \begin_layout Plain Layout
22094 AppData
22095 \backslash
22096 Roaming
22097 \backslash
22098 Subversion
22099 \end_layout
22100
22101 \end_inset
22102
22103 .
22104 \end_layout
22105
22106 \end_inset
22107
22108 , section [tunnels], setup ssh command, e.g.
22109  
22110 \begin_inset Flex Code
22111 status collapsed
22112
22113 \begin_layout Plain Layout
22114 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
22115 \end_layout
22116
22117 \end_inset
22118
22119 .
22120 \begin_inset Foot
22121 status collapsed
22122
22123 \begin_layout Plain Layout
22124 It will usually take a lot of time to get exact command right and it depends
22125  on many things.
22126  For example do not have some remote server saved as a default session in
22127  Putty etc.
22128  If things fail, try to connect via plink without SVN first.
22129 \end_layout
22130
22131 \end_inset
22132
22133
22134 \end_layout
22135
22136 \end_deeper
22137 \begin_layout Enumerate
22138 Checkout the SVN archive, e.
22139 \begin_inset space \thinspace{}
22140 \end_inset
22141
22142 g.
22143 \begin_inset Newline newline
22144 \end_inset
22145
22146
22147 \begin_inset Flex Code
22148 status collapsed
22149
22150 \begin_layout Plain Layout
22151 svn co svn+ssh://user@server/repository_path
22152 \end_layout
22153
22154 \end_inset
22155
22156 .
22157 \end_layout
22158
22159 \begin_layout Subsubsection
22160 End-of-Line Conversions
22161 \end_layout
22162
22163 \begin_layout Standard
22164 When the collaborators are mixing Linux and Windows environments, \SpecialChar LyX
22165  will
22166  use different line endings inside the .lyx files.
22167  This is not a problem as far as \SpecialChar LyX
22168  functionality is concerned, but the commit
22169  diffs will be huge and merge-conflicts prone.
22170  Fortunately SVN itself knows
22171 \begin_inset Foot
22172 status collapsed
22173
22174 \begin_layout Plain Layout
22175 \begin_inset Flex URL
22176 status collapsed
22177
22178 \begin_layout Plain Layout
22179
22180 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
22181 \end_layout
22182
22183 \end_inset
22184
22185
22186 \end_layout
22187
22188 \end_inset
22189
22190  how to deal with CR/LF problems when switching .lyx files to the 
22191 \begin_inset Flex Code
22192 status collapsed
22193
22194 \begin_layout Plain Layout
22195 native
22196 \end_layout
22197
22198 \end_inset
22199
22200  mode.
22201 \begin_inset Foot
22202 status collapsed
22203
22204 \begin_layout Plain Layout
22205 For the lazy guys: 
22206 \begin_inset Flex Code
22207 status collapsed
22208
22209 \begin_layout Plain Layout
22210 svn propset svn:eol-style native FILE_NAME
22211 \end_layout
22212
22213 \end_inset
22214
22215
22216 \end_layout
22217
22218 \end_inset
22219
22220
22221 \end_layout
22222
22223 \begin_layout Subsection
22224 GIT commands in \SpecialChar LyX
22225
22226 \end_layout
22227
22228 \begin_layout Standard
22229 A minimal subset of GIT commands is now supported by \SpecialChar LyX
22230 .
22231  You can find the commands in the 
22232 \family sans
22233 File\SpecialChar menuseparator
22234 Version
22235 \begin_inset space ~
22236 \end_inset
22237
22238 Control
22239 \family default
22240  submenu.
22241  Please note that if you use password protected access to repository via
22242  ssh, you will be asked in terminal window.
22243  \SpecialChar LyX
22244  was tested against GIT 1.7.
22245 \begin_inset Foot
22246 status open
22247
22248 \begin_layout Plain Layout
22249 Windows users please note that you need to ensure that git is on the path.
22250  This can be set from within \SpecialChar LyX
22251  at 
22252 \family sans
22253 Tools\SpecialChar menuseparator
22254 Preferences\SpecialChar menuseparator
22255 Paths\SpecialChar menuseparator
22256 PATH prefix
22257 \family default
22258 .
22259 \end_layout
22260
22261 \end_inset
22262
22263
22264 \end_layout
22265
22266 \begin_layout Standard
22267 One big difference of GIT and the other supported version control systems
22268  is the distributed nature of GIT: With traditional version control systems
22269  there is one central server which hosts the repository.
22270  Users commit their changes to the server, and get updates made by other
22271  users from it.
22272  With GIT, users commit to a local repository.
22273  The local repository can be synchronized with one or more remote repositories
22274  using the 
22275 \begin_inset Flex Code
22276 status collapsed
22277
22278 \begin_layout Plain Layout
22279 pull
22280 \end_layout
22281
22282 \end_inset
22283
22284  and 
22285 \begin_inset Flex Code
22286 status collapsed
22287
22288 \begin_layout Plain Layout
22289 push
22290 \end_layout
22291
22292 \end_inset
22293
22294  GIT commands.
22295  \SpecialChar LyX
22296  does not interact in any way with remote GIT repositories.
22297  It works exclusively with the local repository in a very similar way as
22298  with a central CVS or SVN repository.
22299  If you use remote GIT repositories you need to do the 
22300 \begin_inset Flex Code
22301 status collapsed
22302
22303 \begin_layout Plain Layout
22304 pull
22305 \end_layout
22306
22307 \end_inset
22308
22309  and 
22310 \begin_inset Flex Code
22311 status collapsed
22312
22313 \begin_layout Plain Layout
22314 push
22315 \end_layout
22316
22317 \end_inset
22318
22319  operations with your favourite GIT client.
22320 \end_layout
22321
22322 \begin_layout Subsubsection
22323
22324 \family sans
22325 Register
22326 \end_layout
22327
22328 \begin_layout Standard
22329 If your document is not under revision control, this is the only item shown
22330  in the menu.
22331  And if it is under revision control, the 
22332 \family sans
22333 Register
22334 \family default
22335  item is not visible.
22336 \end_layout
22337
22338 \begin_layout Standard
22339 This command registers in GIT your document ONLY in case you have already
22340  the documents directory under GIT control (in particular 
22341 \family typewriter
22342 .git/index
22343 \family default
22344  file exists).
22345  This means you have to checkout the archive by yourself.
22346 \end_layout
22347
22348 \begin_layout Standard
22349 Then you are asked interactively to supply an initial description of the
22350  document.
22351  Don't forget that registered file is not yet commited.
22352 \end_layout
22353
22354 \begin_layout Standard
22355 GIT command that is run: 
22356 \family typewriter
22357 git add 
22358 \begin_inset Quotes eld
22359 \end_inset
22360
22361 <file-name>
22362 \begin_inset Quotes erd
22363 \end_inset
22364
22365
22366 \end_layout
22367
22368 \begin_layout Standard
22369 Read 
22370 \family typewriter
22371 man git
22372 \family default
22373  to understand the switches.
22374 \end_layout
22375
22376 \begin_layout Subsubsection
22377
22378 \family sans
22379 Check In Changes
22380 \end_layout
22381
22382 \begin_layout Standard
22383 When you are finished editing a file, you commit your changes.
22384  When you do this, you are asked for a description of the changes.
22385  After that changes are commited.
22386 \end_layout
22387
22388 \begin_layout Standard
22389 GIT command: 
22390 \family typewriter
22391 git commit -q -m"<description>" <file-name>
22392 \end_layout
22393
22394 \begin_layout Subsubsection
22395
22396 \family sans
22397 Revert To Repository Version
22398 \end_layout
22399
22400 \begin_layout Standard
22401 This will discard all changes made to the document since the last check
22402  in.
22403  You get a warning before changes are discarded.
22404 \end_layout
22405
22406 \begin_layout Standard
22407 GIT command: 
22408 \family typewriter
22409 git checkout -q 
22410 \begin_inset Quotes eld
22411 \end_inset
22412
22413 <file-name>
22414 \begin_inset Quotes erd
22415 \end_inset
22416
22417
22418 \end_layout
22419
22420 \begin_layout Subsubsection
22421
22422 \family sans
22423 Rename
22424 \end_layout
22425
22426 \begin_layout Standard
22427 This will rename the current document including the version history.
22428  It requires a clean document without any changes since the last checkin.
22429  You are asked for a file name and a description of the rename operation.
22430  After that the document is renamed, both locally and in the repository.
22431  If the parent directories of the new and old file names differ, all relative
22432  paths of included files are adjusted (like in 
22433 \family sans
22434 File\SpecialChar menuseparator
22435 Save As
22436 \family default
22437 \SpecialChar ldots
22438 ).
22439  Finally, the document is reloaded using the new name.
22440 \end_layout
22441
22442 \begin_layout Labeling
22443 \labelwidthstring 00.00.0000
22444 GIT
22445 \begin_inset space ~
22446 \end_inset
22447
22448 commands: 
22449 \begin_inset space ~
22450 \end_inset
22451
22452
22453 \begin_inset Newline newline
22454 \end_inset
22455
22456
22457 \begin_inset Flex Code
22458 status collapsed
22459
22460 \begin_layout Plain Layout
22461 git mv 
22462 \family typewriter
22463
22464 \begin_inset Quotes eld
22465 \end_inset
22466
22467 <file-name>
22468 \begin_inset Quotes erd
22469 \end_inset
22470
22471  
22472 \begin_inset Quotes eld
22473 \end_inset
22474
22475 <new-file-name>
22476 \begin_inset Quotes erd
22477 \end_inset
22478
22479
22480 \end_layout
22481
22482 \end_inset
22483
22484
22485 \begin_inset Newline newline
22486 \end_inset
22487
22488
22489 \begin_inset Flex Code
22490 status collapsed
22491
22492 \begin_layout Plain Layout
22493 git commit
22494 \end_layout
22495
22496 \end_inset
22497
22498
22499 \end_layout
22500
22501 \begin_layout Subsubsection
22502
22503 \family sans
22504 Show History
22505 \end_layout
22506
22507 \begin_layout Standard
22508 This shows the complete history of the GIT document.
22509  The output of 
22510 \family typewriter
22511 git log 
22512 \begin_inset Quotes eld
22513 \end_inset
22514
22515 <file-name>
22516 \begin_inset Quotes erd
22517 \end_inset
22518
22519
22520 \family default
22521  is shown in a browser.
22522 \end_layout
22523
22524 \begin_layout Subsubsection
22525 Version Info
22526 \end_layout
22527
22528 \begin_layout Standard
22529 \SpecialChar LyX
22530  supports GIT hash number of the last commit to the file, author name, date
22531  and time of last commit.
22532  All those are extracted from 
22533 \family typewriter
22534 git log -n 1 --pretty=format:%H%n%an%n%ai
22535 \family default
22536 .
22537  Tree version information is obtained via 
22538 \family typewriter
22539 git describe --abbrev --dirty --long
22540 \family default
22541 .
22542  See 
22543 \begin_inset CommandInset ref
22544 LatexCommand ref
22545 reference "subsec:VCS-Revision-Information"
22546
22547 \end_inset
22548
22549  for other details.
22550 \end_layout
22551
22552 \begin_layout Subsection
22553 Further tuning
22554 \end_layout
22555
22556 \begin_layout Standard
22557 With the recent addition of the vc-command function \SpecialChar LyX
22558  power users are allowed
22559  to create their own commands for revision control.
22560 \end_layout
22561
22562 \begin_layout Standard
22563 As an example you can see how two TortoiseSVN commands could be integrated
22564  directly:
22565 \end_layout
22566
22567 \begin_layout Description
22568 Commit: 
22569 \begin_inset Flex Code
22570 status collapsed
22571
22572 \begin_layout Plain Layout
22573 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
22574 \end_layout
22575
22576 \end_inset
22577
22578
22579 \end_layout
22580
22581 \begin_layout Description
22582 Revert: 
22583 \begin_inset Flex Code
22584 status collapsed
22585
22586 \begin_layout Plain Layout
22587 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
22588 \end_layout
22589
22590 \end_inset
22591
22592
22593 \end_layout
22594
22595 \begin_layout Subsection
22596 Version control and Document comparison
22597 \end_layout
22598
22599 \begin_layout Standard
22600 One of the typical uses of version control is to inspect the changes between
22601  revisions, usually by creating 
22602 \begin_inset Flex Code
22603 status collapsed
22604
22605 \begin_layout Plain Layout
22606 diff
22607 \end_layout
22608
22609 \end_inset
22610
22611  dumps.
22612  While this is useful for plain text files, it is much less useful in the
22613  case of \SpecialChar LyX
22614  files, which have more a complicated structure.
22615  Hence we provide binding to the Document comparison feature.
22616  There are two ways of calling this feature - either by direct call of 
22617 \begin_inset Flex Code
22618 status collapsed
22619
22620 \begin_layout Plain Layout
22621 VC_COMPARE
22622 \end_layout
22623
22624 \end_inset
22625
22626  \SpecialChar LyX
22627  function (for details see \SpecialChar LyX
22628  functions manual) or by icon/menu item 
22629 \begin_inset Flex Noun
22630 status collapsed
22631
22632 \begin_layout Plain Layout
22633 Compare with older revision...
22634 \end_layout
22635
22636 \end_inset
22637
22638 .
22639  One can either compare two chosen revisions of the document or he can simply
22640  compare the current version of edited text with older revisions (where
22641  '
22642 \begin_inset Flex Noun
22643 status collapsed
22644
22645 \begin_layout Plain Layout
22646 0
22647 \end_layout
22648
22649 \end_inset
22650
22651 ' revisions back means comparison of the edited file with last commited
22652  revision).
22653  
22654 \end_layout
22655
22656 \begin_layout Standard
22657 This feature is supported for SVN and RCS though due to the more complicated
22658  versioning scheme of RCS there is a constraint – when addressing the revisions
22659  in dialog, numbers always point to the last number in RCS revision number,
22660  i.e.
22661  '35' in '1.2.35'.
22662  We don't currently support GIT addressing of revisions, one can just compare
22663  edited document with its revision X steps backs, where X is addressed as
22664  HEAD~X.
22665 \end_layout
22666
22667 \begin_layout Section
22668 Literate Programming
22669 \end_layout
22670
22671 \begin_layout Standard
22672 Updated by 
22673 \noun on
22674 Kayvan Sylvan 
22675 \noun default
22676 (kayvan@sylvan.com)
22677 \noun on
22678
22679 \noun default
22680 original documentation written by 
22681 \noun on
22682 Edmar Wienskoski Jr.
22683
22684 \noun default
22685  (edmar-w-jr@technologist.com)
22686 \end_layout
22687
22688 \begin_layout Subsection
22689 Introduction
22690 \end_layout
22691
22692 \begin_layout Standard
22693 The main purpose of this documentation is to show you how to use \SpecialChar LyX
22694  for literate
22695  programming, where it is assumed that you are familiar with this programming
22696  technique, and know what 
22697 \begin_inset Quotes eld
22698 \end_inset
22699
22700 tangling
22701 \begin_inset Quotes erd
22702 \end_inset
22703
22704  and 
22705 \begin_inset Quotes eld
22706 \end_inset
22707
22708 weaving
22709 \begin_inset Quotes erd
22710 \end_inset
22711
22712  means.
22713  If that is not the case, please follow the web links provided in the following
22714  sections.
22715  There is a lot of good documentation out there covering old development
22716  history to the latest tools tips.
22717 \end_layout
22718
22719 \begin_layout Standard
22720 It is also assumed that you are familiar with \SpecialChar LyX
22721  itself to a point that you
22722  are comfortable changing your \SpecialChar LyX
22723  preferences, and X resources file.
22724  If that is not the case please refer to other \SpecialChar LyX
22725  documentation to cover your
22726  specific needs.
22727 \end_layout
22728
22729 \begin_layout Subsection
22730 Literate Programming
22731 \end_layout
22732
22733 \begin_layout Standard
22734 From the Literate Programming FAQ: 
22735 \end_layout
22736
22737 \begin_layout Quotation
22738 Literate programming is the combination of documentation and source together
22739  in a fashion suited for reading by human beings.
22740  In fact, literate programs should be enjoyable reading, even inviting!
22741  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
22742  and documentation in a single file.
22743  Literate programming tools then parse the file to produce either readable
22744  documentation or compilable source.
22745  The WEB style of literate programming was created by D.
22746 \begin_inset space \thinspace{}
22747 \end_inset
22748
22749 E.
22750  Knuth during the development of his \SpecialChar TeX
22751  typesetting software.
22752  
22753 \end_layout
22754
22755 \begin_layout Standard
22756 Another excerpt says:
22757 \end_layout
22758
22759 \begin_layout Quotation
22760
22761 \emph on
22762 How is literate programming different from verbose commenting?
22763 \end_layout
22764
22765 \begin_layout Quotation
22766 There are three distinguishing characteristics.
22767  In order of importance, they are: 
22768 \end_layout
22769
22770 \begin_deeper
22771 \begin_layout Itemize
22772 flexible order of elaboration 
22773 \end_layout
22774
22775 \begin_layout Itemize
22776 automatic support for browsing 
22777 \end_layout
22778
22779 \begin_layout Itemize
22780 typeset documentation, especially diagrams and mathematics 
22781 \end_layout
22782
22783 \end_deeper
22784 \begin_layout Standard
22785 Now that I sparked your curiosity, take a look in the references.
22786 \end_layout
22787
22788 \begin_layout Subsubsection
22789 References
22790 \end_layout
22791
22792 \begin_layout Standard
22793 The complete Literate Programming FAQ can be found at:
22794 \end_layout
22795
22796 \begin_layout Quote
22797 Literate Programming FAQ 
22798 \begin_inset Flex URL
22799 status collapsed
22800
22801 \begin_layout Plain Layout
22802
22803 http://www.literateprogramming.com/lpfaq.pdf
22804 \end_layout
22805
22806 \end_inset
22807
22808
22809 \end_layout
22810
22811 \begin_layout Standard
22812 The FAQ lists 23 (twenty three!) different literate programming tools.
22813  Where some are specialized or 
22814 \begin_inset Quotes eld
22815 \end_inset
22816
22817 tailored
22818 \begin_inset Quotes erd
22819 \end_inset
22820
22821  for particular programming languages, while other have general scope.
22822  I selected 
22823 \noun on
22824 Noweb
22825 \noun default
22826  for my own use for several reasons:
22827 \end_layout
22828
22829 \begin_layout Itemize
22830 It can generate the documentation either in \SpecialChar LaTeX
22831  or HTML.
22832 \end_layout
22833
22834 \begin_layout Itemize
22835 It has a open architecture, i.
22836 \begin_inset space \thinspace{}
22837 \end_inset
22838
22839 e.
22840 \begin_inset space \space{}
22841 \end_inset
22842
22843 it is easy to plug in new filters and to perform special processing that
22844  you may need.
22845  
22846 \end_layout
22847
22848 \begin_layout Itemize
22849 There is a good selection of filters available already (the HTML is one
22850  of them).
22851 \end_layout
22852
22853 \begin_layout Itemize
22854 It is free.
22855 \end_layout
22856
22857 \begin_layout Standard
22858 The Noweb web page can be found at: 
22859 \end_layout
22860
22861 \begin_layout Quote
22862 Noweb home page 
22863 \begin_inset Flex URL
22864 status collapsed
22865
22866 \begin_layout Plain Layout
22867
22868 http://www.cs.virginia.edu/~nr/noweb/
22869 \end_layout
22870
22871 \end_inset
22872
22873
22874 \end_layout
22875
22876 \begin_layout Standard
22877 Starting from there you can reach many other interesting links and even
22878  some literate program examples.
22879 \end_layout
22880
22881 \begin_layout Subsection
22882 \SpecialChar LyX
22883  and Literate Programming with Noweb
22884 \end_layout
22885
22886 \begin_layout Standard
22887 The \SpecialChar LyX
22888  support for Literate Programming is provided by using the generic \SpecialChar LyX
22889
22890  converters mechanism.
22891  This support is provided in a 
22892 \begin_inset Quotes eld
22893 \end_inset
22894
22895 Noweb independent
22896 \begin_inset Quotes erd
22897 \end_inset
22898
22899  way, i.
22900 \begin_inset space \thinspace{}
22901 \end_inset
22902
22903 e.
22904 \begin_inset space \space{}
22905 \end_inset
22906
22907 you will be able to use this new \SpecialChar LyX
22908  feature with some other literate programming
22909  tool of your choice by just changing your \SpecialChar LyX
22910  preferences.
22911 \end_layout
22912
22913 \begin_layout Subsubsection
22914 Generating documents and code (weaving and tangling)
22915 \end_layout
22916
22917 \begin_layout Paragraph
22918 Using the noweb module
22919 \end_layout
22920
22921 \begin_layout Standard
22922 If you have installed Noweb and \SpecialChar LyX
22923  successfully, whenever you open a new document,
22924  after you have chosen its document class, use the Document->Settings menu
22925  to add the 
22926 \begin_inset Quotes eld
22927 \end_inset
22928
22929 noweb
22930 \begin_inset Quotes erd
22931 \end_inset
22932
22933  module.
22934  If Noweb is correctly installed, when you click on the 
22935 \begin_inset Quotes eld
22936 \end_inset
22937
22938 Modules
22939 \begin_inset Quotes erd
22940 \end_inset
22941
22942  link, you will see the 
22943 \begin_inset Quotes eld
22944 \end_inset
22945
22946 noweb
22947 \begin_inset Quotes erd
22948 \end_inset
22949
22950  module in the available list and you can add it to your document.
22951 \end_layout
22952
22953 \begin_layout Paragraph
22954 Typing code in
22955 \end_layout
22956
22957 \begin_layout Standard
22958 \SpecialChar LyX
22959  enables you to write code with a layout named 
22960 \begin_inset Flex Noun
22961 status collapsed
22962
22963 \begin_layout Plain Layout
22964 Chunk
22965 \end_layout
22966
22967 \end_inset
22968
22969 .
22970  Noweb delimits chunks like this:
22971 \end_layout
22972
22973 \begin_layout LyX-Code
22974 <<My code>>=
22975 \end_layout
22976
22977 \begin_layout LyX-Code
22978   code
22979 \end_layout
22980
22981 \begin_layout LyX-Code
22982   more code
22983 \end_layout
22984
22985 \begin_layout LyX-Code
22986   even more code
22987 \end_layout
22988
22989 \begin_layout LyX-Code
22990   @
22991 \end_layout
22992
22993 \begin_layout Standard
22994 The problem is that whatever is written in between the << and the 
22995 \family typewriter
22996 @
22997 \family default
22998  must be taken literally, i.
22999 \begin_inset space \thinspace{}
23000 \end_inset
23001
23002 e.
23003 \begin_inset space \space{}
23004 \end_inset
23005
23006 \SpecialChar LyX
23007  should be prevented from making any special interpretation of what has
23008  been written.
23009  This is also handled by 
23010 \begin_inset Flex Noun
23011 status collapsed
23012
23013 \begin_layout Plain Layout
23014 Chunk
23015 \end_layout
23016
23017 \end_inset
23018
23019 , that works like a normal paragraph but has a free spacing capability.
23020 \end_layout
23021
23022 \begin_layout Standard
23023 As a special note, you can also use the 
23024 \begin_inset Quotes eld
23025 \end_inset
23026
23027 %def
23028 \begin_inset Quotes erd
23029 \end_inset
23030
23031  construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
23032 rence:
23033 \end_layout
23034
23035 \begin_layout LyX-Code
23036 <<My chunk>>=
23037 \end_layout
23038
23039 \begin_layout LyX-Code
23040 def some_function(args):
23041 \end_layout
23042
23043 \begin_layout LyX-Code
23044    "This is the doc string for this function."
23045 \end_layout
23046
23047 \begin_layout LyX-Code
23048    print "My args: ", args
23049 \end_layout
23050
23051 \begin_layout LyX-Code
23052 @ %def some_function
23053 \end_layout
23054
23055 \begin_layout Standard
23056 For an example of this usage and the resulting cross-reference output, look
23057  at the Literate python program in 
23058 \emph on
23059 LIBDIR/examples/listerrors.lyx
23060 \emph default
23061  which should make this all clear.
23062 \end_layout
23063
23064 \begin_layout Paragraph
23065 Generating the documentation
23066 \end_layout
23067
23068 \begin_layout Standard
23069 At this point you already have a new document file with a proper document
23070  class, and with some code and text on it.
23071  How do I print it? The answer is simple, you select 
23072 \family sans
23073 View\SpecialChar menuseparator
23074 DVI,
23075 \family default
23076  etc.
23077  Just like you would do for a plain document.
23078  No special procedure is required.
23079 \end_layout
23080
23081 \begin_layout Standard
23082 To help orientate you, I will now explain what happens inside \SpecialChar LyX
23083 :
23084 \end_layout
23085
23086 \begin_layout Enumerate
23087 When the 
23088 \family sans
23089 Update\SpecialChar menuseparator
23090 DVI
23091 \family default
23092  menu option is chosen, a \SpecialChar LaTeX
23093  file is generated.
23094  
23095 \end_layout
23096
23097 \begin_deeper
23098 \begin_layout Standard
23099 If the document is of any literate class the generated file will be named
23100  with an extension name defined by the 
23101 \begin_inset Quotes eld
23102 \end_inset
23103
23104 literate
23105 \begin_inset Quotes erd
23106 \end_inset
23107
23108  format (defined in the Preferences panel), otherwise the file will have
23109  the usual 
23110 \family typewriter
23111 .tex
23112 \family default
23113  extension.
23114 \end_layout
23115
23116 \end_deeper
23117 \begin_layout Enumerate
23118 Note that the only difference so far is in the name of the file, no special
23119  processing is required by \SpecialChar LyX
23120 .
23121  Given that you formatted the code using the 
23122 \begin_inset Flex Noun
23123 status collapsed
23124
23125 \begin_layout Plain Layout
23126 Chunk
23127 \end_layout
23128
23129 \end_inset
23130
23131  layout that, by itself, takes care of the business.
23132 \end_layout
23133
23134 \begin_layout Enumerate
23135 If the document is of any literate class \SpecialChar LyX
23136  will then use the internal \SpecialChar LyX
23137  to
23138  Noweb converter, followed by the Noweb to \SpecialChar LaTeX
23139  converter
23140 \begin_inset Foot
23141 status collapsed
23142
23143 \begin_layout Plain Layout
23144 The converters are defined in the 
23145 \family sans
23146 Tools\SpecialChar menuseparator
23147 Preferences
23148 \family default
23149  panel, under the 
23150 \begin_inset Quotes eld
23151 \end_inset
23152
23153 Conversion
23154 \begin_inset Quotes erd
23155 \end_inset
23156
23157  tab.
23158  See section 
23159 \emph on
23160 Converters
23161 \emph default
23162  of the 
23163 \emph on
23164 Customization
23165 \emph default
23166  manual for general information about converters.
23167 \end_layout
23168
23169 \end_inset
23170
23171  to generate the \SpecialChar LaTeX
23172  file.
23173 \end_layout
23174
23175 \begin_deeper
23176 \begin_layout Standard
23177 Otherwise it will just skip this step.
23178 \end_layout
23179
23180 \end_deeper
23181 \begin_layout Enumerate
23182 Finally, \SpecialChar LaTeX
23183  is invoked and the regular post processing continues as in a plain
23184  document.
23185 \end_layout
23186
23187 \begin_layout Standard
23188 Independence from a particular 
23189 \begin_inset Quotes eld
23190 \end_inset
23191
23192 literate tool
23193 \begin_inset Quotes erd
23194 \end_inset
23195
23196  is easily achieved by changing the commands that are run by the various
23197  converters.
23198 \end_layout
23199
23200 \begin_layout Paragraph
23201 Generating the code
23202 \end_layout
23203
23204 \begin_layout Standard
23205 When the build menu option is chosen or the corresponding button in the
23206  toolbar is pressed, a \SpecialChar LaTeX
23207  file is generated just like step 1 above.
23208  Next, \SpecialChar LyX
23209  invokes the 
23210 \family typewriter
23211 Noweb->Program
23212 \family default
23213  converter.
23214  This converter needs to be defined by the user and is not installed by
23215  default, though the Program format is.
23216  This converter (like any other converter) will have two parts:
23217 \end_layout
23218
23219 \begin_layout Enumerate
23220 The converter program itself.
23221  This program performs the conversion from the one format to the other (in
23222  this case, from the Noweb format to the Program pseudo-format).
23223 \end_layout
23224
23225 \begin_layout Enumerate
23226 The error log parser.
23227  This is a program whose sole purpose is to rewrite error messages in a
23228  format that \SpecialChar LyX
23229  understands.
23230  This makes it possible for \SpecialChar LyX
23231  to place error boxes in the right places in
23232  the file buffer.
23233 \end_layout
23234
23235 \begin_layout Standard
23236 The first part, the 
23237 \begin_inset Quotes eld
23238 \end_inset
23239
23240 Converter
23241 \begin_inset Quotes erd
23242 \end_inset
23243
23244  setting, should be set to
23245 \begin_inset Newline newline
23246 \end_inset
23247
23248
23249 \begin_inset Quotes eld
23250 \end_inset
23251
23252
23253 \family typewriter
23254 build-script $$i
23255 \family default
23256  $$r
23257 \begin_inset Quotes erd
23258 \end_inset
23259
23260 .
23261 \begin_inset Newline newline
23262 \end_inset
23263
23264 This basically means that \SpecialChar LyX
23265  will call 
23266 \begin_inset Quotes eld
23267 \end_inset
23268
23269 build-script
23270 \begin_inset Quotes erd
23271 \end_inset
23272
23273  (a program or script) with the name of the Noweb file (normally a file
23274  in the \SpecialChar LyX
23275  temp directory) and the directory path of the original \SpecialChar LyX
23276  file.
23277  
23278 \end_layout
23279
23280 \begin_layout Standard
23281 This is an implementation of 
23282 \begin_inset Quotes eld
23283 \end_inset
23284
23285 build-script
23286 \begin_inset Quotes erd
23287 \end_inset
23288
23289  that you can place in a directory on your path:
23290 \end_layout
23291
23292 \begin_layout Standard
23293 \begin_inset VSpace defskip
23294 \end_inset
23295
23296
23297 \end_layout
23298
23299 \begin_layout Standard
23300 \begin_inset Newpage pagebreak
23301 \end_inset
23302
23303
23304 \end_layout
23305
23306 \begin_layout Standard
23307
23308 \family sans
23309 #!/bin/sh
23310 \end_layout
23311
23312 \begin_layout Standard
23313
23314 \family sans
23315 #
23316 \end_layout
23317
23318 \begin_layout Standard
23319
23320 \family sans
23321 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
23322 \end_layout
23323
23324 \begin_layout Standard
23325 \begin_inset VSpace defskip
23326 \end_inset
23327
23328
23329 \end_layout
23330
23331 \begin_layout Standard
23332 The next part of the converter setting is the 
23333 \begin_inset Quotes eld
23334 \end_inset
23335
23336 Flags
23337 \begin_inset Quotes erd
23338 \end_inset
23339
23340  which is to be set to
23341 \begin_inset Newline newline
23342 \end_inset
23343
23344
23345 \begin_inset Quotes eld
23346 \end_inset
23347
23348
23349 \family typewriter
23350 parselog=$$s/scripts/listerrors
23351 \family default
23352
23353 \begin_inset Quotes erd
23354 \end_inset
23355
23356 .
23357 \begin_inset Newline newline
23358 \end_inset
23359
23360 This will run any errors that are generated by the 
23361 \begin_inset Quotes eld
23362 \end_inset
23363
23364 build-script
23365 \begin_inset Quotes erd
23366 \end_inset
23367
23368  process through the 
23369 \begin_inset Quotes eld
23370 \end_inset
23371
23372 listerrors
23373 \begin_inset Quotes erd
23374 \end_inset
23375
23376  program.
23377 \end_layout
23378
23379 \begin_layout Standard
23380 The build will normally take place in \SpecialChar LyX
23381 's temporary directory, so the files
23382  produced by the conversion will be in that directory.
23383  \SpecialChar LyX
23384  will copy out what it regards as the `main' file, but the 
23385 \family typewriter
23386 Noweb->Program
23387 \family default
23388  conversion may produce several files, and so most of these would then be
23389  deleted when \SpecialChar LyX
23390  was closed.
23391  This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
23392  the build-script chunk can place the generated files in that location.
23393 \end_layout
23394
23395 \begin_layout Paragraph
23396 Build instructions in the document
23397 \end_layout
23398
23399 \begin_layout Standard
23400 The last piece of the integration between \SpecialChar LyX
23401  and noweb is the 
23402 \begin_inset Quotes eld
23403 \end_inset
23404
23405 build-script
23406 \begin_inset Quotes erd
23407 \end_inset
23408
23409  chunk.
23410  Generally, the instructions for building your program should be embedded
23411  in a chunk of its own.
23412  The noweb-specific 
23413 \begin_inset Quotes eld
23414 \end_inset
23415
23416 build-script
23417 \begin_inset Quotes erd
23418 \end_inset
23419
23420  above uses the notangle command to look for this chunk (called 
23421 \begin_inset Quotes eld
23422 \end_inset
23423
23424 build-script
23425 \begin_inset Quotes erd
23426 \end_inset
23427
23428 ) and runs its contents through 
23429 \begin_inset Quotes eld
23430 \end_inset
23431
23432 sh
23433 \begin_inset Quotes erd
23434 \end_inset
23435
23436 .
23437 \end_layout
23438
23439 \begin_layout Standard
23440 Typically, such a chunk would look something like this:
23441 \end_layout
23442
23443 \begin_layout LyX-Code
23444 <<build-script>>=
23445 \end_layout
23446
23447 \begin_layout LyX-Code
23448 #!/bin/sh
23449 \begin_inset Newline newline
23450 \end_inset
23451
23452 if [ -z "${NOWEB_SOURCE}" ]
23453 \begin_inset Newline newline
23454 \end_inset
23455
23456 then
23457 \end_layout
23458
23459 \begin_layout LyX-Code
23460 NOWEB_SOURCE=myfile.nw
23461 \begin_inset Newline newline
23462 \end_inset
23463
23464 fi
23465 \begin_inset Newline newline
23466 \end_inset
23467
23468 [...
23469  code to extract files ...
23470  use NOWEB_OUTPUT_DIR here ...]
23471 \begin_inset Newline newline
23472 \end_inset
23473
23474 [...
23475  code to compile files ...]
23476 \begin_inset Newline newline
23477 \end_inset
23478
23479 @
23480 \end_layout
23481
23482 \begin_layout Standard
23483 Look in 
23484 \emph on
23485 LIBDIR/examples/listerrors.lyx
23486 \emph default
23487  or in 
23488 \emph on
23489 LIBDIR/examples/Literate.lyx
23490 \emph default
23491  which implement two versions of the 
23492 \begin_inset Quotes eld
23493 \end_inset
23494
23495 listerrors
23496 \begin_inset Quotes erd
23497 \end_inset
23498
23499  program for some illustrations of how all of these pieces go together or
23500  in 
23501 \emph on
23502 LIBDIR/examples/noweb2lyx.lyx.
23503
23504 \emph default
23505  Interestingly, these three files show off the language-indepence of the
23506  \SpecialChar LyX
23507  literate programming support since they are written in Python, C and Perl
23508  respectively.
23509 \end_layout
23510
23511 \begin_layout Subsubsection
23512 Configuring \SpecialChar LyX
23513
23514 \end_layout
23515
23516 \begin_layout Standard
23517 All the Literate Programming support is configured by the 
23518 \family sans
23519 Tools\SpecialChar menuseparator
23520 Preferences
23521 \family default
23522  panel in the 
23523 \begin_inset Quotes eld
23524 \end_inset
23525
23526 File Handling
23527 \begin_inset Quotes erd
23528 \end_inset
23529
23530  tab.
23531  The important parts are:
23532 \end_layout
23533
23534 \begin_layout Description
23535 the
23536 \begin_inset space ~
23537 \end_inset
23538
23539
23540 \begin_inset Quotes eld
23541 \end_inset
23542
23543 NoWeb
23544 \begin_inset Quotes erd
23545 \end_inset
23546
23547
23548 \begin_inset space ~
23549 \end_inset
23550
23551 format Set up via the File Formats tab, this is where the Noweb-specific
23552  pieces are set up.
23553  The 
23554 \family sans
23555 GUI Name
23556 \family default
23557  is set to 
23558 \family typewriter
23559 NoWeb
23560 \family default
23561 , the file extension is set to 
23562 \family typewriter
23563 .nw
23564 \family default
23565 .
23566  This tells \SpecialChar LyX
23567  to create a file with a 
23568 \family typewriter
23569 .nw
23570 \family default
23571  extension in the first step of the conversion process.
23572 \end_layout
23573
23574 \begin_layout Description
23575 the
23576 \begin_inset space ~
23577 \end_inset
23578
23579
23580 \family sans
23581 Program
23582 \family default
23583
23584 \begin_inset space ~
23585 \end_inset
23586
23587 format This is an empty format whose sole purpose is to be the endpoint
23588  of a conversion (which then allows us to set up a converter for it).
23589 \end_layout
23590
23591 \begin_layout Description
23592
23593 \family sans
23594 NoWeb
23595 \family default
23596 ->
23597 \family sans
23598 \SpecialChar LaTeX
23599
23600 \family default
23601  This converter performs the 
23602 \begin_inset Quotes eld
23603 \end_inset
23604
23605 weaving
23606 \begin_inset Quotes erd
23607 \end_inset
23608
23609  of the literate document.
23610  For Noweb, it is set to 
23611 \begin_inset Quotes eld
23612 \end_inset
23613
23614
23615 \family typewriter
23616 noweave -delay -index $$i > $$o
23617 \family default
23618
23619 \begin_inset Quotes erd
23620 \end_inset
23621
23622
23623 \end_layout
23624
23625 \begin_layout Description
23626
23627 \family sans
23628 NoWeb
23629 \family default
23630 ->
23631 \family sans
23632 Program
23633 \family default
23634  This performs the 
23635 \begin_inset Quotes eld
23636 \end_inset
23637
23638 tangling step
23639 \begin_inset Quotes erd
23640 \end_inset
23641
23642 .
23643  As stated above, the Converter is set to 
23644 \begin_inset Quotes eld
23645 \end_inset
23646
23647
23648 \family typewriter
23649 build-script $$i
23650 \family default
23651  $$r
23652 \begin_inset Quotes erd
23653 \end_inset
23654
23655 , with Flags set to
23656 \begin_inset Newline newline
23657 \end_inset
23658
23659
23660 \begin_inset Quotes eld
23661 \end_inset
23662
23663
23664 \family typewriter
23665 parselog=$$s/scripts/listerrors
23666 \family default
23667
23668 \begin_inset Quotes erd
23669 \end_inset
23670
23671 .
23672 \end_layout
23673
23674 \begin_layout Subsubsection
23675 Debug extensions
23676 \end_layout
23677
23678 \begin_layout Standard
23679 There is also a new function implemented in the \SpecialChar LyX
23680  server, the 
23681 \begin_inset Quotes eld
23682 \end_inset
23683
23684 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
23685  
23686 \end_layout
23687
23688 \begin_layout Standard
23689 When debugging code with ddd/gdb, it is possible to invoke a text editor
23690  at the current execution position with a single key stroke.
23691  The default ddd configuration for that is shift-ctrl-V.
23692  It happens that you can define the editor command line invocation in ddd
23693  by accessing the 
23694 \family sans
23695 Edit\SpecialChar menuseparator
23696 Preferences\SpecialChar menuseparator
23697 Helpers
23698 \family default
23699  dialog and changing the "Edit Sources" entry.
23700 \end_layout
23701
23702 \begin_layout Standard
23703 I take advantage of the newly created \SpecialChar LyX
23704  server function and this ddd feature,
23705  and set 
23706 \begin_inset Quotes eld
23707 \end_inset
23708
23709 Edit Sources
23710 \begin_inset Quotes erd
23711 \end_inset
23712
23713  to:
23714 \end_layout
23715
23716 \begin_layout Standard
23717 \begin_inset VSpace defskip
23718 \end_inset
23719
23720
23721 \end_layout
23722
23723 \begin_layout Standard
23724
23725 \family sans
23726 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
23727 \end_layout
23728
23729 \begin_layout Standard
23730 \begin_inset VSpace defskip
23731 \end_inset
23732
23733
23734 \end_layout
23735
23736 \begin_layout Standard
23737 With this, whenever you are using ddd and find a point in the program that
23738  you want to edit, you just press shift-ctrl-V (in the ddd window), and
23739  ddd will forward this information to \SpecialChar LyX
23740  through the \SpecialChar LyX
23741  server and then the
23742  \SpecialChar LyX
23743  window will show the same file with the cursor at the same position ddd
23744  was pointing to.
23745  No more guessing or long scrolling to locate a point in the program back
23746  from debugging !
23747 \end_layout
23748
23749 \begin_layout Standard
23750 Note however that you must enable the \SpecialChar LyX
23751  server to get this feature working
23752  (it is disabled by default).
23753  You can enable it in 
23754 \family sans
23755 Preferences
23756 \family default
23757  (tabs 
23758 \family sans
23759 Inputs
23760 \family default
23761
23762 \family sans
23763 Paths
23764 \family default
23765 ) by entering in the 
23766 \family sans
23767 \SpecialChar LyX
23768 server pipe
23769 \family default
23770  a path like 
23771 \begin_inset Quotes eld
23772 \end_inset
23773
23774
23775 \family typewriter
23776 /home/<your-home-directory>/.lyx/lyxpipe
23777 \family default
23778
23779 \begin_inset Quotes erd
23780 \end_inset
23781
23782
23783 \end_layout
23784
23785 \begin_layout Standard
23786 Read the \SpecialChar LyX
23787  server documentation in the 
23788 \emph on
23789 Customization Manual
23790 \emph default
23791  for further information.
23792 \end_layout
23793
23794 \begin_layout Subsubsection
23795 Toolbar extensions
23796 \end_layout
23797
23798 \begin_layout Standard
23799 There are six new buttons that can be added to your \SpecialChar LyX
23800  toolbar.
23801  Five of these buttons are short cuts to layout styles: 
23802 \family sans
23803 Standard
23804 \family default
23805
23806 \family sans
23807 Section
23808 \family default
23809
23810 \family sans
23811 \SpecialChar LaTeX
23812
23813 \family default
23814
23815 \family sans
23816 \SpecialChar LyX
23817 -Code
23818 \family default
23819 , and 
23820 \family sans
23821 Chunk
23822 \family default
23823 .
23824  The last one is a short cut to the 
23825 \begin_inset Quotes eld
23826 \end_inset
23827
23828 Build Program
23829 \begin_inset Quotes erd
23830 \end_inset
23831
23832  File menu entry.
23833  
23834 \end_layout
23835
23836 \begin_layout Standard
23837 \SpecialChar LyX
23838  has a range of buttons that are available for tool bar customization.
23839  In my toolbar I like to combine the six short cuts above with two more:
23840  One for 
23841 \family sans
23842 Document
23843 \family default
23844 \SpecialChar menuseparator
23845
23846 \family sans
23847 Update
23848 \family default
23849 \SpecialChar menuseparator
23850
23851 \family sans
23852 DVI
23853 \family default
23854  and the other for 
23855 \family sans
23856 Document\SpecialChar menuseparator
23857 View\SpecialChar menuseparator
23858 DVI
23859 \family default
23860  File menu entries.
23861  Here is how it looks like:
23862 \end_layout
23863
23864 \begin_layout LyX-Code
23865 Toolbar
23866 \end_layout
23867
23868 \begin_layout LyX-Code
23869   Layouts
23870 \end_layout
23871
23872 \begin_layout LyX-Code
23873   Icon "layout Standard"
23874 \end_layout
23875
23876 \begin_layout LyX-Code
23877   Icon "layout Section"
23878 \end_layout
23879
23880 \begin_layout LyX-Code
23881   Icon "layout \SpecialChar LaTeX
23882 "
23883 \end_layout
23884
23885 \begin_layout LyX-Code
23886   Icon "layout \SpecialChar LyX
23887 -Code"
23888 \end_layout
23889
23890 \begin_layout LyX-Code
23891   Icon "layout Chunk"
23892 \end_layout
23893
23894 \begin_layout LyX-Code
23895   Separator
23896 \end_layout
23897
23898 \begin_layout LyX-Code
23899   Icon "buffer-view"
23900 \end_layout
23901
23902 \begin_layout LyX-Code
23903   Icon "buffer-typeset"
23904 \end_layout
23905
23906 \begin_layout LyX-Code
23907   Icon "build-program"
23908 \end_layout
23909
23910 \begin_layout LyX-Code
23911   Separator
23912 \end_layout
23913
23914 \begin_layout LyX-Code
23915 .
23916 \end_layout
23917
23918 \begin_layout LyX-Code
23919 .
23920 \end_layout
23921
23922 \begin_layout LyX-Code
23923 .
23924 \end_layout
23925
23926 \begin_layout LyX-Code
23927 End
23928 \end_layout
23929
23930 \begin_layout Subsubsection
23931 Colors customization
23932 \end_layout
23933
23934 \begin_layout Standard
23935 There are a number of colors in \SpecialChar LyX
23936  that can be customized in 
23937 \family sans
23938 Preferences
23939 \family default
23940 .
23941  One of the things that bothers people is the \SpecialChar LaTeX
23942  font color.
23943  The default color is red, since the chunks uses \SpecialChar LaTeX
23944  font, and there is a lot
23945  of chunks in literate documents, you may get tired of seeing everything
23946  in red.
23947  You can change it by going to the tabs 
23948 \family sans
23949 Look&Feel
23950 \family default
23951
23952 \family sans
23953 Colors.
23954 \end_layout
23955
23956 \begin_layout Standard
23957 The next thing is the visible presence of the newline character in the screen.
23958  You can choose the color of this particular character and make it blend
23959  in the background.
23960  I recommend you choosing a color that is close to the background but not
23961  equal, that way you still can see it is there, but it is not bothering
23962  you anymore.
23963 \end_layout
23964
23965 \begin_layout Subsection
23966 \SpecialChar LyX
23967  and knitr/Sweave
23968 \end_layout
23969
23970 \begin_layout Standard
23971 Support for 
23972 \family sans
23973 knitr
23974 \family default
23975  and 
23976 \family sans
23977 Sweave
23978 \family default
23979  is documented in the 
23980 \emph on
23981 knitr.lyx
23982 \emph default
23983  example file and in the Sweave manual (menu 
23984 \family sans
23985 Help\SpecialChar menuseparator
23986 Specific Manuals
23987 \family default
23988 ).
23989 \end_layout
23990
23991 \begin_layout Chapter
23992 Special features
23993 \end_layout
23994
23995 \begin_layout Standard
23996 You can do everything with \SpecialChar LyX
23997  that you can do with \SpecialChar LaTeX
23998 .
23999  However, \SpecialChar LyX
24000  cannot support every \SpecialChar LaTeX
24001  feature directly.
24002  But you can always use \SpecialChar TeX
24003  Code.
24004  This chapter shows you some more special things you might want to use.
24005  For other special things you can do with figures, tables, floats, boxes
24006  and notes, have a look at the 
24007 \emph on
24008 Embedded
24009 \begin_inset space ~
24010 \end_inset
24011
24012 Objects
24013 \emph default
24014  manual.
24015 \end_layout
24016
24017 \begin_layout Section
24018 Multiple Text Columns
24019 \end_layout
24020
24021 \begin_layout Standard
24022 This feature is independent of the option 
24023 \family sans
24024 Two-column document
24025 \family default
24026  in the document settings under 
24027 \family sans
24028 Text Layout
24029 \family default
24030 .
24031  If you want to have 2
24032 \begin_inset space ~
24033 \end_inset
24034
24035 columns for the whole document, it is recommended to use the 
24036 \family sans
24037 Two-column document
24038 \family default
24039  option.
24040  For all other cases use this feature.
24041 \end_layout
24042
24043 \begin_layout Standard
24044 To use multiple text columns in your document, you have to load the module
24045  
24046 \family sans
24047 Multiple Columns
24048 \family default
24049  (menu 
24050 \family sans
24051 Document\SpecialChar menuseparator
24052 Settings\SpecialChar menuseparator
24053 Modules
24054 \family default
24055 ) and must have the \SpecialChar LaTeX
24056 -package 
24057 \series bold
24058 multicol
24059 \series default
24060  installed.
24061 \end_layout
24062
24063 \begin_layout Standard
24064 Footnotes within multiple columns will be placed at the bottom of the page
24065  and not under each column.
24066  Within the different columns you can use everything, with the limitation
24067  that for floats you need to use the float option 
24068 \family sans
24069 Span columns
24070 \family default
24071 .
24072 \end_layout
24073
24074 \begin_layout Subsection
24075 Basics
24076 \end_layout
24077
24078 \begin_layout Standard
24079 If you want to have 2
24080 \begin_inset space ~
24081 \end_inset
24082
24083 columns in your text, insert a multicolumn inset via the menu 
24084 \family sans
24085 Insert\SpecialChar menuseparator
24086 Custom
24087 \begin_inset space ~
24088 \end_inset
24089
24090 Insets\SpecialChar menuseparator
24091 Multiple
24092 \begin_inset space ~
24093 \end_inset
24094
24095 Columns
24096 \family default
24097  where the columns should start.
24098  Write all text that should be printed in 2
24099 \begin_inset space ~
24100 \end_inset
24101
24102 columns into this inset.
24103 \end_layout
24104
24105 \begin_layout Standard
24106 Here is an example:
24107 \end_layout
24108
24109 \begin_layout Standard
24110 \noindent
24111 \begin_inset Flex Multiple Columns
24112 status open
24113
24114 \begin_layout Plain Layout
24115 \noindent
24116
24117 \series bold
24118 \size small
24119 The Adventure of the Empty House
24120 \series default
24121
24122 \begin_inset Newline newline
24123 \end_inset
24124
24125 by Sir Arthur Conan Doyle
24126 \end_layout
24127
24128 \begin_layout Plain Layout
24129
24130 \size small
24131 It was in the spring of the year 1894 that all London was interested, and
24132  the fashionable world dismayed, by the murder of the Honourable Ronald
24133  Adair under most unusual and inexplicable circumstances.
24134  The public has already learned those particulars of the crime which came
24135  out in the police investigation, but a good deal was suppressed upon that
24136  occasion, since the case for the prosecution was so overwhelmingly strong
24137  that it was not necessary to bring forward all the facts.
24138  Only now, at the end of nearly ten years, am I allowed to supply those
24139  missing links which make up the whole of that remarkable chain.
24140  The crime was of interest in itself, but that interest was as nothing to
24141  me compared to the inconceivable sequel, which afforded me the greatest
24142  shock and surprise of any event in my adventurous life.
24143  Even now, after this long interval, I find myself thrilling as I think
24144  of it, and feeling once more that sudden flood of joy, amazement, and increduli
24145 ty which utterly submerged my mind.
24146  Let me say to that public, which has shown some interest in those glimpses
24147  which I have occasionally given them of the thoughts and actions of a very
24148  remarkable man, that they are not to blame me if I have not shared my knowledge
24149  with them, for I should have considered it my first duty to do so, had
24150  I not been barred by a positive prohibition from his own lips, which was
24151  only withdrawn upon the third of last month.
24152 \end_layout
24153
24154 \end_inset
24155
24156
24157 \end_layout
24158
24159 \begin_layout Standard
24160 To get 3 or more columns, set the cursor into the multicolumn inset and
24161  use the menu 
24162 \family sans
24163 Insert\SpecialChar menuseparator
24164 Number
24165 \begin_inset space ~
24166 \end_inset
24167
24168 of
24169 \begin_inset space ~
24170 \end_inset
24171
24172 Columns
24173 \family default
24174 .
24175  The number of the desired columns is written into that inset (for 3
24176 \begin_inset space ~
24177 \end_inset
24178
24179 columns write 
24180 \begin_inset Quotes eld
24181 \end_inset
24182
24183 3
24184 \begin_inset Quotes erd
24185 \end_inset
24186
24187 ).
24188 \begin_inset Newline newline
24189 \end_inset
24190
24191 Here is an example with 3
24192 \begin_inset space ~
24193 \end_inset
24194
24195 columns:
24196 \end_layout
24197
24198 \begin_layout Standard
24199 \begin_inset Flex Multiple Columns
24200 status open
24201
24202 \begin_layout Plain Layout
24203
24204 \size footnotesize
24205 \begin_inset Argument 1
24206 status open
24207
24208 \begin_layout Plain Layout
24209 3
24210 \end_layout
24211
24212 \end_inset
24213
24214 It can be imagined that my close intimacy with Sherlock Holmes had interested
24215  me deeply in crime, and that after his disappearance I never failed to
24216  read with care the various problems which came before the public.
24217  And I even attempted, more than once, for my own private satisfaction,
24218  to employ his methods in their solution, though with indifferent success.
24219  There was none, however, which appealed to me like this tragedy of Ronald
24220  Adair.
24221  As I read the evidence at the inquest, which led up to a verdict of willful
24222  murder against some person or persons unknown, I realized more clearly
24223  than I had ever done the loss which the community had sustained by the
24224  death of Sherlock Holmes.
24225  There were points about this strange business which would, I was sure,
24226  have specially appealed to him, and the efforts of the police would have
24227  been supplemented, or more probably anticipated, by the trained observation
24228  and the alert mind of the first criminal agent in Europe.
24229  All day, as I drove upon my round, I turned over the case in my mind and
24230  found no explanation which appeared to me to be adequate.
24231  At the risk of telling a twice-told tale, I will recapitulate the facts
24232  as they were known to the public at the conclusion of the inquest.
24233 \end_layout
24234
24235 \end_inset
24236
24237
24238 \end_layout
24239
24240 \begin_layout Standard
24241 You can have up to 10
24242 \begin_inset space ~
24243 \end_inset
24244
24245 columns if you want to, but that might not be very pleasant for the readers
24246  of your document.
24247 \end_layout
24248
24249 \begin_layout Standard
24250 \begin_inset Newpage newpage
24251 \end_inset
24252
24253
24254 \end_layout
24255
24256 \begin_layout Subsection
24257 Columns inside Columns
24258 \end_layout
24259
24260 \begin_layout Standard
24261 You can also have columns inside columns:
24262 \end_layout
24263
24264 \begin_layout Standard
24265 \begin_inset Flex Multiple Columns
24266 status open
24267
24268 \begin_layout Plain Layout
24269
24270 \size footnotesize
24271 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
24272  at that time governor of one of the Australian colonies.
24273  Adair's mother had returned from Australia to undergo the operation for
24274  cataract, and she, her son Ronald, and her daughter Hilda were living together
24275  at 427 Park Lane.
24276 \end_layout
24277
24278 \begin_layout Plain Layout
24279 \begin_inset Flex Multiple Columns
24280 status open
24281
24282 \begin_layout Plain Layout
24283
24284 \size footnotesize
24285 The youth moved in the best society–had, so far as was known, no enemies
24286  and no particular vices.
24287  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
24288  had been broken off by mutual consent some months before, and there was
24289  no sign that it had left any very profound feeling behind it.
24290  For the rest {sic} the man's life moved in a narrow and conventional circle,
24291  for his habits were quiet and his nature unemotional.
24292  Yet it was upon this easy-going young aristocrat that death came, in most
24293  strange and unexpected form, between the hours of ten and eleven-twenty
24294  on the night of March 30, 1894.
24295 \end_layout
24296
24297 \end_inset
24298
24299
24300 \end_layout
24301
24302 \begin_layout Plain Layout
24303
24304 \size footnotesize
24305 Ronald Adair was fond of cards–playing continually, but never for such stakes
24306  as would hurt him.
24307  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
24308  It was shown that, after dinner on the day of his death, he had played
24309  a rubber of whist at the latter club.
24310  He had also played there in the afternoon.
24311
24312 \size default
24313  
24314 \size footnotesize
24315 The evidence of those who had played with him– Mr.
24316  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
24317  and that there was a fairly equal fall of the cards.
24318  Adair might have lost five pounds, but not more.
24319  His fortune was a considerable one, and such a loss could not in any way
24320  affect him.
24321  He had played nearly every day at one club or other, but he was a cautious
24322  player, and usually rose a winner.
24323  It came out in evidence that, in partnership with Colonel Moran, he had
24324  actually won as much as four hundred and twenty pounds in a sitting, some
24325  weeks before, from Godfrey Milner and Lord Balmoral.
24326  So much for his recent history as it came out at the inquest.
24327 \end_layout
24328
24329 \end_inset
24330
24331
24332 \end_layout
24333
24334 \begin_layout Subsection
24335 Advanced Examples
24336 \end_layout
24337
24338 \begin_layout Standard
24339 The examples in this section show some more special features of multiple
24340  columns.
24341 \end_layout
24342
24343 \begin_layout Standard
24344 For more features of multiple columns, have a look at the documentation
24345  of the \SpecialChar LaTeX
24346 -package 
24347 \series bold
24348 multicol
24349 \series default
24350
24351 \begin_inset CommandInset citation
24352 LatexCommand cite
24353 key "multicol"
24354
24355 \end_inset
24356
24357 .
24358 \end_layout
24359
24360 \begin_layout Subsubsection
24361 Preface
24362 \end_layout
24363
24364 \begin_layout Standard
24365 To add a preface text for multiple columns, set the cursor into the multicolumn
24366  inset and use the menu 
24367 \family sans
24368 Insert\SpecialChar menuseparator
24369 Preface
24370 \family default
24371 .
24372  Write your preface text into that inset.
24373 \begin_inset Newline newline
24374 \end_inset
24375
24376 This is an example with some preface text:
24377 \end_layout
24378
24379 \begin_layout Standard
24380 \begin_inset VSpace bigskip
24381 \end_inset
24382
24383
24384 \end_layout
24385
24386 \begin_layout Standard
24387 \begin_inset Flex Multiple Columns
24388 status open
24389
24390 \begin_layout Plain Layout
24391 \begin_inset Argument 2
24392 status open
24393
24394 \begin_layout Plain Layout
24395 And the story continues and continues and continues and continues\SpecialChar ldots
24396
24397 \end_layout
24398
24399 \end_inset
24400
24401
24402 \size small
24403 On the evening of the crime, he returned from the club exactly at ten.
24404  His mother and sister were out spending the evening with a relation.
24405  The servant deposed that she heard him enter the front room on the second
24406  floor, generally used as his sitting-room.
24407  She had lit a fire there, and as it smoked she had opened the window.
24408  No sound was heard from the room until eleven-twenty, the hour of the return
24409  of Lady Maynooth and her daughter.
24410  Desiring to say good-night, she attempted to enter her son's room.
24411  The door was locked on the inside, and no answer could be got to their
24412  cries and knocking.
24413  Help was obtained, and the door forced.
24414  The unfortunate young man was found lying near the table.
24415  His head had been horribly mutilated by an expanding revolver bullet, but
24416  no weapon of any sort was to be found in the room.
24417 \end_layout
24418
24419 \end_inset
24420
24421
24422 \end_layout
24423
24424 \begin_layout Standard
24425 You can also use a section heading as the preface if you use a section command
24426  as \SpecialChar TeX
24427  Code.
24428  For example the command
24429 \end_layout
24430
24431 \begin_layout Standard
24432
24433 \series bold
24434
24435 \backslash
24436 subsection{subsection title}
24437 \end_layout
24438
24439 \begin_layout Standard
24440 creates a subsection.
24441  In this example the preface is a subsubsection:
24442 \end_layout
24443
24444 \begin_layout Standard
24445 \begin_inset Flex Multiple Columns
24446 status open
24447
24448 \begin_layout Plain Layout
24449 \begin_inset Argument 2
24450 status open
24451
24452 \begin_layout Plain Layout
24453 \begin_inset ERT
24454 status collapsed
24455
24456 \begin_layout Plain Layout
24457
24458
24459 \backslash
24460 subsubsection{
24461 \end_layout
24462
24463 \end_inset
24464
24465 This is a subsubsection heading as a preface
24466 \begin_inset ERT
24467 status collapsed
24468
24469 \begin_layout Plain Layout
24470
24471 }
24472 \end_layout
24473
24474 \end_inset
24475
24476
24477 \end_layout
24478
24479 \end_inset
24480
24481
24482 \size small
24483 A minute examination of the circumstances served only to make the case more
24484  complex.
24485  In the first place, no reason could be given why the young man should have
24486  fastened the door upon the inside.
24487  There was the possibility that the murderer had done this, and had afterwards
24488  escaped by the window.
24489  The drop was at least twenty feet, however, and a bed of crocuses in full
24490  bloom lay beneath.
24491  Neither the flowers nor the earth showed any sign of having been disturbed,
24492  nor were there any marks upon the narrow strip of grass which separated
24493  the house from the road.
24494  Apparently, therefore, it was the young man himself who had fastened the
24495  door.
24496  But how did he come by his death? No one could have climbed up to the window
24497  without leaving traces.
24498  Suppose a man had fired through the window, he would indeed be a remarkable
24499  shot who could with a revolver inflict so deadly a wound.
24500  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
24501  a hundred yards of the house.
24502  No one had heard a shot.
24503 \end_layout
24504
24505 \end_inset
24506
24507
24508 \end_layout
24509
24510 \begin_layout Standard
24511 If there is less vertical space than 6
24512 \begin_inset space ~
24513 \end_inset
24514
24515 text lines is left on the page at the beginning of the multiple columns,
24516  a page break will be inserted before the multiple columns.
24517  Depending on the number of lines of the preface text, you might want to
24518  change this space.
24519  This is done by setting the cursor into the mulitcolumn inset behind the
24520  preface (if there is any) and using the menu 
24521 \family sans
24522 Insert\SpecialChar menuseparator
24523 Space
24524 \begin_inset space ~
24525 \end_inset
24526
24527 Before
24528 \begin_inset space ~
24529 \end_inset
24530
24531 Page
24532 \begin_inset space ~
24533 \end_inset
24534
24535 Break
24536 \family default
24537 .
24538  Insert into that inset the amount of space like e.
24539 \begin_inset space \thinspace{}
24540 \end_inset
24541
24542 g.
24543 \begin_inset space \space{}
24544 \end_inset
24545
24546
24547 \begin_inset Quotes eld
24548 \end_inset
24549
24550 5cm
24551 \begin_inset Quotes erd
24552 \end_inset
24553
24554 .
24555 \begin_inset Newline newline
24556 \end_inset
24557
24558 In this example the space is set to 7
24559 \begin_inset space ~
24560 \end_inset
24561
24562 text lines by using 
24563 \begin_inset Quotes eld
24564 \end_inset
24565
24566 7
24567 \backslash
24568 baselineskip
24569 \begin_inset Quotes erd
24570 \end_inset
24571
24572  (where the command 
24573 \series bold
24574
24575 \backslash
24576 baselineskip
24577 \series default
24578  needs to be inserted as \SpecialChar TeX
24579  code):
24580 \end_layout
24581
24582 \begin_layout Standard
24583 \begin_inset Flex Multiple Columns
24584 status open
24585
24586 \begin_layout Plain Layout
24587 \begin_inset Argument 3
24588 status open
24589
24590 \begin_layout Plain Layout
24591 7
24592 \begin_inset ERT
24593 status collapsed
24594
24595 \begin_layout Plain Layout
24596
24597
24598 \backslash
24599 baselineskip
24600 \end_layout
24601
24602 \end_inset
24603
24604
24605 \end_layout
24606
24607 \end_inset
24608
24609
24610 \size small
24611 On the evening of the crime, he returned from the club exactly at ten.
24612  His mother and sister were out spending the evening with a relation.
24613  The servant deposed that she heard him enter the front room on the second
24614  floor, generally used as his sitting-room.
24615  She had lit a fire there, and as it smoked she had opened the window.
24616  No sound was heard from the room until eleven-twenty, the hour of the return
24617  of Lady Maynooth and her daughter.
24618  Desiring to say good-night, she attempted to enter her son's room.
24619  The door was locked on the inside, and no answer could be got to their
24620  cries and knocking.
24621  Help was obtained, and the door forced.
24622  The unfortunate young man was found lying near the table.
24623  His head had been horribly mutilated by an expanding revolver bullet, but
24624  no weapon of any sort was to be found in the room.
24625 \end_layout
24626
24627 \end_inset
24628
24629
24630 \end_layout
24631
24632 \begin_layout Subsubsection
24633 Surrounding Space
24634 \end_layout
24635
24636 \begin_layout Standard
24637 The amount of space before and after multiple columns can be changed by
24638  changing the length 
24639 \series bold
24640
24641 \backslash
24642 multicolsep
24643 \series default
24644 .
24645  For example the command
24646 \end_layout
24647
24648 \begin_layout Standard
24649
24650 \series bold
24651
24652 \backslash
24653 setlength{
24654 \backslash
24655 multicolsep}{3cm}
24656 \end_layout
24657
24658 \begin_layout Standard
24659 in \SpecialChar TeX
24660  Code changes its value to 3
24661 \begin_inset space \thinspace{}
24662 \end_inset
24663
24664 cm.
24665  The change must be made before the multiple columns' start.
24666  The predefined value is 13
24667 \begin_inset space \thinspace{}
24668 \end_inset
24669
24670 pt.
24671 \end_layout
24672
24673 \begin_layout Standard
24674 For this example 
24675 \series bold
24676
24677 \backslash
24678 multicolsep
24679 \series default
24680  was set to 2.5
24681 \begin_inset space \thinspace{}
24682 \end_inset
24683
24684 cm:
24685 \end_layout
24686
24687 \begin_layout Standard
24688 \begin_inset ERT
24689 status open
24690
24691 \begin_layout Plain Layout
24692
24693
24694 \backslash
24695 setlength{
24696 \backslash
24697 multicolsep}{2.5cm}
24698 \end_layout
24699
24700 \end_inset
24701
24702
24703 \end_layout
24704
24705 \begin_layout Standard
24706 \begin_inset Flex Multiple Columns
24707 status open
24708
24709 \begin_layout Plain Layout
24710
24711 \size small
24712 All day I turned these facts over in my mind, endeavouring to hit upon some
24713  theory which could reconcile them all, and to find that line of least resistanc
24714 e which my poor friend had declared to be the starting-point of every investigat
24715 ion.
24716  I confess that I made little progress.
24717  In the evening I strolled across the Park, and found myself about six o'clock
24718  at the Oxford Street end of Park Lane.
24719  A group of loafers upon the pavements, all staring up at a particular window,
24720  directed me to the house which I had come to see.
24721  A tall, thin man with coloured glasses, whom I strongly suspected of being
24722  a plain-clothes detective, was pointing out some theory of his own, while
24723  the others crowded round to listen to what he said.
24724  I got as near him as I could, but his observations seemed to me to be absurd,
24725  so I withdrew again in some disgust.
24726  As I did so I struck against an elderly, deformed man, who had been behind
24727  me, and I knocked down several books which he was carrying.
24728 \end_layout
24729
24730 \end_inset
24731
24732
24733 \end_layout
24734
24735 \begin_layout Standard
24736 \begin_inset Note Greyedout
24737 status open
24738
24739 \begin_layout Plain Layout
24740
24741 \series bold
24742 Note:
24743 \series default
24744  The values you set with 
24745 \series bold
24746
24747 \backslash
24748 setlength
24749 \series default
24750  will be used for all following multiple columns until you change them again.
24751 \end_layout
24752
24753 \end_inset
24754
24755
24756 \end_layout
24757
24758 \begin_layout Standard
24759 \begin_inset ERT
24760 status collapsed
24761
24762 \begin_layout Plain Layout
24763
24764
24765 \backslash
24766 setlength{
24767 \backslash
24768 multicolsep}{13pt}
24769 \end_layout
24770
24771 \end_inset
24772
24773
24774 \begin_inset Note Note
24775 status collapsed
24776
24777 \begin_layout Plain Layout
24778 go back to the default
24779 \end_layout
24780
24781 \end_inset
24782
24783
24784 \end_layout
24785
24786 \begin_layout Standard
24787 \begin_inset Newpage newpage
24788 \end_inset
24789
24790
24791 \end_layout
24792
24793 \begin_layout Subsubsection
24794 Column Breaks
24795 \end_layout
24796
24797 \begin_layout Standard
24798 A column break can be forced by inserting the command 
24799 \series bold
24800
24801 \backslash
24802 columnbreak{}
24803 \series default
24804  as \SpecialChar TeX
24805  Code to that position in the text where the column should be broken.
24806  Note that this leads in most cases to whitespace in the text.
24807 \begin_inset Newline newline
24808 \end_inset
24809
24810 Here is an example:
24811 \end_layout
24812
24813 \begin_layout Standard
24814 \begin_inset Flex Multiple Columns
24815 status open
24816
24817 \begin_layout Plain Layout
24818
24819 \size small
24820 \begin_inset Quotes eld
24821 \end_inset
24822
24823 You're surprised to see me, sir,
24824 \begin_inset Quotes erd
24825 \end_inset
24826
24827  said he, in a strange, croaking voice.
24828 \end_layout
24829
24830 \begin_layout Plain Layout
24831
24832 \size small
24833 I acknowledged that I was.
24834 \end_layout
24835
24836 \begin_layout Plain Layout
24837
24838 \size small
24839 \begin_inset Quotes eld
24840 \end_inset
24841
24842 Well, I've a conscience, sir, and when I chanced to see you go into this
24843  house, as I came hobbling after you, I thought to myself, I'll just step
24844  in and see that kind gentleman, and tell him that if I was a bit gruff
24845  in my manner there was not any harm meant, and that I am much obliged to
24846  him for picking up my books.
24847 \begin_inset Quotes erd
24848 \end_inset
24849
24850
24851 \end_layout
24852
24853 \begin_layout Plain Layout
24854
24855 \size small
24856 \begin_inset Quotes eld
24857 \end_inset
24858
24859 You make too much of a trifle,
24860 \begin_inset Quotes erd
24861 \end_inset
24862
24863  said I.
24864  
24865 \begin_inset Quotes eld
24866 \end_inset
24867
24868 May I ask how you knew who I was?
24869 \begin_inset Quotes erd
24870 \end_inset
24871
24872  AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED.
24873 \begin_inset ERT
24874 status collapsed
24875
24876 \begin_layout Plain Layout
24877
24878
24879 \backslash
24880 columnbreak{}
24881 \end_layout
24882
24883 \end_inset
24884
24885
24886 \end_layout
24887
24888 \begin_layout Plain Layout
24889
24890 \size small
24891 \begin_inset Quotes eld
24892 \end_inset
24893
24894 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24895  you'll find my little bookshop at the corner of Church Street, and very
24896  happy to see you, I am sure.
24897  Maybe you collect yourself, sir.
24898  Here's 
24899 \noun on
24900 British
24901 \begin_inset space ~
24902 \end_inset
24903
24904 Birds
24905 \noun default
24906 , and 
24907 \noun on
24908 Catullus
24909 \noun default
24910 , and 
24911 \noun on
24912 The Holy War
24913 \noun default
24914 –a bargain, every one of them.
24915  With five volumes you could just fill that gap on that second shelf.
24916  It looks untidy, does it not, sir?
24917 \begin_inset Quotes erd
24918 \end_inset
24919
24920
24921 \end_layout
24922
24923 \end_inset
24924
24925
24926 \end_layout
24927
24928 \begin_layout Subsubsection
24929 Column Separation
24930 \end_layout
24931
24932 \begin_layout Standard
24933 The width of the columns is automatically calculated, but you can modify
24934  the space between the columns.
24935  This is done by changing the length 
24936 \series bold
24937
24938 \backslash
24939 columnsep
24940 \series default
24941 .
24942  Its predefined value is 10
24943 \begin_inset space \thinspace{}
24944 \end_inset
24945
24946 pt.
24947  Here is an example where 
24948 \series bold
24949
24950 \backslash
24951 columnsep
24952 \series default
24953  is set to 3
24954 \begin_inset space \thinspace{}
24955 \end_inset
24956
24957 cm:
24958 \end_layout
24959
24960 \begin_layout Standard
24961 \begin_inset ERT
24962 status open
24963
24964 \begin_layout Plain Layout
24965
24966
24967 \backslash
24968 setlength{
24969 \backslash
24970 columnsep}{3cm}
24971 \end_layout
24972
24973 \end_inset
24974
24975
24976 \end_layout
24977
24978 \begin_layout Standard
24979 \begin_inset Flex Multiple Columns
24980 status open
24981
24982 \begin_layout Plain Layout
24983
24984 \size small
24985 My observations of No.
24986 \begin_inset space \space{}
24987 \end_inset
24988
24989 427 Park Lane did little to clear up the problem in which I was interested.
24990  The house was separated from the street by a low wall and railing, the
24991  whole not more than five feet high.
24992  It was perfectly easy, therefore, for anyone to get into the garden, but
24993  the window was entirely inaccessible, since there was no water pipe or
24994  anything which could help the most active man to climb it.
24995  More puzzled than ever, I retraced my steps to Kensington.
24996  I had not been in my study five minutes when the maid entered to say that
24997  a person desired to see me.
24998  To my astonishment it was none other than my strange old book collector,
24999  his sharp, wizened face peering out from a frame of white hair, and his
25000  precious volumes, a dozen of them at least, wedged under his right arm.
25001 \end_layout
25002
25003 \end_inset
25004
25005
25006 \end_layout
25007
25008 \begin_layout Standard
25009 \begin_inset ERT
25010 status collapsed
25011
25012 \begin_layout Plain Layout
25013
25014
25015 \backslash
25016 setlength{
25017 \backslash
25018 columnsep}{10pt}
25019 \end_layout
25020
25021 \end_inset
25022
25023
25024 \begin_inset Note Note
25025 status collapsed
25026
25027 \begin_layout Plain Layout
25028 go back to the default
25029 \end_layout
25030
25031 \end_inset
25032
25033
25034 \end_layout
25035
25036 \begin_layout Subsubsection
25037 Vertical Lines
25038 \end_layout
25039
25040 \begin_layout Standard
25041 Between the columns a rule with a width of the length 
25042 \series bold
25043
25044 \backslash
25045 columnseprule
25046 \series default
25047  is placed.
25048  If this rule width is set to 0
25049 \begin_inset space \thinspace{}
25050 \end_inset
25051
25052 pt (this is the default), the rule is suppressed.
25053  In the following example the rule is 2
25054 \begin_inset space \thinspace{}
25055 \end_inset
25056
25057 pt wide:
25058 \end_layout
25059
25060 \begin_layout Standard
25061 \begin_inset ERT
25062 status open
25063
25064 \begin_layout Plain Layout
25065
25066
25067 \backslash
25068 setlength{
25069 \backslash
25070 columnseprule}{2pt}
25071 \end_layout
25072
25073 \end_inset
25074
25075
25076 \end_layout
25077
25078 \begin_layout Standard
25079 \begin_inset Flex Multiple Columns
25080 status open
25081
25082 \begin_layout Plain Layout
25083
25084 \size small
25085 \begin_inset Quotes eld
25086 \end_inset
25087
25088 You're surprised to see me, sir,
25089 \begin_inset Quotes erd
25090 \end_inset
25091
25092  said he, in a strange, croaking voice.
25093 \end_layout
25094
25095 \begin_layout Plain Layout
25096
25097 \size small
25098 I acknowledged that I was.
25099 \end_layout
25100
25101 \begin_layout Plain Layout
25102
25103 \size small
25104 \begin_inset Quotes eld
25105 \end_inset
25106
25107 Well, I've a conscience, sir, and when I chanced to see you go into this
25108  house, as I came hobbling after you, I thought to myself, I'll just step
25109  in and see that kind gentleman, and tell him that if I was a bit gruff
25110  in my manner there was not any harm meant, and that I am much obliged to
25111  him for picking up my books.
25112 \begin_inset Quotes erd
25113 \end_inset
25114
25115
25116 \end_layout
25117
25118 \begin_layout Plain Layout
25119
25120 \size small
25121 \begin_inset Quotes eld
25122 \end_inset
25123
25124 You make too much of a trifle,
25125 \begin_inset Quotes erd
25126 \end_inset
25127
25128  said I.
25129  
25130 \begin_inset Quotes eld
25131 \end_inset
25132
25133 May I ask how you knew who I was?
25134 \begin_inset Quotes erd
25135 \end_inset
25136
25137
25138 \end_layout
25139
25140 \begin_layout Plain Layout
25141
25142 \size small
25143 \begin_inset Quotes eld
25144 \end_inset
25145
25146 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
25147  you'll find my little bookshop at the corner of Church Street, and very
25148  happy to see you, I am sure.
25149  Maybe you collect yourself, sir.
25150  Here's 
25151 \noun on
25152 British
25153 \begin_inset space ~
25154 \end_inset
25155
25156 Birds
25157 \noun default
25158 , and 
25159 \noun on
25160 Catullus
25161 \noun default
25162 , and 
25163 \noun on
25164 The Holy War
25165 \noun default
25166 –a bargain, every one of them.
25167  With five volumes you could just fill that gap on that second shelf.
25168  It looks untidy, does it not, sir?
25169 \begin_inset Quotes erd
25170 \end_inset
25171
25172
25173 \end_layout
25174
25175 \end_inset
25176
25177
25178 \end_layout
25179
25180 \begin_layout Standard
25181 \begin_inset VSpace defskip
25182 \end_inset
25183
25184
25185 \end_layout
25186
25187 \begin_layout Standard
25188 The rule can be colored by redefining the command 
25189 \series bold
25190
25191 \backslash
25192 columnseprulecolor
25193 \series default
25194 .
25195  This is done by inserting the command
25196 \begin_inset Newline newline
25197 \end_inset
25198
25199
25200 \series bold
25201
25202 \backslash
25203 renewcommand{
25204 \backslash
25205 columnseprulecolor}{
25206 \backslash
25207 color{red}}
25208 \series default
25209
25210 \begin_inset Newline newline
25211 \end_inset
25212
25213 as \SpecialChar TeX
25214  Code before the multicolumn inset.
25215  Replace 
25216 \series bold
25217 red
25218 \series default
25219  in this command by a color of your choice.
25220  You can use all pre- and self-defined colors.
25221  See the 
25222 \emph on
25223 EmbeddedObjects
25224 \emph default
25225  manual, section 
25226 \emph on
25227 Colored
25228 \begin_inset space ~
25229 \end_inset
25230
25231 Tables
25232 \emph default
25233  for more information about pre- and self-defined colors.
25234  To go back to the default color insert the command
25235 \begin_inset Newline newline
25236 \end_inset
25237
25238
25239 \series bold
25240
25241 \backslash
25242 renewcommand{
25243 \backslash
25244 columnseprulecolor}{
25245 \backslash
25246 normalcolor}
25247 \series default
25248
25249 \begin_inset Newline newline
25250 \end_inset
25251
25252 Here is the example with a cyan rule and 1
25253 \begin_inset space \thinspace{}
25254 \end_inset
25255
25256 cm column separation:
25257 \end_layout
25258
25259 \begin_layout Standard
25260 \begin_inset ERT
25261 status open
25262
25263 \begin_layout Plain Layout
25264
25265
25266 \backslash
25267 setlength{
25268 \backslash
25269 columnsep}{1cm}
25270 \end_layout
25271
25272 \begin_layout Plain Layout
25273
25274
25275 \backslash
25276 renewcommand{
25277 \backslash
25278 columnseprulecolor}{
25279 \backslash
25280 color{cyan}}
25281 \end_layout
25282
25283 \end_inset
25284
25285
25286 \end_layout
25287
25288 \begin_layout Standard
25289 \begin_inset Flex Multiple Columns
25290 status open
25291
25292 \begin_layout Plain Layout
25293
25294 \size small
25295 \begin_inset Quotes eld
25296 \end_inset
25297
25298 You're surprised to see me, sir,
25299 \begin_inset Quotes erd
25300 \end_inset
25301
25302  said he, in a strange, croaking voice.
25303 \end_layout
25304
25305 \begin_layout Plain Layout
25306
25307 \size small
25308 I acknowledged that I was.
25309 \end_layout
25310
25311 \begin_layout Plain Layout
25312
25313 \size small
25314 \begin_inset Quotes eld
25315 \end_inset
25316
25317 Well, I've a conscience, sir, and when I chanced to see you go into this
25318  house, as I came hobbling after you, I thought to myself, I'll just step
25319  in and see that kind gentleman, and tell him that if I was a bit gruff
25320  in my manner there was not any harm meant, and that I am much obliged to
25321  him for picking up my books.
25322 \begin_inset Quotes erd
25323 \end_inset
25324
25325
25326 \end_layout
25327
25328 \begin_layout Plain Layout
25329
25330 \size small
25331 \begin_inset Quotes eld
25332 \end_inset
25333
25334 You make too much of a trifle,
25335 \begin_inset Quotes erd
25336 \end_inset
25337
25338  said I.
25339  
25340 \begin_inset Quotes eld
25341 \end_inset
25342
25343 May I ask how you knew who I was?
25344 \begin_inset Quotes erd
25345 \end_inset
25346
25347
25348 \end_layout
25349
25350 \begin_layout Plain Layout
25351
25352 \size small
25353 \begin_inset Quotes eld
25354 \end_inset
25355
25356 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
25357  you'll find my little bookshop at the corner of Church Street, and very
25358  happy to see you, I am sure.
25359  Maybe you collect yourself, sir.
25360  Here's 
25361 \noun on
25362 British
25363 \begin_inset space ~
25364 \end_inset
25365
25366 Birds
25367 \noun default
25368 , and 
25369 \noun on
25370 Catullus
25371 \noun default
25372 , and 
25373 \noun on
25374 The Holy War
25375 \noun default
25376 –a bargain, every one of them.
25377  With five volumes you could just fill that gap on that second shelf.
25378  It looks untidy, does it not, sir?
25379 \begin_inset Quotes erd
25380 \end_inset
25381
25382
25383 \end_layout
25384
25385 \end_inset
25386
25387
25388 \end_layout
25389
25390 \begin_layout Standard
25391 \begin_inset ERT
25392 status collapsed
25393
25394 \begin_layout Plain Layout
25395
25396
25397 \backslash
25398 setlength{
25399 \backslash
25400 columnseprule}{0pt}
25401 \end_layout
25402
25403 \begin_layout Plain Layout
25404
25405
25406 \backslash
25407 renewcommand{
25408 \backslash
25409 columnseprulecolor}{
25410 \backslash
25411 normalcolor}
25412 \end_layout
25413
25414 \end_inset
25415
25416
25417 \begin_inset Note Note
25418 status collapsed
25419
25420 \begin_layout Plain Layout
25421 go back to the default
25422 \end_layout
25423
25424 \end_inset
25425
25426
25427 \end_layout
25428
25429 \begin_layout Section
25430 Non-standard Paragraph Shapes
25431 \end_layout
25432
25433 \begin_layout Standard
25434 \noindent
25435 \SpecialChar LaTeX
25436  as well as any other text processor uses by default rectangular paragraphs.
25437  For special cases like for example posters, invitation cards or poems you
25438  can modify the paragraph shape to one of your choice.
25439  This can be done by using the \SpecialChar LaTeX
25440 -package 
25441 \series bold
25442 shapepar
25443 \series default
25444  which is loaded by using in the document settings the module 
25445 \family sans
25446 Custom paragraph shapes
25447 \family default
25448 .
25449 \end_layout
25450
25451 \begin_layout Subsection
25452 Predefined shapes
25453 \end_layout
25454
25455 \begin_layout Standard
25456
25457 \series bold
25458 shapepar
25459 \series default
25460  provides the following shapes:
25461 \end_layout
25462
25463 \begin_layout Standard
25464 \begin_inset Tabular
25465 <lyxtabular version="3" rows="13" columns="3">
25466 <features booktabs="true" islongtable="true" longtabularalignment="center">
25467 <column alignment="center" valignment="middle" width="16col%">
25468 <column alignment="center" valignment="middle" width="40col%">
25469 <column alignment="center" valignment="middle" width="35col%">
25470 <row endhead="true">
25471 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25472 \begin_inset Text
25473
25474 \begin_layout Plain Layout
25475 Name
25476 \end_layout
25477
25478 \end_inset
25479 </cell>
25480 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25481 \begin_inset Text
25482
25483 \begin_layout Plain Layout
25484 Description
25485 \end_layout
25486
25487 \end_inset
25488 </cell>
25489 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
25490 \begin_inset Text
25491
25492 \begin_layout Plain Layout
25493 Annotation
25494 \end_layout
25495
25496 \end_inset
25497 </cell>
25498 </row>
25499 <row>
25500 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25501 \begin_inset Text
25502
25503 \begin_layout Plain Layout
25504 CDlabel
25505 \end_layout
25506
25507 \end_inset
25508 </cell>
25509 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25510 \begin_inset Text
25511
25512 \begin_layout Plain Layout
25513 Circle with circular hole (in the size of a CD/DVD)
25514 \end_layout
25515
25516 \end_inset
25517 </cell>
25518 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25519 \begin_inset Text
25520
25521 \begin_layout Plain Layout
25522 Cannot be scaled, take care there is not too much text
25523 \end_layout
25524
25525 \end_inset
25526 </cell>
25527 </row>
25528 <row>
25529 <cell alignment="center" valignment="top" topline="true" usebox="none">
25530 \begin_inset Text
25531
25532 \begin_layout Plain Layout
25533 Circle
25534 \end_layout
25535
25536 \end_inset
25537 </cell>
25538 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25539 \begin_inset Text
25540
25541 \begin_layout Plain Layout
25542 Circle
25543 \end_layout
25544
25545 \end_inset
25546 </cell>
25547 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25548 \begin_inset Text
25549
25550 \begin_layout Plain Layout
25551 Fragile, calculation might fail
25552 \end_layout
25553
25554 \end_inset
25555 </cell>
25556 </row>
25557 <row>
25558 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25559 \begin_inset Text
25560
25561 \begin_layout Plain Layout
25562 Diamond
25563 \end_layout
25564
25565 \end_inset
25566 </cell>
25567 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25568 \begin_inset Text
25569
25570 \begin_layout Plain Layout
25571 Rhomboid (symbolizing a 
25572 \begin_inset Quotes eld
25573 \end_inset
25574
25575 diamond
25576 \begin_inset Quotes erd
25577 \end_inset
25578
25579 )
25580 \end_layout
25581
25582 \end_inset
25583 </cell>
25584 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25585 \begin_inset Text
25586
25587 \begin_layout Plain Layout
25588 -
25589 \end_layout
25590
25591 \end_inset
25592 </cell>
25593 </row>
25594 <row>
25595 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25596 \begin_inset Text
25597
25598 \begin_layout Plain Layout
25599 Heart
25600 \end_layout
25601
25602 \end_inset
25603 </cell>
25604 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25605 \begin_inset Text
25606
25607 \begin_layout Plain Layout
25608 Heart-like shape
25609 \end_layout
25610
25611 \end_inset
25612 </cell>
25613 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25614 \begin_inset Text
25615
25616 \begin_layout Plain Layout
25617 -
25618 \end_layout
25619
25620 \end_inset
25621 </cell>
25622 </row>
25623 <row>
25624 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25625 \begin_inset Text
25626
25627 \begin_layout Plain Layout
25628 Hexagon
25629 \end_layout
25630
25631 \end_inset
25632 </cell>
25633 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25634 \begin_inset Text
25635
25636 \begin_layout Plain Layout
25637 Hexagon
25638 \end_layout
25639
25640 \end_inset
25641 </cell>
25642 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25643 \begin_inset Text
25644
25645 \begin_layout Plain Layout
25646 -
25647 \end_layout
25648
25649 \end_inset
25650 </cell>
25651 </row>
25652 <row>
25653 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25654 \begin_inset Text
25655
25656 \begin_layout Plain Layout
25657 Nut
25658 \end_layout
25659
25660 \end_inset
25661 </cell>
25662 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25663 \begin_inset Text
25664
25665 \begin_layout Plain Layout
25666 Nut for bolt (hexagon with circular hole)
25667 \end_layout
25668
25669 \end_inset
25670 </cell>
25671 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25672 \begin_inset Text
25673
25674 \begin_layout Plain Layout
25675 -
25676 \end_layout
25677
25678 \end_inset
25679 </cell>
25680 </row>
25681 <row>
25682 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25683 \begin_inset Text
25684
25685 \begin_layout Plain Layout
25686 Square
25687 \end_layout
25688
25689 \end_inset
25690 </cell>
25691 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25692 \begin_inset Text
25693
25694 \begin_layout Plain Layout
25695 Square
25696 \end_layout
25697
25698 \end_inset
25699 </cell>
25700 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25701 \begin_inset Text
25702
25703 \begin_layout Plain Layout
25704 -
25705 \end_layout
25706
25707 \end_inset
25708 </cell>
25709 </row>
25710 <row>
25711 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25712 \begin_inset Text
25713
25714 \begin_layout Plain Layout
25715 Star
25716 \end_layout
25717
25718 \end_inset
25719 </cell>
25720 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25721 \begin_inset Text
25722
25723 \begin_layout Plain Layout
25724 Five-point star
25725 \end_layout
25726
25727 \end_inset
25728 </cell>
25729 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
25730 \begin_inset Text
25731
25732 \begin_layout Plain Layout
25733 -
25734 \end_layout
25735
25736 \end_inset
25737 </cell>
25738 </row>
25739 <row>
25740 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25741 \begin_inset Text
25742
25743 \begin_layout Plain Layout
25744 Candle
25745 \end_layout
25746
25747 \end_inset
25748 </cell>
25749 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25750 \begin_inset Text
25751
25752 \begin_layout Plain Layout
25753 Burning candle
25754 \end_layout
25755
25756 \end_inset
25757 </cell>
25758 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25759 \begin_inset Text
25760
25761 \begin_layout Plain Layout
25762 -
25763 \end_layout
25764
25765 \end_inset
25766 </cell>
25767 </row>
25768 <row>
25769 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25770 \begin_inset Text
25771
25772 \begin_layout Plain Layout
25773 Drop down/up
25774 \end_layout
25775
25776 \end_inset
25777 </cell>
25778 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25779 \begin_inset Text
25780
25781 \begin_layout Plain Layout
25782 Normal/reversed rain drop
25783 \end_layout
25784
25785 \end_inset
25786 </cell>
25787 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25788 \begin_inset Text
25789
25790 \begin_layout Plain Layout
25791 Fragile, calculation might fail
25792 \end_layout
25793
25794 \end_inset
25795 </cell>
25796 </row>
25797 <row>
25798 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25799 \begin_inset Text
25800
25801 \begin_layout Plain Layout
25802 \SpecialChar TeX
25803
25804 \end_layout
25805
25806 \end_inset
25807 </cell>
25808 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25809 \begin_inset Text
25810
25811 \begin_layout Plain Layout
25812 The \SpecialChar TeX
25813  logo
25814 \end_layout
25815
25816 \end_inset
25817 </cell>
25818 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25819 \begin_inset Text
25820
25821 \begin_layout Plain Layout
25822 -
25823 \end_layout
25824
25825 \end_inset
25826 </cell>
25827 </row>
25828 <row>
25829 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25830 \begin_inset Text
25831
25832 \begin_layout Plain Layout
25833 Triangle up/down/
25834 \begin_inset Newline newline
25835 \end_inset
25836
25837 left/right
25838 \end_layout
25839
25840 \end_inset
25841 </cell>
25842 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25843 \begin_inset Text
25844
25845 \begin_layout Plain Layout
25846 Triangles in different orientations
25847 \end_layout
25848
25849 \end_inset
25850 </cell>
25851 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
25852 \begin_inset Text
25853
25854 \begin_layout Plain Layout
25855 -
25856 \end_layout
25857
25858 \end_inset
25859 </cell>
25860 </row>
25861 </lyxtabular>
25862
25863 \end_inset
25864
25865
25866 \end_layout
25867
25868 \begin_layout Standard
25869 To use a shape for your paragraph, simply select it in \SpecialChar LyX
25870 's pull-down box
25871  for environments in the toolbar.
25872 \end_layout
25873
25874 \begin_layout Standard
25875 \begin_inset Newpage newpage
25876 \end_inset
25877
25878
25879 \end_layout
25880
25881 \begin_layout Standard
25882 Here is an example paragraph in the shape of a nut:
25883 \end_layout
25884
25885 \begin_layout Standard
25886 \begin_inset VSpace bigskip
25887 \end_inset
25888
25889
25890 \end_layout
25891
25892 \begin_layout Nut
25893
25894 \lang latin
25895 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25896  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25897  voluptua.
25898  At vero eos et accusam et justo duo dolores et ea rebum.
25899  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25900  sit amet.
25901  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25902  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25903  voluptua.
25904 \end_layout
25905
25906 \begin_layout Standard
25907 \begin_inset VSpace bigskip
25908 \end_inset
25909
25910
25911 \end_layout
25912
25913 \begin_layout Standard
25914 \begin_inset Note Greyedout
25915 status open
25916
25917 \begin_layout Plain Layout
25918
25919 \series bold
25920 Note
25921 \series default
25922 : shapepar paragraphs cannot run over a page break.
25923 \end_layout
25924
25925 \end_inset
25926
25927
25928 \end_layout
25929
25930 \begin_layout Standard
25931 \begin_inset VSpace bigskip
25932 \end_inset
25933
25934
25935 \end_layout
25936
25937 \begin_layout Standard
25938
25939 \series bold
25940 shapepar
25941 \series default
25942  takes care that the shape will always be preserved, no matter how much
25943  text is in the paragraph.
25944  Therefore the paragraph size changes with the amount of contained text.
25945  This can lead to paragraph sizes exceeding the page margins.
25946  To demonstrate the size scaling, here is the same example paragraph but
25947  with twice as much text:
25948 \end_layout
25949
25950 \begin_layout Standard
25951 \begin_inset Newpage newpage
25952 \end_inset
25953
25954
25955 \end_layout
25956
25957 \begin_layout Nut
25958
25959 \lang latin
25960 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25961  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25962  voluptua.
25963  At vero eos et accusam et justo duo dolores et ea rebum.
25964  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25965  sit amet.
25966  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25967  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25968  voluptua.
25969  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25970  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25971  voluptua.
25972  At vero eos et accusam et justo duo dolores et ea rebum.
25973  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25974  sit amet.
25975  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25976  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25977  voluptua.
25978 \end_layout
25979
25980 \begin_layout Standard
25981 \begin_inset VSpace bigskip
25982 \end_inset
25983
25984
25985 \end_layout
25986
25987 \begin_layout Standard
25988 An exception is the shape 
25989 \family sans
25990 CDlabel
25991 \family default
25992 .
25993  It cannot be scaled because it must fit the size of a CD/DVD.
25994  Therefore the amount of text that fits into the shape is limited.
25995 \begin_inset Newline newline
25996 \end_inset
25997
25998 The 
25999 \family sans
26000 drop
26001 \family default
26002  shapes and the 
26003 \family sans
26004 circle
26005 \family default
26006  shape are fragile, meaning that the calculation of their size can fail,
26007  depending on the amount of text.
26008  You will then get the \SpecialChar LaTeX
26009  error 
26010 \begin_inset Quotes eld
26011 \end_inset
26012
26013 Arithmetic overflow
26014 \begin_inset Quotes erd
26015 \end_inset
26016
26017 .
26018  In this case one can try to remove or add some text; if nothing works one
26019  has to use another shape.
26020 \end_layout
26021
26022 \begin_layout Standard
26023 \begin_inset VSpace bigskip
26024 \end_inset
26025
26026
26027 \end_layout
26028
26029 \begin_layout Standard
26030 For shapes with tips you will maybe see that \SpecialChar LaTeX
26031 's hyphenation routine fails
26032  for text in the tips.
26033  Therefore it is often necessary to add hyphenation points 
26034 \family sans
26035 (
26036 \begin_inset Info
26037 type  "shortcut"
26038 arg   "specialchar-insert hyphenation"
26039 \end_inset
26040
26041
26042 \family default
26043 ) to the corresponding text parts.
26044 \end_layout
26045
26046 \begin_layout Standard
26047 \begin_inset VSpace bigskip
26048 \end_inset
26049
26050
26051 \end_layout
26052
26053 \begin_layout Standard
26054 Shapepar paragraphs are either always centered or placed on the page so
26055  that their left border touches the left page margin.
26056  You can therefore not use the paragraph dialog to align such paragraphs.
26057  A solution is to put the paragraph into a minipage or parbox and align
26058  the box.
26059  The problem is hereby to find the right width for the box.
26060  Because if it is too wide and you center the box, the paragraph is not
26061  centered too because it sticks at the left side of the box.
26062  So you might have to play a bit with the width until it fits.
26063  Here are two heart-shaped paragraphs, the first one is not aligned, the
26064  second one is right-aligned:
26065 \end_layout
26066
26067 \begin_layout Standard
26068 \begin_inset Newpage newpage
26069 \end_inset
26070
26071
26072 \end_layout
26073
26074 \begin_layout Heart
26075 \noindent
26076
26077 \lang latin
26078 Lo\SpecialChar softhyphen
26079 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26080  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26081  voluptua.
26082  At vero eos et accusam et justo duo dolores et ea rebum.
26083  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26084  sit amet.
26085 \end_layout
26086
26087 \begin_layout Standard
26088 \begin_inset VSpace bigskip
26089 \end_inset
26090
26091
26092 \end_layout
26093
26094 \begin_layout Standard
26095 \noindent
26096 \align right
26097 \begin_inset Box Frameless
26098 position "t"
26099 hor_pos "c"
26100 has_inner_box 1
26101 inner_pos "t"
26102 use_parbox 1
26103 use_makebox 0
26104 width "42col%"
26105 special "none"
26106 height "1in"
26107 height_special "totalheight"
26108 thickness "0.4pt"
26109 separation "3pt"
26110 shadowsize "4pt"
26111 framecolor "black"
26112 backgroundcolor "none"
26113 status open
26114
26115 \begin_layout Heart
26116 \noindent
26117
26118 \lang latin
26119 Lo\SpecialChar softhyphen
26120 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26121  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26122  voluptua.
26123  At vero eos et accusam et justo duo dolores et ea rebum.
26124  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26125  sit amet.
26126 \end_layout
26127
26128 \end_inset
26129
26130
26131 \end_layout
26132
26133 \begin_layout Subsection
26134 Custom shapes
26135 \end_layout
26136
26137 \begin_layout Standard
26138 You can define any shape you want.
26139  Doing this manually is a lot of work because every coordinate must be specified.
26140  But there is a way to let the computer calculate the coordinates:
26141 \end_layout
26142
26143 \begin_layout Enumerate
26144 Install the program 
26145 \begin_inset CommandInset href
26146 LatexCommand href
26147 name "Jpgfdraw"
26148 target "http://www.ctan.org/tex-archive/graphics/jpgfdraw"
26149
26150 \end_inset
26151
26152 .
26153 \end_layout
26154
26155 \begin_layout Enumerate
26156 In 
26157 \family sans
26158 Jpgfdraw
26159 \family default
26160  go to the menu 
26161 \family sans
26162 TeX/LaTeX\SpecialChar menuseparator
26163 Settings\SpecialChar menuseparator
26164 Set Normal Size
26165 \family default
26166  and select the font size you are using in your document.
26167  For example this document uses the size 12
26168 \begin_inset space \thinspace{}
26169 \end_inset
26170
26171 pt.
26172 \end_layout
26173
26174 \begin_layout Enumerate
26175 Draw a shape.
26176 \end_layout
26177
26178 \begin_layout Enumerate
26179 Use the menu 
26180 \family sans
26181 TeX/LaTeX\SpecialChar menuseparator
26182 Shapepar
26183 \family default
26184  to export the shape to coordinates.
26185  In the appearing dialog use either the outline of your shape for the coordinate
26186 s or the path itself.
26187 \begin_inset Foot
26188 status collapsed
26189
26190 \begin_layout Plain Layout
26191 For more information see 
26192 \begin_inset CommandInset href
26193 LatexCommand href
26194 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
26195
26196 \end_inset
26197
26198
26199 \end_layout
26200
26201 \end_inset
26202
26203
26204 \end_layout
26205
26206 \begin_layout Standard
26207 The coordinates are written into a \SpecialChar TeX
26208  file.
26209  To use it for your \SpecialChar LyX
26210  document
26211 \end_layout
26212
26213 \begin_layout Enumerate
26214 Place the cursor before the first character of your paragraph (or into a
26215  new empty one).
26216 \end_layout
26217
26218 \begin_layout Enumerate
26219 Open in \SpecialChar LyX
26220  the menu 
26221 \family sans
26222 Insert\SpecialChar menuseparator
26223 File\SpecialChar menuseparator
26224 Child
26225 \begin_inset space ~
26226 \end_inset
26227
26228 Document
26229 \family default
26230 , select the file and use 
26231 \family sans
26232 Input
26233 \family default
26234  as 
26235 \family sans
26236 Include Type.
26237 \end_layout
26238
26239 \begin_layout Standard
26240 \begin_inset VSpace defskip
26241 \end_inset
26242
26243
26244 \end_layout
26245
26246 \begin_layout Standard
26247 \begin_inset Note Greyedout
26248 status open
26249
26250 \begin_layout Plain Layout
26251
26252 \series bold
26253 Note
26254 \series default
26255 : The changed shape only applies to the current paragraph; everything is
26256  reset to normal for the next paragraph.
26257  Therefore the shape definition file must be input into every paragraph
26258  with the desired shape.
26259 \end_layout
26260
26261 \end_inset
26262
26263
26264 \end_layout
26265
26266 \begin_layout Standard
26267 \begin_inset VSpace bigskip
26268 \end_inset
26269
26270
26271 \end_layout
26272
26273 \begin_layout Standard
26274 Here is an example:
26275 \end_layout
26276
26277 \begin_layout Standard
26278 \begin_inset VSpace bigskip
26279 \end_inset
26280
26281
26282 \end_layout
26283
26284 \begin_layout Standard
26285 \begin_inset CommandInset include
26286 LatexCommand input
26287 filename "SpecialParagraphShape.tex"
26288
26289 \end_inset
26290
26291
26292 \lang latin
26293 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26294  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26295  voluptua.
26296  At vero eos et accusam et justo duo dolores et ea rebum.
26297  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
26298  sit amet.
26299  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
26300  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
26301  voluptua.
26302 \end_layout
26303
26304 \begin_layout Standard
26305 \begin_inset VSpace bigskip
26306 \end_inset
26307
26308
26309 \end_layout
26310
26311 \begin_layout Standard
26312
26313 \series bold
26314 A tip:
26315 \series default
26316  to draw complexer shapes in 
26317 \family sans
26318 Jpgfdraw
26319 \family default
26320  you can draw the shape in a program of your choice and import the resulting
26321  image to 
26322 \family sans
26323 Jpgfdraw
26324 \family default
26325 .
26326  Then you only need to draw a line or spline along the outline of the image.
26327 \end_layout
26328
26329 \begin_layout Standard
26330 \begin_inset VSpace bigskip
26331 \end_inset
26332
26333
26334 \end_layout
26335
26336 \begin_layout Standard
26337 The module 
26338 \family sans
26339 Custom paragraph shapes
26340 \family default
26341  also provides the two commands 
26342 \family sans
26343 shapepar
26344 \family default
26345  and 
26346 \family sans
26347 Shapepar
26348 \family default
26349  which can be used to define custom shapes coordinate by coordinate.
26350 \begin_inset Foot
26351 status collapsed
26352
26353 \begin_layout Plain Layout
26354 These commands are internally used for all shapes described here.
26355 \end_layout
26356
26357 \end_inset
26358
26359  For information how these styles are used and about further customization
26360  possibilities, have a look at the documentation of the package 
26361 \series bold
26362 shapepar
26363 \series default
26364
26365 \begin_inset CommandInset citation
26366 LatexCommand cite
26367 key "shapepar"
26368
26369 \end_inset
26370
26371 .
26372 \end_layout
26373
26374 \begin_layout Bibliography
26375 \begin_inset CommandInset bibitem
26376 LatexCommand bibitem
26377 key "multicol"
26378
26379 \end_inset
26380
26381 Documentation of the \SpecialChar LaTeX
26382 -package 
26383 \begin_inset CommandInset href
26384 LatexCommand href
26385 name "multicol"
26386 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
26387
26388 \end_inset
26389
26390
26391 \end_layout
26392
26393 \begin_layout Bibliography
26394 \begin_inset CommandInset bibitem
26395 LatexCommand bibitem
26396 key "shapepar"
26397
26398 \end_inset
26399
26400 Documentation of the \SpecialChar LaTeX
26401 -package 
26402 \begin_inset CommandInset href
26403 LatexCommand href
26404 name "shapepar"
26405 target "http://mirrors.ctan.org/macros/latex/contrib/shapepar/shapepar.pdf"
26406
26407 \end_inset
26408
26409
26410 \end_layout
26411
26412 \end_body
26413 \end_document