1 #LyX 2.3 created this file. For more info see http://www.lyx.org/
5 \save_transient_properties true
6 \origin /systemlyxdir/doc/
9 % DO NOT ALTER THIS PREAMBLE!!!
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
18 % the pages of the TOC are numbered roman
19 % and a PDF-bookmark for the TOC is added
21 \let\myTOC\tableofcontents
22 \renewcommand{\tableofcontents}{%
23 \pdfbookmark[1]{\contentsname}{}
26 \pagenumbering{arabic}}
28 % extra space for tables
29 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
31 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
32 \use_default_options false
40 \maintain_unincluded_children false
42 \language_package default
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
53 \font_sf_scale 100 100
54 \font_tt_scale 100 100
57 \default_output_format pdf2
59 \bibtex_command default
60 \index_command default
64 \pdf_title "LyX's Additional Features manual"
65 \pdf_author "LyX Team"
66 \pdf_subject "LyX's additional features documentation"
67 \pdf_keywords "LyX, Documentation, Additional"
69 \pdf_bookmarksnumbered true
70 \pdf_bookmarksopen false
71 \pdf_bookmarksopenlevel 1
76 \pdf_pdfusetitle false
77 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
80 \use_package amsmath 1
81 \use_package amssymb 1
84 \use_package mathdots 1
85 \use_package mathtools 0
87 \use_package stackrel 0
88 \use_package stmaryrd 0
89 \use_package undertilde 0
91 \cite_engine_type default
95 \paperorientation portrait
99 \notefontcolor #0000ff
106 \paragraph_separation indent
107 \paragraph_indentation default
108 \quotes_language english
111 \paperpagestyle headings
112 \tracking_changes true
113 \output_changes false
117 \author 424524441 "rgheck"
118 \author 893223064 "John Robert Hudson" j.r.hudson@virginmedia.com
124 Additional \SpecialChar LyX
128 \begin_layout Subtitle
130 \change_inserted 424524441 1467174349
132 \change_deleted 424524441 1467174348
139 by the \SpecialChar LyX
144 \begin_layout Plain Layout
146 Principal maintainer of this file is
151 If you have comments or error corrections, please send them to the \SpecialChar LyX
154 \begin_inset Flex Code
157 \begin_layout Plain Layout
159 <lyx-docs@lists.lyx.org>
172 \begin_layout Standard
173 \begin_inset CommandInset toc
174 LatexCommand tableofcontents
181 \begin_layout Chapter
185 \begin_layout Standard
186 This manual is essentially Part II of the
188 User's Guide\SpecialChar endofsentence
191 The reason for separating the two documents is simple: the
195 is already quite lengthy, and it contains information on all of the basic
196 features one needs to know in order to prepare most documents.
197 However, the \SpecialChar LyX
198 Team has worked to make \SpecialChar LyX
199 extensible through various configuration
200 files and external packages.
201 That means that if you want to support the Fizzwizzle \SpecialChar LaTeX
203 create a layout file (or module) for it without having to alter \SpecialChar LyX
205 We've already had contributions of several new features this way, and some
206 of them are documented here.
207 There are also some more `advanced' features, such as how to control the
208 presentation of bibliographies and how to work with multi-part documents,
209 that are not covered in the
213 and are discussed here.
216 \begin_layout Standard
217 This manual also documents some special features, like fax support, version
218 control, and SGML support, which require additional software to work properly.
219 There is also a chapter on \SpecialChar LyX
221 And lastly, there's a chapter of \SpecialChar LaTeX
222 tools and tips, things you can use to
223 spruce up your documents by directly using the powerful features of \SpecialChar LaTeX
225 After all, \SpecialChar LyX
230 only WYSIWYM and will only ever interface to some, not all, \SpecialChar LaTeX
234 \begin_layout Standard
235 If you haven't read the
239 yet, you are definitely in the wrong manual.
244 is the first place to go, since it describes the notation and format of
246 You should also be thoroughly familiar with the
250 and all of the basic features of \SpecialChar LyX
251 before attempting to read this one.
254 \begin_layout Standard
255 Since many of the topics in this manual depend heavily on \SpecialChar LyX
257 with \SpecialChar LaTeX
258 , this first chapter covers the inner workings of \SpecialChar LyX
261 to generate exactly the \SpecialChar LaTeX
263 It is obviously for more seasoned \SpecialChar LyX
267 \begin_layout Chapter
269 and \SpecialChar LaTeX
273 \begin_layout Section
275 Uses \SpecialChar LaTeX
279 \begin_layout Standard
280 This chapter is for both \SpecialChar TeX
281 -nicians and the \SpecialChar LaTeX
283 In it, we'll explain how \SpecialChar LyX
284 and \SpecialChar LaTeX
285 work together to produce printable output.
286 This is the only place in any of the manuals where we assume you know something
287 about \SpecialChar LaTeX
291 \begin_layout Standard
292 At one time, \SpecialChar LyX
294 \begin_inset Quotes eld
297 WYSIWYM frontend to \SpecialChar LaTeX
299 \begin_inset Quotes erd
302 but that's no longer true.
303 There are frontends to \SpecialChar LaTeX
308 \begin_layout Plain Layout
309 Some familar ones are \SpecialChar TeX
310 maker and kile, on Linux, and \SpecialChar TeX
312 There are also the \SpecialChar LaTeX
313 modes for vi and emacs, of course.
318 These are basically text editors with the ability to run \SpecialChar LaTeX
320 errors in the file you're editing.
321 Although \SpecialChar LyX
330 run \SpecialChar LaTeX
331 , and it also indicates errors in the file, it also does much, much
333 For one thing, you don't need to know \SpecialChar LaTeX
334 to use \SpecialChar LyX
337 has added its own extensions to \SpecialChar LaTeX
339 Try the following sometime: select
340 \begin_inset Flex Noun
343 \begin_layout Plain Layout
344 Export\SpecialChar menuseparator
351 \begin_inset Flex Noun
354 \begin_layout Plain Layout
361 \begin_inset Flex Noun
364 \begin_layout Plain Layout
365 View\SpecialChar menuseparator
375 ), then look at the preamble of the resulting
376 \begin_inset Flex Code
379 \begin_layout Plain Layout
386 You'll notice a variety of new macros defined specifically by \SpecialChar LyX
388 These macros are defined automatically, according to the features you use
392 \begin_layout Standard
393 There are several commands that automatically invoke \SpecialChar LaTeX
398 \begin_layout Itemize
399 \begin_inset Flex Noun
402 \begin_layout Plain Layout
403 Document\SpecialChar menuseparator
412 \begin_layout Itemize
413 \begin_inset Flex Noun
416 \begin_layout Plain Layout
417 Document\SpecialChar menuseparator
426 \begin_layout Standard
427 They will only invoke \SpecialChar LaTeX
428 if the file has changed since the last time \SpecialChar LaTeX
434 \begin_layout Standard
435 When \SpecialChar LyX
436 runs \SpecialChar LaTeX
437 on the file you're editing, it performs these steps:
440 \begin_layout Enumerate
441 Convert the document to \SpecialChar LaTeX
442 and save to a file with the extension
443 \begin_inset Flex Code
446 \begin_layout Plain Layout
453 \begin_inset Flex Code
456 \begin_layout Plain Layout
465 \begin_layout Enumerate
466 Run \SpecialChar LaTeX
468 \begin_inset Flex Code
471 \begin_layout Plain Layout
477 file (maybe several times), and run any other commands (such as
478 \begin_inset Flex Code
481 \begin_layout Plain Layout
488 \begin_inset Flex Code
491 \begin_layout Plain Layout
497 ) needed to compile the \SpecialChar LaTeX
501 \begin_layout Enumerate
502 If there are any errors, show the error log.
505 \begin_layout Standard
506 If you have run \SpecialChar LaTeX
508 \begin_inset Flex Noun
511 \begin_layout Plain Layout
512 View\SpecialChar menuseparator
519 then runs a DVI viewer to display the DVI-file.
521 \begin_inset Flex Noun
524 \begin_layout Plain Layout
525 View\SpecialChar menuseparator
532 performs further steps:
535 \begin_layout Itemize
537 \begin_inset Flex Code
540 \begin_layout Plain Layout
546 to convert the DVI file to PostScript.
549 \begin_layout Itemize
550 Run a PostScript viewer, such as
551 \begin_inset Flex Code
554 \begin_layout Plain Layout
560 , to display the PostScript file.
563 \begin_layout Standard
565 does similar things when viewing, or exporting, other formats.
568 \begin_layout Section
569 Translating \SpecialChar LaTeX
570 files into \SpecialChar LyX
574 \begin_layout Standard
575 You can import a \SpecialChar LaTeX
576 file into \SpecialChar LyX
578 \begin_inset Flex Noun
581 \begin_layout Plain Layout
582 File\SpecialChar menuseparator
583 Import\SpecialChar menuseparator
589 command in \SpecialChar LyX
591 This will call a program named
592 \begin_inset Flex Code
595 \begin_layout Plain Layout
601 which will create a file
602 \begin_inset Flex Code
605 \begin_layout Plain Layout
612 \begin_inset Flex Code
615 \begin_layout Plain Layout
623 will then open that file.
627 \begin_layout Plain Layout
628 \begin_inset Flex Code
631 \begin_layout Plain Layout
637 can also be run from the command line, of course.
645 \begin_layout Standard
646 \begin_inset Flex Code
649 \begin_layout Plain Layout
655 will translate most legal \SpecialChar LaTeX
656 , but not everything.
657 It will put things it doesn't understand into \SpecialChar TeX
658 code, so after translating
660 \begin_inset Flex Code
663 \begin_layout Plain Layout
669 , you can look for \SpecialChar TeX
670 code and hand-edit it until it looks right.
673 \begin_layout Standard
674 If you don't know what \SpecialChar TeX
675 code is, read the next section.
678 \begin_layout Section
679 \begin_inset CommandInset label
681 name "sec:Inserting-TeX-Code"
685 Inserting \SpecialChar TeX
686 Code into \SpecialChar LyX
690 \begin_layout Standard
691 Anything you can do in \SpecialChar LaTeX
692 you can do in \SpecialChar LyX
693 , for a very simple reason: You can
694 always insert \SpecialChar TeX
695 code into any \SpecialChar LyX
698 cannot, and will never be able to, display every possible \SpecialChar LaTeX
700 If ever you need to insert \SpecialChar LaTeX
701 commands into your \SpecialChar LyX
702 document, you can use the
704 \begin_inset Flex Code
707 \begin_layout Plain Layout
714 box, which you can insert into your document with
715 \begin_inset Flex Noun
718 \begin_layout Plain Layout
719 Insert\SpecialChar menuseparator
729 or the keyboard shortcut
738 \begin_layout Standard
739 Here's an example of inserting \SpecialChar LaTeX
740 commands in a \SpecialChar LyX
742 The code looks like this:
745 \begin_layout LyX-Code
749 \begin_inset Newline newline
755 \begin_inset Newline newline
758 This is an example of a minipage environment.
760 \begin_inset Newline newline
763 can put nearly everything in it, even (non-floating)
764 \begin_inset Newline newline
769 \begin_inset Newline newline
775 \begin_inset Newline newline
779 \begin_inset Newline newline
785 \begin_inset Newline newline
791 \begin_inset Newline newline
797 \begin_inset Newline newline
802 \begin_inset Newline newline
808 \begin_inset Newline newline
814 \begin_inset Newline newline
820 \begin_inset Newline newline
828 \begin_layout LyX-Code
832 \begin_layout Standard
834 \begin_inset Flex Code
837 \begin_layout Plain Layout
844 box containing this text is directly after this paragraph.
845 Those of you reading the manual in \SpecialChar LyX
846 will only see the \SpecialChar TeX
848 Those reading a printed version of the manuals will see the actual results:
849 \begin_inset VSpace bigskip
855 \begin_layout Standard
859 \begin_layout Plain Layout
866 \begin_layout Plain Layout
873 \begin_layout Plain Layout
875 This is an example of a minipage environment.
876 You can put nearly everything in it, even (non-floating) figures and tables.
880 \begin_layout Plain Layout
887 \begin_layout Plain Layout
892 \begin_layout Plain Layout
899 \begin_layout Plain Layout
906 \begin_layout Plain Layout
913 \begin_layout Plain Layout
919 \begin_layout Plain Layout
926 \begin_layout Plain Layout
933 \begin_layout Plain Layout
940 \begin_layout Plain Layout
950 \begin_inset VSpace bigskip
956 \begin_layout Standard
957 In addition to using \SpecialChar TeX
958 code, you can also create a separate file containing
959 some complex \SpecialChar LaTeX
960 structure and then use
961 \begin_inset Flex Noun
964 \begin_layout Plain Layout
965 Insert\SpecialChar menuseparator
975 to include your file (you should select the type
976 \begin_inset Flex Code
979 \begin_layout Plain Layout
986 We recommend that you only do this if you have a
987 \begin_inset Flex Code
990 \begin_layout Plain Layout
1001 Otherwise, you'll have a big job tracking down \SpecialChar LaTeX
1005 \begin_layout Standard
1006 There are a few last points to emphasize:
1009 \begin_layout Itemize
1015 check if your \SpecialChar LaTeX
1019 \begin_layout Itemize
1020 Beware of reinventing the wheel.
1023 \begin_layout Standard
1024 On that last point, \SpecialChar LyX
1025 does have quite a few features tucked into it, and
1027 Be sure to check the manuals to make sure that \SpecialChar LyX
1028 doesn't have such-and-such
1029 feature before you decide you have to do it by hand.
1030 Moreover, there are numerous \SpecialChar LaTeX
1031 packages out there to do all sorts of things,
1032 from labels to envelopes to fancy multipage tables.
1034 \begin_inset CommandInset href
1037 target "http://www.ctan.org/"
1044 \begin_layout Standard
1045 If you do need to do some wild and fancy things within your document, be
1046 sure to check out a good \SpecialChar LaTeX
1047 book for assistance.
1048 There are a number of them listed in the bibliography of the
1055 \begin_layout Section
1057 and the \SpecialChar LaTeX
1061 \begin_layout Subsection
1062 About the \SpecialChar LaTeX
1066 \begin_layout Standard
1067 If you already know \SpecialChar LaTeX
1068 , there is no need to explain here what the preamble
1070 If you don't, the following will give you some ideas—we recommend again
1071 that you consult a \SpecialChar LaTeX
1072 book for further information.
1073 In any case, you should read the points below, because they explain what
1074 you can do and what you don't need to do in the \SpecialChar LaTeX
1075 preamble of a \SpecialChar LyX
1079 \begin_layout Standard
1080 The \SpecialChar LaTeX
1081 preamble comes at the very beginning of a document,
1089 \begin_layout Itemize
1090 Declare the document class.
1092 \begin_inset Newline newline
1096 already does this for you.
1097 If you're a seasoned \SpecialChar LaTeX
1098 -nician, and you have a custom document class you
1099 want to use, check out the
1101 Customization Manual
1103 for information on how to make \SpecialChar LyX
1107 \begin_layout Itemize
1108 Declare the usage of packages.
1110 \begin_inset Newline newline
1114 packages provide special commands, which are only available within a document
1115 when the package has been declared in the preamble.
1116 In addition to providing special commands, the inclusion of a package can
1117 change the document.
1118 For example, the package
1119 \begin_inset Flex Code
1122 \begin_layout Plain Layout
1128 forces all paragraphs to be indented.
1129 There are other packages for labels, envelopes, margins, etc.
1133 \begin_layout Itemize
1134 Set counters, variables, lengths and widths.
1136 \begin_inset Newline newline
1139 There are several \SpecialChar LaTeX
1140 counters and variables that
1144 be set globally from within the preamble in order to have the desired effect.
1145 (There are variables that you can set and reset inside the document, too.)
1146 Margins are a good example of something that must be set in the preamble.
1147 Another example is the label format for lists.
1148 You can actually set these just about anywhere, but it's best to do it
1149 just once, inside the preamble.
1152 \begin_layout Itemize
1153 Declare user defined commands (with
1154 \begin_inset Flex Code
1157 \begin_layout Plain Layout
1166 \begin_inset Flex Code
1169 \begin_layout Plain Layout
1178 \begin_inset Newline newline
1181 These are abbreviations for \SpecialChar LaTeX
1182 commands which appear very often inside a document.
1183 Although the preamble is a good place to declare such commands, they
1187 be declared anywhere (before they are used for the first time, of course).
1188 This can be useful if there is a lot of raw \SpecialChar LaTeX
1189 code in your document, which
1190 normally should not be the case.
1193 \begin_layout Standard
1195 adds its own set of definitions to the preamble of the
1196 \begin_inset Flex Code
1199 \begin_layout Plain Layout
1206 This makes \SpecialChar LaTeX
1207 files generated by \SpecialChar LyX
1211 \begin_layout Subsection
1212 Changing the Preamble
1215 \begin_layout Standard
1216 The commands which \SpecialChar LyX
1217 adds to the preamble of a \SpecialChar LaTeX
1218 file are fixed; you can't
1219 change them without patching \SpecialChar LyX
1221 You can, however, add your own stuff to the preamble by selecting
1222 \begin_inset Flex Noun
1225 \begin_layout Plain Layout
1228 \begin_inset space ~
1237 \begin_inset Flex Noun
1240 \begin_layout Plain Layout
1241 Document\SpecialChar menuseparator
1249 adds anything in the
1250 \begin_inset Flex Noun
1253 \begin_layout Plain Layout
1259 dialog to its own built-in preamble.
1260 Before adding your own declarations in the preamble, you should make sure
1261 that \SpecialChar LyX
1262 doesn't already support what you want to do.
1263 (Remember what we said about reinventing the wheel?) Also,
1265 make sure your preamble code is correct
1269 doesn't check it for you.
1270 If there is an error, you're likely to get an error like
1271 \begin_inset Quotes eld
1275 \begin_inset Flex Code
1278 \begin_layout Plain Layout
1287 \begin_inset Quotes erd
1291 If you see this error, check your preamble.
1294 \begin_layout Subsection
1298 \begin_layout Standard
1299 Here are some examples of what you can add to a preamble, and what they
1303 \begin_layout Subsubsection
1307 \begin_layout Standard
1308 There are two variables under \SpecialChar LaTeX
1309 that control page position:
1310 \begin_inset Flex Code
1313 \begin_layout Plain Layout
1322 \begin_inset Flex Code
1325 \begin_layout Plain Layout
1334 Their names should be self-explanatory.
1335 These variables are useful if you think for a moment about computer labels.
1336 Sometimes, the size of a print medium and the area of the medium that you
1337 can actually print on aren't the same.
1339 \begin_inset Flex Code
1342 \begin_layout Plain Layout
1351 \begin_inset Flex Code
1354 \begin_layout Plain Layout
1365 \begin_layout Standard
1366 The default values for
1367 \begin_inset Flex Code
1370 \begin_layout Plain Layout
1379 \begin_inset Flex Code
1382 \begin_layout Plain Layout
1391 \begin_inset space \thinspace{}
1395 \begin_inset space \thinspace{}
1399 \begin_inset space \space{}
1402 the page isn't shifted.
1403 Unfortunately, some DVI drivers always seem to shift the page.
1404 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1405 If you're using \SpecialChar LyX
1406 on a system that you don't personally maintain, and your
1407 sysadmin is a doofus,
1408 \begin_inset Flex Code
1411 \begin_layout Plain Layout
1420 \begin_inset Flex Code
1423 \begin_layout Plain Layout
1432 Suppose your left and top margins are always 0.5
1433 \begin_inset space \thinspace{}
1437 You can add this to the preamble:
1440 \begin_layout LyX-Code
1448 \begin_layout LyX-Code
1456 \begin_layout Standard
1457 and your margins should now be correct.
1460 \begin_layout Subsubsection
1464 \begin_layout Standard
1465 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1466 There's a rather nice package, available at your nearest CTAN archive,
1467 for printing sheets of labels:
1468 \begin_inset Flex Code
1471 \begin_layout Plain Layout
1478 Now, your system may not have this package installed by default.
1479 We leave that up to you to check.
1480 You'll also want to read the documentation for it; we're not going to do
1482 Since this is an example, however, we'll give you an example of how you
1486 \begin_layout Standard
1487 First, make sure you're using the
1488 \begin_inset Flex Code
1491 \begin_layout Plain Layout
1498 Next, you need to put the following in your preamble:
1501 \begin_layout LyX-Code
1507 \begin_layout LyX-Code
1513 \begin_layout LyX-Code
1519 \begin_layout LyX-Code
1525 \begin_layout LyX-Code
1531 \begin_layout LyX-Code
1537 \begin_layout LyX-Code
1543 \begin_layout Standard
1544 This sets things up for Avery label sheets, stock #5360.
1545 You're now ready to print labels, but you'll need to insert \SpecialChar LaTeX
1548 \begin_inset Flex Code
1551 \begin_layout Plain Layout
1560 \begin_inset Flex Code
1563 \begin_layout Plain Layout
1571 around each label text.
1572 This and other special features of
1573 \begin_inset Flex Code
1576 \begin_layout Plain Layout
1582 are explained in its documentation.
1585 \begin_layout Standard
1586 Someday, someone may write a \SpecialChar LyX
1587 layout file to support this package directly.
1588 Maybe that someone is you.
1591 \begin_layout Subsubsection
1592 Example #3: Paragraph Indentation
1595 \begin_layout Standard
1596 Americans are trained to indent the first line of
1601 As with all of their other weird quirks, most Americans will whine and
1602 moan until they can have their way and indent the first line of all paragraphs.
1611 \begin_layout Standard
1612 Of course, this behavior isn't standard typography.
1613 In books, you typically only indent the first line of a paragraph
1617 it follows another one.
1618 The idea behind indenting the first line of a paragraph is to distinguish
1619 neighboring paragraphs from one another.
1620 If there is no previous paragraph—for example, if it follows a figure or
1621 is the first paragraph in a section—then there is no need for indentation.
1625 \begin_layout Standard
1626 If you're a typical American (we're still joking!), though, you don't care
1627 about such esoteric things; you want your indentation! Add this to the
1631 \begin_layout LyX-Code
1634 usepackage{indentfirst}
1637 \begin_layout Standard
1638 If your \SpecialChar TeX
1639 distribution isn't braindead, you'll have this package, and all
1640 of your paragraphs will get the indentation the Founding Fathers intended
1644 \begin_layout Subsubsection
1645 Example #4: This Document
1648 \begin_layout Standard
1649 You can also check out the preamble of this document to get an idea of some
1650 of the advanced things you can do.
1653 \begin_layout Section
1655 and \SpecialChar LaTeX
1659 \begin_layout Standard
1660 When \SpecialChar LyX
1661 calls \SpecialChar LaTeX
1662 , it tells \SpecialChar LaTeX
1663 to blithely ignore any errors and keep going.
1664 It then uses the logfile from the \SpecialChar LaTeX
1665 run to do a post-mortem.
1666 After analyzing the logfile, \SpecialChar LyX
1667 displays a dialog listing the errors.
1668 Clicking on any one of them will take you to the position in your \SpecialChar LyX
1670 where the error occurred.
1674 \begin_layout Plain Layout
1676 Analyzing the logfile is a tough job, and \SpecialChar LyX
1677 doesn't always go to the right
1679 There are also cases where \SpecialChar LaTeX
1680 reports the error on one line, but the actual
1682 This is not unlike forgetting a closing brace in a program: You'll get
1683 an error, but only later.
1691 \begin_layout Standard
1692 Some folks also like to look at the log file directly: It is available from
1694 \begin_inset Flex Noun
1697 \begin_layout Plain Layout
1698 Document\SpecialChar menuseparator
1700 \begin_inset space ~
1709 There are some fairly common error messages and warnings.
1710 We'll cover those here.
1711 You should look at a good \SpecialChar LaTeX
1712 book for a complete listing.
1715 \begin_layout Itemize
1716 \begin_inset Flex Code
1719 \begin_layout Plain Layout
1726 \begin_inset Newline newline
1729 Anything beginning with these words is a warning message for the purpose
1731 \begin_inset Quotes eld
1735 \begin_inset Quotes erd
1738 the \SpecialChar LaTeX
1740 You'll get messages like this if you added or changed cross-references
1741 or bibliography entries, in which case, \SpecialChar LaTeX
1742 is trying to tell you that you
1743 need to make another run.
1744 You can by-and-large ignore these.
1747 \begin_layout Itemize
1748 \begin_inset Flex Code
1751 \begin_layout Plain Layout
1758 \begin_inset Newline newline
1761 Another warning message, this time about fonts which \SpecialChar LaTeX
1763 The rest of the message will often say something about a replacement font
1764 that \SpecialChar LaTeX
1766 You can safely ignore these, too.
1769 \begin_layout Itemize
1770 \begin_inset Flex Code
1773 \begin_layout Plain Layout
1782 \begin_inset Newline newline
1791 They are warnings about lines that were too long and run past the right
1793 Almost always, this is unnoticeable in the final output.
1794 (It can be just a point or two.) Or, only one or two characters extend past
1797 seems to generate at least one of these messages for just about any document
1799 \begin_inset Newline newline
1802 You can ignore these messages.
1803 Your eyes will tell you if there's a problem with something that's too
1804 wide; just look at the output.
1808 \begin_layout Plain Layout
1809 You can also enable the `draft' option in
1810 \begin_inset Flex Noun
1813 \begin_layout Plain Layout
1814 Document\SpecialChar menuseparator
1820 , and then \SpecialChar LaTeX
1821 will draw a black box in the margin of lines that are overfull.
1829 \begin_layout Itemize
1830 \begin_inset Flex Code
1833 \begin_layout Plain Layout
1842 \begin_inset Newline newline
1845 Not quite as common as its cousin.
1847 seems to like to print lines that are a bit too wide as opposed to ones
1848 that are a bit too narrow.
1849 We have no idea why.
1852 \begin_layout Itemize
1853 \begin_inset Flex Code
1856 \begin_layout Plain Layout
1865 \begin_inset Flex Code
1868 \begin_layout Plain Layout
1877 \begin_inset Newline newline
1880 Warnings about troubles breaking the page.
1881 Once again, just look at the output.
1882 Your eyes will tell you where something has gone wrong.
1885 \begin_layout Itemize
1886 \begin_inset Flex Code
1889 \begin_layout Plain Layout
1891 \begin_inset Quotes els
1895 \begin_inset Quotes ers
1904 \begin_inset Newline newline
1908 \begin_inset Quotes eld
1912 \begin_inset Quotes erd
1915 isn't installed on this system.
1916 This usually appears because some package your document needs isn't installed.
1917 If you didn't touch the preamble or didn't use the
1918 \begin_inset Flex Code
1921 \begin_layout Plain Layout
1929 command, then one of the packages \SpecialChar LyX
1930 tried to load is missing.
1932 \begin_inset Flex Noun
1935 \begin_layout Plain Layout
1936 Help\SpecialChar menuseparator
1943 to get a list of packages that \SpecialChar LyX
1945 This file is updated whenever you reconfigure \SpecialChar LyX
1947 \begin_inset Flex Noun
1950 \begin_layout Plain Layout
1951 Tools\SpecialChar menuseparator
1957 ) and tells you which packages have been detected and what they do.
1958 \begin_inset Newline newline
1962 \begin_inset Flex Code
1965 \begin_layout Plain Layout
1973 command and the package in question isn't installed, then you'll need to
1974 install it yourself.
1977 \begin_layout Itemize
1978 \begin_inset Flex Code
1981 \begin_layout Plain Layout
1982 LaTeX Error: Unknown option
1988 \begin_inset Newline newline
1991 Error messages beginning with this are trying to tell you that you specified
1992 a bad or undefined option to a package.
1993 Check the package's documentation.
1996 \begin_layout Itemize
1997 \begin_inset Flex Code
2000 \begin_layout Plain Layout
2001 Undefined control sequence
2007 \begin_inset Newline newline
2010 If you've inserted \SpecialChar LaTeX
2011 code into your document, but made a typo, you'll get
2013 You may have forgotten to load a package.
2014 In any case, this error message usually means that you used an undefined
2019 \begin_layout Standard
2020 There are other error and warning messages.
2021 Some are self-explanatory.
2022 These are usually \SpecialChar LaTeX
2024 Others are downright cryptic.
2025 These are usually \SpecialChar TeX
2026 error messages, and we really have
2030 what they mean or how to decipher them.
2034 \begin_layout Standard
2035 There's a general sequence you should follow if you get error messages:
2038 \begin_layout Enumerate
2039 Look at the \SpecialChar LaTeX
2040 code you inserted for typos.
2043 \begin_layout Enumerate
2044 If there are no typos, check that you used the command(s) correctly.
2047 \begin_layout Enumerate
2048 If you get a bunch of error boxes piled up at the very top of the document—and
2049 especially if you see a
2050 \begin_inset Quotes eld
2054 \begin_inset Flex Code
2057 \begin_layout Plain Layout
2066 \begin_inset Quotes erd
2069 error—it means that there are errors in the preamble.
2070 Start debugging your preamble.
2073 \begin_layout Enumerate
2074 If you didn't add anything to the preamble and didn't add any \SpecialChar LaTeX
2076 document, the first suspect is your \SpecialChar LaTeX
2077 distribution itself.
2078 Check for missing packages and install them.
2081 \begin_layout Enumerate
2082 Okay, so there are no missing packages.
2083 Did you use any of the fine-tuning options in \SpecialChar LyX
2084 ? Specifically, did you
2088 any of them, like trying to manually insert lots of
2089 \begin_inset Flex Code
2092 \begin_layout Plain Layout
2094 \begin_inset space ~
2103 \begin_inset Flex Code
2106 \begin_layout Plain Layout
2113 \begin_inset Flex Code
2116 \begin_layout Plain Layout
2122 ? Did you try to kludge something together with these instead of using the
2123 appropriate paragraph environment?
2126 \begin_layout Enumerate
2127 All right, you didn't use any of the fine-tuning options, you played by
2129 Did you try to pull a fancy maneuver? Did you do something funky inside
2130 a table or an equation, like inserting a graphic into a table cell?
2133 \begin_layout Enumerate
2134 Do you have long sections of text where \SpecialChar LaTeX
2135 cannot find a place to break a
2136 line? By default, \SpecialChar LaTeX
2137 is rather strict about how much extra inter-word spacing
2138 it will add in order to break a line.
2139 Preferably, you should rework the paragraph to avoid the problem.
2142 \begin_layout Enumerate
2143 Did you go overboard with the nesting? \SpecialChar LyX
2144 (currently) doesn't check to make
2145 sure you're in the limits for nesting environments.
2146 If you nested a bunch of environments to the
2147 \begin_inset Formula $17^{\mathrm{th}}$
2150 level, that's the problem.
2151 (The limit in \SpecialChar LaTeX
2155 \begin_layout Enumerate
2156 Okay, you didn't get any error messages, but your output looks awful.
2157 If you have a table or figure that's too wide or long for the page, you
2159 \begin_inset Separator latexpar
2166 \begin_layout Enumerate
2167 rescale the figure so it fits.
2170 \begin_layout Enumerate
2171 trim down the table so it fits.
2175 \begin_layout Enumerate
2176 If something else is wrong with the output, and you didn't try to pull anything
2177 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2180 \begin_layout Standard
2181 If all this doesn't help—well, then
2185 you might have found a bug in \SpecialChar LyX
2190 \begin_layout Chapter
2192 \change_inserted 893223064 1464851738
2196 \begin_layout Standard
2198 \change_inserted 893223064 1464852146
2199 This section will be updated in due course.
2202 \begin_layout Standard
2203 Special Document Classes
2206 \begin_layout Section
2210 \begin_layout Standard
2216 \begin_layout Subsection
2220 \begin_layout Standard
2221 This section describes how \SpecialChar LyX
2222 can be used to write articles for submission
2223 to the scientific journal
2225 Astronomy and Astrophysics
2228 \begin_inset Flex URL
2231 \begin_layout Plain Layout
2233 http://www.edpsciences.fr/aa/
2238 ) using Version 5.01 of the document class
2243 This package can be downloaded from the ftp site
2246 \begin_layout Standard
2247 \begin_inset VSpace medskip
2253 \begin_layout Standard
2255 \begin_inset Flex URL
2258 \begin_layout Plain Layout
2260 ftp://ftp.edpsciences.org/pub/aa/readme.html
2268 \begin_layout Standard
2269 \begin_inset VSpace medskip
2275 \begin_layout Standard
2276 A manual comes together with that package, and this text is not meant to
2277 replace the original manual but is merely a short guide in how to realize
2278 the correct form of your paper.
2282 \begin_layout Standard
2283 Please note that the publisher of the journal was changed from Springer
2284 to EDP Sciences starting January 1, 2001.
2285 That change involved also some slight changes to the style files, namely
2286 the removal of the thesaurus command.
2287 The \SpecialChar LyX
2288 class aa supports the newest version of these style files, V 5.01.
2289 If you have an older version installed, please upgrade.
2290 For compatibility, the old (version 4) layout has been kept as
2295 Please refer to the comments in
2298 Dir/layouts/aapaper.layout
2303 \begin_layout Subsection
2307 \begin_layout Standard
2308 It is recommended you start from the example template distributed with \SpecialChar LyX
2310 If you are not using a template, note the following settings:
2313 \begin_layout Itemize
2320 Document\SpecialChar menuseparator
2323 dialog (OK, that one was obvious).
2326 \begin_layout Itemize
2327 Don't change the option
2330 \begin_inset space ~
2340 The whole layout is done by the macros, you shouldn't change anything.
2343 \begin_layout Subsection
2347 \begin_layout Standard
2348 First thing to enter is the header information.
2349 It consists of seven entries, of which some are optional.
2353 \begin_layout Itemize
2361 \begin_layout Itemize
2369 \begin_layout Itemize
2377 \begin_layout Itemize
2385 \begin_layout Itemize
2390 : [optional] if more than one author: whom to contact for offprint requests.
2393 \begin_layout Itemize
2398 : [optional] mail address for contacts.
2401 \begin_layout Itemize
2409 Received: <date>; Accepted <date>
2412 \begin_layout Standard
2413 There is no need to issue the
2419 command, this is done automatically by \SpecialChar LyX
2420 when the header is finished.
2421 Although the order of the single header entries doesn't matter it is advised
2422 to keep the above sequence, just to get the best optics and meets the layout
2423 of the real document.
2426 \begin_layout Standard
2427 If you want to place footnotes in the header block, e.
2428 \begin_inset space \thinspace{}
2432 \begin_inset space \space{}
2435 to state your present address, just use the standard footnote via the menu
2438 Insert\SpecialChar menuseparator
2443 will automagically use the term
2452 \begin_layout Standard
2453 In addition to these topics, the macros use three additional \SpecialChar LaTeX
2455 have no counterpart in \SpecialChar LyX
2459 \begin_layout Itemize
2466 to separate different names for more than one author and institute, respectivel
2470 \begin_layout Itemize
2477 to mark corresponding author/institute pairs.
2478 The institutes are numbered sequentially as they appear in the
2482 field, so you have to put a marker to each author.
2485 \begin_layout Itemize
2492 to supply an email address for fast contact.
2495 \begin_layout Standard
2496 In all cases, the appropriate command has to be entered in \SpecialChar LyX
2504 \begin_layout Subsection
2508 \begin_layout Standard
2509 The abstract should immediately follow the header block.
2510 With version 5 the abstract environment was changed to a command, and there
2511 is now a resctriction to only one paragraph.
2512 In addition, it should contain an entry with the keywords.
2513 This is not yet implemented for \SpecialChar LyX
2514 , therefore you have to enter the \SpecialChar LaTeX
2522 by hand and mark it as \SpecialChar LaTeX
2524 Refer to the example paper.
2527 \begin_layout Subsection
2528 Supported environments
2531 \begin_layout Standard
2532 The A&A paper layout supports the following environments for structuring
2536 \begin_layout Itemize
2542 \begin_layout Itemize
2548 \begin_layout Itemize
2554 \begin_layout Itemize
2560 \begin_layout Itemize
2566 \begin_layout Itemize
2572 \begin_layout Itemize
2578 \begin_layout Itemize
2584 \begin_layout Itemize
2590 \begin_layout Itemize
2596 \begin_layout Itemize
2602 \begin_layout Itemize
2609 \begin_layout Subsection
2610 Commands not supported by \SpecialChar LyX
2614 \begin_layout Standard
2615 Some commands are not yet supported by the
2619 layout for \SpecialChar LyX
2621 Some have already been mentioned.
2622 For the sake of completeness, they are listed all together here:
2625 \begin_layout Itemize
2633 \begin_layout Itemize
2641 \begin_layout Itemize
2649 \begin_layout Itemize
2657 \begin_layout Itemize
2665 \begin_layout Itemize
2673 \begin_layout Itemize
2681 \begin_layout Itemize
2689 \begin_layout Standard
2690 If you want to use any of these commands, you have to enter them yourself.
2693 Do not forget to mark them as \SpecialChar LaTeX
2697 \begin_layout Subsection
2698 Figure and Table Floats
2701 \begin_layout Standard
2703 provides support for the necessary float environments
2705 figure, figure*, table
2711 , therefore we won't tell much about it here.
2715 \begin_inset space ~
2721 Just remember that tables should be left-aligned.
2722 For that, select the table and change the alignment in
2724 Edit\SpecialChar menuseparator
2726 \begin_inset space ~
2732 \begin_layout Standard
2733 There is only one special thing: the figures with caption besides the figure.
2734 To create such a figure, you have to do the following:
2737 \begin_layout Enumerate
2738 Create a wide figure float:
2740 Insert\SpecialChar menuseparator
2741 Float\SpecialChar menuseparator
2744 , then right click in the figure and select
2747 \begin_inset space ~
2755 \begin_layout Enumerate
2756 Enter your caption text.
2759 \begin_layout Enumerate
2764 to move the cursor above the caption.
2767 \begin_layout Enumerate
2771 \begin_layout Enumerate
2772 Position the cursor behind the figure and insert a horizontal fill:
2774 Insert\SpecialChar menuseparator
2776 \begin_inset space ~
2779 Character\SpecialChar menuseparator
2781 \begin_inset space ~
2789 \begin_layout Enumerate
2790 Switch to \SpecialChar LaTeX
2794 \begin_inset space ~
2802 \begin_layout Enumerate
2812 Do not close the brace!
2815 \begin_layout Enumerate
2816 Position the cursor behind the caption text, switch to \SpecialChar LaTeX
2821 \begin_inset space ~
2833 \begin_layout Standard
2834 Also, refer to the figures in the example paper.
2837 \begin_layout Subsection
2841 \begin_layout Standard
2842 For submission, the paper has to be formated in a special double-spacing
2844 For this purpose, you have to give the option
2848 to the documentclass.
2849 This must be done using the extra class options field in the
2851 Document\SpecialChar menuseparator
2855 Just enter the string
2862 \begin_layout Subsection
2866 \begin_layout Standard
2871 directory contains an example paper written with \SpecialChar LyX
2873 It is the example paper from the original macro package, translated to
2876 Use it for inspiration, and compare the original \SpecialChar LaTeX
2877 code with \SpecialChar LyX
2881 \begin_layout Section
2886 \begin_layout Standard
2892 \begin_layout Subsection
2896 \begin_layout Standard
2898 is a set of macros produced by the American Astronomical Society to
2899 facilitate electronic manuscript submission to the three journals they
2900 publish: the Astrophysical Journal (including the Letters and Supplement),
2901 the Astronomical Journal, and the Publications of the Astronomical Society
2904 has proven to be an excellent tool for generating these documents, especially
2905 given its equation, citation, and figure handling capabilities.
2907 requires version 5.0 (or higher) of these macros; preferably 5.2, which
2908 is the version described here, or higher.
2909 Versions prior to 5.0 are intended for use with \SpecialChar LaTeX
2910 2.09 and are fundamentally
2911 incompatible with \SpecialChar LyX
2913 The AAS\SpecialChar TeX
2914 package may be downloaded from the AAS\SpecialChar TeX
2918 \begin_layout Standard
2919 \begin_inset VSpace medskip
2925 \begin_layout Standard
2927 \begin_inset Flex URL
2930 \begin_layout Plain Layout
2932 https://aas.org/aastex/aastex-downloads
2940 \begin_layout Standard
2941 \begin_inset VSpace medskip
2947 \begin_layout Standard
2948 A complete user guide is contained in that package and you should familiarize
2949 yourself with it thoroughly before embarking on writing a paper in \SpecialChar LyX
2952 will not reduce the need to figure out all the AAS\SpecialChar TeX
2953 commands, it will only
2954 reduce the drudgery of typing everything in.
2955 It is your responsibility to ensure that the final exported \SpecialChar LaTeX
2957 completely to the requirements of the journal to which you are submitting
2961 \begin_layout Subsection
2962 Starting a New Paper
2965 \begin_layout Standard
2966 I strongly suggest that you start with the AAS\SpecialChar TeX
2970 File\SpecialChar menuseparator
2977 , enter the new file name, then choose the
2982 This will show the most common fields found in a manuscript.
2983 Simply overwrite the existing text (including the brackets,
2987 ) with the correct information.
2988 Many of the AAS\SpecialChar TeX
2989 commands and environments can be implemented directly in
2991 , but some cannot: most noticeably
3003 , which should stick out like a sore thumb if you actually just opened the
3005 For commands such as these, the \SpecialChar LaTeX
3006 code must be entered directly and marked
3008 Such commands are referred to as \SpecialChar TeX
3009 code, or Evil Red Text.
3010 I tried to minimize the amount of \SpecialChar TeX
3011 code needed in an AAS\SpecialChar TeX
3013 there is still a bit more required than any of us would like.
3016 \begin_layout Subsection
3017 Finishing Your Paper
3020 \begin_layout Standard
3021 When the paper is finished to your satisfaction and previews/prints correctly,
3023 \begin_inset Quotes eld
3027 \begin_inset Quotes erd
3030 actions which need to be done before you submit it to the journals.
3034 \begin_layout Enumerate
3035 Export your paper as a \SpecialChar LaTeX
3038 File\SpecialChar menuseparator
3039 Export\SpecialChar menuseparator
3047 \begin_layout Enumerate
3052 file with your favorite text editor
3053 \begin_inset Separator latexpar
3060 \begin_layout Enumerate
3061 remove the comment lines before the
3070 \begin_layout Enumerate
3075 usepackage...{fontenc}
3077 line if it appears (usually just after
3092 \begin_layout Enumerate
3093 remove everything between (and including) the
3105 commands, except for any commands you specifically put into the \SpecialChar LaTeX
3107 (which should appear immediately after the
3108 \begin_inset Quotes eld
3111 User specified \SpecialChar LaTeX
3113 \begin_inset Quotes erd
3124 \begin_layout Enumerate
3125 Run the resulting file through \SpecialChar LaTeX
3126 to make sure it still processes correctly.
3129 \begin_layout Enumerate
3130 Reread the journal requirements to make sure your filenames and formats
3134 \begin_layout Enumerate
3138 \begin_layout Subsection
3139 Comments On Specific Commands
3142 \begin_layout Standard
3143 I will not describe the detailed usage of the individual AAS\SpecialChar TeX
3150 ) gives a good description of each.
3151 Thus it's probably easiest for me to go down the list as found in the guide
3152 and offer comments where necessary.
3153 So let's begin \SpecialChar ldots
3157 \begin_layout Subsubsection
3158 Things that work as expected
3161 \begin_layout Standard
3162 Because they work as you might expect, I simply list them and the section
3263 begin{thebibliography}
3271 (2.13.2), all the cite commands and their variations (2.13.2), the generic
3272 graphicx figure commands (2.14.1),
3296 (2.15.4, amongst other places),
3323 \begin_layout Standard
3324 The following style options also work correctly:
3345 Simply put them in the
3351 Layout\SpecialChar menuseparator
3357 \begin_layout Subsubsection
3358 Things that work, but require more comment
3361 \begin_layout Standard
3362 The following items work, but require a little more discussion:
3365 \begin_layout Itemize
3366 These items are reserved for use by the journal editors, but you can put
3367 them into the \SpecialChar LaTeX
3368 preamble if you feel compelled to do so:
3401 \begin_layout Itemize
3402 These items may be placed in the \SpecialChar LaTeX
3403 preamble, and are included as blanks in
3425 \begin_layout Itemize
3432 (2.3) – can only be used
3433 \begin_inset Quotes eld
3437 \begin_inset Quotes erd
3440 , not in the middle of a paragraph.
3441 Use \SpecialChar TeX
3442 code if you need to embed it.
3445 \begin_layout Itemize
3452 (2.3) – will have extra {} after it.
3453 This should not cause an error.
3456 \begin_layout Itemize
3463 (2.6) – can only be used
3464 \begin_inset Quotes eld
3468 \begin_inset Quotes erd
3471 , not in the middle of a paragraph.
3472 Use \SpecialChar TeX
3473 code if you need to embed it.
3476 \begin_layout Itemize
3483 (2.8) – can't insert a cross-reference tag, you must type the tag name by
3487 \begin_layout Itemize
3501 \begin_layout Itemize
3508 (2.9) – will have extra {} after it.
3509 This should not cause an error.
3512 \begin_layout Itemize
3519 (2.11) – will have extra {} after it.
3520 This should not cause an error.
3523 \begin_layout Itemize
3530 (2.14.2) – you can insert an optional filename argument by placing the cursor
3531 at the beginning of the text and selecting
3533 Insert\SpecialChar menuseparator
3538 \begin_inset Quotes eld
3542 \begin_inset Quotes erd
3545 inserts an optional argument of the type needed by
3552 Hopefully it will be renamed someday.
3555 \begin_layout Itemize
3568 for the catalog ID optional parameter
3571 \begin_layout Itemize
3584 for the catalog ID optional parameter
3587 \begin_layout Subsubsection
3588 Things not implemented, use \SpecialChar TeX
3592 \begin_layout Standard
3615 setcounter{equation}
3617 (2.12), Journal name abbreviations (2.13.4),
3653 (2.15.4, insert it as the first element in the lefthand cell after where
3655 Don't use any of \SpecialChar LyX
3656 's rules in the table),
3668 (2.15.5), much of Misc (2.17, except
3719 \begin_layout Subsubsection
3720 Things that cannot be implemented
3723 \begin_layout Standard
3725 at least in any meaningful sort of way, so I suggest ignoring them.
3726 They are the references environment (2.13.3), and the deluxetable environment
3728 If you really, really need to use deluxetable, I suggest editing it in
3729 a separate file with a text editor, then using
3731 Insert\SpecialChar menuseparator
3733 \begin_inset space ~
3738 to include it in your \SpecialChar LyX
3744 file to see an example of this.
3747 \begin_layout Subsection
3748 FAQs, Tips, Tricks, and Other Ruminations
3751 \begin_layout Subsubsection
3752 Getting \SpecialChar LyX
3753 and AAS\SpecialChar TeX
3757 \begin_layout Standard
3758 It can be a bit tricky to get \SpecialChar LyX
3759 to recognize a new layout and document class.
3760 When all else fails, do this:
3763 \begin_layout Enumerate
3764 Make certain that \SpecialChar LaTeX
3765 can find AAS\SpecialChar TeX
3767 Copy sample.tex (and perhaps table.tex) from the AAS\SpecialChar TeX
3769 directory completely unrelated to \SpecialChar LaTeX
3770 or AAS\SpecialChar TeX
3771 and run \SpecialChar LaTeX
3779 \begin_layout Enumerate
3784 appears in \SpecialChar LyX
3792 \begin_layout Enumerate
3795 Tools\SpecialChar menuseparator
3799 , then restart \SpecialChar LyX
3803 \begin_layout Enumerate
3804 Open a regular new file, not from a template.
3805 Does AAS\SpecialChar TeX
3806 appear in the class list in
3808 Document\SpecialChar menuseparator
3814 \begin_layout Standard
3815 If you get a warning from an existing AAS\SpecialChar TeX
3816 document about not being able
3817 to find the AAS\SpecialChar TeX
3818 layout or a message about
3819 \begin_inset Quotes eld
3822 You should not mix title layouts with normal ones
3823 \begin_inset Quotes erd
3826 , things haven't been installed correctly.
3829 \begin_layout Subsubsection
3831 error processing a table
3834 \begin_layout Standard
3836 , by default, attempts to center the table caption/title.
3837 This seems to produce a bad interaction in AAS\SpecialChar TeX
3838 so you should click somewhere
3839 in the caption/title, then select
3841 Edit\SpecialChar menuseparator
3843 \begin_inset space ~
3857 This took care of it for me.
3860 \begin_layout Subsubsection
3864 \begin_layout Standard
3865 A couple of things: 1) I have noticed some funny spacing in the reference
3866 entries in the text.
3867 When you enter the bibliography item data, make sure their is
3871 space between the last author and the parenthesis setting off the year;
3875 \begin_inset space \thinspace{}
3879 \begin_inset space \space{}
3893 2) Entering the references at all is not obvious.
3894 The easiest thing is to start typing your first reference at the end of
3895 the document, then mark it as type
3900 That will put a small gray box in front of what you just typed.
3901 Click on the box to fill in the rest of the information.
3902 For new references, go to the end of an existing reference and press return.
3903 That will create a new line with its own box, etc.
3906 \begin_layout Subsubsection
3910 \begin_layout Standard
3911 Even though AAS\SpecialChar TeX
3912 provides its own figure commands (
3918 , for example), I much prefer \SpecialChar LaTeX
3919 's standard figure commands (with the default
3928 \begin_inset space ~
3931 commands as \SpecialChar TeX
3932 code into a Figure Float box if you desire, but I never have
3933 much luck getting the layout right.
3934 With the standard graphics, \SpecialChar LyX
3939 usepackage{graphicx}
3941 command into the \SpecialChar LaTeX
3942 preamble and handle the figures in the standard \SpecialChar LaTeX2e
3944 interspersing the figures in the text.
3945 I believe ApJ accepts figures exactly this way now; AJ might still use
3947 \begin_inset Quotes eld
3950 stack everything at the end
3951 \begin_inset Quotes erd
3957 \begin_layout Subsubsection
3958 Things I could have done, but didn't
3961 \begin_layout Standard
3963 \begin_inset Quotes eld
3967 \begin_inset Quotes erd
3970 things I could have implemented, but chose not to.
3971 For instance, I saw no point in double-spacing the text in the \SpecialChar LyX
3973 even though it is double-spaced in the paper manuscript.
3974 Also, I chose not to make separate layouts for the preprint and preprint2
3976 Since I assume you will spend most of your time in the plain manuscript
3977 mode anyway, I decided not to chew up more disk space with this.
3981 \begin_layout Subsection
3985 \begin_layout Standard
3986 Your mileage may vary.
3987 I've now had papers published by both ApJ and AJ that have had 98% of the
3988 effort done in \SpecialChar LyX
3989 ; the last 2% was the \SpecialChar LaTeX
3990 post-processing and a few cleanups.
3991 I have had no trouble with the submission process, and I'm sure the journals
3992 were never aware that there might be a difference.
3993 So, go forth and publish!
3996 \begin_layout Section
3997 AMS \SpecialChar LaTeX
4001 \begin_layout Standard
4011 \begin_layout Standard
4012 \begin_inset VSpace bigskip
4018 \begin_layout Standard
4020 The AMS \SpecialChar LaTeX
4021 layouts are set up to conform to suggested styles for mathematical
4022 papers to be submitted to American Mathematical Society publications.
4023 The layouts are not tailored to a specific journal, but easily can be.
4024 You should refer to the AMS documentation for specific instructions for
4025 each journal (usually it will entail only changing a single line in the
4028 That documentation is available on the Web at
4029 \begin_inset Flex URL
4032 \begin_layout Plain Layout
4040 \begin_inset Flex URL
4043 \begin_layout Plain Layout
4045 ftp://ftp.ams.org/pub/tex/amslatex/
4051 These layouts are appropriate, and useful, for any mathematical writing.
4055 \begin_layout Standard
4056 There are two basic AMS \SpecialChar LaTeX
4060 \begin_layout Itemize
4061 amsart: The standard AMS article format.
4064 \begin_layout Itemize
4065 amsbook: the standard AMS book (really, monograph) format.
4069 \begin_layout Standard
4070 The layouts themselves contain only the minimum necessary to use the AMS
4072 They do not, in particular, contain any of the `theorem' environments used
4073 for setting theorems, lemmas, and the like.
4074 These are contained, instead, in the
4075 \begin_inset Flex Code
4078 \begin_layout Plain Layout
4084 module, which is loaded by default when you select one of the AMS classes.
4085 (It can also be used with other classes and can be removed, if you would
4086 rather use something else.) Less commonly used environments are in the
4087 \begin_inset Flex Code
4090 \begin_layout Plain Layout
4091 Theorems (AMS-Extended)
4096 module, which must be loaded manually.
4099 \begin_layout Standard
4100 By default, theorems and the like are numbered consecutively throughout
4101 the document, but this may be modified by loading the module
4102 \begin_inset Flex Code
4105 \begin_layout Plain Layout
4106 Theorems (Order by Section)
4111 or, if you are using
4112 \begin_inset Flex Code
4115 \begin_layout Plain Layout
4122 \begin_inset Flex Code
4125 \begin_layout Plain Layout
4126 Theorems (Order by Chapter)
4132 These will number the results as
4133 \begin_inset Formula $n.m$
4136 , where the first number refers to the section (or chapter) and the second
4137 refers to the total number of results so far in that section (or chapter).
4138 Many environments are also available unnumbered.
4139 These are indicated by an asterisk at the end.
4140 If you happen to want
4144 unnumbered results, the module
4145 \begin_inset Flex Code
4148 \begin_layout Plain Layout
4154 provides that option.
4157 \begin_layout Standard
4158 Note that these modules do not
4162 to be used with the AMS classes.
4163 It is perfectly possible to use the
4164 \begin_inset Flex Code
4167 \begin_layout Plain Layout
4173 module, and the others mentioned, with other classes, such as
4174 \begin_inset Flex Code
4177 \begin_layout Plain Layout
4184 \begin_inset Flex Code
4187 \begin_layout Plain Layout
4194 \begin_inset Flex Code
4197 \begin_layout Plain Layout
4206 \begin_layout Subsection
4207 What these layouts provide
4210 \begin_layout Standard
4211 There is a long list of included environments provided by these layouts.
4212 In AMS-\SpecialChar LaTeX
4213 , there is, in fact, an opportunity to define an unlimited variety
4214 of `theorem' environments.
4215 However, the AMS recommends the environments that are available in \SpecialChar LyX
4220 \begin_layout Standard
4221 The following environments—as well as the standard environments, such as
4223 \begin_inset Flex Noun
4226 \begin_layout Plain Layout
4233 \begin_inset Flex Noun
4236 \begin_layout Plain Layout
4243 \begin_inset Flex Noun
4246 \begin_layout Plain Layout
4253 \begin_inset Flex Noun
4256 \begin_layout Plain Layout
4263 \begin_inset Flex Noun
4266 \begin_layout Plain Layout
4273 \begin_inset Flex Code
4276 \begin_layout Plain Layout
4283 \begin_inset Flex Code
4286 \begin_layout Plain Layout
4295 \begin_layout Description
4296 Address This should be the author's permanent address.
4299 \begin_layout Description
4301 \begin_inset space ~
4304 Address This should be the author's temporary address at the time of submission,
4305 if different from the Address.
4308 \begin_layout Description
4309 Email Author's e-mail address
4312 \begin_layout Description
4313 URL Author's Web address, if desired.
4316 \begin_layout Description
4317 Keywords Key words or phrases used to identify specific topics discussed
4321 \begin_layout Description
4322 Subjectclass These refer to the AMS Subject Classifications, published and
4325 Mathematical Reviews
4328 These are also available online at the AMS cites listed above.
4331 \begin_layout Description
4335 \begin_layout Description
4339 \begin_layout Description
4343 \begin_layout Standard
4344 The following environments are provided by both the
4345 \begin_inset Flex Code
4348 \begin_layout Plain Layout
4355 \begin_inset Flex Code
4358 \begin_layout Plain Layout
4364 modules, in the latter case in both starred (unnumbered) and unstarred
4365 (numbered) versions.
4366 These same environments are provided only in the starred versions by the
4368 \begin_inset Flex Code
4371 \begin_layout Plain Layout
4380 \begin_layout Theorem
4381 This is typically used for the statements of major results.
4385 \begin_layout Corollary*
4386 This is used for statements which follow fairly directly from previous statement
4388 Again, these can be major results.
4393 These are smaller results needed to prove other statements.
4396 \begin_layout Proposition
4397 These are less major results which (hopefully) add to the general theory
4401 \begin_layout Conjecture
4402 These are statements provided without justification, which the author does
4403 not know how to prove, but which seem to be true (to the author, at least).
4406 \begin_layout Definition*
4407 Guess what this is for.
4408 The font is different for this environment than for the previous ones.
4412 \begin_layout Example*
4413 Used for examples illustrating proven results.
4416 \begin_layout Problem
4417 It's not really known what this is for.
4418 You should figure it out.
4421 \begin_layout Exercise*
4422 Write a description for this one.
4425 \begin_layout Remark
4426 This environment is also a type of theorem, usually a lesser sort of observation.
4429 \begin_layout Claim*
4430 Often used in the course of giving a proof of a larger result.
4434 Generally, these are used to break up long arguments, using specific instances
4440 The numbering scheme for cases is on its own, not together with other numbered
4446 At the end of this environment, a QED symbol (usually a square, but it can
4447 vary with different styles) is placed.
4448 If you want to have other environments within this one—for example, Case
4449 environments—and have the QED symbol appear only after them, then the other
4450 environments need to be nested within the proof environment.
4453 Nesting Environments
4459 for information on nesting.
4462 \begin_layout Standard
4463 And these environments are provided by
4464 \begin_inset Flex Code
4467 \begin_layout Plain Layout
4468 Theorems (AMS-Extended)
4476 \begin_layout Criterion*
4477 A required condition.
4480 \begin_layout Algorithm*
4481 A general procedure to be used.
4484 \begin_layout Axiom*
4485 This is a property or statement taken as true within the system being discussed.
4488 \begin_layout Condition*
4489 Sometimes used to state a condition assumed within the present context of
4494 Similar to a Remark.
4497 \begin_layout Notation*
4498 Used for the explanation of, yes, notation.
4501 \begin_layout Summary
4502 Do we really need to tell you?
4505 \begin_layout Acknowledgement*
4509 \begin_layout Conclusion*
4510 Sometimes used at the end of a long train of argument.
4514 Used in a way similar to Proposition, though perhaps lower on the scale.
4517 \begin_layout Standard
4518 In addition, the AMS classes automatically provide the AMS \SpecialChar LaTeX
4521 They need to be available on your system in order to use these environments.
4524 \begin_layout Section
4532 \begin_layout Standard
4538 \begin_layout Subsection
4542 \begin_layout Standard
4543 These are the layout files for some of the journals of the American Geophysical
4545 It is assumed that you have both the AGU's own class files and AGUplus
4546 installed (everything to be found at
4547 \begin_inset Flex URL
4550 \begin_layout Plain Layout
4552 http://publications.agu.org/files/2013/08/AGU-LaTeX.zip
4560 \begin_layout Subsection
4564 \begin_layout Standard
4574 They are still called this in the \SpecialChar LyX
4575 GUI, though their \SpecialChar LaTeX
4588 \begin_layout Standard
4589 Newly defined styles are
4626 These are mostly manuscript attributes and defined in the AGU class documentati
4630 \begin_layout Standard
4631 I suspect this is still badly incomplete.
4634 \begin_layout Subsection
4638 \begin_layout Standard
4655 \begin_layout Subsection
4659 \begin_layout Itemize
4662 Journal of Geophysical Research
4671 \begin_layout Standard
4672 Add your own, it isn't so hard! Look at the
4683 \begin_layout Subsection
4684 Bugs and things to remember
4687 \begin_layout Standard
4688 In order to use the new layouts, you must remember to do the following for
4692 \begin_layout Enumerate
4698 This can be done in the
4700 Layout\SpecialChar menuseparator
4705 Document\SpecialChar menuseparator
4709 (AGU articles are always in English, right? So
4716 \begin_layout Enumerate
4726 (Yes, this is a bug.)
4729 \begin_layout Enumerate
4730 Make sure you use the
4734 bibliography style, by entering
4738 into the second field of the Bib\SpecialChar TeX
4740 None of the standard styles will do.
4743 \begin_layout Section
4747 \begin_layout Standard
4753 \begin_layout Subsection
4757 \begin_layout Standard
4758 Broadway is for writing plays.
4759 The format is more decorative than Hollywood, and much less standardized.
4760 This format should be suitable for workshops.
4763 \begin_layout Subsection
4767 \begin_layout Standard
4768 The same as in Hollywood.
4771 \begin_layout Subsection
4775 \begin_layout Standard
4780 names as labels then cross-reference the label to insert the name.
4781 The cross-reference dialog will show the current cast of characters.
4784 \begin_layout Subsection
4785 Paper size and Margins
4788 \begin_layout Standard
4789 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
4792 \begin_layout Subsection
4796 \begin_layout Standard
4797 The following environments are available.
4798 You can use broadway.bind to get the bind keys shown at the right.
4801 \begin_layout Itemize
4805 \begin_inset Newline newline
4810 You should not have to use this, but it is here for anything that does not
4814 \begin_layout Itemize
4818 \begin_inset space \hfill{}
4822 \begin_inset Newline newline
4827 Used to describe stage setting and the action.
4828 First use of speaker names in all CAPs.
4831 \begin_layout Itemize
4835 \begin_inset space \hfill{}
4839 \begin_inset Newline newline
4844 Automatically numbered.
4845 On screen it will be arabic, but will print as Roman.
4848 \begin_layout Itemize
4852 \begin_inset space \hfill{}
4856 \begin_inset Newline newline
4866 It is just centered text.
4869 \begin_layout Itemize
4873 \begin_inset space \hfill{}
4877 \begin_inset Newline newline
4882 Not automatically numbered.
4883 You supply the number.
4884 This is because I couldn't figure out how.
4887 \begin_layout Itemize
4891 \begin_inset space \hfill{}
4895 \begin_inset Newline newline
4900 A special case of Narrative to describe the setting and action as the curtain
4904 \begin_layout Itemize
4908 \begin_inset space \hfill{}
4912 \begin_inset Newline newline
4917 The speaker's (actor's) title, centered in all CAPS.
4920 \begin_layout Itemize
4924 \begin_inset space \hfill{}
4928 \begin_inset Newline newline
4933 Instructions to the speaker.
4934 The parentheses are automatically inserted.
4935 The ( will appear on screen, but both will be in the printed play.
4936 This environment is only used within
4943 \begin_layout Itemize
4947 \begin_inset space \hfill{}
4951 \begin_inset Newline newline
4956 What the Speaker says.
4959 \begin_layout Itemize
4963 \begin_inset space \hfill{}
4967 \begin_inset Newline newline
4972 The curtain comes down.
4975 \begin_layout Itemize
4979 \begin_inset space \hfill{}
4985 \begin_layout Itemize
4989 \begin_inset space \hfill{}
4995 \begin_layout Itemize
4999 \begin_inset space \hfill{}
5005 \begin_layout Standard
5009 \begin_layout Section
5013 \begin_layout Standard
5018 can be used to type letters according to German conventions.
5019 A template file is included in
5021 .../lyx/share/templates
5023 for you to use as a starting point.
5026 \begin_layout Section
5034 \begin_layout Standard
5040 \begin_layout Subsection
5044 \begin_layout Standard
5045 This is the layout file for the European Geophysical Society journals.
5050 can be downloaded from the web site of the EGS under
5051 \begin_inset Flex URL
5054 \begin_layout Plain Layout
5064 \begin_layout Subsection
5068 \begin_layout Standard
5071 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
5079 The current layout file is unfortunately very unmodular and would benefit
5080 from using the various
5087 \begin_layout Section
5091 \begin_layout Standard
5092 See the \SpecialChar LyX
5098 It contains all infos you need.
5101 \begin_layout Section
5104 Foil\SpecialChar TeX
5108 \begin_inset CommandInset label
5117 \begin_layout Standard
5123 \begin_layout Subsection
5127 \begin_layout Standard
5128 This section describes how to use \SpecialChar LyX
5129 to make slides for overhead projectors.
5130 There are two document classes that can do this: the default slides class
5133 Foil\SpecialChar TeX
5137 This section documents the latter.
5140 \begin_layout Standard
5141 I'm going to say this again, nice and clear, so that there's no misunderstanding
5145 \begin_layout Standard
5146 \begin_inset VSpace bigskip
5152 \begin_layout Standard
5156 This section documents the class
5157 \begin_inset Quotes eld
5165 \begin_inset Quotes erd
5173 \begin_layout Standard
5174 \begin_inset VSpace bigskip
5180 \begin_layout Standard
5181 If you're looking for the documentation for
5182 \begin_inset Quotes eld
5190 \begin_inset Quotes erd
5194 \begin_inset space ~
5198 \begin_inset CommandInset ref
5200 reference "sec:slitex"
5205 If your machine doesn't have the
5213 installed, you'll probably have to use the default
5217 class, which isn't quite as good as
5222 \begin_layout Standard
5227 class is designed for use with version
5228 \begin_inset space ~
5236 class file which is now an integral part of \SpecialChar LaTeX2e
5240 \begin_layout Subsection
5244 \begin_layout Standard
5245 Obviously, to use this document class, you need to select
5256 \begin_inset space ~
5262 There are some settings in the
5265 \begin_inset space ~
5270 dialog that you should know about that are specific to this class:
5273 \begin_layout Itemize
5274 Don't change the options
5285 \begin_inset space ~
5291 They're ignored by the
5298 \begin_layout Itemize
5299 The default font size is 20
5300 \begin_inset space \thinspace{}
5303 pt with the other options being 17
5304 \begin_inset space \thinspace{}
5308 \begin_inset space \thinspace{}
5312 \begin_inset space \thinspace{}
5318 \begin_layout Itemize
5327 but all math equations are still typeset in the usual roman font.
5330 \begin_layout Itemize
5333 Foil\SpecialChar TeX
5336 supports A4 and Letter paper sizes as well as a special size for working
5338 \begin_inset space \thinspace{}
5342 It doesn't support A5, B5, legal or executive paper sizes.
5345 \begin_layout Itemize
5346 Don't bother changing the
5350 settings because they are ignored anyway.
5351 All floats appear where they are defined in the text.
5354 \begin_layout Itemize
5359 setting behaves a bit differently for this class.
5362 Foil\SpecialChar TeX
5365 provides extensive footer and header capabilities including a user-defined
5368 \begin_inset space ~
5372 \begin_inset CommandInset ref
5374 reference "sec:foilfoot"
5379 The title page is treated differently to all other pages in the document
5388 has the logo centered at the bottom of the page (if one is defined).
5389 The possible page style choices and what they do are as follows:
5390 \begin_inset Separator latexpar
5397 \begin_layout Labeling
5398 \labelwidthstring MMMMMMM
5405 The final output contains no page numbers, or other headers or footers
5406 (except footnotes of course).
5410 \begin_layout Labeling
5411 \labelwidthstring MMMMMMM
5418 The final output contains page numbers centered at the bottom of the page.
5419 No other headings or footers (other than footnotes).
5422 \begin_layout Labeling
5423 \labelwidthstring MMMMMMM
5428 Page numbers in lower right corner.
5429 Additional headers and footers are also shown.
5430 This is also the default.
5433 \begin_layout Labeling
5434 \labelwidthstring MMMMMMM
5439 Gives you access to the
5443 package although its use with
5445 Foil\SpecialChar TeX
5448 is discouraged by the writer of the
5450 Foil\SpecialChar TeX
5453 package because of some potential page layout clashes.
5457 \begin_layout Subsubsection
5461 \begin_layout Standard
5462 The following options may be used in the extra class options in the
5464 Document\SpecialChar menuseparator
5470 \begin_layout Labeling
5471 \labelwidthstring MMMMMMx
5476 This sets up the page layout for 7.33
5477 \begin_inset space \thinspace{}
5481 \begin_inset space \thinspace{}
5484 in paper, which is about the same aspect ratio as a 35
5485 \begin_inset space \thinspace{}
5488 mm slide, making it a bit easier to work with this medium.
5491 \begin_layout Labeling
5492 \labelwidthstring MMMMMMx
5497 Places a rule across the page below the header on every page except the
5501 \begin_layout Labeling
5502 \labelwidthstring MMMMMMx
5507 Places a rule across the page above the footer on every page except the
5511 \begin_layout Labeling
5512 \labelwidthstring MMMMMMx
5517 This is automatically set each time you create a new
5524 Foil\SpecialChar TeX
5527 to use the dvips driver to rotate those pages that are set as landscape
5531 \begin_layout Labeling
5532 \labelwidthstring MMMMMMx
5537 Simply changes the page dimensions to those of a landscape page but doesn't
5539 Thus if you use this option you need to use an external program to rotate
5540 each page or feed your paper through your printer as landscape.
5541 Note that this option effectively reverses the roles of the
5549 environments (don't worry these are described in the next section).
5552 \begin_layout Labeling
5553 \labelwidthstring MMMMMMx
5558 Equation numbers on the left.
5561 \begin_layout Labeling
5562 \labelwidthstring MMMMMMx
5567 Flush-left equations.
5570 \begin_layout Subsection
5571 Supported Environments
5574 \begin_layout Standard
5575 Most of the environments commonly supported in other classes are also supported
5581 There are several additional environments provided by
5583 Foil\SpecialChar TeX
5586 as well as a couple added by \SpecialChar LyX
5588 The following environments are shared with other classes:
5591 \begin_layout Standard
5592 \begin_inset Flex Multiple Columns
5595 \begin_layout Itemize
5601 \begin_layout Itemize
5607 \begin_layout Itemize
5613 \begin_layout Itemize
5619 \begin_layout Itemize
5625 \begin_layout Itemize
5632 \begin_layout Itemize
5638 \begin_layout Itemize
5644 \begin_layout Itemize
5650 \begin_layout Itemize
5656 \begin_layout Itemize
5662 \begin_layout Itemize
5668 \begin_layout Itemize
5674 \begin_layout Itemize
5680 \begin_layout Itemize
5686 \begin_layout Itemize
5692 \begin_layout Itemize
5698 \begin_layout Itemize
5709 \begin_layout Standard
5710 That is, all the major environments apart from the sectioning environments.
5711 Since foils are essentially self-contained sections, with a title and body,
5714 Foil\SpecialChar TeX
5717 provides specific commands for starting new foils and these are:
5720 \begin_layout Itemize
5726 \begin_layout Itemize
5732 \begin_layout Standard
5734 also provides slightly modified versions of these two environments called:
5737 \begin_layout Itemize
5743 \begin_layout Itemize
5749 \begin_layout Standard
5750 and the differences will be explained in the next section.
5753 \begin_layout Standard
5754 Since foils are often used in presenting ideas or new theorems and such
5757 Foil\SpecialChar TeX
5760 also provides a comprehensive box of goodies for presenting them:
5763 \begin_layout Standard
5764 \begin_inset Flex Multiple Columns
5767 \begin_layout Itemize
5773 \begin_layout Itemize
5779 \begin_layout Itemize
5785 \begin_layout Itemize
5791 \begin_layout Itemize
5797 \begin_layout Itemize
5803 \begin_layout Itemize
5809 \begin_layout Itemize
5815 \begin_layout Itemize
5821 \begin_layout Itemize
5827 \begin_layout Itemize
5838 \begin_layout Standard
5839 The starred versions are unnumbered while the unstarred versions are numbered.
5840 There are also two list environments added by \SpecialChar LyX
5844 \begin_layout Itemize
5850 \begin_layout Itemize
5856 \begin_layout Standard
5859 Foil\SpecialChar TeX
5862 provides some powerful header and footer capabilities that are best set
5863 in the preamble although they may be set at any point in a document.
5864 If you want to change these settings in your document the best place to
5865 do so is at the very top of a foil, i.
5866 \begin_inset space \thinspace{}
5872 \begin_inset space \space{}
5877 straight after the foilhead.
5880 \begin_layout Standard
5881 For this purpose, the following command styles are provided [
5888 \begin_layout Standard
5889 \begin_inset Flex Multiple Columns
5892 \begin_layout Itemize
5896 \begin_inset space ~
5902 \begin_layout Itemize
5908 \begin_layout Itemize
5912 \begin_inset space ~
5918 \begin_layout Itemize
5922 \begin_inset space ~
5928 \begin_layout Itemize
5932 \begin_inset space ~
5938 \begin_inset Separator latexpar
5945 \begin_layout Plain Layout
5946 \begin_inset space ~
5958 \begin_layout Standard
5959 There are also a few commands provided by
5961 Foil\SpecialChar TeX
5964 that aren't directly supported by \SpecialChar LyX
5965 but I'll tell you what they do and how
5966 to use them in section
5967 \begin_inset space ~
5971 \begin_inset CommandInset ref
5973 reference "sec:unsuppfoils"
5980 \begin_layout Subsection
5981 Building a Set of Foils
5984 \begin_layout Standard
5985 This section will give a simple introduction to using the different environments
5986 to build a set of foils.
5987 If you want to see an example set of foils, take a look at the
5991 file you find in \SpecialChar LyX
5999 \begin_layout Subsubsection
6000 Give It a Title Page
6003 \begin_layout Standard
6004 Unlike other classes that provide
6024 creates the title on a page of its own.
6025 If you leave out the
6029 environment \SpecialChar LaTeX
6030 will substitute the current date (every time you regenerate
6034 \begin_layout Subsubsection
6038 \begin_layout Standard
6039 As I mentioned earlier, there are four ways of starting a new foil.
6040 For portrait foils you should use
6049 The difference between these two environments is the amount of space between
6050 the title of the foil (the foilhead) and the body of the foil.
6053 \begin_layout Standard
6054 Landscape foils are generated using the
6063 Again the only difference is the spacing between foilhead and body.
6064 Both of the short versions have 0.5
6065 \begin_inset space ~
6068 inches less separation between the foilhead and the body.
6072 \begin_layout Standard
6073 One problem with the support for landscape foils is the requirement that
6078 driver to generate the PostScript output otherwise the foils won't be rotated.
6079 It is possible to get landscape foils even if you haven't got the
6083 driver provided you can feed your foils sideways through your printer ;-)
6086 \begin_layout Subsubsection
6087 Theorems, Lemmas, Proofs and more
6090 \begin_layout Standard
6091 Due to a small bug in \SpecialChar LyX
6092 you can't have two of the same type of these environments
6093 directly following each other.
6094 They must be separated by something.
6095 If you try, you will just be extending the previous environment as if you
6096 had merged the two environments together.
6097 So, how do you get around this problem? The simplest option is to insert
6098 some text between the two environments or add a
6103 environment between the two with just a
6104 \begin_inset Quotes eld
6112 \begin_inset Quotes erd
6116 This will force \SpecialChar LyX
6117 to produce two separate environments and hence the correct
6120 An example is provided in the example file included with the \SpecialChar LyX
6122 Remember, this problem only occurs if you are trying to place two of the
6123 same type of theorem-like environments one directly after the other.
6126 \begin_layout Subsubsection
6130 \begin_layout Standard
6131 You get all the commonly supported list styles found in other classes as
6132 well as two new ones.
6133 I'll only describe the new ones here.
6134 If you want to find out more about the other list environments check out
6140 If you intend to use itemized lists you might also want to read about the
6144 \begin_inset space ~
6148 \begin_inset space ~
6153 dialog described above in section
6154 \begin_inset space ~
6158 \begin_inset CommandInset ref
6160 reference "sec:bullet"
6167 \begin_layout Standard
6168 The two new list styles,
6176 , are designed to make it easier for you to create lists of do's and don'ts
6177 or right and wrong by providing dedicated environments that use a tick
6178 or a cross as the label of the list.
6179 These lists are in fact dedicated variants of the
6184 They do however require that you have the
6191 \begin_layout Subsubsection
6195 \begin_layout Standard
6198 Foil\SpecialChar TeX
6201 redefines the floating tables and figures so that they appear exactly where
6202 they are in the text rather than pushing them to the top of the page or
6203 to some user specified location.
6204 In fact if you change the float placement settings they are simply ignored.
6207 \begin_layout Subsubsection
6208 Page Headers and Footers
6209 \begin_inset CommandInset label
6218 \begin_layout Standard
6222 \begin_inset space ~
6231 are two commands used to control the left-footer text string.
6232 The first is meant to allow you to include a graphic logo on your foils
6234 \begin_inset Quotes eld
6239 Foil\SpecialChar TeX
6243 \begin_inset Quotes erd
6247 While the second is meant to provide a classification for the audience,
6251 \begin_inset space \thinspace{}
6257 \begin_inset space \space{}
6261 It is empty by default.
6264 \begin_layout Standard
6265 The remaining page corners can be filled by
6268 \begin_inset space ~
6273 (which defaults to page numbers),
6276 \begin_inset space ~
6284 \begin_inset space ~
6292 \begin_layout Subsection
6295 Foil\SpecialChar TeX
6299 \begin_inset CommandInset label
6301 name "sec:unsuppfoils"
6308 \begin_layout Standard
6309 All the commands mentioned below need to be set in a
6319 within another environment.
6322 \begin_layout Subsubsection
6326 \begin_layout Standard
6327 All lengths are adjusted using the
6350 should be replaced by the name given to the length you want to change and
6355 is the length value.
6356 All lengths should be specified in units of length such as inches (
6368 ) or relative to some document or font-based length such as
6378 \begin_layout Standard
6379 It's possible to change the spacing between a foilhead and the body of the
6380 foil by adjusting the length specified by
6387 For example, to make
6392 \begin_inset space \space{}
6395 in closer to their bodies put the following in the preamble:
6401 foilheadskip}{-0.5in}
6404 \begin_layout Standard
6405 The spacings around floats can be adjusted by setting these lengths:
6408 \begin_layout Labeling
6409 \labelwidthstring MMMMMMMMMMM
6416 Separation between the text and the top of the float
6419 \begin_layout Labeling
6420 \labelwidthstring MMMMMMMMMMM
6427 Separation between the float and the caption
6430 \begin_layout Labeling
6431 \labelwidthstring MMMMMMMMMMM
6438 Separation between the caption and the following text
6441 \begin_layout Labeling
6442 \labelwidthstring MMMMMMMMMMM
6449 You can make the captions narrower than the surrounding text by adjusting
6451 Best done relative to
6460 \begin_layout Standard
6461 There are also several title page related lengths that you may find useful
6462 if you have a long title or several authors:
6465 \begin_layout Labeling
6466 \labelwidthstring MMMMMMMMMMM
6473 Separation from headers to
6478 \begin_layout Labeling
6479 \labelwidthstring MMMMMMMMMMM
6497 \begin_layout Labeling
6498 \labelwidthstring MMMMMMMMMMM
6512 \begin_layout Labeling
6513 \labelwidthstring MMMMMMMMMMM
6529 \begin_layout Labeling
6530 \labelwidthstring MMMMMMMMMMM
6546 \begin_layout Standard
6547 The last length related command affects all the list environments.
6558 a list environment then all the vertical spacing between the list items
6560 Note that this is a command not a length so it doesn't require
6566 like the stuff mentioned above.
6569 \begin_layout Subsubsection
6573 \begin_layout Standard
6586 commands control whether the logo in the
6590 definition appear on a given page.
6597 in the preamble then none of the foils will have the logo on them.
6598 If you don't want the logo on a particular page place the
6604 directly after the foilhead of that page and the
6610 directly after the next foilhead.
6613 \begin_layout Standard
6614 If you decide to use the
6618 page style setting in the
6621 \begin_inset space ~
6626 dialog you should probably add
6636 to your preamble so headers and footers on landscape pages are correctly
6637 placed when rotated.
6638 This is due to some clashes between the page layouts provided by the
6649 \begin_layout Section
6650 Hollywood (Hollywood spec scripts)
6653 \begin_layout Standard
6659 \begin_layout Subsection
6663 \begin_layout Standard
6664 Getting the format of a Hollywood script right is a
6665 \begin_inset Quotes eld
6669 \begin_inset Quotes erd
6672 It is designed to make the readers focus on content and to be easy and
6673 familiar for the actors to read.
6674 Each page of a script should be one minute of film.
6675 Nothing goes in a script that you cannot see or hear on screen.
6676 The courier 12 pt font should be used throughout.
6680 \begin_layout Subsection
6684 \begin_layout Standard
6685 Speakers' lines should NEVER break in mid-sentence.
6686 If a speaker's lines continue over a page break, repeat the
6690 title followed by (Cont'd).
6693 \begin_layout Subsection
6697 \begin_layout Standard
6702 names as labels then cross-reference the label to insert the name.
6703 The cross-reference dialog will show the current cast of characters.
6704 You can use this to insert the speaker name in narratives also.
6707 \begin_layout Subsection
6708 Paper size and Margins
6711 \begin_layout Standard
6712 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
6715 \begin_layout Subsection
6719 \begin_layout Standard
6720 The following environments are available.
6721 You can use hollywood.bind to get the bind keys shown at the right.
6724 \begin_layout Itemize
6728 \begin_inset Newline newline
6733 Used where nothing else works.
6737 \begin_layout Itemize
6743 \begin_inset space \hfill{}
6751 \begin_inset Newline newline
6754 Usually followed by something like
6755 \begin_inset Quotes eld
6759 \begin_inset Quotes erd
6765 \begin_layout Itemize
6769 \begin_inset space \hfill{}
6773 \begin_inset Newline newline
6778 Introduces a new INTERIOR camera set-up.
6779 Always followed by DAY or NIGHT, or something similar to define the lighting
6781 Everthing on this line in CAPS.
6784 \begin_layout Itemize
6788 \begin_inset space \hfill{}
6792 \begin_inset Newline newline
6797 Introduces a new EXTERIOR camera set-up.
6798 Everthing on this line in CAPS.
6801 \begin_layout Itemize
6805 \begin_inset space \hfill{}
6809 \begin_inset Newline newline
6814 The character speaking.
6817 \begin_layout Itemize
6821 \begin_inset space \hfill{}
6825 \begin_inset Newline newline
6830 Instructions to the speaker.
6831 The () are automatically inserted, but only the ( will show in \SpecialChar LyX
6833 Both will be printed.
6836 \begin_layout Itemize
6840 \begin_inset space \hfill{}
6844 \begin_inset Newline newline
6856 \begin_layout Itemize
6860 \begin_inset space \hfill{}
6864 \begin_inset Newline newline
6869 Camera movement instruction.
6871 \begin_inset space \thinspace{}
6875 \begin_inset space \space{}
6881 \begin_layout Itemize
6885 \begin_inset space \hfill{}
6891 \begin_layout Itemize
6895 \begin_inset space \hfill{}
6901 \begin_layout Itemize
6905 \begin_inset space \hfill{}
6911 \begin_layout Itemize
6915 \begin_inset space \hfill{}
6921 \begin_layout Subsection
6925 \begin_layout Itemize
6929 \begin_layout Itemize
6933 \begin_layout Itemize
6935 \begin_inset space \thinspace{}
6942 \begin_layout Itemize
6947 \begin_layout Itemize
6948 PAN — camera movement
6951 \begin_layout Itemize
6952 INSERT — cut to close-up of
6955 \begin_layout Section
6959 \begin_layout Standard
6962 Panayotis Papasotiriou
6965 \begin_layout Subsection
6969 \begin_layout Standard
6970 The ijmpc package is a set of macros that facilitates electronic manuscript
6973 International Journal of Modern Physics C
6976 Similarly, the ijmpd package is for creating manuscripts to be submitted
6979 International Journal of Modern Physics D
6982 Both journals are published by World Scientific.
6983 The corresponding document classes are named
6992 These files, together with instructions for the authors, can be downloaded
6994 \begin_inset Flex URL
6997 \begin_layout Plain Layout
6999 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
7005 \begin_inset Flex URL
7008 \begin_layout Plain Layout
7010 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
7016 Both packages are modified versions of the standard
7017 \begin_inset Quotes eld
7021 \begin_inset Quotes erd
7024 package, and they are almost (but not exactly) identical.
7025 Most of their features are supported by \SpecialChar LyX
7027 I have used \SpecialChar LyX
7028 successfully to write articles submitted to both journals
7029 without any problem.
7032 \begin_layout Subsection
7036 \begin_layout Standard
7037 As usual, the easiest way to write a paper is to start with a template.
7040 File\SpecialChar menuseparator
7056 This will give an (almost) empty document that includes the most common
7057 fields found in a manuscript.
7058 Simply overwrite the existing text (including the brackets,
7063 You should keep in mind the following remarks.
7066 \begin_layout Enumerate
7068 won't let you change the font size and the page style of the document,
7069 because such modifications are not allowed by both packages.
7072 \begin_layout Enumerate
7073 The language of the document should not be changed.
7074 Before previewing your paper, be sure that the babel package is not used.
7075 To do this, click on
7077 Tools\SpecialChar menuseparator
7088 checkbox in the language settings, and click on
7096 , if you wish to make this change permanent).
7099 \begin_layout Enumerate
7101 \begin_inset Quotes eld
7105 \begin_inset Quotes erd
7108 style must be used to define keywords.
7111 \begin_layout Enumerate
7112 The ijmpc package provides a style named
7113 \begin_inset Quotes eld
7116 Classification Codes
7117 \begin_inset Quotes erd
7120 , which can be used to define classification codes, such as PACS numbers.
7121 Note that this facility is not supported by the ijmpd package.
7124 \begin_layout Enumerate
7125 Several new environments are available:
7126 \begin_inset Quotes eld
7130 \begin_inset Quotes erd
7134 \begin_inset Quotes eld
7138 \begin_inset Quotes erd
7142 \begin_inset Quotes eld
7146 \begin_inset Quotes erd
7150 \begin_inset Quotes eld
7154 \begin_inset Quotes erd
7158 \begin_inset Quotes eld
7162 \begin_inset Quotes erd
7166 \begin_inset Quotes eld
7170 \begin_inset Quotes erd
7174 \begin_inset Quotes eld
7178 \begin_inset Quotes erd
7182 \begin_inset Quotes eld
7186 \begin_inset Quotes erd
7190 \begin_inset Quotes eld
7194 \begin_inset Quotes erd
7198 \begin_inset Quotes eld
7202 \begin_inset Quotes erd
7206 \begin_inset Quotes eld
7210 \begin_inset Quotes erd
7214 \begin_inset Quotes eld
7218 \begin_inset Quotes erd
7222 \begin_inset Quotes eld
7226 \begin_inset Quotes erd
7230 \begin_inset Quotes eld
7234 \begin_inset Quotes erd
7238 Their use is more or less obvious.
7240 supports all these environments; it will use the proper label, text style,
7241 and numbering scheme for each of them.
7244 \begin_layout Enumerate
7245 Both packages use basic citations; the natbib package should not be used.
7247 , citation references are shown as usual; in the output, citations are
7248 shown as superscripts.
7249 If you want to use a citation as normal text, you should use the
7254 \begin_inset space \thinspace{}
7258 \begin_inset space \space{}
7262 \begin_inset Quotes eld
7266 \begin_inset space \space{}
7276 \begin_inset Quotes erd
7282 \begin_layout Enumerate
7284 \begin_inset Quotes eld
7288 \begin_inset Quotes erd
7291 section in both packages.
7292 To put acknowledgments, just use the
7293 \begin_inset Quotes eld
7297 \begin_inset Quotes erd
7303 \begin_layout Enumerate
7304 Appendices may be added to the paper,
7308 the Acknowledgments and
7314 provides a special environment, called
7315 \begin_inset Quotes eld
7319 \begin_inset Quotes erd
7322 which marks the beginning of the appendices.
7323 This environment should be left blank; it just sends a \SpecialChar LaTeX
7324 command, but nothing
7328 \begin_inset Quotes eld
7332 \begin_inset Quotes erd
7335 is printed with blue letters, as a signal that all sections after that
7336 point are appendices.
7337 To write an appendix, use the
7338 \begin_inset Quotes eld
7342 \begin_inset Quotes erd
7347 will number each appendix with capital letters, as required by both journals.
7349 \begin_inset Quotes eld
7353 \begin_inset Quotes erd
7360 be present before the first appendix; if not, all appendices will be numbered
7361 as normal sections in the output.
7364 \begin_layout Enumerate
7365 The ijmpc and the ijmpd packages use the
7369 command to implement table captions.
7370 As a result, a table created by \SpecialChar LyX
7371 is printed correctly, but its caption
7373 However, you can use some \SpecialChar TeX
7374 code to overcome this problem, so that captions
7375 are printed as expected.
7376 To do so, create a float table as usual, remove the caption, and replace
7377 it with the \SpecialChar TeX
7388 (sic); you must also the \SpecialChar TeX
7393 immediately after the tabular material.
7394 Study the example table included in the template files to see how this
7395 trick is implemented.
7396 Alternatively, If you need table captions, you should implement the whole
7401 file, then include this file to the \SpecialChar LyX
7404 Insert\SpecialChar menuseparator
7405 File\SpecialChar menuseparator
7407 \begin_inset space ~
7413 Details on how to create a table float can be found in the files
7421 , included in the corresponding packages.
7424 \begin_layout Subsection
7425 Preparing a paper for submission
7428 \begin_layout Standard
7429 Before you submit your paper you must export the \SpecialChar LyX
7430 document as a \SpecialChar LaTeX
7433 File\SpecialChar menuseparator
7434 Export\SpecialChar menuseparator
7442 \begin_layout Plain Layout
7443 Actually you have the choice between \SpecialChar LaTeX
7444 (plain) and pdflatex.
7445 If you intend to use pdflatex to prepare the paper, you should use the
7446 pdflatex option so that included graphics are converted to PDF format,
7447 ready for use by pdflatex.
7452 , then make the following changes to the resulting
7459 \begin_layout Enumerate
7460 Remove the comment lines before the
7469 \begin_layout Enumerate
7470 Remove everything between (and including) the
7482 commands, except for any commands you specifically put into the \SpecialChar LaTeX
7486 \begin_layout Standard
7491 file should be saved and processed through \SpecialChar LaTeX
7492 as many times as necessary.
7493 You may also want to check the resulting
7500 \begin_layout Subsection
7501 Use of \SpecialChar TeX
7505 \begin_layout Standard
7506 The use of \SpecialChar TeX
7507 code is reduced to two commands, which must be placed at the
7508 top of the document.
7509 If you started writing your paper by using the
7517 template, the \SpecialChar TeX
7518 code needed is already in its place; you usually don't need
7520 You may only modify the first \SpecialChar TeX
7521 code to specify the information printed
7522 to the top of odd and even pages (authors' names and short paper's title,
7524 This \SpecialChar TeX
7525 code must have the form
7529 markboth{Authors' Names}{Short Paper's Title}
7534 \begin_layout Section
7538 \begin_layout Standard
7544 \begin_layout Subsection
7548 \begin_layout Standard
7549 The iopart package provides a document class to create electronic manuscript
7550 submission to the journals published by the Institute of Physics.
7551 Instructions for the authors how to create a paper using the iopart class
7552 can be downloaded together with the iopart package from the site
7553 \begin_inset Flex URL
7556 \begin_layout Plain Layout
7558 ftp://ftp.iop.org/pub/journals/latex2e
7566 \begin_layout Subsection
7570 \begin_layout Standard
7571 The easiest way to write a paper is to start with the file
7575 that is available in \SpecialChar LyX
7576 's examples files folder.
7577 Open this file, save it under a new name, and start writing.
7578 The example file explains how to use the special text environments.
7579 Here are the most important advices:
7582 \begin_layout Itemize
7583 To be able to compile your document to a PDF, PS, or DVI, ensure that the
7586 Use AMS math package
7588 in the document settings under
7595 \begin_layout Itemize
7598 The title environment defines the kind of your paper.
7599 So use one of the following environments for the title:
7602 \begin_inset Separator latexpar
7609 \begin_layout Itemize
7618 \begin_layout Itemize
7627 \begin_layout Itemize
7633 for a Topical review
7636 \begin_layout Itemize
7645 \begin_layout Itemize
7654 \begin_layout Itemize
7660 for a Paper (same as Title)
7663 \begin_layout Itemize
7669 for a Preliminary communication
7672 \begin_layout Itemize
7678 for a Rapid communication
7681 \begin_layout Itemize
7687 for a Letter to the editor
7691 \begin_layout Itemize
7694 All title environments except of
7698 can have an optional short title.
7701 \begin_layout Itemize
7702 There is a general title environment
7706 which is not directly supported by the \SpecialChar LyX
7708 This can be used as \SpecialChar TeX
7709 code when your document doesn't fit into one of the
7713 \begin_layout Standard
7714 For more informations like hints for special table and formula formatting,
7715 look at the IOP author guidelines.
7718 \begin_layout Section
7722 \begin_layout Standard
7725 Panayotis Papasotiriou
7728 \begin_layout Subsection
7732 \begin_layout Standard
7733 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
7734 that facilitates electronic manuscript submission to the journals they
7736 Most known of them (at least in my domain of interest) are
7738 Astrophysics and Space Science
7744 , but there are many others (see a complete list at
7745 \begin_inset Flex URL
7748 \begin_layout Plain Layout
7750 http://www.wkap.nl/jrnllist.htm/JRNLHOME
7756 The Kluwer package may be downloaded from the site
7757 \begin_inset Flex URL
7760 \begin_layout Plain Layout
7762 http://www.wkap.nl/kaphtml.htm/STYLEFILES
7768 A complete user guide is contained in that package (but it can also be
7769 downloaded separately).
7772 \begin_layout Standard
7774 supports many features of the package but not everything.
7775 However, the \SpecialChar TeX
7776 code needed is reduced to some
7777 \begin_inset Quotes eld
7781 \begin_inset Quotes erd
7784 commands of the package (see
7785 \begin_inset space ~
7789 \begin_inset CommandInset ref
7791 reference "subsec:kluwer_peculiarities"
7796 I have recently used \SpecialChar LyX
7797 to write an article submitted to the
7799 Astrophysics and Space Science
7801 without any problem.
7804 \begin_layout Subsection
7808 \begin_layout Standard
7809 The easiest way to write a paper is to start with the Kluwer template file.
7812 File\SpecialChar menuseparator
7824 This will give an (almost) empty document that includes the most common
7825 fields found in a manuscript and a short description of their use.
7826 As in most templates, simply overwrite the existing text (including the
7831 ) with the correct information.
7834 \begin_layout Subsection
7835 Preparing a paper for submission
7838 \begin_layout Standard
7839 As in the AAS\SpecialChar TeX
7840 package, before you submit your paper to a journal you must
7842 \begin_inset Quotes eld
7846 \begin_inset Quotes erd
7852 \begin_layout Enumerate
7853 Export your paper as a \SpecialChar LaTeX
7855 To do this, click on
7857 File\SpecialChar menuseparator
7858 Export\SpecialChar menuseparator
7866 \begin_layout Enumerate
7871 file with a text editor and make the following changes
7872 \begin_inset Separator latexpar
7879 \begin_layout Enumerate
7880 remove the comment lines before the
7889 \begin_layout Enumerate
7890 remove everything between (and including) the
7902 commands, except for any commands you specifically put into the \SpecialChar LaTeX
7906 \begin_layout Standard
7915 \begin_layout Enumerate
7920 file through \SpecialChar LaTeX
7921 as many times as necessary (usually up to three).
7924 \begin_layout Enumerate
7930 \begin_inset space \thinspace{}
7934 \begin_inset space \space{}
7941 , and check if everything is OK (it should, if you didn't make any mistake).
7944 \begin_layout Subsection
7945 \begin_inset Quotes eld
7949 \begin_inset Quotes erd
7952 of the Kluwer package
7953 \begin_inset CommandInset label
7955 name "subsec:kluwer_peculiarities"
7962 \begin_layout Standard
7963 The Kluwer package has the following
7964 \begin_inset Quotes eld
7968 \begin_inset Quotes erd
7974 \begin_layout Enumerate
7975 It is possible to write multiple articles in the same \SpecialChar LaTeX
7980 \begin_layout Plain Layout
7981 I can't imagine any good reason to do this.
7987 Each article must be included in the environment
7988 \begin_inset Quotes eld
7992 \begin_inset Quotes erd
7996 Unfortunately, this environment cannot be omitted, even if you write just
7998 Therefore, each article starts with the command
8004 and, obviously, ends with the command
8011 Although this can be implemented in \SpecialChar LyX
8012 , I didn't included it, since it looks
8013 ugly and can confuse the novice user.
8014 Therefore, you need to enter them directly and mark them as \SpecialChar LaTeX
8017 \begin_inset Quotes eld
8022 \begin_inset Quotes erd
8028 \begin_layout Enumerate
8029 Information given at the beginning of the article (i.
8030 \begin_inset space \thinspace{}
8034 \begin_inset space \space{}
8037 title, subtitle, author, institution, running title, running author, abstract
8038 and keywords) must be included in an environment called
8039 \begin_inset Quotes eld
8043 \begin_inset Quotes erd
8047 This is not implemented in \SpecialChar LyX
8048 , so you must enter title, subtitle etc.
8049 \begin_inset space ~
8052 between two \SpecialChar TeX
8068 \begin_layout Enumerate
8069 According to the user manual, the label of each bibliography item must be
8093 \begin_layout Standard
8098 template takes care of all these
8099 \begin_inset Quotes eld
8103 \begin_inset Quotes erd
8107 If you start a new paper using this template you don't need to do anything
8112 \begin_layout Enumerate
8113 don't delete the \SpecialChar TeX
8114 code included in the template, and
8117 \begin_layout Enumerate
8118 copy the example bibliography item included in the template and modify it
8119 as necessary to enter new bibliography items.
8122 \begin_layout Section
8126 \begin_layout Standard
8132 \begin_layout Subsection
8136 \begin_layout Standard
8137 The \SpecialChar LyX
8140 article (koma-script)
8144 report (koma-script)
8162 correspond to the \SpecialChar LaTeX
8180 \begin_inset space ~
8183 of the Koma-Script family.
8184 They are replacements for the standard document classes
8200 , resp., and fit better to European typography conventions in a number of
8204 \begin_layout Itemize
8205 Standard character size is 11pt in
8207 article (koma-script)
8211 report (koma-script)
8219 letter (koma-script)
8224 \begin_layout Itemize
8225 Headings, labels of the description environment, and a number of elements
8228 letter (koma-script)
8230 document class are set in a bold sans serif font.
8234 \begin_layout Plain Layout
8235 There is a big difference between the bold sans serif old cm fonts and new
8236 ec fonts, especially in the appearance of headings.
8237 In comparison, the ec bold sans serif fonts look a bit thin.
8238 Here the \SpecialChar LaTeX
8247 helps to produce the
8248 \begin_inset Quotes eld
8252 \begin_inset Quotes erd
8255 appearance when using the ec fonts.
8260 The numbering of chapter headings is made in the same way as the numbering
8261 of section headings, that is without the extra line
8262 \begin_inset Quotes eld
8265 Chapter\SpecialChar ldots
8267 \begin_inset Quotes erd
8271 In addition, the appearance of the headings can be modified by using a
8272 number of options (in \SpecialChar LyX
8273 to be entered in the field
8276 \begin_inset space ~
8283 Layout\SpecialChar menuseparator
8290 \begin_layout Itemize
8291 The main means in the Koma-Script document classes to design the type area
8300 (in \SpecialChar LyX
8301 to be entered in the extra class options field in the dialog
8303 Document\SpecialChar menuseparator
8307 They make a clearer modification of page margins possible as do the options
8310 Document\SpecialChar menuseparator
8317 \begin_layout Itemize
8318 The \SpecialChar LaTeX
8319 document classes of the Koma-Script family define a number of additional
8321 Those part of it which makes sense in \SpecialChar LyX
8322 is implemented in corresponding
8326 \begin_layout Standard
8327 Detailed descriptions of the \SpecialChar LaTeX
8328 document classes of the Koma-Script family
8329 can be found in the Koma-Script documentation
8340 \begin_layout Subsection
8341 article (koma-script), report (koma-script), and book (koma-script)
8344 \begin_layout Standard
8345 The document classes
8347 article (koma-script)
8351 report (koma-script)
8361 are implemented in the layout files
8374 They contain all the paragraph types of the corresponding standard document
8387 , resp., partly modified, with the exception of the \SpecialChar LyX
8392 -type, which is replaced by the new
8396 -type having the same functionality.
8401 -Type there is a number of new paragraph types added.
8408 letter (koma-script)
8413 \begin_layout Itemize
8422 : are equivalents to
8430 , resp., additionally inserting an entry in the table of contents.
8439 are not contained in
8441 article (koma-script)
8446 \begin_layout Itemize
8463 , resp., additionally clearing running heads.
8470 article (koma-script)
8476 \begin_layout Plain Layout
8489 report (koma-script)
8491 , but since this is identical to
8495 , is has not been implemented in \SpecialChar LyX
8504 \begin_layout Itemize
8509 : generates a heading directly above the following paragraph in the standard
8510 character size without affecting the structure of the document.
8513 \begin_layout Itemize
8522 are special captions which respect the different space settings needed
8523 for captions placed above or below an element (if you follow strict typographic
8524 rules, you might want to place table captions always above the table).
8525 You can also use the class option
8542 You need at least Koma-Script version 2.8q to use this.
8545 \begin_layout Itemize
8550 : can be used to set a bonmot, e.
8551 \begin_inset space \thinspace{}
8555 \begin_inset space \space{}
8558 at the beginning of a chapter.
8559 If you use the optional argument (
8561 Insert\SpecialChar menuseparator
8563 \begin_inset space ~
8568 ), you can insert the dictum's author there.
8569 Dictum and author are separated by a line.
8570 You need at least Koma-Script version 2.8q to use this.
8577 article (koma-script)
8582 \begin_layout Standard
8583 The following types, together with the standard types
8595 , form the title area of the document.
8596 They must be entered ahead of the first
8597 \begin_inset Quotes eld
8601 \begin_inset Quotes erd
8608 \begin_layout Plain Layout
8609 The corresponding \SpecialChar LaTeX
8610 commands must appear before the
8621 When such a type is used more than once, the latter usage overwrites the
8622 former one, that means, for every type only the latest usage is valid.
8623 The order of the different types however has, like
8635 , no effect on the appearance of the produced document.
8638 \begin_layout Itemize
8643 : produces a centered paragraph above the ordinary title (
8655 ) for the subject of the document.
8658 \begin_layout Itemize
8663 : produces a centered paragraph below the ordinary title (
8675 ) for the publishers' name.
8678 \begin_layout Itemize
8685 report (koma-script)
8691 produces a centered paragraph on its own page behind the title page, or
8694 article (koma-script)
8696 produces a centered paragraph below the ordinary title (
8715 \begin_layout Itemize
8720 : produces a left aligned paragraph above the ordinary title (
8736 ) for a document`s head.
8739 \begin_layout Itemize
8744 : produces in a double-sided print in
8746 report (koma-script)
8752 a left-aligned paragraph at the top of the title page`s back or has no
8753 effect in a single-sided print or in
8755 article (koma-script)
8760 \begin_layout Itemize
8765 : produces in a double-sided print in
8767 report (koma-script)
8773 a left-aligned paragraph at the bottom of the title page`s back or has
8774 no effect in a single-sided print or in
8776 article (koma-script)
8781 \begin_layout Itemize
8786 : produces a special
8787 \begin_inset Quotes eld
8791 \begin_inset Quotes erd
8794 page ahead of the actual document containing a paragraph without special
8798 \begin_layout Standard
8799 The layout files for the document classes
8801 article (koma-script)
8805 report (koma-script)
8816 This is thought of as a place to define your own types.
8821 in your personal layout directory and edit the file!
8824 \begin_layout Subsection
8825 letter (koma-script)
8828 \begin_layout Standard
8832 letter (koma-script)
8834 is implemented in the layout file
8839 It contains all the paragraph types of the corresponding standard document
8844 , partly modified, with the exception of the \SpecialChar LyX
8858 type, which is replaced by the new
8863 In addition, it contains, in contrast to the standard document class, the
8882 Furthermore, there are a number of new letter specific types.
8885 \begin_layout Standard
8886 The appearance of the letter produced by this document class can be controlled
8887 by a number of \SpecialChar LaTeX
8888 commands, which you can put in the \SpecialChar LaTeX
8893 \begin_layout Plain Layout
8894 For example, the standard appearance of the letter`s heading, consisting
8895 of name and address, is quite self-willed.
8897 \begin_inset Quotes eld
8901 \begin_inset Quotes erd
8904 heading is produced by the following \SpecialChar LaTeX
8905 commands in the preamble:
8908 \begin_layout LyX-Code
8918 \begin_layout LyX-Code
8934 \begin_layout LyX-Code
8944 \begin_layout LyX-Code
8964 A detailed German description of such \SpecialChar LaTeX
8965 commands can be found in the Koma-Script
8971 With it, the letter's author can produce his personal letter layout.
8974 \begin_layout Standard
8983 define the beginning of the letter and must be used in every letter.
8984 To emphasize them in the \SpecialChar LyX
8985 document class, they are marked with the letter
8995 \begin_inset space ~
8999 It is possible to write any number of letters in one file.
9004 type produces a new letter using the same addressee and a
9008 type produces a new addressee.
9025 are ordinary paragraph types and can also be used several times in one
9026 and the same letter.
9029 \begin_layout Itemize
9034 : produces a paragraph for the addressee and implicitly defines the beginning
9038 \begin_layout Itemize
9043 : produces a paragraph for the form of address and implicitly produces a
9047 \begin_layout Itemize
9052 : produces a paragraph for a close.
9055 \begin_layout Itemize
9060 : produces a paragraph for a postscript.
9063 \begin_layout Itemize
9068 : produces a paragraph for a distribution list.
9071 \begin_layout Itemize
9076 : produces a paragraph for enclosures.
9079 \begin_layout Standard
9120 are input types provided with a label to enter information, which will
9121 be processed by the document class.
9125 \begin_layout Plain Layout
9126 It could be seen as a matter of inconsequence, that the types
9134 described above are not such input types as well.
9135 Because of the special meaning of those types, however, I have implemented
9136 them as ordinary paragraph types with a one letter mark in the left margin.
9137 Moreover, it would affect my feeling of symmetry, if the
9145 type had such a serious different appearance.
9150 The types must be used ahead of the corresponding
9157 \begin_layout Standard
9158 An implementation of these types in a WYSIWYG fashion does not seem to make
9159 sense, because the real appearance of the produced letter does not only
9160 depend on the usage of the particular type, but also on other factors.
9161 For example, a signature entered in the
9165 type will in the standard behavior appear in the produced letter only,
9166 when in the same letter also a
9171 The entered value of the
9175 type will in the standard behavior not appear in the produced letter at
9177 The possibility to design the letter`s heading freely is already indicated
9178 in a footnote above.
9181 \begin_layout Standard
9182 The input types can also be used as empty paragraphs.
9184 \begin_inset space \thinspace{}
9188 \begin_inset space \space{}
9200 type is not used at all, in the standard behavior the value of the
9204 type is used as signature, whereas if an empty
9208 type is used, no signature value is defined.
9211 \begin_layout Standard
9212 By using the input types it is possible to write a letter template, containing
9213 filled input types with your personal dates (name, address, etc.) and empty
9214 input types for other dates you want to enter.
9217 \begin_layout Itemize
9222 : sender's name, in the standard behavior appears as a centered paragraph
9223 in small caps in the letter`s heading.
9226 \begin_layout Itemize
9231 : sender's signature, in the standard behavior appears below the
9240 type is used, the value of the
9244 type appears instead.
9247 \begin_layout Itemize
9252 : sender's address, in the standard behavior appears in a centered paragraph
9253 in the letter`s heading below the sender's name.
9256 \begin_layout Itemize
9261 : sender's telephone number, in the standard behavior only sets the \SpecialChar LaTeX
9272 \begin_layout Itemize
9277 : place of the letter`s making.
9280 \begin_layout Itemize
9285 : date of the letter`s making.
9294 , in the standard behavior, produce the place and the date in a right-aligned
9295 line below the addressee's field.
9300 type is used, neither place nor date appear, independent of the value of
9310 type is used, the date of the letter `s production is used.
9313 \begin_layout Itemize
9318 : sender`s back address, in the standard behavior appears above the addressee's
9319 field in a small sans serif font.
9322 \begin_layout Itemize
9327 : special mail information, in the standard behavior appears underlined
9328 above the addressee's field below the back address.
9331 \begin_layout Itemize
9336 : additional information, in the standard behavior appears on right side
9337 below the addressee`s field.
9340 \begin_layout Itemize
9345 : the letter's title, in the standard behavior appears in a big, bold, sans
9346 serif font above the subject.
9349 \begin_layout Itemize
9354 : the letter's subject, in the standard behavior appears in a bold font
9362 \begin_layout Standard
9383 produce a business letter like line above the
9387 line containing the fields
9388 \begin_inset Quotes eld
9392 \begin_inset Quotes erd
9396 \begin_inset Quotes eld
9400 \begin_inset Quotes erd
9404 \begin_inset Quotes eld
9408 \begin_inset Quotes erd
9412 \begin_inset Quotes eld
9416 \begin_inset Quotes erd
9420 \begin_inset Quotes eld
9424 \begin_inset Quotes erd
9428 \begin_inset Quotes eld
9432 \begin_inset Quotes erd
9436 For the date field, the value of the
9442 \begin_inset Quotes eld
9445 business letter types
9446 \begin_inset Quotes erd
9449 is used, the value of the
9453 type however does not appear, but only the \SpecialChar LaTeX
9461 The ordinary output of place and date in a right-aligned line below the
9462 addressee`s field is suppressed.
9463 The types are implemented as input types provided with a label and must
9464 be used ahead of the corresponding
9471 \begin_layout Itemize
9479 \begin_layout Itemize
9487 \begin_layout Itemize
9495 \begin_layout Itemize
9503 \begin_layout Itemize
9511 \begin_layout Subsection
9512 The new letter class: letter (koma-script v.2)
9515 \begin_layout Standard
9521 \begin_layout Standard
9522 \begin_inset VSpace medskip
9528 \begin_layout Standard
9530 Koma-Script version 2.8 has introduced a new letter class
9534 which supersedes the now unsupported
9539 It has — on the \SpecialChar LaTeX
9540 side — a completely new interface and is not compatible
9542 Therefore, \SpecialChar LyX
9543 supports both, though it is recommended you use the new class.
9546 \begin_layout Standard
9547 This class covers the same functionality as
9549 letter (koma-script),
9556 (receiver's address, same as
9573 will start a new letter (i.
9574 \begin_inset space \thinspace{}
9578 \begin_inset space \space{}
9581 you can write several letters per document).
9582 New elements are sender's
9598 and the possibility to use a
9604 Insert\SpecialChar menuseparator
9610 \begin_layout Standard
9611 The biggest improvement is, though, that the letter's layout is configurable
9612 to meet almost any needs.
9613 This can be done via the preamble or with a special style file (Letter
9614 Class Option, extension
9618 ), that will be read in as a class option.
9622 \begin_layout Plain Layout
9623 The KOMA package comes with some default
9628 There is, for instance, a
9632 file that follows german typesetting rules, or a
9636 that provides the default layout of the old
9641 The latter can be loaded with the class option
9647 Layout\SpecialChar menuseparator
9648 Document\SpecialChar menuseparator
9660 template that is included in \SpecialChar LyX
9662 A detailed description is to be found in the Koma-Script documentation
9670 \begin_layout Subsection
9674 \begin_layout Standard
9675 Visualizing the Koma-Script document classes in \SpecialChar LyX
9676 , the \SpecialChar LyX
9677 internals cause some
9681 \begin_layout Itemize
9682 The chapter number of a
9686 type appears on a line of its own above the chapter heading instead of
9687 appearing in the same line ahead of it.
9688 The cause for that is the \SpecialChar LyX
9689 internal behavior for the labeltype
9696 \begin_layout Itemize
9697 The headings of the types
9706 \begin_inset Quotes eld
9710 \begin_inset Quotes erd
9714 table of contents, but not in the \SpecialChar LyX
9717 Document\SpecialChar menuseparator
9719 \begin_inset space ~
9723 \begin_inset space ~
9731 \begin_layout Itemize
9736 document class appear in a skip separation mode, not indented.
9737 This is the standard behavior, no special \SpecialChar LaTeX
9738 commands are needed for that.
9741 Document\SpecialChar menuseparator
9744 dialog the corresponding radio button indicates
9753 value always has the effect that extra \SpecialChar LaTeX
9754 commands are inserted in the document
9755 to produce the gap, which is not what is wanted in this case.
9758 \begin_layout Section
9762 \begin_layout Standard
9768 \begin_layout Subsection
9772 \begin_layout Standard
9773 Memoir is a very powerful and constantly evolving class.
9774 It has been designed with regard to fictional and non-fictional literature.
9775 Its aim is to let the user have maximum control over the typesetting of
9777 Memoir is based on the standard book class, but it can also emulate the
9778 article class (see below).
9781 \begin_layout Standard
9782 Peter Wilson, the developer of Memoir, is known as the author of lots of
9783 useful packages in the \SpecialChar LaTeX
9785 Most of them have been merged with Memoir.
9786 Therefore, it is much easier to layout the table of contents, appendices,
9787 chapter designs and such.
9789 , though, does not support all of these goodies natively.
9790 Some of them might be added to forthcoming releases
9794 \begin_layout Plain Layout
9795 You are invited to send suggestions to
9796 \begin_inset Flex URL
9799 \begin_layout Plain Layout
9801 lyx-devel@lists.lyx.org
9811 , lots will probably never be supported, due to the limitations of \SpecialChar LyX
9813 Of course you can still use all features with the help of some native \SpecialChar LaTeX
9815 commands (\SpecialChar TeX
9820 \begin_layout Plain Layout
9825 \begin_layout Plain Layout
9835 \begin_inset space ~
9839 \begin_inset CommandInset ref
9841 reference "sec:Inserting-TeX-Code"
9851 In this section, we can only list those features that are natively supported
9854 For detailed descriptions (and for the rest of features) we recommend you
9855 have a look at the detailed manual of the Memoir class
9859 \begin_layout Plain Layout
9864 \begin_layout Plain Layout
9874 \begin_inset Flex URL
9877 \begin_layout Plain Layout
9879 CTAN:/macros/latex/memoir/memman.pdf
9889 , which is not only a user guide for the class, but also both a comprehensive
9890 description on good typesetting and a superb example for good typesetting
9894 \begin_layout Subsection
9895 Basic features and restrictions
9898 \begin_layout Standard
9899 Memoir supports basically all features of the standard book classes.
9900 There are, however, some differences, as follows:
9903 \begin_layout Description
9905 \begin_inset space ~
9908 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
9911 \begin_layout Description
9913 \begin_inset space ~
9916 style: The fancy page style is not supported, due to a command clash between
9917 Memoir and the fancyhdr package (they both define a command with the same
9918 name, which confuses \SpecialChar LaTeX
9920 Instead, Memoir comes with a number of its own page styles (see
9922 Layout\SpecialChar menuseparator
9923 Document\SpecialChar menuseparator
9925 \begin_inset space ~
9931 If you want to use these for the chapter pages, you have to use the command
9938 in the main text or in preamble (e.
9939 \begin_inset space \thinspace{}
9943 \begin_inset space \space{}
9950 chapterstyle{companion}
9955 \begin_layout Description
9956 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
9957 optional argument in the standard classes.
9958 With this, you can specify an alternative version of the title for the
9959 table of contents and the headers (for instance, if the title is too long).
9961 , you can do this via
9963 Insert\SpecialChar menuseparator
9965 \begin_inset space ~
9970 at the beginning of a chapter/section.
9971 Memoir features a second optional argument and thus separates the table
9972 of contents from the header.
9973 You can define three variants of a title with this: one for the main text,
9974 one for the table of contents, and one for the headers.
9975 Simply insert two optional arguments if you need this feature, the first
9976 one containing the short title for the Table of Contents, the second one
9977 containing an alternative short title for the headers.
9980 \begin_layout Description
9981 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
9982 of contents, the list of figures and the list of table start a new page
9984 Memoir does not follow this route.
9985 You have to insert a page break yourself, if you want to have one.
9988 \begin_layout Description
9989 Titlepage: For some unknown reason, Memoir uses pagination on the title
9990 page (in the standard classes, title pages are
9991 \begin_inset Quotes eld
9995 \begin_inset Quotes erd
9999 If you want an empty title page, type
10003 aliaspagestyle{title}{empty}
10008 \begin_layout Description
10009 Article: With the class option
10015 Layout\SpecialChar menuseparator
10016 Document\SpecialChar menuseparator
10018 \begin_inset space ~
10023 ), you can emulate article style.
10024 That is, counters (footnotes, figures, tables etc.) will not be reset on
10025 new chapters, chapters don't start a new page (but are—in contrary to
10026 \begin_inset Quotes eld
10030 \begin_inset Quotes erd
10033 article classes—still allowed), parts, though, use their own page, as in
10037 \begin_layout Description
10038 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
10039 font commands, which have been used in the old \SpecialChar LaTeX
10041 \begin_inset space \thinspace{}
10045 \begin_inset space \space{}
10061 It produces an error and stops \SpecialChar LaTeX
10062 whenever such a command appears.
10067 reallows the commands and spits out warnings instead (which does at least
10068 not stop \SpecialChar LaTeX
10070 Since a lot of packages and particularly Bib\SpecialChar TeX
10071 style files are still using
10072 those commands, we have decided to use this option by default.
10075 \begin_layout Subsection
10079 \begin_layout Standard
10080 We will only describe the features supported by \SpecialChar LyX
10081 (which is not much currently).
10082 Please consult the Memoir manual
10086 \begin_layout Plain Layout
10091 \begin_layout Plain Layout
10101 \begin_inset Flex URL
10104 \begin_layout Plain Layout
10106 CTAN:/macros/latex/memoir/memman.pdf
10119 \begin_layout Description
10120 Abstract: You may wonder why an abstract is an extra feature.
10121 Well, it is in book class.
10122 Usually books don't have abstracts.
10123 Memoir, however, has.
10124 You can use it wherever and how often you like.
10127 \begin_layout Description
10128 Chapterprecis: You may know this older typesetting style: The contents of
10129 a chapter are summarized below the title and also in the table of contents
10131 \begin_inset space \thinspace{}
10135 \begin_inset space \space{}
10140 Our hero arrives in Troia; he loses some friends; he finds others
10143 Chapterprecis does exactly this.
10144 It is therefore only sensible below a chapter.
10147 \begin_layout Description
10148 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
10149 The epigraph environment provides an elegant way of typesetting such a
10151 The motto itself (text) and its author (source) are divided by a short
10153 Unfortunately, we have to fool \SpecialChar LyX
10154 a bit here again, since the environment
10155 needs two arguments (text and source).
10156 In this case, we have to use curly brackets (in \SpecialChar TeX
10157 mode) between the two
10168 <author of the slogan>.
10171 \begin_layout Description
10172 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
10173 complex figurative poems).
10175 can only support a few of them.
10176 One is poemtitle, which is a centered title for poems, which will also
10177 be added to the table of contents (verse is the standard environment for
10179 Memoir has some enhanced versions of verse, but you need to use \SpecialChar TeX
10181 because they have to be nested inside regular verse environments, which
10182 is not possible with \SpecialChar LyX
10186 \begin_layout Description
10187 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
10190 \begin_layout Section
10191 Article (mwart), book (mwbk) and report (mwrep)
10192 \begin_inset Argument status
10195 \begin_layout Plain Layout
10208 \begin_layout Standard
10214 \begin_layout Standard
10215 The \SpecialChar LyX
10232 correspond to the \SpecialChar LaTeX
10246 They are replacements for the standard document classes
10258 , resp., and fit better to Polish typography conventions in a number of points.
10262 \begin_layout Standard
10266 \begin_layout Itemize
10267 Unnumbered titles (with star, e.
10268 \begin_inset space \thinspace{}
10272 \begin_inset space \space{}
10279 ) are added into table of contents,
10282 \begin_layout Itemize
10283 Additional page styles:
10284 \begin_inset Separator latexpar
10291 \begin_layout Description
10292 uheadings header with separated lines,
10295 \begin_layout Description
10296 myheadings custom header, contents headers via commands:
10311 \begin_layout Description
10312 myuheadings custom header with separated lines,
10315 \begin_layout Description
10316 outer page number is placed on outer side of page
10320 \begin_layout Itemize
10322 \begin_inset Separator latexpar
10329 \begin_layout Description
10330 rmheadings serif titles — default,
10333 \begin_layout Description
10334 sfheadings sansserif titles,
10337 \begin_layout Description
10338 authortitle on title page first placed is author next title — default,
10341 \begin_layout Description
10342 titleauthor on title page first placed is title next author,
10345 \begin_layout Description
10346 withmarginpar reserve place on page for margins.
10350 \begin_layout Section
10354 \begin_layout Standard
10359 provides an alternative to the standard
10364 It provides similar functionality, but you might prefer this layout with
10365 sans serif sections, headings, and more.
10368 \begin_layout Section
10369 Rev\SpecialChar TeX
10373 \begin_layout Standard
10379 \begin_layout Standard
10380 \begin_inset VSpace bigskip
10386 \begin_layout Standard
10391 \begin_inset space ~
10396 textclass works with the American Physical Sociey's Rev\SpecialChar TeX
10398 \begin_inset Formula $\beta$
10401 release of May, 1999) class.
10404 \begin_layout Standard
10410 textclass, which works with Rev\SpecialChar TeX
10412 However, v3.1 is basically obsolete, as it works with \SpecialChar LaTeX
10414 That means that it doesn't interact very well with \SpecialChar LyX
10415 , which requires \SpecialChar LaTeX2e
10417 it has been kludged to work.
10418 Since Rev\SpecialChar TeX
10419 4.0 has been designed to work much more cleanly with \SpecialChar LaTeX2e
10424 Rev\SpecialChar TeX
10426 \begin_inset space ~
10431 textclass should also be pretty easy to use.
10434 \begin_layout Standard
10435 These documents are supposed to be used in
10439 to the Rev\SpecialChar TeX
10440 4.0 documents, so we don't describe any of the special Rev\SpecialChar TeX
10442 and assume you'll know what to put in the preamble if necessary.
10445 \begin_layout Subsection
10449 \begin_layout Standard
10450 All you need to do is install Rev\SpecialChar TeX
10451 4, as described in the package's README
10453 The package can be found at The Rev\SpecialChar TeX
10455 \begin_inset Flex URL
10458 \begin_layout Plain Layout
10460 http://publish.aps.org/revtex4/
10466 Install it somewhere that \SpecialChar LaTeX
10468 Test it by trying to \SpecialChar LaTeX
10469 a short Rev\SpecialChar TeX
10470 4 document in some random directory (i.
10471 \begin_inset space \thinspace{}
10475 \begin_inset space \space{}
10478 not the directory where you installed the class file.) Then, if you reconfigure
10480 , it will find the class file and let you use the Rev\SpecialChar TeX
10484 \begin_layout Standard
10485 Probably the easiest way to get started is either to import a Rev\SpecialChar TeX
10494 \begin_inset space ~
10499 template, found in the templates directory.
10502 \begin_layout Subsection
10506 \begin_layout Standard
10507 Optional arguments to
10514 \begin_inset Quotes eld
10518 \begin_inset Quotes erd
10522 \begin_inset Quotes eld
10526 \begin_inset Quotes erd
10532 \begin_inset space ~
10540 \begin_inset space ~
10546 Remember that in Rev\SpecialChar TeX
10547 , at least one optional argument is required!
10550 \begin_layout Standard
10551 Other preamble matter, like
10558 \begin_inset space ~
10565 \begin_inset space ~
10570 dialog, also as usual.
10573 \begin_layout Subsection
10577 \begin_layout Standard
10578 The layouts basically correspond to the commands in Rev\SpecialChar TeX
10580 For example, the Email layout corresponds to
10587 Note that (at least as of Rev\SpecialChar TeX
10596 layouts are exactly equivalent, so you shouldn't need to use both.
10600 \begin_layout Plain Layout
10601 In case you're curious, both were included so that
10605 would be able to translate both
10625 \begin_layout Subsection
10629 \begin_layout Standard
10630 There are a couple of important unique aspects of Rev\SpecialChar TeX
10631 4 which might cause
10632 bugs that will be even more confusing in \SpecialChar LyX
10636 \begin_layout Standard
10637 In Rev\SpecialChar TeX
10655 The \SpecialChar LyX
10656 equivalent is that there is a separate Thanks layout.
10661 write footnotes in the
10665 layout, or weird things may happen.
10666 See the Rev\SpecialChar TeX
10667 4 documentation for more details.
10670 \begin_layout Standard
10674 \begin_inset space ~
10682 \begin_inset space ~
10691 layouts must be placed
10699 layout and the corresponding
10716 , the \SpecialChar LaTeX
10720 \begin_layout Subsection
10724 \begin_layout Standard
10725 The main problem with this layout is that you can't use the optional arguments
10726 to layouts like Email and Title.
10727 (The problem is not unique to this layout; you can't use optional arguments
10728 to the Section layouts either.) This means that after you export that file
10729 to \SpecialChar LaTeX
10730 (which you'll need to do eventually to send it in to APS), you'll need
10731 to edit the \SpecialChar LaTeX
10732 file with a text editor to add the optional arguments to set,
10734 \begin_inset space \thinspace{}
10738 \begin_inset space \space{}
10741 the running title for the page headers.
10742 Lacking these layouts makes the
10748 (and the equivalent
10754 ) useless, so the corresponding layouts don't exist, and will have to be
10759 \begin_layout Plain Layout
10764 actually, \SpecialChar LyX
10765 1.3.0 supports some forms of optional arguments, but this layout
10766 has not been updated yet to take advantage of it.
10774 \begin_layout Section
10775 Springer Journals (
10782 \begin_layout Standard
10788 \begin_layout Subsection
10792 \begin_layout Standard
10793 These are the layout files for some of the journal formats used by Springer
10794 Verlag and listed on
10795 \begin_inset Flex URL
10798 \begin_layout Plain Layout
10800 http://www.springer.de/author/tex/help-journals.html
10805 , where you should also go to fetch the class files (yes, these are \SpecialChar LaTeX2e
10807 It is a modular system: the things common to all journals are implemented
10812 , which journal-specific layout files (such as, e.
10813 \begin_inset space \thinspace{}
10817 \begin_inset space \space{}
10824 for Journal of Geodesy) can include.
10827 \begin_layout Standard
10828 This means that implementing support for any other Springer journal on this
10829 list is as simple as writing your own
10837 file following the outline given in
10845 \begin_layout Standard
10846 It is reasonably well tested only for the Journal of Geodesy.
10855 come with the standard \SpecialChar LyX
10857 Install the relevant class file (downloaded from Springer) in a proper
10858 directory, reconfigure \SpecialChar LaTeX
10859 (in the te\SpecialChar TeX
10864 , as root if necessary — doesn't \SpecialChar LyX
10865 take care of this?), reconfigure \SpecialChar LyX
10870 \begin_layout Subsection
10874 \begin_layout Standard
10875 A large number of theorem-like styles —
10887 \begin_layout Standard
10890 Headnote, Dedication, Subtitle, Running_\SpecialChar LaTeX
10891 _Title, Author_Running, Institute,
10892 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
10895 See the Springer class file documentation for details.
10898 \begin_layout Subsection
10902 \begin_layout Itemize
10914 \begin_layout Itemize
10917 Probability Theory and Related Fields
10923 — Jean-Marc Lasgouttes
10926 \begin_layout Standard
10927 Add your own, it isn't so hard!
10930 \begin_layout Subsection
10934 \begin_layout Standard
10935 These files are partly based on the older
10939 , which was again based on a tinkered-with version of an old \SpecialChar LaTeX
10941 file from Springer.
10946 layout, are now defunct.
10947 Jean-Marc Lasgouttes helped out big in making me find my way around the
10949 layout file mechanism.
10952 \begin_layout Subsection
10956 \begin_layout Standard
10958 But probably less than in the old hacked-\SpecialChar LaTeX
10966 \begin_layout Standard
10968 \begin_inset space \thinspace{}
10971 g.: does not display the number for theorem-like layouts, just #.
10974 \begin_layout Section
10977 Sli\SpecialChar TeX
10981 \begin_inset CommandInset label
10990 \begin_layout Standard
10998 \begin_layout Subsection
11002 \begin_layout Standard
11003 This section describes how to use \SpecialChar LyX
11004 to make slides for overhead projectors.
11005 There are two document classes that can do this: the default slides class
11008 Foil\SpecialChar TeX
11012 This section documents the former.
11015 \begin_layout Standard
11016 I'm going to say this again, nice and clear, so that there's no misunderstanding
11020 \begin_layout Standard
11021 \begin_inset VSpace bigskip
11027 \begin_layout Standard
11031 This section documents the class
11032 \begin_inset Quotes eld
11040 \begin_inset Quotes erd
11048 \begin_layout Standard
11049 \begin_inset VSpace bigskip
11055 \begin_layout Standard
11056 If you're looking for the documentation for
11057 \begin_inset Quotes eld
11062 slides (Foil\SpecialChar TeX
11066 \begin_inset Quotes erd
11069 , check out section
11070 \begin_inset space ~
11074 \begin_inset CommandInset ref
11076 reference "sec:foiltex"
11086 \begin_inset Quotes eld
11091 slides (Foil\SpecialChar TeX
11095 \begin_inset Quotes erd
11098 ] is actually somewhat better than the default
11106 \begin_layout Plain Layout
11108 or so I've been told repeatedly by its advocates.
11109 Having never used it, I have no idea if this claim is true or not.
11114 which this section documents.
11117 \begin_layout Standard
11118 This class is the \SpecialChar LaTeX2e
11119 improvement of the old
11121 Sli\SpecialChar TeX
11125 Every \SpecialChar LaTeX2e
11126 distribution includes this class [which I'll just refer to as
11127 \begin_inset Quotes eld
11135 \begin_inset Quotes erd
11138 from now on], so you're bound to have it.
11139 As I noted earlier, there are other classes, such as
11143 , which also produce slides for overhead projectors and do a better job
11145 However, there are some things which
11149 can do which the others can't, such as generate overlays.
11150 Read on to learn more!
11153 \begin_layout Subsection
11155 \begin_inset CommandInset label
11157 name "sec:slidesetup"
11164 \begin_layout Standard
11165 Obviously, to use this document class, you need to select
11166 \begin_inset Quotes eld
11174 \begin_inset Quotes erd
11177 from the class list in the
11179 Document\SpecialChar menuseparator
11183 There are some other special things you should know about this class:
11186 \begin_layout Itemize
11187 Don't bother changing the options
11192 They're not supported by the
11199 \begin_layout Itemize
11203 \begin_inset space ~
11208 behaves a bit differently for this class.
11209 The possible choices and what they do are as follows:
11210 \begin_inset Separator latexpar
11217 \begin_layout Description
11222 The final output contains page numbers in the lower right corner.
11225 \begin_layout Description
11234 , but also prints out any time markers you've put in.
11235 This is the default.
11238 \begin_layout Description
11243 The final output contains no page numbers, time markers, or alignment markers.
11247 \begin_layout Itemize
11252 class has an extra option:
11258 \begin_inset Quotes eld
11266 \begin_inset Quotes erd
11269 in the extra class options.
11270 \begin_inset Separator latexpar
11277 \begin_layout Standard
11278 Using this options allows you to add time markers to
11284 \begin_inset space ~
11288 \begin_inset CommandInset ref
11290 reference "sec:slideNote"
11298 \begin_layout Standard
11299 You can also use the template file
11300 \begin_inset Quotes eld
11308 \begin_inset Quotes erd
11311 to automatically set up a document to use the
11317 File\SpecialChar menuseparator
11319 \begin_inset space ~
11323 \begin_inset space ~
11328 to open your new document].
11329 The template file also contains some examples of the special paragraph
11330 environments used by this class.
11331 I'll describe those next.
11334 \begin_layout Subsection
11335 Paragraph Environments
11338 \begin_layout Subsubsection
11339 Supported Environments
11342 \begin_layout Standard
11343 The first thing you'll notice when you start up a new
11347 document is the font size and type: it's the equivalent of the size
11348 \begin_inset Quotes eld
11356 \begin_inset Quotes erd
11362 \begin_inset space ~
11368 This is also what's used in the output.
11370 \begin_inset Quotes eld
11374 \begin_inset Quotes erd
11377 to remind you that this is a slide.
11378 Your final slides will use a larger font; ergo, you'll have less space.
11379 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
11382 \begin_layout Standard
11383 The next thing that becomes obvious is the changes to the paragraph environment
11384 pull-down box [at the far-left end of the toolbar].
11385 Most of the paragraph environments you're used to seeing are missing.
11386 There are also five new ones.
11391 class itself only supports certain paragraph environments:
11394 \begin_layout Itemize
11400 \begin_layout Itemize
11406 \begin_layout Itemize
11412 \begin_layout Itemize
11418 \begin_layout Itemize
11424 \begin_layout Itemize
11430 \begin_layout Itemize
11436 \begin_layout Itemize
11442 \begin_layout Itemize
11448 \begin_layout Itemize
11455 \begin_layout Itemize
11461 \begin_layout Standard
11462 All of the other standard environments, including the section-heading environmen
11463 ts, aren't used in the
11470 \begin_layout Standard
11471 On the other hand, you'll notice the following new environments:
11474 \begin_layout Itemize
11480 \begin_layout Itemize
11486 \begin_layout Itemize
11492 \begin_layout Itemize
11498 \begin_layout Itemize
11504 \begin_layout Standard
11505 These five are kind of quirky, due to a
11506 \begin_inset Quotes eld
11510 \begin_inset Quotes erd
11513 in \SpecialChar LyX
11515 You see, \SpecialChar LyX
11516 doesn't permit you to nest any other paragraph environment into
11517 an empty environment.
11518 Now, that's fine and dandy, but it means that you wouldn't be able to start
11519 a slide with anything except plain text.
11520 To deal with this, I've performed a little
11521 \begin_inset Quotes eld
11526 \begin_inset Quotes erd
11532 \begin_layout Subsubsection
11533 Quirks of the New Environments
11534 \begin_inset CommandInset label
11536 name "sec:slideQuirk"
11543 \begin_layout Standard
11544 All five of the new paragraph environments are somewhat quirky due to inherent
11545 limitiations in the current version of \SpecialChar LyX
11547 As I just mentioned, \SpecialChar LyX
11548 forbids environments that begin with another environment.
11549 To get around this, the
11553 environment isn't a paragraph environment as described in the
11561 \begin_layout Standard
11562 You should consider
11575 \begin_inset Quotes eld
11578 pseudo-environments.
11579 \begin_inset Quotes erd
11582 They look like a section heading or a
11583 \begin_inset Quotes eld
11591 \begin_inset Quotes erd
11594 but really begin a [and, if necessary, end the previous] paragraph environment.
11604 \begin_inset Quotes eld
11608 \begin_inset Quotes erd
11611 These two perform some action.
11614 \begin_layout Standard
11615 A common feature of all five environments,
11635 , is a rather long-ish label.
11636 The text following this label — ordinarily the contents of the paragraph
11637 environment — is utterly irrelevant for
11659 completely ignores it.
11660 In fact, you can leave these five environments completely empty.
11664 \begin_layout Standard
11669 to put any text after the rather long-ish label, you might want to.
11670 This could be a short description of the contents of the
11675 In that case, enter your descriptive comment and hit
11679 as you normally would.
11682 \begin_layout Standard
11683 If, on the other hand, you don't want to enter any descriptive text, you'll
11684 hit another \SpecialChar LyX
11687 , like nature, abhors a vacuum, and will not let you start a new paragraph
11688 environment until you put something in the old one.
11692 \begin_layout Itemize
11693 Start entering the text that will
11721 \begin_layout Itemize
11722 Now move to the beginning of that paragraph.
11726 \begin_layout Itemize
11735 \begin_layout Itemize
11736 Finally, change this new, empty paragraph to a
11760 \begin_layout Standard
11761 Some future version of \SpecialChar LyX
11762 will, hopefully, resolve this quirkiness\SpecialChar ldots
11766 \begin_layout Subsection
11767 Making a Presentation with
11780 \begin_layout Subsubsection
11788 \begin_layout Standard
11789 If you're expecting this section to teach you how to actually make a presentatio
11790 n, you'll be sorely disappointed.
11791 Naturally, I'll describe all of the ways the
11795 class can assist you in preparing the materials for a presentation.
11796 Filling in the contents, however, is up to you.
11801 the \SpecialChar LyX
11805 \begin_layout Standard
11810 environment [in the manner described in section
11811 \begin_inset space ~
11815 \begin_inset CommandInset ref
11817 reference "sec:slideQuirk"
11821 ] tells \SpecialChar LyX
11822 to begin a new slide [duh].
11823 The label for this environment/
11824 \begin_inset Quotes erd
11828 \begin_inset Quotes erd
11832 \begin_inset Quotes eld
11836 \begin_inset Quotes erd
11839 in cool blue, followed by the label,
11840 \begin_inset Quotes eld
11844 \begin_inset Quotes erd
11848 Any text or paragraph environments that follow this one go on the new slide.
11852 \begin_layout Standard
11853 Slides are probably the only time you'll need to forcibly end pages in \SpecialChar LyX
11855 (this can be specified in the
11860 In fact, you'll want to, once you finish entering the contents of one slide.
11861 If you've entered more text than can physically fit on a slide, the extra
11862 overflows onto a new slide.
11863 I don't recommend doing this, however, since the overflow slide won't have
11864 any page number on it.
11865 Furthermore, it may interfere with any
11869 you've made to accompany the oversized
11876 \begin_layout Standard
11885 environments work the same way as the
11890 They both create an
11891 \begin_inset Quotes eld
11895 \begin_inset Quotes erd
11898 followed by a label [
11899 \begin_inset Quotes eld
11903 \begin_inset Quotes erd
11907 \begin_inset Quotes eld
11911 \begin_inset Quotes erd
11915 The color is a stunning magenta instead of blue, and the
11916 \begin_inset Quotes eld
11920 \begin_inset Quotes erd
11923 will look different, in style and in length.
11924 The label fonts of all three also differ from one another.
11927 \begin_layout Standard
11932 , if the contents of a
11940 exceed the physical size of a slide or sheet of paper, the extra will overflow
11942 Again, you should avoid this.
11943 It defeats the whole purpose of
11954 \begin_layout Subsubsection
11964 \begin_layout Standard
11969 is a slide that sits atop another slide.
11970 Perhaps you wish to discuss a figure on the main
11974 before displaying the text associated with it.
11975 One way to accomplish this is tape a flap of dark paper over the part of
11980 you want to display later.
11981 This method fails, however, if you wish to overlap one graph with another,
11983 You would then have to fumble while speaking to align the two separate,
11988 s to align the two graphs.
11993 environment in both cases makes life much easier.
11996 \begin_layout Standard
12001 receives the page number of its
12002 \begin_inset Quotes eld
12006 \begin_inset Quotes erd
12014 \begin_inset Quotes eld
12022 \begin_inset Quotes erd
12029 \begin_layout Plain Layout
12030 Presumably, mutliple
12035 \begin_inset Quotes eld
12043 \begin_inset Quotes erd
12047 \begin_inset Quotes eld
12055 \begin_inset Quotes erd
12059 \begin_inset Quotes eld
12067 \begin_inset Quotes erd
12071 \begin_inset space ~
12074 appended to the page number of the parent
12084 Clearly, you want the contents of both the
12092 to each fit on a single physical slide! You should probably consider an
12098 \begin_inset Quotes eld
12102 \begin_inset Quotes erd
12110 Indeed, the \SpecialChar LyX
12115 class provides a visual cue for this: the label at the start of an
12119 is shorter than that at the start of a
12124 Lastly, when you generate printable output, you'll find alignment markers
12125 in all four corners of both the
12129 page and its parent
12134 These will assist you in lining up the two physical slides.
12137 \begin_layout Standard
12138 The major problem in overlaying two slides is aligning the contents of the
12139 two transparencies.
12140 How much space should you leave for that graph on the second slide? Worse
12141 still, what if you want a graph and a sentence on second slide, but there
12142 is text on the main transparency that goes in between them? You could try
12143 and insert vertical space of the right size.
12144 The better way is to use
12155 \begin_layout Standard
12156 As their names imply,
12164 are two command-like paragraph environments that make all subsequent text
12165 invisible and visible, respectively.
12167 \begin_inset space ~
12171 \begin_inset CommandInset ref
12173 reference "sec:slideQuirk"
12177 that you don't place anything
12181 these two environments, however.
12186 , it inserts a centered, sky-blue label into the page reading
12187 \begin_inset Quotes eld
12190 <Invisible Text Follows>
12191 \begin_inset Quotes erd
12195 For paragraphs following this label, the parts of the
12203 ; it doesn't matter which] where they would be contain instead blank space.
12207 \begin_layout Standard
12212 , the corresponding centered label is
12213 \begin_inset Quotes eld
12216 <Visible Text Follows>
12217 \begin_inset Quotes erd
12221 Paragraphs following this label behave normally.
12222 Note that the beginning of a new
12234 automatically shuts off an
12239 It's therefore not necessary to use
12250 \begin_layout Standard
12251 By now, it should be obvious how to create overlay transparencies using
12252 the proper combination of
12271 \begin_layout Enumerate
12276 , including everything that will appear on it, whether on the main slide
12284 \begin_layout Enumerate
12285 Before each figure or paragraph that will appear only on the
12294 If necessary, insert a
12298 environment after the
12305 \begin_layout Enumerate
12310 immediately following the
12317 \begin_layout Enumerate
12318 Copy the contents of this
12329 \begin_layout Enumerate
12334 , change all of the
12345 \begin_layout Standard
12347 You've just made an
12354 \begin_layout Standard
12355 There's one problem with the way I've designed the \SpecialChar LyX
12360 class: you can't make text in the middle of a paragraph invisible, nor
12361 make text in the middle of an invisible paragraph visible again.
12362 To accomplish this feat, you'll need to use some inlined \SpecialChar LaTeX
12367 \begin_layout Plain Layout
12368 The commands of interest are:
12371 \begin_layout Itemize
12376 invisible \SpecialChar ldots
12380 \begin_layout Itemize
12385 visible \SpecialChar ldots
12389 \begin_layout Plain Layout
12391 and need to be marked as \SpecialChar TeX
12394 \begin_inset Quotes eld
12398 \begin_inset Quotes erd
12401 you wish to change goes in between the brackets [and after the
12414 If you don't know how to mark text as \SpecialChar TeX
12415 , see the appropriate section of
12428 \begin_layout Subsubsection
12438 \begin_inset CommandInset label
12440 name "sec:slideNote"
12447 \begin_layout Standard
12456 is associated with a
12457 \begin_inset Quotes eld
12461 \begin_inset Quotes erd
12469 Here, too, the \SpecialChar LyX
12474 class provides visual cues.
12479 is shorter than that of a
12483 [yet longer than that of an
12487 ] and, like the label of an
12491 is shockingly magenta.
12492 Additionally, the printed
12496 has the page number of its
12497 \begin_inset Quotes eld
12501 \begin_inset Quotes erd
12509 \begin_inset Quotes eld
12517 \begin_inset Quotes erd
12521 \begin_inset Quotes eld
12529 \begin_inset Quotes erd
12533 \begin_inset Quotes eld
12541 \begin_inset Quotes erd
12545 You can have multiple
12549 s associated with a single
12561 , you'll probably want to break up long
12565 s so that they fit on a single sheet of paper.
12568 \begin_layout Standard
12573 is obvious: it contains anything additional you might want to say about
12579 It could also be used as a sheet of reminders for a particular
12584 In the case of the latter, you might want to make use of time markers.
12585 Currently, the \SpecialChar LyX
12591 \begin_inset Quotes eld
12595 \begin_inset Quotes erd
12598 support for time markers, a
12600 Sli\SpecialChar TeX
12604 So, you'll have to resort to using the \SpecialChar LaTeX
12608 \begin_layout Standard
12609 To use time markers, you'll need to specify the extra class option
12610 \begin_inset Quotes eld
12618 \begin_inset Quotes erd
12622 \begin_inset space ~
12626 \begin_inset CommandInset ref
12628 reference "sec:slidesetup"
12633 This option turns on timing marks, which will appear in the lower-left-hand
12639 To set what appears in the time marker, you use the \SpecialChar LaTeX
12641 \begin_inset Quotes eld
12651 \begin_inset Quotes erd
12655 \begin_inset Quotes eld
12665 \begin_inset Quotes erd
12669 The arguments of both commands are time measured in seconds.
12671 \begin_inset Quotes eld
12681 \begin_inset Quotes erd
12684 sets the time marker to a given time.
12686 \begin_inset Quotes eld
12696 \begin_inset Quotes erd
12699 increments the time marker by the specified amount.
12700 Using time markers and
12704 s in this fashion, you can remind yourself how much time to spend on a particula
12712 \begin_layout Standard
12713 There's one last feature to describe.
12714 Clearly, you'd like to print out all of your
12722 s on transparencies while printing all of your
12739 with which it is associated.
12740 What's a person to do?
12743 \begin_layout Standard
12744 Luckily, there are two \SpecialChar LaTeX
12745 commands that allow you to select what to print
12747 Both must be placed into the preamble of your document.
12749 \begin_inset Quotes eld
12761 \begin_inset Quotes erd
12764 will cause the output to contain only the
12773 Correspondingly, the command
12774 \begin_inset Quotes eld
12786 \begin_inset Quotes erd
12789 prevents the output of anything but
12794 I'd advise placing both commands in the preamble and initially comment
12796 You can then preview your entire presentation as you write.
12797 When you're done writing, you can then uncomment one of the two to select
12798 what you want to print.
12799 I like to uncomment
12800 \begin_inset Quotes eld
12812 \begin_inset Quotes erd
12815 , print to a file with
12816 \begin_inset Quotes eld
12824 \begin_inset Quotes erd
12827 in its name, comment it back out, then uncomment
12828 \begin_inset Quotes eld
12840 \begin_inset Quotes erd
12844 \begin_inset Quotes eld
12852 \begin_inset Quotes erd
12856 I can then send either file to a printer, loading transparencies or plain
12857 paper as appropriate.
12860 \begin_layout Standard
12861 You can also provide other arguments to the
12862 \begin_inset Quotes eld
12872 \begin_inset Quotes erd
12876 \begin_inset Quotes eld
12886 \begin_inset Quotes erd
12890 See a good \SpecialChar LaTeX
12894 \begin_layout Subsection
12899 Class Template File
12902 \begin_layout Standard
12903 I have also provided a template file,
12904 \begin_inset Quotes eld
12912 \begin_inset Quotes erd
12920 To use it, begin your new presentation with
12922 File\SpecialChar menuseparator
12924 \begin_inset space ~
12928 \begin_inset space ~
12934 Your new \SpecialChar LyX
12935 presentation file will contain an example
12956 additionally contain an example of the use of
12965 Lastly, the preamble will contain:
12968 \begin_layout LyX-Code
12969 % Uncomment to print out only slides and overlays
12972 \begin_layout LyX-Code
12976 \begin_layout LyX-Code
12982 \begin_inset Newline newline
12988 \begin_layout LyX-Code
12989 % Uncomment to print out only notes
12992 \begin_layout LyX-Code
12996 \begin_layout LyX-Code
13004 \begin_layout Standard
13005 One final thing: I created this class to support the \SpecialChar LaTeX2e
13007 \begin_inset Quotes eld
13012 Sli\SpecialChar TeX
13016 \begin_inset Quotes erd
13019 class, one of the built-in \SpecialChar LaTeX2e
13021 Neither I nor the rest of the \SpecialChar LyX
13022 Team endorse or oppose the use of this built-in
13024 It's here if you want it or need it.
13025 There exist other \SpecialChar LaTeX2e
13026 classes for creating presentations, such as the
13031 \begin_inset space ~
13035 \begin_inset CommandInset ref
13037 reference "sec:foiltex"
13042 \begin_inset Quotes eld
13050 \begin_inset Quotes erd
13053 package [present on some \SpecialChar TeX
13055 The latter is not yet supported under \SpecialChar LyX
13060 \begin_layout Plain Layout
13061 Perhaps you can take on the task\SpecialChar ldots
13067 I know nothing about these other classes.
13068 Try them out to see what sort of alternative they provide.
13071 \begin_layout Chapter
13073 \change_inserted 893223064 1464851900
13077 \begin_layout Standard
13079 \change_inserted 893223064 1464851910
13080 This is a holder for prepared text.
13083 \begin_layout Chapter
13085 \change_inserted 893223064 1464851939
13089 \begin_layout Standard
13091 \change_inserted 893223064 1464851945
13092 This is a holder for prepared text.
13095 \begin_layout Section
13099 \begin_layout Standard
13100 You can do everything with \SpecialChar LyX
13101 that you can do with \SpecialChar LaTeX
13103 However, \SpecialChar LyX
13104 cannot support every \SpecialChar LaTeX
13106 But you can always use \SpecialChar TeX
13108 This chapter shows you some more special things you might want to use.
13109 For other special things you can do with figures, tables, floats, boxes
13110 and notes, have a look at the
13113 \begin_inset space ~
13121 \begin_layout Section
13122 Fancy Headers and Footers
13125 \begin_layout Standard
13126 The default page layout is rather plain; for an
13127 \begin_inset Flex Code
13130 \begin_layout Plain Layout
13136 document class, all you get is a centered page number at the bottom of
13138 This document uses KOMA-script's book class, so it appears to be a bit
13140 But to really put on a show, you need to set the document page style to
13142 \begin_inset Quotes eld
13146 \begin_inset Quotes erd
13149 , as mentioned in the
13154 This section describes the \SpecialChar LaTeX
13155 code you need to insert in your \SpecialChar LaTeX
13157 order to get the desired effects.
13160 \begin_layout Standard
13161 For more information on fancy headers, see the
13162 \begin_inset Flex Code
13165 \begin_layout Plain Layout
13171 package documentation.
13173 \begin_inset Flex URL
13176 \begin_layout Plain Layout
13178 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
13186 \begin_layout Standard
13187 The page header is divided into three fields, not surprisingly labeled
13188 \begin_inset Quotes eld
13192 \begin_inset Quotes erd
13196 \begin_inset Quotes eld
13200 \begin_inset Quotes erd
13204 \begin_inset Quotes eld
13208 \begin_inset Quotes erd
13212 The footer is also divided into these three fields.
13213 The \SpecialChar LaTeX
13214 commands to set these fields in the simplest manner are
13215 \begin_inset Flex Code
13218 \begin_layout Plain Layout
13227 \begin_inset Flex Code
13230 \begin_layout Plain Layout
13239 \begin_inset Flex Code
13242 \begin_layout Plain Layout
13251 \begin_inset Flex Code
13254 \begin_layout Plain Layout
13263 Suppose you wish to put your name in the upper left hand corner of each
13265 Simply insert the following command in the preamble:
13268 \begin_layout Standard
13277 \begin_layout Standard
13278 You will now see your name in the upper left.
13279 If a field has a default entry that you would like to get rid of (often
13280 the page number appears in the central footer) simply include a command
13281 with a blank argument, e.
13282 \begin_inset space \thinspace{}
13288 \begin_layout Standard
13296 \begin_layout Standard
13297 Let's get really fancy: lets put the section number with the word
13298 \begin_inset Quotes eld
13302 \begin_inset Quotes erd
13306 \begin_inset space \thinspace{}
13310 \begin_inset space \space{}
13313 Section 3) in the upper left, the page number (e.
13314 \begin_inset space \thinspace{}
13318 \begin_inset space \space{}
13321 Page 4) in the upper right, your name in the lower left, and the date in
13323 The following commands should now appear in the preamble:
13326 \begin_layout Standard
13336 \begin_layout Standard
13344 \begin_layout Standard
13354 \begin_layout Standard
13363 \begin_layout Standard
13371 \begin_layout Standard
13381 \begin_layout Standard
13383 \begin_inset Flex Code
13386 \begin_layout Plain Layout
13395 \begin_inset Flex Code
13398 \begin_layout Plain Layout
13406 access \SpecialChar LaTeX
13407 's section and page counters, and so print out the current section
13410 \begin_inset Flex Code
13413 \begin_layout Plain Layout
13421 simply prints out today's date.
13424 \begin_layout Standard
13425 The thicknesses of the horizontal rules drawn beneath the header and above
13426 the footer can also be modified.
13427 If you don't want one of the rules, set its thickness to 0.
13428 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
13434 \begin_inset Flex Code
13437 \begin_layout Plain Layout
13442 headrulewidth}{0.4pt}
13448 \begin_inset Flex Code
13451 \begin_layout Plain Layout
13456 footrulewidth}{0.4pt}
13461 to set the thicknesses.
13464 \begin_layout Standard
13465 You can switch the header/footer settings on and off for individual pages
13466 using commands like
13467 \begin_inset Flex Code
13470 \begin_layout Plain Layout
13473 thispagestyle{empty}
13479 \begin_inset Flex Code
13482 \begin_layout Plain Layout
13485 thispagestyle{plain}
13491 \begin_inset Flex Code
13494 \begin_layout Plain Layout
13497 thispagestyle{fancy}
13503 Simply insert them in the text on the page you want changed and mark them
13504 as \SpecialChar TeX
13506 In fact, title pages are marked as plain by default, while following pages
13507 are marked fancy when using the global fancy setting.
13510 \begin_layout Standard
13511 As a final example, it is possible to include an image in the header or
13513 Suppose you want to put a company logo in the upper lefthand corner.
13514 You might try something like
13517 \begin_layout Standard
13526 includegraphics{logo.eps}}}
13529 \begin_layout Standard
13531 (you may need to preface this with
13532 \begin_inset Flex Code
13535 \begin_layout Plain Layout
13539 usepackage{graphics}
13544 if you don't include graphics elsewhere in your document).
13547 \begin_layout Section
13548 Multiple Text Columns
13551 \begin_layout Standard
13552 This feature is independent of the option
13554 Two-column document
13556 in the document settings under
13561 If you want to have 2
13562 \begin_inset space ~
13565 columns for the whole document, it is recommended to use the
13567 Two-column document
13570 For all other cases use this feature.
13573 \begin_layout Standard
13574 To use multiple text columns in your document, you have to load the module
13581 Document\SpecialChar menuseparator
13582 Settings\SpecialChar menuseparator
13585 ) and must have the \SpecialChar LaTeX
13593 \begin_layout Standard
13594 Footnotes within multiple columns will be placed at the bottom of the page
13595 and not under each column.
13596 Within the different columns you can use everything, with the limitation
13597 that for floats you need to use the float option
13604 \begin_layout Subsection
13608 \begin_layout Standard
13609 If you want to have 2
13610 \begin_inset space ~
13613 columns in your text, insert a multicolumn inset via the menu
13615 Insert\SpecialChar menuseparator
13617 \begin_inset space ~
13620 Insets\SpecialChar menuseparator
13622 \begin_inset space ~
13627 where the columns should start.
13628 Write all text that should be printed in 2
13629 \begin_inset space ~
13632 columns into this inset.
13635 \begin_layout Standard
13636 Here is an example:
13639 \begin_layout Standard
13641 \begin_inset Flex Multiple Columns
13644 \begin_layout Plain Layout
13649 The Adventure of the Empty House
13652 \begin_inset Newline newline
13655 by Sir Arthur Conan Doyle
13658 \begin_layout Plain Layout
13661 It was in the spring of the year 1894 that all London was interested, and
13662 the fashionable world dismayed, by the murder of the Honourable Ronald
13663 Adair under most unusual and inexplicable circumstances.
13664 The public has already learned those particulars of the crime which came
13665 out in the police investigation, but a good deal was suppressed upon that
13666 occasion, since the case for the prosecution was so overwhelmingly strong
13667 that it was not necessary to bring forward all the facts.
13668 Only now, at the end of nearly ten years, am I allowed to supply those
13669 missing links which make up the whole of that remarkable chain.
13670 The crime was of interest in itself, but that interest was as nothing to
13671 me compared to the inconceivable sequel, which afforded me the greatest
13672 shock and surprise of any event in my adventurous life.
13673 Even now, after this long interval, I find myself thrilling as I think
13674 of it, and feeling once more that sudden flood of joy, amazement, and increduli
13675 ty which utterly submerged my mind.
13676 Let me say to that public, which has shown some interest in those glimpses
13677 which I have occasionally given them of the thoughts and actions of a very
13678 remarkable man, that they are not to blame me if I have not shared my knowledge
13679 with them, for I should have considered it my first duty to do so, had
13680 I not been barred by a positive prohibition from his own lips, which was
13681 only withdrawn upon the third of last month.
13689 \begin_layout Standard
13690 To get 3 or more columns, set the cursor into the multicolumn inset and
13693 Insert\SpecialChar menuseparator
13695 \begin_inset space ~
13699 \begin_inset space ~
13705 The number of the desired columns is written into that inset (for 3
13706 \begin_inset space ~
13710 \begin_inset Quotes eld
13714 \begin_inset Quotes erd
13718 \begin_inset Newline newline
13721 Here is an example with 3
13722 \begin_inset space ~
13728 \begin_layout Standard
13729 \begin_inset Flex Multiple Columns
13732 \begin_layout Plain Layout
13735 \begin_inset Argument 1
13738 \begin_layout Plain Layout
13744 It can be imagined that my close intimacy with Sherlock Holmes had interested
13745 me deeply in crime, and that after his disappearance I never failed to
13746 read with care the various problems which came before the public.
13747 And I even attempted, more than once, for my own private satisfaction,
13748 to employ his methods in their solution, though with indifferent success.
13749 There was none, however, which appealed to me like this tragedy of Ronald
13751 As I read the evidence at the inquest, which led up to a verdict of willful
13752 murder against some person or persons unknown, I realized more clearly
13753 than I had ever done the loss which the community had sustained by the
13754 death of Sherlock Holmes.
13755 There were points about this strange business which would, I was sure,
13756 have specially appealed to him, and the efforts of the police would have
13757 been supplemented, or more probably anticipated, by the trained observation
13758 and the alert mind of the first criminal agent in Europe.
13759 All day, as I drove upon my round, I turned over the case in my mind and
13760 found no explanation which appeared to me to be adequate.
13761 At the risk of telling a twice-told tale, I will recapitulate the facts
13762 as they were known to the public at the conclusion of the inquest.
13770 \begin_layout Standard
13771 You can have up to 10
13772 \begin_inset space ~
13775 columns if you want to, but that might not be very pleasant for the readers
13779 \begin_layout Standard
13780 \begin_inset Newpage newpage
13786 \begin_layout Subsection
13787 Columns inside Columns
13790 \begin_layout Standard
13791 You can also have columns inside columns:
13794 \begin_layout Standard
13795 \begin_inset Flex Multiple Columns
13798 \begin_layout Plain Layout
13801 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
13802 at that time governor of one of the Australian colonies.
13803 Adair's mother had returned from Australia to undergo the operation for
13804 cataract, and she, her son Ronald, and her daughter Hilda were living together
13808 \begin_layout Plain Layout
13809 \begin_inset Flex Multiple Columns
13812 \begin_layout Plain Layout
13815 The youth moved in the best society–had, so far as was known, no enemies
13816 and no particular vices.
13817 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
13818 had been broken off by mutual consent some months before, and there was
13819 no sign that it had left any very profound feeling behind it.
13820 For the rest {sic} the man's life moved in a narrow and conventional circle,
13821 for his habits were quiet and his nature unemotional.
13822 Yet it was upon this easy-going young aristocrat that death came, in most
13823 strange and unexpected form, between the hours of ten and eleven-twenty
13824 on the night of March 30, 1894.
13832 \begin_layout Plain Layout
13835 Ronald Adair was fond of cards–playing continually, but never for such stakes
13837 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
13838 It was shown that, after dinner on the day of his death, he had played
13839 a rubber of whist at the latter club.
13840 He had also played there in the afternoon.
13845 The evidence of those who had played with him– Mr.
13846 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
13847 and that there was a fairly equal fall of the cards.
13848 Adair might have lost five pounds, but not more.
13849 His fortune was a considerable one, and such a loss could not in any way
13851 He had played nearly every day at one club or other, but he was a cautious
13852 player, and usually rose a winner.
13853 It came out in evidence that, in partnership with Colonel Moran, he had
13854 actually won as much as four hundred and twenty pounds in a sitting, some
13855 weeks before, from Godfrey Milner and Lord Balmoral.
13856 So much for his recent history as it came out at the inquest.
13864 \begin_layout Subsection
13868 \begin_layout Standard
13869 The examples in this section show some more special features of multiple
13873 \begin_layout Standard
13874 For more features of multiple columns, have a look at the documentation
13875 of the \SpecialChar LaTeX
13881 \begin_inset CommandInset citation
13890 \begin_layout Subsubsection
13894 \begin_layout Standard
13895 To add a preface text for multiple columns, set the cursor into the multicolumn
13896 inset and use the menu
13898 Insert\SpecialChar menuseparator
13902 Write your preface text into that inset.
13903 \begin_inset Newline newline
13906 This is an example with some preface text:
13909 \begin_layout Standard
13910 \begin_inset VSpace bigskip
13916 \begin_layout Standard
13917 \begin_inset Flex Multiple Columns
13920 \begin_layout Plain Layout
13921 \begin_inset Argument 2
13924 \begin_layout Plain Layout
13925 And the story continues and continues and continues and continues\SpecialChar ldots
13933 On the evening of the crime, he returned from the club exactly at ten.
13934 His mother and sister were out spending the evening with a relation.
13935 The servant deposed that she heard him enter the front room on the second
13936 floor, generally used as his sitting-room.
13937 She had lit a fire there, and as it smoked she had opened the window.
13938 No sound was heard from the room until eleven-twenty, the hour of the return
13939 of Lady Maynooth and her daughter.
13940 Desiring to say good-night, she attempted to enter her son's room.
13941 The door was locked on the inside, and no answer could be got to their
13942 cries and knocking.
13943 Help was obtained, and the door forced.
13944 The unfortunate young man was found lying near the table.
13945 His head had been horribly mutilated by an expanding revolver bullet, but
13946 no weapon of any sort was to be found in the room.
13954 \begin_layout Standard
13955 You can also use a section heading as the preface if you use a section command
13956 as \SpecialChar TeX
13958 For example the command
13961 \begin_layout Standard
13966 subsection{subsection title}
13969 \begin_layout Standard
13970 creates a subsection.
13971 In this example the preface is a subsubsection:
13974 \begin_layout Standard
13975 \begin_inset Flex Multiple Columns
13978 \begin_layout Plain Layout
13979 \begin_inset Argument 2
13982 \begin_layout Plain Layout
13986 \begin_layout Plain Layout
13995 This is a subsubsection heading as a preface
13999 \begin_layout Plain Layout
14013 A minute examination of the circumstances served only to make the case more
14015 In the first place, no reason could be given why the young man should have
14016 fastened the door upon the inside.
14017 There was the possibility that the murderer had done this, and had afterwards
14018 escaped by the window.
14019 The drop was at least twenty feet, however, and a bed of crocuses in full
14021 Neither the flowers nor the earth showed any sign of having been disturbed,
14022 nor were there any marks upon the narrow strip of grass which separated
14023 the house from the road.
14024 Apparently, therefore, it was the young man himself who had fastened the
14026 But how did he come by his death? No one could have climbed up to the window
14027 without leaving traces.
14028 Suppose a man had fired through the window, he would indeed be a remarkable
14029 shot who could with a revolver inflict so deadly a wound.
14030 Again, Park Lane is a frequented thoroughfare; there is a cab stand within
14031 a hundred yards of the house.
14032 No one had heard a shot.
14040 \begin_layout Standard
14041 If there is less vertical space than 6
14042 \begin_inset space ~
14045 text lines is left on the page at the beginning of the multiple columns,
14046 a page break will be inserted before the multiple columns.
14047 Depending on the number of lines of the preface text, you might want to
14049 This is done by setting the cursor into the mulitcolumn inset behind the
14050 preface (if there is any) and using the menu
14052 Insert\SpecialChar menuseparator
14054 \begin_inset space ~
14058 \begin_inset space ~
14062 \begin_inset space ~
14068 Insert into that inset the amount of space like e.
14069 \begin_inset space \thinspace{}
14073 \begin_inset space \space{}
14077 \begin_inset Quotes eld
14081 \begin_inset Quotes erd
14085 \begin_inset Newline newline
14088 In this example the space is set to 7
14089 \begin_inset space ~
14092 text lines by using
14093 \begin_inset Quotes eld
14099 \begin_inset Quotes erd
14108 needs to be inserted as \SpecialChar TeX
14112 \begin_layout Standard
14113 \begin_inset Flex Multiple Columns
14116 \begin_layout Plain Layout
14117 \begin_inset Argument 3
14120 \begin_layout Plain Layout
14125 \begin_layout Plain Layout
14141 On the evening of the crime, he returned from the club exactly at ten.
14142 His mother and sister were out spending the evening with a relation.
14143 The servant deposed that she heard him enter the front room on the second
14144 floor, generally used as his sitting-room.
14145 She had lit a fire there, and as it smoked she had opened the window.
14146 No sound was heard from the room until eleven-twenty, the hour of the return
14147 of Lady Maynooth and her daughter.
14148 Desiring to say good-night, she attempted to enter her son's room.
14149 The door was locked on the inside, and no answer could be got to their
14150 cries and knocking.
14151 Help was obtained, and the door forced.
14152 The unfortunate young man was found lying near the table.
14153 His head had been horribly mutilated by an expanding revolver bullet, but
14154 no weapon of any sort was to be found in the room.
14162 \begin_layout Subsubsection
14166 \begin_layout Standard
14167 The amount of space before and after multiple columns can be changed by
14168 changing the length
14175 For example the command
14178 \begin_layout Standard
14188 \begin_layout Standard
14189 in \SpecialChar TeX
14190 Code changes its value to 3
14191 \begin_inset space \thinspace{}
14195 The change must be made before the multiple columns' start.
14196 The predefined value is 13
14197 \begin_inset space \thinspace{}
14203 \begin_layout Standard
14211 \begin_inset space \thinspace{}
14217 \begin_layout Standard
14221 \begin_layout Plain Layout
14227 multicolsep}{2.5cm}
14235 \begin_layout Standard
14236 \begin_inset Flex Multiple Columns
14239 \begin_layout Plain Layout
14242 All day I turned these facts over in my mind, endeavouring to hit upon some
14243 theory which could reconcile them all, and to find that line of least resistanc
14244 e which my poor friend had declared to be the starting-point of every investigat
14246 I confess that I made little progress.
14247 In the evening I strolled across the Park, and found myself about six o'clock
14248 at the Oxford Street end of Park Lane.
14249 A group of loafers upon the pavements, all staring up at a particular window,
14250 directed me to the house which I had come to see.
14251 A tall, thin man with coloured glasses, whom I strongly suspected of being
14252 a plain-clothes detective, was pointing out some theory of his own, while
14253 the others crowded round to listen to what he said.
14254 I got as near him as I could, but his observations seemed to me to be absurd,
14255 so I withdrew again in some disgust.
14256 As I did so I struck against an elderly, deformed man, who had been behind
14257 me, and I knocked down several books which he was carrying.
14265 \begin_layout Standard
14266 \begin_inset Note Greyedout
14269 \begin_layout Plain Layout
14274 The values you set with
14280 will be used for all following multiple columns until you change them again.
14288 \begin_layout Standard
14292 \begin_layout Plain Layout
14304 \begin_inset Note Note
14307 \begin_layout Plain Layout
14308 go back to the default
14316 \begin_layout Standard
14317 \begin_inset Newpage newpage
14323 \begin_layout Subsubsection
14327 \begin_layout Standard
14328 A column break can be forced by inserting the command
14334 as \SpecialChar TeX
14335 Code to that position in the text where the column should be broken.
14336 Note that this leads in most cases to whitespace in the text.
14337 \begin_inset Newline newline
14340 Here is an example:
14343 \begin_layout Standard
14344 \begin_inset Flex Multiple Columns
14347 \begin_layout Plain Layout
14350 \begin_inset Quotes eld
14353 You're surprised to see me, sir,
14354 \begin_inset Quotes erd
14357 said he, in a strange, croaking voice.
14360 \begin_layout Plain Layout
14363 I acknowledged that I was.
14366 \begin_layout Plain Layout
14369 \begin_inset Quotes eld
14372 Well, I've a conscience, sir, and when I chanced to see you go into this
14373 house, as I came hobbling after you, I thought to myself, I'll just step
14374 in and see that kind gentleman, and tell him that if I was a bit gruff
14375 in my manner there was not any harm meant, and that I am much obliged to
14376 him for picking up my books.
14377 \begin_inset Quotes erd
14383 \begin_layout Plain Layout
14386 \begin_inset Quotes eld
14389 You make too much of a trifle,
14390 \begin_inset Quotes erd
14395 \begin_inset Quotes eld
14398 May I ask how you knew who I was?
14399 \begin_inset Quotes erd
14402 AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED.
14406 \begin_layout Plain Layout
14418 \begin_layout Plain Layout
14421 \begin_inset Quotes eld
14424 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
14425 you'll find my little bookshop at the corner of Church Street, and very
14426 happy to see you, I am sure.
14427 Maybe you collect yourself, sir.
14431 \begin_inset space ~
14444 –a bargain, every one of them.
14445 With five volumes you could just fill that gap on that second shelf.
14446 It looks untidy, does it not, sir?
14447 \begin_inset Quotes erd
14458 \begin_layout Subsubsection
14462 \begin_layout Standard
14463 The width of the columns is automatically calculated, but you can modify
14464 the space between the columns.
14465 This is done by changing the length
14472 Its predefined value is 10
14473 \begin_inset space \thinspace{}
14477 Here is an example where
14484 \begin_inset space \thinspace{}
14490 \begin_layout Standard
14494 \begin_layout Plain Layout
14508 \begin_layout Standard
14509 \begin_inset Flex Multiple Columns
14512 \begin_layout Plain Layout
14515 My observations of No.
14516 \begin_inset space \space{}
14519 427 Park Lane did little to clear up the problem in which I was interested.
14520 The house was separated from the street by a low wall and railing, the
14521 whole not more than five feet high.
14522 It was perfectly easy, therefore, for anyone to get into the garden, but
14523 the window was entirely inaccessible, since there was no water pipe or
14524 anything which could help the most active man to climb it.
14525 More puzzled than ever, I retraced my steps to Kensington.
14526 I had not been in my study five minutes when the maid entered to say that
14527 a person desired to see me.
14528 To my astonishment it was none other than my strange old book collector,
14529 his sharp, wizened face peering out from a frame of white hair, and his
14530 precious volumes, a dozen of them at least, wedged under his right arm.
14538 \begin_layout Standard
14542 \begin_layout Plain Layout
14554 \begin_inset Note Note
14557 \begin_layout Plain Layout
14558 go back to the default
14566 \begin_layout Subsubsection
14570 \begin_layout Standard
14571 Between the columns a rule with a width of the length
14578 If this rule width is set to 0
14579 \begin_inset space \thinspace{}
14582 pt (this is the default), the rule is suppressed.
14583 In the following example the rule is 2
14584 \begin_inset space \thinspace{}
14590 \begin_layout Standard
14594 \begin_layout Plain Layout
14600 columnseprule}{2pt}
14608 \begin_layout Standard
14609 \begin_inset Flex Multiple Columns
14612 \begin_layout Plain Layout
14615 \begin_inset Quotes eld
14618 You're surprised to see me, sir,
14619 \begin_inset Quotes erd
14622 said he, in a strange, croaking voice.
14625 \begin_layout Plain Layout
14628 I acknowledged that I was.
14631 \begin_layout Plain Layout
14634 \begin_inset Quotes eld
14637 Well, I've a conscience, sir, and when I chanced to see you go into this
14638 house, as I came hobbling after you, I thought to myself, I'll just step
14639 in and see that kind gentleman, and tell him that if I was a bit gruff
14640 in my manner there was not any harm meant, and that I am much obliged to
14641 him for picking up my books.
14642 \begin_inset Quotes erd
14648 \begin_layout Plain Layout
14651 \begin_inset Quotes eld
14654 You make too much of a trifle,
14655 \begin_inset Quotes erd
14660 \begin_inset Quotes eld
14663 May I ask how you knew who I was?
14664 \begin_inset Quotes erd
14670 \begin_layout Plain Layout
14673 \begin_inset Quotes eld
14676 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
14677 you'll find my little bookshop at the corner of Church Street, and very
14678 happy to see you, I am sure.
14679 Maybe you collect yourself, sir.
14683 \begin_inset space ~
14696 –a bargain, every one of them.
14697 With five volumes you could just fill that gap on that second shelf.
14698 It looks untidy, does it not, sir?
14699 \begin_inset Quotes erd
14710 \begin_layout Standard
14711 \begin_inset VSpace defskip
14717 \begin_layout Standard
14718 The rule can be colored by redefining the command
14725 This is done by inserting the command
14726 \begin_inset Newline newline
14735 columnseprulecolor}{
14740 \begin_inset Newline newline
14743 as \SpecialChar TeX
14744 Code before the multicolumn inset.
14749 in this command by a color of your choice.
14750 You can use all pre- and self-defined colors.
14758 \begin_inset space ~
14763 for more information about pre- and self-defined colors.
14764 To go back to the default color insert the command
14765 \begin_inset Newline newline
14774 columnseprulecolor}{
14779 \begin_inset Newline newline
14782 Here is the example with a cyan rule and 1
14783 \begin_inset space \thinspace{}
14786 cm column separation:
14789 \begin_layout Standard
14793 \begin_layout Plain Layout
14802 \begin_layout Plain Layout
14808 columnseprulecolor}{
14818 \begin_layout Standard
14819 \begin_inset Flex Multiple Columns
14822 \begin_layout Plain Layout
14825 \begin_inset Quotes eld
14828 You're surprised to see me, sir,
14829 \begin_inset Quotes erd
14832 said he, in a strange, croaking voice.
14835 \begin_layout Plain Layout
14838 I acknowledged that I was.
14841 \begin_layout Plain Layout
14844 \begin_inset Quotes eld
14847 Well, I've a conscience, sir, and when I chanced to see you go into this
14848 house, as I came hobbling after you, I thought to myself, I'll just step
14849 in and see that kind gentleman, and tell him that if I was a bit gruff
14850 in my manner there was not any harm meant, and that I am much obliged to
14851 him for picking up my books.
14852 \begin_inset Quotes erd
14858 \begin_layout Plain Layout
14861 \begin_inset Quotes eld
14864 You make too much of a trifle,
14865 \begin_inset Quotes erd
14870 \begin_inset Quotes eld
14873 May I ask how you knew who I was?
14874 \begin_inset Quotes erd
14880 \begin_layout Plain Layout
14883 \begin_inset Quotes eld
14886 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
14887 you'll find my little bookshop at the corner of Church Street, and very
14888 happy to see you, I am sure.
14889 Maybe you collect yourself, sir.
14893 \begin_inset space ~
14906 –a bargain, every one of them.
14907 With five volumes you could just fill that gap on that second shelf.
14908 It looks untidy, does it not, sir?
14909 \begin_inset Quotes erd
14920 \begin_layout Standard
14924 \begin_layout Plain Layout
14930 columnseprule}{0pt}
14933 \begin_layout Plain Layout
14939 columnseprulecolor}{
14947 \begin_inset Note Note
14950 \begin_layout Plain Layout
14951 go back to the default
14959 \begin_layout Chapter
14961 \change_inserted 893223064 1464852301
14965 \begin_layout Section
14966 Non-standard Paragraph Shapes
14969 \begin_layout Standard
14972 as well as any other text processor uses by default rectangular paragraphs.
14973 For special cases like for example posters, invitation cards or poems you
14974 can modify the paragraph shape to one of your choice.
14975 This can be done by using the \SpecialChar LaTeX
14980 which is loaded by using in the document settings the module
14982 Custom paragraph shapes
14987 \begin_layout Subsection
14991 \begin_layout Standard
14996 provides the following shapes:
14999 \begin_layout Standard
15000 \begin_inset Tabular
15001 <lyxtabular version="3" rows="13" columns="3">
15002 <features booktabs="true" islongtable="true" longtabularalignment="center">
15003 <column alignment="center" valignment="middle" width="16col%">
15004 <column alignment="center" valignment="middle" width="40col%">
15005 <column alignment="center" valignment="middle" width="35col%">
15006 <row endhead="true">
15007 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
15010 \begin_layout Plain Layout
15016 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
15019 \begin_layout Plain Layout
15025 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
15028 \begin_layout Plain Layout
15036 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15039 \begin_layout Plain Layout
15045 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15048 \begin_layout Plain Layout
15049 Circle with circular hole (in the size of a CD/DVD)
15054 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15057 \begin_layout Plain Layout
15058 Cannot be scaled, take care there is not too much text
15065 <cell alignment="center" valignment="top" topline="true" usebox="none">
15068 \begin_layout Plain Layout
15074 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15077 \begin_layout Plain Layout
15083 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15086 \begin_layout Plain Layout
15087 Fragile, calculation might fail
15094 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15097 \begin_layout Plain Layout
15103 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15106 \begin_layout Plain Layout
15107 Rhomboid (symbolizing a
15108 \begin_inset Quotes eld
15112 \begin_inset Quotes erd
15120 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15123 \begin_layout Plain Layout
15131 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15134 \begin_layout Plain Layout
15140 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15143 \begin_layout Plain Layout
15149 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15152 \begin_layout Plain Layout
15160 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15163 \begin_layout Plain Layout
15169 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15172 \begin_layout Plain Layout
15178 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15181 \begin_layout Plain Layout
15189 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15192 \begin_layout Plain Layout
15198 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15201 \begin_layout Plain Layout
15202 Nut for bolt (hexagon with circular hole)
15207 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15210 \begin_layout Plain Layout
15218 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15221 \begin_layout Plain Layout
15227 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15230 \begin_layout Plain Layout
15236 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15239 \begin_layout Plain Layout
15247 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
15250 \begin_layout Plain Layout
15256 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
15259 \begin_layout Plain Layout
15265 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
15268 \begin_layout Plain Layout
15276 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15279 \begin_layout Plain Layout
15285 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15288 \begin_layout Plain Layout
15294 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15297 \begin_layout Plain Layout
15305 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15308 \begin_layout Plain Layout
15314 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15317 \begin_layout Plain Layout
15318 Normal/reversed rain drop
15323 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15326 \begin_layout Plain Layout
15327 Fragile, calculation might fail
15334 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15337 \begin_layout Plain Layout
15344 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15347 \begin_layout Plain Layout
15348 The \SpecialChar TeX
15354 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15357 \begin_layout Plain Layout
15365 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
15368 \begin_layout Plain Layout
15370 \begin_inset Newline newline
15378 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
15381 \begin_layout Plain Layout
15382 Triangles in different orientations
15387 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
15390 \begin_layout Plain Layout
15404 \begin_layout Standard
15405 To use a shape for your paragraph, simply select it in \SpecialChar LyX
15407 for environments in the toolbar.
15410 \begin_layout Standard
15411 \begin_inset Newpage newpage
15417 \begin_layout Standard
15418 Here is an example paragraph in the shape of a nut:
15421 \begin_layout Standard
15422 \begin_inset VSpace bigskip
15431 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15432 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15434 At vero eos et accusam et justo duo dolores et ea rebum.
15435 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15437 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15438 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15442 \begin_layout Standard
15443 \begin_inset VSpace bigskip
15449 \begin_layout Standard
15450 \begin_inset Note Greyedout
15453 \begin_layout Plain Layout
15458 : shapepar paragraphs cannot run over a page break.
15466 \begin_layout Standard
15467 \begin_inset VSpace bigskip
15473 \begin_layout Standard
15478 takes care that the shape will always be preserved, no matter how much
15479 text is in the paragraph.
15480 Therefore the paragraph size changes with the amount of contained text.
15481 This can lead to paragraph sizes exceeding the page margins.
15482 To demonstrate the size scaling, here is the same example paragraph but
15483 with twice as much text:
15486 \begin_layout Standard
15487 \begin_inset Newpage newpage
15496 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15497 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15499 At vero eos et accusam et justo duo dolores et ea rebum.
15500 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15502 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15503 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15505 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15506 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15508 At vero eos et accusam et justo duo dolores et ea rebum.
15509 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15511 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15512 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15516 \begin_layout Standard
15517 \begin_inset VSpace bigskip
15523 \begin_layout Standard
15524 An exception is the shape
15529 It cannot be scaled because it must fit the size of a CD/DVD.
15530 Therefore the amount of text that fits into the shape is limited.
15531 \begin_inset Newline newline
15542 shape are fragile, meaning that the calculation of their size can fail,
15543 depending on the amount of text.
15544 You will then get the \SpecialChar LaTeX
15546 \begin_inset Quotes eld
15549 Arithmetic overflow
15550 \begin_inset Quotes erd
15554 In this case one can try to remove or add some text; if nothing works one
15555 has to use another shape.
15558 \begin_layout Standard
15559 \begin_inset VSpace bigskip
15565 \begin_layout Standard
15566 For shapes with tips you will maybe see that \SpecialChar LaTeX
15567 's hyphenation routine fails
15568 for text in the tips.
15569 Therefore it is often necessary to add hyphenation points
15574 arg "specialchar-insert hyphenation"
15579 ) to the corresponding text parts.
15582 \begin_layout Standard
15583 \begin_inset VSpace bigskip
15589 \begin_layout Standard
15590 Shapepar paragraphs are either always centered or placed on the page so
15591 that their left border touches the left page margin.
15592 You can therefore not use the paragraph dialog to align such paragraphs.
15593 A solution is to put the paragraph into a minipage or parbox and align
15595 The problem is hereby to find the right width for the box.
15596 Because if it is too wide and you center the box, the paragraph is not
15597 centered too because it sticks at the left side of the box.
15598 So you might have to play a bit with the width until it fits.
15599 Here are two heart-shaped paragraphs, the first one is not aligned, the
15600 second one is right-aligned:
15603 \begin_layout Standard
15604 \begin_inset Newpage newpage
15610 \begin_layout Heart
15614 Lo\SpecialChar softhyphen
15615 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15616 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15618 At vero eos et accusam et justo duo dolores et ea rebum.
15619 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15623 \begin_layout Standard
15624 \begin_inset VSpace bigskip
15630 \begin_layout Standard
15633 \begin_inset Box Frameless
15643 height_special "totalheight"
15648 backgroundcolor "none"
15651 \begin_layout Heart
15655 Lo\SpecialChar softhyphen
15656 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15657 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15659 At vero eos et accusam et justo duo dolores et ea rebum.
15660 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15669 \begin_layout Subsection
15673 \begin_layout Standard
15674 You can define any shape you want.
15675 Doing this manually is a lot of work because every coordinate must be specified.
15676 But there is a way to let the computer calculate the coordinates:
15679 \begin_layout Enumerate
15680 Install the program
15681 \begin_inset CommandInset href
15684 target "http://www.ctan.org/tex-archive/graphics/jpgfdraw"
15691 \begin_layout Enumerate
15698 TeX/LaTeX\SpecialChar menuseparator
15699 Settings\SpecialChar menuseparator
15702 and select the font size you are using in your document.
15703 For example this document uses the size 12
15704 \begin_inset space \thinspace{}
15710 \begin_layout Enumerate
15714 \begin_layout Enumerate
15717 TeX/LaTeX\SpecialChar menuseparator
15720 to export the shape to coordinates.
15721 In the appearing dialog use either the outline of your shape for the coordinate
15722 s or the path itself.
15726 \begin_layout Plain Layout
15727 For more information see
15728 \begin_inset CommandInset href
15730 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
15742 \begin_layout Standard
15743 The coordinates are written into a \SpecialChar TeX
15745 To use it for your \SpecialChar LyX
15749 \begin_layout Enumerate
15750 Place the cursor before the first character of your paragraph (or into a
15754 \begin_layout Enumerate
15755 Open in \SpecialChar LyX
15758 Insert\SpecialChar menuseparator
15759 File\SpecialChar menuseparator
15761 \begin_inset space ~
15766 , select the file and use
15775 \begin_layout Standard
15776 \begin_inset VSpace defskip
15782 \begin_layout Standard
15783 \begin_inset Note Greyedout
15786 \begin_layout Plain Layout
15791 : The changed shape only applies to the current paragraph; everything is
15792 reset to normal for the next paragraph.
15793 Therefore the shape definition file must be input into every paragraph
15794 with the desired shape.
15802 \begin_layout Standard
15803 \begin_inset VSpace bigskip
15809 \begin_layout Standard
15810 Here is an example:
15813 \begin_layout Standard
15814 \begin_inset VSpace bigskip
15820 \begin_layout Standard
15821 \begin_inset CommandInset include
15823 filename "/usr/share/lyx/doc/SpecialParagraphShape.tex"
15829 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15830 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15832 At vero eos et accusam et justo duo dolores et ea rebum.
15833 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15835 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15836 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15840 \begin_layout Standard
15841 \begin_inset VSpace bigskip
15847 \begin_layout Standard
15852 to draw complexer shapes in
15856 you can draw the shape in a program of your choice and import the resulting
15862 Then you only need to draw a line or spline along the outline of the image.
15865 \begin_layout Standard
15866 \begin_inset VSpace bigskip
15872 \begin_layout Standard
15875 Custom paragraph shapes
15877 also provides the two commands
15885 which can be used to define custom shapes coordinate by coordinate.
15889 \begin_layout Plain Layout
15890 These commands are internally used for all shapes described here.
15895 For information how these styles are used and about further customization
15896 possibilities, have a look at the documentation of the package
15901 \begin_inset CommandInset citation
15910 \begin_layout Bibliography
15911 \begin_inset CommandInset bibitem
15912 LatexCommand bibitem
15917 Documentation of the \SpecialChar LaTeX
15919 \begin_inset CommandInset href
15922 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
15929 \begin_layout Bibliography
15930 \begin_inset CommandInset bibitem
15931 LatexCommand bibitem
15936 Documentation of the \SpecialChar LaTeX
15938 \begin_inset CommandInset href
15941 target "http://mirrors.ctan.org/macros/latex/contrib/shapepar/shapepar.pdf"
15948 \begin_layout Chapter
15950 \change_inserted 893223064 1464852414
15951 Bibliographic databases
15952 \change_deleted 893223064 1464852406
15958 \begin_layout Section
15959 Customizing Bibliographies with Bib\SpecialChar TeX
15963 \begin_layout Standard
15964 The most basic information about how to use Bib\SpecialChar TeX
15965 with \SpecialChar LyX
15966 is contained in the
15969 Bibliography databases (Bib\SpecialChar TeX
15977 The following subsections explain special bibliography features supported
15978 by \SpecialChar LyX
15982 \begin_layout Subsection
15983 Alternative Citation Styles
15986 \begin_layout Standard
15987 Standard Bib\SpecialChar TeX
15989 \begin_inset space \thinspace{}
15993 \begin_inset space \space{}
15997 \begin_inset Quotes eld
16001 \begin_inset Quotes erd
16004 ) to refer to a cited work.
16005 However, in many scientific disciplines, other citation styles are in use.
16006 The most common one is the author-year style (e.
16007 \begin_inset space \thinspace{}
16011 \begin_inset space \space{}
16015 \begin_inset Quotes eld
16019 \begin_inset Quotes erd
16024 supports two packages that provide this style,
16025 \begin_inset Flex Code
16028 \begin_layout Plain Layout
16035 \begin_inset Flex Code
16038 \begin_layout Plain Layout
16045 Both packages have their pros and cons, which cannot be listed in detail.
16046 If you only want to have simple author-year (or author-numerical) style,
16047 or if you want to use one of the countless style files for
16048 \begin_inset Flex Code
16051 \begin_layout Plain Layout
16057 , then the established
16058 \begin_inset Flex Code
16061 \begin_layout Plain Layout
16067 package is probably your choice.
16068 If you need special features like short title references, ibidem etc., you
16070 \begin_inset Flex Code
16073 \begin_layout Plain Layout
16082 \begin_layout Standard
16083 The handling of both packages in \SpecialChar LyX
16084 is basically the same.
16086 \begin_inset Flex Noun
16089 \begin_layout Plain Layout
16090 Document\SpecialChar menuseparator
16097 \begin_inset Flex Noun
16100 \begin_layout Plain Layout
16107 \begin_inset Flex Noun
16110 \begin_layout Plain Layout
16117 \begin_inset Flex Noun
16120 \begin_layout Plain Layout
16127 With both packages, you will get some extra features in the citation dialog
16128 and you can select the style of the reference (
16129 \begin_inset Quotes eld
16133 \begin_inset Quotes erd
16137 \begin_inset Quotes eld
16141 \begin_inset Quotes erd
16145 \begin_inset Quotes eld
16149 \begin_inset Quotes erd
16153 \begin_inset Quotes eld
16157 \begin_inset Quotes erd
16161 Note that both packages need specifically designed style files.
16162 They both ship their own, but there are lots of additional style files,
16163 and there is even an interactive style file builder
16167 \begin_layout Plain Layout
16169 \begin_inset Flex URL
16172 \begin_layout Plain Layout
16174 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
16185 \begin_inset Flex Code
16188 \begin_layout Plain Layout
16197 \begin_layout Subsection
16198 Sectioned Bibliographies
16201 \begin_layout Standard
16202 Sometimes you might need to divide your bibliography into several sections.
16203 If you are for instance a historian, the possibility to separate sources
16204 and scientific works is most likely a
16205 \begin_inset Quotes eld
16209 \begin_inset Quotes erd
16213 Unfortunately, Bib\SpecialChar TeX
16214 itself does not allow you to do this.
16215 But with the help of some \SpecialChar LaTeX
16216 packages, Bib\SpecialChar TeX
16217 can be extended to fit your needs.
16220 \begin_layout Standard
16222 provides native support for one of these packages,
16230 \begin_layout Plain Layout
16232 \begin_inset Flex URL
16235 \begin_layout Plain Layout
16237 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
16247 The advantage of this package (compared to other packages like
16251 ) is that you don't need to define new citation commands.
16252 Instead, you need to prepare different bibliographic databases which include
16253 the entries for the different sections of the bibliography.
16254 For example: If you want to divide your bibliography into the sections
16256 \begin_inset Quotes eld
16260 \begin_inset Quotes erd
16264 \begin_inset Quotes eld
16268 \begin_inset Quotes erd
16271 , you first need to create two bibliographic databases, e.
16272 \begin_inset space \thinspace{}
16276 \begin_inset space \space{}
16280 \begin_inset Flex Code
16283 \begin_layout Plain Layout
16290 \begin_inset Flex Code
16293 \begin_layout Plain Layout
16303 \begin_layout Standard
16305 \begin_inset Flex Noun
16308 \begin_layout Plain Layout
16309 Document\SpecialChar menuseparator
16316 \begin_inset Flex Noun
16319 \begin_layout Plain Layout
16326 \begin_inset Flex Noun
16329 \begin_layout Plain Layout
16330 Sectioned bibliography
16336 Now you can insert multiple Bib\SpecialChar TeX
16337 bibliographies, one for each section of
16339 Returning to our example: Insert the Bib\SpecialChar TeX
16341 \begin_inset Flex Code
16344 \begin_layout Plain Layout
16350 and a second one for the database
16351 \begin_inset Flex Code
16354 \begin_layout Plain Layout
16361 You are free to use the same or different styles for each section.
16362 Additionally, you can choose if the bibliography section should contain
16364 \begin_inset Quotes eld
16367 all cited references
16368 \begin_inset Quotes erd
16371 of the specified database(s) (which is the default),
16372 \begin_inset Quotes eld
16375 all uncited references
16376 \begin_inset Quotes erd
16380 \begin_inset Quotes eld
16384 \begin_inset Quotes erd
16388 This might be useful if you would like to separate your bibliography into
16390 \begin_inset Quotes eld
16394 \begin_inset Quotes erd
16398 \begin_inset Quotes eld
16402 \begin_inset Quotes erd
16406 \begin_inset Quotes eld
16410 \begin_inset Quotes erd
16414 The titles for the sections can be added as ordinary sections or subsections.
16416 \begin_inset Flex Code
16419 \begin_layout Plain Layout
16425 removes the bibliography title, you have to manually re-add that, too (as
16426 a chapter* or section*, for instance).
16429 \begin_layout Subsection
16430 Multiple Bibliographies
16433 \begin_layout Standard
16434 Multiple bibliographies, e.
16435 \begin_inset space \thinspace{}
16439 \begin_inset space \space{}
16442 a bibliography for each section or chapter of the document, are not supported
16443 by Bib\SpecialChar TeX
16446 \begin_inset Flex Code
16449 \begin_layout Plain Layout
16455 package, which is used for the creation of sectioned bibliographies in
16457 (see the previous section), provides an easy way to solve this task, if
16458 you are willing to use some
16459 \begin_inset Flex Noun
16462 \begin_layout Plain Layout
16470 \begin_inset space ~
16474 \begin_inset CommandInset ref
16476 reference "sec:Inserting-TeX-Code"
16484 \begin_layout Plain Layout
16485 An alternative approach is to use the
16486 \begin_inset Flex Code
16489 \begin_layout Plain Layout
16496 \begin_inset Flex Code
16499 \begin_layout Plain Layout
16505 package, respectively.
16513 \begin_layout Standard
16515 \begin_inset Flex Noun
16518 \begin_layout Plain Layout
16519 Document\SpecialChar menuseparator
16526 \begin_inset Flex Noun
16529 \begin_layout Plain Layout
16536 \begin_inset Flex Noun
16539 \begin_layout Plain Layout
16540 Sectioned bibliography
16546 In the document, you have to enclose the sections, which shall contain
16547 their own bibliography (including the Bib\SpecialChar TeX
16548 bibliography itself), between
16550 \begin_inset Flex Code
16553 \begin_layout Plain Layout
16562 \begin_inset Flex Code
16565 \begin_layout Plain Layout
16573 (those commands have to be inserted as \SpecialChar TeX
16575 The bibliography will contain all references that have been cited in the
16577 \begin_inset Flex Code
16580 \begin_layout Plain Layout
16591 If you are using this approach, then every citation reference has to be
16593 \begin_inset Flex Code
16596 \begin_layout Plain Layout
16604 \begin_inset Flex Code
16607 \begin_layout Plain Layout
16613 s cannot be nested.
16616 \begin_layout Chapter
16617 Multipart Documents
16620 \begin_layout Section
16624 \begin_layout Standard
16625 When you are working on a large file with many sections, it is often convenient
16626 to break up the document into several files, or perhaps you have something
16627 where a table may change from time to time, but the preceding text does
16629 In these cases, you should seriously consider using multipart documents.
16630 For example, scientific papers often have five major sections: the introduction
16631 , observations, results, discussion, and conclusion.
16632 Each of these could be its own separate \SpecialChar LyX
16634 \begin_inset Quotes eld
16638 \begin_inset Quotes erd
16641 file which contains the title, authors, abstract, references, etc., plus
16642 the five included files.
16643 It is important to note that each of these files is a full \SpecialChar LyX
16645 can be formatted and printed on its own, as well as included in a master
16647 Each of these files must have the same document class, however—don't attempt
16648 to mix book classes with article classes.
16649 You may also include \SpecialChar LaTeX
16650 files; however, these files must not have their own
16652 \begin_inset space \thinspace{}
16656 \begin_inset space \space{}
16659 everything up to and including the
16660 \begin_inset Flex Code
16663 \begin_layout Plain Layout
16671 line as well as the
16672 \begin_inset Flex Code
16675 \begin_layout Plain Layout
16683 line must be deleted) or else errors will be generated when you try to
16687 \begin_layout Standard
16689 allows you to include files quite easily with
16690 \begin_inset Flex Noun
16693 \begin_layout Plain Layout
16694 Insert\SpecialChar menuseparator
16696 \begin_inset space ~
16705 When you click on this selection a small box is inserted into the file
16706 at the current cursor location.
16707 Clicking on the box raises a dialog which allows you to select the file
16708 to be included, and the method of its inclusion.
16712 \begin_layout Standard
16713 The file selection box should by now be obvious.
16714 The three inclusion methods are
16715 \begin_inset Quotes eld
16719 \begin_inset Quotes erd
16723 \begin_inset Quotes eld
16727 \begin_inset Quotes erd
16731 \begin_inset Quotes eld
16735 \begin_inset Quotes erd
16739 The difference between
16740 \begin_inset Quotes eld
16744 \begin_inset Quotes erd
16748 \begin_inset Quotes eld
16752 \begin_inset Quotes erd
16755 is really only meaningful to \SpecialChar LaTeX
16756 perts, but the practical difference is that
16758 \begin_inset Quotes eld
16762 \begin_inset Quotes erd
16765 are typeset beginning on a new page, while files that are
16766 \begin_inset Quotes eld
16770 \begin_inset Quotes erd
16773 are typeset starting on the current page.
16776 \begin_layout Standard
16777 Generally, the master file is converted into a full \SpecialChar LaTeX
16778 file before typesetting,
16779 while the included files are converted to \SpecialChar LaTeX
16780 files that do not have all the
16781 preamble information.
16784 \begin_layout Standard
16786 \begin_inset Quotes eld
16790 \begin_inset Quotes erd
16793 included file allows you to include a file typeset exactly as it appears
16795 \begin_inset space \thinspace{}
16799 \begin_inset space \space{}
16803 \begin_inset Flex Code
16806 \begin_layout Plain Layout
16812 mode, with the characters set in a fixed-width typewriter font.
16813 Normally, spaces in this file are invisible, though two consecutive spaces
16814 are conserved, unlike \SpecialChar LyX
16815 's normal treatment of spaces.
16816 However, setting the
16817 \begin_inset Flex Noun
16820 \begin_layout Plain Layout
16822 \begin_inset space ~
16826 \begin_inset space ~
16830 \begin_inset space ~
16838 checkbox typesets a mark to unambiguously define the presence of a space.
16842 \begin_layout Section
16843 Cross-References Between Files
16846 \begin_layout Standard
16847 \begin_inset Box Shadowbox
16857 height_special "totalheight"
16862 backgroundcolor "none"
16865 \begin_layout Plain Layout
16866 This section is somewhat out of date.
16867 Need to describe default master documents and how children are opened when
16877 \begin_layout Standard
16878 It is possible to set up cross-references between the different files.
16879 First, open all the files in question: let's call them A and B in a two
16880 file example, where B is included in A.
16881 Let's say you insert a label in A, then want to reference it in B.
16882 Open the cross-reference dialog whilst in document B, and you can select
16884 \begin_inset Quotes eld
16888 \begin_inset Quotes erd
16894 \begin_layout Section
16895 Bibliography Lists in all Subdocuments
16898 \begin_layout Standard
16899 \begin_inset Box Frameless
16909 height_special "totalheight"
16914 backgroundcolor "none"
16917 \begin_layout Plain Layout
16918 This section also needs updating.
16919 There is now material about this on the wiki, and it could be copied here.
16927 \begin_layout Standard
16928 Copy the bibliography list with all entries to all subdocuments and transform
16930 This way \SpecialChar LyX
16932 \begin_inset Flex Code
16935 \begin_layout Plain Layout
16941 -files and you can easily insert references without making the bibliography
16945 \begin_layout Standard
16946 As the bibliography list is in a comment, \SpecialChar LaTeX
16947 won't use it and the references
16948 will look like this: [?], instead of like this: [1].
16949 One solution is to use the \SpecialChar LaTeX
16951 \begin_inset Flex Code
16954 \begin_layout Plain Layout
16960 that will only include comments by processing the files separately.
16961 To do this, add in the \SpecialChar LaTeX
16962 preamble of every subdocument the following:
16965 \begin_layout LyX-Code
16968 usepackage{comment}
16971 \begin_layout LyX-Code
16974 includecomment{comment}
16977 \begin_layout Standard
16979 \begin_inset Flex URL
16982 \begin_layout Plain Layout
16984 http://wiki.lyx.org/FAQ/Unsorted#toc31
16992 \begin_layout Section
16993 Itemize Bullet Selection
16994 \begin_inset CommandInset label
17003 \begin_layout Standard
17009 \begin_layout Subsection
17013 \begin_layout Standard
17015 provides 216 bullet shapes that can be accessed from a simple dialog.
17016 Using this dialog you can easily specify what bullet shape to use at each
17017 level of an itemized list.
17018 These settings are document-wide so you won't be able to specify different
17019 sets of bullets for different paragraphs.
17023 \begin_layout Plain Layout
17024 Well, actually you can but you'll have to do it by hand.
17032 \begin_layout Subsection
17036 \begin_layout Standard
17037 Open the dialog by selecting the
17038 \begin_inset Flex Noun
17041 \begin_layout Plain Layout
17042 Document\SpecialChar menuseparator
17048 menu item and then select the
17049 \begin_inset Flex Noun
17052 \begin_layout Plain Layout
17061 \begin_layout Standard
17062 The dialog provides you with a table of bullet shapes.
17063 A column of buttons on the left of the table provides access to the six
17064 different panels of bullet shapes.
17065 The row of buttons across the top is used to select which bullet depth
17067 A text entry under the table shows the currently selected bullet shape's
17069 equivalent and this can be edited if desired.
17070 If you do modify the text you will also need to specify any needed packages
17071 in the \SpecialChar LaTeX
17075 \begin_layout Standard
17076 The six panels are divided up by the packages they require.
17077 The following table shows the mappings from button name to \SpecialChar LaTeX
17079 \begin_inset Separator latexpar
17085 \begin_layout Standard
17087 \begin_inset Tabular
17088 <lyxtabular version="3" rows="7" columns="2">
17089 <features tabularvalignment="middle">
17090 <column alignment="center" valignment="top" width="0pt">
17091 <column alignment="center" valignment="top" width="0pt">
17093 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
17096 \begin_layout Plain Layout
17111 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
17114 \begin_layout Plain Layout
17131 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
17134 \begin_layout Plain Layout
17149 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
17152 \begin_layout Plain Layout
17161 base \SpecialChar LaTeX
17169 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
17172 \begin_layout Plain Layout
17187 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
17190 \begin_layout Plain Layout
17207 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
17210 \begin_layout Plain Layout
17225 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
17228 \begin_layout Plain Layout
17245 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
17248 \begin_layout Plain Layout
17263 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
17266 \begin_layout Plain Layout
17283 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
17286 \begin_layout Plain Layout
17301 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
17304 \begin_layout Plain Layout
17321 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
17324 \begin_layout Plain Layout
17339 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
17342 \begin_layout Plain Layout
17365 \begin_layout Standard
17367 doesn't stop you using bullets from packages you don't have.
17368 If you get errors from \SpecialChar LaTeX
17369 when you try to view or print the file, then it
17370 is likely you are missing a package.
17374 \begin_layout Plain Layout
17376 doesn't restrict your use since you may be editing locally and exporting
17385 \begin_layout Subsection
17389 \begin_layout Standard
17390 Select which bullet depth you want to change then select the bullet shape
17392 Any changes will not be visible in \SpecialChar LyX
17393 , but are visible when viewing the document.
17396 \begin_layout Standard
17397 You can reset a bullet shape to the default simply by clicking your right
17398 mouse button on the appropriate bullet depth button.
17402 \begin_layout Plain Layout
17407 want to have multiple sets of paragraphs with different sets of bullets
17408 in each, then you're going to have to get your hands dirty with \SpecialChar TeX
17410 The bullet selection dialog can help though because it provides you with
17411 the \SpecialChar LaTeX
17412 code for a wide range of bullet shapes.
17413 To make your own custom paragraphs you have the following options:
17416 \begin_layout Plain Layout
17420 \begin_layout Plain Layout
17436 \begin_layout Plain Layout
17440 \begin_layout Plain Layout
17462 \begin_layout Itemize
17463 Use the \SpecialChar LaTeX
17465 \begin_inset Flex Code
17468 \begin_layout Plain Layout
17476 to specify a new bullet shape for a given depth.
17477 You'll also need to save the current bullet shape so you can restore it
17479 In this itemized list the following \SpecialChar LaTeX
17480 code was used to change the bullet
17481 used for the first depth.
17482 \begin_inset Separator latexpar
17489 \begin_layout LyX-Code
17499 \begin_layout LyX-Code
17516 \begin_layout Itemize
17517 Note that the itemize depth is specified in Roman numerals as part of the
17527 \begin_layout Itemize
17531 \begin_layout Plain Layout
17544 Specify each individual entry by starting each item with the bullet shape
17545 enclosed in square brackets and set as
17546 \begin_inset Flex Noun
17549 \begin_layout Plain Layout
17557 For example, this item was started with
17558 \begin_inset Flex Code
17561 \begin_layout Plain Layout
17576 \begin_layout Plain Layout
17580 \begin_layout Plain Layout
17596 \begin_layout Plain Layout
17597 You'll also need to revert the labelitem back to its previous setting for
17598 the global bullet shape settings to remain in effect.
17599 The way used here was:
17602 \begin_layout LyX-Code
17617 \begin_layout Chapter
17619 Features needing Extra Software
17622 \begin_layout Section
17623 Checking \SpecialChar TeX
17627 \begin_layout Standard
17633 \begin_layout Subsection
17637 \begin_layout Standard
17646 \begin_layout Plain Layout
17651 is not yet available when you are using the \SpecialChar LaTeX
17652 distribution MiK\SpecialChar TeX
17658 , you'll find in the
17665 \begin_inset space ~
17676 \begin_inset Newline newline
17680 \begin_inset CommandInset href
17682 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17689 \begin_layout Standard
17692 Chk\SpecialChar TeX
17695 package is a program that was written by
17696 \begin_inset Flex Noun
17699 \begin_layout Plain Layout
17701 \begin_inset space ~
17709 in frustration because some constructs in \SpecialChar LaTeX
17710 are sometimes non-intuitive,
17711 and easy to forget.
17712 The program runs over your \SpecialChar LaTeX
17713 file, checks the integrity of the file, and
17714 flags some common errors.
17715 In other technical words, it is
17719 for \SpecialChar LaTeX
17723 \begin_layout Standard
17724 Well, what is a syntax checker doing in \SpecialChar LyX
17725 which is supposed to produce correct
17727 anyways? The answer is simple: Just as
17731 not only checks the
17735 of C programs, but also does
17739 checks for type-errors,
17741 Chk\SpecialChar TeX
17744 catches some common
17748 errors, in addition to the syntactical ones.
17751 Chk\SpecialChar TeX
17754 is capable of detecting several common errors, such as
17757 \begin_layout Itemize
17758 Ellipsis detection:
17759 \begin_inset Newline newline
17762 Use \SpecialChar ldots
17766 \begin_layout Itemize
17767 No space in front of/after parenthesis:
17768 \begin_inset Newline newline
17774 \begin_layout Itemize
17775 Enforcement of normal space after common abbreviations:
17776 \begin_inset Newline newline
17780 \begin_inset space \thinspace{}
17784 \begin_inset space \space{}
17787 is too wide spacing.
17790 \begin_layout Itemize
17791 Enforcement of end-of-sentence space when the last sentence ends with a
17793 \begin_inset Newline newline
17797 And this is wrong spacing.
17800 \begin_layout Itemize
17801 Space in front of labels and similar commands:
17802 \begin_inset Newline newline
17805 The label should stick right up to the text to avoid falling to a wrong
17808 \begin_inset CommandInset label
17818 \begin_layout Plain Layout
17819 This footnote is in danger of falling off to a wrong page
17824 The label is separated too much.
17827 \begin_layout Itemize
17828 Space in front of references, instead of hard spaces:
17829 \begin_inset Newline newline
17832 If you have bad luck, the text will break right between the referenced text
17833 and reference number, and that's a pity.
17835 \begin_inset CommandInset ref
17837 reference "sec:chktex"
17844 \begin_layout Itemize
17846 \begin_inset Quotes eld
17850 \begin_inset Quotes erd
17854 \begin_inset Formula $\times$
17858 \begin_inset Newline newline
17861 2x2 looks cheap compared to
17862 \begin_inset Formula $2\times2$
17868 \begin_layout Standard
17869 and more \SpecialChar ldots
17870 It is an invaluable tool when you are
17871 \begin_inset Quotes eld
17875 \begin_inset Quotes erd
17878 your document before printing, and you should run it right after the obligatory
17879 spelling check, and before you go fine tuning the typesetting.
17882 \begin_layout Subsection
17886 \begin_layout Standard
17887 If you have the program installed, usage is as simple as choosing
17889 Tools\SpecialChar menuseparator
17891 \begin_inset space ~
17897 This will make \SpecialChar LyX
17898 generate a \SpecialChar LaTeX
17899 file of your document, start
17901 Chk\SpecialChar TeX
17904 to check it, and then make \SpecialChar LyX
17906 \begin_inset Quotes eld
17910 \begin_inset Quotes erd
17913 with the warnings from
17915 Chk\SpecialChar TeX
17918 , if there were any.
17919 The warnings will be placed close to the point of the mistake, and you
17920 can quickly find them by using the
17922 Navigate\SpecialChar menuseparator
17925 menu item, or the shortcut key
17934 Open the error boxes by clicking on them with the mouse, or use the shortcut
17943 bindings, or the corresponding
17952 Read the warning and correct the mistake, if it is a mistake.
17953 If you have trouble understanding what the warning is about, you can safely
17955 Remember that there is a hidden layer between the document on screen and
17956 the technical details in invoking
17958 Chk\SpecialChar TeX
17961 , and this gap can make some warnings seem arcane or just plain silly.
17964 \begin_layout Standard
17965 This document is an excellent testing bed for the feature, and it should
17966 provide quite a few warnings for you to fiddle with.
17967 Since computers are only so smart, expect most of the warnings to be false
17971 \begin_layout Subsection
17972 How to fine tune it
17975 \begin_layout Standard
17976 Sometimes, you'll find that
17978 Chk\SpecialChar TeX
17981 makes more noise than suits your mood.
17982 Then you can choose not to use it, wait until your mood changes, or try
17985 Chk\SpecialChar TeX
17988 to get better along with you.
17991 \begin_layout Standard
17994 Chk\SpecialChar TeX
18001 very configurable and extensible, you should not expect to solve all problems
18004 Chk\SpecialChar TeX
18007 in \SpecialChar LyX
18009 Since \SpecialChar LyX
18010 has to generate a somewhat special \SpecialChar LaTeX
18011 file to be able to match the
18012 line numbers from the
18014 Chk\SpecialChar TeX
18021 \begin_layout Plain Layout
18022 You can inspect the specific output from
18028 Document\SpecialChar menuseparator
18031 \begin_inset space ~
18045 to the internal document structure, some of the warnings will not appear
18047 There are two things you can do about this:
18050 \begin_layout Itemize
18053 Chk\SpecialChar TeX
18056 invocation command line in
18057 \begin_inset Flex Noun
18060 \begin_layout Plain Layout
18061 Tools\SpecialChar menuseparator
18062 Preferences\SpecialChar menuseparator
18063 Output\SpecialChar menuseparator
18064 LaTeX\SpecialChar menuseparator
18072 Chk\SpecialChar TeX
18075 installation configuration file (usually with the file
18080 See below to learn what warnings can be enabled and disabled on the command
18084 \begin_layout Itemize
18085 Export your document as a raw \SpecialChar LaTeX
18088 File\SpecialChar menuseparator
18089 Export\SpecialChar menuseparator
18098 Invoked in this way, it can be a hassle to find the corresponding place
18099 in the document inside \SpecialChar LyX
18100 , but with a little patience, you should be able
18104 \begin_layout Standard
18105 Here follows the warning messages that can be enabled and disabled in
18114 to disable a warning, and
18118 to enable a warning.
18119 The emphasized entries are disabled by default, because the default is
18122 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18127 \begin_layout Standard
18128 Notice that you should only use the options that enable and disable warnings,
18129 because \SpecialChar LyX
18130 relies on some of the other command line parameters to be set
18131 in a specific way to have a chance to communicate with
18138 \begin_layout Enumerate
18142 Command terminated with space.
18145 \begin_layout Enumerate
18148 Non-breaking space (
18149 \begin_inset Quotes eld
18157 \begin_inset Quotes erd
18160 ) should have been used.
18163 \begin_layout Enumerate
18167 You should enclose the previous parenthesis with
18168 \begin_inset Quotes eld
18176 \begin_inset Quotes erd
18182 \begin_layout Enumerate
18185 Italic correction (
18186 \begin_inset Quotes eld
18196 \begin_inset Quotes erd
18199 ) found in non-italic buffer.
18202 \begin_layout Enumerate
18205 Italic correction (
18206 \begin_inset Quotes eld
18216 \begin_inset Quotes erd
18219 ) found more than once.
18222 \begin_layout Enumerate
18226 No italic correction (
18227 \begin_inset Quotes eld
18237 \begin_inset Quotes erd
18243 \begin_layout Enumerate
18247 \begin_inset Quotes eld
18255 \begin_inset Quotes erd
18259 \begin_inset Quotes eld
18267 \begin_inset Quotes erd
18273 \begin_layout Enumerate
18276 Wrong length of dash may have been used.
18279 \begin_layout Enumerate
18283 \begin_inset Quotes eld
18291 \begin_inset Quotes erd
18295 \begin_inset Quotes eld
18303 \begin_inset Quotes erd
18309 \begin_layout Enumerate
18313 \begin_inset Quotes eld
18321 \begin_inset Quotes erd
18327 \begin_layout Enumerate
18331 \begin_inset Quotes eld
18339 \begin_inset Quotes erd
18342 to achieve an ellipsis.
18345 \begin_layout Enumerate
18348 Inter-word spacing (
18349 \begin_inset Quotes eld
18359 \begin_inset Quotes eld
18362 ) should perhaps be used.
18365 \begin_layout Enumerate
18368 Inter-sentence spacing (
18369 \begin_inset Quotes eld
18379 \begin_inset Quotes erd
18382 ) should perhaps be used.
18385 \begin_layout Enumerate
18388 Could not find argument for command.
18391 \begin_layout Enumerate
18395 \begin_inset Quotes eld
18403 \begin_inset Quotes erd
18409 \begin_layout Enumerate
18412 Math mode still on at end of \SpecialChar LaTeX
18416 \begin_layout Enumerate
18420 \begin_inset Quotes eld
18428 \begin_inset Quotes erd
18431 doesn't match the number of
18432 \begin_inset Quotes eld
18440 \begin_inset Quotes erd
18446 \begin_layout Enumerate
18449 You should use either
18452 \begin_inset Quotes eld
18460 \begin_inset Quotes erd
18465 as an alternative to
18466 \begin_inset Quotes eld
18474 \begin_inset Quotes erd
18480 \begin_layout Enumerate
18487 " (ASCII 39) instead of "
18494 \begin_layout Enumerate
18497 User-specified pattern found.
18500 \begin_layout Enumerate
18503 This command might not be intended.
18506 \begin_layout Enumerate
18513 \begin_layout Enumerate
18531 \begin_layout Enumerate
18534 Delete this space to maintain correct page references.
18537 \begin_layout Enumerate
18541 You might wish to put this between a pair of
18542 \begin_inset Quotes eld
18550 \begin_inset Quotes erd
18556 \begin_layout Enumerate
18559 You ought to remove spaces in front of punctuation.
18562 \begin_layout Enumerate
18565 Could not execute \SpecialChar LaTeX
18569 \begin_layout Enumerate
18578 in front of small punctuation.
18581 \begin_layout Enumerate
18589 may look prettier here.
18592 \begin_layout Enumerate
18596 Multiple spaces detected in output.
18599 \begin_layout Enumerate
18602 This text may be ignored.
18605 \begin_layout Enumerate
18611 \begin_inset Quotes eld
18616 to begin quotation, not
18623 \begin_layout Enumerate
18630 to end quotation, not
18633 \begin_inset Quotes eld
18641 \begin_layout Enumerate
18647 \begin_layout Enumerate
18650 You should perhaps use
18651 \begin_inset Quotes eld
18659 \begin_inset Quotes erd
18665 \begin_layout Enumerate
18668 You should put a space in front of/after parenthesis.
18671 \begin_layout Enumerate
18674 You should avoid spaces in front of/after parenthesis.
18677 \begin_layout Enumerate
18681 You should not use punctuation in front of/after quotes.
18684 \begin_layout Enumerate
18687 Double space found.
18690 \begin_layout Enumerate
18693 You should put punctuation outside inner/inside display math mode.
18696 \begin_layout Enumerate
18699 You ought to not use primitive \SpecialChar TeX
18700 in \SpecialChar LaTeX
18704 \begin_layout Enumerate
18707 You should remove spaces in front of
18708 \begin_inset Quotes eld
18716 \begin_inset Quotes erd
18722 \begin_layout Enumerate
18725 \begin_inset Quotes eld
18733 \begin_inset Quotes erd
18736 is normally not followed by
18737 \begin_inset Quotes eld
18745 \begin_inset Quotes erd
18751 \begin_layout Standard
18752 In later versions of \SpecialChar LyX
18753 , we hope to provide a more complete interface to this
18754 tool (and it's smaller cousin
18758 ) to exploit the full power of it.
18759 But it's not exactly useless as it is now: go try it on one of your existing
18760 documents of a certain length and be surprised.
18763 \begin_layout Section
18764 Version Control in \SpecialChar LyX
18768 \begin_layout Standard
18771 Lars Gullik Bjønnes
18778 \begin_layout Subsection
18782 \begin_layout Standard
18784 supports some of the most basic RCS/CVS/SVN/GIT commands.
18785 If you need something a bit more sophisticated you will have to do that
18786 manually in a terminal.
18789 \begin_layout Standard
18790 Also note that CVS support is not as good as subversion support so we advise
18792 A good place to start learning Subversion is SVN Book
18796 \begin_layout Plain Layout
18797 \begin_inset CommandInset href
18799 target "http://svnbook.red-bean.com/"
18809 In the case of RCS you should read
18810 \begin_inset Quotes eld
18814 \begin_inset Quotes erd
18817 (a man file, read it with
18822 This file describes all the basic features of RCS.
18823 You should especially notice the comment about a RCS directory, and the
18824 notion of a master RCS file (the file ending in
18831 \begin_layout Standard
18832 Before you begin to use the version control features in \SpecialChar LyX
18834 familiar with RCS/CVS/SVN/GIT usage.
18835 The implementation in \SpecialChar LyX
18836 assumes a recent version of the GNU RCS or CVS/SVN
18837 package — no guarantees are made for older versions.
18838 Most of the log messages are not currently displayed after operations —
18839 you can check them in the Messages pane if unsure.
18840 Regular users of version control will appreciate VC toolbar, which can
18843 View\SpecialChar menuseparator
18844 Toolbars\SpecialChar menuseparator
18846 \begin_inset space ~
18854 \begin_layout Standard
18855 For introducing your own external commands consult vc-command in the manual
18856 of \SpecialChar LyX
18860 \begin_layout Standard
18861 It is strongly recommended to store documents in uncompressed format if
18862 using version control (uncheck
18864 Document\SpecialChar menuseparator
18867 if it is checked): Uncompressed LyX documents are text files and therefore
18868 for merging two different versions by version control systems.
18869 Compressed LyX documents are binary files, which cannot be merged by version
18873 \begin_layout Subsection
18874 RCS commands in \SpecialChar LyX
18878 \begin_layout Standard
18879 The following sections describe the RCS commands supported by \SpecialChar LyX
18881 You can find them in the
18883 File\SpecialChar menuseparator
18885 \begin_inset space ~
18892 was tested against RCS 5.7/5.8.
18895 \begin_layout Subsubsection
18901 \begin_layout Standard
18902 If your document is not under revision control, this is the only item shown
18904 And if it is under revision control, the
18908 item is not visible.
18912 \begin_layout Standard
18913 This command registers your document with RCS (unless you are under the
18914 directory managed by CVS)\SpecialChar endofsentence
18915 You are asked interactively to supply an initial
18916 description of the document.
18917 The document is now set in Read-Only mode and you have to
18920 \begin_inset space ~
18924 \begin_inset space ~
18928 \begin_inset space ~
18933 , before making any changes to it.
18934 A document under revision control has a
18935 \begin_inset Quotes eld
18938 [RCS:<version> <locker>]
18939 \begin_inset Quotes erd
18942 item tagged to the filename in the minibuffer.
18945 \begin_layout Standard
18946 RCS command that is run:
18948 ci -q -u -i -t-"<initial description>" <file-name>
18951 \begin_layout Standard
18956 to understand the switches.
18960 \begin_layout Subsubsection
18966 \begin_layout Standard
18967 When you are finished editing a file, you check in your changes.
18968 When you do this, you are asked for a description of the changes.
18969 This is stored in the history log.
18970 The version number is bumped, your changes are applied to the master RCS
18971 file, the document is unlocked and set to Read-Only mode.
18974 \begin_layout Standard
18977 ci -q -u -m"<description>" <file-name>
18980 \begin_layout Subsubsection
18986 \begin_layout Standard
18987 By doing this you lock the document so that only you can edit it.
18988 This will also make the document Read-Write only for you.
18989 You will usually continue editing for a while and when you are finished
18990 you check in your changes.
18991 The status line is changed to reflect that you have locked the file.
18994 \begin_layout Standard
18997 co -q -l <file-name>
19000 \begin_layout Subsubsection
19003 Revert To Repository Version
19006 \begin_layout Standard
19007 This will discard all changes made to the document since the last check
19009 You get a warning before changes are discarded.
19012 \begin_layout Standard
19015 co -f -u<version> <file-name>
19018 \begin_layout Subsubsection
19024 \begin_layout Standard
19025 This will create a copy of the current document.
19026 Since RCS does not support copy operations natively, the version history
19027 is not preserved, and the copy is added as a new file.
19028 It requires a clean document without any changes since the last checkin.
19029 You are asked for a file name and a description of the copy operation.
19030 After that the copy is created, both locally and in the repository.
19031 If the parent directories of the copied and original document differ, all
19032 relative paths of included files of the copy are adjusted (like in
19034 File\SpecialChar menuseparator
19039 Finally, the copy is loaded instead of the original document.
19042 \begin_layout Labeling
19043 \labelwidthstring 00.00.0000
19045 \begin_inset space ~
19049 \begin_inset space ~
19053 \begin_inset Newline newline
19057 \begin_inset Flex Code
19060 \begin_layout Plain Layout
19063 \begin_inset Quotes eld
19067 \begin_inset Quotes erd
19076 \begin_inset Flex Code
19079 \begin_layout Plain Layout
19082 \begin_inset Quotes eld
19086 \begin_inset Quotes erd
19095 \begin_inset Newline newline
19099 \begin_inset Flex Code
19102 \begin_layout Plain Layout
19106 \begin_inset Quotes eld
19110 \begin_inset Quotes erd
19121 \begin_layout Subsubsection
19127 \begin_layout Standard
19128 This makes as if the last check in never happened.
19129 No changes are made to the document loaded into \SpecialChar LyX
19130 , but the last version
19131 is removed from the master RCS file.
19134 \begin_layout Standard
19137 rcs -o<version> <file-name>
19140 \begin_layout Subsubsection
19146 \begin_layout Standard
19147 This shows the complete history of the RCS document.
19152 is shown in a browser.
19160 \begin_layout Subsubsection
19164 \begin_layout Standard
19166 supports RCS version number, author name, date and time of last commit.
19167 All those are extracted from
19169 rlog -r <file-name>
19173 \begin_inset CommandInset ref
19175 reference "subsec:VCS-Revision-Information"
19182 \begin_layout Subsection
19183 CVS commands in \SpecialChar LyX
19187 \begin_layout Standard
19188 A subset of CVS operations is supported by \SpecialChar LyX
19190 You can find the commands in the
19192 File\SpecialChar menuseparator
19194 \begin_inset space ~
19200 The version control system SVN is more powerful, so please use it instead
19201 of CVS if possible.
19204 \begin_layout Subsubsection
19210 \begin_layout Standard
19211 If you start from scratch with CVS you have to create your repository and
19212 checkout the working copy with external tools.
19213 If you're using a client-server setup you may need to login before doing
19214 the first repository checkout.
19217 \begin_layout Standard
19218 If your documents are under revision control and others are using the same
19219 repository problems arise when different changes to the same document at
19220 the same location happen.
19221 Standard CVS repositories don't operate with a file locking mechanism.
19222 This may be surprising, but conflicts only occur if people disagree on
19223 the proper content of the same part of a document.
19224 So, if co-workers are used to communicate regularly, these conflicts occur
19226 If they don't communicate they have a fundamental problem anyway.
19227 Nevertheless some people like to work with so called
19228 \begin_inset Quotes eld
19232 \begin_inset Quotes erd
19236 If they do so the working copy of all files is readonly when checked out
19237 first and the user starts editing after using a special command to make
19238 the working copy writable.
19239 When the changes are checked in the working copy returns to readonly state.
19240 With \SpecialChar LyX
19241 one has to edit the
19242 \begin_inset Flex Code
19245 \begin_layout Plain Layout
19251 file and add the line
19252 \begin_inset Flex Code
19255 \begin_layout Plain Layout
19261 to work with reserved checkouts.
19262 The benefit is the possibility to see who is using a writable copy of some
19264 It's not guaranteed only one user makes a copy writable.
19267 \begin_layout Standard
19269 tries to guess if you're using reserved or non-reserved checkouts.
19270 If your working copy is readonly or it is writable and an additional copy
19271 of your document exists in the CVS/Base sub-directory a reserved otherwise
19272 a non-reserved checkout is assumed.
19273 When a reserved checkout is detected you have to use
19274 \begin_inset Flex Noun
19277 \begin_layout Plain Layout
19283 to make your working copy writable if it's readonly.
19285 \begin_inset Flex Noun
19288 \begin_layout Plain Layout
19294 operation is possible and that makes your working copy readonly again after
19295 transferring your changes to the repository.
19298 \begin_layout Standard
19299 More information about CVS can be found here
19300 \begin_inset Flex URL
19303 \begin_layout Plain Layout
19305 http://www.nongnu.org/cvs
19311 \begin_inset Flex URL
19314 \begin_layout Plain Layout
19316 http://ximbiot.com/cvs
19324 \begin_layout Standard
19329 to understand the sub-commands and the switches mentioned below.
19332 \begin_layout Subsubsection
19338 \begin_layout Standard
19339 If your document is not under revision control, this is the only item shown
19341 And if it is under revision control, the
19345 item is not visible.
19349 \begin_layout Standard
19350 This command registers in CVS your document
19351 \begin_inset Flex Strong
19354 \begin_layout Plain Layout
19362 in the case you have already the documents directory under CVS control
19368 This means you have to create or checkout the archive by yourself using
19370 (In case you forget that step \SpecialChar LyX
19371 registers the document with RCS.)
19374 \begin_layout Standard
19375 Then you are asked interactively to supply an initial description of the
19377 Don't forget that registered file is not yet checked in.
19380 \begin_layout Standard
19381 CVS command that is run:
19383 cvs -q add -m"<entered message>" "<file-name>"
19386 \begin_layout Standard
19391 above and for all other CVS commands is an abbreviation for
19392 \begin_inset Quotes eld
19395 change the current working directory to file location and use the file name
19396 without path component as argument
19397 \begin_inset Quotes erd
19403 \begin_layout Subsubsection
19409 \begin_layout Standard
19410 When you are finished editing a file, you commit your changes.
19411 When you do this and you had changed the document, you are asked for a
19412 description of the changes.
19413 After that changes are written to the repository.
19414 In case you didn't change the document and a reserved checkout is detected
19415 the reservation made on
19416 \begin_inset Flex Noun
19419 \begin_layout Plain Layout
19428 \begin_layout Labeling
19429 \labelwidthstring 00.00.0000
19431 \begin_inset space ~
19435 \begin_inset space ~
19439 \begin_inset Newline newline
19443 \begin_inset Flex Code
19446 \begin_layout Plain Layout
19449 -q commit -m"<description>" "<file-name>"
19455 \begin_inset Newline newline
19459 \begin_inset Flex Code
19462 \begin_layout Plain Layout
19473 \begin_layout Subsubsection
19479 \begin_layout Standard
19480 When you are sharing a repository with others, you may have to incorporate
19481 their changes into your working copy.
19484 \begin_layout Standard
19487 cvs -q update "<file-name>"
19490 \begin_layout Standard
19491 If a readonly checkout is detected the working copy is made writable and
19495 \begin_layout Standard
19498 cvs -q edit "<file-name>"
19501 \begin_layout Subsubsection
19504 Revert To Repository Version
19507 \begin_layout Standard
19508 This will discard all changes made to the document since the last check
19510 You get a warning before changes are discarded.
19511 Firstly the file is deleted, secondly CVS update command is run.
19514 \begin_layout Standard
19517 cvs -q update "<file-name>"
19520 \begin_layout Standard
19521 If a reserved checkout is detected and the working copy has no changes only
19522 the reservation is undone.
19525 \begin_layout Standard
19528 cvs -q unedit "<file-name>"
19531 \begin_layout Subsubsection
19537 \begin_layout Standard
19538 This will create a copy of the current document.
19539 Since CVS does not support copy operations natively, the version history
19540 is not preserved, and the copy is added as a new file.
19541 It requires a clean document without any changes since the last checkin.
19542 You are asked for a file name and a description of the copy operation.
19543 After that the copy is created, both locally and in the repository.
19544 If the parent directories of the copied and original document differ, all
19545 relative paths of included files of the copy are adjusted (like in
19547 File\SpecialChar menuseparator
19552 Finally, the copy is loaded instead of the original document.
19555 \begin_layout Labeling
19556 \labelwidthstring 00.00.0000
19558 \begin_inset space ~
19562 \begin_inset space ~
19566 \begin_inset Newline newline
19570 \begin_inset Flex Code
19573 \begin_layout Plain Layout
19576 \begin_inset Quotes eld
19580 \begin_inset Quotes erd
19589 \begin_inset Flex Code
19592 \begin_layout Plain Layout
19595 \begin_inset Quotes eld
19599 \begin_inset Quotes erd
19608 \begin_inset Newline newline
19612 \begin_inset Flex Code
19615 \begin_layout Plain Layout
19619 \begin_inset Quotes eld
19623 \begin_inset Quotes erd
19634 \begin_layout Subsubsection
19640 \begin_layout Standard
19641 This will rename the current document.
19642 Since CVS does not support rename operations natively, the version history
19643 is not preserved, the renamed document is added as a new file, and the
19644 original document is deleted.
19645 It requires a clean document without any changes since the last checkin.
19646 You are asked for a file name and a description of the rename operation.
19647 After that the document is renamed, both locally and in the repository.
19648 If the parent directories of the new and old file names differ, all relative
19649 paths of included files are adjusted (like in
19651 File\SpecialChar menuseparator
19656 Finally, the document is reloaded using the new name.
19659 \begin_layout Labeling
19660 \labelwidthstring 00.00.0000
19662 \begin_inset space ~
19666 \begin_inset space ~
19670 \begin_inset Newline newline
19674 \begin_inset Flex Code
19677 \begin_layout Plain Layout
19680 \begin_inset Quotes eld
19684 \begin_inset Quotes erd
19693 \begin_inset Flex Code
19696 \begin_layout Plain Layout
19699 \begin_inset Quotes eld
19703 \begin_inset Quotes erd
19712 \begin_inset Newline newline
19716 \begin_inset Flex Code
19719 \begin_layout Plain Layout
19723 \begin_inset Quotes eld
19727 \begin_inset Quotes erd
19736 \begin_inset Newline newline
19740 \begin_inset Flex Code
19743 \begin_layout Plain Layout
19747 \begin_inset Quotes eld
19751 \begin_inset Quotes erd
19762 \begin_layout Subsubsection
19763 Update of the local directory checkout from repository
19766 \begin_layout Standard
19767 Once your documents gets more complex, containing sub-documents and pictures,
19769 \begin_inset Flex Code
19772 \begin_layout Plain Layout
19778 files and so on using version control becomes more complicated.
19780 supports updating the whole tree in which resides the document.
19781 This become especially useful once you cooperate with people which neither
19782 have detailed knowledge about CVS usage nor they have ambition to commit
19783 additional material to the repository.
19784 You have to organize the files structure so that all external files are
19785 in the same directory or subdirectories of the document.
19786 It's good practice anyway to store multipart documents in an extra directory.
19789 \begin_layout Standard
19791 \begin_inset Flex Code
19794 \begin_layout Plain Layout
19795 Update local directory from repository
19800 command updates the whole directory.
19801 If local changes are detected user is warned before update starts.
19802 In case of merge conflicts both versions of the conflicting document parts
19803 are placed in the final document.
19804 You have to review and correct the result of the merge.
19805 You'll find the conflicts enclosed in pairs of
19806 \begin_inset Flex Code
19809 \begin_layout Plain Layout
19816 \begin_inset Flex Code
19819 \begin_layout Plain Layout
19826 \begin_inset Flex Code
19829 \begin_layout Plain Layout
19836 The first part is your version as before the update operation with the
19837 document name prepended.
19838 The second one is the repository version with the version number after
19840 \begin_inset Flex Code
19843 \begin_layout Plain Layout
19852 \begin_layout Labeling
19853 \labelwidthstring 00.00.0000
19855 \begin_inset space ~
19859 \begin_inset space ~
19863 \begin_inset Newline newline
19867 \begin_inset Flex Code
19870 \begin_layout Plain Layout
19878 (Ask if changes are detected.)
19879 \begin_inset Newline newline
19883 \begin_inset Flex Code
19886 \begin_layout Plain Layout
19887 cd $path; cvs -q update
19897 \begin_layout Standard
19899 \begin_inset Flex Code
19902 \begin_layout Plain Layout
19908 stands for the path to the document.
19911 \begin_layout Subsubsection
19917 \begin_layout Standard
19918 This shows the complete history of the CVS document.
19921 cvs log "<file-name>"
19923 is shown in a browser.
19926 \begin_layout Subsubsection
19930 \begin_layout Standard
19932 supports CVS version number, author name, date and time of last commit.
19933 All those are extracted from
19935 cvs log -r <file-name>
19939 \begin_inset CommandInset ref
19941 reference "subsec:VCS-Revision-Information"
19948 \begin_layout Subsection
19949 SVN commands in \SpecialChar LyX
19953 \begin_layout Standard
19954 SVN is now partially supported by \SpecialChar LyX
19956 You can find the commands in the
19958 File\SpecialChar menuseparator
19960 \begin_inset space ~
19966 Please note that if you use password protected access to repository via
19967 ssh, you will be asked in terminal window.
19969 was tested against SVN 1.5, 1.6, 1.7 and 1.8
19973 \begin_layout Plain Layout
19974 Most of the commands will work with 1.4 too, see
19975 \begin_inset CommandInset ref
19977 reference "subsec:SVN-Repo-Update"
19982 There seems to be currently unresolved permissions problem under SVN 1.8
19983 with reverting changes when file is locked.
19991 \begin_layout Subsubsection
19997 \begin_layout Standard
19998 If your document is not under revision control, this is the only item shown
20000 And if it is under revision control, the
20004 item is not visible.
20007 \begin_layout Standard
20008 This command registers in SVN your document ONLY in case you have already
20009 the documents directory under SVN control (in particular
20014 This means you have to checkout the archive by yourself.
20017 \begin_layout Standard
20018 Then you are asked interactively to supply an initial description of the
20020 Don't forget that registered file is not yet commited.
20023 \begin_layout Standard
20024 SVN command that is run:
20027 \begin_inset Quotes eld
20031 \begin_inset Quotes erd
20037 \begin_layout Standard
20042 to understand the switches.
20045 \begin_layout Subsubsection
20051 \begin_layout Standard
20052 When you are finished editing a file, you commit your changes.
20053 When you do this, you are asked for a description of the changes.
20054 After that changes are commited.
20057 \begin_layout Standard
20062 \begin_layout Plain Layout
20063 In case locking is not enabled.
20065 \begin_inset CommandInset ref
20067 reference "subsec:SVN-File-Locking"
20078 svn commit -q -m"<description>" <file-name>
20081 \begin_layout Subsubsection
20087 \begin_layout Standard
20088 Updates the changes of this file from the repository.
20089 Be sure you understand SVN merging and conflicts resolving before using
20090 this function, because all conflicts has to be resolved manually by you!
20093 \begin_layout Standard
20098 \begin_layout Plain Layout
20106 svn update --non-interactive
20107 \begin_inset Quotes eld
20111 \begin_inset Quotes erd
20117 \begin_layout Subsubsection
20120 Revert To Repository Version
20123 \begin_layout Standard
20124 This will discard all changes made to the document since the last check
20126 You get a warning before changes are discarded.
20129 \begin_layout Standard
20133 \begin_inset Quotes eld
20137 \begin_inset Quotes erd
20143 \begin_layout Subsubsection
20149 \begin_layout Standard
20150 This will create a copy of the current document including the version history.
20151 It requires a clean document without any changes since the last checkin.
20152 You are asked for a file name and a description of the copy operation.
20153 After that the copy is created, both locally and in the repository.
20154 If the parent directories of the copied and original document differ, all
20155 relative paths of included files of the copy are adjusted (like in
20157 File\SpecialChar menuseparator
20162 Finally, the copy is loaded instead of the original document.
20165 \begin_layout Labeling
20166 \labelwidthstring 00.00.0000
20168 \begin_inset space ~
20172 \begin_inset space ~
20176 \begin_inset Newline newline
20180 \begin_inset Flex Code
20183 \begin_layout Plain Layout
20187 \begin_inset Quotes eld
20191 \begin_inset Quotes erd
20195 \begin_inset Quotes eld
20199 \begin_inset Quotes erd
20208 \begin_inset Newline newline
20212 \begin_inset Flex Code
20215 \begin_layout Plain Layout
20224 \begin_layout Subsubsection
20230 \begin_layout Standard
20231 This will rename the current document including the version history.
20232 It requires a clean document without any changes since the last checkin.
20233 You are asked for a file name and a description of the rename operation.
20234 After that the document is renamed, both locally and in the repository.
20235 If the parent directories of the new and old file names differ, all relative
20236 paths of included files are adjusted (like in
20238 File\SpecialChar menuseparator
20243 Finally, the document is reloaded using the new name.
20246 \begin_layout Labeling
20247 \labelwidthstring 00.00.0000
20249 \begin_inset space ~
20253 \begin_inset space ~
20257 \begin_inset Newline newline
20261 \begin_inset Flex Code
20264 \begin_layout Plain Layout
20268 \begin_inset Quotes eld
20272 \begin_inset Quotes erd
20276 \begin_inset Quotes eld
20280 \begin_inset Quotes erd
20289 \begin_inset Newline newline
20293 \begin_inset Flex Code
20296 \begin_layout Plain Layout
20305 \begin_layout Subsubsection
20306 \begin_inset CommandInset label
20308 name "subsec:SVN-Repo-Update"
20312 Update of the local directory checkout from repository
20316 \begin_layout Plain Layout
20317 Note that this command will work only with subversion
20318 \begin_inset Formula $\geqq1.5$
20329 \begin_layout Standard
20330 All the commands above have one shortcomming - they deal with the current
20332 Once your document contains pictures, includes external
20333 \begin_inset Flex Code
20336 \begin_layout Plain Layout
20342 files and so on administration becomes more complicated.
20344 now supports updating the whole tree in which resides the document
20348 \begin_layout Plain Layout
20349 One need to organize the files structure so that all external files are
20350 in the same directory or subdirectories of the document.
20357 This become especially useful once you cooperate with people which neither
20358 know about subversion management nor they have ambition to commit additional
20359 material to the repository.
20363 \begin_layout Standard
20364 \begin_inset Flex Code
20367 \begin_layout Plain Layout
20368 Update local directory from repository
20373 command updates the whole directory and in case of merge conflicts local
20374 version of the files are left, so no unintended data loss occurs.
20375 If local changes are detected user is warned before update starts.
20378 \begin_layout Labeling
20379 \labelwidthstring 00.00.0000
20381 \begin_inset space ~
20385 \begin_inset space ~
20389 \begin_inset Newline newline
20393 \begin_inset Flex Code
20396 \begin_layout Plain Layout
20402 (Ask if changes are detected.)
20403 \begin_inset Newline newline
20407 \begin_inset Flex Code
20410 \begin_layout Plain Layout
20411 svn update –accept mine-full $path
20419 \begin_layout Standard
20421 \begin_inset Flex Code
20424 \begin_layout Plain Layout
20430 stands for the path to the document.
20433 \begin_layout Subsubsection
20439 \begin_layout Standard
20440 This shows the complete history of the SVN document.
20444 \begin_inset Quotes eld
20448 \begin_inset Quotes erd
20453 is shown in a browser.
20456 \begin_layout Subsubsection
20458 \begin_inset CommandInset label
20460 name "subsec:SVN-File-Locking"
20467 \begin_layout Standard
20468 The file exchange through various revision control systems brings the problem
20469 of merge conflicts in case two different users try to edit the same (parts
20471 When such a conflict happens it needs manual resolving and one reasonable
20472 alternative is to provide some kind of locking mechanism, which guarantees
20473 that only one user is allowed to edit file at the given time.
20476 \begin_layout Standard
20477 SVN has two such mechanisms to provide mutual exclusivity for file access
20478 - locks and automatic setting of write permissions (see sec.
20480 \begin_inset CommandInset ref
20482 reference "subsec:Automatical-Locking-Property"
20487 \begin_inset Flex Code
20490 \begin_layout Plain Layout
20500 \begin_layout Plain Layout
20501 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20507 If this property is detected for a given document \SpecialChar LyX
20508 starts to use SVN locks
20509 for document editing automatically and the whole check-in/out mechanism
20510 switches to the same regimen as for RCS.
20511 This in particular means there are two different modes of file use in \SpecialChar LyX
20515 \begin_layout Itemize
20517 The loaded file is in the read-only mode.
20518 For editing on needs to check-out.
20523 consists of updating from the repository and gaining write lock.
20524 If the lock is not possible to obtain, we remain in unlocked state.
20527 \begin_layout Itemize
20529 The loaded file is in the 'normal' edit mode.
20530 No other user is allowed to edit the file.
20535 consists of commiting changes and releasing write-lock.
20536 If no changes have been made to the document, no commit will be produced
20540 \begin_layout Plain Layout
20541 Don't be puzzled by the fact that you will be asked for commit message anyway.
20546 and only the write-lock will be released.
20549 \begin_layout Standard
20553 \begin_layout Labeling
20554 \labelwidthstring 00.00.0000
20557 svn commit -q -m"<description>" "<file-name>"
20558 \begin_inset Newline newline
20561 svn unlock "<file-name>"
20564 \begin_layout Labeling
20565 \labelwidthstring 00.00.0000
20568 svn update "<file-name>"
20569 \begin_inset Newline newline
20572 svn lock "<file-name>"
20575 \begin_layout Subsubsection
20578 \begin_inset CommandInset label
20580 name "subsec:Automatical-Locking-Property"
20586 Automatic Locking Property
20589 \begin_layout Standard
20590 The above mentioned automatic setting of write permissions of the .lyx file
20593 File\SpecialChar menuseparator
20595 \begin_inset space ~
20598 Control\SpecialChar menuseparator
20599 Toggle locking property
20602 This command is active only when the file is not locked on the svn server
20604 you need to check-out before proceeding).
20607 \begin_layout Labeling
20608 \labelwidthstring 00.00.0000
20610 \begin_inset space ~
20616 \begin_layout Labeling
20617 \labelwidthstring 00.00.0000
20620 svn propset svn:needs-lock ON "<file-name>"
20623 \begin_layout Labeling
20624 \labelwidthstring 00.00.0000
20627 svn propdel svn:needs-lock "<file-name>"
20630 \begin_layout Subsubsection
20631 \begin_inset CommandInset label
20633 name "subsec:VCS-Revision-Information"
20637 Revision Information in Documents
20640 \begin_layout Standard
20641 There are more possibilities how to activate revision information in our
20645 \begin_layout Itemize
20648 \begin_inset Separator latexpar
20655 \begin_layout Itemize
20656 tree revision information (
20657 \begin_inset Flex Code
20660 \begin_layout Plain Layout
20667 The result is the output of the
20668 \begin_inset Flex Code
20671 \begin_layout Plain Layout
20677 command, the following table gives you an idea, how to read the results.
20680 \begin_layout Standard
20682 \begin_inset Tabular
20683 <lyxtabular version="3" rows="6" columns="2">
20684 <features tabularvalignment="middle">
20685 <column alignment="center" valignment="top">
20686 <column alignment="center" valignment="top">
20688 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20691 \begin_layout Plain Layout
20697 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20700 \begin_layout Plain Layout
20708 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20711 \begin_layout Plain Layout
20717 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20720 \begin_layout Plain Layout
20721 mixed revision working copy
20728 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20731 \begin_layout Plain Layout
20737 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20740 \begin_layout Plain Layout
20741 modified working copy
20748 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20751 \begin_layout Plain Layout
20757 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20760 \begin_layout Plain Layout
20761 switched working copy
20768 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20771 \begin_layout Plain Layout
20777 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20780 \begin_layout Plain Layout
20781 partial working copy, from a sparse checkout
20788 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20791 \begin_layout Plain Layout
20797 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20800 \begin_layout Plain Layout
20801 mixed revision, modified, switched working copy
20814 \begin_layout Itemize
20815 file revision information.
20816 The result comes from parsing the output of
20817 \begin_inset Flex Code
20820 \begin_layout Plain Layout
20822 \begin_inset space ~
20826 \begin_inset space ~
20830 \begin_inset space ~
20839 Supported flags are:
20840 \begin_inset Separator latexpar
20847 \begin_layout Itemize
20848 version number of the last commit (
20849 \begin_inset Flex Code
20852 \begin_layout Plain Layout
20861 \begin_layout Itemize
20862 author of the last commit (
20863 \begin_inset Flex Code
20866 \begin_layout Plain Layout
20875 \begin_layout Itemize
20876 date of the last commit (
20877 \begin_inset Flex Code
20880 \begin_layout Plain Layout
20889 \begin_layout Itemize
20890 time of the last commit (
20891 \begin_inset Flex Code
20894 \begin_layout Plain Layout
20904 \begin_layout Standard
20905 You can obtain this info via InsetInfo (e.g.
20907 \begin_inset Flex Code
20910 \begin_layout Plain Layout
20911 info-insert buffer vcs-date
20917 The information will be available only when you have the file stored under
20918 svn managment (i.e.
20920 \begin_inset Flex Code
20923 \begin_layout Plain Layout
20929 directory is available with your document).
20933 \begin_layout Itemize
20934 Another—a hacking one—possibility is to use svn keywords
20938 \begin_layout Plain Layout
20939 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20945 In short – you set file keywords property (e.g.
20948 svn propset svn:keywords 'Rev' file.lyx
20950 ) and then paste keyword \SpecialChar TeX
20955 \begin_layout Plain Layout
20956 This is an easy way how to ensure that \SpecialChar LyX
20957 won't break the line in the middle
20963 tag in your document (e.g.
20968 \begin_layout Plain Layout
20976 This way svn client will automatically substitute revision number (e.g.
20981 \begin_layout Plain Layout
20988 ) after each update and commit.
20989 There are more problems with this approach.
20990 Firstly, the '$' character is used in \SpecialChar TeX
20991 world for math equations, so any
20992 occurence of math formula
20993 \begin_inset Formula $Rev$
20997 \begin_inset Formula $Rev:59$
21000 in your \SpecialChar LyX
21002 Similarly for other keywords like Id, Date, Author, etc.
21003 Secondly svn output is dependent on your locales, so its very easy that
21004 svn would produce some problematic strings once Date is used.
21005 Thirdly you get the whole 'Rev: 59' string in your document instead of
21007 Until subversion implements user's custom keywords it will be hard to use
21008 this approach reliably or let \SpecialChar LyX
21009 to support it directly.
21012 \begin_layout Subsection
21013 SVN and Windows Environment
21016 \begin_layout Quote
21017 My inclination is to say that if the user cannot figure out the command
21018 line operations on their own fairly quickly, they would be well advised
21019 to use TortoiseSVN.
21025 \begin_layout Subsubsection
21029 \begin_layout Standard
21030 In addition to installing \SpecialChar LyX
21031 , and having access to a Subversion repository,
21032 the user will need to install the Subversion client program.
21033 A Windows installer for the client program is available from
21034 \begin_inset CommandInset href
21037 target "http://www.collab.net/nonav/downloads/subversion/"
21042 The user may also want to install
21043 \begin_inset CommandInset href
21046 target "http://tortoisesvn.tigris.org/"
21050 , which integrates Subversion operations into the context (rightclick) menu
21051 of Windows Explorer.
21052 Operations done outside \SpecialChar LyX
21053 will typically be more convenient using the Explorer
21055 Note that TortoiseSVN is not a replacement for the client program, which
21056 is what \SpecialChar LyX
21060 \begin_layout Subsubsection
21061 Bringing a document under Subversion control
21064 \begin_layout Standard
21065 Before a \SpecialChar LyX
21066 document can be brought under version control in Subversion, its
21067 parent directory needs to be under version control.
21068 If the document is being added to a project already in the repository,
21069 this is accomplished by checking the project out to the directory where
21070 the new document will be placed.
21071 If the project itself is not yet under version control (for instance, if
21072 this document starts a new project), the directory must be imported into
21074 This is done outside \SpecialChar LyX
21076 Both import and checkout are easily accomplished from the Explorer context
21077 menu using TortoiseSVN, or alternatively can be done using the command
21078 line client at a DOS prompt.
21079 The procedure for importing the project using TortoiseSVN is described
21080 below, assuming an existing repository and a new project being started
21088 For information on using the Subversion client program, run
21095 \begin_layout Enumerate
21102 in Windows Explorer, right click it, and select
21104 TortoiseSVN\SpecialChar menuseparator
21108 If necessary, adjust the URL for the repository, then click OK.
21111 \begin_layout Enumerate
21112 Right click the level of the repository under which you want to place the
21113 new project folder (typically the top level) and click
21117 Supply a name for the project folder and click OK.
21118 Add a message for the log file if desired, then click OK again.
21119 The new project folder should appear in the repository.
21120 Finally, click OK again to exit the repository browser.
21123 \begin_layout Enumerate
21124 Once again right click
21130 , this time selecting SVN Checkout\SpecialChar ldots
21131 Select the URL of the project folder
21132 you just created in the repository, and set the checkout directory to
21140 You will be warned about a non-empty folder; click OK to proceed.
21141 You should now have a
21152 \begin_layout Enumerate
21153 Create or open your document in \SpecialChar LyX
21156 File\SpecialChar menuseparator
21158 \begin_inset space ~
21161 Control\SpecialChar menuseparator
21165 Add a log message and click OK to commit the document to version control.
21168 \begin_layout Standard
21169 From this point onward, you should have full functionality in the
21171 File\SpecialChar menuseparator
21173 \begin_inset space ~
21179 You also have the option of checking the document in and out, viewing its
21181 using the TortoiseSVN context menu in Windows Explorer or the Subversion
21182 client program from a command prompt.
21185 \begin_layout Subsubsection
21186 SSH tunnel used with SVN under Windows
21189 \begin_layout Standard
21190 Compared with Linux setting up an svn client to communicate over ssh under
21191 Windows is a rather troublesome task.
21192 We will at least offer some hints how to setup the client side but prior
21193 knowledge about ssh and the Windows command line is needed, also be prepared
21194 for a great deal of frustration\SpecialChar ldots
21198 \begin_layout Enumerate
21199 Get an svn client for windows, as described in the previous sections.
21200 When it is a fresh install run some svn command (e.g.
21202 \begin_inset Flex Code
21205 \begin_layout Plain Layout
21211 ) to create config files, which you will need to change later on.
21214 \begin_layout Enumerate
21215 Choose an ssh client for Windows.
21216 There are several possibilities, we will use the one from Putty tools
21220 \begin_layout Plain Layout
21221 \begin_inset Flex URL
21224 \begin_layout Plain Layout
21226 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21237 You will need to set the connection up so that the client doesn't ask for
21238 any password from you.
21239 To keep things easy we will use only keys without any additional password
21241 \begin_inset Separator latexpar
21248 \begin_layout Enumerate
21250 \begin_inset Flex Code
21253 \begin_layout Plain Layout
21260 Save your private .ppk key file and put the public one on the server side.
21261 If the SVN server runs on Linux, note that the format of the public key
21262 is not compatible with Linux openssh and you will need to direcly copy-paste
21265 Public key for pasting into OpenSSH authorized_keys file
21267 :” edit field into the server's
21268 \begin_inset Flex Code
21271 \begin_layout Plain Layout
21272 ~/.ssh/authorized_keys
21278 \begin_inset Flex Code
21281 \begin_layout Plain Layout
21290 \begin_layout Enumerate
21292 \begin_inset Flex Code
21295 \begin_layout Plain Layout
21302 In the SVN config file
21306 \begin_layout Plain Layout
21307 Exact path depends on Windows version, usually somewhere around
21308 \begin_inset Flex Code
21311 \begin_layout Plain Layout
21314 Documents and Settings
21328 \begin_inset Flex Code
21331 \begin_layout Plain Layout
21346 , section [tunnels], setup ssh command, e.g.
21348 \begin_inset Flex Code
21351 \begin_layout Plain Layout
21352 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21361 \begin_layout Plain Layout
21362 It will usually take a lot of time to get exact command right and it depends
21364 For example do not have some remote server saved as a default session in
21366 If things fail, try to connect via plink without SVN first.
21375 \begin_layout Enumerate
21376 Checkout the SVN archive, e.
21377 \begin_inset space \thinspace{}
21381 \begin_inset Newline newline
21385 \begin_inset Flex Code
21388 \begin_layout Plain Layout
21389 svn co svn+ssh://user@server/repository_path
21397 \begin_layout Subsubsection
21398 End-of-Line Conversions
21401 \begin_layout Standard
21402 When the collaborators are mixing Linux and Windows environments, \SpecialChar LyX
21404 use different line endings inside the .lyx files.
21405 This is not a problem as far as \SpecialChar LyX
21406 functionality is concerned, but the commit
21407 diffs will be huge and merge-conflicts prone.
21408 Fortunately SVN itself knows
21412 \begin_layout Plain Layout
21413 \begin_inset Flex URL
21416 \begin_layout Plain Layout
21418 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21428 how to deal with CR/LF problems when switching .lyx files to the
21429 \begin_inset Flex Code
21432 \begin_layout Plain Layout
21442 \begin_layout Plain Layout
21444 \begin_inset Flex Code
21447 \begin_layout Plain Layout
21448 svn propset svn:eol-style native FILE_NAME
21461 \begin_layout Subsection
21462 GIT commands in \SpecialChar LyX
21466 \begin_layout Standard
21467 A minimal subset of GIT commands is now supported by \SpecialChar LyX
21469 You can find the commands in the
21471 File\SpecialChar menuseparator
21473 \begin_inset space ~
21479 Please note that if you use password protected access to repository via
21480 ssh, you will be asked in terminal window.
21482 was tested against GIT 1.7.
21486 \begin_layout Plain Layout
21487 Windows users please note that you need to ensure that git is on the path.
21488 This can be set from within \SpecialChar LyX
21491 Tools\SpecialChar menuseparator
21492 Preferences\SpecialChar menuseparator
21493 Paths\SpecialChar menuseparator
21504 \begin_layout Standard
21505 One big difference of GIT and the other supported version control systems
21506 is the distributed nature of GIT: With traditional version control systems
21507 there is one central server which hosts the repository.
21508 Users commit their changes to the server, and get updates made by other
21510 With GIT, users commit to a local repository.
21511 The local repository can be synchronized with one or more remote repositories
21513 \begin_inset Flex Code
21516 \begin_layout Plain Layout
21523 \begin_inset Flex Code
21526 \begin_layout Plain Layout
21534 does not interact in any way with remote GIT repositories.
21535 It works exclusively with the local repository in a very similar way as
21536 with a central CVS or SVN repository.
21537 If you use remote GIT repositories you need to do the
21538 \begin_inset Flex Code
21541 \begin_layout Plain Layout
21548 \begin_inset Flex Code
21551 \begin_layout Plain Layout
21557 operations with your favourite GIT client.
21560 \begin_layout Subsubsection
21566 \begin_layout Standard
21567 If your document is not under revision control, this is the only item shown
21569 And if it is under revision control, the
21573 item is not visible.
21576 \begin_layout Standard
21577 This command registers in GIT your document ONLY in case you have already
21578 the documents directory under GIT control (in particular
21583 This means you have to checkout the archive by yourself.
21586 \begin_layout Standard
21587 Then you are asked interactively to supply an initial description of the
21589 Don't forget that registered file is not yet commited.
21592 \begin_layout Standard
21593 GIT command that is run:
21596 \begin_inset Quotes eld
21600 \begin_inset Quotes erd
21606 \begin_layout Standard
21611 to understand the switches.
21614 \begin_layout Subsubsection
21620 \begin_layout Standard
21621 When you are finished editing a file, you commit your changes.
21622 When you do this, you are asked for a description of the changes.
21623 After that changes are commited.
21626 \begin_layout Standard
21629 git commit -q -m"<description>" <file-name>
21632 \begin_layout Subsubsection
21635 Revert To Repository Version
21638 \begin_layout Standard
21639 This will discard all changes made to the document since the last check
21641 You get a warning before changes are discarded.
21644 \begin_layout Standard
21648 \begin_inset Quotes eld
21652 \begin_inset Quotes erd
21658 \begin_layout Subsubsection
21664 \begin_layout Standard
21665 This will rename the current document including the version history.
21666 It requires a clean document without any changes since the last checkin.
21667 You are asked for a file name and a description of the rename operation.
21668 After that the document is renamed, both locally and in the repository.
21669 If the parent directories of the new and old file names differ, all relative
21670 paths of included files are adjusted (like in
21672 File\SpecialChar menuseparator
21677 Finally, the document is reloaded using the new name.
21680 \begin_layout Labeling
21681 \labelwidthstring 00.00.0000
21683 \begin_inset space ~
21687 \begin_inset space ~
21691 \begin_inset Newline newline
21695 \begin_inset Flex Code
21698 \begin_layout Plain Layout
21702 \begin_inset Quotes eld
21706 \begin_inset Quotes erd
21710 \begin_inset Quotes eld
21714 \begin_inset Quotes erd
21723 \begin_inset Newline newline
21727 \begin_inset Flex Code
21730 \begin_layout Plain Layout
21739 \begin_layout Subsubsection
21745 \begin_layout Standard
21746 This shows the complete history of the GIT document.
21750 \begin_inset Quotes eld
21754 \begin_inset Quotes erd
21759 is shown in a browser.
21762 \begin_layout Subsubsection
21766 \begin_layout Standard
21768 supports GIT hash number of the last commit to the file, author name, date
21769 and time of last commit.
21770 All those are extracted from
21772 git log -n 1 --pretty=format:%H%n%an%n%ai
21775 Tree version information is obtained via
21777 git describe --abbrev --dirty --long
21781 \begin_inset CommandInset ref
21783 reference "subsec:VCS-Revision-Information"
21790 \begin_layout Subsection
21794 \begin_layout Standard
21795 With the recent addition of the vc-command function \SpecialChar LyX
21796 power users are allowed
21797 to create their own commands for revision control.
21800 \begin_layout Standard
21801 As an example you can see how two TortoiseSVN commands could be integrated
21805 \begin_layout Description
21807 \begin_inset Flex Code
21810 \begin_layout Plain Layout
21811 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21819 \begin_layout Description
21821 \begin_inset Flex Code
21824 \begin_layout Plain Layout
21825 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21833 \begin_layout Subsection
21834 Version control and Document comparison
21837 \begin_layout Standard
21838 One of the typical uses of version control is to inspect the changes between
21839 revisions, usually by creating
21840 \begin_inset Flex Code
21843 \begin_layout Plain Layout
21850 While this is useful for plain text files, it is much less useful in the
21851 case of \SpecialChar LyX
21852 files, which have more a complicated structure.
21853 Hence we provide binding to the Document comparison feature.
21854 There are two ways of calling this feature - either by direct call of
21855 \begin_inset Flex Code
21858 \begin_layout Plain Layout
21865 function (for details see \SpecialChar LyX
21866 functions manual) or by icon/menu item
21867 \begin_inset Flex Noun
21870 \begin_layout Plain Layout
21871 Compare with older revision...
21877 One can either compare two chosen revisions of the document or he can simply
21878 compare the current version of edited text with older revisions (where
21880 \begin_inset Flex Noun
21883 \begin_layout Plain Layout
21889 ' revisions back means comparison of the edited file with last commited
21894 \begin_layout Standard
21895 This feature is supported for SVN and RCS though due to the more complicated
21896 versioning scheme of RCS there is a constraint – when addressing the revisions
21897 in dialog, numbers always point to the last number in RCS revision number,
21900 We don't currently support GIT addressing of revisions, one can just compare
21901 edited document with its revision X steps backs, where X is addressed as
21905 \begin_layout Section
21906 Literate Programming
21909 \begin_layout Standard
21914 (kayvan@sylvan.com)
21918 original documentation written by
21920 Edmar Wienskoski Jr.
21923 (edmar-w-jr@technologist.com)
21926 \begin_layout Subsection
21930 \begin_layout Standard
21931 The main purpose of this documentation is to show you how to use \SpecialChar LyX
21933 programming, where it is assumed that you are familiar with this programming
21934 technique, and know what
21935 \begin_inset Quotes eld
21939 \begin_inset Quotes erd
21943 \begin_inset Quotes eld
21947 \begin_inset Quotes erd
21951 If that is not the case, please follow the web links provided in the following
21953 There is a lot of good documentation out there covering old development
21954 history to the latest tools tips.
21957 \begin_layout Standard
21958 It is also assumed that you are familiar with \SpecialChar LyX
21959 itself to a point that you
21960 are comfortable changing your \SpecialChar LyX
21961 preferences, and X resources file.
21962 If that is not the case please refer to other \SpecialChar LyX
21963 documentation to cover your
21967 \begin_layout Subsection
21968 Literate Programming
21971 \begin_layout Standard
21972 From the Literate Programming FAQ:
21975 \begin_layout Quotation
21976 Literate programming is the combination of documentation and source together
21977 in a fashion suited for reading by human beings.
21978 In fact, literate programs should be enjoyable reading, even inviting!
21979 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21980 and documentation in a single file.
21981 Literate programming tools then parse the file to produce either readable
21982 documentation or compilable source.
21983 The WEB style of literate programming was created by D.
21984 \begin_inset space \thinspace{}
21988 Knuth during the development of his \SpecialChar TeX
21989 typesetting software.
21993 \begin_layout Standard
21994 Another excerpt says:
21997 \begin_layout Quotation
22000 How is literate programming different from verbose commenting?
22003 \begin_layout Quotation
22004 There are three distinguishing characteristics.
22005 In order of importance, they are:
22006 \begin_inset Separator latexpar
22013 \begin_layout Itemize
22014 flexible order of elaboration
22017 \begin_layout Itemize
22018 automatic support for browsing
22021 \begin_layout Itemize
22022 typeset documentation, especially diagrams and mathematics
22026 \begin_layout Standard
22027 Now that I sparked your curiosity, take a look in the references.
22030 \begin_layout Subsubsection
22034 \begin_layout Standard
22035 The complete Literate Programming FAQ can be found at:
22038 \begin_layout Quote
22039 Literate Programming FAQ
22040 \begin_inset Flex URL
22043 \begin_layout Plain Layout
22045 http://www.literateprogramming.com/lpfaq.pdf
22053 \begin_layout Standard
22054 The FAQ lists 23 (twenty three!) different literate programming tools.
22055 Where some are specialized or
22056 \begin_inset Quotes eld
22060 \begin_inset Quotes erd
22063 for particular programming languages, while other have general scope.
22068 for my own use for several reasons:
22071 \begin_layout Itemize
22072 It can generate the documentation either in \SpecialChar LaTeX
22076 \begin_layout Itemize
22077 It has a open architecture, i.
22078 \begin_inset space \thinspace{}
22082 \begin_inset space \space{}
22085 it is easy to plug in new filters and to perform special processing that
22090 \begin_layout Itemize
22091 There is a good selection of filters available already (the HTML is one
22095 \begin_layout Itemize
22099 \begin_layout Standard
22100 The Noweb web page can be found at:
22103 \begin_layout Quote
22105 \begin_inset Flex URL
22108 \begin_layout Plain Layout
22110 http://www.cs.virginia.edu/~nr/noweb/
22118 \begin_layout Standard
22119 Starting from there you can reach many other interesting links and even
22120 some literate program examples.
22123 \begin_layout Subsection
22125 and Literate Programming with Noweb
22128 \begin_layout Standard
22129 The \SpecialChar LyX
22130 support for Literate Programming is provided by using the generic \SpecialChar LyX
22132 converters mechanism.
22133 This support is provided in a
22134 \begin_inset Quotes eld
22138 \begin_inset Quotes erd
22142 \begin_inset space \thinspace{}
22146 \begin_inset space \space{}
22149 you will be able to use this new \SpecialChar LyX
22150 feature with some other literate programming
22151 tool of your choice by just changing your \SpecialChar LyX
22155 \begin_layout Subsubsection
22156 Generating documents and code (weaving and tangling)
22159 \begin_layout Paragraph
22160 Using the noweb module
22163 \begin_layout Standard
22164 If you have installed Noweb and \SpecialChar LyX
22165 successfully, whenever you open a new document,
22166 after you have chosen its document class, use the Document->Settings menu
22168 \begin_inset Quotes eld
22172 \begin_inset Quotes erd
22176 If Noweb is correctly installed, when you click on the
22177 \begin_inset Quotes eld
22181 \begin_inset Quotes erd
22184 link, you will see the
22185 \begin_inset Quotes eld
22189 \begin_inset Quotes erd
22192 module in the available list and you can add it to your document.
22195 \begin_layout Paragraph
22199 \begin_layout Standard
22201 enables you to write code with a layout named
22202 \begin_inset Flex Noun
22205 \begin_layout Plain Layout
22212 Noweb delimits chunks like this:
22215 \begin_layout LyX-Code
22219 \begin_layout LyX-Code
22223 \begin_layout LyX-Code
22227 \begin_layout LyX-Code
22231 \begin_layout LyX-Code
22235 \begin_layout Standard
22236 The problem is that whatever is written in between the << and the
22240 must be taken literally, i.
22241 \begin_inset space \thinspace{}
22245 \begin_inset space \space{}
22249 should be prevented from making any special interpretation of what has
22251 This is also handled by
22252 \begin_inset Flex Noun
22255 \begin_layout Plain Layout
22261 , that works like a normal paragraph but has a free spacing capability.
22264 \begin_layout Standard
22265 As a special note, you can also use the
22266 \begin_inset Quotes eld
22270 \begin_inset Quotes erd
22273 construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
22277 \begin_layout LyX-Code
22281 \begin_layout LyX-Code
22282 def some_function(args):
22285 \begin_layout LyX-Code
22286 "This is the doc string for this function."
22289 \begin_layout LyX-Code
22290 print "My args: ", args
22293 \begin_layout LyX-Code
22294 @ %def some_function
22297 \begin_layout Standard
22298 For an example of this usage and the resulting cross-reference output, look
22299 at the Literate python program in
22301 LIBDIR/examples/listerrors.lyx
22303 which should make this all clear.
22306 \begin_layout Paragraph
22307 Generating the documentation
22310 \begin_layout Standard
22311 At this point you already have a new document file with a proper document
22312 class, and with some code and text on it.
22313 How do I print it? The answer is simple, you select
22315 View\SpecialChar menuseparator
22319 Just like you would do for a plain document.
22320 No special procedure is required.
22323 \begin_layout Standard
22324 To help orientate you, I will now explain what happens inside \SpecialChar LyX
22328 \begin_layout Enumerate
22331 Update\SpecialChar menuseparator
22334 menu option is chosen, a \SpecialChar LaTeX
22337 \begin_inset Separator latexpar
22344 \begin_layout Standard
22345 If the document is of any literate class the generated file will be named
22346 with an extension name defined by the
22347 \begin_inset Quotes eld
22351 \begin_inset Quotes erd
22354 format (defined in the Preferences panel), otherwise the file will have
22363 \begin_layout Enumerate
22364 Note that the only difference so far is in the name of the file, no special
22365 processing is required by \SpecialChar LyX
22367 Given that you formatted the code using the
22368 \begin_inset Flex Noun
22371 \begin_layout Plain Layout
22377 layout that, by itself, takes care of the business.
22380 \begin_layout Enumerate
22381 If the document is of any literate class \SpecialChar LyX
22382 will then use the internal \SpecialChar LyX
22384 Noweb converter, followed by the Noweb to \SpecialChar LaTeX
22389 \begin_layout Plain Layout
22390 The converters are defined in the
22392 Tools\SpecialChar menuseparator
22396 \begin_inset Quotes eld
22400 \begin_inset Quotes erd
22412 manual for general information about converters.
22417 to generate the \SpecialChar LaTeX
22419 \begin_inset Separator latexpar
22426 \begin_layout Standard
22427 Otherwise it will just skip this step.
22431 \begin_layout Enumerate
22432 Finally, \SpecialChar LaTeX
22433 is invoked and the regular post processing continues as in a plain
22437 \begin_layout Standard
22438 Independence from a particular
22439 \begin_inset Quotes eld
22443 \begin_inset Quotes erd
22446 is easily achieved by changing the commands that are run by the various
22450 \begin_layout Paragraph
22451 Generating the code
22454 \begin_layout Standard
22455 When the build menu option is chosen or the corresponding button in the
22456 toolbar is pressed, a \SpecialChar LaTeX
22457 file is generated just like step 1 above.
22458 Next, \SpecialChar LyX
22464 This converter needs to be defined by the user and is not installed by
22465 default, though the Program format is.
22466 This converter (like any other converter) will have two parts:
22469 \begin_layout Enumerate
22470 The converter program itself.
22471 This program performs the conversion from the one format to the other (in
22472 this case, from the Noweb format to the Program pseudo-format).
22475 \begin_layout Enumerate
22476 The error log parser.
22477 This is a program whose sole purpose is to rewrite error messages in a
22478 format that \SpecialChar LyX
22480 This makes it possible for \SpecialChar LyX
22481 to place error boxes in the right places in
22485 \begin_layout Standard
22486 The first part, the
22487 \begin_inset Quotes eld
22491 \begin_inset Quotes erd
22494 setting, should be set to
22495 \begin_inset Newline newline
22499 \begin_inset Quotes eld
22507 \begin_inset Quotes erd
22511 \begin_inset Newline newline
22514 This basically means that \SpecialChar LyX
22516 \begin_inset Quotes eld
22520 \begin_inset Quotes erd
22523 (a program or script) with the name of the Noweb file (normally a file
22524 in the \SpecialChar LyX
22525 temp directory) and the directory path of the original \SpecialChar LyX
22530 \begin_layout Standard
22531 This is an implementation of
22532 \begin_inset Quotes eld
22536 \begin_inset Quotes erd
22539 that you can place in a directory on your path:
22542 \begin_layout Standard
22543 \begin_inset VSpace defskip
22549 \begin_layout Standard
22550 \begin_inset Newpage pagebreak
22556 \begin_layout Standard
22562 \begin_layout Standard
22568 \begin_layout Standard
22571 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
22574 \begin_layout Standard
22575 \begin_inset VSpace defskip
22581 \begin_layout Standard
22582 The next part of the converter setting is the
22583 \begin_inset Quotes eld
22587 \begin_inset Quotes erd
22590 which is to be set to
22591 \begin_inset Newline newline
22595 \begin_inset Quotes eld
22600 parselog=$$s/scripts/listerrors
22603 \begin_inset Quotes erd
22607 \begin_inset Newline newline
22610 This will run any errors that are generated by the
22611 \begin_inset Quotes eld
22615 \begin_inset Quotes erd
22618 process through the
22619 \begin_inset Quotes eld
22623 \begin_inset Quotes erd
22629 \begin_layout Standard
22630 The build will normally take place in \SpecialChar LyX
22631 's temporary directory, so the files
22632 produced by the conversion will be in that directory.
22634 will copy out what it regards as the `main' file, but the
22638 conversion may produce several files, and so most of these would then be
22639 deleted when \SpecialChar LyX
22641 This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
22642 the build-script chunk can place the generated files in that location.
22645 \begin_layout Paragraph
22646 Build instructions in the document
22649 \begin_layout Standard
22650 The last piece of the integration between \SpecialChar LyX
22652 \begin_inset Quotes eld
22656 \begin_inset Quotes erd
22660 Generally, the instructions for building your program should be embedded
22661 in a chunk of its own.
22663 \begin_inset Quotes eld
22667 \begin_inset Quotes erd
22670 above uses the notangle command to look for this chunk (called
22671 \begin_inset Quotes eld
22675 \begin_inset Quotes erd
22678 ) and runs its contents through
22679 \begin_inset Quotes eld
22683 \begin_inset Quotes erd
22689 \begin_layout Standard
22690 Typically, such a chunk would look something like this:
22693 \begin_layout LyX-Code
22697 \begin_layout LyX-Code
22699 \begin_inset Newline newline
22702 if [ -z "${NOWEB_SOURCE}" ]
22703 \begin_inset Newline newline
22709 \begin_layout LyX-Code
22710 NOWEB_SOURCE=myfile.nw
22711 \begin_inset Newline newline
22715 \begin_inset Newline newline
22719 code to extract files ...
22720 use NOWEB_OUTPUT_DIR here ...]
22721 \begin_inset Newline newline
22725 code to compile files ...]
22726 \begin_inset Newline newline
22732 \begin_layout Standard
22735 LIBDIR/examples/listerrors.lyx
22739 LIBDIR/examples/Literate.lyx
22741 which implement two versions of the
22742 \begin_inset Quotes eld
22746 \begin_inset Quotes erd
22749 program for some illustrations of how all of these pieces go together or
22752 LIBDIR/examples/noweb2lyx.lyx.
22755 Interestingly, these three files show off the language-indepence of the
22757 literate programming support since they are written in Python, C and Perl
22761 \begin_layout Subsubsection
22762 Configuring \SpecialChar LyX
22766 \begin_layout Standard
22767 All the Literate Programming support is configured by the
22769 Tools\SpecialChar menuseparator
22773 \begin_inset Quotes eld
22777 \begin_inset Quotes erd
22781 The important parts are:
22784 \begin_layout Description
22786 \begin_inset space ~
22790 \begin_inset Quotes eld
22794 \begin_inset Quotes erd
22798 \begin_inset space ~
22801 format Set up via the File Formats tab, this is where the Noweb-specific
22811 , the file extension is set to
22816 This tells \SpecialChar LyX
22817 to create a file with a
22821 extension in the first step of the conversion process.
22824 \begin_layout Description
22826 \begin_inset space ~
22834 \begin_inset space ~
22837 format This is an empty format whose sole purpose is to be the endpoint
22838 of a conversion (which then allows us to set up a converter for it).
22841 \begin_layout Description
22851 This converter performs the
22852 \begin_inset Quotes eld
22856 \begin_inset Quotes erd
22859 of the literate document.
22860 For Noweb, it is set to
22861 \begin_inset Quotes eld
22866 noweave -delay -index $$i > $$o
22869 \begin_inset Quotes erd
22875 \begin_layout Description
22885 \begin_inset Quotes eld
22889 \begin_inset Quotes erd
22893 As stated above, the Converter is set to
22894 \begin_inset Quotes eld
22902 \begin_inset Quotes erd
22905 , with Flags set to
22906 \begin_inset Newline newline
22910 \begin_inset Quotes eld
22915 parselog=$$s/scripts/listerrors
22918 \begin_inset Quotes erd
22924 \begin_layout Subsubsection
22928 \begin_layout Standard
22929 There is also a new function implemented in the \SpecialChar LyX
22931 \begin_inset Quotes eld
22934 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22938 \begin_layout Standard
22939 When debugging code with ddd/gdb, it is possible to invoke a text editor
22940 at the current execution position with a single key stroke.
22941 The default ddd configuration for that is shift-ctrl-V.
22942 It happens that you can define the editor command line invocation in ddd
22945 Edit\SpecialChar menuseparator
22946 Preferences\SpecialChar menuseparator
22949 dialog and changing the "Edit Sources" entry.
22952 \begin_layout Standard
22953 I take advantage of the newly created \SpecialChar LyX
22954 server function and this ddd feature,
22956 \begin_inset Quotes eld
22960 \begin_inset Quotes erd
22966 \begin_layout Standard
22967 \begin_inset VSpace defskip
22973 \begin_layout Standard
22976 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22979 \begin_layout Standard
22980 \begin_inset VSpace defskip
22986 \begin_layout Standard
22987 With this, whenever you are using ddd and find a point in the program that
22988 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22989 ddd will forward this information to \SpecialChar LyX
22990 through the \SpecialChar LyX
22991 server and then the
22993 window will show the same file with the cursor at the same position ddd
22995 No more guessing or long scrolling to locate a point in the program back
22999 \begin_layout Standard
23000 Note however that you must enable the \SpecialChar LyX
23001 server to get this feature working
23002 (it is disabled by default).
23003 You can enable it in
23015 ) by entering in the
23021 \begin_inset Quotes eld
23026 /home/<your-home-directory>/.lyx/lyxpipe
23029 \begin_inset Quotes erd
23035 \begin_layout Standard
23036 Read the \SpecialChar LyX
23037 server documentation in the
23039 Customization Manual
23041 for further information.
23044 \begin_layout Subsubsection
23048 \begin_layout Standard
23049 There are six new buttons that can be added to your \SpecialChar LyX
23051 Five of these buttons are short cuts to layout styles:
23074 The last one is a short cut to the
23075 \begin_inset Quotes eld
23079 \begin_inset Quotes erd
23086 \begin_layout Standard
23088 has a range of buttons that are available for tool bar customization.
23089 In my toolbar I like to combine the six short cuts above with two more:
23094 \SpecialChar menuseparator
23099 \SpecialChar menuseparator
23106 Document\SpecialChar menuseparator
23107 View\SpecialChar menuseparator
23111 Here is how it looks like:
23114 \begin_layout LyX-Code
23118 \begin_layout LyX-Code
23122 \begin_layout LyX-Code
23123 Icon "layout Standard"
23126 \begin_layout LyX-Code
23127 Icon "layout Section"
23130 \begin_layout LyX-Code
23131 Icon "layout \SpecialChar LaTeX
23135 \begin_layout LyX-Code
23136 Icon "layout \SpecialChar LyX
23140 \begin_layout LyX-Code
23141 Icon "layout Chunk"
23144 \begin_layout LyX-Code
23148 \begin_layout LyX-Code
23152 \begin_layout LyX-Code
23153 Icon "buffer-typeset"
23156 \begin_layout LyX-Code
23157 Icon "build-program"
23160 \begin_layout LyX-Code
23164 \begin_layout LyX-Code
23168 \begin_layout LyX-Code
23172 \begin_layout LyX-Code
23176 \begin_layout LyX-Code
23180 \begin_layout Subsubsection
23181 Colors customization
23184 \begin_layout Standard
23185 There are a number of colors in \SpecialChar LyX
23186 that can be customized in
23191 One of the things that bothers people is the \SpecialChar LaTeX
23193 The default color is red, since the chunks uses \SpecialChar LaTeX
23194 font, and there is a lot
23195 of chunks in literate documents, you may get tired of seeing everything
23197 You can change it by going to the tabs
23206 \begin_layout Standard
23207 The next thing is the visible presence of the newline character in the screen.
23208 You can choose the color of this particular character and make it blend
23210 I recommend you choosing a color that is close to the background but not
23211 equal, that way you still can see it is there, but it is not bothering
23215 \begin_layout Subsection
23220 \begin_layout Standard
23229 is documented in the
23233 example file and in the Sweave manual (menu
23235 Help\SpecialChar menuseparator
23241 \begin_layout Chapter
23246 \begin_layout Standard
23247 Users sometimes need to be able to
23248 \begin_inset Quotes eld
23252 \begin_inset Quotes erd
23256 file together with all the images (and other files) on which it depends,
23257 either for sending to a publisher or for sharing with a co-author.
23259 2.0 includes a Python script (
23260 \begin_inset Flex Code
23263 \begin_layout Plain Layout
23269 ) that automates this process.
23270 To use it, you must have either the
23271 \begin_inset Flex Code
23274 \begin_layout Plain Layout
23281 \begin_inset Flex Code
23284 \begin_layout Plain Layout
23290 python modules installed on your system.
23291 By default, the script prefers the
23292 \begin_inset Flex Code
23295 \begin_layout Plain Layout
23302 \begin_inset Flex Code
23305 \begin_layout Plain Layout
23311 format on Unix-like systems and the
23312 \begin_inset Flex Code
23315 \begin_layout Plain Layout
23324 \begin_layout Standard
23326 's configuration process will set the script up to export a `\SpecialChar LyX
23328 and this format will then be available under
23329 \begin_inset Flex Code
23332 \begin_layout Plain Layout
23333 File\SpecialChar menuseparator
23342 \begin_layout Standard
23343 Independently of the platform, the generation of a particular archive format
23344 can be forced by adding either the
23345 \begin_inset Flex Code
23348 \begin_layout Plain Layout
23355 \begin_inset Flex Code
23358 \begin_layout Plain Layout
23365 \begin_inset Flex Code
23368 \begin_layout Plain Layout
23375 \begin_inset Flex Code
23378 \begin_layout Plain Layout
23384 format) switch to the
23385 \begin_inset Flex Code
23388 \begin_layout Plain Layout
23390 \SpecialChar menuseparator
23398 \begin_inset Flex Code
23401 \begin_layout Plain Layout
23402 Tools\SpecialChar menuseparator
23403 Preferences\SpecialChar menuseparator
23404 File Handling\SpecialChar menuseparator
23411 (Make sure you add the switch after the script name, not before it.)
23414 \begin_layout Chapter
23416 and the World Wide Web
23419 \begin_layout Standard
23421 has long supported the export of documents to various web-friendly formats,
23423 Before verson 2.0, however, HTML export was always accomplished by the use
23424 of external converters.
23428 \begin_layout Plain Layout
23429 For details on the use of external converters with \SpecialChar LyX
23434 section of the Customization manual.
23439 These fall into two large groups: there are converters that use \SpecialChar LaTeX
23441 intermediate format, such as
23442 \begin_inset Flex Code
23445 \begin_layout Plain Layout
23452 \begin_inset Flex Code
23455 \begin_layout Plain Layout
23462 \begin_inset Flex Code
23465 \begin_layout Plain Layout
23471 , relying upon \SpecialChar LyX
23472 to produce the \SpecialChar LaTeX
23473 ; and there is a converter that works directly
23474 on \SpecialChar LyX
23476 \begin_inset Flex Code
23479 \begin_layout Plain Layout
23487 All of these have different advantages and disadvantages.
23491 \begin_layout Standard
23492 The \SpecialChar LaTeX
23493 -based converters have the advantage that, in principle, they know everythin
23494 g about the exported document that \SpecialChar LaTeX
23496 Such converters do not care, for example, if a certain block of code was
23497 produced by \SpecialChar LyX
23498 or was Evil Red Text.
23499 These converters know about
23500 \begin_inset Flex Code
23503 \begin_layout Plain Layout
23509 files, counters, and references, and can often make use of the
23510 \begin_inset Flex Code
23513 \begin_layout Plain Layout
23519 files generated by Bib\SpecialChar TeX
23521 On the other hand, \SpecialChar LaTeX
23522 is a very hard language to parse—it is sometimes said
23523 that only \SpecialChar TeX
23524 itself understands \SpecialChar TeX
23525 —and \SpecialChar LaTeX
23526 -based converters will often choke on
23527 what seem to be quite simple constructs; complex ones can throw them completely
23528 , and as of this writing, for example, the
23532 manual will not export with
23533 \begin_inset Flex Code
23536 \begin_layout Plain Layout
23542 , though the others will.
23543 The other issue concerns how math is handled.
23544 These converters typically convert the formulae into little pictures that
23545 are then linked from the HTML document.
23546 Since these are actually generated by \SpecialChar LaTeX
23547 , they are accurate.
23548 But they do not scale well, and just getting them to look as if they are
23549 actually meant to be in your document—so that the font sizes seem to be
23550 roughly the same—can be a challenge.
23553 \begin_layout Standard
23555 \begin_inset Flex Code
23558 \begin_layout Plain Layout
23566 \begin_inset CommandInset href
23568 name "http://elyxer.nongnu.org/"
23569 target "http://elyxer.nongnu.org/"
23573 ) solves some of these problems.
23574 In particular, the formulae it produces scale perfectly, since it renders
23575 math using a combination of HTML and CSS rather than converting the formulae
23577 But even moderately complex formula are rendered less well than with
23578 \begin_inset Flex Code
23581 \begin_layout Plain Layout
23587 ; this reflects the limitations of HTML.
23591 \begin_layout Plain Layout
23593 \begin_inset Flex Code
23596 \begin_layout Plain Layout
23603 can also use jsMath and MathJax for equations, but this setting is only
23604 available globally and requires one to have access to a server that runs
23610 More importantly (as of version 1.1.1, at least),
23611 \begin_inset Flex Code
23614 \begin_layout Plain Layout
23621 has limited support for math macros and no support for user-defined paragraph
23622 or character styles.
23623 These limitations make
23624 \begin_inset Flex Code
23627 \begin_layout Plain Layout
23634 unsuitable for many of the documents \SpecialChar LyX
23636 In principle, of course, these problems could be solved, but the \SpecialChar LyX
23638 have decided to follow a different path and have made \SpecialChar LyX
23640 writing XHTML, just as it is capable of writing \SpecialChar LaTeX
23641 , DocBook, and plaintext.
23644 \begin_layout Standard
23645 As of this writing, XHTML output remains under development and should probably
23647 \begin_inset Quotes eld
23651 \begin_inset Quotes erd
23658 \begin_layout Plain Layout
23660 \begin_inset Flex Code
23663 \begin_layout Plain Layout
23664 development/HTML.notes
23669 , which can be found in the \SpecialChar LyX
23671 \begin_inset CommandInset href
23673 name "accessed online"
23674 target "http://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
23678 , usually contains up-to-date information about the state of XHTML output.
23679 See also the list of XHTML bugs on
23680 \begin_inset CommandInset href
23682 name "the bug tracker"
23683 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"
23692 Still, the developers have chosen this approach because it has several
23693 potential advantages over the other two.
23696 \begin_layout Standard
23697 These advantages are primarily due to the fact that the XHTML output routines,
23698 since they are part of \SpecialChar LyX
23699 , know everything \SpecialChar LyX
23700 knows about the document being
23705 \begin_layout Plain Layout
23706 Another advantage is that, since these routines are internal to \SpecialChar LyX
23708 immune to changes in \SpecialChar LyX
23709 's file format, or to changes in the semantics of
23715 So they know about the table of contents (as displayed in the outline),
23716 about the counters associated with different paragraph styles, and about
23717 user-defined styles.
23718 The XHTML output routines know what \SpecialChar LyX
23719 knows about internationalization,
23720 too, so they will output
23721 \begin_inset Quotes eld
23725 \begin_inset Quotes erd
23729 \begin_inset Quotes eld
23737 \begin_inset Quotes erd
23740 , depending upon the language in effect at the time.
23744 \begin_layout Standard
23745 Quite generally, the output routines know what \SpecialChar LyX
23746 knows about document layout,
23747 that is, about how the document is to be rendered on screen.
23748 We use this information when we output the document as XHTML.
23749 In particular, \SpecialChar LyX
23754 generates CSS style information corresponding to the layout information
23755 it uses to render the document on screen: if section headings are supposed
23756 to be sans-serif and bold as seen in \SpecialChar LyX
23757 , then (by default) they will be sans-seri
23758 f and bold when viewed in a web browser, too.
23759 And this is true not just for pre-defined styles, like Section, but for
23760 any style, including user-defined styles.
23761 Indeed, the XHTML output routines make no distinction between user-defined
23762 paragraph and character styles and \SpecialChar LyX
23763 's own pre-defined styles: in each case,
23764 everything \SpecialChar LyX
23765 knows about the styles is contained in the layout files.
23766 And much the same is true as regards pre-defined textual insets, such as
23767 footnotes, and various custom insets.
23771 \begin_layout Standard
23772 The result is that XHTML output can be customized and extended in exactly
23773 the same way \SpecialChar LaTeX
23774 output can be customized and extended: through layout files
23776 See chapter five of the
23780 manual for the details.
23783 \begin_layout Standard
23784 The remainder of this chapter contains more detailed information on XHTML
23785 output, its limitations, and ways to work around those limitations.
23788 \begin_layout Section
23789 Math Output in XHTML
23792 \begin_layout Standard
23794 offers four choices for how math is rendered.
23795 These have various advantages and disadvantages:
23798 \begin_layout Itemize
23800 \begin_inset Newline newline
23803 MathML is a dialect of XML designed specifically for mathematics on the
23804 web, and it typically renders very well in browsers that support it.
23805 The disadvantage is that not all browsers support MathML, and support is
23806 not complete even in the Gecko-based browsers, such as Firefox.
23807 \begin_inset Newline newline
23810 If \SpecialChar LyX
23811 is unable to render a formula as MathML—for example, if the formula
23813 \begin_inset Flex Code
23816 \begin_layout Plain Layout
23822 package or ERT—then it will instead output the formula as an image.
23826 \begin_layout Itemize
23828 \begin_inset Newline newline
23831 As mentioned above,
23832 \begin_inset Flex Code
23835 \begin_layout Plain Layout
23841 outputs math as HTML, styled by CSS.
23845 \begin_layout Plain Layout
23847 has borrowed some of the CSS for its HTML output from
23848 \begin_inset Flex Code
23851 \begin_layout Plain Layout
23862 For simple formulae, this can work quite well, though with more complicated
23863 formulae it tends to break down.
23864 Still, this method has the advantage that it is very widely supported and
23865 so it may be appropriate for documents that contain only a little, fairly
23867 \begin_inset Newline newline
23870 If Lyx is unable to render a formula as HTML—for example, if the formula
23872 \begin_inset Flex Code
23875 \begin_layout Plain Layout
23881 package or ERT—then it will instead output the formula as an image.
23885 \begin_layout Itemize
23887 \begin_inset Newline newline
23891 \begin_inset Flex Code
23894 \begin_layout Plain Layout
23901 will output formulae as images, the very same images, in fact, that are
23902 used for instant preview.
23906 \begin_layout Plain Layout
23907 Instant preview does
23911 have to be on for images to be output, however.
23916 The advantage to this method is that the images are simply generated by
23918 , so they are very accurate.
23919 The disadvantage, as mentioned earlier, is that these are bitmapped images,
23920 so they do not scale terribly well, and one cannot copy them, etc.
23921 (As of this writing, there are also problems about equation numbering.
23923 \begin_inset CommandInset href
23926 target "http://www.lyx.org/trac/ticket/6894"
23931 \begin_inset Newline newline
23934 The size of the images can be controlled by setting the
23935 \begin_inset Quotes eld
23938 Math Images Scaling
23939 \begin_inset Quotes erd
23943 \begin_inset Flex Noun
23946 \begin_layout Plain Layout
23947 Document\SpecialChar menuseparator
23948 Settings\SpecialChar menuseparator
23958 \begin_layout Plain Layout
23959 For those who want to know, this controls the resolution of the image in
23960 dots per inch and is based upon a default of 75 dpi.
23966 \begin_inset Newline newline
23969 If \SpecialChar LyX
23970 for some reason fails to create an image for a formula (e.g., if a required
23972 package is not installed), then it will fall back to outputing the raw
23977 \begin_layout Itemize
23980 \begin_inset Newline newline
23983 Finally, \SpecialChar LyX
23984 will happily output math as \SpecialChar LaTeX
23986 As well as being the output of last resort, this method can be used with
23988 \begin_inset CommandInset href
23991 target "http://www.math.union.edu/~dpvc/jsMath/"
23995 , which uses JavaScript to render \SpecialChar LaTeX
23996 embedded in HTML documents.
23998 wraps the \SpecialChar LaTeX
24000 \begin_inset Flex Code
24003 \begin_layout Plain Layout
24009 (for inline formulas) or
24010 \begin_inset Flex Code
24013 \begin_layout Plain Layout
24019 (for displayed formulas) with
24020 \begin_inset Flex Code
24023 \begin_layout Plain Layout
24029 , as is required for jsMath.
24032 \begin_layout Standard
24033 One of these output methods must be selected under
24034 \begin_inset Flex Noun
24037 \begin_layout Plain Layout
24038 Document\SpecialChar menuseparator
24039 Settings\SpecialChar menuseparator
24046 By default, \SpecialChar LyX
24048 This is a document-wide setting, therefore.
24051 \begin_layout Standard
24052 Eventually, \SpecialChar LyX
24053 will offer the user the option to select an alternate output
24054 method for a particular inset, say, one that isn't being rendered very
24059 \begin_layout Plain Layout
24060 That said, since \SpecialChar LyX
24061 falls back to images if the inset contains ERT, then one
24062 can force output as an image by putting some harmless ERT into the math,
24064 \begin_inset Formula $a=b\relax$
24075 \begin_layout Section
24076 Bibliography and Citations
24079 \begin_layout Standard
24080 XHTML output fully supports bibliographies and citations.
24084 \begin_layout Standard
24085 Citation labels are generated by the same machinery that generates \SpecialChar LyX
24087 labels, so the labels will look in the output much as they do in \SpecialChar LyX
24090 If you are using numerical citations, then \SpecialChar LyX
24091 will output numerical labels,
24092 such as [1] or [17], rather than simply showing the citation key in square
24093 brackets, as it does on-screen.
24094 If you are using author-year citations, then \SpecialChar LyX
24095 will add lowercase letters
24096 to the years, just as Bib\SpecialChar TeX
24097 does, if it finds more than one citation for
24098 a given author-year combination.
24099 The labels will be printed with the bibliography entries.
24100 Note that there is, at present, no way to customize the appearance of the
24101 labels, for example, to choose between square brackets and parentheses.
24104 \begin_layout Standard
24105 Bibliography output is handled by the same machinery that handles the presentati
24106 on of reference information in the citation dialog, so you will see in the
24107 XHTML output pretty much what you would see if you were to look at a given
24108 entry in the citation dialog.
24109 The formatting can be customized in your layout file or, preferably, in
24115 manual for the details.
24118 \begin_layout Standard
24119 The main defect at present is that cross-referenced information is printed
24120 with every entry with which it is associated.
24121 So you can see things like this:
24124 \begin_layout Quote
24126 \begin_inset Quotes eld
24129 Context and Logical Form
24130 \begin_inset Quotes erd
24135 Language in Context: Selected Essays
24137 (Oxford: Oxford University Press, 2007), pp.
24141 \begin_layout Quote
24143 \begin_inset Quotes eld
24146 Semantics in Context
24147 \begin_inset Quotes erd
24152 Language in Context: Selected Essays
24154 (Oxford: Oxford University Press, 2007), pp.
24158 \begin_layout Standard
24159 This should be fixed before long.
24162 \begin_layout Standard
24163 There is no support at present for sectioned bibliographies.
24164 If you have multiple bibliographies, then \SpecialChar LyX
24165 will print the same bibliography
24169 \begin_layout Section
24173 \begin_layout Standard
24175 will happily export indexes as XHTML, but with certain limitations at the
24179 \begin_layout Standard
24180 Index export will be most reliable when you do not attempt to use the fancy
24181 constructs that are described in the section on indexes in the
24189 \begin_layout Plain Layout
24190 The main issue here is that \SpecialChar LyX
24191 itself does not really handle these.
24192 It just lets you enter what you would have to enter in raw \SpecialChar LaTeX
24198 We'll describe how they are handled using the subsection headings from
24202 \begin_layout Itemize
24203 Grouping Index Entries (aka, sub-entries): \SpecialChar LyX
24204 makes an effort to support these,
24205 but the entries must be separated by
24206 \begin_inset Quotes eld
24210 \begin_inset Quotes erd
24213 , that is, there must be spaces around the exclamation point.
24214 This is because it is otherwise too difficult to check for escaped exclamation
24215 points, ones in math, and so forth.
24218 \begin_layout Itemize
24219 Page Ranges: There is no support at all for page ranges, since these make
24220 no sense with XHMTL.
24221 Instead, you will just get two index entries, one at either end.
24224 \begin_layout Itemize
24225 Cross-referencing: There is no support for cross-referencing.
24226 If \SpecialChar LyX
24227 finds an entry containing the
24228 \begin_inset Quotes eld
24231 |see\SpecialChar ldots
24233 \begin_inset Quotes erd
24236 construct, it is just dropped, and the rest is treated as an ordinary index
24240 \begin_layout Itemize
24241 Index Entry Order: \SpecialChar LyX
24242 does support attempts to fix the sorting order.
24243 It will take what is before the first `@' it finds and use that for sorting,
24244 taking what follows the first `@' to be the actual entry.
24245 At present, \SpecialChar LyX
24246 does not check for escaped `@', so do not try to index email
24250 \begin_layout Itemize
24251 Index Entry Layout: You can format entries by using the text style dialog,
24252 or by using any other method available within \SpecialChar LyX
24254 There is no support for constructs like:
24255 \begin_inset Quotes eld
24259 \begin_inset Quotes erd
24263 Indeed, if \SpecialChar LyX
24264 finds a pipe symbol, `|', in an entry, it will delete it and
24265 everything that follows it.
24268 \begin_layout Itemize
24269 Multiple Indexes: There is no support for multiple indexes.
24270 Rather, all index entries will be printed as one large index.
24271 To avoid our printing several versions of the index, we print only the
24272 main index, so make sure you have one.
24275 \begin_layout Section
24276 Nomenclature and Glossary
24279 \begin_layout Standard
24280 There is at present no support for glossaries.
24281 Adding it would be fairly trivial, and welcome.
24284 \begin_layout Chapter
24285 The \SpecialChar LyX
24289 \begin_layout Section
24293 \begin_layout Standard
24294 The `\SpecialChar LyX
24295 server' allows other programs to talk to \SpecialChar LyX
24296 , invoke \SpecialChar LyX
24297 commands, and retrieve
24298 information about the \SpecialChar LyX
24300 This is only intended for advanced users, but they should find it useful.
24301 It is by writing to the \SpecialChar LyX
24302 server, for example, that bibliography managers,
24303 such as JabRef, are able to
24304 \begin_inset Quotes eld
24308 \begin_inset Quotes erd
24311 citations to \SpecialChar LyX
24315 \begin_layout Section
24316 Starting the \SpecialChar LyX
24320 \begin_layout Standard
24321 The \SpecialChar LyX
24322 server works through the use of a pair of named pipes.
24323 These are usually located in
24324 \begin_inset Flex Code
24327 \begin_layout Plain Layout
24333 , (except on Windows, where
24337 named pipes are special objects located in
24338 \begin_inset Flex Code
24341 \begin_layout Plain Layout
24353 ) and have the names
24354 \begin_inset Quotes eld
24358 \begin_inset Flex Code
24361 \begin_layout Plain Layout
24368 \begin_inset Quotes erd
24372 \begin_inset Quotes eld
24376 \begin_inset Flex Code
24379 \begin_layout Plain Layout
24386 \begin_inset Quotes erd
24390 External programs write into
24391 \begin_inset Flex Code
24394 \begin_layout Plain Layout
24400 and read back data from
24401 \begin_inset Flex Code
24404 \begin_layout Plain Layout
24411 The stem of the pipe names can be defined in the
24412 \begin_inset Flex Noun
24415 \begin_layout Plain Layout
24416 Tools\SpecialChar menuseparator
24422 dialog, for example
24423 \begin_inset Flex Code
24426 \begin_layout Plain Layout
24427 "/home/myhome/lyxpipe"
24433 \begin_inset Flex Code
24436 \begin_layout Plain Layout
24450 on Windows (where any working path instead of lyxpipe can be used, for
24452 \begin_inset Flex Code
24455 \begin_layout Plain Layout
24478 configure this manually in order for the server to start.
24481 \begin_layout Standard
24484 \begin_inset Flex Code
24487 \begin_layout Plain Layout
24494 \begin_inset Flex Code
24497 \begin_layout Plain Layout
24503 ' to create the pipes.
24504 If one of the pipes already exists, \SpecialChar LyX
24505 will assume that another \SpecialChar LyX
24507 is already running and will not start the server.
24508 On POSIX (Unix like) systems, if for some other reason, an unused
24509 \begin_inset Quotes eld
24513 \begin_inset Quotes erd
24516 pipe is left in existence when \SpecialChar LyX
24517 closes, then \SpecialChar LyX
24518 will try to delete it.
24519 If this fails for some reason, you will need to delete the pipes manually
24520 and then restart \SpecialChar LyX
24522 On Windows, pipes are deleted by the OS on program termination or crash,
24524 \begin_inset Quotes eld
24528 \begin_inset Quotes erd
24531 pipes should not be possible.
24534 \begin_layout Standard
24535 To have several \SpecialChar LyX
24536 processes with servers at the same time, you have to use
24537 different configurations, perhaps by using separate user directories, each
24539 \begin_inset Flex Code
24542 \begin_layout Plain Layout
24548 file, for each process.
24551 \begin_layout Standard
24552 If you are developing a client program, you might find it useful to enable
24553 debugging information from the \SpecialChar LyX
24555 Do this by starting \SpecialChar LyX
24557 \begin_inset Flex Code
24560 \begin_layout Plain Layout
24569 \begin_layout Standard
24570 You can find a complete example client written in C++ in the source distribution
24572 \begin_inset Flex Code
24575 \begin_layout Plain Layout
24576 development/lyxserver/server_monitor.cpp
24584 \begin_layout Standard
24585 Another useful tool is the command-line based client found in
24586 \begin_inset Flex Code
24589 \begin_layout Plain Layout
24590 src/client/lyxclient
24598 \begin_layout Section
24599 Normal communication
24602 \begin_layout Standard
24603 To issue a \SpecialChar LyX
24604 call, the client writes a line of ASCII text into the input
24606 This line has the following format:
24609 \begin_layout Quote
24623 \begin_layout Description
24624 clientname is a name that the client can choose arbitrarily.
24625 Its only use is that \SpecialChar LyX
24626 will echo it if it sends an answer—so a client can
24627 dispatch results from different requesters.
24630 \begin_layout Description
24631 function is the function you want \SpecialChar LyX
24633 It is the same as the commands you'd use in the minibuffer.
24636 \begin_layout Description
24637 argument is an optional argument which is meaningful only to some functions
24639 \begin_inset Quotes eld
24643 \begin_inset Quotes erd
24646 LFUN will insert the argument as text at the cursor position).
24649 \begin_layout Standard
24650 The answer from \SpecialChar LyX
24651 will arrive in the output pipe and be of the form
24654 \begin_layout Quote
24668 \begin_layout Standard
24677 are just echoed from the command request, while
24681 is more or less useful information filled according to how the command
24682 execution worked out.
24683 Some commands, such as
24684 \begin_inset Quotes eld
24688 \begin_inset Quotes erd
24691 , will return information about the internal state of \SpecialChar LyX
24693 return an empty data-response.
24694 This means that the command execution went fine.
24697 \begin_layout Standard
24698 In case of errors, the response from \SpecialChar LyX
24699 will have this form
24702 \begin_layout Quote
24716 \begin_layout Standard
24721 should contain an explanation of why the command failed.
24724 \begin_layout Standard
24728 \begin_layout LyX-Code
24729 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
24730 \begin_inset Newline newline
24733 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
24734 \begin_inset Newline newline
24737 read a <~/.lyxpipe.out
24738 \begin_inset Newline newline
24744 \begin_layout Subsection
24745 AppleScript (Mac OS X)
24748 \begin_layout Standard
24749 Since \SpecialChar LyX
24750 2.1, \SpecialChar LyX
24751 supports basic interactions with AppleScript for normal communicatio
24752 n through the command run.
24753 This command takes a direct argument (the
24757 to perform) and an optional argument.
24758 It either returns the output of the function or triggers an error with
24759 the error message and code.
24762 \begin_layout Standard
24766 \begin_layout LyX-Code
24767 tell application "\SpecialChar LyX
24771 \begin_layout LyX-Code
24775 \begin_layout LyX-Code
24776 -- Stores the current file name into f
24779 \begin_layout LyX-Code
24780 set f to (run "server-get-filename" with argument "")
24783 \begin_layout LyX-Code
24784 on error the error_message number the error_number
24787 \begin_layout LyX-Code
24788 display dialog "Error: " & the error_number & ".
24792 \begin_layout LyX-Code
24793 & the error_message buttons {"OK"} default button 1
24796 \begin_layout LyX-Code
24800 \begin_layout LyX-Code
24804 \begin_layout Section
24808 \begin_layout Standard
24810 can notify clients of events going on asynchronously.
24811 Currently it will only do this if the user binds a key sequence with the
24813 \begin_inset Quotes eld
24817 \begin_inset Quotes erd
24821 The format of the string \SpecialChar LyX
24822 sends is as follows:
24825 \begin_layout Quote
24826 \begin_inset Flex Code
24829 \begin_layout Plain Layout
24840 \begin_layout Standard
24845 is the printed representation of the key sequence that was actually typed
24849 \begin_layout Standard
24850 This mechanism can be used to extend \SpecialChar LyX
24851 's command set and implement macros.
24852 Bind some key sequence to
24853 \begin_inset Quotes eld
24857 \begin_inset Quotes erd
24861 Then start a client that listens on the output pipe, dispatches the command
24862 according to the sequence, and starts a function that may use \SpecialChar LyX
24865 requests to issue a command or a series of commands to \SpecialChar LyX
24869 \begin_layout Section
24870 The simple \SpecialChar LyX
24874 \begin_layout Standard
24876 implements a simple protocol that can be used for session management.
24877 All messages are of the form
24880 \begin_layout Quote
24890 \begin_layout Standard
24896 \begin_inset Quotes eld
24900 \begin_inset Quotes erd
24904 \begin_inset Quotes eld
24908 \begin_inset Quotes erd
24913 \begin_inset Quotes eld
24917 \begin_inset Quotes erd
24920 is received from a client, \SpecialChar LyX
24921 will report back to inform the client that
24922 it's listening to it's messages, while
24923 \begin_inset Quotes eld
24927 \begin_inset Quotes erd
24930 sent from \SpecialChar LyX
24931 will inform clients that \SpecialChar LyX
24935 \begin_layout Section
24936 Reverse DVI/PDF search
24939 \begin_layout Standard
24940 Some DVI/PDF viewers
24944 \begin_layout Plain Layout
24945 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
24946 Qpdfview on Unix, Skim on Mac OSX and SumatraPDF on Windows.
24955 facility (also called
24960 This means that you can tell \SpecialChar LyX
24961 to put the cursor to a specific line in the
24962 document by clicking at the respective position in the DVI/PDF output.
24963 To achieve this, the viewer must be able to communicate with \SpecialChar LyX
24965 This is done via the \SpecialChar LyX
24966 server either by using the named pipe (
24970 ), or the UNIX domain socket (
24974 ) that \SpecialChar LyX
24975 creates in its temporary directory (this is the way the
24976 \begin_inset Flex Code
24979 \begin_layout Plain Layout
24985 program communicates with \SpecialChar LyX
24987 In some cases, you need a helper script that mediates between the viewer
24988 and \SpecialChar LyX
24989 , in others, the viewer can communicate with \SpecialChar LyX
24991 This depends on the selected viewer and on your operating system.
24992 The same applies to the way viewers need to be configured and the way the
24993 reverse search is actually performed.
24994 In what follows, we will thus describe how to setup reverse search for
24996 Before we turn to this, though, we will explain what needs to be done generally
24997 to enable reverse search in the DVI/PDF output.
25000 \begin_layout Subsection
25002 \begin_inset CommandInset label
25004 name "subsec:rev-search"
25011 \begin_layout Standard
25012 In most cases \SpecialChar LyX
25013 will do the work for you by enabling the option
25014 \begin_inset Flex Noun
25017 \begin_layout Plain Layout
25018 Synchronize with Output
25024 \begin_inset Flex Noun
25027 \begin_layout Plain Layout
25028 Document\SpecialChar menuseparator
25029 Settings\SpecialChar menuseparator
25036 In such a case \SpecialChar LyX
25037 will automatically insert the necessary Sync\SpecialChar TeX
25039 PDF) or load the srcltx package (for DVI) respectively.
25040 This option can be easily reached also on
25041 \begin_inset Flex Code
25044 \begin_layout Plain Layout
25053 \begin_layout Standard
25054 If you need a different setting, you can select or input a custom macro
25055 from the drop down box just below
25056 \begin_inset Flex Noun
25059 \begin_layout Plain Layout
25060 Document\SpecialChar menuseparator
25061 Settings\SpecialChar menuseparator
25062 Output\SpecialChar menuseparator
25063 Synchronize with Output
25071 \begin_layout Standard
25072 Note that the method
25073 \begin_inset Flex Code
25076 \begin_layout Plain Layout
25084 enables gzip compression.
25085 If your viewer does not support it, you should instead use
25086 \begin_inset Flex Code
25089 \begin_layout Plain Layout
25100 \begin_layout Standard
25101 Please also note that including the
25102 \begin_inset Flex Code
25105 \begin_layout Plain Layout
25112 \begin_inset Flex Code
25115 \begin_layout Plain Layout
25121 sometimes has an undesired impact on the typesetting.
25122 Thus, you should switch output synchronization off for the final typesetting
25124 \begin_inset Flex Code
25127 \begin_layout Plain Layout
25134 \begin_inset Flex Code
25137 \begin_layout Plain Layout
25147 \begin_layout Standard
25148 In case you need some more special settings that are not covered by the
25149 automatic settings, read the next section about how to set up output synchroniz
25151 If the automatic setup suits your needs, you can readily jump to section
25152 \begin_inset space ~
25156 \begin_inset CommandInset ref
25158 reference "subsec:configuring-viewers"
25162 , where the necessary configuration steps in your viewer – needed both with
25163 the automatic and the manual setup – are described.
25166 \begin_layout Subsection
25170 \begin_layout Standard
25172 provides several different methods for reverse search.
25173 Some are built-in in the
25174 \begin_inset Flex Code
25177 \begin_layout Plain Layout
25183 program, some are provided by external packages.
25184 Your choice depends on whether your \SpecialChar LaTeX
25185 distribution already provides a given
25186 method (the built-in methods are rather new) and whether your viewer can
25188 The available methods are described in the following.
25191 \begin_layout Subsubsection*
25192 Built-in DVI-search via src-specials (DVI only)
25195 \begin_layout Standard
25196 This method provides the DVI file with the necessary information for reverse
25198 It is available in \SpecialChar LaTeX
25199 since quite some time (any somewhat recent \SpecialChar LaTeX
25201 should include it), and it works reliably.
25202 To enable it, change the
25203 \begin_inset Flex Noun
25206 \begin_layout Plain Layout
25217 \begin_inset Flex Noun
25220 \begin_layout Plain Layout
25231 \begin_inset Flex Noun
25234 \begin_layout Plain Layout
25235 Preferences\SpecialChar menuseparator
25236 File Handling\SpecialChar menuseparator
25243 \begin_inset Flex Code
25246 \begin_layout Plain Layout
25247 latex -src-specials $$i
25253 If this doesn't work, check if your \SpecialChar TeX
25254 engine needs different options (the
25255 syntax might differ in some distributions).
25258 \begin_layout Subsubsection*
25259 External Packages (PDFSync and scrltx)
25262 \begin_layout Standard
25271 provide reverse search facility for PDF output (via pdflatex) and DVI output,
25273 In order to enable it, load the packages in the \SpecialChar LyX
25277 \begin_layout Itemize
25278 \begin_inset Flex Code
25281 \begin_layout Plain Layout
25284 usepackage{pdfsync}
25289 for reverse PDF search,
25292 \begin_layout Itemize
25293 \begin_inset Flex Code
25296 \begin_layout Plain Layout
25299 usepackage[active]{srcltx}
25304 for reverse DVI search.
25307 \begin_layout Standard
25308 If you want to be able to perform both DVI and PDF reverse searches, you
25309 can also insert in the preamble the following lines
25312 \begin_layout LyX-Code
25316 \begin_inset Newline newline
25322 \begin_inset Newline newline
25327 usepackage{pdfsync}
25328 \begin_inset Newline newline
25334 \begin_inset Newline newline
25339 usepackage[active]{srcltx}
25340 \begin_inset Newline newline
25348 \begin_layout Standard
25349 This way, you can preview the file as either DVI or PDF (pdflatex) and the
25350 right package will be used.
25353 \begin_layout Standard
25354 Note that PDFSync might affect the output layout of your document.
25355 It is therefore advised to disable PDFsync for final documents.
25358 \begin_layout Subsubsection*
25359 Built-in reverse search via Sync\SpecialChar TeX
25363 \begin_layout Standard
25365 \begin_inset Flex Code
25368 \begin_layout Plain Layout
25374 have built-in support for both PDF and DVI reverse search.
25377 Sync\SpecialChar TeX
25380 facility is basically the result of the integration of the PDFSync package
25381 to the pdftex program and its merge with the
25386 You need at least \SpecialChar TeX
25387 Live 2008 or a recent Mik\SpecialChar TeX
25388 distribution in order to use
25393 \begin_layout Plain Layout
25394 For some reason, Mik\SpecialChar TeX
25395 does not understand/obey the command \SpecialChar LyX
25397 the preamble when you check the "Enable Forward/Reverse Search" button
25398 in the toolbar and does not generate the necessary info.
25401 \begin_layout Plain Layout
25402 The generation of the required info can be forced by changing the converter
25403 "\SpecialChar LaTeX
25404 (pdflatex) -> PDF (pdflatex)" in Preferences->File handling->Converters
25405 from the default "pdflatex $$i" to "pdflatex -synctex=1 $$i" (i.e., by adding
25406 the -synctex=1 switch).
25411 Also note that only a few PDF viewers (Okular and Qpdfview on Unix, Skim
25412 on the Mac, SumatraPDF on Windows) already provide Sync\SpecialChar TeX
25416 \begin_layout Standard
25417 To enable Sync\SpecialChar TeX
25418 for DVI output, change the
25419 \begin_inset Flex Noun
25422 \begin_layout Plain Layout
25433 \begin_inset Flex Noun
25436 \begin_layout Plain Layout
25441 (plain) -> DraftDVI
25447 \begin_inset Flex Noun
25450 \begin_layout Plain Layout
25451 Preferences\SpecialChar menuseparator
25452 File Handling\SpecialChar menuseparator
25459 \begin_inset Flex Code
25462 \begin_layout Plain Layout
25463 latex -synctex=1 $$i
25468 , and for PDF output, change the
25469 \begin_inset Flex Noun
25472 \begin_layout Plain Layout
25477 (pdflatex) -> PDF (pdflatex)
25483 \begin_inset Flex Code
25486 \begin_layout Plain Layout
25487 pdflatex -synctex=1 $$i
25493 Check the documentation of your viewer whether the viewer needs to be configure
25494 d for the use with Sync\SpecialChar TeX
25499 \begin_layout Plain Layout
25500 Note that the option
25501 \begin_inset Flex Code
25504 \begin_layout Plain Layout
25510 option enables gzip compression.
25511 If your viewer does not support it, you should instead use
25512 \begin_inset Flex Code
25515 \begin_layout Plain Layout
25529 \begin_layout Subsection
25530 Configuring and using specific viewers
25531 \begin_inset CommandInset label
25533 name "subsec:configuring-viewers"
25540 \begin_layout Subsubsection*
25541 Xdvi (all platforms)
25544 \begin_layout Standard
25546 \begin_inset Flex Code
25549 \begin_layout Plain Layout
25555 , you don't need to do anything else for performing a reverse DVI search,
25556 as \SpecialChar LyX
25557 already provides the necessary hooks for automatically using the
25558 \begin_inset Flex Code
25561 \begin_layout Plain Layout
25568 Just setup your document as described above (reverse search is triggered
25569 by Ctrl-click or Alt-click on Mac OSX, respectively).
25572 \begin_layout Standard
25573 However, if for whatever reason you want to use the named pipe instead of
25574 the socket for communicating with \SpecialChar LyX
25575 , simply change the DVI viewer in
25576 \begin_inset Flex Noun
25579 \begin_layout Plain Layout
25580 Preferences\SpecialChar menuseparator
25581 File Handling\SpecialChar menuseparator
25591 \begin_layout Plain Layout
25592 On Mac OSX you have to use
25593 \begin_inset Flex Code
25596 \begin_layout Plain Layout
25597 DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l"
25608 \begin_inset Flex Code
25611 \begin_layout Plain Layout
25612 xdvi -editor "lyxeditor.sh %f %l"
25618 \begin_inset Flex Code
25621 \begin_layout Plain Layout
25627 is a suitable script.
25628 For example, a minimal shell script is the following one:
25631 \begin_layout LyX-Code
25633 \begin_inset Newline newline
25636 LYXPIPE="/path/to/lyxpipe"
25637 \begin_inset Newline newline
25640 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
25641 \begin_inset Newline newline
25644 echo "$COMMAND" > "${LYXPIPE}".in || exit
25645 \begin_inset Newline newline
25648 read TMP < "${LYXPIPE}".out || exit
25651 \begin_layout Standard
25653 \begin_inset Flex Code
25656 \begin_layout Plain Layout
25666 \begin_layout Plain Layout
25673 XServer pipe path specified in
25674 \begin_inset Flex Noun
25677 \begin_layout Plain Layout
25678 Preferences\SpecialChar menuseparator
25688 \begin_layout Plain Layout
25690 \begin_inset Flex Code
25693 \begin_layout Plain Layout
25699 folder of a source distribution you can find a
25700 \begin_inset Flex Code
25703 \begin_layout Plain Layout
25709 script which is able to locate the
25713 based on your preferences.
25721 \begin_layout Subsubsection*
25725 \begin_layout Standard
25727 \begin_inset Flex Code
25730 \begin_layout Plain Layout
25731 /Applications/MacDviX_Folder/calleditor.script
25736 , add the following lines:
25739 \begin_layout LyX-Code
25744 \begin_layout Plain Layout
25751 X.app/Contents/MacOS/lyxeditor "$2" $1
25752 \begin_inset Newline newline
25758 \begin_layout Standard
25759 Modify the lines accordingly if you install \SpecialChar LyX
25760 somewhere else than in the
25761 Applications folder.
25764 \begin_layout Standard
25765 Reverse search is triggered by Alt-click (OPTION-click).
25768 \begin_layout Subsubsection*
25772 \begin_layout Standard
25774 \begin_inset Flex Code
25777 \begin_layout Plain Layout
25778 open -a Skim.app $$i
25783 to the viewer setting in
25784 \begin_inset Flex Noun
25787 \begin_layout Plain Layout
25788 Preferences\SpecialChar menuseparator
25789 File Handling\SpecialChar menuseparator
25790 File formats\SpecialChar menuseparator
25797 \begin_inset Flex Noun
25800 \begin_layout Plain Layout
25801 Skim\SpecialChar menuseparator
25802 Preferences\SpecialChar menuseparator
25809 \begin_inset Flex Noun
25812 \begin_layout Plain Layout
25818 preset and enter command
25819 \begin_inset Flex Noun
25822 \begin_layout Plain Layout
25823 /Applications/\SpecialChar LyX
25824 .app/Contents/MacOS/lyxeditor
25832 \begin_layout Standard
25833 Reverse search is triggered by COMMAND-SHIFT-click
25836 \begin_layout Subsubsection*
25840 \begin_layout Standard
25842 \begin_inset Flex Noun
25845 \begin_layout Plain Layout
25846 Settings\SpecialChar menuseparator
25847 Configure Okular\SpecialChar menuseparator
25854 \begin_inset Quotes eld
25858 \begin_inset Quotes erd
25861 and add the command
25862 \begin_inset Flex Code
25865 \begin_layout Plain Layout
25874 \begin_layout Standard
25875 Reverse search is triggered by SHIFT-click.
25878 \begin_layout Subsubsection*
25882 \begin_layout Standard
25883 Qpdfview supports Sync\SpecialChar TeX
25884 since version 0.3.5.
25886 \begin_inset Flex Noun
25889 \begin_layout Plain Layout
25890 Edit\SpecialChar menuseparator
25891 Settings\SpecialChar menuseparator
25897 , click on the input field of the
25898 \begin_inset Quotes eld
25902 \begin_inset Quotes erd
25905 item and add the command
25906 \begin_inset Flex Code
25909 \begin_layout Plain Layout
25918 \begin_layout Standard
25919 Reverse search is triggered by double-click.
25922 \begin_layout Subsubsection*
25926 \begin_layout Standard
25927 Launch yap, choose its
25928 \begin_inset Flex Noun
25931 \begin_layout Plain Layout
25932 View\SpecialChar menuseparator
25938 menu and select the
25939 \begin_inset Quotes eld
25943 \begin_inset Quotes erd
25948 \begin_inset Quotes eld
25951 New\SpecialChar ldots
25953 \begin_inset Quotes erd
25956 button and, in the window that opens, enter
25957 \begin_inset Quotes eld
25962 \begin_inset Quotes erd
25965 (or any other name you like) in the
25966 \begin_inset Quotes eld
25970 \begin_inset Quotes erd
25974 Now click on the button labeled
25975 \begin_inset Quotes eld
25980 \begin_inset Quotes erd
25983 to open a file dialog and navigate to the directory containing the batch
25985 \begin_inset Flex Code
25988 \begin_layout Plain Layout
25996 \begin_inset Flex Code
25999 \begin_layout Plain Layout
26005 and then specify the program arguments as
26006 \begin_inset Flex Code
26009 \begin_layout Plain Layout
26017 \begin_inset Flex Code
26020 \begin_layout Plain Layout
26026 wrapper is used for communicating with \SpecialChar LyX
26034 \begin_layout LyX-Code
26036 \begin_inset Newline newline
26039 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
26048 \begin_inset Newline newline
26062 \begin_layout Standard
26063 Make sure that the \SpecialChar LyX
26064 Server pipe path you specified in \SpecialChar LyX
26066 \begin_inset Flex Code
26069 \begin_layout Plain Layout
26083 , otherwise change the
26084 \begin_inset Flex Code
26087 \begin_layout Plain Layout
26093 wrapper accordingly.
26096 \begin_layout Standard
26097 In yap, reverse search is triggered by double-click.
26100 \begin_layout Subsubsection*
26101 SumatraPDF (Windows)
26104 \begin_layout Standard
26105 In order to use SumatraPDF for inverse search, enter
26106 \begin_inset Flex Code
26109 \begin_layout Plain Layout
26110 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
26115 in the viewer setting in
26116 \begin_inset Flex Noun
26119 \begin_layout Plain Layout
26120 Preferences\SpecialChar menuseparator
26121 File Handling\SpecialChar menuseparator
26122 File formats\SpecialChar menuseparator
26129 \begin_inset Flex Code
26132 \begin_layout Plain Layout
26138 is the previous wrapper.
26139 If SumatraPDF.exe is not in your command PATH, use its full file name.
26142 \begin_layout Standard
26143 Reverse search is triggered by double-click.
26146 \begin_layout Subsubsection*
26150 \begin_layout Standard
26151 First of all, make sure that yap is your default DVI viewer in the Windows
26152 environment, then launch it, choose its
26153 \begin_inset Flex Noun
26156 \begin_layout Plain Layout
26157 View\SpecialChar menuseparator
26163 menu and select the
26164 \begin_inset Quotes eld
26168 \begin_inset Quotes erd
26173 \begin_inset Quotes eld
26176 New\SpecialChar ldots
26178 \begin_inset Quotes erd
26181 button and, in the window that opens, enter
26182 \begin_inset Quotes eld
26187 \begin_inset Quotes erd
26190 (or any other name you like) in the
26191 \begin_inset Quotes eld
26195 \begin_inset Quotes erd
26199 Now click on the button labeled
26200 \begin_inset Quotes eld
26205 \begin_inset Quotes erd
26208 to open a file dialog and navigate to the directory containing the
26209 \begin_inset Flex Code
26212 \begin_layout Plain Layout
26218 program (which is installed by default on Cygwin along with the \SpecialChar LyX
26221 \begin_inset Flex Code
26224 \begin_layout Plain Layout
26230 and then specify the program arguments as
26231 \begin_inset Flex Code
26234 \begin_layout Plain Layout
26241 In this way, you will be using the
26245 for communicating with \SpecialChar LyX
26247 If, for whatever reason, you want to use the
26252 \begin_inset Flex Code
26255 \begin_layout Plain Layout
26261 option and be sure to specify the \SpecialChar LyX
26262 Server pipe path in the \SpecialChar LyX
26266 \begin_layout Standard
26267 In yap, reverse search is triggered by double-click.
26270 \begin_layout Subsubsection*
26271 SumatraPDF (Cygwin)
26274 \begin_layout Standard
26275 In order to use SumatraPDF for inverse search, enter
26276 \begin_inset Flex Code
26279 \begin_layout Plain Layout
26280 SumatraPDF -inverse-search "lyxeditor -g %f %l"
26285 in the viewer setting in
26286 \begin_inset Flex Noun
26289 \begin_layout Plain Layout
26290 Preferences\SpecialChar menuseparator
26291 File Handling\SpecialChar menuseparator
26292 File formats\SpecialChar menuseparator
26299 If SumatraPDF.exe is not in your command PATH, use its full posix path.
26301 \begin_inset Flex Code
26304 \begin_layout Plain Layout
26310 enables communication via the
26316 \begin_inset Flex Code
26319 \begin_layout Plain Layout
26325 option if you want to use the
26329 , and be sure to specify the \SpecialChar LyX
26330 Server pipe path in the \SpecialChar LyX
26334 \begin_layout Standard
26335 Reverse search is triggered by double-click.
26338 \begin_layout Section
26342 \begin_layout Standard
26343 Forward search is, as the name implies, in a sense the
26344 \begin_inset Quotes eld
26348 \begin_inset Quotes erd
26352 It allows you to let the viewer jump to a given position from within \SpecialChar LyX
26354 If forward search is set up (as described in what follows), you can put
26355 the cursor anywhere in your \SpecialChar LyX
26357 \begin_inset Flex Noun
26360 \begin_layout Plain Layout
26361 Navigate\SpecialChar menuseparator
26368 \begin_inset Flex Noun
26371 \begin_layout Plain Layout
26377 in the context menu via right mouse click), and then the viewer will jump
26378 to that position as well.
26379 This implies, of course, that your viewer supports this function.
26382 \begin_layout Standard
26383 To make forward search possible, you first need to provide the generated
26384 output PDF/DVI file with additional information about the \SpecialChar TeX
26386 This can be done via the methods described in the section
26387 \begin_inset CommandInset ref
26389 reference "subsec:rev-search"
26396 \begin_layout Standard
26397 Additionally, you need to configure \SpecialChar LyX
26398 for using your viewers in
26399 \begin_inset Flex Noun
26402 \begin_layout Plain Layout
26403 Tools\SpecialChar menuseparator
26404 Preferences\SpecialChar menuseparator
26405 Output\SpecialChar menuseparator
26412 We provide a range of tested configurations for some viewers, which you
26413 can select from the drop down list.
26414 If none of these configurations suits you, you have to find out and enter
26415 a suitable configuration yourself.
26416 The definition syntax uses the following placeholders:
26419 \begin_layout Itemize
26421 \begin_inset Flex Code
26424 \begin_layout Plain Layout
26433 \begin_layout Itemize
26435 \begin_inset Flex Code
26438 \begin_layout Plain Layout
26444 : name of the (temporary) exported .tex file (without path)
26447 \begin_layout Itemize
26449 \begin_inset Flex Code
26452 \begin_layout Plain Layout
26458 : name of the (temporary) exported .tex file (including path)
26461 \begin_layout Itemize
26463 \begin_inset Flex Code
26466 \begin_layout Plain Layout
26472 : name of the exported output file (either dvi or pdf, depending on which
26473 one exists in the temporary directory)
26476 \begin_layout Standard
26477 Note that only some of the viewers provide full forward search functionality,
26478 among them yap, xdvi, okular
26482 \begin_layout Plain Layout
26483 You might want to set
26484 \begin_inset Flex Code
26487 \begin_layout Plain Layout
26494 \begin_inset Flex Noun
26497 \begin_layout Plain Layout
26498 Tools\SpecialChar menuseparator
26499 Preferences\SpecialChar menuseparator
26500 File Handling\SpecialChar menuseparator
26502 \begin_inset space ~
26515 , qpdfview and SumatraPDF
26519 \begin_layout Plain Layout
26520 SumatraPDF can also use DDE commands through the external program CMCDDE
26521 — downloadable from
26522 \begin_inset CommandInset href
26524 target "http://www.istri.fr/spip/zip/CMCDDE.zip"
26534 While many of the widespread PDF viewers (most notably Adobe Reader) do
26535 not support forward search at all, some other viewers – e.
26536 \begin_inset space \thinspace{}
26540 evince and xpdf – allow at least to reload the document and jump to a specific
26541 page of the file, so you can at least navigate
26542 \begin_inset Quotes eld
26546 \begin_inset Quotes erd
26550 This latter functionality is provided by an external call of synctex (see
26551 the predefined example configurations).
26555 \begin_layout Standard
26556 Forward search works both with DVI and PDF output.
26558 simply checks which preview format you have used before (i.
26559 \begin_inset space \thinspace{}
26562 e., which format is already there in the temporary directory) and chooses
26563 the appropriate configuration for the respective format.