1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 % This preamble is designed to ensure that the manual prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the manual may not print out as expected. If you
12 % have problems LaTeXing this file, please contact
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
20 % set fonts for nicer pdf view
21 \IfFileExists{lmodern.sty}
22 {\usepackage{lmodern}}{}
24 \fi % end if pdflatex is used
26 % the pages of the TOC are numbered roman
27 % and a PDF-bookmark for the TOC is added
29 \let\myTOC\tableofcontents
30 \renewcommand{\tableofcontents}{%
31 \pdfbookmark[1]{\contentsname}{}
34 \pagenumbering{arabic}}
36 % redefine the \LyX macro for PDF bookmarks
37 \def\LyX{\texorpdfstring{%
38 L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
41 % used for multi-column text
44 % extra space for tables
45 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
47 \options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage,tablecaptionabove
48 \use_default_options false
54 \maintain_unincluded_children false
57 InsetLayout CharStyle:MenuItem
66 \newcommand*{\menuitem}[1]{{\sffamily #1}}
71 \language_package default
76 \font_typewriter default
77 \font_default_family default
78 \use_non_tex_fonts false
84 \default_output_format default
86 \bibtex_command default
87 \index_command default
91 \pdf_title "LyX's Additional Features manual"
92 \pdf_author "LyX Team"
93 \pdf_subject "LyX's additional features documentation"
94 \pdf_keywords "LyX, Documentation, Additional"
96 \pdf_bookmarksnumbered true
97 \pdf_bookmarksopen false
98 \pdf_bookmarksopenlevel 1
103 \pdf_pdfusetitle false
104 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false, pdfpagelabels"
114 \paperorientation portrait
123 \paragraph_separation indent
124 \paragraph_indentation default
125 \quotes_language english
128 \paperpagestyle headings
129 \tracking_changes true
130 \output_changes false
134 \author 1414654397 "Richard Heck"
140 Additional LyX Features
148 \begin_layout Plain Layout
150 Principal maintainer of this file is
155 If you have comments or error corrections, please send them to the LyX
156 Documentation mailing list,
157 \begin_inset Flex Code
160 \begin_layout Plain Layout
162 <lyx-docs@lists.lyx.org>
175 \begin_layout Standard
176 \begin_inset CommandInset toc
177 LatexCommand tableofcontents
184 \begin_layout Chapter
188 \begin_layout Standard
189 This manual is essentially Part II of the
191 User's Guide\SpecialChar \@.
194 The reason for separating this document out is simple: the
198 is already quite lengthy, and it contains information on all of the basic
199 features one needs to know in order to prepare most documents.
200 However, the LyX Team has worked to make LyX extensible through various
201 configuration files and external packages.
202 That means that if you want to support the Fizzwizzle LaTeX package, you
203 can create a layout file (or module) for it without having to alter LyX
205 We've already had contributions of several new features this way, and some
206 of them are documented here.
207 There are also some more `advanced' features, such as how to control the
208 presentation of bibliographies and how to work with multi-part documents,
209 that are not covered in the
213 and are discussed here.
216 \begin_layout Standard
217 This manual also documents some special features, like fax support, version
218 control, and SGML support, which require additional software to work properly.
219 There is also a chapter on LyX's support for HTML.
220 And lastly, there's a chapter of LaTeX tools and tips, things you can use
221 to spruce up your documents by directly using the powerful features of
227 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
230 \begin_layout Standard
231 If you haven't read the
235 yet, you are definitely in the wrong manual.
240 is the first place to go, since it describes the notation and format of
242 You should also be thoroughly familiar with the
246 and all of the basic features of LyX before attempting to read this one.
249 \begin_layout Standard
250 Since many of the topics in this manual depend heavily on LyX's interaction
251 with LaTeX, this first chapter covers the inner workings of LyX and how
252 to direct LyX to generate exactly the LaTeX code you want.
253 It is obviously for more seasoned LyX users.
256 \begin_layout Chapter
260 \begin_layout Section
264 \begin_layout Standard
265 This chapter is for both TeX-nicians and the LaTeX-curious.
266 In it, we'll explain how LyX and LaTeX work together to produce printable
268 This is the only place in any of the manuals where we assume you know something
272 \begin_layout Standard
273 At one time, LyX was called a
274 \begin_inset Quotes eld
277 WYSIWYM frontend to LaTeX,
278 \begin_inset Quotes erd
281 but that's no longer true.
282 There are frontends to LaTeX out there.
286 \begin_layout Plain Layout
287 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
288 There are also the LaTeX modes for vi and emacs, of course.
293 These are basically text editors with the ability to run LaTeX and mark
294 any errors in the file you're editing.
303 run LaTeX, and it also indicates errors in the file, it also does much,
305 For one thing, you don't need to know LaTeX to use LyX effectively.
306 And LyX has added its own extensions to LaTeX.
307 Try the following sometime: select
308 \begin_inset Flex MenuItem
311 \begin_layout Plain Layout
312 Export\SpecialChar \menuseparator
319 \begin_inset Flex MenuItem
322 \begin_layout Plain Layout
329 \begin_inset Flex MenuItem
332 \begin_layout Plain Layout
333 View\SpecialChar \menuseparator
339 ), then look at the preamble of the resulting
340 \begin_inset Flex Code
343 \begin_layout Plain Layout
350 You'll notice a variety of new macros defined specifically by LyX.
351 These macros are defined automatically, according to the features you use
355 \begin_layout Standard
356 There are several commands that automatically invoke LaTeX.
360 \begin_layout Itemize
361 \begin_inset Flex MenuItem
364 \begin_layout Plain Layout
365 View\SpecialChar \menuseparator
374 \begin_layout Itemize
375 \begin_inset Flex MenuItem
378 \begin_layout Plain Layout
379 View\SpecialChar \menuseparator
380 Update\SpecialChar \menuseparator
389 \begin_layout Itemize
390 \begin_inset Flex MenuItem
393 \begin_layout Plain Layout
394 File\SpecialChar \menuseparator
403 \begin_layout Itemize
404 \begin_inset Flex MenuItem
407 \begin_layout Plain Layout
408 File\SpecialChar \menuseparator
417 \begin_layout Standard
418 They will only invoke LaTeX if the file has changed since the last time
423 \begin_layout Standard
424 When LyX runs LaTeX on the file you're editing, it performs these steps:
427 \begin_layout Enumerate
428 Convert the document to LaTeX and save to a file with the extension
429 \begin_inset Flex Code
432 \begin_layout Plain Layout
439 \begin_inset Flex Code
442 \begin_layout Plain Layout
451 \begin_layout Enumerate
453 \begin_inset Flex Code
456 \begin_layout Plain Layout
462 file (maybe several times), and run any other commands (such as
463 \begin_inset Flex Code
466 \begin_layout Plain Layout
473 \begin_inset Flex Code
476 \begin_layout Plain Layout
482 ) needed to compile the LaTeX file.
485 \begin_layout Enumerate
486 If there are any errors, show the error log.
489 \begin_layout Standard
490 If you've run LaTeX using
491 \begin_inset Flex MenuItem
494 \begin_layout Plain Layout
497 \SpecialChar \menuseparator
505 , LyX then runs a DVI viewer to display the DVI-file.
507 \begin_inset Flex MenuItem
510 \begin_layout Plain Layout
513 \SpecialChar \menuseparator
521 , LyX performs further steps:
524 \begin_layout Itemize
526 \begin_inset Flex Code
529 \begin_layout Plain Layout
535 to convert the DVI file to PostScript.
538 \begin_layout Itemize
539 Run a PostScript viewer, such as
540 \begin_inset Flex Code
543 \begin_layout Plain Layout
549 , to display the PostScript file.
552 \begin_layout Standard
553 LyX does similar things when viewing, or exporting, other formats.
556 \begin_layout Section
557 Translating LaTeX files into LyX
560 \begin_layout Standard
561 You can import a LaTeX file into LyX by using the
562 \begin_inset Flex MenuItem
565 \begin_layout Plain Layout
566 File\SpecialChar \menuseparator
567 Import\SpecialChar \menuseparator
574 This will call a program named
575 \begin_inset Flex Code
578 \begin_layout Plain Layout
584 which will create a file
585 \begin_inset Flex Code
588 \begin_layout Plain Layout
595 \begin_inset Flex Code
598 \begin_layout Plain Layout
605 LyX will then open that file.
609 \begin_layout Plain Layout
610 \begin_inset Flex Code
613 \begin_layout Plain Layout
619 can also be run from the command line, of course.
627 \begin_layout Standard
628 \begin_inset Flex Code
631 \begin_layout Plain Layout
637 will translate most legal LaTeX, but not everything.
638 It will put things it doesn't understand into TeX code, so after translating
640 \begin_inset Flex Code
643 \begin_layout Plain Layout
649 , you can look for TeX code and hand-edit it until it looks right.
652 \begin_layout Standard
653 If you don't know what TeX code is, read the next section.
656 \begin_layout Section
657 \begin_inset CommandInset label
659 name "sec:Inserting-TeX-Code"
663 Inserting TeX Code into LyX Documents
666 \begin_layout Standard
667 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
668 You can always insert TeX code into any LyX document.
669 LyX cannot, and will never be able to, display every possible LaTeX construct.
670 If ever you need to insert LaTeX commands into your LyX document, you can
672 \begin_inset Flex Code
675 \begin_layout Plain Layout
681 box, which you can insert into your document with
682 \begin_inset Flex MenuItem
685 \begin_layout Plain Layout
686 Insert\SpecialChar \menuseparator
695 \begin_layout Standard
696 Here's an example of inserting LaTeX commands in a LyX document.
697 The code looks like this:
700 \begin_layout LyX-Code
704 \begin_inset Newline newline
710 \begin_inset Newline newline
713 This is an example for a minipage environment.
715 \begin_inset Newline newline
718 can put nearly everything in it, even (non-floating)
719 \begin_inset Newline newline
724 \begin_inset Newline newline
730 \begin_inset Newline newline
734 \begin_inset Newline newline
740 \begin_inset Newline newline
746 \begin_inset Newline newline
752 \begin_inset Newline newline
757 \begin_inset Newline newline
763 \begin_inset Newline newline
769 \begin_inset Newline newline
775 \begin_inset Newline newline
783 \begin_layout LyX-Code
787 \begin_layout Standard
789 \begin_inset Flex Code
792 \begin_layout Plain Layout
798 box containing this text is directly after this paragraph.
799 Those of you reading the manual in LyX will only see the TeX code inset.
800 Those reading a printed version of the manuals will see the actual results:
803 \begin_layout Standard
807 \begin_layout Plain Layout
814 \begin_layout Plain Layout
821 \begin_layout Plain Layout
823 This is an example for a minipage environment.
824 You can put nearly everything in it, even (non-floating) figures and tables.
828 \begin_layout Plain Layout
835 \begin_layout Plain Layout
840 \begin_layout Plain Layout
847 \begin_layout Plain Layout
854 \begin_layout Plain Layout
861 \begin_layout Plain Layout
867 \begin_layout Plain Layout
874 \begin_layout Plain Layout
881 \begin_layout Plain Layout
888 \begin_layout Plain Layout
900 \begin_layout Standard
901 In addition to using TeX code, you can also create a separate file containing
902 some complex LaTeX structure and then use
903 \begin_inset Flex MenuItem
906 \begin_layout Plain Layout
907 Insert\SpecialChar \menuseparator
917 to include your file (you should select the type
918 \begin_inset Flex Code
921 \begin_layout Plain Layout
928 We recommend that you only do this if you have a
929 \begin_inset Flex Code
932 \begin_layout Plain Layout
943 Otherwise, you'll have a big job tracking down LaTeX errors.
946 \begin_layout Standard
947 There are a few last points to emphasize:
950 \begin_layout Itemize
955 check if your LaTeX code is correct.
958 \begin_layout Itemize
959 Beware reinventing the wheel.
962 \begin_layout Standard
963 On that last point, LyX does have quite a few features tucked into it, and
965 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
966 feature before you decide you have to do it by hand.
967 Moreover, there are numerous LaTeX packages out there to do all sorts of
968 things, from labels to envelopes to fancy multipage tables.
970 \begin_inset CommandInset href
973 target "http://www.ctan.org/"
977 for details, and see chapter
978 \begin_inset CommandInset ref
980 reference "cha:secrets"
987 \begin_layout Standard
988 If you do need to do some wild and fancy things within your document, be
989 sure to check out a good LaTeX book for assistance.
990 There are a number of them listed in the bibliography of the
997 \begin_layout Section
998 LyX and the LaTeX Preamble
1001 \begin_layout Subsection
1002 About the LaTeX Preamble
1005 \begin_layout Standard
1006 If you already know LaTeX, there is no need to explain here what the preamble
1008 If you don't, the following will give you some ideas—we recommend again
1009 that you consult a LaTeX book for further information.
1010 In any case, you should read the points below, because they explain what
1011 you can do and what you don't need to do in the LaTeX preamble of a LyX
1015 \begin_layout Standard
1016 The LaTeX preamble comes at the very beginning of a document,
1024 \begin_layout Itemize
1025 Declare the document class.
1027 \begin_inset Newline newline
1030 LyX already does this for you.
1031 If you're a seasoned LaTeX-nician, and you have a custom document class
1032 you want to use, check out the
1034 Customization Manual
1036 for information on how to make LyX interface to it.
1039 \begin_layout Itemize
1040 Declare the usage of packages.
1042 \begin_inset Newline newline
1045 LaTeX packages provide special commands, which are only available within
1046 a document when the package has been declared in the preamble.
1047 For example, the package
1048 \begin_inset Flex Code
1051 \begin_layout Plain Layout
1057 forces all paragraphs to be indented.
1058 There are other packages for labels, envelopes, margins, etc.
1062 \begin_layout Itemize
1063 Set counters, variables, lengths and widths.
1065 \begin_inset Newline newline
1068 There are several LaTeX counters and variables which
1072 be set globally from within the preamble in order to have the desired effect.
1073 (There are variables which you can set and reset inside the document, too.)
1074 Margins are a good example of something which must be set in the preamble.
1075 Another example is the label format for lists.
1076 You can actually set these just about anywhere, but it's best to do it
1077 just once, inside the preamble.
1080 \begin_layout Itemize
1081 Declare user defined commands (with
1082 \begin_inset Flex Code
1085 \begin_layout Plain Layout
1094 \begin_inset Flex Code
1097 \begin_layout Plain Layout
1106 \begin_inset Newline newline
1109 These are abbreviations for LaTeX commands which appear very often inside
1111 Although the preamble is a good place to declare such commands, they
1115 be declared anywhere (before they are used for the first time, of course).
1116 This can be useful if there is a lot of raw LaTeX code in your document,
1117 which normally should not be the case.
1120 \begin_layout Standard
1121 LyX adds its own set of definitions to the preamble of the
1122 \begin_inset Flex Code
1125 \begin_layout Plain Layout
1132 This makes LaTeX files generated by LyX portable.
1135 \begin_layout Subsection
1136 Changing the Preamble
1139 \begin_layout Standard
1140 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1141 can't change them without patching LyX itself.
1142 You can, however, add your own stuff to the preamble by selecting
1143 \begin_inset Flex MenuItem
1146 \begin_layout Plain Layout
1148 \begin_inset space ~
1157 \begin_inset Flex MenuItem
1160 \begin_layout Plain Layout
1161 Document\SpecialChar \menuseparator
1168 LyX adds anything in the
1169 \begin_inset Flex MenuItem
1172 \begin_layout Plain Layout
1178 dialog to its own built-in preamble.
1179 Before adding your own declarations in the preamble, you should make sure
1180 that LyX doesn't already support what you want to do.
1181 (Remember what we said about reinventing the wheel?) Also,
1183 make sure your preamble code is correct
1186 LyX doesn't check it for you.
1187 If there is an error, you're likely to get an error like
1188 \begin_inset Quotes eld
1192 \begin_inset Flex Code
1195 \begin_layout Plain Layout
1204 \begin_inset Quotes erd
1208 If you see this error, check your preamble.
1211 \begin_layout Subsection
1215 \begin_layout Standard
1216 Here are some examples of what you can add to a preamble, and what they
1220 \begin_layout Subsubsection
1224 \begin_layout Standard
1225 There are two variables under LaTeX that control page position:
1226 \begin_inset Flex Code
1229 \begin_layout Plain Layout
1238 \begin_inset Flex Code
1241 \begin_layout Plain Layout
1250 Their names should be self-explanatory.
1251 These variables are useful if you think for a moment about computer labels.
1252 Sometimes, the size of a print medium and the area of the medium that you
1253 can actually print on aren't the same.
1255 \begin_inset Flex Code
1258 \begin_layout Plain Layout
1267 \begin_inset Flex Code
1270 \begin_layout Plain Layout
1281 \begin_layout Standard
1282 The default values for
1283 \begin_inset Flex Code
1286 \begin_layout Plain Layout
1295 \begin_inset Flex Code
1298 \begin_layout Plain Layout
1307 \begin_inset space \thinspace{}
1311 \begin_inset space \thinspace{}
1315 \begin_inset space \space{}
1318 the page isn't shifted.
1319 Unfortunately, some DVI drivers always seem to shift the page.
1320 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1321 If you're using LyX on a system that you don't personally maintain, and
1322 your sysadmin is a doofus,
1323 \begin_inset Flex Code
1326 \begin_layout Plain Layout
1335 \begin_inset Flex Code
1338 \begin_layout Plain Layout
1347 Suppose your left and top margins are always 0.5
1348 \begin_inset space \thinspace{}
1352 You can add this to the preamble:
1355 \begin_layout LyX-Code
1363 \begin_layout LyX-Code
1371 \begin_layout Standard
1372 and your margins should now be correct.
1375 \begin_layout Subsubsection
1379 \begin_layout Standard
1380 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1381 There's a rather nice package, available at your nearest CTAN archive,
1382 for printing sheets of labels:
1383 \begin_inset Flex Code
1386 \begin_layout Plain Layout
1393 Now, your system may not have this package installed by default.
1394 We leave that up to you to check.
1395 You'll also want to read the documentation for it; we're not going to do
1397 Since this is an example, however, we'll give you an example of how you
1401 \begin_layout Standard
1402 First, make sure you're using the
1403 \begin_inset Flex Code
1406 \begin_layout Plain Layout
1413 Next, you need to put the following in your preamble:
1416 \begin_layout LyX-Code
1422 \begin_layout LyX-Code
1428 \begin_layout LyX-Code
1434 \begin_layout LyX-Code
1440 \begin_layout LyX-Code
1446 \begin_layout LyX-Code
1452 \begin_layout LyX-Code
1458 \begin_layout Standard
1459 This sets things up for Avery label sheets, stock #5360.
1460 You're now ready to print labels, but you'll need to insert LaTeX code,
1461 placing the commands
1462 \begin_inset Flex Code
1465 \begin_layout Plain Layout
1474 \begin_inset Flex Code
1477 \begin_layout Plain Layout
1485 around each label text.
1486 This and other special features of
1487 \begin_inset Flex Code
1490 \begin_layout Plain Layout
1496 are explained in its documentation.
1499 \begin_layout Standard
1500 Someday, someone may write a LyX layout file to support this package directly.
1501 Maybe that someone is you.
1504 \begin_layout Subsubsection
1505 Example #3: Paragraph Indentation
1508 \begin_layout Standard
1509 Americans are trained to indent the first line of
1514 As with all of their other weird quirks, most Americans will whine and
1515 moan until they can have their way and indent the first line of all paragraphs.
1524 \begin_layout Standard
1525 Of course, this behavior isn't standard typography.
1526 In books, you typically only indent the first line of a paragraph
1530 it follows another one.
1531 The idea behind indenting the first line of a paragraph is to distinguish
1532 neighboring paragraphs from one another.
1533 If there is no previous paragraph—for example, if it follows a figure or
1534 is the first paragraph in a section—then there is no need for indentation.
1538 \begin_layout Standard
1539 If you're a typical American (we're still joking!), though, you don't care
1540 about such esoteric things; you want your indentation! Add this to the
1544 \begin_layout LyX-Code
1547 usepackage{indentfirst}
1550 \begin_layout Standard
1551 If your TeX distribution isn't braindead, you'll have this package, and
1552 all of your paragraphs will get the indentation the Founding Fathers intended
1556 \begin_layout Subsubsection
1557 Example #4: This Document
1560 \begin_layout Standard
1561 You can also check out the preamble of this document to get an idea of some
1562 of the advanced things you can do.
1563 Also, there are more examples and an assortment of LaTeX
1564 \begin_inset Quotes eld
1568 \begin_inset Quotes erd
1572 \begin_inset space ~
1576 \begin_inset CommandInset ref
1578 reference "cha:secrets"
1586 \begin_layout Section
1587 LyX and LaTeX Errors
1590 \begin_layout Standard
1591 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1593 It then uses the logfile from the LaTeX run to do a post-mortem.
1594 After analyzing the logfile,LyX displays a dialog listing the errors.
1595 Clicking on any one of them will take you to the position in your LyX file
1596 where the error occurred.
1600 \begin_layout Plain Layout
1602 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1604 There are also cases where LaTeX reports the error on one line, but the
1605 actual error is earlier.
1606 This is not unlike forgetting a closing brace in a program: You'll get
1607 an error, but only later.
1615 \begin_layout Standard
1616 Some folks also like to look at the log file directly: It is available from
1618 \begin_inset Flex MenuItem
1621 \begin_layout Plain Layout
1624 \SpecialChar \menuseparator
1628 \begin_inset space ~
1637 There are some fairly common error messages and warnings.
1638 We'll cover those here.
1639 You should look at a good LaTeX book for a complete listing.
1642 \begin_layout Itemize
1643 \begin_inset Flex Code
1646 \begin_layout Plain Layout
1653 \begin_inset Newline newline
1656 Anything beginning with these words is a warning message for the purpose
1658 \begin_inset Quotes eld
1662 \begin_inset Quotes erd
1665 the LaTeX code itself.
1666 You'll get messages like this if you added or changed cross-references
1667 or bibliography entries, in which case, LaTeX is trying to tell you that
1668 you need to make another run.
1669 You can by-and-large ignore these.
1672 \begin_layout Itemize
1673 \begin_inset Flex Code
1676 \begin_layout Plain Layout
1683 \begin_inset Newline newline
1686 Another warning message, this time about fonts which LaTeX couldn't find.
1687 The rest of the message will often say something about a replacement font
1689 You can safely ignore these, too.
1692 \begin_layout Itemize
1693 \begin_inset Flex Code
1696 \begin_layout Plain Layout
1705 \begin_inset Newline newline
1713 They are warnings about lines that were too long and run past the right
1715 Almost always, this is unnoticeable in the final output.
1716 (It can be just a point or two.) Or, only one or two characters extend past
1718 LaTeX seems to generate at least one of these messages for just about any
1720 \begin_inset Newline newline
1723 You can ignore these messages.
1724 Your eyes will tell you if there's a problem with something that's too
1725 wide; just look at the output.
1729 \begin_layout Plain Layout
1730 You can also enable the `draft' option in
1731 \begin_inset Flex MenuItem
1734 \begin_layout Plain Layout
1737 \SpecialChar \menuseparator
1745 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1753 \begin_layout Itemize
1754 \begin_inset Flex Code
1757 \begin_layout Plain Layout
1766 \begin_inset Newline newline
1769 Not quite as common as its cousin.
1770 LaTeX seems to like to print lines that are a bit too wide as opposed to
1771 ones that are a bit too narrow.
1772 We have no idea why.
1775 \begin_layout Itemize
1776 \begin_inset Flex Code
1779 \begin_layout Plain Layout
1788 \begin_inset Flex Code
1791 \begin_layout Plain Layout
1800 \begin_inset Newline newline
1803 Warnings about troubles breaking the page.
1804 Once again, just look at the output.
1805 Your eyes will tell you where something has gone wrong.
1808 \begin_layout Itemize
1809 \begin_inset Flex Code
1812 \begin_layout Plain Layout
1814 \begin_inset Quotes els
1818 \begin_inset Quotes ers
1827 \begin_inset Newline newline
1831 \begin_inset Quotes eld
1835 \begin_inset Quotes erd
1838 isn't installed on this system.
1839 This usually appears because some package your document needs isn't installed.
1840 If you didn't touch the preamble or didn't use the
1841 \begin_inset Flex Code
1844 \begin_layout Plain Layout
1852 command, then one of the packages LyX tried to load is missing.
1854 \begin_inset Flex MenuItem
1857 \begin_layout Plain Layout
1858 Help\SpecialChar \menuseparator
1864 to get a list of packages that LyX knows about.
1865 This file is updated whenever you reconfigure LyX (using
1866 \begin_inset Flex MenuItem
1869 \begin_layout Plain Layout
1870 Tools\SpecialChar \menuseparator
1876 ) and tells you which packages have been detected and what they do.
1877 \begin_inset Newline newline
1881 \begin_inset Flex Code
1884 \begin_layout Plain Layout
1892 command and the package in question isn't installed, then you'll need to
1893 install it yourself.
1896 \begin_layout Itemize
1897 \begin_inset Flex Code
1900 \begin_layout Plain Layout
1901 LaTeX Error: Unknown option
1907 \begin_inset Newline newline
1910 Error messages beginning with this are trying to tell you that you specified
1911 a bad or undefined option to a package.
1912 Check the package's documentation.
1915 \begin_layout Itemize
1916 \begin_inset Flex Code
1919 \begin_layout Plain Layout
1920 Undefined control sequence
1926 \begin_inset Newline newline
1929 If you've inserted LaTeX code into your document, but made a typo, you'll
1931 You may have forgotten to load a package.
1932 In any case, this error message usually means that you used an undefined
1937 \begin_layout Standard
1938 There are other error and warning messages.
1939 Some are self-explanatory.
1940 These are usually LaTeX messages.
1941 Others are downright cryptic.
1942 These are usually TeX error messages, and we really have
1946 what they mean or how to decipher them.
1950 \begin_layout Standard
1951 There's a general sequence you should follow if you get error messages:
1954 \begin_layout Enumerate
1955 Look at the LaTeX code you inserted for typos.
1958 \begin_layout Enumerate
1959 If there are no typos, check that you used the command(s) correctly.
1962 \begin_layout Enumerate
1963 If you get a bunch of error boxes piled up at the very top of the document—and
1964 especially if you see a
1965 \begin_inset Quotes eld
1969 \begin_inset Flex Code
1972 \begin_layout Plain Layout
1981 \begin_inset Quotes erd
1984 error—it means that there are errors in the preamble.
1985 Start debugging your preamble.
1988 \begin_layout Enumerate
1989 If you didn't add anything to the preamble and didn't add any LaTeX code
1990 to the document, the first suspect is your LaTeX distribution itself.
1991 Check for missing packages and install them.
1994 \begin_layout Enumerate
1995 Okay, so there are no missing packages.
1996 Did you use any of the fine-tuning options in LyX? Specifically, did you
2001 any of them, like trying to manually insert lots of
2002 \begin_inset Flex Code
2005 \begin_layout Plain Layout
2007 \begin_inset space ~
2016 \begin_inset Flex Code
2019 \begin_layout Plain Layout
2026 \begin_inset Flex Code
2029 \begin_layout Plain Layout
2035 ? Did you try to kludge something together with these instead of using the
2036 appropriate paragraph environment?
2039 \begin_layout Enumerate
2040 All right, you didn't use any of the fine-tuning options, you played by
2042 Did you try to pull a fancy maneuver? Did you do something funky inside
2043 a table or an equation, like inserting a graphic into a table cell?
2046 \begin_layout Enumerate
2047 Do you have long sections of text where LaTeX cannot find a place to break
2048 a line? By default, LaTeX is rather strict about how much extra inter-word
2049 spacing it will add in order to break a line.
2050 Preferably, you should rework the paragraph to avoid the problem.
2051 If this isn't an option, you can wrap your text in
2052 \begin_inset Flex Code
2055 \begin_layout Plain Layout
2063 to make LaTeX's line breaking more, well, sloppy.
2066 \begin_layout Enumerate
2067 Did you go overboard with the nesting? LyX (currently) doesn't check to
2068 make sure you're in the limits for nesting environments.
2069 If you nested a bunch of environments to the
2070 \begin_inset Formula $17^{\mathrm{th}}$
2073 level, that's the problem.
2074 (The limit in LaTeX is five.)
2077 \begin_layout Enumerate
2078 Okay, you didn't get any error messages, but your output looks awful.
2079 If you have a table or figure that's too wide or long for the page, you
2084 \begin_layout Enumerate
2085 rescale the figure so it fits.
2088 \begin_layout Enumerate
2089 trim down the table so it fits.
2093 \begin_layout Enumerate
2094 If something else is wrong with the output, and you didn't try to pull anything
2095 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2098 \begin_layout Standard
2099 If all this doesn't help—well, then
2103 you might have found a bug in LyX\SpecialChar \ldots{}
2107 \begin_layout Chapter
2111 \begin_layout Section
2112 Customizing Bibliographies with BibTeX
2115 \begin_layout Standard
2116 The most basic information about how to use BibTeX with LyX is contained
2119 Bibliography databases (BibTeX)
2126 The following subsections explain special bibliography features supported
2130 \begin_layout Subsection
2131 Alternative Citation Styles
2134 \begin_layout Standard
2135 Standard BibTeX uses numbers (e.
2136 \begin_inset space \thinspace{}
2140 \begin_inset space \space{}
2144 \begin_inset Quotes eld
2148 \begin_inset Quotes erd
2151 ) to refer to a cited work.
2152 However, in many scientific disciplines, other citation styles are in use.
2153 The most common one is the author-year style (e.
2154 \begin_inset space \thinspace{}
2158 \begin_inset space \space{}
2162 \begin_inset Quotes eld
2166 \begin_inset Quotes erd
2170 LyX supports two packages that provide this style,
2171 \begin_inset Flex Code
2174 \begin_layout Plain Layout
2181 \begin_inset Flex Code
2184 \begin_layout Plain Layout
2191 Both packages have their pros and cons, which cannot be listed in detail.
2192 If you only want to have simple author-year (or author-numerical) style,
2193 or if you want to use one of the countless style files for
2194 \begin_inset Flex Code
2197 \begin_layout Plain Layout
2203 , than the established
2204 \begin_inset Flex Code
2207 \begin_layout Plain Layout
2213 package is probably your choice.
2214 If you need special features like short title references, ibidem etc., you
2216 \begin_inset Flex Code
2219 \begin_layout Plain Layout
2228 \begin_layout Standard
2229 The handling of both packages in LyX is basically the same.
2231 \begin_inset Flex MenuItem
2234 \begin_layout Plain Layout
2235 Document\SpecialChar \menuseparator
2242 \begin_inset Flex MenuItem
2245 \begin_layout Plain Layout
2252 \begin_inset Flex MenuItem
2255 \begin_layout Plain Layout
2262 \begin_inset Flex MenuItem
2265 \begin_layout Plain Layout
2272 With both packages, you will get some extra features in the citation dialog
2273 and you can select the style of the reference (
2274 \begin_inset Quotes eld
2278 \begin_inset Quotes erd
2282 \begin_inset Quotes eld
2286 \begin_inset Quotes erd
2290 \begin_inset Quotes eld
2294 \begin_inset Quotes erd
2298 \begin_inset Quotes eld
2302 \begin_inset Quotes erd
2306 Note that both packages need specifically designed style files.
2307 They both ship their own, but there are lots of additional style files,
2308 and there is even an interactive style file builder
2312 \begin_layout Plain Layout
2314 \begin_inset Flex URL
2317 \begin_layout Plain Layout
2319 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2330 \begin_inset Flex Code
2333 \begin_layout Plain Layout
2342 \begin_layout Subsection
2343 Sectioned Bibliographies
2346 \begin_layout Standard
2347 Sometimes you might need to divide your bibliography into several sections.
2348 If you are for instance a historian, the possibility to separate sources
2349 and scientific works is most likely a
2350 \begin_inset Quotes eld
2354 \begin_inset Quotes erd
2358 Unfortunately, BibTeX itself does not allow you to do this.
2359 But with the help of some LaTeX packages, BibTeX can be extended to fit
2363 \begin_layout Standard
2364 LyX provides native support for one of these packages,
2372 \begin_layout Plain Layout
2374 \begin_inset Flex URL
2377 \begin_layout Plain Layout
2379 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2389 The advantage of this package (compared to other packages like
2393 ) is that you don't need to define new citation commands.
2394 Instead, you need to prepare different bibliographic databases which include
2395 the entries for the different sections of the bibliography.
2396 For example: If you want to divide your bibliography into the sections
2398 \begin_inset Quotes eld
2402 \begin_inset Quotes erd
2406 \begin_inset Quotes eld
2410 \begin_inset Quotes erd
2413 , you first need to create two bibliographic databases, e.
2414 \begin_inset space \thinspace{}
2418 \begin_inset space \space{}
2422 \begin_inset Flex Code
2425 \begin_layout Plain Layout
2432 \begin_inset Flex Code
2435 \begin_layout Plain Layout
2445 \begin_layout Standard
2447 \begin_inset Flex MenuItem
2450 \begin_layout Plain Layout
2451 Document\SpecialChar \menuseparator
2458 \begin_inset Flex MenuItem
2461 \begin_layout Plain Layout
2468 \begin_inset Flex MenuItem
2471 \begin_layout Plain Layout
2472 Sectioned bibliography
2478 Now you can insert multiple BibTeX bibliographies, one for each section
2479 of your bibliography.
2480 Returning to our example: Insert the BibTeX bibliography
2481 \begin_inset Flex Code
2484 \begin_layout Plain Layout
2490 and a second one for the database
2491 \begin_inset Flex Code
2494 \begin_layout Plain Layout
2501 You are free to use the same or different styles for each section.
2502 Additionally, you can chose if the bibliography section should contain
2504 \begin_inset Quotes eld
2507 all cited references
2508 \begin_inset Quotes erd
2511 of the specified database(s) (which is the default),
2512 \begin_inset Quotes eld
2515 all uncited references
2516 \begin_inset Quotes erd
2520 \begin_inset Quotes eld
2524 \begin_inset Quotes erd
2528 This might be useful if you would like to separate your bibliography into
2530 \begin_inset Quotes eld
2534 \begin_inset Quotes erd
2538 \begin_inset Quotes eld
2542 \begin_inset Quotes erd
2546 \begin_inset Quotes eld
2550 \begin_inset Quotes erd
2554 The titles for the sections can be added as ordinary sections or subsections.
2556 \begin_inset Flex Code
2559 \begin_layout Plain Layout
2565 removes the bibliography title, you have manually re-add that, too (as
2566 a chapter* or section*, for instance).
2569 \begin_layout Subsection
2570 Multiple Bibliographies
2573 \begin_layout Standard
2574 Multiple bibliographies, e.
2575 \begin_inset space \thinspace{}
2579 \begin_inset space \space{}
2582 a bibliography for each section or chapter of the document, are not supported
2585 \begin_inset Flex Code
2588 \begin_layout Plain Layout
2594 package, which is used for the creation of sectioned bibliographies in
2595 LyX (see the previous section), provides an easy way to solve this task,
2596 if you are willing to use some
2597 \begin_inset Flex MenuItem
2600 \begin_layout Plain Layout
2607 \begin_inset space ~
2611 \begin_inset CommandInset ref
2613 reference "sec:Inserting-TeX-Code"
2621 \begin_layout Plain Layout
2622 An alternative approach is to use the
2623 \begin_inset Flex Code
2626 \begin_layout Plain Layout
2633 \begin_inset Flex Code
2636 \begin_layout Plain Layout
2642 package, respectively.
2650 \begin_layout Standard
2652 \begin_inset Flex MenuItem
2655 \begin_layout Plain Layout
2656 Document\SpecialChar \menuseparator
2663 \begin_inset Flex MenuItem
2666 \begin_layout Plain Layout
2673 \begin_inset Flex MenuItem
2676 \begin_layout Plain Layout
2677 Sectioned bibliography
2683 In the document, you have to enclose the sections, which shall contain
2684 their own bibliography (including the BibTeX bibliography itself), between
2686 \begin_inset Flex Code
2689 \begin_layout Plain Layout
2698 \begin_inset Flex Code
2701 \begin_layout Plain Layout
2709 (those commands have to be inserted as TeX code).
2710 The bibliography will contain all references which have been cited in the
2712 \begin_inset Flex Code
2715 \begin_layout Plain Layout
2726 If you are using this approach, then every citation reference has to be
2728 \begin_inset Flex Code
2731 \begin_layout Plain Layout
2739 \begin_inset Flex Code
2742 \begin_layout Plain Layout
2751 \begin_layout Section
2755 \begin_layout Subsection
2759 \begin_layout Standard
2760 When you are working on a large file with many sections, it is often convenient
2761 to break up the document into several files, or perhaps you have something
2762 where a table may change from time to time, but the preceding text does
2764 In these cases, you should seriously consider using multipart documents.
2765 For example, scientific papers often have five major sections: the introduction
2766 , observations, results, discussion, and conclusion.
2767 Each of these could be its own separate LyX file, with one
2768 \begin_inset Quotes eld
2772 \begin_inset Quotes erd
2775 file which contains the title, authors, abstract, references, etc., plus
2776 the five included files.
2777 It is important to note that each of these files is a full LyX file which
2778 can be formatted and printed on its own, as well as included in a master
2780 Each of these files must have the same document class, however—don't attempt
2781 to mix book classes with article classes.
2782 You may also include LaTeX files; however, these files must not have their
2784 \begin_inset space \thinspace{}
2788 \begin_inset space \space{}
2791 everything up to and including the
2792 \begin_inset Flex Code
2795 \begin_layout Plain Layout
2804 \begin_inset Flex Code
2807 \begin_layout Plain Layout
2815 line must be deleted) or else errors will be generated when you try to
2819 \begin_layout Standard
2820 LyX allows you to include files quite easily with
2821 \begin_inset Flex MenuItem
2824 \begin_layout Plain Layout
2825 Insert\SpecialChar \menuseparator
2827 \begin_inset space ~
2836 When you click on this selection a small box is inserted into the file
2837 at the current cursor location.
2838 Clicking on the box raises a dialog which allows you to select the file
2839 to be included, and the method of its inclusion.
2843 \begin_layout Standard
2844 The file selection box should by now be obvious.
2845 The three inclusion methods are
2846 \begin_inset Quotes eld
2850 \begin_inset Quotes erd
2854 \begin_inset Quotes eld
2858 \begin_inset Quotes erd
2862 \begin_inset Quotes eld
2866 \begin_inset Quotes erd
2870 The difference between
2871 \begin_inset Quotes eld
2875 \begin_inset Quotes erd
2879 \begin_inset Quotes eld
2883 \begin_inset Quotes erd
2886 is really only meaningful to LaTeXperts, but the practical difference is
2887 that files which are
2888 \begin_inset Quotes eld
2892 \begin_inset Quotes erd
2895 are typeset beginning on a new page, while files which are
2896 \begin_inset Quotes eld
2900 \begin_inset Quotes erd
2903 are typeset starting on the current page.
2906 \begin_layout Standard
2907 Generally, the master file is converted into a full LaTeX file before typesettin
2908 g, while the included files are converted to LaTeX files which do not have
2909 all the preamble information.
2912 \begin_layout Standard
2914 \begin_inset Quotes eld
2918 \begin_inset Quotes erd
2921 included file allows you to include a file typeset exactly as it appears
2923 \begin_inset space \thinspace{}
2927 \begin_inset space \space{}
2931 \begin_inset Flex Code
2934 \begin_layout Plain Layout
2940 mode, with the characters set in a fixed-width typewriter font.
2941 Normally, spaces in this file are invisible, though two consecutive spaces
2942 are conserved, unlike LyX's normal treatment of spaces.
2943 However, setting the
2944 \begin_inset Flex MenuItem
2947 \begin_layout Plain Layout
2949 \begin_inset space ~
2953 \begin_inset space ~
2957 \begin_inset space ~
2965 checkbox typesets a mark to unambiguously define the presence of a space.
2969 \begin_layout Subsection
2970 Cross-References Between Files
2973 \begin_layout Standard
2974 \begin_inset Box Shadowbox
2984 height_special "totalheight"
2987 \begin_layout Plain Layout
2988 This section is somewhat out of date.
2989 Need to describe default master documents and how children are opened when
2999 \begin_layout Standard
3000 It is possible to set up cross-references between the different files.
3001 First, open all the files in question: let's call them A and B in a two
3002 file example, where B is included in A.
3003 Let's say you insert a label in A, then want to reference it in B.
3004 Open the cross-reference dialog in whilst in document B, and you can select
3006 \begin_inset Quotes eld
3010 \begin_inset Quotes erd
3016 \begin_layout Subsection
3017 Bibliography Lists in all Subdocuments
3020 \begin_layout Standard
3021 \begin_inset Box Frameless
3031 height_special "totalheight"
3034 \begin_layout Plain Layout
3035 This section also needs updating.
3036 There is now material about this on the wiki, and it could be copied here.
3044 \begin_layout Standard
3045 Copy the bibliography list with all entries to all subdocuments and transform
3047 This way LyX will find the
3048 \begin_inset Flex Code
3051 \begin_layout Plain Layout
3057 -files and you can easily insert references without making the bibliography
3061 \begin_layout Standard
3062 As the bibliography list is in a comment, LaTeX won't use use it and the
3063 references will look like this: [?], instead of like this: [1].
3064 One solution is to use the LaTeX-package
3065 \begin_inset Flex Code
3068 \begin_layout Plain Layout
3074 that will only include comments by processing the files separately.
3075 To do this, add in the LaTeX preamble of every subdocument the following:
3078 \begin_layout LyX-Code
3084 \begin_layout LyX-Code
3087 includecomment{comment}
3090 \begin_layout Standard
3092 \begin_inset Flex URL
3095 \begin_layout Plain Layout
3097 http://wiki.lyx.org/FAQ/Unsorted#toc31
3103 \change_inserted 1414654397 1302984017
3107 \begin_layout Section
3109 \change_inserted 1414654397 1302984017
3113 \begin_layout Standard
3115 \change_inserted 1414654397 1302984082
3116 Users sometimes need to be able to
3117 \begin_inset Quotes eld
3121 \begin_inset Quotes erd
3124 a LyX file together with all the images (and other files) on which it depends,
3125 either for sending to a publisher or for sharing with a co-author.
3126 LyX 2.0 includes a Python script (
3127 \begin_inset Flex Code
3130 \begin_layout Plain Layout
3132 \change_inserted 1414654397 1302984017
3138 ) that automates this process.
3139 To use it, you must have either the
3140 \begin_inset Flex Code
3143 \begin_layout Plain Layout
3145 \change_inserted 1414654397 1302984053
3154 \begin_inset Flex Code
3157 \begin_layout Plain Layout
3159 \change_inserted 1414654397 1302984046
3167 python modules installed on your system.
3168 By default, the script prefers the
3169 \begin_inset Flex Code
3172 \begin_layout Plain Layout
3174 \change_inserted 1414654397 1302984059
3183 \begin_inset Flex Code
3186 \begin_layout Plain Layout
3188 \change_inserted 1414654397 1302984063
3196 format on Unix-like systems and the
3197 \begin_inset Flex Code
3200 \begin_layout Plain Layout
3202 \change_inserted 1414654397 1302984068
3213 \begin_layout Standard
3215 \change_inserted 1414654397 1302984108
3216 LyX's configuration process will set the script up to export a `LyX Archive',
3217 and this format will then be available under
3218 \begin_inset Flex Code
3221 \begin_layout Plain Layout
3223 \change_inserted 1414654397 1302984108
3224 File\SpecialChar \menuseparator
3235 \begin_layout Standard
3237 \change_inserted 1414654397 1302984150
3238 Independently of the platform, the generation of a particular archive format
3239 can be forced by adding either the
3240 \begin_inset Flex Code
3243 \begin_layout Plain Layout
3245 \change_inserted 1414654397 1302984113
3254 \begin_inset Flex Code
3257 \begin_layout Plain Layout
3259 \change_inserted 1414654397 1302984117
3268 \begin_inset Flex Code
3271 \begin_layout Plain Layout
3273 \change_inserted 1414654397 1302984121
3282 \begin_inset Flex Code
3285 \begin_layout Plain Layout
3287 \change_inserted 1414654397 1302984125
3295 format) switch to the
3296 \begin_inset Flex Code
3299 \begin_layout Plain Layout
3301 \change_inserted 1414654397 1302984131
3302 LyX\SpecialChar \menuseparator
3311 \begin_inset Flex Code
3314 \begin_layout Plain Layout
3316 \change_inserted 1414654397 1302984137
3317 Tools\SpecialChar \menuseparator
3318 Preferences\SpecialChar \menuseparator
3319 File Handling\SpecialChar \menuseparator
3328 (Make sure you add the switch after the script name, not before it.)
3333 \begin_layout Section
3334 Fancy Headers and Footers
3337 \begin_layout Standard
3338 The default page layout is rather plain; for an
3339 \begin_inset Flex Code
3342 \begin_layout Plain Layout
3348 document class, all you get is a centered page number at the bottom of
3350 This document uses KOMA-script's book class, so it appears to be a bit
3352 But to really put on a show, you need to set the document page style to
3354 \begin_inset Quotes eld
3358 \begin_inset Quotes erd
3361 , as mentioned in the
3366 This section describes the LaTeX code you need to insert in your LaTeX
3367 preamble in order to get the desired effects.
3370 \begin_layout Standard
3371 For more information on fancy headers, see the
3372 \begin_inset Flex Code
3375 \begin_layout Plain Layout
3381 package documentation.
3383 \begin_inset Flex URL
3386 \begin_layout Plain Layout
3388 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3396 \begin_layout Standard
3397 The page header is divided into three fields, not surprisingly labeled
3398 \begin_inset Quotes eld
3402 \begin_inset Quotes erd
3406 \begin_inset Quotes eld
3410 \begin_inset Quotes erd
3414 \begin_inset Quotes eld
3418 \begin_inset Quotes erd
3422 The footer is also divided into these three fields.
3423 The LaTeX commands to set these fields in the simplest manner are
3424 \begin_inset Flex Code
3427 \begin_layout Plain Layout
3436 \begin_inset Flex Code
3439 \begin_layout Plain Layout
3448 \begin_inset Flex Code
3451 \begin_layout Plain Layout
3460 \begin_inset Flex Code
3463 \begin_layout Plain Layout
3472 Suppose you wish to put your name in the upper left hand corner of each
3474 Simply insert the following command in the preamble:
3477 \begin_layout Standard
3486 \begin_layout Standard
3487 You will now see your name in the upper left.
3488 If a field has a default entry that you would like to get rid of (often
3489 the page number appears in the central footer, simply include a command
3490 with a blank argument, e.
3491 \begin_inset space \thinspace{}
3497 \begin_layout Standard
3505 \begin_layout Standard
3506 Let's get really fancy: lets put the section number with the word
3507 \begin_inset Quotes eld
3511 \begin_inset Quotes erd
3515 \begin_inset space \thinspace{}
3519 \begin_inset space \space{}
3522 Section 3) in the upper left, the page number (e.
3523 \begin_inset space \thinspace{}
3527 \begin_inset space \space{}
3530 Page 4) in the upper right, your name in the lower left, and the date in
3532 The following commands should now appear in the preamble:
3535 \begin_layout Standard
3545 \begin_layout Standard
3553 \begin_layout Standard
3563 \begin_layout Standard
3572 \begin_layout Standard
3580 \begin_layout Standard
3590 \begin_layout Standard
3592 \begin_inset Flex Code
3595 \begin_layout Plain Layout
3604 \begin_inset Flex Code
3607 \begin_layout Plain Layout
3615 access LaTeX's section and page counters, and so print out the current
3616 section and page numbers.
3618 \begin_inset Flex Code
3621 \begin_layout Plain Layout
3629 simply prints out today's date.
3632 \begin_layout Standard
3633 The thicknesses of the horizontal rules drawn beneath the header and above
3634 the footer can also be modified.
3635 If you don't want one of the rules, set its thickness to 0.
3636 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3642 \begin_inset Flex Code
3645 \begin_layout Plain Layout
3650 headrulewidth}{0.4pt}
3656 \begin_inset Flex Code
3659 \begin_layout Plain Layout
3664 footrulewidth}{0.4pt}
3669 to set the thicknesses.
3672 \begin_layout Standard
3673 You can switch the header/footer settings on and off for individual pages
3675 \begin_inset Flex Code
3678 \begin_layout Plain Layout
3681 thispagestyle{empty}
3687 \begin_inset Flex Code
3690 \begin_layout Plain Layout
3693 thispagestyle{plain}
3699 \begin_inset Flex Code
3702 \begin_layout Plain Layout
3705 thispagestyle{fancy}
3711 Simply insert them in the text on the page you want changed and mark them
3713 In fact, title pages are marked as plain by default, while following pages
3714 are marked fancy when using the global fancy setting.
3717 \begin_layout Standard
3718 As a final example, it is possible to include an image in the header or
3720 Suppose you want to put a company logo in the upper lefthand corner.
3721 You might try something like
3724 \begin_layout Standard
3733 includegraphics{logo.eps}}}
3736 \begin_layout Standard
3738 (you may need to preface this with
3739 \begin_inset Flex Code
3742 \begin_layout Plain Layout
3746 usepackage{graphics}
3751 if you don't include graphics elsewhere in your document).
3754 \begin_layout Section
3755 Itemize Bullet Selection
3756 \begin_inset CommandInset label
3765 \begin_layout Standard
3771 \begin_layout Subsection
3775 \begin_layout Standard
3776 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3777 Using this dialog you can easily specify what bullet shape to use at each
3778 level of an itemized list.
3779 These settings are document-wide so you won't be able to specify different
3780 sets of bullets for different paragraphs.
3784 \begin_layout Plain Layout
3785 Well, actually you can but you'll have to do it by hand.
3793 \begin_layout Subsection
3797 \begin_layout Standard
3798 Open the dialog by selecting the
3799 \begin_inset Flex MenuItem
3802 \begin_layout Plain Layout
3803 Document\SpecialChar \menuseparator
3809 menu item and then select the
3810 \begin_inset Flex MenuItem
3813 \begin_layout Plain Layout
3822 \begin_layout Standard
3823 The dialog provides you with a table of bullet shapes.
3824 A column of buttons on the left of the table provides access to the six
3825 different panels of bullet shapes.
3826 The row of buttons across the top is used to select which bullet depth
3828 A text entry under the table shows the currently selected bullet shape's
3829 LaTeX equivalent and this can be edited if desired.
3830 If you do modify the text you will also need to specify any needed packages
3831 in the LaTeX preamble.
3834 \begin_layout Standard
3835 The six panels are divided up by the packages they require.
3836 The following table shows the mappings from button name to LaTeX packages.
3839 \begin_layout Standard
3841 \begin_inset Tabular
3842 <lyxtabular version="3" rows="7" columns="2">
3843 <features tabularvalignment="middle">
3844 <column alignment="center" valignment="top" width="0pt">
3845 <column alignment="center" valignment="top" width="0pt">
3847 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3850 \begin_layout Plain Layout
3865 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3868 \begin_layout Plain Layout
3885 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3888 \begin_layout Plain Layout
3903 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3906 \begin_layout Plain Layout
3922 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3925 \begin_layout Plain Layout
3940 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3943 \begin_layout Plain Layout
3960 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3963 \begin_layout Plain Layout
3978 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3981 \begin_layout Plain Layout
3998 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4001 \begin_layout Plain Layout
4016 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4019 \begin_layout Plain Layout
4036 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4039 \begin_layout Plain Layout
4054 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4057 \begin_layout Plain Layout
4074 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4077 \begin_layout Plain Layout
4092 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4095 \begin_layout Plain Layout
4118 \begin_layout Standard
4119 LyX doesn't stop you using bullets from packages you don't have.
4120 If you get errors from LaTeX when you try to view or print the file, then
4121 it is likely you are missing a package.
4125 \begin_layout Plain Layout
4126 LyX doesn't restrict your use since you may be editing locally and exporting
4135 \begin_layout Subsection
4139 \begin_layout Standard
4140 Select which bullet depth you want to change then select the bullet shape
4142 Any changes will not be visible in LyX, but are visible when viewing the
4146 \begin_layout Standard
4147 You can reset a bullet shape to the default simply by clicking your right
4148 mouse button on the appropriate bullet depth button.
4152 \begin_layout Plain Layout
4157 want to have multiple sets of paragraphs with different sets of bullets
4158 in each, then you're going to have to get your hands dirty with TeX code.
4159 The bullet selection dialog can help though because it provides you with
4160 the LaTeX code for a wide range of bullet shapes.
4161 To make your own custom paragraphs you have the following options:
4164 \begin_layout Plain Layout
4168 \begin_layout Plain Layout
4184 \begin_layout Plain Layout
4188 \begin_layout Plain Layout
4210 \begin_layout Itemize
4211 Use the LaTeX command
4212 \begin_inset Flex Code
4215 \begin_layout Plain Layout
4223 to specify a new bullet shape for a given depth.
4224 You'll also need to save the current bullet shape so you can restore it
4226 In this itemized list the following LaTeX code was used to change the bullet
4227 used for the first depth.
4231 \begin_layout LyX-Code
4241 \begin_layout LyX-Code
4258 \begin_layout Itemize
4259 Note that the itemize depth is specified in Roman numerals as part of the
4269 \begin_layout Itemize
4273 \begin_layout Plain Layout
4286 Specify each individual entry by starting each item with the bullet shape
4287 enclosed in square brackets and set as
4288 \begin_inset Flex MenuItem
4291 \begin_layout Plain Layout
4298 For example, this item was started with
4299 \begin_inset Flex Code
4302 \begin_layout Plain Layout
4317 \begin_layout Plain Layout
4321 \begin_layout Plain Layout
4337 \begin_layout Plain Layout
4338 You'll also need to revert the labelitem back to its previous setting for
4339 the global bullet shape settings to remain in effect.
4340 The way used here was:
4343 \begin_layout LyX-Code
4358 \begin_layout Chapter
4359 LyX and the World Wide Web
4362 \begin_layout Standard
4363 LyX has long supported the export of documents to various web-friendly formats,
4365 Before verson 2.0, however, HTML export was always accomplished by the use
4366 of external converters.
4370 \begin_layout Plain Layout
4371 For details on the use of external converters with LyX, see the
4375 section of the Customization manual.
4380 These fall into two large groups: there are converters that use LaTeX as
4381 an intermediate format, such as
4382 \begin_inset Flex Code
4385 \begin_layout Plain Layout
4392 \begin_inset Flex Code
4395 \begin_layout Plain Layout
4402 \begin_inset Flex Code
4405 \begin_layout Plain Layout
4411 , relying upon LyX to produce the LaTeX; and there is a converter that works
4412 directly on LyX files,
4413 \begin_inset Flex Code
4416 \begin_layout Plain Layout
4423 All of these have different advantages and disadvantages.
4427 \begin_layout Standard
4428 The LaTeX-based converters have the advantage that, in principle, they know
4429 everything about the exported document that LaTeX does.
4430 Such converters do not care, for example, if a certain block of code was
4431 produced by LyX or was Evil Red Text.
4432 These converters know about
4433 \begin_inset Flex Code
4436 \begin_layout Plain Layout
4442 files, counters, and references, and can often make use of the
4443 \begin_inset Flex Code
4446 \begin_layout Plain Layout
4452 files generated by BibTeX.
4453 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4454 said that only TeX itself understands TeX---and LaTeX-based converters
4455 will often choke on what seem to be quite simple constructs; complex ones
4456 can throw them completely, and as of this writing, for example, the
4460 manual will not export with
4461 \begin_inset Flex Code
4464 \begin_layout Plain Layout
4470 , though the others will.
4471 The other issue concerns how math is handled.
4472 These converters typically convert the formulae into little pictures that
4473 are then linked from the HTML document.
4474 Since these are actually generated by LaTeX, they are accurate.
4475 But they do not scale well, and just getting them to look as if they are
4476 actually meant to be in your document---so that the font sizes seem to
4477 be roughly the same---can be a challenge.
4480 \begin_layout Standard
4482 \begin_inset Flex Code
4485 \begin_layout Plain Layout
4492 \begin_inset CommandInset href
4494 name "http://elyxer.nongnu.org/"
4495 target "http://elyxer.nongnu.org/"
4499 ) solves some of these problems.
4500 In particular, the formulae it produces scale perfectly, since it renders
4501 math using a combination of HTML and CSS rather than converting the formulae
4503 But even moderately complex formula are rendered less well than with
4504 \begin_inset Flex Code
4507 \begin_layout Plain Layout
4513 ; this reflects the limitations of HTML.
4517 \begin_layout Plain Layout
4519 \begin_inset Flex Code
4522 \begin_layout Plain Layout
4528 can also use jsMath and MathJax for equations, but this setting is only
4529 available globally and requires one to have access to a server that runs
4535 More importantly (as of version 1.1.1, at least),
4536 \begin_inset Flex Code
4539 \begin_layout Plain Layout
4545 has limited support for math macros and no support for user-defined paragraph
4546 or character styles.
4547 These limitations make
4548 \begin_inset Flex Code
4551 \begin_layout Plain Layout
4557 unsuitable for many of the documents LyX users produce.
4558 In principle, of course, these problems could be solved, but the LyX developers
4559 have decided to follow a different path and have made LyX itself capable
4560 of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4564 \begin_layout Standard
4565 As of this writing, XHTML output remains under development and should probably
4567 \begin_inset Quotes eld
4571 \begin_inset Quotes erd
4578 \begin_layout Plain Layout
4580 \begin_inset Flex Code
4583 \begin_layout Plain Layout
4584 development/HTML.notes
4589 , which can be found in the LyX source tree or
4590 \begin_inset CommandInset href
4592 name "accessed online"
4593 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4597 , usually contains up-to-date information about the state of XHTML output.
4598 See also the list of XHTML bugs on
4599 \begin_inset CommandInset href
4601 name "the bug tracker"
4602 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"
4611 Still, the developers have chosen this approach because it has several
4612 potential advantages over the other two.
4615 \begin_layout Standard
4616 These advantages are primarily due to the fact that the XHTML output routines,
4617 since they are part of LyX, know everything LyX knows about the document
4622 \begin_layout Plain Layout
4623 Another advantage is that, since these routines are internal to LyX, they
4624 are immune to changes in LyX's file format, or to changes in the semantics
4630 So they know about the table of contents (as displayed in the outline),
4631 about the counters associated with different paragraph styles, and about
4632 user-defined styles.
4633 The XHTML output routines know what LyX knows about internationalization,
4634 too, so they will output
4635 \begin_inset Quotes eld
4639 \begin_inset Quotes erd
4643 \begin_inset Quotes eld
4651 \begin_inset Quotes erd
4654 , depending upon the language in effect at the time.
4658 \begin_layout Standard
4659 Quite generally, the output routines know what LyX knows about document
4660 layout, that is, about how the document is to be rendered on screen.
4661 We use this information when we output the document as XHTML.
4666 generates CSS style information corresponding to the layout information
4667 it uses to render the document on screen: if section headings are supposed
4668 to be sans-serif and bold as seen in LyX, then (by default) they will be
4669 sans-serif and bold when viewed in a web browser, too.
4670 And this is true not just for pre-defined styles, like Section, but for
4671 any style, including user-defined styles.
4672 Indeed, the XHTML output routines make no distinction between user-defined
4673 paragraph and character styles and LyX's own pre-defined styles: in each
4674 case, everything LyX knows about the styles is contained in the layout
4676 And much the same is true as regards pre-defined textual insets, such as
4677 footnotes, and various custom insets.
4681 \begin_layout Standard
4682 The result is that XHTML output can be customized and extended in exactly
4683 the same way LaTeX output can be customized and extended: through layout
4685 See chapter five of the
4689 manual for the details.
4692 \begin_layout Standard
4693 The remainder of this chapter contains more detailed information on XHTML
4694 output, its limitations, and ways to work around those limitations.
4697 \begin_layout Section
4698 Math Output in XHTML
4701 \begin_layout Standard
4702 LyX offers four choices for how math is rendered.
4703 These have various advantages and disadvantages:
4706 \begin_layout Itemize
4708 \begin_inset Newline newline
4711 MathML is a dialect of XML designed specifically for mathematics on the
4712 web, and it typically renders very well in browsers that support it.
4713 The disadvantage is that not all browsers support MathML, and support is
4714 not complete even in the Gecko-based browsers, such as Firefox.
4715 \begin_inset Newline newline
4718 If LyX is unable to render a formula as MathML---for example, if the formula
4720 \begin_inset Flex Code
4723 \begin_layout Plain Layout
4729 package or ERT---then it will instead output the formula as an image.
4733 \begin_layout Itemize
4735 \begin_inset Newline newline
4739 \begin_inset Flex Code
4742 \begin_layout Plain Layout
4748 outputs math as HTML, styled by CSS.
4752 \begin_layout Plain Layout
4753 LyX has borrowed some of the CSS for its HTML output from
4754 \begin_inset Flex Code
4757 \begin_layout Plain Layout
4768 For simple formulae, this can work quite well, though with more complicated
4769 formulae it tends to break down.
4770 Still, this method has the advantage that it is very widely supported and
4771 so it may be appropriate for documents that contain only a little, fairly
4773 \begin_inset Newline newline
4776 If Lyx is unable to render a formula as HTML---for example, if the formula
4778 \begin_inset Flex Code
4781 \begin_layout Plain Layout
4787 package or ERT---then it will instead output the formula as an image.
4791 \begin_layout Itemize
4793 \begin_inset Newline newline
4797 \begin_inset Flex Code
4800 \begin_layout Plain Layout
4806 , LyX will output formulae as images, the very same images, in fact, that
4807 are used for instant preview.
4811 \begin_layout Plain Layout
4812 Instant preview does
4816 have to be on for images to be output, however.
4821 The advantage to this method is that the images are simply generated by
4822 LaTeX, so they are very accurate.
4823 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4824 so they do not scale terribly well, and one cannot copy them, etc.
4825 (As of this writing, there are also problems about equation numbering.
4827 \begin_inset CommandInset href
4830 target "http://www.lyx.org/trac/ticket/6894"
4835 \begin_inset Newline newline
4838 The size of the images can be controlled by setting the
4839 \begin_inset Quotes eld
4843 \begin_inset Quotes erd
4847 \begin_inset Flex MenuItem
4850 \begin_layout Plain Layout
4851 Document\SpecialChar \menuseparator
4852 Settings\SpecialChar \menuseparator
4862 \begin_layout Plain Layout
4863 For those who want to know, this controls the resolution of the image in
4864 dots per inch and is based upon a default of 75 dpi.
4870 \begin_inset Newline newline
4873 If LyX for some reason fails to create an image for a formula (e.g., if a
4874 required LaTeX package is not installed), then it will fall back to outputing
4878 \begin_layout Itemize
4880 \begin_inset Newline newline
4883 Finally, LyX will happily output math as LaTeX.
4884 As well as being the output of last resort, this method can be used with
4886 \begin_inset CommandInset href
4889 target "http://www.math.union.edu/~dpvc/jsMath/"
4893 , which uses JavaScript to render LaTeX embedded in HTML documents.
4894 LyX wraps the LaTeX in either a
4895 \begin_inset Flex Code
4898 \begin_layout Plain Layout
4904 (for inline formulas) or
4905 \begin_inset Flex Code
4908 \begin_layout Plain Layout
4914 (for displayed formulas) with
4915 \begin_inset Flex Code
4918 \begin_layout Plain Layout
4924 , as is required for jsMath.
4927 \begin_layout Standard
4928 One of these output methods must be selected under
4929 \begin_inset Flex MenuItem
4932 \begin_layout Plain Layout
4933 Document\SpecialChar \menuseparator
4934 Settings\SpecialChar \menuseparator
4941 By default, LyX outputs MathML.
4942 This is a document-wide setting, therefore.
4945 \begin_layout Standard
4946 Eventually, LyX will offer the user the option to select an alternate output
4947 method for a particular inset, say, one that isn't being rendered very
4952 \begin_layout Plain Layout
4953 That said, since LyX falls back to images if the inset contains ERT, then
4954 one can force output as an image by putting some harmless ERT into the
4956 \begin_inset Formula $a=b\relax$
4967 \begin_layout Section
4968 Bibliography and Citations
4971 \begin_layout Standard
4972 XHTML output fully supports bibliographies and citations.
4976 \begin_layout Standard
4977 Citation labels are generated by the same machinery that generates LyX's
4978 on-screen labels, so the labels will look in the output much as they do
4979 in LyX, though better.
4980 If you are using numerical citations, then LyX will output numerical labels,
4981 such as [1] or [17], rather than simply showing the citation key in square
4982 brackets, as it does on-screen.
4983 If you are using author-year citations, then LyX will add lowercase letters
4984 to the years, just as BibTeX does, if it finds more than one citation for
4985 a given author-year combination.
4986 The labels will be printed with the bibliography entries.
4987 Note that there is, at present, no way to customize the appearance of the
4988 labels, for example, to choose between square brackets and parentheses.
4991 \begin_layout Standard
4992 Bibliography output is handled by the same machinery that handles the presentati
4993 on of reference information in the citation dialog, so you will see in the
4994 XHTML output pretty much what you would see if you were to look at a given
4995 entry in the citation dialog.
4996 The formatting can be customized in your layout file or, preferably, in
5002 manual for the details.
5005 \begin_layout Standard
5006 The main defect at present is that cross-referenced information is printed
5007 with every entry with which it is associated.
5008 So you can see things like this:
5013 \begin_inset Quotes eld
5016 Context and Logical Form
5017 \begin_inset Quotes erd
5022 Language in Context: Selected Essays
5024 (Oxford: Oxford University Press, 2007), pp.
5030 \begin_inset Quotes eld
5033 Semantics in Context
5034 \begin_inset Quotes erd
5039 Language in Context: Selected Essays
5041 (Oxford: Oxford University Press, 2007), pp.
5045 \begin_layout Standard
5046 This should be fixed before long.
5049 \begin_layout Standard
5050 There is no support at present for sectioned bibliographies.
5051 If you have multiple bibliographies, then LyX will print the same bibliography
5055 \begin_layout Section
5059 \begin_layout Standard
5060 LyX will happily export indexes as XHTML, but with certain limitations at
5064 \begin_layout Standard
5065 Index export will be most reliable when you do not attempt to use the fancy
5066 constructs that are described in the section on indexes in the
5074 \begin_layout Plain Layout
5075 The main issue here is that LyX itself does not really handle these.
5076 It just lets you enter what you would have to enter in raw LaTeX.
5081 We'll describe how they are handled using the subsection headings from
5085 \begin_layout Itemize
5086 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5087 these, but the entries must be separated by
5088 \begin_inset Quotes eld
5092 \begin_inset Quotes erd
5095 , that is, there must be spaces around the exclamation point.
5096 This is because it is otherwise too difficult to check for escaped exclamation
5097 points, ones in math, and so forth.
5100 \begin_layout Itemize
5101 Page Ranges: There is no support at all for page ranges, since these make
5102 no sense with XHMTL.
5103 Instead, you will just get two index entries, one at either end.
5106 \begin_layout Itemize
5107 Cross-referencing: There is no support for cross-referencing.
5108 If LyX finds an entry containing the
5109 \begin_inset Quotes eld
5112 |see\SpecialChar \ldots{}
5114 \begin_inset Quotes erd
5117 construct, it is just dropped, and the rest is treated as an ordinary index
5121 \begin_layout Itemize
5122 Index Entry Order: LyX does support attempts to fix the sorting order.
5123 It will take what is before the first `@' it finds and use that for sorting,
5124 taking what follows the first `@' to be the actual entry.
5125 At present, LyX does not check for escaped `@', so do not try to index
5129 \begin_layout Itemize
5130 Index Entry Layout: You can format entries by using the text style dialog,
5131 or by using any other method available within LyX itself.
5132 There is no support for constructs like:
5133 \begin_inset Quotes eld
5137 \begin_inset Quotes erd
5141 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5142 and everything that follows it.
5145 \begin_layout Itemize
5146 Multiple Indexes: There is no support for multiple indexes.
5147 Rather, all index entries will be printed as one large index.
5148 To avoid our printing several versions of the index, we print only the
5149 main index, so make sure you have one.
5152 \begin_layout Section
5153 Nomenclature and Glossary
5156 \begin_layout Standard
5157 There is at present no support for glossaries.
5158 Adding it would be fairly trivial, and welcome.
5161 \begin_layout Chapter
5165 \begin_layout Section
5169 \begin_layout Standard
5170 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5171 and retrieve information about the LyX internal state.
5172 This is only intended for advanced users, but they should find it useful.
5173 It is by writing to the LyX server, for example, that bibliography managers,
5174 such as JabRef, are able to
5175 \begin_inset Quotes eld
5179 \begin_inset Quotes erd
5185 \begin_layout Section
5186 Starting the LyX Server
5189 \begin_layout Standard
5190 The LyX server works through the use of a pair of named pipes.
5191 These are usually located in
5192 \begin_inset Flex Code
5195 \begin_layout Plain Layout
5201 , (except on Windows, where
5205 named pipes are special objects located in
5206 \begin_inset Flex Code
5209 \begin_layout Plain Layout
5221 ) and have the names
5222 \begin_inset Quotes eld
5226 \begin_inset Flex Code
5229 \begin_layout Plain Layout
5236 \begin_inset Quotes erd
5240 \begin_inset Quotes eld
5244 \begin_inset Flex Code
5247 \begin_layout Plain Layout
5254 \begin_inset Quotes erd
5258 External programs write into
5259 \begin_inset Flex Code
5262 \begin_layout Plain Layout
5268 and read back data from
5269 \begin_inset Flex Code
5272 \begin_layout Plain Layout
5279 The stem of the pipe names can be defined in the
5280 \begin_inset Flex MenuItem
5283 \begin_layout Plain Layout
5284 Tools\SpecialChar \menuseparator
5291 \begin_inset Flex Code
5294 \begin_layout Plain Layout
5295 "/home/myhome/lyxpipe"
5301 \begin_inset Flex Code
5304 \begin_layout Plain Layout
5318 on Windows (but any working path can be used).
5323 configure this manually in order for the server to start.
5326 \begin_layout Standard
5328 \begin_inset Flex Code
5331 \begin_layout Plain Layout
5338 \begin_inset Flex Code
5341 \begin_layout Plain Layout
5347 ' to create the pipes.
5348 If one of the pipes already exists, LyX will assume that another LyX process
5349 is already running and will not start the server.
5350 On POSIX (Unix like) systems, if for some other reason, an unused
5351 \begin_inset Quotes eld
5355 \begin_inset Quotes erd
5358 pipe is left in existence when LyX closes, then LyX will try to delete
5360 If this fails for some reason, you will need to delete the pipes manually
5361 and then restart LyX.
5362 On Windows, pipes are deleted by the OS on program termination or crash,
5364 \begin_inset Quotes eld
5368 \begin_inset Quotes erd
5371 pipes should not be possible.
5374 \begin_layout Standard
5375 To have several LyX processes with servers at the same time, you have to
5376 use different configurations, perhaps by using separate user directories,
5378 \begin_inset Flex Code
5381 \begin_layout Plain Layout
5387 file, for each process.
5390 \begin_layout Standard
5391 If you are developing a client program, you might find it useful to enable
5392 debugging information from the LyX server.
5393 Do this by starting LyX as
5394 \begin_inset Flex Code
5397 \begin_layout Plain Layout
5406 \begin_layout Standard
5407 You can find a complete example client written in C in the source distribution
5409 \begin_inset Flex Code
5412 \begin_layout Plain Layout
5413 development/lyxserver/server_monitor.c
5421 \begin_layout Standard
5422 Another useful tool is command-line based client you will find in
5423 \begin_inset Flex Code
5426 \begin_layout Plain Layout
5427 src/client/lyxclient
5435 \begin_layout Section
5436 Normal communication
5439 \begin_layout Standard
5440 To issue a LyX call, the client writes a line of ASCII text into the input
5442 This line has the following format:
5459 \begin_layout Description
5460 clientname is a name that the client can choose arbitrarily.
5461 Its only use is that LyX will echo it if it sends an answer—so a client
5462 can dispatch results from different requesters.
5465 \begin_layout Description
5466 function is the function you want LyX to perform.
5467 It is the same as the commands you'd use in the minibuffer.
5470 \begin_layout Description
5471 argument is an optional argument which is meaningful only to some functions
5473 \begin_inset Quotes eld
5477 \begin_inset Quotes erd
5480 LFUN will insert the argument as text at the cursor position).
5483 \begin_layout Standard
5484 The answer from LyX will arrive in the output pipe and be of the form
5501 \begin_layout Standard
5510 are just echoed from the command request, while
5514 is more or less useful information filled according to how the command
5515 execution worked out.
5516 Some commands, such as
5517 \begin_inset Quotes eld
5521 \begin_inset Quotes erd
5524 , will return information about the internal state of LyX, while other will
5525 return an empty data-response.
5526 This means that the command execution went fine.
5529 \begin_layout Standard
5530 In case of errors, the response from LyX will have this form
5547 \begin_layout Standard
5552 should contain an explanation of why the command failed.
5555 \begin_layout Standard
5559 \begin_layout LyX-Code
5560 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5561 \begin_inset Newline newline
5564 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5565 \begin_inset Newline newline
5568 read a <~/.lyxpipe.out
5569 \begin_inset Newline newline
5575 \begin_layout Section
5579 \begin_layout Standard
5580 LyX can notify clients of events going on asynchronously.
5581 Currently it will only do this if the user binds a key sequence with the
5583 \begin_inset Quotes eld
5587 \begin_inset Quotes erd
5591 The format of the string LyX sends is as follows:
5595 \begin_inset Flex Code
5598 \begin_layout Plain Layout
5609 \begin_layout Standard
5614 is the printed representation of the key sequence that was actually typed
5618 \begin_layout Standard
5619 This mechanism can be used to extend LyX's command set and implement macros.
5620 Bind some key sequence to
5621 \begin_inset Quotes eld
5625 \begin_inset Quotes erd
5629 Then start a client that listens on the output pipe, dispatches the command
5630 according to the sequence, and starts a function that may use LyX calls
5631 and LyX requests to issue a command or a series of commands to LyX.
5634 \begin_layout Section
5635 The simple LyX Server Protocol
5638 \begin_layout Standard
5639 LyX implements a simple protocol that can be used for session management.
5640 All messages are of the form
5653 \begin_layout Standard
5659 \begin_inset Quotes eld
5663 \begin_inset Quotes erd
5667 \begin_inset Quotes eld
5671 \begin_inset Quotes erd
5676 \begin_inset Quotes eld
5680 \begin_inset Quotes erd
5683 is received from a client, LyX will report back to inform the client that
5684 it's listening to it's messages, while
5685 \begin_inset Quotes eld
5689 \begin_inset Quotes erd
5692 sent from LyX will inform clients that LyX is closing.
5695 \begin_layout Section
5696 Reverse DVI/PDF search
5699 \begin_layout Standard
5700 Some DVI/PDF viewers
5704 \begin_layout Plain Layout
5705 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5706 Skim on Mac OSX and SumatraPDF on Windows.
5715 facility (also called
5720 This means that you can tell LyX to put the cursor to a specific line in
5721 the document by clicking at the respective position in the DVI/PDF output.
5722 To achieve this, the viewer must be able to communicate with LyX.
5723 This is done via the LyX server either by using the named pipe (
5727 ), or the UNIX domain socket (
5731 ) that LyX creates in its temporary directory (this is the way the
5732 \begin_inset Flex Code
5735 \begin_layout Plain Layout
5741 program communicates with LyX).
5742 In some cases, you need a helper script that mediates between the viewer
5743 and LyX, in others, the viewer can communicate with LyX directly.
5744 This depends on the selected viewer and on your operating system.
5745 The same applies to the way viewers need to be configured and the way the
5746 reverse search is actually performed.
5747 In what follows, we will thus describe how to setup reverse search for
5749 Before we turn to this, though, we will explain what needs to be done generally
5750 to enable reverse search in the DVI/PDF output.
5753 \begin_layout Subsection
5754 \begin_inset CommandInset label
5756 name "sub:rev-search"
5763 \begin_layout Standard
5764 In most cases LyX will do the work for you by enabling
5765 \begin_inset Flex MenuItem
5768 \begin_layout Plain Layout
5769 Document\SpecialChar \menuseparator
5770 Output\SpecialChar \menuseparator
5771 Synchronize with Output
5777 In such a case LyX will automatically insert the necessary SyncTeX macro
5778 (for PDF) or load the srcltx package (for DVI) respectively.
5779 This option can be easily reached also on
5780 \begin_inset Flex Code
5783 \begin_layout Plain Layout
5792 \begin_layout Standard
5793 If you need a different setting, you can select or input a custom macro
5794 from the drop down box just below
5795 \begin_inset Flex MenuItem
5798 \begin_layout Plain Layout
5799 Document\SpecialChar \menuseparator
5800 Output\SpecialChar \menuseparator
5801 Synchronize with Output
5809 \begin_layout Standard
5810 Please note that including the
5811 \begin_inset Flex Code
5814 \begin_layout Plain Layout
5821 \begin_inset Flex Code
5824 \begin_layout Plain Layout
5830 sometimes has an undesired impact on the typesetting.
5831 Thus, you should switch output synchronization off for the final typesetting
5833 \begin_inset Flex Code
5836 \begin_layout Plain Layout
5843 \begin_inset Flex Code
5846 \begin_layout Plain Layout
5855 \begin_layout Standard
5856 In case you need some more special settings that are not covered by the
5857 automatic settings, read the next section about how to set up output synchroniz
5859 If the automatic setup suits your needs, you can readily jump to section
5860 \begin_inset space ~
5864 \begin_inset CommandInset ref
5866 reference "sub:configuring-viewers"
5870 , where the necessary configuration steps in your viewer -- needed both
5871 with the automatic and the manual setup -- are described.
5874 \begin_layout Subsection
5878 \begin_layout Standard
5879 LaTeX provides several different methods for reverse search.
5880 Some are built-in in the
5881 \begin_inset Flex Code
5884 \begin_layout Plain Layout
5890 program, some are provided by external packages.
5891 Your choice depends on whether your LaTeX distribution already provides
5892 a given method (the built-in methods are rather new) and whether your viewer
5894 The available methods are described in the following.
5897 \begin_layout Subsubsection*
5898 Built-in DVI-search via src-specials (DVI only)
5901 \begin_layout Standard
5902 This method provides the DVI file with the necessary information for reverse
5904 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5905 distribution should include it), and it works reliably.
5906 To enable it, change the
5907 \begin_inset Flex MenuItem
5910 \begin_layout Plain Layout
5915 \begin_layout Plain Layout
5928 \begin_inset Flex MenuItem
5931 \begin_layout Plain Layout
5936 \begin_layout Plain Layout
5943 eX (plain)->DraftDVI
5949 \begin_inset Flex MenuItem
5952 \begin_layout Plain Layout
5953 Preferences\SpecialChar \menuseparator
5954 File Handling\SpecialChar \menuseparator
5961 \begin_inset Flex Code
5964 \begin_layout Plain Layout
5965 latex -src-specials $$i
5971 If this doesn't work, check if your TeX engine needs different options
5972 (the syntax might differ in some distributions).
5975 \begin_layout Subsubsection*
5976 External Packages (PDFSync and scrltx)
5979 \begin_layout Standard
5988 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5990 In order to enable it, load the packages in the LyX preamble:
5993 \begin_layout Itemize
5994 \begin_inset Flex Code
5997 \begin_layout Plain Layout
6005 for reverse PDF search,
6008 \begin_layout Itemize
6010 \begin_inset Flex Code
6013 \begin_layout Plain Layout
6016 usepackage[active]{srcltx}
6021 for reverse DVI search.
6024 \begin_layout Standard
6025 If you want to be able to perform both DVI and PDF reverse searches, you
6026 can also insert in the preamble the following lines
6029 \begin_layout LyX-Code
6033 \begin_inset Newline newline
6039 \begin_inset Newline newline
6045 \begin_inset Newline newline
6051 \begin_inset Newline newline
6056 usepackage[active]{srcltx}
6057 \begin_inset Newline newline
6065 \begin_layout Standard
6066 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6067 right package will be used.
6070 \begin_layout Standard
6071 Note that PDFSync might affect the output layout of your document.
6072 It is therefore advised to disable PDFsync for final documents.
6075 \begin_layout Subsubsection*
6076 Built-in reverse search via SyncTeX (DVI and PDF)
6079 \begin_layout Standard
6081 \begin_inset Flex Code
6084 \begin_layout Plain Layout
6090 have built-in support for both PDF and DVI reverse search.
6095 facility is basically the result of the integration of the PDFSync package
6096 to the pdftex program and its merge with the
6101 You need at least TeXLive 2008 or a recent MikTeX distribution in order
6103 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6104 already provide SyncTeX support.
6107 \begin_layout Standard
6108 To enable SyncTeX for DVI output, change the
6109 \begin_inset Flex MenuItem
6112 \begin_layout Plain Layout
6117 \begin_layout Plain Layout
6130 \begin_inset Flex MenuItem
6133 \begin_layout Plain Layout
6138 \begin_layout Plain Layout
6145 eX (plain) -> DraftDVI
6151 \begin_inset Flex MenuItem
6154 \begin_layout Plain Layout
6155 Preferences\SpecialChar \menuseparator
6156 File Handling\SpecialChar \menuseparator
6163 \begin_inset Flex Code
6166 \begin_layout Plain Layout
6167 latex -synctex=1 $$i
6172 , and for PDF output, change the
6173 \begin_inset Flex MenuItem
6176 \begin_layout Plain Layout
6181 \begin_layout Plain Layout
6188 eX (pdflatex) -> PDF (pdflatex)
6194 \begin_inset Flex Code
6197 \begin_layout Plain Layout
6198 pdflatex -synctex=1 $$i
6204 Check the documentation of your viewer whether the viewer needs to be configure
6205 d for the use with SyncTeX.
6209 \begin_layout Plain Layout
6211 \begin_inset Flex Code
6214 \begin_layout Plain Layout
6220 option enables gzip compression.
6221 If your viewer does not support it, you should instead use
6222 \begin_inset Flex Code
6225 \begin_layout Plain Layout
6239 \begin_layout Subsection
6240 Configuring and using specific viewers
6241 \begin_inset CommandInset label
6243 name "sub:configuring-viewers"
6250 \begin_layout Subsubsection*
6251 Xdvi (all platforms)
6254 \begin_layout Standard
6256 \begin_inset Flex Code
6259 \begin_layout Plain Layout
6265 , you don't need to do anything else for performing a reverse DVI search,
6266 as LyX already provides the necessary hooks for automatically using the
6268 \begin_inset Flex Code
6271 \begin_layout Plain Layout
6278 Just setup your document as described above (reverse search is triggered
6279 by Ctrl-click or Alt-click on Mac OSX, respectively).
6282 \begin_layout Standard
6283 However, if for whatever reason you want to use the named pipe instead of
6284 the socket for communicating with LyX, simply change the DVI viewer in
6286 \begin_inset Flex MenuItem
6289 \begin_layout Plain Layout
6290 Preferences\SpecialChar \menuseparator
6291 File Handling\SpecialChar \menuseparator
6301 \begin_layout Plain Layout
6302 On Mac OSX you have to use
6303 \begin_inset Flex Code
6306 \begin_layout Plain Layout
6307 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6318 \begin_inset Flex Code
6321 \begin_layout Plain Layout
6322 xdvi -editor 'lyxeditor.sh %f %l'
6328 \begin_inset Flex Code
6331 \begin_layout Plain Layout
6337 is a suitable script.
6338 For example, a minimal shell script is the following one:
6341 \begin_layout LyX-Code
6343 \begin_inset Newline newline
6346 LYXPIPE="/path/to/lyxpipe"
6347 \begin_inset Newline newline
6350 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6351 \begin_inset Newline newline
6354 echo "$COMMAND" > "${LYXPIPE}".in || exit
6355 \begin_inset Newline newline
6358 read < "${LYXPIPE}".out || exit
6361 \begin_layout Standard
6363 \begin_inset Flex Code
6366 \begin_layout Plain Layout
6376 \begin_layout Plain Layout
6383 XServer pipe path specified in
6384 \begin_inset Flex MenuItem
6387 \begin_layout Plain Layout
6388 Preferences\SpecialChar \menuseparator
6398 \begin_layout Plain Layout
6400 \begin_inset Flex Code
6403 \begin_layout Plain Layout
6409 folder of a source distribution you can find a
6410 \begin_inset Flex Code
6413 \begin_layout Plain Layout
6419 script which is able to locate the
6423 based on your preferences.
6431 \begin_layout Subsubsection*
6435 \begin_layout Standard
6437 \begin_inset Flex Code
6440 \begin_layout Plain Layout
6441 /Applications/MacDviX_Folder/calleditor.script
6446 , add the following lines:
6449 \begin_layout LyX-Code
6454 \begin_layout Plain Layout
6461 X.app/Contents/MacOS/lyxeditor "$2" $1
6462 \begin_inset Newline newline
6468 \begin_layout Standard
6469 Modify the lines accordingly if you install LyX somewhere else than in the
6470 Applications folder.
6473 \begin_layout Standard
6474 Reverse search is triggered by Alt-click (OPTION-click).
6477 \begin_layout Subsubsection*
6481 \begin_layout Standard
6483 \begin_inset Flex Code
6486 \begin_layout Plain Layout
6487 open -a Skim.app $$i
6492 to the viewer setting in
6493 \begin_inset Flex MenuItem
6496 \begin_layout Plain Layout
6497 Preferences\SpecialChar \menuseparator
6498 File Handling\SpecialChar \menuseparator
6499 File formats\SpecialChar \menuseparator
6506 \begin_inset Flex MenuItem
6509 \begin_layout Plain Layout
6510 Skim\SpecialChar \menuseparator
6511 Preferences\SpecialChar \menuseparator
6521 \begin_layout Plain Layout
6531 \begin_layout Standard
6532 Reverse search is triggered by COMMAND-SHIFT-click
6535 \begin_layout Subsubsection*
6539 \begin_layout Standard
6541 \begin_inset Flex MenuItem
6544 \begin_layout Plain Layout
6545 Settings\SpecialChar \menuseparator
6546 Configure Okular\SpecialChar \ldots{}
6547 \SpecialChar \menuseparator
6554 \begin_inset Quotes eld
6558 \begin_inset Quotes erd
6562 \begin_inset Flex Code
6565 \begin_layout Plain Layout
6574 \begin_layout Standard
6575 Reverse search is triggered by SHIFT-click.
6578 \begin_layout Subsubsection*
6582 \begin_layout Standard
6583 Launch yap, choose its
6584 \begin_inset Flex MenuItem
6587 \begin_layout Plain Layout
6588 View\SpecialChar \menuseparator
6595 \begin_inset Quotes eld
6599 \begin_inset Quotes erd
6604 \begin_inset Quotes eld
6607 New\SpecialChar \ldots{}
6609 \begin_inset Quotes erd
6612 button and, in the window that opens, enter
6613 \begin_inset Quotes eld
6617 \begin_inset Quotes erd
6620 (or any other name you like) in the
6621 \begin_inset Quotes eld
6625 \begin_inset Quotes erd
6629 Now click on the button labeled
6630 \begin_inset Quotes eld
6633 \SpecialChar \ldots{}
6635 \begin_inset Quotes erd
6638 to open a file dialog and navigate to the directory containing the batch
6640 \begin_inset Flex Code
6643 \begin_layout Plain Layout
6651 \begin_inset Flex Code
6654 \begin_layout Plain Layout
6660 and then specify the program arguments as
6661 \begin_inset Flex Code
6664 \begin_layout Plain Layout
6672 \begin_inset Flex Code
6675 \begin_layout Plain Layout
6681 wrapper is used for communicating with LyX through the
6688 \begin_layout LyX-Code
6690 \begin_inset Newline newline
6693 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6702 \begin_inset Newline newline
6716 \begin_layout Standard
6717 Make sure that the LyXServer pipe path you specified in LyX is
6718 \begin_inset Flex Code
6721 \begin_layout Plain Layout
6735 , otherwise change the
6736 \begin_inset Flex Code
6739 \begin_layout Plain Layout
6745 wrapper accordingly.
6748 \begin_layout Standard
6749 In yap, reverse search is triggered by double-click.
6752 \begin_layout Subsubsection*
6753 SumatraPDF (Windows)
6756 \begin_layout Standard
6757 In order to use SumatraPDF for inverse search, enter
6758 \begin_inset Flex Code
6761 \begin_layout Plain Layout
6762 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6767 in the viewer setting in
6768 \begin_inset Flex MenuItem
6771 \begin_layout Plain Layout
6772 Preferences\SpecialChar \menuseparator
6773 File Handling\SpecialChar \menuseparator
6774 File formats\SpecialChar \menuseparator
6781 \begin_inset Flex Code
6784 \begin_layout Plain Layout
6790 is the previous wrapper.
6791 If SumatraPDF.exe is not in your command PATH, use its full file name.
6794 \begin_layout Standard
6795 Reverse search is triggered by double-click.
6798 \begin_layout Subsubsection*
6802 \begin_layout Standard
6803 First of all, make sure that yap is your default DVI viewer in the Windows
6804 environment, then launch it, choose its
6805 \begin_inset Flex MenuItem
6808 \begin_layout Plain Layout
6809 View\SpecialChar \menuseparator
6816 \begin_inset Quotes eld
6820 \begin_inset Quotes erd
6825 \begin_inset Quotes eld
6828 New\SpecialChar \ldots{}
6830 \begin_inset Quotes erd
6833 button and, in the window that opens, enter
6834 \begin_inset Quotes eld
6838 \begin_inset Quotes erd
6841 (or any other name you like) in the
6842 \begin_inset Quotes eld
6846 \begin_inset Quotes erd
6850 Now click on the button labeled
6851 \begin_inset Quotes eld
6854 \SpecialChar \ldots{}
6856 \begin_inset Quotes erd
6859 to open a file dialog and navigate to the directory containing the
6860 \begin_inset Flex Code
6863 \begin_layout Plain Layout
6869 program (which is installed by default on Cygwin along with the LyX executable).
6871 \begin_inset Flex Code
6874 \begin_layout Plain Layout
6880 and then specify the program arguments as
6881 \begin_inset Flex Code
6884 \begin_layout Plain Layout
6891 In this way, you will be using the
6895 for communicating with LyX.
6896 If, for whatever reason, you want to use the
6901 \begin_inset Flex Code
6904 \begin_layout Plain Layout
6910 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6913 \begin_layout Standard
6914 In yap, reverse search is triggered by double-click.
6917 \begin_layout Subsubsection*
6921 \begin_layout Standard
6922 In order to use SumatraPDF for inverse search, enter
6923 \begin_inset Flex Code
6926 \begin_layout Plain Layout
6932 in the viewer setting in
6933 \begin_inset Flex MenuItem
6936 \begin_layout Plain Layout
6937 Preferences\SpecialChar \menuseparator
6938 File Handling\SpecialChar \menuseparator
6939 File formats\SpecialChar \menuseparator
6946 \begin_inset Flex Code
6949 \begin_layout Plain Layout
6955 is the following script (to be placed in your command PATH,
6956 \begin_inset Flex Code
6959 \begin_layout Plain Layout
6965 being the best choice):
6968 \begin_layout LyX-Code
6970 \begin_inset Newline newline
6974 \begin_inset Newline newline
6977 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6980 \begin_layout Standard
6981 This wrapper script is needed because SumatraPDF is a native Windows application
6982 and does not understand the posix paths used by the Cygwin version of LyX.
6983 If SumatraPDF.exe is not in your command PATH, use its full posix path in
6986 \begin_inset Flex Code
6989 \begin_layout Plain Layout
6995 enables communication via the
7001 \begin_inset Flex Code
7004 \begin_layout Plain Layout
7010 option if you want to use the
7014 , and be sure to specify the LyXServer pipe path in the LyX preferences.
7017 \begin_layout Standard
7018 Reverse search is triggered by double-click.
7021 \begin_layout Section
7025 \begin_layout Standard
7026 Forward search is, as the name implies, in a sense the
7027 \begin_inset Quotes eld
7031 \begin_inset Quotes erd
7035 It allows you to let the viewer jump to a given position from within LyX.
7036 If forward search is set up (as described in what follows), you can put
7037 the cursor anywhere in your LyX document, and hit
7038 \begin_inset Flex MenuItem
7041 \begin_layout Plain Layout
7042 Navigate\SpecialChar \menuseparator
7049 \begin_inset Flex MenuItem
7052 \begin_layout Plain Layout
7058 in the context menu via right mouse click), and then the viewer will jump
7059 to that position as well.
7060 This implies, of course, that your viewer supports this function.
7063 \begin_layout Standard
7064 To make forward search possible, you first need to provide the generated
7065 output PDF/DVI file with additional information about the TeX sources.
7066 This can be done via the methods described in the section
7067 \begin_inset CommandInset ref
7069 reference "sub:rev-search"
7076 \begin_layout Standard
7077 Additionally, you need to configure LyX for using your viewers in
7078 \begin_inset Flex MenuItem
7081 \begin_layout Plain Layout
7082 Tools\SpecialChar \menuseparator
7083 Preferences\SpecialChar \menuseparator
7084 Output\SpecialChar \menuseparator
7091 We provide a range of tested configurations for some viewers, which you
7092 can select from the drop down list.
7093 If none of these configurations suits you, you have to find out and enter
7094 a suitable configuration yourself.
7095 The definition syntax uses the following placeholders:
7098 \begin_layout Itemize
7100 \begin_inset Flex Code
7103 \begin_layout Plain Layout
7112 \begin_layout Itemize
7114 \begin_inset Flex Code
7117 \begin_layout Plain Layout
7123 : name of the (temporary) exported .tex file
7126 \begin_layout Itemize
7128 \begin_inset Flex Code
7131 \begin_layout Plain Layout
7137 : name of the exported output file (either dvi or pdf, depending on which
7138 one exists in the temporary directory)
7141 \begin_layout Standard
7142 Note that only some of the viewers provide full forward search functionality,
7143 among them yap, xdvi, okular and Sumatra PDF
7147 \begin_layout Plain Layout
7148 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
7155 While many of the widespread PDF viewers (most notably Adobe Reader) do
7156 not support forward search at all, some other viewers -- e.
7157 \begin_inset space \thinspace{}
7161 evince and xpdf -- allow at least to reload the document and jump to a
7162 specific page of the file, so you can at least navigate
7163 \begin_inset Quotes eld
7167 \begin_inset Quotes erd
7171 These latter functionality is provided by an external call of synctex (see
7172 the predefined example configurations).
7176 \begin_layout Standard
7177 Forward search works both with DVI and PDF output.
7178 LyX simply checks which preview format you have used before (i.
7179 \begin_inset space \thinspace{}
7182 e., which format is already there in the temporary directory) and chooses
7183 the appropriate configuration for the respective format.
7187 \begin_layout Chapter
7188 Special Document Classes
7191 \begin_layout Section
7195 \begin_layout Standard
7201 \begin_layout Subsection
7205 \begin_layout Standard
7206 This section describes how LyX can be used to write articles for submission
7207 to the scientific journal
7209 Astronomy and Astrophysics
7211 (www.edpsciences.fr/aa/
7212 \begin_inset Flex URL
7215 \begin_layout Plain Layout
7217 http://www.edpsciences.fr/aa/
7222 ) using Version 5.01 of the document class
7227 This package can be downloaded from the ftp site
7230 \begin_layout Standard
7231 \begin_inset VSpace medskip
7237 \begin_layout Standard
7239 \begin_inset Flex URL
7242 \begin_layout Plain Layout
7244 ftp://ftp.edpsciences.org/pub/aa/readme.html
7252 \begin_layout Standard
7253 \begin_inset VSpace medskip
7259 \begin_layout Standard
7260 A manual comes together with that package, and this text is not meant to
7261 replace the original manual but is merely a short guide in how to realize
7262 the correct form of your paper.
7266 \begin_layout Standard
7267 Please note that the publisher of the journal was changed from Springer
7268 to EDP Sciences starting January 1, 2001.
7269 That change involved also some slight changes to the style files, namely
7270 the removal of the thesaurus command.
7271 The LyX class aa supports the newest version of these style files, V 5.01.
7272 If you have an older version installed, please upgrade.
7273 For compatibility, the old (version 4) layout has been kept as
7278 Please refer to the comments in
7280 LyXDir/layouts/aapaper.layout
7285 \begin_layout Subsection
7289 \begin_layout Standard
7290 It is recommended you start from the example template distributed with LyX.
7291 If you are not using a template, note the following settings:
7294 \begin_layout Itemize
7301 Document\SpecialChar \menuseparator
7304 dialog (OK, that one was obvious).
7307 \begin_layout Itemize
7308 Don't change the option
7311 \begin_inset space ~
7321 The whole layout is done by the macros, you shouldn't change anything.
7324 \begin_layout Subsection
7328 \begin_layout Standard
7329 First thing to enter is the header information.
7330 It consists of seven entries, of which some are optional.
7334 \begin_layout Itemize
7342 \begin_layout Itemize
7350 \begin_layout Itemize
7358 \begin_layout Itemize
7366 \begin_layout Itemize
7371 : [optional] if more than one author: whom to contact for offprint requests.
7374 \begin_layout Itemize
7379 : [optional] mail address for contacts.
7382 \begin_layout Itemize
7390 Received: <date>; Accepted <date>
7393 \begin_layout Standard
7394 There is no need to issue the
7400 command, this is done automatically by LyX when the header is finished.
7401 Although the order of the single header entries doesn't matter it is advised
7402 to keep the above sequence, just to get the best optics and meets the layout
7403 of the real document.
7406 \begin_layout Standard
7407 If you want to place footnotes in the header block, e.
7408 \begin_inset space \thinspace{}
7412 \begin_inset space \space{}
7415 to state your present address, just use the standard footnote via the menu
7418 Insert\SpecialChar \menuseparator
7422 LyX will automagically use the term
7431 \begin_layout Standard
7432 In addition to these topics, the macros use three additional LaTeX commands
7433 that have no counterpart in LyX:
7436 \begin_layout Itemize
7443 to separate different names for more than one author and institute, respectivel
7447 \begin_layout Itemize
7454 to mark corresponding author/institute pairs.
7455 The institutes are numbered sequentially as they appear in the
7459 field, so you have to put a marker to each author.
7462 \begin_layout Itemize
7469 to supply an email address for fast contact.
7472 \begin_layout Standard
7473 In all cases, the appropriate command has to be entered in LyX and marked
7479 \begin_layout Subsection
7483 \begin_layout Standard
7484 The abstract should immediately follow the header block.
7485 With version 5 the abstract environment was changed to a command, and there
7486 is now a resctriction to only one paragraph.
7487 In addition, it should contain an entry with the keywords.
7488 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7495 by hand and mark it as LaTeX code.
7496 Refer to the example paper.
7499 \begin_layout Subsection
7500 Supported environments
7503 \begin_layout Standard
7504 The A&A paper layout supports the following environments for structuring
7508 \begin_layout Itemize
7514 \begin_layout Itemize
7520 \begin_layout Itemize
7526 \begin_layout Itemize
7532 \begin_layout Itemize
7538 \begin_layout Itemize
7544 \begin_layout Itemize
7550 \begin_layout Itemize
7556 \begin_layout Itemize
7562 \begin_layout Itemize
7568 \begin_layout Itemize
7574 \begin_layout Itemize
7580 \begin_layout Subsection
7581 Commands not supported by LyX
7584 \begin_layout Standard
7585 Some commands are not yet supported by the
7590 Some have already been mentioned.
7591 For the sake of completeness, they are listed all together here:
7594 \begin_layout Itemize
7602 \begin_layout Itemize
7610 \begin_layout Itemize
7618 \begin_layout Itemize
7626 \begin_layout Itemize
7634 \begin_layout Itemize
7642 \begin_layout Itemize
7650 \begin_layout Itemize
7658 \begin_layout Standard
7659 If you want to use any of these commands, you have to enter them yourself.
7662 Do not forget to mark them as LaTeX code!
7665 \begin_layout Subsection
7666 Figure and Table Floats
7669 \begin_layout Standard
7670 LyX provides support for the necessary float environments
7672 figure, figure*, table
7678 , therefore we won't tell much about it here.
7682 \begin_inset space ~
7688 Just remember that tables should be left-aligned.
7689 For that, select the table and change the alignment in
7691 Edit\SpecialChar \menuseparator
7693 \begin_inset space ~
7699 \begin_layout Standard
7700 There is only one special thing: the figures with caption besides the figure.
7701 To create such a figure, you have to do the following:
7704 \begin_layout Enumerate
7705 Create a wide figure float:
7707 Insert\SpecialChar \menuseparator
7708 Float\SpecialChar \menuseparator
7711 , then right click in the figure and select
7717 \begin_inset space ~
7725 \begin_layout Enumerate
7726 Enter your caption text.
7729 \begin_layout Enumerate
7734 to move the cursor above the caption.
7737 \begin_layout Enumerate
7741 \begin_layout Enumerate
7742 Position the cursor behind the figure and insert a horizontal fill:
7744 Insert\SpecialChar \menuseparator
7746 \begin_inset space ~
7749 Character\SpecialChar \menuseparator
7751 \begin_inset space ~
7759 \begin_layout Enumerate
7760 Switch to LaTeX mode:
7763 \begin_inset space ~
7771 \begin_layout Enumerate
7781 Do not close the brace!
7784 \begin_layout Enumerate
7785 Position the cursor behind the caption text, switch to LaTeX mode and insert
7789 \begin_inset space ~
7801 \begin_layout Standard
7802 Also, refer to the figures in the example paper.
7805 \begin_layout Subsection
7809 \begin_layout Standard
7810 For submission, the paper has to be formated in a special double-spacing
7812 For this purpose, you have to give the option
7816 to the documentclass.
7817 This must be done using the extra class options field in the
7819 Document\SpecialChar \menuseparator
7823 Just enter the string
7830 \begin_layout Subsection
7834 \begin_layout Standard
7839 directory contains an example paper written with LyX.
7840 It is the example paper from the original macro package, translated to
7842 Use it for inspiration, and compare the original LaTeX code with LyX way
7846 \begin_layout Section
7850 \begin_layout Standard
7856 \begin_layout Subsection
7860 \begin_layout Standard
7861 AASTeX is a set of macros produced by the American Astronomical Society
7862 to facilitate electronic manuscript submission to the three journals they
7863 publish: the Astrophysical Journal (including the Letters and Supplement),
7864 the Astronomical Journal, and the Publications of the Astronomical Society
7866 LyX has proven to be an excellent tool for generating these documents,
7867 especially given its equation, citation, and figure handling capabilities.
7868 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7869 is the version described here, or higher.
7870 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7871 incompatible with LyX.
7872 The AASTeX package may be downloaded from the AASTeX Web site
7875 \begin_layout Standard
7876 \begin_inset VSpace medskip
7882 \begin_layout Standard
7884 \begin_inset Flex URL
7887 \begin_layout Plain Layout
7889 http://www.journals.uchicago.edu/AAS/AASTeX
7897 \begin_layout Standard
7898 \begin_inset VSpace medskip
7904 \begin_layout Standard
7905 A complete user guide is contained in that package and you should familiarize
7906 yourself with it thoroughly before embarking on writing a paper in LyX.
7907 LyX will not reduce the need to figure out all the AASTeX commands, it
7908 will only reduce the drudgery of typing everything in.
7909 It is your responsibility to ensure that the final exported LaTeX document
7910 conforms completely to the requirements of the journal to which you are
7911 submitting your paper.
7914 \begin_layout Subsection
7915 Starting a New Paper
7918 \begin_layout Standard
7919 I strongly suggest that you start with the AASTeX template file.
7922 File\SpecialChar \menuseparator
7929 , enter the new file name, then choose the
7934 This will show the most common fields found in a manuscript.
7935 Simply overwrite the existing text (including the brackets,
7939 ) with the correct information.
7940 Many of the AASTeX commands and environments can be implemented directly
7941 in LyX, but some cannot: most noticeably
7953 , which should stick out like a sore thumb if you actually just opened the
7955 For commands such as these, the LaTeX code must be entered directly and
7957 Such commands are referred to as TeX code, or Evil Red Text.
7958 I tried to minimize the amount of TeX code needed in an AASTeX document,
7959 but there is still a bit more required than any of us would like.
7962 \begin_layout Subsection
7963 Finishing Your Paper
7966 \begin_layout Standard
7967 When the paper is finished to your satisfaction and previews/prints correctly,
7969 \begin_inset Quotes eld
7973 \begin_inset Quotes erd
7976 actions which need to be done before you submit it to the journals.
7980 \begin_layout Enumerate
7981 Export your paper as a LaTeX file (
7983 File\SpecialChar \menuseparator
7984 Export\SpecialChar \menuseparator
7991 \begin_layout Enumerate
7996 file with your favorite text editor
8000 \begin_layout Enumerate
8001 remove the comment lines before the
8010 \begin_layout Enumerate
8015 usepackage...{fontenc}
8017 line if it appears (usually just after
8032 \begin_layout Enumerate
8033 remove everything between (and including) the
8045 commands, except for any commands you specifically put into the LaTeX preamble
8046 (which should appear immediately after the
8047 \begin_inset Quotes eld
8050 User specified LaTeX commands
8051 \begin_inset Quotes erd
8062 \begin_layout Enumerate
8063 Run the resulting file through LaTeX to make sure it still processes correctly.
8066 \begin_layout Enumerate
8067 Reread the journal requirements to make sure your filenames and formats
8071 \begin_layout Enumerate
8075 \begin_layout Subsection
8076 Comments On Specific Commands
8079 \begin_layout Standard
8080 I will not describe the detailed usage of the individual AASTeX commands:
8081 the AASTeX User Guide (
8085 ) gives a good description of each.
8086 Thus it's probably easiest for me to go down the list as found in the guide
8087 and offer comments where necessary.
8088 So let's begin \SpecialChar \ldots{}
8092 \begin_layout Subsubsection
8093 Things that work as expected
8096 \begin_layout Standard
8100 \begin_layout Plain Layout
8112 \begin_layout Standard
8113 Because they work as you might expect, I simply list them and the section
8214 begin{thebibliography}
8222 (2.13.2), all the cite commands and their variations (2.13.2), the generic
8223 graphicx figure commands (2.14.1),
8247 (2.15.4, amongst other places),
8274 \begin_layout Standard
8275 The following style options also work correctly:
8296 Simply put them in the
8302 Layout\SpecialChar \menuseparator
8308 \begin_layout Standard
8312 \begin_layout Plain Layout
8324 \begin_layout Subsubsection
8325 Things that work, but require more comment
8328 \begin_layout Standard
8329 The following items work, but require a little more discussion:
8332 \begin_layout Itemize
8333 These items are reserved for use by the journal editors, but you can put
8334 them into the LaTeX preamble if you feel compelled to do so:
8367 \begin_layout Itemize
8368 These items may be placed in the LaTeX preamble, and are included as blanks
8369 in the template file:
8390 \begin_layout Itemize
8397 (2.3) – can only be used
8398 \begin_inset Quotes eld
8402 \begin_inset Quotes erd
8405 , not in the middle of a paragraph.
8406 Use TeX code if you need to embed it.
8409 \begin_layout Itemize
8416 (2.3) – will have extra {} after it.
8417 This should not cause an error.
8420 \begin_layout Itemize
8427 (2.6) – can only be used
8428 \begin_inset Quotes eld
8432 \begin_inset Quotes erd
8435 , not in the middle of a paragraph.
8436 Use TeX code if you need to embed it.
8439 \begin_layout Itemize
8446 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8450 \begin_layout Itemize
8464 \begin_layout Itemize
8471 (2.9) – will have extra {} after it.
8472 This should not cause an error.
8475 \begin_layout Itemize
8482 (2.11) – will have extra {} after it.
8483 This should not cause an error.
8486 \begin_layout Itemize
8493 (2.14.2) – you can insert an optional filename argument by placing the cursor
8494 at the beginning of the text and selecting
8496 Insert\SpecialChar \menuseparator
8501 \begin_inset Quotes eld
8505 \begin_inset Quotes erd
8508 inserts an optional argument of the type needed by
8515 Hopefully it will be renamed someday.
8518 \begin_layout Itemize
8531 for the catalog ID optional parameter
8534 \begin_layout Itemize
8547 for the catalog ID optional parameter
8550 \begin_layout Subsubsection
8551 Things not implemented, use TeX code
8554 \begin_layout Standard
8558 \begin_layout Plain Layout
8570 \begin_layout Standard
8593 setcounter{equation}
8595 (2.12), Journal name abbreviations (2.13.4),
8631 (2.15.4, insert it as the first element in the lefthand cell after where
8633 Don't use any of LyX's rules in the table),
8645 (2.15.5), much of Misc (2.17, except
8696 \begin_layout Standard
8700 \begin_layout Plain Layout
8712 \begin_layout Subsubsection
8713 Things that cannot be implemented
8716 \begin_layout Standard
8717 \SpecialChar \ldots{}
8718 at least in any meaningful sort of way, so I suggest ignoring them.
8719 They are the references environment (2.13.3), and the deluxetable environment
8721 If you really, really need to use deluxetable, I suggest editing it in
8722 a separate file with a text editor, then using
8724 Insert\SpecialChar \menuseparator
8726 \begin_inset space ~
8731 to include it in your LyX document.
8736 file to see an example of this.
8739 \begin_layout Subsection
8740 FAQs, Tips, Tricks, and Other Ruminations
8743 \begin_layout Subsubsection
8744 Getting LyX and AASTeX to cooperate
8747 \begin_layout Standard
8748 It can be a bit tricky to get LyX to recognize a new layout and document
8750 When all else fails, do this:
8753 \begin_layout Enumerate
8754 Make certain that LaTeX can find AASTeX.
8755 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8756 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8763 \begin_layout Enumerate
8775 \begin_layout Enumerate
8778 Tools\SpecialChar \menuseparator
8781 in LyX, then restart LyX.
8784 \begin_layout Enumerate
8785 Open a regular new file, not from a template.
8786 Does AASTeX appear in the class list in
8788 Document\SpecialChar \menuseparator
8794 \begin_layout Standard
8795 If you get a warning from an existing AASTeX document about not being able
8796 to find the AASTeX layout or a message about
8797 \begin_inset Quotes eld
8800 You should not mix title layouts with normal ones
8801 \begin_inset Quotes erd
8804 , things haven't been installed correctly.
8807 \begin_layout Subsubsection
8808 LaTeX error processing a table
8811 \begin_layout Standard
8812 LyX, by default, attempts to center the table caption/title.
8813 This seems to produce a bad interaction in AASTeX so you should click somewhere
8814 in the caption/title, then select
8816 Edit\SpecialChar \menuseparator
8818 \begin_inset space ~
8832 This took care of it for me.
8835 \begin_layout Subsubsection
8839 \begin_layout Standard
8840 A couple of things: 1) I have noticed some funny spacing in the reference
8841 entries in the text.
8842 When you enter the bibliography item data, make sure their is
8846 space between the last author and the parenthesis setting off the year;
8850 \begin_inset space \thinspace{}
8854 \begin_inset space \space{}
8868 2) Entering the references at all is not obvious.
8869 The easiest thing is to start typing your first reference at the end of
8870 the document, then mark it as type
8875 That will put a small gray box in front of what you just typed.
8876 Click on the box to fill in the rest of the information.
8877 For new references, go to the end of an existing reference and press return.
8878 That will create a new line with its own box, etc.
8881 \begin_layout Subsubsection
8885 \begin_layout Standard
8886 Even though AASTeX provides its own figure commands (
8892 , for example), I much prefer LaTeX's standard figure commands (with the
8901 \begin_inset space ~
8904 commands as TeX code into a Figure Float box if you desire, but I never
8905 have much luck getting the layout right.
8906 With the standard graphics, LyX will insert a
8910 usepackage{graphicx}
8912 command into the LaTeX preamble and handle the figures in the standard
8913 LaTeX2e way, interspersing the figures in the text.
8914 I believe ApJ accepts figures exactly this way now; AJ might still use
8916 \begin_inset Quotes eld
8919 stack everything at the end
8920 \begin_inset Quotes erd
8926 \begin_layout Subsubsection
8927 Things I could have done, but didn't
8930 \begin_layout Standard
8932 \begin_inset Quotes eld
8936 \begin_inset Quotes erd
8939 things I could have implemented, but chose not to.
8940 For instance, I saw no point in double-spacing the text in the LyX window,
8941 even though it is double-spaced in the paper manuscript.
8942 Also, I chose not to make separate layouts for the preprint and preprint2
8944 Since I assume you will spend most of your time in the plain manuscript
8945 mode anyway, I decided not to chew up more disk space with this.
8949 \begin_layout Subsection
8953 \begin_layout Standard
8954 Your mileage may vary.
8955 I've now had papers published by both ApJ and AJ that have had 98% of the
8956 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8958 I have had no trouble with the submission process, and I'm sure the journals
8959 were never aware that there might be a difference.
8960 So, go forth and publish!
8963 \begin_layout Section
8967 \begin_layout Standard
8970 David Johnson; updated by Richard Heck
8973 \begin_layout Standard
8974 \begin_inset VSpace bigskip
8980 \begin_layout Standard
8982 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8983 papers to be submitted to American Mathematical Society publications.
8984 The layouts are not tailored to a specific journal, but easily can be.
8985 You should refer to the AMS documentation for specific instructions for
8986 each journal (usually it will entail only changing a single line in the
8988 That documentation is available on the Web at
8989 \begin_inset Flex URL
8992 \begin_layout Plain Layout
9000 \begin_inset Flex URL
9003 \begin_layout Plain Layout
9005 ftp://ftp.ams.org/pub/tex/amslatex/
9011 These layouts are appropriate, and useful, for any mathematical writing.
9015 \begin_layout Standard
9016 There are two basic AMS LaTeX layouts:
9019 \begin_layout Itemize
9020 amsart: The standard AMS article format.
9023 \begin_layout Itemize
9024 amsbook: the standard AMS book (really, monograph) format.
9028 \begin_layout Standard
9029 The layouts themselves contain only the minimum necessary to use the AMS
9031 They do not, in particular, contain any of the `theorem' environments used
9032 for setting theorems, lemmas, and the like.
9033 These are contained, instead, in the
9034 \begin_inset Flex Code
9037 \begin_layout Plain Layout
9043 module, which is loaded by default when when you select one of the AMS
9045 (It can also be used with other classes and can be removed, if you would
9046 rather use something else.) Less commonly used environments are in the
9047 \begin_inset Flex Code
9050 \begin_layout Plain Layout
9051 Theorems (AMS-Extended)
9056 module, which must be loaded manually.
9059 \begin_layout Standard
9060 By default, theorems and the like are numbered consecutively throughout
9061 the document, but this may be modified by loading the module
9062 \begin_inset Flex Code
9065 \begin_layout Plain Layout
9066 Theorems (Order by Section)
9071 or, if you are using
9072 \begin_inset Flex Code
9075 \begin_layout Plain Layout
9082 \begin_inset Flex Code
9085 \begin_layout Plain Layout
9086 Theorems (Order by Chapter)
9092 These will number the results as
9093 \begin_inset Formula $n.m$
9096 , where the first number refers to the section (or chapter) and the second
9097 refers to the total number of results so far in that section (or chapter).
9098 Many environments are also available unnumbered.
9099 These are indicated by an asterisk at the end.
9100 If you happen to want
9104 unnumbered results, the module
9105 \begin_inset Flex Code
9108 \begin_layout Plain Layout
9114 provides that option.
9117 \begin_layout Standard
9118 Note that these modules do not
9122 to be used with the AMS classes.
9123 It is perfectly possible to use the
9124 \begin_inset Flex Code
9127 \begin_layout Plain Layout
9133 module, and the others mentioned, with other classes, such as
9134 \begin_inset Flex Code
9137 \begin_layout Plain Layout
9144 \begin_inset Flex Code
9147 \begin_layout Plain Layout
9154 \begin_inset Flex Code
9157 \begin_layout Plain Layout
9166 \begin_layout Subsection
9167 What these layouts provide
9170 \begin_layout Standard
9171 There is a long list of included environments provided by these layouts.
9172 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9173 variety of `theorem' environments.
9174 However, the AMS recommends the environments that are available in LyX.
9178 \begin_layout Standard
9179 The following environments—as well as the standard environments, such as
9181 \begin_inset Flex Noun
9184 \begin_layout Plain Layout
9191 \begin_inset Flex Noun
9194 \begin_layout Plain Layout
9201 \begin_inset Flex Noun
9204 \begin_layout Plain Layout
9211 \begin_inset Flex Noun
9214 \begin_layout Plain Layout
9221 \begin_inset Flex Noun
9224 \begin_layout Plain Layout
9231 \begin_inset Flex Code
9234 \begin_layout Plain Layout
9241 \begin_inset Flex Code
9244 \begin_layout Plain Layout
9253 \begin_layout Description
9254 Address This should be the author's permanent address.
9257 \begin_layout Description
9259 \begin_inset space ~
9262 Address This should be the author's temporary address at the time of submission,
9263 if different from the Address.
9266 \begin_layout Description
9267 Email Author's e-mail address
9270 \begin_layout Description
9271 URL Author's Web address, if desired.
9274 \begin_layout Description
9275 Keywords Key words or phrases used to identify specific topics discussed
9279 \begin_layout Description
9280 Subjectclass These refer to the AMS Subject Classifications, published and
9283 Mathematical Reviews
9286 These are also available online at the AMS cites listed above.
9289 \begin_layout Description
9293 \begin_layout Description
9297 \begin_layout Description
9301 \begin_layout Standard
9302 The following environments are provided by both the
9303 \begin_inset Flex Code
9306 \begin_layout Plain Layout
9313 \begin_inset Flex Code
9316 \begin_layout Plain Layout
9322 modules, in the latter case in both starred (unnumbered) and unstarred
9323 (numbered) versions.
9324 These same environments are provided only in the starred versions by the
9326 \begin_inset Flex Code
9329 \begin_layout Plain Layout
9338 \begin_layout Theorem
9339 This is typically used for the statements of major results.
9343 \begin_layout Corollary*
9344 This is used for statements which follow fairly directly from previous statement
9346 Again, these can be major results.
9351 These are smaller results needed to prove other statements.
9354 \begin_layout Proposition
9355 These are less major results which (hopefully) add to the general theory
9359 \begin_layout Conjecture
9360 These are statements provided without justification, which the author does
9361 not know how to prove, but which seem to be true (to the author, at least).
9364 \begin_layout Definition*
9365 Guess what this is for.
9366 The font is different for this environment than for the previous ones.
9370 \begin_layout Example*
9371 Used for examples illustrating proven results.
9374 \begin_layout Problem
9375 It's not really known what this is for.
9376 You should figure it out.
9379 \begin_layout Exercise*
9380 Write a description for this one.
9383 \begin_layout Remark
9384 This environment is also a type of theorem, usually a lesser sort of observation.
9387 \begin_layout Claim*
9388 Often used in the course of giving a proof of a larger result.
9392 Generally, these are used to break up long arguments, using specific instances
9398 The numbering scheme for cases is on its own, not together with other numbered
9404 At the end of this environment, a QED symbol (usually a square, but it can
9405 vary with different styles) is placed.
9406 If you want to have other environments within this one—for example, Case
9407 environments—and have the QED symbol appear only after them, then the other
9408 environments need to be nested within the proof environment.
9411 Nesting Environments
9417 for information on nesting.
9420 \begin_layout Standard
9421 And these environments are provided by
9422 \begin_inset Flex Code
9425 \begin_layout Plain Layout
9426 Theorems (AMS-Extended)
9434 \begin_layout Criterion*
9435 A required condition.
9438 \begin_layout Algorithm*
9439 A general procedure to be used.
9442 \begin_layout Axiom*
9443 This is a property or statement taken as true within the system being discussed.
9446 \begin_layout Condition*
9447 Sometimes used to state a condition assumed within the present context of
9452 Similar to a Remark.
9455 \begin_layout Notation*
9456 Used for the explanation of, yes, notation.
9459 \begin_layout Summary
9460 Do we really need to tell you?
9463 \begin_layout Acknowledgement*
9467 \begin_layout Conclusion*
9468 Sometimes used at the end of a long train of argument.
9472 Used in a way similar to Proposition, though perhaps lower on the scale.
9475 \begin_layout Standard
9476 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9478 They need to be available on your system in order to use these environments.
9481 \begin_layout Section
9489 \begin_layout Standard
9495 \begin_layout Subsection
9499 \begin_layout Standard
9500 These are the layout files for some of the journals of the American Geophysical
9502 It is assumed that you have both the AGU's own class files and AGUplus
9503 installed (everything to be found at
9504 \begin_inset Flex URL
9507 \begin_layout Plain Layout
9509 ftp://ftp.agu.org/journals/latex/journals
9517 \begin_layout Subsection
9521 \begin_layout Standard
9531 They are still called this in the LyX GUI, though their LaTeX equivalents
9532 in the AGU classes are
9543 \begin_layout Standard
9544 Newly defined styles are
9581 These are mostly manuscript attributes and defined in the AGU class documentati
9585 \begin_layout Standard
9586 I suspect this is still badly incomplete.
9589 \begin_layout Subsection
9593 \begin_layout Standard
9610 \begin_layout Subsection
9614 \begin_layout Itemize
9617 Journal of Geophysical Research
9626 \begin_layout Standard
9627 Add your own, it isn't so hard! Look at the
9638 \begin_layout Subsection
9639 Bugs and things to remember
9642 \begin_layout Standard
9643 In order to use the new layouts, you must remember to do the following for
9647 \begin_layout Enumerate
9653 This can be done in the
9655 Layout\SpecialChar \menuseparator
9660 Document\SpecialChar \menuseparator
9664 (AGU articles are always in English, right? So
9671 \begin_layout Enumerate
9681 (Yes, this is a bug.)
9684 \begin_layout Enumerate
9685 Make sure you use the
9689 bibliography style, by entering
9693 into the second field of the BibTeX inset.
9694 None of the standard styles will do.
9697 \begin_layout Section
9701 \begin_layout Standard
9707 \begin_layout Subsection
9711 \begin_layout Standard
9712 Broadway is for writing plays.
9713 The format is more decorative than Hollywood, and much less standardized.
9714 This format should be suitable for workshops.
9717 \begin_layout Subsection
9721 \begin_layout Standard
9722 The same as in Hollywood.
9725 \begin_layout Subsection
9729 \begin_layout Standard
9734 names as labels then cross-reference the label to insert the name.
9735 The cross-reference dialog will show the current cast of characters.
9738 \begin_layout Subsection
9739 Paper size and Margins
9742 \begin_layout Standard
9743 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9746 \begin_layout Subsection
9750 \begin_layout Standard
9751 The following environments are available.
9752 You can use broadway.bind to get the bind keys shown at the right.
9755 \begin_layout Itemize
9759 \begin_inset Newline newline
9764 You should not have to use this, but it is here for anything that does not
9768 \begin_layout Itemize
9772 \begin_inset space \hfill{}
9776 \begin_inset Newline newline
9781 Used to describe stage setting and the action.
9782 First use of speaker names in all CAPs.
9785 \begin_layout Itemize
9789 \begin_inset space \hfill{}
9793 \begin_inset Newline newline
9798 Automatically numbered.
9799 On screen it will be arabic, but will print as Roman.
9802 \begin_layout Itemize
9806 \begin_inset space \hfill{}
9810 \begin_inset Newline newline
9820 It is just centered text.
9823 \begin_layout Itemize
9827 \begin_inset space \hfill{}
9831 \begin_inset Newline newline
9836 Not automatically numbered.
9837 You supply the number.
9838 This is because I couldn't figure out how.
9841 \begin_layout Itemize
9845 \begin_inset space \hfill{}
9849 \begin_inset Newline newline
9854 A special case of Narrative to describe the setting and action as the curtain
9858 \begin_layout Itemize
9862 \begin_inset space \hfill{}
9866 \begin_inset Newline newline
9871 The speaker's (actor's) title, centered in all CAPS.
9874 \begin_layout Itemize
9878 \begin_inset space \hfill{}
9882 \begin_inset Newline newline
9887 Instructions to the speaker.
9888 The parentheses are automatically inserted.
9889 The ( will appear on screen, but both will be in the printed play.
9890 This environment is only used within
9897 \begin_layout Itemize
9901 \begin_inset space \hfill{}
9905 \begin_inset Newline newline
9910 What the Speaker says.
9913 \begin_layout Itemize
9917 \begin_inset space \hfill{}
9921 \begin_inset Newline newline
9926 The curtain comes down.
9929 \begin_layout Itemize
9933 \begin_inset space \hfill{}
9939 \begin_layout Itemize
9943 \begin_inset space \hfill{}
9949 \begin_layout Itemize
9953 \begin_inset space \hfill{}
9959 \begin_layout Standard
9963 \begin_layout Section
9967 \begin_layout Standard
9972 can be used to type letters according to German conventions.
9973 A template file is included in
9975 .../lyx/share/templates
9977 for you to use as a starting point.
9980 \begin_layout Section
9988 \begin_layout Standard
9994 \begin_layout Subsection
9998 \begin_layout Standard
9999 This is the layout file for the European Geophysical Society journals.
10004 can be downloaded from the web site of the EGS under
10005 \begin_inset Flex URL
10008 \begin_layout Plain Layout
10018 \begin_layout Subsection
10022 \begin_layout Standard
10025 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
10033 The current layout file is unfortunately very unmodular and would benefit
10034 from using the various
10041 \begin_layout Section
10045 \begin_layout Standard
10051 \begin_layout Standard
10052 Elsevier Science Publishers B.V.
10053 provides a standard LaTeX document class (
10057 ) for submitting articles to their various journals.
10058 The style file can be downloaded directly from their web site:
10059 \begin_inset Flex URL
10062 \begin_layout Plain Layout
10064 http://www.elsevier.com/wps/find/authorsview.authors/latex
10070 Instructions are supplied along with the class file, which details the
10071 requirements of the publishers.
10072 LyX includes a package that allows for the use of this class, by a layout
10073 and a template file.
10074 Installation of the class file is the same as for any other LaTeX package;
10075 instructions are provided in the Elsevier documentation.
10078 \begin_layout Standard
10088 As the Elsevier class file is based mainly on the standard article class,
10089 most of the normal functionality is provided.
10090 The Elsevier class defines a number of mathematical environments, which
10091 are similar to the AMS environments.
10092 These commands are all described in the Elsevier documentation, and are
10096 \begin_layout Standard
10097 The easiest way to use the Elsevier style is to base documents on the included
10099 It is best not to use options such as fancy headings or the geometry package,
10100 as elements such as these are defined by Elsevier in their style file.
10101 Ideally, no extra packages except those mentioned in the Elsevier documentation
10103 Essentially, Elsevier require as
10104 \begin_inset Quotes eld
10108 \begin_inset Quotes erd
10111 a LaTeX file as possible, as their intention is to take the supplied file
10112 and replace the class file with one for the particular journal to which
10113 the paper has been submitted.
10114 This also means that not too much time should be spent on the formating
10116 When it comes to be published, this will change anyway.
10117 The rest of the usage for this layout is substantially the same as for
10118 the normal article class.
10119 For details of what Elsevier do and don't allow, refer to their documentation.
10122 \begin_layout Section
10128 \begin_inset CommandInset label
10137 \begin_layout Standard
10143 \begin_layout Subsection
10147 \begin_layout Standard
10148 This section describes how to use LyX to make slides for overhead projectors.
10149 There are two document classes that can do this: the default slides class
10155 This section documents the latter.
10158 \begin_layout Standard
10159 I'm going to say this again, nice and clear, so that there's no misunderstanding
10163 \begin_layout Standard
10164 \begin_inset VSpace bigskip
10170 \begin_layout Standard
10174 This section documents the class
10175 \begin_inset Quotes eld
10183 \begin_inset Quotes erd
10191 \begin_layout Standard
10192 \begin_inset VSpace bigskip
10198 \begin_layout Standard
10199 If you're looking for the documentation for
10200 \begin_inset Quotes eld
10208 \begin_inset Quotes erd
10211 , check out section
10212 \begin_inset space ~
10216 \begin_inset CommandInset ref
10218 reference "sec:slitex"
10223 If your machine doesn't have the
10228 \begin_inset Quotes eld
10236 \begin_inset Quotes erd
10239 ] installed, you'll probably have to use the default
10243 class, which isn't quite as good as
10248 \begin_layout Standard
10253 class is designed for use with version 2.1 of the
10257 LaTeX class file which is now an integral part of LaTeX2e.
10260 \begin_layout Subsection
10264 \begin_layout Standard
10265 Obviously, to use this document class, you need to select
10266 \begin_inset Quotes eld
10274 \begin_inset Quotes erd
10284 \begin_inset space ~
10290 There are some settings in the
10293 \begin_inset space ~
10298 dialog that you should know about that are specific to this class:
10301 \begin_layout Itemize
10302 Don't change the options
10313 \begin_inset space ~
10319 They're ignored by the
10326 \begin_layout Itemize
10327 The default font size is 20
10328 \begin_inset space \thinspace{}
10331 pt with the other options being 17
10332 \begin_inset space \thinspace{}
10336 \begin_inset space \thinspace{}
10340 \begin_inset space \thinspace{}
10346 \begin_layout Itemize
10347 The default font is
10355 but all math equations are still typeset in the usual roman font.
10358 \begin_layout Itemize
10363 supports A4 and Letter paper sizes as well as a special size for working
10365 \begin_inset space \thinspace{}
10369 It doesn't support A5, B5, legal or executive paper sizes.
10372 \begin_layout Itemize
10373 Don't bother changing the
10377 settings because they are ignored anyway.
10378 All floats appear where they are defined in the text.
10381 \begin_layout Itemize
10386 setting behaves a bit differently for this class.
10391 provides extensive footer and header capabilities including a user-defined
10394 \begin_inset space ~
10398 \begin_inset CommandInset ref
10400 reference "sec:foilfoot"
10405 The title page is treated differently to all other pages in the document
10414 has the logo centered at the bottom of the page (if one is defined).
10415 The possible page style choices and what they do are as follows:
10419 \begin_layout Labeling
10420 \labelwidthstring MMMMMMM
10427 The final output contains no page numbers, or other headers or footers
10428 (except footnotes of course).
10432 \begin_layout Labeling
10433 \labelwidthstring MMMMMMM
10440 The final output contains page numbers centered at the bottom of the page.
10441 No other headings or footers (other than footnotes).
10444 \begin_layout Labeling
10445 \labelwidthstring MMMMMMM
10450 Page numbers in lower right corner.
10451 Additional headers and footers are also shown.
10452 This is also the default.
10455 \begin_layout Labeling
10456 \labelwidthstring MMMMMMM
10461 Gives you access to the
10465 package although its use with
10469 is discouraged by the writer of the
10473 package because of some potential page layout clashes.
10477 \begin_layout Subsubsection
10481 \begin_layout Standard
10482 The following options may be used in the extra class options in the
10484 Document\SpecialChar \menuseparator
10490 \begin_layout Labeling
10491 \labelwidthstring MMMMMMx
10496 This sets up the page layout for 7.33
10497 \begin_inset space \thinspace{}
10501 \begin_inset space \thinspace{}
10504 in paper, which is about the same aspect ratio as a 35
10505 \begin_inset space \thinspace{}
10508 mm slide, making it a bit easier to work with this medium.
10511 \begin_layout Labeling
10512 \labelwidthstring MMMMMMx
10517 Places a rule across the page below the header on every page except the
10521 \begin_layout Labeling
10522 \labelwidthstring MMMMMMx
10527 Places a rule across the page above the footer on every page except the
10531 \begin_layout Labeling
10532 \labelwidthstring MMMMMMx
10537 This is automatically set each time you create a new
10546 to use the dvips driver to rotate those pages that are set as landscape
10550 \begin_layout Labeling
10551 \labelwidthstring MMMMMMx
10556 Simply changes the page dimensions to those of a landscape page but doesn't
10558 Thus if you use this option you need to use an external program to rotate
10559 each page or feed your paper through your printer as landscape.
10560 Note that this option effectively reverses the roles of the
10568 environments (don't worry these are described in the next section).
10571 \begin_layout Labeling
10572 \labelwidthstring MMMMMMx
10577 Equation numbers on the left.
10580 \begin_layout Labeling
10581 \labelwidthstring MMMMMMx
10586 Flush-left equations.
10589 \begin_layout Subsection
10590 Supported Environments
10593 \begin_layout Standard
10594 Most of the environments commonly supported in other classes are also supported
10600 There are several additional environments provided by
10604 as well as a couple added by LyX.
10605 The following environments are shared with other classes:
10608 \begin_layout Standard
10612 \begin_layout Plain Layout
10616 begin{multicols}{2}
10624 \begin_layout Itemize
10630 \begin_layout Itemize
10636 \begin_layout Itemize
10642 \begin_layout Itemize
10648 \begin_layout Itemize
10654 \begin_layout Itemize
10660 \begin_layout Itemize
10666 \begin_layout Itemize
10672 \begin_layout Itemize
10678 \begin_layout Itemize
10684 \begin_layout Itemize
10690 \begin_layout Itemize
10696 \begin_layout Itemize
10702 \begin_layout Itemize
10708 \begin_layout Itemize
10714 \begin_layout Itemize
10720 \begin_layout Itemize
10726 \begin_layout Itemize
10732 \begin_layout Standard
10736 \begin_layout Plain Layout
10748 \begin_layout Standard
10749 That is, all the major environments apart from the sectioning environments.
10750 Since foils are essentially self-contained sections, with a title and body,
10755 provides specific commands for starting new foils and these are:
10758 \begin_layout Itemize
10764 \begin_layout Itemize
10770 \begin_layout Standard
10771 LyX also provides slightly modified versions of these two environments called:
10774 \begin_layout Itemize
10780 \begin_layout Itemize
10783 ShortRotatefoilhead
10786 \begin_layout Standard
10787 and the differences will be explained in the next section.
10790 \begin_layout Standard
10791 Since foils are often used in presenting ideas or new theorems and such
10796 also provides a comprehensive box of goodies for presenting them:
10799 \begin_layout Standard
10803 \begin_layout Plain Layout
10807 begin{multicols}{2}
10815 \begin_layout Itemize
10821 \begin_layout Itemize
10827 \begin_layout Itemize
10833 \begin_layout Itemize
10839 \begin_layout Itemize
10845 \begin_layout Itemize
10851 \begin_layout Itemize
10857 \begin_layout Itemize
10863 \begin_layout Itemize
10869 \begin_layout Itemize
10875 \begin_layout Itemize
10881 \begin_layout Standard
10885 \begin_layout Plain Layout
10897 \begin_layout Standard
10898 The starred versions are unnumbered while the unstarred versions are numbered.
10899 There are also two list environments added by LyX and these are:
10902 \begin_layout Itemize
10908 \begin_layout Itemize
10914 \begin_layout Standard
10919 provides some powerful header and footer capabilities that are best set
10920 in the preamble although they may be set at any point in a document.
10921 If you want to change these settings in your document the best place to
10922 do so is at the very top of a foil, i.
10923 \begin_inset space \thinspace{}
10929 \begin_inset space \space{}
10934 straight after the foilhead.
10937 \begin_layout Standard
10938 For this purpose, the following command styles are provided [
10945 \begin_layout Standard
10949 \begin_layout Plain Layout
10953 begin{multicols}{2}
10961 \begin_layout Itemize
10965 \begin_inset space ~
10971 \begin_layout Itemize
10977 \begin_layout Itemize
10981 \begin_inset space ~
10987 \begin_layout Itemize
10991 \begin_inset space ~
10997 \begin_layout Itemize
11001 \begin_inset space ~
11008 \begin_layout Standard
11009 \begin_inset space ~
11016 \begin_layout Standard
11020 \begin_layout Plain Layout
11032 \begin_layout Standard
11033 There are also a few commands provided by
11037 that aren't directly supported by LyX but I'll tell you what they do and
11038 how to use them in section
11039 \begin_inset space ~
11043 \begin_inset CommandInset ref
11045 reference "sec:unsuppfoils"
11052 \begin_layout Subsection
11053 Building a Set of Foils
11056 \begin_layout Standard
11057 This section will give a simple introduction to using the different environments
11058 to build a set of foils.
11059 If you want to see an example set of foils, take a look at the
11063 file you find in LyX's
11070 \begin_layout Subsubsection
11071 Give It a Title Page
11074 \begin_layout Standard
11075 Unlike other classes that provide
11095 creates the title on a page of its own.
11096 If you leave out the
11100 environment LaTeX will substitute the current date (every time you regenerate
11104 \begin_layout Subsubsection
11108 \begin_layout Standard
11109 As I mentioned earlier, there are four ways of starting a new foil.
11110 For portrait foils you should use
11119 The difference between these two environments is the amount of space between
11120 the title of the foil (the foilhead) and the body of the foil.
11123 \begin_layout Standard
11124 Landscape foils are generated using the
11130 ShortRotatefoilhead
11133 Again the only difference is the spacing between foilhead and body.
11134 Both of the short versions have 0.5 inches less separation between the foilhead
11139 \begin_layout Standard
11140 One problem with the support for landscape foils is the requirement that
11141 you have to use the
11145 driver to generate the PostScript output otherwise the foils won't be rotated.
11146 It is possible to get landscape foils even if you haven't got the
11150 driver provided you can feed your foils sideways through your printer ;-)
11153 \begin_layout Subsubsection
11154 Theorems, Lemmas, Proofs and more
11157 \begin_layout Standard
11158 Due to a small bug in LyX you can't have two of the same type of these environme
11159 nts directly following each other.
11160 They must be separated by something.
11161 If you try, you will just be extending the previous environment as if you
11162 had merged the two environments together.
11163 So, how do you get around this problem? The simplest option is to insert
11164 some text between the two environments or add a
11168 environment between the two with just a
11169 \begin_inset Quotes eld
11177 \begin_inset Quotes erd
11181 This will force LyX to produce two separate environments and hence the
11182 correct LaTeX output.
11183 An example is provided in the example file included with the LyX distribution.
11184 Remember, this problem only occurs if you are trying to place two of the
11185 same type of theorem-like environments one directly after the other.
11188 \begin_layout Subsubsection
11192 \begin_layout Standard
11193 You get all the commonly supported list styles found in other classes as
11194 well as two new ones.
11195 I'll only describe the new ones here.
11196 If you want to find out more about the other list environments check out
11202 If you intend to use itemized lists you might also want to read about the
11206 \begin_inset space ~
11210 \begin_inset space ~
11215 dialog described above in section
11216 \begin_inset space ~
11220 \begin_inset CommandInset ref
11222 reference "sec:bullet"
11229 \begin_layout Standard
11230 The two new list styles,
11238 , are designed to make it easier for you to create lists of do's and don'ts
11239 or right and wrong by providing dedicated environments that use a tick
11240 or a cross as the label of the list.
11241 These lists are in fact dedicated variants of the
11246 They do however require that you have the
11250 packages installed.
11253 \begin_layout Subsubsection
11257 \begin_layout Standard
11262 redefines the floating tables and figures so that they appear exactly where
11263 they are in the text rather than pushing them to the top of the page or
11264 to some user specified location.
11265 In fact if you change the float placement settings they are simply ignored.
11268 \begin_layout Subsubsection
11269 Page Headers and Footers
11270 \begin_inset CommandInset label
11272 name "sec:foilfoot"
11279 \begin_layout Standard
11283 \begin_inset space ~
11292 are two commands used to control the left-footer text string.
11293 The first is meant to allow you to include a graphic logo on your foils
11295 \begin_inset Quotes eld
11303 \begin_inset Quotes erd
11307 While the second is meant to provide a classification for the audience,
11311 \begin_inset space \thinspace{}
11317 \begin_inset space \space{}
11321 It is empty by default.
11324 \begin_layout Standard
11325 The remaining page corners can be filled by
11328 \begin_inset space ~
11333 (which defaults to page numbers),
11336 \begin_inset space ~
11344 \begin_inset space ~
11352 \begin_layout Subsection
11358 \begin_inset CommandInset label
11360 name "sec:unsuppfoils"
11367 \begin_layout Standard
11368 All the commands mentioned below need to be set in a
11376 within another environment.
11379 \begin_layout Subsubsection
11383 \begin_layout Standard
11384 All lengths are adjusted using the
11407 should be replaced by the name given to the length you want to change and
11412 is the length value.
11413 All lengths should be specified in units of length such as inches (
11425 ) or relative to some document or font-based length such as
11435 \begin_layout Standard
11436 It's possible to change the spacing between a foilhead and the body of the
11437 foil by adjusting the length specified by
11444 For example, to make
11449 \begin_inset space \space{}
11452 in closer to their bodies put the following in the preamble:
11458 foilheadskip}{-0.5in}
11461 \begin_layout Standard
11462 The spacings around floats can be adjusted by setting these lengths:
11465 \begin_layout Labeling
11466 \labelwidthstring MMMMMMMMMMM
11473 Separation between the text and the top of the float
11476 \begin_layout Labeling
11477 \labelwidthstring MMMMMMMMMMM
11484 Separation between the float and the caption
11487 \begin_layout Labeling
11488 \labelwidthstring MMMMMMMMMMM
11495 Separation between the caption and the following text
11498 \begin_layout Labeling
11499 \labelwidthstring MMMMMMMMMMM
11506 You can make the captions narrower than the surrounding text by adjusting
11508 Best done relative to
11517 \begin_layout Standard
11518 There are also several title page related lengths that you may find useful
11519 if you have a long title or several authors:
11522 \begin_layout Labeling
11523 \labelwidthstring MMMMMMMMMMM
11530 Separation from headers to
11535 \begin_layout Labeling
11536 \labelwidthstring MMMMMMMMMMM
11554 \begin_layout Labeling
11555 \labelwidthstring MMMMMMMMMMM
11569 \begin_layout Labeling
11570 \labelwidthstring MMMMMMMMMMM
11586 \begin_layout Labeling
11587 \labelwidthstring MMMMMMMMMMM
11603 \begin_layout Standard
11604 The last length related command affects all the list environments.
11615 a list environment then all the vertical spacing between the list items
11617 Note that this is a command not a length so it doesn't require
11623 like the stuff mentioned above.
11626 \begin_layout Subsubsection
11627 Headers and Footers
11630 \begin_layout Standard
11643 commands control whether the logo in the
11647 definition appear on a given page.
11654 in the preamble then none of the foils will have the logo on them.
11655 If you don't want the logo on a particular page place the
11661 directly after the foilhead of that page and the
11667 directly after the next foilhead.
11670 \begin_layout Standard
11671 If you decide to use the
11675 page style setting in the
11678 \begin_inset space ~
11683 dialog you should probably add
11693 to your preamble so headers and footers on landscape pages are correctly
11694 placed when rotated.
11695 This is due to some clashes between the page layouts provided by the
11706 \begin_layout Section
11707 Hollywood (Hollywood spec scripts)
11710 \begin_layout Standard
11716 \begin_layout Subsection
11720 \begin_layout Standard
11721 Getting the format of a Hollywood script right is a
11722 \begin_inset Quotes eld
11726 \begin_inset Quotes erd
11729 It is designed to make the readers focus on content and to be easy and
11730 familiar for the actors to read.
11731 Each page of a script should be one minute of film.
11732 Nothing goes in a script that you cannot see or hear on screen.
11733 The courier 12 pt font should be used throughout.
11737 \begin_layout Subsection
11741 \begin_layout Standard
11742 Speakers' lines should NEVER break in mid-sentence.
11743 If a speaker's lines continue over a page break, repeat the
11747 title followed by (Cont'd).
11750 \begin_layout Subsection
11754 \begin_layout Standard
11759 names as labels then cross-reference the label to insert the name.
11760 The cross-reference dialog will show the current cast of characters.
11761 You can use this to insert the speaker name in narratives also.
11764 \begin_layout Subsection
11765 Paper size and Margins
11768 \begin_layout Standard
11769 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11772 \begin_layout Subsection
11776 \begin_layout Standard
11777 The following environments are available.
11778 You can use hollywood.bind to get the bind keys shown at the right.
11781 \begin_layout Itemize
11785 \begin_inset Newline newline
11790 Used where nothing else works.
11794 \begin_layout Itemize
11800 \begin_inset space \hfill{}
11808 \begin_inset Newline newline
11811 Usually followed by something like
11812 \begin_inset Quotes eld
11815 on Sally waking up.
11816 \begin_inset Quotes erd
11822 \begin_layout Itemize
11826 \begin_inset space \hfill{}
11830 \begin_inset Newline newline
11835 Introduces a new INTERIOR camera set-up.
11836 Always followed by DAY or NIGHT, or something similar to define the lighting
11838 Everthing on this line in CAPS.
11841 \begin_layout Itemize
11845 \begin_inset space \hfill{}
11849 \begin_inset Newline newline
11854 Introduces a new EXTERIOR camera set-up.
11855 Everthing on this line in CAPS.
11858 \begin_layout Itemize
11862 \begin_inset space \hfill{}
11866 \begin_inset Newline newline
11871 The character speaking.
11874 \begin_layout Itemize
11878 \begin_inset space \hfill{}
11882 \begin_inset Newline newline
11887 Instructions to the speaker.
11888 The () are automatically inserted, but only the ( will show in LyX.
11889 Both will be printed.
11892 \begin_layout Itemize
11896 \begin_inset space \hfill{}
11900 \begin_inset Newline newline
11912 \begin_layout Itemize
11916 \begin_inset space \hfill{}
11920 \begin_inset Newline newline
11925 Camera movement instruction.
11927 \begin_inset space \thinspace{}
11931 \begin_inset space \space{}
11937 \begin_layout Itemize
11941 \begin_inset space \hfill{}
11947 \begin_layout Itemize
11951 \begin_inset space \hfill{}
11957 \begin_layout Itemize
11961 \begin_inset space \hfill{}
11967 \begin_layout Itemize
11971 \begin_inset space \hfill{}
11977 \begin_layout Subsection
11981 \begin_layout Itemize
11985 \begin_layout Itemize
11989 \begin_layout Itemize
11991 \begin_inset space \thinspace{}
11998 \begin_layout Itemize
12003 \begin_layout Itemize
12004 PAN — camera movement
12007 \begin_layout Itemize
12008 INSERT — cut to close-up of
12011 \begin_layout Section
12015 \begin_layout Standard
12018 Panayotis Papasotiriou
12021 \begin_layout Subsection
12025 \begin_layout Standard
12026 The ijmpc package is a set of macros that facilitates electronic manuscript
12029 International Journal of Modern Physics C
12032 Similarly, the ijmpd package is for creating manuscripts to be submitted
12035 International Journal of Modern Physics D
12038 Both journals are published by World Scientific.
12039 The corresponding document classes are named
12048 These files, together with instructions for the authors, can be downloaded
12050 \begin_inset Flex URL
12053 \begin_layout Plain Layout
12055 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
12061 \begin_inset Flex URL
12064 \begin_layout Plain Layout
12066 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
12072 Both packages are modified versions of the standard
12073 \begin_inset Quotes eld
12077 \begin_inset Quotes erd
12080 package, and they are almost (but not exactly) identical.
12081 Most of their features are supported by LyX.
12082 I have used LyX successfully to write articles submitted to both journals
12083 without any problem.
12086 \begin_layout Subsection
12090 \begin_layout Standard
12091 As usual, the easiest way to write a paper is to start with a template.
12094 File\SpecialChar \menuseparator
12113 This will give an (almost) empty document that includes the most common
12114 fields found in a manuscript.
12115 Simply overwrite the existing text (including the brackets,
12120 You should keep in mind the following remarks.
12123 \begin_layout Enumerate
12124 LyX won't let you change the font size and the page style of the document,
12125 because such modifications are not allowed by both packages.
12128 \begin_layout Enumerate
12129 The language of the document should not be changed.
12130 Before previewing your paper, be sure that the babel package is not used.
12131 To do this, click on
12133 Tools\SpecialChar \menuseparator
12144 checkbox in the language settings, and click on
12152 , if you wish to make this change permanent).
12155 \begin_layout Enumerate
12157 \begin_inset Quotes eld
12161 \begin_inset Quotes erd
12164 style must be used to define keywords.
12167 \begin_layout Enumerate
12168 The ijmpc package provides a style named
12169 \begin_inset Quotes eld
12172 Classification Codes
12173 \begin_inset Quotes erd
12176 , which can be used to define classification codes, such as PACS numbers.
12177 Note that this facility is not supported by the ijmpd package.
12180 \begin_layout Enumerate
12181 Several new environments are available:
12182 \begin_inset Quotes eld
12186 \begin_inset Quotes erd
12190 \begin_inset Quotes eld
12194 \begin_inset Quotes erd
12198 \begin_inset Quotes eld
12202 \begin_inset Quotes erd
12206 \begin_inset Quotes eld
12210 \begin_inset Quotes erd
12214 \begin_inset Quotes eld
12218 \begin_inset Quotes erd
12222 \begin_inset Quotes eld
12226 \begin_inset Quotes erd
12230 \begin_inset Quotes eld
12234 \begin_inset Quotes erd
12238 \begin_inset Quotes eld
12242 \begin_inset Quotes erd
12246 \begin_inset Quotes eld
12250 \begin_inset Quotes erd
12254 \begin_inset Quotes eld
12258 \begin_inset Quotes erd
12262 \begin_inset Quotes eld
12266 \begin_inset Quotes erd
12270 \begin_inset Quotes eld
12274 \begin_inset Quotes erd
12278 \begin_inset Quotes eld
12282 \begin_inset Quotes erd
12286 \begin_inset Quotes eld
12290 \begin_inset Quotes erd
12294 Their use is more or less obvious.
12295 LyX supports all these environments; it will use the proper label, text
12296 style, and numbering scheme for each of them.
12299 \begin_layout Enumerate
12300 Both packages use basic citations; the natbib package should not be used.
12301 In LyX, citation references are shown as usual; in the output, citations
12302 are shown as superscripts.
12303 If you want to use a citation as normal text, you should use the
12308 \begin_inset space \thinspace{}
12312 \begin_inset space \space{}
12316 \begin_inset Quotes eld
12320 \begin_inset space \space{}
12330 \begin_inset Quotes erd
12336 \begin_layout Enumerate
12338 \begin_inset Quotes eld
12342 \begin_inset Quotes erd
12345 section in both packages.
12346 To put acknowledgments, just use the
12347 \begin_inset Quotes eld
12351 \begin_inset Quotes erd
12357 \begin_layout Enumerate
12358 Appendices may be added to the paper,
12362 the Acknowledgments and
12367 LyX provides a special environment, called
12368 \begin_inset Quotes eld
12372 \begin_inset Quotes erd
12375 which marks the beginning of the appendices.
12376 This environment should be left blank; it just sends a LaTeX command, but
12377 nothing is really printed.
12379 \begin_inset Quotes eld
12383 \begin_inset Quotes erd
12386 is printed with blue letters, as a signal that all sections after that
12387 point are appendices.
12388 To write an appendix, use the
12389 \begin_inset Quotes eld
12393 \begin_inset Quotes erd
12397 LyX will number each appendix with capital letters, as required by both
12400 \begin_inset Quotes eld
12404 \begin_inset Quotes erd
12411 be present before the first appendix; if not, all appendices will be numbered
12412 as normal sections in the output.
12415 \begin_layout Enumerate
12416 The ijmpc and the ijmpd packages use the
12420 command to implement table captions.
12421 As a result, a table created by LyX is printed correctly, but its caption
12423 However, you can use some TeX code to overcome this problem, so that captions
12424 are printed as expected.
12425 To do so, create a float table as usual, remove the caption, and replace
12426 it with the TeX code
12436 (sic); you must also the TeX code
12440 immediately after the tabular material.
12441 Study the example table included in the template files to see how this
12442 trick is implemented.
12443 Alternatively, If you need table captions, you should implement the whole
12448 file, then include this file to the LyX document (
12450 Insert\SpecialChar \menuseparator
12451 File\SpecialChar \menuseparator
12453 \begin_inset space ~
12459 Details on how to create a table float can be found in the files
12467 , included in the corresponding packages.
12470 \begin_layout Subsection
12471 Preparing a paper for submission
12474 \begin_layout Standard
12475 Before you submit your paper you must export the LyX document as a LaTeX
12478 File\SpecialChar \menuseparator
12479 Export\SpecialChar \menuseparator
12486 \begin_layout Plain Layout
12487 Actually you have the choice between LaTeX (plain) and pdflatex.
12488 If you intend to use pdflatex to prepare the paper, you should use the
12489 pdflatex option so that included graphics are converted to PDF format,
12490 ready for use by pdflatex.
12495 , then make the following changes to the resulting
12502 \begin_layout Enumerate
12503 Remove the comment lines before the
12512 \begin_layout Enumerate
12513 Remove everything between (and including) the
12525 commands, except for any commands you specifically put into the LaTeX preamble.
12528 \begin_layout Standard
12533 file should be saved and processed through LaTeX as many times as necessary.
12534 You may also want to check the resulting
12541 \begin_layout Subsection
12545 \begin_layout Standard
12546 The use of TeX code is reduced to two commands, which must be placed at
12547 the top of the document.
12548 If you started writing your paper by using the
12556 template, the TeX code needed is already in its place; you usually don't
12558 You may only modify the first TeX code to specify the information printed
12559 to the top of odd and even pages (authors' names and short paper's title,
12561 This TeX code must have the form
12565 markboth{Authors' Names}{Short Paper's Title}
12570 \begin_layout Section
12574 \begin_layout Standard
12580 \begin_layout Subsection
12584 \begin_layout Standard
12585 The iopart package provides a document class to create electronic manuscript
12586 submission to the journals published by the Institute of Physics.
12587 Instructions for the authors how to create a paper using the iopart class
12588 can be downloaded together with the iopart package from the site
12589 \begin_inset Flex URL
12592 \begin_layout Plain Layout
12594 ftp://ftp.iop.org/pub/journals/latex2e
12602 \begin_layout Subsection
12606 \begin_layout Standard
12607 The easiest way to write a paper is to start with the file
12611 that is available in LyX's examples files folder.
12612 Open this file, save it under a new name, and start writing.
12613 The example file explains how to use the special text environments.
12614 Here are the most important advices:
12617 \begin_layout Itemize
12618 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12621 Use AMS math package
12623 in the document settings under
12630 \begin_layout Itemize
12633 The title environment defines the kind of your paper.
12634 So use one of the following environments for the title:
12638 \begin_layout Itemize
12647 \begin_layout Itemize
12656 \begin_layout Itemize
12662 for a Topical review
12665 \begin_layout Itemize
12674 \begin_layout Itemize
12683 \begin_layout Itemize
12689 for a Paper (same as Title)
12692 \begin_layout Itemize
12698 for a Preliminary communication
12701 \begin_layout Itemize
12707 for a Rapid communication
12710 \begin_layout Itemize
12716 for a Letter to the editor
12720 \begin_layout Itemize
12723 All title environments except of
12727 can have an optional short title.
12730 \begin_layout Itemize
12731 There is a general title environment
12735 which is not directly supported by the LyX.
12736 This can be used as TeX code when your document doesn't fit into one of
12737 the other title types.
12740 \begin_layout Standard
12741 For more informations like hints for special table and formula formatting,
12742 look at the IOP author guidelines.
12745 \begin_layout Section
12749 \begin_layout Standard
12752 Panayotis Papasotiriou
12755 \begin_layout Subsection
12759 \begin_layout Standard
12760 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12761 that facilitates electronic manuscript submission to the journals they
12763 Most known of them (at least in my domain of interest) are
12765 Astrophysics and Space Science
12771 , but there are many others (see a complete list at
12772 \begin_inset Flex URL
12775 \begin_layout Plain Layout
12777 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12783 The Kluwer package may be downloaded from the site
12784 \begin_inset Flex URL
12787 \begin_layout Plain Layout
12789 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12795 A complete user guide is contained in that package (but it can also be
12796 downloaded separately).
12799 \begin_layout Standard
12800 LyX supports many features of the package but not everything.
12801 However, the TeX code needed is reduced to some
12802 \begin_inset Quotes eld
12806 \begin_inset Quotes erd
12809 commands of the package (see
12810 \begin_inset space ~
12814 \begin_inset CommandInset ref
12816 reference "subsec:kluwer_peculiarities"
12821 I have recently used LyX to write an article submitted to the
12823 Astrophysics and Space Science
12825 without any problem.
12828 \begin_layout Subsection
12832 \begin_layout Standard
12833 The easiest way to write a paper is to start with the Kluwer template file.
12836 File\SpecialChar \menuseparator
12848 This will give an (almost) empty document that includes the most common
12849 fields found in a manuscript and a short description of their use.
12850 As in most templates, simply overwrite the existing text (including the
12855 ) with the correct information.
12858 \begin_layout Subsection
12859 Preparing a paper for submission
12862 \begin_layout Standard
12863 As in the AASTeX package, before you submit your paper to a journal you
12865 \begin_inset Quotes eld
12869 \begin_inset Quotes erd
12875 \begin_layout Enumerate
12876 Export your paper as a LaTeX file.
12877 To do this, click on
12879 File\SpecialChar \menuseparator
12880 Export\SpecialChar \menuseparator
12887 \begin_layout Enumerate
12892 file with a text editor and make the following changes
12896 \begin_layout Enumerate
12897 remove the comment lines before the
12906 \begin_layout Enumerate
12907 remove everything between (and including) the
12919 commands, except for any commands you specifically put into the LaTeX preamble.
12922 \begin_layout Standard
12931 \begin_layout Enumerate
12936 file through LaTeX as many times as necessary (usually up to three).
12939 \begin_layout Enumerate
12945 \begin_inset space \thinspace{}
12949 \begin_inset space \space{}
12956 , and check if everything is OK (it should, if you didn't make any mistake).
12959 \begin_layout Subsection
12960 \begin_inset Quotes eld
12964 \begin_inset Quotes erd
12967 of the Kluwer package
12968 \begin_inset CommandInset label
12970 name "subsec:kluwer_peculiarities"
12977 \begin_layout Standard
12978 The Kluwer package has the following
12979 \begin_inset Quotes eld
12983 \begin_inset Quotes erd
12989 \begin_layout Enumerate
12990 It is possible to write multiple articles in the same LaTeX file
12994 \begin_layout Plain Layout
12995 I can't imagine any good reason to do this.
13001 Each article must be included in the environment
13002 \begin_inset Quotes eld
13006 \begin_inset Quotes erd
13010 Unfortunately, this environment cannot be omitted, even if you write just
13012 Therefore, each article starts with the command
13018 and, obviously, ends with the command
13025 Although this can be implemented in LyX, I didn't included it, since it
13026 looks ugly and can confuse the novice user.
13027 Therefore, you need to enter them directly and mark them as LaTeX code
13029 \begin_inset Quotes eld
13033 \begin_inset Quotes erd
13039 \begin_layout Enumerate
13040 Information given at the beginning of the article (i.
13041 \begin_inset space \thinspace{}
13045 \begin_inset space \space{}
13048 title, subtitle, author, institution, running title, running author, abstract
13049 and keywords) must be included in an environment called
13050 \begin_inset Quotes eld
13054 \begin_inset Quotes erd
13058 This is not implemented in LyX, so you must enter title, subtitle etc.
13059 \begin_inset space ~
13062 between two TeX code lines (
13077 \begin_layout Enumerate
13078 According to the user manual, the label of each bibliography item must be
13102 \begin_layout Standard
13107 template takes care of all these
13108 \begin_inset Quotes eld
13112 \begin_inset Quotes erd
13116 If you start a new paper using this template you don't need to do anything
13121 \begin_layout Enumerate
13122 don't delete the TeX code included in the template, and
13125 \begin_layout Enumerate
13126 copy the example bibliography item included in the template and modify it
13127 as necessary to enter new bibliography items.
13130 \begin_layout Section
13134 \begin_layout Standard
13140 \begin_layout Subsection
13144 \begin_layout Standard
13145 The LyX document classes
13147 article (koma-script)
13151 report (koma-script)
13169 correspond to the LaTeX document classes
13186 \begin_inset space ~
13189 of the Koma-Script family.
13190 They are replacements for the standard document classes
13206 , resp., and fit better to European typography conventions in a number of
13210 \begin_layout Itemize
13211 Standard character size is 11pt in
13213 article (koma-script)
13217 report (koma-script)
13225 letter (koma-script)
13230 \begin_layout Itemize
13231 Headings, labels of the description environment, and a number of elements
13234 letter (koma-script)
13236 document class are set in a bold sans serif font.
13240 \begin_layout Plain Layout
13241 There is a big difference between the bold sans serif old cm fonts and new
13242 ec fonts, especially in the appearance of headings.
13243 In comparison, the ec bold sans serif fonts look a bit thin.
13244 Here the LaTeX package
13252 helps to produce the
13253 \begin_inset Quotes eld
13257 \begin_inset Quotes erd
13260 appearance when using the ec fonts.
13265 The numbering of chapter headings is made in the same way as the numbering
13266 of section headings, that is without the extra line
13267 \begin_inset Quotes eld
13270 Chapter\SpecialChar \ldots{}
13272 \begin_inset Quotes erd
13276 In addition, the appearance of the headings can be modified by using a
13277 number of options (in LyX to be entered in the field
13280 \begin_inset space ~
13287 Layout\SpecialChar \menuseparator
13294 \begin_layout Itemize
13295 The main means in the Koma-Script document classes to design the type area
13304 (in LyX to be entered in the extra class options field in the dialog
13306 Document\SpecialChar \menuseparator
13310 They make a clearer modification of page margins possible as do the options
13313 Document\SpecialChar \menuseparator
13320 \begin_layout Itemize
13321 The LaTeX document classes of the Koma-Script family define a number of
13322 additional commands.
13323 Those part of it which makes sense in LyX is implemented in corresponding
13327 \begin_layout Standard
13328 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13329 can be found in the Koma-Script documentation
13340 \begin_layout Subsection
13341 article (koma-script), report (koma-script), and book (koma-script)
13344 \begin_layout Standard
13345 The document classes
13347 article (koma-script)
13351 report (koma-script)
13361 are implemented in the layout files
13374 They contain all the paragraph types of the corresponding standard document
13387 , resp., partly modified, with the exception of the LyX specific
13391 -type, which is replaced by the new
13395 -type having the same functionality.
13400 -Type there is a number of new paragraph types added.
13407 letter (koma-script)
13412 \begin_layout Itemize
13421 : are equivalents to
13429 , resp., additionally inserting an entry in the table of contents.
13438 are not contained in
13440 article (koma-script)
13445 \begin_layout Itemize
13454 : behave exactly as
13462 , resp., additionally clearing running heads.
13467 is not contained in
13469 article (koma-script)
13475 \begin_layout Plain Layout
13488 report (koma-script)
13490 , but since this is identical to
13494 , is has not been implemented in LyX.
13502 \begin_layout Itemize
13507 : generates a heading directly above the following paragraph in the standard
13508 character size without affecting the structure of the document.
13511 \begin_layout Itemize
13520 are special captions which respect the different space settings needed
13521 for captions placed above or below an element (if you follow strict typographic
13522 rules, you might want to place table captions always above the table).
13523 You can also use the class option
13527 , which will switch
13540 You need at least Koma-Script version 2.8q to use this.
13543 \begin_layout Itemize
13548 : can be used to set a bonmot, e.
13549 \begin_inset space \thinspace{}
13553 \begin_inset space \space{}
13556 at the beginning of a chapter.
13557 If you use the optional argument (
13559 Insert\SpecialChar \menuseparator
13561 \begin_inset space ~
13566 ), you can insert the dictum's author there.
13567 Dictum and author are separated by a line.
13568 You need at least Koma-Script version 2.8q to use this.
13573 is not contained in
13575 article (koma-script)
13580 \begin_layout Standard
13581 The following types, together with the standard types
13593 , form the title area of the document.
13594 They must be entered ahead of the first
13595 \begin_inset Quotes eld
13599 \begin_inset Quotes erd
13606 \begin_layout Plain Layout
13607 The corresponding LaTeX commands must appear before the
13618 When such a type is used more than once, the latter usage overwrites the
13619 former one, that means, for every type only the latest usage is valid.
13620 The order of the different types however has, like
13632 , no effect on the appearance of the produced document.
13635 \begin_layout Itemize
13640 : produces a centered paragraph above the ordinary title (
13652 ) for the subject of the document.
13655 \begin_layout Itemize
13660 : produces a centered paragraph below the ordinary title (
13672 ) for the publishers' name.
13675 \begin_layout Itemize
13682 report (koma-script)
13688 produces a centered paragraph on its own page behind the title page, or
13691 article (koma-script)
13693 produces a centered paragraph below the ordinary title (
13709 ) for a dedication.
13712 \begin_layout Itemize
13717 : produces a left aligned paragraph above the ordinary title (
13733 ) for a document`s head.
13736 \begin_layout Itemize
13741 : produces in a double-sided print in
13743 report (koma-script)
13749 a left-aligned paragraph at the top of the title page`s back or has no
13750 effect in a single-sided print or in
13752 article (koma-script)
13757 \begin_layout Itemize
13762 : produces in a double-sided print in
13764 report (koma-script)
13770 a left-aligned paragraph at the bottom of the title page`s back or has
13771 no effect in a single-sided print or in
13773 article (koma-script)
13778 \begin_layout Itemize
13783 : produces a special
13784 \begin_inset Quotes eld
13788 \begin_inset Quotes erd
13791 page ahead of the actual document containing a paragraph without special
13795 \begin_layout Standard
13796 The layout files for the document classes
13798 article (koma-script)
13802 report (koma-script)
13808 do include the file
13813 This is thought of as a place to define your own types.
13818 in your personal layout directory and edit the file!
13821 \begin_layout Subsection
13822 letter (koma-script)
13825 \begin_layout Standard
13829 \begin_layout Plain Layout
13841 \begin_layout Standard
13845 letter (koma-script)
13847 is implemented in the layout file
13852 It contains all the paragraph types of the corresponding standard document
13857 , partly modified, with the exception of the LyX specific types
13869 type, which is replaced by the new
13874 In addition, it contains, in contrast to the standard document class, the
13892 Furthermore, there are a number of new letter specific types.
13895 \begin_layout Standard
13899 \begin_layout Plain Layout
13911 \begin_layout Standard
13912 The appearance of the letter produced by this document class can be controlled
13913 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13917 \begin_layout Plain Layout
13918 For example, the standard appearance of the letter`s heading, consisting
13919 of name and address, is quite self-willed.
13921 \begin_inset Quotes eld
13925 \begin_inset Quotes erd
13928 heading is produced by the following LaTeX commands in the preamble:
13931 \begin_layout LyX-Code
13941 \begin_layout LyX-Code
13957 \begin_layout LyX-Code
13967 \begin_layout LyX-Code
13987 A detailed German description of such LaTeX commands can be found in the
13988 Koma-Script documentation
13993 With it, the letter's author can produce his personal letter layout.
13996 \begin_layout Standard
14005 define the beginning of the letter and must be used in every letter.
14006 To emphasize them in the LyX document class, they are marked with the letter
14016 \begin_inset space ~
14019 in the left margin.
14020 It is possible to write any number of letters in one file.
14025 type produces a new letter using the same addressee and a
14029 type produces a new addressee.
14046 are ordinary paragraph types and can also be used several times in one
14047 and the same letter.
14050 \begin_layout Itemize
14055 : produces a paragraph for the addressee and implicitly defines the beginning
14059 \begin_layout Itemize
14064 : produces a paragraph for the form of address and implicitly produces a
14068 \begin_layout Itemize
14073 : produces a paragraph for a close.
14076 \begin_layout Itemize
14081 : produces a paragraph for a postscript.
14084 \begin_layout Itemize
14089 : produces a paragraph for a distribution list.
14092 \begin_layout Itemize
14097 : produces a paragraph for enclosures.
14100 \begin_layout Standard
14141 are input types provided with a label to enter information, which will
14142 be processed by the document class.
14146 \begin_layout Plain Layout
14147 It could be seen as a matter of inconsequence, that the types
14155 described above are not such input types as well.
14156 Because of the special meaning of those types, however, I have implemented
14157 them as ordinary paragraph types with a one letter mark in the left margin.
14158 Moreover, it would affect my feeling of symmetry, if the
14166 type had such a serious different appearance.
14171 The types must be used ahead of the corresponding
14178 \begin_layout Standard
14179 An implementation of these types in a WYSIWYG fashion does not seem to make
14180 sense, because the real appearance of the produced letter does not only
14181 depend on the usage of the particular type, but also on other factors.
14182 For example, a signature entered in the
14186 type will in the standard behavior appear in the produced letter only,
14187 when in the same letter also a
14192 The entered value of the
14196 type will in the standard behavior not appear in the produced letter at
14198 The possibility to design the letter`s heading freely is already indicated
14199 in a footnote above.
14202 \begin_layout Standard
14203 The input types can also be used as empty paragraphs.
14204 This makes sense e.
14205 \begin_inset space \thinspace{}
14209 \begin_inset space \space{}
14221 type is not used at all, in the standard behavior the value of the
14225 type is used as signature, whereas if an empty
14229 type is used, no signature value is defined.
14232 \begin_layout Standard
14233 By using the input types it is possible to write a letter template, containing
14234 filled input types with your personal dates (name, address, etc.) and empty
14235 input types for other dates you want to enter.
14238 \begin_layout Itemize
14243 : sender's name, in the standard behavior appears as a centered paragraph
14244 in small caps in the letter`s heading.
14247 \begin_layout Itemize
14252 : sender's signature, in the standard behavior appears below the
14261 type is used, the value of the
14265 type appears instead.
14268 \begin_layout Itemize
14273 : sender's address, in the standard behavior appears in a centered paragraph
14274 in the letter`s heading below the sender's name.
14277 \begin_layout Itemize
14282 : sender's telephone number, in the standard behavior only sets the LaTeX
14292 \begin_layout Itemize
14297 : place of the letter`s making.
14300 \begin_layout Itemize
14305 : date of the letter`s making.
14314 , in the standard behavior, produce the place and the date in a right-aligned
14315 line below the addressee's field.
14320 type is used, neither place nor date appear, independent of the value of
14330 type is used, the date of the letter `s production is used.
14333 \begin_layout Itemize
14338 : sender`s back address, in the standard behavior appears above the addressee's
14339 field in a small sans serif font.
14342 \begin_layout Itemize
14347 : special mail information, in the standard behavior appears underlined
14348 above the addressee's field below the back address.
14351 \begin_layout Itemize
14356 : additional information, in the standard behavior appears on right side
14357 below the addressee`s field.
14360 \begin_layout Itemize
14365 : the letter's title, in the standard behavior appears in a big, bold, sans
14366 serif font above the subject.
14369 \begin_layout Itemize
14374 : the letter's subject, in the standard behavior appears in a bold font
14382 \begin_layout Standard
14403 produce a business letter like line above the
14407 line containing the fields
14408 \begin_inset Quotes eld
14412 \begin_inset Quotes erd
14416 \begin_inset Quotes eld
14420 \begin_inset Quotes erd
14424 \begin_inset Quotes eld
14428 \begin_inset Quotes erd
14432 \begin_inset Quotes eld
14436 \begin_inset Quotes erd
14440 \begin_inset Quotes eld
14444 \begin_inset Quotes erd
14448 \begin_inset Quotes eld
14452 \begin_inset Quotes erd
14456 For the date field, the value of the
14462 \begin_inset Quotes eld
14465 business letter types
14466 \begin_inset Quotes erd
14469 is used, the value of the
14473 type however does not appear, but only the LaTeX variable
14480 The ordinary output of place and date in a right-aligned line below the
14481 addressee`s field is suppressed.
14482 The types are implemented as input types provided with a label and must
14483 be used ahead of the corresponding
14490 \begin_layout Itemize
14498 \begin_layout Itemize
14506 \begin_layout Itemize
14514 \begin_layout Itemize
14522 \begin_layout Itemize
14530 \begin_layout Subsection
14531 The new letter class: letter (koma-script v.2)
14534 \begin_layout Standard
14540 \begin_layout Standard
14541 \begin_inset VSpace medskip
14547 \begin_layout Standard
14549 Koma-Script version 2.8 has introduced a new letter class
14553 which supersedes the now unsupported
14558 It has — on the LaTeX side — a completely new interface and is not compatible
14559 with the old class.
14560 Therefore, LyX supports both, though it is recommended you use the new
14564 \begin_layout Standard
14565 This class covers the same functionality as
14567 letter (koma-script),
14570 The basic items are
14574 (receiver's address, same as
14578 in the old layout),
14591 will start a new letter (i.
14592 \begin_inset space \thinspace{}
14596 \begin_inset space \space{}
14599 you can write several letters per document).
14600 New elements are sender's
14616 and the possibility to use a
14622 Insert\SpecialChar \menuseparator
14628 \begin_layout Standard
14629 The biggest improvement is, though, that the letter's layout is configurable
14630 to meet almost any needs.
14631 This can be done via the preamble or with a special style file (Letter
14632 Class Option, extension
14636 ), that will be read in as a class option.
14640 \begin_layout Plain Layout
14641 The KOMA package comes with some default
14646 There is, for instance, a
14650 file that follows german typesetting rules, or a
14654 that provides the default layout of the old
14659 The latter can be loaded with the class option
14668 ayout\SpecialChar \menuseparator
14673 ocument\SpecialChar \menuseparator
14685 template that is included in LyX for examples.
14686 A detailed description is to be found in the Koma-Script documentation
14694 \begin_layout Subsection
14698 \begin_layout Standard
14699 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14703 \begin_layout Itemize
14704 The chapter number of a
14708 type appears on a line of its own above the chapter heading instead of
14709 appearing in the same line ahead of it.
14710 The cause for that is the LyX internal behavior for the labeltype
14714 in the layout file.
14717 \begin_layout Itemize
14718 The headings of the types
14726 are only put in the
14727 \begin_inset Quotes eld
14731 \begin_inset Quotes erd
14734 LaTeX table of contents, but not in the LyX table of contents (
14736 Document\SpecialChar \menuseparator
14738 \begin_inset space ~
14742 \begin_inset space ~
14750 \begin_layout Itemize
14751 The paragraphs in a
14755 document class appear in a skip separation mode, not indented.
14756 This is the standard behavior, no special LaTeX commands are needed for
14760 Document\SpecialChar \menuseparator
14763 dialog the corresponding radio button indicates
14772 value always has the effect that extra LaTeX commands are inserted in the
14773 document to produce the gap, which is not what is wanted in this case.
14776 \begin_layout Section
14777 Latex8 (IEEE Conference Papers)
14780 \begin_layout Standard
14786 \begin_layout Subsection
14790 \begin_layout Standard
14791 Since this class is specifically for writing submissions to IEEE sponsored
14792 conferences I strongly recommend that you get a copy of their Authors Kit.
14797 package and associated bibliography style file is included in the kit.
14798 The Authors Kit is usually sent out by email once your initial submission
14800 There is a lot of useful information in the Authors Kit explaining formatting
14801 restrictions and so on and I will assume you have read this since that
14802 means I don't have to repeat it all here.
14805 \begin_layout Subsection
14809 \begin_layout Standard
14810 [AR\SpecialChar \@.
14814 \begin_layout Subsection
14815 Supported Environments
14818 \begin_layout Itemize
14824 \begin_layout Itemize
14830 \begin_layout Itemize
14836 \begin_layout Itemize
14842 \begin_layout Itemize
14848 \begin_layout Itemize
14854 \begin_layout Itemize
14860 \begin_layout Itemize
14866 \begin_layout Itemize
14872 \begin_layout Subsection
14873 Differences Between Screen and Paper
14876 \begin_layout Standard
14877 There are slight differences in appearance mainly with the presentation
14878 of section counters.
14879 On screen the trailing period of the section counter is missing but it
14880 will appear in the output so don't let this worry you.
14883 \begin_layout Section
14887 \begin_layout Standard
14893 \begin_layout Subsection
14897 \begin_layout Standard
14898 Memoir is a very powerful and constantly evolving class.
14899 It has been designed with regard to fictional and non-fictional literature.
14900 Its aim is to let the user have maximum control over the typesetting of
14902 Memoir is based on the standard book class, but it can also emulate the
14903 article class (see below).
14906 \begin_layout Standard
14907 Peter Wilson, the developer of Memoir, is known as the author of lots of
14908 useful packages in the LaTeX world.
14909 Most of them have been merged with Memoir.
14910 Therefore, it is much easier to layout the table of contents, appendices,
14911 chapter designs and such.
14912 LyX, though, does not support all of these goodies natively.
14913 Some of them might be added to forthcoming releases
14917 \begin_layout Plain Layout
14918 You are invited to send suggestions to
14919 \begin_inset Flex URL
14922 \begin_layout Plain Layout
14924 lyx-devel@lists.lyx.org
14934 , lots will probably never, due to the limitations of LyX's framework.
14935 Of course you can still use all features with the help of some native LaTeX
14940 \begin_layout Plain Layout
14945 \begin_layout Plain Layout
14955 \begin_inset space ~
14959 \begin_inset CommandInset ref
14961 reference "sec:Inserting-TeX-Code"
14971 In this section, we can only list those features which are natively supported
14973 For detailed descriptions (and for the rest of features) we recommend you
14974 have a look at the detailed manual of the Memoir class
14978 \begin_layout Plain Layout
14983 \begin_layout Plain Layout
14993 \begin_inset Flex URL
14996 \begin_layout Plain Layout
14998 CTAN:/macros/latex/memoir/memman.pdf
15008 , which is not only a user guide for the class, but also both a comprehensive
15009 description on good typesetting and a superb example for good typesetting
15013 \begin_layout Subsection
15014 Basic features and restrictions
15017 \begin_layout Standard
15018 Memoir supports basically all features of the standard book classes.
15019 There are, however, some differences, as follows:
15022 \begin_layout Description
15024 \begin_inset space ~
15027 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
15030 \begin_layout Description
15032 \begin_inset space ~
15035 style: The fancy page style is not supported, due to a command clash between
15036 Memoir and the fancyhdr package (they both define a command with the same
15037 name, which confuses LaTeX).
15038 Instead, Memoir comes with a number of its own page styles (see
15040 Layout\SpecialChar \menuseparator
15041 Document\SpecialChar \menuseparator
15043 \begin_inset space ~
15049 If you want to use these for the chapter pages, you have to use the command
15056 in the main text or in preamble (e.
15057 \begin_inset space \thinspace{}
15061 \begin_inset space \space{}
15068 chapterstyle{companion}
15073 \begin_layout Description
15074 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
15075 optional argument in the standard classes.
15076 With this, you can specify an alternative version of the title for the
15077 table of contents and the headers (for instance, if the title is too long).
15078 In LyX, you can do this via
15080 Insert\SpecialChar \menuseparator
15082 \begin_inset space ~
15087 at the beginning of a chapter/section.
15088 Memoir features a second optional argument and thus separates the table
15089 of contents from the header.
15090 You can define three variants of a title with this: one for the main text,
15091 one for the table of contents, and one for the headers.
15092 Simply insert two optional arguments if you need this feature, the first
15093 one containing the short title for the Table of Contents, the second one
15094 containing an alternative short title for the headers.
15097 \begin_layout Description
15098 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
15099 of contents, the list of figures and the list of table start a new page
15101 Memoir does not follow this route.
15102 You have to insert a page break yourself, if you want to have one.
15105 \begin_layout Description
15106 Titlepage: For some unknown reason, Memoir uses pagination on the title
15107 page (in the standard classes, title pages are
15108 \begin_inset Quotes eld
15112 \begin_inset Quotes erd
15116 \begin_inset space \thinspace{}
15120 \begin_inset space \space{}
15124 If you want an empty title page, type
15128 aliaspagestyle{title}{empty}
15133 \begin_layout Description
15134 Article: With the class option
15140 Layout\SpecialChar \menuseparator
15141 Document\SpecialChar \menuseparator
15143 \begin_inset space ~
15148 ), you can emulate article style.
15149 That is, counters (footnotes, figures, tables etc.) will not be reset on
15150 new chapters, chapters don't start a new page (but are—in contrary to
15151 \begin_inset Quotes eld
15155 \begin_inset Quotes erd
15158 article classes—still allowed), parts, though, use their own page, as in
15162 \begin_layout Description
15163 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
15164 font commands, which have been used in the old LaTeX version 2.09 (e.
15165 \begin_inset space \thinspace{}
15169 \begin_inset space \space{}
15185 It produces an error and stops LaTeX whenever such a command appears.
15190 reallows the commands and spits out warnings instead (which does at least
15192 Since a lot of packages and particularly BibTeX style files are still using
15193 those commands, we have decided to use this option by default.
15196 \begin_layout Subsection
15200 \begin_layout Standard
15201 We will only describe the features supported by LyX (which is not much currently
15203 Please consult the Memoir manual
15207 \begin_layout Plain Layout
15212 \begin_layout Plain Layout
15222 \begin_inset Flex URL
15225 \begin_layout Plain Layout
15227 CTAN:/macros/latex/memoir/memman.pdf
15240 \begin_layout Description
15241 Abstract: You may wonder why an abstract is an extra feature.
15242 Well, it is in book class.
15243 Usually books don't have abstracts.
15244 Memoir, however, has.
15245 You can use it wherever and how often you like.
15248 \begin_layout Description
15249 Chapterprecis: You may know this older typesetting style: The contents of
15250 a chapter are summarized below the title and also in the table of contents
15252 \begin_inset space \thinspace{}
15256 \begin_inset space \space{}
15261 Our hero arrives in Troia; he loses some friends; he finds others
15264 Chapterprecis does exactly this.
15265 It is therefore only sensible below a chapter.
15268 \begin_layout Description
15269 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
15270 The epigraph environment provides an elegant way of typesetting such a
15272 The motto itself (text) and its author (source) are divided by a short
15274 Unfortunately, we have to fool LyX a bit here again, since the environment
15275 needs two arguments (text and source).
15276 In this case, we have to use curly brackets (in TeX mode) between the two
15287 <author of the slogan>.
15290 \begin_layout Description
15291 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
15292 complex figurative poems).
15293 LyX can only support a few of them.
15294 One is poemtitle, which is a centered title for poems, which will also
15295 be added to the table of contents (verse is the standard environment for
15297 Memoir has some enhanced versions of verse, but you need to use TeX code,
15298 because they have to be nested inside regular verse environments, which
15299 is not possible with LyX).
15302 \begin_layout Description
15303 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
15306 \begin_layout Section
15307 Article (mwart), book (mwbk) and report (mwrep)
15308 \begin_inset Argument
15311 \begin_layout Plain Layout
15324 \begin_layout Standard
15330 \begin_layout Standard
15331 The LyX document classes
15347 correspond to the LaTeX document classes
15360 They are replacements for the standard document classes
15372 , resp., and fit better to Polish typography conventions in a number of points.
15376 \begin_layout Standard
15380 \begin_layout Itemize
15381 Unnumbered titles (with star, e.
15382 \begin_inset space \thinspace{}
15386 \begin_inset space \space{}
15393 ) are added into table of contents,
15396 \begin_layout Itemize
15397 Additional page styles:
15401 \begin_layout Description
15402 uheadings header with separated lines,
15405 \begin_layout Description
15406 myheadings custom header, contents headers via commands:
15421 \begin_layout Description
15422 myuheadings custom header with separated lines,
15425 \begin_layout Description
15426 outer page number is placed on outer side of page
15430 \begin_layout Itemize
15435 \begin_layout Description
15436 rmheadings serif titles — default,
15439 \begin_layout Description
15440 sfheadings sansserif titles,
15443 \begin_layout Description
15444 authortitle on title page first placed is author next title — default,
15447 \begin_layout Description
15448 titleauthor on title page first placed is title next author,
15451 \begin_layout Description
15452 withmarginpar reserve place on page for margins.
15456 \begin_layout Section
15460 \begin_layout Standard
15465 provides an alternative to the standard
15470 It provides similar functionality, but you might prefer this layout with
15471 sans serif sections, headings, and more.
15474 \begin_layout Section
15478 \begin_layout Standard
15484 \begin_layout Standard
15485 \begin_inset VSpace bigskip
15491 \begin_layout Standard
15496 \begin_inset space ~
15501 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15502 \begin_inset Formula $\beta$
15505 release of May, 1999) class.
15508 \begin_layout Standard
15513 textclass, which works with RevTeX 3.1.
15514 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15515 That means that it doesn't interact very well with LyX, which requires
15516 LaTeX2e, although it has been kludged to work.
15517 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15521 \begin_inset space ~
15526 textclass should also be pretty easy to use.
15529 \begin_layout Standard
15530 These documents are supposed to be used in
15534 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15535 macros, and assume you'll know what to put in the preamble if necessary.
15538 \begin_layout Subsection
15542 \begin_layout Standard
15543 All you need to do is install RevTeX 4, as described in the package's README
15545 The package can be found at The RevTeX 4 Web Site
15546 \begin_inset Flex URL
15549 \begin_layout Plain Layout
15551 http://publish.aps.org/revtex4/
15557 Install it somewhere that LaTeX can see it.
15558 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15560 \begin_inset space \thinspace{}
15564 \begin_inset space \space{}
15567 not the directory where you installed the class file.) Then, if you reconfigure
15568 LyX, it will find the class file and let you use the RevTeX4 textclass.
15571 \begin_layout Standard
15572 Probably the easiest way to get started is either to import a RevTeX 4 document
15580 \begin_inset space ~
15585 template, found in the templates directory.
15588 \begin_layout Subsection
15592 \begin_layout Standard
15593 Optional arguments to
15600 \begin_inset Quotes eld
15604 \begin_inset Quotes erd
15608 \begin_inset Quotes eld
15612 \begin_inset Quotes erd
15622 \begin_inset space ~
15630 \begin_inset space ~
15636 Remember that in RevTeX, at least one optional argument is required!
15639 \begin_layout Standard
15640 Other preamble matter, like
15647 \begin_inset space ~
15653 \begin_inset space ~
15658 dialog, also as usual.
15661 \begin_layout Subsection
15665 \begin_layout Standard
15666 The layouts basically correspond to the commands in RevTeX4.0.
15667 For example, the Email layout corresponds to
15674 Note that (at least as of RevTeX 4.0 Beta), the
15682 layouts are exactly equivalent, so you shouldn't need to use both.
15686 \begin_layout Plain Layout
15687 In case you're curious, both were included so that
15691 would be able to translate both
15711 \begin_layout Subsection
15715 \begin_layout Standard
15716 There are a couple of important unique aspects of RevTeX 4 which might cause
15717 bugs that will be even more confusing in LyX.
15720 \begin_layout Standard
15738 The LyX equivalent is that there is a separate Thanks layout.
15743 write footnotes in the
15747 layout, or weird things may happen.
15748 See the RevTeX 4 documentation for more details.
15751 \begin_layout Standard
15755 \begin_inset space ~
15763 \begin_inset space ~
15772 layouts must be placed
15780 layout and the corresponding
15797 , the LaTeX won't compile.
15800 \begin_layout Subsection
15804 \begin_layout Standard
15805 The main problem with this layout is that you can't use the optional arguments
15806 to layouts like Email and Title.
15807 (The problem is not unique to this layout; you can't use optional arguments
15808 to the Section layouts either.) This means that after you export that file
15809 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15810 need to edit the LaTeX file with a text editor to add the optional arguments
15812 \begin_inset space \thinspace{}
15816 \begin_inset space \space{}
15819 the running title for the page headers.
15820 Lacking these layouts makes the
15826 (and the equivalent
15832 ) useless, so the corresponding layouts don't exist, and will have to be
15837 \begin_layout Plain Layout
15842 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15843 has not been updated yet to take advantage of it.
15851 \begin_layout Section
15852 Springer Journals (
15859 \begin_layout Standard
15865 \begin_layout Subsection
15869 \begin_layout Standard
15870 These are the layout files for some of the journal formats used by Springer
15871 Verlag and listed on
15872 \begin_inset Flex URL
15875 \begin_layout Plain Layout
15877 http://www.springer.de/author/tex/help-journals.html
15882 , where you should also go to fetch the class files (yes, these are LaTeX2e
15884 It is a modular system: the things common to all journals are implemented
15889 , which journal-specific layout files (such as, e.
15890 \begin_inset space \thinspace{}
15894 \begin_inset space \space{}
15901 for Journal of Geodesy) can include.
15904 \begin_layout Standard
15905 This means that implementing support for any other Springer journal on this
15906 list is as simple as writing your own
15914 file following the outline given in
15922 \begin_layout Standard
15923 It is reasonably well tested only for the Journal of Geodesy.
15932 come with the standard LyX distribution.
15933 Install the relevant class file (downloaded from Springer) in a proper
15934 directory, reconfigure LaTeX (in the teTeX case by running
15938 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15939 and it should work.
15942 \begin_layout Subsection
15946 \begin_layout Standard
15947 A large number of theorem-like styles —
15953 \SpecialChar \ldots{}
15959 \begin_layout Standard
15962 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15963 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15966 See the Springer class file documentation for details.
15969 \begin_layout Subsection
15973 \begin_layout Itemize
15985 \begin_layout Itemize
15988 Probability Theory and Related Fields
15994 — Jean-Marc Lasgouttes
15997 \begin_layout Standard
15998 Add your own, it isn't so hard!
16001 \begin_layout Subsection
16005 \begin_layout Standard
16006 These files are partly based on the older
16010 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
16011 file from Springer.
16016 layout, are now defunct.
16017 Jean-Marc Lasgouttes helped out big in making me find my way around the
16018 LyX layout file mechanism.
16021 \begin_layout Subsection
16025 \begin_layout Standard
16027 But probably less than in the old hacked-LaTeX
16034 \begin_layout Standard
16036 \begin_inset space \thinspace{}
16039 g.: does not display the number for theorem-like layouts, just #.
16042 \begin_layout Section
16048 \begin_inset CommandInset label
16057 \begin_layout Standard
16065 \begin_layout Subsection
16069 \begin_layout Standard
16070 This section describes how to use LyX to make slides for overhead projectors.
16071 There are two document classes that can do this: the default slides class
16077 This section documents the former.
16080 \begin_layout Standard
16081 I'm going to say this again, nice and clear, so that there's no misunderstanding
16085 \begin_layout Standard
16086 \begin_inset VSpace bigskip
16092 \begin_layout Standard
16096 This section documents the class
16097 \begin_inset Quotes eld
16105 \begin_inset Quotes erd
16113 \begin_layout Standard
16114 \begin_inset VSpace bigskip
16120 \begin_layout Standard
16121 If you're looking for the documentation for
16122 \begin_inset Quotes eld
16130 \begin_inset Quotes erd
16133 , check out section
16134 \begin_inset space ~
16138 \begin_inset CommandInset ref
16140 reference "sec:foiltex"
16150 \begin_inset Quotes eld
16158 \begin_inset Quotes erd
16161 ] is actually somewhat better than the default
16169 \begin_layout Plain Layout
16170 \SpecialChar \ldots{}
16171 or so I've been told repeatedly by its advocates.
16172 Having never used it, I have no idea if this claim is true or not.
16177 which this section documents.
16180 \begin_layout Standard
16181 This class is the LaTeX2e improvement of the old
16186 Every LaTeX2e distribution includes this class [which I'll just refer to
16188 \begin_inset Quotes eld
16196 \begin_inset Quotes erd
16199 from now on], so you're bound to have it.
16200 As I noted earlier, there are other classes, such as
16204 , which also produce slides for overhead projectors and do a better job
16206 However, there are some things which
16210 can do which the others can't, such as generate overlays.
16211 Read on to learn more!
16214 \begin_layout Subsection
16216 \begin_inset CommandInset label
16218 name "sec:slidesetup"
16225 \begin_layout Standard
16226 Obviously, to use this document class, you need to select
16227 \begin_inset Quotes eld
16235 \begin_inset Quotes erd
16238 from the class list in the
16240 Document\SpecialChar \menuseparator
16244 There are some other special things you should know about this class:
16247 \begin_layout Itemize
16248 Don't bother changing the options
16253 They're not supported by the
16260 \begin_layout Itemize
16264 \begin_inset space ~
16269 behaves a bit differently for this class.
16270 The possible choices and what they do are as follows:
16274 \begin_layout Description
16279 The final output contains page numbers in the lower right corner.
16282 \begin_layout Description
16291 , but also prints out any time markers you've put in.
16292 This is the default.
16295 \begin_layout Description
16300 The final output contains no page numbers, time markers, or alignment markers.
16304 \begin_layout Itemize
16309 class has an extra option:
16315 \begin_inset Quotes eld
16323 \begin_inset Quotes erd
16326 in the extra class options.
16330 \begin_layout Standard
16331 Using this options allows you to add time markers to
16337 \begin_inset space ~
16341 \begin_inset CommandInset ref
16343 reference "sec:slideNote"
16351 \begin_layout Standard
16352 You can also use the template file
16353 \begin_inset Quotes eld
16361 \begin_inset Quotes erd
16364 to automatically set up a document to use the
16370 File\SpecialChar \menuseparator
16372 \begin_inset space ~
16376 \begin_inset space ~
16381 to open your new document].
16382 The template file also contains some examples of the special paragraph
16383 environments used by this class.
16384 I'll describe those next.
16387 \begin_layout Subsection
16388 Paragraph Environments
16391 \begin_layout Subsubsection
16392 Supported Environments
16395 \begin_layout Standard
16396 The first thing you'll notice when you start up a new
16400 document is the font size and type: it's the equivalent of the size
16401 \begin_inset Quotes eld
16409 \begin_inset Quotes erd
16415 \begin_inset space ~
16421 This is also what's used in the output.
16423 \begin_inset Quotes eld
16427 \begin_inset Quotes erd
16430 to remind you that this is a slide.
16431 Your final slides will use a larger font; ergo, you'll have less space.
16432 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16435 \begin_layout Standard
16436 The next thing that becomes obvious is the changes to the paragraph environment
16437 pull-down box [at the far-left end of the toolbar].
16438 Most of the paragraph environments you're used to seeing are missing.
16439 There are also five new ones.
16444 class itself only supports certain paragraph environments:
16447 \begin_layout Itemize
16453 \begin_layout Itemize
16459 \begin_layout Itemize
16465 \begin_layout Itemize
16471 \begin_layout Itemize
16477 \begin_layout Itemize
16483 \begin_layout Itemize
16489 \begin_layout Itemize
16495 \begin_layout Itemize
16501 \begin_layout Itemize
16507 \begin_layout Itemize
16513 \begin_layout Standard
16514 All of the other standard environments, including the section-heading environmen
16515 ts, aren't used in the
16522 \begin_layout Standard
16523 On the other hand, you'll notice the following new environments:
16526 \begin_layout Itemize
16532 \begin_layout Itemize
16538 \begin_layout Itemize
16544 \begin_layout Itemize
16550 \begin_layout Itemize
16556 \begin_layout Standard
16557 These five are kind of quirky, due to a
16558 \begin_inset Quotes eld
16562 \begin_inset Quotes erd
16566 You see, LyX doesn't permit you to nest any other paragraph environment
16567 into an empty environment.
16568 Now, that's fine and dandy, but it means that you wouldn't be able to start
16569 a slide with anything except plain text.
16570 To deal with this, I've performed a little
16571 \begin_inset Quotes eld
16575 \begin_inset Quotes erd
16581 \begin_layout Subsubsection
16582 Quirks of the New Environments
16583 \begin_inset CommandInset label
16585 name "sec:slideQuirk"
16592 \begin_layout Standard
16593 All five of the new paragraph environments are somewhat quirky due to inherent
16594 limitiations in the current version of LyX.
16595 As I just mentioned, LyX forbids environments that begin with another environme
16597 To get around this, the
16601 environment isn't a paragraph environment as described in the
16609 \begin_layout Standard
16610 You should consider
16623 \begin_inset Quotes eld
16626 pseudo-environments.
16627 \begin_inset Quotes erd
16630 They look like a section heading or a
16631 \begin_inset Quotes eld
16639 \begin_inset Quotes erd
16642 but really begin a [and, if necessary, end the previous] paragraph environment.
16652 \begin_inset Quotes eld
16656 \begin_inset Quotes erd
16659 These two perform some action.
16662 \begin_layout Standard
16663 A common feature of all five environments,
16683 , is a rather long-ish label.
16684 The text following this label — ordinarily the contents of the paragraph
16685 environment — is utterly irrelevant for
16706 LyX completely ignores it.
16707 In fact, you can leave these five environments completely empty.
16711 \begin_layout Standard
16716 to put any text after the rather long-ish label, you might want to.
16717 This could be a short description of the contents of the
16722 In that case, enter your descriptive comment and hit
16726 as you normally would.
16729 \begin_layout Standard
16730 If, on the other hand, you don't want to enter any descriptive text, you'll
16731 hit another LyX quirk.
16732 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16733 environment until you put something in the old one.
16737 \begin_layout Itemize
16738 Start entering the text that will
16766 \begin_layout Itemize
16767 Now move to the beginning of that paragraph.
16771 \begin_layout Itemize
16780 \begin_layout Itemize
16781 Finally, change this new, empty paragraph to a
16805 \begin_layout Standard
16806 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16810 \begin_layout Subsection
16811 Making a Presentation with
16824 \begin_layout Subsubsection
16832 \begin_layout Standard
16833 If you're expecting this section to teach you how to actually make a presentatio
16834 n, you'll be sorely disappointed.
16835 Naturally, I'll describe all of the ways the
16839 class can assist you in preparing the materials for a presentation.
16840 Filling in the contents, however, is up to you.
16845 the LyX philosophy.]
16848 \begin_layout Standard
16853 environment [in the manner described in section
16854 \begin_inset space ~
16858 \begin_inset CommandInset ref
16860 reference "sec:slideQuirk"
16864 ] tells LyX to begin a new slide [duh].
16865 The label for this environment/
16866 \begin_inset Quotes erd
16870 \begin_inset Quotes erd
16874 \begin_inset Quotes eld
16878 \begin_inset Quotes erd
16881 in cool blue, followed by the label,
16882 \begin_inset Quotes eld
16886 \begin_inset Quotes erd
16890 Any text or paragraph environments that follow this one go on the new slide.
16894 \begin_layout Standard
16895 Slides are probably the only time you'll need to forcibly end pages in LyX
16896 (this can be specified in the
16901 In fact, you'll want to, once you finish entering the contents of one slide.
16902 If you've entered more text than can physically fit on a slide, the extra
16903 overflows onto a new slide.
16904 I don't recommend doing this, however, since the overflow slide won't have
16905 any page number on it.
16906 Furthermore, it may interfere with any
16910 you've made to accompany the oversized
16917 \begin_layout Standard
16926 environments work the same way as the
16931 They both create an
16932 \begin_inset Quotes eld
16936 \begin_inset Quotes erd
16939 followed by a label [
16940 \begin_inset Quotes eld
16944 \begin_inset Quotes erd
16948 \begin_inset Quotes eld
16952 \begin_inset Quotes erd
16956 The color is a stunning magenta instead of blue, and the
16957 \begin_inset Quotes eld
16961 \begin_inset Quotes erd
16964 will look different, in style and in length.
16965 The label fonts of all three also differ from one another.
16968 \begin_layout Standard
16973 , if the contents of a
16981 exceed the physical size of a slide or sheet of paper, the extra will overflow
16983 Again, you should avoid this.
16984 It defeats the whole purpose of
16995 \begin_layout Subsubsection
17005 \begin_layout Standard
17010 is a slide that sits atop another slide.
17011 Perhaps you wish to discuss a figure on the main
17015 before displaying the text associated with it.
17016 One way to accomplish this is tape a flap of dark paper over the part of
17021 you want to display later.
17022 This method fails, however, if you wish to overlap one graph with another,
17024 You would then have to fumble while speaking to align the two separate,
17029 s to align the two graphs.
17034 environment in both cases makes life much easier.
17037 \begin_layout Standard
17042 receives the page number of its
17043 \begin_inset Quotes eld
17047 \begin_inset Quotes erd
17055 \begin_inset Quotes eld
17063 \begin_inset Quotes erd
17070 \begin_layout Plain Layout
17071 Presumably, mutliple
17076 \begin_inset Quotes eld
17084 \begin_inset Quotes erd
17088 \begin_inset Quotes eld
17096 \begin_inset Quotes erd
17100 \begin_inset Quotes eld
17108 \begin_inset Quotes erd
17112 \begin_inset space ~
17115 appended to the page number of the parent
17125 Clearly, you want the contents of both the
17133 to each fit on a single physical slide! You should probably consider an
17139 \begin_inset Quotes eld
17143 \begin_inset Quotes erd
17155 class provides a visual cue for this: the label at the start of an
17159 is shorter than that at the start of a
17164 Lastly, when you generate printable output, you'll find alignment markers
17165 in all four corners of both the
17169 page and its parent
17174 These will assist you in lining up the two physical slides.
17177 \begin_layout Standard
17178 The major problem in overlaying two slides is aligning the contents of the
17179 two transparencies.
17180 How much space should you leave for that graph on the second slide? Worse
17181 still, what if you want a graph and a sentence on second slide, but there
17182 is text on the main transparency that goes in between them? You could try
17183 and insert vertical space of the right size.
17184 The better way is to use
17195 \begin_layout Standard
17196 As their names imply,
17204 are two command-like paragraph environments that make all subsequent text
17205 invisible and visible, respectively.
17207 \begin_inset space ~
17211 \begin_inset CommandInset ref
17213 reference "sec:slideQuirk"
17217 that you don't place anything
17221 these two environments, however.
17226 , it inserts a centered, sky-blue label into the page reading
17227 \begin_inset Quotes eld
17230 <Invisible Text Follows>
17231 \begin_inset Quotes erd
17235 For paragraphs following this label, the parts of the
17243 ; it doesn't matter which] where they would be contain instead blank space.
17247 \begin_layout Standard
17252 , the corresponding centered label is
17253 \begin_inset Quotes eld
17256 <Visible Text Follows>
17257 \begin_inset Quotes erd
17261 Paragraphs following this label behave normally.
17262 Note that the beginning of a new
17274 automatically shuts off an
17279 It's therefore not necessary to use
17290 \begin_layout Standard
17291 By now, it should be obvious how to create overlay transparencies using
17292 the proper combination of
17311 \begin_layout Enumerate
17316 , including everything that will appear on it, whether on the main slide
17324 \begin_layout Enumerate
17325 Before each figure or paragraph that will appear only on the
17334 If necessary, insert a
17338 environment after the
17345 \begin_layout Enumerate
17350 immediately following the
17357 \begin_layout Enumerate
17358 Copy the contents of this
17369 \begin_layout Enumerate
17374 , change all of the
17385 \begin_layout Standard
17387 You've just made an
17394 \begin_layout Standard
17395 There's one problem with the way I've designed the LyX
17399 class: you can't make text in the middle of a paragraph invisible, nor
17400 make text in the middle of an invisible paragraph visible again.
17401 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17405 \begin_layout Plain Layout
17406 The commands of interest are:
17409 \begin_layout Itemize
17414 invisible \SpecialChar \ldots{}
17418 \begin_layout Itemize
17423 visible \SpecialChar \ldots{}
17427 \begin_layout Plain Layout
17428 \SpecialChar \ldots{}
17429 and need to be marked as TeX.
17431 \begin_inset Quotes eld
17435 \begin_inset Quotes erd
17438 you wish to change goes in between the brackets [and after the
17451 If you don't know how to mark text as TeX, see the appropriate section
17464 \begin_layout Subsubsection
17474 \begin_inset CommandInset label
17476 name "sec:slideNote"
17483 \begin_layout Standard
17492 is associated with a
17493 \begin_inset Quotes eld
17497 \begin_inset Quotes erd
17509 class provides visual cues.
17514 is shorter than that of a
17518 [yet longer than that of an
17522 ] and, like the label of an
17526 is shockingly magenta.
17527 Additionally, the printed
17531 has the page number of its
17532 \begin_inset Quotes eld
17536 \begin_inset Quotes erd
17544 \begin_inset Quotes eld
17552 \begin_inset Quotes erd
17556 \begin_inset Quotes eld
17564 \begin_inset Quotes erd
17568 \begin_inset Quotes eld
17576 \begin_inset Quotes erd
17580 You can have multiple
17584 s associated with a single
17596 , you'll probably want to break up long
17600 s so that they fit on a single sheet of paper.
17603 \begin_layout Standard
17608 is obvious: it contains anything additional you might want to say about
17614 It could also be used as a sheet of reminders for a particular
17619 In the case of the latter, you might want to make use of time markers.
17625 \begin_inset Quotes eld
17629 \begin_inset Quotes erd
17632 support for time markers, a
17637 So, you'll have to resort to using the LaTeX codes.
17640 \begin_layout Standard
17641 To use time markers, you'll need to specify the extra class option
17642 \begin_inset Quotes eld
17650 \begin_inset Quotes erd
17654 \begin_inset space ~
17658 \begin_inset CommandInset ref
17660 reference "sec:slidesetup"
17665 This option turns on timing marks, which will appear in the lower-left-hand
17671 To set what appears in the time marker, you use the LaTeX commands
17672 \begin_inset Quotes eld
17682 \begin_inset Quotes erd
17686 \begin_inset Quotes eld
17696 \begin_inset Quotes erd
17700 The arguments of both commands are time measured in seconds.
17702 \begin_inset Quotes eld
17712 \begin_inset Quotes erd
17715 sets the time marker to a given time.
17717 \begin_inset Quotes eld
17727 \begin_inset Quotes erd
17730 increments the time marker by the specified amount.
17731 Using time markers and
17735 s in this fashion, you can remind yourself how much time to spend on a particula
17743 \begin_layout Standard
17744 There's one last feature to describe.
17745 Clearly, you'd like to print out all of your
17753 s on transparencies while printing all of your
17770 with which it is associated.
17771 What's a person to do?
17774 \begin_layout Standard
17775 Luckily, there are two LaTeX commands that allow you to select what to print
17777 Both must be placed into the preamble of your document.
17779 \begin_inset Quotes eld
17791 \begin_inset Quotes erd
17794 will cause the output to contain only the
17803 Correspondingly, the command
17804 \begin_inset Quotes eld
17816 \begin_inset Quotes erd
17819 prevents the output of anything but
17824 I'd advise placing both commands in the preamble and initially comment
17826 You can then preview your entire presentation as you write.
17827 When you're done writing, you can then uncomment one of the two to select
17828 what you want to print.
17829 I like to uncomment
17830 \begin_inset Quotes eld
17842 \begin_inset Quotes erd
17845 , print to a file with
17846 \begin_inset Quotes eld
17854 \begin_inset Quotes erd
17857 in its name, comment it back out, then uncomment
17858 \begin_inset Quotes eld
17870 \begin_inset Quotes erd
17874 \begin_inset Quotes eld
17882 \begin_inset Quotes erd
17886 I can then send either file to a printer, loading transparencies or plain
17887 paper as appropriate.
17890 \begin_layout Standard
17891 You can also provide other arguments to the
17892 \begin_inset Quotes eld
17902 \begin_inset Quotes erd
17906 \begin_inset Quotes eld
17916 \begin_inset Quotes erd
17920 See a good LaTeX book for details.
17923 \begin_layout Subsection
17928 Class Template File
17931 \begin_layout Standard
17932 I have also provided a template file,
17933 \begin_inset Quotes eld
17941 \begin_inset Quotes erd
17949 To use it, begin your new presentation with
17954 ile\SpecialChar \menuseparator
17956 \begin_inset space ~
17960 \begin_inset space ~
17970 Your new LyX presentation file will contain an example
17991 additionally contain an example of the use of
18000 Lastly, the preamble will contain:
18003 \begin_layout LyX-Code
18004 % Uncomment to print out only slides and overlays
18007 \begin_layout LyX-Code
18011 \begin_layout LyX-Code
18017 \begin_inset Newline newline
18023 \begin_layout LyX-Code
18024 % Uncomment to print out only notes
18027 \begin_layout LyX-Code
18031 \begin_layout LyX-Code
18039 \begin_layout Standard
18040 One final thing: I created this class to support the LaTeX2e
18041 \begin_inset Quotes eld
18049 \begin_inset Quotes erd
18052 class, one of the built-in LaTeX2e classes.
18053 Neither I nor the rest of the LyX Team endorse or oppose the use of this
18054 built-in slide class.
18055 It's here if you want it or need it.
18056 There exist other LaTeX2e classes for creating presentations, such as the
18062 \begin_inset space ~
18066 \begin_inset CommandInset ref
18068 reference "sec:foiltex"
18073 \begin_inset Quotes eld
18081 \begin_inset Quotes erd
18084 package [present on some TeX distributions].
18085 The latter is not yet supported under LyX.
18089 \begin_layout Plain Layout
18090 Perhaps you can take on the task\SpecialChar \ldots{}
18096 I know nothing about these other classes.
18097 Try them out to see what sort of alternative they provide.
18100 \begin_layout Chapter
18101 LyX Features needing Extra Software
18104 \begin_layout Section
18108 \begin_layout Standard
18114 \begin_layout Subsection
18118 \begin_layout Standard
18127 \begin_layout Plain Layout
18132 is not yet available when you are using the LaTeX distribution MiKTeX.
18137 , you'll find in the
18144 \begin_inset space ~
18155 \begin_inset CommandInset href
18157 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
18164 \begin_layout Standard
18169 package is a program that was written by
18170 \begin_inset Flex Noun
18173 \begin_layout Plain Layout
18175 \begin_inset space ~
18183 in frustration because some constructs in LaTeX are sometimes non-intuitive,
18184 and easy to forget.
18185 The program runs over your LaTeX file, checks the integrity of the file,
18186 and flags some common errors.
18187 In other technical words, it is
18194 \begin_layout Standard
18195 Well, what is a syntax checker doing in LyX which is supposed to produce
18196 correct LaTeX anyways? The answer is simple: Just as
18200 not only checks the
18204 of C programs, but also does
18208 checks for type-errors,
18212 catches some common
18216 errors, in addition to the syntactical ones.
18221 is capable of detecting several common errors, such as
18224 \begin_layout Itemize
18225 Ellipsis detection:
18226 \begin_inset Newline newline
18229 Use \SpecialChar \ldots{}
18233 \begin_layout Itemize
18234 No space in front of/after parenthesis:
18235 \begin_inset Newline newline
18241 \begin_layout Itemize
18242 Enforcement of normal space after common abbreviations:
18243 \begin_inset Newline newline
18247 \begin_inset space \thinspace{}
18251 \begin_inset space \space{}
18254 is too wide spacing.
18257 \begin_layout Itemize
18258 Enforcement of end-of-sentence space when the last sentence ends with a
18260 \begin_inset Newline newline
18264 And this is wrong spacing.
18267 \begin_layout Itemize
18268 Space in front of labels and similar commands:
18269 \begin_inset Newline newline
18272 The label should stick right up to the text to avoid falling to a wrong
18275 \begin_inset CommandInset label
18285 \begin_layout Plain Layout
18286 This footnote is in danger of falling off to a wrong page
18291 The label is separated too much.
18294 \begin_layout Itemize
18295 Space in front of references, instead of hard spaces:
18296 \begin_inset Newline newline
18299 In you are in bad luck, the text will break right between the referenced
18300 text and reference number, and that's a pity.
18302 \begin_inset CommandInset ref
18304 reference "sec:chktex"
18311 \begin_layout Itemize
18313 \begin_inset Quotes eld
18317 \begin_inset Quotes erd
18321 \begin_inset Formula $\times$
18325 \begin_inset Newline newline
18328 2x2 looks cheap compared to
18329 \begin_inset Formula $2\times2$
18335 \begin_layout Standard
18336 and more \SpecialChar \ldots{}
18337 It is an invaluable tool when you are
18338 \begin_inset Quotes eld
18342 \begin_inset Quotes erd
18345 your document before printing, and you should run it right after the obligatory
18346 spelling check, and before you go fine tuning the typesetting.
18349 \begin_layout Subsection
18353 \begin_layout Standard
18354 If you have the program installed, usage is as simple as choosing
18356 Tools\SpecialChar \menuseparator
18358 \begin_inset space ~
18364 This will make LyX generate a LaTeX file of your document, start
18368 to check it, and then make LyX insert
18369 \begin_inset Quotes eld
18373 \begin_inset Quotes erd
18376 with the warnings from
18380 , if there were any.
18381 The warnings will be placed close to the point of the mistake, and you
18382 can quickly find them by using the
18384 Navigate\SpecialChar \menuseparator
18387 menu item, or the shortcut key
18396 Open the error boxes by clicking on them with the mouse, or use the shortcut
18405 bindings, or the corresponding
18414 Read the warning and correct the mistake, if it is a mistake.
18415 If you have trouble understanding what the warning is about, you can safely
18417 Remember that there is a hidden layer between the document on screen and
18418 the technical details in invoking
18422 , and this gap can make some warnings seem arcane or just right down plain
18426 \begin_layout Standard
18427 This document is an excellent testing bed for the feature, and it should
18428 provide quite a few warnings for you to fiddle with.
18429 Since computers are only so smart, expect most of the warnings to be false
18433 \begin_layout Subsection
18434 How to fine tune it
18437 \begin_layout Standard
18438 Sometimes, you'll find that
18442 makes more noise than suits your mood.
18443 Then you can choose not to use it, wait until your mood changes, or try
18448 to get better along with you.
18449 Another choice in the most desperate situations is to use
18451 View\SpecialChar \menuseparator
18453 \begin_inset space ~
18457 \begin_inset space ~
18461 \begin_inset space ~
18466 , which will get rid of all warnings instantly.
18469 \begin_layout Standard
18478 very configurable and extensible, you shouldn't expect to solve all problems
18484 Since LyX has to generate a somewhat special LaTeX file to be able to match
18485 the line numbers from the
18493 \begin_layout Plain Layout
18494 You can inspect the specific output from
18500 Edit\SpecialChar \menuseparator
18502 \begin_inset space ~
18506 \begin_inset space ~
18520 to the internal document structure, some of the warnings will not seen
18521 to appear correctly.
18522 There are two things you can do about this:
18525 \begin_layout Itemize
18530 invocation command line in
18546 installation configuration file (usually with the file
18551 See below to learn what warnings can be enabled and disabled on the command
18556 \begin_layout Itemize
18557 Export your document as a raw LaTeX file using
18559 File\SpecialChar \menuseparator
18560 Export\SpecialChar \menuseparator
18568 Invoked in this way, it can be a hassle to find the corresponding place
18569 in the document inside LyX, but with a little patience, you should be able
18573 \begin_layout Standard
18574 Here follows the warning messages that can be enabled and disabled in
18583 to disable a warning, and
18587 to enable a warning.
18588 The emphasized entries are disabled by default, because the default is
18591 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18596 \begin_layout Standard
18597 Notice that you should only use the options that enable and disable warnings,
18598 because LyX relies on some of the other command line parameters to be set
18599 in a specific way to have a chance to communicate with
18606 \begin_layout Enumerate
18610 Command terminated with space.
18613 \begin_layout Enumerate
18616 Non-breaking space (
18617 \begin_inset Quotes eld
18625 \begin_inset Quotes erd
18628 ) should have been used.
18631 \begin_layout Enumerate
18635 You should enclose the previous parenthesis with
18636 \begin_inset Quotes eld
18644 \begin_inset Quotes erd
18650 \begin_layout Enumerate
18653 Italic correction (
18654 \begin_inset Quotes eld
18664 \begin_inset Quotes erd
18667 ) found in non-italic buffer.
18670 \begin_layout Enumerate
18673 Italic correction (
18674 \begin_inset Quotes eld
18684 \begin_inset Quotes erd
18687 ) found more than once.
18690 \begin_layout Enumerate
18694 No italic correction (
18695 \begin_inset Quotes eld
18705 \begin_inset Quotes erd
18711 \begin_layout Enumerate
18715 \begin_inset Quotes eld
18723 \begin_inset Quotes erd
18727 \begin_inset Quotes eld
18735 \begin_inset Quotes erd
18741 \begin_layout Enumerate
18744 Wrong length of dash may have been used.
18747 \begin_layout Enumerate
18751 \begin_inset Quotes eld
18759 \begin_inset Quotes erd
18763 \begin_inset Quotes eld
18771 \begin_inset Quotes erd
18777 \begin_layout Enumerate
18781 \begin_inset Quotes eld
18789 \begin_inset Quotes erd
18795 \begin_layout Enumerate
18799 \begin_inset Quotes eld
18807 \begin_inset Quotes erd
18810 to achieve an ellipsis.
18813 \begin_layout Enumerate
18816 Inter-word spacing (
18817 \begin_inset Quotes eld
18827 \begin_inset Quotes eld
18830 ) should perhaps be used.
18833 \begin_layout Enumerate
18836 Inter-sentence spacing (
18837 \begin_inset Quotes eld
18847 \begin_inset Quotes erd
18850 ) should perhaps be used.
18853 \begin_layout Enumerate
18856 Could not find argument for command.
18859 \begin_layout Enumerate
18863 \begin_inset Quotes eld
18871 \begin_inset Quotes erd
18877 \begin_layout Enumerate
18880 Math mode still on at end of LaTeX file.
18883 \begin_layout Enumerate
18887 \begin_inset Quotes eld
18895 \begin_inset Quotes erd
18898 doesn't match the number of
18899 \begin_inset Quotes eld
18907 \begin_inset Quotes erd
18913 \begin_layout Enumerate
18916 You should use either
18919 \begin_inset Quotes eld
18927 \begin_inset Quotes erd
18932 as an alternative to
18933 \begin_inset Quotes eld
18941 \begin_inset Quotes erd
18947 \begin_layout Enumerate
18954 " (ASCII 39) instead of "
18961 \begin_layout Enumerate
18964 User-specified pattern found.
18967 \begin_layout Enumerate
18970 This command might not be intended.
18973 \begin_layout Enumerate
18980 \begin_layout Enumerate
18998 \begin_layout Enumerate
19001 Delete this space to maintain correct page references.
19004 \begin_layout Enumerate
19008 You might wish to put this between a pair of
19009 \begin_inset Quotes eld
19017 \begin_inset Quotes erd
19023 \begin_layout Enumerate
19026 You ought to remove spaces in front of punctuation.
19029 \begin_layout Enumerate
19032 Could not execute LaTeX command.
19035 \begin_layout Enumerate
19044 in front of small punctuation.
19047 \begin_layout Enumerate
19055 may look prettier here.
19058 \begin_layout Enumerate
19062 Multiple spaces detected in output.
19065 \begin_layout Enumerate
19068 This text may be ignored.
19071 \begin_layout Enumerate
19077 \begin_inset Quotes eld
19082 to begin quotation, not
19089 \begin_layout Enumerate
19096 to end quotation, not
19099 \begin_inset Quotes eld
19107 \begin_layout Enumerate
19113 \begin_layout Enumerate
19116 You should perhaps use
19117 \begin_inset Quotes eld
19125 \begin_inset Quotes erd
19131 \begin_layout Enumerate
19134 You should put a space in front of/after parenthesis.
19137 \begin_layout Enumerate
19140 You should avoid spaces in front of/after parenthesis.
19143 \begin_layout Enumerate
19147 You should not use punctuation in front of/after quotes.
19150 \begin_layout Enumerate
19153 Double space found.
19156 \begin_layout Enumerate
19159 You should put punctuation outside inner/inside display math mode.
19162 \begin_layout Enumerate
19165 You ought to not use primitive TeX in LaTeX code.
19168 \begin_layout Enumerate
19171 You should remove spaces in front of
19172 \begin_inset Quotes eld
19180 \begin_inset Quotes erd
19186 \begin_layout Enumerate
19189 \begin_inset Quotes eld
19197 \begin_inset Quotes erd
19200 is normally not followed by
19201 \begin_inset Quotes eld
19209 \begin_inset Quotes erd
19215 \begin_layout Standard
19216 In later versions of LyX, we hope to provide a more complete interface to
19217 this tool (and it's smaller cousin
19221 ) to exploit the full power of it.
19222 But it's not exactly useless as it is now: go try it on one of your existing
19223 documents of a certain length and be surprised.
19226 \begin_layout Section
19227 Version Control in LyX
19230 \begin_layout Standard
19233 Lars Gullik Bjønnes
19240 \begin_layout Subsection
19244 \begin_layout Standard
19245 A friend of mine wanted to try LyX for a group project.
19246 When he didn't find support for version control or file locking, he dropped
19248 This angered me a bit, so I thought that I should at least make support
19249 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
19250 This has been done.
19251 LyX now supports some of the most basic RCS/CVS/SVN commands.
19252 If you need something a bit more sophisticated you will have to do that
19253 manually in a terminal.
19256 \begin_layout Standard
19257 Before you begin to use the version control features in LyX, you should
19258 be familiar with RCS/CVS/SVN usage before start using it under LyX.
19259 Also note that CVS support is not as good as subversion support so we advice
19261 Good place to start with Subversion is SVN Book
19265 \begin_layout Plain Layout
19266 \begin_inset CommandInset href
19268 target "http://svnbook.red-bean.com/"
19278 In case of RCS you should read
19279 \begin_inset Quotes eld
19283 \begin_inset Quotes erd
19286 (a man file, read it with
19291 This file describes all the basic features of RCS.
19292 You should especially notice the comment about a RCS directory, and the
19293 notion of a master RCS file (the file ending in
19300 \begin_layout Standard
19301 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
19302 package—no guarantees are made for older versions.
19303 Most of the log messages are not currently displayed after operations —
19304 you can check them in Messages pane if unsure.
19307 \begin_layout Standard
19308 For introducing your own external commands consult vc-command in the manual
19312 \begin_layout Subsection
19313 RCS commands in LyX
19316 \begin_layout Standard
19317 The following sections describe the RCS commands supported by LyX.
19318 You can find them in the
19320 File\SpecialChar \menuseparator
19322 \begin_inset space ~
19328 LyX was tested against RCS 5.7.
19331 \begin_layout Subsubsection
19337 \begin_layout Standard
19338 If your document is not under revision control, this is the only item shown
19340 And if it is under revision control, the
19344 item is not visible.
19348 \begin_layout Standard
19349 This command registers your document with RCS (unless you are under the
19350 directory managed by CVS)\SpecialChar \@.
19351 You are asked interactively to supply an initial
19352 description of the document.
19353 The document is now set in Read-Only mode and you have to
19356 \begin_inset space ~
19360 \begin_inset space ~
19364 \begin_inset space ~
19369 , before making any changes to it.
19370 A document under revision control has a
19371 \begin_inset Quotes eld
19374 [RCS:<version> <locker>]
19375 \begin_inset Quotes erd
19378 item tagged to the filename in the minibuffer.
19381 \begin_layout Standard
19382 RCS command that is run:
19384 ci -q -u -i -t-"<initial description>" <file-name>
19387 \begin_layout Standard
19392 to understand the switches.
19396 \begin_layout Subsubsection
19402 \begin_layout Standard
19403 When you are finished editing a file, you check in your changes.
19404 When you do this, you are asked for a description of the changes.
19405 This is stored in the history log.
19406 The version number is bumped, your changes are applied to the master RCS
19407 file, the document is unlocked and set to Read-Only mode.
19411 \begin_layout Standard
19414 ci -q -u -m"<description>" <file-name>
19417 \begin_layout Subsubsection
19423 \begin_layout Standard
19424 By doing this you lock the document so that only you can edit it.
19425 This will also make the document Read-Write only for you.
19426 You will usually continue editing for a while and when you are finished
19427 you check in your changes.
19428 The status line is changed to reflect that you have locked the file.
19432 \begin_layout Standard
19435 co -q -l <file-name>
19438 \begin_layout Subsubsection
19441 Revert To Repository Version
19444 \begin_layout Standard
19445 This will discard all changes made to the document since the last check
19447 You get a warning before changes are discarded.
19450 \begin_layout Standard
19453 co -f -u<version> <file-name>
19456 \begin_layout Subsubsection
19462 \begin_layout Standard
19463 This makes as if the last check in never happened.
19464 No changes are made to the document loaded into LyX, but the last version
19465 is removed from the master RCS file.
19469 \begin_layout Standard
19472 rcs -o<version> <file-name>
19475 \begin_layout Subsubsection
19481 \begin_layout Standard
19482 This shows the complete history of the RCS document.
19487 is shown in a browser.
19495 \begin_layout Subsubsection
19499 \begin_layout Standard
19500 LyX supports RCS version number information (only), see
19501 \begin_inset CommandInset ref
19503 reference "sub:VCS-Revision-Information"
19510 \begin_layout Subsection
19511 CVS commands in LyX
19514 \begin_layout Standard
19515 A subset of CVS operations is supported by LyX.
19516 You can find the commands in the
19518 File\SpecialChar \menuseparator
19520 \begin_inset space ~
19526 The version control system SVN is more powerful, so please use it instead
19527 of CVS if possible.
19530 \begin_layout Subsubsection
19536 \begin_layout Standard
19537 If you start from scratch with CVS you have to create your repository and
19538 checkout the working copy with external tools.
19539 If you're using a client-server setup you may need to login before doing
19540 the first repository checkout.
19543 \begin_layout Standard
19544 If your documents are under revision control and others are using the same
19545 repository problems arise when different changes to the same document at
19546 the same location happen.
19547 Standard CVS repositories doesn't operate with a file locking mechanism.
19548 This may be surprising, but conflicts only occur if people disagree on
19549 the proper content of the same part of a document.
19550 So, if co-workers are used to communicate regularly, these conflicts occur
19552 If they don't communicate they have a fundamental problem anyway.
19553 Nevertheless some people like to work with so called
19554 \begin_inset Quotes eld
19558 \begin_inset Quotes erd
19562 If they do so the working copy of all files is readonly when checked out
19563 first and the user starts editing after using a special command to make
19564 the working copy writable.
19565 When the changes are checked in the working copy returns to readonly state.
19566 With LyX one has to edit the
19567 \begin_inset Flex Code
19570 \begin_layout Plain Layout
19576 file and add the line
19577 \begin_inset Flex Code
19580 \begin_layout Plain Layout
19586 to work with reserved checkouts.
19587 The benefit is the possibility to see who is using a writable copy of some
19589 It's not guaranteed only one user makes a copy writable.
19592 \begin_layout Standard
19593 LyX tries to guess if you're using reserved or non-reserved checkouts.
19594 If your working copy is readonly or it is writable and an additional copy
19595 of your document exists in the CVS/Base sub-directory a reserved otherwise
19596 a non-reserved checkout is assumed.
19597 When a reserved checkout is detected you have to use
19598 \begin_inset Flex MenuItem
19601 \begin_layout Plain Layout
19607 to make your working copy writable if it's readonly.
19609 \begin_inset Flex MenuItem
19612 \begin_layout Plain Layout
19618 operation is possible and that makes your working copy readonly again after
19619 transferring your changes to the repository.
19622 \begin_layout Standard
19623 More information about CVS can be found here
19624 \begin_inset Flex URL
19627 \begin_layout Plain Layout
19629 http://www.nongnu.org/cvs
19635 \begin_inset Flex URL
19638 \begin_layout Plain Layout
19640 http://ximbiot.com/cvs
19648 \begin_layout Standard
19653 to understand the sub-commands and the switches mentioned below.
19656 \begin_layout Subsubsection
19662 \begin_layout Standard
19663 If your document is not under revision control, this is the only item shown
19665 And if it is under revision control, the
19672 item is not visible.
19676 \begin_layout Standard
19677 This command registers in CVS your document
19678 \begin_inset Flex Strong
19681 \begin_layout Plain Layout
19689 in case you have already the documents directory under CVS control (in
19695 This means you have to create or checkout the archive by yourself using
19697 (In case you forget that step LyX registers the document with RCS.)
19700 \begin_layout Standard
19701 Then you are asked interactively to supply an initial description of the
19703 Don't forget that registered file is not yet checked in.
19706 \begin_layout Standard
19707 CVS command that is run:
19709 cvs -q add -m"<entered message>" "<file-name>"
19712 \begin_layout Standard
19717 above and for all other CVS commands is an abbreviation for
19718 \begin_inset Quotes eld
19721 change the current working directory to file location and use the file name
19722 without path component as argument
19723 \begin_inset Quotes erd
19729 \begin_layout Subsubsection
19735 \begin_layout Standard
19736 When you are finished editing a file, you commit your changes.
19737 When you do this and you had changed the document, you are asked for a
19738 description of the changes.
19739 After that changes are written to the repository.
19740 In case you didn't change the document and a reserved checkout is detected
19741 the reservation made on
19742 \begin_inset Flex MenuItem
19745 \begin_layout Plain Layout
19754 \begin_layout Labeling
19755 \labelwidthstring 00.00.0000
19757 \begin_inset space ~
19761 \begin_inset space ~
19765 \begin_inset Newline newline
19769 \begin_inset Flex Code
19772 \begin_layout Plain Layout
19775 -q commit -m"<description>" "<file-name>"
19781 \begin_inset Newline newline
19785 \begin_inset Flex Code
19788 \begin_layout Plain Layout
19799 \begin_layout Subsubsection
19805 \begin_layout Standard
19806 When you are sharing a repository with others, you may have to incorporate
19807 their changes into your working copy.
19810 \begin_layout Standard
19813 cvs -q update "<file-name>"
19816 \begin_layout Standard
19817 If a readonly checkout is detected the working copy is made writable and
19821 \begin_layout Standard
19824 cvs -q edit "<file-name>"
19827 \begin_layout Subsubsection
19830 Revert To Repository Version
19833 \begin_layout Standard
19834 This will discard all changes made to the document since the last check
19836 You get a warning before changes are discarded.
19837 Firstly the file is deleted, secondly CVS update command is run.
19840 \begin_layout Standard
19843 cvs -q update "<file-name>"
19846 \begin_layout Standard
19847 If a reserved checkout is detected and the working copy has no changes only
19848 the reservation is undone.
19851 \begin_layout Standard
19854 cvs -q unedit "<file-name>"
19857 \begin_layout Subsubsection
19858 Update of the local directory checkout from repository
19861 \begin_layout Standard
19862 Once your documents gets more complex, containing sub-documents and pictures,
19864 \begin_inset Flex Code
19867 \begin_layout Plain Layout
19873 files and so on using version control becomes more complicated.
19874 LyX supports updating the whole tree in which resides the document.
19875 This become especially useful once you cooperate with people which neither
19876 have detailed knowledge about CVS usage nor they have ambition to commit
19877 additional material to the repository.
19878 You have to organize the files structure so that all external files are
19879 in the same directory or subdirectories of the document.
19880 It's good practice anyway to store multipart documents in an extra directory.
19883 \begin_layout Standard
19885 \begin_inset Flex Code
19888 \begin_layout Plain Layout
19889 Update local directory from repository
19894 command updates the whole directory.
19895 If local changes are detected user is warned before update starts.
19896 In case of merge conflicts both versions of the conflicting document parts
19897 are placed in the final document.
19898 You have to review and correct the result of the merge.
19899 You'll find the conflicts enclosed in pairs of
19900 \begin_inset Flex Code
19903 \begin_layout Plain Layout
19910 \begin_inset Flex Code
19913 \begin_layout Plain Layout
19920 \begin_inset Flex Code
19923 \begin_layout Plain Layout
19930 The first part is your version as before the update operation with the
19931 document name prepended.
19932 The second one is the repository version with the version number after
19934 \begin_inset Flex Code
19937 \begin_layout Plain Layout
19946 \begin_layout Labeling
19947 \labelwidthstring 00.00.0000
19949 \begin_inset space ~
19953 \begin_inset space ~
19957 \begin_inset Newline newline
19961 \begin_inset Flex Code
19964 \begin_layout Plain Layout
19972 (Ask if changes are detected.)
19973 \begin_inset Newline newline
19977 \begin_inset Flex Code
19980 \begin_layout Plain Layout
19981 cd $path; cvs -q update
19991 \begin_layout Standard
19993 \begin_inset Flex Code
19996 \begin_layout Plain Layout
20002 stands for the path to the document.
20005 \begin_layout Subsubsection
20011 \begin_layout Standard
20012 This shows the complete history of the CVS document.
20015 cvs log "<file-name>"
20017 is shown in a browser.
20020 \begin_layout Subsection
20021 SVN commands in LyX
20024 \begin_layout Standard
20025 SVN is now partially supported by LyX.
20026 You can find the commands in the
20028 File\SpecialChar \menuseparator
20030 \begin_inset space ~
20036 Please note that if you use password protected access to repository via
20037 ssh, you will be asked in terminal window.
20038 LyX was tested against SVN 1.5 and 1.6
20042 \begin_layout Plain Layout
20043 Most of the commands will work with 1.4 too, see
20044 \begin_inset CommandInset ref
20046 reference "sub:SVN-Repo-Update"
20058 \begin_layout Subsubsection
20064 \begin_layout Standard
20065 If your document is not under revision control, this is the only item shown
20067 And if it is under revision control, the
20074 item is not visible.
20078 \begin_layout Standard
20079 This command registers in SVN your document ONLY in case you have already
20080 the documents directory under SVN control (in particular
20085 This means you have to checkout the archive by yourself.
20089 \begin_layout Standard
20090 Then you are asked interactively to supply an initial description of the
20092 Don't forget that registered file is not yet commited.
20095 \begin_layout Standard
20096 SVN command that is run:
20099 \begin_inset Quotes eld
20103 \begin_inset Quotes erd
20109 \begin_layout Standard
20114 to understand the switches.
20118 \begin_layout Subsubsection
20124 \begin_layout Standard
20125 When you are finished editing a file, you commit your changes.
20126 When you do this, you are asked for a description of the changes.
20127 After that changes are commited.
20130 \begin_layout Standard
20135 \begin_layout Plain Layout
20136 In case locking is not enabled.
20138 \begin_inset CommandInset ref
20140 reference "subsec:SVN-File-Locking"
20151 svn commit -q -m"<description>" <file-name>
20154 \begin_layout Subsubsection
20160 \begin_layout Standard
20161 Updates the changes of this file from the repository.
20162 Be sure you understand SVN merging and conflicts resolving before using
20163 this function, because all conflicts has to be resolved manually by you!
20166 \begin_layout Standard
20171 \begin_layout Plain Layout
20179 svn update --non-interactive
20180 \begin_inset Quotes eld
20184 \begin_inset Quotes erd
20190 \begin_layout Subsubsection
20193 Revert To Repository Version
20196 \begin_layout Standard
20197 This will discard all changes made to the document since the last check
20199 You get a warning before changes are discarded.
20203 \begin_layout Standard
20207 \begin_inset Quotes eld
20211 \begin_inset Quotes erd
20217 \begin_layout Subsubsection
20218 \begin_inset CommandInset label
20220 name "sub:SVN-Repo-Update"
20224 Update of the local directory checkout from repository
20228 \begin_layout Plain Layout
20229 Note that this command will work only with subversion
20230 \begin_inset Formula $\geqq1.5$
20241 \begin_layout Standard
20242 All the commands above have one shortcomming - they deal with the current
20244 Once your document contains pictures, includes external
20245 \begin_inset Flex Code
20248 \begin_layout Plain Layout
20254 files and so on administration becomes more complicated.
20255 LyX now supports updating the whole tree in which resides the document
20259 \begin_layout Plain Layout
20260 One need to organize the files structure so that all external files are
20261 in the same directory or subdirectories of the document.
20268 This become especially useful once you cooperate with people which neither
20269 know about subversion management nor they have ambition to commit additional
20270 material to the repository.
20274 \begin_layout Standard
20275 \begin_inset Flex Code
20278 \begin_layout Plain Layout
20279 Update local directory from repository
20284 command updates the whole directory and in case of merge conflicts local
20285 version of the files are left, so no unintended data loss occurs.
20286 If local changes are detected user is warned before update starts.
20289 \begin_layout Labeling
20290 \labelwidthstring 00.00.0000
20292 \begin_inset space ~
20296 \begin_inset space ~
20300 \begin_inset Newline newline
20304 \begin_inset Flex Code
20307 \begin_layout Plain Layout
20313 (Ask if changes are detected.)
20314 \begin_inset Newline newline
20318 \begin_inset Flex Code
20321 \begin_layout Plain Layout
20322 svn update --accept mine-full $path
20330 \begin_layout Standard
20332 \begin_inset Flex Code
20335 \begin_layout Plain Layout
20341 stands for the path to the document.
20344 \begin_layout Subsubsection
20350 \begin_layout Standard
20351 This shows the complete history of the SVN document.
20355 \begin_inset Quotes eld
20359 \begin_inset Quotes erd
20364 is shown in a browser.
20367 \begin_layout Subsubsection
20369 \begin_inset CommandInset label
20371 name "subsec:SVN-File-Locking"
20378 \begin_layout Standard
20379 The file exchange through various revision control systems brings the problem
20380 of merge conflicts in case two different users try to edit the same (parts
20382 When such a conflict happens it needs manual resolving and one reasonable
20383 alternative is to provide some kind of locking mechanism, which guarantees
20384 that only one user is allowed to edit file at the given time.
20387 \begin_layout Standard
20388 SVN has two such mechanisms to provide mutual exclusivity for file access
20389 - locks and automatic setting of write permissions (see sec.
20391 \begin_inset CommandInset ref
20393 reference "subsec:Automatical-Locking-Property"
20398 \begin_inset Flex Code
20401 \begin_layout Plain Layout
20411 \begin_layout Plain Layout
20412 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20418 If this property is detected for a given document LyX starts to use SVN
20419 locks for document editing automatically and the whole check-in/out mechanism
20420 switches to the same regimen as for RCS.
20421 This in particular means there are two different modes of file use in LyX:
20424 \begin_layout Itemize
20426 The loaded file is in the read-only mode.
20427 For editing on needs to check-out.
20432 consists of updating from the repository and gaining write lock.
20433 If the lock is not possible to obtain, we remain in unlocked state.
20436 \begin_layout Itemize
20438 The loaded file is in the 'normal' edit mode.
20439 No other user is allowed to edit the file.
20444 consists of commiting changes and releasing write-lock.
20445 If no changes have been made to the document, no commit will be produced
20449 \begin_layout Plain Layout
20450 Don't be puzzled by the fact that you will be asked for commit message anyway.
20455 and only the write-lock will be released.
20458 \begin_layout Standard
20462 \begin_layout Labeling
20463 \labelwidthstring 00.00.0000
20466 svn commit -q -m"<description>" "<file-name>"
20467 \begin_inset Newline newline
20470 svn unlock "<file-name>"
20473 \begin_layout Labeling
20474 \labelwidthstring 00.00.0000
20477 svn update "<file-name>"
20478 \begin_inset Newline newline
20481 svn lock "<file-name>"
20484 \begin_layout Subsubsection
20487 \begin_inset CommandInset label
20489 name "subsec:Automatical-Locking-Property"
20495 Automatic Locking Property
20498 \begin_layout Standard
20499 The above mentioned automatic setting of write permissions of the .lyx file
20505 ile\SpecialChar \menuseparator
20511 \begin_inset space ~
20514 Control\SpecialChar \menuseparator
20519 oggle locking property
20522 This command is active only when the file is not locked on the svn server
20524 you need to check-out before proceeding).
20527 \begin_layout Labeling
20528 \labelwidthstring 00.00.0000
20530 \begin_inset space ~
20536 \begin_layout Labeling
20537 \labelwidthstring 00.00.0000
20540 svn propset svn:needs-lock ON "<file-name>"
20543 \begin_layout Labeling
20544 \labelwidthstring 00.00.0000
20547 svn propdel svn:needs-lock "<file-name>"
20550 \begin_layout Subsubsection
20551 \begin_inset CommandInset label
20553 name "sub:VCS-Revision-Information"
20557 Revision Information in Documents
20560 \begin_layout Standard
20561 There are more possibilities how to activate revision information in our
20565 \begin_layout Itemize
20566 LyX supports directly:
20570 \begin_layout Itemize
20571 tree revision information (
20572 \begin_inset Flex Code
20575 \begin_layout Plain Layout
20582 The result is the output of the
20583 \begin_inset Flex Code
20586 \begin_layout Plain Layout
20592 command, the following table gives you an idea, how to read the results.
20595 \begin_layout Standard
20597 \begin_inset Tabular
20598 <lyxtabular version="3" rows="6" columns="2">
20599 <features tabularvalignment="middle">
20600 <column alignment="center" valignment="top" width="0">
20601 <column alignment="center" valignment="top" width="0">
20603 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20606 \begin_layout Plain Layout
20612 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20615 \begin_layout Plain Layout
20623 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20626 \begin_layout Plain Layout
20632 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20635 \begin_layout Plain Layout
20636 mixed revision working copy
20643 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20646 \begin_layout Plain Layout
20652 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20655 \begin_layout Plain Layout
20656 modified working copy
20663 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20666 \begin_layout Plain Layout
20672 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20675 \begin_layout Plain Layout
20676 switched working copy
20683 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20686 \begin_layout Plain Layout
20692 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20695 \begin_layout Plain Layout
20696 partial working copy, from a sparse checkout
20703 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20706 \begin_layout Plain Layout
20712 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20715 \begin_layout Plain Layout
20716 mixed revision, modified, switched working copy
20729 \begin_layout Itemize
20730 file revision information.
20731 The result comes from parsing the output of
20732 \begin_inset Flex Code
20735 \begin_layout Plain Layout
20737 \begin_inset space ~
20741 \begin_inset space ~
20745 \begin_inset space ~
20754 Supported flags are:
20758 \begin_layout Itemize
20759 version number of the last commit (
20760 \begin_inset Flex Code
20763 \begin_layout Plain Layout
20772 \begin_layout Itemize
20773 author of the last commit (
20774 \begin_inset Flex Code
20777 \begin_layout Plain Layout
20786 \begin_layout Itemize
20787 date of the last commit (
20788 \begin_inset Flex Code
20791 \begin_layout Plain Layout
20800 \begin_layout Itemize
20801 time of the last commit (
20802 \begin_inset Flex Code
20805 \begin_layout Plain Layout
20815 \begin_layout Standard
20816 You can obtain this info via InsetInfo (e.g.
20818 \begin_inset Flex Code
20821 \begin_layout Plain Layout
20822 info-insert buffer vcs-date
20828 The information will be available only when you have the file stored under
20829 svn managment (i.e.
20831 \begin_inset Flex Code
20834 \begin_layout Plain Layout
20840 directory is available with your document).
20844 \begin_layout Itemize
20845 Another---a hacking one---possibility is to use svn keywords
20849 \begin_layout Plain Layout
20850 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20856 In short -- you set file keywords property (e.g.
20859 svn propset svn:keywords 'Rev' file.lyx
20861 ) and then paste keyword TeX code
20865 \begin_layout Plain Layout
20866 This is an easy way how to ensure that LyX won't break the line in the middle
20872 tag in your document (e.g.
20877 \begin_layout Plain Layout
20885 This way svn client will automatically substitute revision number (e.g.
20890 \begin_layout Plain Layout
20897 ) after each update and commit.
20898 There are more problems with this approach.
20899 Firstly, the '$' character is used in TeX world for math equations, so
20900 any occurence of math formula
20901 \begin_inset Formula $Rev$
20905 \begin_inset Formula $Rev:59$
20908 in your LyX document.
20909 Similarly for other keywords like Id, Date, Author, etc.
20910 Secondly svn output is dependent on your locales, so its very easy that
20911 svn would produce some problematic strings once Date is used.
20912 Thirdly you get the whole 'Rev: 59' string in your document instead of
20914 Until subversion implements user's custom keywords it will be hard to use
20915 this approach reliably or let LyX to support it directly.
20918 \begin_layout Subsection
20919 SVN and Windows Environment
20922 \begin_layout Quote
20923 My inclination is to say that if the user cannot figure out the command
20924 line operations on their own fairly quickly, they would be well advised
20925 to use TortoiseSVN.
20931 \begin_layout Subsubsection
20935 \begin_layout Standard
20936 In addition to installing LyX, and having access to a Subversion repository,
20937 the user will need to install the Subversion client program.
20938 A Windows installer for the client program is available from
20939 \begin_inset CommandInset href
20942 target "http://www.collab.net/nonav/downloads/subversion/"
20947 The user may also want to install
20948 \begin_inset CommandInset href
20951 target "http://tortoisesvn.tigris.org/"
20955 , which integrates Subversion operations into the context (rightclick) menu
20956 of Windows Explorer.
20957 Operations done outside LyX will typically be more convenient using the
20958 Explorer context menu.
20959 Note that TortoiseSVN is not a replacement for the client program, which
20960 is what LyX itself will use.
20963 \begin_layout Subsubsection
20964 Bringing a document under Subversion control
20967 \begin_layout Standard
20968 Before a LyX document can be brought under version control in Subversion,
20969 its parent directory needs to be under version control.
20970 If the document is being added to a project already in the repository,
20971 this is accomplished by checking the project out to the directory where
20972 the new document will be placed.
20973 If the project itself is not yet under version control (for instance, if
20974 this document starts a new project), the directory must be imported into
20976 This is done outside LyX.
20977 Both import and checkout are easily accomplished from the Explorer context
20978 menu using TortoiseSVN, or alternatively can be done using the command
20979 line client at a DOS prompt.
20980 The procedure for importing the project using TortoiseSVN is described
20981 below, assuming an existing repository and a new project being started
20989 For information on using the Subversion client program, run
20996 \begin_layout Enumerate
21003 in Windows Explorer, right click it, and select
21005 TortoiseSVN > Repo-browser
21008 If necessary, adjust the URL for the repository, then click OK.
21011 \begin_layout Enumerate
21012 Right click the level of the repository under which you want to place the
21013 new project folder (typically the top level) and click
21015 Create folder\SpecialChar \ldots{}
21018 Supply a name for the project folder and click OK.
21019 Add a message for the log file if desired, then click OK again.
21020 The new project folder should appear in the repository.
21021 Finally, click OK again to exit the repository browser.
21024 \begin_layout Enumerate
21025 Once again right click
21031 , this time selecting SVN Checkout\SpecialChar \ldots{}
21032 Select the URL of the project folder
21033 you just created in the repository, and set the checkout directory to
21041 You will be warned about a non-empty folder; click OK to proceed.
21042 You should now have a
21053 \begin_layout Enumerate
21054 Create or open your document in LyX and click
21059 ile\SpecialChar \menuseparator
21065 \begin_inset space ~
21068 Control\SpecialChar \menuseparator
21076 Add a log message and click OK to commit the document to version control.
21079 \begin_layout Standard
21080 From this point onward, you should have full functionality in the
21085 ile\SpecialChar \menuseparator
21091 \begin_inset space ~
21097 You also have the option of checking the document in and out, viewing its
21099 using the TortoiseSVN context menu in Windows Explorer or the Subversion
21100 client program from a command prompt.
21103 \begin_layout Subsubsection
21104 SSH tunnel used with SVN under Windows
21107 \begin_layout Standard
21108 Compared with Linux setting up svn client to communicate over ssh under
21109 Windows is a rather troublesome task.
21110 We will at least offer some hints how to setup the client side but prior
21111 knowledge about ssh and the Windows command line is needed, also be prepared
21112 for a great deal of frustration\SpecialChar \ldots{}
21116 \begin_layout Enumerate
21117 Get a svn client for windows, as described in the previous sections.
21118 When it is a fresh install run some svn command (e.g.
21120 \begin_inset Flex Code
21123 \begin_layout Plain Layout
21129 ) to create config files, which you will need to change later on.
21132 \begin_layout Enumerate
21133 Choose a ssh client for Windows.
21134 There are several possibilities, we will use the one from Putty tools
21138 \begin_layout Plain Layout
21139 \begin_inset Flex URL
21142 \begin_layout Plain Layout
21144 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21155 You will need to set the connection up so that the client doesn't ask for
21156 any password from you.
21157 To keep things easy we will use only keys without any additional password
21162 \begin_layout Enumerate
21164 \begin_inset Flex Code
21167 \begin_layout Plain Layout
21174 Save your private .ppk key file and put the public one on the server side.
21175 If the SVN server runs on Linux, note that the format of the public key
21176 is not compatible with Linux openssh and you will need to direcly copy-paste
21179 Public key for pasting into OpenSSH authorized_keys file
21181 :” edit field into the server's
21182 \begin_inset Flex Code
21185 \begin_layout Plain Layout
21186 ~/.ssh/authorized_keys
21192 \begin_inset Flex Code
21195 \begin_layout Plain Layout
21204 \begin_layout Enumerate
21206 \begin_inset Flex Code
21209 \begin_layout Plain Layout
21216 In the SVN config file
21220 \begin_layout Plain Layout
21221 Exact path depends on Windows version, usually somewhere around
21222 \begin_inset Flex Code
21225 \begin_layout Plain Layout
21228 Documents and Settings
21242 \begin_inset Flex Code
21245 \begin_layout Plain Layout
21260 , section [tunnels], setup ssh command, e.g.
21262 \begin_inset Flex Code
21265 \begin_layout Plain Layout
21266 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21275 \begin_layout Plain Layout
21276 It will usually take a lot of time to get exact command right and it depends
21278 For example do not have some remote server saved as a default session in
21280 If things fail, try to connect via plink without SVN first.
21289 \begin_layout Enumerate
21290 Checkout the SVN archive, e.g.
21292 \begin_inset Flex Code
21295 \begin_layout Plain Layout
21296 svn co svn+ssh://user@server/repository_path
21304 \begin_layout Subsubsection
21305 End-of-Line Conversions
21308 \begin_layout Standard
21309 When the collsraborators are mixing Linux and Windows environments, LyX
21310 will use different line endings inside the .lyx files.
21311 This is not a problem as far as LyX functionality is concerned, but the
21312 commit diffs will be huge and merge-conflicts prone.
21313 Fortunately SVN itself knows
21317 \begin_layout Plain Layout
21318 \begin_inset Flex URL
21321 \begin_layout Plain Layout
21323 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21333 how to deal with CR/LF problems when switching .lyx files to the
21334 \begin_inset Flex Code
21337 \begin_layout Plain Layout
21347 \begin_layout Plain Layout
21349 \begin_inset Flex Code
21352 \begin_layout Plain Layout
21353 svn propset svn:eol-style native FILE_NAME
21366 \begin_layout Subsection
21370 \begin_layout Standard
21371 With the recent addition of the vc-command function LyX power users are
21372 allowed to create their own commands for revision control.
21375 \begin_layout Standard
21376 As an example you can see how two TortoiseSVN commands could be integrated
21380 \begin_layout Description
21382 \begin_inset Flex Code
21385 \begin_layout Plain Layout
21386 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21394 \begin_layout Description
21396 \begin_inset Flex Code
21399 \begin_layout Plain Layout
21400 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21408 \begin_layout Subsection
21409 Version control and Document comparison
21412 \begin_layout Standard
21413 One of the typical uses of version control is to inspect the changes between
21414 revisions, usually by creating
21415 \begin_inset Flex Code
21418 \begin_layout Plain Layout
21425 While this is useful for plain text files, it is much less useful in the
21426 case of LyX files, which have more complicated structure.
21427 Hence we provide binding to the Document comparison feature.
21428 They are two ways of calling this feature - either by direct call of
21429 \begin_inset Flex Code
21432 \begin_layout Plain Layout
21438 LyX function (for details see LyX functions manual) or by icon/menu item
21440 \begin_inset Flex MenuItem
21443 \begin_layout Plain Layout
21444 Compare with older revision...
21450 One can either compare two chosen revisions of the document or he can simply
21451 compare the current version of edited text with older revisions (where
21453 \begin_inset Flex MenuItem
21456 \begin_layout Plain Layout
21462 ' revisions back means comparison of the edited file with last commited
21467 \begin_layout Standard
21468 This feature is supported for SVN and RCS though due to the more complicated
21469 versioning scheme of RCS there is a constraint -- when addressing the revisions
21470 in dialog, numbers always point to the last number in RCS revision number,
21475 \begin_layout Section
21476 Literate Programming
21479 \begin_layout Standard
21484 (kayvan@sylvan.com)
21488 original documentation written by
21490 Edmar Wienskoski Jr.
21493 (edmar-w-jr@technologist.com)
21496 \begin_layout Subsection
21500 \begin_layout Standard
21501 The main purpose of this documentation is to show you how to use LyX for
21502 literate programming, where it is assumed that you are familiar with this
21503 programming technique, and know what
21504 \begin_inset Quotes eld
21508 \begin_inset Quotes erd
21512 \begin_inset Quotes eld
21516 \begin_inset Quotes erd
21520 If that is not the case, please follow the web links provided in the following
21522 There is a lot of good documentation out there covering old development
21523 history to the latest tools tips.
21526 \begin_layout Standard
21527 It is also assumed that you are familiar with LyX itself to a point that
21528 you are comfortable changing your LyX preferences, and X resources file.
21529 If that is not the case please refer to other LyX documentation to cover
21530 your specific needs.
21533 \begin_layout Subsection
21534 Literate Programming
21537 \begin_layout Standard
21538 From the Literate Programming FAQ:
21541 \begin_layout Quotation
21542 Literate programming is the combination of documentation and source together
21543 in a fashion suited for reading by human beings.
21544 In fact, literate programs should be enjoyable reading, even inviting!
21545 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21546 and documentation in a single file.
21547 Literate programming tools then parse the file to produce either readable
21548 documentation or compilable source.
21549 The WEB style of literate programming was created by D.
21550 \begin_inset space \thinspace{}
21554 Knuth during the development of his TeX typesetting software.
21558 \begin_layout Standard
21559 Another excerpt says:
21562 \begin_layout Quotation
21565 How is literate programming different from verbose commenting?
21568 \begin_layout Quotation
21569 There are three distinguishing characteristics.
21570 In order of importance, they are:
21574 \begin_layout Itemize
21575 flexible order of elaboration
21578 \begin_layout Itemize
21579 automatic support for browsing
21582 \begin_layout Itemize
21583 typeset documentation, especially diagrams and mathematics
21587 \begin_layout Standard
21588 Now that I sparked your curiosity, take a look in the references.
21591 \begin_layout Subsubsection
21595 \begin_layout Standard
21596 The complete Literate Programming FAQ can be found at:
21599 \begin_layout Quote
21600 Literate Programming FAQ
21601 \begin_inset Flex URL
21604 \begin_layout Plain Layout
21606 http://www.literateprogramming.com/lpfaq.pdf
21614 \begin_layout Standard
21615 The FAQ lists 23 (twenty three!) different literate programming tools.
21616 Where some are specialized or
21617 \begin_inset Quotes eld
21621 \begin_inset Quotes erd
21624 for particular programming languages, while other have general scope.
21629 for my own use for several reasons:
21632 \begin_layout Itemize
21633 It can generate the documentation either in LaTeX or HTML.
21636 \begin_layout Itemize
21637 It has a open architecture, i.
21638 \begin_inset space \thinspace{}
21642 \begin_inset space \space{}
21645 it is easy to plug in new filters and to perform special processing that
21650 \begin_layout Itemize
21651 There is a good selection of filters available already (the HTML is one
21655 \begin_layout Itemize
21659 \begin_layout Standard
21660 The Noweb web page can be found at:
21663 \begin_layout Quote
21665 \begin_inset Flex URL
21668 \begin_layout Plain Layout
21670 http://www.cs.virginia.edu/~nr/noweb/
21678 \begin_layout Standard
21679 Starting from there you can reach many other interesting links and even
21680 some literate program examples.
21683 \begin_layout Subsection
21684 LyX and Literate Programming
21687 \begin_layout Standard
21688 The LyX support for Literate Programming is provided by using the generic
21689 LyX converters mechanism.
21690 This support is provided in a
21691 \begin_inset Quotes eld
21695 \begin_inset Quotes erd
21699 \begin_inset space \thinspace{}
21703 \begin_inset space \space{}
21706 you will be able to use this new LyX feature with some other literate programmin
21707 g tool of your choice by just changing your LyX preferences.
21710 \begin_layout Subsubsection
21711 Generating documents and code (weaving and tangling)
21714 \begin_layout Paragraph
21715 Selecting the document class
21718 \begin_layout Standard
21719 If you have installed Noweb and LyX successfully, whenever you open a new
21720 document or try to change the document class of an existing one, you will
21721 find that there are three new document classes available:
21724 \begin_layout Itemize
21728 \begin_layout Itemize
21732 \begin_layout Itemize
21736 \begin_layout Standard
21737 You must select one of them to create your literate documents from.
21741 \begin_layout Standard
21742 Note that literate documents are not limited to these three classes.
21743 New classes can be generated from other styles like letter or in combination
21744 with other class variations like Article (AMS).
21745 If you have special needs that cannot be covered by one of the existing
21746 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21747 will arrange to insert a new entry, or teach you how to do it.
21751 \begin_layout Plain Layout
21752 It is very simple, it involves the creation of a file with four lines, and
21753 re-running of the auto configuration.
21758 Moreover, if you use a literate tool other than Noweb you may need to create
21759 a new set of document classes for it.
21762 \begin_layout Paragraph
21766 \begin_layout Standard
21767 LyX enables you to write code with a layout named
21775 \begin_layout Plain Layout
21776 The equivalent Noweb term is
21777 \begin_inset Quotes eld
21781 \begin_inset Quotes erd
21785 For historical reasons, I got used to the term
21786 \begin_inset Quotes eld
21790 \begin_inset Quotes erd
21793 introduced by other literate tool named Nuweb, which I used for many years
21794 before rendering myself to Noweb.
21799 Noweb delimits scraps like this:
21802 \begin_layout LyX-Code
21806 \begin_layout LyX-Code
21810 \begin_layout LyX-Code
21814 \begin_layout LyX-Code
21818 \begin_layout LyX-Code
21822 \begin_layout Standard
21823 The problem is that whatever is written in between the << and the
21827 must be taken literally, i.
21828 \begin_inset space \thinspace{}
21832 \begin_inset space \space{}
21835 LyX should be prevented from making any special interpretation of what has
21837 This is handled by a special layout named Scrap, that works like a normal
21838 paragraph but has a free spacing capability.
21841 \begin_layout Standard
21842 The down side of the Scrap paragraph layout is that consecutive paragraphs
21843 of code will be spaced with one empty line in the source code and also
21844 in the printed documentation.
21845 The work around is to enter each line of code within a single Scrap, with
21846 a newline (ctrl-return).
21847 The example above will look like this:
21851 \begin_layout Plain Layout
21852 If you have a printed version of this document you will not see any difference
21853 between the previous example and this one.
21861 \begin_layout LyX-Code
21863 \begin_inset Newline newline
21867 \begin_inset Newline newline
21871 \begin_inset Newline newline
21875 \begin_inset Newline newline
21881 \begin_layout Standard
21882 This layout works fine.
21883 The only real inconvenience is that you have to type ctrl-return instead
21888 \begin_layout Plain Layout
21889 It is in my list of
21890 \begin_inset Quotes eld
21894 \begin_inset Quotes erd
21905 \begin_layout Standard
21906 As a special note, you can also use the
21907 \begin_inset Quotes eld
21911 \begin_inset Quotes erd
21914 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21918 \begin_layout LyX-Code
21920 \begin_inset Newline newline
21923 def some_function(args):
21924 \begin_inset Newline newline
21927 "This is the doc string for this function."
21928 \begin_inset Newline newline
21931 print "My args: ", args
21934 \begin_layout LyX-Code
21935 @ %def some_function
21938 \begin_layout Standard
21939 For an example of this usage and the resulting cross-reference output, look
21940 at the Literate python program in
21942 LIBDIR/examples/listerrors.lyx
21944 which should make this all clear.
21947 \begin_layout Paragraph
21948 Generating the documentation
21951 \begin_layout Standard
21952 At this point you already have a new document file with a proper document
21953 class, and with some code and text on it.
21954 How do I print it? The answer is simple, you select
21956 View\SpecialChar \menuseparator
21960 Just like you would do for a plain document.
21961 No special procedure is required.
21964 \begin_layout Standard
21965 To help orientate you, I will now explain what happens inside LyX:
21968 \begin_layout Enumerate
21971 Update\SpecialChar \menuseparator
21974 menu option is chosen, a LaTeX file is generated.
21979 \begin_layout Standard
21980 If the document is of any literate class the generated file will be named
21981 with an extension name defined by the
21982 \begin_inset Quotes eld
21986 \begin_inset Quotes erd
21989 format (defined in the Preferences panel), otherwise the file will have
21998 \begin_layout Enumerate
21999 Note that the only difference so far is in the name of the file, no special
22000 processing is required by LyX.
22001 Given that you formatted the code using the Scrap layout that, by itself,
22002 takes care of the business.
22005 \begin_layout Enumerate
22006 If the document is of any literate class LyX will then use the internal
22007 LyX to Noweb converter, followed by the Noweb to LaTeX converter
22011 \begin_layout Plain Layout
22012 The converters are defined in the
22014 Tools\SpecialChar \menuseparator
22018 \begin_inset Quotes eld
22022 \begin_inset Quotes erd
22034 manual for general information about converters.
22039 to generate the LaTeX file.
22043 \begin_layout Standard
22044 Otherwise it will just skip this step.
22048 \begin_layout Enumerate
22049 Finally, LaTeX is invoked and the regular post processing continues as in
22053 \begin_layout Standard
22054 Independence from a particular
22055 \begin_inset Quotes eld
22059 \begin_inset Quotes erd
22062 is easily achieved by changing the commands that are run by the various
22066 \begin_layout Paragraph
22067 Generating the code
22070 \begin_layout Standard
22071 When the build menu option is chosen or the corresponding button in the
22072 toolbar is pressed, a LaTeX file is generated just like step 1 above.
22073 Next, LyX invokes the
22078 This converter needs to be defined by the user and is not installed by
22079 default, though the Program format is.
22080 This converter (like any other converter) will have two parts:
22083 \begin_layout Enumerate
22084 The converter program itself.
22085 This program performs the conversion from the one format to the other (in
22086 this case, from the Noweb format to the Program pseudo-format).
22089 \begin_layout Enumerate
22090 The error log parser.
22091 This is a program whose sole purpose is to rewrite error messages in a
22092 format that LyX understands.
22093 This makes it possible for LyX to place error boxes in the right places
22094 in the file buffer.
22097 \begin_layout Standard
22098 The first part, the
22099 \begin_inset Quotes eld
22103 \begin_inset Quotes erd
22106 setting, should be set to
22107 \begin_inset Quotes eld
22115 \begin_inset Quotes erd
22119 This basically means that LyX will call
22120 \begin_inset Quotes eld
22124 \begin_inset Quotes erd
22127 (a program or script) with the name of the Noweb file (normally a file
22128 in the LyX temp directory).
22132 \begin_layout Standard
22133 This is an implementation of
22134 \begin_inset Quotes eld
22138 \begin_inset Quotes erd
22141 that you can place in a directory on your path:
22144 \begin_layout LyX-Code
22148 \begin_layout LyX-Code
22152 \begin_layout LyX-Code
22153 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
22156 \begin_layout Standard
22157 The next part of the converter setting is the
22158 \begin_inset Quotes eld
22162 \begin_inset Quotes erd
22165 which is to be set to
22166 \begin_inset Quotes eld
22171 parselog=listerrors
22174 \begin_inset Quotes erd
22178 This will run any errors that are generated by the
22179 \begin_inset Quotes eld
22183 \begin_inset Quotes erd
22186 process through the
22187 \begin_inset Quotes eld
22191 \begin_inset Quotes erd
22197 \begin_layout Standard
22198 The converter code looks in
22206 then on the path for the
22207 \begin_inset Quotes eld
22211 \begin_inset Quotes erd
22217 \begin_layout Standard
22218 The build will normally take place in LyX's temporary directory, so the
22219 files produced by the conversion will be in that directory.
22220 LyX will copy out what it regards as the `main' file, but the
22224 conversion may produce several files, and so most of these would then be
22225 deleted when LyX was closed.
22226 The present solution is to use a `copier',
22230 \begin_layout Plain Layout
22239 manual for information on these.
22248 script in its default mode, so that the entire contents of the temporary
22249 directory is copied.
22250 More will get copied than is needed, to be sure, but nothing will be lost.
22251 If, however, you know what extensions the generated files will have, this
22252 can be improved by using the
22261 This option takes a comma-separated list of extensions to copy.
22262 So, for example, if the conversion will generate only files with the extensions
22271 , then the correct definition would be:
22274 \begin_layout LyX-Code
22275 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
22278 \begin_layout Standard
22279 The result will be that only files with these two extensions will be copied
22283 \begin_layout Paragraph
22284 Build instructions in the document
22287 \begin_layout Standard
22288 The last piece of the integration between LyX and noweb is the
22289 \begin_inset Quotes eld
22293 \begin_inset Quotes erd
22297 Generally, the instructions for building your program should be embedded
22298 in a scrap of its own.
22300 \begin_inset Quotes eld
22304 \begin_inset Quotes erd
22307 above uses the notangle command to look for this scrap (called
22308 \begin_inset Quotes eld
22312 \begin_inset Quotes erd
22315 ) and runs its contents through
22316 \begin_inset Quotes eld
22320 \begin_inset Quotes erd
22326 \begin_layout Standard
22327 Typically, such a scrap would look something like this:
22330 \begin_layout LyX-Code
22332 \begin_inset Newline newline
22336 \begin_inset Newline newline
22340 \begin_inset Newline newline
22343 if [ -z "${NOWEB_SOURCE}" ]
22344 \begin_inset Newline newline
22348 \begin_inset Newline newline
22351 NOWEB_SOURCE=myfile.nw
22352 \begin_inset Newline newline
22356 \begin_inset Newline newline
22360 code to extract files ...]
22361 \begin_inset Newline newline
22365 code to compile files ...]
22366 \begin_inset Newline newline
22372 \begin_layout Standard
22375 LIBDIR/examples/listerrors.lyx
22379 LIBDIR/examples/Literate.lyx
22381 which implement two versions of the
22382 \begin_inset Quotes eld
22386 \begin_inset Quotes erd
22389 program for some illustrations of how all of these pieces go together or
22392 LIBDIR/examples/noweb2lyx.lyx.
22395 Interestingly, these three files show off the language-indepence of the
22396 LyX literate programming support since they are written in Python, C and
22400 \begin_layout Subsubsection
22404 \begin_layout Standard
22405 All the Literate Programming support is configured by the
22407 Tools\SpecialChar \menuseparator
22411 \begin_inset Quotes eld
22415 \begin_inset Quotes erd
22419 The important parts are:
22422 \begin_layout Description
22424 \begin_inset space ~
22428 \begin_inset Quotes eld
22432 \begin_inset Quotes erd
22436 \begin_inset space ~
22439 format Set up via the Formats tab, this is where the Noweb-specific pieces
22449 , the file extension is set to
22454 This tells LyX to create a file with a
22458 extension in the first step of the conversion process.
22461 \begin_layout Description
22463 \begin_inset space ~
22471 \begin_inset space ~
22474 format This is an empty format whose sole purpose is to be the endpoint
22475 of a conversion (which then allows us to set up a converter for it).
22478 \begin_layout Description
22487 This converter performs the
22488 \begin_inset Quotes eld
22492 \begin_inset Quotes erd
22495 of the literate document.
22496 For Noweb, it is set to
22497 \begin_inset Quotes eld
22502 noweave -delay -index $$i > $$o
22505 \begin_inset Quotes erd
22511 \begin_layout Description
22521 \begin_inset Quotes eld
22525 \begin_inset Quotes erd
22529 As stated above, the Converter is set to
22530 \begin_inset Quotes eld
22538 \begin_inset Quotes erd
22541 , with Flags set to
22542 \begin_inset Quotes eld
22547 originaldir,parselog=listerrors
22550 \begin_inset Quotes erd
22556 \begin_layout Subsubsection
22560 \begin_layout Standard
22561 There is also a new function implemented in the LyX server, the
22562 \begin_inset Quotes eld
22565 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22569 \begin_layout Standard
22570 When debugging code with ddd/gdb, it is possible to invoke a text editor
22571 at the current execution position with a single key stroke.
22572 The default ddd configuration for that is shift-ctrl-V.
22573 It happens that you can define the editor command line invocation in ddd
22576 Edit\SpecialChar \menuseparator
22577 Preferences\SpecialChar \menuseparator
22580 dialog and changing the "Edit Sources" entry.
22583 \begin_layout Standard
22584 I take advantage of the new created LyX server function and this ddd feature,
22586 \begin_inset Quotes eld
22590 \begin_inset Quotes erd
22596 \begin_layout LyX-Code
22597 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22600 \begin_layout Standard
22601 With this, whenever you are using ddd and find a point in the program that
22602 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22603 ddd you forward this information to LyX through the LyX server and then
22604 the LyX window will show the same file with the cursor at the same position
22605 ddd was pointing to.
22606 No more guessing or long scrolling to locate a point in the program back
22610 \begin_layout Standard
22611 Note however that you must enable the LyX server to get this feature working
22612 (it is disabled by default).
22613 You can enable it in
22625 ) by entering in the
22630 \begin_inset Quotes eld
22635 /home/<your-home-directory>/.lyx/lyxpipe
22638 \begin_inset Quotes erd
22644 \begin_layout Standard
22645 Read the LyX server documentation in the
22647 Customization Manual
22649 for further information.
22652 \begin_layout Subsubsection
22656 \begin_layout Standard
22657 There are six new buttons that can be added to your LyX toolbar.
22658 Five of these buttons are short cuts to layout styles:
22679 The last one is a short cut to the
22680 \begin_inset Quotes eld
22684 \begin_inset Quotes erd
22691 \begin_layout Standard
22692 LyX has a range of buttons that are available for tool bar customization.
22693 In my toolbar I like to combine the six short cuts above with two more:
22698 \SpecialChar \menuseparator
22703 \SpecialChar \menuseparator
22710 View\SpecialChar \menuseparator
22714 Here is how it looks like:
22717 \begin_layout LyX-Code
22721 \begin_layout LyX-Code
22725 \begin_layout LyX-Code
22726 Icon "layout Standard"
22729 \begin_layout LyX-Code
22730 Icon "layout Section"
22733 \begin_layout LyX-Code
22734 Icon "layout LaTeX"
22737 \begin_layout LyX-Code
22738 Icon "layout LyX-Code"
22741 \begin_layout LyX-Code
22742 Icon "layout Scrap"
22745 \begin_layout LyX-Code
22749 \begin_layout LyX-Code
22753 \begin_layout LyX-Code
22754 Icon "buffer-typeset"
22757 \begin_layout LyX-Code
22758 Icon "build-program"
22761 \begin_layout LyX-Code
22765 \begin_layout LyX-Code
22769 \begin_layout LyX-Code
22773 \begin_layout LyX-Code
22777 \begin_layout LyX-Code
22781 \begin_layout Subsubsection
22782 Colors customization
22785 \begin_layout Standard
22786 There are a number of colors in LyX that can be customized in
22791 One of the things that bothers people is the LaTeX font color.
22792 The default color is red, since the scraps uses LaTeX font, and there is
22793 a lot of scraps in literate documents, you may get tired of seeing everything
22795 You can change it by going to the tabs
22804 \begin_layout Standard
22805 The next thing is the visible presence of the newline character in the screen.
22806 You can choose the color of this particular character and make it blend
22808 I recommend you choosing a color that is close to the background but not
22809 equal, that way you still can see it is there, but it is not bothering
22814 \begin_layout Chapter
22815 Secrets of the LaTeX Masters
22816 \begin_inset CommandInset label
22825 \begin_layout Standard
22826 Though LyX is a powerful tool, it cannot hope to support everything that
22827 can be done with pure TeX/LaTeX.
22828 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22829 as long as you are not afraid to use that
22830 \begin_inset Quotes eld
22834 \begin_inset Quotes erd
22837 button on the toolbar or add things to the LaTeX preamble.
22838 This section lists some tips, tricks, and otherwise cool ideas to give
22839 your document that extra little flair.
22842 Do try this at home
22844 , just start with something a little smaller and less important than your
22848 \begin_layout Standard
22849 Most ideas in this section require less common files in your LaTeX installation.
22850 If you have a system like TeXLive, most will already be available.
22851 A few, however, will need to be downloaded from one of the CTAN archives.
22852 Often, there are several ways to do something, or several LaTeX style files
22853 which do the same thing.
22854 We do not endorse one choice over another, we simply claim that we have
22855 done a particular task with a particular file.
22856 Put on your wizard hat, keep an eye out for dragons, and let us begin.
22859 \begin_layout Section
22863 \begin_layout Standard
22866 Lars Gullik Bjønnes
22869 \begin_layout Subsection
22873 \begin_layout Standard
22874 The aim for this chapter
22878 \begin_layout Plain Layout
22879 Editor's note: Lars' original chapter was a masterful description of how
22885 However, it was too long to flow smoothly in this document.
22886 I have therefore chosen to excerpt the most important sections here (sorry,
22887 Lars); you can read the original chapter (and more of the story!) in the
22890 examples/multicol.lyx
22898 is to show how the LaTeX package
22902 can be used in a LyX document.
22903 As LyX doesn't support the
22907 package natively yet, we have to use some small hacks.
22908 By reading this section it should be obvious how to do this.
22911 \begin_layout Subsection
22915 \begin_layout Standard
22920 package allows switching between one and multicolumn format on the same
22922 Footnotes are handled correctly (for the most part), but will be placed
22923 at the bottom of the page and not under each column.
22924 LaTeX's float mechanism, however, is partly disabled in the current implementat
22926 At the moment only page-wide floats can be used within the scope of the
22930 \begin_layout Subsection
22934 \begin_layout Subsubsection
22938 \begin_layout Standard
22939 If you want to have two columns in your text, you have use LaTeX mode to
22944 begin{multicols}{2}
22946 at the point where you want the two column layout to start, and then
22952 where you want it to end.
22956 \begin_layout Standard
22960 \begin_layout Plain Layout
22964 begin{multicols}{2}
22972 \begin_layout Standard
22977 The Adventure of the Empty House
22980 \begin_inset Newline newline
22985 Sir Arthur Conan Doyle
22988 \begin_layout Standard
22991 It was in the spring of the year 1894 that all London was interested, and
22992 the fashionable world dismayed, by the murder of the Honourable Ronald
22993 Adair under most unusual and inexplicable circumstances.
22994 The public has already learned those particulars of the crime which came
22995 out in the police investigation, but a good deal was suppressed upon that
22996 occasion, since the case for the prosecution was so overwhelmingly strong
22997 that it was not necessary to bring forward all the facts.
22998 Only now, at the end of nearly ten years, am I allowed to supply those
22999 missing links which make up the whole of that remarkable chain.
23000 The crime was of interest in itself, but that interest was as nothing to
23001 me compared to the inconceivable sequel, which afforded me the greatest
23002 shock and surprise of any event in my adventurous life.
23003 Even now, after this long interval, I find myself thrilling as I think
23004 of it, and feeling once more that sudden flood of joy, amazement, and increduli
23005 ty which utterly submerged my mind.
23006 Let me say to that public, which has shown some interest in those glimpses
23007 which I have occasionally given them of the thoughts and actions of a very
23008 remarkable man, that they are not to blame me if I have not shared my knowledge
23009 with them, for I should have considered it my first duty to do so, had
23010 I not been barred by a positive prohibition from his own lips, which was
23011 only withdrawn upon the third of last month.
23014 \begin_layout Standard
23018 \begin_layout Plain Layout
23030 \begin_layout Subsubsection
23034 \begin_layout Standard
23035 The same pattern is used when you want more than two columns:
23038 \begin_layout Standard
23042 \begin_layout Plain Layout
23046 begin{multicols}{3}
23054 \begin_layout Standard
23057 It can be imagined that my close intimacy with Sherlock Holmes had interested
23058 me deeply in crime, and that after his disappearance I never failed to
23059 read with care the various problems which came before the public.
23060 And I even attempted, more than once, for my own private satisfaction,
23061 to employ his methods in their solution, though with indifferent success.
23062 There was none, however, which appealed to me like this tragedy of Ronald
23064 As I read the evidence at the inquest, which led up to a verdict of willful
23065 murder against some person or persons unknown, I realized more clearly
23066 than I had ever done the loss which the community had sustained by the
23067 death of Sherlock Holmes.
23068 There were points about this strange business which would, I was sure,
23069 have specially appealed to him, and the efforts of the police would have
23070 been supplemented, or more probably anticipated, by the trained observation
23071 and the alert mind of the first criminal agent in Europe.
23072 All day, as I drove upon my round, I turned over the case in my mind and
23073 found no explanation which appeared to me to be adequate.
23074 At the risk of telling a twice-told tale, I will recapitulate the facts
23075 as they were known to the public at the conclusion of the inquest.
23078 \begin_layout Standard
23082 \begin_layout Plain Layout
23094 \begin_layout Standard
23095 You can have more than 3 columns if you want to, but that might not be very
23096 pleasant for the eye.
23099 \begin_layout Subsubsection
23100 Columns inside columns
23103 \begin_layout Standard
23104 You can even have columns inside columns:
23107 \begin_layout Standard
23111 \begin_layout Plain Layout
23115 begin{multicols}{2}
23123 \begin_layout Standard
23126 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
23127 at that time governor of one of the Australian colonies.
23128 Adair's mother had returned from Australia to undergo the operation for
23129 cataract, and she, her son Ronald, and her daughter Hilda were living together
23133 \begin_layout Standard
23137 \begin_layout Plain Layout
23141 begin{multicols}{2}
23149 \begin_layout Standard
23152 The youth moved in the best society–had, so far as was known, no enemies
23153 and no particular vices.
23154 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
23155 had been broken off by mutual consent some months before, and there was
23156 no sign that it had left any very profound feeling behind it.
23157 For the rest {sic} the man's life moved in a narrow and conventional circle,
23158 for his habits were quiet and his nature unemotional.
23159 Yet it was upon this easy-going young aristocrat that death came, in most
23160 strange and unexpected form, between the hours of ten and eleven-twenty
23161 on the night of March 30, 1894.
23164 \begin_layout Standard
23168 \begin_layout Plain Layout
23180 \begin_layout Standard
23183 Ronald Adair was fond of cards–playing continually, but never for such stakes
23185 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
23186 It was shown that, after dinner on the day of his death, he had played
23187 a rubber of whist at the latter club.
23188 He had also played there in the afternoon.
23193 The evidence of those who had played with him– Mr.
23194 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
23195 and that there was a fairly equal fall of the cards.
23196 Adair might have lost five pounds, but not more.
23197 His fortune was a considerable one, and such a loss could not in any way
23199 He had played nearly every day at one club or other, but he was a cautious
23200 player, and usually rose a winner.
23201 It came out in evidence that, in partnership with Colonel Moran, he had
23202 actually won as much as four hundred and twenty pounds in a sitting, some
23203 weeks before, from Godfrey Milner and Lord Balmoral.
23204 So much for his recent history as it came out at the inquest.
23207 \begin_layout Standard
23211 \begin_layout Plain Layout
23223 \begin_layout Standard
23224 Please do read the file
23226 examples/multicol.lyx
23228 for more advanced examples including column and header spacing, vertical
23229 separator lines, and more.
23232 \begin_layout Section
23237 Paragraph Environment
23238 \begin_inset Argument
23241 \begin_layout Plain Layout
23242 Numbering in Enumerate
23250 \begin_layout Standard
23256 \begin_layout Standard
23257 \begin_inset VSpace bigskip
23263 \begin_layout Standard
23265 The default numbering for the
23269 paragraph environment begins with Arabic numbers and ends with uppercase
23271 Suppose, however, you wanted a different type of numbering scheme.
23272 Here's a quickie example of how to change the numbering scheme:
23275 \begin_layout LyX-Code
23285 \begin_layout LyX-Code
23295 \begin_layout LyX-Code
23305 \begin_layout LyX-Code
23315 \begin_layout Standard
23316 \SpecialChar \ldots{}
23317 which changes the numbering scheme to uppercase Roman numerals, uppercase
23318 letters, Arabic numbers, and lowercase letter.
23321 \begin_layout Standard
23322 Additionally, the previous example also adds a little bit extra to the numbering
23324 For example, the first level label actually looks like:
23325 \begin_inset Quotes eld
23329 \begin_inset Quotes erd
23333 For ease of reading, we'll describe what the numbering schemes look like
23334 using a notation something like this: <
23335 \begin_inset Quotes eld
23339 \begin_inset Quotes erd
23343 \begin_inset space ~
23347 \begin_inset Quotes erd
23351 \begin_inset Quotes erd
23355 \begin_inset space ~
23359 \begin_inset Quotes erd
23363 \begin_inset Quotes erd
23367 \begin_inset space ~
23371 \begin_inset Quotes eld
23375 \begin_inset Quotes erd
23382 \begin_layout Standard
23383 As you can see in the example, there is a label command for each nesting
23390 \SpecialChar \ldots{}
23397 , as well as a counter,
23401 \SpecialChar \ldots{}
23407 There are also five
23408 \begin_inset Quotes eld
23412 \begin_inset Quotes erd
23445 , each of which take one counter as an argument.
23446 You can add characters before or after these, but there's no need to add
23450 \begin_layout Standard
23451 You can get really fancy with these.
23455 \begin_layout LyX-Code
23469 \begin_layout LyX-Code
23481 \begin_layout LyX-Code
23491 \begin_layout LyX-Code
23501 \begin_layout Standard
23502 produces the somewhat out of hand numbering scheme: <
23503 \begin_inset Quotes eld
23507 \begin_inset Quotes erd
23511 \begin_inset space ~
23515 \begin_inset Quotes erd
23519 \begin_inset Quotes erd
23523 \begin_inset space ~
23527 \begin_inset Quotes erd
23531 \begin_inset Quotes erd
23535 \begin_inset space ~
23539 \begin_inset Quotes eld
23543 \begin_inset Quotes erd
23550 \begin_layout Section
23554 \begin_layout Standard
23560 \begin_layout Standard
23561 \begin_inset VSpace bigskip
23567 \begin_layout Standard
23572 \begin_layout Plain Layout
23578 tmpfont}{cmr17 scaled 2500}{
23590 \begin_layout Standard
23595 \begin_layout Plain Layout
23606 hose of you who like the style of old books probably also like
23607 \begin_inset Quotes eld
23611 \begin_inset Quotes erd
23614 —those large capital letters which begin each new chapter or section.
23615 Implementing them with plain LyX/LaTeX is straightforward (assuming you
23616 know some plain TeX!) but does require a lot of work and many iterations,
23617 as you can see by all the ugly TeX-mode stuff at the beginning of this
23621 \begin_layout Standard
23625 \begin_layout Plain Layout
23631 bigdrop{-1em}{3}{ptmri}{T}+
23636 here is a much easier way of doing this, of course.
23645 ) package from CTAN allows a simple way to add such letters to your documents.
23646 Since this package is not a standard part of TeXLive, I can't demonstrate
23647 it within this document, but if you copy this paragraph to a new document,
23649 \begin_inset Quotes eld
23659 \begin_inset Quotes erd
23662 and the pluses from the TeX code at the beginning of the paragraph, and
23667 usepackage{dropcaps}
23669 to your LaTeX preamble, you will get a nice Times Roman Italic
23670 \begin_inset Quotes eld
23674 \begin_inset Quotes erd
23677 , whose height is three lines of text and which protrudes 1 em into the
23679 (Make certain you have copied
23680 \begin_inset Quotes eld
23688 \begin_inset Quotes erd
23691 into a directory where TeX can see it.) The first argument is the amount
23692 of indentation; in this case the negative sign moves it into the margin.
23693 The second argument is the height of the letter in number of lines of text.
23694 The third argument is the font name: virtually anything which has a tfm
23695 file should work (wade through the
23697 .../texmf/fonts/tfm
23699 directory for possibilities).
23700 My personal favorite is
23701 \begin_inset Quotes eld
23709 \begin_inset Quotes erd
23712 , a fancy German font specifically designed for dropped capitals.
23713 The fourth argument is the letter (or letters) to be dropped.
23718 package also offers the
23724 command, as well as a slightly simplified
23733 \begin_layout Section
23734 Non-standard Paragraph Shapes
23737 \begin_layout Standard
23743 \begin_layout Standard
23744 \begin_inset VSpace bigskip
23750 \begin_layout Standard
23754 \begin_layout Plain Layout
23766 \begin_layout Standard
23770 \begin_layout Plain Layout
23779 \begin_layout Plain Layout
23793 \begin_layout Standard
23798 \begin_layout Plain Layout
23809 \begin_layout Plain Layout
23818 \begin_layout Plain Layout
23827 \begin_layout Plain Layout
23836 \begin_layout Plain Layout
23845 \begin_layout Plain Layout
23854 \begin_layout Plain Layout
23863 \begin_layout Plain Layout
23872 \begin_layout Plain Layout
23881 \begin_layout Plain Layout
23890 \begin_layout Plain Layout
23899 \begin_layout Plain Layout
23908 \begin_layout Plain Layout
23917 \begin_layout Plain Layout
23926 \begin_layout Plain Layout
23935 \begin_layout Plain Layout
23944 \begin_layout Plain Layout
23953 \begin_layout Plain Layout
23962 \begin_layout Plain Layout
23971 \begin_layout Plain Layout
23977 There are times when the tyranny of rectangular paragraphs must be overthrown.
23978 In such situations, a call to the delightful plain TeX command
23985 As you can see, completely arbitrary shapes can be laid out with a suitable
23986 set of linelength definitions.
23987 While this parshape may look a bit silly and useless, one could conceive
23988 of situations such as finely tuned dropped capitals, word wrapping around
23989 non-rectangular graphics, etc.
23990 which will benefit from such handcrafting.
23993 \begin_layout Standard
23994 \begin_inset VSpace bigskip
24000 \begin_layout Standard
24005 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
24012 is the number of lines of text which define the paragraph.
24013 If there turn out to be fewer lines, the shape is truncated; if there are
24014 more, the excess lines have the same dimensions as the last line of the
24024 entries specify the indentation of the line from the left margin, and the
24025 length of the line as measured from that point.
24026 The shape applies only to the current paragraph; everything is reset to
24027 normal for the next paragraph.
24030 \begin_layout Standard
24034 \begin_layout Plain Layout
24046 \begin_layout Section
24050 \begin_layout Standard
24051 As you can see, the examples in this section range from the useful to the
24053 While I don't expect that anyone will ever need the paragraph shape demonstrate
24054 d in the last section, the important point is that you can do almost anything
24055 you want in LyX if you are willing to figure out how to do it in TeX and
24057 TeX is a fantastically powerful typesetting system and all that power is
24058 available to you since LyX uses it as its backend.