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
2182 \change_inserted 893223064 1464851738
2186 \begin_layout Standard
2188 \change_inserted 893223064 1464852146
2189 This section will be updated in due course.
2192 \begin_layout Standard
2193 Special Document Classes
2196 \begin_layout Section
2200 \begin_layout Standard
2206 \begin_layout Subsection
2210 \begin_layout Standard
2211 This section describes how \SpecialChar LyX
2212 can be used to write articles for submission
2213 to the scientific journal
2215 Astronomy and Astrophysics
2218 \begin_inset Flex URL
2221 \begin_layout Plain Layout
2223 http://www.edpsciences.fr/aa/
2228 ) using Version 5.01 of the document class
2233 This package can be downloaded from the ftp site
2236 \begin_layout Standard
2237 \begin_inset VSpace medskip
2243 \begin_layout Standard
2245 \begin_inset Flex URL
2248 \begin_layout Plain Layout
2250 ftp://ftp.edpsciences.org/pub/aa/readme.html
2258 \begin_layout Standard
2259 \begin_inset VSpace medskip
2265 \begin_layout Standard
2266 A manual comes together with that package, and this text is not meant to
2267 replace the original manual but is merely a short guide in how to realize
2268 the correct form of your paper.
2272 \begin_layout Standard
2273 Please note that the publisher of the journal was changed from Springer
2274 to EDP Sciences starting January 1, 2001.
2275 That change involved also some slight changes to the style files, namely
2276 the removal of the thesaurus command.
2277 The \SpecialChar LyX
2278 class aa supports the newest version of these style files, V 5.01.
2279 If you have an older version installed, please upgrade.
2280 For compatibility, the old (version 4) layout has been kept as
2285 Please refer to the comments in
2288 Dir/layouts/aapaper.layout
2293 \begin_layout Subsection
2297 \begin_layout Standard
2298 It is recommended you start from the example template distributed with \SpecialChar LyX
2300 If you are not using a template, note the following settings:
2303 \begin_layout Itemize
2310 Document\SpecialChar menuseparator
2313 dialog (OK, that one was obvious).
2316 \begin_layout Itemize
2317 Don't change the option
2320 \begin_inset space ~
2330 The whole layout is done by the macros, you shouldn't change anything.
2333 \begin_layout Subsection
2337 \begin_layout Standard
2338 First thing to enter is the header information.
2339 It consists of seven entries, of which some are optional.
2343 \begin_layout Itemize
2351 \begin_layout Itemize
2359 \begin_layout Itemize
2367 \begin_layout Itemize
2375 \begin_layout Itemize
2380 : [optional] if more than one author: whom to contact for offprint requests.
2383 \begin_layout Itemize
2388 : [optional] mail address for contacts.
2391 \begin_layout Itemize
2399 Received: <date>; Accepted <date>
2402 \begin_layout Standard
2403 There is no need to issue the
2409 command, this is done automatically by \SpecialChar LyX
2410 when the header is finished.
2411 Although the order of the single header entries doesn't matter it is advised
2412 to keep the above sequence, just to get the best optics and meets the layout
2413 of the real document.
2416 \begin_layout Standard
2417 If you want to place footnotes in the header block, e.
2418 \begin_inset space \thinspace{}
2422 \begin_inset space \space{}
2425 to state your present address, just use the standard footnote via the menu
2428 Insert\SpecialChar menuseparator
2433 will automagically use the term
2442 \begin_layout Standard
2443 In addition to these topics, the macros use three additional \SpecialChar LaTeX
2445 have no counterpart in \SpecialChar LyX
2449 \begin_layout Itemize
2456 to separate different names for more than one author and institute, respectivel
2460 \begin_layout Itemize
2467 to mark corresponding author/institute pairs.
2468 The institutes are numbered sequentially as they appear in the
2472 field, so you have to put a marker to each author.
2475 \begin_layout Itemize
2482 to supply an email address for fast contact.
2485 \begin_layout Standard
2486 In all cases, the appropriate command has to be entered in \SpecialChar LyX
2494 \begin_layout Subsection
2498 \begin_layout Standard
2499 The abstract should immediately follow the header block.
2500 With version 5 the abstract environment was changed to a command, and there
2501 is now a resctriction to only one paragraph.
2502 In addition, it should contain an entry with the keywords.
2503 This is not yet implemented for \SpecialChar LyX
2504 , therefore you have to enter the \SpecialChar LaTeX
2512 by hand and mark it as \SpecialChar LaTeX
2514 Refer to the example paper.
2517 \begin_layout Subsection
2518 Supported environments
2521 \begin_layout Standard
2522 The A&A paper layout supports the following environments for structuring
2526 \begin_layout Itemize
2532 \begin_layout Itemize
2538 \begin_layout Itemize
2544 \begin_layout Itemize
2550 \begin_layout Itemize
2556 \begin_layout Itemize
2562 \begin_layout Itemize
2568 \begin_layout Itemize
2574 \begin_layout Itemize
2580 \begin_layout Itemize
2586 \begin_layout Itemize
2592 \begin_layout Itemize
2599 \begin_layout Subsection
2600 Commands not supported by \SpecialChar LyX
2604 \begin_layout Standard
2605 Some commands are not yet supported by the
2609 layout for \SpecialChar LyX
2611 Some have already been mentioned.
2612 For the sake of completeness, they are listed all together here:
2615 \begin_layout Itemize
2623 \begin_layout Itemize
2631 \begin_layout Itemize
2639 \begin_layout Itemize
2647 \begin_layout Itemize
2655 \begin_layout Itemize
2663 \begin_layout Itemize
2671 \begin_layout Itemize
2679 \begin_layout Standard
2680 If you want to use any of these commands, you have to enter them yourself.
2683 Do not forget to mark them as \SpecialChar LaTeX
2687 \begin_layout Subsection
2688 Figure and Table Floats
2691 \begin_layout Standard
2693 provides support for the necessary float environments
2695 figure, figure*, table
2701 , therefore we won't tell much about it here.
2705 \begin_inset space ~
2711 Just remember that tables should be left-aligned.
2712 For that, select the table and change the alignment in
2714 Edit\SpecialChar menuseparator
2716 \begin_inset space ~
2722 \begin_layout Standard
2723 There is only one special thing: the figures with caption besides the figure.
2724 To create such a figure, you have to do the following:
2727 \begin_layout Enumerate
2728 Create a wide figure float:
2730 Insert\SpecialChar menuseparator
2731 Float\SpecialChar menuseparator
2734 , then right click in the figure and select
2737 \begin_inset space ~
2745 \begin_layout Enumerate
2746 Enter your caption text.
2749 \begin_layout Enumerate
2754 to move the cursor above the caption.
2757 \begin_layout Enumerate
2761 \begin_layout Enumerate
2762 Position the cursor behind the figure and insert a horizontal fill:
2764 Insert\SpecialChar menuseparator
2766 \begin_inset space ~
2769 Character\SpecialChar menuseparator
2771 \begin_inset space ~
2779 \begin_layout Enumerate
2780 Switch to \SpecialChar LaTeX
2784 \begin_inset space ~
2792 \begin_layout Enumerate
2802 Do not close the brace!
2805 \begin_layout Enumerate
2806 Position the cursor behind the caption text, switch to \SpecialChar LaTeX
2811 \begin_inset space ~
2823 \begin_layout Standard
2824 Also, refer to the figures in the example paper.
2827 \begin_layout Subsection
2831 \begin_layout Standard
2832 For submission, the paper has to be formated in a special double-spacing
2834 For this purpose, you have to give the option
2838 to the documentclass.
2839 This must be done using the extra class options field in the
2841 Document\SpecialChar menuseparator
2845 Just enter the string
2852 \begin_layout Subsection
2856 \begin_layout Standard
2861 directory contains an example paper written with \SpecialChar LyX
2863 It is the example paper from the original macro package, translated to
2866 Use it for inspiration, and compare the original \SpecialChar LaTeX
2867 code with \SpecialChar LyX
2871 \begin_layout Section
2876 \begin_layout Standard
2882 \begin_layout Subsection
2886 \begin_layout Standard
2888 is a set of macros produced by the American Astronomical Society to
2889 facilitate electronic manuscript submission to the three journals they
2890 publish: the Astrophysical Journal (including the Letters and Supplement),
2891 the Astronomical Journal, and the Publications of the Astronomical Society
2894 has proven to be an excellent tool for generating these documents, especially
2895 given its equation, citation, and figure handling capabilities.
2897 requires version 5.0 (or higher) of these macros; preferably 5.2, which
2898 is the version described here, or higher.
2899 Versions prior to 5.0 are intended for use with \SpecialChar LaTeX
2900 2.09 and are fundamentally
2901 incompatible with \SpecialChar LyX
2903 The AAS\SpecialChar TeX
2904 package may be downloaded from the AAS\SpecialChar TeX
2908 \begin_layout Standard
2909 \begin_inset VSpace medskip
2915 \begin_layout Standard
2917 \begin_inset Flex URL
2920 \begin_layout Plain Layout
2922 https://aas.org/aastex/aastex-downloads
2930 \begin_layout Standard
2931 \begin_inset VSpace medskip
2937 \begin_layout Standard
2938 A complete user guide is contained in that package and you should familiarize
2939 yourself with it thoroughly before embarking on writing a paper in \SpecialChar LyX
2942 will not reduce the need to figure out all the AAS\SpecialChar TeX
2943 commands, it will only
2944 reduce the drudgery of typing everything in.
2945 It is your responsibility to ensure that the final exported \SpecialChar LaTeX
2947 completely to the requirements of the journal to which you are submitting
2951 \begin_layout Subsection
2952 Starting a New Paper
2955 \begin_layout Standard
2956 I strongly suggest that you start with the AAS\SpecialChar TeX
2960 File\SpecialChar menuseparator
2967 , enter the new file name, then choose the
2972 This will show the most common fields found in a manuscript.
2973 Simply overwrite the existing text (including the brackets,
2977 ) with the correct information.
2978 Many of the AAS\SpecialChar TeX
2979 commands and environments can be implemented directly in
2981 , but some cannot: most noticeably
2993 , which should stick out like a sore thumb if you actually just opened the
2995 For commands such as these, the \SpecialChar LaTeX
2996 code must be entered directly and marked
2998 Such commands are referred to as \SpecialChar TeX
2999 code, or Evil Red Text.
3000 I tried to minimize the amount of \SpecialChar TeX
3001 code needed in an AAS\SpecialChar TeX
3003 there is still a bit more required than any of us would like.
3006 \begin_layout Subsection
3007 Finishing Your Paper
3010 \begin_layout Standard
3011 When the paper is finished to your satisfaction and previews/prints correctly,
3013 \begin_inset Quotes eld
3017 \begin_inset Quotes erd
3020 actions which need to be done before you submit it to the journals.
3024 \begin_layout Enumerate
3025 Export your paper as a \SpecialChar LaTeX
3028 File\SpecialChar menuseparator
3029 Export\SpecialChar menuseparator
3037 \begin_layout Enumerate
3042 file with your favorite text editor
3046 \begin_layout Enumerate
3047 remove the comment lines before the
3056 \begin_layout Enumerate
3061 usepackage...{fontenc}
3063 line if it appears (usually just after
3078 \begin_layout Enumerate
3079 remove everything between (and including) the
3091 commands, except for any commands you specifically put into the \SpecialChar LaTeX
3093 (which should appear immediately after the
3094 \begin_inset Quotes eld
3097 User specified \SpecialChar LaTeX
3099 \begin_inset Quotes erd
3110 \begin_layout Enumerate
3111 Run the resulting file through \SpecialChar LaTeX
3112 to make sure it still processes correctly.
3115 \begin_layout Enumerate
3116 Reread the journal requirements to make sure your filenames and formats
3120 \begin_layout Enumerate
3124 \begin_layout Subsection
3125 Comments On Specific Commands
3128 \begin_layout Standard
3129 I will not describe the detailed usage of the individual AAS\SpecialChar TeX
3136 ) gives a good description of each.
3137 Thus it's probably easiest for me to go down the list as found in the guide
3138 and offer comments where necessary.
3139 So let's begin \SpecialChar ldots
3143 \begin_layout Subsubsection
3144 Things that work as expected
3147 \begin_layout Standard
3148 Because they work as you might expect, I simply list them and the section
3249 begin{thebibliography}
3257 (2.13.2), all the cite commands and their variations (2.13.2), the generic
3258 graphicx figure commands (2.14.1),
3282 (2.15.4, amongst other places),
3309 \begin_layout Standard
3310 The following style options also work correctly:
3331 Simply put them in the
3337 Layout\SpecialChar menuseparator
3343 \begin_layout Subsubsection
3344 Things that work, but require more comment
3347 \begin_layout Standard
3348 The following items work, but require a little more discussion:
3351 \begin_layout Itemize
3352 These items are reserved for use by the journal editors, but you can put
3353 them into the \SpecialChar LaTeX
3354 preamble if you feel compelled to do so:
3387 \begin_layout Itemize
3388 These items may be placed in the \SpecialChar LaTeX
3389 preamble, and are included as blanks in
3411 \begin_layout Itemize
3418 (2.3) – can only be used
3419 \begin_inset Quotes eld
3423 \begin_inset Quotes erd
3426 , not in the middle of a paragraph.
3427 Use \SpecialChar TeX
3428 code if you need to embed it.
3431 \begin_layout Itemize
3438 (2.3) – will have extra {} after it.
3439 This should not cause an error.
3442 \begin_layout Itemize
3449 (2.6) – can only be used
3450 \begin_inset Quotes eld
3454 \begin_inset Quotes erd
3457 , not in the middle of a paragraph.
3458 Use \SpecialChar TeX
3459 code if you need to embed it.
3462 \begin_layout Itemize
3469 (2.8) – can't insert a cross-reference tag, you must type the tag name by
3473 \begin_layout Itemize
3487 \begin_layout Itemize
3494 (2.9) – will have extra {} after it.
3495 This should not cause an error.
3498 \begin_layout Itemize
3505 (2.11) – will have extra {} after it.
3506 This should not cause an error.
3509 \begin_layout Itemize
3516 (2.14.2) – you can insert an optional filename argument by placing the cursor
3517 at the beginning of the text and selecting
3519 Insert\SpecialChar menuseparator
3524 \begin_inset Quotes eld
3528 \begin_inset Quotes erd
3531 inserts an optional argument of the type needed by
3538 Hopefully it will be renamed someday.
3541 \begin_layout Itemize
3554 for the catalog ID optional parameter
3557 \begin_layout Itemize
3570 for the catalog ID optional parameter
3573 \begin_layout Subsubsection
3574 Things not implemented, use \SpecialChar TeX
3578 \begin_layout Standard
3601 setcounter{equation}
3603 (2.12), Journal name abbreviations (2.13.4),
3639 (2.15.4, insert it as the first element in the lefthand cell after where
3641 Don't use any of \SpecialChar LyX
3642 's rules in the table),
3654 (2.15.5), much of Misc (2.17, except
3705 \begin_layout Subsubsection
3706 Things that cannot be implemented
3709 \begin_layout Standard
3711 at least in any meaningful sort of way, so I suggest ignoring them.
3712 They are the references environment (2.13.3), and the deluxetable environment
3714 If you really, really need to use deluxetable, I suggest editing it in
3715 a separate file with a text editor, then using
3717 Insert\SpecialChar menuseparator
3719 \begin_inset space ~
3724 to include it in your \SpecialChar LyX
3730 file to see an example of this.
3733 \begin_layout Subsection
3734 FAQs, Tips, Tricks, and Other Ruminations
3737 \begin_layout Subsubsection
3738 Getting \SpecialChar LyX
3739 and AAS\SpecialChar TeX
3743 \begin_layout Standard
3744 It can be a bit tricky to get \SpecialChar LyX
3745 to recognize a new layout and document class.
3746 When all else fails, do this:
3749 \begin_layout Enumerate
3750 Make certain that \SpecialChar LaTeX
3751 can find AAS\SpecialChar TeX
3753 Copy sample.tex (and perhaps table.tex) from the AAS\SpecialChar TeX
3755 directory completely unrelated to \SpecialChar LaTeX
3756 or AAS\SpecialChar TeX
3757 and run \SpecialChar LaTeX
3765 \begin_layout Enumerate
3770 appears in \SpecialChar LyX
3778 \begin_layout Enumerate
3781 Tools\SpecialChar menuseparator
3785 , then restart \SpecialChar LyX
3789 \begin_layout Enumerate
3790 Open a regular new file, not from a template.
3791 Does AAS\SpecialChar TeX
3792 appear in the class list in
3794 Document\SpecialChar menuseparator
3800 \begin_layout Standard
3801 If you get a warning from an existing AAS\SpecialChar TeX
3802 document about not being able
3803 to find the AAS\SpecialChar TeX
3804 layout or a message about
3805 \begin_inset Quotes eld
3808 You should not mix title layouts with normal ones
3809 \begin_inset Quotes erd
3812 , things haven't been installed correctly.
3815 \begin_layout Subsubsection
3817 error processing a table
3820 \begin_layout Standard
3822 , by default, attempts to center the table caption/title.
3823 This seems to produce a bad interaction in AAS\SpecialChar TeX
3824 so you should click somewhere
3825 in the caption/title, then select
3827 Edit\SpecialChar menuseparator
3829 \begin_inset space ~
3843 This took care of it for me.
3846 \begin_layout Subsubsection
3850 \begin_layout Standard
3851 A couple of things: 1) I have noticed some funny spacing in the reference
3852 entries in the text.
3853 When you enter the bibliography item data, make sure their is
3857 space between the last author and the parenthesis setting off the year;
3861 \begin_inset space \thinspace{}
3865 \begin_inset space \space{}
3879 2) Entering the references at all is not obvious.
3880 The easiest thing is to start typing your first reference at the end of
3881 the document, then mark it as type
3886 That will put a small gray box in front of what you just typed.
3887 Click on the box to fill in the rest of the information.
3888 For new references, go to the end of an existing reference and press return.
3889 That will create a new line with its own box, etc.
3892 \begin_layout Subsubsection
3896 \begin_layout Standard
3897 Even though AAS\SpecialChar TeX
3898 provides its own figure commands (
3904 , for example), I much prefer \SpecialChar LaTeX
3905 's standard figure commands (with the default
3914 \begin_inset space ~
3917 commands as \SpecialChar TeX
3918 code into a Figure Float box if you desire, but I never have
3919 much luck getting the layout right.
3920 With the standard graphics, \SpecialChar LyX
3925 usepackage{graphicx}
3927 command into the \SpecialChar LaTeX
3928 preamble and handle the figures in the standard \SpecialChar LaTeX2e
3930 interspersing the figures in the text.
3931 I believe ApJ accepts figures exactly this way now; AJ might still use
3933 \begin_inset Quotes eld
3936 stack everything at the end
3937 \begin_inset Quotes erd
3943 \begin_layout Subsubsection
3944 Things I could have done, but didn't
3947 \begin_layout Standard
3949 \begin_inset Quotes eld
3953 \begin_inset Quotes erd
3956 things I could have implemented, but chose not to.
3957 For instance, I saw no point in double-spacing the text in the \SpecialChar LyX
3959 even though it is double-spaced in the paper manuscript.
3960 Also, I chose not to make separate layouts for the preprint and preprint2
3962 Since I assume you will spend most of your time in the plain manuscript
3963 mode anyway, I decided not to chew up more disk space with this.
3967 \begin_layout Subsection
3971 \begin_layout Standard
3972 Your mileage may vary.
3973 I've now had papers published by both ApJ and AJ that have had 98% of the
3974 effort done in \SpecialChar LyX
3975 ; the last 2% was the \SpecialChar LaTeX
3976 post-processing and a few cleanups.
3977 I have had no trouble with the submission process, and I'm sure the journals
3978 were never aware that there might be a difference.
3979 So, go forth and publish!
3982 \begin_layout Section
3983 AMS \SpecialChar LaTeX
3987 \begin_layout Standard
3997 \begin_layout Standard
3998 \begin_inset VSpace bigskip
4004 \begin_layout Standard
4006 The AMS \SpecialChar LaTeX
4007 layouts are set up to conform to suggested styles for mathematical
4008 papers to be submitted to American Mathematical Society publications.
4009 The layouts are not tailored to a specific journal, but easily can be.
4010 You should refer to the AMS documentation for specific instructions for
4011 each journal (usually it will entail only changing a single line in the
4014 That documentation is available on the Web at
4015 \begin_inset Flex URL
4018 \begin_layout Plain Layout
4026 \begin_inset Flex URL
4029 \begin_layout Plain Layout
4031 ftp://ftp.ams.org/pub/tex/amslatex/
4037 These layouts are appropriate, and useful, for any mathematical writing.
4041 \begin_layout Standard
4042 There are two basic AMS \SpecialChar LaTeX
4046 \begin_layout Itemize
4047 amsart: The standard AMS article format.
4050 \begin_layout Itemize
4051 amsbook: the standard AMS book (really, monograph) format.
4055 \begin_layout Standard
4056 The layouts themselves contain only the minimum necessary to use the AMS
4058 They do not, in particular, contain any of the `theorem' environments used
4059 for setting theorems, lemmas, and the like.
4060 These are contained, instead, in the
4061 \begin_inset Flex Code
4064 \begin_layout Plain Layout
4070 module, which is loaded by default when you select one of the AMS classes.
4071 (It can also be used with other classes and can be removed, if you would
4072 rather use something else.) Less commonly used environments are in the
4073 \begin_inset Flex Code
4076 \begin_layout Plain Layout
4077 Theorems (AMS-Extended)
4082 module, which must be loaded manually.
4085 \begin_layout Standard
4086 By default, theorems and the like are numbered consecutively throughout
4087 the document, but this may be modified by loading the module
4088 \begin_inset Flex Code
4091 \begin_layout Plain Layout
4092 Theorems (Order by Section)
4097 or, if you are using
4098 \begin_inset Flex Code
4101 \begin_layout Plain Layout
4108 \begin_inset Flex Code
4111 \begin_layout Plain Layout
4112 Theorems (Order by Chapter)
4118 These will number the results as
4119 \begin_inset Formula $n.m$
4122 , where the first number refers to the section (or chapter) and the second
4123 refers to the total number of results so far in that section (or chapter).
4124 Many environments are also available unnumbered.
4125 These are indicated by an asterisk at the end.
4126 If you happen to want
4130 unnumbered results, the module
4131 \begin_inset Flex Code
4134 \begin_layout Plain Layout
4140 provides that option.
4143 \begin_layout Standard
4144 Note that these modules do not
4148 to be used with the AMS classes.
4149 It is perfectly possible to use the
4150 \begin_inset Flex Code
4153 \begin_layout Plain Layout
4159 module, and the others mentioned, with other classes, such as
4160 \begin_inset Flex Code
4163 \begin_layout Plain Layout
4170 \begin_inset Flex Code
4173 \begin_layout Plain Layout
4180 \begin_inset Flex Code
4183 \begin_layout Plain Layout
4192 \begin_layout Subsection
4193 What these layouts provide
4196 \begin_layout Standard
4197 There is a long list of included environments provided by these layouts.
4198 In AMS-\SpecialChar LaTeX
4199 , there is, in fact, an opportunity to define an unlimited variety
4200 of `theorem' environments.
4201 However, the AMS recommends the environments that are available in \SpecialChar LyX
4206 \begin_layout Standard
4207 The following environments—as well as the standard environments, such as
4209 \begin_inset Flex Noun
4212 \begin_layout Plain Layout
4219 \begin_inset Flex Noun
4222 \begin_layout Plain Layout
4229 \begin_inset Flex Noun
4232 \begin_layout Plain Layout
4239 \begin_inset Flex Noun
4242 \begin_layout Plain Layout
4249 \begin_inset Flex Noun
4252 \begin_layout Plain Layout
4259 \begin_inset Flex Code
4262 \begin_layout Plain Layout
4269 \begin_inset Flex Code
4272 \begin_layout Plain Layout
4281 \begin_layout Description
4282 Address This should be the author's permanent address.
4285 \begin_layout Description
4287 \begin_inset space ~
4290 Address This should be the author's temporary address at the time of submission,
4291 if different from the Address.
4294 \begin_layout Description
4295 Email Author's e-mail address
4298 \begin_layout Description
4299 URL Author's Web address, if desired.
4302 \begin_layout Description
4303 Keywords Key words or phrases used to identify specific topics discussed
4307 \begin_layout Description
4308 Subjectclass These refer to the AMS Subject Classifications, published and
4311 Mathematical Reviews
4314 These are also available online at the AMS cites listed above.
4317 \begin_layout Description
4321 \begin_layout Description
4325 \begin_layout Description
4329 \begin_layout Standard
4330 The following environments are provided by both the
4331 \begin_inset Flex Code
4334 \begin_layout Plain Layout
4341 \begin_inset Flex Code
4344 \begin_layout Plain Layout
4350 modules, in the latter case in both starred (unnumbered) and unstarred
4351 (numbered) versions.
4352 These same environments are provided only in the starred versions by the
4354 \begin_inset Flex Code
4357 \begin_layout Plain Layout
4366 \begin_layout Theorem
4367 This is typically used for the statements of major results.
4371 \begin_layout Corollary*
4372 This is used for statements which follow fairly directly from previous statement
4374 Again, these can be major results.
4379 These are smaller results needed to prove other statements.
4382 \begin_layout Proposition
4383 These are less major results which (hopefully) add to the general theory
4387 \begin_layout Conjecture
4388 These are statements provided without justification, which the author does
4389 not know how to prove, but which seem to be true (to the author, at least).
4392 \begin_layout Definition*
4393 Guess what this is for.
4394 The font is different for this environment than for the previous ones.
4398 \begin_layout Example*
4399 Used for examples illustrating proven results.
4402 \begin_layout Problem
4403 It's not really known what this is for.
4404 You should figure it out.
4407 \begin_layout Exercise*
4408 Write a description for this one.
4411 \begin_layout Remark
4412 This environment is also a type of theorem, usually a lesser sort of observation.
4415 \begin_layout Claim*
4416 Often used in the course of giving a proof of a larger result.
4420 Generally, these are used to break up long arguments, using specific instances
4426 The numbering scheme for cases is on its own, not together with other numbered
4432 At the end of this environment, a QED symbol (usually a square, but it can
4433 vary with different styles) is placed.
4434 If you want to have other environments within this one—for example, Case
4435 environments—and have the QED symbol appear only after them, then the other
4436 environments need to be nested within the proof environment.
4439 Nesting Environments
4445 for information on nesting.
4448 \begin_layout Standard
4449 And these environments are provided by
4450 \begin_inset Flex Code
4453 \begin_layout Plain Layout
4454 Theorems (AMS-Extended)
4462 \begin_layout Criterion*
4463 A required condition.
4466 \begin_layout Algorithm*
4467 A general procedure to be used.
4470 \begin_layout Axiom*
4471 This is a property or statement taken as true within the system being discussed.
4474 \begin_layout Condition*
4475 Sometimes used to state a condition assumed within the present context of
4480 Similar to a Remark.
4483 \begin_layout Notation*
4484 Used for the explanation of, yes, notation.
4487 \begin_layout Summary
4488 Do we really need to tell you?
4491 \begin_layout Acknowledgement*
4495 \begin_layout Conclusion*
4496 Sometimes used at the end of a long train of argument.
4500 Used in a way similar to Proposition, though perhaps lower on the scale.
4503 \begin_layout Standard
4504 In addition, the AMS classes automatically provide the AMS \SpecialChar LaTeX
4507 They need to be available on your system in order to use these environments.
4510 \begin_layout Section
4518 \begin_layout Standard
4524 \begin_layout Subsection
4528 \begin_layout Standard
4529 These are the layout files for some of the journals of the American Geophysical
4531 It is assumed that you have both the AGU's own class files and AGUplus
4532 installed (everything to be found at
4533 \begin_inset Flex URL
4536 \begin_layout Plain Layout
4538 http://publications.agu.org/files/2013/08/AGU-LaTeX.zip
4546 \begin_layout Subsection
4550 \begin_layout Standard
4560 They are still called this in the \SpecialChar LyX
4561 GUI, though their \SpecialChar LaTeX
4574 \begin_layout Standard
4575 Newly defined styles are
4612 These are mostly manuscript attributes and defined in the AGU class documentati
4616 \begin_layout Standard
4617 I suspect this is still badly incomplete.
4620 \begin_layout Subsection
4624 \begin_layout Standard
4641 \begin_layout Subsection
4645 \begin_layout Itemize
4648 Journal of Geophysical Research
4657 \begin_layout Standard
4658 Add your own, it isn't so hard! Look at the
4669 \begin_layout Subsection
4670 Bugs and things to remember
4673 \begin_layout Standard
4674 In order to use the new layouts, you must remember to do the following for
4678 \begin_layout Enumerate
4684 This can be done in the
4686 Layout\SpecialChar menuseparator
4691 Document\SpecialChar menuseparator
4695 (AGU articles are always in English, right? So
4702 \begin_layout Enumerate
4712 (Yes, this is a bug.)
4715 \begin_layout Enumerate
4716 Make sure you use the
4720 bibliography style, by entering
4724 into the second field of the Bib\SpecialChar TeX
4726 None of the standard styles will do.
4729 \begin_layout Section
4733 \begin_layout Standard
4739 \begin_layout Subsection
4743 \begin_layout Standard
4744 Broadway is for writing plays.
4745 The format is more decorative than Hollywood, and much less standardized.
4746 This format should be suitable for workshops.
4749 \begin_layout Subsection
4753 \begin_layout Standard
4754 The same as in Hollywood.
4757 \begin_layout Subsection
4761 \begin_layout Standard
4766 names as labels then cross-reference the label to insert the name.
4767 The cross-reference dialog will show the current cast of characters.
4770 \begin_layout Subsection
4771 Paper size and Margins
4774 \begin_layout Standard
4775 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
4778 \begin_layout Subsection
4782 \begin_layout Standard
4783 The following environments are available.
4784 You can use broadway.bind to get the bind keys shown at the right.
4787 \begin_layout Itemize
4791 \begin_inset Newline newline
4796 You should not have to use this, but it is here for anything that does not
4800 \begin_layout Itemize
4804 \begin_inset space \hfill{}
4808 \begin_inset Newline newline
4813 Used to describe stage setting and the action.
4814 First use of speaker names in all CAPs.
4817 \begin_layout Itemize
4821 \begin_inset space \hfill{}
4825 \begin_inset Newline newline
4830 Automatically numbered.
4831 On screen it will be arabic, but will print as Roman.
4834 \begin_layout Itemize
4838 \begin_inset space \hfill{}
4842 \begin_inset Newline newline
4852 It is just centered text.
4855 \begin_layout Itemize
4859 \begin_inset space \hfill{}
4863 \begin_inset Newline newline
4868 Not automatically numbered.
4869 You supply the number.
4870 This is because I couldn't figure out how.
4873 \begin_layout Itemize
4877 \begin_inset space \hfill{}
4881 \begin_inset Newline newline
4886 A special case of Narrative to describe the setting and action as the curtain
4890 \begin_layout Itemize
4894 \begin_inset space \hfill{}
4898 \begin_inset Newline newline
4903 The speaker's (actor's) title, centered in all CAPS.
4906 \begin_layout Itemize
4910 \begin_inset space \hfill{}
4914 \begin_inset Newline newline
4919 Instructions to the speaker.
4920 The parentheses are automatically inserted.
4921 The ( will appear on screen, but both will be in the printed play.
4922 This environment is only used within
4929 \begin_layout Itemize
4933 \begin_inset space \hfill{}
4937 \begin_inset Newline newline
4942 What the Speaker says.
4945 \begin_layout Itemize
4949 \begin_inset space \hfill{}
4953 \begin_inset Newline newline
4958 The curtain comes down.
4961 \begin_layout Itemize
4965 \begin_inset space \hfill{}
4971 \begin_layout Itemize
4975 \begin_inset space \hfill{}
4981 \begin_layout Itemize
4985 \begin_inset space \hfill{}
4991 \begin_layout Standard
4995 \begin_layout Section
4999 \begin_layout Standard
5004 can be used to type letters according to German conventions.
5005 A template file is included in
5007 .../lyx/share/templates
5009 for you to use as a starting point.
5012 \begin_layout Section
5020 \begin_layout Standard
5026 \begin_layout Subsection
5030 \begin_layout Standard
5031 This is the layout file for the European Geophysical Society journals.
5036 can be downloaded from the web site of the EGS under
5037 \begin_inset Flex URL
5040 \begin_layout Plain Layout
5050 \begin_layout Subsection
5054 \begin_layout Standard
5057 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
5065 The current layout file is unfortunately very unmodular and would benefit
5066 from using the various
5073 \begin_layout Section
5077 \begin_layout Standard
5078 See the \SpecialChar LyX
5084 It contains all infos you need.
5087 \begin_layout Section
5090 Foil\SpecialChar TeX
5094 \begin_inset CommandInset label
5103 \begin_layout Standard
5109 \begin_layout Subsection
5113 \begin_layout Standard
5114 This section describes how to use \SpecialChar LyX
5115 to make slides for overhead projectors.
5116 There are two document classes that can do this: the default slides class
5119 Foil\SpecialChar TeX
5123 This section documents the latter.
5126 \begin_layout Standard
5127 I'm going to say this again, nice and clear, so that there's no misunderstanding
5131 \begin_layout Standard
5132 \begin_inset VSpace bigskip
5138 \begin_layout Standard
5142 This section documents the class
5143 \begin_inset Quotes eld
5151 \begin_inset Quotes erd
5159 \begin_layout Standard
5160 \begin_inset VSpace bigskip
5166 \begin_layout Standard
5167 If you're looking for the documentation for
5168 \begin_inset Quotes eld
5176 \begin_inset Quotes erd
5180 \begin_inset space ~
5184 \begin_inset CommandInset ref
5186 reference "sec:slitex"
5191 If your machine doesn't have the
5199 installed, you'll probably have to use the default
5203 class, which isn't quite as good as
5208 \begin_layout Standard
5213 class is designed for use with version
5214 \begin_inset space ~
5222 class file which is now an integral part of \SpecialChar LaTeX2e
5226 \begin_layout Subsection
5230 \begin_layout Standard
5231 Obviously, to use this document class, you need to select
5242 \begin_inset space ~
5248 There are some settings in the
5251 \begin_inset space ~
5256 dialog that you should know about that are specific to this class:
5259 \begin_layout Itemize
5260 Don't change the options
5271 \begin_inset space ~
5277 They're ignored by the
5284 \begin_layout Itemize
5285 The default font size is 20
5286 \begin_inset space \thinspace{}
5289 pt with the other options being 17
5290 \begin_inset space \thinspace{}
5294 \begin_inset space \thinspace{}
5298 \begin_inset space \thinspace{}
5304 \begin_layout Itemize
5313 but all math equations are still typeset in the usual roman font.
5316 \begin_layout Itemize
5319 Foil\SpecialChar TeX
5322 supports A4 and Letter paper sizes as well as a special size for working
5324 \begin_inset space \thinspace{}
5328 It doesn't support A5, B5, legal or executive paper sizes.
5331 \begin_layout Itemize
5332 Don't bother changing the
5336 settings because they are ignored anyway.
5337 All floats appear where they are defined in the text.
5340 \begin_layout Itemize
5345 setting behaves a bit differently for this class.
5348 Foil\SpecialChar TeX
5351 provides extensive footer and header capabilities including a user-defined
5354 \begin_inset space ~
5358 \begin_inset CommandInset ref
5360 reference "sec:foilfoot"
5365 The title page is treated differently to all other pages in the document
5374 has the logo centered at the bottom of the page (if one is defined).
5375 The possible page style choices and what they do are as follows:
5379 \begin_layout Labeling
5380 \labelwidthstring MMMMMMM
5387 The final output contains no page numbers, or other headers or footers
5388 (except footnotes of course).
5392 \begin_layout Labeling
5393 \labelwidthstring MMMMMMM
5400 The final output contains page numbers centered at the bottom of the page.
5401 No other headings or footers (other than footnotes).
5404 \begin_layout Labeling
5405 \labelwidthstring MMMMMMM
5410 Page numbers in lower right corner.
5411 Additional headers and footers are also shown.
5412 This is also the default.
5415 \begin_layout Labeling
5416 \labelwidthstring MMMMMMM
5421 Gives you access to the
5425 package although its use with
5427 Foil\SpecialChar TeX
5430 is discouraged by the writer of the
5432 Foil\SpecialChar TeX
5435 package because of some potential page layout clashes.
5439 \begin_layout Subsubsection
5443 \begin_layout Standard
5444 The following options may be used in the extra class options in the
5446 Document\SpecialChar menuseparator
5452 \begin_layout Labeling
5453 \labelwidthstring MMMMMMx
5458 This sets up the page layout for 7.33
5459 \begin_inset space \thinspace{}
5463 \begin_inset space \thinspace{}
5466 in paper, which is about the same aspect ratio as a 35
5467 \begin_inset space \thinspace{}
5470 mm slide, making it a bit easier to work with this medium.
5473 \begin_layout Labeling
5474 \labelwidthstring MMMMMMx
5479 Places a rule across the page below the header on every page except the
5483 \begin_layout Labeling
5484 \labelwidthstring MMMMMMx
5489 Places a rule across the page above the footer on every page except the
5493 \begin_layout Labeling
5494 \labelwidthstring MMMMMMx
5499 This is automatically set each time you create a new
5506 Foil\SpecialChar TeX
5509 to use the dvips driver to rotate those pages that are set as landscape
5513 \begin_layout Labeling
5514 \labelwidthstring MMMMMMx
5519 Simply changes the page dimensions to those of a landscape page but doesn't
5521 Thus if you use this option you need to use an external program to rotate
5522 each page or feed your paper through your printer as landscape.
5523 Note that this option effectively reverses the roles of the
5531 environments (don't worry these are described in the next section).
5534 \begin_layout Labeling
5535 \labelwidthstring MMMMMMx
5540 Equation numbers on the left.
5543 \begin_layout Labeling
5544 \labelwidthstring MMMMMMx
5549 Flush-left equations.
5552 \begin_layout Subsection
5553 Supported Environments
5556 \begin_layout Standard
5557 Most of the environments commonly supported in other classes are also supported
5563 There are several additional environments provided by
5565 Foil\SpecialChar TeX
5568 as well as a couple added by \SpecialChar LyX
5570 The following environments are shared with other classes:
5573 \begin_layout Standard
5574 \begin_inset Flex Multiple Columns
5577 \begin_layout Itemize
5583 \begin_layout Itemize
5589 \begin_layout Itemize
5595 \begin_layout Itemize
5601 \begin_layout Itemize
5607 \begin_layout Itemize
5614 \begin_layout Itemize
5620 \begin_layout Itemize
5626 \begin_layout Itemize
5632 \begin_layout Itemize
5638 \begin_layout Itemize
5644 \begin_layout Itemize
5650 \begin_layout Itemize
5656 \begin_layout Itemize
5662 \begin_layout Itemize
5668 \begin_layout Itemize
5674 \begin_layout Itemize
5680 \begin_layout Itemize
5691 \begin_layout Standard
5692 That is, all the major environments apart from the sectioning environments.
5693 Since foils are essentially self-contained sections, with a title and body,
5696 Foil\SpecialChar TeX
5699 provides specific commands for starting new foils and these are:
5702 \begin_layout Itemize
5708 \begin_layout Itemize
5714 \begin_layout Standard
5716 also provides slightly modified versions of these two environments called:
5719 \begin_layout Itemize
5725 \begin_layout Itemize
5731 \begin_layout Standard
5732 and the differences will be explained in the next section.
5735 \begin_layout Standard
5736 Since foils are often used in presenting ideas or new theorems and such
5739 Foil\SpecialChar TeX
5742 also provides a comprehensive box of goodies for presenting them:
5745 \begin_layout Standard
5746 \begin_inset Flex Multiple Columns
5749 \begin_layout Itemize
5755 \begin_layout Itemize
5761 \begin_layout Itemize
5767 \begin_layout Itemize
5773 \begin_layout Itemize
5779 \begin_layout Itemize
5785 \begin_layout Itemize
5791 \begin_layout Itemize
5797 \begin_layout Itemize
5803 \begin_layout Itemize
5809 \begin_layout Itemize
5820 \begin_layout Standard
5821 The starred versions are unnumbered while the unstarred versions are numbered.
5822 There are also two list environments added by \SpecialChar LyX
5826 \begin_layout Itemize
5832 \begin_layout Itemize
5838 \begin_layout Standard
5841 Foil\SpecialChar TeX
5844 provides some powerful header and footer capabilities that are best set
5845 in the preamble although they may be set at any point in a document.
5846 If you want to change these settings in your document the best place to
5847 do so is at the very top of a foil, i.
5848 \begin_inset space \thinspace{}
5854 \begin_inset space \space{}
5859 straight after the foilhead.
5862 \begin_layout Standard
5863 For this purpose, the following command styles are provided [
5870 \begin_layout Standard
5871 \begin_inset Flex Multiple Columns
5874 \begin_layout Itemize
5878 \begin_inset space ~
5884 \begin_layout Itemize
5890 \begin_layout Itemize
5894 \begin_inset space ~
5900 \begin_layout Itemize
5904 \begin_inset space ~
5910 \begin_layout Itemize
5914 \begin_inset space ~
5921 \begin_layout Plain Layout
5922 \begin_inset space ~
5934 \begin_layout Standard
5935 There are also a few commands provided by
5937 Foil\SpecialChar TeX
5940 that aren't directly supported by \SpecialChar LyX
5941 but I'll tell you what they do and how
5942 to use them in section
5943 \begin_inset space ~
5947 \begin_inset CommandInset ref
5949 reference "sec:unsuppfoils"
5956 \begin_layout Subsection
5957 Building a Set of Foils
5960 \begin_layout Standard
5961 This section will give a simple introduction to using the different environments
5962 to build a set of foils.
5963 If you want to see an example set of foils, take a look at the
5967 file you find in \SpecialChar LyX
5975 \begin_layout Subsubsection
5976 Give It a Title Page
5979 \begin_layout Standard
5980 Unlike other classes that provide
6000 creates the title on a page of its own.
6001 If you leave out the
6005 environment \SpecialChar LaTeX
6006 will substitute the current date (every time you regenerate
6010 \begin_layout Subsubsection
6014 \begin_layout Standard
6015 As I mentioned earlier, there are four ways of starting a new foil.
6016 For portrait foils you should use
6025 The difference between these two environments is the amount of space between
6026 the title of the foil (the foilhead) and the body of the foil.
6029 \begin_layout Standard
6030 Landscape foils are generated using the
6039 Again the only difference is the spacing between foilhead and body.
6040 Both of the short versions have 0.5
6041 \begin_inset space ~
6044 inches less separation between the foilhead and the body.
6048 \begin_layout Standard
6049 One problem with the support for landscape foils is the requirement that
6054 driver to generate the PostScript output otherwise the foils won't be rotated.
6055 It is possible to get landscape foils even if you haven't got the
6059 driver provided you can feed your foils sideways through your printer ;-)
6062 \begin_layout Subsubsection
6063 Theorems, Lemmas, Proofs and more
6066 \begin_layout Standard
6067 Due to a small bug in \SpecialChar LyX
6068 you can't have two of the same type of these environments
6069 directly following each other.
6070 They must be separated by something.
6071 If you try, you will just be extending the previous environment as if you
6072 had merged the two environments together.
6073 So, how do you get around this problem? The simplest option is to insert
6074 some text between the two environments or add a
6079 environment between the two with just a
6080 \begin_inset Quotes eld
6088 \begin_inset Quotes erd
6092 This will force \SpecialChar LyX
6093 to produce two separate environments and hence the correct
6096 An example is provided in the example file included with the \SpecialChar LyX
6098 Remember, this problem only occurs if you are trying to place two of the
6099 same type of theorem-like environments one directly after the other.
6102 \begin_layout Subsubsection
6106 \begin_layout Standard
6107 You get all the commonly supported list styles found in other classes as
6108 well as two new ones.
6109 I'll only describe the new ones here.
6110 If you want to find out more about the other list environments check out
6116 If you intend to use itemized lists you might also want to read about the
6120 \begin_inset space ~
6124 \begin_inset space ~
6129 dialog described above in section
6130 \begin_inset space ~
6134 \begin_inset CommandInset ref
6136 reference "sec:bullet"
6143 \begin_layout Standard
6144 The two new list styles,
6152 , are designed to make it easier for you to create lists of do's and don'ts
6153 or right and wrong by providing dedicated environments that use a tick
6154 or a cross as the label of the list.
6155 These lists are in fact dedicated variants of the
6160 They do however require that you have the
6167 \begin_layout Subsubsection
6171 \begin_layout Standard
6174 Foil\SpecialChar TeX
6177 redefines the floating tables and figures so that they appear exactly where
6178 they are in the text rather than pushing them to the top of the page or
6179 to some user specified location.
6180 In fact if you change the float placement settings they are simply ignored.
6183 \begin_layout Subsubsection
6184 Page Headers and Footers
6185 \begin_inset CommandInset label
6194 \begin_layout Standard
6198 \begin_inset space ~
6207 are two commands used to control the left-footer text string.
6208 The first is meant to allow you to include a graphic logo on your foils
6210 \begin_inset Quotes eld
6215 Foil\SpecialChar TeX
6219 \begin_inset Quotes erd
6223 While the second is meant to provide a classification for the audience,
6227 \begin_inset space \thinspace{}
6233 \begin_inset space \space{}
6237 It is empty by default.
6240 \begin_layout Standard
6241 The remaining page corners can be filled by
6244 \begin_inset space ~
6249 (which defaults to page numbers),
6252 \begin_inset space ~
6260 \begin_inset space ~
6268 \begin_layout Subsection
6271 Foil\SpecialChar TeX
6275 \begin_inset CommandInset label
6277 name "sec:unsuppfoils"
6284 \begin_layout Standard
6285 All the commands mentioned below need to be set in a
6295 within another environment.
6298 \begin_layout Subsubsection
6302 \begin_layout Standard
6303 All lengths are adjusted using the
6326 should be replaced by the name given to the length you want to change and
6331 is the length value.
6332 All lengths should be specified in units of length such as inches (
6344 ) or relative to some document or font-based length such as
6354 \begin_layout Standard
6355 It's possible to change the spacing between a foilhead and the body of the
6356 foil by adjusting the length specified by
6363 For example, to make
6368 \begin_inset space \space{}
6371 in closer to their bodies put the following in the preamble:
6377 foilheadskip}{-0.5in}
6380 \begin_layout Standard
6381 The spacings around floats can be adjusted by setting these lengths:
6384 \begin_layout Labeling
6385 \labelwidthstring MMMMMMMMMMM
6392 Separation between the text and the top of the float
6395 \begin_layout Labeling
6396 \labelwidthstring MMMMMMMMMMM
6403 Separation between the float and the caption
6406 \begin_layout Labeling
6407 \labelwidthstring MMMMMMMMMMM
6414 Separation between the caption and the following text
6417 \begin_layout Labeling
6418 \labelwidthstring MMMMMMMMMMM
6425 You can make the captions narrower than the surrounding text by adjusting
6427 Best done relative to
6436 \begin_layout Standard
6437 There are also several title page related lengths that you may find useful
6438 if you have a long title or several authors:
6441 \begin_layout Labeling
6442 \labelwidthstring MMMMMMMMMMM
6449 Separation from headers to
6454 \begin_layout Labeling
6455 \labelwidthstring MMMMMMMMMMM
6473 \begin_layout Labeling
6474 \labelwidthstring MMMMMMMMMMM
6488 \begin_layout Labeling
6489 \labelwidthstring MMMMMMMMMMM
6505 \begin_layout Labeling
6506 \labelwidthstring MMMMMMMMMMM
6522 \begin_layout Standard
6523 The last length related command affects all the list environments.
6534 a list environment then all the vertical spacing between the list items
6536 Note that this is a command not a length so it doesn't require
6542 like the stuff mentioned above.
6545 \begin_layout Subsubsection
6549 \begin_layout Standard
6562 commands control whether the logo in the
6566 definition appear on a given page.
6573 in the preamble then none of the foils will have the logo on them.
6574 If you don't want the logo on a particular page place the
6580 directly after the foilhead of that page and the
6586 directly after the next foilhead.
6589 \begin_layout Standard
6590 If you decide to use the
6594 page style setting in the
6597 \begin_inset space ~
6602 dialog you should probably add
6612 to your preamble so headers and footers on landscape pages are correctly
6613 placed when rotated.
6614 This is due to some clashes between the page layouts provided by the
6625 \begin_layout Section
6626 Hollywood (Hollywood spec scripts)
6629 \begin_layout Standard
6635 \begin_layout Subsection
6639 \begin_layout Standard
6640 Getting the format of a Hollywood script right is a
6641 \begin_inset Quotes eld
6645 \begin_inset Quotes erd
6648 It is designed to make the readers focus on content and to be easy and
6649 familiar for the actors to read.
6650 Each page of a script should be one minute of film.
6651 Nothing goes in a script that you cannot see or hear on screen.
6652 The courier 12 pt font should be used throughout.
6656 \begin_layout Subsection
6660 \begin_layout Standard
6661 Speakers' lines should NEVER break in mid-sentence.
6662 If a speaker's lines continue over a page break, repeat the
6666 title followed by (Cont'd).
6669 \begin_layout Subsection
6673 \begin_layout Standard
6678 names as labels then cross-reference the label to insert the name.
6679 The cross-reference dialog will show the current cast of characters.
6680 You can use this to insert the speaker name in narratives also.
6683 \begin_layout Subsection
6684 Paper size and Margins
6687 \begin_layout Standard
6688 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
6691 \begin_layout Subsection
6695 \begin_layout Standard
6696 The following environments are available.
6697 You can use hollywood.bind to get the bind keys shown at the right.
6700 \begin_layout Itemize
6704 \begin_inset Newline newline
6709 Used where nothing else works.
6713 \begin_layout Itemize
6719 \begin_inset space \hfill{}
6727 \begin_inset Newline newline
6730 Usually followed by something like
6731 \begin_inset Quotes eld
6735 \begin_inset Quotes erd
6741 \begin_layout Itemize
6745 \begin_inset space \hfill{}
6749 \begin_inset Newline newline
6754 Introduces a new INTERIOR camera set-up.
6755 Always followed by DAY or NIGHT, or something similar to define the lighting
6757 Everthing on this line in CAPS.
6760 \begin_layout Itemize
6764 \begin_inset space \hfill{}
6768 \begin_inset Newline newline
6773 Introduces a new EXTERIOR camera set-up.
6774 Everthing on this line in CAPS.
6777 \begin_layout Itemize
6781 \begin_inset space \hfill{}
6785 \begin_inset Newline newline
6790 The character speaking.
6793 \begin_layout Itemize
6797 \begin_inset space \hfill{}
6801 \begin_inset Newline newline
6806 Instructions to the speaker.
6807 The () are automatically inserted, but only the ( will show in \SpecialChar LyX
6809 Both will be printed.
6812 \begin_layout Itemize
6816 \begin_inset space \hfill{}
6820 \begin_inset Newline newline
6832 \begin_layout Itemize
6836 \begin_inset space \hfill{}
6840 \begin_inset Newline newline
6845 Camera movement instruction.
6847 \begin_inset space \thinspace{}
6851 \begin_inset space \space{}
6857 \begin_layout Itemize
6861 \begin_inset space \hfill{}
6867 \begin_layout Itemize
6871 \begin_inset space \hfill{}
6877 \begin_layout Itemize
6881 \begin_inset space \hfill{}
6887 \begin_layout Itemize
6891 \begin_inset space \hfill{}
6897 \begin_layout Subsection
6901 \begin_layout Itemize
6905 \begin_layout Itemize
6909 \begin_layout Itemize
6911 \begin_inset space \thinspace{}
6918 \begin_layout Itemize
6923 \begin_layout Itemize
6924 PAN — camera movement
6927 \begin_layout Itemize
6928 INSERT — cut to close-up of
6931 \begin_layout Section
6935 \begin_layout Standard
6938 Panayotis Papasotiriou
6941 \begin_layout Subsection
6945 \begin_layout Standard
6946 The ijmpc package is a set of macros that facilitates electronic manuscript
6949 International Journal of Modern Physics C
6952 Similarly, the ijmpd package is for creating manuscripts to be submitted
6955 International Journal of Modern Physics D
6958 Both journals are published by World Scientific.
6959 The corresponding document classes are named
6968 These files, together with instructions for the authors, can be downloaded
6970 \begin_inset Flex URL
6973 \begin_layout Plain Layout
6975 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
6981 \begin_inset Flex URL
6984 \begin_layout Plain Layout
6986 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
6992 Both packages are modified versions of the standard
6993 \begin_inset Quotes eld
6997 \begin_inset Quotes erd
7000 package, and they are almost (but not exactly) identical.
7001 Most of their features are supported by \SpecialChar LyX
7003 I have used \SpecialChar LyX
7004 successfully to write articles submitted to both journals
7005 without any problem.
7008 \begin_layout Subsection
7012 \begin_layout Standard
7013 As usual, the easiest way to write a paper is to start with a template.
7016 File\SpecialChar menuseparator
7032 This will give an (almost) empty document that includes the most common
7033 fields found in a manuscript.
7034 Simply overwrite the existing text (including the brackets,
7039 You should keep in mind the following remarks.
7042 \begin_layout Enumerate
7044 won't let you change the font size and the page style of the document,
7045 because such modifications are not allowed by both packages.
7048 \begin_layout Enumerate
7049 The language of the document should not be changed.
7050 Before previewing your paper, be sure that the babel package is not used.
7051 To do this, click on
7053 Tools\SpecialChar menuseparator
7064 checkbox in the language settings, and click on
7072 , if you wish to make this change permanent).
7075 \begin_layout Enumerate
7077 \begin_inset Quotes eld
7081 \begin_inset Quotes erd
7084 style must be used to define keywords.
7087 \begin_layout Enumerate
7088 The ijmpc package provides a style named
7089 \begin_inset Quotes eld
7092 Classification Codes
7093 \begin_inset Quotes erd
7096 , which can be used to define classification codes, such as PACS numbers.
7097 Note that this facility is not supported by the ijmpd package.
7100 \begin_layout Enumerate
7101 Several new environments are available:
7102 \begin_inset Quotes eld
7106 \begin_inset Quotes erd
7110 \begin_inset Quotes eld
7114 \begin_inset Quotes erd
7118 \begin_inset Quotes eld
7122 \begin_inset Quotes erd
7126 \begin_inset Quotes eld
7130 \begin_inset Quotes erd
7134 \begin_inset Quotes eld
7138 \begin_inset Quotes erd
7142 \begin_inset Quotes eld
7146 \begin_inset Quotes erd
7150 \begin_inset Quotes eld
7154 \begin_inset Quotes erd
7158 \begin_inset Quotes eld
7162 \begin_inset Quotes erd
7166 \begin_inset Quotes eld
7170 \begin_inset Quotes erd
7174 \begin_inset Quotes eld
7178 \begin_inset Quotes erd
7182 \begin_inset Quotes eld
7186 \begin_inset Quotes erd
7190 \begin_inset Quotes eld
7194 \begin_inset Quotes erd
7198 \begin_inset Quotes eld
7202 \begin_inset Quotes erd
7206 \begin_inset Quotes eld
7210 \begin_inset Quotes erd
7214 Their use is more or less obvious.
7216 supports all these environments; it will use the proper label, text style,
7217 and numbering scheme for each of them.
7220 \begin_layout Enumerate
7221 Both packages use basic citations; the natbib package should not be used.
7223 , citation references are shown as usual; in the output, citations are
7224 shown as superscripts.
7225 If you want to use a citation as normal text, you should use the
7230 \begin_inset space \thinspace{}
7234 \begin_inset space \space{}
7238 \begin_inset Quotes eld
7242 \begin_inset space \space{}
7252 \begin_inset Quotes erd
7258 \begin_layout Enumerate
7260 \begin_inset Quotes eld
7264 \begin_inset Quotes erd
7267 section in both packages.
7268 To put acknowledgments, just use the
7269 \begin_inset Quotes eld
7273 \begin_inset Quotes erd
7279 \begin_layout Enumerate
7280 Appendices may be added to the paper,
7284 the Acknowledgments and
7290 provides a special environment, called
7291 \begin_inset Quotes eld
7295 \begin_inset Quotes erd
7298 which marks the beginning of the appendices.
7299 This environment should be left blank; it just sends a \SpecialChar LaTeX
7300 command, but nothing
7304 \begin_inset Quotes eld
7308 \begin_inset Quotes erd
7311 is printed with blue letters, as a signal that all sections after that
7312 point are appendices.
7313 To write an appendix, use the
7314 \begin_inset Quotes eld
7318 \begin_inset Quotes erd
7323 will number each appendix with capital letters, as required by both journals.
7325 \begin_inset Quotes eld
7329 \begin_inset Quotes erd
7336 be present before the first appendix; if not, all appendices will be numbered
7337 as normal sections in the output.
7340 \begin_layout Enumerate
7341 The ijmpc and the ijmpd packages use the
7345 command to implement table captions.
7346 As a result, a table created by \SpecialChar LyX
7347 is printed correctly, but its caption
7349 However, you can use some \SpecialChar TeX
7350 code to overcome this problem, so that captions
7351 are printed as expected.
7352 To do so, create a float table as usual, remove the caption, and replace
7353 it with the \SpecialChar TeX
7364 (sic); you must also the \SpecialChar TeX
7369 immediately after the tabular material.
7370 Study the example table included in the template files to see how this
7371 trick is implemented.
7372 Alternatively, If you need table captions, you should implement the whole
7377 file, then include this file to the \SpecialChar LyX
7380 Insert\SpecialChar menuseparator
7381 File\SpecialChar menuseparator
7383 \begin_inset space ~
7389 Details on how to create a table float can be found in the files
7397 , included in the corresponding packages.
7400 \begin_layout Subsection
7401 Preparing a paper for submission
7404 \begin_layout Standard
7405 Before you submit your paper you must export the \SpecialChar LyX
7406 document as a \SpecialChar LaTeX
7409 File\SpecialChar menuseparator
7410 Export\SpecialChar menuseparator
7418 \begin_layout Plain Layout
7419 Actually you have the choice between \SpecialChar LaTeX
7420 (plain) and pdflatex.
7421 If you intend to use pdflatex to prepare the paper, you should use the
7422 pdflatex option so that included graphics are converted to PDF format,
7423 ready for use by pdflatex.
7428 , then make the following changes to the resulting
7435 \begin_layout Enumerate
7436 Remove the comment lines before the
7445 \begin_layout Enumerate
7446 Remove everything between (and including) the
7458 commands, except for any commands you specifically put into the \SpecialChar LaTeX
7462 \begin_layout Standard
7467 file should be saved and processed through \SpecialChar LaTeX
7468 as many times as necessary.
7469 You may also want to check the resulting
7476 \begin_layout Subsection
7477 Use of \SpecialChar TeX
7481 \begin_layout Standard
7482 The use of \SpecialChar TeX
7483 code is reduced to two commands, which must be placed at the
7484 top of the document.
7485 If you started writing your paper by using the
7493 template, the \SpecialChar TeX
7494 code needed is already in its place; you usually don't need
7496 You may only modify the first \SpecialChar TeX
7497 code to specify the information printed
7498 to the top of odd and even pages (authors' names and short paper's title,
7500 This \SpecialChar TeX
7501 code must have the form
7505 markboth{Authors' Names}{Short Paper's Title}
7510 \begin_layout Section
7514 \begin_layout Standard
7520 \begin_layout Subsection
7524 \begin_layout Standard
7525 The iopart package provides a document class to create electronic manuscript
7526 submission to the journals published by the Institute of Physics.
7527 Instructions for the authors how to create a paper using the iopart class
7528 can be downloaded together with the iopart package from the site
7529 \begin_inset Flex URL
7532 \begin_layout Plain Layout
7534 ftp://ftp.iop.org/pub/journals/latex2e
7542 \begin_layout Subsection
7546 \begin_layout Standard
7547 The easiest way to write a paper is to start with the file
7551 that is available in \SpecialChar LyX
7552 's examples files folder.
7553 Open this file, save it under a new name, and start writing.
7554 The example file explains how to use the special text environments.
7555 Here are the most important advices:
7558 \begin_layout Itemize
7559 To be able to compile your document to a PDF, PS, or DVI, ensure that the
7562 Use AMS math package
7564 in the document settings under
7571 \begin_layout Itemize
7574 The title environment defines the kind of your paper.
7575 So use one of the following environments for the title:
7579 \begin_layout Itemize
7588 \begin_layout Itemize
7597 \begin_layout Itemize
7603 for a Topical review
7606 \begin_layout Itemize
7615 \begin_layout Itemize
7624 \begin_layout Itemize
7630 for a Paper (same as Title)
7633 \begin_layout Itemize
7639 for a Preliminary communication
7642 \begin_layout Itemize
7648 for a Rapid communication
7651 \begin_layout Itemize
7657 for a Letter to the editor
7661 \begin_layout Itemize
7664 All title environments except of
7668 can have an optional short title.
7671 \begin_layout Itemize
7672 There is a general title environment
7676 which is not directly supported by the \SpecialChar LyX
7678 This can be used as \SpecialChar TeX
7679 code when your document doesn't fit into one of the
7683 \begin_layout Standard
7684 For more informations like hints for special table and formula formatting,
7685 look at the IOP author guidelines.
7688 \begin_layout Section
7692 \begin_layout Standard
7695 Panayotis Papasotiriou
7698 \begin_layout Subsection
7702 \begin_layout Standard
7703 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
7704 that facilitates electronic manuscript submission to the journals they
7706 Most known of them (at least in my domain of interest) are
7708 Astrophysics and Space Science
7714 , but there are many others (see a complete list at
7715 \begin_inset Flex URL
7718 \begin_layout Plain Layout
7720 http://www.wkap.nl/jrnllist.htm/JRNLHOME
7726 The Kluwer package may be downloaded from the site
7727 \begin_inset Flex URL
7730 \begin_layout Plain Layout
7732 http://www.wkap.nl/kaphtml.htm/STYLEFILES
7738 A complete user guide is contained in that package (but it can also be
7739 downloaded separately).
7742 \begin_layout Standard
7744 supports many features of the package but not everything.
7745 However, the \SpecialChar TeX
7746 code needed is reduced to some
7747 \begin_inset Quotes eld
7751 \begin_inset Quotes erd
7754 commands of the package (see
7755 \begin_inset space ~
7759 \begin_inset CommandInset ref
7761 reference "subsec:kluwer_peculiarities"
7766 I have recently used \SpecialChar LyX
7767 to write an article submitted to the
7769 Astrophysics and Space Science
7771 without any problem.
7774 \begin_layout Subsection
7778 \begin_layout Standard
7779 The easiest way to write a paper is to start with the Kluwer template file.
7782 File\SpecialChar menuseparator
7794 This will give an (almost) empty document that includes the most common
7795 fields found in a manuscript and a short description of their use.
7796 As in most templates, simply overwrite the existing text (including the
7801 ) with the correct information.
7804 \begin_layout Subsection
7805 Preparing a paper for submission
7808 \begin_layout Standard
7809 As in the AAS\SpecialChar TeX
7810 package, before you submit your paper to a journal you must
7812 \begin_inset Quotes eld
7816 \begin_inset Quotes erd
7822 \begin_layout Enumerate
7823 Export your paper as a \SpecialChar LaTeX
7825 To do this, click on
7827 File\SpecialChar menuseparator
7828 Export\SpecialChar menuseparator
7836 \begin_layout Enumerate
7841 file with a text editor and make the following changes
7845 \begin_layout Enumerate
7846 remove the comment lines before the
7855 \begin_layout Enumerate
7856 remove everything between (and including) the
7868 commands, except for any commands you specifically put into the \SpecialChar LaTeX
7872 \begin_layout Standard
7881 \begin_layout Enumerate
7886 file through \SpecialChar LaTeX
7887 as many times as necessary (usually up to three).
7890 \begin_layout Enumerate
7896 \begin_inset space \thinspace{}
7900 \begin_inset space \space{}
7907 , and check if everything is OK (it should, if you didn't make any mistake).
7910 \begin_layout Subsection
7911 \begin_inset Quotes eld
7915 \begin_inset Quotes erd
7918 of the Kluwer package
7919 \begin_inset CommandInset label
7921 name "subsec:kluwer_peculiarities"
7928 \begin_layout Standard
7929 The Kluwer package has the following
7930 \begin_inset Quotes eld
7934 \begin_inset Quotes erd
7940 \begin_layout Enumerate
7941 It is possible to write multiple articles in the same \SpecialChar LaTeX
7946 \begin_layout Plain Layout
7947 I can't imagine any good reason to do this.
7953 Each article must be included in the environment
7954 \begin_inset Quotes eld
7958 \begin_inset Quotes erd
7962 Unfortunately, this environment cannot be omitted, even if you write just
7964 Therefore, each article starts with the command
7970 and, obviously, ends with the command
7977 Although this can be implemented in \SpecialChar LyX
7978 , I didn't included it, since it looks
7979 ugly and can confuse the novice user.
7980 Therefore, you need to enter them directly and mark them as \SpecialChar LaTeX
7983 \begin_inset Quotes eld
7988 \begin_inset Quotes erd
7994 \begin_layout Enumerate
7995 Information given at the beginning of the article (i.
7996 \begin_inset space \thinspace{}
8000 \begin_inset space \space{}
8003 title, subtitle, author, institution, running title, running author, abstract
8004 and keywords) must be included in an environment called
8005 \begin_inset Quotes eld
8009 \begin_inset Quotes erd
8013 This is not implemented in \SpecialChar LyX
8014 , so you must enter title, subtitle etc.
8015 \begin_inset space ~
8018 between two \SpecialChar TeX
8034 \begin_layout Enumerate
8035 According to the user manual, the label of each bibliography item must be
8059 \begin_layout Standard
8064 template takes care of all these
8065 \begin_inset Quotes eld
8069 \begin_inset Quotes erd
8073 If you start a new paper using this template you don't need to do anything
8078 \begin_layout Enumerate
8079 don't delete the \SpecialChar TeX
8080 code included in the template, and
8083 \begin_layout Enumerate
8084 copy the example bibliography item included in the template and modify it
8085 as necessary to enter new bibliography items.
8088 \begin_layout Section
8092 \begin_layout Standard
8098 \begin_layout Subsection
8102 \begin_layout Standard
8103 The \SpecialChar LyX
8106 article (koma-script)
8110 report (koma-script)
8128 correspond to the \SpecialChar LaTeX
8146 \begin_inset space ~
8149 of the Koma-Script family.
8150 They are replacements for the standard document classes
8166 , resp., and fit better to European typography conventions in a number of
8170 \begin_layout Itemize
8171 Standard character size is 11pt in
8173 article (koma-script)
8177 report (koma-script)
8185 letter (koma-script)
8190 \begin_layout Itemize
8191 Headings, labels of the description environment, and a number of elements
8194 letter (koma-script)
8196 document class are set in a bold sans serif font.
8200 \begin_layout Plain Layout
8201 There is a big difference between the bold sans serif old cm fonts and new
8202 ec fonts, especially in the appearance of headings.
8203 In comparison, the ec bold sans serif fonts look a bit thin.
8204 Here the \SpecialChar LaTeX
8213 helps to produce the
8214 \begin_inset Quotes eld
8218 \begin_inset Quotes erd
8221 appearance when using the ec fonts.
8226 The numbering of chapter headings is made in the same way as the numbering
8227 of section headings, that is without the extra line
8228 \begin_inset Quotes eld
8231 Chapter\SpecialChar ldots
8233 \begin_inset Quotes erd
8237 In addition, the appearance of the headings can be modified by using a
8238 number of options (in \SpecialChar LyX
8239 to be entered in the field
8242 \begin_inset space ~
8249 Layout\SpecialChar menuseparator
8256 \begin_layout Itemize
8257 The main means in the Koma-Script document classes to design the type area
8266 (in \SpecialChar LyX
8267 to be entered in the extra class options field in the dialog
8269 Document\SpecialChar menuseparator
8273 They make a clearer modification of page margins possible as do the options
8276 Document\SpecialChar menuseparator
8283 \begin_layout Itemize
8284 The \SpecialChar LaTeX
8285 document classes of the Koma-Script family define a number of additional
8287 Those part of it which makes sense in \SpecialChar LyX
8288 is implemented in corresponding
8292 \begin_layout Standard
8293 Detailed descriptions of the \SpecialChar LaTeX
8294 document classes of the Koma-Script family
8295 can be found in the Koma-Script documentation
8306 \begin_layout Subsection
8307 article (koma-script), report (koma-script), and book (koma-script)
8310 \begin_layout Standard
8311 The document classes
8313 article (koma-script)
8317 report (koma-script)
8327 are implemented in the layout files
8340 They contain all the paragraph types of the corresponding standard document
8353 , resp., partly modified, with the exception of the \SpecialChar LyX
8358 -type, which is replaced by the new
8362 -type having the same functionality.
8367 -Type there is a number of new paragraph types added.
8374 letter (koma-script)
8379 \begin_layout Itemize
8388 : are equivalents to
8396 , resp., additionally inserting an entry in the table of contents.
8405 are not contained in
8407 article (koma-script)
8412 \begin_layout Itemize
8429 , resp., additionally clearing running heads.
8436 article (koma-script)
8442 \begin_layout Plain Layout
8455 report (koma-script)
8457 , but since this is identical to
8461 , is has not been implemented in \SpecialChar LyX
8470 \begin_layout Itemize
8475 : generates a heading directly above the following paragraph in the standard
8476 character size without affecting the structure of the document.
8479 \begin_layout Itemize
8488 are special captions which respect the different space settings needed
8489 for captions placed above or below an element (if you follow strict typographic
8490 rules, you might want to place table captions always above the table).
8491 You can also use the class option
8508 You need at least Koma-Script version 2.8q to use this.
8511 \begin_layout Itemize
8516 : can be used to set a bonmot, e.
8517 \begin_inset space \thinspace{}
8521 \begin_inset space \space{}
8524 at the beginning of a chapter.
8525 If you use the optional argument (
8527 Insert\SpecialChar menuseparator
8529 \begin_inset space ~
8534 ), you can insert the dictum's author there.
8535 Dictum and author are separated by a line.
8536 You need at least Koma-Script version 2.8q to use this.
8543 article (koma-script)
8548 \begin_layout Standard
8549 The following types, together with the standard types
8561 , form the title area of the document.
8562 They must be entered ahead of the first
8563 \begin_inset Quotes eld
8567 \begin_inset Quotes erd
8574 \begin_layout Plain Layout
8575 The corresponding \SpecialChar LaTeX
8576 commands must appear before the
8587 When such a type is used more than once, the latter usage overwrites the
8588 former one, that means, for every type only the latest usage is valid.
8589 The order of the different types however has, like
8601 , no effect on the appearance of the produced document.
8604 \begin_layout Itemize
8609 : produces a centered paragraph above the ordinary title (
8621 ) for the subject of the document.
8624 \begin_layout Itemize
8629 : produces a centered paragraph below the ordinary title (
8641 ) for the publishers' name.
8644 \begin_layout Itemize
8651 report (koma-script)
8657 produces a centered paragraph on its own page behind the title page, or
8660 article (koma-script)
8662 produces a centered paragraph below the ordinary title (
8681 \begin_layout Itemize
8686 : produces a left aligned paragraph above the ordinary title (
8702 ) for a document`s head.
8705 \begin_layout Itemize
8710 : produces in a double-sided print in
8712 report (koma-script)
8718 a left-aligned paragraph at the top of the title page`s back or has no
8719 effect in a single-sided print or in
8721 article (koma-script)
8726 \begin_layout Itemize
8731 : produces in a double-sided print in
8733 report (koma-script)
8739 a left-aligned paragraph at the bottom of the title page`s back or has
8740 no effect in a single-sided print or in
8742 article (koma-script)
8747 \begin_layout Itemize
8752 : produces a special
8753 \begin_inset Quotes eld
8757 \begin_inset Quotes erd
8760 page ahead of the actual document containing a paragraph without special
8764 \begin_layout Standard
8765 The layout files for the document classes
8767 article (koma-script)
8771 report (koma-script)
8782 This is thought of as a place to define your own types.
8787 in your personal layout directory and edit the file!
8790 \begin_layout Subsection
8791 letter (koma-script)
8794 \begin_layout Standard
8798 letter (koma-script)
8800 is implemented in the layout file
8805 It contains all the paragraph types of the corresponding standard document
8810 , partly modified, with the exception of the \SpecialChar LyX
8824 type, which is replaced by the new
8829 In addition, it contains, in contrast to the standard document class, the
8848 Furthermore, there are a number of new letter specific types.
8851 \begin_layout Standard
8852 The appearance of the letter produced by this document class can be controlled
8853 by a number of \SpecialChar LaTeX
8854 commands, which you can put in the \SpecialChar LaTeX
8859 \begin_layout Plain Layout
8860 For example, the standard appearance of the letter`s heading, consisting
8861 of name and address, is quite self-willed.
8863 \begin_inset Quotes eld
8867 \begin_inset Quotes erd
8870 heading is produced by the following \SpecialChar LaTeX
8871 commands in the preamble:
8874 \begin_layout LyX-Code
8884 \begin_layout LyX-Code
8900 \begin_layout LyX-Code
8910 \begin_layout LyX-Code
8930 A detailed German description of such \SpecialChar LaTeX
8931 commands can be found in the Koma-Script
8937 With it, the letter's author can produce his personal letter layout.
8940 \begin_layout Standard
8949 define the beginning of the letter and must be used in every letter.
8950 To emphasize them in the \SpecialChar LyX
8951 document class, they are marked with the letter
8961 \begin_inset space ~
8965 It is possible to write any number of letters in one file.
8970 type produces a new letter using the same addressee and a
8974 type produces a new addressee.
8991 are ordinary paragraph types and can also be used several times in one
8992 and the same letter.
8995 \begin_layout Itemize
9000 : produces a paragraph for the addressee and implicitly defines the beginning
9004 \begin_layout Itemize
9009 : produces a paragraph for the form of address and implicitly produces a
9013 \begin_layout Itemize
9018 : produces a paragraph for a close.
9021 \begin_layout Itemize
9026 : produces a paragraph for a postscript.
9029 \begin_layout Itemize
9034 : produces a paragraph for a distribution list.
9037 \begin_layout Itemize
9042 : produces a paragraph for enclosures.
9045 \begin_layout Standard
9086 are input types provided with a label to enter information, which will
9087 be processed by the document class.
9091 \begin_layout Plain Layout
9092 It could be seen as a matter of inconsequence, that the types
9100 described above are not such input types as well.
9101 Because of the special meaning of those types, however, I have implemented
9102 them as ordinary paragraph types with a one letter mark in the left margin.
9103 Moreover, it would affect my feeling of symmetry, if the
9111 type had such a serious different appearance.
9116 The types must be used ahead of the corresponding
9123 \begin_layout Standard
9124 An implementation of these types in a WYSIWYG fashion does not seem to make
9125 sense, because the real appearance of the produced letter does not only
9126 depend on the usage of the particular type, but also on other factors.
9127 For example, a signature entered in the
9131 type will in the standard behavior appear in the produced letter only,
9132 when in the same letter also a
9137 The entered value of the
9141 type will in the standard behavior not appear in the produced letter at
9143 The possibility to design the letter`s heading freely is already indicated
9144 in a footnote above.
9147 \begin_layout Standard
9148 The input types can also be used as empty paragraphs.
9150 \begin_inset space \thinspace{}
9154 \begin_inset space \space{}
9166 type is not used at all, in the standard behavior the value of the
9170 type is used as signature, whereas if an empty
9174 type is used, no signature value is defined.
9177 \begin_layout Standard
9178 By using the input types it is possible to write a letter template, containing
9179 filled input types with your personal dates (name, address, etc.) and empty
9180 input types for other dates you want to enter.
9183 \begin_layout Itemize
9188 : sender's name, in the standard behavior appears as a centered paragraph
9189 in small caps in the letter`s heading.
9192 \begin_layout Itemize
9197 : sender's signature, in the standard behavior appears below the
9206 type is used, the value of the
9210 type appears instead.
9213 \begin_layout Itemize
9218 : sender's address, in the standard behavior appears in a centered paragraph
9219 in the letter`s heading below the sender's name.
9222 \begin_layout Itemize
9227 : sender's telephone number, in the standard behavior only sets the \SpecialChar LaTeX
9238 \begin_layout Itemize
9243 : place of the letter`s making.
9246 \begin_layout Itemize
9251 : date of the letter`s making.
9260 , in the standard behavior, produce the place and the date in a right-aligned
9261 line below the addressee's field.
9266 type is used, neither place nor date appear, independent of the value of
9276 type is used, the date of the letter `s production is used.
9279 \begin_layout Itemize
9284 : sender`s back address, in the standard behavior appears above the addressee's
9285 field in a small sans serif font.
9288 \begin_layout Itemize
9293 : special mail information, in the standard behavior appears underlined
9294 above the addressee's field below the back address.
9297 \begin_layout Itemize
9302 : additional information, in the standard behavior appears on right side
9303 below the addressee`s field.
9306 \begin_layout Itemize
9311 : the letter's title, in the standard behavior appears in a big, bold, sans
9312 serif font above the subject.
9315 \begin_layout Itemize
9320 : the letter's subject, in the standard behavior appears in a bold font
9328 \begin_layout Standard
9349 produce a business letter like line above the
9353 line containing the fields
9354 \begin_inset Quotes eld
9358 \begin_inset Quotes erd
9362 \begin_inset Quotes eld
9366 \begin_inset Quotes erd
9370 \begin_inset Quotes eld
9374 \begin_inset Quotes erd
9378 \begin_inset Quotes eld
9382 \begin_inset Quotes erd
9386 \begin_inset Quotes eld
9390 \begin_inset Quotes erd
9394 \begin_inset Quotes eld
9398 \begin_inset Quotes erd
9402 For the date field, the value of the
9408 \begin_inset Quotes eld
9411 business letter types
9412 \begin_inset Quotes erd
9415 is used, the value of the
9419 type however does not appear, but only the \SpecialChar LaTeX
9427 The ordinary output of place and date in a right-aligned line below the
9428 addressee`s field is suppressed.
9429 The types are implemented as input types provided with a label and must
9430 be used ahead of the corresponding
9437 \begin_layout Itemize
9445 \begin_layout Itemize
9453 \begin_layout Itemize
9461 \begin_layout Itemize
9469 \begin_layout Itemize
9477 \begin_layout Subsection
9478 The new letter class: letter (koma-script v.2)
9481 \begin_layout Standard
9487 \begin_layout Standard
9488 \begin_inset VSpace medskip
9494 \begin_layout Standard
9496 Koma-Script version 2.8 has introduced a new letter class
9500 which supersedes the now unsupported
9505 It has — on the \SpecialChar LaTeX
9506 side — a completely new interface and is not compatible
9508 Therefore, \SpecialChar LyX
9509 supports both, though it is recommended you use the new class.
9512 \begin_layout Standard
9513 This class covers the same functionality as
9515 letter (koma-script),
9522 (receiver's address, same as
9539 will start a new letter (i.
9540 \begin_inset space \thinspace{}
9544 \begin_inset space \space{}
9547 you can write several letters per document).
9548 New elements are sender's
9564 and the possibility to use a
9570 Insert\SpecialChar menuseparator
9576 \begin_layout Standard
9577 The biggest improvement is, though, that the letter's layout is configurable
9578 to meet almost any needs.
9579 This can be done via the preamble or with a special style file (Letter
9580 Class Option, extension
9584 ), that will be read in as a class option.
9588 \begin_layout Plain Layout
9589 The KOMA package comes with some default
9594 There is, for instance, a
9598 file that follows german typesetting rules, or a
9602 that provides the default layout of the old
9607 The latter can be loaded with the class option
9613 Layout\SpecialChar menuseparator
9614 Document\SpecialChar menuseparator
9626 template that is included in \SpecialChar LyX
9628 A detailed description is to be found in the Koma-Script documentation
9636 \begin_layout Subsection
9640 \begin_layout Standard
9641 Visualizing the Koma-Script document classes in \SpecialChar LyX
9642 , the \SpecialChar LyX
9643 internals cause some
9647 \begin_layout Itemize
9648 The chapter number of a
9652 type appears on a line of its own above the chapter heading instead of
9653 appearing in the same line ahead of it.
9654 The cause for that is the \SpecialChar LyX
9655 internal behavior for the labeltype
9662 \begin_layout Itemize
9663 The headings of the types
9672 \begin_inset Quotes eld
9676 \begin_inset Quotes erd
9680 table of contents, but not in the \SpecialChar LyX
9683 Document\SpecialChar menuseparator
9685 \begin_inset space ~
9689 \begin_inset space ~
9697 \begin_layout Itemize
9702 document class appear in a skip separation mode, not indented.
9703 This is the standard behavior, no special \SpecialChar LaTeX
9704 commands are needed for that.
9707 Document\SpecialChar menuseparator
9710 dialog the corresponding radio button indicates
9719 value always has the effect that extra \SpecialChar LaTeX
9720 commands are inserted in the document
9721 to produce the gap, which is not what is wanted in this case.
9724 \begin_layout Section
9728 \begin_layout Standard
9734 \begin_layout Subsection
9738 \begin_layout Standard
9739 Memoir is a very powerful and constantly evolving class.
9740 It has been designed with regard to fictional and non-fictional literature.
9741 Its aim is to let the user have maximum control over the typesetting of
9743 Memoir is based on the standard book class, but it can also emulate the
9744 article class (see below).
9747 \begin_layout Standard
9748 Peter Wilson, the developer of Memoir, is known as the author of lots of
9749 useful packages in the \SpecialChar LaTeX
9751 Most of them have been merged with Memoir.
9752 Therefore, it is much easier to layout the table of contents, appendices,
9753 chapter designs and such.
9755 , though, does not support all of these goodies natively.
9756 Some of them might be added to forthcoming releases
9760 \begin_layout Plain Layout
9761 You are invited to send suggestions to
9762 \begin_inset Flex URL
9765 \begin_layout Plain Layout
9767 lyx-devel@lists.lyx.org
9777 , lots will probably never be supported, due to the limitations of \SpecialChar LyX
9779 Of course you can still use all features with the help of some native \SpecialChar LaTeX
9781 commands (\SpecialChar TeX
9786 \begin_layout Plain Layout
9791 \begin_layout Plain Layout
9801 \begin_inset space ~
9805 \begin_inset CommandInset ref
9807 reference "sec:Inserting-TeX-Code"
9817 In this section, we can only list those features that are natively supported
9820 For detailed descriptions (and for the rest of features) we recommend you
9821 have a look at the detailed manual of the Memoir class
9825 \begin_layout Plain Layout
9830 \begin_layout Plain Layout
9840 \begin_inset Flex URL
9843 \begin_layout Plain Layout
9845 CTAN:/macros/latex/memoir/memman.pdf
9855 , which is not only a user guide for the class, but also both a comprehensive
9856 description on good typesetting and a superb example for good typesetting
9860 \begin_layout Subsection
9861 Basic features and restrictions
9864 \begin_layout Standard
9865 Memoir supports basically all features of the standard book classes.
9866 There are, however, some differences, as follows:
9869 \begin_layout Description
9871 \begin_inset space ~
9874 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
9877 \begin_layout Description
9879 \begin_inset space ~
9882 style: The fancy page style is not supported, due to a command clash between
9883 Memoir and the fancyhdr package (they both define a command with the same
9884 name, which confuses \SpecialChar LaTeX
9886 Instead, Memoir comes with a number of its own page styles (see
9888 Layout\SpecialChar menuseparator
9889 Document\SpecialChar menuseparator
9891 \begin_inset space ~
9897 If you want to use these for the chapter pages, you have to use the command
9904 in the main text or in preamble (e.
9905 \begin_inset space \thinspace{}
9909 \begin_inset space \space{}
9916 chapterstyle{companion}
9921 \begin_layout Description
9922 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
9923 optional argument in the standard classes.
9924 With this, you can specify an alternative version of the title for the
9925 table of contents and the headers (for instance, if the title is too long).
9927 , you can do this via
9929 Insert\SpecialChar menuseparator
9931 \begin_inset space ~
9936 at the beginning of a chapter/section.
9937 Memoir features a second optional argument and thus separates the table
9938 of contents from the header.
9939 You can define three variants of a title with this: one for the main text,
9940 one for the table of contents, and one for the headers.
9941 Simply insert two optional arguments if you need this feature, the first
9942 one containing the short title for the Table of Contents, the second one
9943 containing an alternative short title for the headers.
9946 \begin_layout Description
9947 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
9948 of contents, the list of figures and the list of table start a new page
9950 Memoir does not follow this route.
9951 You have to insert a page break yourself, if you want to have one.
9954 \begin_layout Description
9955 Titlepage: For some unknown reason, Memoir uses pagination on the title
9956 page (in the standard classes, title pages are
9957 \begin_inset Quotes eld
9961 \begin_inset Quotes erd
9965 If you want an empty title page, type
9969 aliaspagestyle{title}{empty}
9974 \begin_layout Description
9975 Article: With the class option
9981 Layout\SpecialChar menuseparator
9982 Document\SpecialChar menuseparator
9984 \begin_inset space ~
9989 ), you can emulate article style.
9990 That is, counters (footnotes, figures, tables etc.) will not be reset on
9991 new chapters, chapters don't start a new page (but are—in contrary to
9992 \begin_inset Quotes eld
9996 \begin_inset Quotes erd
9999 article classes—still allowed), parts, though, use their own page, as in
10003 \begin_layout Description
10004 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
10005 font commands, which have been used in the old \SpecialChar LaTeX
10007 \begin_inset space \thinspace{}
10011 \begin_inset space \space{}
10027 It produces an error and stops \SpecialChar LaTeX
10028 whenever such a command appears.
10033 reallows the commands and spits out warnings instead (which does at least
10034 not stop \SpecialChar LaTeX
10036 Since a lot of packages and particularly Bib\SpecialChar TeX
10037 style files are still using
10038 those commands, we have decided to use this option by default.
10041 \begin_layout Subsection
10045 \begin_layout Standard
10046 We will only describe the features supported by \SpecialChar LyX
10047 (which is not much currently).
10048 Please consult the Memoir manual
10052 \begin_layout Plain Layout
10057 \begin_layout Plain Layout
10067 \begin_inset Flex URL
10070 \begin_layout Plain Layout
10072 CTAN:/macros/latex/memoir/memman.pdf
10085 \begin_layout Description
10086 Abstract: You may wonder why an abstract is an extra feature.
10087 Well, it is in book class.
10088 Usually books don't have abstracts.
10089 Memoir, however, has.
10090 You can use it wherever and how often you like.
10093 \begin_layout Description
10094 Chapterprecis: You may know this older typesetting style: The contents of
10095 a chapter are summarized below the title and also in the table of contents
10097 \begin_inset space \thinspace{}
10101 \begin_inset space \space{}
10106 Our hero arrives in Troia; he loses some friends; he finds others
10109 Chapterprecis does exactly this.
10110 It is therefore only sensible below a chapter.
10113 \begin_layout Description
10114 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
10115 The epigraph environment provides an elegant way of typesetting such a
10117 The motto itself (text) and its author (source) are divided by a short
10119 Unfortunately, we have to fool \SpecialChar LyX
10120 a bit here again, since the environment
10121 needs two arguments (text and source).
10122 In this case, we have to use curly brackets (in \SpecialChar TeX
10123 mode) between the two
10134 <author of the slogan>.
10137 \begin_layout Description
10138 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
10139 complex figurative poems).
10141 can only support a few of them.
10142 One is poemtitle, which is a centered title for poems, which will also
10143 be added to the table of contents (verse is the standard environment for
10145 Memoir has some enhanced versions of verse, but you need to use \SpecialChar TeX
10147 because they have to be nested inside regular verse environments, which
10148 is not possible with \SpecialChar LyX
10152 \begin_layout Description
10153 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
10156 \begin_layout Section
10157 Article (mwart), book (mwbk) and report (mwrep)
10158 \begin_inset Argument status
10161 \begin_layout Plain Layout
10174 \begin_layout Standard
10180 \begin_layout Standard
10181 The \SpecialChar LyX
10198 correspond to the \SpecialChar LaTeX
10212 They are replacements for the standard document classes
10224 , resp., and fit better to Polish typography conventions in a number of points.
10228 \begin_layout Standard
10232 \begin_layout Itemize
10233 Unnumbered titles (with star, e.
10234 \begin_inset space \thinspace{}
10238 \begin_inset space \space{}
10245 ) are added into table of contents,
10248 \begin_layout Itemize
10249 Additional page styles:
10253 \begin_layout Description
10254 uheadings header with separated lines,
10257 \begin_layout Description
10258 myheadings custom header, contents headers via commands:
10273 \begin_layout Description
10274 myuheadings custom header with separated lines,
10277 \begin_layout Description
10278 outer page number is placed on outer side of page
10282 \begin_layout Itemize
10287 \begin_layout Description
10288 rmheadings serif titles — default,
10291 \begin_layout Description
10292 sfheadings sansserif titles,
10295 \begin_layout Description
10296 authortitle on title page first placed is author next title — default,
10299 \begin_layout Description
10300 titleauthor on title page first placed is title next author,
10303 \begin_layout Description
10304 withmarginpar reserve place on page for margins.
10308 \begin_layout Section
10312 \begin_layout Standard
10317 provides an alternative to the standard
10322 It provides similar functionality, but you might prefer this layout with
10323 sans serif sections, headings, and more.
10326 \begin_layout Section
10327 Rev\SpecialChar TeX
10331 \begin_layout Standard
10337 \begin_layout Standard
10338 \begin_inset VSpace bigskip
10344 \begin_layout Standard
10349 \begin_inset space ~
10354 textclass works with the American Physical Sociey's Rev\SpecialChar TeX
10356 \begin_inset Formula $\beta$
10359 release of May, 1999) class.
10362 \begin_layout Standard
10368 textclass, which works with Rev\SpecialChar TeX
10370 However, v3.1 is basically obsolete, as it works with \SpecialChar LaTeX
10372 That means that it doesn't interact very well with \SpecialChar LyX
10373 , which requires \SpecialChar LaTeX2e
10375 it has been kludged to work.
10376 Since Rev\SpecialChar TeX
10377 4.0 has been designed to work much more cleanly with \SpecialChar LaTeX2e
10382 Rev\SpecialChar TeX
10384 \begin_inset space ~
10389 textclass should also be pretty easy to use.
10392 \begin_layout Standard
10393 These documents are supposed to be used in
10397 to the Rev\SpecialChar TeX
10398 4.0 documents, so we don't describe any of the special Rev\SpecialChar TeX
10400 and assume you'll know what to put in the preamble if necessary.
10403 \begin_layout Subsection
10407 \begin_layout Standard
10408 All you need to do is install Rev\SpecialChar TeX
10409 4, as described in the package's README
10411 The package can be found at The Rev\SpecialChar TeX
10413 \begin_inset Flex URL
10416 \begin_layout Plain Layout
10418 http://publish.aps.org/revtex4/
10424 Install it somewhere that \SpecialChar LaTeX
10426 Test it by trying to \SpecialChar LaTeX
10427 a short Rev\SpecialChar TeX
10428 4 document in some random directory (i.
10429 \begin_inset space \thinspace{}
10433 \begin_inset space \space{}
10436 not the directory where you installed the class file.) Then, if you reconfigure
10438 , it will find the class file and let you use the Rev\SpecialChar TeX
10442 \begin_layout Standard
10443 Probably the easiest way to get started is either to import a Rev\SpecialChar TeX
10452 \begin_inset space ~
10457 template, found in the templates directory.
10460 \begin_layout Subsection
10464 \begin_layout Standard
10465 Optional arguments to
10472 \begin_inset Quotes eld
10476 \begin_inset Quotes erd
10480 \begin_inset Quotes eld
10484 \begin_inset Quotes erd
10490 \begin_inset space ~
10498 \begin_inset space ~
10504 Remember that in Rev\SpecialChar TeX
10505 , at least one optional argument is required!
10508 \begin_layout Standard
10509 Other preamble matter, like
10516 \begin_inset space ~
10523 \begin_inset space ~
10528 dialog, also as usual.
10531 \begin_layout Subsection
10535 \begin_layout Standard
10536 The layouts basically correspond to the commands in Rev\SpecialChar TeX
10538 For example, the Email layout corresponds to
10545 Note that (at least as of Rev\SpecialChar TeX
10554 layouts are exactly equivalent, so you shouldn't need to use both.
10558 \begin_layout Plain Layout
10559 In case you're curious, both were included so that
10563 would be able to translate both
10583 \begin_layout Subsection
10587 \begin_layout Standard
10588 There are a couple of important unique aspects of Rev\SpecialChar TeX
10589 4 which might cause
10590 bugs that will be even more confusing in \SpecialChar LyX
10594 \begin_layout Standard
10595 In Rev\SpecialChar TeX
10613 The \SpecialChar LyX
10614 equivalent is that there is a separate Thanks layout.
10619 write footnotes in the
10623 layout, or weird things may happen.
10624 See the Rev\SpecialChar TeX
10625 4 documentation for more details.
10628 \begin_layout Standard
10632 \begin_inset space ~
10640 \begin_inset space ~
10649 layouts must be placed
10657 layout and the corresponding
10674 , the \SpecialChar LaTeX
10678 \begin_layout Subsection
10682 \begin_layout Standard
10683 The main problem with this layout is that you can't use the optional arguments
10684 to layouts like Email and Title.
10685 (The problem is not unique to this layout; you can't use optional arguments
10686 to the Section layouts either.) This means that after you export that file
10687 to \SpecialChar LaTeX
10688 (which you'll need to do eventually to send it in to APS), you'll need
10689 to edit the \SpecialChar LaTeX
10690 file with a text editor to add the optional arguments to set,
10692 \begin_inset space \thinspace{}
10696 \begin_inset space \space{}
10699 the running title for the page headers.
10700 Lacking these layouts makes the
10706 (and the equivalent
10712 ) useless, so the corresponding layouts don't exist, and will have to be
10717 \begin_layout Plain Layout
10722 actually, \SpecialChar LyX
10723 1.3.0 supports some forms of optional arguments, but this layout
10724 has not been updated yet to take advantage of it.
10732 \begin_layout Section
10733 Springer Journals (
10740 \begin_layout Standard
10746 \begin_layout Subsection
10750 \begin_layout Standard
10751 These are the layout files for some of the journal formats used by Springer
10752 Verlag and listed on
10753 \begin_inset Flex URL
10756 \begin_layout Plain Layout
10758 http://www.springer.de/author/tex/help-journals.html
10763 , where you should also go to fetch the class files (yes, these are \SpecialChar LaTeX2e
10765 It is a modular system: the things common to all journals are implemented
10770 , which journal-specific layout files (such as, e.
10771 \begin_inset space \thinspace{}
10775 \begin_inset space \space{}
10782 for Journal of Geodesy) can include.
10785 \begin_layout Standard
10786 This means that implementing support for any other Springer journal on this
10787 list is as simple as writing your own
10795 file following the outline given in
10803 \begin_layout Standard
10804 It is reasonably well tested only for the Journal of Geodesy.
10813 come with the standard \SpecialChar LyX
10815 Install the relevant class file (downloaded from Springer) in a proper
10816 directory, reconfigure \SpecialChar LaTeX
10817 (in the te\SpecialChar TeX
10822 , as root if necessary — doesn't \SpecialChar LyX
10823 take care of this?), reconfigure \SpecialChar LyX
10828 \begin_layout Subsection
10832 \begin_layout Standard
10833 A large number of theorem-like styles —
10845 \begin_layout Standard
10848 Headnote, Dedication, Subtitle, Running_\SpecialChar LaTeX
10849 _Title, Author_Running, Institute,
10850 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
10853 See the Springer class file documentation for details.
10856 \begin_layout Subsection
10860 \begin_layout Itemize
10872 \begin_layout Itemize
10875 Probability Theory and Related Fields
10881 — Jean-Marc Lasgouttes
10884 \begin_layout Standard
10885 Add your own, it isn't so hard!
10888 \begin_layout Subsection
10892 \begin_layout Standard
10893 These files are partly based on the older
10897 , which was again based on a tinkered-with version of an old \SpecialChar LaTeX
10899 file from Springer.
10904 layout, are now defunct.
10905 Jean-Marc Lasgouttes helped out big in making me find my way around the
10907 layout file mechanism.
10910 \begin_layout Subsection
10914 \begin_layout Standard
10916 But probably less than in the old hacked-\SpecialChar LaTeX
10924 \begin_layout Standard
10926 \begin_inset space \thinspace{}
10929 g.: does not display the number for theorem-like layouts, just #.
10932 \begin_layout Section
10935 Sli\SpecialChar TeX
10939 \begin_inset CommandInset label
10948 \begin_layout Standard
10956 \begin_layout Subsection
10960 \begin_layout Standard
10961 This section describes how to use \SpecialChar LyX
10962 to make slides for overhead projectors.
10963 There are two document classes that can do this: the default slides class
10966 Foil\SpecialChar TeX
10970 This section documents the former.
10973 \begin_layout Standard
10974 I'm going to say this again, nice and clear, so that there's no misunderstanding
10978 \begin_layout Standard
10979 \begin_inset VSpace bigskip
10985 \begin_layout Standard
10989 This section documents the class
10990 \begin_inset Quotes eld
10998 \begin_inset Quotes erd
11006 \begin_layout Standard
11007 \begin_inset VSpace bigskip
11013 \begin_layout Standard
11014 If you're looking for the documentation for
11015 \begin_inset Quotes eld
11020 slides (Foil\SpecialChar TeX
11024 \begin_inset Quotes erd
11027 , check out section
11028 \begin_inset space ~
11032 \begin_inset CommandInset ref
11034 reference "sec:foiltex"
11044 \begin_inset Quotes eld
11049 slides (Foil\SpecialChar TeX
11053 \begin_inset Quotes erd
11056 ] is actually somewhat better than the default
11064 \begin_layout Plain Layout
11066 or so I've been told repeatedly by its advocates.
11067 Having never used it, I have no idea if this claim is true or not.
11072 which this section documents.
11075 \begin_layout Standard
11076 This class is the \SpecialChar LaTeX2e
11077 improvement of the old
11079 Sli\SpecialChar TeX
11083 Every \SpecialChar LaTeX2e
11084 distribution includes this class [which I'll just refer to as
11085 \begin_inset Quotes eld
11093 \begin_inset Quotes erd
11096 from now on], so you're bound to have it.
11097 As I noted earlier, there are other classes, such as
11101 , which also produce slides for overhead projectors and do a better job
11103 However, there are some things which
11107 can do which the others can't, such as generate overlays.
11108 Read on to learn more!
11111 \begin_layout Subsection
11113 \begin_inset CommandInset label
11115 name "sec:slidesetup"
11122 \begin_layout Standard
11123 Obviously, to use this document class, you need to select
11124 \begin_inset Quotes eld
11132 \begin_inset Quotes erd
11135 from the class list in the
11137 Document\SpecialChar menuseparator
11141 There are some other special things you should know about this class:
11144 \begin_layout Itemize
11145 Don't bother changing the options
11150 They're not supported by the
11157 \begin_layout Itemize
11161 \begin_inset space ~
11166 behaves a bit differently for this class.
11167 The possible choices and what they do are as follows:
11171 \begin_layout Description
11176 The final output contains page numbers in the lower right corner.
11179 \begin_layout Description
11188 , but also prints out any time markers you've put in.
11189 This is the default.
11192 \begin_layout Description
11197 The final output contains no page numbers, time markers, or alignment markers.
11201 \begin_layout Itemize
11206 class has an extra option:
11212 \begin_inset Quotes eld
11220 \begin_inset Quotes erd
11223 in the extra class options.
11227 \begin_layout Standard
11228 Using this options allows you to add time markers to
11234 \begin_inset space ~
11238 \begin_inset CommandInset ref
11240 reference "sec:slideNote"
11248 \begin_layout Standard
11249 You can also use the template file
11250 \begin_inset Quotes eld
11258 \begin_inset Quotes erd
11261 to automatically set up a document to use the
11267 File\SpecialChar menuseparator
11269 \begin_inset space ~
11273 \begin_inset space ~
11278 to open your new document].
11279 The template file also contains some examples of the special paragraph
11280 environments used by this class.
11281 I'll describe those next.
11284 \begin_layout Subsection
11285 Paragraph Environments
11288 \begin_layout Subsubsection
11289 Supported Environments
11292 \begin_layout Standard
11293 The first thing you'll notice when you start up a new
11297 document is the font size and type: it's the equivalent of the size
11298 \begin_inset Quotes eld
11306 \begin_inset Quotes erd
11312 \begin_inset space ~
11318 This is also what's used in the output.
11320 \begin_inset Quotes eld
11324 \begin_inset Quotes erd
11327 to remind you that this is a slide.
11328 Your final slides will use a larger font; ergo, you'll have less space.
11329 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
11332 \begin_layout Standard
11333 The next thing that becomes obvious is the changes to the paragraph environment
11334 pull-down box [at the far-left end of the toolbar].
11335 Most of the paragraph environments you're used to seeing are missing.
11336 There are also five new ones.
11341 class itself only supports certain paragraph environments:
11344 \begin_layout Itemize
11350 \begin_layout Itemize
11356 \begin_layout Itemize
11362 \begin_layout Itemize
11368 \begin_layout Itemize
11374 \begin_layout Itemize
11380 \begin_layout Itemize
11386 \begin_layout Itemize
11392 \begin_layout Itemize
11398 \begin_layout Itemize
11405 \begin_layout Itemize
11411 \begin_layout Standard
11412 All of the other standard environments, including the section-heading environmen
11413 ts, aren't used in the
11420 \begin_layout Standard
11421 On the other hand, you'll notice the following new environments:
11424 \begin_layout Itemize
11430 \begin_layout Itemize
11436 \begin_layout Itemize
11442 \begin_layout Itemize
11448 \begin_layout Itemize
11454 \begin_layout Standard
11455 These five are kind of quirky, due to a
11456 \begin_inset Quotes eld
11460 \begin_inset Quotes erd
11463 in \SpecialChar LyX
11465 You see, \SpecialChar LyX
11466 doesn't permit you to nest any other paragraph environment into
11467 an empty environment.
11468 Now, that's fine and dandy, but it means that you wouldn't be able to start
11469 a slide with anything except plain text.
11470 To deal with this, I've performed a little
11471 \begin_inset Quotes eld
11476 \begin_inset Quotes erd
11482 \begin_layout Subsubsection
11483 Quirks of the New Environments
11484 \begin_inset CommandInset label
11486 name "sec:slideQuirk"
11493 \begin_layout Standard
11494 All five of the new paragraph environments are somewhat quirky due to inherent
11495 limitiations in the current version of \SpecialChar LyX
11497 As I just mentioned, \SpecialChar LyX
11498 forbids environments that begin with another environment.
11499 To get around this, the
11503 environment isn't a paragraph environment as described in the
11511 \begin_layout Standard
11512 You should consider
11525 \begin_inset Quotes eld
11528 pseudo-environments.
11529 \begin_inset Quotes erd
11532 They look like a section heading or a
11533 \begin_inset Quotes eld
11541 \begin_inset Quotes erd
11544 but really begin a [and, if necessary, end the previous] paragraph environment.
11554 \begin_inset Quotes eld
11558 \begin_inset Quotes erd
11561 These two perform some action.
11564 \begin_layout Standard
11565 A common feature of all five environments,
11585 , is a rather long-ish label.
11586 The text following this label — ordinarily the contents of the paragraph
11587 environment — is utterly irrelevant for
11609 completely ignores it.
11610 In fact, you can leave these five environments completely empty.
11614 \begin_layout Standard
11619 to put any text after the rather long-ish label, you might want to.
11620 This could be a short description of the contents of the
11625 In that case, enter your descriptive comment and hit
11629 as you normally would.
11632 \begin_layout Standard
11633 If, on the other hand, you don't want to enter any descriptive text, you'll
11634 hit another \SpecialChar LyX
11637 , like nature, abhors a vacuum, and will not let you start a new paragraph
11638 environment until you put something in the old one.
11642 \begin_layout Itemize
11643 Start entering the text that will
11671 \begin_layout Itemize
11672 Now move to the beginning of that paragraph.
11676 \begin_layout Itemize
11685 \begin_layout Itemize
11686 Finally, change this new, empty paragraph to a
11710 \begin_layout Standard
11711 Some future version of \SpecialChar LyX
11712 will, hopefully, resolve this quirkiness\SpecialChar ldots
11716 \begin_layout Subsection
11717 Making a Presentation with
11730 \begin_layout Subsubsection
11738 \begin_layout Standard
11739 If you're expecting this section to teach you how to actually make a presentatio
11740 n, you'll be sorely disappointed.
11741 Naturally, I'll describe all of the ways the
11745 class can assist you in preparing the materials for a presentation.
11746 Filling in the contents, however, is up to you.
11751 the \SpecialChar LyX
11755 \begin_layout Standard
11760 environment [in the manner described in section
11761 \begin_inset space ~
11765 \begin_inset CommandInset ref
11767 reference "sec:slideQuirk"
11771 ] tells \SpecialChar LyX
11772 to begin a new slide [duh].
11773 The label for this environment/
11774 \begin_inset Quotes erd
11778 \begin_inset Quotes erd
11782 \begin_inset Quotes eld
11786 \begin_inset Quotes erd
11789 in cool blue, followed by the label,
11790 \begin_inset Quotes eld
11794 \begin_inset Quotes erd
11798 Any text or paragraph environments that follow this one go on the new slide.
11802 \begin_layout Standard
11803 Slides are probably the only time you'll need to forcibly end pages in \SpecialChar LyX
11805 (this can be specified in the
11810 In fact, you'll want to, once you finish entering the contents of one slide.
11811 If you've entered more text than can physically fit on a slide, the extra
11812 overflows onto a new slide.
11813 I don't recommend doing this, however, since the overflow slide won't have
11814 any page number on it.
11815 Furthermore, it may interfere with any
11819 you've made to accompany the oversized
11826 \begin_layout Standard
11835 environments work the same way as the
11840 They both create an
11841 \begin_inset Quotes eld
11845 \begin_inset Quotes erd
11848 followed by a label [
11849 \begin_inset Quotes eld
11853 \begin_inset Quotes erd
11857 \begin_inset Quotes eld
11861 \begin_inset Quotes erd
11865 The color is a stunning magenta instead of blue, and the
11866 \begin_inset Quotes eld
11870 \begin_inset Quotes erd
11873 will look different, in style and in length.
11874 The label fonts of all three also differ from one another.
11877 \begin_layout Standard
11882 , if the contents of a
11890 exceed the physical size of a slide or sheet of paper, the extra will overflow
11892 Again, you should avoid this.
11893 It defeats the whole purpose of
11904 \begin_layout Subsubsection
11914 \begin_layout Standard
11919 is a slide that sits atop another slide.
11920 Perhaps you wish to discuss a figure on the main
11924 before displaying the text associated with it.
11925 One way to accomplish this is tape a flap of dark paper over the part of
11930 you want to display later.
11931 This method fails, however, if you wish to overlap one graph with another,
11933 You would then have to fumble while speaking to align the two separate,
11938 s to align the two graphs.
11943 environment in both cases makes life much easier.
11946 \begin_layout Standard
11951 receives the page number of its
11952 \begin_inset Quotes eld
11956 \begin_inset Quotes erd
11964 \begin_inset Quotes eld
11972 \begin_inset Quotes erd
11979 \begin_layout Plain Layout
11980 Presumably, mutliple
11985 \begin_inset Quotes eld
11993 \begin_inset Quotes erd
11997 \begin_inset Quotes eld
12005 \begin_inset Quotes erd
12009 \begin_inset Quotes eld
12017 \begin_inset Quotes erd
12021 \begin_inset space ~
12024 appended to the page number of the parent
12034 Clearly, you want the contents of both the
12042 to each fit on a single physical slide! You should probably consider an
12048 \begin_inset Quotes eld
12052 \begin_inset Quotes erd
12060 Indeed, the \SpecialChar LyX
12065 class provides a visual cue for this: the label at the start of an
12069 is shorter than that at the start of a
12074 Lastly, when you generate printable output, you'll find alignment markers
12075 in all four corners of both the
12079 page and its parent
12084 These will assist you in lining up the two physical slides.
12087 \begin_layout Standard
12088 The major problem in overlaying two slides is aligning the contents of the
12089 two transparencies.
12090 How much space should you leave for that graph on the second slide? Worse
12091 still, what if you want a graph and a sentence on second slide, but there
12092 is text on the main transparency that goes in between them? You could try
12093 and insert vertical space of the right size.
12094 The better way is to use
12105 \begin_layout Standard
12106 As their names imply,
12114 are two command-like paragraph environments that make all subsequent text
12115 invisible and visible, respectively.
12117 \begin_inset space ~
12121 \begin_inset CommandInset ref
12123 reference "sec:slideQuirk"
12127 that you don't place anything
12131 these two environments, however.
12136 , it inserts a centered, sky-blue label into the page reading
12137 \begin_inset Quotes eld
12140 <Invisible Text Follows>
12141 \begin_inset Quotes erd
12145 For paragraphs following this label, the parts of the
12153 ; it doesn't matter which] where they would be contain instead blank space.
12157 \begin_layout Standard
12162 , the corresponding centered label is
12163 \begin_inset Quotes eld
12166 <Visible Text Follows>
12167 \begin_inset Quotes erd
12171 Paragraphs following this label behave normally.
12172 Note that the beginning of a new
12184 automatically shuts off an
12189 It's therefore not necessary to use
12200 \begin_layout Standard
12201 By now, it should be obvious how to create overlay transparencies using
12202 the proper combination of
12221 \begin_layout Enumerate
12226 , including everything that will appear on it, whether on the main slide
12234 \begin_layout Enumerate
12235 Before each figure or paragraph that will appear only on the
12244 If necessary, insert a
12248 environment after the
12255 \begin_layout Enumerate
12260 immediately following the
12267 \begin_layout Enumerate
12268 Copy the contents of this
12279 \begin_layout Enumerate
12284 , change all of the
12295 \begin_layout Standard
12297 You've just made an
12304 \begin_layout Standard
12305 There's one problem with the way I've designed the \SpecialChar LyX
12310 class: you can't make text in the middle of a paragraph invisible, nor
12311 make text in the middle of an invisible paragraph visible again.
12312 To accomplish this feat, you'll need to use some inlined \SpecialChar LaTeX
12317 \begin_layout Plain Layout
12318 The commands of interest are:
12321 \begin_layout Itemize
12326 invisible \SpecialChar ldots
12330 \begin_layout Itemize
12335 visible \SpecialChar ldots
12339 \begin_layout Plain Layout
12341 and need to be marked as \SpecialChar TeX
12344 \begin_inset Quotes eld
12348 \begin_inset Quotes erd
12351 you wish to change goes in between the brackets [and after the
12364 If you don't know how to mark text as \SpecialChar TeX
12365 , see the appropriate section of
12378 \begin_layout Subsubsection
12388 \begin_inset CommandInset label
12390 name "sec:slideNote"
12397 \begin_layout Standard
12406 is associated with a
12407 \begin_inset Quotes eld
12411 \begin_inset Quotes erd
12419 Here, too, the \SpecialChar LyX
12424 class provides visual cues.
12429 is shorter than that of a
12433 [yet longer than that of an
12437 ] and, like the label of an
12441 is shockingly magenta.
12442 Additionally, the printed
12446 has the page number of its
12447 \begin_inset Quotes eld
12451 \begin_inset Quotes erd
12459 \begin_inset Quotes eld
12467 \begin_inset Quotes erd
12471 \begin_inset Quotes eld
12479 \begin_inset Quotes erd
12483 \begin_inset Quotes eld
12491 \begin_inset Quotes erd
12495 You can have multiple
12499 s associated with a single
12511 , you'll probably want to break up long
12515 s so that they fit on a single sheet of paper.
12518 \begin_layout Standard
12523 is obvious: it contains anything additional you might want to say about
12529 It could also be used as a sheet of reminders for a particular
12534 In the case of the latter, you might want to make use of time markers.
12535 Currently, the \SpecialChar LyX
12541 \begin_inset Quotes eld
12545 \begin_inset Quotes erd
12548 support for time markers, a
12550 Sli\SpecialChar TeX
12554 So, you'll have to resort to using the \SpecialChar LaTeX
12558 \begin_layout Standard
12559 To use time markers, you'll need to specify the extra class option
12560 \begin_inset Quotes eld
12568 \begin_inset Quotes erd
12572 \begin_inset space ~
12576 \begin_inset CommandInset ref
12578 reference "sec:slidesetup"
12583 This option turns on timing marks, which will appear in the lower-left-hand
12589 To set what appears in the time marker, you use the \SpecialChar LaTeX
12591 \begin_inset Quotes eld
12601 \begin_inset Quotes erd
12605 \begin_inset Quotes eld
12615 \begin_inset Quotes erd
12619 The arguments of both commands are time measured in seconds.
12621 \begin_inset Quotes eld
12631 \begin_inset Quotes erd
12634 sets the time marker to a given time.
12636 \begin_inset Quotes eld
12646 \begin_inset Quotes erd
12649 increments the time marker by the specified amount.
12650 Using time markers and
12654 s in this fashion, you can remind yourself how much time to spend on a particula
12662 \begin_layout Standard
12663 There's one last feature to describe.
12664 Clearly, you'd like to print out all of your
12672 s on transparencies while printing all of your
12689 with which it is associated.
12690 What's a person to do?
12693 \begin_layout Standard
12694 Luckily, there are two \SpecialChar LaTeX
12695 commands that allow you to select what to print
12697 Both must be placed into the preamble of your document.
12699 \begin_inset Quotes eld
12711 \begin_inset Quotes erd
12714 will cause the output to contain only the
12723 Correspondingly, the command
12724 \begin_inset Quotes eld
12736 \begin_inset Quotes erd
12739 prevents the output of anything but
12744 I'd advise placing both commands in the preamble and initially comment
12746 You can then preview your entire presentation as you write.
12747 When you're done writing, you can then uncomment one of the two to select
12748 what you want to print.
12749 I like to uncomment
12750 \begin_inset Quotes eld
12762 \begin_inset Quotes erd
12765 , print to a file with
12766 \begin_inset Quotes eld
12774 \begin_inset Quotes erd
12777 in its name, comment it back out, then uncomment
12778 \begin_inset Quotes eld
12790 \begin_inset Quotes erd
12794 \begin_inset Quotes eld
12802 \begin_inset Quotes erd
12806 I can then send either file to a printer, loading transparencies or plain
12807 paper as appropriate.
12810 \begin_layout Standard
12811 You can also provide other arguments to the
12812 \begin_inset Quotes eld
12822 \begin_inset Quotes erd
12826 \begin_inset Quotes eld
12836 \begin_inset Quotes erd
12840 See a good \SpecialChar LaTeX
12844 \begin_layout Subsection
12849 Class Template File
12852 \begin_layout Standard
12853 I have also provided a template file,
12854 \begin_inset Quotes eld
12862 \begin_inset Quotes erd
12870 To use it, begin your new presentation with
12872 File\SpecialChar menuseparator
12874 \begin_inset space ~
12878 \begin_inset space ~
12884 Your new \SpecialChar LyX
12885 presentation file will contain an example
12906 additionally contain an example of the use of
12915 Lastly, the preamble will contain:
12918 \begin_layout LyX-Code
12919 % Uncomment to print out only slides and overlays
12922 \begin_layout LyX-Code
12926 \begin_layout LyX-Code
12932 \begin_inset Newline newline
12938 \begin_layout LyX-Code
12939 % Uncomment to print out only notes
12942 \begin_layout LyX-Code
12946 \begin_layout LyX-Code
12954 \begin_layout Standard
12955 One final thing: I created this class to support the \SpecialChar LaTeX2e
12957 \begin_inset Quotes eld
12962 Sli\SpecialChar TeX
12966 \begin_inset Quotes erd
12969 class, one of the built-in \SpecialChar LaTeX2e
12971 Neither I nor the rest of the \SpecialChar LyX
12972 Team endorse or oppose the use of this built-in
12974 It's here if you want it or need it.
12975 There exist other \SpecialChar LaTeX2e
12976 classes for creating presentations, such as the
12981 \begin_inset space ~
12985 \begin_inset CommandInset ref
12987 reference "sec:foiltex"
12992 \begin_inset Quotes eld
13000 \begin_inset Quotes erd
13003 package [present on some \SpecialChar TeX
13005 The latter is not yet supported under \SpecialChar LyX
13010 \begin_layout Plain Layout
13011 Perhaps you can take on the task\SpecialChar ldots
13017 I know nothing about these other classes.
13018 Try them out to see what sort of alternative they provide.
13021 \begin_layout Chapter
13023 \change_inserted 893223064 1464851900
13027 \begin_layout Standard
13029 \change_inserted 893223064 1464851910
13030 This is a holder for prepared text.
13033 \begin_layout Chapter
13035 \change_inserted 893223064 1464851939
13039 \begin_layout Standard
13041 \change_inserted 893223064 1464851945
13042 This is a holder for prepared text.
13045 \begin_layout Section
13049 \begin_layout Standard
13050 You can do everything with \SpecialChar LyX
13051 that you can do with \SpecialChar LaTeX
13053 However, \SpecialChar LyX
13054 cannot support every \SpecialChar LaTeX
13056 But you can always use \SpecialChar TeX
13058 This chapter shows you some more special things you might want to use.
13059 For other special things you can do with figures, tables, floats, boxes
13060 and notes, have a look at the
13063 \begin_inset space ~
13071 \begin_layout Section
13072 Fancy Headers and Footers
13075 \begin_layout Standard
13076 The default page layout is rather plain; for an
13077 \begin_inset Flex Code
13080 \begin_layout Plain Layout
13086 document class, all you get is a centered page number at the bottom of
13088 This document uses KOMA-script's book class, so it appears to be a bit
13090 But to really put on a show, you need to set the document page style to
13092 \begin_inset Quotes eld
13096 \begin_inset Quotes erd
13099 , as mentioned in the
13104 This section describes the \SpecialChar LaTeX
13105 code you need to insert in your \SpecialChar LaTeX
13107 order to get the desired effects.
13110 \begin_layout Standard
13111 For more information on fancy headers, see the
13112 \begin_inset Flex Code
13115 \begin_layout Plain Layout
13121 package documentation.
13123 \begin_inset Flex URL
13126 \begin_layout Plain Layout
13128 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
13136 \begin_layout Standard
13137 The page header is divided into three fields, not surprisingly labeled
13138 \begin_inset Quotes eld
13142 \begin_inset Quotes erd
13146 \begin_inset Quotes eld
13150 \begin_inset Quotes erd
13154 \begin_inset Quotes eld
13158 \begin_inset Quotes erd
13162 The footer is also divided into these three fields.
13163 The \SpecialChar LaTeX
13164 commands to set these fields in the simplest manner are
13165 \begin_inset Flex Code
13168 \begin_layout Plain Layout
13177 \begin_inset Flex Code
13180 \begin_layout Plain Layout
13189 \begin_inset Flex Code
13192 \begin_layout Plain Layout
13201 \begin_inset Flex Code
13204 \begin_layout Plain Layout
13213 Suppose you wish to put your name in the upper left hand corner of each
13215 Simply insert the following command in the preamble:
13218 \begin_layout Standard
13227 \begin_layout Standard
13228 You will now see your name in the upper left.
13229 If a field has a default entry that you would like to get rid of (often
13230 the page number appears in the central footer) simply include a command
13231 with a blank argument, e.
13232 \begin_inset space \thinspace{}
13238 \begin_layout Standard
13246 \begin_layout Standard
13247 Let's get really fancy: lets put the section number with the word
13248 \begin_inset Quotes eld
13252 \begin_inset Quotes erd
13256 \begin_inset space \thinspace{}
13260 \begin_inset space \space{}
13263 Section 3) in the upper left, the page number (e.
13264 \begin_inset space \thinspace{}
13268 \begin_inset space \space{}
13271 Page 4) in the upper right, your name in the lower left, and the date in
13273 The following commands should now appear in the preamble:
13276 \begin_layout Standard
13286 \begin_layout Standard
13294 \begin_layout Standard
13304 \begin_layout Standard
13313 \begin_layout Standard
13321 \begin_layout Standard
13331 \begin_layout Standard
13333 \begin_inset Flex Code
13336 \begin_layout Plain Layout
13345 \begin_inset Flex Code
13348 \begin_layout Plain Layout
13356 access \SpecialChar LaTeX
13357 's section and page counters, and so print out the current section
13360 \begin_inset Flex Code
13363 \begin_layout Plain Layout
13371 simply prints out today's date.
13374 \begin_layout Standard
13375 The thicknesses of the horizontal rules drawn beneath the header and above
13376 the footer can also be modified.
13377 If you don't want one of the rules, set its thickness to 0.
13378 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
13384 \begin_inset Flex Code
13387 \begin_layout Plain Layout
13392 headrulewidth}{0.4pt}
13398 \begin_inset Flex Code
13401 \begin_layout Plain Layout
13406 footrulewidth}{0.4pt}
13411 to set the thicknesses.
13414 \begin_layout Standard
13415 You can switch the header/footer settings on and off for individual pages
13416 using commands like
13417 \begin_inset Flex Code
13420 \begin_layout Plain Layout
13423 thispagestyle{empty}
13429 \begin_inset Flex Code
13432 \begin_layout Plain Layout
13435 thispagestyle{plain}
13441 \begin_inset Flex Code
13444 \begin_layout Plain Layout
13447 thispagestyle{fancy}
13453 Simply insert them in the text on the page you want changed and mark them
13454 as \SpecialChar TeX
13456 In fact, title pages are marked as plain by default, while following pages
13457 are marked fancy when using the global fancy setting.
13460 \begin_layout Standard
13461 As a final example, it is possible to include an image in the header or
13463 Suppose you want to put a company logo in the upper lefthand corner.
13464 You might try something like
13467 \begin_layout Standard
13476 includegraphics{logo.eps}}}
13479 \begin_layout Standard
13481 (you may need to preface this with
13482 \begin_inset Flex Code
13485 \begin_layout Plain Layout
13489 usepackage{graphics}
13494 if you don't include graphics elsewhere in your document).
13497 \begin_layout Section
13498 Multiple Text Columns
13501 \begin_layout Standard
13502 This feature is independent of the option
13504 Two-column document
13506 in the document settings under
13511 If you want to have 2
13512 \begin_inset space ~
13515 columns for the whole document, it is recommended to use the
13517 Two-column document
13520 For all other cases use this feature.
13523 \begin_layout Standard
13524 To use multiple text columns in your document, you have to load the module
13531 Document\SpecialChar menuseparator
13532 Settings\SpecialChar menuseparator
13535 ) and must have the \SpecialChar LaTeX
13543 \begin_layout Standard
13544 Footnotes within multiple columns will be placed at the bottom of the page
13545 and not under each column.
13546 Within the different columns you can use everything, with the limitation
13547 that for floats you need to use the float option
13554 \begin_layout Subsection
13558 \begin_layout Standard
13559 If you want to have 2
13560 \begin_inset space ~
13563 columns in your text, insert a multicolumn inset via the menu
13565 Insert\SpecialChar menuseparator
13567 \begin_inset space ~
13570 Insets\SpecialChar menuseparator
13572 \begin_inset space ~
13577 where the columns should start.
13578 Write all text that should be printed in 2
13579 \begin_inset space ~
13582 columns into this inset.
13585 \begin_layout Standard
13586 Here is an example:
13589 \begin_layout Standard
13591 \begin_inset Flex Multiple Columns
13594 \begin_layout Plain Layout
13599 The Adventure of the Empty House
13602 \begin_inset Newline newline
13605 by Sir Arthur Conan Doyle
13608 \begin_layout Plain Layout
13611 It was in the spring of the year 1894 that all London was interested, and
13612 the fashionable world dismayed, by the murder of the Honourable Ronald
13613 Adair under most unusual and inexplicable circumstances.
13614 The public has already learned those particulars of the crime which came
13615 out in the police investigation, but a good deal was suppressed upon that
13616 occasion, since the case for the prosecution was so overwhelmingly strong
13617 that it was not necessary to bring forward all the facts.
13618 Only now, at the end of nearly ten years, am I allowed to supply those
13619 missing links which make up the whole of that remarkable chain.
13620 The crime was of interest in itself, but that interest was as nothing to
13621 me compared to the inconceivable sequel, which afforded me the greatest
13622 shock and surprise of any event in my adventurous life.
13623 Even now, after this long interval, I find myself thrilling as I think
13624 of it, and feeling once more that sudden flood of joy, amazement, and increduli
13625 ty which utterly submerged my mind.
13626 Let me say to that public, which has shown some interest in those glimpses
13627 which I have occasionally given them of the thoughts and actions of a very
13628 remarkable man, that they are not to blame me if I have not shared my knowledge
13629 with them, for I should have considered it my first duty to do so, had
13630 I not been barred by a positive prohibition from his own lips, which was
13631 only withdrawn upon the third of last month.
13639 \begin_layout Standard
13640 To get 3 or more columns, set the cursor into the multicolumn inset and
13643 Insert\SpecialChar menuseparator
13645 \begin_inset space ~
13649 \begin_inset space ~
13655 The number of the desired columns is written into that inset (for 3
13656 \begin_inset space ~
13660 \begin_inset Quotes eld
13664 \begin_inset Quotes erd
13668 \begin_inset Newline newline
13671 Here is an example with 3
13672 \begin_inset space ~
13678 \begin_layout Standard
13679 \begin_inset Flex Multiple Columns
13682 \begin_layout Plain Layout
13685 \begin_inset Argument 1
13688 \begin_layout Plain Layout
13694 It can be imagined that my close intimacy with Sherlock Holmes had interested
13695 me deeply in crime, and that after his disappearance I never failed to
13696 read with care the various problems which came before the public.
13697 And I even attempted, more than once, for my own private satisfaction,
13698 to employ his methods in their solution, though with indifferent success.
13699 There was none, however, which appealed to me like this tragedy of Ronald
13701 As I read the evidence at the inquest, which led up to a verdict of willful
13702 murder against some person or persons unknown, I realized more clearly
13703 than I had ever done the loss which the community had sustained by the
13704 death of Sherlock Holmes.
13705 There were points about this strange business which would, I was sure,
13706 have specially appealed to him, and the efforts of the police would have
13707 been supplemented, or more probably anticipated, by the trained observation
13708 and the alert mind of the first criminal agent in Europe.
13709 All day, as I drove upon my round, I turned over the case in my mind and
13710 found no explanation which appeared to me to be adequate.
13711 At the risk of telling a twice-told tale, I will recapitulate the facts
13712 as they were known to the public at the conclusion of the inquest.
13720 \begin_layout Standard
13721 You can have up to 10
13722 \begin_inset space ~
13725 columns if you want to, but that might not be very pleasant for the readers
13729 \begin_layout Standard
13730 \begin_inset Newpage newpage
13736 \begin_layout Subsection
13737 Columns inside Columns
13740 \begin_layout Standard
13741 You can also have columns inside columns:
13744 \begin_layout Standard
13745 \begin_inset Flex Multiple Columns
13748 \begin_layout Plain Layout
13751 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
13752 at that time governor of one of the Australian colonies.
13753 Adair's mother had returned from Australia to undergo the operation for
13754 cataract, and she, her son Ronald, and her daughter Hilda were living together
13758 \begin_layout Plain Layout
13759 \begin_inset Flex Multiple Columns
13762 \begin_layout Plain Layout
13765 The youth moved in the best society–had, so far as was known, no enemies
13766 and no particular vices.
13767 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
13768 had been broken off by mutual consent some months before, and there was
13769 no sign that it had left any very profound feeling behind it.
13770 For the rest {sic} the man's life moved in a narrow and conventional circle,
13771 for his habits were quiet and his nature unemotional.
13772 Yet it was upon this easy-going young aristocrat that death came, in most
13773 strange and unexpected form, between the hours of ten and eleven-twenty
13774 on the night of March 30, 1894.
13782 \begin_layout Plain Layout
13785 Ronald Adair was fond of cards–playing continually, but never for such stakes
13787 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
13788 It was shown that, after dinner on the day of his death, he had played
13789 a rubber of whist at the latter club.
13790 He had also played there in the afternoon.
13795 The evidence of those who had played with him– Mr.
13796 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
13797 and that there was a fairly equal fall of the cards.
13798 Adair might have lost five pounds, but not more.
13799 His fortune was a considerable one, and such a loss could not in any way
13801 He had played nearly every day at one club or other, but he was a cautious
13802 player, and usually rose a winner.
13803 It came out in evidence that, in partnership with Colonel Moran, he had
13804 actually won as much as four hundred and twenty pounds in a sitting, some
13805 weeks before, from Godfrey Milner and Lord Balmoral.
13806 So much for his recent history as it came out at the inquest.
13814 \begin_layout Subsection
13818 \begin_layout Standard
13819 The examples in this section show some more special features of multiple
13823 \begin_layout Standard
13824 For more features of multiple columns, have a look at the documentation
13825 of the \SpecialChar LaTeX
13831 \begin_inset CommandInset citation
13840 \begin_layout Subsubsection
13844 \begin_layout Standard
13845 To add a preface text for multiple columns, set the cursor into the multicolumn
13846 inset and use the menu
13848 Insert\SpecialChar menuseparator
13852 Write your preface text into that inset.
13853 \begin_inset Newline newline
13856 This is an example with some preface text:
13859 \begin_layout Standard
13860 \begin_inset VSpace bigskip
13866 \begin_layout Standard
13867 \begin_inset Flex Multiple Columns
13870 \begin_layout Plain Layout
13871 \begin_inset Argument 2
13874 \begin_layout Plain Layout
13875 And the story continues and continues and continues and continues\SpecialChar ldots
13883 On the evening of the crime, he returned from the club exactly at ten.
13884 His mother and sister were out spending the evening with a relation.
13885 The servant deposed that she heard him enter the front room on the second
13886 floor, generally used as his sitting-room.
13887 She had lit a fire there, and as it smoked she had opened the window.
13888 No sound was heard from the room until eleven-twenty, the hour of the return
13889 of Lady Maynooth and her daughter.
13890 Desiring to say good-night, she attempted to enter her son's room.
13891 The door was locked on the inside, and no answer could be got to their
13892 cries and knocking.
13893 Help was obtained, and the door forced.
13894 The unfortunate young man was found lying near the table.
13895 His head had been horribly mutilated by an expanding revolver bullet, but
13896 no weapon of any sort was to be found in the room.
13904 \begin_layout Standard
13905 You can also use a section heading as the preface if you use a section command
13906 as \SpecialChar TeX
13908 For example the command
13911 \begin_layout Standard
13916 subsection{subsection title}
13919 \begin_layout Standard
13920 creates a subsection.
13921 In this example the preface is a subsubsection:
13924 \begin_layout Standard
13925 \begin_inset Flex Multiple Columns
13928 \begin_layout Plain Layout
13929 \begin_inset Argument 2
13932 \begin_layout Plain Layout
13936 \begin_layout Plain Layout
13945 This is a subsubsection heading as a preface
13949 \begin_layout Plain Layout
13963 A minute examination of the circumstances served only to make the case more
13965 In the first place, no reason could be given why the young man should have
13966 fastened the door upon the inside.
13967 There was the possibility that the murderer had done this, and had afterwards
13968 escaped by the window.
13969 The drop was at least twenty feet, however, and a bed of crocuses in full
13971 Neither the flowers nor the earth showed any sign of having been disturbed,
13972 nor were there any marks upon the narrow strip of grass which separated
13973 the house from the road.
13974 Apparently, therefore, it was the young man himself who had fastened the
13976 But how did he come by his death? No one could have climbed up to the window
13977 without leaving traces.
13978 Suppose a man had fired through the window, he would indeed be a remarkable
13979 shot who could with a revolver inflict so deadly a wound.
13980 Again, Park Lane is a frequented thoroughfare; there is a cab stand within
13981 a hundred yards of the house.
13982 No one had heard a shot.
13990 \begin_layout Standard
13991 If there is less vertical space than 6
13992 \begin_inset space ~
13995 text lines is left on the page at the beginning of the multiple columns,
13996 a page break will be inserted before the multiple columns.
13997 Depending on the number of lines of the preface text, you might want to
13999 This is done by setting the cursor into the mulitcolumn inset behind the
14000 preface (if there is any) and using the menu
14002 Insert\SpecialChar menuseparator
14004 \begin_inset space ~
14008 \begin_inset space ~
14012 \begin_inset space ~
14018 Insert into that inset the amount of space like e.
14019 \begin_inset space \thinspace{}
14023 \begin_inset space \space{}
14027 \begin_inset Quotes eld
14031 \begin_inset Quotes erd
14035 \begin_inset Newline newline
14038 In this example the space is set to 7
14039 \begin_inset space ~
14042 text lines by using
14043 \begin_inset Quotes eld
14049 \begin_inset Quotes erd
14058 needs to be inserted as \SpecialChar TeX
14062 \begin_layout Standard
14063 \begin_inset Flex Multiple Columns
14066 \begin_layout Plain Layout
14067 \begin_inset Argument 3
14070 \begin_layout Plain Layout
14075 \begin_layout Plain Layout
14091 On the evening of the crime, he returned from the club exactly at ten.
14092 His mother and sister were out spending the evening with a relation.
14093 The servant deposed that she heard him enter the front room on the second
14094 floor, generally used as his sitting-room.
14095 She had lit a fire there, and as it smoked she had opened the window.
14096 No sound was heard from the room until eleven-twenty, the hour of the return
14097 of Lady Maynooth and her daughter.
14098 Desiring to say good-night, she attempted to enter her son's room.
14099 The door was locked on the inside, and no answer could be got to their
14100 cries and knocking.
14101 Help was obtained, and the door forced.
14102 The unfortunate young man was found lying near the table.
14103 His head had been horribly mutilated by an expanding revolver bullet, but
14104 no weapon of any sort was to be found in the room.
14112 \begin_layout Subsubsection
14116 \begin_layout Standard
14117 The amount of space before and after multiple columns can be changed by
14118 changing the length
14125 For example the command
14128 \begin_layout Standard
14138 \begin_layout Standard
14139 in \SpecialChar TeX
14140 Code changes its value to 3
14141 \begin_inset space \thinspace{}
14145 The change must be made before the multiple columns' start.
14146 The predefined value is 13
14147 \begin_inset space \thinspace{}
14153 \begin_layout Standard
14161 \begin_inset space \thinspace{}
14167 \begin_layout Standard
14171 \begin_layout Plain Layout
14177 multicolsep}{2.5cm}
14185 \begin_layout Standard
14186 \begin_inset Flex Multiple Columns
14189 \begin_layout Plain Layout
14192 All day I turned these facts over in my mind, endeavouring to hit upon some
14193 theory which could reconcile them all, and to find that line of least resistanc
14194 e which my poor friend had declared to be the starting-point of every investigat
14196 I confess that I made little progress.
14197 In the evening I strolled across the Park, and found myself about six o'clock
14198 at the Oxford Street end of Park Lane.
14199 A group of loafers upon the pavements, all staring up at a particular window,
14200 directed me to the house which I had come to see.
14201 A tall, thin man with coloured glasses, whom I strongly suspected of being
14202 a plain-clothes detective, was pointing out some theory of his own, while
14203 the others crowded round to listen to what he said.
14204 I got as near him as I could, but his observations seemed to me to be absurd,
14205 so I withdrew again in some disgust.
14206 As I did so I struck against an elderly, deformed man, who had been behind
14207 me, and I knocked down several books which he was carrying.
14215 \begin_layout Standard
14216 \begin_inset Note Greyedout
14219 \begin_layout Plain Layout
14224 The values you set with
14230 will be used for all following multiple columns until you change them again.
14238 \begin_layout Standard
14242 \begin_layout Plain Layout
14254 \begin_inset Note Note
14257 \begin_layout Plain Layout
14258 go back to the default
14266 \begin_layout Standard
14267 \begin_inset Newpage newpage
14273 \begin_layout Subsubsection
14277 \begin_layout Standard
14278 A column break can be forced by inserting the command
14284 as \SpecialChar TeX
14285 Code to that position in the text where the column should be broken.
14286 Note that this leads in most cases to whitespace in the text.
14287 \begin_inset Newline newline
14290 Here is an example:
14293 \begin_layout Standard
14294 \begin_inset Flex Multiple Columns
14297 \begin_layout Plain Layout
14300 \begin_inset Quotes eld
14303 You're surprised to see me, sir,
14304 \begin_inset Quotes erd
14307 said he, in a strange, croaking voice.
14310 \begin_layout Plain Layout
14313 I acknowledged that I was.
14316 \begin_layout Plain Layout
14319 \begin_inset Quotes eld
14322 Well, I've a conscience, sir, and when I chanced to see you go into this
14323 house, as I came hobbling after you, I thought to myself, I'll just step
14324 in and see that kind gentleman, and tell him that if I was a bit gruff
14325 in my manner there was not any harm meant, and that I am much obliged to
14326 him for picking up my books.
14327 \begin_inset Quotes erd
14333 \begin_layout Plain Layout
14336 \begin_inset Quotes eld
14339 You make too much of a trifle,
14340 \begin_inset Quotes erd
14345 \begin_inset Quotes eld
14348 May I ask how you knew who I was?
14349 \begin_inset Quotes erd
14352 AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED.
14356 \begin_layout Plain Layout
14368 \begin_layout Plain Layout
14371 \begin_inset Quotes eld
14374 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
14375 you'll find my little bookshop at the corner of Church Street, and very
14376 happy to see you, I am sure.
14377 Maybe you collect yourself, sir.
14381 \begin_inset space ~
14394 –a bargain, every one of them.
14395 With five volumes you could just fill that gap on that second shelf.
14396 It looks untidy, does it not, sir?
14397 \begin_inset Quotes erd
14408 \begin_layout Subsubsection
14412 \begin_layout Standard
14413 The width of the columns is automatically calculated, but you can modify
14414 the space between the columns.
14415 This is done by changing the length
14422 Its predefined value is 10
14423 \begin_inset space \thinspace{}
14427 Here is an example where
14434 \begin_inset space \thinspace{}
14440 \begin_layout Standard
14444 \begin_layout Plain Layout
14458 \begin_layout Standard
14459 \begin_inset Flex Multiple Columns
14462 \begin_layout Plain Layout
14465 My observations of No.
14466 \begin_inset space \space{}
14469 427 Park Lane did little to clear up the problem in which I was interested.
14470 The house was separated from the street by a low wall and railing, the
14471 whole not more than five feet high.
14472 It was perfectly easy, therefore, for anyone to get into the garden, but
14473 the window was entirely inaccessible, since there was no water pipe or
14474 anything which could help the most active man to climb it.
14475 More puzzled than ever, I retraced my steps to Kensington.
14476 I had not been in my study five minutes when the maid entered to say that
14477 a person desired to see me.
14478 To my astonishment it was none other than my strange old book collector,
14479 his sharp, wizened face peering out from a frame of white hair, and his
14480 precious volumes, a dozen of them at least, wedged under his right arm.
14488 \begin_layout Standard
14492 \begin_layout Plain Layout
14504 \begin_inset Note Note
14507 \begin_layout Plain Layout
14508 go back to the default
14516 \begin_layout Subsubsection
14520 \begin_layout Standard
14521 Between the columns a rule with a width of the length
14528 If this rule width is set to 0
14529 \begin_inset space \thinspace{}
14532 pt (this is the default), the rule is suppressed.
14533 In the following example the rule is 2
14534 \begin_inset space \thinspace{}
14540 \begin_layout Standard
14544 \begin_layout Plain Layout
14550 columnseprule}{2pt}
14558 \begin_layout Standard
14559 \begin_inset Flex Multiple Columns
14562 \begin_layout Plain Layout
14565 \begin_inset Quotes eld
14568 You're surprised to see me, sir,
14569 \begin_inset Quotes erd
14572 said he, in a strange, croaking voice.
14575 \begin_layout Plain Layout
14578 I acknowledged that I was.
14581 \begin_layout Plain Layout
14584 \begin_inset Quotes eld
14587 Well, I've a conscience, sir, and when I chanced to see you go into this
14588 house, as I came hobbling after you, I thought to myself, I'll just step
14589 in and see that kind gentleman, and tell him that if I was a bit gruff
14590 in my manner there was not any harm meant, and that I am much obliged to
14591 him for picking up my books.
14592 \begin_inset Quotes erd
14598 \begin_layout Plain Layout
14601 \begin_inset Quotes eld
14604 You make too much of a trifle,
14605 \begin_inset Quotes erd
14610 \begin_inset Quotes eld
14613 May I ask how you knew who I was?
14614 \begin_inset Quotes erd
14620 \begin_layout Plain Layout
14623 \begin_inset Quotes eld
14626 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
14627 you'll find my little bookshop at the corner of Church Street, and very
14628 happy to see you, I am sure.
14629 Maybe you collect yourself, sir.
14633 \begin_inset space ~
14646 –a bargain, every one of them.
14647 With five volumes you could just fill that gap on that second shelf.
14648 It looks untidy, does it not, sir?
14649 \begin_inset Quotes erd
14660 \begin_layout Standard
14661 \begin_inset VSpace defskip
14667 \begin_layout Standard
14668 The rule can be colored by redefining the command
14675 This is done by inserting the command
14676 \begin_inset Newline newline
14685 columnseprulecolor}{
14690 \begin_inset Newline newline
14693 as \SpecialChar TeX
14694 Code before the multicolumn inset.
14699 in this command by a color of your choice.
14700 You can use all pre- and self-defined colors.
14708 \begin_inset space ~
14713 for more information about pre- and self-defined colors.
14714 To go back to the default color insert the command
14715 \begin_inset Newline newline
14724 columnseprulecolor}{
14729 \begin_inset Newline newline
14732 Here is the example with a cyan rule and 1
14733 \begin_inset space \thinspace{}
14736 cm column separation:
14739 \begin_layout Standard
14743 \begin_layout Plain Layout
14752 \begin_layout Plain Layout
14758 columnseprulecolor}{
14768 \begin_layout Standard
14769 \begin_inset Flex Multiple Columns
14772 \begin_layout Plain Layout
14775 \begin_inset Quotes eld
14778 You're surprised to see me, sir,
14779 \begin_inset Quotes erd
14782 said he, in a strange, croaking voice.
14785 \begin_layout Plain Layout
14788 I acknowledged that I was.
14791 \begin_layout Plain Layout
14794 \begin_inset Quotes eld
14797 Well, I've a conscience, sir, and when I chanced to see you go into this
14798 house, as I came hobbling after you, I thought to myself, I'll just step
14799 in and see that kind gentleman, and tell him that if I was a bit gruff
14800 in my manner there was not any harm meant, and that I am much obliged to
14801 him for picking up my books.
14802 \begin_inset Quotes erd
14808 \begin_layout Plain Layout
14811 \begin_inset Quotes eld
14814 You make too much of a trifle,
14815 \begin_inset Quotes erd
14820 \begin_inset Quotes eld
14823 May I ask how you knew who I was?
14824 \begin_inset Quotes erd
14830 \begin_layout Plain Layout
14833 \begin_inset Quotes eld
14836 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
14837 you'll find my little bookshop at the corner of Church Street, and very
14838 happy to see you, I am sure.
14839 Maybe you collect yourself, sir.
14843 \begin_inset space ~
14856 –a bargain, every one of them.
14857 With five volumes you could just fill that gap on that second shelf.
14858 It looks untidy, does it not, sir?
14859 \begin_inset Quotes erd
14870 \begin_layout Standard
14874 \begin_layout Plain Layout
14880 columnseprule}{0pt}
14883 \begin_layout Plain Layout
14889 columnseprulecolor}{
14897 \begin_inset Note Note
14900 \begin_layout Plain Layout
14901 go back to the default
14909 \begin_layout Chapter
14911 \change_inserted 893223064 1464852301
14915 \begin_layout Section
14916 Non-standard Paragraph Shapes
14919 \begin_layout Standard
14922 as well as any other text processor uses by default rectangular paragraphs.
14923 For special cases like for example posters, invitation cards or poems you
14924 can modify the paragraph shape to one of your choice.
14925 This can be done by using the \SpecialChar LaTeX
14930 which is loaded by using in the document settings the module
14932 Custom paragraph shapes
14937 \begin_layout Subsection
14941 \begin_layout Standard
14946 provides the following shapes:
14949 \begin_layout Standard
14950 \begin_inset Tabular
14951 <lyxtabular version="3" rows="13" columns="3">
14952 <features booktabs="true" islongtable="true" longtabularalignment="center">
14953 <column alignment="center" valignment="middle" width="16col%">
14954 <column alignment="center" valignment="middle" width="40col%">
14955 <column alignment="center" valignment="middle" width="35col%">
14956 <row endhead="true">
14957 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
14960 \begin_layout Plain Layout
14966 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
14969 \begin_layout Plain Layout
14975 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
14978 \begin_layout Plain Layout
14986 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
14989 \begin_layout Plain Layout
14995 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
14998 \begin_layout Plain Layout
14999 Circle with circular hole (in the size of a CD/DVD)
15004 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15007 \begin_layout Plain Layout
15008 Cannot be scaled, take care there is not too much text
15015 <cell alignment="center" valignment="top" topline="true" usebox="none">
15018 \begin_layout Plain Layout
15024 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15027 \begin_layout Plain Layout
15033 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15036 \begin_layout Plain Layout
15037 Fragile, calculation might fail
15044 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15047 \begin_layout Plain Layout
15053 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15056 \begin_layout Plain Layout
15057 Rhomboid (symbolizing a
15058 \begin_inset Quotes eld
15062 \begin_inset Quotes erd
15070 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15073 \begin_layout Plain Layout
15081 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15084 \begin_layout Plain Layout
15090 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15093 \begin_layout Plain Layout
15099 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15102 \begin_layout Plain Layout
15110 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15113 \begin_layout Plain Layout
15119 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15122 \begin_layout Plain Layout
15128 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15131 \begin_layout Plain Layout
15139 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15142 \begin_layout Plain Layout
15148 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15151 \begin_layout Plain Layout
15152 Nut for bolt (hexagon with circular hole)
15157 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15160 \begin_layout Plain Layout
15168 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15171 \begin_layout Plain Layout
15177 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15180 \begin_layout Plain Layout
15186 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15189 \begin_layout Plain Layout
15197 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
15200 \begin_layout Plain Layout
15206 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
15209 \begin_layout Plain Layout
15215 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
15218 \begin_layout Plain Layout
15226 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15229 \begin_layout Plain Layout
15235 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15238 \begin_layout Plain Layout
15244 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15247 \begin_layout Plain Layout
15255 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15258 \begin_layout Plain Layout
15264 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15267 \begin_layout Plain Layout
15268 Normal/reversed rain drop
15273 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15276 \begin_layout Plain Layout
15277 Fragile, calculation might fail
15284 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15287 \begin_layout Plain Layout
15294 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
15297 \begin_layout Plain Layout
15298 The \SpecialChar TeX
15304 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
15307 \begin_layout Plain Layout
15315 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
15318 \begin_layout Plain Layout
15320 \begin_inset Newline newline
15328 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
15331 \begin_layout Plain Layout
15332 Triangles in different orientations
15337 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
15340 \begin_layout Plain Layout
15354 \begin_layout Standard
15355 To use a shape for your paragraph, simply select it in \SpecialChar LyX
15357 for environments in the toolbar.
15360 \begin_layout Standard
15361 \begin_inset Newpage newpage
15367 \begin_layout Standard
15368 Here is an example paragraph in the shape of a nut:
15371 \begin_layout Standard
15372 \begin_inset VSpace bigskip
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
15384 At vero eos et accusam et justo duo dolores et ea rebum.
15385 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15387 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15388 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15392 \begin_layout Standard
15393 \begin_inset VSpace bigskip
15399 \begin_layout Standard
15400 \begin_inset Note Greyedout
15403 \begin_layout Plain Layout
15408 : shapepar paragraphs cannot run over a page break.
15416 \begin_layout Standard
15417 \begin_inset VSpace bigskip
15423 \begin_layout Standard
15428 takes care that the shape will always be preserved, no matter how much
15429 text is in the paragraph.
15430 Therefore the paragraph size changes with the amount of contained text.
15431 This can lead to paragraph sizes exceeding the page margins.
15432 To demonstrate the size scaling, here is the same example paragraph but
15433 with twice as much text:
15436 \begin_layout Standard
15437 \begin_inset Newpage newpage
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 At vero eos et accusam et justo duo dolores et ea rebum.
15450 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15452 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15453 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
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
15458 At vero eos et accusam et justo duo dolores et ea rebum.
15459 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15461 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15462 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15466 \begin_layout Standard
15467 \begin_inset VSpace bigskip
15473 \begin_layout Standard
15474 An exception is the shape
15479 It cannot be scaled because it must fit the size of a CD/DVD.
15480 Therefore the amount of text that fits into the shape is limited.
15481 \begin_inset Newline newline
15492 shape are fragile, meaning that the calculation of their size can fail,
15493 depending on the amount of text.
15494 You will then get the \SpecialChar LaTeX
15496 \begin_inset Quotes eld
15499 Arithmetic overflow
15500 \begin_inset Quotes erd
15504 In this case one can try to remove or add some text; if nothing works one
15505 has to use another shape.
15508 \begin_layout Standard
15509 \begin_inset VSpace bigskip
15515 \begin_layout Standard
15516 For shapes with tips you will maybe see that \SpecialChar LaTeX
15517 's hyphenation routine fails
15518 for text in the tips.
15519 Therefore it is often necessary to add hyphenation points
15524 arg "specialchar-insert hyphenation"
15529 ) to the corresponding text parts.
15532 \begin_layout Standard
15533 \begin_inset VSpace bigskip
15539 \begin_layout Standard
15540 Shapepar paragraphs are either always centered or placed on the page so
15541 that their left border touches the left page margin.
15542 You can therefore not use the paragraph dialog to align such paragraphs.
15543 A solution is to put the paragraph into a minipage or parbox and align
15545 The problem is hereby to find the right width for the box.
15546 Because if it is too wide and you center the box, the paragraph is not
15547 centered too because it sticks at the left side of the box.
15548 So you might have to play a bit with the width until it fits.
15549 Here are two heart-shaped paragraphs, the first one is not aligned, the
15550 second one is right-aligned:
15553 \begin_layout Standard
15554 \begin_inset Newpage newpage
15560 \begin_layout Heart
15564 Lo\SpecialChar softhyphen
15565 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15566 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15568 At vero eos et accusam et justo duo dolores et ea rebum.
15569 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15573 \begin_layout Standard
15574 \begin_inset VSpace bigskip
15580 \begin_layout Standard
15583 \begin_inset Box Frameless
15593 height_special "totalheight"
15598 backgroundcolor "none"
15601 \begin_layout Heart
15605 Lo\SpecialChar softhyphen
15606 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15607 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15609 At vero eos et accusam et justo duo dolores et ea rebum.
15610 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15619 \begin_layout Subsection
15623 \begin_layout Standard
15624 You can define any shape you want.
15625 Doing this manually is a lot of work because every coordinate must be specified.
15626 But there is a way to let the computer calculate the coordinates:
15629 \begin_layout Enumerate
15630 Install the program
15631 \begin_inset CommandInset href
15634 target "http://www.ctan.org/tex-archive/graphics/jpgfdraw"
15641 \begin_layout Enumerate
15648 TeX/LaTeX\SpecialChar menuseparator
15649 Settings\SpecialChar menuseparator
15652 and select the font size you are using in your document.
15653 For example this document uses the size 12
15654 \begin_inset space \thinspace{}
15660 \begin_layout Enumerate
15664 \begin_layout Enumerate
15667 TeX/LaTeX\SpecialChar menuseparator
15670 to export the shape to coordinates.
15671 In the appearing dialog use either the outline of your shape for the coordinate
15672 s or the path itself.
15676 \begin_layout Plain Layout
15677 For more information see
15678 \begin_inset CommandInset href
15680 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
15692 \begin_layout Standard
15693 The coordinates are written into a \SpecialChar TeX
15695 To use it for your \SpecialChar LyX
15699 \begin_layout Enumerate
15700 Place the cursor before the first character of your paragraph (or into a
15704 \begin_layout Enumerate
15705 Open in \SpecialChar LyX
15708 Insert\SpecialChar menuseparator
15709 File\SpecialChar menuseparator
15711 \begin_inset space ~
15716 , select the file and use
15725 \begin_layout Standard
15726 \begin_inset VSpace defskip
15732 \begin_layout Standard
15733 \begin_inset Note Greyedout
15736 \begin_layout Plain Layout
15741 : The changed shape only applies to the current paragraph; everything is
15742 reset to normal for the next paragraph.
15743 Therefore the shape definition file must be input into every paragraph
15744 with the desired shape.
15752 \begin_layout Standard
15753 \begin_inset VSpace bigskip
15759 \begin_layout Standard
15760 Here is an example:
15763 \begin_layout Standard
15764 \begin_inset VSpace bigskip
15770 \begin_layout Standard
15771 \begin_inset CommandInset include
15773 filename "SpecialParagraphShape.tex"
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
15782 At vero eos et accusam et justo duo dolores et ea rebum.
15783 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
15785 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
15786 eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
15790 \begin_layout Standard
15791 \begin_inset VSpace bigskip
15797 \begin_layout Standard
15802 to draw complexer shapes in
15806 you can draw the shape in a program of your choice and import the resulting
15812 Then you only need to draw a line or spline along the outline of the image.
15815 \begin_layout Standard
15816 \begin_inset VSpace bigskip
15822 \begin_layout Standard
15825 Custom paragraph shapes
15827 also provides the two commands
15835 which can be used to define custom shapes coordinate by coordinate.
15839 \begin_layout Plain Layout
15840 These commands are internally used for all shapes described here.
15845 For information how these styles are used and about further customization
15846 possibilities, have a look at the documentation of the package
15851 \begin_inset CommandInset citation
15860 \begin_layout Bibliography
15861 \begin_inset CommandInset bibitem
15862 LatexCommand bibitem
15867 Documentation of the \SpecialChar LaTeX
15869 \begin_inset CommandInset href
15872 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
15879 \begin_layout Bibliography
15880 \begin_inset CommandInset bibitem
15881 LatexCommand bibitem
15886 Documentation of the \SpecialChar LaTeX
15888 \begin_inset CommandInset href
15891 target "http://mirrors.ctan.org/macros/latex/contrib/shapepar/shapepar.pdf"
15898 \begin_layout Chapter
15900 \change_inserted 893223064 1464852414
15901 Bibliographic databases
15902 \change_deleted 893223064 1464852406
15908 \begin_layout Section
15909 Customizing Bibliographies with Bib\SpecialChar TeX
15913 \begin_layout Standard
15914 The most basic information about how to use Bib\SpecialChar TeX
15915 with \SpecialChar LyX
15916 is contained in the
15919 Bibliography databases (Bib\SpecialChar TeX
15927 The following subsections explain special bibliography features supported
15928 by \SpecialChar LyX
15932 \begin_layout Subsection
15933 Alternative Citation Styles
15936 \begin_layout Standard
15937 Standard Bib\SpecialChar TeX
15939 \begin_inset space \thinspace{}
15943 \begin_inset space \space{}
15947 \begin_inset Quotes eld
15951 \begin_inset Quotes erd
15954 ) to refer to a cited work.
15955 However, in many scientific disciplines, other citation styles are in use.
15956 The most common one is the author-year style (e.
15957 \begin_inset space \thinspace{}
15961 \begin_inset space \space{}
15965 \begin_inset Quotes eld
15969 \begin_inset Quotes erd
15974 supports two packages that provide this style,
15975 \begin_inset Flex Code
15978 \begin_layout Plain Layout
15985 \begin_inset Flex Code
15988 \begin_layout Plain Layout
15995 Both packages have their pros and cons, which cannot be listed in detail.
15996 If you only want to have simple author-year (or author-numerical) style,
15997 or if you want to use one of the countless style files for
15998 \begin_inset Flex Code
16001 \begin_layout Plain Layout
16007 , then the established
16008 \begin_inset Flex Code
16011 \begin_layout Plain Layout
16017 package is probably your choice.
16018 If you need special features like short title references, ibidem etc., you
16020 \begin_inset Flex Code
16023 \begin_layout Plain Layout
16032 \begin_layout Standard
16033 The handling of both packages in \SpecialChar LyX
16034 is basically the same.
16036 \begin_inset Flex Noun
16039 \begin_layout Plain Layout
16040 Document\SpecialChar menuseparator
16047 \begin_inset Flex Noun
16050 \begin_layout Plain Layout
16057 \begin_inset Flex Noun
16060 \begin_layout Plain Layout
16067 \begin_inset Flex Noun
16070 \begin_layout Plain Layout
16077 With both packages, you will get some extra features in the citation dialog
16078 and you can select the style of the reference (
16079 \begin_inset Quotes eld
16083 \begin_inset Quotes erd
16087 \begin_inset Quotes eld
16091 \begin_inset Quotes erd
16095 \begin_inset Quotes eld
16099 \begin_inset Quotes erd
16103 \begin_inset Quotes eld
16107 \begin_inset Quotes erd
16111 Note that both packages need specifically designed style files.
16112 They both ship their own, but there are lots of additional style files,
16113 and there is even an interactive style file builder
16117 \begin_layout Plain Layout
16119 \begin_inset Flex URL
16122 \begin_layout Plain Layout
16124 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
16135 \begin_inset Flex Code
16138 \begin_layout Plain Layout
16147 \begin_layout Subsection
16148 Sectioned Bibliographies
16151 \begin_layout Standard
16152 Sometimes you might need to divide your bibliography into several sections.
16153 If you are for instance a historian, the possibility to separate sources
16154 and scientific works is most likely a
16155 \begin_inset Quotes eld
16159 \begin_inset Quotes erd
16163 Unfortunately, Bib\SpecialChar TeX
16164 itself does not allow you to do this.
16165 But with the help of some \SpecialChar LaTeX
16166 packages, Bib\SpecialChar TeX
16167 can be extended to fit your needs.
16170 \begin_layout Standard
16172 provides native support for one of these packages,
16180 \begin_layout Plain Layout
16182 \begin_inset Flex URL
16185 \begin_layout Plain Layout
16187 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
16197 The advantage of this package (compared to other packages like
16201 ) is that you don't need to define new citation commands.
16202 Instead, you need to prepare different bibliographic databases which include
16203 the entries for the different sections of the bibliography.
16204 For example: If you want to divide your bibliography into the sections
16206 \begin_inset Quotes eld
16210 \begin_inset Quotes erd
16214 \begin_inset Quotes eld
16218 \begin_inset Quotes erd
16221 , you first need to create two bibliographic databases, e.
16222 \begin_inset space \thinspace{}
16226 \begin_inset space \space{}
16230 \begin_inset Flex Code
16233 \begin_layout Plain Layout
16240 \begin_inset Flex Code
16243 \begin_layout Plain Layout
16253 \begin_layout Standard
16255 \begin_inset Flex Noun
16258 \begin_layout Plain Layout
16259 Document\SpecialChar menuseparator
16266 \begin_inset Flex Noun
16269 \begin_layout Plain Layout
16276 \begin_inset Flex Noun
16279 \begin_layout Plain Layout
16280 Sectioned bibliography
16286 Now you can insert multiple Bib\SpecialChar TeX
16287 bibliographies, one for each section of
16289 Returning to our example: Insert the Bib\SpecialChar TeX
16291 \begin_inset Flex Code
16294 \begin_layout Plain Layout
16300 and a second one for the database
16301 \begin_inset Flex Code
16304 \begin_layout Plain Layout
16311 You are free to use the same or different styles for each section.
16312 Additionally, you can choose if the bibliography section should contain
16314 \begin_inset Quotes eld
16317 all cited references
16318 \begin_inset Quotes erd
16321 of the specified database(s) (which is the default),
16322 \begin_inset Quotes eld
16325 all uncited references
16326 \begin_inset Quotes erd
16330 \begin_inset Quotes eld
16334 \begin_inset Quotes erd
16338 This might be useful if you would like to separate your bibliography into
16340 \begin_inset Quotes eld
16344 \begin_inset Quotes erd
16348 \begin_inset Quotes eld
16352 \begin_inset Quotes erd
16356 \begin_inset Quotes eld
16360 \begin_inset Quotes erd
16364 The titles for the sections can be added as ordinary sections or subsections.
16366 \begin_inset Flex Code
16369 \begin_layout Plain Layout
16375 removes the bibliography title, you have to manually re-add that, too (as
16376 a chapter* or section*, for instance).
16379 \begin_layout Subsection
16380 Multiple Bibliographies
16383 \begin_layout Standard
16384 Multiple bibliographies, e.
16385 \begin_inset space \thinspace{}
16389 \begin_inset space \space{}
16392 a bibliography for each section or chapter of the document, are not supported
16393 by Bib\SpecialChar TeX
16396 \begin_inset Flex Code
16399 \begin_layout Plain Layout
16405 package, which is used for the creation of sectioned bibliographies in
16407 (see the previous section), provides an easy way to solve this task, if
16408 you are willing to use some
16409 \begin_inset Flex Noun
16412 \begin_layout Plain Layout
16420 \begin_inset space ~
16424 \begin_inset CommandInset ref
16426 reference "sec:Inserting-TeX-Code"
16434 \begin_layout Plain Layout
16435 An alternative approach is to use the
16436 \begin_inset Flex Code
16439 \begin_layout Plain Layout
16446 \begin_inset Flex Code
16449 \begin_layout Plain Layout
16455 package, respectively.
16463 \begin_layout Standard
16465 \begin_inset Flex Noun
16468 \begin_layout Plain Layout
16469 Document\SpecialChar menuseparator
16476 \begin_inset Flex Noun
16479 \begin_layout Plain Layout
16486 \begin_inset Flex Noun
16489 \begin_layout Plain Layout
16490 Sectioned bibliography
16496 In the document, you have to enclose the sections, which shall contain
16497 their own bibliography (including the Bib\SpecialChar TeX
16498 bibliography itself), between
16500 \begin_inset Flex Code
16503 \begin_layout Plain Layout
16512 \begin_inset Flex Code
16515 \begin_layout Plain Layout
16523 (those commands have to be inserted as \SpecialChar TeX
16525 The bibliography will contain all references that have been cited in the
16527 \begin_inset Flex Code
16530 \begin_layout Plain Layout
16541 If you are using this approach, then every citation reference has to be
16543 \begin_inset Flex Code
16546 \begin_layout Plain Layout
16554 \begin_inset Flex Code
16557 \begin_layout Plain Layout
16563 s cannot be nested.
16566 \begin_layout Chapter
16567 Multipart Documents
16570 \begin_layout Section
16574 \begin_layout Standard
16575 When you are working on a large file with many sections, it is often convenient
16576 to break up the document into several files, or perhaps you have something
16577 where a table may change from time to time, but the preceding text does
16579 In these cases, you should seriously consider using multipart documents.
16580 For example, scientific papers often have five major sections: the introduction
16581 , observations, results, discussion, and conclusion.
16582 Each of these could be its own separate \SpecialChar LyX
16584 \begin_inset Quotes eld
16588 \begin_inset Quotes erd
16591 file which contains the title, authors, abstract, references, etc., plus
16592 the five included files.
16593 It is important to note that each of these files is a full \SpecialChar LyX
16595 can be formatted and printed on its own, as well as included in a master
16597 Each of these files must have the same document class, however—don't attempt
16598 to mix book classes with article classes.
16599 You may also include \SpecialChar LaTeX
16600 files; however, these files must not have their own
16602 \begin_inset space \thinspace{}
16606 \begin_inset space \space{}
16609 everything up to and including the
16610 \begin_inset Flex Code
16613 \begin_layout Plain Layout
16621 line as well as the
16622 \begin_inset Flex Code
16625 \begin_layout Plain Layout
16633 line must be deleted) or else errors will be generated when you try to
16637 \begin_layout Standard
16639 allows you to include files quite easily with
16640 \begin_inset Flex Noun
16643 \begin_layout Plain Layout
16644 Insert\SpecialChar menuseparator
16646 \begin_inset space ~
16655 When you click on this selection a small box is inserted into the file
16656 at the current cursor location.
16657 Clicking on the box raises a dialog which allows you to select the file
16658 to be included, and the method of its inclusion.
16662 \begin_layout Standard
16663 The file selection box should by now be obvious.
16664 The three inclusion methods are
16665 \begin_inset Quotes eld
16669 \begin_inset Quotes erd
16673 \begin_inset Quotes eld
16677 \begin_inset Quotes erd
16681 \begin_inset Quotes eld
16685 \begin_inset Quotes erd
16689 The difference between
16690 \begin_inset Quotes eld
16694 \begin_inset Quotes erd
16698 \begin_inset Quotes eld
16702 \begin_inset Quotes erd
16705 is really only meaningful to \SpecialChar LaTeX
16706 perts, but the practical difference is that
16708 \begin_inset Quotes eld
16712 \begin_inset Quotes erd
16715 are typeset beginning on a new page, while files that are
16716 \begin_inset Quotes eld
16720 \begin_inset Quotes erd
16723 are typeset starting on the current page.
16726 \begin_layout Standard
16727 Generally, the master file is converted into a full \SpecialChar LaTeX
16728 file before typesetting,
16729 while the included files are converted to \SpecialChar LaTeX
16730 files that do not have all the
16731 preamble information.
16734 \begin_layout Standard
16736 \begin_inset Quotes eld
16740 \begin_inset Quotes erd
16743 included file allows you to include a file typeset exactly as it appears
16745 \begin_inset space \thinspace{}
16749 \begin_inset space \space{}
16753 \begin_inset Flex Code
16756 \begin_layout Plain Layout
16762 mode, with the characters set in a fixed-width typewriter font.
16763 Normally, spaces in this file are invisible, though two consecutive spaces
16764 are conserved, unlike \SpecialChar LyX
16765 's normal treatment of spaces.
16766 However, setting the
16767 \begin_inset Flex Noun
16770 \begin_layout Plain Layout
16772 \begin_inset space ~
16776 \begin_inset space ~
16780 \begin_inset space ~
16788 checkbox typesets a mark to unambiguously define the presence of a space.
16792 \begin_layout Section
16793 Cross-References Between Files
16796 \begin_layout Standard
16797 \begin_inset Box Shadowbox
16807 height_special "totalheight"
16812 backgroundcolor "none"
16815 \begin_layout Plain Layout
16816 This section is somewhat out of date.
16817 Need to describe default master documents and how children are opened when
16827 \begin_layout Standard
16828 It is possible to set up cross-references between the different files.
16829 First, open all the files in question: let's call them A and B in a two
16830 file example, where B is included in A.
16831 Let's say you insert a label in A, then want to reference it in B.
16832 Open the cross-reference dialog whilst in document B, and you can select
16834 \begin_inset Quotes eld
16838 \begin_inset Quotes erd
16844 \begin_layout Section
16845 Bibliography Lists in all Subdocuments
16848 \begin_layout Standard
16849 \begin_inset Box Frameless
16859 height_special "totalheight"
16864 backgroundcolor "none"
16867 \begin_layout Plain Layout
16868 This section also needs updating.
16869 There is now material about this on the wiki, and it could be copied here.
16877 \begin_layout Standard
16878 Copy the bibliography list with all entries to all subdocuments and transform
16880 This way \SpecialChar LyX
16882 \begin_inset Flex Code
16885 \begin_layout Plain Layout
16891 -files and you can easily insert references without making the bibliography
16895 \begin_layout Standard
16896 As the bibliography list is in a comment, \SpecialChar LaTeX
16897 won't use it and the references
16898 will look like this: [?], instead of like this: [1].
16899 One solution is to use the \SpecialChar LaTeX
16901 \begin_inset Flex Code
16904 \begin_layout Plain Layout
16910 that will only include comments by processing the files separately.
16911 To do this, add in the \SpecialChar LaTeX
16912 preamble of every subdocument the following:
16915 \begin_layout LyX-Code
16918 usepackage{comment}
16921 \begin_layout LyX-Code
16924 includecomment{comment}
16927 \begin_layout Standard
16929 \begin_inset Flex URL
16932 \begin_layout Plain Layout
16934 http://wiki.lyx.org/FAQ/Unsorted#toc31
16942 \begin_layout Section
16943 Itemize Bullet Selection
16944 \begin_inset CommandInset label
16953 \begin_layout Standard
16959 \begin_layout Subsection
16963 \begin_layout Standard
16965 provides 216 bullet shapes that can be accessed from a simple dialog.
16966 Using this dialog you can easily specify what bullet shape to use at each
16967 level of an itemized list.
16968 These settings are document-wide so you won't be able to specify different
16969 sets of bullets for different paragraphs.
16973 \begin_layout Plain Layout
16974 Well, actually you can but you'll have to do it by hand.
16982 \begin_layout Subsection
16986 \begin_layout Standard
16987 Open the dialog by selecting the
16988 \begin_inset Flex Noun
16991 \begin_layout Plain Layout
16992 Document\SpecialChar menuseparator
16998 menu item and then select the
16999 \begin_inset Flex Noun
17002 \begin_layout Plain Layout
17011 \begin_layout Standard
17012 The dialog provides you with a table of bullet shapes.
17013 A column of buttons on the left of the table provides access to the six
17014 different panels of bullet shapes.
17015 The row of buttons across the top is used to select which bullet depth
17017 A text entry under the table shows the currently selected bullet shape's
17019 equivalent and this can be edited if desired.
17020 If you do modify the text you will also need to specify any needed packages
17021 in the \SpecialChar LaTeX
17025 \begin_layout Standard
17026 The six panels are divided up by the packages they require.
17027 The following table shows the mappings from button name to \SpecialChar LaTeX
17029 \begin_inset Separator latexpar
17035 \begin_layout Standard
17037 \begin_inset Tabular
17038 <lyxtabular version="3" rows="7" columns="2">
17039 <features tabularvalignment="middle">
17040 <column alignment="center" valignment="top" width="0pt">
17041 <column alignment="center" valignment="top" width="0pt">
17043 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
17046 \begin_layout Plain Layout
17061 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
17064 \begin_layout Plain Layout
17081 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
17084 \begin_layout Plain Layout
17099 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
17102 \begin_layout Plain Layout
17111 base \SpecialChar LaTeX
17119 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
17122 \begin_layout Plain Layout
17137 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
17140 \begin_layout Plain Layout
17157 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
17160 \begin_layout Plain Layout
17175 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
17178 \begin_layout Plain Layout
17195 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
17198 \begin_layout Plain Layout
17213 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
17216 \begin_layout Plain Layout
17233 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
17236 \begin_layout Plain Layout
17251 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
17254 \begin_layout Plain Layout
17271 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
17274 \begin_layout Plain Layout
17289 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
17292 \begin_layout Plain Layout
17315 \begin_layout Standard
17317 doesn't stop you using bullets from packages you don't have.
17318 If you get errors from \SpecialChar LaTeX
17319 when you try to view or print the file, then it
17320 is likely you are missing a package.
17324 \begin_layout Plain Layout
17326 doesn't restrict your use since you may be editing locally and exporting
17335 \begin_layout Subsection
17339 \begin_layout Standard
17340 Select which bullet depth you want to change then select the bullet shape
17342 Any changes will not be visible in \SpecialChar LyX
17343 , but are visible when viewing the document.
17346 \begin_layout Standard
17347 You can reset a bullet shape to the default simply by clicking your right
17348 mouse button on the appropriate bullet depth button.
17352 \begin_layout Plain Layout
17357 want to have multiple sets of paragraphs with different sets of bullets
17358 in each, then you're going to have to get your hands dirty with \SpecialChar TeX
17360 The bullet selection dialog can help though because it provides you with
17361 the \SpecialChar LaTeX
17362 code for a wide range of bullet shapes.
17363 To make your own custom paragraphs you have the following options:
17366 \begin_layout Plain Layout
17370 \begin_layout Plain Layout
17386 \begin_layout Plain Layout
17390 \begin_layout Plain Layout
17412 \begin_layout Itemize
17413 Use the \SpecialChar LaTeX
17415 \begin_inset Flex Code
17418 \begin_layout Plain Layout
17426 to specify a new bullet shape for a given depth.
17427 You'll also need to save the current bullet shape so you can restore it
17429 In this itemized list the following \SpecialChar LaTeX
17430 code was used to change the bullet
17431 used for the first depth.
17432 \begin_inset Separator latexpar
17439 \begin_layout LyX-Code
17449 \begin_layout LyX-Code
17466 \begin_layout Itemize
17467 Note that the itemize depth is specified in Roman numerals as part of the
17477 \begin_layout Itemize
17481 \begin_layout Plain Layout
17494 Specify each individual entry by starting each item with the bullet shape
17495 enclosed in square brackets and set as
17496 \begin_inset Flex Noun
17499 \begin_layout Plain Layout
17507 For example, this item was started with
17508 \begin_inset Flex Code
17511 \begin_layout Plain Layout
17526 \begin_layout Plain Layout
17530 \begin_layout Plain Layout
17546 \begin_layout Plain Layout
17547 You'll also need to revert the labelitem back to its previous setting for
17548 the global bullet shape settings to remain in effect.
17549 The way used here was:
17552 \begin_layout LyX-Code
17567 \begin_layout Chapter
17569 Features needing Extra Software
17572 \begin_layout Section
17573 Checking \SpecialChar TeX
17577 \begin_layout Standard
17583 \begin_layout Subsection
17587 \begin_layout Standard
17596 \begin_layout Plain Layout
17601 is not yet available when you are using the \SpecialChar LaTeX
17602 distribution MiK\SpecialChar TeX
17608 , you'll find in the
17615 \begin_inset space ~
17626 \begin_inset Newline newline
17630 \begin_inset CommandInset href
17632 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17639 \begin_layout Standard
17642 Chk\SpecialChar TeX
17645 package is a program that was written by
17646 \begin_inset Flex Noun
17649 \begin_layout Plain Layout
17651 \begin_inset space ~
17659 in frustration because some constructs in \SpecialChar LaTeX
17660 are sometimes non-intuitive,
17661 and easy to forget.
17662 The program runs over your \SpecialChar LaTeX
17663 file, checks the integrity of the file, and
17664 flags some common errors.
17665 In other technical words, it is
17669 for \SpecialChar LaTeX
17673 \begin_layout Standard
17674 Well, what is a syntax checker doing in \SpecialChar LyX
17675 which is supposed to produce correct
17677 anyways? The answer is simple: Just as
17681 not only checks the
17685 of C programs, but also does
17689 checks for type-errors,
17691 Chk\SpecialChar TeX
17694 catches some common
17698 errors, in addition to the syntactical ones.
17701 Chk\SpecialChar TeX
17704 is capable of detecting several common errors, such as
17707 \begin_layout Itemize
17708 Ellipsis detection:
17709 \begin_inset Newline newline
17712 Use \SpecialChar ldots
17716 \begin_layout Itemize
17717 No space in front of/after parenthesis:
17718 \begin_inset Newline newline
17724 \begin_layout Itemize
17725 Enforcement of normal space after common abbreviations:
17726 \begin_inset Newline newline
17730 \begin_inset space \thinspace{}
17734 \begin_inset space \space{}
17737 is too wide spacing.
17740 \begin_layout Itemize
17741 Enforcement of end-of-sentence space when the last sentence ends with a
17743 \begin_inset Newline newline
17747 And this is wrong spacing.
17750 \begin_layout Itemize
17751 Space in front of labels and similar commands:
17752 \begin_inset Newline newline
17755 The label should stick right up to the text to avoid falling to a wrong
17758 \begin_inset CommandInset label
17768 \begin_layout Plain Layout
17769 This footnote is in danger of falling off to a wrong page
17774 The label is separated too much.
17777 \begin_layout Itemize
17778 Space in front of references, instead of hard spaces:
17779 \begin_inset Newline newline
17782 If you have bad luck, the text will break right between the referenced text
17783 and reference number, and that's a pity.
17785 \begin_inset CommandInset ref
17787 reference "sec:chktex"
17794 \begin_layout Itemize
17796 \begin_inset Quotes eld
17800 \begin_inset Quotes erd
17804 \begin_inset Formula $\times$
17808 \begin_inset Newline newline
17811 2x2 looks cheap compared to
17812 \begin_inset Formula $2\times2$
17818 \begin_layout Standard
17819 and more \SpecialChar ldots
17820 It is an invaluable tool when you are
17821 \begin_inset Quotes eld
17825 \begin_inset Quotes erd
17828 your document before printing, and you should run it right after the obligatory
17829 spelling check, and before you go fine tuning the typesetting.
17832 \begin_layout Subsection
17836 \begin_layout Standard
17837 If you have the program installed, usage is as simple as choosing
17839 Tools\SpecialChar menuseparator
17841 \begin_inset space ~
17847 This will make \SpecialChar LyX
17848 generate a \SpecialChar LaTeX
17849 file of your document, start
17851 Chk\SpecialChar TeX
17854 to check it, and then make \SpecialChar LyX
17856 \begin_inset Quotes eld
17860 \begin_inset Quotes erd
17863 with the warnings from
17865 Chk\SpecialChar TeX
17868 , if there were any.
17869 The warnings will be placed close to the point of the mistake, and you
17870 can quickly find them by using the
17872 Navigate\SpecialChar menuseparator
17875 menu item, or the shortcut key
17884 Open the error boxes by clicking on them with the mouse, or use the shortcut
17893 bindings, or the corresponding
17902 Read the warning and correct the mistake, if it is a mistake.
17903 If you have trouble understanding what the warning is about, you can safely
17905 Remember that there is a hidden layer between the document on screen and
17906 the technical details in invoking
17908 Chk\SpecialChar TeX
17911 , and this gap can make some warnings seem arcane or just plain silly.
17914 \begin_layout Standard
17915 This document is an excellent testing bed for the feature, and it should
17916 provide quite a few warnings for you to fiddle with.
17917 Since computers are only so smart, expect most of the warnings to be false
17921 \begin_layout Subsection
17922 How to fine tune it
17925 \begin_layout Standard
17926 Sometimes, you'll find that
17928 Chk\SpecialChar TeX
17931 makes more noise than suits your mood.
17932 Then you can choose not to use it, wait until your mood changes, or try
17935 Chk\SpecialChar TeX
17938 to get better along with you.
17941 \begin_layout Standard
17944 Chk\SpecialChar TeX
17951 very configurable and extensible, you should not expect to solve all problems
17954 Chk\SpecialChar TeX
17957 in \SpecialChar LyX
17959 Since \SpecialChar LyX
17960 has to generate a somewhat special \SpecialChar LaTeX
17961 file to be able to match the
17962 line numbers from the
17964 Chk\SpecialChar TeX
17971 \begin_layout Plain Layout
17972 You can inspect the specific output from
17978 Document\SpecialChar menuseparator
17981 \begin_inset space ~
17995 to the internal document structure, some of the warnings will not appear
17997 There are two things you can do about this:
18000 \begin_layout Itemize
18003 Chk\SpecialChar TeX
18006 invocation command line in
18007 \begin_inset Flex Noun
18010 \begin_layout Plain Layout
18011 Tools\SpecialChar menuseparator
18012 Preferences\SpecialChar menuseparator
18013 Output\SpecialChar menuseparator
18014 LaTeX\SpecialChar menuseparator
18022 Chk\SpecialChar TeX
18025 installation configuration file (usually with the file
18030 See below to learn what warnings can be enabled and disabled on the command
18034 \begin_layout Itemize
18035 Export your document as a raw \SpecialChar LaTeX
18038 File\SpecialChar menuseparator
18039 Export\SpecialChar menuseparator
18048 Invoked in this way, it can be a hassle to find the corresponding place
18049 in the document inside \SpecialChar LyX
18050 , but with a little patience, you should be able
18054 \begin_layout Standard
18055 Here follows the warning messages that can be enabled and disabled in
18064 to disable a warning, and
18068 to enable a warning.
18069 The emphasized entries are disabled by default, because the default is
18072 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18077 \begin_layout Standard
18078 Notice that you should only use the options that enable and disable warnings,
18079 because \SpecialChar LyX
18080 relies on some of the other command line parameters to be set
18081 in a specific way to have a chance to communicate with
18088 \begin_layout Enumerate
18092 Command terminated with space.
18095 \begin_layout Enumerate
18098 Non-breaking space (
18099 \begin_inset Quotes eld
18107 \begin_inset Quotes erd
18110 ) should have been used.
18113 \begin_layout Enumerate
18117 You should enclose the previous parenthesis with
18118 \begin_inset Quotes eld
18126 \begin_inset Quotes erd
18132 \begin_layout Enumerate
18135 Italic correction (
18136 \begin_inset Quotes eld
18146 \begin_inset Quotes erd
18149 ) found in non-italic buffer.
18152 \begin_layout Enumerate
18155 Italic correction (
18156 \begin_inset Quotes eld
18166 \begin_inset Quotes erd
18169 ) found more than once.
18172 \begin_layout Enumerate
18176 No italic correction (
18177 \begin_inset Quotes eld
18187 \begin_inset Quotes erd
18193 \begin_layout Enumerate
18197 \begin_inset Quotes eld
18205 \begin_inset Quotes erd
18209 \begin_inset Quotes eld
18217 \begin_inset Quotes erd
18223 \begin_layout Enumerate
18226 Wrong length of dash may have been used.
18229 \begin_layout Enumerate
18233 \begin_inset Quotes eld
18241 \begin_inset Quotes erd
18245 \begin_inset Quotes eld
18253 \begin_inset Quotes erd
18259 \begin_layout Enumerate
18263 \begin_inset Quotes eld
18271 \begin_inset Quotes erd
18277 \begin_layout Enumerate
18281 \begin_inset Quotes eld
18289 \begin_inset Quotes erd
18292 to achieve an ellipsis.
18295 \begin_layout Enumerate
18298 Inter-word spacing (
18299 \begin_inset Quotes eld
18309 \begin_inset Quotes eld
18312 ) should perhaps be used.
18315 \begin_layout Enumerate
18318 Inter-sentence spacing (
18319 \begin_inset Quotes eld
18329 \begin_inset Quotes erd
18332 ) should perhaps be used.
18335 \begin_layout Enumerate
18338 Could not find argument for command.
18341 \begin_layout Enumerate
18345 \begin_inset Quotes eld
18353 \begin_inset Quotes erd
18359 \begin_layout Enumerate
18362 Math mode still on at end of \SpecialChar LaTeX
18366 \begin_layout Enumerate
18370 \begin_inset Quotes eld
18378 \begin_inset Quotes erd
18381 doesn't match the number of
18382 \begin_inset Quotes eld
18390 \begin_inset Quotes erd
18396 \begin_layout Enumerate
18399 You should use either
18402 \begin_inset Quotes eld
18410 \begin_inset Quotes erd
18415 as an alternative to
18416 \begin_inset Quotes eld
18424 \begin_inset Quotes erd
18430 \begin_layout Enumerate
18437 " (ASCII 39) instead of "
18444 \begin_layout Enumerate
18447 User-specified pattern found.
18450 \begin_layout Enumerate
18453 This command might not be intended.
18456 \begin_layout Enumerate
18463 \begin_layout Enumerate
18481 \begin_layout Enumerate
18484 Delete this space to maintain correct page references.
18487 \begin_layout Enumerate
18491 You might wish to put this between a pair of
18492 \begin_inset Quotes eld
18500 \begin_inset Quotes erd
18506 \begin_layout Enumerate
18509 You ought to remove spaces in front of punctuation.
18512 \begin_layout Enumerate
18515 Could not execute \SpecialChar LaTeX
18519 \begin_layout Enumerate
18528 in front of small punctuation.
18531 \begin_layout Enumerate
18539 may look prettier here.
18542 \begin_layout Enumerate
18546 Multiple spaces detected in output.
18549 \begin_layout Enumerate
18552 This text may be ignored.
18555 \begin_layout Enumerate
18561 \begin_inset Quotes eld
18566 to begin quotation, not
18573 \begin_layout Enumerate
18580 to end quotation, not
18583 \begin_inset Quotes eld
18591 \begin_layout Enumerate
18597 \begin_layout Enumerate
18600 You should perhaps use
18601 \begin_inset Quotes eld
18609 \begin_inset Quotes erd
18615 \begin_layout Enumerate
18618 You should put a space in front of/after parenthesis.
18621 \begin_layout Enumerate
18624 You should avoid spaces in front of/after parenthesis.
18627 \begin_layout Enumerate
18631 You should not use punctuation in front of/after quotes.
18634 \begin_layout Enumerate
18637 Double space found.
18640 \begin_layout Enumerate
18643 You should put punctuation outside inner/inside display math mode.
18646 \begin_layout Enumerate
18649 You ought to not use primitive \SpecialChar TeX
18650 in \SpecialChar LaTeX
18654 \begin_layout Enumerate
18657 You should remove spaces in front of
18658 \begin_inset Quotes eld
18666 \begin_inset Quotes erd
18672 \begin_layout Enumerate
18675 \begin_inset Quotes eld
18683 \begin_inset Quotes erd
18686 is normally not followed by
18687 \begin_inset Quotes eld
18695 \begin_inset Quotes erd
18701 \begin_layout Standard
18702 In later versions of \SpecialChar LyX
18703 , we hope to provide a more complete interface to this
18704 tool (and it's smaller cousin
18708 ) to exploit the full power of it.
18709 But it's not exactly useless as it is now: go try it on one of your existing
18710 documents of a certain length and be surprised.
18713 \begin_layout Section
18714 Version Control in \SpecialChar LyX
18718 \begin_layout Standard
18721 Lars Gullik Bjønnes
18728 \begin_layout Subsection
18732 \begin_layout Standard
18734 supports some of the most basic RCS/CVS/SVN/GIT commands.
18735 If you need something a bit more sophisticated you will have to do that
18736 manually in a terminal.
18739 \begin_layout Standard
18740 Also note that CVS support is not as good as subversion support so we advise
18742 A good place to start learning Subversion is SVN Book
18746 \begin_layout Plain Layout
18747 \begin_inset CommandInset href
18749 target "http://svnbook.red-bean.com/"
18759 In the case of RCS you should read
18760 \begin_inset Quotes eld
18764 \begin_inset Quotes erd
18767 (a man file, read it with
18772 This file describes all the basic features of RCS.
18773 You should especially notice the comment about a RCS directory, and the
18774 notion of a master RCS file (the file ending in
18781 \begin_layout Standard
18782 Before you begin to use the version control features in \SpecialChar LyX
18784 familiar with RCS/CVS/SVN/GIT usage.
18785 The implementation in \SpecialChar LyX
18786 assumes a recent version of the GNU RCS or CVS/SVN
18787 package — no guarantees are made for older versions.
18788 Most of the log messages are not currently displayed after operations —
18789 you can check them in the Messages pane if unsure.
18790 Regular users of version control will appreciate VC toolbar, which can
18793 View\SpecialChar menuseparator
18794 Toolbars\SpecialChar menuseparator
18796 \begin_inset space ~
18804 \begin_layout Standard
18805 For introducing your own external commands consult vc-command in the manual
18806 of \SpecialChar LyX
18810 \begin_layout Standard
18811 It is strongly recommended to store documents in uncompressed format if
18812 using version control (uncheck
18814 Document\SpecialChar menuseparator
18817 if it is checked): Uncompressed LyX documents are text files and therefore
18818 for merging two different versions by version control systems.
18819 Compressed LyX documents are binary files, which cannot be merged by version
18823 \begin_layout Subsection
18824 RCS commands in \SpecialChar LyX
18828 \begin_layout Standard
18829 The following sections describe the RCS commands supported by \SpecialChar LyX
18831 You can find them in the
18833 File\SpecialChar menuseparator
18835 \begin_inset space ~
18842 was tested against RCS 5.7/5.8.
18845 \begin_layout Subsubsection
18851 \begin_layout Standard
18852 If your document is not under revision control, this is the only item shown
18854 And if it is under revision control, the
18858 item is not visible.
18862 \begin_layout Standard
18863 This command registers your document with RCS (unless you are under the
18864 directory managed by CVS)\SpecialChar endofsentence
18865 You are asked interactively to supply an initial
18866 description of the document.
18867 The document is now set in Read-Only mode and you have to
18870 \begin_inset space ~
18874 \begin_inset space ~
18878 \begin_inset space ~
18883 , before making any changes to it.
18884 A document under revision control has a
18885 \begin_inset Quotes eld
18888 [RCS:<version> <locker>]
18889 \begin_inset Quotes erd
18892 item tagged to the filename in the minibuffer.
18895 \begin_layout Standard
18896 RCS command that is run:
18898 ci -q -u -i -t-"<initial description>" <file-name>
18901 \begin_layout Standard
18906 to understand the switches.
18910 \begin_layout Subsubsection
18916 \begin_layout Standard
18917 When you are finished editing a file, you check in your changes.
18918 When you do this, you are asked for a description of the changes.
18919 This is stored in the history log.
18920 The version number is bumped, your changes are applied to the master RCS
18921 file, the document is unlocked and set to Read-Only mode.
18924 \begin_layout Standard
18927 ci -q -u -m"<description>" <file-name>
18930 \begin_layout Subsubsection
18936 \begin_layout Standard
18937 By doing this you lock the document so that only you can edit it.
18938 This will also make the document Read-Write only for you.
18939 You will usually continue editing for a while and when you are finished
18940 you check in your changes.
18941 The status line is changed to reflect that you have locked the file.
18944 \begin_layout Standard
18947 co -q -l <file-name>
18950 \begin_layout Subsubsection
18953 Revert To Repository Version
18956 \begin_layout Standard
18957 This will discard all changes made to the document since the last check
18959 You get a warning before changes are discarded.
18962 \begin_layout Standard
18965 co -f -u<version> <file-name>
18968 \begin_layout Subsubsection
18974 \begin_layout Standard
18975 This will create a copy of the current document.
18976 Since RCS does not support copy operations natively, the version history
18977 is not preserved, and the copy is added as a new file.
18978 It requires a clean document without any changes since the last checkin.
18979 You are asked for a file name and a description of the copy operation.
18980 After that the copy is created, both locally and in the repository.
18981 If the parent directories of the copied and original document differ, all
18982 relative paths of included files of the copy are adjusted (like in
18984 File\SpecialChar menuseparator
18989 Finally, the copy is loaded instead of the original document.
18992 \begin_layout Labeling
18993 \labelwidthstring 00.00.0000
18995 \begin_inset space ~
18999 \begin_inset space ~
19003 \begin_inset Newline newline
19007 \begin_inset Flex Code
19010 \begin_layout Plain Layout
19013 \begin_inset Quotes eld
19017 \begin_inset Quotes erd
19026 \begin_inset Flex Code
19029 \begin_layout Plain Layout
19032 \begin_inset Quotes eld
19036 \begin_inset Quotes erd
19045 \begin_inset Newline newline
19049 \begin_inset Flex Code
19052 \begin_layout Plain Layout
19056 \begin_inset Quotes eld
19060 \begin_inset Quotes erd
19071 \begin_layout Subsubsection
19077 \begin_layout Standard
19078 This makes as if the last check in never happened.
19079 No changes are made to the document loaded into \SpecialChar LyX
19080 , but the last version
19081 is removed from the master RCS file.
19084 \begin_layout Standard
19087 rcs -o<version> <file-name>
19090 \begin_layout Subsubsection
19096 \begin_layout Standard
19097 This shows the complete history of the RCS document.
19102 is shown in a browser.
19110 \begin_layout Subsubsection
19114 \begin_layout Standard
19116 supports RCS version number, author name, date and time of last commit.
19117 All those are extracted from
19119 rlog -r <file-name>
19123 \begin_inset CommandInset ref
19125 reference "subsec:VCS-Revision-Information"
19132 \begin_layout Subsection
19133 CVS commands in \SpecialChar LyX
19137 \begin_layout Standard
19138 A subset of CVS operations is supported by \SpecialChar LyX
19140 You can find the commands in the
19142 File\SpecialChar menuseparator
19144 \begin_inset space ~
19150 The version control system SVN is more powerful, so please use it instead
19151 of CVS if possible.
19154 \begin_layout Subsubsection
19160 \begin_layout Standard
19161 If you start from scratch with CVS you have to create your repository and
19162 checkout the working copy with external tools.
19163 If you're using a client-server setup you may need to login before doing
19164 the first repository checkout.
19167 \begin_layout Standard
19168 If your documents are under revision control and others are using the same
19169 repository problems arise when different changes to the same document at
19170 the same location happen.
19171 Standard CVS repositories don't operate with a file locking mechanism.
19172 This may be surprising, but conflicts only occur if people disagree on
19173 the proper content of the same part of a document.
19174 So, if co-workers are used to communicate regularly, these conflicts occur
19176 If they don't communicate they have a fundamental problem anyway.
19177 Nevertheless some people like to work with so called
19178 \begin_inset Quotes eld
19182 \begin_inset Quotes erd
19186 If they do so the working copy of all files is readonly when checked out
19187 first and the user starts editing after using a special command to make
19188 the working copy writable.
19189 When the changes are checked in the working copy returns to readonly state.
19190 With \SpecialChar LyX
19191 one has to edit the
19192 \begin_inset Flex Code
19195 \begin_layout Plain Layout
19201 file and add the line
19202 \begin_inset Flex Code
19205 \begin_layout Plain Layout
19211 to work with reserved checkouts.
19212 The benefit is the possibility to see who is using a writable copy of some
19214 It's not guaranteed only one user makes a copy writable.
19217 \begin_layout Standard
19219 tries to guess if you're using reserved or non-reserved checkouts.
19220 If your working copy is readonly or it is writable and an additional copy
19221 of your document exists in the CVS/Base sub-directory a reserved otherwise
19222 a non-reserved checkout is assumed.
19223 When a reserved checkout is detected you have to use
19224 \begin_inset Flex Noun
19227 \begin_layout Plain Layout
19233 to make your working copy writable if it's readonly.
19235 \begin_inset Flex Noun
19238 \begin_layout Plain Layout
19244 operation is possible and that makes your working copy readonly again after
19245 transferring your changes to the repository.
19248 \begin_layout Standard
19249 More information about CVS can be found here
19250 \begin_inset Flex URL
19253 \begin_layout Plain Layout
19255 http://www.nongnu.org/cvs
19261 \begin_inset Flex URL
19264 \begin_layout Plain Layout
19266 http://ximbiot.com/cvs
19274 \begin_layout Standard
19279 to understand the sub-commands and the switches mentioned below.
19282 \begin_layout Subsubsection
19288 \begin_layout Standard
19289 If your document is not under revision control, this is the only item shown
19291 And if it is under revision control, the
19295 item is not visible.
19299 \begin_layout Standard
19300 This command registers in CVS your document
19301 \begin_inset Flex Strong
19304 \begin_layout Plain Layout
19312 in the case you have already the documents directory under CVS control
19318 This means you have to create or checkout the archive by yourself using
19320 (In case you forget that step \SpecialChar LyX
19321 registers the document with RCS.)
19324 \begin_layout Standard
19325 Then you are asked interactively to supply an initial description of the
19327 Don't forget that registered file is not yet checked in.
19330 \begin_layout Standard
19331 CVS command that is run:
19333 cvs -q add -m"<entered message>" "<file-name>"
19336 \begin_layout Standard
19341 above and for all other CVS commands is an abbreviation for
19342 \begin_inset Quotes eld
19345 change the current working directory to file location and use the file name
19346 without path component as argument
19347 \begin_inset Quotes erd
19353 \begin_layout Subsubsection
19359 \begin_layout Standard
19360 When you are finished editing a file, you commit your changes.
19361 When you do this and you had changed the document, you are asked for a
19362 description of the changes.
19363 After that changes are written to the repository.
19364 In case you didn't change the document and a reserved checkout is detected
19365 the reservation made on
19366 \begin_inset Flex Noun
19369 \begin_layout Plain Layout
19378 \begin_layout Labeling
19379 \labelwidthstring 00.00.0000
19381 \begin_inset space ~
19385 \begin_inset space ~
19389 \begin_inset Newline newline
19393 \begin_inset Flex Code
19396 \begin_layout Plain Layout
19399 -q commit -m"<description>" "<file-name>"
19405 \begin_inset Newline newline
19409 \begin_inset Flex Code
19412 \begin_layout Plain Layout
19423 \begin_layout Subsubsection
19429 \begin_layout Standard
19430 When you are sharing a repository with others, you may have to incorporate
19431 their changes into your working copy.
19434 \begin_layout Standard
19437 cvs -q update "<file-name>"
19440 \begin_layout Standard
19441 If a readonly checkout is detected the working copy is made writable and
19445 \begin_layout Standard
19448 cvs -q edit "<file-name>"
19451 \begin_layout Subsubsection
19454 Revert To Repository Version
19457 \begin_layout Standard
19458 This will discard all changes made to the document since the last check
19460 You get a warning before changes are discarded.
19461 Firstly the file is deleted, secondly CVS update command is run.
19464 \begin_layout Standard
19467 cvs -q update "<file-name>"
19470 \begin_layout Standard
19471 If a reserved checkout is detected and the working copy has no changes only
19472 the reservation is undone.
19475 \begin_layout Standard
19478 cvs -q unedit "<file-name>"
19481 \begin_layout Subsubsection
19487 \begin_layout Standard
19488 This will create a copy of the current document.
19489 Since CVS does not support copy operations natively, the version history
19490 is not preserved, and the copy is added as a new file.
19491 It requires a clean document without any changes since the last checkin.
19492 You are asked for a file name and a description of the copy operation.
19493 After that the copy is created, both locally and in the repository.
19494 If the parent directories of the copied and original document differ, all
19495 relative paths of included files of the copy are adjusted (like in
19497 File\SpecialChar menuseparator
19502 Finally, the copy is loaded instead of the original document.
19505 \begin_layout Labeling
19506 \labelwidthstring 00.00.0000
19508 \begin_inset space ~
19512 \begin_inset space ~
19516 \begin_inset Newline newline
19520 \begin_inset Flex Code
19523 \begin_layout Plain Layout
19526 \begin_inset Quotes eld
19530 \begin_inset Quotes erd
19539 \begin_inset Flex Code
19542 \begin_layout Plain Layout
19545 \begin_inset Quotes eld
19549 \begin_inset Quotes erd
19558 \begin_inset Newline newline
19562 \begin_inset Flex Code
19565 \begin_layout Plain Layout
19569 \begin_inset Quotes eld
19573 \begin_inset Quotes erd
19584 \begin_layout Subsubsection
19590 \begin_layout Standard
19591 This will rename the current document.
19592 Since CVS does not support rename operations natively, the version history
19593 is not preserved, the renamed document is added as a new file, and the
19594 original document is deleted.
19595 It requires a clean document without any changes since the last checkin.
19596 You are asked for a file name and a description of the rename operation.
19597 After that the document is renamed, both locally and in the repository.
19598 If the parent directories of the new and old file names differ, all relative
19599 paths of included files are adjusted (like in
19601 File\SpecialChar menuseparator
19606 Finally, the document is reloaded using the new name.
19609 \begin_layout Labeling
19610 \labelwidthstring 00.00.0000
19612 \begin_inset space ~
19616 \begin_inset space ~
19620 \begin_inset Newline newline
19624 \begin_inset Flex Code
19627 \begin_layout Plain Layout
19630 \begin_inset Quotes eld
19634 \begin_inset Quotes erd
19643 \begin_inset Flex Code
19646 \begin_layout Plain Layout
19649 \begin_inset Quotes eld
19653 \begin_inset Quotes erd
19662 \begin_inset Newline newline
19666 \begin_inset Flex Code
19669 \begin_layout Plain Layout
19673 \begin_inset Quotes eld
19677 \begin_inset Quotes erd
19686 \begin_inset Newline newline
19690 \begin_inset Flex Code
19693 \begin_layout Plain Layout
19697 \begin_inset Quotes eld
19701 \begin_inset Quotes erd
19712 \begin_layout Subsubsection
19713 Update of the local directory checkout from repository
19716 \begin_layout Standard
19717 Once your documents gets more complex, containing sub-documents and pictures,
19719 \begin_inset Flex Code
19722 \begin_layout Plain Layout
19728 files and so on using version control becomes more complicated.
19730 supports updating the whole tree in which resides the document.
19731 This become especially useful once you cooperate with people which neither
19732 have detailed knowledge about CVS usage nor they have ambition to commit
19733 additional material to the repository.
19734 You have to organize the files structure so that all external files are
19735 in the same directory or subdirectories of the document.
19736 It's good practice anyway to store multipart documents in an extra directory.
19739 \begin_layout Standard
19741 \begin_inset Flex Code
19744 \begin_layout Plain Layout
19745 Update local directory from repository
19750 command updates the whole directory.
19751 If local changes are detected user is warned before update starts.
19752 In case of merge conflicts both versions of the conflicting document parts
19753 are placed in the final document.
19754 You have to review and correct the result of the merge.
19755 You'll find the conflicts enclosed in pairs of
19756 \begin_inset Flex Code
19759 \begin_layout Plain Layout
19766 \begin_inset Flex Code
19769 \begin_layout Plain Layout
19776 \begin_inset Flex Code
19779 \begin_layout Plain Layout
19786 The first part is your version as before the update operation with the
19787 document name prepended.
19788 The second one is the repository version with the version number after
19790 \begin_inset Flex Code
19793 \begin_layout Plain Layout
19802 \begin_layout Labeling
19803 \labelwidthstring 00.00.0000
19805 \begin_inset space ~
19809 \begin_inset space ~
19813 \begin_inset Newline newline
19817 \begin_inset Flex Code
19820 \begin_layout Plain Layout
19828 (Ask if changes are detected.)
19829 \begin_inset Newline newline
19833 \begin_inset Flex Code
19836 \begin_layout Plain Layout
19837 cd $path; cvs -q update
19847 \begin_layout Standard
19849 \begin_inset Flex Code
19852 \begin_layout Plain Layout
19858 stands for the path to the document.
19861 \begin_layout Subsubsection
19867 \begin_layout Standard
19868 This shows the complete history of the CVS document.
19871 cvs log "<file-name>"
19873 is shown in a browser.
19876 \begin_layout Subsubsection
19880 \begin_layout Standard
19882 supports CVS version number, author name, date and time of last commit.
19883 All those are extracted from
19885 cvs log -r <file-name>
19889 \begin_inset CommandInset ref
19891 reference "subsec:VCS-Revision-Information"
19898 \begin_layout Subsection
19899 SVN commands in \SpecialChar LyX
19903 \begin_layout Standard
19904 SVN is now partially supported by \SpecialChar LyX
19906 You can find the commands in the
19908 File\SpecialChar menuseparator
19910 \begin_inset space ~
19916 Please note that if you use password protected access to repository via
19917 ssh, you will be asked in terminal window.
19919 was tested against SVN 1.5, 1.6, 1.7 and 1.8
19923 \begin_layout Plain Layout
19924 Most of the commands will work with 1.4 too, see
19925 \begin_inset CommandInset ref
19927 reference "subsec:SVN-Repo-Update"
19932 There seems to be currently unresolved permissions problem under SVN 1.8
19933 with reverting changes when file is locked.
19941 \begin_layout Subsubsection
19947 \begin_layout Standard
19948 If your document is not under revision control, this is the only item shown
19950 And if it is under revision control, the
19954 item is not visible.
19957 \begin_layout Standard
19958 This command registers in SVN your document ONLY in case you have already
19959 the documents directory under SVN control (in particular
19964 This means you have to checkout the archive by yourself.
19967 \begin_layout Standard
19968 Then you are asked interactively to supply an initial description of the
19970 Don't forget that registered file is not yet commited.
19973 \begin_layout Standard
19974 SVN command that is run:
19977 \begin_inset Quotes eld
19981 \begin_inset Quotes erd
19987 \begin_layout Standard
19992 to understand the switches.
19995 \begin_layout Subsubsection
20001 \begin_layout Standard
20002 When you are finished editing a file, you commit your changes.
20003 When you do this, you are asked for a description of the changes.
20004 After that changes are commited.
20007 \begin_layout Standard
20012 \begin_layout Plain Layout
20013 In case locking is not enabled.
20015 \begin_inset CommandInset ref
20017 reference "subsec:SVN-File-Locking"
20028 svn commit -q -m"<description>" <file-name>
20031 \begin_layout Subsubsection
20037 \begin_layout Standard
20038 Updates the changes of this file from the repository.
20039 Be sure you understand SVN merging and conflicts resolving before using
20040 this function, because all conflicts has to be resolved manually by you!
20043 \begin_layout Standard
20048 \begin_layout Plain Layout
20056 svn update --non-interactive
20057 \begin_inset Quotes eld
20061 \begin_inset Quotes erd
20067 \begin_layout Subsubsection
20070 Revert To Repository Version
20073 \begin_layout Standard
20074 This will discard all changes made to the document since the last check
20076 You get a warning before changes are discarded.
20079 \begin_layout Standard
20083 \begin_inset Quotes eld
20087 \begin_inset Quotes erd
20093 \begin_layout Subsubsection
20099 \begin_layout Standard
20100 This will create a copy of the current document including the version history.
20101 It requires a clean document without any changes since the last checkin.
20102 You are asked for a file name and a description of the copy operation.
20103 After that the copy is created, both locally and in the repository.
20104 If the parent directories of the copied and original document differ, all
20105 relative paths of included files of the copy are adjusted (like in
20107 File\SpecialChar menuseparator
20112 Finally, the copy is loaded instead of the original document.
20115 \begin_layout Labeling
20116 \labelwidthstring 00.00.0000
20118 \begin_inset space ~
20122 \begin_inset space ~
20126 \begin_inset Newline newline
20130 \begin_inset Flex Code
20133 \begin_layout Plain Layout
20137 \begin_inset Quotes eld
20141 \begin_inset Quotes erd
20145 \begin_inset Quotes eld
20149 \begin_inset Quotes erd
20158 \begin_inset Newline newline
20162 \begin_inset Flex Code
20165 \begin_layout Plain Layout
20174 \begin_layout Subsubsection
20180 \begin_layout Standard
20181 This will rename the current document including the version history.
20182 It requires a clean document without any changes since the last checkin.
20183 You are asked for a file name and a description of the rename operation.
20184 After that the document is renamed, both locally and in the repository.
20185 If the parent directories of the new and old file names differ, all relative
20186 paths of included files are adjusted (like in
20188 File\SpecialChar menuseparator
20193 Finally, the document is reloaded using the new name.
20196 \begin_layout Labeling
20197 \labelwidthstring 00.00.0000
20199 \begin_inset space ~
20203 \begin_inset space ~
20207 \begin_inset Newline newline
20211 \begin_inset Flex Code
20214 \begin_layout Plain Layout
20218 \begin_inset Quotes eld
20222 \begin_inset Quotes erd
20226 \begin_inset Quotes eld
20230 \begin_inset Quotes erd
20239 \begin_inset Newline newline
20243 \begin_inset Flex Code
20246 \begin_layout Plain Layout
20255 \begin_layout Subsubsection
20256 \begin_inset CommandInset label
20258 name "subsec:SVN-Repo-Update"
20262 Update of the local directory checkout from repository
20266 \begin_layout Plain Layout
20267 Note that this command will work only with subversion
20268 \begin_inset Formula $\geqq1.5$
20279 \begin_layout Standard
20280 All the commands above have one shortcomming - they deal with the current
20282 Once your document contains pictures, includes external
20283 \begin_inset Flex Code
20286 \begin_layout Plain Layout
20292 files and so on administration becomes more complicated.
20294 now supports updating the whole tree in which resides the document
20298 \begin_layout Plain Layout
20299 One need to organize the files structure so that all external files are
20300 in the same directory or subdirectories of the document.
20307 This become especially useful once you cooperate with people which neither
20308 know about subversion management nor they have ambition to commit additional
20309 material to the repository.
20313 \begin_layout Standard
20314 \begin_inset Flex Code
20317 \begin_layout Plain Layout
20318 Update local directory from repository
20323 command updates the whole directory and in case of merge conflicts local
20324 version of the files are left, so no unintended data loss occurs.
20325 If local changes are detected user is warned before update starts.
20328 \begin_layout Labeling
20329 \labelwidthstring 00.00.0000
20331 \begin_inset space ~
20335 \begin_inset space ~
20339 \begin_inset Newline newline
20343 \begin_inset Flex Code
20346 \begin_layout Plain Layout
20352 (Ask if changes are detected.)
20353 \begin_inset Newline newline
20357 \begin_inset Flex Code
20360 \begin_layout Plain Layout
20361 svn update –accept mine-full $path
20369 \begin_layout Standard
20371 \begin_inset Flex Code
20374 \begin_layout Plain Layout
20380 stands for the path to the document.
20383 \begin_layout Subsubsection
20389 \begin_layout Standard
20390 This shows the complete history of the SVN document.
20394 \begin_inset Quotes eld
20398 \begin_inset Quotes erd
20403 is shown in a browser.
20406 \begin_layout Subsubsection
20408 \begin_inset CommandInset label
20410 name "subsec:SVN-File-Locking"
20417 \begin_layout Standard
20418 The file exchange through various revision control systems brings the problem
20419 of merge conflicts in case two different users try to edit the same (parts
20421 When such a conflict happens it needs manual resolving and one reasonable
20422 alternative is to provide some kind of locking mechanism, which guarantees
20423 that only one user is allowed to edit file at the given time.
20426 \begin_layout Standard
20427 SVN has two such mechanisms to provide mutual exclusivity for file access
20428 - locks and automatic setting of write permissions (see sec.
20430 \begin_inset CommandInset ref
20432 reference "subsec:Automatical-Locking-Property"
20437 \begin_inset Flex Code
20440 \begin_layout Plain Layout
20450 \begin_layout Plain Layout
20451 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20457 If this property is detected for a given document \SpecialChar LyX
20458 starts to use SVN locks
20459 for document editing automatically and the whole check-in/out mechanism
20460 switches to the same regimen as for RCS.
20461 This in particular means there are two different modes of file use in \SpecialChar LyX
20465 \begin_layout Itemize
20467 The loaded file is in the read-only mode.
20468 For editing on needs to check-out.
20473 consists of updating from the repository and gaining write lock.
20474 If the lock is not possible to obtain, we remain in unlocked state.
20477 \begin_layout Itemize
20479 The loaded file is in the 'normal' edit mode.
20480 No other user is allowed to edit the file.
20485 consists of commiting changes and releasing write-lock.
20486 If no changes have been made to the document, no commit will be produced
20490 \begin_layout Plain Layout
20491 Don't be puzzled by the fact that you will be asked for commit message anyway.
20496 and only the write-lock will be released.
20499 \begin_layout Standard
20503 \begin_layout Labeling
20504 \labelwidthstring 00.00.0000
20507 svn commit -q -m"<description>" "<file-name>"
20508 \begin_inset Newline newline
20511 svn unlock "<file-name>"
20514 \begin_layout Labeling
20515 \labelwidthstring 00.00.0000
20518 svn update "<file-name>"
20519 \begin_inset Newline newline
20522 svn lock "<file-name>"
20525 \begin_layout Subsubsection
20528 \begin_inset CommandInset label
20530 name "subsec:Automatical-Locking-Property"
20536 Automatic Locking Property
20539 \begin_layout Standard
20540 The above mentioned automatic setting of write permissions of the .lyx file
20543 File\SpecialChar menuseparator
20545 \begin_inset space ~
20548 Control\SpecialChar menuseparator
20549 Toggle locking property
20552 This command is active only when the file is not locked on the svn server
20554 you need to check-out before proceeding).
20557 \begin_layout Labeling
20558 \labelwidthstring 00.00.0000
20560 \begin_inset space ~
20566 \begin_layout Labeling
20567 \labelwidthstring 00.00.0000
20570 svn propset svn:needs-lock ON "<file-name>"
20573 \begin_layout Labeling
20574 \labelwidthstring 00.00.0000
20577 svn propdel svn:needs-lock "<file-name>"
20580 \begin_layout Subsubsection
20581 \begin_inset CommandInset label
20583 name "subsec:VCS-Revision-Information"
20587 Revision Information in Documents
20590 \begin_layout Standard
20591 There are more possibilities how to activate revision information in our
20595 \begin_layout Itemize
20601 \begin_layout Itemize
20602 tree revision information (
20603 \begin_inset Flex Code
20606 \begin_layout Plain Layout
20613 The result is the output of the
20614 \begin_inset Flex Code
20617 \begin_layout Plain Layout
20623 command, the following table gives you an idea, how to read the results.
20626 \begin_layout Standard
20628 \begin_inset Tabular
20629 <lyxtabular version="3" rows="6" columns="2">
20630 <features tabularvalignment="middle">
20631 <column alignment="center" valignment="top">
20632 <column alignment="center" valignment="top">
20634 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20637 \begin_layout Plain Layout
20643 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20646 \begin_layout Plain Layout
20654 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20657 \begin_layout Plain Layout
20663 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20666 \begin_layout Plain Layout
20667 mixed revision working copy
20674 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20677 \begin_layout Plain Layout
20683 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20686 \begin_layout Plain Layout
20687 modified working copy
20694 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20697 \begin_layout Plain Layout
20703 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20706 \begin_layout Plain Layout
20707 switched working copy
20714 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20717 \begin_layout Plain Layout
20723 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20726 \begin_layout Plain Layout
20727 partial working copy, from a sparse checkout
20734 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20737 \begin_layout Plain Layout
20743 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20746 \begin_layout Plain Layout
20747 mixed revision, modified, switched working copy
20760 \begin_layout Itemize
20761 file revision information.
20762 The result comes from parsing the output of
20763 \begin_inset Flex Code
20766 \begin_layout Plain Layout
20768 \begin_inset space ~
20772 \begin_inset space ~
20776 \begin_inset space ~
20785 Supported flags are:
20789 \begin_layout Itemize
20790 version number of the last commit (
20791 \begin_inset Flex Code
20794 \begin_layout Plain Layout
20803 \begin_layout Itemize
20804 author of the last commit (
20805 \begin_inset Flex Code
20808 \begin_layout Plain Layout
20817 \begin_layout Itemize
20818 date of the last commit (
20819 \begin_inset Flex Code
20822 \begin_layout Plain Layout
20831 \begin_layout Itemize
20832 time of the last commit (
20833 \begin_inset Flex Code
20836 \begin_layout Plain Layout
20846 \begin_layout Standard
20847 You can obtain this info via InsetInfo (e.g.
20849 \begin_inset Flex Code
20852 \begin_layout Plain Layout
20853 info-insert buffer vcs-date
20859 The information will be available only when you have the file stored under
20860 svn managment (i.e.
20862 \begin_inset Flex Code
20865 \begin_layout Plain Layout
20871 directory is available with your document).
20875 \begin_layout Itemize
20876 Another—a hacking one—possibility is to use svn keywords
20880 \begin_layout Plain Layout
20881 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20887 In short – you set file keywords property (e.g.
20890 svn propset svn:keywords 'Rev' file.lyx
20892 ) and then paste keyword \SpecialChar TeX
20897 \begin_layout Plain Layout
20898 This is an easy way how to ensure that \SpecialChar LyX
20899 won't break the line in the middle
20905 tag in your document (e.g.
20910 \begin_layout Plain Layout
20918 This way svn client will automatically substitute revision number (e.g.
20923 \begin_layout Plain Layout
20930 ) after each update and commit.
20931 There are more problems with this approach.
20932 Firstly, the '$' character is used in \SpecialChar TeX
20933 world for math equations, so any
20934 occurence of math formula
20935 \begin_inset Formula $Rev$
20939 \begin_inset Formula $Rev:59$
20942 in your \SpecialChar LyX
20944 Similarly for other keywords like Id, Date, Author, etc.
20945 Secondly svn output is dependent on your locales, so its very easy that
20946 svn would produce some problematic strings once Date is used.
20947 Thirdly you get the whole 'Rev: 59' string in your document instead of
20949 Until subversion implements user's custom keywords it will be hard to use
20950 this approach reliably or let \SpecialChar LyX
20951 to support it directly.
20954 \begin_layout Subsection
20955 SVN and Windows Environment
20958 \begin_layout Quote
20959 My inclination is to say that if the user cannot figure out the command
20960 line operations on their own fairly quickly, they would be well advised
20961 to use TortoiseSVN.
20967 \begin_layout Subsubsection
20971 \begin_layout Standard
20972 In addition to installing \SpecialChar LyX
20973 , and having access to a Subversion repository,
20974 the user will need to install the Subversion client program.
20975 A Windows installer for the client program is available from
20976 \begin_inset CommandInset href
20979 target "http://www.collab.net/nonav/downloads/subversion/"
20984 The user may also want to install
20985 \begin_inset CommandInset href
20988 target "http://tortoisesvn.tigris.org/"
20992 , which integrates Subversion operations into the context (rightclick) menu
20993 of Windows Explorer.
20994 Operations done outside \SpecialChar LyX
20995 will typically be more convenient using the Explorer
20997 Note that TortoiseSVN is not a replacement for the client program, which
20998 is what \SpecialChar LyX
21002 \begin_layout Subsubsection
21003 Bringing a document under Subversion control
21006 \begin_layout Standard
21007 Before a \SpecialChar LyX
21008 document can be brought under version control in Subversion, its
21009 parent directory needs to be under version control.
21010 If the document is being added to a project already in the repository,
21011 this is accomplished by checking the project out to the directory where
21012 the new document will be placed.
21013 If the project itself is not yet under version control (for instance, if
21014 this document starts a new project), the directory must be imported into
21016 This is done outside \SpecialChar LyX
21018 Both import and checkout are easily accomplished from the Explorer context
21019 menu using TortoiseSVN, or alternatively can be done using the command
21020 line client at a DOS prompt.
21021 The procedure for importing the project using TortoiseSVN is described
21022 below, assuming an existing repository and a new project being started
21030 For information on using the Subversion client program, run
21037 \begin_layout Enumerate
21044 in Windows Explorer, right click it, and select
21046 TortoiseSVN\SpecialChar menuseparator
21050 If necessary, adjust the URL for the repository, then click OK.
21053 \begin_layout Enumerate
21054 Right click the level of the repository under which you want to place the
21055 new project folder (typically the top level) and click
21059 Supply a name for the project folder and click OK.
21060 Add a message for the log file if desired, then click OK again.
21061 The new project folder should appear in the repository.
21062 Finally, click OK again to exit the repository browser.
21065 \begin_layout Enumerate
21066 Once again right click
21072 , this time selecting SVN Checkout\SpecialChar ldots
21073 Select the URL of the project folder
21074 you just created in the repository, and set the checkout directory to
21082 You will be warned about a non-empty folder; click OK to proceed.
21083 You should now have a
21094 \begin_layout Enumerate
21095 Create or open your document in \SpecialChar LyX
21098 File\SpecialChar menuseparator
21100 \begin_inset space ~
21103 Control\SpecialChar menuseparator
21107 Add a log message and click OK to commit the document to version control.
21110 \begin_layout Standard
21111 From this point onward, you should have full functionality in the
21113 File\SpecialChar menuseparator
21115 \begin_inset space ~
21121 You also have the option of checking the document in and out, viewing its
21123 using the TortoiseSVN context menu in Windows Explorer or the Subversion
21124 client program from a command prompt.
21127 \begin_layout Subsubsection
21128 SSH tunnel used with SVN under Windows
21131 \begin_layout Standard
21132 Compared with Linux setting up an svn client to communicate over ssh under
21133 Windows is a rather troublesome task.
21134 We will at least offer some hints how to setup the client side but prior
21135 knowledge about ssh and the Windows command line is needed, also be prepared
21136 for a great deal of frustration\SpecialChar ldots
21140 \begin_layout Enumerate
21141 Get an svn client for windows, as described in the previous sections.
21142 When it is a fresh install run some svn command (e.g.
21144 \begin_inset Flex Code
21147 \begin_layout Plain Layout
21153 ) to create config files, which you will need to change later on.
21156 \begin_layout Enumerate
21157 Choose an ssh client for Windows.
21158 There are several possibilities, we will use the one from Putty tools
21162 \begin_layout Plain Layout
21163 \begin_inset Flex URL
21166 \begin_layout Plain Layout
21168 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21179 You will need to set the connection up so that the client doesn't ask for
21180 any password from you.
21181 To keep things easy we will use only keys without any additional password
21186 \begin_layout Enumerate
21188 \begin_inset Flex Code
21191 \begin_layout Plain Layout
21198 Save your private .ppk key file and put the public one on the server side.
21199 If the SVN server runs on Linux, note that the format of the public key
21200 is not compatible with Linux openssh and you will need to direcly copy-paste
21203 Public key for pasting into OpenSSH authorized_keys file
21205 :” edit field into the server's
21206 \begin_inset Flex Code
21209 \begin_layout Plain Layout
21210 ~/.ssh/authorized_keys
21216 \begin_inset Flex Code
21219 \begin_layout Plain Layout
21228 \begin_layout Enumerate
21230 \begin_inset Flex Code
21233 \begin_layout Plain Layout
21240 In the SVN config file
21244 \begin_layout Plain Layout
21245 Exact path depends on Windows version, usually somewhere around
21246 \begin_inset Flex Code
21249 \begin_layout Plain Layout
21252 Documents and Settings
21266 \begin_inset Flex Code
21269 \begin_layout Plain Layout
21284 , section [tunnels], setup ssh command, e.g.
21286 \begin_inset Flex Code
21289 \begin_layout Plain Layout
21290 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21299 \begin_layout Plain Layout
21300 It will usually take a lot of time to get exact command right and it depends
21302 For example do not have some remote server saved as a default session in
21304 If things fail, try to connect via plink without SVN first.
21313 \begin_layout Enumerate
21314 Checkout the SVN archive, e.
21315 \begin_inset space \thinspace{}
21319 \begin_inset Newline newline
21323 \begin_inset Flex Code
21326 \begin_layout Plain Layout
21327 svn co svn+ssh://user@server/repository_path
21335 \begin_layout Subsubsection
21336 End-of-Line Conversions
21339 \begin_layout Standard
21340 When the collaborators are mixing Linux and Windows environments, \SpecialChar LyX
21342 use different line endings inside the .lyx files.
21343 This is not a problem as far as \SpecialChar LyX
21344 functionality is concerned, but the commit
21345 diffs will be huge and merge-conflicts prone.
21346 Fortunately SVN itself knows
21350 \begin_layout Plain Layout
21351 \begin_inset Flex URL
21354 \begin_layout Plain Layout
21356 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21366 how to deal with CR/LF problems when switching .lyx files to the
21367 \begin_inset Flex Code
21370 \begin_layout Plain Layout
21380 \begin_layout Plain Layout
21382 \begin_inset Flex Code
21385 \begin_layout Plain Layout
21386 svn propset svn:eol-style native FILE_NAME
21399 \begin_layout Subsection
21400 GIT commands in \SpecialChar LyX
21404 \begin_layout Standard
21405 A minimal subset of GIT commands is now supported by \SpecialChar LyX
21407 You can find the commands in the
21409 File\SpecialChar menuseparator
21411 \begin_inset space ~
21417 Please note that if you use password protected access to repository via
21418 ssh, you will be asked in terminal window.
21420 was tested against GIT 1.7.
21424 \begin_layout Plain Layout
21425 Windows users please note that you need to ensure that git is on the path.
21426 This can be set from within \SpecialChar LyX
21429 Tools\SpecialChar menuseparator
21430 Preferences\SpecialChar menuseparator
21431 Paths\SpecialChar menuseparator
21442 \begin_layout Standard
21443 One big difference of GIT and the other supported version control systems
21444 is the distributed nature of GIT: With traditional version control systems
21445 there is one central server which hosts the repository.
21446 Users commit their changes to the server, and get updates made by other
21448 With GIT, users commit to a local repository.
21449 The local repository can be synchronized with one or more remote repositories
21451 \begin_inset Flex Code
21454 \begin_layout Plain Layout
21461 \begin_inset Flex Code
21464 \begin_layout Plain Layout
21472 does not interact in any way with remote GIT repositories.
21473 It works exclusively with the local repository in a very similar way as
21474 with a central CVS or SVN repository.
21475 If you use remote GIT repositories you need to do the
21476 \begin_inset Flex Code
21479 \begin_layout Plain Layout
21486 \begin_inset Flex Code
21489 \begin_layout Plain Layout
21495 operations with your favourite GIT client.
21498 \begin_layout Subsubsection
21504 \begin_layout Standard
21505 If your document is not under revision control, this is the only item shown
21507 And if it is under revision control, the
21511 item is not visible.
21514 \begin_layout Standard
21515 This command registers in GIT your document ONLY in case you have already
21516 the documents directory under GIT control (in particular
21521 This means you have to checkout the archive by yourself.
21524 \begin_layout Standard
21525 Then you are asked interactively to supply an initial description of the
21527 Don't forget that registered file is not yet commited.
21530 \begin_layout Standard
21531 GIT command that is run:
21534 \begin_inset Quotes eld
21538 \begin_inset Quotes erd
21544 \begin_layout Standard
21549 to understand the switches.
21552 \begin_layout Subsubsection
21558 \begin_layout Standard
21559 When you are finished editing a file, you commit your changes.
21560 When you do this, you are asked for a description of the changes.
21561 After that changes are commited.
21564 \begin_layout Standard
21567 git commit -q -m"<description>" <file-name>
21570 \begin_layout Subsubsection
21573 Revert To Repository Version
21576 \begin_layout Standard
21577 This will discard all changes made to the document since the last check
21579 You get a warning before changes are discarded.
21582 \begin_layout Standard
21586 \begin_inset Quotes eld
21590 \begin_inset Quotes erd
21596 \begin_layout Subsubsection
21602 \begin_layout Standard
21603 This will rename the current document including the version history.
21604 It requires a clean document without any changes since the last checkin.
21605 You are asked for a file name and a description of the rename operation.
21606 After that the document is renamed, both locally and in the repository.
21607 If the parent directories of the new and old file names differ, all relative
21608 paths of included files are adjusted (like in
21610 File\SpecialChar menuseparator
21615 Finally, the document is reloaded using the new name.
21618 \begin_layout Labeling
21619 \labelwidthstring 00.00.0000
21621 \begin_inset space ~
21625 \begin_inset space ~
21629 \begin_inset Newline newline
21633 \begin_inset Flex Code
21636 \begin_layout Plain Layout
21640 \begin_inset Quotes eld
21644 \begin_inset Quotes erd
21648 \begin_inset Quotes eld
21652 \begin_inset Quotes erd
21661 \begin_inset Newline newline
21665 \begin_inset Flex Code
21668 \begin_layout Plain Layout
21677 \begin_layout Subsubsection
21683 \begin_layout Standard
21684 This shows the complete history of the GIT document.
21688 \begin_inset Quotes eld
21692 \begin_inset Quotes erd
21697 is shown in a browser.
21700 \begin_layout Subsubsection
21704 \begin_layout Standard
21706 supports GIT hash number of the last commit to the file, author name, date
21707 and time of last commit.
21708 All those are extracted from
21710 git log -n 1 --pretty=format:%H%n%an%n%ai
21713 Tree version information is obtained via
21715 git describe --abbrev --dirty --long
21719 \begin_inset CommandInset ref
21721 reference "subsec:VCS-Revision-Information"
21728 \begin_layout Subsection
21732 \begin_layout Standard
21733 With the recent addition of the vc-command function \SpecialChar LyX
21734 power users are allowed
21735 to create their own commands for revision control.
21738 \begin_layout Standard
21739 As an example you can see how two TortoiseSVN commands could be integrated
21743 \begin_layout Description
21745 \begin_inset Flex Code
21748 \begin_layout Plain Layout
21749 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21757 \begin_layout Description
21759 \begin_inset Flex Code
21762 \begin_layout Plain Layout
21763 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21771 \begin_layout Subsection
21772 Version control and Document comparison
21775 \begin_layout Standard
21776 One of the typical uses of version control is to inspect the changes between
21777 revisions, usually by creating
21778 \begin_inset Flex Code
21781 \begin_layout Plain Layout
21788 While this is useful for plain text files, it is much less useful in the
21789 case of \SpecialChar LyX
21790 files, which have more a complicated structure.
21791 Hence we provide binding to the Document comparison feature.
21792 There are two ways of calling this feature - either by direct call of
21793 \begin_inset Flex Code
21796 \begin_layout Plain Layout
21803 function (for details see \SpecialChar LyX
21804 functions manual) or by icon/menu item
21805 \begin_inset Flex Noun
21808 \begin_layout Plain Layout
21809 Compare with older revision...
21815 One can either compare two chosen revisions of the document or he can simply
21816 compare the current version of edited text with older revisions (where
21818 \begin_inset Flex Noun
21821 \begin_layout Plain Layout
21827 ' revisions back means comparison of the edited file with last commited
21832 \begin_layout Standard
21833 This feature is supported for SVN and RCS though due to the more complicated
21834 versioning scheme of RCS there is a constraint – when addressing the revisions
21835 in dialog, numbers always point to the last number in RCS revision number,
21838 We don't currently support GIT addressing of revisions, one can just compare
21839 edited document with its revision X steps backs, where X is addressed as
21843 \begin_layout Section
21844 Literate Programming
21847 \begin_layout Standard
21852 (kayvan@sylvan.com)
21856 original documentation written by
21858 Edmar Wienskoski Jr.
21861 (edmar-w-jr@technologist.com)
21864 \begin_layout Subsection
21868 \begin_layout Standard
21869 The main purpose of this documentation is to show you how to use \SpecialChar LyX
21871 programming, where it is assumed that you are familiar with this programming
21872 technique, and know what
21873 \begin_inset Quotes eld
21877 \begin_inset Quotes erd
21881 \begin_inset Quotes eld
21885 \begin_inset Quotes erd
21889 If that is not the case, please follow the web links provided in the following
21891 There is a lot of good documentation out there covering old development
21892 history to the latest tools tips.
21895 \begin_layout Standard
21896 It is also assumed that you are familiar with \SpecialChar LyX
21897 itself to a point that you
21898 are comfortable changing your \SpecialChar LyX
21899 preferences, and X resources file.
21900 If that is not the case please refer to other \SpecialChar LyX
21901 documentation to cover your
21905 \begin_layout Subsection
21906 Literate Programming
21909 \begin_layout Standard
21910 From the Literate Programming FAQ:
21913 \begin_layout Quotation
21914 Literate programming is the combination of documentation and source together
21915 in a fashion suited for reading by human beings.
21916 In fact, literate programs should be enjoyable reading, even inviting!
21917 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21918 and documentation in a single file.
21919 Literate programming tools then parse the file to produce either readable
21920 documentation or compilable source.
21921 The WEB style of literate programming was created by D.
21922 \begin_inset space \thinspace{}
21926 Knuth during the development of his \SpecialChar TeX
21927 typesetting software.
21931 \begin_layout Standard
21932 Another excerpt says:
21935 \begin_layout Quotation
21938 How is literate programming different from verbose commenting?
21941 \begin_layout Quotation
21942 There are three distinguishing characteristics.
21943 In order of importance, they are:
21947 \begin_layout Itemize
21948 flexible order of elaboration
21951 \begin_layout Itemize
21952 automatic support for browsing
21955 \begin_layout Itemize
21956 typeset documentation, especially diagrams and mathematics
21960 \begin_layout Standard
21961 Now that I sparked your curiosity, take a look in the references.
21964 \begin_layout Subsubsection
21968 \begin_layout Standard
21969 The complete Literate Programming FAQ can be found at:
21972 \begin_layout Quote
21973 Literate Programming FAQ
21974 \begin_inset Flex URL
21977 \begin_layout Plain Layout
21979 http://www.literateprogramming.com/lpfaq.pdf
21987 \begin_layout Standard
21988 The FAQ lists 23 (twenty three!) different literate programming tools.
21989 Where some are specialized or
21990 \begin_inset Quotes eld
21994 \begin_inset Quotes erd
21997 for particular programming languages, while other have general scope.
22002 for my own use for several reasons:
22005 \begin_layout Itemize
22006 It can generate the documentation either in \SpecialChar LaTeX
22010 \begin_layout Itemize
22011 It has a open architecture, i.
22012 \begin_inset space \thinspace{}
22016 \begin_inset space \space{}
22019 it is easy to plug in new filters and to perform special processing that
22024 \begin_layout Itemize
22025 There is a good selection of filters available already (the HTML is one
22029 \begin_layout Itemize
22033 \begin_layout Standard
22034 The Noweb web page can be found at:
22037 \begin_layout Quote
22039 \begin_inset Flex URL
22042 \begin_layout Plain Layout
22044 http://www.cs.virginia.edu/~nr/noweb/
22052 \begin_layout Standard
22053 Starting from there you can reach many other interesting links and even
22054 some literate program examples.
22057 \begin_layout Subsection
22059 and Literate Programming with Noweb
22062 \begin_layout Standard
22063 The \SpecialChar LyX
22064 support for Literate Programming is provided by using the generic \SpecialChar LyX
22066 converters mechanism.
22067 This support is provided in a
22068 \begin_inset Quotes eld
22072 \begin_inset Quotes erd
22076 \begin_inset space \thinspace{}
22080 \begin_inset space \space{}
22083 you will be able to use this new \SpecialChar LyX
22084 feature with some other literate programming
22085 tool of your choice by just changing your \SpecialChar LyX
22089 \begin_layout Subsubsection
22090 Generating documents and code (weaving and tangling)
22093 \begin_layout Paragraph
22094 Using the noweb module
22097 \begin_layout Standard
22098 If you have installed Noweb and \SpecialChar LyX
22099 successfully, whenever you open a new document,
22100 after you have chosen its document class, use the Document->Settings menu
22102 \begin_inset Quotes eld
22106 \begin_inset Quotes erd
22110 If Noweb is correctly installed, when you click on the
22111 \begin_inset Quotes eld
22115 \begin_inset Quotes erd
22118 link, you will see the
22119 \begin_inset Quotes eld
22123 \begin_inset Quotes erd
22126 module in the available list and you can add it to your document.
22129 \begin_layout Paragraph
22133 \begin_layout Standard
22135 enables you to write code with a layout named
22136 \begin_inset Flex Noun
22139 \begin_layout Plain Layout
22146 Noweb delimits chunks like this:
22149 \begin_layout LyX-Code
22153 \begin_layout LyX-Code
22157 \begin_layout LyX-Code
22161 \begin_layout LyX-Code
22165 \begin_layout LyX-Code
22169 \begin_layout Standard
22170 The problem is that whatever is written in between the << and the
22174 must be taken literally, i.
22175 \begin_inset space \thinspace{}
22179 \begin_inset space \space{}
22183 should be prevented from making any special interpretation of what has
22185 This is also handled by
22186 \begin_inset Flex Noun
22189 \begin_layout Plain Layout
22195 , that works like a normal paragraph but has a free spacing capability.
22198 \begin_layout Standard
22199 As a special note, you can also use the
22200 \begin_inset Quotes eld
22204 \begin_inset Quotes erd
22207 construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
22211 \begin_layout LyX-Code
22215 \begin_layout LyX-Code
22216 def some_function(args):
22219 \begin_layout LyX-Code
22220 "This is the doc string for this function."
22223 \begin_layout LyX-Code
22224 print "My args: ", args
22227 \begin_layout LyX-Code
22228 @ %def some_function
22231 \begin_layout Standard
22232 For an example of this usage and the resulting cross-reference output, look
22233 at the Literate python program in
22235 LIBDIR/examples/listerrors.lyx
22237 which should make this all clear.
22240 \begin_layout Paragraph
22241 Generating the documentation
22244 \begin_layout Standard
22245 At this point you already have a new document file with a proper document
22246 class, and with some code and text on it.
22247 How do I print it? The answer is simple, you select
22249 View\SpecialChar menuseparator
22253 Just like you would do for a plain document.
22254 No special procedure is required.
22257 \begin_layout Standard
22258 To help orientate you, I will now explain what happens inside \SpecialChar LyX
22262 \begin_layout Enumerate
22265 Update\SpecialChar menuseparator
22268 menu option is chosen, a \SpecialChar LaTeX
22274 \begin_layout Standard
22275 If the document is of any literate class the generated file will be named
22276 with an extension name defined by the
22277 \begin_inset Quotes eld
22281 \begin_inset Quotes erd
22284 format (defined in the Preferences panel), otherwise the file will have
22293 \begin_layout Enumerate
22294 Note that the only difference so far is in the name of the file, no special
22295 processing is required by \SpecialChar LyX
22297 Given that you formatted the code using the
22298 \begin_inset Flex Noun
22301 \begin_layout Plain Layout
22307 layout that, by itself, takes care of the business.
22310 \begin_layout Enumerate
22311 If the document is of any literate class \SpecialChar LyX
22312 will then use the internal \SpecialChar LyX
22314 Noweb converter, followed by the Noweb to \SpecialChar LaTeX
22319 \begin_layout Plain Layout
22320 The converters are defined in the
22322 Tools\SpecialChar menuseparator
22326 \begin_inset Quotes eld
22330 \begin_inset Quotes erd
22342 manual for general information about converters.
22347 to generate the \SpecialChar LaTeX
22352 \begin_layout Standard
22353 Otherwise it will just skip this step.
22357 \begin_layout Enumerate
22358 Finally, \SpecialChar LaTeX
22359 is invoked and the regular post processing continues as in a plain
22363 \begin_layout Standard
22364 Independence from a particular
22365 \begin_inset Quotes eld
22369 \begin_inset Quotes erd
22372 is easily achieved by changing the commands that are run by the various
22376 \begin_layout Paragraph
22377 Generating the code
22380 \begin_layout Standard
22381 When the build menu option is chosen or the corresponding button in the
22382 toolbar is pressed, a \SpecialChar LaTeX
22383 file is generated just like step 1 above.
22384 Next, \SpecialChar LyX
22390 This converter needs to be defined by the user and is not installed by
22391 default, though the Program format is.
22392 This converter (like any other converter) will have two parts:
22395 \begin_layout Enumerate
22396 The converter program itself.
22397 This program performs the conversion from the one format to the other (in
22398 this case, from the Noweb format to the Program pseudo-format).
22401 \begin_layout Enumerate
22402 The error log parser.
22403 This is a program whose sole purpose is to rewrite error messages in a
22404 format that \SpecialChar LyX
22406 This makes it possible for \SpecialChar LyX
22407 to place error boxes in the right places in
22411 \begin_layout Standard
22412 The first part, the
22413 \begin_inset Quotes eld
22417 \begin_inset Quotes erd
22420 setting, should be set to
22421 \begin_inset Newline newline
22425 \begin_inset Quotes eld
22433 \begin_inset Quotes erd
22437 \begin_inset Newline newline
22440 This basically means that \SpecialChar LyX
22442 \begin_inset Quotes eld
22446 \begin_inset Quotes erd
22449 (a program or script) with the name of the Noweb file (normally a file
22450 in the \SpecialChar LyX
22451 temp directory) and the directory path of the original \SpecialChar LyX
22456 \begin_layout Standard
22457 This is an implementation of
22458 \begin_inset Quotes eld
22462 \begin_inset Quotes erd
22465 that you can place in a directory on your path:
22468 \begin_layout Standard
22469 \begin_inset VSpace defskip
22475 \begin_layout Standard
22476 \begin_inset Newpage pagebreak
22482 \begin_layout Standard
22488 \begin_layout Standard
22494 \begin_layout Standard
22497 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
22500 \begin_layout Standard
22501 \begin_inset VSpace defskip
22507 \begin_layout Standard
22508 The next part of the converter setting is the
22509 \begin_inset Quotes eld
22513 \begin_inset Quotes erd
22516 which is to be set to
22517 \begin_inset Newline newline
22521 \begin_inset Quotes eld
22526 parselog=$$s/scripts/listerrors
22529 \begin_inset Quotes erd
22533 \begin_inset Newline newline
22536 This will run any errors that are generated by the
22537 \begin_inset Quotes eld
22541 \begin_inset Quotes erd
22544 process through the
22545 \begin_inset Quotes eld
22549 \begin_inset Quotes erd
22555 \begin_layout Standard
22556 The build will normally take place in \SpecialChar LyX
22557 's temporary directory, so the files
22558 produced by the conversion will be in that directory.
22560 will copy out what it regards as the `main' file, but the
22564 conversion may produce several files, and so most of these would then be
22565 deleted when \SpecialChar LyX
22567 This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
22568 the build-script chunk can place the generated files in that location.
22571 \begin_layout Paragraph
22572 Build instructions in the document
22575 \begin_layout Standard
22576 The last piece of the integration between \SpecialChar LyX
22578 \begin_inset Quotes eld
22582 \begin_inset Quotes erd
22586 Generally, the instructions for building your program should be embedded
22587 in a chunk of its own.
22589 \begin_inset Quotes eld
22593 \begin_inset Quotes erd
22596 above uses the notangle command to look for this chunk (called
22597 \begin_inset Quotes eld
22601 \begin_inset Quotes erd
22604 ) and runs its contents through
22605 \begin_inset Quotes eld
22609 \begin_inset Quotes erd
22615 \begin_layout Standard
22616 Typically, such a chunk would look something like this:
22619 \begin_layout LyX-Code
22623 \begin_layout LyX-Code
22625 \begin_inset Newline newline
22628 if [ -z "${NOWEB_SOURCE}" ]
22629 \begin_inset Newline newline
22635 \begin_layout LyX-Code
22636 NOWEB_SOURCE=myfile.nw
22637 \begin_inset Newline newline
22641 \begin_inset Newline newline
22645 code to extract files ...
22646 use NOWEB_OUTPUT_DIR here ...]
22647 \begin_inset Newline newline
22651 code to compile files ...]
22652 \begin_inset Newline newline
22658 \begin_layout Standard
22661 LIBDIR/examples/listerrors.lyx
22665 LIBDIR/examples/Literate.lyx
22667 which implement two versions of the
22668 \begin_inset Quotes eld
22672 \begin_inset Quotes erd
22675 program for some illustrations of how all of these pieces go together or
22678 LIBDIR/examples/noweb2lyx.lyx.
22681 Interestingly, these three files show off the language-indepence of the
22683 literate programming support since they are written in Python, C and Perl
22687 \begin_layout Subsubsection
22688 Configuring \SpecialChar LyX
22692 \begin_layout Standard
22693 All the Literate Programming support is configured by the
22695 Tools\SpecialChar menuseparator
22699 \begin_inset Quotes eld
22703 \begin_inset Quotes erd
22707 The important parts are:
22710 \begin_layout Description
22712 \begin_inset space ~
22716 \begin_inset Quotes eld
22720 \begin_inset Quotes erd
22724 \begin_inset space ~
22727 format Set up via the File Formats tab, this is where the Noweb-specific
22737 , the file extension is set to
22742 This tells \SpecialChar LyX
22743 to create a file with a
22747 extension in the first step of the conversion process.
22750 \begin_layout Description
22752 \begin_inset space ~
22760 \begin_inset space ~
22763 format This is an empty format whose sole purpose is to be the endpoint
22764 of a conversion (which then allows us to set up a converter for it).
22767 \begin_layout Description
22777 This converter performs the
22778 \begin_inset Quotes eld
22782 \begin_inset Quotes erd
22785 of the literate document.
22786 For Noweb, it is set to
22787 \begin_inset Quotes eld
22792 noweave -delay -index $$i > $$o
22795 \begin_inset Quotes erd
22801 \begin_layout Description
22811 \begin_inset Quotes eld
22815 \begin_inset Quotes erd
22819 As stated above, the Converter is set to
22820 \begin_inset Quotes eld
22828 \begin_inset Quotes erd
22831 , with Flags set to
22832 \begin_inset Newline newline
22836 \begin_inset Quotes eld
22841 parselog=$$s/scripts/listerrors
22844 \begin_inset Quotes erd
22850 \begin_layout Subsubsection
22854 \begin_layout Standard
22855 There is also a new function implemented in the \SpecialChar LyX
22857 \begin_inset Quotes eld
22860 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22864 \begin_layout Standard
22865 When debugging code with ddd/gdb, it is possible to invoke a text editor
22866 at the current execution position with a single key stroke.
22867 The default ddd configuration for that is shift-ctrl-V.
22868 It happens that you can define the editor command line invocation in ddd
22871 Edit\SpecialChar menuseparator
22872 Preferences\SpecialChar menuseparator
22875 dialog and changing the "Edit Sources" entry.
22878 \begin_layout Standard
22879 I take advantage of the newly created \SpecialChar LyX
22880 server function and this ddd feature,
22882 \begin_inset Quotes eld
22886 \begin_inset Quotes erd
22892 \begin_layout Standard
22893 \begin_inset VSpace defskip
22899 \begin_layout Standard
22902 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22905 \begin_layout Standard
22906 \begin_inset VSpace defskip
22912 \begin_layout Standard
22913 With this, whenever you are using ddd and find a point in the program that
22914 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22915 ddd will forward this information to \SpecialChar LyX
22916 through the \SpecialChar LyX
22917 server and then the
22919 window will show the same file with the cursor at the same position ddd
22921 No more guessing or long scrolling to locate a point in the program back
22925 \begin_layout Standard
22926 Note however that you must enable the \SpecialChar LyX
22927 server to get this feature working
22928 (it is disabled by default).
22929 You can enable it in
22941 ) by entering in the
22947 \begin_inset Quotes eld
22952 /home/<your-home-directory>/.lyx/lyxpipe
22955 \begin_inset Quotes erd
22961 \begin_layout Standard
22962 Read the \SpecialChar LyX
22963 server documentation in the
22965 Customization Manual
22967 for further information.
22970 \begin_layout Subsubsection
22974 \begin_layout Standard
22975 There are six new buttons that can be added to your \SpecialChar LyX
22977 Five of these buttons are short cuts to layout styles:
23000 The last one is a short cut to the
23001 \begin_inset Quotes eld
23005 \begin_inset Quotes erd
23012 \begin_layout Standard
23014 has a range of buttons that are available for tool bar customization.
23015 In my toolbar I like to combine the six short cuts above with two more:
23020 \SpecialChar menuseparator
23025 \SpecialChar menuseparator
23032 Document\SpecialChar menuseparator
23033 View\SpecialChar menuseparator
23037 Here is how it looks like:
23040 \begin_layout LyX-Code
23044 \begin_layout LyX-Code
23048 \begin_layout LyX-Code
23049 Icon "layout Standard"
23052 \begin_layout LyX-Code
23053 Icon "layout Section"
23056 \begin_layout LyX-Code
23057 Icon "layout \SpecialChar LaTeX
23061 \begin_layout LyX-Code
23062 Icon "layout \SpecialChar LyX
23066 \begin_layout LyX-Code
23067 Icon "layout Chunk"
23070 \begin_layout LyX-Code
23074 \begin_layout LyX-Code
23078 \begin_layout LyX-Code
23079 Icon "buffer-typeset"
23082 \begin_layout LyX-Code
23083 Icon "build-program"
23086 \begin_layout LyX-Code
23090 \begin_layout LyX-Code
23094 \begin_layout LyX-Code
23098 \begin_layout LyX-Code
23102 \begin_layout LyX-Code
23106 \begin_layout Subsubsection
23107 Colors customization
23110 \begin_layout Standard
23111 There are a number of colors in \SpecialChar LyX
23112 that can be customized in
23117 One of the things that bothers people is the \SpecialChar LaTeX
23119 The default color is red, since the chunks uses \SpecialChar LaTeX
23120 font, and there is a lot
23121 of chunks in literate documents, you may get tired of seeing everything
23123 You can change it by going to the tabs
23132 \begin_layout Standard
23133 The next thing is the visible presence of the newline character in the screen.
23134 You can choose the color of this particular character and make it blend
23136 I recommend you choosing a color that is close to the background but not
23137 equal, that way you still can see it is there, but it is not bothering
23141 \begin_layout Subsection
23146 \begin_layout Standard
23155 is documented in the
23159 example file and in the Sweave manual (menu
23161 Help\SpecialChar menuseparator
23167 \begin_layout Chapter
23172 \begin_layout Standard
23173 Users sometimes need to be able to
23174 \begin_inset Quotes eld
23178 \begin_inset Quotes erd
23182 file together with all the images (and other files) on which it depends,
23183 either for sending to a publisher or for sharing with a co-author.
23185 2.0 includes a Python script (
23186 \begin_inset Flex Code
23189 \begin_layout Plain Layout
23195 ) that automates this process.
23196 To use it, you must have either the
23197 \begin_inset Flex Code
23200 \begin_layout Plain Layout
23207 \begin_inset Flex Code
23210 \begin_layout Plain Layout
23216 python modules installed on your system.
23217 By default, the script prefers the
23218 \begin_inset Flex Code
23221 \begin_layout Plain Layout
23228 \begin_inset Flex Code
23231 \begin_layout Plain Layout
23237 format on Unix-like systems and the
23238 \begin_inset Flex Code
23241 \begin_layout Plain Layout
23250 \begin_layout Standard
23252 's configuration process will set the script up to export a `\SpecialChar LyX
23254 and this format will then be available under
23255 \begin_inset Flex Code
23258 \begin_layout Plain Layout
23259 File\SpecialChar menuseparator
23268 \begin_layout Standard
23269 Independently of the platform, the generation of a particular archive format
23270 can be forced by adding either the
23271 \begin_inset Flex Code
23274 \begin_layout Plain Layout
23281 \begin_inset Flex Code
23284 \begin_layout Plain Layout
23291 \begin_inset Flex Code
23294 \begin_layout Plain Layout
23301 \begin_inset Flex Code
23304 \begin_layout Plain Layout
23310 format) switch to the
23311 \begin_inset Flex Code
23314 \begin_layout Plain Layout
23316 \SpecialChar menuseparator
23324 \begin_inset Flex Code
23327 \begin_layout Plain Layout
23328 Tools\SpecialChar menuseparator
23329 Preferences\SpecialChar menuseparator
23330 File Handling\SpecialChar menuseparator
23337 (Make sure you add the switch after the script name, not before it.)
23340 \begin_layout Chapter
23342 and the World Wide Web
23345 \begin_layout Standard
23347 has long supported the export of documents to various web-friendly formats,
23349 Before verson 2.0, however, HTML export was always accomplished by the use
23350 of external converters.
23354 \begin_layout Plain Layout
23355 For details on the use of external converters with \SpecialChar LyX
23360 section of the Customization manual.
23365 These fall into two large groups: there are converters that use \SpecialChar LaTeX
23367 intermediate format, such as
23368 \begin_inset Flex Code
23371 \begin_layout Plain Layout
23378 \begin_inset Flex Code
23381 \begin_layout Plain Layout
23388 \begin_inset Flex Code
23391 \begin_layout Plain Layout
23397 , relying upon \SpecialChar LyX
23398 to produce the \SpecialChar LaTeX
23399 ; and there is a converter that works directly
23400 on \SpecialChar LyX
23402 \begin_inset Flex Code
23405 \begin_layout Plain Layout
23413 All of these have different advantages and disadvantages.
23417 \begin_layout Standard
23418 The \SpecialChar LaTeX
23419 -based converters have the advantage that, in principle, they know everythin
23420 g about the exported document that \SpecialChar LaTeX
23422 Such converters do not care, for example, if a certain block of code was
23423 produced by \SpecialChar LyX
23424 or was Evil Red Text.
23425 These converters know about
23426 \begin_inset Flex Code
23429 \begin_layout Plain Layout
23435 files, counters, and references, and can often make use of the
23436 \begin_inset Flex Code
23439 \begin_layout Plain Layout
23445 files generated by Bib\SpecialChar TeX
23447 On the other hand, \SpecialChar LaTeX
23448 is a very hard language to parse—it is sometimes said
23449 that only \SpecialChar TeX
23450 itself understands \SpecialChar TeX
23451 —and \SpecialChar LaTeX
23452 -based converters will often choke on
23453 what seem to be quite simple constructs; complex ones can throw them completely
23454 , and as of this writing, for example, the
23458 manual will not export with
23459 \begin_inset Flex Code
23462 \begin_layout Plain Layout
23468 , though the others will.
23469 The other issue concerns how math is handled.
23470 These converters typically convert the formulae into little pictures that
23471 are then linked from the HTML document.
23472 Since these are actually generated by \SpecialChar LaTeX
23473 , they are accurate.
23474 But they do not scale well, and just getting them to look as if they are
23475 actually meant to be in your document—so that the font sizes seem to be
23476 roughly the same—can be a challenge.
23479 \begin_layout Standard
23481 \begin_inset Flex Code
23484 \begin_layout Plain Layout
23492 \begin_inset CommandInset href
23494 name "http://elyxer.nongnu.org/"
23495 target "http://elyxer.nongnu.org/"
23499 ) solves some of these problems.
23500 In particular, the formulae it produces scale perfectly, since it renders
23501 math using a combination of HTML and CSS rather than converting the formulae
23503 But even moderately complex formula are rendered less well than with
23504 \begin_inset Flex Code
23507 \begin_layout Plain Layout
23513 ; this reflects the limitations of HTML.
23517 \begin_layout Plain Layout
23519 \begin_inset Flex Code
23522 \begin_layout Plain Layout
23529 can also use jsMath and MathJax for equations, but this setting is only
23530 available globally and requires one to have access to a server that runs
23536 More importantly (as of version 1.1.1, at least),
23537 \begin_inset Flex Code
23540 \begin_layout Plain Layout
23547 has limited support for math macros and no support for user-defined paragraph
23548 or character styles.
23549 These limitations make
23550 \begin_inset Flex Code
23553 \begin_layout Plain Layout
23560 unsuitable for many of the documents \SpecialChar LyX
23562 In principle, of course, these problems could be solved, but the \SpecialChar LyX
23564 have decided to follow a different path and have made \SpecialChar LyX
23566 writing XHTML, just as it is capable of writing \SpecialChar LaTeX
23567 , DocBook, and plaintext.
23570 \begin_layout Standard
23571 As of this writing, XHTML output remains under development and should probably
23573 \begin_inset Quotes eld
23577 \begin_inset Quotes erd
23584 \begin_layout Plain Layout
23586 \begin_inset Flex Code
23589 \begin_layout Plain Layout
23590 development/HTML.notes
23595 , which can be found in the \SpecialChar LyX
23597 \begin_inset CommandInset href
23599 name "accessed online"
23600 target "http://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
23604 , usually contains up-to-date information about the state of XHTML output.
23605 See also the list of XHTML bugs on
23606 \begin_inset CommandInset href
23608 name "the bug tracker"
23609 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"
23618 Still, the developers have chosen this approach because it has several
23619 potential advantages over the other two.
23622 \begin_layout Standard
23623 These advantages are primarily due to the fact that the XHTML output routines,
23624 since they are part of \SpecialChar LyX
23625 , know everything \SpecialChar LyX
23626 knows about the document being
23631 \begin_layout Plain Layout
23632 Another advantage is that, since these routines are internal to \SpecialChar LyX
23634 immune to changes in \SpecialChar LyX
23635 's file format, or to changes in the semantics of
23641 So they know about the table of contents (as displayed in the outline),
23642 about the counters associated with different paragraph styles, and about
23643 user-defined styles.
23644 The XHTML output routines know what \SpecialChar LyX
23645 knows about internationalization,
23646 too, so they will output
23647 \begin_inset Quotes eld
23651 \begin_inset Quotes erd
23655 \begin_inset Quotes eld
23663 \begin_inset Quotes erd
23666 , depending upon the language in effect at the time.
23670 \begin_layout Standard
23671 Quite generally, the output routines know what \SpecialChar LyX
23672 knows about document layout,
23673 that is, about how the document is to be rendered on screen.
23674 We use this information when we output the document as XHTML.
23675 In particular, \SpecialChar LyX
23680 generates CSS style information corresponding to the layout information
23681 it uses to render the document on screen: if section headings are supposed
23682 to be sans-serif and bold as seen in \SpecialChar LyX
23683 , then (by default) they will be sans-seri
23684 f and bold when viewed in a web browser, too.
23685 And this is true not just for pre-defined styles, like Section, but for
23686 any style, including user-defined styles.
23687 Indeed, the XHTML output routines make no distinction between user-defined
23688 paragraph and character styles and \SpecialChar LyX
23689 's own pre-defined styles: in each case,
23690 everything \SpecialChar LyX
23691 knows about the styles is contained in the layout files.
23692 And much the same is true as regards pre-defined textual insets, such as
23693 footnotes, and various custom insets.
23697 \begin_layout Standard
23698 The result is that XHTML output can be customized and extended in exactly
23699 the same way \SpecialChar LaTeX
23700 output can be customized and extended: through layout files
23702 See chapter five of the
23706 manual for the details.
23709 \begin_layout Standard
23710 The remainder of this chapter contains more detailed information on XHTML
23711 output, its limitations, and ways to work around those limitations.
23714 \begin_layout Section
23715 Math Output in XHTML
23718 \begin_layout Standard
23720 offers four choices for how math is rendered.
23721 These have various advantages and disadvantages:
23724 \begin_layout Itemize
23726 \begin_inset Newline newline
23729 MathML is a dialect of XML designed specifically for mathematics on the
23730 web, and it typically renders very well in browsers that support it.
23731 The disadvantage is that not all browsers support MathML, and support is
23732 not complete even in the Gecko-based browsers, such as Firefox.
23733 \begin_inset Newline newline
23736 If \SpecialChar LyX
23737 is unable to render a formula as MathML—for example, if the formula
23739 \begin_inset Flex Code
23742 \begin_layout Plain Layout
23748 package or ERT—then it will instead output the formula as an image.
23752 \begin_layout Itemize
23754 \begin_inset Newline newline
23757 As mentioned above,
23758 \begin_inset Flex Code
23761 \begin_layout Plain Layout
23767 outputs math as HTML, styled by CSS.
23771 \begin_layout Plain Layout
23773 has borrowed some of the CSS for its HTML output from
23774 \begin_inset Flex Code
23777 \begin_layout Plain Layout
23788 For simple formulae, this can work quite well, though with more complicated
23789 formulae it tends to break down.
23790 Still, this method has the advantage that it is very widely supported and
23791 so it may be appropriate for documents that contain only a little, fairly
23793 \begin_inset Newline newline
23796 If Lyx is unable to render a formula as HTML—for example, if the formula
23798 \begin_inset Flex Code
23801 \begin_layout Plain Layout
23807 package or ERT—then it will instead output the formula as an image.
23811 \begin_layout Itemize
23813 \begin_inset Newline newline
23817 \begin_inset Flex Code
23820 \begin_layout Plain Layout
23827 will output formulae as images, the very same images, in fact, that are
23828 used for instant preview.
23832 \begin_layout Plain Layout
23833 Instant preview does
23837 have to be on for images to be output, however.
23842 The advantage to this method is that the images are simply generated by
23844 , so they are very accurate.
23845 The disadvantage, as mentioned earlier, is that these are bitmapped images,
23846 so they do not scale terribly well, and one cannot copy them, etc.
23847 (As of this writing, there are also problems about equation numbering.
23849 \begin_inset CommandInset href
23852 target "http://www.lyx.org/trac/ticket/6894"
23857 \begin_inset Newline newline
23860 The size of the images can be controlled by setting the
23861 \begin_inset Quotes eld
23864 Math Images Scaling
23865 \begin_inset Quotes erd
23869 \begin_inset Flex Noun
23872 \begin_layout Plain Layout
23873 Document\SpecialChar menuseparator
23874 Settings\SpecialChar menuseparator
23884 \begin_layout Plain Layout
23885 For those who want to know, this controls the resolution of the image in
23886 dots per inch and is based upon a default of 75 dpi.
23892 \begin_inset Newline newline
23895 If \SpecialChar LyX
23896 for some reason fails to create an image for a formula (e.g., if a required
23898 package is not installed), then it will fall back to outputing the raw
23903 \begin_layout Itemize
23906 \begin_inset Newline newline
23909 Finally, \SpecialChar LyX
23910 will happily output math as \SpecialChar LaTeX
23912 As well as being the output of last resort, this method can be used with
23914 \begin_inset CommandInset href
23917 target "http://www.math.union.edu/~dpvc/jsMath/"
23921 , which uses JavaScript to render \SpecialChar LaTeX
23922 embedded in HTML documents.
23924 wraps the \SpecialChar LaTeX
23926 \begin_inset Flex Code
23929 \begin_layout Plain Layout
23935 (for inline formulas) or
23936 \begin_inset Flex Code
23939 \begin_layout Plain Layout
23945 (for displayed formulas) with
23946 \begin_inset Flex Code
23949 \begin_layout Plain Layout
23955 , as is required for jsMath.
23958 \begin_layout Standard
23959 One of these output methods must be selected under
23960 \begin_inset Flex Noun
23963 \begin_layout Plain Layout
23964 Document\SpecialChar menuseparator
23965 Settings\SpecialChar menuseparator
23972 By default, \SpecialChar LyX
23974 This is a document-wide setting, therefore.
23977 \begin_layout Standard
23978 Eventually, \SpecialChar LyX
23979 will offer the user the option to select an alternate output
23980 method for a particular inset, say, one that isn't being rendered very
23985 \begin_layout Plain Layout
23986 That said, since \SpecialChar LyX
23987 falls back to images if the inset contains ERT, then one
23988 can force output as an image by putting some harmless ERT into the math,
23990 \begin_inset Formula $a=b\relax$
24001 \begin_layout Section
24002 Bibliography and Citations
24005 \begin_layout Standard
24006 XHTML output fully supports bibliographies and citations.
24010 \begin_layout Standard
24011 Citation labels are generated by the same machinery that generates \SpecialChar LyX
24013 labels, so the labels will look in the output much as they do in \SpecialChar LyX
24016 If you are using numerical citations, then \SpecialChar LyX
24017 will output numerical labels,
24018 such as [1] or [17], rather than simply showing the citation key in square
24019 brackets, as it does on-screen.
24020 If you are using author-year citations, then \SpecialChar LyX
24021 will add lowercase letters
24022 to the years, just as Bib\SpecialChar TeX
24023 does, if it finds more than one citation for
24024 a given author-year combination.
24025 The labels will be printed with the bibliography entries.
24026 Note that there is, at present, no way to customize the appearance of the
24027 labels, for example, to choose between square brackets and parentheses.
24030 \begin_layout Standard
24031 Bibliography output is handled by the same machinery that handles the presentati
24032 on of reference information in the citation dialog, so you will see in the
24033 XHTML output pretty much what you would see if you were to look at a given
24034 entry in the citation dialog.
24035 The formatting can be customized in your layout file or, preferably, in
24041 manual for the details.
24044 \begin_layout Standard
24045 The main defect at present is that cross-referenced information is printed
24046 with every entry with which it is associated.
24047 So you can see things like this:
24050 \begin_layout Quote
24052 \begin_inset Quotes eld
24055 Context and Logical Form
24056 \begin_inset Quotes erd
24061 Language in Context: Selected Essays
24063 (Oxford: Oxford University Press, 2007), pp.
24067 \begin_layout Quote
24069 \begin_inset Quotes eld
24072 Semantics in Context
24073 \begin_inset Quotes erd
24078 Language in Context: Selected Essays
24080 (Oxford: Oxford University Press, 2007), pp.
24084 \begin_layout Standard
24085 This should be fixed before long.
24088 \begin_layout Standard
24089 There is no support at present for sectioned bibliographies.
24090 If you have multiple bibliographies, then \SpecialChar LyX
24091 will print the same bibliography
24095 \begin_layout Section
24099 \begin_layout Standard
24101 will happily export indexes as XHTML, but with certain limitations at the
24105 \begin_layout Standard
24106 Index export will be most reliable when you do not attempt to use the fancy
24107 constructs that are described in the section on indexes in the
24115 \begin_layout Plain Layout
24116 The main issue here is that \SpecialChar LyX
24117 itself does not really handle these.
24118 It just lets you enter what you would have to enter in raw \SpecialChar LaTeX
24124 We'll describe how they are handled using the subsection headings from
24128 \begin_layout Itemize
24129 Grouping Index Entries (aka, sub-entries): \SpecialChar LyX
24130 makes an effort to support these,
24131 but the entries must be separated by
24132 \begin_inset Quotes eld
24136 \begin_inset Quotes erd
24139 , that is, there must be spaces around the exclamation point.
24140 This is because it is otherwise too difficult to check for escaped exclamation
24141 points, ones in math, and so forth.
24144 \begin_layout Itemize
24145 Page Ranges: There is no support at all for page ranges, since these make
24146 no sense with XHMTL.
24147 Instead, you will just get two index entries, one at either end.
24150 \begin_layout Itemize
24151 Cross-referencing: There is no support for cross-referencing.
24152 If \SpecialChar LyX
24153 finds an entry containing the
24154 \begin_inset Quotes eld
24157 |see\SpecialChar ldots
24159 \begin_inset Quotes erd
24162 construct, it is just dropped, and the rest is treated as an ordinary index
24166 \begin_layout Itemize
24167 Index Entry Order: \SpecialChar LyX
24168 does support attempts to fix the sorting order.
24169 It will take what is before the first `@' it finds and use that for sorting,
24170 taking what follows the first `@' to be the actual entry.
24171 At present, \SpecialChar LyX
24172 does not check for escaped `@', so do not try to index email
24176 \begin_layout Itemize
24177 Index Entry Layout: You can format entries by using the text style dialog,
24178 or by using any other method available within \SpecialChar LyX
24180 There is no support for constructs like:
24181 \begin_inset Quotes eld
24185 \begin_inset Quotes erd
24189 Indeed, if \SpecialChar LyX
24190 finds a pipe symbol, `|', in an entry, it will delete it and
24191 everything that follows it.
24194 \begin_layout Itemize
24195 Multiple Indexes: There is no support for multiple indexes.
24196 Rather, all index entries will be printed as one large index.
24197 To avoid our printing several versions of the index, we print only the
24198 main index, so make sure you have one.
24201 \begin_layout Section
24202 Nomenclature and Glossary
24205 \begin_layout Standard
24206 There is at present no support for glossaries.
24207 Adding it would be fairly trivial, and welcome.
24210 \begin_layout Chapter
24211 The \SpecialChar LyX
24215 \begin_layout Section
24219 \begin_layout Standard
24220 The `\SpecialChar LyX
24221 server' allows other programs to talk to \SpecialChar LyX
24222 , invoke \SpecialChar LyX
24223 commands, and retrieve
24224 information about the \SpecialChar LyX
24226 This is only intended for advanced users, but they should find it useful.
24227 It is by writing to the \SpecialChar LyX
24228 server, for example, that bibliography managers,
24229 such as JabRef, are able to
24230 \begin_inset Quotes eld
24234 \begin_inset Quotes erd
24237 citations to \SpecialChar LyX
24241 \begin_layout Section
24242 Starting the \SpecialChar LyX
24246 \begin_layout Standard
24247 The \SpecialChar LyX
24248 server works through the use of a pair of named pipes.
24249 These are usually located in
24250 \begin_inset Flex Code
24253 \begin_layout Plain Layout
24259 , (except on Windows, where
24263 named pipes are special objects located in
24264 \begin_inset Flex Code
24267 \begin_layout Plain Layout
24279 ) and have the names
24280 \begin_inset Quotes eld
24284 \begin_inset Flex Code
24287 \begin_layout Plain Layout
24294 \begin_inset Quotes erd
24298 \begin_inset Quotes eld
24302 \begin_inset Flex Code
24305 \begin_layout Plain Layout
24312 \begin_inset Quotes erd
24316 External programs write into
24317 \begin_inset Flex Code
24320 \begin_layout Plain Layout
24326 and read back data from
24327 \begin_inset Flex Code
24330 \begin_layout Plain Layout
24337 The stem of the pipe names can be defined in the
24338 \begin_inset Flex Noun
24341 \begin_layout Plain Layout
24342 Tools\SpecialChar menuseparator
24348 dialog, for example
24349 \begin_inset Flex Code
24352 \begin_layout Plain Layout
24353 "/home/myhome/lyxpipe"
24359 \begin_inset Flex Code
24362 \begin_layout Plain Layout
24376 on Windows (where any working path instead of lyxpipe can be used, for
24378 \begin_inset Flex Code
24381 \begin_layout Plain Layout
24404 configure this manually in order for the server to start.
24407 \begin_layout Standard
24410 \begin_inset Flex Code
24413 \begin_layout Plain Layout
24420 \begin_inset Flex Code
24423 \begin_layout Plain Layout
24429 ' to create the pipes.
24430 If one of the pipes already exists, \SpecialChar LyX
24431 will assume that another \SpecialChar LyX
24433 is already running and will not start the server.
24434 On POSIX (Unix like) systems, if for some other reason, an unused
24435 \begin_inset Quotes eld
24439 \begin_inset Quotes erd
24442 pipe is left in existence when \SpecialChar LyX
24443 closes, then \SpecialChar LyX
24444 will try to delete it.
24445 If this fails for some reason, you will need to delete the pipes manually
24446 and then restart \SpecialChar LyX
24448 On Windows, pipes are deleted by the OS on program termination or crash,
24450 \begin_inset Quotes eld
24454 \begin_inset Quotes erd
24457 pipes should not be possible.
24460 \begin_layout Standard
24461 To have several \SpecialChar LyX
24462 processes with servers at the same time, you have to use
24463 different configurations, perhaps by using separate user directories, each
24465 \begin_inset Flex Code
24468 \begin_layout Plain Layout
24474 file, for each process.
24477 \begin_layout Standard
24478 If you are developing a client program, you might find it useful to enable
24479 debugging information from the \SpecialChar LyX
24481 Do this by starting \SpecialChar LyX
24483 \begin_inset Flex Code
24486 \begin_layout Plain Layout
24495 \begin_layout Standard
24496 You can find a complete example client written in C++ in the source distribution
24498 \begin_inset Flex Code
24501 \begin_layout Plain Layout
24502 development/lyxserver/server_monitor.cpp
24510 \begin_layout Standard
24511 Another useful tool is the command-line based client found in
24512 \begin_inset Flex Code
24515 \begin_layout Plain Layout
24516 src/client/lyxclient
24524 \begin_layout Section
24525 Normal communication
24528 \begin_layout Standard
24529 To issue a \SpecialChar LyX
24530 call, the client writes a line of ASCII text into the input
24532 This line has the following format:
24535 \begin_layout Quote
24549 \begin_layout Description
24550 clientname is a name that the client can choose arbitrarily.
24551 Its only use is that \SpecialChar LyX
24552 will echo it if it sends an answer—so a client can
24553 dispatch results from different requesters.
24556 \begin_layout Description
24557 function is the function you want \SpecialChar LyX
24559 It is the same as the commands you'd use in the minibuffer.
24562 \begin_layout Description
24563 argument is an optional argument which is meaningful only to some functions
24565 \begin_inset Quotes eld
24569 \begin_inset Quotes erd
24572 LFUN will insert the argument as text at the cursor position).
24575 \begin_layout Standard
24576 The answer from \SpecialChar LyX
24577 will arrive in the output pipe and be of the form
24580 \begin_layout Quote
24594 \begin_layout Standard
24603 are just echoed from the command request, while
24607 is more or less useful information filled according to how the command
24608 execution worked out.
24609 Some commands, such as
24610 \begin_inset Quotes eld
24614 \begin_inset Quotes erd
24617 , will return information about the internal state of \SpecialChar LyX
24619 return an empty data-response.
24620 This means that the command execution went fine.
24623 \begin_layout Standard
24624 In case of errors, the response from \SpecialChar LyX
24625 will have this form
24628 \begin_layout Quote
24642 \begin_layout Standard
24647 should contain an explanation of why the command failed.
24650 \begin_layout Standard
24654 \begin_layout LyX-Code
24655 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
24656 \begin_inset Newline newline
24659 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
24660 \begin_inset Newline newline
24663 read a <~/.lyxpipe.out
24664 \begin_inset Newline newline
24670 \begin_layout Subsection
24671 AppleScript (Mac OS X)
24674 \begin_layout Standard
24675 Since \SpecialChar LyX
24676 2.1, \SpecialChar LyX
24677 supports basic interactions with AppleScript for normal communicatio
24678 n through the command run.
24679 This command takes a direct argument (the
24683 to perform) and an optional argument.
24684 It either returns the output of the function or triggers an error with
24685 the error message and code.
24688 \begin_layout Standard
24692 \begin_layout LyX-Code
24693 tell application "\SpecialChar LyX
24697 \begin_layout LyX-Code
24701 \begin_layout LyX-Code
24702 -- Stores the current file name into f
24705 \begin_layout LyX-Code
24706 set f to (run "server-get-filename" with argument "")
24709 \begin_layout LyX-Code
24710 on error the error_message number the error_number
24713 \begin_layout LyX-Code
24714 display dialog "Error: " & the error_number & ".
24718 \begin_layout LyX-Code
24719 & the error_message buttons {"OK"} default button 1
24722 \begin_layout LyX-Code
24726 \begin_layout LyX-Code
24730 \begin_layout Section
24734 \begin_layout Standard
24736 can notify clients of events going on asynchronously.
24737 Currently it will only do this if the user binds a key sequence with the
24739 \begin_inset Quotes eld
24743 \begin_inset Quotes erd
24747 The format of the string \SpecialChar LyX
24748 sends is as follows:
24751 \begin_layout Quote
24752 \begin_inset Flex Code
24755 \begin_layout Plain Layout
24766 \begin_layout Standard
24771 is the printed representation of the key sequence that was actually typed
24775 \begin_layout Standard
24776 This mechanism can be used to extend \SpecialChar LyX
24777 's command set and implement macros.
24778 Bind some key sequence to
24779 \begin_inset Quotes eld
24783 \begin_inset Quotes erd
24787 Then start a client that listens on the output pipe, dispatches the command
24788 according to the sequence, and starts a function that may use \SpecialChar LyX
24791 requests to issue a command or a series of commands to \SpecialChar LyX
24795 \begin_layout Section
24796 The simple \SpecialChar LyX
24800 \begin_layout Standard
24802 implements a simple protocol that can be used for session management.
24803 All messages are of the form
24806 \begin_layout Quote
24816 \begin_layout Standard
24822 \begin_inset Quotes eld
24826 \begin_inset Quotes erd
24830 \begin_inset Quotes eld
24834 \begin_inset Quotes erd
24839 \begin_inset Quotes eld
24843 \begin_inset Quotes erd
24846 is received from a client, \SpecialChar LyX
24847 will report back to inform the client that
24848 it's listening to it's messages, while
24849 \begin_inset Quotes eld
24853 \begin_inset Quotes erd
24856 sent from \SpecialChar LyX
24857 will inform clients that \SpecialChar LyX
24861 \begin_layout Section
24862 Reverse DVI/PDF search
24865 \begin_layout Standard
24866 Some DVI/PDF viewers
24870 \begin_layout Plain Layout
24871 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
24872 Qpdfview on Unix, Skim on Mac OSX and SumatraPDF on Windows.
24881 facility (also called
24886 This means that you can tell \SpecialChar LyX
24887 to put the cursor to a specific line in the
24888 document by clicking at the respective position in the DVI/PDF output.
24889 To achieve this, the viewer must be able to communicate with \SpecialChar LyX
24891 This is done via the \SpecialChar LyX
24892 server either by using the named pipe (
24896 ), or the UNIX domain socket (
24900 ) that \SpecialChar LyX
24901 creates in its temporary directory (this is the way the
24902 \begin_inset Flex Code
24905 \begin_layout Plain Layout
24911 program communicates with \SpecialChar LyX
24913 In some cases, you need a helper script that mediates between the viewer
24914 and \SpecialChar LyX
24915 , in others, the viewer can communicate with \SpecialChar LyX
24917 This depends on the selected viewer and on your operating system.
24918 The same applies to the way viewers need to be configured and the way the
24919 reverse search is actually performed.
24920 In what follows, we will thus describe how to setup reverse search for
24922 Before we turn to this, though, we will explain what needs to be done generally
24923 to enable reverse search in the DVI/PDF output.
24926 \begin_layout Subsection
24928 \begin_inset CommandInset label
24930 name "subsec:rev-search"
24937 \begin_layout Standard
24938 In most cases \SpecialChar LyX
24939 will do the work for you by enabling the option
24940 \begin_inset Flex Noun
24943 \begin_layout Plain Layout
24944 Synchronize with Output
24950 \begin_inset Flex Noun
24953 \begin_layout Plain Layout
24954 Document\SpecialChar menuseparator
24955 Settings\SpecialChar menuseparator
24962 In such a case \SpecialChar LyX
24963 will automatically insert the necessary Sync\SpecialChar TeX
24965 PDF) or load the srcltx package (for DVI) respectively.
24966 This option can be easily reached also on
24967 \begin_inset Flex Code
24970 \begin_layout Plain Layout
24979 \begin_layout Standard
24980 If you need a different setting, you can select or input a custom macro
24981 from the drop down box just below
24982 \begin_inset Flex Noun
24985 \begin_layout Plain Layout
24986 Document\SpecialChar menuseparator
24987 Settings\SpecialChar menuseparator
24988 Output\SpecialChar menuseparator
24989 Synchronize with Output
24997 \begin_layout Standard
24998 Note that the method
24999 \begin_inset Flex Code
25002 \begin_layout Plain Layout
25010 enables gzip compression.
25011 If your viewer does not support it, you should instead use
25012 \begin_inset Flex Code
25015 \begin_layout Plain Layout
25026 \begin_layout Standard
25027 Please also note that including the
25028 \begin_inset Flex Code
25031 \begin_layout Plain Layout
25038 \begin_inset Flex Code
25041 \begin_layout Plain Layout
25047 sometimes has an undesired impact on the typesetting.
25048 Thus, you should switch output synchronization off for the final typesetting
25050 \begin_inset Flex Code
25053 \begin_layout Plain Layout
25060 \begin_inset Flex Code
25063 \begin_layout Plain Layout
25073 \begin_layout Standard
25074 In case you need some more special settings that are not covered by the
25075 automatic settings, read the next section about how to set up output synchroniz
25077 If the automatic setup suits your needs, you can readily jump to section
25078 \begin_inset space ~
25082 \begin_inset CommandInset ref
25084 reference "subsec:configuring-viewers"
25088 , where the necessary configuration steps in your viewer – needed both with
25089 the automatic and the manual setup – are described.
25092 \begin_layout Subsection
25096 \begin_layout Standard
25098 provides several different methods for reverse search.
25099 Some are built-in in the
25100 \begin_inset Flex Code
25103 \begin_layout Plain Layout
25109 program, some are provided by external packages.
25110 Your choice depends on whether your \SpecialChar LaTeX
25111 distribution already provides a given
25112 method (the built-in methods are rather new) and whether your viewer can
25114 The available methods are described in the following.
25117 \begin_layout Subsubsection*
25118 Built-in DVI-search via src-specials (DVI only)
25121 \begin_layout Standard
25122 This method provides the DVI file with the necessary information for reverse
25124 It is available in \SpecialChar LaTeX
25125 since quite some time (any somewhat recent \SpecialChar LaTeX
25127 should include it), and it works reliably.
25128 To enable it, change the
25129 \begin_inset Flex Noun
25132 \begin_layout Plain Layout
25143 \begin_inset Flex Noun
25146 \begin_layout Plain Layout
25157 \begin_inset Flex Noun
25160 \begin_layout Plain Layout
25161 Preferences\SpecialChar menuseparator
25162 File Handling\SpecialChar menuseparator
25169 \begin_inset Flex Code
25172 \begin_layout Plain Layout
25173 latex -src-specials $$i
25179 If this doesn't work, check if your \SpecialChar TeX
25180 engine needs different options (the
25181 syntax might differ in some distributions).
25184 \begin_layout Subsubsection*
25185 External Packages (PDFSync and scrltx)
25188 \begin_layout Standard
25197 provide reverse search facility for PDF output (via pdflatex) and DVI output,
25199 In order to enable it, load the packages in the \SpecialChar LyX
25203 \begin_layout Itemize
25204 \begin_inset Flex Code
25207 \begin_layout Plain Layout
25210 usepackage{pdfsync}
25215 for reverse PDF search,
25218 \begin_layout Itemize
25219 \begin_inset Flex Code
25222 \begin_layout Plain Layout
25225 usepackage[active]{srcltx}
25230 for reverse DVI search.
25233 \begin_layout Standard
25234 If you want to be able to perform both DVI and PDF reverse searches, you
25235 can also insert in the preamble the following lines
25238 \begin_layout LyX-Code
25242 \begin_inset Newline newline
25248 \begin_inset Newline newline
25253 usepackage{pdfsync}
25254 \begin_inset Newline newline
25260 \begin_inset Newline newline
25265 usepackage[active]{srcltx}
25266 \begin_inset Newline newline
25274 \begin_layout Standard
25275 This way, you can preview the file as either DVI or PDF (pdflatex) and the
25276 right package will be used.
25279 \begin_layout Standard
25280 Note that PDFSync might affect the output layout of your document.
25281 It is therefore advised to disable PDFsync for final documents.
25284 \begin_layout Subsubsection*
25285 Built-in reverse search via Sync\SpecialChar TeX
25289 \begin_layout Standard
25291 \begin_inset Flex Code
25294 \begin_layout Plain Layout
25300 have built-in support for both PDF and DVI reverse search.
25303 Sync\SpecialChar TeX
25306 facility is basically the result of the integration of the PDFSync package
25307 to the pdftex program and its merge with the
25312 You need at least \SpecialChar TeX
25313 Live 2008 or a recent Mik\SpecialChar TeX
25314 distribution in order to use
25319 \begin_layout Plain Layout
25320 For some reason, Mik\SpecialChar TeX
25321 does not understand/obey the command \SpecialChar LyX
25323 the preamble when you check the "Enable Forward/Reverse Search" button
25324 in the toolbar and does not generate the necessary info.
25327 \begin_layout Plain Layout
25328 The generation of the required info can be forced by changing the converter
25329 "\SpecialChar LaTeX
25330 (pdflatex) -> PDF (pdflatex)" in Preferences->File handling->Converters
25331 from the default "pdflatex $$i" to "pdflatex -synctex=1 $$i" (i.e., by adding
25332 the -synctex=1 switch).
25337 Also note that only a few PDF viewers (Okular and Qpdfview on Unix, Skim
25338 on the Mac, SumatraPDF on Windows) already provide Sync\SpecialChar TeX
25342 \begin_layout Standard
25343 To enable Sync\SpecialChar TeX
25344 for DVI output, change the
25345 \begin_inset Flex Noun
25348 \begin_layout Plain Layout
25359 \begin_inset Flex Noun
25362 \begin_layout Plain Layout
25367 (plain) -> DraftDVI
25373 \begin_inset Flex Noun
25376 \begin_layout Plain Layout
25377 Preferences\SpecialChar menuseparator
25378 File Handling\SpecialChar menuseparator
25385 \begin_inset Flex Code
25388 \begin_layout Plain Layout
25389 latex -synctex=1 $$i
25394 , and for PDF output, change the
25395 \begin_inset Flex Noun
25398 \begin_layout Plain Layout
25403 (pdflatex) -> PDF (pdflatex)
25409 \begin_inset Flex Code
25412 \begin_layout Plain Layout
25413 pdflatex -synctex=1 $$i
25419 Check the documentation of your viewer whether the viewer needs to be configure
25420 d for the use with Sync\SpecialChar TeX
25425 \begin_layout Plain Layout
25426 Note that the option
25427 \begin_inset Flex Code
25430 \begin_layout Plain Layout
25436 option enables gzip compression.
25437 If your viewer does not support it, you should instead use
25438 \begin_inset Flex Code
25441 \begin_layout Plain Layout
25455 \begin_layout Subsection
25456 Configuring and using specific viewers
25457 \begin_inset CommandInset label
25459 name "subsec:configuring-viewers"
25466 \begin_layout Subsubsection*
25467 Xdvi (all platforms)
25470 \begin_layout Standard
25472 \begin_inset Flex Code
25475 \begin_layout Plain Layout
25481 , you don't need to do anything else for performing a reverse DVI search,
25482 as \SpecialChar LyX
25483 already provides the necessary hooks for automatically using the
25484 \begin_inset Flex Code
25487 \begin_layout Plain Layout
25494 Just setup your document as described above (reverse search is triggered
25495 by Ctrl-click or Alt-click on Mac OSX, respectively).
25498 \begin_layout Standard
25499 However, if for whatever reason you want to use the named pipe instead of
25500 the socket for communicating with \SpecialChar LyX
25501 , simply change the DVI viewer in
25502 \begin_inset Flex Noun
25505 \begin_layout Plain Layout
25506 Preferences\SpecialChar menuseparator
25507 File Handling\SpecialChar menuseparator
25517 \begin_layout Plain Layout
25518 On Mac OSX you have to use
25519 \begin_inset Flex Code
25522 \begin_layout Plain Layout
25523 DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l"
25534 \begin_inset Flex Code
25537 \begin_layout Plain Layout
25538 xdvi -editor "lyxeditor.sh %f %l"
25544 \begin_inset Flex Code
25547 \begin_layout Plain Layout
25553 is a suitable script.
25554 For example, a minimal shell script is the following one:
25557 \begin_layout LyX-Code
25559 \begin_inset Newline newline
25562 LYXPIPE="/path/to/lyxpipe"
25563 \begin_inset Newline newline
25566 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
25567 \begin_inset Newline newline
25570 echo "$COMMAND" > "${LYXPIPE}".in || exit
25571 \begin_inset Newline newline
25574 read TMP < "${LYXPIPE}".out || exit
25577 \begin_layout Standard
25579 \begin_inset Flex Code
25582 \begin_layout Plain Layout
25588 is the LyXServer pipe path specified in
25589 \begin_inset Flex Noun
25592 \begin_layout Plain Layout
25593 Preferences\SpecialChar menuseparator
25603 \begin_layout Plain Layout
25605 \begin_inset Flex Code
25608 \begin_layout Plain Layout
25614 folder of a source distribution you can find a
25615 \begin_inset Flex Code
25618 \begin_layout Plain Layout
25624 script which is able to locate the
25628 based on your preferences.
25636 \begin_layout Subsubsection*
25640 \begin_layout Standard
25642 \begin_inset Flex Code
25645 \begin_layout Plain Layout
25646 /Applications/MacDviX_Folder/calleditor.script
25651 , add the following lines:
25654 \begin_layout LyX-Code
25655 /Applications/LyX.app/Contents/MacOS/lyxeditor "$2" $1
25656 \begin_inset Newline newline
25662 \begin_layout Standard
25663 Modify the lines accordingly if you install \SpecialChar LyX
25664 somewhere else than in the
25665 Applications folder.
25668 \begin_layout Standard
25669 Reverse search is triggered by Alt-click (OPTION-click).
25672 \begin_layout Subsubsection*
25676 \begin_layout Standard
25678 \begin_inset Flex Code
25681 \begin_layout Plain Layout
25682 open -a Skim.app $$i
25687 to the viewer setting in
25688 \begin_inset Flex Noun
25691 \begin_layout Plain Layout
25692 Preferences\SpecialChar menuseparator
25693 File Handling\SpecialChar menuseparator
25694 File formats\SpecialChar menuseparator
25701 \begin_inset Flex Noun
25704 \begin_layout Plain Layout
25705 Skim\SpecialChar menuseparator
25706 Preferences\SpecialChar menuseparator
25713 \begin_inset Flex Noun
25716 \begin_layout Plain Layout
25722 preset and enter command
25723 \begin_inset Flex Noun
25726 \begin_layout Plain Layout
25727 /Applications/\SpecialChar LyX
25728 .app/Contents/MacOS/lyxeditor
25736 \begin_layout Standard
25737 Reverse search is triggered by COMMAND-SHIFT-click
25740 \begin_layout Subsubsection*
25744 \begin_layout Standard
25746 \begin_inset Flex Noun
25749 \begin_layout Plain Layout
25750 Settings\SpecialChar menuseparator
25751 Configure Okular\SpecialChar menuseparator
25758 \begin_inset Quotes eld
25762 \begin_inset Quotes erd
25765 and add the command
25766 \begin_inset Flex Code
25769 \begin_layout Plain Layout
25778 \begin_layout Standard
25779 Reverse search is triggered by SHIFT-click.
25782 \begin_layout Subsubsection*
25786 \begin_layout Standard
25787 Qpdfview supports Sync\SpecialChar TeX
25788 since version 0.3.5.
25790 \begin_inset Flex Noun
25793 \begin_layout Plain Layout
25794 Edit\SpecialChar menuseparator
25795 Settings\SpecialChar menuseparator
25801 , click on the input field of the
25802 \begin_inset Quotes eld
25806 \begin_inset Quotes erd
25809 item and add the command
25810 \begin_inset Flex Code
25813 \begin_layout Plain Layout
25822 \begin_layout Standard
25823 Reverse search is triggered by double-click
25824 \change_inserted -851615295 1468920502
25825 or, in more recent versions, by context menu
25830 \begin_layout Subsubsection*
25834 \begin_layout Standard
25835 Launch yap, choose its
25836 \begin_inset Flex Noun
25839 \begin_layout Plain Layout
25840 View\SpecialChar menuseparator
25846 menu and select the
25847 \begin_inset Quotes eld
25851 \begin_inset Quotes erd
25856 \begin_inset Quotes eld
25859 New\SpecialChar ldots
25861 \begin_inset Quotes erd
25864 button and, in the window that opens, enter
25865 \begin_inset Quotes eld
25870 \begin_inset Quotes erd
25873 (or any other name you like) in the
25874 \begin_inset Quotes eld
25878 \begin_inset Quotes erd
25882 Now click on the button labeled
25883 \begin_inset Quotes eld
25888 \begin_inset Quotes erd
25891 to open a file dialog and navigate to the directory containing the batch
25893 \begin_inset Flex Code
25896 \begin_layout Plain Layout
25904 \begin_inset Flex Code
25907 \begin_layout Plain Layout
25913 and then specify the program arguments as
25914 \begin_inset Flex Code
25917 \begin_layout Plain Layout
25925 \begin_inset Flex Code
25928 \begin_layout Plain Layout
25934 wrapper is used for communicating with \SpecialChar LyX
25942 \begin_layout LyX-Code
25944 \begin_inset Newline newline
25947 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
25956 \begin_inset Newline newline
25970 \begin_layout Standard
25971 Make sure that the \SpecialChar LyX
25972 Server pipe path you specified in \SpecialChar LyX
25974 \begin_inset Flex Code
25977 \begin_layout Plain Layout
25991 , otherwise change the
25992 \begin_inset Flex Code
25995 \begin_layout Plain Layout
26001 wrapper accordingly.
26004 \begin_layout Standard
26005 In yap, reverse search is triggered by double-click.
26008 \begin_layout Subsubsection*
26009 SumatraPDF (Windows)
26012 \begin_layout Standard
26013 In order to use SumatraPDF for inverse search, enter
26014 \begin_inset Flex Code
26017 \begin_layout Plain Layout
26018 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
26023 in the viewer setting in
26024 \begin_inset Flex Noun
26027 \begin_layout Plain Layout
26028 Preferences\SpecialChar menuseparator
26029 File Handling\SpecialChar menuseparator
26030 File formats\SpecialChar menuseparator
26037 \begin_inset Flex Code
26040 \begin_layout Plain Layout
26046 is the previous wrapper.
26047 If SumatraPDF.exe is not in your command PATH, use its full file name.
26050 \begin_layout Standard
26051 Reverse search is triggered by double-click.
26054 \begin_layout Subsubsection*
26058 \begin_layout Standard
26059 First of all, make sure that yap is your default DVI viewer in the Windows
26060 environment, then launch it, choose its
26061 \begin_inset Flex Noun
26064 \begin_layout Plain Layout
26065 View\SpecialChar menuseparator
26071 menu and select the
26072 \begin_inset Quotes eld
26076 \begin_inset Quotes erd
26081 \begin_inset Quotes eld
26084 New\SpecialChar ldots
26086 \begin_inset Quotes erd
26089 button and, in the window that opens, enter
26090 \begin_inset Quotes eld
26095 \begin_inset Quotes erd
26098 (or any other name you like) in the
26099 \begin_inset Quotes eld
26103 \begin_inset Quotes erd
26107 Now click on the button labeled
26108 \begin_inset Quotes eld
26113 \begin_inset Quotes erd
26116 to open a file dialog and navigate to the directory containing the
26117 \begin_inset Flex Code
26120 \begin_layout Plain Layout
26126 program (which is installed by default on Cygwin along with the \SpecialChar LyX
26129 \begin_inset Flex Code
26132 \begin_layout Plain Layout
26138 and then specify the program arguments as
26139 \begin_inset Flex Code
26142 \begin_layout Plain Layout
26149 In this way, you will be using the
26153 for communicating with \SpecialChar LyX
26155 If, for whatever reason, you want to use the
26160 \begin_inset Flex Code
26163 \begin_layout Plain Layout
26169 option and be sure to specify the \SpecialChar LyX
26170 Server pipe path in the \SpecialChar LyX
26174 \begin_layout Standard
26175 In yap, reverse search is triggered by double-click.
26178 \begin_layout Subsubsection*
26179 SumatraPDF (Cygwin)
26182 \begin_layout Standard
26183 In order to use SumatraPDF for inverse search, enter
26184 \begin_inset Flex Code
26187 \begin_layout Plain Layout
26188 SumatraPDF -inverse-search "lyxeditor -g %f %l"
26193 in the viewer setting in
26194 \begin_inset Flex Noun
26197 \begin_layout Plain Layout
26198 Preferences\SpecialChar menuseparator
26199 File Handling\SpecialChar menuseparator
26200 File formats\SpecialChar menuseparator
26207 If SumatraPDF.exe is not in your command PATH, use its full posix path.
26209 \begin_inset Flex Code
26212 \begin_layout Plain Layout
26218 enables communication via the
26224 \begin_inset Flex Code
26227 \begin_layout Plain Layout
26233 option if you want to use the
26237 , and be sure to specify the \SpecialChar LyX
26238 Server pipe path in the \SpecialChar LyX
26242 \begin_layout Standard
26243 Reverse search is triggered by double-click.
26246 \begin_layout Section
26250 \begin_layout Standard
26251 Forward search is, as the name implies, in a sense the
26252 \begin_inset Quotes eld
26256 \begin_inset Quotes erd
26260 It allows you to let the viewer jump to a given position from within \SpecialChar LyX
26262 If forward search is set up (as described in what follows), you can put
26263 the cursor anywhere in your \SpecialChar LyX
26265 \begin_inset Flex Noun
26268 \begin_layout Plain Layout
26269 Navigate\SpecialChar menuseparator
26276 \begin_inset Flex Noun
26279 \begin_layout Plain Layout
26285 in the context menu via right mouse click), and then the viewer will jump
26286 to that position as well.
26287 This implies, of course, that your viewer supports this function.
26290 \begin_layout Standard
26291 To make forward search possible, you first need to provide the generated
26292 output PDF/DVI file with additional information about the \SpecialChar TeX
26294 This can be done via the methods described in the section
26295 \begin_inset CommandInset ref
26297 reference "subsec:rev-search"
26304 \begin_layout Standard
26305 Additionally, you need to configure \SpecialChar LyX
26306 for using your viewers in
26307 \begin_inset Flex Noun
26310 \begin_layout Plain Layout
26311 Tools\SpecialChar menuseparator
26312 Preferences\SpecialChar menuseparator
26313 Output\SpecialChar menuseparator
26320 We provide a range of tested configurations for some viewers, which you
26321 can select from the drop down list.
26322 If none of these configurations suits you, you have to find out and enter
26323 a suitable configuration yourself.
26324 The definition syntax uses the following placeholders:
26327 \begin_layout Itemize
26329 \begin_inset Flex Code
26332 \begin_layout Plain Layout
26341 \begin_layout Itemize
26343 \begin_inset Flex Code
26346 \begin_layout Plain Layout
26352 : name of the (temporary) exported .tex file (without path)
26355 \begin_layout Itemize
26357 \begin_inset Flex Code
26360 \begin_layout Plain Layout
26366 : name of the (temporary) exported .tex file (including path)
26369 \begin_layout Itemize
26371 \begin_inset Flex Code
26374 \begin_layout Plain Layout
26380 : name of the exported output file (either dvi or pdf, depending on which
26381 one exists in the temporary directory)
26384 \begin_layout Standard
26385 Note that only some of the viewers provide full forward search functionality,
26386 among them yap, xdvi, okular
26390 \begin_layout Plain Layout
26391 You might want to set
26392 \begin_inset Flex Code
26395 \begin_layout Plain Layout
26402 \begin_inset Flex Noun
26405 \begin_layout Plain Layout
26406 Tools\SpecialChar menuseparator
26407 Preferences\SpecialChar menuseparator
26408 File Handling\SpecialChar menuseparator
26410 \begin_inset space ~
26423 , qpdfview and SumatraPDF
26427 \begin_layout Plain Layout
26428 SumatraPDF can also use DDE commands through the external program CMCDDE
26429 — downloadable from
26430 \begin_inset CommandInset href
26432 target "http://www.istri.fr/spip/zip/CMCDDE.zip"
26442 While many of the widespread PDF viewers (most notably Adobe Reader) do
26443 not support forward search at all, some other viewers – e.
26444 \begin_inset space \thinspace{}
26448 evince and xpdf – allow at least to reload the document and jump to a specific
26449 page of the file, so you can at least navigate
26450 \begin_inset Quotes eld
26454 \begin_inset Quotes erd
26458 This latter functionality is provided by an external call of synctex (see
26459 the predefined example configurations).
26463 \begin_layout Standard
26464 Forward search works both with DVI and PDF output.
26466 simply checks which preview format you have used before (i.
26467 \begin_inset space \thinspace{}
26470 e., which format is already there in the temporary directory) and chooses
26471 the appropriate configuration for the respective format.