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 -851615295 "ef"
118 \author 893223064 "John Robert Hudson" j.r.hudson@virginmedia.com
124 Additional \SpecialChar LyX
128 \begin_layout Subtitle
133 by the \SpecialChar LyX
138 \begin_layout Plain Layout
140 Principal maintainer of this file is
145 If you have comments or error corrections, please send them to the \SpecialChar LyX
148 \begin_inset Flex Code
151 \begin_layout Plain Layout
153 <lyx-docs@lists.lyx.org>
166 \begin_layout Standard
167 \begin_inset CommandInset toc
168 LatexCommand tableofcontents
175 \begin_layout Chapter
179 \begin_layout Standard
180 This manual is essentially Part II of the
182 User's Guide\SpecialChar endofsentence
185 The reason for separating the two documents is simple: the
189 is already quite lengthy, and it contains information on all of the basic
190 features one needs to know in order to prepare most documents.
191 However, the \SpecialChar LyX
192 Team has worked to make \SpecialChar LyX
193 extensible through various configuration
194 files and external packages.
195 That means that if you want to support the Fizzwizzle \SpecialChar LaTeX
197 create a layout file (or module) for it without having to alter \SpecialChar LyX
199 We've already had contributions of several new features this way, and some
200 of them are documented here.
201 There are also some more `advanced' features, such as how to control the
202 presentation of bibliographies and how to work with multi-part documents,
203 that are not covered in the
207 and are discussed here.
210 \begin_layout Standard
211 This manual also documents some special features, like fax support, version
212 control, and SGML support, which require additional software to work properly.
213 There is also a chapter on \SpecialChar LyX
215 And lastly, there's a chapter of \SpecialChar LaTeX
216 tools and tips, things you can use to
217 spruce up your documents by directly using the powerful features of \SpecialChar LaTeX
219 After all, \SpecialChar LyX
224 only WYSIWYM and will only ever interface to some, not all, \SpecialChar LaTeX
228 \begin_layout Standard
229 If you haven't read the
233 yet, you are definitely in the wrong manual.
238 is the first place to go, since it describes the notation and format of
240 You should also be thoroughly familiar with the
244 and all of the basic features of \SpecialChar LyX
245 before attempting to read this one.
248 \begin_layout Standard
249 Since many of the topics in this manual depend heavily on \SpecialChar LyX
251 with \SpecialChar LaTeX
252 , this first chapter covers the inner workings of \SpecialChar LyX
255 to generate exactly the \SpecialChar LaTeX
257 It is obviously for more seasoned \SpecialChar LyX
261 \begin_layout Chapter
263 and \SpecialChar LaTeX
267 \begin_layout Section
269 Uses \SpecialChar LaTeX
273 \begin_layout Standard
274 This chapter is for both \SpecialChar TeX
275 -nicians and the \SpecialChar LaTeX
277 In it, we'll explain how \SpecialChar LyX
278 and \SpecialChar LaTeX
279 work together to produce printable output.
280 This is the only place in any of the manuals where we assume you know something
281 about \SpecialChar LaTeX
285 \begin_layout Standard
286 At one time, \SpecialChar LyX
288 \begin_inset Quotes eld
291 WYSIWYM frontend to \SpecialChar LaTeX
293 \begin_inset Quotes erd
296 but that's no longer true.
297 There are frontends to \SpecialChar LaTeX
302 \begin_layout Plain Layout
303 Some familar ones are \SpecialChar TeX
304 maker and kile, on Linux, and \SpecialChar TeX
306 There are also the \SpecialChar LaTeX
307 modes for vi and emacs, of course.
312 These are basically text editors with the ability to run \SpecialChar LaTeX
314 errors in the file you're editing.
315 Although \SpecialChar LyX
324 run \SpecialChar LaTeX
325 , and it also indicates errors in the file, it also does much, much
327 For one thing, you don't need to know \SpecialChar LaTeX
328 to use \SpecialChar LyX
331 has added its own extensions to \SpecialChar LaTeX
333 Try the following sometime: select
334 \begin_inset Flex Noun
337 \begin_layout Plain Layout
338 Export\SpecialChar menuseparator
345 \begin_inset Flex Noun
348 \begin_layout Plain Layout
355 \begin_inset Flex Noun
358 \begin_layout Plain Layout
359 View\SpecialChar menuseparator
369 ), then look at the preamble of the resulting
370 \begin_inset Flex Code
373 \begin_layout Plain Layout
380 You'll notice a variety of new macros defined specifically by \SpecialChar LyX
382 These macros are defined automatically, according to the features you use
386 \begin_layout Standard
387 There are several commands that automatically invoke \SpecialChar LaTeX
392 \begin_layout Itemize
393 \begin_inset Flex Noun
396 \begin_layout Plain Layout
397 Document\SpecialChar menuseparator
406 \begin_layout Itemize
407 \begin_inset Flex Noun
410 \begin_layout Plain Layout
411 Document\SpecialChar menuseparator
420 \begin_layout Standard
421 They will only invoke \SpecialChar LaTeX
422 if the file has changed since the last time \SpecialChar LaTeX
428 \begin_layout Standard
429 When \SpecialChar LyX
430 runs \SpecialChar LaTeX
431 on the file you're editing, it performs these steps:
434 \begin_layout Enumerate
435 Convert the document to \SpecialChar LaTeX
436 and save to a file with the extension
437 \begin_inset Flex Code
440 \begin_layout Plain Layout
447 \begin_inset Flex Code
450 \begin_layout Plain Layout
459 \begin_layout Enumerate
460 Run \SpecialChar LaTeX
462 \begin_inset Flex Code
465 \begin_layout Plain Layout
471 file (maybe several times), and run any other commands (such as
472 \begin_inset Flex Code
475 \begin_layout Plain Layout
482 \begin_inset Flex Code
485 \begin_layout Plain Layout
491 ) needed to compile the \SpecialChar LaTeX
495 \begin_layout Enumerate
496 If there are any errors, show the error log.
499 \begin_layout Standard
500 If you have run \SpecialChar LaTeX
502 \begin_inset Flex Noun
505 \begin_layout Plain Layout
506 View\SpecialChar menuseparator
513 then runs a DVI viewer to display the DVI-file.
515 \begin_inset Flex Noun
518 \begin_layout Plain Layout
519 View\SpecialChar menuseparator
526 performs further steps:
529 \begin_layout Itemize
531 \begin_inset Flex Code
534 \begin_layout Plain Layout
540 to convert the DVI file to PostScript.
543 \begin_layout Itemize
544 Run a PostScript viewer, such as
545 \begin_inset Flex Code
548 \begin_layout Plain Layout
554 , to display the PostScript file.
557 \begin_layout Standard
559 does similar things when viewing, or exporting, other formats.
562 \begin_layout Section
563 Translating \SpecialChar LaTeX
564 files into \SpecialChar LyX
568 \begin_layout Standard
569 You can import a \SpecialChar LaTeX
570 file into \SpecialChar LyX
572 \begin_inset Flex Noun
575 \begin_layout Plain Layout
576 File\SpecialChar menuseparator
577 Import\SpecialChar menuseparator
583 command in \SpecialChar LyX
585 This will call a program named
586 \begin_inset Flex Code
589 \begin_layout Plain Layout
595 which will create a file
596 \begin_inset Flex Code
599 \begin_layout Plain Layout
606 \begin_inset Flex Code
609 \begin_layout Plain Layout
617 will then open that file.
621 \begin_layout Plain Layout
622 \begin_inset Flex Code
625 \begin_layout Plain Layout
631 can also be run from the command line, of course.
639 \begin_layout Standard
640 \begin_inset Flex Code
643 \begin_layout Plain Layout
649 will translate most legal \SpecialChar LaTeX
650 , but not everything.
651 It will put things it doesn't understand into \SpecialChar TeX
652 code, so after translating
654 \begin_inset Flex Code
657 \begin_layout Plain Layout
663 , you can look for \SpecialChar TeX
664 code and hand-edit it until it looks right.
667 \begin_layout Standard
668 If you don't know what \SpecialChar TeX
669 code is, read the next section.
672 \begin_layout Section
673 \begin_inset CommandInset label
675 name "sec:Inserting-TeX-Code"
679 Inserting \SpecialChar TeX
680 Code into \SpecialChar LyX
684 \begin_layout Standard
685 Anything you can do in \SpecialChar LaTeX
686 you can do in \SpecialChar LyX
687 , for a very simple reason: You can
688 always insert \SpecialChar TeX
689 code into any \SpecialChar LyX
692 cannot, and will never be able to, display every possible \SpecialChar LaTeX
694 If ever you need to insert \SpecialChar LaTeX
695 commands into your \SpecialChar LyX
696 document, you can use the
698 \begin_inset Flex Code
701 \begin_layout Plain Layout
708 box, which you can insert into your document with
709 \begin_inset Flex Noun
712 \begin_layout Plain Layout
713 Insert\SpecialChar menuseparator
723 or the keyboard shortcut
732 \begin_layout Standard
733 Here's an example of inserting \SpecialChar LaTeX
734 commands in a \SpecialChar LyX
736 The code looks like this:
739 \begin_layout LyX-Code
743 \begin_inset Newline newline
749 \begin_inset Newline newline
752 This is an example of a minipage environment.
754 \begin_inset Newline newline
757 can put nearly everything in it, even (non-floating)
758 \begin_inset Newline newline
763 \begin_inset Newline newline
769 \begin_inset Newline newline
773 \begin_inset Newline newline
779 \begin_inset Newline newline
785 \begin_inset Newline newline
791 \begin_inset Newline newline
796 \begin_inset Newline newline
802 \begin_inset Newline newline
808 \begin_inset Newline newline
814 \begin_inset Newline newline
822 \begin_layout LyX-Code
826 \begin_layout Standard
828 \begin_inset Flex Code
831 \begin_layout Plain Layout
838 box containing this text is directly after this paragraph.
839 Those of you reading the manual in \SpecialChar LyX
840 will only see the \SpecialChar TeX
842 Those reading a printed version of the manuals will see the actual results:
843 \begin_inset VSpace bigskip
849 \begin_layout Standard
853 \begin_layout Plain Layout
860 \begin_layout Plain Layout
867 \begin_layout Plain Layout
869 This is an example of a minipage environment.
870 You can put nearly everything in it, even (non-floating) figures and tables.
874 \begin_layout Plain Layout
881 \begin_layout Plain Layout
886 \begin_layout Plain Layout
893 \begin_layout Plain Layout
900 \begin_layout Plain Layout
907 \begin_layout Plain Layout
913 \begin_layout Plain Layout
920 \begin_layout Plain Layout
927 \begin_layout Plain Layout
934 \begin_layout Plain Layout
944 \begin_inset VSpace bigskip
950 \begin_layout Standard
951 In addition to using \SpecialChar TeX
952 code, you can also create a separate file containing
953 some complex \SpecialChar LaTeX
954 structure and then use
955 \begin_inset Flex Noun
958 \begin_layout Plain Layout
959 Insert\SpecialChar menuseparator
969 to include your file (you should select the type
970 \begin_inset Flex Code
973 \begin_layout Plain Layout
980 We recommend that you only do this if you have a
981 \begin_inset Flex Code
984 \begin_layout Plain Layout
995 Otherwise, you'll have a big job tracking down \SpecialChar LaTeX
999 \begin_layout Standard
1000 There are a few last points to emphasize:
1003 \begin_layout Itemize
1009 check if your \SpecialChar LaTeX
1013 \begin_layout Itemize
1014 Beware of reinventing the wheel.
1017 \begin_layout Standard
1018 On that last point, \SpecialChar LyX
1019 does have quite a few features tucked into it, and
1021 Be sure to check the manuals to make sure that \SpecialChar LyX
1022 doesn't have such-and-such
1023 feature before you decide you have to do it by hand.
1024 Moreover, there are numerous \SpecialChar LaTeX
1025 packages out there to do all sorts of things,
1026 from labels to envelopes to fancy multipage tables.
1028 \begin_inset CommandInset href
1031 target "http://www.ctan.org/"
1038 \begin_layout Standard
1039 If you do need to do some wild and fancy things within your document, be
1040 sure to check out a good \SpecialChar LaTeX
1041 book for assistance.
1042 There are a number of them listed in the bibliography of the
1049 \begin_layout Section
1051 and the \SpecialChar LaTeX
1055 \begin_layout Subsection
1056 About the \SpecialChar LaTeX
1060 \begin_layout Standard
1061 If you already know \SpecialChar LaTeX
1062 , there is no need to explain here what the preamble
1064 If you don't, the following will give you some ideas—we recommend again
1065 that you consult a \SpecialChar LaTeX
1066 book for further information.
1067 In any case, you should read the points below, because they explain what
1068 you can do and what you don't need to do in the \SpecialChar LaTeX
1069 preamble of a \SpecialChar LyX
1073 \begin_layout Standard
1074 The \SpecialChar LaTeX
1075 preamble comes at the very beginning of a document,
1083 \begin_layout Itemize
1084 Declare the document class.
1086 \begin_inset Newline newline
1090 already does this for you.
1091 If you're a seasoned \SpecialChar LaTeX
1092 -nician, and you have a custom document class you
1093 want to use, check out the
1095 Customization Manual
1097 for information on how to make \SpecialChar LyX
1101 \begin_layout Itemize
1102 Declare the usage of packages.
1104 \begin_inset Newline newline
1108 packages provide special commands, which are only available within a document
1109 when the package has been declared in the preamble.
1110 In addition to providing special commands, the inclusion of a package can
1111 change the document.
1112 For example, the package
1113 \begin_inset Flex Code
1116 \begin_layout Plain Layout
1122 forces all paragraphs to be indented.
1123 There are other packages for labels, envelopes, margins, etc.
1127 \begin_layout Itemize
1128 Set counters, variables, lengths and widths.
1130 \begin_inset Newline newline
1133 There are several \SpecialChar LaTeX
1134 counters and variables that
1138 be set globally from within the preamble in order to have the desired effect.
1139 (There are variables that you can set and reset inside the document, too.)
1140 Margins are a good example of something that must be set in the preamble.
1141 Another example is the label format for lists.
1142 You can actually set these just about anywhere, but it's best to do it
1143 just once, inside the preamble.
1146 \begin_layout Itemize
1147 Declare user defined commands (with
1148 \begin_inset Flex Code
1151 \begin_layout Plain Layout
1160 \begin_inset Flex Code
1163 \begin_layout Plain Layout
1172 \begin_inset Newline newline
1175 These are abbreviations for \SpecialChar LaTeX
1176 commands which appear very often inside a document.
1177 Although the preamble is a good place to declare such commands, they
1181 be declared anywhere (before they are used for the first time, of course).
1182 This can be useful if there is a lot of raw \SpecialChar LaTeX
1183 code in your document, which
1184 normally should not be the case.
1187 \begin_layout Standard
1189 adds its own set of definitions to the preamble of the
1190 \begin_inset Flex Code
1193 \begin_layout Plain Layout
1200 This makes \SpecialChar LaTeX
1201 files generated by \SpecialChar LyX
1205 \begin_layout Subsection
1206 Changing the Preamble
1209 \begin_layout Standard
1210 The commands which \SpecialChar LyX
1211 adds to the preamble of a \SpecialChar LaTeX
1212 file are fixed; you can't
1213 change them without patching \SpecialChar LyX
1215 You can, however, add your own stuff to the preamble by selecting
1216 \begin_inset Flex Noun
1219 \begin_layout Plain Layout
1222 \begin_inset space ~
1231 \begin_inset Flex Noun
1234 \begin_layout Plain Layout
1235 Document\SpecialChar menuseparator
1243 adds anything in the
1244 \begin_inset Flex Noun
1247 \begin_layout Plain Layout
1253 dialog to its own built-in preamble.
1254 Before adding your own declarations in the preamble, you should make sure
1255 that \SpecialChar LyX
1256 doesn't already support what you want to do.
1257 (Remember what we said about reinventing the wheel?) Also,
1259 make sure your preamble code is correct
1263 doesn't check it for you.
1264 If there is an error, you're likely to get an error like
1265 \begin_inset Quotes eld
1269 \begin_inset Flex Code
1272 \begin_layout Plain Layout
1281 \begin_inset Quotes erd
1285 If you see this error, check your preamble.
1288 \begin_layout Subsection
1292 \begin_layout Standard
1293 Here are some examples of what you can add to a preamble, and what they
1297 \begin_layout Subsubsection
1301 \begin_layout Standard
1302 There are two variables under \SpecialChar LaTeX
1303 that control page position:
1304 \begin_inset Flex Code
1307 \begin_layout Plain Layout
1316 \begin_inset Flex Code
1319 \begin_layout Plain Layout
1328 Their names should be self-explanatory.
1329 These variables are useful if you think for a moment about computer labels.
1330 Sometimes, the size of a print medium and the area of the medium that you
1331 can actually print on aren't the same.
1333 \begin_inset Flex Code
1336 \begin_layout Plain Layout
1345 \begin_inset Flex Code
1348 \begin_layout Plain Layout
1359 \begin_layout Standard
1360 The default values for
1361 \begin_inset Flex Code
1364 \begin_layout Plain Layout
1373 \begin_inset Flex Code
1376 \begin_layout Plain Layout
1385 \begin_inset space \thinspace{}
1389 \begin_inset space \thinspace{}
1393 \begin_inset space \space{}
1396 the page isn't shifted.
1397 Unfortunately, some DVI drivers always seem to shift the page.
1398 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1399 If you're using \SpecialChar LyX
1400 on a system that you don't personally maintain, and your
1401 sysadmin is a doofus,
1402 \begin_inset Flex Code
1405 \begin_layout Plain Layout
1414 \begin_inset Flex Code
1417 \begin_layout Plain Layout
1426 Suppose your left and top margins are always 0.5
1427 \begin_inset space \thinspace{}
1431 You can add this to the preamble:
1434 \begin_layout LyX-Code
1442 \begin_layout LyX-Code
1450 \begin_layout Standard
1451 and your margins should now be correct.
1454 \begin_layout Subsubsection
1458 \begin_layout Standard
1459 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1460 There's a rather nice package, available at your nearest CTAN archive,
1461 for printing sheets of labels:
1462 \begin_inset Flex Code
1465 \begin_layout Plain Layout
1472 Now, your system may not have this package installed by default.
1473 We leave that up to you to check.
1474 You'll also want to read the documentation for it; we're not going to do
1476 Since this is an example, however, we'll give you an example of how you
1480 \begin_layout Standard
1481 First, make sure you're using the
1482 \begin_inset Flex Code
1485 \begin_layout Plain Layout
1492 Next, you need to put the following in your preamble:
1495 \begin_layout LyX-Code
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 Standard
1538 This sets things up for Avery label sheets, stock #5360.
1539 You're now ready to print labels, but you'll need to insert \SpecialChar LaTeX
1542 \begin_inset Flex Code
1545 \begin_layout Plain Layout
1554 \begin_inset Flex Code
1557 \begin_layout Plain Layout
1565 around each label text.
1566 This and other special features of
1567 \begin_inset Flex Code
1570 \begin_layout Plain Layout
1576 are explained in its documentation.
1579 \begin_layout Standard
1580 Someday, someone may write a \SpecialChar LyX
1581 layout file to support this package directly.
1582 Maybe that someone is you.
1585 \begin_layout Subsubsection
1586 Example #3: Paragraph Indentation
1589 \begin_layout Standard
1590 Americans are trained to indent the first line of
1595 As with all of their other weird quirks, most Americans will whine and
1596 moan until they can have their way and indent the first line of all paragraphs.
1605 \begin_layout Standard
1606 Of course, this behavior isn't standard typography.
1607 In books, you typically only indent the first line of a paragraph
1611 it follows another one.
1612 The idea behind indenting the first line of a paragraph is to distinguish
1613 neighboring paragraphs from one another.
1614 If there is no previous paragraph—for example, if it follows a figure or
1615 is the first paragraph in a section—then there is no need for indentation.
1619 \begin_layout Standard
1620 If you're a typical American (we're still joking!), though, you don't care
1621 about such esoteric things; you want your indentation! Add this to the
1625 \begin_layout LyX-Code
1628 usepackage{indentfirst}
1631 \begin_layout Standard
1632 If your \SpecialChar TeX
1633 distribution isn't braindead, you'll have this package, and all
1634 of your paragraphs will get the indentation the Founding Fathers intended
1638 \begin_layout Subsubsection
1639 Example #4: This Document
1642 \begin_layout Standard
1643 You can also check out the preamble of this document to get an idea of some
1644 of the advanced things you can do.
1647 \begin_layout Section
1649 and \SpecialChar LaTeX
1653 \begin_layout Standard
1654 When \SpecialChar LyX
1655 calls \SpecialChar LaTeX
1656 , it tells \SpecialChar LaTeX
1657 to blithely ignore any errors and keep going.
1658 It then uses the logfile from the \SpecialChar LaTeX
1659 run to do a post-mortem.
1660 After analyzing the logfile, \SpecialChar LyX
1661 displays a dialog listing the errors.
1662 Clicking on any one of them will take you to the position in your \SpecialChar LyX
1664 where the error occurred.
1668 \begin_layout Plain Layout
1670 Analyzing the logfile is a tough job, and \SpecialChar LyX
1671 doesn't always go to the right
1673 There are also cases where \SpecialChar LaTeX
1674 reports the error on one line, but the actual
1676 This is not unlike forgetting a closing brace in a program: You'll get
1677 an error, but only later.
1685 \begin_layout Standard
1686 Some folks also like to look at the log file directly: It is available from
1688 \begin_inset Flex Noun
1691 \begin_layout Plain Layout
1692 Document\SpecialChar menuseparator
1694 \begin_inset space ~
1703 There are some fairly common error messages and warnings.
1704 We'll cover those here.
1705 You should look at a good \SpecialChar LaTeX
1706 book for a complete listing.
1709 \begin_layout Itemize
1710 \begin_inset Flex Code
1713 \begin_layout Plain Layout
1720 \begin_inset Newline newline
1723 Anything beginning with these words is a warning message for the purpose
1725 \begin_inset Quotes eld
1729 \begin_inset Quotes erd
1732 the \SpecialChar LaTeX
1734 You'll get messages like this if you added or changed cross-references
1735 or bibliography entries, in which case, \SpecialChar LaTeX
1736 is trying to tell you that you
1737 need to make another run.
1738 You can by-and-large ignore these.
1741 \begin_layout Itemize
1742 \begin_inset Flex Code
1745 \begin_layout Plain Layout
1752 \begin_inset Newline newline
1755 Another warning message, this time about fonts which \SpecialChar LaTeX
1757 The rest of the message will often say something about a replacement font
1758 that \SpecialChar LaTeX
1760 You can safely ignore these, too.
1763 \begin_layout Itemize
1764 \begin_inset Flex Code
1767 \begin_layout Plain Layout
1776 \begin_inset Newline newline
1785 They are warnings about lines that were too long and run past the right
1787 Almost always, this is unnoticeable in the final output.
1788 (It can be just a point or two.) Or, only one or two characters extend past
1791 seems to generate at least one of these messages for just about any document
1793 \begin_inset Newline newline
1796 You can ignore these messages.
1797 Your eyes will tell you if there's a problem with something that's too
1798 wide; just look at the output.
1802 \begin_layout Plain Layout
1803 You can also enable the `draft' option in
1804 \begin_inset Flex Noun
1807 \begin_layout Plain Layout
1808 Document\SpecialChar menuseparator
1814 , and then \SpecialChar LaTeX
1815 will draw a black box in the margin of lines that are overfull.
1823 \begin_layout Itemize
1824 \begin_inset Flex Code
1827 \begin_layout Plain Layout
1836 \begin_inset Newline newline
1839 Not quite as common as its cousin.
1841 seems to like to print lines that are a bit too wide as opposed to ones
1842 that are a bit too narrow.
1843 We have no idea why.
1846 \begin_layout Itemize
1847 \begin_inset Flex Code
1850 \begin_layout Plain Layout
1859 \begin_inset Flex Code
1862 \begin_layout Plain Layout
1871 \begin_inset Newline newline
1874 Warnings about troubles breaking the page.
1875 Once again, just look at the output.
1876 Your eyes will tell you where something has gone wrong.
1879 \begin_layout Itemize
1880 \begin_inset Flex Code
1883 \begin_layout Plain Layout
1885 \begin_inset Quotes els
1889 \begin_inset Quotes ers
1898 \begin_inset Newline newline
1902 \begin_inset Quotes eld
1906 \begin_inset Quotes erd
1909 isn't installed on this system.
1910 This usually appears because some package your document needs isn't installed.
1911 If you didn't touch the preamble or didn't use the
1912 \begin_inset Flex Code
1915 \begin_layout Plain Layout
1923 command, then one of the packages \SpecialChar LyX
1924 tried to load is missing.
1926 \begin_inset Flex Noun
1929 \begin_layout Plain Layout
1930 Help\SpecialChar menuseparator
1937 to get a list of packages that \SpecialChar LyX
1939 This file is updated whenever you reconfigure \SpecialChar LyX
1941 \begin_inset Flex Noun
1944 \begin_layout Plain Layout
1945 Tools\SpecialChar menuseparator
1951 ) and tells you which packages have been detected and what they do.
1952 \begin_inset Newline newline
1956 \begin_inset Flex Code
1959 \begin_layout Plain Layout
1967 command and the package in question isn't installed, then you'll need to
1968 install it yourself.
1971 \begin_layout Itemize
1972 \begin_inset Flex Code
1975 \begin_layout Plain Layout
1976 LaTeX Error: Unknown option
1982 \begin_inset Newline newline
1985 Error messages beginning with this are trying to tell you that you specified
1986 a bad or undefined option to a package.
1987 Check the package's documentation.
1990 \begin_layout Itemize
1991 \begin_inset Flex Code
1994 \begin_layout Plain Layout
1995 Undefined control sequence
2001 \begin_inset Newline newline
2004 If you've inserted \SpecialChar LaTeX
2005 code into your document, but made a typo, you'll get
2007 You may have forgotten to load a package.
2008 In any case, this error message usually means that you used an undefined
2013 \begin_layout Standard
2014 There are other error and warning messages.
2015 Some are self-explanatory.
2016 These are usually \SpecialChar LaTeX
2018 Others are downright cryptic.
2019 These are usually \SpecialChar TeX
2020 error messages, and we really have
2024 what they mean or how to decipher them.
2028 \begin_layout Standard
2029 There's a general sequence you should follow if you get error messages:
2032 \begin_layout Enumerate
2033 Look at the \SpecialChar LaTeX
2034 code you inserted for typos.
2037 \begin_layout Enumerate
2038 If there are no typos, check that you used the command(s) correctly.
2041 \begin_layout Enumerate
2042 If you get a bunch of error boxes piled up at the very top of the document—and
2043 especially if you see a
2044 \begin_inset Quotes eld
2048 \begin_inset Flex Code
2051 \begin_layout Plain Layout
2060 \begin_inset Quotes erd
2063 error—it means that there are errors in the preamble.
2064 Start debugging your preamble.
2067 \begin_layout Enumerate
2068 If you didn't add anything to the preamble and didn't add any \SpecialChar LaTeX
2070 document, the first suspect is your \SpecialChar LaTeX
2071 distribution itself.
2072 Check for missing packages and install them.
2075 \begin_layout Enumerate
2076 Okay, so there are no missing packages.
2077 Did you use any of the fine-tuning options in \SpecialChar LyX
2078 ? Specifically, did you
2082 any of them, like trying to manually insert lots of
2083 \begin_inset Flex Code
2086 \begin_layout Plain Layout
2088 \begin_inset space ~
2097 \begin_inset Flex Code
2100 \begin_layout Plain Layout
2107 \begin_inset Flex Code
2110 \begin_layout Plain Layout
2116 ? Did you try to kludge something together with these instead of using the
2117 appropriate paragraph environment?
2120 \begin_layout Enumerate
2121 All right, you didn't use any of the fine-tuning options, you played by
2123 Did you try to pull a fancy maneuver? Did you do something funky inside
2124 a table or an equation, like inserting a graphic into a table cell?
2127 \begin_layout Enumerate
2128 Do you have long sections of text where \SpecialChar LaTeX
2129 cannot find a place to break a
2130 line? By default, \SpecialChar LaTeX
2131 is rather strict about how much extra inter-word spacing
2132 it will add in order to break a line.
2133 Preferably, you should rework the paragraph to avoid the problem.
2136 \begin_layout Enumerate
2137 Did you go overboard with the nesting? \SpecialChar LyX
2138 (currently) doesn't check to make
2139 sure you're in the limits for nesting environments.
2140 If you nested a bunch of environments to the
2141 \begin_inset Formula $17^{\mathrm{th}}$
2144 level, that's the problem.
2145 (The limit in \SpecialChar LaTeX
2149 \begin_layout Enumerate
2150 Okay, you didn't get any error messages, but your output looks awful.
2151 If you have a table or figure that's too wide or long for the page, you
2156 \begin_layout Enumerate
2157 rescale the figure so it fits.
2160 \begin_layout Enumerate
2161 trim down the table so it fits.
2165 \begin_layout Enumerate
2166 If something else is wrong with the output, and you didn't try to pull anything
2167 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2170 \begin_layout Standard
2171 If all this doesn't help—well, then
2175 you might have found a bug in \SpecialChar LyX
2180 \begin_layout Chapter
2184 \begin_layout Standard
2186 \change_inserted 893223064 1464852146
2187 This section will be updated in due course.
2190 \begin_layout Standard
2191 Special Document Classes
2194 \begin_layout Section
2198 \begin_layout Standard
2204 \begin_layout Subsection
2208 \begin_layout Standard
2209 This section describes how \SpecialChar LyX
2210 can be used to write articles for submission
2211 to the scientific journal
2213 Astronomy and Astrophysics
2216 \begin_inset Flex URL
2219 \begin_layout Plain Layout
2221 http://www.edpsciences.fr/aa/
2226 ) using Version 5.01 of the document class
2231 This package can be downloaded from the ftp site
2234 \begin_layout Standard
2235 \begin_inset VSpace medskip
2241 \begin_layout Standard
2243 \begin_inset Flex URL
2246 \begin_layout Plain Layout
2248 ftp://ftp.edpsciences.org/pub/aa/readme.html
2256 \begin_layout Standard
2257 \begin_inset VSpace medskip
2263 \begin_layout Standard
2264 A manual comes together with that package, and this text is not meant to
2265 replace the original manual but is merely a short guide in how to realize
2266 the correct form of your paper.
2270 \begin_layout Standard
2271 Please note that the publisher of the journal was changed from Springer
2272 to EDP Sciences starting January 1, 2001.
2273 That change involved also some slight changes to the style files, namely
2274 the removal of the thesaurus command.
2275 The \SpecialChar LyX
2276 class aa supports the newest version of these style files, V 5.01.
2277 If you have an older version installed, please upgrade.
2278 For compatibility, the old (version 4) layout has been kept as
2283 Please refer to the comments in
2286 Dir/layouts/aapaper.layout
2291 \begin_layout Subsection
2295 \begin_layout Standard
2296 It is recommended you start from the example template distributed with \SpecialChar LyX
2298 If you are not using a template, note the following settings:
2301 \begin_layout Itemize
2308 Document\SpecialChar menuseparator
2311 dialog (OK, that one was obvious).
2314 \begin_layout Itemize
2315 Don't change the option
2318 \begin_inset space ~
2328 The whole layout is done by the macros, you shouldn't change anything.
2331 \begin_layout Subsection
2335 \begin_layout Standard
2336 First thing to enter is the header information.
2337 It consists of seven entries, of which some are optional.
2341 \begin_layout Itemize
2349 \begin_layout Itemize
2357 \begin_layout Itemize
2365 \begin_layout Itemize
2373 \begin_layout Itemize
2378 : [optional] if more than one author: whom to contact for offprint requests.
2381 \begin_layout Itemize
2386 : [optional] mail address for contacts.
2389 \begin_layout Itemize
2397 Received: <date>; Accepted <date>
2400 \begin_layout Standard
2401 There is no need to issue the
2407 command, this is done automatically by \SpecialChar LyX
2408 when the header is finished.
2409 Although the order of the single header entries doesn't matter it is advised
2410 to keep the above sequence, just to get the best optics and meets the layout
2411 of the real document.
2414 \begin_layout Standard
2415 If you want to place footnotes in the header block, e.
2416 \begin_inset space \thinspace{}
2420 \begin_inset space \space{}
2423 to state your present address, just use the standard footnote via the menu
2426 Insert\SpecialChar menuseparator
2431 will automagically use the term
2440 \begin_layout Standard
2441 In addition to these topics, the macros use three additional \SpecialChar LaTeX
2443 have no counterpart in \SpecialChar LyX
2447 \begin_layout Itemize
2454 to separate different names for more than one author and institute, respectivel
2458 \begin_layout Itemize
2465 to mark corresponding author/institute pairs.
2466 The institutes are numbered sequentially as they appear in the
2470 field, so you have to put a marker to each author.
2473 \begin_layout Itemize
2480 to supply an email address for fast contact.
2483 \begin_layout Standard
2484 In all cases, the appropriate command has to be entered in \SpecialChar LyX
2492 \begin_layout Subsection
2496 \begin_layout Standard
2497 The abstract should immediately follow the header block.
2498 With version 5 the abstract environment was changed to a command, and there
2499 is now a resctriction to only one paragraph.
2500 In addition, it should contain an entry with the keywords.
2501 This is not yet implemented for \SpecialChar LyX
2502 , therefore you have to enter the \SpecialChar LaTeX
2510 by hand and mark it as \SpecialChar LaTeX
2512 Refer to the example paper.
2515 \begin_layout Subsection
2516 Supported environments
2519 \begin_layout Standard
2520 The A&A paper layout supports the following environments for structuring
2524 \begin_layout Itemize
2530 \begin_layout Itemize
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
2597 \begin_layout Subsection
2598 Commands not supported by \SpecialChar LyX
2602 \begin_layout Standard
2603 Some commands are not yet supported by the
2607 layout for \SpecialChar LyX
2609 Some have already been mentioned.
2610 For the sake of completeness, they are listed all together here:
2613 \begin_layout Itemize
2621 \begin_layout Itemize
2629 \begin_layout Itemize
2637 \begin_layout Itemize
2645 \begin_layout Itemize
2653 \begin_layout Itemize
2661 \begin_layout Itemize
2669 \begin_layout Itemize
2677 \begin_layout Standard
2678 If you want to use any of these commands, you have to enter them yourself.
2681 Do not forget to mark them as \SpecialChar LaTeX
2685 \begin_layout Subsection
2686 Figure and Table Floats
2689 \begin_layout Standard
2691 provides support for the necessary float environments
2693 figure, figure*, table
2699 , therefore we won't tell much about it here.
2703 \begin_inset space ~
2709 Just remember that tables should be left-aligned.
2710 For that, select the table and change the alignment in
2712 Edit\SpecialChar menuseparator
2714 \begin_inset space ~
2720 \begin_layout Standard
2721 There is only one special thing: the figures with caption besides the figure.
2722 To create such a figure, you have to do the following:
2725 \begin_layout Enumerate
2726 Create a wide figure float:
2728 Insert\SpecialChar menuseparator
2729 Float\SpecialChar menuseparator
2732 , then right click in the figure and select
2735 \begin_inset space ~
2743 \begin_layout Enumerate
2744 Enter your caption text.
2747 \begin_layout Enumerate
2752 to move the cursor above the caption.
2755 \begin_layout Enumerate
2759 \begin_layout Enumerate
2760 Position the cursor behind the figure and insert a horizontal fill:
2762 Insert\SpecialChar menuseparator
2764 \begin_inset space ~
2767 Character\SpecialChar menuseparator
2769 \begin_inset space ~
2777 \begin_layout Enumerate
2778 Switch to \SpecialChar LaTeX
2782 \begin_inset space ~
2790 \begin_layout Enumerate
2800 Do not close the brace!
2803 \begin_layout Enumerate
2804 Position the cursor behind the caption text, switch to \SpecialChar LaTeX
2809 \begin_inset space ~
2821 \begin_layout Standard
2822 Also, refer to the figures in the example paper.
2825 \begin_layout Subsection
2829 \begin_layout Standard
2830 For submission, the paper has to be formated in a special double-spacing
2832 For this purpose, you have to give the option
2836 to the documentclass.
2837 This must be done using the extra class options field in the
2839 Document\SpecialChar menuseparator
2843 Just enter the string
2850 \begin_layout Subsection
2854 \begin_layout Standard
2859 directory contains an example paper written with \SpecialChar LyX
2861 It is the example paper from the original macro package, translated to
2864 Use it for inspiration, and compare the original \SpecialChar LaTeX
2865 code with \SpecialChar LyX
2869 \begin_layout Section
2874 \begin_layout Standard
2880 \begin_layout Subsection
2884 \begin_layout Standard
2886 is a set of macros produced by the American Astronomical Society to
2887 facilitate electronic manuscript submission to the three journals they
2888 publish: the Astrophysical Journal (including the Letters and Supplement),
2889 the Astronomical Journal, and the Publications of the Astronomical Society
2892 has proven to be an excellent tool for generating these documents, especially
2893 given its equation, citation, and figure handling capabilities.
2895 requires version 5.0 (or higher) of these macros; preferably 5.2, which
2896 is the version described here, or higher.
2897 Versions prior to 5.0 are intended for use with \SpecialChar LaTeX
2898 2.09 and are fundamentally
2899 incompatible with \SpecialChar LyX
2901 The AAS\SpecialChar TeX
2902 package may be downloaded from the AAS\SpecialChar TeX
2906 \begin_layout Standard
2907 \begin_inset VSpace medskip
2913 \begin_layout Standard
2915 \begin_inset Flex URL
2918 \begin_layout Plain Layout
2920 https://aas.org/aastex/aastex-downloads
2928 \begin_layout Standard
2929 \begin_inset VSpace medskip
2935 \begin_layout Standard
2936 A complete user guide is contained in that package and you should familiarize
2937 yourself with it thoroughly before embarking on writing a paper in \SpecialChar LyX
2940 will not reduce the need to figure out all the AAS\SpecialChar TeX
2941 commands, it will only
2942 reduce the drudgery of typing everything in.
2943 It is your responsibility to ensure that the final exported \SpecialChar LaTeX
2945 completely to the requirements of the journal to which you are submitting
2949 \begin_layout Subsection
2950 Starting a New Paper
2953 \begin_layout Standard
2954 I strongly suggest that you start with the AAS\SpecialChar TeX
2958 File\SpecialChar menuseparator
2965 , enter the new file name, then choose the
2970 This will show the most common fields found in a manuscript.
2971 Simply overwrite the existing text (including the brackets,
2975 ) with the correct information.
2976 Many of the AAS\SpecialChar TeX
2977 commands and environments can be implemented directly in
2979 , but some cannot: most noticeably
2991 , which should stick out like a sore thumb if you actually just opened the
2993 For commands such as these, the \SpecialChar LaTeX
2994 code must be entered directly and marked
2996 Such commands are referred to as \SpecialChar TeX
2997 code, or Evil Red Text.
2998 I tried to minimize the amount of \SpecialChar TeX
2999 code needed in an AAS\SpecialChar TeX
3001 there is still a bit more required than any of us would like.
3004 \begin_layout Subsection
3005 Finishing Your Paper
3008 \begin_layout Standard
3009 When the paper is finished to your satisfaction and previews/prints correctly,
3011 \begin_inset Quotes eld
3015 \begin_inset Quotes erd
3018 actions which need to be done before you submit it to the journals.
3022 \begin_layout Enumerate
3023 Export your paper as a \SpecialChar LaTeX
3026 File\SpecialChar menuseparator
3027 Export\SpecialChar menuseparator
3035 \begin_layout Enumerate
3040 file with your favorite text editor
3044 \begin_layout Enumerate
3045 remove the comment lines before the
3054 \begin_layout Enumerate
3059 usepackage...{fontenc}
3061 line if it appears (usually just after
3076 \begin_layout Enumerate
3077 remove everything between (and including) the
3089 commands, except for any commands you specifically put into the \SpecialChar LaTeX
3091 (which should appear immediately after the
3092 \begin_inset Quotes eld
3095 User specified \SpecialChar LaTeX
3097 \begin_inset Quotes erd
3108 \begin_layout Enumerate
3109 Run the resulting file through \SpecialChar LaTeX
3110 to make sure it still processes correctly.
3113 \begin_layout Enumerate
3114 Reread the journal requirements to make sure your filenames and formats
3118 \begin_layout Enumerate
3122 \begin_layout Subsection
3123 Comments On Specific Commands
3126 \begin_layout Standard
3127 I will not describe the detailed usage of the individual AAS\SpecialChar TeX
3134 ) gives a good description of each.
3135 Thus it's probably easiest for me to go down the list as found in the guide
3136 and offer comments where necessary.
3137 So let's begin \SpecialChar ldots
3141 \begin_layout Subsubsection
3142 Things that work as expected
3145 \begin_layout Standard
3146 Because they work as you might expect, I simply list them and the section
3247 begin{thebibliography}
3255 (2.13.2), all the cite commands and their variations (2.13.2), the generic
3256 graphicx figure commands (2.14.1),
3280 (2.15.4, amongst other places),
3307 \begin_layout Standard
3308 The following style options also work correctly:
3329 Simply put them in the
3335 Layout\SpecialChar menuseparator
3341 \begin_layout Subsubsection
3342 Things that work, but require more comment
3345 \begin_layout Standard
3346 The following items work, but require a little more discussion:
3349 \begin_layout Itemize
3350 These items are reserved for use by the journal editors, but you can put
3351 them into the \SpecialChar LaTeX
3352 preamble if you feel compelled to do so:
3385 \begin_layout Itemize
3386 These items may be placed in the \SpecialChar LaTeX
3387 preamble, and are included as blanks in
3409 \begin_layout Itemize
3416 (2.3) – can only be used
3417 \begin_inset Quotes eld
3421 \begin_inset Quotes erd
3424 , not in the middle of a paragraph.
3425 Use \SpecialChar TeX
3426 code if you need to embed it.
3429 \begin_layout Itemize
3436 (2.3) – will have extra {} after it.
3437 This should not cause an error.
3440 \begin_layout Itemize
3447 (2.6) – can only be used
3448 \begin_inset Quotes eld
3452 \begin_inset Quotes erd
3455 , not in the middle of a paragraph.
3456 Use \SpecialChar TeX
3457 code if you need to embed it.
3460 \begin_layout Itemize
3467 (2.8) – can't insert a cross-reference tag, you must type the tag name by
3471 \begin_layout Itemize
3485 \begin_layout Itemize
3492 (2.9) – will have extra {} after it.
3493 This should not cause an error.
3496 \begin_layout Itemize
3503 (2.11) – will have extra {} after it.
3504 This should not cause an error.
3507 \begin_layout Itemize
3514 (2.14.2) – you can insert an optional filename argument by placing the cursor
3515 at the beginning of the text and selecting
3517 Insert\SpecialChar menuseparator
3522 \begin_inset Quotes eld
3526 \begin_inset Quotes erd
3529 inserts an optional argument of the type needed by
3536 Hopefully it will be renamed someday.
3539 \begin_layout Itemize
3552 for the catalog ID optional parameter
3555 \begin_layout Itemize
3568 for the catalog ID optional parameter
3571 \begin_layout Subsubsection
3572 Things not implemented, use \SpecialChar TeX
3576 \begin_layout Standard
3599 setcounter{equation}
3601 (2.12), Journal name abbreviations (2.13.4),
3637 (2.15.4, insert it as the first element in the lefthand cell after where
3639 Don't use any of \SpecialChar LyX
3640 's rules in the table),
3652 (2.15.5), much of Misc (2.17, except
3703 \begin_layout Subsubsection
3704 Things that cannot be implemented
3707 \begin_layout Standard
3709 at least in any meaningful sort of way, so I suggest ignoring them.
3710 They are the references environment (2.13.3), and the deluxetable environment
3712 If you really, really need to use deluxetable, I suggest editing it in
3713 a separate file with a text editor, then using
3715 Insert\SpecialChar menuseparator
3717 \begin_inset space ~
3722 to include it in your \SpecialChar LyX
3728 file to see an example of this.
3731 \begin_layout Subsection
3732 FAQs, Tips, Tricks, and Other Ruminations
3735 \begin_layout Subsubsection
3736 Getting \SpecialChar LyX
3737 and AAS\SpecialChar TeX
3741 \begin_layout Standard
3742 It can be a bit tricky to get \SpecialChar LyX
3743 to recognize a new layout and document class.
3744 When all else fails, do this:
3747 \begin_layout Enumerate
3748 Make certain that \SpecialChar LaTeX
3749 can find AAS\SpecialChar TeX
3751 Copy sample.tex (and perhaps table.tex) from the AAS\SpecialChar TeX
3753 directory completely unrelated to \SpecialChar LaTeX
3754 or AAS\SpecialChar TeX
3755 and run \SpecialChar LaTeX
3763 \begin_layout Enumerate
3768 appears in \SpecialChar LyX
3776 \begin_layout Enumerate
3779 Tools\SpecialChar menuseparator
3783 , then restart \SpecialChar LyX
3787 \begin_layout Enumerate
3788 Open a regular new file, not from a template.
3789 Does AAS\SpecialChar TeX
3790 appear in the class list in
3792 Document\SpecialChar menuseparator
3798 \begin_layout Standard
3799 If you get a warning from an existing AAS\SpecialChar TeX
3800 document about not being able
3801 to find the AAS\SpecialChar TeX
3802 layout or a message about
3803 \begin_inset Quotes eld
3806 You should not mix title layouts with normal ones
3807 \begin_inset Quotes erd
3810 , things haven't been installed correctly.
3813 \begin_layout Subsubsection
3815 error processing a table
3818 \begin_layout Standard
3820 , by default, attempts to center the table caption/title.
3821 This seems to produce a bad interaction in AAS\SpecialChar TeX
3822 so you should click somewhere
3823 in the caption/title, then select
3825 Edit\SpecialChar menuseparator
3827 \begin_inset space ~
3841 This took care of it for me.
3844 \begin_layout Subsubsection
3848 \begin_layout Standard
3849 A couple of things: 1) I have noticed some funny spacing in the reference
3850 entries in the text.
3851 When you enter the bibliography item data, make sure their is
3855 space between the last author and the parenthesis setting off the year;
3859 \begin_inset space \thinspace{}
3863 \begin_inset space \space{}
3877 2) Entering the references at all is not obvious.
3878 The easiest thing is to start typing your first reference at the end of
3879 the document, then mark it as type
3884 That will put a small gray box in front of what you just typed.
3885 Click on the box to fill in the rest of the information.
3886 For new references, go to the end of an existing reference and press return.
3887 That will create a new line with its own box, etc.
3890 \begin_layout Subsubsection
3894 \begin_layout Standard
3895 Even though AAS\SpecialChar TeX
3896 provides its own figure commands (
3902 , for example), I much prefer \SpecialChar LaTeX
3903 's standard figure commands (with the default
3912 \begin_inset space ~
3915 commands as \SpecialChar TeX
3916 code into a Figure Float box if you desire, but I never have
3917 much luck getting the layout right.
3918 With the standard graphics, \SpecialChar LyX
3923 usepackage{graphicx}
3925 command into the \SpecialChar LaTeX
3926 preamble and handle the figures in the standard \SpecialChar LaTeX2e
3928 interspersing the figures in the text.
3929 I believe ApJ accepts figures exactly this way now; AJ might still use
3931 \begin_inset Quotes eld
3934 stack everything at the end
3935 \begin_inset Quotes erd
3941 \begin_layout Subsubsection
3942 Things I could have done, but didn't
3945 \begin_layout Standard
3947 \begin_inset Quotes eld
3951 \begin_inset Quotes erd
3954 things I could have implemented, but chose not to.
3955 For instance, I saw no point in double-spacing the text in the \SpecialChar LyX
3957 even though it is double-spaced in the paper manuscript.
3958 Also, I chose not to make separate layouts for the preprint and preprint2
3960 Since I assume you will spend most of your time in the plain manuscript
3961 mode anyway, I decided not to chew up more disk space with this.
3965 \begin_layout Subsection
3969 \begin_layout Standard
3970 Your mileage may vary.
3971 I've now had papers published by both ApJ and AJ that have had 98% of the
3972 effort done in \SpecialChar LyX
3973 ; the last 2% was the \SpecialChar LaTeX
3974 post-processing and a few cleanups.
3975 I have had no trouble with the submission process, and I'm sure the journals
3976 were never aware that there might be a difference.
3977 So, go forth and publish!
3980 \begin_layout Section
3981 AMS \SpecialChar LaTeX
3985 \begin_layout Standard
3995 \begin_layout Standard
3996 \begin_inset VSpace bigskip
4002 \begin_layout Standard
4004 The AMS \SpecialChar LaTeX
4005 layouts are set up to conform to suggested styles for mathematical
4006 papers to be submitted to American Mathematical Society publications.
4007 The layouts are not tailored to a specific journal, but easily can be.
4008 You should refer to the AMS documentation for specific instructions for
4009 each journal (usually it will entail only changing a single line in the
4012 That documentation is available on the Web at
4013 \begin_inset Flex URL
4016 \begin_layout Plain Layout
4024 \begin_inset Flex URL
4027 \begin_layout Plain Layout
4029 ftp://ftp.ams.org/pub/tex/amslatex/
4035 These layouts are appropriate, and useful, for any mathematical writing.
4039 \begin_layout Standard
4040 There are two basic AMS \SpecialChar LaTeX
4044 \begin_layout Itemize
4045 amsart: The standard AMS article format.
4048 \begin_layout Itemize
4049 amsbook: the standard AMS book (really, monograph) format.
4053 \begin_layout Standard
4054 The layouts themselves contain only the minimum necessary to use the AMS
4056 They do not, in particular, contain any of the `theorem' environments used
4057 for setting theorems, lemmas, and the like.
4058 These are contained, instead, in the
4059 \begin_inset Flex Code
4062 \begin_layout Plain Layout
4068 module, which is loaded by default when you select one of the AMS classes.
4069 (It can also be used with other classes and can be removed, if you would
4070 rather use something else.) Less commonly used environments are in the
4071 \begin_inset Flex Code
4074 \begin_layout Plain Layout
4075 Theorems (AMS-Extended)
4080 module, which must be loaded manually.
4083 \begin_layout Standard
4084 By default, theorems and the like are numbered consecutively throughout
4085 the document, but this may be modified by loading the module
4086 \begin_inset Flex Code
4089 \begin_layout Plain Layout
4090 Theorems (Order by Section)
4095 or, if you are using
4096 \begin_inset Flex Code
4099 \begin_layout Plain Layout
4106 \begin_inset Flex Code
4109 \begin_layout Plain Layout
4110 Theorems (Order by Chapter)
4116 These will number the results as
4117 \begin_inset Formula $n.m$
4120 , where the first number refers to the section (or chapter) and the second
4121 refers to the total number of results so far in that section (or chapter).
4122 Many environments are also available unnumbered.
4123 These are indicated by an asterisk at the end.
4124 If you happen to want
4128 unnumbered results, the module
4129 \begin_inset Flex Code
4132 \begin_layout Plain Layout
4138 provides that option.
4141 \begin_layout Standard
4142 Note that these modules do not
4146 to be used with the AMS classes.
4147 It is perfectly possible to use the
4148 \begin_inset Flex Code
4151 \begin_layout Plain Layout
4157 module, and the others mentioned, with other classes, such as
4158 \begin_inset Flex Code
4161 \begin_layout Plain Layout
4168 \begin_inset Flex Code
4171 \begin_layout Plain Layout
4178 \begin_inset Flex Code
4181 \begin_layout Plain Layout
4190 \begin_layout Subsection
4191 What these layouts provide
4194 \begin_layout Standard
4195 There is a long list of included environments provided by these layouts.
4196 In AMS-\SpecialChar LaTeX
4197 , there is, in fact, an opportunity to define an unlimited variety
4198 of `theorem' environments.
4199 However, the AMS recommends the environments that are available in \SpecialChar LyX
4204 \begin_layout Standard
4205 The following environments—as well as the standard environments, such as
4207 \begin_inset Flex Noun
4210 \begin_layout Plain Layout
4217 \begin_inset Flex Noun
4220 \begin_layout Plain Layout
4227 \begin_inset Flex Noun
4230 \begin_layout Plain Layout
4237 \begin_inset Flex Noun
4240 \begin_layout Plain Layout
4247 \begin_inset Flex Noun
4250 \begin_layout Plain Layout
4257 \begin_inset Flex Code
4260 \begin_layout Plain Layout
4267 \begin_inset Flex Code
4270 \begin_layout Plain Layout
4279 \begin_layout Description
4280 Address This should be the author's permanent address.
4283 \begin_layout Description
4285 \begin_inset space ~
4288 Address This should be the author's temporary address at the time of submission,
4289 if different from the Address.
4292 \begin_layout Description
4293 Email Author's e-mail address
4296 \begin_layout Description
4297 URL Author's Web address, if desired.
4300 \begin_layout Description
4301 Keywords Key words or phrases used to identify specific topics discussed
4305 \begin_layout Description
4306 Subjectclass These refer to the AMS Subject Classifications, published and
4309 Mathematical Reviews
4312 These are also available online at the AMS cites listed above.
4315 \begin_layout Description
4319 \begin_layout Description
4323 \begin_layout Description
4327 \begin_layout Standard
4328 The following environments are provided by both the
4329 \begin_inset Flex Code
4332 \begin_layout Plain Layout
4339 \begin_inset Flex Code
4342 \begin_layout Plain Layout
4348 modules, in the latter case in both starred (unnumbered) and unstarred
4349 (numbered) versions.
4350 These same environments are provided only in the starred versions by the
4352 \begin_inset Flex Code
4355 \begin_layout Plain Layout
4364 \begin_layout Theorem
4365 This is typically used for the statements of major results.
4369 \begin_layout Corollary*
4370 This is used for statements which follow fairly directly from previous statement
4372 Again, these can be major results.
4377 These are smaller results needed to prove other statements.
4380 \begin_layout Proposition
4381 These are less major results which (hopefully) add to the general theory
4385 \begin_layout Conjecture
4386 These are statements provided without justification, which the author does
4387 not know how to prove, but which seem to be true (to the author, at least).
4390 \begin_layout Definition*
4391 Guess what this is for.
4392 The font is different for this environment than for the previous ones.
4396 \begin_layout Example*
4397 Used for examples illustrating proven results.
4400 \begin_layout Problem
4401 It's not really known what this is for.
4402 You should figure it out.
4405 \begin_layout Exercise*
4406 Write a description for this one.
4409 \begin_layout Remark
4410 This environment is also a type of theorem, usually a lesser sort of observation.
4413 \begin_layout Claim*
4414 Often used in the course of giving a proof of a larger result.
4418 Generally, these are used to break up long arguments, using specific instances
4424 The numbering scheme for cases is on its own, not together with other numbered
4430 At the end of this environment, a QED symbol (usually a square, but it can
4431 vary with different styles) is placed.
4432 If you want to have other environments within this one—for example, Case
4433 environments—and have the QED symbol appear only after them, then the other
4434 environments need to be nested within the proof environment.
4437 Nesting Environments
4443 for information on nesting.
4446 \begin_layout Standard
4447 And these environments are provided by
4448 \begin_inset Flex Code
4451 \begin_layout Plain Layout
4452 Theorems (AMS-Extended)
4460 \begin_layout Criterion*
4461 A required condition.
4464 \begin_layout Algorithm*
4465 A general procedure to be used.
4468 \begin_layout Axiom*
4469 This is a property or statement taken as true within the system being discussed.
4472 \begin_layout Condition*
4473 Sometimes used to state a condition assumed within the present context of
4478 Similar to a Remark.
4481 \begin_layout Notation*
4482 Used for the explanation of, yes, notation.
4485 \begin_layout Summary
4486 Do we really need to tell you?
4489 \begin_layout Acknowledgement*
4493 \begin_layout Conclusion*
4494 Sometimes used at the end of a long train of argument.
4498 Used in a way similar to Proposition, though perhaps lower on the scale.
4501 \begin_layout Standard
4502 In addition, the AMS classes automatically provide the AMS \SpecialChar LaTeX
4505 They need to be available on your system in order to use these environments.
4508 \begin_layout Section
4516 \begin_layout Standard
4522 \begin_layout Subsection
4526 \begin_layout Standard
4527 These are the layout files for some of the journals of the American Geophysical
4529 It is assumed that you have both the AGU's own class files and AGUplus
4530 installed (everything to be found at
4531 \begin_inset Flex URL
4534 \begin_layout Plain Layout
4536 http://publications.agu.org/files/2013/08/AGU-LaTeX.zip
4544 \begin_layout Subsection
4548 \begin_layout Standard
4558 They are still called this in the \SpecialChar LyX
4559 GUI, though their \SpecialChar LaTeX
4572 \begin_layout Standard
4573 Newly defined styles are
4610 These are mostly manuscript attributes and defined in the AGU class documentati
4614 \begin_layout Standard
4615 I suspect this is still badly incomplete.
4618 \begin_layout Subsection
4622 \begin_layout Standard
4639 \begin_layout Subsection
4643 \begin_layout Itemize
4646 Journal of Geophysical Research
4655 \begin_layout Standard
4656 Add your own, it isn't so hard! Look at the
4667 \begin_layout Subsection
4668 Bugs and things to remember
4671 \begin_layout Standard
4672 In order to use the new layouts, you must remember to do the following for
4676 \begin_layout Enumerate
4682 This can be done in the
4684 Layout\SpecialChar menuseparator
4689 Document\SpecialChar menuseparator
4693 (AGU articles are always in English, right? So
4700 \begin_layout Enumerate
4710 (Yes, this is a bug.)
4713 \begin_layout Enumerate
4714 Make sure you use the
4718 bibliography style, by entering
4722 into the second field of the Bib\SpecialChar TeX
4724 None of the standard styles will do.
4727 \begin_layout Section
4731 \begin_layout Standard
4737 \begin_layout Subsection
4741 \begin_layout Standard
4742 Broadway is for writing plays.
4743 The format is more decorative than Hollywood, and much less standardized.
4744 This format should be suitable for workshops.
4747 \begin_layout Subsection
4751 \begin_layout Standard
4752 The same as in Hollywood.
4755 \begin_layout Subsection
4759 \begin_layout Standard
4764 names as labels then cross-reference the label to insert the name.
4765 The cross-reference dialog will show the current cast of characters.
4768 \begin_layout Subsection
4769 Paper size and Margins
4772 \begin_layout Standard
4773 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
4776 \begin_layout Subsection
4780 \begin_layout Standard
4781 The following environments are available.
4782 You can use broadway.bind to get the bind keys shown at the right.
4785 \begin_layout Itemize
4789 \begin_inset Newline newline
4794 You should not have to use this, but it is here for anything that does not
4798 \begin_layout Itemize
4802 \begin_inset space \hfill{}
4806 \begin_inset Newline newline
4811 Used to describe stage setting and the action.
4812 First use of speaker names in all CAPs.
4815 \begin_layout Itemize
4819 \begin_inset space \hfill{}
4823 \begin_inset Newline newline
4828 Automatically numbered.
4829 On screen it will be arabic, but will print as Roman.
4832 \begin_layout Itemize
4836 \begin_inset space \hfill{}
4840 \begin_inset Newline newline
4850 It is just centered text.
4853 \begin_layout Itemize
4857 \begin_inset space \hfill{}
4861 \begin_inset Newline newline
4866 Not automatically numbered.
4867 You supply the number.
4868 This is because I couldn't figure out how.
4871 \begin_layout Itemize
4875 \begin_inset space \hfill{}
4879 \begin_inset Newline newline
4884 A special case of Narrative to describe the setting and action as the curtain
4888 \begin_layout Itemize
4892 \begin_inset space \hfill{}
4896 \begin_inset Newline newline
4901 The speaker's (actor's) title, centered in all CAPS.
4904 \begin_layout Itemize
4908 \begin_inset space \hfill{}
4912 \begin_inset Newline newline
4917 Instructions to the speaker.
4918 The parentheses are automatically inserted.
4919 The ( will appear on screen, but both will be in the printed play.
4920 This environment is only used within
4927 \begin_layout Itemize
4931 \begin_inset space \hfill{}
4935 \begin_inset Newline newline
4940 What the Speaker says.
4943 \begin_layout Itemize
4947 \begin_inset space \hfill{}
4951 \begin_inset Newline newline
4956 The curtain comes down.
4959 \begin_layout Itemize
4963 \begin_inset space \hfill{}
4969 \begin_layout Itemize
4973 \begin_inset space \hfill{}
4979 \begin_layout Itemize
4983 \begin_inset space \hfill{}
4989 \begin_layout Standard
4993 \begin_layout Section
4997 \begin_layout Standard
5002 can be used to type letters according to German conventions.
5003 A template file is included in
5005 .../lyx/share/templates
5007 for you to use as a starting point.
5010 \begin_layout Section
5018 \begin_layout Standard
5024 \begin_layout Subsection
5028 \begin_layout Standard
5029 This is the layout file for the European Geophysical Society journals.
5034 can be downloaded from the web site of the EGS under
5035 \begin_inset Flex URL
5038 \begin_layout Plain Layout
5048 \begin_layout Subsection
5052 \begin_layout Standard
5055 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
5063 The current layout file is unfortunately very unmodular and would benefit
5064 from using the various
5071 \begin_layout Section
5075 \begin_layout Standard
5076 See the \SpecialChar LyX
5082 It contains all infos you need.
5085 \begin_layout Section
5088 Foil\SpecialChar TeX
5092 \begin_inset CommandInset label
5101 \begin_layout Standard
5107 \begin_layout Subsection
5111 \begin_layout Standard
5112 This section describes how to use \SpecialChar LyX
5113 to make slides for overhead projectors.
5114 There are two document classes that can do this: the default slides class
5117 Foil\SpecialChar TeX
5121 This section documents the latter.
5124 \begin_layout Standard
5125 I'm going to say this again, nice and clear, so that there's no misunderstanding
5129 \begin_layout Standard
5130 \begin_inset VSpace bigskip
5136 \begin_layout Standard
5140 This section documents the class
5141 \begin_inset Quotes eld
5149 \begin_inset Quotes erd
5157 \begin_layout Standard
5158 \begin_inset VSpace bigskip
5164 \begin_layout Standard
5165 If you're looking for the documentation for
5166 \begin_inset Quotes eld
5174 \begin_inset Quotes erd
5178 \begin_inset space ~
5182 \begin_inset CommandInset ref
5184 reference "sec:slitex"
5189 If your machine doesn't have the
5197 installed, you'll probably have to use the default
5201 class, which isn't quite as good as
5206 \begin_layout Standard
5211 class is designed for use with version
5212 \begin_inset space ~
5220 class file which is now an integral part of \SpecialChar LaTeX2e
5224 \begin_layout Subsection
5228 \begin_layout Standard
5229 Obviously, to use this document class, you need to select
5240 \begin_inset space ~
5246 There are some settings in the
5249 \begin_inset space ~
5254 dialog that you should know about that are specific to this class:
5257 \begin_layout Itemize
5258 Don't change the options
5269 \begin_inset space ~
5275 They're ignored by the
5282 \begin_layout Itemize
5283 The default font size is 20
5284 \begin_inset space \thinspace{}
5287 pt with the other options being 17
5288 \begin_inset space \thinspace{}
5292 \begin_inset space \thinspace{}
5296 \begin_inset space \thinspace{}
5302 \begin_layout Itemize
5311 but all math equations are still typeset in the usual roman font.
5314 \begin_layout Itemize
5317 Foil\SpecialChar TeX
5320 supports A4 and Letter paper sizes as well as a special size for working
5322 \begin_inset space \thinspace{}
5326 It doesn't support A5, B5, legal or executive paper sizes.
5329 \begin_layout Itemize
5330 Don't bother changing the
5334 settings because they are ignored anyway.
5335 All floats appear where they are defined in the text.
5338 \begin_layout Itemize
5343 setting behaves a bit differently for this class.
5346 Foil\SpecialChar TeX
5349 provides extensive footer and header capabilities including a user-defined
5352 \begin_inset space ~
5356 \begin_inset CommandInset ref
5358 reference "sec:foilfoot"
5363 The title page is treated differently to all other pages in the document
5372 has the logo centered at the bottom of the page (if one is defined).
5373 The possible page style choices and what they do are as follows:
5377 \begin_layout Labeling
5378 \labelwidthstring MMMMMMM
5385 The final output contains no page numbers, or other headers or footers
5386 (except footnotes of course).
5390 \begin_layout Labeling
5391 \labelwidthstring MMMMMMM
5398 The final output contains page numbers centered at the bottom of the page.
5399 No other headings or footers (other than footnotes).
5402 \begin_layout Labeling
5403 \labelwidthstring MMMMMMM
5408 Page numbers in lower right corner.
5409 Additional headers and footers are also shown.
5410 This is also the default.
5413 \begin_layout Labeling
5414 \labelwidthstring MMMMMMM
5419 Gives you access to the
5423 package although its use with
5425 Foil\SpecialChar TeX
5428 is discouraged by the writer of the
5430 Foil\SpecialChar TeX
5433 package because of some potential page layout clashes.
5437 \begin_layout Subsubsection
5441 \begin_layout Standard
5442 The following options may be used in the extra class options in the
5444 Document\SpecialChar menuseparator
5450 \begin_layout Labeling
5451 \labelwidthstring MMMMMMx
5456 This sets up the page layout for 7.33
5457 \begin_inset space \thinspace{}
5461 \begin_inset space \thinspace{}
5464 in paper, which is about the same aspect ratio as a 35
5465 \begin_inset space \thinspace{}
5468 mm slide, making it a bit easier to work with this medium.
5471 \begin_layout Labeling
5472 \labelwidthstring MMMMMMx
5477 Places a rule across the page below the header on every page except the
5481 \begin_layout Labeling
5482 \labelwidthstring MMMMMMx
5487 Places a rule across the page above the footer on every page except the
5491 \begin_layout Labeling
5492 \labelwidthstring MMMMMMx
5497 This is automatically set each time you create a new
5504 Foil\SpecialChar TeX
5507 to use the dvips driver to rotate those pages that are set as landscape
5511 \begin_layout Labeling
5512 \labelwidthstring MMMMMMx
5517 Simply changes the page dimensions to those of a landscape page but doesn't
5519 Thus if you use this option you need to use an external program to rotate
5520 each page or feed your paper through your printer as landscape.
5521 Note that this option effectively reverses the roles of the
5529 environments (don't worry these are described in the next section).
5532 \begin_layout Labeling
5533 \labelwidthstring MMMMMMx
5538 Equation numbers on the left.
5541 \begin_layout Labeling
5542 \labelwidthstring MMMMMMx
5547 Flush-left equations.
5550 \begin_layout Subsection
5551 Supported Environments
5554 \begin_layout Standard
5555 Most of the environments commonly supported in other classes are also supported
5561 There are several additional environments provided by
5563 Foil\SpecialChar TeX
5566 as well as a couple added by \SpecialChar LyX
5568 The following environments are shared with other classes:
5571 \begin_layout Standard
5572 \begin_inset Flex Multiple Columns
5575 \begin_layout Itemize
5581 \begin_layout Itemize
5587 \begin_layout Itemize
5593 \begin_layout Itemize
5599 \begin_layout Itemize
5605 \begin_layout Itemize
5612 \begin_layout Itemize
5618 \begin_layout Itemize
5624 \begin_layout Itemize
5630 \begin_layout Itemize
5636 \begin_layout Itemize
5642 \begin_layout Itemize
5648 \begin_layout Itemize
5654 \begin_layout Itemize
5660 \begin_layout Itemize
5666 \begin_layout Itemize
5672 \begin_layout Itemize
5678 \begin_layout Itemize
5689 \begin_layout Standard
5690 That is, all the major environments apart from the sectioning environments.
5691 Since foils are essentially self-contained sections, with a title and body,
5694 Foil\SpecialChar TeX
5697 provides specific commands for starting new foils and these are:
5700 \begin_layout Itemize
5706 \begin_layout Itemize
5712 \begin_layout Standard
5714 also provides slightly modified versions of these two environments called:
5717 \begin_layout Itemize
5723 \begin_layout Itemize
5729 \begin_layout Standard
5730 and the differences will be explained in the next section.
5733 \begin_layout Standard
5734 Since foils are often used in presenting ideas or new theorems and such
5737 Foil\SpecialChar TeX
5740 also provides a comprehensive box of goodies for presenting them:
5743 \begin_layout Standard
5744 \begin_inset Flex Multiple Columns
5747 \begin_layout Itemize
5753 \begin_layout Itemize
5759 \begin_layout Itemize
5765 \begin_layout Itemize
5771 \begin_layout Itemize
5777 \begin_layout Itemize
5783 \begin_layout Itemize
5789 \begin_layout Itemize
5795 \begin_layout Itemize
5801 \begin_layout Itemize
5807 \begin_layout Itemize
5818 \begin_layout Standard
5819 The starred versions are unnumbered while the unstarred versions are numbered.
5820 There are also two list environments added by \SpecialChar LyX
5824 \begin_layout Itemize
5830 \begin_layout Itemize
5836 \begin_layout Standard
5839 Foil\SpecialChar TeX
5842 provides some powerful header and footer capabilities that are best set
5843 in the preamble although they may be set at any point in a document.
5844 If you want to change these settings in your document the best place to
5845 do so is at the very top of a foil, i.
5846 \begin_inset space \thinspace{}
5852 \begin_inset space \space{}
5857 straight after the foilhead.
5860 \begin_layout Standard
5861 For this purpose, the following command styles are provided [
5868 \begin_layout Standard
5869 \begin_inset Flex Multiple Columns
5872 \begin_layout Itemize
5876 \begin_inset space ~
5882 \begin_layout Itemize
5888 \begin_layout Itemize
5892 \begin_inset space ~
5898 \begin_layout Itemize
5902 \begin_inset space ~
5908 \begin_layout Itemize
5912 \begin_inset space ~
5919 \begin_layout Plain Layout
5920 \begin_inset space ~
5932 \begin_layout Standard
5933 There are also a few commands provided by
5935 Foil\SpecialChar TeX
5938 that aren't directly supported by \SpecialChar LyX
5939 but I'll tell you what they do and how
5940 to use them in section
5941 \begin_inset space ~
5945 \begin_inset CommandInset ref
5947 reference "sec:unsuppfoils"
5954 \begin_layout Subsection
5955 Building a Set of Foils
5958 \begin_layout Standard
5959 This section will give a simple introduction to using the different environments
5960 to build a set of foils.
5961 If you want to see an example set of foils, take a look at the
5965 file you find in \SpecialChar LyX
5973 \begin_layout Subsubsection
5974 Give It a Title Page
5977 \begin_layout Standard
5978 Unlike other classes that provide
5998 creates the title on a page of its own.
5999 If you leave out the
6003 environment \SpecialChar LaTeX
6004 will substitute the current date (every time you regenerate
6008 \begin_layout Subsubsection
6012 \begin_layout Standard
6013 As I mentioned earlier, there are four ways of starting a new foil.
6014 For portrait foils you should use
6023 The difference between these two environments is the amount of space between
6024 the title of the foil (the foilhead) and the body of the foil.
6027 \begin_layout Standard
6028 Landscape foils are generated using the
6037 Again the only difference is the spacing between foilhead and body.
6038 Both of the short versions have 0.5
6039 \begin_inset space ~
6042 inches less separation between the foilhead and the body.
6046 \begin_layout Standard
6047 One problem with the support for landscape foils is the requirement that
6052 driver to generate the PostScript output otherwise the foils won't be rotated.
6053 It is possible to get landscape foils even if you haven't got the
6057 driver provided you can feed your foils sideways through your printer ;-)
6060 \begin_layout Subsubsection
6061 Theorems, Lemmas, Proofs and more
6064 \begin_layout Standard
6065 Due to a small bug in \SpecialChar LyX
6066 you can't have two of the same type of these environments
6067 directly following each other.
6068 They must be separated by something.
6069 If you try, you will just be extending the previous environment as if you
6070 had merged the two environments together.
6071 So, how do you get around this problem? The simplest option is to insert
6072 some text between the two environments or add a
6077 environment between the two with just a
6078 \begin_inset Quotes eld
6086 \begin_inset Quotes erd
6090 This will force \SpecialChar LyX
6091 to produce two separate environments and hence the correct
6094 An example is provided in the example file included with the \SpecialChar LyX
6096 Remember, this problem only occurs if you are trying to place two of the
6097 same type of theorem-like environments one directly after the other.
6100 \begin_layout Subsubsection
6104 \begin_layout Standard
6105 You get all the commonly supported list styles found in other classes as
6106 well as two new ones.
6107 I'll only describe the new ones here.
6108 If you want to find out more about the other list environments check out
6114 If you intend to use itemized lists you might also want to read about the
6118 \begin_inset space ~
6122 \begin_inset space ~
6127 dialog described above in section
6128 \begin_inset space ~
6132 \begin_inset CommandInset ref
6134 reference "sec:bullet"
6141 \begin_layout Standard
6142 The two new list styles,
6150 , are designed to make it easier for you to create lists of do's and don'ts
6151 or right and wrong by providing dedicated environments that use a tick
6152 or a cross as the label of the list.
6153 These lists are in fact dedicated variants of the
6158 They do however require that you have the
6165 \begin_layout Subsubsection
6169 \begin_layout Standard
6172 Foil\SpecialChar TeX
6175 redefines the floating tables and figures so that they appear exactly where
6176 they are in the text rather than pushing them to the top of the page or
6177 to some user specified location.
6178 In fact if you change the float placement settings they are simply ignored.
6181 \begin_layout Subsubsection
6182 Page Headers and Footers
6183 \begin_inset CommandInset label
6192 \begin_layout Standard
6196 \begin_inset space ~
6205 are two commands used to control the left-footer text string.
6206 The first is meant to allow you to include a graphic logo on your foils
6208 \begin_inset Quotes eld
6213 Foil\SpecialChar TeX
6217 \begin_inset Quotes erd
6221 While the second is meant to provide a classification for the audience,
6225 \begin_inset space \thinspace{}
6231 \begin_inset space \space{}
6235 It is empty by default.
6238 \begin_layout Standard
6239 The remaining page corners can be filled by
6242 \begin_inset space ~
6247 (which defaults to page numbers),
6250 \begin_inset space ~
6258 \begin_inset space ~
6266 \begin_layout Subsection
6269 Foil\SpecialChar TeX
6273 \begin_inset CommandInset label
6275 name "sec:unsuppfoils"
6282 \begin_layout Standard
6283 All the commands mentioned below need to be set in a
6293 within another environment.
6296 \begin_layout Subsubsection
6300 \begin_layout Standard
6301 All lengths are adjusted using the
6324 should be replaced by the name given to the length you want to change and
6329 is the length value.
6330 All lengths should be specified in units of length such as inches (
6342 ) or relative to some document or font-based length such as
6352 \begin_layout Standard
6353 It's possible to change the spacing between a foilhead and the body of the
6354 foil by adjusting the length specified by
6361 For example, to make
6366 \begin_inset space \space{}
6369 in closer to their bodies put the following in the preamble:
6375 foilheadskip}{-0.5in}
6378 \begin_layout Standard
6379 The spacings around floats can be adjusted by setting these lengths:
6382 \begin_layout Labeling
6383 \labelwidthstring MMMMMMMMMMM
6390 Separation between the text and the top of the float
6393 \begin_layout Labeling
6394 \labelwidthstring MMMMMMMMMMM
6401 Separation between the float and the caption
6404 \begin_layout Labeling
6405 \labelwidthstring MMMMMMMMMMM
6412 Separation between the caption and the following text
6415 \begin_layout Labeling
6416 \labelwidthstring MMMMMMMMMMM
6423 You can make the captions narrower than the surrounding text by adjusting
6425 Best done relative to
6434 \begin_layout Standard
6435 There are also several title page related lengths that you may find useful
6436 if you have a long title or several authors:
6439 \begin_layout Labeling
6440 \labelwidthstring MMMMMMMMMMM
6447 Separation from headers to
6452 \begin_layout Labeling
6453 \labelwidthstring MMMMMMMMMMM
6471 \begin_layout Labeling
6472 \labelwidthstring MMMMMMMMMMM
6486 \begin_layout Labeling
6487 \labelwidthstring MMMMMMMMMMM
6503 \begin_layout Labeling
6504 \labelwidthstring MMMMMMMMMMM
6520 \begin_layout Standard
6521 The last length related command affects all the list environments.
6532 a list environment then all the vertical spacing between the list items
6534 Note that this is a command not a length so it doesn't require
6540 like the stuff mentioned above.
6543 \begin_layout Subsubsection
6547 \begin_layout Standard
6560 commands control whether the logo in the
6564 definition appear on a given page.
6571 in the preamble then none of the foils will have the logo on them.
6572 If you don't want the logo on a particular page place the
6578 directly after the foilhead of that page and the
6584 directly after the next foilhead.
6587 \begin_layout Standard
6588 If you decide to use the
6592 page style setting in the
6595 \begin_inset space ~
6600 dialog you should probably add
6610 to your preamble so headers and footers on landscape pages are correctly
6611 placed when rotated.
6612 This is due to some clashes between the page layouts provided by the
6623 \begin_layout Section
6624 Hollywood (Hollywood spec scripts)
6627 \begin_layout Standard
6633 \begin_layout Subsection
6637 \begin_layout Standard
6638 Getting the format of a Hollywood script right is a
6639 \begin_inset Quotes eld
6643 \begin_inset Quotes erd
6646 It is designed to make the readers focus on content and to be easy and
6647 familiar for the actors to read.
6648 Each page of a script should be one minute of film.
6649 Nothing goes in a script that you cannot see or hear on screen.
6650 The courier 12 pt font should be used throughout.
6654 \begin_layout Subsection
6658 \begin_layout Standard
6659 Speakers' lines should NEVER break in mid-sentence.
6660 If a speaker's lines continue over a page break, repeat the
6664 title followed by (Cont'd).
6667 \begin_layout Subsection
6671 \begin_layout Standard
6676 names as labels then cross-reference the label to insert the name.
6677 The cross-reference dialog will show the current cast of characters.
6678 You can use this to insert the speaker name in narratives also.
6681 \begin_layout Subsection
6682 Paper size and Margins
6685 \begin_layout Standard
6686 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
6689 \begin_layout Subsection
6693 \begin_layout Standard
6694 The following environments are available.
6695 You can use hollywood.bind to get the bind keys shown at the right.
6698 \begin_layout Itemize
6702 \begin_inset Newline newline
6707 Used where nothing else works.
6711 \begin_layout Itemize
6717 \begin_inset space \hfill{}
6725 \begin_inset Newline newline
6728 Usually followed by something like
6729 \begin_inset Quotes eld
6733 \begin_inset Quotes erd
6739 \begin_layout Itemize
6743 \begin_inset space \hfill{}
6747 \begin_inset Newline newline
6752 Introduces a new INTERIOR camera set-up.
6753 Always followed by DAY or NIGHT, or something similar to define the lighting
6755 Everthing on this line in CAPS.
6758 \begin_layout Itemize
6762 \begin_inset space \hfill{}
6766 \begin_inset Newline newline
6771 Introduces a new EXTERIOR camera set-up.
6772 Everthing on this line in CAPS.
6775 \begin_layout Itemize
6779 \begin_inset space \hfill{}
6783 \begin_inset Newline newline
6788 The character speaking.
6791 \begin_layout Itemize
6795 \begin_inset space \hfill{}
6799 \begin_inset Newline newline
6804 Instructions to the speaker.
6805 The () are automatically inserted, but only the ( will show in \SpecialChar LyX
6807 Both will be printed.
6810 \begin_layout Itemize
6814 \begin_inset space \hfill{}
6818 \begin_inset Newline newline
6830 \begin_layout Itemize
6834 \begin_inset space \hfill{}
6838 \begin_inset Newline newline
6843 Camera movement instruction.
6845 \begin_inset space \thinspace{}
6849 \begin_inset space \space{}
6855 \begin_layout Itemize
6859 \begin_inset space \hfill{}
6865 \begin_layout Itemize
6869 \begin_inset space \hfill{}
6875 \begin_layout Itemize
6879 \begin_inset space \hfill{}
6885 \begin_layout Itemize
6889 \begin_inset space \hfill{}
6895 \begin_layout Subsection
6899 \begin_layout Itemize
6903 \begin_layout Itemize
6907 \begin_layout Itemize
6909 \begin_inset space \thinspace{}
6916 \begin_layout Itemize
6921 \begin_layout Itemize
6922 PAN — camera movement
6925 \begin_layout Itemize
6926 INSERT — cut to close-up of
6929 \begin_layout Section
6933 \begin_layout Standard
6936 Panayotis Papasotiriou
6939 \begin_layout Subsection
6943 \begin_layout Standard
6944 The ijmpc package is a set of macros that facilitates electronic manuscript
6947 International Journal of Modern Physics C
6950 Similarly, the ijmpd package is for creating manuscripts to be submitted
6953 International Journal of Modern Physics D
6956 Both journals are published by World Scientific.
6957 The corresponding document classes are named
6966 These files, together with instructions for the authors, can be downloaded
6968 \begin_inset Flex URL
6971 \begin_layout Plain Layout
6973 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
6979 \begin_inset Flex URL
6982 \begin_layout Plain Layout
6984 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
6990 Both packages are modified versions of the standard
6991 \begin_inset Quotes eld
6995 \begin_inset Quotes erd
6998 package, and they are almost (but not exactly) identical.
6999 Most of their features are supported by \SpecialChar LyX
7001 I have used \SpecialChar LyX
7002 successfully to write articles submitted to both journals
7003 without any problem.
7006 \begin_layout Subsection
7010 \begin_layout Standard
7011 As usual, the easiest way to write a paper is to start with a template.
7014 File\SpecialChar menuseparator
7030 This will give an (almost) empty document that includes the most common
7031 fields found in a manuscript.
7032 Simply overwrite the existing text (including the brackets,
7037 You should keep in mind the following remarks.
7040 \begin_layout Enumerate
7042 won't let you change the font size and the page style of the document,
7043 because such modifications are not allowed by both packages.
7046 \begin_layout Enumerate
7047 The language of the document should not be changed.
7048 Before previewing your paper, be sure that the babel package is not used.
7049 To do this, click on
7051 Tools\SpecialChar menuseparator
7062 checkbox in the language settings, and click on
7070 , if you wish to make this change permanent).
7073 \begin_layout Enumerate
7075 \begin_inset Quotes eld
7079 \begin_inset Quotes erd
7082 style must be used to define keywords.
7085 \begin_layout Enumerate
7086 The ijmpc package provides a style named
7087 \begin_inset Quotes eld
7090 Classification Codes
7091 \begin_inset Quotes erd
7094 , which can be used to define classification codes, such as PACS numbers.
7095 Note that this facility is not supported by the ijmpd package.
7098 \begin_layout Enumerate
7099 Several new environments are available:
7100 \begin_inset Quotes eld
7104 \begin_inset Quotes erd
7108 \begin_inset Quotes eld
7112 \begin_inset Quotes erd
7116 \begin_inset Quotes eld
7120 \begin_inset Quotes erd
7124 \begin_inset Quotes eld
7128 \begin_inset Quotes erd
7132 \begin_inset Quotes eld
7136 \begin_inset Quotes erd
7140 \begin_inset Quotes eld
7144 \begin_inset Quotes erd
7148 \begin_inset Quotes eld
7152 \begin_inset Quotes erd
7156 \begin_inset Quotes eld
7160 \begin_inset Quotes erd
7164 \begin_inset Quotes eld
7168 \begin_inset Quotes erd
7172 \begin_inset Quotes eld
7176 \begin_inset Quotes erd
7180 \begin_inset Quotes eld
7184 \begin_inset Quotes erd
7188 \begin_inset Quotes eld
7192 \begin_inset Quotes erd
7196 \begin_inset Quotes eld
7200 \begin_inset Quotes erd
7204 \begin_inset Quotes eld
7208 \begin_inset Quotes erd
7212 Their use is more or less obvious.
7214 supports all these environments; it will use the proper label, text style,
7215 and numbering scheme for each of them.
7218 \begin_layout Enumerate
7219 Both packages use basic citations; the natbib package should not be used.
7221 , citation references are shown as usual; in the output, citations are
7222 shown as superscripts.
7223 If you want to use a citation as normal text, you should use the
7228 \begin_inset space \thinspace{}
7232 \begin_inset space \space{}
7236 \begin_inset Quotes eld
7240 \begin_inset space \space{}
7250 \begin_inset Quotes erd
7256 \begin_layout Enumerate
7258 \begin_inset Quotes eld
7262 \begin_inset Quotes erd
7265 section in both packages.
7266 To put acknowledgments, just use the
7267 \begin_inset Quotes eld
7271 \begin_inset Quotes erd
7277 \begin_layout Enumerate
7278 Appendices may be added to the paper,
7282 the Acknowledgments and
7288 provides a special environment, called
7289 \begin_inset Quotes eld
7293 \begin_inset Quotes erd
7296 which marks the beginning of the appendices.
7297 This environment should be left blank; it just sends a \SpecialChar LaTeX
7298 command, but nothing
7302 \begin_inset Quotes eld
7306 \begin_inset Quotes erd
7309 is printed with blue letters, as a signal that all sections after that
7310 point are appendices.
7311 To write an appendix, use the
7312 \begin_inset Quotes eld
7316 \begin_inset Quotes erd
7321 will number each appendix with capital letters, as required by both journals.
7323 \begin_inset Quotes eld
7327 \begin_inset Quotes erd
7334 be present before the first appendix; if not, all appendices will be numbered
7335 as normal sections in the output.
7338 \begin_layout Enumerate
7339 The ijmpc and the ijmpd packages use the
7343 command to implement table captions.
7344 As a result, a table created by \SpecialChar LyX
7345 is printed correctly, but its caption
7347 However, you can use some \SpecialChar TeX
7348 code to overcome this problem, so that captions
7349 are printed as expected.
7350 To do so, create a float table as usual, remove the caption, and replace
7351 it with the \SpecialChar TeX
7362 (sic); you must also the \SpecialChar TeX
7367 immediately after the tabular material.
7368 Study the example table included in the template files to see how this
7369 trick is implemented.
7370 Alternatively, If you need table captions, you should implement the whole
7375 file, then include this file to the \SpecialChar LyX
7378 Insert\SpecialChar menuseparator
7379 File\SpecialChar menuseparator
7381 \begin_inset space ~
7387 Details on how to create a table float can be found in the files
7395 , included in the corresponding packages.
7398 \begin_layout Subsection
7399 Preparing a paper for submission
7402 \begin_layout Standard
7403 Before you submit your paper you must export the \SpecialChar LyX
7404 document as a \SpecialChar LaTeX
7407 File\SpecialChar menuseparator
7408 Export\SpecialChar menuseparator
7416 \begin_layout Plain Layout
7417 Actually you have the choice between \SpecialChar LaTeX
7418 (plain) and pdflatex.
7419 If you intend to use pdflatex to prepare the paper, you should use the
7420 pdflatex option so that included graphics are converted to PDF format,
7421 ready for use by pdflatex.
7426 , then make the following changes to the resulting
7433 \begin_layout Enumerate
7434 Remove the comment lines before the
7443 \begin_layout Enumerate
7444 Remove everything between (and including) the
7456 commands, except for any commands you specifically put into the \SpecialChar LaTeX
7460 \begin_layout Standard
7465 file should be saved and processed through \SpecialChar LaTeX
7466 as many times as necessary.
7467 You may also want to check the resulting
7474 \begin_layout Subsection
7475 Use of \SpecialChar TeX
7479 \begin_layout Standard
7480 The use of \SpecialChar TeX
7481 code is reduced to two commands, which must be placed at the
7482 top of the document.
7483 If you started writing your paper by using the
7491 template, the \SpecialChar TeX
7492 code needed is already in its place; you usually don't need
7494 You may only modify the first \SpecialChar TeX
7495 code to specify the information printed
7496 to the top of odd and even pages (authors' names and short paper's title,
7498 This \SpecialChar TeX
7499 code must have the form
7503 markboth{Authors' Names}{Short Paper's Title}
7508 \begin_layout Section
7512 \begin_layout Standard
7518 \begin_layout Subsection
7522 \begin_layout Standard
7523 The iopart package provides a document class to create electronic manuscript
7524 submission to the journals published by the Institute of Physics.
7525 Instructions for the authors how to create a paper using the iopart class
7526 can be downloaded together with the iopart package from the site
7527 \begin_inset Flex URL
7530 \begin_layout Plain Layout
7532 ftp://ftp.iop.org/pub/journals/latex2e
7540 \begin_layout Subsection
7544 \begin_layout Standard
7545 The easiest way to write a paper is to start with the file
7549 that is available in \SpecialChar LyX
7550 's examples files folder.
7551 Open this file, save it under a new name, and start writing.
7552 The example file explains how to use the special text environments.
7553 Here are the most important advices:
7556 \begin_layout Itemize
7557 To be able to compile your document to a PDF, PS, or DVI, ensure that the
7560 Use AMS math package
7562 in the document settings under
7569 \begin_layout Itemize
7572 The title environment defines the kind of your paper.
7573 So use one of the following environments for the title:
7577 \begin_layout Itemize
7586 \begin_layout Itemize
7595 \begin_layout Itemize
7601 for a Topical review
7604 \begin_layout Itemize
7613 \begin_layout Itemize
7622 \begin_layout Itemize
7628 for a Paper (same as Title)
7631 \begin_layout Itemize
7637 for a Preliminary communication
7640 \begin_layout Itemize
7646 for a Rapid communication
7649 \begin_layout Itemize
7655 for a Letter to the editor
7659 \begin_layout Itemize
7662 All title environments except of
7666 can have an optional short title.
7669 \begin_layout Itemize
7670 There is a general title environment
7674 which is not directly supported by the \SpecialChar LyX
7676 This can be used as \SpecialChar TeX
7677 code when your document doesn't fit into one of the
7681 \begin_layout Standard
7682 For more informations like hints for special table and formula formatting,
7683 look at the IOP author guidelines.
7686 \begin_layout Section
7690 \begin_layout Standard
7693 Panayotis Papasotiriou
7696 \begin_layout Subsection
7700 \begin_layout Standard
7701 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
7702 that facilitates electronic manuscript submission to the journals they
7704 Most known of them (at least in my domain of interest) are
7706 Astrophysics and Space Science
7712 , but there are many others (see a complete list at
7713 \begin_inset Flex URL
7716 \begin_layout Plain Layout
7718 http://www.wkap.nl/jrnllist.htm/JRNLHOME
7724 The Kluwer package may be downloaded from the site
7725 \begin_inset Flex URL
7728 \begin_layout Plain Layout
7730 http://www.wkap.nl/kaphtml.htm/STYLEFILES
7736 A complete user guide is contained in that package (but it can also be
7737 downloaded separately).
7740 \begin_layout Standard
7742 supports many features of the package but not everything.
7743 However, the \SpecialChar TeX
7744 code needed is reduced to some
7745 \begin_inset Quotes eld
7749 \begin_inset Quotes erd
7752 commands of the package (see
7753 \begin_inset space ~
7757 \begin_inset CommandInset ref
7759 reference "subsec:kluwer_peculiarities"
7764 I have recently used \SpecialChar LyX
7765 to write an article submitted to the
7767 Astrophysics and Space Science
7769 without any problem.
7772 \begin_layout Subsection
7776 \begin_layout Standard
7777 The easiest way to write a paper is to start with the Kluwer template file.
7780 File\SpecialChar menuseparator
7792 This will give an (almost) empty document that includes the most common
7793 fields found in a manuscript and a short description of their use.
7794 As in most templates, simply overwrite the existing text (including the
7799 ) with the correct information.
7802 \begin_layout Subsection
7803 Preparing a paper for submission
7806 \begin_layout Standard
7807 As in the AAS\SpecialChar TeX
7808 package, before you submit your paper to a journal you must
7810 \begin_inset Quotes eld
7814 \begin_inset Quotes erd
7820 \begin_layout Enumerate
7821 Export your paper as a \SpecialChar LaTeX
7823 To do this, click on
7825 File\SpecialChar menuseparator
7826 Export\SpecialChar menuseparator
7834 \begin_layout Enumerate
7839 file with a text editor and make the following changes
7843 \begin_layout Enumerate
7844 remove the comment lines before the
7853 \begin_layout Enumerate
7854 remove everything between (and including) the
7866 commands, except for any commands you specifically put into the \SpecialChar LaTeX
7870 \begin_layout Standard
7879 \begin_layout Enumerate
7884 file through \SpecialChar LaTeX
7885 as many times as necessary (usually up to three).
7888 \begin_layout Enumerate
7894 \begin_inset space \thinspace{}
7898 \begin_inset space \space{}
7905 , and check if everything is OK (it should, if you didn't make any mistake).
7908 \begin_layout Subsection
7909 \begin_inset Quotes eld
7913 \begin_inset Quotes erd
7916 of the Kluwer package
7917 \begin_inset CommandInset label
7919 name "subsec:kluwer_peculiarities"
7926 \begin_layout Standard
7927 The Kluwer package has the following
7928 \begin_inset Quotes eld
7932 \begin_inset Quotes erd
7938 \begin_layout Enumerate
7939 It is possible to write multiple articles in the same \SpecialChar LaTeX
7944 \begin_layout Plain Layout
7945 I can't imagine any good reason to do this.
7951 Each article must be included in the environment
7952 \begin_inset Quotes eld
7956 \begin_inset Quotes erd
7960 Unfortunately, this environment cannot be omitted, even if you write just
7962 Therefore, each article starts with the command
7968 and, obviously, ends with the command
7975 Although this can be implemented in \SpecialChar LyX
7976 , I didn't included it, since it looks
7977 ugly and can confuse the novice user.
7978 Therefore, you need to enter them directly and mark them as \SpecialChar LaTeX
7981 \begin_inset Quotes eld
7986 \begin_inset Quotes erd
7992 \begin_layout Enumerate
7993 Information given at the beginning of the article (i.
7994 \begin_inset space \thinspace{}
7998 \begin_inset space \space{}
8001 title, subtitle, author, institution, running title, running author, abstract
8002 and keywords) must be included in an environment called
8003 \begin_inset Quotes eld
8007 \begin_inset Quotes erd
8011 This is not implemented in \SpecialChar LyX
8012 , so you must enter title, subtitle etc.
8013 \begin_inset space ~
8016 between two \SpecialChar TeX
8032 \begin_layout Enumerate
8033 According to the user manual, the label of each bibliography item must be
8057 \begin_layout Standard
8062 template takes care of all these
8063 \begin_inset Quotes eld
8067 \begin_inset Quotes erd
8071 If you start a new paper using this template you don't need to do anything
8076 \begin_layout Enumerate
8077 don't delete the \SpecialChar TeX
8078 code included in the template, and
8081 \begin_layout Enumerate
8082 copy the example bibliography item included in the template and modify it
8083 as necessary to enter new bibliography items.
8086 \begin_layout Section
8090 \begin_layout Standard
8096 \begin_layout Subsection
8100 \begin_layout Standard
8101 The \SpecialChar LyX
8104 article (koma-script)
8108 report (koma-script)
8126 correspond to the \SpecialChar LaTeX
8144 \begin_inset space ~
8147 of the Koma-Script family.
8148 They are replacements for the standard document classes
8164 , resp., and fit better to European typography conventions in a number of
8168 \begin_layout Itemize
8169 Standard character size is 11pt in
8171 article (koma-script)
8175 report (koma-script)
8183 letter (koma-script)
8188 \begin_layout Itemize
8189 Headings, labels of the description environment, and a number of elements
8192 letter (koma-script)
8194 document class are set in a bold sans serif font.
8198 \begin_layout Plain Layout
8199 There is a big difference between the bold sans serif old cm fonts and new
8200 ec fonts, especially in the appearance of headings.
8201 In comparison, the ec bold sans serif fonts look a bit thin.
8202 Here the \SpecialChar LaTeX
8211 helps to produce the
8212 \begin_inset Quotes eld
8216 \begin_inset Quotes erd
8219 appearance when using the ec fonts.
8224 The numbering of chapter headings is made in the same way as the numbering
8225 of section headings, that is without the extra line
8226 \begin_inset Quotes eld
8229 Chapter\SpecialChar ldots
8231 \begin_inset Quotes erd
8235 In addition, the appearance of the headings can be modified by using a
8236 number of options (in \SpecialChar LyX
8237 to be entered in the field
8240 \begin_inset space ~
8247 Layout\SpecialChar menuseparator
8254 \begin_layout Itemize
8255 The main means in the Koma-Script document classes to design the type area
8264 (in \SpecialChar LyX
8265 to be entered in the extra class options field in the dialog
8267 Document\SpecialChar menuseparator
8271 They make a clearer modification of page margins possible as do the options
8274 Document\SpecialChar menuseparator
8281 \begin_layout Itemize
8282 The \SpecialChar LaTeX
8283 document classes of the Koma-Script family define a number of additional
8285 Those part of it which makes sense in \SpecialChar LyX
8286 is implemented in corresponding
8290 \begin_layout Standard
8291 Detailed descriptions of the \SpecialChar LaTeX
8292 document classes of the Koma-Script family
8293 can be found in the Koma-Script documentation
8304 \begin_layout Subsection
8305 article (koma-script), report (koma-script), and book (koma-script)
8308 \begin_layout Standard
8309 The document classes
8311 article (koma-script)
8315 report (koma-script)
8325 are implemented in the layout files
8338 They contain all the paragraph types of the corresponding standard document
8351 , resp., partly modified, with the exception of the \SpecialChar LyX
8356 -type, which is replaced by the new
8360 -type having the same functionality.
8365 -Type there is a number of new paragraph types added.
8372 letter (koma-script)
8377 \begin_layout Itemize
8386 : are equivalents to
8394 , resp., additionally inserting an entry in the table of contents.
8403 are not contained in
8405 article (koma-script)
8410 \begin_layout Itemize
8427 , resp., additionally clearing running heads.
8434 article (koma-script)
8440 \begin_layout Plain Layout
8453 report (koma-script)
8455 , but since this is identical to
8459 , is has not been implemented in \SpecialChar LyX
8468 \begin_layout Itemize
8473 : generates a heading directly above the following paragraph in the standard
8474 character size without affecting the structure of the document.
8477 \begin_layout Itemize
8486 are special captions which respect the different space settings needed
8487 for captions placed above or below an element (if you follow strict typographic
8488 rules, you might want to place table captions always above the table).
8489 You can also use the class option
8506 You need at least Koma-Script version 2.8q to use this.
8509 \begin_layout Itemize
8514 : can be used to set a bonmot, e.
8515 \begin_inset space \thinspace{}
8519 \begin_inset space \space{}
8522 at the beginning of a chapter.
8523 If you use the optional argument (
8525 Insert\SpecialChar menuseparator
8527 \begin_inset space ~
8532 ), you can insert the dictum's author there.
8533 Dictum and author are separated by a line.
8534 You need at least Koma-Script version 2.8q to use this.
8541 article (koma-script)
8546 \begin_layout Standard
8547 The following types, together with the standard types
8559 , form the title area of the document.
8560 They must be entered ahead of the first
8561 \begin_inset Quotes eld
8565 \begin_inset Quotes erd
8572 \begin_layout Plain Layout
8573 The corresponding \SpecialChar LaTeX
8574 commands must appear before the
8585 When such a type is used more than once, the latter usage overwrites the
8586 former one, that means, for every type only the latest usage is valid.
8587 The order of the different types however has, like
8599 , no effect on the appearance of the produced document.
8602 \begin_layout Itemize
8607 : produces a centered paragraph above the ordinary title (
8619 ) for the subject of the document.
8622 \begin_layout Itemize
8627 : produces a centered paragraph below the ordinary title (
8639 ) for the publishers' name.
8642 \begin_layout Itemize
8649 report (koma-script)
8655 produces a centered paragraph on its own page behind the title page, or
8658 article (koma-script)
8660 produces a centered paragraph below the ordinary title (
8679 \begin_layout Itemize
8684 : produces a left aligned paragraph above the ordinary title (
8700 ) for a document`s head.
8703 \begin_layout Itemize
8708 : produces in a double-sided print in
8710 report (koma-script)
8716 a left-aligned paragraph at the top of the title page`s back or has no
8717 effect in a single-sided print or in
8719 article (koma-script)
8724 \begin_layout Itemize
8729 : produces in a double-sided print in
8731 report (koma-script)
8737 a left-aligned paragraph at the bottom of the title page`s back or has
8738 no effect in a single-sided print or in
8740 article (koma-script)
8745 \begin_layout Itemize
8750 : produces a special
8751 \begin_inset Quotes eld
8755 \begin_inset Quotes erd
8758 page ahead of the actual document containing a paragraph without special
8762 \begin_layout Standard
8763 The layout files for the document classes
8765 article (koma-script)
8769 report (koma-script)
8780 This is thought of as a place to define your own types.
8785 in your personal layout directory and edit the file!
8788 \begin_layout Subsection
8789 letter (koma-script)
8792 \begin_layout Standard
8796 letter (koma-script)
8798 is implemented in the layout file
8803 It contains all the paragraph types of the corresponding standard document
8808 , partly modified, with the exception of the \SpecialChar LyX
8822 type, which is replaced by the new
8827 In addition, it contains, in contrast to the standard document class, the
8846 Furthermore, there are a number of new letter specific types.
8849 \begin_layout Standard
8850 The appearance of the letter produced by this document class can be controlled
8851 by a number of \SpecialChar LaTeX
8852 commands, which you can put in the \SpecialChar LaTeX
8857 \begin_layout Plain Layout
8858 For example, the standard appearance of the letter`s heading, consisting
8859 of name and address, is quite self-willed.
8861 \begin_inset Quotes eld
8865 \begin_inset Quotes erd
8868 heading is produced by the following \SpecialChar LaTeX
8869 commands in the preamble:
8872 \begin_layout LyX-Code
8882 \begin_layout LyX-Code
8898 \begin_layout LyX-Code
8908 \begin_layout LyX-Code
8928 A detailed German description of such \SpecialChar LaTeX
8929 commands can be found in the Koma-Script
8935 With it, the letter's author can produce his personal letter layout.
8938 \begin_layout Standard
8947 define the beginning of the letter and must be used in every letter.
8948 To emphasize them in the \SpecialChar LyX
8949 document class, they are marked with the letter
8959 \begin_inset space ~
8963 It is possible to write any number of letters in one file.
8968 type produces a new letter using the same addressee and a
8972 type produces a new addressee.
8989 are ordinary paragraph types and can also be used several times in one
8990 and the same letter.
8993 \begin_layout Itemize
8998 : produces a paragraph for the addressee and implicitly defines the beginning
9002 \begin_layout Itemize
9007 : produces a paragraph for the form of address and implicitly produces a
9011 \begin_layout Itemize
9016 : produces a paragraph for a close.
9019 \begin_layout Itemize
9024 : produces a paragraph for a postscript.
9027 \begin_layout Itemize
9032 : produces a paragraph for a distribution list.
9035 \begin_layout Itemize
9040 : produces a paragraph for enclosures.
9043 \begin_layout Standard
9084 are input types provided with a label to enter information, which will
9085 be processed by the document class.
9089 \begin_layout Plain Layout
9090 It could be seen as a matter of inconsequence, that the types
9098 described above are not such input types as well.
9099 Because of the special meaning of those types, however, I have implemented
9100 them as ordinary paragraph types with a one letter mark in the left margin.
9101 Moreover, it would affect my feeling of symmetry, if the
9109 type had such a serious different appearance.
9114 The types must be used ahead of the corresponding
9121 \begin_layout Standard
9122 An implementation of these types in a WYSIWYG fashion does not seem to make
9123 sense, because the real appearance of the produced letter does not only
9124 depend on the usage of the particular type, but also on other factors.
9125 For example, a signature entered in the
9129 type will in the standard behavior appear in the produced letter only,
9130 when in the same letter also a
9135 The entered value of the
9139 type will in the standard behavior not appear in the produced letter at
9141 The possibility to design the letter`s heading freely is already indicated
9142 in a footnote above.
9145 \begin_layout Standard
9146 The input types can also be used as empty paragraphs.
9148 \begin_inset space \thinspace{}
9152 \begin_inset space \space{}
9164 type is not used at all, in the standard behavior the value of the
9168 type is used as signature, whereas if an empty
9172 type is used, no signature value is defined.
9175 \begin_layout Standard
9176 By using the input types it is possible to write a letter template, containing
9177 filled input types with your personal dates (name, address, etc.) and empty
9178 input types for other dates you want to enter.
9181 \begin_layout Itemize
9186 : sender's name, in the standard behavior appears as a centered paragraph
9187 in small caps in the letter`s heading.
9190 \begin_layout Itemize
9195 : sender's signature, in the standard behavior appears below the
9204 type is used, the value of the
9208 type appears instead.
9211 \begin_layout Itemize
9216 : sender's address, in the standard behavior appears in a centered paragraph
9217 in the letter`s heading below the sender's name.
9220 \begin_layout Itemize
9225 : sender's telephone number, in the standard behavior only sets the \SpecialChar LaTeX
9236 \begin_layout Itemize
9241 : place of the letter`s making.
9244 \begin_layout Itemize
9249 : date of the letter`s making.
9258 , in the standard behavior, produce the place and the date in a right-aligned
9259 line below the addressee's field.
9264 type is used, neither place nor date appear, independent of the value of
9274 type is used, the date of the letter `s production is used.
9277 \begin_layout Itemize
9282 : sender`s back address, in the standard behavior appears above the addressee's
9283 field in a small sans serif font.
9286 \begin_layout Itemize
9291 : special mail information, in the standard behavior appears underlined
9292 above the addressee's field below the back address.
9295 \begin_layout Itemize
9300 : additional information, in the standard behavior appears on right side
9301 below the addressee`s field.
9304 \begin_layout Itemize
9309 : the letter's title, in the standard behavior appears in a big, bold, sans
9310 serif font above the subject.
9313 \begin_layout Itemize
9318 : the letter's subject, in the standard behavior appears in a bold font
9326 \begin_layout Standard
9347 produce a business letter like line above the
9351 line containing the fields
9352 \begin_inset Quotes eld
9356 \begin_inset Quotes erd
9360 \begin_inset Quotes eld
9364 \begin_inset Quotes erd
9368 \begin_inset Quotes eld
9372 \begin_inset Quotes erd
9376 \begin_inset Quotes eld
9380 \begin_inset Quotes erd
9384 \begin_inset Quotes eld
9388 \begin_inset Quotes erd
9392 \begin_inset Quotes eld
9396 \begin_inset Quotes erd
9400 For the date field, the value of the
9406 \begin_inset Quotes eld
9409 business letter types
9410 \begin_inset Quotes erd
9413 is used, the value of the
9417 type however does not appear, but only the \SpecialChar LaTeX
9425 The ordinary output of place and date in a right-aligned line below the
9426 addressee`s field is suppressed.
9427 The types are implemented as input types provided with a label and must
9428 be used ahead of the corresponding
9435 \begin_layout Itemize
9443 \begin_layout Itemize
9451 \begin_layout Itemize
9459 \begin_layout Itemize
9467 \begin_layout Itemize
9475 \begin_layout Subsection
9476 The new letter class: letter (koma-script v.2)
9479 \begin_layout Standard
9485 \begin_layout Standard
9486 \begin_inset VSpace medskip
9492 \begin_layout Standard
9494 Koma-Script version 2.8 has introduced a new letter class
9498 which supersedes the now unsupported
9503 It has — on the \SpecialChar LaTeX
9504 side — a completely new interface and is not compatible
9506 Therefore, \SpecialChar LyX
9507 supports both, though it is recommended you use the new class.
9510 \begin_layout Standard
9511 This class covers the same functionality as
9513 letter (koma-script),
9520 (receiver's address, same as
9537 will start a new letter (i.
9538 \begin_inset space \thinspace{}
9542 \begin_inset space \space{}
9545 you can write several letters per document).
9546 New elements are sender's
9562 and the possibility to use a
9568 Insert\SpecialChar menuseparator
9574 \begin_layout Standard
9575 The biggest improvement is, though, that the letter's layout is configurable
9576 to meet almost any needs.
9577 This can be done via the preamble or with a special style file (Letter
9578 Class Option, extension
9582 ), that will be read in as a class option.
9586 \begin_layout Plain Layout
9587 The KOMA package comes with some default
9592 There is, for instance, a
9596 file that follows german typesetting rules, or a
9600 that provides the default layout of the old
9605 The latter can be loaded with the class option
9611 Layout\SpecialChar menuseparator
9612 Document\SpecialChar menuseparator
9624 template that is included in \SpecialChar LyX
9626 A detailed description is to be found in the Koma-Script documentation
9634 \begin_layout Subsection
9638 \begin_layout Standard
9639 Visualizing the Koma-Script document classes in \SpecialChar LyX
9640 , the \SpecialChar LyX
9641 internals cause some
9645 \begin_layout Itemize
9646 The chapter number of a
9650 type appears on a line of its own above the chapter heading instead of
9651 appearing in the same line ahead of it.
9652 The cause for that is the \SpecialChar LyX
9653 internal behavior for the labeltype
9660 \begin_layout Itemize
9661 The headings of the types
9670 \begin_inset Quotes eld
9674 \begin_inset Quotes erd
9678 table of contents, but not in the \SpecialChar LyX
9681 Document\SpecialChar menuseparator
9683 \begin_inset space ~
9687 \begin_inset space ~
9695 \begin_layout Itemize
9700 document class appear in a skip separation mode, not indented.
9701 This is the standard behavior, no special \SpecialChar LaTeX
9702 commands are needed for that.
9705 Document\SpecialChar menuseparator
9708 dialog the corresponding radio button indicates
9717 value always has the effect that extra \SpecialChar LaTeX
9718 commands are inserted in the document
9719 to produce the gap, which is not what is wanted in this case.
9722 \begin_layout Section
9726 \begin_layout Standard
9732 \begin_layout Subsection
9736 \begin_layout Standard
9737 Memoir is a very powerful and constantly evolving class.
9738 It has been designed with regard to fictional and non-fictional literature.
9739 Its aim is to let the user have maximum control over the typesetting of
9741 Memoir is based on the standard book class, but it can also emulate the
9742 article class (see below).
9745 \begin_layout Standard
9746 Peter Wilson, the developer of Memoir, is known as the author of lots of
9747 useful packages in the \SpecialChar LaTeX
9749 Most of them have been merged with Memoir.
9750 Therefore, it is much easier to layout the table of contents, appendices,
9751 chapter designs and such.
9753 , though, does not support all of these goodies natively.
9754 Some of them might be added to forthcoming releases
9758 \begin_layout Plain Layout
9759 You are invited to send suggestions to
9760 \begin_inset Flex URL
9763 \begin_layout Plain Layout
9765 lyx-devel@lists.lyx.org
9775 , lots will probably never be supported, due to the limitations of \SpecialChar LyX
9777 Of course you can still use all features with the help of some native \SpecialChar LaTeX
9779 commands (\SpecialChar TeX
9784 \begin_layout Plain Layout
9789 \begin_layout Plain Layout
9799 \begin_inset space ~
9803 \begin_inset CommandInset ref
9805 reference "sec:Inserting-TeX-Code"
9815 In this section, we can only list those features that are natively supported
9818 For detailed descriptions (and for the rest of features) we recommend you
9819 have a look at the detailed manual of the Memoir class
9823 \begin_layout Plain Layout
9828 \begin_layout Plain Layout
9838 \begin_inset Flex URL
9841 \begin_layout Plain Layout
9843 CTAN:/macros/latex/memoir/memman.pdf
9853 , which is not only a user guide for the class, but also both a comprehensive
9854 description on good typesetting and a superb example for good typesetting
9858 \begin_layout Subsection
9859 Basic features and restrictions
9862 \begin_layout Standard
9863 Memoir supports basically all features of the standard book classes.
9864 There are, however, some differences, as follows:
9867 \begin_layout Description
9869 \begin_inset space ~
9872 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
9875 \begin_layout Description
9877 \begin_inset space ~
9880 style: The fancy page style is not supported, due to a command clash between
9881 Memoir and the fancyhdr package (they both define a command with the same
9882 name, which confuses \SpecialChar LaTeX
9884 Instead, Memoir comes with a number of its own page styles (see
9886 Layout\SpecialChar menuseparator
9887 Document\SpecialChar menuseparator
9889 \begin_inset space ~
9895 If you want to use these for the chapter pages, you have to use the command
9902 in the main text or in preamble (e.
9903 \begin_inset space \thinspace{}
9907 \begin_inset space \space{}
9914 chapterstyle{companion}
9919 \begin_layout Description
9920 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
9921 optional argument in the standard classes.
9922 With this, you can specify an alternative version of the title for the
9923 table of contents and the headers (for instance, if the title is too long).
9925 , you can do this via
9927 Insert\SpecialChar menuseparator
9929 \begin_inset space ~
9934 at the beginning of a chapter/section.
9935 Memoir features a second optional argument and thus separates the table
9936 of contents from the header.
9937 You can define three variants of a title with this: one for the main text,
9938 one for the table of contents, and one for the headers.
9939 Simply insert two optional arguments if you need this feature, the first
9940 one containing the short title for the Table of Contents, the second one
9941 containing an alternative short title for the headers.
9944 \begin_layout Description
9945 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
9946 of contents, the list of figures and the list of table start a new page
9948 Memoir does not follow this route.
9949 You have to insert a page break yourself, if you want to have one.
9952 \begin_layout Description
9953 Titlepage: For some unknown reason, Memoir uses pagination on the title
9954 page (in the standard classes, title pages are
9955 \begin_inset Quotes eld
9959 \begin_inset Quotes erd
9963 If you want an empty title page, type
9967 aliaspagestyle{title}{empty}
9972 \begin_layout Description
9973 Article: With the class option
9979 Layout\SpecialChar menuseparator
9980 Document\SpecialChar menuseparator
9982 \begin_inset space ~
9987 ), you can emulate article style.
9988 That is, counters (footnotes, figures, tables etc.) will not be reset on
9989 new chapters, chapters don't start a new page (but are—in contrary to
9990 \begin_inset Quotes eld
9994 \begin_inset Quotes erd
9997 article classes—still allowed), parts, though, use their own page, as in
10001 \begin_layout Description
10002 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
10003 font commands, which have been used in the old \SpecialChar LaTeX
10005 \begin_inset space \thinspace{}
10009 \begin_inset space \space{}
10025 It produces an error and stops \SpecialChar LaTeX
10026 whenever such a command appears.
10031 reallows the commands and spits out warnings instead (which does at least
10032 not stop \SpecialChar LaTeX
10034 Since a lot of packages and particularly Bib\SpecialChar TeX
10035 style files are still using
10036 those commands, we have decided to use this option by default.
10039 \begin_layout Subsection
10043 \begin_layout Standard
10044 We will only describe the features supported by \SpecialChar LyX
10045 (which is not much currently).
10046 Please consult the Memoir manual
10050 \begin_layout Plain Layout
10055 \begin_layout Plain Layout
10065 \begin_inset Flex URL
10068 \begin_layout Plain Layout
10070 CTAN:/macros/latex/memoir/memman.pdf
10083 \begin_layout Description
10084 Abstract: You may wonder why an abstract is an extra feature.
10085 Well, it is in book class.
10086 Usually books don't have abstracts.
10087 Memoir, however, has.
10088 You can use it wherever and how often you like.
10091 \begin_layout Description
10092 Chapterprecis: You may know this older typesetting style: The contents of
10093 a chapter are summarized below the title and also in the table of contents
10095 \begin_inset space \thinspace{}
10099 \begin_inset space \space{}
10104 Our hero arrives in Troia; he loses some friends; he finds others
10107 Chapterprecis does exactly this.
10108 It is therefore only sensible below a chapter.
10111 \begin_layout Description
10112 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
10113 The epigraph environment provides an elegant way of typesetting such a
10115 The motto itself (text) and its author (source) are divided by a short
10117 Unfortunately, we have to fool \SpecialChar LyX
10118 a bit here again, since the environment
10119 needs two arguments (text and source).
10120 In this case, we have to use curly brackets (in \SpecialChar TeX
10121 mode) between the two
10132 <author of the slogan>.
10135 \begin_layout Description
10136 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
10137 complex figurative poems).
10139 can only support a few of them.
10140 One is poemtitle, which is a centered title for poems, which will also
10141 be added to the table of contents (verse is the standard environment for
10143 Memoir has some enhanced versions of verse, but you need to use \SpecialChar TeX
10145 because they have to be nested inside regular verse environments, which
10146 is not possible with \SpecialChar LyX
10150 \begin_layout Description
10151 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
10154 \begin_layout Section
10155 Article (mwart), book (mwbk) and report (mwrep)
10156 \begin_inset Argument status
10159 \begin_layout Plain Layout
10172 \begin_layout Standard
10178 \begin_layout Standard
10179 The \SpecialChar LyX
10196 correspond to the \SpecialChar LaTeX
10210 They are replacements for the standard document classes
10222 , resp., and fit better to Polish typography conventions in a number of points.
10226 \begin_layout Standard
10230 \begin_layout Itemize
10231 Unnumbered titles (with star, e.
10232 \begin_inset space \thinspace{}
10236 \begin_inset space \space{}
10243 ) are added into table of contents,
10246 \begin_layout Itemize
10247 Additional page styles:
10251 \begin_layout Description
10252 uheadings header with separated lines,
10255 \begin_layout Description
10256 myheadings custom header, contents headers via commands:
10271 \begin_layout Description
10272 myuheadings custom header with separated lines,
10275 \begin_layout Description
10276 outer page number is placed on outer side of page
10280 \begin_layout Itemize
10285 \begin_layout Description
10286 rmheadings serif titles — default,
10289 \begin_layout Description
10290 sfheadings sansserif titles,
10293 \begin_layout Description
10294 authortitle on title page first placed is author next title — default,
10297 \begin_layout Description
10298 titleauthor on title page first placed is title next author,
10301 \begin_layout Description
10302 withmarginpar reserve place on page for margins.
10306 \begin_layout Section
10310 \begin_layout Standard
10315 provides an alternative to the standard
10320 It provides similar functionality, but you might prefer this layout with
10321 sans serif sections, headings, and more.
10324 \begin_layout Section
10325 Rev\SpecialChar TeX
10329 \begin_layout Standard
10335 \begin_layout Standard
10336 \begin_inset VSpace bigskip
10342 \begin_layout Standard
10347 \begin_inset space ~
10352 textclass works with the American Physical Sociey's Rev\SpecialChar TeX
10354 \begin_inset Formula $\beta$
10357 release of May, 1999) class.
10360 \begin_layout Standard
10366 textclass, which works with Rev\SpecialChar TeX
10368 However, v3.1 is basically obsolete, as it works with \SpecialChar LaTeX
10370 That means that it doesn't interact very well with \SpecialChar LyX
10371 , which requires \SpecialChar LaTeX2e
10373 it has been kludged to work.
10374 Since Rev\SpecialChar TeX
10375 4.0 has been designed to work much more cleanly with \SpecialChar LaTeX2e
10380 Rev\SpecialChar TeX
10382 \begin_inset space ~
10387 textclass should also be pretty easy to use.
10390 \begin_layout Standard
10391 These documents are supposed to be used in
10395 to the Rev\SpecialChar TeX
10396 4.0 documents, so we don't describe any of the special Rev\SpecialChar TeX
10398 and assume you'll know what to put in the preamble if necessary.
10401 \begin_layout Subsection
10405 \begin_layout Standard
10406 All you need to do is install Rev\SpecialChar TeX
10407 4, as described in the package's README
10409 The package can be found at The Rev\SpecialChar TeX
10411 \begin_inset Flex URL
10414 \begin_layout Plain Layout
10416 http://publish.aps.org/revtex4/
10422 Install it somewhere that \SpecialChar LaTeX
10424 Test it by trying to \SpecialChar LaTeX
10425 a short Rev\SpecialChar TeX
10426 4 document in some random directory (i.
10427 \begin_inset space \thinspace{}
10431 \begin_inset space \space{}
10434 not the directory where you installed the class file.) Then, if you reconfigure
10436 , it will find the class file and let you use the Rev\SpecialChar TeX
10440 \begin_layout Standard
10441 Probably the easiest way to get started is either to import a Rev\SpecialChar TeX
10450 \begin_inset space ~
10455 template, found in the templates directory.
10458 \begin_layout Subsection
10462 \begin_layout Standard
10463 Optional arguments to
10470 \begin_inset Quotes eld
10474 \begin_inset Quotes erd
10478 \begin_inset Quotes eld
10482 \begin_inset Quotes erd
10488 \begin_inset space ~
10496 \begin_inset space ~
10502 Remember that in Rev\SpecialChar TeX
10503 , at least one optional argument is required!
10506 \begin_layout Standard
10507 Other preamble matter, like
10514 \begin_inset space ~
10521 \begin_inset space ~
10526 dialog, also as usual.
10529 \begin_layout Subsection
10533 \begin_layout Standard
10534 The layouts basically correspond to the commands in Rev\SpecialChar TeX
10536 For example, the Email layout corresponds to
10543 Note that (at least as of Rev\SpecialChar TeX
10552 layouts are exactly equivalent, so you shouldn't need to use both.
10556 \begin_layout Plain Layout
10557 In case you're curious, both were included so that
10561 would be able to translate both
10581 \begin_layout Subsection
10585 \begin_layout Standard
10586 There are a couple of important unique aspects of Rev\SpecialChar TeX
10587 4 which might cause
10588 bugs that will be even more confusing in \SpecialChar LyX
10592 \begin_layout Standard
10593 In Rev\SpecialChar TeX
10611 The \SpecialChar LyX
10612 equivalent is that there is a separate Thanks layout.
10617 write footnotes in the
10621 layout, or weird things may happen.
10622 See the Rev\SpecialChar TeX
10623 4 documentation for more details.
10626 \begin_layout Standard
10630 \begin_inset space ~
10638 \begin_inset space ~
10647 layouts must be placed
10655 layout and the corresponding
10672 , the \SpecialChar LaTeX
10676 \begin_layout Subsection
10680 \begin_layout Standard
10681 The main problem with this layout is that you can't use the optional arguments
10682 to layouts like Email and Title.
10683 (The problem is not unique to this layout; you can't use optional arguments
10684 to the Section layouts either.) This means that after you export that file
10685 to \SpecialChar LaTeX
10686 (which you'll need to do eventually to send it in to APS), you'll need
10687 to edit the \SpecialChar LaTeX
10688 file with a text editor to add the optional arguments to set,
10690 \begin_inset space \thinspace{}
10694 \begin_inset space \space{}
10697 the running title for the page headers.
10698 Lacking these layouts makes the
10704 (and the equivalent
10710 ) useless, so the corresponding layouts don't exist, and will have to be
10715 \begin_layout Plain Layout
10720 actually, \SpecialChar LyX
10721 1.3.0 supports some forms of optional arguments, but this layout
10722 has not been updated yet to take advantage of it.
10730 \begin_layout Section
10731 Springer Journals (
10738 \begin_layout Standard
10744 \begin_layout Subsection
10748 \begin_layout Standard
10749 These are the layout files for some of the journal formats used by Springer
10750 Verlag and listed on
10751 \begin_inset Flex URL
10754 \begin_layout Plain Layout
10756 http://www.springer.de/author/tex/help-journals.html
10761 , where you should also go to fetch the class files (yes, these are \SpecialChar LaTeX2e
10763 It is a modular system: the things common to all journals are implemented
10768 , which journal-specific layout files (such as, e.
10769 \begin_inset space \thinspace{}
10773 \begin_inset space \space{}
10780 for Journal of Geodesy) can include.
10783 \begin_layout Standard
10784 This means that implementing support for any other Springer journal on this
10785 list is as simple as writing your own
10793 file following the outline given in
10801 \begin_layout Standard
10802 It is reasonably well tested only for the Journal of Geodesy.
10811 come with the standard \SpecialChar LyX
10813 Install the relevant class file (downloaded from Springer) in a proper
10814 directory, reconfigure \SpecialChar LaTeX
10815 (in the te\SpecialChar TeX
10820 , as root if necessary — doesn't \SpecialChar LyX
10821 take care of this?), reconfigure \SpecialChar LyX
10826 \begin_layout Subsection
10830 \begin_layout Standard
10831 A large number of theorem-like styles —
10843 \begin_layout Standard
10846 Headnote, Dedication, Subtitle, Running_\SpecialChar LaTeX
10847 _Title, Author_Running, Institute,
10848 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
10851 See the Springer class file documentation for details.
10854 \begin_layout Subsection
10858 \begin_layout Itemize
10870 \begin_layout Itemize
10873 Probability Theory and Related Fields
10879 — Jean-Marc Lasgouttes
10882 \begin_layout Standard
10883 Add your own, it isn't so hard!
10886 \begin_layout Subsection
10890 \begin_layout Standard
10891 These files are partly based on the older
10895 , which was again based on a tinkered-with version of an old \SpecialChar LaTeX
10897 file from Springer.
10902 layout, are now defunct.
10903 Jean-Marc Lasgouttes helped out big in making me find my way around the
10905 layout file mechanism.
10908 \begin_layout Subsection
10912 \begin_layout Standard
10914 But probably less than in the old hacked-\SpecialChar LaTeX
10922 \begin_layout Standard
10924 \begin_inset space \thinspace{}
10927 g.: does not display the number for theorem-like layouts, just #.
10930 \begin_layout Section
10933 Sli\SpecialChar TeX
10937 \begin_inset CommandInset label
10946 \begin_layout Standard
10954 \begin_layout Subsection
10958 \begin_layout Standard
10959 This section describes how to use \SpecialChar LyX
10960 to make slides for overhead projectors.
10961 There are two document classes that can do this: the default slides class
10964 Foil\SpecialChar TeX
10968 This section documents the former.
10971 \begin_layout Standard
10972 I'm going to say this again, nice and clear, so that there's no misunderstanding
10976 \begin_layout Standard
10977 \begin_inset VSpace bigskip
10983 \begin_layout Standard
10987 This section documents the class
10988 \begin_inset Quotes eld
10996 \begin_inset Quotes erd
11004 \begin_layout Standard
11005 \begin_inset VSpace bigskip
11011 \begin_layout Standard
11012 If you're looking for the documentation for
11013 \begin_inset Quotes eld
11018 slides (Foil\SpecialChar TeX
11022 \begin_inset Quotes erd
11025 , check out section
11026 \begin_inset space ~
11030 \begin_inset CommandInset ref
11032 reference "sec:foiltex"
11042 \begin_inset Quotes eld
11047 slides (Foil\SpecialChar TeX
11051 \begin_inset Quotes erd
11054 ] is actually somewhat better than the default
11062 \begin_layout Plain Layout
11064 or so I've been told repeatedly by its advocates.
11065 Having never used it, I have no idea if this claim is true or not.
11070 which this section documents.
11073 \begin_layout Standard
11074 This class is the \SpecialChar LaTeX2e
11075 improvement of the old
11077 Sli\SpecialChar TeX
11081 Every \SpecialChar LaTeX2e
11082 distribution includes this class [which I'll just refer to as
11083 \begin_inset Quotes eld
11091 \begin_inset Quotes erd
11094 from now on], so you're bound to have it.
11095 As I noted earlier, there are other classes, such as
11099 , which also produce slides for overhead projectors and do a better job
11101 However, there are some things which
11105 can do which the others can't, such as generate overlays.
11106 Read on to learn more!
11109 \begin_layout Subsection
11111 \begin_inset CommandInset label
11113 name "sec:slidesetup"
11120 \begin_layout Standard
11121 Obviously, to use this document class, you need to select
11122 \begin_inset Quotes eld
11130 \begin_inset Quotes erd
11133 from the class list in the
11135 Document\SpecialChar menuseparator
11139 There are some other special things you should know about this class:
11142 \begin_layout Itemize
11143 Don't bother changing the options
11148 They're not supported by the
11155 \begin_layout Itemize
11159 \begin_inset space ~
11164 behaves a bit differently for this class.
11165 The possible choices and what they do are as follows:
11169 \begin_layout Description
11174 The final output contains page numbers in the lower right corner.
11177 \begin_layout Description
11186 , but also prints out any time markers you've put in.
11187 This is the default.
11190 \begin_layout Description
11195 The final output contains no page numbers, time markers, or alignment markers.
11199 \begin_layout Itemize
11204 class has an extra option:
11210 \begin_inset Quotes eld
11218 \begin_inset Quotes erd
11221 in the extra class options.
11225 \begin_layout Standard
11226 Using this options allows you to add time markers to
11232 \begin_inset space ~
11236 \begin_inset CommandInset ref
11238 reference "sec:slideNote"
11246 \begin_layout Standard
11247 You can also use the template file
11248 \begin_inset Quotes eld
11256 \begin_inset Quotes erd
11259 to automatically set up a document to use the
11265 File\SpecialChar menuseparator
11267 \begin_inset space ~
11271 \begin_inset space ~
11276 to open your new document].
11277 The template file also contains some examples of the special paragraph
11278 environments used by this class.
11279 I'll describe those next.
11282 \begin_layout Subsection
11283 Paragraph Environments
11286 \begin_layout Subsubsection
11287 Supported Environments
11290 \begin_layout Standard
11291 The first thing you'll notice when you start up a new
11295 document is the font size and type: it's the equivalent of the size
11296 \begin_inset Quotes eld
11304 \begin_inset Quotes erd
11310 \begin_inset space ~
11316 This is also what's used in the output.
11318 \begin_inset Quotes eld
11322 \begin_inset Quotes erd
11325 to remind you that this is a slide.
11326 Your final slides will use a larger font; ergo, you'll have less space.
11327 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
11330 \begin_layout Standard
11331 The next thing that becomes obvious is the changes to the paragraph environment
11332 pull-down box [at the far-left end of the toolbar].
11333 Most of the paragraph environments you're used to seeing are missing.
11334 There are also five new ones.
11339 class itself only supports certain paragraph environments:
11342 \begin_layout Itemize
11348 \begin_layout Itemize
11354 \begin_layout Itemize
11360 \begin_layout Itemize
11366 \begin_layout Itemize
11372 \begin_layout Itemize
11378 \begin_layout Itemize
11384 \begin_layout Itemize
11390 \begin_layout Itemize
11396 \begin_layout Itemize
11403 \begin_layout Itemize
11409 \begin_layout Standard
11410 All of the other standard environments, including the section-heading environmen
11411 ts, aren't used in the
11418 \begin_layout Standard
11419 On the other hand, you'll notice the following new environments:
11422 \begin_layout Itemize
11428 \begin_layout Itemize
11434 \begin_layout Itemize
11440 \begin_layout Itemize
11446 \begin_layout Itemize
11452 \begin_layout Standard
11453 These five are kind of quirky, due to a
11454 \begin_inset Quotes eld
11458 \begin_inset Quotes erd
11461 in \SpecialChar LyX
11463 You see, \SpecialChar LyX
11464 doesn't permit you to nest any other paragraph environment into
11465 an empty environment.
11466 Now, that's fine and dandy, but it means that you wouldn't be able to start
11467 a slide with anything except plain text.
11468 To deal with this, I've performed a little
11469 \begin_inset Quotes eld
11474 \begin_inset Quotes erd
11480 \begin_layout Subsubsection
11481 Quirks of the New Environments
11482 \begin_inset CommandInset label
11484 name "sec:slideQuirk"
11491 \begin_layout Standard
11492 All five of the new paragraph environments are somewhat quirky due to inherent
11493 limitiations in the current version of \SpecialChar LyX
11495 As I just mentioned, \SpecialChar LyX
11496 forbids environments that begin with another environment.
11497 To get around this, the
11501 environment isn't a paragraph environment as described in the
11509 \begin_layout Standard
11510 You should consider
11523 \begin_inset Quotes eld
11526 pseudo-environments.
11527 \begin_inset Quotes erd
11530 They look like a section heading or a
11531 \begin_inset Quotes eld
11539 \begin_inset Quotes erd
11542 but really begin a [and, if necessary, end the previous] paragraph environment.
11552 \begin_inset Quotes eld
11556 \begin_inset Quotes erd
11559 These two perform some action.
11562 \begin_layout Standard
11563 A common feature of all five environments,
11583 , is a rather long-ish label.
11584 The text following this label — ordinarily the contents of the paragraph
11585 environment — is utterly irrelevant for
11607 completely ignores it.
11608 In fact, you can leave these five environments completely empty.
11612 \begin_layout Standard
11617 to put any text after the rather long-ish label, you might want to.
11618 This could be a short description of the contents of the
11623 In that case, enter your descriptive comment and hit
11627 as you normally would.
11630 \begin_layout Standard
11631 If, on the other hand, you don't want to enter any descriptive text, you'll
11632 hit another \SpecialChar LyX
11635 , like nature, abhors a vacuum, and will not let you start a new paragraph
11636 environment until you put something in the old one.
11640 \begin_layout Itemize
11641 Start entering the text that will
11669 \begin_layout Itemize
11670 Now move to the beginning of that paragraph.
11674 \begin_layout Itemize
11683 \begin_layout Itemize
11684 Finally, change this new, empty paragraph to a
11708 \begin_layout Standard
11709 Some future version of \SpecialChar LyX
11710 will, hopefully, resolve this quirkiness\SpecialChar ldots
11714 \begin_layout Subsection
11715 Making a Presentation with
11728 \begin_layout Subsubsection
11736 \begin_layout Standard
11737 If you're expecting this section to teach you how to actually make a presentatio
11738 n, you'll be sorely disappointed.
11739 Naturally, I'll describe all of the ways the
11743 class can assist you in preparing the materials for a presentation.
11744 Filling in the contents, however, is up to you.
11749 the \SpecialChar LyX
11753 \begin_layout Standard
11758 environment [in the manner described in section
11759 \begin_inset space ~
11763 \begin_inset CommandInset ref
11765 reference "sec:slideQuirk"
11769 ] tells \SpecialChar LyX
11770 to begin a new slide [duh].
11771 The label for this environment/
11772 \begin_inset Quotes erd
11776 \begin_inset Quotes erd
11780 \begin_inset Quotes eld
11784 \begin_inset Quotes erd
11787 in cool blue, followed by the label,
11788 \begin_inset Quotes eld
11792 \begin_inset Quotes erd
11796 Any text or paragraph environments that follow this one go on the new slide.
11800 \begin_layout Standard
11801 Slides are probably the only time you'll need to forcibly end pages in \SpecialChar LyX
11803 (this can be specified in the
11808 In fact, you'll want to, once you finish entering the contents of one slide.
11809 If you've entered more text than can physically fit on a slide, the extra
11810 overflows onto a new slide.
11811 I don't recommend doing this, however, since the overflow slide won't have
11812 any page number on it.
11813 Furthermore, it may interfere with any
11817 you've made to accompany the oversized
11824 \begin_layout Standard
11833 environments work the same way as the
11838 They both create an
11839 \begin_inset Quotes eld
11843 \begin_inset Quotes erd
11846 followed by a label [
11847 \begin_inset Quotes eld
11851 \begin_inset Quotes erd
11855 \begin_inset Quotes eld
11859 \begin_inset Quotes erd
11863 The color is a stunning magenta instead of blue, and the
11864 \begin_inset Quotes eld
11868 \begin_inset Quotes erd
11871 will look different, in style and in length.
11872 The label fonts of all three also differ from one another.
11875 \begin_layout Standard
11880 , if the contents of a
11888 exceed the physical size of a slide or sheet of paper, the extra will overflow
11890 Again, you should avoid this.
11891 It defeats the whole purpose of
11902 \begin_layout Subsubsection
11912 \begin_layout Standard
11917 is a slide that sits atop another slide.
11918 Perhaps you wish to discuss a figure on the main
11922 before displaying the text associated with it.
11923 One way to accomplish this is tape a flap of dark paper over the part of
11928 you want to display later.
11929 This method fails, however, if you wish to overlap one graph with another,
11931 You would then have to fumble while speaking to align the two separate,
11936 s to align the two graphs.
11941 environment in both cases makes life much easier.
11944 \begin_layout Standard
11949 receives the page number of its
11950 \begin_inset Quotes eld
11954 \begin_inset Quotes erd
11962 \begin_inset Quotes eld
11970 \begin_inset Quotes erd
11977 \begin_layout Plain Layout
11978 Presumably, mutliple
11983 \begin_inset Quotes eld
11991 \begin_inset Quotes erd
11995 \begin_inset Quotes eld
12003 \begin_inset Quotes erd
12007 \begin_inset Quotes eld
12015 \begin_inset Quotes erd
12019 \begin_inset space ~
12022 appended to the page number of the parent
12032 Clearly, you want the contents of both the
12040 to each fit on a single physical slide! You should probably consider an
12046 \begin_inset Quotes eld
12050 \begin_inset Quotes erd
12058 Indeed, the \SpecialChar LyX
12063 class provides a visual cue for this: the label at the start of an
12067 is shorter than that at the start of a
12072 Lastly, when you generate printable output, you'll find alignment markers
12073 in all four corners of both the
12077 page and its parent
12082 These will assist you in lining up the two physical slides.
12085 \begin_layout Standard
12086 The major problem in overlaying two slides is aligning the contents of the
12087 two transparencies.
12088 How much space should you leave for that graph on the second slide? Worse
12089 still, what if you want a graph and a sentence on second slide, but there
12090 is text on the main transparency that goes in between them? You could try
12091 and insert vertical space of the right size.
12092 The better way is to use
12103 \begin_layout Standard
12104 As their names imply,
12112 are two command-like paragraph environments that make all subsequent text
12113 invisible and visible, respectively.
12115 \begin_inset space ~
12119 \begin_inset CommandInset ref
12121 reference "sec:slideQuirk"
12125 that you don't place anything
12129 these two environments, however.
12134 , it inserts a centered, sky-blue label into the page reading
12135 \begin_inset Quotes eld
12138 <Invisible Text Follows>
12139 \begin_inset Quotes erd
12143 For paragraphs following this label, the parts of the
12151 ; it doesn't matter which] where they would be contain instead blank space.
12155 \begin_layout Standard
12160 , the corresponding centered label is
12161 \begin_inset Quotes eld
12164 <Visible Text Follows>
12165 \begin_inset Quotes erd
12169 Paragraphs following this label behave normally.
12170 Note that the beginning of a new
12182 automatically shuts off an
12187 It's therefore not necessary to use
12198 \begin_layout Standard
12199 By now, it should be obvious how to create overlay transparencies using
12200 the proper combination of
12219 \begin_layout Enumerate
12224 , including everything that will appear on it, whether on the main slide
12232 \begin_layout Enumerate
12233 Before each figure or paragraph that will appear only on the
12242 If necessary, insert a
12246 environment after the
12253 \begin_layout Enumerate
12258 immediately following the
12265 \begin_layout Enumerate
12266 Copy the contents of this
12277 \begin_layout Enumerate
12282 , change all of the
12293 \begin_layout Standard
12295 You've just made an
12302 \begin_layout Standard
12303 There's one problem with the way I've designed the \SpecialChar LyX
12308 class: you can't make text in the middle of a paragraph invisible, nor
12309 make text in the middle of an invisible paragraph visible again.
12310 To accomplish this feat, you'll need to use some inlined \SpecialChar LaTeX
12315 \begin_layout Plain Layout
12316 The commands of interest are:
12319 \begin_layout Itemize
12324 invisible \SpecialChar ldots
12328 \begin_layout Itemize
12333 visible \SpecialChar ldots
12337 \begin_layout Plain Layout
12339 and need to be marked as \SpecialChar TeX
12342 \begin_inset Quotes eld
12346 \begin_inset Quotes erd
12349 you wish to change goes in between the brackets [and after the
12362 If you don't know how to mark text as \SpecialChar TeX
12363 , see the appropriate section of
12376 \begin_layout Subsubsection
12386 \begin_inset CommandInset label
12388 name "sec:slideNote"
12395 \begin_layout Standard
12404 is associated with a
12405 \begin_inset Quotes eld
12409 \begin_inset Quotes erd
12417 Here, too, the \SpecialChar LyX
12422 class provides visual cues.
12427 is shorter than that of a
12431 [yet longer than that of an
12435 ] and, like the label of an
12439 is shockingly magenta.
12440 Additionally, the printed
12444 has the page number of its
12445 \begin_inset Quotes eld
12449 \begin_inset Quotes erd
12457 \begin_inset Quotes eld
12465 \begin_inset Quotes erd
12469 \begin_inset Quotes eld
12477 \begin_inset Quotes erd
12481 \begin_inset Quotes eld
12489 \begin_inset Quotes erd
12493 You can have multiple
12497 s associated with a single
12509 , you'll probably want to break up long
12513 s so that they fit on a single sheet of paper.
12516 \begin_layout Standard
12521 is obvious: it contains anything additional you might want to say about
12527 It could also be used as a sheet of reminders for a particular
12532 In the case of the latter, you might want to make use of time markers.
12533 Currently, the \SpecialChar LyX
12539 \begin_inset Quotes eld
12543 \begin_inset Quotes erd
12546 support for time markers, a
12548 Sli\SpecialChar TeX
12552 So, you'll have to resort to using the \SpecialChar LaTeX
12556 \begin_layout Standard
12557 To use time markers, you'll need to specify the extra class option
12558 \begin_inset Quotes eld
12566 \begin_inset Quotes erd
12570 \begin_inset space ~
12574 \begin_inset CommandInset ref
12576 reference "sec:slidesetup"
12581 This option turns on timing marks, which will appear in the lower-left-hand
12587 To set what appears in the time marker, you use the \SpecialChar LaTeX
12589 \begin_inset Quotes eld
12599 \begin_inset Quotes erd
12603 \begin_inset Quotes eld
12613 \begin_inset Quotes erd
12617 The arguments of both commands are time measured in seconds.
12619 \begin_inset Quotes eld
12629 \begin_inset Quotes erd
12632 sets the time marker to a given time.
12634 \begin_inset Quotes eld
12644 \begin_inset Quotes erd
12647 increments the time marker by the specified amount.
12648 Using time markers and
12652 s in this fashion, you can remind yourself how much time to spend on a particula
12660 \begin_layout Standard
12661 There's one last feature to describe.
12662 Clearly, you'd like to print out all of your
12670 s on transparencies while printing all of your
12687 with which it is associated.
12688 What's a person to do?
12691 \begin_layout Standard
12692 Luckily, there are two \SpecialChar LaTeX
12693 commands that allow you to select what to print
12695 Both must be placed into the preamble of your document.
12697 \begin_inset Quotes eld
12709 \begin_inset Quotes erd
12712 will cause the output to contain only the
12721 Correspondingly, the command
12722 \begin_inset Quotes eld
12734 \begin_inset Quotes erd
12737 prevents the output of anything but
12742 I'd advise placing both commands in the preamble and initially comment
12744 You can then preview your entire presentation as you write.
12745 When you're done writing, you can then uncomment one of the two to select
12746 what you want to print.
12747 I like to uncomment
12748 \begin_inset Quotes eld
12760 \begin_inset Quotes erd
12763 , print to a file with
12764 \begin_inset Quotes eld
12772 \begin_inset Quotes erd
12775 in its name, comment it back out, then uncomment
12776 \begin_inset Quotes eld
12788 \begin_inset Quotes erd
12792 \begin_inset Quotes eld
12800 \begin_inset Quotes erd
12804 I can then send either file to a printer, loading transparencies or plain
12805 paper as appropriate.
12808 \begin_layout Standard
12809 You can also provide other arguments to the
12810 \begin_inset Quotes eld
12820 \begin_inset Quotes erd
12824 \begin_inset Quotes eld
12834 \begin_inset Quotes erd
12838 See a good \SpecialChar LaTeX
12842 \begin_layout Subsection
12847 Class Template File
12850 \begin_layout Standard
12851 I have also provided a template file,
12852 \begin_inset Quotes eld
12860 \begin_inset Quotes erd
12868 To use it, begin your new presentation with
12870 File\SpecialChar menuseparator
12872 \begin_inset space ~
12876 \begin_inset space ~
12882 Your new \SpecialChar LyX
12883 presentation file will contain an example
12904 additionally contain an example of the use of
12913 Lastly, the preamble will contain:
12916 \begin_layout LyX-Code
12917 % Uncomment to print out only slides and overlays
12920 \begin_layout LyX-Code
12924 \begin_layout LyX-Code
12930 \begin_inset Newline newline
12936 \begin_layout LyX-Code
12937 % Uncomment to print out only notes
12940 \begin_layout LyX-Code
12944 \begin_layout LyX-Code
12952 \begin_layout Standard
12953 One final thing: I created this class to support the \SpecialChar LaTeX2e
12955 \begin_inset Quotes eld
12960 Sli\SpecialChar TeX
12964 \begin_inset Quotes erd
12967 class, one of the built-in \SpecialChar LaTeX2e
12969 Neither I nor the rest of the \SpecialChar LyX
12970 Team endorse or oppose the use of this built-in
12972 It's here if you want it or need it.
12973 There exist other \SpecialChar LaTeX2e
12974 classes for creating presentations, such as the
12979 \begin_inset space ~
12983 \begin_inset CommandInset ref
12985 reference "sec:foiltex"
12990 \begin_inset Quotes eld
12998 \begin_inset Quotes erd
13001 package [present on some \SpecialChar TeX
13003 The latter is not yet supported under \SpecialChar LyX
13008 \begin_layout Plain Layout
13009 Perhaps you can take on the task\SpecialChar ldots
13015 I know nothing about these other classes.
13016 Try them out to see what sort of alternative they provide.
13019 \begin_layout Chapter
13021 \change_inserted 893223064 1464851900
13025 \begin_layout Standard
13027 \change_inserted 893223064 1464851910
13028 This is a holder for prepared text.
13031 \begin_layout Chapter
13035 \begin_layout Standard
13037 \change_inserted 893223064 1464851945
13038 This is a holder for prepared text.
13041 \begin_layout Section
13045 \begin_layout Standard
13046 You can do everything with \SpecialChar LyX
13047 that you can do with \SpecialChar LaTeX
13049 However, \SpecialChar LyX
13050 cannot support every \SpecialChar LaTeX
13052 But you can always use \SpecialChar TeX
13054 This chapter shows you some more special things you might want to use.
13055 For other special things you can do with figures, tables, floats, boxes
13056 and notes, have a look at the
13059 \begin_inset space ~
13067 \begin_layout Section
13068 Fancy Headers and Footers
13071 \begin_layout Standard
13072 The default page layout is rather plain; for an
13073 \begin_inset Flex Code
13076 \begin_layout Plain Layout
13082 document class, all you get is a centered page number at the bottom of
13084 This document uses KOMA-script's book class, so it appears to be a bit
13086 But to really put on a show, you need to set the document page style to
13088 \begin_inset Quotes eld
13092 \begin_inset Quotes erd
13095 , as mentioned in the
13100 This section describes the \SpecialChar LaTeX
13101 code you need to insert in your \SpecialChar LaTeX
13103 order to get the desired effects.
13106 \begin_layout Standard
13107 For more information on fancy headers, see the
13108 \begin_inset Flex Code
13111 \begin_layout Plain Layout
13117 package documentation.
13119 \begin_inset Flex URL
13122 \begin_layout Plain Layout
13124 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
13132 \begin_layout Standard
13133 The page header is divided into three fields, not surprisingly labeled
13134 \begin_inset Quotes eld
13138 \begin_inset Quotes erd
13142 \begin_inset Quotes eld
13146 \begin_inset Quotes erd
13150 \begin_inset Quotes eld
13154 \begin_inset Quotes erd
13158 The footer is also divided into these three fields.
13159 The \SpecialChar LaTeX
13160 commands to set these fields in the simplest manner are
13161 \begin_inset Flex Code
13164 \begin_layout Plain Layout
13173 \begin_inset Flex Code
13176 \begin_layout Plain Layout
13185 \begin_inset Flex Code
13188 \begin_layout Plain Layout
13197 \begin_inset Flex Code
13200 \begin_layout Plain Layout
13209 Suppose you wish to put your name in the upper left hand corner of each
13211 Simply insert the following command in the preamble:
13214 \begin_layout Standard
13223 \begin_layout Standard
13224 You will now see your name in the upper left.
13225 If a field has a default entry that you would like to get rid of (often
13226 the page number appears in the central footer) simply include a command
13227 with a blank argument, e.
13228 \begin_inset space \thinspace{}
13234 \begin_layout Standard
13242 \begin_layout Standard
13243 Let's get really fancy: lets put the section number with the word
13244 \begin_inset Quotes eld
13248 \begin_inset Quotes erd
13252 \begin_inset space \thinspace{}
13256 \begin_inset space \space{}
13259 Section 3) in the upper left, the page number (e.
13260 \begin_inset space \thinspace{}
13264 \begin_inset space \space{}
13267 Page 4) in the upper right, your name in the lower left, and the date in
13269 The following commands should now appear in the preamble:
13272 \begin_layout Standard
13282 \begin_layout Standard
13290 \begin_layout Standard
13300 \begin_layout Standard
13309 \begin_layout Standard
13317 \begin_layout Standard
13327 \begin_layout Standard
13329 \begin_inset Flex Code
13332 \begin_layout Plain Layout
13341 \begin_inset Flex Code
13344 \begin_layout Plain Layout
13352 access \SpecialChar LaTeX
13353 's section and page counters, and so print out the current section
13356 \begin_inset Flex Code
13359 \begin_layout Plain Layout
13367 simply prints out today's date.
13370 \begin_layout Standard
13371 The thicknesses of the horizontal rules drawn beneath the header and above
13372 the footer can also be modified.
13373 If you don't want one of the rules, set its thickness to 0.
13374 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
13380 \begin_inset Flex Code
13383 \begin_layout Plain Layout
13388 headrulewidth}{0.4pt}
13394 \begin_inset Flex Code
13397 \begin_layout Plain Layout
13402 footrulewidth}{0.4pt}
13407 to set the thicknesses.
13410 \begin_layout Standard
13411 You can switch the header/footer settings on and off for individual pages
13412 using commands like
13413 \begin_inset Flex Code
13416 \begin_layout Plain Layout
13419 thispagestyle{empty}
13425 \begin_inset Flex Code
13428 \begin_layout Plain Layout
13431 thispagestyle{plain}
13437 \begin_inset Flex Code
13440 \begin_layout Plain Layout
13443 thispagestyle{fancy}
13449 Simply insert them in the text on the page you want changed and mark them
13450 as \SpecialChar TeX
13452 In fact, title pages are marked as plain by default, while following pages
13453 are marked fancy when using the global fancy setting.
13456 \begin_layout Standard
13457 As a final example, it is possible to include an image in the header or
13459 Suppose you want to put a company logo in the upper lefthand corner.
13460 You might try something like
13463 \begin_layout Standard
13472 includegraphics{logo.eps}}}
13475 \begin_layout Standard
13477 (you may need to preface this with
13478 \begin_inset Flex Code
13481 \begin_layout Plain Layout
13485 usepackage{graphics}
13490 if you don't include graphics elsewhere in your document).
13493 \begin_layout Section
13494 Multiple Text Columns
13497 \begin_layout Standard
13498 This feature is independent of the option
13500 Two-column document
13502 in the document settings under
13507 If you want to have 2
13508 \begin_inset space ~
13511 columns for the whole document, it is recommended to use the
13513 Two-column document
13516 For all other cases use this feature.
13519 \begin_layout Standard
13520 To use multiple text columns in your document, you have to load the module
13527 Document\SpecialChar menuseparator
13528 Settings\SpecialChar menuseparator
13531 ) and must have the \SpecialChar LaTeX
13539 \begin_layout Standard
13540 Footnotes within multiple columns will be placed at the bottom of the page
13541 and not under each column.
13542 Within the different columns you can use everything, with the limitation
13543 that for floats you need to use the float option
13550 \begin_layout Subsection
13554 \begin_layout Standard
13555 If you want to have 2
13556 \begin_inset space ~
13559 columns in your text, insert a multicolumn inset via the menu
13561 Insert\SpecialChar menuseparator
13563 \begin_inset space ~
13566 Insets\SpecialChar menuseparator
13568 \begin_inset space ~
13573 where the columns should start.
13574 Write all text that should be printed in 2
13575 \begin_inset space ~
13578 columns into this inset.
13581 \begin_layout Standard
13582 Here is an example:
13585 \begin_layout Standard
13587 \begin_inset Flex Multiple Columns
13590 \begin_layout Plain Layout
13595 The Adventure of the Empty House
13598 \begin_inset Newline newline
13601 by Sir Arthur Conan Doyle
13604 \begin_layout Plain Layout
13607 It was in the spring of the year 1894 that all London was interested, and
13608 the fashionable world dismayed, by the murder of the Honourable Ronald
13609 Adair under most unusual and inexplicable circumstances.
13610 The public has already learned those particulars of the crime which came
13611 out in the police investigation, but a good deal was suppressed upon that
13612 occasion, since the case for the prosecution was so overwhelmingly strong
13613 that it was not necessary to bring forward all the facts.
13614 Only now, at the end of nearly ten years, am I allowed to supply those
13615 missing links which make up the whole of that remarkable chain.
13616 The crime was of interest in itself, but that interest was as nothing to
13617 me compared to the inconceivable sequel, which afforded me the greatest
13618 shock and surprise of any event in my adventurous life.
13619 Even now, after this long interval, I find myself thrilling as I think
13620 of it, and feeling once more that sudden flood of joy, amazement, and increduli
13621 ty which utterly submerged my mind.
13622 Let me say to that public, which has shown some interest in those glimpses
13623 which I have occasionally given them of the thoughts and actions of a very
13624 remarkable man, that they are not to blame me if I have not shared my knowledge
13625 with them, for I should have considered it my first duty to do so, had
13626 I not been barred by a positive prohibition from his own lips, which was
13627 only withdrawn upon the third of last month.
13635 \begin_layout Standard
13636 To get 3 or more columns, set the cursor into the multicolumn inset and
13639 Insert\SpecialChar menuseparator
13641 \begin_inset space ~
13645 \begin_inset space ~
13651 The number of the desired columns is written into that inset (for 3
13652 \begin_inset space ~
13656 \begin_inset Quotes eld
13660 \begin_inset Quotes erd
13664 \begin_inset Newline newline
13667 Here is an example with 3
13668 \begin_inset space ~
13674 \begin_layout Standard
13675 \begin_inset Flex Multiple Columns
13678 \begin_layout Plain Layout
13681 \begin_inset Argument 1
13684 \begin_layout Plain Layout
13690 It can be imagined that my close intimacy with Sherlock Holmes had interested
13691 me deeply in crime, and that after his disappearance I never failed to
13692 read with care the various problems which came before the public.
13693 And I even attempted, more than once, for my own private satisfaction,
13694 to employ his methods in their solution, though with indifferent success.
13695 There was none, however, which appealed to me like this tragedy of Ronald
13697 As I read the evidence at the inquest, which led up to a verdict of willful
13698 murder against some person or persons unknown, I realized more clearly
13699 than I had ever done the loss which the community had sustained by the
13700 death of Sherlock Holmes.
13701 There were points about this strange business which would, I was sure,
13702 have specially appealed to him, and the efforts of the police would have
13703 been supplemented, or more probably anticipated, by the trained observation
13704 and the alert mind of the first criminal agent in Europe.
13705 All day, as I drove upon my round, I turned over the case in my mind and
13706 found no explanation which appeared to me to be adequate.
13707 At the risk of telling a twice-told tale, I will recapitulate the facts
13708 as they were known to the public at the conclusion of the inquest.
13716 \begin_layout Standard
13717 You can have up to 10
13718 \begin_inset space ~
13721 columns if you want to, but that might not be very pleasant for the readers
13725 \begin_layout Standard
13726 \begin_inset Newpage newpage
13732 \begin_layout Subsection
13733 Columns inside Columns
13736 \begin_layout Standard
13737 You can also have columns inside columns:
13740 \begin_layout Standard
13741 \begin_inset Flex Multiple Columns
13744 \begin_layout Plain Layout
13747 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
13748 at that time governor of one of the Australian colonies.
13749 Adair's mother had returned from Australia to undergo the operation for
13750 cataract, and she, her son Ronald, and her daughter Hilda were living together
13754 \begin_layout Plain Layout
13755 \begin_inset Flex Multiple Columns
13758 \begin_layout Plain Layout
13761 The youth moved in the best society–had, so far as was known, no enemies
13762 and no particular vices.
13763 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
13764 had been broken off by mutual consent some months before, and there was
13765 no sign that it had left any very profound feeling behind it.
13766 For the rest {sic} the man's life moved in a narrow and conventional circle,
13767 for his habits were quiet and his nature unemotional.
13768 Yet it was upon this easy-going young aristocrat that death came, in most
13769 strange and unexpected form, between the hours of ten and eleven-twenty
13770 on the night of March 30, 1894.
13778 \begin_layout Plain Layout
13781 Ronald Adair was fond of cards–playing continually, but never for such stakes
13783 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
13784 It was shown that, after dinner on the day of his death, he had played
13785 a rubber of whist at the latter club.
13786 He had also played there in the afternoon.
13791 The evidence of those who had played with him– Mr.
13792 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
13793 and that there was a fairly equal fall of the cards.
13794 Adair might have lost five pounds, but not more.
13795 His fortune was a considerable one, and such a loss could not in any way
13797 He had played nearly every day at one club or other, but he was a cautious
13798 player, and usually rose a winner.
13799 It came out in evidence that, in partnership with Colonel Moran, he had
13800 actually won as much as four hundred and twenty pounds in a sitting, some
13801 weeks before, from Godfrey Milner and Lord Balmoral.
13802 So much for his recent history as it came out at the inquest.
13810 \begin_layout Subsection
13814 \begin_layout Standard
13815 The examples in this section show some more special features of multiple
13819 \begin_layout Standard
13820 For more features of multiple columns, have a look at the documentation
13821 of the \SpecialChar LaTeX
13827 \begin_inset CommandInset citation
13836 \begin_layout Subsubsection
13840 \begin_layout Standard
13841 To add a preface text for multiple columns, set the cursor into the multicolumn
13842 inset and use the menu
13844 Insert\SpecialChar menuseparator
13848 Write your preface text into that inset.
13849 \begin_inset Newline newline
13852 This is an example with some preface text:
13855 \begin_layout Standard
13856 \begin_inset VSpace bigskip
13862 \begin_layout Standard
13863 \begin_inset Flex Multiple Columns
13866 \begin_layout Plain Layout
13867 \begin_inset Argument 2
13870 \begin_layout Plain Layout
13871 And the story continues and continues and continues and continues\SpecialChar ldots
13879 On the evening of the crime, he returned from the club exactly at ten.
13880 His mother and sister were out spending the evening with a relation.
13881 The servant deposed that she heard him enter the front room on the second
13882 floor, generally used as his sitting-room.
13883 She had lit a fire there, and as it smoked she had opened the window.
13884 No sound was heard from the room until eleven-twenty, the hour of the return
13885 of Lady Maynooth and her daughter.
13886 Desiring to say good-night, she attempted to enter her son's room.
13887 The door was locked on the inside, and no answer could be got to their
13888 cries and knocking.
13889 Help was obtained, and the door forced.
13890 The unfortunate young man was found lying near the table.
13891 His head had been horribly mutilated by an expanding revolver bullet, but
13892 no weapon of any sort was to be found in the room.
13900 \begin_layout Standard
13901 You can also use a section heading as the preface if you use a section command
13902 as \SpecialChar TeX
13904 For example the command
13907 \begin_layout Standard
13912 subsection{subsection title}
13915 \begin_layout Standard
13916 creates a subsection.
13917 In this example the preface is a subsubsection:
13920 \begin_layout Standard
13921 \begin_inset Flex Multiple Columns
13924 \begin_layout Plain Layout
13925 \begin_inset Argument 2
13928 \begin_layout Plain Layout
13932 \begin_layout Plain Layout
13941 This is a subsubsection heading as a preface
13945 \begin_layout Plain Layout
13959 A minute examination of the circumstances served only to make the case more
13961 In the first place, no reason could be given why the young man should have
13962 fastened the door upon the inside.
13963 There was the possibility that the murderer had done this, and had afterwards
13964 escaped by the window.
13965 The drop was at least twenty feet, however, and a bed of crocuses in full
13967 Neither the flowers nor the earth showed any sign of having been disturbed,
13968 nor were there any marks upon the narrow strip of grass which separated
13969 the house from the road.
13970 Apparently, therefore, it was the young man himself who had fastened the
13972 But how did he come by his death? No one could have climbed up to the window
13973 without leaving traces.
13974 Suppose a man had fired through the window, he would indeed be a remarkable
13975 shot who could with a revolver inflict so deadly a wound.
13976 Again, Park Lane is a frequented thoroughfare; there is a cab stand within
13977 a hundred yards of the house.
13978 No one had heard a shot.
13986 \begin_layout Standard
13987 If there is less vertical space than 6
13988 \begin_inset space ~
13991 text lines is left on the page at the beginning of the multiple columns,
13992 a page break will be inserted before the multiple columns.
13993 Depending on the number of lines of the preface text, you might want to
13995 This is done by setting the cursor into the mulitcolumn inset behind the
13996 preface (if there is any) and using the menu
13998 Insert\SpecialChar menuseparator
14000 \begin_inset space ~
14004 \begin_inset space ~
14008 \begin_inset space ~
14014 Insert into that inset the amount of space like e.
14015 \begin_inset space \thinspace{}
14019 \begin_inset space \space{}
14023 \begin_inset Quotes eld
14027 \begin_inset Quotes erd
14031 \begin_inset Newline newline
14034 In this example the space is set to 7
14035 \begin_inset space ~
14038 text lines by using
14039 \begin_inset Quotes eld
14045 \begin_inset Quotes erd
14054 needs to be inserted as \SpecialChar TeX
14058 \begin_layout Standard
14059 \begin_inset Flex Multiple Columns
14062 \begin_layout Plain Layout
14063 \begin_inset Argument 3
14066 \begin_layout Plain Layout
14071 \begin_layout Plain Layout
14087 On the evening of the crime, he returned from the club exactly at ten.
14088 His mother and sister were out spending the evening with a relation.
14089 The servant deposed that she heard him enter the front room on the second
14090 floor, generally used as his sitting-room.
14091 She had lit a fire there, and as it smoked she had opened the window.
14092 No sound was heard from the room until eleven-twenty, the hour of the return
14093 of Lady Maynooth and her daughter.
14094 Desiring to say good-night, she attempted to enter her son's room.
14095 The door was locked on the inside, and no answer could be got to their
14096 cries and knocking.
14097 Help was obtained, and the door forced.
14098 The unfortunate young man was found lying near the table.
14099 His head had been horribly mutilated by an expanding revolver bullet, but
14100 no weapon of any sort was to be found in the room.
14108 \begin_layout Subsubsection
14112 \begin_layout Standard
14113 The amount of space before and after multiple columns can be changed by
14114 changing the length
14121 For example the command
14124 \begin_layout Standard
14134 \begin_layout Standard
14135 in \SpecialChar TeX
14136 Code changes its value to 3
14137 \begin_inset space \thinspace{}
14141 The change must be made before the multiple columns' start.
14142 The predefined value is 13
14143 \begin_inset space \thinspace{}
14149 \begin_layout Standard
14157 \begin_inset space \thinspace{}
14163 \begin_layout Standard
14167 \begin_layout Plain Layout
14173 multicolsep}{2.5cm}
14181 \begin_layout Standard
14182 \begin_inset Flex Multiple Columns
14185 \begin_layout Plain Layout
14188 All day I turned these facts over in my mind, endeavouring to hit upon some
14189 theory which could reconcile them all, and to find that line of least resistanc
14190 e which my poor friend had declared to be the starting-point of every investigat
14192 I confess that I made little progress.
14193 In the evening I strolled across the Park, and found myself about six o'clock
14194 at the Oxford Street end of Park Lane.
14195 A group of loafers upon the pavements, all staring up at a particular window,
14196 directed me to the house which I had come to see.
14197 A tall, thin man with coloured glasses, whom I strongly suspected of being
14198 a plain-clothes detective, was pointing out some theory of his own, while
14199 the others crowded round to listen to what he said.
14200 I got as near him as I could, but his observations seemed to me to be absurd,
14201 so I withdrew again in some disgust.
14202 As I did so I struck against an elderly, deformed man, who had been behind
14203 me, and I knocked down several books which he was carrying.
14211 \begin_layout Standard
14212 \begin_inset Note Greyedout
14215 \begin_layout Plain Layout
14220 The values you set with
14226 will be used for all following multiple columns until you change them again.
14234 \begin_layout Standard
14238 \begin_layout Plain Layout
14250 \begin_inset Note Note
14253 \begin_layout Plain Layout
14254 go back to the default
14262 \begin_layout Standard
14263 \begin_inset Newpage newpage
14269 \begin_layout Subsubsection
14273 \begin_layout Standard
14274 A column break can be forced by inserting the command
14280 as \SpecialChar TeX
14281 Code to that position in the text where the column should be broken.
14282 Note that this leads in most cases to whitespace in the text.
14283 \begin_inset Newline newline
14286 Here is an example:
14289 \begin_layout Standard
14290 \begin_inset Flex Multiple Columns
14293 \begin_layout Plain Layout
14296 \begin_inset Quotes eld
14299 You're surprised to see me, sir,
14300 \begin_inset Quotes erd
14303 said he, in a strange, croaking voice.
14306 \begin_layout Plain Layout
14309 I acknowledged that I was.
14312 \begin_layout Plain Layout
14315 \begin_inset Quotes eld
14318 Well, I've a conscience, sir, and when I chanced to see you go into this
14319 house, as I came hobbling after you, I thought to myself, I'll just step
14320 in and see that kind gentleman, and tell him that if I was a bit gruff
14321 in my manner there was not any harm meant, and that I am much obliged to
14322 him for picking up my books.
14323 \begin_inset Quotes erd
14329 \begin_layout Plain Layout
14332 \begin_inset Quotes eld
14335 You make too much of a trifle,
14336 \begin_inset Quotes erd
14341 \begin_inset Quotes eld
14344 May I ask how you knew who I was?
14345 \begin_inset Quotes erd
14348 AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED.
14352 \begin_layout Plain Layout
14364 \begin_layout Plain Layout
14367 \begin_inset Quotes eld
14370 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
14371 you'll find my little bookshop at the corner of Church Street, and very
14372 happy to see you, I am sure.
14373 Maybe you collect yourself, sir.
14377 \begin_inset space ~
14390 –a bargain, every one of them.
14391 With five volumes you could just fill that gap on that second shelf.
14392 It looks untidy, does it not, sir?
14393 \begin_inset Quotes erd
14404 \begin_layout Subsubsection
14408 \begin_layout Standard
14409 The width of the columns is automatically calculated, but you can modify
14410 the space between the columns.
14411 This is done by changing the length
14418 Its predefined value is 10
14419 \begin_inset space \thinspace{}
14423 Here is an example where
14430 \begin_inset space \thinspace{}
14436 \begin_layout Standard
14440 \begin_layout Plain Layout
14454 \begin_layout Standard
14455 \begin_inset Flex Multiple Columns
14458 \begin_layout Plain Layout
14461 My observations of No.
14462 \begin_inset space \space{}
14465 427 Park Lane did little to clear up the problem in which I was interested.
14466 The house was separated from the street by a low wall and railing, the
14467 whole not more than five feet high.
14468 It was perfectly easy, therefore, for anyone to get into the garden, but
14469 the window was entirely inaccessible, since there was no water pipe or
14470 anything which could help the most active man to climb it.
14471 More puzzled than ever, I retraced my steps to Kensington.
14472 I had not been in my study five minutes when the maid entered to say that
14473 a person desired to see me.
14474 To my astonishment it was none other than my strange old book collector,
14475 his sharp, wizened face peering out from a frame of white hair, and his
14476 precious volumes, a dozen of them at least, wedged under his right arm.
14484 \begin_layout Standard
14488 \begin_layout Plain Layout
14500 \begin_inset Note Note
14503 \begin_layout Plain Layout
14504 go back to the default
14512 \begin_layout Subsubsection
14516 \begin_layout Standard
14517 Between the columns a rule with a width of the length
14524 If this rule width is set to 0
14525 \begin_inset space \thinspace{}
14528 pt (this is the default), the rule is suppressed.
14529 In the following example the rule is 2
14530 \begin_inset space \thinspace{}
14536 \begin_layout Standard
14540 \begin_layout Plain Layout
14546 columnseprule}{2pt}
14554 \begin_layout Standard
14555 \begin_inset Flex Multiple Columns
14558 \begin_layout Plain Layout
14561 \begin_inset Quotes eld
14564 You're surprised to see me, sir,
14565 \begin_inset Quotes erd
14568 said he, in a strange, croaking voice.
14571 \begin_layout Plain Layout
14574 I acknowledged that I was.
14577 \begin_layout Plain Layout
14580 \begin_inset Quotes eld
14583 Well, I've a conscience, sir, and when I chanced to see you go into this
14584 house, as I came hobbling after you, I thought to myself, I'll just step
14585 in and see that kind gentleman, and tell him that if I was a bit gruff
14586 in my manner there was not any harm meant, and that I am much obliged to
14587 him for picking up my books.
14588 \begin_inset Quotes erd
14594 \begin_layout Plain Layout
14597 \begin_inset Quotes eld
14600 You make too much of a trifle,
14601 \begin_inset Quotes erd
14606 \begin_inset Quotes eld
14609 May I ask how you knew who I was?
14610 \begin_inset Quotes erd
14616 \begin_layout Plain Layout
14619 \begin_inset Quotes eld
14622 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
14623 you'll find my little bookshop at the corner of Church Street, and very
14624 happy to see you, I am sure.
14625 Maybe you collect yourself, sir.
14629 \begin_inset space ~
14642 –a bargain, every one of them.
14643 With five volumes you could just fill that gap on that second shelf.
14644 It looks untidy, does it not, sir?
14645 \begin_inset Quotes erd
14656 \begin_layout Standard
14657 \begin_inset VSpace defskip
14663 \begin_layout Standard
14664 The rule can be colored by redefining the command
14671 This is done by inserting the command
14672 \begin_inset Newline newline
14681 columnseprulecolor}{
14686 \begin_inset Newline newline
14689 as \SpecialChar TeX
14690 Code before the multicolumn inset.
14695 in this command by a color of your choice.
14696 You can use all pre- and self-defined colors.
14704 \begin_inset space ~
14709 for more information about pre- and self-defined colors.
14710 To go back to the default color insert the command
14711 \begin_inset Newline newline
14720 columnseprulecolor}{
14725 \begin_inset Newline newline
14728 Here is the example with a cyan rule and 1
14729 \begin_inset space \thinspace{}
14732 cm column separation:
14735 \begin_layout Standard
14739 \begin_layout Plain Layout
14748 \begin_layout Plain Layout
14754 columnseprulecolor}{
14764 \begin_layout Standard
14765 \begin_inset Flex Multiple Columns
14768 \begin_layout Plain Layout
14771 \begin_inset Quotes eld
14774 You're surprised to see me, sir,
14775 \begin_inset Quotes erd
14778 said he, in a strange, croaking voice.
14781 \begin_layout Plain Layout
14784 I acknowledged that I was.
14787 \begin_layout Plain Layout
14790 \begin_inset Quotes eld
14793 Well, I've a conscience, sir, and when I chanced to see you go into this
14794 house, as I came hobbling after you, I thought to myself, I'll just step
14795 in and see that kind gentleman, and tell him that if I was a bit gruff
14796 in my manner there was not any harm meant, and that I am much obliged to
14797 him for picking up my books.
14798 \begin_inset Quotes erd
14804 \begin_layout Plain Layout
14807 \begin_inset Quotes eld
14810 You make too much of a trifle,
14811 \begin_inset Quotes erd
14816 \begin_inset Quotes eld
14819 May I ask how you knew who I was?
14820 \begin_inset Quotes erd
14826 \begin_layout Plain Layout
14829 \begin_inset Quotes eld
14832 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
14833 you'll find my little bookshop at the corner of Church Street, and very
14834 happy to see you, I am sure.
14835 Maybe you collect yourself, sir.
14839 \begin_inset space ~
14852 –a bargain, every one of them.
14853 With five volumes you could just fill that gap on that second shelf.
14854 It looks untidy, does it not, sir?
14855 \begin_inset Quotes erd
14866 \begin_layout Standard
14870 \begin_layout Plain Layout
14876 columnseprule}{0pt}
14879 \begin_layout Plain Layout
14885 columnseprulecolor}{
14893 \begin_inset Note Note
14896 \begin_layout Plain Layout
14897 go back to the default
14905 \begin_layout Chapter
14909 \begin_layout Section
14910 Non-standard Paragraph Shapes
14913 \begin_layout Standard
14916 as well as any other text processor uses by default rectangular paragraphs.
14917 For special cases like for example posters, invitation cards or poems you
14918 can modify the paragraph shape to one of your choice.
14919 This can be done by using the \SpecialChar LaTeX
14924 which is loaded by using in the document settings the module
14926 Custom paragraph shapes
14931 \begin_layout Subsection
14935 \begin_layout Standard
14940 provides the following shapes:
14943 \begin_layout Standard
14944 \begin_inset Tabular
14945 <lyxtabular version="3" rows="13" columns="3">
14946 <features booktabs="true" islongtable="true" longtabularalignment="center">
14947 <column alignment="center" valignment="middle" width="16col%">
14948 <column alignment="center" valignment="middle" width="40col%">
14949 <column alignment="center" valignment="middle" width="35col%">
14950 <row endhead="true">
14951 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
14954 \begin_layout Plain Layout
14960 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
14963 \begin_layout Plain Layout
14969 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
14972 \begin_layout Plain Layout
14980 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
14983 \begin_layout Plain Layout
14989 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
14992 \begin_layout Plain Layout
14993 Circle with circular hole (in the size of a CD/DVD)
14998 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15001 \begin_layout Plain Layout
15002 Cannot be scaled, take care there is not too much text
15009 <cell alignment="center" valignment="top" topline="true" usebox="none">
15012 \begin_layout Plain Layout
15018 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15021 \begin_layout Plain Layout
15027 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15030 \begin_layout Plain Layout
15031 Fragile, calculation might fail
15038 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15041 \begin_layout Plain Layout
15047 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15050 \begin_layout Plain Layout
15051 Rhomboid (symbolizing a
15052 \begin_inset Quotes eld
15056 \begin_inset Quotes erd
15064 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15067 \begin_layout Plain Layout
15075 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15078 \begin_layout Plain Layout
15084 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15087 \begin_layout Plain Layout
15093 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15096 \begin_layout Plain Layout
15104 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15107 \begin_layout Plain Layout
15113 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15116 \begin_layout Plain Layout
15122 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15125 \begin_layout Plain Layout
15133 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15136 \begin_layout Plain Layout
15142 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15145 \begin_layout Plain Layout
15146 Nut for bolt (hexagon with circular hole)
15151 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15154 \begin_layout Plain Layout
15162 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15165 \begin_layout Plain Layout
15171 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15174 \begin_layout Plain Layout
15180 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15183 \begin_layout Plain Layout
15191 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
15194 \begin_layout Plain Layout
15200 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
15203 \begin_layout Plain Layout
15209 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
15212 \begin_layout Plain Layout
15220 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15223 \begin_layout Plain Layout
15229 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15232 \begin_layout Plain Layout
15238 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15241 \begin_layout Plain Layout
15249 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15252 \begin_layout Plain Layout
15258 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15261 \begin_layout Plain Layout
15262 Normal/reversed rain drop
15267 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15270 \begin_layout Plain Layout
15271 Fragile, calculation might fail
15278 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15281 \begin_layout Plain Layout
15288 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15291 \begin_layout Plain Layout
15292 The \SpecialChar TeX
15298 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15301 \begin_layout Plain Layout
15309 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
15312 \begin_layout Plain Layout
15314 \begin_inset Newline newline
15322 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
15325 \begin_layout Plain Layout
15326 Triangles in different orientations
15331 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
15334 \begin_layout Plain Layout
15348 \begin_layout Standard
15349 To use a shape for your paragraph, simply select it in \SpecialChar LyX
15351 for environments in the toolbar.
15354 \begin_layout Standard
15355 \begin_inset Newpage newpage
15361 \begin_layout Standard
15362 Here is an example paragraph in the shape of a nut:
15365 \begin_layout Standard
15366 \begin_inset VSpace bigskip
15375 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15376 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15378 At vero eos et accusam et justo duo dolores et ea rebum.
15379 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15381 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15382 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15386 \begin_layout Standard
15387 \begin_inset VSpace bigskip
15393 \begin_layout Standard
15394 \begin_inset Note Greyedout
15397 \begin_layout Plain Layout
15402 : shapepar paragraphs cannot run over a page break.
15410 \begin_layout Standard
15411 \begin_inset VSpace bigskip
15417 \begin_layout Standard
15422 takes care that the shape will always be preserved, no matter how much
15423 text is in the paragraph.
15424 Therefore the paragraph size changes with the amount of contained text.
15425 This can lead to paragraph sizes exceeding the page margins.
15426 To demonstrate the size scaling, here is the same example paragraph but
15427 with twice as much text:
15430 \begin_layout Standard
15431 \begin_inset Newpage newpage
15440 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15441 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15443 At vero eos et accusam et justo duo dolores et ea rebum.
15444 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15446 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15447 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15449 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15450 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15452 At vero eos et accusam et justo duo dolores et ea rebum.
15453 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15455 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15456 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15460 \begin_layout Standard
15461 \begin_inset VSpace bigskip
15467 \begin_layout Standard
15468 An exception is the shape
15473 It cannot be scaled because it must fit the size of a CD/DVD.
15474 Therefore the amount of text that fits into the shape is limited.
15475 \begin_inset Newline newline
15486 shape are fragile, meaning that the calculation of their size can fail,
15487 depending on the amount of text.
15488 You will then get the \SpecialChar LaTeX
15490 \begin_inset Quotes eld
15493 Arithmetic overflow
15494 \begin_inset Quotes erd
15498 In this case one can try to remove or add some text; if nothing works one
15499 has to use another shape.
15502 \begin_layout Standard
15503 \begin_inset VSpace bigskip
15509 \begin_layout Standard
15510 For shapes with tips you will maybe see that \SpecialChar LaTeX
15511 's hyphenation routine fails
15512 for text in the tips.
15513 Therefore it is often necessary to add hyphenation points
15518 arg "specialchar-insert hyphenation"
15523 ) to the corresponding text parts.
15526 \begin_layout Standard
15527 \begin_inset VSpace bigskip
15533 \begin_layout Standard
15534 Shapepar paragraphs are either always centered or placed on the page so
15535 that their left border touches the left page margin.
15536 You can therefore not use the paragraph dialog to align such paragraphs.
15537 A solution is to put the paragraph into a minipage or parbox and align
15539 The problem is hereby to find the right width for the box.
15540 Because if it is too wide and you center the box, the paragraph is not
15541 centered too because it sticks at the left side of the box.
15542 So you might have to play a bit with the width until it fits.
15543 Here are two heart-shaped paragraphs, the first one is not aligned, the
15544 second one is right-aligned:
15547 \begin_layout Standard
15548 \begin_inset Newpage newpage
15554 \begin_layout Heart
15558 Lo\SpecialChar softhyphen
15559 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15560 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15562 At vero eos et accusam et justo duo dolores et ea rebum.
15563 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15567 \begin_layout Standard
15568 \begin_inset VSpace bigskip
15574 \begin_layout Standard
15577 \begin_inset Box Frameless
15587 height_special "totalheight"
15592 backgroundcolor "none"
15595 \begin_layout Heart
15599 Lo\SpecialChar softhyphen
15600 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15601 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15603 At vero eos et accusam et justo duo dolores et ea rebum.
15604 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15613 \begin_layout Subsection
15617 \begin_layout Standard
15618 You can define any shape you want.
15619 Doing this manually is a lot of work because every coordinate must be specified.
15620 But there is a way to let the computer calculate the coordinates:
15623 \begin_layout Enumerate
15624 Install the program
15625 \begin_inset CommandInset href
15628 target "http://www.ctan.org/tex-archive/graphics/jpgfdraw"
15635 \begin_layout Enumerate
15642 TeX/LaTeX\SpecialChar menuseparator
15643 Settings\SpecialChar menuseparator
15646 and select the font size you are using in your document.
15647 For example this document uses the size 12
15648 \begin_inset space \thinspace{}
15654 \begin_layout Enumerate
15658 \begin_layout Enumerate
15661 TeX/LaTeX\SpecialChar menuseparator
15664 to export the shape to coordinates.
15665 In the appearing dialog use either the outline of your shape for the coordinate
15666 s or the path itself.
15670 \begin_layout Plain Layout
15671 For more information see
15672 \begin_inset CommandInset href
15674 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
15686 \begin_layout Standard
15687 The coordinates are written into a \SpecialChar TeX
15689 To use it for your \SpecialChar LyX
15693 \begin_layout Enumerate
15694 Place the cursor before the first character of your paragraph (or into a
15698 \begin_layout Enumerate
15699 Open in \SpecialChar LyX
15702 Insert\SpecialChar menuseparator
15703 File\SpecialChar menuseparator
15705 \begin_inset space ~
15710 , select the file and use
15719 \begin_layout Standard
15720 \begin_inset VSpace defskip
15726 \begin_layout Standard
15727 \begin_inset Note Greyedout
15730 \begin_layout Plain Layout
15735 : The changed shape only applies to the current paragraph; everything is
15736 reset to normal for the next paragraph.
15737 Therefore the shape definition file must be input into every paragraph
15738 with the desired shape.
15746 \begin_layout Standard
15747 \begin_inset VSpace bigskip
15753 \begin_layout Standard
15754 Here is an example:
15757 \begin_layout Standard
15758 \begin_inset VSpace bigskip
15764 \begin_layout Standard
15765 \begin_inset CommandInset include
15767 filename "SpecialParagraphShape.tex"
15773 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15774 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15776 At vero eos et accusam et justo duo dolores et ea rebum.
15777 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15779 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15780 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15784 \begin_layout Standard
15785 \begin_inset VSpace bigskip
15791 \begin_layout Standard
15796 to draw complexer shapes in
15800 you can draw the shape in a program of your choice and import the resulting
15806 Then you only need to draw a line or spline along the outline of the image.
15809 \begin_layout Standard
15810 \begin_inset VSpace bigskip
15816 \begin_layout Standard
15819 Custom paragraph shapes
15821 also provides the two commands
15829 which can be used to define custom shapes coordinate by coordinate.
15833 \begin_layout Plain Layout
15834 These commands are internally used for all shapes described here.
15839 For information how these styles are used and about further customization
15840 possibilities, have a look at the documentation of the package
15845 \begin_inset CommandInset citation
15854 \begin_layout Bibliography
15855 \begin_inset CommandInset bibitem
15856 LatexCommand bibitem
15861 Documentation of the \SpecialChar LaTeX
15863 \begin_inset CommandInset href
15866 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
15873 \begin_layout Bibliography
15874 \begin_inset CommandInset bibitem
15875 LatexCommand bibitem
15880 Documentation of the \SpecialChar LaTeX
15882 \begin_inset CommandInset href
15885 target "http://mirrors.ctan.org/macros/latex/contrib/shapepar/shapepar.pdf"
15892 \begin_layout Chapter
15893 Bibliographic databases
15896 \begin_layout Section
15897 Customizing Bibliographies with Bib\SpecialChar TeX
15901 \begin_layout Standard
15902 The most basic information about how to use Bib\SpecialChar TeX
15903 with \SpecialChar LyX
15904 is contained in the
15907 Bibliography databases (Bib\SpecialChar TeX
15915 The following subsections explain special bibliography features supported
15916 by \SpecialChar LyX
15920 \begin_layout Subsection
15921 Alternative Citation Styles
15924 \begin_layout Standard
15925 Standard Bib\SpecialChar TeX
15927 \begin_inset space \thinspace{}
15931 \begin_inset space \space{}
15935 \begin_inset Quotes eld
15939 \begin_inset Quotes erd
15942 ) to refer to a cited work.
15943 However, in many scientific disciplines, other citation styles are in use.
15944 The most common one is the author-year style (e.
15945 \begin_inset space \thinspace{}
15949 \begin_inset space \space{}
15953 \begin_inset Quotes eld
15957 \begin_inset Quotes erd
15962 supports two packages that provide this style,
15963 \begin_inset Flex Code
15966 \begin_layout Plain Layout
15973 \begin_inset Flex Code
15976 \begin_layout Plain Layout
15983 Both packages have their pros and cons, which cannot be listed in detail.
15984 If you only want to have simple author-year (or author-numerical) style,
15985 or if you want to use one of the countless style files for
15986 \begin_inset Flex Code
15989 \begin_layout Plain Layout
15995 , then the established
15996 \begin_inset Flex Code
15999 \begin_layout Plain Layout
16005 package is probably your choice.
16006 If you need special features like short title references, ibidem etc., you
16008 \begin_inset Flex Code
16011 \begin_layout Plain Layout
16020 \begin_layout Standard
16021 The handling of both packages in \SpecialChar LyX
16022 is basically the same.
16024 \begin_inset Flex Noun
16027 \begin_layout Plain Layout
16028 Document\SpecialChar menuseparator
16035 \begin_inset Flex Noun
16038 \begin_layout Plain Layout
16045 \begin_inset Flex Noun
16048 \begin_layout Plain Layout
16055 \begin_inset Flex Noun
16058 \begin_layout Plain Layout
16065 With both packages, you will get some extra features in the citation dialog
16066 and you can select the style of the reference (
16067 \begin_inset Quotes eld
16071 \begin_inset Quotes erd
16075 \begin_inset Quotes eld
16079 \begin_inset Quotes erd
16083 \begin_inset Quotes eld
16087 \begin_inset Quotes erd
16091 \begin_inset Quotes eld
16095 \begin_inset Quotes erd
16099 Note that both packages need specifically designed style files.
16100 They both ship their own, but there are lots of additional style files,
16101 and there is even an interactive style file builder
16105 \begin_layout Plain Layout
16107 \begin_inset Flex URL
16110 \begin_layout Plain Layout
16112 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
16123 \begin_inset Flex Code
16126 \begin_layout Plain Layout
16135 \begin_layout Subsection
16136 Sectioned Bibliographies
16139 \begin_layout Standard
16140 Sometimes you might need to divide your bibliography into several sections.
16141 If you are for instance a historian, the possibility to separate sources
16142 and scientific works is most likely a
16143 \begin_inset Quotes eld
16147 \begin_inset Quotes erd
16151 Unfortunately, Bib\SpecialChar TeX
16152 itself does not allow you to do this.
16153 But with the help of some \SpecialChar LaTeX
16154 packages, Bib\SpecialChar TeX
16155 can be extended to fit your needs.
16158 \begin_layout Standard
16160 provides native support for one of these packages,
16168 \begin_layout Plain Layout
16170 \begin_inset Flex URL
16173 \begin_layout Plain Layout
16175 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
16185 The advantage of this package (compared to other packages like
16189 ) is that you don't need to define new citation commands.
16190 Instead, you need to prepare different bibliographic databases which include
16191 the entries for the different sections of the bibliography.
16192 For example: If you want to divide your bibliography into the sections
16194 \begin_inset Quotes eld
16198 \begin_inset Quotes erd
16202 \begin_inset Quotes eld
16206 \begin_inset Quotes erd
16209 , you first need to create two bibliographic databases, e.
16210 \begin_inset space \thinspace{}
16214 \begin_inset space \space{}
16218 \begin_inset Flex Code
16221 \begin_layout Plain Layout
16228 \begin_inset Flex Code
16231 \begin_layout Plain Layout
16241 \begin_layout Standard
16243 \begin_inset Flex Noun
16246 \begin_layout Plain Layout
16247 Document\SpecialChar menuseparator
16254 \begin_inset Flex Noun
16257 \begin_layout Plain Layout
16264 \begin_inset Flex Noun
16267 \begin_layout Plain Layout
16268 Sectioned bibliography
16274 Now you can insert multiple Bib\SpecialChar TeX
16275 bibliographies, one for each section of
16277 Returning to our example: Insert the Bib\SpecialChar TeX
16279 \begin_inset Flex Code
16282 \begin_layout Plain Layout
16288 and a second one for the database
16289 \begin_inset Flex Code
16292 \begin_layout Plain Layout
16299 You are free to use the same or different styles for each section.
16300 Additionally, you can choose if the bibliography section should contain
16302 \begin_inset Quotes eld
16305 all cited references
16306 \begin_inset Quotes erd
16309 of the specified database(s) (which is the default),
16310 \begin_inset Quotes eld
16313 all uncited references
16314 \begin_inset Quotes erd
16318 \begin_inset Quotes eld
16322 \begin_inset Quotes erd
16326 This might be useful if you would like to separate your bibliography into
16328 \begin_inset Quotes eld
16332 \begin_inset Quotes erd
16336 \begin_inset Quotes eld
16340 \begin_inset Quotes erd
16344 \begin_inset Quotes eld
16348 \begin_inset Quotes erd
16352 The titles for the sections can be added as ordinary sections or subsections.
16354 \begin_inset Flex Code
16357 \begin_layout Plain Layout
16363 removes the bibliography title, you have to manually re-add that, too (as
16364 a chapter* or section*, for instance).
16367 \begin_layout Subsection
16368 Multiple Bibliographies
16371 \begin_layout Standard
16372 Multiple bibliographies, e.
16373 \begin_inset space \thinspace{}
16377 \begin_inset space \space{}
16380 a bibliography for each section or chapter of the document, are not supported
16381 by Bib\SpecialChar TeX
16384 \begin_inset Flex Code
16387 \begin_layout Plain Layout
16393 package, which is used for the creation of sectioned bibliographies in
16395 (see the previous section), provides an easy way to solve this task, if
16396 you are willing to use some
16397 \begin_inset Flex Noun
16400 \begin_layout Plain Layout
16408 \begin_inset space ~
16412 \begin_inset CommandInset ref
16414 reference "sec:Inserting-TeX-Code"
16422 \begin_layout Plain Layout
16423 An alternative approach is to use the
16424 \begin_inset Flex Code
16427 \begin_layout Plain Layout
16434 \begin_inset Flex Code
16437 \begin_layout Plain Layout
16443 package, respectively.
16451 \begin_layout Standard
16453 \begin_inset Flex Noun
16456 \begin_layout Plain Layout
16457 Document\SpecialChar menuseparator
16464 \begin_inset Flex Noun
16467 \begin_layout Plain Layout
16474 \begin_inset Flex Noun
16477 \begin_layout Plain Layout
16478 Sectioned bibliography
16484 In the document, you have to enclose the sections, which shall contain
16485 their own bibliography (including the Bib\SpecialChar TeX
16486 bibliography itself), between
16488 \begin_inset Flex Code
16491 \begin_layout Plain Layout
16500 \begin_inset Flex Code
16503 \begin_layout Plain Layout
16511 (those commands have to be inserted as \SpecialChar TeX
16513 The bibliography will contain all references that have been cited in the
16515 \begin_inset Flex Code
16518 \begin_layout Plain Layout
16529 If you are using this approach, then every citation reference has to be
16531 \begin_inset Flex Code
16534 \begin_layout Plain Layout
16542 \begin_inset Flex Code
16545 \begin_layout Plain Layout
16551 s cannot be nested.
16554 \begin_layout Chapter
16555 Multipart Documents
16558 \begin_layout Section
16562 \begin_layout Standard
16563 When you are working on a large file with many sections, it is often convenient
16564 to break up the document into several files, or perhaps you have something
16565 where a table may change from time to time, but the preceding text does
16567 In these cases, you should seriously consider using multipart documents.
16568 For example, scientific papers often have five major sections: the introduction
16569 , observations, results, discussion, and conclusion.
16570 Each of these could be its own separate \SpecialChar LyX
16572 \begin_inset Quotes eld
16576 \begin_inset Quotes erd
16579 file which contains the title, authors, abstract, references, etc., plus
16580 the five included files.
16581 It is important to note that each of these files is a full \SpecialChar LyX
16583 can be formatted and printed on its own, as well as included in a master
16585 Each of these files must have the same document class, however—don't attempt
16586 to mix book classes with article classes.
16587 You may also include \SpecialChar LaTeX
16588 files; however, these files must not have their own
16590 \begin_inset space \thinspace{}
16594 \begin_inset space \space{}
16597 everything up to and including the
16598 \begin_inset Flex Code
16601 \begin_layout Plain Layout
16609 line as well as the
16610 \begin_inset Flex Code
16613 \begin_layout Plain Layout
16621 line must be deleted) or else errors will be generated when you try to
16625 \begin_layout Standard
16627 allows you to include files quite easily with
16628 \begin_inset Flex Noun
16631 \begin_layout Plain Layout
16632 Insert\SpecialChar menuseparator
16634 \begin_inset space ~
16643 When you click on this selection a small box is inserted into the file
16644 at the current cursor location.
16645 Clicking on the box raises a dialog which allows you to select the file
16646 to be included, and the method of its inclusion.
16650 \begin_layout Standard
16651 The file selection box should by now be obvious.
16652 The three inclusion methods are
16653 \begin_inset Quotes eld
16657 \begin_inset Quotes erd
16661 \begin_inset Quotes eld
16665 \begin_inset Quotes erd
16669 \begin_inset Quotes eld
16673 \begin_inset Quotes erd
16677 The difference between
16678 \begin_inset Quotes eld
16682 \begin_inset Quotes erd
16686 \begin_inset Quotes eld
16690 \begin_inset Quotes erd
16693 is really only meaningful to \SpecialChar LaTeX
16694 perts, but the practical difference is that
16696 \begin_inset Quotes eld
16700 \begin_inset Quotes erd
16703 are typeset beginning on a new page, while files that are
16704 \begin_inset Quotes eld
16708 \begin_inset Quotes erd
16711 are typeset starting on the current page.
16714 \begin_layout Standard
16715 Generally, the master file is converted into a full \SpecialChar LaTeX
16716 file before typesetting,
16717 while the included files are converted to \SpecialChar LaTeX
16718 files that do not have all the
16719 preamble information.
16722 \begin_layout Standard
16724 \begin_inset Quotes eld
16728 \begin_inset Quotes erd
16731 included file allows you to include a file typeset exactly as it appears
16733 \begin_inset space \thinspace{}
16737 \begin_inset space \space{}
16741 \begin_inset Flex Code
16744 \begin_layout Plain Layout
16750 mode, with the characters set in a fixed-width typewriter font.
16751 Normally, spaces in this file are invisible, though two consecutive spaces
16752 are conserved, unlike \SpecialChar LyX
16753 's normal treatment of spaces.
16754 However, setting the
16755 \begin_inset Flex Noun
16758 \begin_layout Plain Layout
16760 \begin_inset space ~
16764 \begin_inset space ~
16768 \begin_inset space ~
16776 checkbox typesets a mark to unambiguously define the presence of a space.
16780 \begin_layout Section
16781 Cross-References Between Files
16784 \begin_layout Standard
16785 \begin_inset Box Shadowbox
16795 height_special "totalheight"
16800 backgroundcolor "none"
16803 \begin_layout Plain Layout
16804 This section is somewhat out of date.
16805 Need to describe default master documents and how children are opened when
16815 \begin_layout Standard
16816 It is possible to set up cross-references between the different files.
16817 First, open all the files in question: let's call them A and B in a two
16818 file example, where B is included in A.
16819 Let's say you insert a label in A, then want to reference it in B.
16820 Open the cross-reference dialog whilst in document B, and you can select
16822 \begin_inset Quotes eld
16826 \begin_inset Quotes erd
16832 \begin_layout Section
16833 Bibliography Lists in all Subdocuments
16836 \begin_layout Standard
16837 \begin_inset Box Frameless
16847 height_special "totalheight"
16852 backgroundcolor "none"
16855 \begin_layout Plain Layout
16856 This section also needs updating.
16857 There is now material about this on the wiki, and it could be copied here.
16865 \begin_layout Standard
16866 Copy the bibliography list with all entries to all subdocuments and transform
16868 This way \SpecialChar LyX
16870 \begin_inset Flex Code
16873 \begin_layout Plain Layout
16879 -files and you can easily insert references without making the bibliography
16883 \begin_layout Standard
16884 As the bibliography list is in a comment, \SpecialChar LaTeX
16885 won't use it and the references
16886 will look like this: [?], instead of like this: [1].
16887 One solution is to use the \SpecialChar LaTeX
16889 \begin_inset Flex Code
16892 \begin_layout Plain Layout
16898 that will only include comments by processing the files separately.
16899 To do this, add in the \SpecialChar LaTeX
16900 preamble of every subdocument the following:
16903 \begin_layout LyX-Code
16906 usepackage{comment}
16909 \begin_layout LyX-Code
16912 includecomment{comment}
16915 \begin_layout Standard
16917 \begin_inset Flex URL
16920 \begin_layout Plain Layout
16922 http://wiki.lyx.org/FAQ/Unsorted#toc31
16930 \begin_layout Section
16931 Itemize Bullet Selection
16932 \begin_inset CommandInset label
16941 \begin_layout Standard
16947 \begin_layout Subsection
16951 \begin_layout Standard
16953 provides 216 bullet shapes that can be accessed from a simple dialog.
16954 Using this dialog you can easily specify what bullet shape to use at each
16955 level of an itemized list.
16956 These settings are document-wide so you won't be able to specify different
16957 sets of bullets for different paragraphs.
16961 \begin_layout Plain Layout
16962 Well, actually you can but you'll have to do it by hand.
16970 \begin_layout Subsection
16974 \begin_layout Standard
16975 Open the dialog by selecting the
16976 \begin_inset Flex Noun
16979 \begin_layout Plain Layout
16980 Document\SpecialChar menuseparator
16986 menu item and then select the
16987 \begin_inset Flex Noun
16990 \begin_layout Plain Layout
16999 \begin_layout Standard
17000 The dialog provides you with a table of bullet shapes.
17001 A column of buttons on the left of the table provides access to the six
17002 different panels of bullet shapes.
17003 The row of buttons across the top is used to select which bullet depth
17005 A text entry under the table shows the currently selected bullet shape's
17007 equivalent and this can be edited if desired.
17008 If you do modify the text you will also need to specify any needed packages
17009 in the \SpecialChar LaTeX
17013 \begin_layout Standard
17014 The six panels are divided up by the packages they require.
17015 The following table shows the mappings from button name to \SpecialChar LaTeX
17017 \begin_inset Separator latexpar
17023 \begin_layout Standard
17025 \begin_inset Tabular
17026 <lyxtabular version="3" rows="7" columns="2">
17027 <features tabularvalignment="middle">
17028 <column alignment="center" valignment="top" width="0pt">
17029 <column alignment="center" valignment="top" width="0pt">
17031 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
17034 \begin_layout Plain Layout
17049 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
17052 \begin_layout Plain Layout
17069 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
17072 \begin_layout Plain Layout
17087 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
17090 \begin_layout Plain Layout
17099 base \SpecialChar LaTeX
17107 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
17110 \begin_layout Plain Layout
17125 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
17128 \begin_layout Plain Layout
17145 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
17148 \begin_layout Plain Layout
17163 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
17166 \begin_layout Plain Layout
17183 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
17186 \begin_layout Plain Layout
17201 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
17204 \begin_layout Plain Layout
17221 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
17224 \begin_layout Plain Layout
17239 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
17242 \begin_layout Plain Layout
17259 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
17262 \begin_layout Plain Layout
17277 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
17280 \begin_layout Plain Layout
17303 \begin_layout Standard
17305 doesn't stop you using bullets from packages you don't have.
17306 If you get errors from \SpecialChar LaTeX
17307 when you try to view or print the file, then it
17308 is likely you are missing a package.
17312 \begin_layout Plain Layout
17314 doesn't restrict your use since you may be editing locally and exporting
17323 \begin_layout Subsection
17327 \begin_layout Standard
17328 Select which bullet depth you want to change then select the bullet shape
17330 Any changes will not be visible in \SpecialChar LyX
17331 , but are visible when viewing the document.
17334 \begin_layout Standard
17335 You can reset a bullet shape to the default simply by clicking your right
17336 mouse button on the appropriate bullet depth button.
17340 \begin_layout Plain Layout
17345 want to have multiple sets of paragraphs with different sets of bullets
17346 in each, then you're going to have to get your hands dirty with \SpecialChar TeX
17348 The bullet selection dialog can help though because it provides you with
17349 the \SpecialChar LaTeX
17350 code for a wide range of bullet shapes.
17351 To make your own custom paragraphs you have the following options:
17354 \begin_layout Plain Layout
17358 \begin_layout Plain Layout
17374 \begin_layout Plain Layout
17378 \begin_layout Plain Layout
17400 \begin_layout Itemize
17401 Use the \SpecialChar LaTeX
17403 \begin_inset Flex Code
17406 \begin_layout Plain Layout
17414 to specify a new bullet shape for a given depth.
17415 You'll also need to save the current bullet shape so you can restore it
17417 In this itemized list the following \SpecialChar LaTeX
17418 code was used to change the bullet
17419 used for the first depth.
17420 \begin_inset Separator latexpar
17427 \begin_layout LyX-Code
17437 \begin_layout LyX-Code
17454 \begin_layout Itemize
17455 Note that the itemize depth is specified in Roman numerals as part of the
17465 \begin_layout Itemize
17469 \begin_layout Plain Layout
17482 Specify each individual entry by starting each item with the bullet shape
17483 enclosed in square brackets and set as
17484 \begin_inset Flex Noun
17487 \begin_layout Plain Layout
17495 For example, this item was started with
17496 \begin_inset Flex Code
17499 \begin_layout Plain Layout
17514 \begin_layout Plain Layout
17518 \begin_layout Plain Layout
17534 \begin_layout Plain Layout
17535 You'll also need to revert the labelitem back to its previous setting for
17536 the global bullet shape settings to remain in effect.
17537 The way used here was:
17540 \begin_layout LyX-Code
17555 \begin_layout Chapter
17557 Features needing Extra Software
17560 \begin_layout Section
17561 Checking \SpecialChar TeX
17565 \begin_layout Standard
17571 \begin_layout Subsection
17575 \begin_layout Standard
17584 \begin_layout Plain Layout
17589 is not yet available when you are using the \SpecialChar LaTeX
17590 distribution MiK\SpecialChar TeX
17596 , you'll find in the
17603 \begin_inset space ~
17614 \begin_inset Newline newline
17618 \begin_inset CommandInset href
17620 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17627 \begin_layout Standard
17630 Chk\SpecialChar TeX
17633 package is a program that was written by
17634 \begin_inset Flex Noun
17637 \begin_layout Plain Layout
17639 \begin_inset space ~
17647 in frustration because some constructs in \SpecialChar LaTeX
17648 are sometimes non-intuitive,
17649 and easy to forget.
17650 The program runs over your \SpecialChar LaTeX
17651 file, checks the integrity of the file, and
17652 flags some common errors.
17653 In other technical words, it is
17657 for \SpecialChar LaTeX
17661 \begin_layout Standard
17662 Well, what is a syntax checker doing in \SpecialChar LyX
17663 which is supposed to produce correct
17665 anyways? The answer is simple: Just as
17669 not only checks the
17673 of C programs, but also does
17677 checks for type-errors,
17679 Chk\SpecialChar TeX
17682 catches some common
17686 errors, in addition to the syntactical ones.
17689 Chk\SpecialChar TeX
17692 is capable of detecting several common errors, such as
17695 \begin_layout Itemize
17696 Ellipsis detection:
17697 \begin_inset Newline newline
17700 Use \SpecialChar ldots
17704 \begin_layout Itemize
17705 No space in front of/after parenthesis:
17706 \begin_inset Newline newline
17712 \begin_layout Itemize
17713 Enforcement of normal space after common abbreviations:
17714 \begin_inset Newline newline
17718 \begin_inset space \thinspace{}
17722 \begin_inset space \space{}
17725 is too wide spacing.
17728 \begin_layout Itemize
17729 Enforcement of end-of-sentence space when the last sentence ends with a
17731 \begin_inset Newline newline
17735 And this is wrong spacing.
17738 \begin_layout Itemize
17739 Space in front of labels and similar commands:
17740 \begin_inset Newline newline
17743 The label should stick right up to the text to avoid falling to a wrong
17746 \begin_inset CommandInset label
17756 \begin_layout Plain Layout
17757 This footnote is in danger of falling off to a wrong page
17762 The label is separated too much.
17765 \begin_layout Itemize
17766 Space in front of references, instead of hard spaces:
17767 \begin_inset Newline newline
17770 If you have bad luck, the text will break right between the referenced text
17771 and reference number, and that's a pity.
17773 \begin_inset CommandInset ref
17775 reference "sec:chktex"
17782 \begin_layout Itemize
17784 \begin_inset Quotes eld
17788 \begin_inset Quotes erd
17792 \begin_inset Formula $\times$
17796 \begin_inset Newline newline
17799 2x2 looks cheap compared to
17800 \begin_inset Formula $2\times2$
17806 \begin_layout Standard
17807 and more \SpecialChar ldots
17808 It is an invaluable tool when you are
17809 \begin_inset Quotes eld
17813 \begin_inset Quotes erd
17816 your document before printing, and you should run it right after the obligatory
17817 spelling check, and before you go fine tuning the typesetting.
17820 \begin_layout Subsection
17824 \begin_layout Standard
17825 If you have the program installed, usage is as simple as choosing
17827 Tools\SpecialChar menuseparator
17829 \begin_inset space ~
17835 This will make \SpecialChar LyX
17836 generate a \SpecialChar LaTeX
17837 file of your document, start
17839 Chk\SpecialChar TeX
17842 to check it, and then make \SpecialChar LyX
17844 \begin_inset Quotes eld
17848 \begin_inset Quotes erd
17851 with the warnings from
17853 Chk\SpecialChar TeX
17856 , if there were any.
17857 The warnings will be placed close to the point of the mistake, and you
17858 can quickly find them by using the
17860 Navigate\SpecialChar menuseparator
17863 menu item, or the shortcut key
17872 Open the error boxes by clicking on them with the mouse, or use the shortcut
17881 bindings, or the corresponding
17890 Read the warning and correct the mistake, if it is a mistake.
17891 If you have trouble understanding what the warning is about, you can safely
17893 Remember that there is a hidden layer between the document on screen and
17894 the technical details in invoking
17896 Chk\SpecialChar TeX
17899 , and this gap can make some warnings seem arcane or just plain silly.
17902 \begin_layout Standard
17903 This document is an excellent testing bed for the feature, and it should
17904 provide quite a few warnings for you to fiddle with.
17905 Since computers are only so smart, expect most of the warnings to be false
17909 \begin_layout Subsection
17910 How to fine tune it
17913 \begin_layout Standard
17914 Sometimes, you'll find that
17916 Chk\SpecialChar TeX
17919 makes more noise than suits your mood.
17920 Then you can choose not to use it, wait until your mood changes, or try
17923 Chk\SpecialChar TeX
17926 to get better along with you.
17929 \begin_layout Standard
17932 Chk\SpecialChar TeX
17939 very configurable and extensible, you should not expect to solve all problems
17942 Chk\SpecialChar TeX
17945 in \SpecialChar LyX
17947 Since \SpecialChar LyX
17948 has to generate a somewhat special \SpecialChar LaTeX
17949 file to be able to match the
17950 line numbers from the
17952 Chk\SpecialChar TeX
17959 \begin_layout Plain Layout
17960 You can inspect the specific output from
17966 Document\SpecialChar menuseparator
17969 \begin_inset space ~
17983 to the internal document structure, some of the warnings will not appear
17985 There are two things you can do about this:
17988 \begin_layout Itemize
17991 Chk\SpecialChar TeX
17994 invocation command line in
17995 \begin_inset Flex Noun
17998 \begin_layout Plain Layout
17999 Tools\SpecialChar menuseparator
18000 Preferences\SpecialChar menuseparator
18001 Output\SpecialChar menuseparator
18002 LaTeX\SpecialChar menuseparator
18010 Chk\SpecialChar TeX
18013 installation configuration file (usually with the file
18018 See below to learn what warnings can be enabled and disabled on the command
18022 \begin_layout Itemize
18023 Export your document as a raw \SpecialChar LaTeX
18026 File\SpecialChar menuseparator
18027 Export\SpecialChar menuseparator
18036 Invoked in this way, it can be a hassle to find the corresponding place
18037 in the document inside \SpecialChar LyX
18038 , but with a little patience, you should be able
18042 \begin_layout Standard
18043 Here follows the warning messages that can be enabled and disabled in
18052 to disable a warning, and
18056 to enable a warning.
18057 The emphasized entries are disabled by default, because the default is
18060 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18065 \begin_layout Standard
18066 Notice that you should only use the options that enable and disable warnings,
18067 because \SpecialChar LyX
18068 relies on some of the other command line parameters to be set
18069 in a specific way to have a chance to communicate with
18076 \begin_layout Enumerate
18080 Command terminated with space.
18083 \begin_layout Enumerate
18086 Non-breaking space (
18087 \begin_inset Quotes eld
18095 \begin_inset Quotes erd
18098 ) should have been used.
18101 \begin_layout Enumerate
18105 You should enclose the previous parenthesis with
18106 \begin_inset Quotes eld
18114 \begin_inset Quotes erd
18120 \begin_layout Enumerate
18123 Italic correction (
18124 \begin_inset Quotes eld
18134 \begin_inset Quotes erd
18137 ) found in non-italic buffer.
18140 \begin_layout Enumerate
18143 Italic correction (
18144 \begin_inset Quotes eld
18154 \begin_inset Quotes erd
18157 ) found more than once.
18160 \begin_layout Enumerate
18164 No italic correction (
18165 \begin_inset Quotes eld
18175 \begin_inset Quotes erd
18181 \begin_layout Enumerate
18185 \begin_inset Quotes eld
18193 \begin_inset Quotes erd
18197 \begin_inset Quotes eld
18205 \begin_inset Quotes erd
18211 \begin_layout Enumerate
18214 Wrong length of dash may have been used.
18217 \begin_layout Enumerate
18221 \begin_inset Quotes eld
18229 \begin_inset Quotes erd
18233 \begin_inset Quotes eld
18241 \begin_inset Quotes erd
18247 \begin_layout Enumerate
18251 \begin_inset Quotes eld
18259 \begin_inset Quotes erd
18265 \begin_layout Enumerate
18269 \begin_inset Quotes eld
18277 \begin_inset Quotes erd
18280 to achieve an ellipsis.
18283 \begin_layout Enumerate
18286 Inter-word spacing (
18287 \begin_inset Quotes eld
18297 \begin_inset Quotes eld
18300 ) should perhaps be used.
18303 \begin_layout Enumerate
18306 Inter-sentence spacing (
18307 \begin_inset Quotes eld
18317 \begin_inset Quotes erd
18320 ) should perhaps be used.
18323 \begin_layout Enumerate
18326 Could not find argument for command.
18329 \begin_layout Enumerate
18333 \begin_inset Quotes eld
18341 \begin_inset Quotes erd
18347 \begin_layout Enumerate
18350 Math mode still on at end of \SpecialChar LaTeX
18354 \begin_layout Enumerate
18358 \begin_inset Quotes eld
18366 \begin_inset Quotes erd
18369 doesn't match the number of
18370 \begin_inset Quotes eld
18378 \begin_inset Quotes erd
18384 \begin_layout Enumerate
18387 You should use either
18390 \begin_inset Quotes eld
18398 \begin_inset Quotes erd
18403 as an alternative to
18404 \begin_inset Quotes eld
18412 \begin_inset Quotes erd
18418 \begin_layout Enumerate
18425 " (ASCII 39) instead of "
18432 \begin_layout Enumerate
18435 User-specified pattern found.
18438 \begin_layout Enumerate
18441 This command might not be intended.
18444 \begin_layout Enumerate
18451 \begin_layout Enumerate
18469 \begin_layout Enumerate
18472 Delete this space to maintain correct page references.
18475 \begin_layout Enumerate
18479 You might wish to put this between a pair of
18480 \begin_inset Quotes eld
18488 \begin_inset Quotes erd
18494 \begin_layout Enumerate
18497 You ought to remove spaces in front of punctuation.
18500 \begin_layout Enumerate
18503 Could not execute \SpecialChar LaTeX
18507 \begin_layout Enumerate
18516 in front of small punctuation.
18519 \begin_layout Enumerate
18527 may look prettier here.
18530 \begin_layout Enumerate
18534 Multiple spaces detected in output.
18537 \begin_layout Enumerate
18540 This text may be ignored.
18543 \begin_layout Enumerate
18549 \begin_inset Quotes eld
18554 to begin quotation, not
18561 \begin_layout Enumerate
18568 to end quotation, not
18571 \begin_inset Quotes eld
18579 \begin_layout Enumerate
18585 \begin_layout Enumerate
18588 You should perhaps use
18589 \begin_inset Quotes eld
18597 \begin_inset Quotes erd
18603 \begin_layout Enumerate
18606 You should put a space in front of/after parenthesis.
18609 \begin_layout Enumerate
18612 You should avoid spaces in front of/after parenthesis.
18615 \begin_layout Enumerate
18619 You should not use punctuation in front of/after quotes.
18622 \begin_layout Enumerate
18625 Double space found.
18628 \begin_layout Enumerate
18631 You should put punctuation outside inner/inside display math mode.
18634 \begin_layout Enumerate
18637 You ought to not use primitive \SpecialChar TeX
18638 in \SpecialChar LaTeX
18642 \begin_layout Enumerate
18645 You should remove spaces in front of
18646 \begin_inset Quotes eld
18654 \begin_inset Quotes erd
18660 \begin_layout Enumerate
18663 \begin_inset Quotes eld
18671 \begin_inset Quotes erd
18674 is normally not followed by
18675 \begin_inset Quotes eld
18683 \begin_inset Quotes erd
18689 \begin_layout Standard
18690 In later versions of \SpecialChar LyX
18691 , we hope to provide a more complete interface to this
18692 tool (and it's smaller cousin
18696 ) to exploit the full power of it.
18697 But it's not exactly useless as it is now: go try it on one of your existing
18698 documents of a certain length and be surprised.
18701 \begin_layout Section
18702 Version Control in \SpecialChar LyX
18706 \begin_layout Standard
18709 Lars Gullik Bjønnes
18716 \begin_layout Subsection
18720 \begin_layout Standard
18722 supports some of the most basic RCS/CVS/SVN/GIT commands.
18723 If you need something a bit more sophisticated you will have to do that
18724 manually in a terminal.
18727 \begin_layout Standard
18728 Also note that CVS support is not as good as subversion support so we advise
18730 A good place to start learning Subversion is SVN Book
18734 \begin_layout Plain Layout
18735 \begin_inset CommandInset href
18737 target "http://svnbook.red-bean.com/"
18747 In the case of RCS you should read
18748 \begin_inset Quotes eld
18752 \begin_inset Quotes erd
18755 (a man file, read it with
18760 This file describes all the basic features of RCS.
18761 You should especially notice the comment about a RCS directory, and the
18762 notion of a master RCS file (the file ending in
18769 \begin_layout Standard
18770 Before you begin to use the version control features in \SpecialChar LyX
18772 familiar with RCS/CVS/SVN/GIT usage.
18773 The implementation in \SpecialChar LyX
18774 assumes a recent version of the GNU RCS or CVS/SVN
18775 package — no guarantees are made for older versions.
18776 Most of the log messages are not currently displayed after operations —
18777 you can check them in the Messages pane if unsure.
18778 Regular users of version control will appreciate VC toolbar, which can
18781 View\SpecialChar menuseparator
18782 Toolbars\SpecialChar menuseparator
18784 \begin_inset space ~
18792 \begin_layout Standard
18793 For introducing your own external commands consult vc-command in the manual
18794 of \SpecialChar LyX
18798 \begin_layout Standard
18799 It is strongly recommended to store documents in uncompressed format if
18800 using version control (uncheck
18802 Document\SpecialChar menuseparator
18805 if it is checked): Uncompressed LyX documents are text files and therefore
18806 for merging two different versions by version control systems.
18807 Compressed LyX documents are binary files, which cannot be merged by version
18811 \begin_layout Subsection
18812 RCS commands in \SpecialChar LyX
18816 \begin_layout Standard
18817 The following sections describe the RCS commands supported by \SpecialChar LyX
18819 You can find them in the
18821 File\SpecialChar menuseparator
18823 \begin_inset space ~
18830 was tested against RCS 5.7/5.8.
18833 \begin_layout Subsubsection
18839 \begin_layout Standard
18840 If your document is not under revision control, this is the only item shown
18842 And if it is under revision control, the
18846 item is not visible.
18850 \begin_layout Standard
18851 This command registers your document with RCS (unless you are under the
18852 directory managed by CVS)\SpecialChar endofsentence
18853 You are asked interactively to supply an initial
18854 description of the document.
18855 The document is now set in Read-Only mode and you have to
18858 \begin_inset space ~
18862 \begin_inset space ~
18866 \begin_inset space ~
18871 , before making any changes to it.
18872 A document under revision control has a
18873 \begin_inset Quotes eld
18876 [RCS:<version> <locker>]
18877 \begin_inset Quotes erd
18880 item tagged to the filename in the minibuffer.
18883 \begin_layout Standard
18884 RCS command that is run:
18886 ci -q -u -i -t-"<initial description>" <file-name>
18889 \begin_layout Standard
18894 to understand the switches.
18898 \begin_layout Subsubsection
18904 \begin_layout Standard
18905 When you are finished editing a file, you check in your changes.
18906 When you do this, you are asked for a description of the changes.
18907 This is stored in the history log.
18908 The version number is bumped, your changes are applied to the master RCS
18909 file, the document is unlocked and set to Read-Only mode.
18912 \begin_layout Standard
18915 ci -q -u -m"<description>" <file-name>
18918 \begin_layout Subsubsection
18924 \begin_layout Standard
18925 By doing this you lock the document so that only you can edit it.
18926 This will also make the document Read-Write only for you.
18927 You will usually continue editing for a while and when you are finished
18928 you check in your changes.
18929 The status line is changed to reflect that you have locked the file.
18932 \begin_layout Standard
18935 co -q -l <file-name>
18938 \begin_layout Subsubsection
18941 Revert To Repository Version
18944 \begin_layout Standard
18945 This will discard all changes made to the document since the last check
18947 You get a warning before changes are discarded.
18950 \begin_layout Standard
18953 co -f -u<version> <file-name>
18956 \begin_layout Subsubsection
18962 \begin_layout Standard
18963 This will create a copy of the current document.
18964 Since RCS does not support copy operations natively, the version history
18965 is not preserved, and the copy is added as a new file.
18966 It requires a clean document without any changes since the last checkin.
18967 You are asked for a file name and a description of the copy operation.
18968 After that the copy is created, both locally and in the repository.
18969 If the parent directories of the copied and original document differ, all
18970 relative paths of included files of the copy are adjusted (like in
18972 File\SpecialChar menuseparator
18977 Finally, the copy is loaded instead of the original document.
18980 \begin_layout Labeling
18981 \labelwidthstring 00.00.0000
18983 \begin_inset space ~
18987 \begin_inset space ~
18991 \begin_inset Newline newline
18995 \begin_inset Flex Code
18998 \begin_layout Plain Layout
19001 \begin_inset Quotes eld
19005 \begin_inset Quotes erd
19014 \begin_inset Flex Code
19017 \begin_layout Plain Layout
19020 \begin_inset Quotes eld
19024 \begin_inset Quotes erd
19033 \begin_inset Newline newline
19037 \begin_inset Flex Code
19040 \begin_layout Plain Layout
19044 \begin_inset Quotes eld
19048 \begin_inset Quotes erd
19059 \begin_layout Subsubsection
19065 \begin_layout Standard
19066 This makes as if the last check in never happened.
19067 No changes are made to the document loaded into \SpecialChar LyX
19068 , but the last version
19069 is removed from the master RCS file.
19072 \begin_layout Standard
19075 rcs -o<version> <file-name>
19078 \begin_layout Subsubsection
19084 \begin_layout Standard
19085 This shows the complete history of the RCS document.
19090 is shown in a browser.
19098 \begin_layout Subsubsection
19102 \begin_layout Standard
19104 supports RCS version number, author name, date and time of last commit.
19105 All those are extracted from
19107 rlog -r <file-name>
19111 \begin_inset CommandInset ref
19113 reference "subsec:VCS-Revision-Information"
19120 \begin_layout Subsection
19121 CVS commands in \SpecialChar LyX
19125 \begin_layout Standard
19126 A subset of CVS operations is supported by \SpecialChar LyX
19128 You can find the commands in the
19130 File\SpecialChar menuseparator
19132 \begin_inset space ~
19138 The version control system SVN is more powerful, so please use it instead
19139 of CVS if possible.
19142 \begin_layout Subsubsection
19148 \begin_layout Standard
19149 If you start from scratch with CVS you have to create your repository and
19150 checkout the working copy with external tools.
19151 If you're using a client-server setup you may need to login before doing
19152 the first repository checkout.
19155 \begin_layout Standard
19156 If your documents are under revision control and others are using the same
19157 repository problems arise when different changes to the same document at
19158 the same location happen.
19159 Standard CVS repositories don't operate with a file locking mechanism.
19160 This may be surprising, but conflicts only occur if people disagree on
19161 the proper content of the same part of a document.
19162 So, if co-workers are used to communicate regularly, these conflicts occur
19164 If they don't communicate they have a fundamental problem anyway.
19165 Nevertheless some people like to work with so called
19166 \begin_inset Quotes eld
19170 \begin_inset Quotes erd
19174 If they do so the working copy of all files is readonly when checked out
19175 first and the user starts editing after using a special command to make
19176 the working copy writable.
19177 When the changes are checked in the working copy returns to readonly state.
19178 With \SpecialChar LyX
19179 one has to edit the
19180 \begin_inset Flex Code
19183 \begin_layout Plain Layout
19189 file and add the line
19190 \begin_inset Flex Code
19193 \begin_layout Plain Layout
19199 to work with reserved checkouts.
19200 The benefit is the possibility to see who is using a writable copy of some
19202 It's not guaranteed only one user makes a copy writable.
19205 \begin_layout Standard
19207 tries to guess if you're using reserved or non-reserved checkouts.
19208 If your working copy is readonly or it is writable and an additional copy
19209 of your document exists in the CVS/Base sub-directory a reserved otherwise
19210 a non-reserved checkout is assumed.
19211 When a reserved checkout is detected you have to use
19212 \begin_inset Flex Noun
19215 \begin_layout Plain Layout
19221 to make your working copy writable if it's readonly.
19223 \begin_inset Flex Noun
19226 \begin_layout Plain Layout
19232 operation is possible and that makes your working copy readonly again after
19233 transferring your changes to the repository.
19236 \begin_layout Standard
19237 More information about CVS can be found here
19238 \begin_inset Flex URL
19241 \begin_layout Plain Layout
19243 http://www.nongnu.org/cvs
19249 \begin_inset Flex URL
19252 \begin_layout Plain Layout
19254 http://ximbiot.com/cvs
19262 \begin_layout Standard
19267 to understand the sub-commands and the switches mentioned below.
19270 \begin_layout Subsubsection
19276 \begin_layout Standard
19277 If your document is not under revision control, this is the only item shown
19279 And if it is under revision control, the
19283 item is not visible.
19287 \begin_layout Standard
19288 This command registers in CVS your document
19289 \begin_inset Flex Strong
19292 \begin_layout Plain Layout
19300 in the case you have already the documents directory under CVS control
19306 This means you have to create or checkout the archive by yourself using
19308 (In case you forget that step \SpecialChar LyX
19309 registers the document with RCS.)
19312 \begin_layout Standard
19313 Then you are asked interactively to supply an initial description of the
19315 Don't forget that registered file is not yet checked in.
19318 \begin_layout Standard
19319 CVS command that is run:
19321 cvs -q add -m"<entered message>" "<file-name>"
19324 \begin_layout Standard
19329 above and for all other CVS commands is an abbreviation for
19330 \begin_inset Quotes eld
19333 change the current working directory to file location and use the file name
19334 without path component as argument
19335 \begin_inset Quotes erd
19341 \begin_layout Subsubsection
19347 \begin_layout Standard
19348 When you are finished editing a file, you commit your changes.
19349 When you do this and you had changed the document, you are asked for a
19350 description of the changes.
19351 After that changes are written to the repository.
19352 In case you didn't change the document and a reserved checkout is detected
19353 the reservation made on
19354 \begin_inset Flex Noun
19357 \begin_layout Plain Layout
19366 \begin_layout Labeling
19367 \labelwidthstring 00.00.0000
19369 \begin_inset space ~
19373 \begin_inset space ~
19377 \begin_inset Newline newline
19381 \begin_inset Flex Code
19384 \begin_layout Plain Layout
19387 -q commit -m"<description>" "<file-name>"
19393 \begin_inset Newline newline
19397 \begin_inset Flex Code
19400 \begin_layout Plain Layout
19411 \begin_layout Subsubsection
19417 \begin_layout Standard
19418 When you are sharing a repository with others, you may have to incorporate
19419 their changes into your working copy.
19422 \begin_layout Standard
19425 cvs -q update "<file-name>"
19428 \begin_layout Standard
19429 If a readonly checkout is detected the working copy is made writable and
19433 \begin_layout Standard
19436 cvs -q edit "<file-name>"
19439 \begin_layout Subsubsection
19442 Revert To Repository Version
19445 \begin_layout Standard
19446 This will discard all changes made to the document since the last check
19448 You get a warning before changes are discarded.
19449 Firstly the file is deleted, secondly CVS update command is run.
19452 \begin_layout Standard
19455 cvs -q update "<file-name>"
19458 \begin_layout Standard
19459 If a reserved checkout is detected and the working copy has no changes only
19460 the reservation is undone.
19463 \begin_layout Standard
19466 cvs -q unedit "<file-name>"
19469 \begin_layout Subsubsection
19475 \begin_layout Standard
19476 This will create a copy of the current document.
19477 Since CVS does not support copy operations natively, the version history
19478 is not preserved, and the copy is added as a new file.
19479 It requires a clean document without any changes since the last checkin.
19480 You are asked for a file name and a description of the copy operation.
19481 After that the copy is created, both locally and in the repository.
19482 If the parent directories of the copied and original document differ, all
19483 relative paths of included files of the copy are adjusted (like in
19485 File\SpecialChar menuseparator
19490 Finally, the copy is loaded instead of the original document.
19493 \begin_layout Labeling
19494 \labelwidthstring 00.00.0000
19496 \begin_inset space ~
19500 \begin_inset space ~
19504 \begin_inset Newline newline
19508 \begin_inset Flex Code
19511 \begin_layout Plain Layout
19514 \begin_inset Quotes eld
19518 \begin_inset Quotes erd
19527 \begin_inset Flex Code
19530 \begin_layout Plain Layout
19533 \begin_inset Quotes eld
19537 \begin_inset Quotes erd
19546 \begin_inset Newline newline
19550 \begin_inset Flex Code
19553 \begin_layout Plain Layout
19557 \begin_inset Quotes eld
19561 \begin_inset Quotes erd
19572 \begin_layout Subsubsection
19578 \begin_layout Standard
19579 This will rename the current document.
19580 Since CVS does not support rename operations natively, the version history
19581 is not preserved, the renamed document is added as a new file, and the
19582 original document is deleted.
19583 It requires a clean document without any changes since the last checkin.
19584 You are asked for a file name and a description of the rename operation.
19585 After that the document is renamed, both locally and in the repository.
19586 If the parent directories of the new and old file names differ, all relative
19587 paths of included files are adjusted (like in
19589 File\SpecialChar menuseparator
19594 Finally, the document is reloaded using the new name.
19597 \begin_layout Labeling
19598 \labelwidthstring 00.00.0000
19600 \begin_inset space ~
19604 \begin_inset space ~
19608 \begin_inset Newline newline
19612 \begin_inset Flex Code
19615 \begin_layout Plain Layout
19618 \begin_inset Quotes eld
19622 \begin_inset Quotes erd
19631 \begin_inset Flex Code
19634 \begin_layout Plain Layout
19637 \begin_inset Quotes eld
19641 \begin_inset Quotes erd
19650 \begin_inset Newline newline
19654 \begin_inset Flex Code
19657 \begin_layout Plain Layout
19661 \begin_inset Quotes eld
19665 \begin_inset Quotes erd
19674 \begin_inset Newline newline
19678 \begin_inset Flex Code
19681 \begin_layout Plain Layout
19685 \begin_inset Quotes eld
19689 \begin_inset Quotes erd
19700 \begin_layout Subsubsection
19701 Update of the local directory checkout from repository
19704 \begin_layout Standard
19705 Once your documents gets more complex, containing sub-documents and pictures,
19707 \begin_inset Flex Code
19710 \begin_layout Plain Layout
19716 files and so on using version control becomes more complicated.
19718 supports updating the whole tree in which resides the document.
19719 This become especially useful once you cooperate with people which neither
19720 have detailed knowledge about CVS usage nor they have ambition to commit
19721 additional material to the repository.
19722 You have to organize the files structure so that all external files are
19723 in the same directory or subdirectories of the document.
19724 It's good practice anyway to store multipart documents in an extra directory.
19727 \begin_layout Standard
19729 \begin_inset Flex Code
19732 \begin_layout Plain Layout
19733 Update local directory from repository
19738 command updates the whole directory.
19739 If local changes are detected user is warned before update starts.
19740 In case of merge conflicts both versions of the conflicting document parts
19741 are placed in the final document.
19742 You have to review and correct the result of the merge.
19743 You'll find the conflicts enclosed in pairs of
19744 \begin_inset Flex Code
19747 \begin_layout Plain Layout
19754 \begin_inset Flex Code
19757 \begin_layout Plain Layout
19764 \begin_inset Flex Code
19767 \begin_layout Plain Layout
19774 The first part is your version as before the update operation with the
19775 document name prepended.
19776 The second one is the repository version with the version number after
19778 \begin_inset Flex Code
19781 \begin_layout Plain Layout
19790 \begin_layout Labeling
19791 \labelwidthstring 00.00.0000
19793 \begin_inset space ~
19797 \begin_inset space ~
19801 \begin_inset Newline newline
19805 \begin_inset Flex Code
19808 \begin_layout Plain Layout
19816 (Ask if changes are detected.)
19817 \begin_inset Newline newline
19821 \begin_inset Flex Code
19824 \begin_layout Plain Layout
19825 cd $path; cvs -q update
19835 \begin_layout Standard
19837 \begin_inset Flex Code
19840 \begin_layout Plain Layout
19846 stands for the path to the document.
19849 \begin_layout Subsubsection
19855 \begin_layout Standard
19856 This shows the complete history of the CVS document.
19859 cvs log "<file-name>"
19861 is shown in a browser.
19864 \begin_layout Subsubsection
19868 \begin_layout Standard
19870 supports CVS version number, author name, date and time of last commit.
19871 All those are extracted from
19873 cvs log -r <file-name>
19877 \begin_inset CommandInset ref
19879 reference "subsec:VCS-Revision-Information"
19886 \begin_layout Subsection
19887 SVN commands in \SpecialChar LyX
19891 \begin_layout Standard
19892 SVN is now partially supported by \SpecialChar LyX
19894 You can find the commands in the
19896 File\SpecialChar menuseparator
19898 \begin_inset space ~
19904 Please note that if you use password protected access to repository via
19905 ssh, you will be asked in terminal window.
19907 was tested against SVN 1.5, 1.6, 1.7 and 1.8
19911 \begin_layout Plain Layout
19912 Most of the commands will work with 1.4 too, see
19913 \begin_inset CommandInset ref
19915 reference "subsec:SVN-Repo-Update"
19920 There seems to be currently unresolved permissions problem under SVN 1.8
19921 with reverting changes when file is locked.
19929 \begin_layout Subsubsection
19935 \begin_layout Standard
19936 If your document is not under revision control, this is the only item shown
19938 And if it is under revision control, the
19942 item is not visible.
19945 \begin_layout Standard
19946 This command registers in SVN your document ONLY in case you have already
19947 the documents directory under SVN control (in particular
19952 This means you have to checkout the archive by yourself.
19955 \begin_layout Standard
19956 Then you are asked interactively to supply an initial description of the
19958 Don't forget that registered file is not yet commited.
19961 \begin_layout Standard
19962 SVN command that is run:
19965 \begin_inset Quotes eld
19969 \begin_inset Quotes erd
19975 \begin_layout Standard
19980 to understand the switches.
19983 \begin_layout Subsubsection
19989 \begin_layout Standard
19990 When you are finished editing a file, you commit your changes.
19991 When you do this, you are asked for a description of the changes.
19992 After that changes are commited.
19995 \begin_layout Standard
20000 \begin_layout Plain Layout
20001 In case locking is not enabled.
20003 \begin_inset CommandInset ref
20005 reference "subsec:SVN-File-Locking"
20016 svn commit -q -m"<description>" <file-name>
20019 \begin_layout Subsubsection
20025 \begin_layout Standard
20026 Updates the changes of this file from the repository.
20027 Be sure you understand SVN merging and conflicts resolving before using
20028 this function, because all conflicts has to be resolved manually by you!
20031 \begin_layout Standard
20036 \begin_layout Plain Layout
20044 svn update --non-interactive
20045 \begin_inset Quotes eld
20049 \begin_inset Quotes erd
20055 \begin_layout Subsubsection
20058 Revert To Repository Version
20061 \begin_layout Standard
20062 This will discard all changes made to the document since the last check
20064 You get a warning before changes are discarded.
20067 \begin_layout Standard
20071 \begin_inset Quotes eld
20075 \begin_inset Quotes erd
20081 \begin_layout Subsubsection
20087 \begin_layout Standard
20088 This will create a copy of the current document including the version history.
20089 It requires a clean document without any changes since the last checkin.
20090 You are asked for a file name and a description of the copy operation.
20091 After that the copy is created, both locally and in the repository.
20092 If the parent directories of the copied and original document differ, all
20093 relative paths of included files of the copy are adjusted (like in
20095 File\SpecialChar menuseparator
20100 Finally, the copy is loaded instead of the original document.
20103 \begin_layout Labeling
20104 \labelwidthstring 00.00.0000
20106 \begin_inset space ~
20110 \begin_inset space ~
20114 \begin_inset Newline newline
20118 \begin_inset Flex Code
20121 \begin_layout Plain Layout
20125 \begin_inset Quotes eld
20129 \begin_inset Quotes erd
20133 \begin_inset Quotes eld
20137 \begin_inset Quotes erd
20146 \begin_inset Newline newline
20150 \begin_inset Flex Code
20153 \begin_layout Plain Layout
20162 \begin_layout Subsubsection
20168 \begin_layout Standard
20169 This will rename the current document including the version history.
20170 It requires a clean document without any changes since the last checkin.
20171 You are asked for a file name and a description of the rename operation.
20172 After that the document is renamed, both locally and in the repository.
20173 If the parent directories of the new and old file names differ, all relative
20174 paths of included files are adjusted (like in
20176 File\SpecialChar menuseparator
20181 Finally, the document is reloaded using the new name.
20184 \begin_layout Labeling
20185 \labelwidthstring 00.00.0000
20187 \begin_inset space ~
20191 \begin_inset space ~
20195 \begin_inset Newline newline
20199 \begin_inset Flex Code
20202 \begin_layout Plain Layout
20206 \begin_inset Quotes eld
20210 \begin_inset Quotes erd
20214 \begin_inset Quotes eld
20218 \begin_inset Quotes erd
20227 \begin_inset Newline newline
20231 \begin_inset Flex Code
20234 \begin_layout Plain Layout
20243 \begin_layout Subsubsection
20244 \begin_inset CommandInset label
20246 name "subsec:SVN-Repo-Update"
20250 Update of the local directory checkout from repository
20254 \begin_layout Plain Layout
20255 Note that this command will work only with subversion
20256 \begin_inset Formula $\geqq1.5$
20267 \begin_layout Standard
20268 All the commands above have one shortcomming - they deal with the current
20270 Once your document contains pictures, includes external
20271 \begin_inset Flex Code
20274 \begin_layout Plain Layout
20280 files and so on administration becomes more complicated.
20282 now supports updating the whole tree in which resides the document
20286 \begin_layout Plain Layout
20287 One need to organize the files structure so that all external files are
20288 in the same directory or subdirectories of the document.
20295 This become especially useful once you cooperate with people which neither
20296 know about subversion management nor they have ambition to commit additional
20297 material to the repository.
20301 \begin_layout Standard
20302 \begin_inset Flex Code
20305 \begin_layout Plain Layout
20306 Update local directory from repository
20311 command updates the whole directory and in case of merge conflicts local
20312 version of the files are left, so no unintended data loss occurs.
20313 If local changes are detected user is warned before update starts.
20316 \begin_layout Labeling
20317 \labelwidthstring 00.00.0000
20319 \begin_inset space ~
20323 \begin_inset space ~
20327 \begin_inset Newline newline
20331 \begin_inset Flex Code
20334 \begin_layout Plain Layout
20340 (Ask if changes are detected.)
20341 \begin_inset Newline newline
20345 \begin_inset Flex Code
20348 \begin_layout Plain Layout
20349 svn update –accept mine-full $path
20357 \begin_layout Standard
20359 \begin_inset Flex Code
20362 \begin_layout Plain Layout
20368 stands for the path to the document.
20371 \begin_layout Subsubsection
20377 \begin_layout Standard
20378 This shows the complete history of the SVN document.
20382 \begin_inset Quotes eld
20386 \begin_inset Quotes erd
20391 is shown in a browser.
20394 \begin_layout Subsubsection
20396 \begin_inset CommandInset label
20398 name "subsec:SVN-File-Locking"
20405 \begin_layout Standard
20406 The file exchange through various revision control systems brings the problem
20407 of merge conflicts in case two different users try to edit the same (parts
20409 When such a conflict happens it needs manual resolving and one reasonable
20410 alternative is to provide some kind of locking mechanism, which guarantees
20411 that only one user is allowed to edit file at the given time.
20414 \begin_layout Standard
20415 SVN has two such mechanisms to provide mutual exclusivity for file access
20416 - locks and automatic setting of write permissions (see sec.
20418 \begin_inset CommandInset ref
20420 reference "subsec:Automatical-Locking-Property"
20425 \begin_inset Flex Code
20428 \begin_layout Plain Layout
20438 \begin_layout Plain Layout
20439 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20445 If this property is detected for a given document \SpecialChar LyX
20446 starts to use SVN locks
20447 for document editing automatically and the whole check-in/out mechanism
20448 switches to the same regimen as for RCS.
20449 This in particular means there are two different modes of file use in \SpecialChar LyX
20453 \begin_layout Itemize
20455 The loaded file is in the read-only mode.
20456 For editing on needs to check-out.
20461 consists of updating from the repository and gaining write lock.
20462 If the lock is not possible to obtain, we remain in unlocked state.
20465 \begin_layout Itemize
20467 The loaded file is in the 'normal' edit mode.
20468 No other user is allowed to edit the file.
20473 consists of commiting changes and releasing write-lock.
20474 If no changes have been made to the document, no commit will be produced
20478 \begin_layout Plain Layout
20479 Don't be puzzled by the fact that you will be asked for commit message anyway.
20484 and only the write-lock will be released.
20487 \begin_layout Standard
20491 \begin_layout Labeling
20492 \labelwidthstring 00.00.0000
20495 svn commit -q -m"<description>" "<file-name>"
20496 \begin_inset Newline newline
20499 svn unlock "<file-name>"
20502 \begin_layout Labeling
20503 \labelwidthstring 00.00.0000
20506 svn update "<file-name>"
20507 \begin_inset Newline newline
20510 svn lock "<file-name>"
20513 \begin_layout Subsubsection
20516 \begin_inset CommandInset label
20518 name "subsec:Automatical-Locking-Property"
20524 Automatic Locking Property
20527 \begin_layout Standard
20528 The above mentioned automatic setting of write permissions of the .lyx file
20531 File\SpecialChar menuseparator
20533 \begin_inset space ~
20536 Control\SpecialChar menuseparator
20537 Toggle locking property
20540 This command is active only when the file is not locked on the svn server
20542 you need to check-out before proceeding).
20545 \begin_layout Labeling
20546 \labelwidthstring 00.00.0000
20548 \begin_inset space ~
20554 \begin_layout Labeling
20555 \labelwidthstring 00.00.0000
20558 svn propset svn:needs-lock ON "<file-name>"
20561 \begin_layout Labeling
20562 \labelwidthstring 00.00.0000
20565 svn propdel svn:needs-lock "<file-name>"
20568 \begin_layout Subsubsection
20569 \begin_inset CommandInset label
20571 name "subsec:VCS-Revision-Information"
20575 Revision Information in Documents
20578 \begin_layout Standard
20579 There are more possibilities how to activate revision information in our
20583 \begin_layout Itemize
20589 \begin_layout Itemize
20590 tree revision information (
20591 \begin_inset Flex Code
20594 \begin_layout Plain Layout
20601 The result is the output of the
20602 \begin_inset Flex Code
20605 \begin_layout Plain Layout
20611 command, the following table gives you an idea, how to read the results.
20614 \begin_layout Standard
20616 \begin_inset Tabular
20617 <lyxtabular version="3" rows="6" columns="2">
20618 <features tabularvalignment="middle">
20619 <column alignment="center" valignment="top">
20620 <column alignment="center" valignment="top">
20622 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20625 \begin_layout Plain Layout
20631 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20634 \begin_layout Plain Layout
20642 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20645 \begin_layout Plain Layout
20651 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20654 \begin_layout Plain Layout
20655 mixed revision working copy
20662 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20665 \begin_layout Plain Layout
20671 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20674 \begin_layout Plain Layout
20675 modified working copy
20682 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20685 \begin_layout Plain Layout
20691 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20694 \begin_layout Plain Layout
20695 switched working copy
20702 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20705 \begin_layout Plain Layout
20711 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20714 \begin_layout Plain Layout
20715 partial working copy, from a sparse checkout
20722 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20725 \begin_layout Plain Layout
20731 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20734 \begin_layout Plain Layout
20735 mixed revision, modified, switched working copy
20748 \begin_layout Itemize
20749 file revision information.
20750 The result comes from parsing the output of
20751 \begin_inset Flex Code
20754 \begin_layout Plain Layout
20756 \begin_inset space ~
20760 \begin_inset space ~
20764 \begin_inset space ~
20773 Supported flags are:
20777 \begin_layout Itemize
20778 version number of the last commit (
20779 \begin_inset Flex Code
20782 \begin_layout Plain Layout
20791 \begin_layout Itemize
20792 author of the last commit (
20793 \begin_inset Flex Code
20796 \begin_layout Plain Layout
20805 \begin_layout Itemize
20806 date of the last commit (
20807 \begin_inset Flex Code
20810 \begin_layout Plain Layout
20819 \begin_layout Itemize
20820 time of the last commit (
20821 \begin_inset Flex Code
20824 \begin_layout Plain Layout
20834 \begin_layout Standard
20835 You can obtain this info via InsetInfo (e.g.
20837 \begin_inset Flex Code
20840 \begin_layout Plain Layout
20841 info-insert buffer vcs-date
20847 The information will be available only when you have the file stored under
20848 svn managment (i.e.
20850 \begin_inset Flex Code
20853 \begin_layout Plain Layout
20859 directory is available with your document).
20863 \begin_layout Itemize
20864 Another—a hacking one—possibility is to use svn keywords
20868 \begin_layout Plain Layout
20869 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20875 In short – you set file keywords property (e.g.
20878 svn propset svn:keywords 'Rev' file.lyx
20880 ) and then paste keyword \SpecialChar TeX
20885 \begin_layout Plain Layout
20886 This is an easy way how to ensure that \SpecialChar LyX
20887 won't break the line in the middle
20893 tag in your document (e.g.
20898 \begin_layout Plain Layout
20906 This way svn client will automatically substitute revision number (e.g.
20911 \begin_layout Plain Layout
20918 ) after each update and commit.
20919 There are more problems with this approach.
20920 Firstly, the '$' character is used in \SpecialChar TeX
20921 world for math equations, so any
20922 occurence of math formula
20923 \begin_inset Formula $Rev$
20927 \begin_inset Formula $Rev:59$
20930 in your \SpecialChar LyX
20932 Similarly for other keywords like Id, Date, Author, etc.
20933 Secondly svn output is dependent on your locales, so its very easy that
20934 svn would produce some problematic strings once Date is used.
20935 Thirdly you get the whole 'Rev: 59' string in your document instead of
20937 Until subversion implements user's custom keywords it will be hard to use
20938 this approach reliably or let \SpecialChar LyX
20939 to support it directly.
20942 \begin_layout Subsection
20943 SVN and Windows Environment
20946 \begin_layout Quote
20947 My inclination is to say that if the user cannot figure out the command
20948 line operations on their own fairly quickly, they would be well advised
20949 to use TortoiseSVN.
20955 \begin_layout Subsubsection
20959 \begin_layout Standard
20960 In addition to installing \SpecialChar LyX
20961 , and having access to a Subversion repository,
20962 the user will need to install the Subversion client program.
20963 A Windows installer for the client program is available from
20964 \begin_inset CommandInset href
20967 target "http://www.collab.net/nonav/downloads/subversion/"
20972 The user may also want to install
20973 \begin_inset CommandInset href
20976 target "http://tortoisesvn.tigris.org/"
20980 , which integrates Subversion operations into the context (rightclick) menu
20981 of Windows Explorer.
20982 Operations done outside \SpecialChar LyX
20983 will typically be more convenient using the Explorer
20985 Note that TortoiseSVN is not a replacement for the client program, which
20986 is what \SpecialChar LyX
20990 \begin_layout Subsubsection
20991 Bringing a document under Subversion control
20994 \begin_layout Standard
20995 Before a \SpecialChar LyX
20996 document can be brought under version control in Subversion, its
20997 parent directory needs to be under version control.
20998 If the document is being added to a project already in the repository,
20999 this is accomplished by checking the project out to the directory where
21000 the new document will be placed.
21001 If the project itself is not yet under version control (for instance, if
21002 this document starts a new project), the directory must be imported into
21004 This is done outside \SpecialChar LyX
21006 Both import and checkout are easily accomplished from the Explorer context
21007 menu using TortoiseSVN, or alternatively can be done using the command
21008 line client at a DOS prompt.
21009 The procedure for importing the project using TortoiseSVN is described
21010 below, assuming an existing repository and a new project being started
21018 For information on using the Subversion client program, run
21025 \begin_layout Enumerate
21032 in Windows Explorer, right click it, and select
21034 TortoiseSVN\SpecialChar menuseparator
21038 If necessary, adjust the URL for the repository, then click OK.
21041 \begin_layout Enumerate
21042 Right click the level of the repository under which you want to place the
21043 new project folder (typically the top level) and click
21047 Supply a name for the project folder and click OK.
21048 Add a message for the log file if desired, then click OK again.
21049 The new project folder should appear in the repository.
21050 Finally, click OK again to exit the repository browser.
21053 \begin_layout Enumerate
21054 Once again right click
21060 , this time selecting SVN Checkout\SpecialChar ldots
21061 Select the URL of the project folder
21062 you just created in the repository, and set the checkout directory to
21070 You will be warned about a non-empty folder; click OK to proceed.
21071 You should now have a
21082 \begin_layout Enumerate
21083 Create or open your document in \SpecialChar LyX
21086 File\SpecialChar menuseparator
21088 \begin_inset space ~
21091 Control\SpecialChar menuseparator
21095 Add a log message and click OK to commit the document to version control.
21098 \begin_layout Standard
21099 From this point onward, you should have full functionality in the
21101 File\SpecialChar menuseparator
21103 \begin_inset space ~
21109 You also have the option of checking the document in and out, viewing its
21111 using the TortoiseSVN context menu in Windows Explorer or the Subversion
21112 client program from a command prompt.
21115 \begin_layout Subsubsection
21116 SSH tunnel used with SVN under Windows
21119 \begin_layout Standard
21120 Compared with Linux setting up an svn client to communicate over ssh under
21121 Windows is a rather troublesome task.
21122 We will at least offer some hints how to setup the client side but prior
21123 knowledge about ssh and the Windows command line is needed, also be prepared
21124 for a great deal of frustration\SpecialChar ldots
21128 \begin_layout Enumerate
21129 Get an svn client for windows, as described in the previous sections.
21130 When it is a fresh install run some svn command (e.g.
21132 \begin_inset Flex Code
21135 \begin_layout Plain Layout
21141 ) to create config files, which you will need to change later on.
21144 \begin_layout Enumerate
21145 Choose an ssh client for Windows.
21146 There are several possibilities, we will use the one from Putty tools
21150 \begin_layout Plain Layout
21151 \begin_inset Flex URL
21154 \begin_layout Plain Layout
21156 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21167 You will need to set the connection up so that the client doesn't ask for
21168 any password from you.
21169 To keep things easy we will use only keys without any additional password
21174 \begin_layout Enumerate
21176 \begin_inset Flex Code
21179 \begin_layout Plain Layout
21186 Save your private .ppk key file and put the public one on the server side.
21187 If the SVN server runs on Linux, note that the format of the public key
21188 is not compatible with Linux openssh and you will need to direcly copy-paste
21191 Public key for pasting into OpenSSH authorized_keys file
21193 :” edit field into the server's
21194 \begin_inset Flex Code
21197 \begin_layout Plain Layout
21198 ~/.ssh/authorized_keys
21204 \begin_inset Flex Code
21207 \begin_layout Plain Layout
21216 \begin_layout Enumerate
21218 \begin_inset Flex Code
21221 \begin_layout Plain Layout
21228 In the SVN config file
21232 \begin_layout Plain Layout
21233 Exact path depends on Windows version, usually somewhere around
21234 \begin_inset Flex Code
21237 \begin_layout Plain Layout
21240 Documents and Settings
21254 \begin_inset Flex Code
21257 \begin_layout Plain Layout
21272 , section [tunnels], setup ssh command, e.g.
21274 \begin_inset Flex Code
21277 \begin_layout Plain Layout
21278 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21287 \begin_layout Plain Layout
21288 It will usually take a lot of time to get exact command right and it depends
21290 For example do not have some remote server saved as a default session in
21292 If things fail, try to connect via plink without SVN first.
21301 \begin_layout Enumerate
21302 Checkout the SVN archive, e.
21303 \begin_inset space \thinspace{}
21307 \begin_inset Newline newline
21311 \begin_inset Flex Code
21314 \begin_layout Plain Layout
21315 svn co svn+ssh://user@server/repository_path
21323 \begin_layout Subsubsection
21324 End-of-Line Conversions
21327 \begin_layout Standard
21328 When the collaborators are mixing Linux and Windows environments, \SpecialChar LyX
21330 use different line endings inside the .lyx files.
21331 This is not a problem as far as \SpecialChar LyX
21332 functionality is concerned, but the commit
21333 diffs will be huge and merge-conflicts prone.
21334 Fortunately SVN itself knows
21338 \begin_layout Plain Layout
21339 \begin_inset Flex URL
21342 \begin_layout Plain Layout
21344 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21354 how to deal with CR/LF problems when switching .lyx files to the
21355 \begin_inset Flex Code
21358 \begin_layout Plain Layout
21368 \begin_layout Plain Layout
21370 \begin_inset Flex Code
21373 \begin_layout Plain Layout
21374 svn propset svn:eol-style native FILE_NAME
21387 \begin_layout Subsection
21388 GIT commands in \SpecialChar LyX
21392 \begin_layout Standard
21393 A minimal subset of GIT commands is now supported by \SpecialChar LyX
21395 You can find the commands in the
21397 File\SpecialChar menuseparator
21399 \begin_inset space ~
21405 Please note that if you use password protected access to repository via
21406 ssh, you will be asked in terminal window.
21408 was tested against GIT 1.7.
21412 \begin_layout Plain Layout
21413 Windows users please note that you need to ensure that git is on the path.
21414 This can be set from within \SpecialChar LyX
21417 Tools\SpecialChar menuseparator
21418 Preferences\SpecialChar menuseparator
21419 Paths\SpecialChar menuseparator
21430 \begin_layout Standard
21431 One big difference of GIT and the other supported version control systems
21432 is the distributed nature of GIT: With traditional version control systems
21433 there is one central server which hosts the repository.
21434 Users commit their changes to the server, and get updates made by other
21436 With GIT, users commit to a local repository.
21437 The local repository can be synchronized with one or more remote repositories
21439 \begin_inset Flex Code
21442 \begin_layout Plain Layout
21449 \begin_inset Flex Code
21452 \begin_layout Plain Layout
21460 does not interact in any way with remote GIT repositories.
21461 It works exclusively with the local repository in a very similar way as
21462 with a central CVS or SVN repository.
21463 If you use remote GIT repositories you need to do the
21464 \begin_inset Flex Code
21467 \begin_layout Plain Layout
21474 \begin_inset Flex Code
21477 \begin_layout Plain Layout
21483 operations with your favourite GIT client.
21486 \begin_layout Subsubsection
21492 \begin_layout Standard
21493 If your document is not under revision control, this is the only item shown
21495 And if it is under revision control, the
21499 item is not visible.
21502 \begin_layout Standard
21503 This command registers in GIT your document ONLY in case you have already
21504 the documents directory under GIT control (in particular
21509 This means you have to checkout the archive by yourself.
21512 \begin_layout Standard
21513 Then you are asked interactively to supply an initial description of the
21515 Don't forget that registered file is not yet commited.
21518 \begin_layout Standard
21519 GIT command that is run:
21522 \begin_inset Quotes eld
21526 \begin_inset Quotes erd
21532 \begin_layout Standard
21537 to understand the switches.
21540 \begin_layout Subsubsection
21546 \begin_layout Standard
21547 When you are finished editing a file, you commit your changes.
21548 When you do this, you are asked for a description of the changes.
21549 After that changes are commited.
21552 \begin_layout Standard
21555 git commit -q -m"<description>" <file-name>
21558 \begin_layout Subsubsection
21561 Revert To Repository Version
21564 \begin_layout Standard
21565 This will discard all changes made to the document since the last check
21567 You get a warning before changes are discarded.
21570 \begin_layout Standard
21574 \begin_inset Quotes eld
21578 \begin_inset Quotes erd
21584 \begin_layout Subsubsection
21590 \begin_layout Standard
21591 This will rename the current document including the version history.
21592 It requires a clean document without any changes since the last checkin.
21593 You are asked for a file name and a description of the rename operation.
21594 After that the document is renamed, both locally and in the repository.
21595 If the parent directories of the new and old file names differ, all relative
21596 paths of included files are adjusted (like in
21598 File\SpecialChar menuseparator
21603 Finally, the document is reloaded using the new name.
21606 \begin_layout Labeling
21607 \labelwidthstring 00.00.0000
21609 \begin_inset space ~
21613 \begin_inset space ~
21617 \begin_inset Newline newline
21621 \begin_inset Flex Code
21624 \begin_layout Plain Layout
21628 \begin_inset Quotes eld
21632 \begin_inset Quotes erd
21636 \begin_inset Quotes eld
21640 \begin_inset Quotes erd
21649 \begin_inset Newline newline
21653 \begin_inset Flex Code
21656 \begin_layout Plain Layout
21665 \begin_layout Subsubsection
21671 \begin_layout Standard
21672 This shows the complete history of the GIT document.
21676 \begin_inset Quotes eld
21680 \begin_inset Quotes erd
21685 is shown in a browser.
21688 \begin_layout Subsubsection
21692 \begin_layout Standard
21694 supports GIT hash number of the last commit to the file, author name, date
21695 and time of last commit.
21696 All those are extracted from
21698 git log -n 1 --pretty=format:%H%n%an%n%ai
21701 Tree version information is obtained via
21703 git describe --abbrev --dirty --long
21707 \begin_inset CommandInset ref
21709 reference "subsec:VCS-Revision-Information"
21716 \begin_layout Subsection
21720 \begin_layout Standard
21721 With the recent addition of the vc-command function \SpecialChar LyX
21722 power users are allowed
21723 to create their own commands for revision control.
21726 \begin_layout Standard
21727 As an example you can see how two TortoiseSVN commands could be integrated
21731 \begin_layout Description
21733 \begin_inset Flex Code
21736 \begin_layout Plain Layout
21737 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21745 \begin_layout Description
21747 \begin_inset Flex Code
21750 \begin_layout Plain Layout
21751 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21759 \begin_layout Subsection
21760 Version control and Document comparison
21763 \begin_layout Standard
21764 One of the typical uses of version control is to inspect the changes between
21765 revisions, usually by creating
21766 \begin_inset Flex Code
21769 \begin_layout Plain Layout
21776 While this is useful for plain text files, it is much less useful in the
21777 case of \SpecialChar LyX
21778 files, which have more a complicated structure.
21779 Hence we provide binding to the Document comparison feature.
21780 There are two ways of calling this feature - either by direct call of
21781 \begin_inset Flex Code
21784 \begin_layout Plain Layout
21791 function (for details see \SpecialChar LyX
21792 functions manual) or by icon/menu item
21793 \begin_inset Flex Noun
21796 \begin_layout Plain Layout
21797 Compare with older revision...
21803 One can either compare two chosen revisions of the document or he can simply
21804 compare the current version of edited text with older revisions (where
21806 \begin_inset Flex Noun
21809 \begin_layout Plain Layout
21815 ' revisions back means comparison of the edited file with last commited
21820 \begin_layout Standard
21821 This feature is supported for SVN and RCS though due to the more complicated
21822 versioning scheme of RCS there is a constraint – when addressing the revisions
21823 in dialog, numbers always point to the last number in RCS revision number,
21826 We don't currently support GIT addressing of revisions, one can just compare
21827 edited document with its revision X steps backs, where X is addressed as
21831 \begin_layout Section
21832 Literate Programming
21835 \begin_layout Standard
21840 (kayvan@sylvan.com)
21844 original documentation written by
21846 Edmar Wienskoski Jr.
21849 (edmar-w-jr@technologist.com)
21852 \begin_layout Subsection
21856 \begin_layout Standard
21857 The main purpose of this documentation is to show you how to use \SpecialChar LyX
21859 programming, where it is assumed that you are familiar with this programming
21860 technique, and know what
21861 \begin_inset Quotes eld
21865 \begin_inset Quotes erd
21869 \begin_inset Quotes eld
21873 \begin_inset Quotes erd
21877 If that is not the case, please follow the web links provided in the following
21879 There is a lot of good documentation out there covering old development
21880 history to the latest tools tips.
21883 \begin_layout Standard
21884 It is also assumed that you are familiar with \SpecialChar LyX
21885 itself to a point that you
21886 are comfortable changing your \SpecialChar LyX
21887 preferences, and X resources file.
21888 If that is not the case please refer to other \SpecialChar LyX
21889 documentation to cover your
21893 \begin_layout Subsection
21894 Literate Programming
21897 \begin_layout Standard
21898 From the Literate Programming FAQ:
21901 \begin_layout Quotation
21902 Literate programming is the combination of documentation and source together
21903 in a fashion suited for reading by human beings.
21904 In fact, literate programs should be enjoyable reading, even inviting!
21905 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21906 and documentation in a single file.
21907 Literate programming tools then parse the file to produce either readable
21908 documentation or compilable source.
21909 The WEB style of literate programming was created by D.
21910 \begin_inset space \thinspace{}
21914 Knuth during the development of his \SpecialChar TeX
21915 typesetting software.
21919 \begin_layout Standard
21920 Another excerpt says:
21923 \begin_layout Quotation
21926 How is literate programming different from verbose commenting?
21929 \begin_layout Quotation
21930 There are three distinguishing characteristics.
21931 In order of importance, they are:
21935 \begin_layout Itemize
21936 flexible order of elaboration
21939 \begin_layout Itemize
21940 automatic support for browsing
21943 \begin_layout Itemize
21944 typeset documentation, especially diagrams and mathematics
21948 \begin_layout Standard
21949 Now that I sparked your curiosity, take a look in the references.
21952 \begin_layout Subsubsection
21956 \begin_layout Standard
21957 The complete Literate Programming FAQ can be found at:
21960 \begin_layout Quote
21961 Literate Programming FAQ
21962 \begin_inset Flex URL
21965 \begin_layout Plain Layout
21967 http://www.literateprogramming.com/lpfaq.pdf
21975 \begin_layout Standard
21976 The FAQ lists 23 (twenty three!) different literate programming tools.
21977 Where some are specialized or
21978 \begin_inset Quotes eld
21982 \begin_inset Quotes erd
21985 for particular programming languages, while other have general scope.
21990 for my own use for several reasons:
21993 \begin_layout Itemize
21994 It can generate the documentation either in \SpecialChar LaTeX
21998 \begin_layout Itemize
21999 It has a open architecture, i.
22000 \begin_inset space \thinspace{}
22004 \begin_inset space \space{}
22007 it is easy to plug in new filters and to perform special processing that
22012 \begin_layout Itemize
22013 There is a good selection of filters available already (the HTML is one
22017 \begin_layout Itemize
22021 \begin_layout Standard
22022 The Noweb web page can be found at:
22025 \begin_layout Quote
22027 \begin_inset Flex URL
22030 \begin_layout Plain Layout
22032 http://www.cs.virginia.edu/~nr/noweb/
22040 \begin_layout Standard
22041 Starting from there you can reach many other interesting links and even
22042 some literate program examples.
22045 \begin_layout Subsection
22047 and Literate Programming with Noweb
22050 \begin_layout Standard
22051 The \SpecialChar LyX
22052 support for Literate Programming is provided by using the generic \SpecialChar LyX
22054 converters mechanism.
22055 This support is provided in a
22056 \begin_inset Quotes eld
22060 \begin_inset Quotes erd
22064 \begin_inset space \thinspace{}
22068 \begin_inset space \space{}
22071 you will be able to use this new \SpecialChar LyX
22072 feature with some other literate programming
22073 tool of your choice by just changing your \SpecialChar LyX
22077 \begin_layout Subsubsection
22078 Generating documents and code (weaving and tangling)
22081 \begin_layout Paragraph
22082 Using the noweb module
22085 \begin_layout Standard
22086 If you have installed Noweb and \SpecialChar LyX
22087 successfully, whenever you open a new document,
22088 after you have chosen its document class, use the Document->Settings menu
22090 \begin_inset Quotes eld
22094 \begin_inset Quotes erd
22098 If Noweb is correctly installed, when you click on the
22099 \begin_inset Quotes eld
22103 \begin_inset Quotes erd
22106 link, you will see the
22107 \begin_inset Quotes eld
22111 \begin_inset Quotes erd
22114 module in the available list and you can add it to your document.
22117 \begin_layout Paragraph
22121 \begin_layout Standard
22123 enables you to write code with a layout named
22124 \begin_inset Flex Noun
22127 \begin_layout Plain Layout
22134 Noweb delimits chunks like this:
22137 \begin_layout LyX-Code
22141 \begin_layout LyX-Code
22145 \begin_layout LyX-Code
22149 \begin_layout LyX-Code
22153 \begin_layout LyX-Code
22157 \begin_layout Standard
22158 The problem is that whatever is written in between the << and the
22162 must be taken literally, i.
22163 \begin_inset space \thinspace{}
22167 \begin_inset space \space{}
22171 should be prevented from making any special interpretation of what has
22173 This is also handled by
22174 \begin_inset Flex Noun
22177 \begin_layout Plain Layout
22183 , that works like a normal paragraph but has a free spacing capability.
22186 \begin_layout Standard
22187 As a special note, you can also use the
22188 \begin_inset Quotes eld
22192 \begin_inset Quotes erd
22195 construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
22199 \begin_layout LyX-Code
22203 \begin_layout LyX-Code
22204 def some_function(args):
22207 \begin_layout LyX-Code
22208 "This is the doc string for this function."
22211 \begin_layout LyX-Code
22212 print "My args: ", args
22215 \begin_layout LyX-Code
22216 @ %def some_function
22219 \begin_layout Standard
22220 For an example of this usage and the resulting cross-reference output, look
22221 at the Literate python program in
22223 LIBDIR/examples/listerrors.lyx
22225 which should make this all clear.
22228 \begin_layout Paragraph
22229 Generating the documentation
22232 \begin_layout Standard
22233 At this point you already have a new document file with a proper document
22234 class, and with some code and text on it.
22235 How do I print it? The answer is simple, you select
22237 View\SpecialChar menuseparator
22241 Just like you would do for a plain document.
22242 No special procedure is required.
22245 \begin_layout Standard
22246 To help orientate you, I will now explain what happens inside \SpecialChar LyX
22250 \begin_layout Enumerate
22253 Update\SpecialChar menuseparator
22256 menu option is chosen, a \SpecialChar LaTeX
22262 \begin_layout Standard
22263 If the document is of any literate class the generated file will be named
22264 with an extension name defined by the
22265 \begin_inset Quotes eld
22269 \begin_inset Quotes erd
22272 format (defined in the Preferences panel), otherwise the file will have
22281 \begin_layout Enumerate
22282 Note that the only difference so far is in the name of the file, no special
22283 processing is required by \SpecialChar LyX
22285 Given that you formatted the code using the
22286 \begin_inset Flex Noun
22289 \begin_layout Plain Layout
22295 layout that, by itself, takes care of the business.
22298 \begin_layout Enumerate
22299 If the document is of any literate class \SpecialChar LyX
22300 will then use the internal \SpecialChar LyX
22302 Noweb converter, followed by the Noweb to \SpecialChar LaTeX
22307 \begin_layout Plain Layout
22308 The converters are defined in the
22310 Tools\SpecialChar menuseparator
22314 \begin_inset Quotes eld
22318 \begin_inset Quotes erd
22330 manual for general information about converters.
22335 to generate the \SpecialChar LaTeX
22340 \begin_layout Standard
22341 Otherwise it will just skip this step.
22345 \begin_layout Enumerate
22346 Finally, \SpecialChar LaTeX
22347 is invoked and the regular post processing continues as in a plain
22351 \begin_layout Standard
22352 Independence from a particular
22353 \begin_inset Quotes eld
22357 \begin_inset Quotes erd
22360 is easily achieved by changing the commands that are run by the various
22364 \begin_layout Paragraph
22365 Generating the code
22368 \begin_layout Standard
22369 When the build menu option is chosen or the corresponding button in the
22370 toolbar is pressed, a \SpecialChar LaTeX
22371 file is generated just like step 1 above.
22372 Next, \SpecialChar LyX
22378 This converter needs to be defined by the user and is not installed by
22379 default, though the Program format is.
22380 This converter (like any other converter) will have two parts:
22383 \begin_layout Enumerate
22384 The converter program itself.
22385 This program performs the conversion from the one format to the other (in
22386 this case, from the Noweb format to the Program pseudo-format).
22389 \begin_layout Enumerate
22390 The error log parser.
22391 This is a program whose sole purpose is to rewrite error messages in a
22392 format that \SpecialChar LyX
22394 This makes it possible for \SpecialChar LyX
22395 to place error boxes in the right places in
22399 \begin_layout Standard
22400 The first part, the
22401 \begin_inset Quotes eld
22405 \begin_inset Quotes erd
22408 setting, should be set to
22409 \begin_inset Newline newline
22413 \begin_inset Quotes eld
22421 \begin_inset Quotes erd
22425 \begin_inset Newline newline
22428 This basically means that \SpecialChar LyX
22430 \begin_inset Quotes eld
22434 \begin_inset Quotes erd
22437 (a program or script) with the name of the Noweb file (normally a file
22438 in the \SpecialChar LyX
22439 temp directory) and the directory path of the original \SpecialChar LyX
22444 \begin_layout Standard
22445 This is an implementation of
22446 \begin_inset Quotes eld
22450 \begin_inset Quotes erd
22453 that you can place in a directory on your path:
22456 \begin_layout Standard
22457 \begin_inset VSpace defskip
22463 \begin_layout Standard
22464 \begin_inset Newpage pagebreak
22470 \begin_layout Standard
22476 \begin_layout Standard
22482 \begin_layout Standard
22485 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
22488 \begin_layout Standard
22489 \begin_inset VSpace defskip
22495 \begin_layout Standard
22496 The next part of the converter setting is the
22497 \begin_inset Quotes eld
22501 \begin_inset Quotes erd
22504 which is to be set to
22505 \begin_inset Newline newline
22509 \begin_inset Quotes eld
22514 parselog=$$s/scripts/listerrors
22517 \begin_inset Quotes erd
22521 \begin_inset Newline newline
22524 This will run any errors that are generated by the
22525 \begin_inset Quotes eld
22529 \begin_inset Quotes erd
22532 process through the
22533 \begin_inset Quotes eld
22537 \begin_inset Quotes erd
22543 \begin_layout Standard
22544 The build will normally take place in \SpecialChar LyX
22545 's temporary directory, so the files
22546 produced by the conversion will be in that directory.
22548 will copy out what it regards as the `main' file, but the
22552 conversion may produce several files, and so most of these would then be
22553 deleted when \SpecialChar LyX
22555 This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
22556 the build-script chunk can place the generated files in that location.
22559 \begin_layout Paragraph
22560 Build instructions in the document
22563 \begin_layout Standard
22564 The last piece of the integration between \SpecialChar LyX
22566 \begin_inset Quotes eld
22570 \begin_inset Quotes erd
22574 Generally, the instructions for building your program should be embedded
22575 in a chunk of its own.
22577 \begin_inset Quotes eld
22581 \begin_inset Quotes erd
22584 above uses the notangle command to look for this chunk (called
22585 \begin_inset Quotes eld
22589 \begin_inset Quotes erd
22592 ) and runs its contents through
22593 \begin_inset Quotes eld
22597 \begin_inset Quotes erd
22603 \begin_layout Standard
22604 Typically, such a chunk would look something like this:
22607 \begin_layout LyX-Code
22611 \begin_layout LyX-Code
22613 \begin_inset Newline newline
22616 if [ -z "${NOWEB_SOURCE}" ]
22617 \begin_inset Newline newline
22623 \begin_layout LyX-Code
22624 NOWEB_SOURCE=myfile.nw
22625 \begin_inset Newline newline
22629 \begin_inset Newline newline
22633 code to extract files ...
22634 use NOWEB_OUTPUT_DIR here ...]
22635 \begin_inset Newline newline
22639 code to compile files ...]
22640 \begin_inset Newline newline
22646 \begin_layout Standard
22649 LIBDIR/examples/listerrors.lyx
22653 LIBDIR/examples/Literate.lyx
22655 which implement two versions of the
22656 \begin_inset Quotes eld
22660 \begin_inset Quotes erd
22663 program for some illustrations of how all of these pieces go together or
22666 LIBDIR/examples/noweb2lyx.lyx.
22669 Interestingly, these three files show off the language-indepence of the
22671 literate programming support since they are written in Python, C and Perl
22675 \begin_layout Subsubsection
22676 Configuring \SpecialChar LyX
22680 \begin_layout Standard
22681 All the Literate Programming support is configured by the
22683 Tools\SpecialChar menuseparator
22687 \begin_inset Quotes eld
22691 \begin_inset Quotes erd
22695 The important parts are:
22698 \begin_layout Description
22700 \begin_inset space ~
22704 \begin_inset Quotes eld
22708 \begin_inset Quotes erd
22712 \begin_inset space ~
22715 format Set up via the File Formats tab, this is where the Noweb-specific
22725 , the file extension is set to
22730 This tells \SpecialChar LyX
22731 to create a file with a
22735 extension in the first step of the conversion process.
22738 \begin_layout Description
22740 \begin_inset space ~
22748 \begin_inset space ~
22751 format This is an empty format whose sole purpose is to be the endpoint
22752 of a conversion (which then allows us to set up a converter for it).
22755 \begin_layout Description
22765 This converter performs the
22766 \begin_inset Quotes eld
22770 \begin_inset Quotes erd
22773 of the literate document.
22774 For Noweb, it is set to
22775 \begin_inset Quotes eld
22780 noweave -delay -index $$i > $$o
22783 \begin_inset Quotes erd
22789 \begin_layout Description
22799 \begin_inset Quotes eld
22803 \begin_inset Quotes erd
22807 As stated above, the Converter is set to
22808 \begin_inset Quotes eld
22816 \begin_inset Quotes erd
22819 , with Flags set to
22820 \begin_inset Newline newline
22824 \begin_inset Quotes eld
22829 parselog=$$s/scripts/listerrors
22832 \begin_inset Quotes erd
22838 \begin_layout Subsubsection
22842 \begin_layout Standard
22843 There is also a new function implemented in the \SpecialChar LyX
22845 \begin_inset Quotes eld
22848 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22852 \begin_layout Standard
22853 When debugging code with ddd/gdb, it is possible to invoke a text editor
22854 at the current execution position with a single key stroke.
22855 The default ddd configuration for that is shift-ctrl-V.
22856 It happens that you can define the editor command line invocation in ddd
22859 Edit\SpecialChar menuseparator
22860 Preferences\SpecialChar menuseparator
22863 dialog and changing the "Edit Sources" entry.
22866 \begin_layout Standard
22867 I take advantage of the newly created \SpecialChar LyX
22868 server function and this ddd feature,
22870 \begin_inset Quotes eld
22874 \begin_inset Quotes erd
22880 \begin_layout Standard
22881 \begin_inset VSpace defskip
22887 \begin_layout Standard
22890 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22893 \begin_layout Standard
22894 \begin_inset VSpace defskip
22900 \begin_layout Standard
22901 With this, whenever you are using ddd and find a point in the program that
22902 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22903 ddd will forward this information to \SpecialChar LyX
22904 through the \SpecialChar LyX
22905 server and then the
22907 window will show the same file with the cursor at the same position ddd
22909 No more guessing or long scrolling to locate a point in the program back
22913 \begin_layout Standard
22914 Note however that you must enable the \SpecialChar LyX
22915 server to get this feature working
22916 (it is disabled by default).
22917 You can enable it in
22929 ) by entering in the
22935 \begin_inset Quotes eld
22940 /home/<your-home-directory>/.lyx/lyxpipe
22943 \begin_inset Quotes erd
22949 \begin_layout Standard
22950 Read the \SpecialChar LyX
22951 server documentation in the
22953 Customization Manual
22955 for further information.
22958 \begin_layout Subsubsection
22962 \begin_layout Standard
22963 There are six new buttons that can be added to your \SpecialChar LyX
22965 Five of these buttons are short cuts to layout styles:
22988 The last one is a short cut to the
22989 \begin_inset Quotes eld
22993 \begin_inset Quotes erd
23000 \begin_layout Standard
23002 has a range of buttons that are available for tool bar customization.
23003 In my toolbar I like to combine the six short cuts above with two more:
23008 \SpecialChar menuseparator
23013 \SpecialChar menuseparator
23020 Document\SpecialChar menuseparator
23021 View\SpecialChar menuseparator
23025 Here is how it looks like:
23028 \begin_layout LyX-Code
23032 \begin_layout LyX-Code
23036 \begin_layout LyX-Code
23037 Icon "layout Standard"
23040 \begin_layout LyX-Code
23041 Icon "layout Section"
23044 \begin_layout LyX-Code
23045 Icon "layout \SpecialChar LaTeX
23049 \begin_layout LyX-Code
23050 Icon "layout \SpecialChar LyX
23054 \begin_layout LyX-Code
23055 Icon "layout Chunk"
23058 \begin_layout LyX-Code
23062 \begin_layout LyX-Code
23066 \begin_layout LyX-Code
23067 Icon "buffer-typeset"
23070 \begin_layout LyX-Code
23071 Icon "build-program"
23074 \begin_layout LyX-Code
23078 \begin_layout LyX-Code
23082 \begin_layout LyX-Code
23086 \begin_layout LyX-Code
23090 \begin_layout LyX-Code
23094 \begin_layout Subsubsection
23095 Colors customization
23098 \begin_layout Standard
23099 There are a number of colors in \SpecialChar LyX
23100 that can be customized in
23105 One of the things that bothers people is the \SpecialChar LaTeX
23107 The default color is red, since the chunks uses \SpecialChar LaTeX
23108 font, and there is a lot
23109 of chunks in literate documents, you may get tired of seeing everything
23111 You can change it by going to the tabs
23120 \begin_layout Standard
23121 The next thing is the visible presence of the newline character in the screen.
23122 You can choose the color of this particular character and make it blend
23124 I recommend you choosing a color that is close to the background but not
23125 equal, that way you still can see it is there, but it is not bothering
23129 \begin_layout Subsection
23134 \begin_layout Standard
23143 is documented in the
23147 example file and in the Sweave manual (menu
23149 Help\SpecialChar menuseparator
23155 \begin_layout Chapter
23160 \begin_layout Standard
23161 Users sometimes need to be able to
23162 \begin_inset Quotes eld
23166 \begin_inset Quotes erd
23170 file together with all the images (and other files) on which it depends,
23171 either for sending to a publisher or for sharing with a co-author.
23173 2.0 includes a Python script (
23174 \begin_inset Flex Code
23177 \begin_layout Plain Layout
23183 ) that automates this process.
23184 To use it, you must have either the
23185 \begin_inset Flex Code
23188 \begin_layout Plain Layout
23195 \begin_inset Flex Code
23198 \begin_layout Plain Layout
23204 python modules installed on your system.
23205 By default, the script prefers the
23206 \begin_inset Flex Code
23209 \begin_layout Plain Layout
23216 \begin_inset Flex Code
23219 \begin_layout Plain Layout
23225 format on Unix-like systems and the
23226 \begin_inset Flex Code
23229 \begin_layout Plain Layout
23238 \begin_layout Standard
23240 's configuration process will set the script up to export a `\SpecialChar LyX
23242 and this format will then be available under
23243 \begin_inset Flex Code
23246 \begin_layout Plain Layout
23247 File\SpecialChar menuseparator
23256 \begin_layout Standard
23257 Independently of the platform, the generation of a particular archive format
23258 can be forced by adding either the
23259 \begin_inset Flex Code
23262 \begin_layout Plain Layout
23269 \begin_inset Flex Code
23272 \begin_layout Plain Layout
23279 \begin_inset Flex Code
23282 \begin_layout Plain Layout
23289 \begin_inset Flex Code
23292 \begin_layout Plain Layout
23298 format) switch to the
23299 \begin_inset Flex Code
23302 \begin_layout Plain Layout
23304 \SpecialChar menuseparator
23312 \begin_inset Flex Code
23315 \begin_layout Plain Layout
23316 Tools\SpecialChar menuseparator
23317 Preferences\SpecialChar menuseparator
23318 File Handling\SpecialChar menuseparator
23325 (Make sure you add the switch after the script name, not before it.)
23328 \begin_layout Chapter
23330 and the World Wide Web
23333 \begin_layout Standard
23335 has long supported the export of documents to various web-friendly formats,
23337 Before verson 2.0, however, HTML export was always accomplished by the use
23338 of external converters.
23342 \begin_layout Plain Layout
23343 For details on the use of external converters with \SpecialChar LyX
23348 section of the Customization manual.
23353 These fall into two large groups: there are converters that use \SpecialChar LaTeX
23355 intermediate format, such as
23356 \begin_inset Flex Code
23359 \begin_layout Plain Layout
23366 \begin_inset Flex Code
23369 \begin_layout Plain Layout
23376 \begin_inset Flex Code
23379 \begin_layout Plain Layout
23385 , relying upon \SpecialChar LyX
23386 to produce the \SpecialChar LaTeX
23387 ; and there is a converter that works directly
23388 on \SpecialChar LyX
23390 \begin_inset Flex Code
23393 \begin_layout Plain Layout
23401 All of these have different advantages and disadvantages.
23405 \begin_layout Standard
23406 The \SpecialChar LaTeX
23407 -based converters have the advantage that, in principle, they know everythin
23408 g about the exported document that \SpecialChar LaTeX
23410 Such converters do not care, for example, if a certain block of code was
23411 produced by \SpecialChar LyX
23412 or was Evil Red Text.
23413 These converters know about
23414 \begin_inset Flex Code
23417 \begin_layout Plain Layout
23423 files, counters, and references, and can often make use of the
23424 \begin_inset Flex Code
23427 \begin_layout Plain Layout
23433 files generated by Bib\SpecialChar TeX
23435 On the other hand, \SpecialChar LaTeX
23436 is a very hard language to parse—it is sometimes said
23437 that only \SpecialChar TeX
23438 itself understands \SpecialChar TeX
23439 —and \SpecialChar LaTeX
23440 -based converters will often choke on
23441 what seem to be quite simple constructs; complex ones can throw them completely
23442 , and as of this writing, for example, the
23446 manual will not export with
23447 \begin_inset Flex Code
23450 \begin_layout Plain Layout
23456 , though the others will.
23457 The other issue concerns how math is handled.
23458 These converters typically convert the formulae into little pictures that
23459 are then linked from the HTML document.
23460 Since these are actually generated by \SpecialChar LaTeX
23461 , they are accurate.
23462 But they do not scale well, and just getting them to look as if they are
23463 actually meant to be in your document—so that the font sizes seem to be
23464 roughly the same—can be a challenge.
23467 \begin_layout Standard
23469 \begin_inset Flex Code
23472 \begin_layout Plain Layout
23480 \begin_inset CommandInset href
23482 name "http://elyxer.nongnu.org/"
23483 target "http://elyxer.nongnu.org/"
23487 ) solves some of these problems.
23488 In particular, the formulae it produces scale perfectly, since it renders
23489 math using a combination of HTML and CSS rather than converting the formulae
23491 But even moderately complex formula are rendered less well than with
23492 \begin_inset Flex Code
23495 \begin_layout Plain Layout
23501 ; this reflects the limitations of HTML.
23505 \begin_layout Plain Layout
23507 \begin_inset Flex Code
23510 \begin_layout Plain Layout
23517 can also use jsMath and MathJax for equations, but this setting is only
23518 available globally and requires one to have access to a server that runs
23524 More importantly (as of version 1.1.1, at least),
23525 \begin_inset Flex Code
23528 \begin_layout Plain Layout
23535 has limited support for math macros and no support for user-defined paragraph
23536 or character styles.
23537 These limitations make
23538 \begin_inset Flex Code
23541 \begin_layout Plain Layout
23548 unsuitable for many of the documents \SpecialChar LyX
23550 In principle, of course, these problems could be solved, but the \SpecialChar LyX
23552 have decided to follow a different path and have made \SpecialChar LyX
23554 writing XHTML, just as it is capable of writing \SpecialChar LaTeX
23555 , DocBook, and plaintext.
23558 \begin_layout Standard
23559 As of this writing, XHTML output remains under development and should probably
23561 \begin_inset Quotes eld
23565 \begin_inset Quotes erd
23572 \begin_layout Plain Layout
23574 \begin_inset Flex Code
23577 \begin_layout Plain Layout
23578 development/HTML.notes
23583 , which can be found in the \SpecialChar LyX
23585 \begin_inset CommandInset href
23587 name "accessed online"
23588 target "http://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
23592 , usually contains up-to-date information about the state of XHTML output.
23593 See also the list of XHTML bugs on
23594 \begin_inset CommandInset href
23596 name "the bug tracker"
23597 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"
23606 Still, the developers have chosen this approach because it has several
23607 potential advantages over the other two.
23610 \begin_layout Standard
23611 These advantages are primarily due to the fact that the XHTML output routines,
23612 since they are part of \SpecialChar LyX
23613 , know everything \SpecialChar LyX
23614 knows about the document being
23619 \begin_layout Plain Layout
23620 Another advantage is that, since these routines are internal to \SpecialChar LyX
23622 immune to changes in \SpecialChar LyX
23623 's file format, or to changes in the semantics of
23629 So they know about the table of contents (as displayed in the outline),
23630 about the counters associated with different paragraph styles, and about
23631 user-defined styles.
23632 The XHTML output routines know what \SpecialChar LyX
23633 knows about internationalization,
23634 too, so they will output
23635 \begin_inset Quotes eld
23639 \begin_inset Quotes erd
23643 \begin_inset Quotes eld
23651 \begin_inset Quotes erd
23654 , depending upon the language in effect at the time.
23658 \begin_layout Standard
23659 Quite generally, the output routines know what \SpecialChar LyX
23660 knows about document layout,
23661 that is, about how the document is to be rendered on screen.
23662 We use this information when we output the document as XHTML.
23663 In particular, \SpecialChar LyX
23668 generates CSS style information corresponding to the layout information
23669 it uses to render the document on screen: if section headings are supposed
23670 to be sans-serif and bold as seen in \SpecialChar LyX
23671 , then (by default) they will be sans-seri
23672 f and bold when viewed in a web browser, too.
23673 And this is true not just for pre-defined styles, like Section, but for
23674 any style, including user-defined styles.
23675 Indeed, the XHTML output routines make no distinction between user-defined
23676 paragraph and character styles and \SpecialChar LyX
23677 's own pre-defined styles: in each case,
23678 everything \SpecialChar LyX
23679 knows about the styles is contained in the layout files.
23680 And much the same is true as regards pre-defined textual insets, such as
23681 footnotes, and various custom insets.
23685 \begin_layout Standard
23686 The result is that XHTML output can be customized and extended in exactly
23687 the same way \SpecialChar LaTeX
23688 output can be customized and extended: through layout files
23690 See chapter five of the
23694 manual for the details.
23697 \begin_layout Standard
23698 The remainder of this chapter contains more detailed information on XHTML
23699 output, its limitations, and ways to work around those limitations.
23702 \begin_layout Section
23703 Math Output in XHTML
23706 \begin_layout Standard
23708 offers four choices for how math is rendered.
23709 These have various advantages and disadvantages:
23712 \begin_layout Itemize
23714 \begin_inset Newline newline
23717 MathML is a dialect of XML designed specifically for mathematics on the
23718 web, and it typically renders very well in browsers that support it.
23719 The disadvantage is that not all browsers support MathML, and support is
23720 not complete even in the Gecko-based browsers, such as Firefox.
23721 \begin_inset Newline newline
23724 If \SpecialChar LyX
23725 is unable to render a formula as MathML—for example, if the formula
23727 \begin_inset Flex Code
23730 \begin_layout Plain Layout
23736 package or ERT—then it will instead output the formula as an image.
23740 \begin_layout Itemize
23742 \begin_inset Newline newline
23745 As mentioned above,
23746 \begin_inset Flex Code
23749 \begin_layout Plain Layout
23755 outputs math as HTML, styled by CSS.
23759 \begin_layout Plain Layout
23761 has borrowed some of the CSS for its HTML output from
23762 \begin_inset Flex Code
23765 \begin_layout Plain Layout
23776 For simple formulae, this can work quite well, though with more complicated
23777 formulae it tends to break down.
23778 Still, this method has the advantage that it is very widely supported and
23779 so it may be appropriate for documents that contain only a little, fairly
23781 \begin_inset Newline newline
23784 If Lyx is unable to render a formula as HTML—for example, if the formula
23786 \begin_inset Flex Code
23789 \begin_layout Plain Layout
23795 package or ERT—then it will instead output the formula as an image.
23799 \begin_layout Itemize
23801 \begin_inset Newline newline
23805 \begin_inset Flex Code
23808 \begin_layout Plain Layout
23815 will output formulae as images, the very same images, in fact, that are
23816 used for instant preview.
23820 \begin_layout Plain Layout
23821 Instant preview does
23825 have to be on for images to be output, however.
23830 The advantage to this method is that the images are simply generated by
23832 , so they are very accurate.
23833 The disadvantage, as mentioned earlier, is that these are bitmapped images,
23834 so they do not scale terribly well, and one cannot copy them, etc.
23835 (As of this writing, there are also problems about equation numbering.
23837 \begin_inset CommandInset href
23840 target "http://www.lyx.org/trac/ticket/6894"
23845 \begin_inset Newline newline
23848 The size of the images can be controlled by setting the
23849 \begin_inset Quotes eld
23852 Math Images Scaling
23853 \begin_inset Quotes erd
23857 \begin_inset Flex Noun
23860 \begin_layout Plain Layout
23861 Document\SpecialChar menuseparator
23862 Settings\SpecialChar menuseparator
23872 \begin_layout Plain Layout
23873 For those who want to know, this controls the resolution of the image in
23874 dots per inch and is based upon a default of 75 dpi.
23880 \begin_inset Newline newline
23883 If \SpecialChar LyX
23884 for some reason fails to create an image for a formula (e.g., if a required
23886 package is not installed), then it will fall back to outputing the raw
23891 \begin_layout Itemize
23894 \begin_inset Newline newline
23897 Finally, \SpecialChar LyX
23898 will happily output math as \SpecialChar LaTeX
23900 As well as being the output of last resort, this method can be used with
23902 \begin_inset CommandInset href
23905 target "http://www.math.union.edu/~dpvc/jsMath/"
23909 , which uses JavaScript to render \SpecialChar LaTeX
23910 embedded in HTML documents.
23912 wraps the \SpecialChar LaTeX
23914 \begin_inset Flex Code
23917 \begin_layout Plain Layout
23923 (for inline formulas) or
23924 \begin_inset Flex Code
23927 \begin_layout Plain Layout
23933 (for displayed formulas) with
23934 \begin_inset Flex Code
23937 \begin_layout Plain Layout
23943 , as is required for jsMath.
23946 \begin_layout Standard
23947 One of these output methods must be selected under
23948 \begin_inset Flex Noun
23951 \begin_layout Plain Layout
23952 Document\SpecialChar menuseparator
23953 Settings\SpecialChar menuseparator
23960 By default, \SpecialChar LyX
23962 This is a document-wide setting, therefore.
23965 \begin_layout Standard
23966 Eventually, \SpecialChar LyX
23967 will offer the user the option to select an alternate output
23968 method for a particular inset, say, one that isn't being rendered very
23973 \begin_layout Plain Layout
23974 That said, since \SpecialChar LyX
23975 falls back to images if the inset contains ERT, then one
23976 can force output as an image by putting some harmless ERT into the math,
23978 \begin_inset Formula $a=b\relax$
23989 \begin_layout Section
23990 Bibliography and Citations
23993 \begin_layout Standard
23994 XHTML output fully supports bibliographies and citations.
23998 \begin_layout Standard
23999 Citation labels are generated by the same machinery that generates \SpecialChar LyX
24001 labels, so the labels will look in the output much as they do in \SpecialChar LyX
24004 If you are using numerical citations, then \SpecialChar LyX
24005 will output numerical labels,
24006 such as [1] or [17], rather than simply showing the citation key in square
24007 brackets, as it does on-screen.
24008 If you are using author-year citations, then \SpecialChar LyX
24009 will add lowercase letters
24010 to the years, just as Bib\SpecialChar TeX
24011 does, if it finds more than one citation for
24012 a given author-year combination.
24013 The labels will be printed with the bibliography entries.
24014 Note that there is, at present, no way to customize the appearance of the
24015 labels, for example, to choose between square brackets and parentheses.
24018 \begin_layout Standard
24019 Bibliography output is handled by the same machinery that handles the presentati
24020 on of reference information in the citation dialog, so you will see in the
24021 XHTML output pretty much what you would see if you were to look at a given
24022 entry in the citation dialog.
24023 The formatting can be customized in your layout file or, preferably, in
24029 manual for the details.
24032 \begin_layout Standard
24033 The main defect at present is that cross-referenced information is printed
24034 with every entry with which it is associated.
24035 So you can see things like this:
24038 \begin_layout Quote
24040 \begin_inset Quotes eld
24043 Context and Logical Form
24044 \begin_inset Quotes erd
24049 Language in Context: Selected Essays
24051 (Oxford: Oxford University Press, 2007), pp.
24055 \begin_layout Quote
24057 \begin_inset Quotes eld
24060 Semantics in Context
24061 \begin_inset Quotes erd
24066 Language in Context: Selected Essays
24068 (Oxford: Oxford University Press, 2007), pp.
24072 \begin_layout Standard
24073 This should be fixed before long.
24076 \begin_layout Standard
24077 There is no support at present for sectioned bibliographies.
24078 If you have multiple bibliographies, then \SpecialChar LyX
24079 will print the same bibliography
24083 \begin_layout Section
24087 \begin_layout Standard
24089 will happily export indexes as XHTML, but with certain limitations at the
24093 \begin_layout Standard
24094 Index export will be most reliable when you do not attempt to use the fancy
24095 constructs that are described in the section on indexes in the
24103 \begin_layout Plain Layout
24104 The main issue here is that \SpecialChar LyX
24105 itself does not really handle these.
24106 It just lets you enter what you would have to enter in raw \SpecialChar LaTeX
24112 We'll describe how they are handled using the subsection headings from
24116 \begin_layout Itemize
24117 Grouping Index Entries (aka, sub-entries): \SpecialChar LyX
24118 makes an effort to support these,
24119 but the entries must be separated by
24120 \begin_inset Quotes eld
24124 \begin_inset Quotes erd
24127 , that is, there must be spaces around the exclamation point.
24128 This is because it is otherwise too difficult to check for escaped exclamation
24129 points, ones in math, and so forth.
24132 \begin_layout Itemize
24133 Page Ranges: There is no support at all for page ranges, since these make
24134 no sense with XHMTL.
24135 Instead, you will just get two index entries, one at either end.
24138 \begin_layout Itemize
24139 Cross-referencing: There is no support for cross-referencing.
24140 If \SpecialChar LyX
24141 finds an entry containing the
24142 \begin_inset Quotes eld
24145 |see\SpecialChar ldots
24147 \begin_inset Quotes erd
24150 construct, it is just dropped, and the rest is treated as an ordinary index
24154 \begin_layout Itemize
24155 Index Entry Order: \SpecialChar LyX
24156 does support attempts to fix the sorting order.
24157 It will take what is before the first `@' it finds and use that for sorting,
24158 taking what follows the first `@' to be the actual entry.
24159 At present, \SpecialChar LyX
24160 does not check for escaped `@', so do not try to index email
24164 \begin_layout Itemize
24165 Index Entry Layout: You can format entries by using the text style dialog,
24166 or by using any other method available within \SpecialChar LyX
24168 There is no support for constructs like:
24169 \begin_inset Quotes eld
24173 \begin_inset Quotes erd
24177 Indeed, if \SpecialChar LyX
24178 finds a pipe symbol, `|', in an entry, it will delete it and
24179 everything that follows it.
24182 \begin_layout Itemize
24183 Multiple Indexes: There is no support for multiple indexes.
24184 Rather, all index entries will be printed as one large index.
24185 To avoid our printing several versions of the index, we print only the
24186 main index, so make sure you have one.
24189 \begin_layout Section
24190 Nomenclature and Glossary
24193 \begin_layout Standard
24194 There is at present no support for glossaries.
24195 Adding it would be fairly trivial, and welcome.
24198 \begin_layout Chapter
24199 The \SpecialChar LyX
24203 \begin_layout Section
24207 \begin_layout Standard
24208 The `\SpecialChar LyX
24209 server' allows other programs to talk to \SpecialChar LyX
24210 , invoke \SpecialChar LyX
24211 commands, and retrieve
24212 information about the \SpecialChar LyX
24214 This is only intended for advanced users, but they should find it useful.
24215 It is by writing to the \SpecialChar LyX
24216 server, for example, that bibliography managers,
24217 such as JabRef, are able to
24218 \begin_inset Quotes eld
24222 \begin_inset Quotes erd
24225 citations to \SpecialChar LyX
24229 \begin_layout Section
24230 Starting the \SpecialChar LyX
24234 \begin_layout Standard
24235 The \SpecialChar LyX
24236 server works through the use of a pair of named pipes.
24237 These are usually located in
24238 \begin_inset Flex Code
24241 \begin_layout Plain Layout
24247 , (except on Windows, where
24251 named pipes are special objects located in
24252 \begin_inset Flex Code
24255 \begin_layout Plain Layout
24267 ) and have the names
24268 \begin_inset Quotes eld
24272 \begin_inset Flex Code
24275 \begin_layout Plain Layout
24282 \begin_inset Quotes erd
24286 \begin_inset Quotes eld
24290 \begin_inset Flex Code
24293 \begin_layout Plain Layout
24300 \begin_inset Quotes erd
24304 External programs write into
24305 \begin_inset Flex Code
24308 \begin_layout Plain Layout
24314 and read back data from
24315 \begin_inset Flex Code
24318 \begin_layout Plain Layout
24325 The stem of the pipe names can be defined in the
24326 \begin_inset Flex Noun
24329 \begin_layout Plain Layout
24330 Tools\SpecialChar menuseparator
24336 dialog, for example
24337 \begin_inset Flex Code
24340 \begin_layout Plain Layout
24341 "/home/myhome/lyxpipe"
24347 \begin_inset Flex Code
24350 \begin_layout Plain Layout
24364 on Windows (where any working path instead of lyxpipe can be used, for
24366 \begin_inset Flex Code
24369 \begin_layout Plain Layout
24392 configure this manually in order for the server to start.
24395 \begin_layout Standard
24398 \begin_inset Flex Code
24401 \begin_layout Plain Layout
24408 \begin_inset Flex Code
24411 \begin_layout Plain Layout
24417 ' to create the pipes.
24418 If one of the pipes already exists, \SpecialChar LyX
24419 will assume that another \SpecialChar LyX
24421 is already running and will not start the server.
24422 On POSIX (Unix like) systems, if for some other reason, an unused
24423 \begin_inset Quotes eld
24427 \begin_inset Quotes erd
24430 pipe is left in existence when \SpecialChar LyX
24431 closes, then \SpecialChar LyX
24432 will try to delete it.
24433 If this fails for some reason, you will need to delete the pipes manually
24434 and then restart \SpecialChar LyX
24436 On Windows, pipes are deleted by the OS on program termination or crash,
24438 \begin_inset Quotes eld
24442 \begin_inset Quotes erd
24445 pipes should not be possible.
24448 \begin_layout Standard
24449 To have several \SpecialChar LyX
24450 processes with servers at the same time, you have to use
24451 different configurations, perhaps by using separate user directories, each
24453 \begin_inset Flex Code
24456 \begin_layout Plain Layout
24462 file, for each process.
24465 \begin_layout Standard
24466 If you are developing a client program, you might find it useful to enable
24467 debugging information from the \SpecialChar LyX
24469 Do this by starting \SpecialChar LyX
24471 \begin_inset Flex Code
24474 \begin_layout Plain Layout
24483 \begin_layout Standard
24484 You can find a complete example client written in C++ in the source distribution
24486 \begin_inset Flex Code
24489 \begin_layout Plain Layout
24490 development/lyxserver/server_monitor.cpp
24498 \begin_layout Standard
24499 Another useful tool is the command-line based client found in
24500 \begin_inset Flex Code
24503 \begin_layout Plain Layout
24504 src/client/lyxclient
24512 \begin_layout Section
24513 Normal communication
24516 \begin_layout Standard
24517 To issue a \SpecialChar LyX
24518 call, the client writes a line of ASCII text into the input
24520 This line has the following format:
24523 \begin_layout Quote
24537 \begin_layout Description
24538 clientname is a name that the client can choose arbitrarily.
24539 Its only use is that \SpecialChar LyX
24540 will echo it if it sends an answer—so a client can
24541 dispatch results from different requesters.
24544 \begin_layout Description
24545 function is the function you want \SpecialChar LyX
24547 It is the same as the commands you'd use in the minibuffer.
24550 \begin_layout Description
24551 argument is an optional argument which is meaningful only to some functions
24553 \begin_inset Quotes eld
24557 \begin_inset Quotes erd
24560 LFUN will insert the argument as text at the cursor position).
24563 \begin_layout Standard
24564 The answer from \SpecialChar LyX
24565 will arrive in the output pipe and be of the form
24568 \begin_layout Quote
24582 \begin_layout Standard
24591 are just echoed from the command request, while
24595 is more or less useful information filled according to how the command
24596 execution worked out.
24597 Some commands, such as
24598 \begin_inset Quotes eld
24602 \begin_inset Quotes erd
24605 , will return information about the internal state of \SpecialChar LyX
24607 return an empty data-response.
24608 This means that the command execution went fine.
24611 \begin_layout Standard
24612 In case of errors, the response from \SpecialChar LyX
24613 will have this form
24616 \begin_layout Quote
24630 \begin_layout Standard
24635 should contain an explanation of why the command failed.
24638 \begin_layout Standard
24642 \begin_layout LyX-Code
24643 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
24644 \begin_inset Newline newline
24647 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
24648 \begin_inset Newline newline
24651 read a <~/.lyxpipe.out
24652 \begin_inset Newline newline
24658 \begin_layout Subsection
24659 AppleScript (Mac OS X)
24662 \begin_layout Standard
24663 Since \SpecialChar LyX
24664 2.1, \SpecialChar LyX
24665 supports basic interactions with AppleScript for normal communicatio
24666 n through the command run.
24667 This command takes a direct argument (the
24671 to perform) and an optional argument.
24672 It either returns the output of the function or triggers an error with
24673 the error message and code.
24676 \begin_layout Standard
24680 \begin_layout LyX-Code
24681 tell application "\SpecialChar LyX
24685 \begin_layout LyX-Code
24689 \begin_layout LyX-Code
24690 -- Stores the current file name into f
24693 \begin_layout LyX-Code
24694 set f to (run "server-get-filename" with argument "")
24697 \begin_layout LyX-Code
24698 on error the error_message number the error_number
24701 \begin_layout LyX-Code
24702 display dialog "Error: " & the error_number & ".
24706 \begin_layout LyX-Code
24707 & the error_message buttons {"OK"} default button 1
24710 \begin_layout LyX-Code
24714 \begin_layout LyX-Code
24718 \begin_layout Section
24722 \begin_layout Standard
24724 can notify clients of events going on asynchronously.
24725 Currently it will only do this if the user binds a key sequence with the
24727 \begin_inset Quotes eld
24731 \begin_inset Quotes erd
24735 The format of the string \SpecialChar LyX
24736 sends is as follows:
24739 \begin_layout Quote
24740 \begin_inset Flex Code
24743 \begin_layout Plain Layout
24754 \begin_layout Standard
24759 is the printed representation of the key sequence that was actually typed
24763 \begin_layout Standard
24764 This mechanism can be used to extend \SpecialChar LyX
24765 's command set and implement macros.
24766 Bind some key sequence to
24767 \begin_inset Quotes eld
24771 \begin_inset Quotes erd
24775 Then start a client that listens on the output pipe, dispatches the command
24776 according to the sequence, and starts a function that may use \SpecialChar LyX
24779 requests to issue a command or a series of commands to \SpecialChar LyX
24783 \begin_layout Section
24784 The simple \SpecialChar LyX
24788 \begin_layout Standard
24790 implements a simple protocol that can be used for session management.
24791 All messages are of the form
24794 \begin_layout Quote
24804 \begin_layout Standard
24810 \begin_inset Quotes eld
24814 \begin_inset Quotes erd
24818 \begin_inset Quotes eld
24822 \begin_inset Quotes erd
24827 \begin_inset Quotes eld
24831 \begin_inset Quotes erd
24834 is received from a client, \SpecialChar LyX
24835 will report back to inform the client that
24836 it's listening to it's messages, while
24837 \begin_inset Quotes eld
24841 \begin_inset Quotes erd
24844 sent from \SpecialChar LyX
24845 will inform clients that \SpecialChar LyX
24849 \begin_layout Section
24850 Reverse DVI/PDF search
24853 \begin_layout Standard
24854 Some DVI/PDF viewers
24858 \begin_layout Plain Layout
24859 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
24860 Qpdfview on Unix, Skim on Mac OSX and SumatraPDF on Windows.
24869 facility (also called
24874 This means that you can tell \SpecialChar LyX
24875 to put the cursor to a specific line in the
24876 document by clicking at the respective position in the DVI/PDF output.
24877 To achieve this, the viewer must be able to communicate with \SpecialChar LyX
24879 This is done via the \SpecialChar LyX
24880 server either by using the named pipe (
24884 ), or the UNIX domain socket (
24888 ) that \SpecialChar LyX
24889 creates in its temporary directory (this is the way the
24890 \begin_inset Flex Code
24893 \begin_layout Plain Layout
24899 program communicates with \SpecialChar LyX
24901 In some cases, you need a helper script that mediates between the viewer
24902 and \SpecialChar LyX
24903 , in others, the viewer can communicate with \SpecialChar LyX
24905 This depends on the selected viewer and on your operating system.
24906 The same applies to the way viewers need to be configured and the way the
24907 reverse search is actually performed.
24908 In what follows, we will thus describe how to setup reverse search for
24910 Before we turn to this, though, we will explain what needs to be done generally
24911 to enable reverse search in the DVI/PDF output.
24914 \begin_layout Subsection
24916 \begin_inset CommandInset label
24918 name "subsec:rev-search"
24925 \begin_layout Standard
24926 In most cases \SpecialChar LyX
24927 will do the work for you by enabling the option
24928 \begin_inset Flex Noun
24931 \begin_layout Plain Layout
24932 Synchronize with Output
24938 \begin_inset Flex Noun
24941 \begin_layout Plain Layout
24942 Document\SpecialChar menuseparator
24943 Settings\SpecialChar menuseparator
24950 In such a case \SpecialChar LyX
24951 will automatically insert the necessary Sync\SpecialChar TeX
24953 PDF) or load the srcltx package (for DVI) respectively.
24954 This option can be easily reached also on
24955 \begin_inset Flex Code
24958 \begin_layout Plain Layout
24967 \begin_layout Standard
24968 If you need a different setting, you can select or input a custom macro
24969 from the drop down box just below
24970 \begin_inset Flex Noun
24973 \begin_layout Plain Layout
24974 Document\SpecialChar menuseparator
24975 Settings\SpecialChar menuseparator
24976 Output\SpecialChar menuseparator
24977 Synchronize with Output
24985 \begin_layout Standard
24986 Note that the method
24987 \begin_inset Flex Code
24990 \begin_layout Plain Layout
24998 enables gzip compression.
24999 If your viewer does not support it, you should instead use
25000 \begin_inset Flex Code
25003 \begin_layout Plain Layout
25014 \begin_layout Standard
25015 Please also note that including the
25016 \begin_inset Flex Code
25019 \begin_layout Plain Layout
25026 \begin_inset Flex Code
25029 \begin_layout Plain Layout
25035 sometimes has an undesired impact on the typesetting.
25036 Thus, you should switch output synchronization off for the final typesetting
25038 \begin_inset Flex Code
25041 \begin_layout Plain Layout
25048 \begin_inset Flex Code
25051 \begin_layout Plain Layout
25061 \begin_layout Standard
25062 In case you need some more special settings that are not covered by the
25063 automatic settings, read the next section about how to set up output synchroniz
25065 If the automatic setup suits your needs, you can readily jump to section
25066 \begin_inset space ~
25070 \begin_inset CommandInset ref
25072 reference "subsec:configuring-viewers"
25076 , where the necessary configuration steps in your viewer – needed both with
25077 the automatic and the manual setup – are described.
25080 \begin_layout Subsection
25084 \begin_layout Standard
25086 provides several different methods for reverse search.
25087 Some are built-in in the
25088 \begin_inset Flex Code
25091 \begin_layout Plain Layout
25097 program, some are provided by external packages.
25098 Your choice depends on whether your \SpecialChar LaTeX
25099 distribution already provides a given
25100 method (the built-in methods are rather new) and whether your viewer can
25102 The available methods are described in the following.
25105 \begin_layout Subsubsection*
25106 Built-in DVI-search via src-specials (DVI only)
25109 \begin_layout Standard
25110 This method provides the DVI file with the necessary information for reverse
25112 It is available in \SpecialChar LaTeX
25113 since quite some time (any somewhat recent \SpecialChar LaTeX
25115 should include it), and it works reliably.
25116 To enable it, change the
25117 \begin_inset Flex Noun
25120 \begin_layout Plain Layout
25131 \begin_inset Flex Noun
25134 \begin_layout Plain Layout
25145 \begin_inset Flex Noun
25148 \begin_layout Plain Layout
25149 Preferences\SpecialChar menuseparator
25150 File Handling\SpecialChar menuseparator
25157 \begin_inset Flex Code
25160 \begin_layout Plain Layout
25161 latex -src-specials $$i
25167 If this doesn't work, check if your \SpecialChar TeX
25168 engine needs different options (the
25169 syntax might differ in some distributions).
25172 \begin_layout Subsubsection*
25173 External Packages (PDFSync and scrltx)
25176 \begin_layout Standard
25185 provide reverse search facility for PDF output (via pdflatex) and DVI output,
25187 In order to enable it, load the packages in the \SpecialChar LyX
25191 \begin_layout Itemize
25192 \begin_inset Flex Code
25195 \begin_layout Plain Layout
25198 usepackage{pdfsync}
25203 for reverse PDF search,
25206 \begin_layout Itemize
25207 \begin_inset Flex Code
25210 \begin_layout Plain Layout
25213 usepackage[active]{srcltx}
25218 for reverse DVI search.
25221 \begin_layout Standard
25222 If you want to be able to perform both DVI and PDF reverse searches, you
25223 can also insert in the preamble the following lines
25226 \begin_layout LyX-Code
25230 \begin_inset Newline newline
25236 \begin_inset Newline newline
25241 usepackage{pdfsync}
25242 \begin_inset Newline newline
25248 \begin_inset Newline newline
25253 usepackage[active]{srcltx}
25254 \begin_inset Newline newline
25262 \begin_layout Standard
25263 This way, you can preview the file as either DVI or PDF (pdflatex) and the
25264 right package will be used.
25267 \begin_layout Standard
25268 Note that PDFSync might affect the output layout of your document.
25269 It is therefore advised to disable PDFsync for final documents.
25272 \begin_layout Subsubsection*
25273 Built-in reverse search via Sync\SpecialChar TeX
25277 \begin_layout Standard
25279 \begin_inset Flex Code
25282 \begin_layout Plain Layout
25288 have built-in support for both PDF and DVI reverse search.
25291 Sync\SpecialChar TeX
25294 facility is basically the result of the integration of the PDFSync package
25295 to the pdftex program and its merge with the
25300 You need at least \SpecialChar TeX
25301 Live 2008 or a recent Mik\SpecialChar TeX
25302 distribution in order to use
25307 \begin_layout Plain Layout
25308 For some reason, Mik\SpecialChar TeX
25309 does not understand/obey the command \SpecialChar LyX
25311 the preamble when you check the "Enable Forward/Reverse Search" button
25312 in the toolbar and does not generate the necessary info.
25315 \begin_layout Plain Layout
25316 The generation of the required info can be forced by changing the converter
25317 "\SpecialChar LaTeX
25318 (pdflatex) -> PDF (pdflatex)" in Preferences->File handling->Converters
25319 from the default "pdflatex $$i" to "pdflatex -synctex=1 $$i" (i.e., by adding
25320 the -synctex=1 switch).
25325 Also note that only a few PDF viewers (Okular and Qpdfview on Unix, Skim
25326 on the Mac, SumatraPDF on Windows) already provide Sync\SpecialChar TeX
25330 \begin_layout Standard
25331 To enable Sync\SpecialChar TeX
25332 for DVI output, change the
25333 \begin_inset Flex Noun
25336 \begin_layout Plain Layout
25347 \begin_inset Flex Noun
25350 \begin_layout Plain Layout
25355 (plain) -> DraftDVI
25361 \begin_inset Flex Noun
25364 \begin_layout Plain Layout
25365 Preferences\SpecialChar menuseparator
25366 File Handling\SpecialChar menuseparator
25373 \begin_inset Flex Code
25376 \begin_layout Plain Layout
25377 latex -synctex=1 $$i
25382 , and for PDF output, change the
25383 \begin_inset Flex Noun
25386 \begin_layout Plain Layout
25391 (pdflatex) -> PDF (pdflatex)
25397 \begin_inset Flex Code
25400 \begin_layout Plain Layout
25401 pdflatex -synctex=1 $$i
25407 Check the documentation of your viewer whether the viewer needs to be configure
25408 d for the use with Sync\SpecialChar TeX
25413 \begin_layout Plain Layout
25414 Note that the option
25415 \begin_inset Flex Code
25418 \begin_layout Plain Layout
25424 option enables gzip compression.
25425 If your viewer does not support it, you should instead use
25426 \begin_inset Flex Code
25429 \begin_layout Plain Layout
25443 \begin_layout Subsection
25444 Configuring and using specific viewers
25445 \begin_inset CommandInset label
25447 name "subsec:configuring-viewers"
25454 \begin_layout Subsubsection*
25455 Xdvi (all platforms)
25458 \begin_layout Standard
25460 \begin_inset Flex Code
25463 \begin_layout Plain Layout
25469 , you don't need to do anything else for performing a reverse DVI search,
25470 as \SpecialChar LyX
25471 already provides the necessary hooks for automatically using the
25472 \begin_inset Flex Code
25475 \begin_layout Plain Layout
25482 Just setup your document as described above (reverse search is triggered
25483 by Ctrl-click or Alt-click on Mac OSX, respectively).
25486 \begin_layout Standard
25487 However, if for whatever reason you want to use the named pipe instead of
25488 the socket for communicating with \SpecialChar LyX
25489 , simply change the DVI viewer in
25490 \begin_inset Flex Noun
25493 \begin_layout Plain Layout
25494 Preferences\SpecialChar menuseparator
25495 File Handling\SpecialChar menuseparator
25505 \begin_layout Plain Layout
25506 On Mac OSX you have to use
25507 \begin_inset Flex Code
25510 \begin_layout Plain Layout
25511 DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l"
25522 \begin_inset Flex Code
25525 \begin_layout Plain Layout
25526 xdvi -editor "lyxeditor.sh %f %l"
25532 \begin_inset Flex Code
25535 \begin_layout Plain Layout
25541 is a suitable script.
25542 For example, a minimal shell script is the following one:
25545 \begin_layout LyX-Code
25547 \begin_inset Newline newline
25550 LYXPIPE="/path/to/lyxpipe"
25551 \begin_inset Newline newline
25554 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
25555 \begin_inset Newline newline
25558 echo "$COMMAND" > "${LYXPIPE}".in || exit
25559 \begin_inset Newline newline
25562 read TMP < "${LYXPIPE}".out || exit
25565 \begin_layout Standard
25567 \begin_inset Flex Code
25570 \begin_layout Plain Layout
25576 is the LyXServer pipe path specified in
25577 \begin_inset Flex Noun
25580 \begin_layout Plain Layout
25581 Preferences\SpecialChar menuseparator
25591 \begin_layout Plain Layout
25593 \begin_inset Flex Code
25596 \begin_layout Plain Layout
25602 folder of a source distribution you can find a
25603 \begin_inset Flex Code
25606 \begin_layout Plain Layout
25612 script which is able to locate the
25616 based on your preferences.
25624 \begin_layout Subsubsection*
25628 \begin_layout Standard
25630 \begin_inset Flex Code
25633 \begin_layout Plain Layout
25634 /Applications/MacDviX_Folder/calleditor.script
25639 , add the following lines:
25642 \begin_layout LyX-Code
25643 /Applications/LyX.app/Contents/MacOS/lyxeditor "$2" $1
25644 \begin_inset Newline newline
25650 \begin_layout Standard
25651 Modify the lines accordingly if you install \SpecialChar LyX
25652 somewhere else than in the
25653 Applications folder.
25656 \begin_layout Standard
25657 Reverse search is triggered by Alt-click (OPTION-click).
25660 \begin_layout Subsubsection*
25664 \begin_layout Standard
25666 \begin_inset Flex Code
25669 \begin_layout Plain Layout
25670 open -a Skim.app $$i
25675 to the viewer setting in
25676 \begin_inset Flex Noun
25679 \begin_layout Plain Layout
25680 Preferences\SpecialChar menuseparator
25681 File Handling\SpecialChar menuseparator
25682 File formats\SpecialChar menuseparator
25689 \begin_inset Flex Noun
25692 \begin_layout Plain Layout
25693 Skim\SpecialChar menuseparator
25694 Preferences\SpecialChar menuseparator
25701 \begin_inset Flex Noun
25704 \begin_layout Plain Layout
25710 preset and enter command
25711 \begin_inset Flex Noun
25714 \begin_layout Plain Layout
25715 /Applications/\SpecialChar LyX
25716 .app/Contents/MacOS/lyxeditor
25724 \begin_layout Standard
25725 Reverse search is triggered by COMMAND-SHIFT-click
25728 \begin_layout Subsubsection*
25732 \begin_layout Standard
25734 \begin_inset Flex Noun
25737 \begin_layout Plain Layout
25738 Settings\SpecialChar menuseparator
25739 Configure Okular\SpecialChar menuseparator
25746 \begin_inset Quotes eld
25750 \begin_inset Quotes erd
25753 and add the command
25754 \begin_inset Flex Code
25757 \begin_layout Plain Layout
25766 \begin_layout Standard
25767 Reverse search is triggered by SHIFT-click.
25770 \begin_layout Subsubsection*
25774 \begin_layout Standard
25775 Qpdfview supports Sync\SpecialChar TeX
25776 since version 0.3.5.
25778 \begin_inset Flex Noun
25781 \begin_layout Plain Layout
25782 Edit\SpecialChar menuseparator
25783 Settings\SpecialChar menuseparator
25789 , click on the input field of the
25790 \begin_inset Quotes eld
25794 \begin_inset Quotes erd
25797 item and add the command
25798 \begin_inset Flex Code
25801 \begin_layout Plain Layout
25810 \begin_layout Standard
25811 Reverse search is triggered by double-click
25812 \change_inserted -851615295 1468920502
25813 or, in more recent versions, by context menu
25818 \begin_layout Subsubsection*
25822 \begin_layout Standard
25823 Launch yap, choose its
25824 \begin_inset Flex Noun
25827 \begin_layout Plain Layout
25828 View\SpecialChar menuseparator
25834 menu and select the
25835 \begin_inset Quotes eld
25839 \begin_inset Quotes erd
25844 \begin_inset Quotes eld
25847 New\SpecialChar ldots
25849 \begin_inset Quotes erd
25852 button and, in the window that opens, enter
25853 \begin_inset Quotes eld
25858 \begin_inset Quotes erd
25861 (or any other name you like) in the
25862 \begin_inset Quotes eld
25866 \begin_inset Quotes erd
25870 Now click on the button labeled
25871 \begin_inset Quotes eld
25876 \begin_inset Quotes erd
25879 to open a file dialog and navigate to the directory containing the batch
25881 \begin_inset Flex Code
25884 \begin_layout Plain Layout
25892 \begin_inset Flex Code
25895 \begin_layout Plain Layout
25901 and then specify the program arguments as
25902 \begin_inset Flex Code
25905 \begin_layout Plain Layout
25913 \begin_inset Flex Code
25916 \begin_layout Plain Layout
25922 wrapper is used for communicating with \SpecialChar LyX
25930 \begin_layout LyX-Code
25932 \begin_inset Newline newline
25935 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
25944 \begin_inset Newline newline
25958 \begin_layout Standard
25959 Make sure that the \SpecialChar LyX
25960 Server pipe path you specified in \SpecialChar LyX
25962 \begin_inset Flex Code
25965 \begin_layout Plain Layout
25979 , otherwise change the
25980 \begin_inset Flex Code
25983 \begin_layout Plain Layout
25989 wrapper accordingly.
25992 \begin_layout Standard
25993 In yap, reverse search is triggered by double-click.
25996 \begin_layout Subsubsection*
25997 SumatraPDF (Windows)
26000 \begin_layout Standard
26001 In order to use SumatraPDF for inverse search, enter
26002 \begin_inset Flex Code
26005 \begin_layout Plain Layout
26006 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
26011 in the viewer setting in
26012 \begin_inset Flex Noun
26015 \begin_layout Plain Layout
26016 Preferences\SpecialChar menuseparator
26017 File Handling\SpecialChar menuseparator
26018 File formats\SpecialChar menuseparator
26025 \begin_inset Flex Code
26028 \begin_layout Plain Layout
26034 is the previous wrapper.
26035 If SumatraPDF.exe is not in your command PATH, use its full file name.
26038 \begin_layout Standard
26039 Reverse search is triggered by double-click.
26042 \begin_layout Subsubsection*
26046 \begin_layout Standard
26047 First of all, make sure that yap is your default DVI viewer in the Windows
26048 environment, then launch it, choose its
26049 \begin_inset Flex Noun
26052 \begin_layout Plain Layout
26053 View\SpecialChar menuseparator
26059 menu and select the
26060 \begin_inset Quotes eld
26064 \begin_inset Quotes erd
26069 \begin_inset Quotes eld
26072 New\SpecialChar ldots
26074 \begin_inset Quotes erd
26077 button and, in the window that opens, enter
26078 \begin_inset Quotes eld
26083 \begin_inset Quotes erd
26086 (or any other name you like) in the
26087 \begin_inset Quotes eld
26091 \begin_inset Quotes erd
26095 Now click on the button labeled
26096 \begin_inset Quotes eld
26101 \begin_inset Quotes erd
26104 to open a file dialog and navigate to the directory containing the
26105 \begin_inset Flex Code
26108 \begin_layout Plain Layout
26114 program (which is installed by default on Cygwin along with the \SpecialChar LyX
26117 \begin_inset Flex Code
26120 \begin_layout Plain Layout
26126 and then specify the program arguments as
26127 \begin_inset Flex Code
26130 \begin_layout Plain Layout
26137 In this way, you will be using the
26141 for communicating with \SpecialChar LyX
26143 If, for whatever reason, you want to use the
26148 \begin_inset Flex Code
26151 \begin_layout Plain Layout
26157 option and be sure to specify the \SpecialChar LyX
26158 Server pipe path in the \SpecialChar LyX
26162 \begin_layout Standard
26163 In yap, reverse search is triggered by double-click.
26166 \begin_layout Subsubsection*
26167 SumatraPDF (Cygwin)
26170 \begin_layout Standard
26171 In order to use SumatraPDF for inverse search, enter
26172 \begin_inset Flex Code
26175 \begin_layout Plain Layout
26176 SumatraPDF -inverse-search "lyxeditor -g %f %l"
26181 in the viewer setting in
26182 \begin_inset Flex Noun
26185 \begin_layout Plain Layout
26186 Preferences\SpecialChar menuseparator
26187 File Handling\SpecialChar menuseparator
26188 File formats\SpecialChar menuseparator
26195 If SumatraPDF.exe is not in your command PATH, use its full posix path.
26197 \begin_inset Flex Code
26200 \begin_layout Plain Layout
26206 enables communication via the
26212 \begin_inset Flex Code
26215 \begin_layout Plain Layout
26221 option if you want to use the
26225 , and be sure to specify the \SpecialChar LyX
26226 Server pipe path in the \SpecialChar LyX
26230 \begin_layout Standard
26231 Reverse search is triggered by double-click.
26234 \begin_layout Section
26238 \begin_layout Standard
26239 Forward search is, as the name implies, in a sense the
26240 \begin_inset Quotes eld
26244 \begin_inset Quotes erd
26248 It allows you to let the viewer jump to a given position from within \SpecialChar LyX
26250 If forward search is set up (as described in what follows), you can put
26251 the cursor anywhere in your \SpecialChar LyX
26253 \begin_inset Flex Noun
26256 \begin_layout Plain Layout
26257 Navigate\SpecialChar menuseparator
26264 \begin_inset Flex Noun
26267 \begin_layout Plain Layout
26273 in the context menu via right mouse click), and then the viewer will jump
26274 to that position as well.
26275 This implies, of course, that your viewer supports this function.
26278 \begin_layout Standard
26279 To make forward search possible, you first need to provide the generated
26280 output PDF/DVI file with additional information about the \SpecialChar TeX
26282 This can be done via the methods described in the section
26283 \begin_inset CommandInset ref
26285 reference "subsec:rev-search"
26292 \begin_layout Standard
26293 Additionally, you need to configure \SpecialChar LyX
26294 for using your viewers in
26295 \begin_inset Flex Noun
26298 \begin_layout Plain Layout
26299 Tools\SpecialChar menuseparator
26300 Preferences\SpecialChar menuseparator
26301 Output\SpecialChar menuseparator
26308 We provide a range of tested configurations for some viewers, which you
26309 can select from the drop down list.
26310 If none of these configurations suits you, you have to find out and enter
26311 a suitable configuration yourself.
26312 The definition syntax uses the following placeholders:
26315 \begin_layout Itemize
26317 \begin_inset Flex Code
26320 \begin_layout Plain Layout
26329 \begin_layout Itemize
26331 \begin_inset Flex Code
26334 \begin_layout Plain Layout
26340 : name of the (temporary) exported .tex file (without path)
26343 \begin_layout Itemize
26345 \begin_inset Flex Code
26348 \begin_layout Plain Layout
26354 : name of the (temporary) exported .tex file (including path)
26357 \begin_layout Itemize
26359 \begin_inset Flex Code
26362 \begin_layout Plain Layout
26368 : name of the exported output file (either dvi or pdf, depending on which
26369 one exists in the temporary directory)
26372 \begin_layout Standard
26373 Note that only some of the viewers provide full forward search functionality,
26374 among them yap, xdvi, okular
26378 \begin_layout Plain Layout
26379 You might want to set
26380 \begin_inset Flex Code
26383 \begin_layout Plain Layout
26390 \begin_inset Flex Noun
26393 \begin_layout Plain Layout
26394 Tools\SpecialChar menuseparator
26395 Preferences\SpecialChar menuseparator
26396 File Handling\SpecialChar menuseparator
26398 \begin_inset space ~
26411 , qpdfview and SumatraPDF
26415 \begin_layout Plain Layout
26416 SumatraPDF can also use DDE commands through the external program CMCDDE
26417 — downloadable from
26418 \begin_inset CommandInset href
26420 target "http://www.istri.fr/spip/zip/CMCDDE.zip"
26430 While many of the widespread PDF viewers (most notably Adobe Reader) do
26431 not support forward search at all, some other viewers – e.
26432 \begin_inset space \thinspace{}
26436 evince and xpdf – allow at least to reload the document and jump to a specific
26437 page of the file, so you can at least navigate
26438 \begin_inset Quotes eld
26442 \begin_inset Quotes erd
26446 This latter functionality is provided by an external call of synctex (see
26447 the predefined example configurations).
26451 \begin_layout Standard
26452 Forward search works both with DVI and PDF output.
26454 simply checks which preview format you have used before (i.
26455 \begin_inset space \thinspace{}
26458 e., which format is already there in the temporary directory) and chooses
26459 the appropriate configuration for the respective format.