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
85 \default_output_format default
87 \bibtex_command default
88 \index_command default
92 \pdf_title "LyX's Additional Features manual"
93 \pdf_author "LyX Team"
94 \pdf_subject "LyX's additional features documentation"
95 \pdf_keywords "LyX, Documentation, Additional"
97 \pdf_bookmarksnumbered true
98 \pdf_bookmarksopen false
99 \pdf_bookmarksopenlevel 1
100 \pdf_breaklinks false
104 \pdf_pdfusetitle false
105 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false, pdfpagelabels"
115 \paperorientation portrait
124 \paragraph_separation indent
125 \paragraph_indentation default
126 \quotes_language english
129 \paperpagestyle headings
130 \tracking_changes true
131 \output_changes false
135 \author 1414654397 "Richard Heck"
141 Additional LyX Features
149 \begin_layout Plain Layout
151 Principal maintainer of this file is
156 If you have comments or error corrections, please send them to the LyX
157 Documentation mailing list,
158 \begin_inset Flex Code
161 \begin_layout Plain Layout
163 <lyx-docs@lists.lyx.org>
176 \begin_layout Standard
177 \begin_inset CommandInset toc
178 LatexCommand tableofcontents
185 \begin_layout Chapter
189 \begin_layout Standard
190 This manual is essentially Part II of the
192 User's Guide\SpecialChar \@.
195 The reason for separating this document out is simple: the
199 is already quite lengthy, and it contains information on all of the basic
200 features one needs to know in order to prepare most documents.
201 However, the LyX Team has worked to make LyX extensible through various
202 configuration files and external packages.
203 That means that if you want to support the Fizzwizzle LaTeX package, you
204 can create a layout file (or module) for it without having to alter LyX
206 We've already had contributions of several new features this way, and some
207 of them are documented here.
208 There are also some more `advanced' features, such as how to control the
209 presentation of bibliographies and how to work with multi-part documents,
210 that are not covered in the
214 and are discussed here.
217 \begin_layout Standard
218 This manual also documents some special features, like fax support, version
219 control, and SGML support, which require additional software to work properly.
220 There is also a chapter on LyX's support for HTML.
221 And lastly, there's a chapter of LaTeX tools and tips, things you can use
222 to spruce up your documents by directly using the powerful features of
228 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
231 \begin_layout Standard
232 If you haven't read the
236 yet, you are definitely in the wrong manual.
241 is the first place to go, since it describes the notation and format of
243 You should also be thoroughly familiar with the
247 and all of the basic features of LyX before attempting to read this one.
250 \begin_layout Standard
251 Since many of the topics in this manual depend heavily on LyX's interaction
252 with LaTeX, this first chapter covers the inner workings of LyX and how
253 to direct LyX to generate exactly the LaTeX code you want.
254 It is obviously for more seasoned LyX users.
257 \begin_layout Chapter
261 \begin_layout Section
265 \begin_layout Standard
266 This chapter is for both TeX-nicians and the LaTeX-curious.
267 In it, we'll explain how LyX and LaTeX work together to produce printable
269 This is the only place in any of the manuals where we assume you know something
273 \begin_layout Standard
274 At one time, LyX was called a
275 \begin_inset Quotes eld
278 WYSIWYM frontend to LaTeX,
279 \begin_inset Quotes erd
282 but that's no longer true.
283 There are frontends to LaTeX out there.
287 \begin_layout Plain Layout
288 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
289 There are also the LaTeX modes for vi and emacs, of course.
294 These are basically text editors with the ability to run LaTeX and mark
295 any errors in the file you're editing.
304 run LaTeX, and it also indicates errors in the file, it also does much,
306 For one thing, you don't need to know LaTeX to use LyX effectively.
307 And LyX has added its own extensions to LaTeX.
308 Try the following sometime: select
309 \begin_inset Flex MenuItem
312 \begin_layout Plain Layout
313 Export\SpecialChar \menuseparator
320 \begin_inset Flex MenuItem
323 \begin_layout Plain Layout
330 \begin_inset Flex MenuItem
333 \begin_layout Plain Layout
334 View\SpecialChar \menuseparator
340 ), then look at the preamble of the resulting
341 \begin_inset Flex Code
344 \begin_layout Plain Layout
351 You'll notice a variety of new macros defined specifically by LyX.
352 These macros are defined automatically, according to the features you use
356 \begin_layout Standard
357 There are several commands that automatically invoke LaTeX.
361 \begin_layout Itemize
362 \begin_inset Flex MenuItem
365 \begin_layout Plain Layout
366 View\SpecialChar \menuseparator
375 \begin_layout Itemize
376 \begin_inset Flex MenuItem
379 \begin_layout Plain Layout
380 View\SpecialChar \menuseparator
381 Update\SpecialChar \menuseparator
390 \begin_layout Itemize
391 \begin_inset Flex MenuItem
394 \begin_layout Plain Layout
395 File\SpecialChar \menuseparator
404 \begin_layout Itemize
405 \begin_inset Flex MenuItem
408 \begin_layout Plain Layout
409 File\SpecialChar \menuseparator
418 \begin_layout Standard
419 They will only invoke LaTeX if the file has changed since the last time
424 \begin_layout Standard
425 When LyX runs LaTeX on the file you're editing, it performs these steps:
428 \begin_layout Enumerate
429 Convert the document to LaTeX and save to a file with the extension
430 \begin_inset Flex Code
433 \begin_layout Plain Layout
440 \begin_inset Flex Code
443 \begin_layout Plain Layout
452 \begin_layout Enumerate
454 \begin_inset Flex Code
457 \begin_layout Plain Layout
463 file (maybe several times), and run any other commands (such as
464 \begin_inset Flex Code
467 \begin_layout Plain Layout
474 \begin_inset Flex Code
477 \begin_layout Plain Layout
483 ) needed to compile the LaTeX file.
486 \begin_layout Enumerate
487 If there are any errors, show the error log.
490 \begin_layout Standard
491 If you've run LaTeX using
492 \begin_inset Flex MenuItem
495 \begin_layout Plain Layout
498 \SpecialChar \menuseparator
506 , LyX then runs a DVI viewer to display the DVI-file.
508 \begin_inset Flex MenuItem
511 \begin_layout Plain Layout
514 \SpecialChar \menuseparator
522 , LyX performs further steps:
525 \begin_layout Itemize
527 \begin_inset Flex Code
530 \begin_layout Plain Layout
536 to convert the DVI file to PostScript.
539 \begin_layout Itemize
540 Run a PostScript viewer, such as
541 \begin_inset Flex Code
544 \begin_layout Plain Layout
550 , to display the PostScript file.
553 \begin_layout Standard
554 LyX does similar things when viewing, or exporting, other formats.
557 \begin_layout Section
558 Translating LaTeX files into LyX
561 \begin_layout Standard
562 You can import a LaTeX file into LyX by using the
563 \begin_inset Flex MenuItem
566 \begin_layout Plain Layout
567 File\SpecialChar \menuseparator
568 Import\SpecialChar \menuseparator
575 This will call a program named
576 \begin_inset Flex Code
579 \begin_layout Plain Layout
585 which will create a file
586 \begin_inset Flex Code
589 \begin_layout Plain Layout
596 \begin_inset Flex Code
599 \begin_layout Plain Layout
606 LyX will then open that file.
610 \begin_layout Plain Layout
611 \begin_inset Flex Code
614 \begin_layout Plain Layout
620 can also be run from the command line, of course.
628 \begin_layout Standard
629 \begin_inset Flex Code
632 \begin_layout Plain Layout
638 will translate most legal LaTeX, but not everything.
639 It will put things it doesn't understand into TeX code, so after translating
641 \begin_inset Flex Code
644 \begin_layout Plain Layout
650 , you can look for TeX code and hand-edit it until it looks right.
653 \begin_layout Standard
654 If you don't know what TeX code is, read the next section.
657 \begin_layout Section
658 \begin_inset CommandInset label
660 name "sec:Inserting-TeX-Code"
664 Inserting TeX Code into LyX Documents
667 \begin_layout Standard
668 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
669 You can always insert TeX code into any LyX document.
670 LyX cannot, and will never be able to, display every possible LaTeX construct.
671 If ever you need to insert LaTeX commands into your LyX document, you can
673 \begin_inset Flex Code
676 \begin_layout Plain Layout
682 box, which you can insert into your document with
683 \begin_inset Flex MenuItem
686 \begin_layout Plain Layout
687 Insert\SpecialChar \menuseparator
696 \begin_layout Standard
697 Here's an example of inserting LaTeX commands in a LyX document.
698 The code looks like this:
701 \begin_layout LyX-Code
705 \begin_inset Newline newline
711 \begin_inset Newline newline
714 This is an example for a minipage environment.
716 \begin_inset Newline newline
719 can put nearly everything in it, even (non-floating)
720 \begin_inset Newline newline
725 \begin_inset Newline newline
731 \begin_inset Newline newline
735 \begin_inset Newline newline
741 \begin_inset Newline newline
747 \begin_inset Newline newline
753 \begin_inset Newline newline
758 \begin_inset Newline newline
764 \begin_inset Newline newline
770 \begin_inset Newline newline
776 \begin_inset Newline newline
784 \begin_layout LyX-Code
788 \begin_layout Standard
790 \begin_inset Flex Code
793 \begin_layout Plain Layout
799 box containing this text is directly after this paragraph.
800 Those of you reading the manual in LyX will only see the TeX code inset.
801 Those reading a printed version of the manuals will see the actual results:
804 \begin_layout Standard
808 \begin_layout Plain Layout
815 \begin_layout Plain Layout
822 \begin_layout Plain Layout
824 This is an example for a minipage environment.
825 You can put nearly everything in it, even (non-floating) figures and tables.
829 \begin_layout Plain Layout
836 \begin_layout Plain Layout
841 \begin_layout Plain Layout
848 \begin_layout Plain Layout
855 \begin_layout Plain Layout
862 \begin_layout Plain Layout
868 \begin_layout Plain Layout
875 \begin_layout Plain Layout
882 \begin_layout Plain Layout
889 \begin_layout Plain Layout
901 \begin_layout Standard
902 In addition to using TeX code, you can also create a separate file containing
903 some complex LaTeX structure and then use
904 \begin_inset Flex MenuItem
907 \begin_layout Plain Layout
908 Insert\SpecialChar \menuseparator
918 to include your file (you should select the type
919 \begin_inset Flex Code
922 \begin_layout Plain Layout
929 We recommend that you only do this if you have a
930 \begin_inset Flex Code
933 \begin_layout Plain Layout
944 Otherwise, you'll have a big job tracking down LaTeX errors.
947 \begin_layout Standard
948 There are a few last points to emphasize:
951 \begin_layout Itemize
956 check if your LaTeX code is correct.
959 \begin_layout Itemize
960 Beware reinventing the wheel.
963 \begin_layout Standard
964 On that last point, LyX does have quite a few features tucked into it, and
966 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
967 feature before you decide you have to do it by hand.
968 Moreover, there are numerous LaTeX packages out there to do all sorts of
969 things, from labels to envelopes to fancy multipage tables.
971 \begin_inset CommandInset href
974 target "http://www.ctan.org/"
978 for details, and see chapter
979 \begin_inset CommandInset ref
981 reference "cha:secrets"
988 \begin_layout Standard
989 If you do need to do some wild and fancy things within your document, be
990 sure to check out a good LaTeX book for assistance.
991 There are a number of them listed in the bibliography of the
998 \begin_layout Section
999 LyX and the LaTeX Preamble
1002 \begin_layout Subsection
1003 About the LaTeX Preamble
1006 \begin_layout Standard
1007 If you already know LaTeX, there is no need to explain here what the preamble
1009 If you don't, the following will give you some ideas—we recommend again
1010 that you consult a LaTeX book for further information.
1011 In any case, you should read the points below, because they explain what
1012 you can do and what you don't need to do in the LaTeX preamble of a LyX
1016 \begin_layout Standard
1017 The LaTeX preamble comes at the very beginning of a document,
1025 \begin_layout Itemize
1026 Declare the document class.
1028 \begin_inset Newline newline
1031 LyX already does this for you.
1032 If you're a seasoned LaTeX-nician, and you have a custom document class
1033 you want to use, check out the
1035 Customization Manual
1037 for information on how to make LyX interface to it.
1040 \begin_layout Itemize
1041 Declare the usage of packages.
1043 \begin_inset Newline newline
1046 LaTeX packages provide special commands, which are only available within
1047 a document when the package has been declared in the preamble.
1048 For example, the package
1049 \begin_inset Flex Code
1052 \begin_layout Plain Layout
1058 forces all paragraphs to be indented.
1059 There are other packages for labels, envelopes, margins, etc.
1063 \begin_layout Itemize
1064 Set counters, variables, lengths and widths.
1066 \begin_inset Newline newline
1069 There are several LaTeX counters and variables which
1073 be set globally from within the preamble in order to have the desired effect.
1074 (There are variables which you can set and reset inside the document, too.)
1075 Margins are a good example of something which must be set in the preamble.
1076 Another example is the label format for lists.
1077 You can actually set these just about anywhere, but it's best to do it
1078 just once, inside the preamble.
1081 \begin_layout Itemize
1082 Declare user defined commands (with
1083 \begin_inset Flex Code
1086 \begin_layout Plain Layout
1095 \begin_inset Flex Code
1098 \begin_layout Plain Layout
1107 \begin_inset Newline newline
1110 These are abbreviations for LaTeX commands which appear very often inside
1112 Although the preamble is a good place to declare such commands, they
1116 be declared anywhere (before they are used for the first time, of course).
1117 This can be useful if there is a lot of raw LaTeX code in your document,
1118 which normally should not be the case.
1121 \begin_layout Standard
1122 LyX adds its own set of definitions to the preamble of the
1123 \begin_inset Flex Code
1126 \begin_layout Plain Layout
1133 This makes LaTeX files generated by LyX portable.
1136 \begin_layout Subsection
1137 Changing the Preamble
1140 \begin_layout Standard
1141 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1142 can't change them without patching LyX itself.
1143 You can, however, add your own stuff to the preamble by selecting
1144 \begin_inset Flex MenuItem
1147 \begin_layout Plain Layout
1149 \begin_inset space ~
1158 \begin_inset Flex MenuItem
1161 \begin_layout Plain Layout
1162 Document\SpecialChar \menuseparator
1169 LyX adds anything in the
1170 \begin_inset Flex MenuItem
1173 \begin_layout Plain Layout
1179 dialog to its own built-in preamble.
1180 Before adding your own declarations in the preamble, you should make sure
1181 that LyX doesn't already support what you want to do.
1182 (Remember what we said about reinventing the wheel?) Also,
1184 make sure your preamble code is correct
1187 LyX doesn't check it for you.
1188 If there is an error, you're likely to get an error like
1189 \begin_inset Quotes eld
1193 \begin_inset Flex Code
1196 \begin_layout Plain Layout
1205 \begin_inset Quotes erd
1209 If you see this error, check your preamble.
1212 \begin_layout Subsection
1216 \begin_layout Standard
1217 Here are some examples of what you can add to a preamble, and what they
1221 \begin_layout Subsubsection
1225 \begin_layout Standard
1226 There are two variables under LaTeX that control page position:
1227 \begin_inset Flex Code
1230 \begin_layout Plain Layout
1239 \begin_inset Flex Code
1242 \begin_layout Plain Layout
1251 Their names should be self-explanatory.
1252 These variables are useful if you think for a moment about computer labels.
1253 Sometimes, the size of a print medium and the area of the medium that you
1254 can actually print on aren't the same.
1256 \begin_inset Flex Code
1259 \begin_layout Plain Layout
1268 \begin_inset Flex Code
1271 \begin_layout Plain Layout
1282 \begin_layout Standard
1283 The default values for
1284 \begin_inset Flex Code
1287 \begin_layout Plain Layout
1296 \begin_inset Flex Code
1299 \begin_layout Plain Layout
1308 \begin_inset space \thinspace{}
1312 \begin_inset space \thinspace{}
1316 \begin_inset space \space{}
1319 the page isn't shifted.
1320 Unfortunately, some DVI drivers always seem to shift the page.
1321 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1322 If you're using LyX on a system that you don't personally maintain, and
1323 your sysadmin is a doofus,
1324 \begin_inset Flex Code
1327 \begin_layout Plain Layout
1336 \begin_inset Flex Code
1339 \begin_layout Plain Layout
1348 Suppose your left and top margins are always 0.5
1349 \begin_inset space \thinspace{}
1353 You can add this to the preamble:
1356 \begin_layout LyX-Code
1364 \begin_layout LyX-Code
1372 \begin_layout Standard
1373 and your margins should now be correct.
1376 \begin_layout Subsubsection
1380 \begin_layout Standard
1381 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1382 There's a rather nice package, available at your nearest CTAN archive,
1383 for printing sheets of labels:
1384 \begin_inset Flex Code
1387 \begin_layout Plain Layout
1394 Now, your system may not have this package installed by default.
1395 We leave that up to you to check.
1396 You'll also want to read the documentation for it; we're not going to do
1398 Since this is an example, however, we'll give you an example of how you
1402 \begin_layout Standard
1403 First, make sure you're using the
1404 \begin_inset Flex Code
1407 \begin_layout Plain Layout
1414 Next, you need to put the following in your preamble:
1417 \begin_layout LyX-Code
1423 \begin_layout LyX-Code
1429 \begin_layout LyX-Code
1435 \begin_layout LyX-Code
1441 \begin_layout LyX-Code
1447 \begin_layout LyX-Code
1453 \begin_layout LyX-Code
1459 \begin_layout Standard
1460 This sets things up for Avery label sheets, stock #5360.
1461 You're now ready to print labels, but you'll need to insert LaTeX code,
1462 placing the commands
1463 \begin_inset Flex Code
1466 \begin_layout Plain Layout
1475 \begin_inset Flex Code
1478 \begin_layout Plain Layout
1486 around each label text.
1487 This and other special features of
1488 \begin_inset Flex Code
1491 \begin_layout Plain Layout
1497 are explained in its documentation.
1500 \begin_layout Standard
1501 Someday, someone may write a LyX layout file to support this package directly.
1502 Maybe that someone is you.
1505 \begin_layout Subsubsection
1506 Example #3: Paragraph Indentation
1509 \begin_layout Standard
1510 Americans are trained to indent the first line of
1515 As with all of their other weird quirks, most Americans will whine and
1516 moan until they can have their way and indent the first line of all paragraphs.
1525 \begin_layout Standard
1526 Of course, this behavior isn't standard typography.
1527 In books, you typically only indent the first line of a paragraph
1531 it follows another one.
1532 The idea behind indenting the first line of a paragraph is to distinguish
1533 neighboring paragraphs from one another.
1534 If there is no previous paragraph—for example, if it follows a figure or
1535 is the first paragraph in a section—then there is no need for indentation.
1539 \begin_layout Standard
1540 If you're a typical American (we're still joking!), though, you don't care
1541 about such esoteric things; you want your indentation! Add this to the
1545 \begin_layout LyX-Code
1548 usepackage{indentfirst}
1551 \begin_layout Standard
1552 If your TeX distribution isn't braindead, you'll have this package, and
1553 all of your paragraphs will get the indentation the Founding Fathers intended
1557 \begin_layout Subsubsection
1558 Example #4: This Document
1561 \begin_layout Standard
1562 You can also check out the preamble of this document to get an idea of some
1563 of the advanced things you can do.
1564 Also, there are more examples and an assortment of LaTeX
1565 \begin_inset Quotes eld
1569 \begin_inset Quotes erd
1573 \begin_inset space ~
1577 \begin_inset CommandInset ref
1579 reference "cha:secrets"
1587 \begin_layout Section
1588 LyX and LaTeX Errors
1591 \begin_layout Standard
1592 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1594 It then uses the logfile from the LaTeX run to do a post-mortem.
1595 After analyzing the logfile,LyX displays a dialog listing the errors.
1596 Clicking on any one of them will take you to the position in your LyX file
1597 where the error occurred.
1601 \begin_layout Plain Layout
1603 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1605 There are also cases where LaTeX reports the error on one line, but the
1606 actual error is earlier.
1607 This is not unlike forgetting a closing brace in a program: You'll get
1608 an error, but only later.
1616 \begin_layout Standard
1617 Some folks also like to look at the log file directly: It is available from
1619 \begin_inset Flex MenuItem
1622 \begin_layout Plain Layout
1625 \SpecialChar \menuseparator
1629 \begin_inset space ~
1638 There are some fairly common error messages and warnings.
1639 We'll cover those here.
1640 You should look at a good LaTeX book for a complete listing.
1643 \begin_layout Itemize
1644 \begin_inset Flex Code
1647 \begin_layout Plain Layout
1654 \begin_inset Newline newline
1657 Anything beginning with these words is a warning message for the purpose
1659 \begin_inset Quotes eld
1663 \begin_inset Quotes erd
1666 the LaTeX code itself.
1667 You'll get messages like this if you added or changed cross-references
1668 or bibliography entries, in which case, LaTeX is trying to tell you that
1669 you need to make another run.
1670 You can by-and-large ignore these.
1673 \begin_layout Itemize
1674 \begin_inset Flex Code
1677 \begin_layout Plain Layout
1684 \begin_inset Newline newline
1687 Another warning message, this time about fonts which LaTeX couldn't find.
1688 The rest of the message will often say something about a replacement font
1690 You can safely ignore these, too.
1693 \begin_layout Itemize
1694 \begin_inset Flex Code
1697 \begin_layout Plain Layout
1706 \begin_inset Newline newline
1714 They are warnings about lines that were too long and run past the right
1716 Almost always, this is unnoticeable in the final output.
1717 (It can be just a point or two.) Or, only one or two characters extend past
1719 LaTeX seems to generate at least one of these messages for just about any
1721 \begin_inset Newline newline
1724 You can ignore these messages.
1725 Your eyes will tell you if there's a problem with something that's too
1726 wide; just look at the output.
1730 \begin_layout Plain Layout
1731 You can also enable the `draft' option in
1732 \begin_inset Flex MenuItem
1735 \begin_layout Plain Layout
1738 \SpecialChar \menuseparator
1746 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1754 \begin_layout Itemize
1755 \begin_inset Flex Code
1758 \begin_layout Plain Layout
1767 \begin_inset Newline newline
1770 Not quite as common as its cousin.
1771 LaTeX seems to like to print lines that are a bit too wide as opposed to
1772 ones that are a bit too narrow.
1773 We have no idea why.
1776 \begin_layout Itemize
1777 \begin_inset Flex Code
1780 \begin_layout Plain Layout
1789 \begin_inset Flex Code
1792 \begin_layout Plain Layout
1801 \begin_inset Newline newline
1804 Warnings about troubles breaking the page.
1805 Once again, just look at the output.
1806 Your eyes will tell you where something has gone wrong.
1809 \begin_layout Itemize
1810 \begin_inset Flex Code
1813 \begin_layout Plain Layout
1815 \begin_inset Quotes els
1819 \begin_inset Quotes ers
1828 \begin_inset Newline newline
1832 \begin_inset Quotes eld
1836 \begin_inset Quotes erd
1839 isn't installed on this system.
1840 This usually appears because some package your document needs isn't installed.
1841 If you didn't touch the preamble or didn't use the
1842 \begin_inset Flex Code
1845 \begin_layout Plain Layout
1853 command, then one of the packages LyX tried to load is missing.
1855 \begin_inset Flex MenuItem
1858 \begin_layout Plain Layout
1859 Help\SpecialChar \menuseparator
1865 to get a list of packages that LyX knows about.
1866 This file is updated whenever you reconfigure LyX (using
1867 \begin_inset Flex MenuItem
1870 \begin_layout Plain Layout
1871 Tools\SpecialChar \menuseparator
1877 ) and tells you which packages have been detected and what they do.
1878 \begin_inset Newline newline
1882 \begin_inset Flex Code
1885 \begin_layout Plain Layout
1893 command and the package in question isn't installed, then you'll need to
1894 install it yourself.
1897 \begin_layout Itemize
1898 \begin_inset Flex Code
1901 \begin_layout Plain Layout
1902 LaTeX Error: Unknown option
1908 \begin_inset Newline newline
1911 Error messages beginning with this are trying to tell you that you specified
1912 a bad or undefined option to a package.
1913 Check the package's documentation.
1916 \begin_layout Itemize
1917 \begin_inset Flex Code
1920 \begin_layout Plain Layout
1921 Undefined control sequence
1927 \begin_inset Newline newline
1930 If you've inserted LaTeX code into your document, but made a typo, you'll
1932 You may have forgotten to load a package.
1933 In any case, this error message usually means that you used an undefined
1938 \begin_layout Standard
1939 There are other error and warning messages.
1940 Some are self-explanatory.
1941 These are usually LaTeX messages.
1942 Others are downright cryptic.
1943 These are usually TeX error messages, and we really have
1947 what they mean or how to decipher them.
1951 \begin_layout Standard
1952 There's a general sequence you should follow if you get error messages:
1955 \begin_layout Enumerate
1956 Look at the LaTeX code you inserted for typos.
1959 \begin_layout Enumerate
1960 If there are no typos, check that you used the command(s) correctly.
1963 \begin_layout Enumerate
1964 If you get a bunch of error boxes piled up at the very top of the document—and
1965 especially if you see a
1966 \begin_inset Quotes eld
1970 \begin_inset Flex Code
1973 \begin_layout Plain Layout
1982 \begin_inset Quotes erd
1985 error—it means that there are errors in the preamble.
1986 Start debugging your preamble.
1989 \begin_layout Enumerate
1990 If you didn't add anything to the preamble and didn't add any LaTeX code
1991 to the document, the first suspect is your LaTeX distribution itself.
1992 Check for missing packages and install them.
1995 \begin_layout Enumerate
1996 Okay, so there are no missing packages.
1997 Did you use any of the fine-tuning options in LyX? Specifically, did you
2002 any of them, like trying to manually insert lots of
2003 \begin_inset Flex Code
2006 \begin_layout Plain Layout
2008 \begin_inset space ~
2017 \begin_inset Flex Code
2020 \begin_layout Plain Layout
2027 \begin_inset Flex Code
2030 \begin_layout Plain Layout
2036 ? Did you try to kludge something together with these instead of using the
2037 appropriate paragraph environment?
2040 \begin_layout Enumerate
2041 All right, you didn't use any of the fine-tuning options, you played by
2043 Did you try to pull a fancy maneuver? Did you do something funky inside
2044 a table or an equation, like inserting a graphic into a table cell?
2047 \begin_layout Enumerate
2048 Do you have long sections of text where LaTeX cannot find a place to break
2049 a line? By default, LaTeX is rather strict about how much extra inter-word
2050 spacing it will add in order to break a line.
2051 Preferably, you should rework the paragraph to avoid the problem.
2052 If this isn't an option, you can wrap your text in
2053 \begin_inset Flex Code
2056 \begin_layout Plain Layout
2064 to make LaTeX's line breaking more, well, sloppy.
2067 \begin_layout Enumerate
2068 Did you go overboard with the nesting? LyX (currently) doesn't check to
2069 make sure you're in the limits for nesting environments.
2070 If you nested a bunch of environments to the
2071 \begin_inset Formula $17^{\mathrm{th}}$
2074 level, that's the problem.
2075 (The limit in LaTeX is five.)
2078 \begin_layout Enumerate
2079 Okay, you didn't get any error messages, but your output looks awful.
2080 If you have a table or figure that's too wide or long for the page, you
2085 \begin_layout Enumerate
2086 rescale the figure so it fits.
2089 \begin_layout Enumerate
2090 trim down the table so it fits.
2094 \begin_layout Enumerate
2095 If something else is wrong with the output, and you didn't try to pull anything
2096 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2099 \begin_layout Standard
2100 If all this doesn't help—well, then
2104 you might have found a bug in LyX\SpecialChar \ldots{}
2108 \begin_layout Chapter
2112 \begin_layout Section
2113 Customizing Bibliographies with BibTeX
2116 \begin_layout Standard
2117 The most basic information about how to use BibTeX with LyX is contained
2120 Bibliography databases (BibTeX)
2127 The following subsections explain special bibliography features supported
2131 \begin_layout Subsection
2132 Alternative Citation Styles
2135 \begin_layout Standard
2136 Standard BibTeX uses numbers (e.
2137 \begin_inset space \thinspace{}
2141 \begin_inset space \space{}
2145 \begin_inset Quotes eld
2149 \begin_inset Quotes erd
2152 ) to refer to a cited work.
2153 However, in many scientific disciplines, other citation styles are in use.
2154 The most common one is the author-year style (e.
2155 \begin_inset space \thinspace{}
2159 \begin_inset space \space{}
2163 \begin_inset Quotes eld
2167 \begin_inset Quotes erd
2171 LyX supports two packages that provide this style,
2172 \begin_inset Flex Code
2175 \begin_layout Plain Layout
2182 \begin_inset Flex Code
2185 \begin_layout Plain Layout
2192 Both packages have their pros and cons, which cannot be listed in detail.
2193 If you only want to have simple author-year (or author-numerical) style,
2194 or if you want to use one of the countless style files for
2195 \begin_inset Flex Code
2198 \begin_layout Plain Layout
2204 , than the established
2205 \begin_inset Flex Code
2208 \begin_layout Plain Layout
2214 package is probably your choice.
2215 If you need special features like short title references, ibidem etc., you
2217 \begin_inset Flex Code
2220 \begin_layout Plain Layout
2229 \begin_layout Standard
2230 The handling of both packages in LyX is basically the same.
2232 \begin_inset Flex MenuItem
2235 \begin_layout Plain Layout
2236 Document\SpecialChar \menuseparator
2243 \begin_inset Flex MenuItem
2246 \begin_layout Plain Layout
2253 \begin_inset Flex MenuItem
2256 \begin_layout Plain Layout
2263 \begin_inset Flex MenuItem
2266 \begin_layout Plain Layout
2273 With both packages, you will get some extra features in the citation dialog
2274 and you can select the style of the reference (
2275 \begin_inset Quotes eld
2279 \begin_inset Quotes erd
2283 \begin_inset Quotes eld
2287 \begin_inset Quotes erd
2291 \begin_inset Quotes eld
2295 \begin_inset Quotes erd
2299 \begin_inset Quotes eld
2303 \begin_inset Quotes erd
2307 Note that both packages need specifically designed style files.
2308 They both ship their own, but there are lots of additional style files,
2309 and there is even an interactive style file builder
2313 \begin_layout Plain Layout
2315 \begin_inset Flex URL
2318 \begin_layout Plain Layout
2320 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2331 \begin_inset Flex Code
2334 \begin_layout Plain Layout
2343 \begin_layout Subsection
2344 Sectioned Bibliographies
2347 \begin_layout Standard
2348 Sometimes you might need to divide your bibliography into several sections.
2349 If you are for instance a historian, the possibility to separate sources
2350 and scientific works is most likely a
2351 \begin_inset Quotes eld
2355 \begin_inset Quotes erd
2359 Unfortunately, BibTeX itself does not allow you to do this.
2360 But with the help of some LaTeX packages, BibTeX can be extended to fit
2364 \begin_layout Standard
2365 LyX provides native support for one of these packages,
2373 \begin_layout Plain Layout
2375 \begin_inset Flex URL
2378 \begin_layout Plain Layout
2380 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2390 The advantage of this package (compared to other packages like
2394 ) is that you don't need to define new citation commands.
2395 Instead, you need to prepare different bibliographic databases which include
2396 the entries for the different sections of the bibliography.
2397 For example: If you want to divide your bibliography into the sections
2399 \begin_inset Quotes eld
2403 \begin_inset Quotes erd
2407 \begin_inset Quotes eld
2411 \begin_inset Quotes erd
2414 , you first need to create two bibliographic databases, e.
2415 \begin_inset space \thinspace{}
2419 \begin_inset space \space{}
2423 \begin_inset Flex Code
2426 \begin_layout Plain Layout
2433 \begin_inset Flex Code
2436 \begin_layout Plain Layout
2446 \begin_layout Standard
2448 \begin_inset Flex MenuItem
2451 \begin_layout Plain Layout
2452 Document\SpecialChar \menuseparator
2459 \begin_inset Flex MenuItem
2462 \begin_layout Plain Layout
2469 \begin_inset Flex MenuItem
2472 \begin_layout Plain Layout
2473 Sectioned bibliography
2479 Now you can insert multiple BibTeX bibliographies, one for each section
2480 of your bibliography.
2481 Returning to our example: Insert the BibTeX bibliography
2482 \begin_inset Flex Code
2485 \begin_layout Plain Layout
2491 and a second one for the database
2492 \begin_inset Flex Code
2495 \begin_layout Plain Layout
2502 You are free to use the same or different styles for each section.
2503 Additionally, you can chose if the bibliography section should contain
2505 \begin_inset Quotes eld
2508 all cited references
2509 \begin_inset Quotes erd
2512 of the specified database(s) (which is the default),
2513 \begin_inset Quotes eld
2516 all uncited references
2517 \begin_inset Quotes erd
2521 \begin_inset Quotes eld
2525 \begin_inset Quotes erd
2529 This might be useful if you would like to separate your bibliography into
2531 \begin_inset Quotes eld
2535 \begin_inset Quotes erd
2539 \begin_inset Quotes eld
2543 \begin_inset Quotes erd
2547 \begin_inset Quotes eld
2551 \begin_inset Quotes erd
2555 The titles for the sections can be added as ordinary sections or subsections.
2557 \begin_inset Flex Code
2560 \begin_layout Plain Layout
2566 removes the bibliography title, you have manually re-add that, too (as
2567 a chapter* or section*, for instance).
2570 \begin_layout Subsection
2571 Multiple Bibliographies
2574 \begin_layout Standard
2575 Multiple bibliographies, e.
2576 \begin_inset space \thinspace{}
2580 \begin_inset space \space{}
2583 a bibliography for each section or chapter of the document, are not supported
2586 \begin_inset Flex Code
2589 \begin_layout Plain Layout
2595 package, which is used for the creation of sectioned bibliographies in
2596 LyX (see the previous section), provides an easy way to solve this task,
2597 if you are willing to use some
2598 \begin_inset Flex MenuItem
2601 \begin_layout Plain Layout
2608 \begin_inset space ~
2612 \begin_inset CommandInset ref
2614 reference "sec:Inserting-TeX-Code"
2622 \begin_layout Plain Layout
2623 An alternative approach is to use the
2624 \begin_inset Flex Code
2627 \begin_layout Plain Layout
2634 \begin_inset Flex Code
2637 \begin_layout Plain Layout
2643 package, respectively.
2651 \begin_layout Standard
2653 \begin_inset Flex MenuItem
2656 \begin_layout Plain Layout
2657 Document\SpecialChar \menuseparator
2664 \begin_inset Flex MenuItem
2667 \begin_layout Plain Layout
2674 \begin_inset Flex MenuItem
2677 \begin_layout Plain Layout
2678 Sectioned bibliography
2684 In the document, you have to enclose the sections, which shall contain
2685 their own bibliography (including the BibTeX bibliography itself), between
2687 \begin_inset Flex Code
2690 \begin_layout Plain Layout
2699 \begin_inset Flex Code
2702 \begin_layout Plain Layout
2710 (those commands have to be inserted as TeX code).
2711 The bibliography will contain all references which have been cited in the
2713 \begin_inset Flex Code
2716 \begin_layout Plain Layout
2727 If you are using this approach, then every citation reference has to be
2729 \begin_inset Flex Code
2732 \begin_layout Plain Layout
2740 \begin_inset Flex Code
2743 \begin_layout Plain Layout
2752 \begin_layout Section
2756 \begin_layout Subsection
2760 \begin_layout Standard
2761 When you are working on a large file with many sections, it is often convenient
2762 to break up the document into several files, or perhaps you have something
2763 where a table may change from time to time, but the preceding text does
2765 In these cases, you should seriously consider using multipart documents.
2766 For example, scientific papers often have five major sections: the introduction
2767 , observations, results, discussion, and conclusion.
2768 Each of these could be its own separate LyX file, with one
2769 \begin_inset Quotes eld
2773 \begin_inset Quotes erd
2776 file which contains the title, authors, abstract, references, etc., plus
2777 the five included files.
2778 It is important to note that each of these files is a full LyX file which
2779 can be formatted and printed on its own, as well as included in a master
2781 Each of these files must have the same document class, however—don't attempt
2782 to mix book classes with article classes.
2783 You may also include LaTeX files; however, these files must not have their
2785 \begin_inset space \thinspace{}
2789 \begin_inset space \space{}
2792 everything up to and including the
2793 \begin_inset Flex Code
2796 \begin_layout Plain Layout
2805 \begin_inset Flex Code
2808 \begin_layout Plain Layout
2816 line must be deleted) or else errors will be generated when you try to
2820 \begin_layout Standard
2821 LyX allows you to include files quite easily with
2822 \begin_inset Flex MenuItem
2825 \begin_layout Plain Layout
2826 Insert\SpecialChar \menuseparator
2828 \begin_inset space ~
2837 When you click on this selection a small box is inserted into the file
2838 at the current cursor location.
2839 Clicking on the box raises a dialog which allows you to select the file
2840 to be included, and the method of its inclusion.
2844 \begin_layout Standard
2845 The file selection box should by now be obvious.
2846 The three inclusion methods are
2847 \begin_inset Quotes eld
2851 \begin_inset Quotes erd
2855 \begin_inset Quotes eld
2859 \begin_inset Quotes erd
2863 \begin_inset Quotes eld
2867 \begin_inset Quotes erd
2871 The difference between
2872 \begin_inset Quotes eld
2876 \begin_inset Quotes erd
2880 \begin_inset Quotes eld
2884 \begin_inset Quotes erd
2887 is really only meaningful to LaTeXperts, but the practical difference is
2888 that files which are
2889 \begin_inset Quotes eld
2893 \begin_inset Quotes erd
2896 are typeset beginning on a new page, while files which are
2897 \begin_inset Quotes eld
2901 \begin_inset Quotes erd
2904 are typeset starting on the current page.
2907 \begin_layout Standard
2908 Generally, the master file is converted into a full LaTeX file before typesettin
2909 g, while the included files are converted to LaTeX files which do not have
2910 all the preamble information.
2913 \begin_layout Standard
2915 \begin_inset Quotes eld
2919 \begin_inset Quotes erd
2922 included file allows you to include a file typeset exactly as it appears
2924 \begin_inset space \thinspace{}
2928 \begin_inset space \space{}
2932 \begin_inset Flex Code
2935 \begin_layout Plain Layout
2941 mode, with the characters set in a fixed-width typewriter font.
2942 Normally, spaces in this file are invisible, though two consecutive spaces
2943 are conserved, unlike LyX's normal treatment of spaces.
2944 However, setting the
2945 \begin_inset Flex MenuItem
2948 \begin_layout Plain Layout
2950 \begin_inset space ~
2954 \begin_inset space ~
2958 \begin_inset space ~
2966 checkbox typesets a mark to unambiguously define the presence of a space.
2970 \begin_layout Subsection
2971 Cross-References Between Files
2974 \begin_layout Standard
2975 \begin_inset Box Shadowbox
2985 height_special "totalheight"
2988 \begin_layout Plain Layout
2989 This section is somewhat out of date.
2990 Need to describe default master documents and how children are opened when
3000 \begin_layout Standard
3001 It is possible to set up cross-references between the different files.
3002 First, open all the files in question: let's call them A and B in a two
3003 file example, where B is included in A.
3004 Let's say you insert a label in A, then want to reference it in B.
3005 Open the cross-reference dialog in whilst in document B, and you can select
3007 \begin_inset Quotes eld
3011 \begin_inset Quotes erd
3017 \begin_layout Subsection
3018 Bibliography Lists in all Subdocuments
3021 \begin_layout Standard
3022 \begin_inset Box Frameless
3032 height_special "totalheight"
3035 \begin_layout Plain Layout
3036 This section also needs updating.
3037 There is now material about this on the wiki, and it could be copied here.
3045 \begin_layout Standard
3046 Copy the bibliography list with all entries to all subdocuments and transform
3048 This way LyX will find the
3049 \begin_inset Flex Code
3052 \begin_layout Plain Layout
3058 -files and you can easily insert references without making the bibliography
3062 \begin_layout Standard
3063 As the bibliography list is in a comment, LaTeX won't use use it and the
3064 references will look like this: [?], instead of like this: [1].
3065 One solution is to use the LaTeX-package
3066 \begin_inset Flex Code
3069 \begin_layout Plain Layout
3075 that will only include comments by processing the files separately.
3076 To do this, add in the LaTeX preamble of every subdocument the following:
3079 \begin_layout LyX-Code
3085 \begin_layout LyX-Code
3088 includecomment{comment}
3091 \begin_layout Standard
3093 \begin_inset Flex URL
3096 \begin_layout Plain Layout
3098 http://wiki.lyx.org/FAQ/Unsorted#toc31
3104 \change_inserted 1414654397 1302984017
3108 \begin_layout Section
3110 \change_inserted 1414654397 1302984017
3114 \begin_layout Standard
3116 \change_inserted 1414654397 1302984082
3117 Users sometimes need to be able to
3118 \begin_inset Quotes eld
3122 \begin_inset Quotes erd
3125 a LyX file together with all the images (and other files) on which it depends,
3126 either for sending to a publisher or for sharing with a co-author.
3127 LyX 2.0 includes a Python script (
3128 \begin_inset Flex Code
3131 \begin_layout Plain Layout
3133 \change_inserted 1414654397 1302984017
3139 ) that automates this process.
3140 To use it, you must have either the
3141 \begin_inset Flex Code
3144 \begin_layout Plain Layout
3146 \change_inserted 1414654397 1302984053
3155 \begin_inset Flex Code
3158 \begin_layout Plain Layout
3160 \change_inserted 1414654397 1302984046
3168 python modules installed on your system.
3169 By default, the script prefers the
3170 \begin_inset Flex Code
3173 \begin_layout Plain Layout
3175 \change_inserted 1414654397 1302984059
3184 \begin_inset Flex Code
3187 \begin_layout Plain Layout
3189 \change_inserted 1414654397 1302984063
3197 format on Unix-like systems and the
3198 \begin_inset Flex Code
3201 \begin_layout Plain Layout
3203 \change_inserted 1414654397 1302984068
3214 \begin_layout Standard
3216 \change_inserted 1414654397 1302984108
3217 LyX's configuration process will set the script up to export a `LyX Archive',
3218 and this format will then be available under
3219 \begin_inset Flex Code
3222 \begin_layout Plain Layout
3224 \change_inserted 1414654397 1302984108
3225 File\SpecialChar \menuseparator
3236 \begin_layout Standard
3238 \change_inserted 1414654397 1302984150
3239 Independently of the platform, the generation of a particular archive format
3240 can be forced by adding either the
3241 \begin_inset Flex Code
3244 \begin_layout Plain Layout
3246 \change_inserted 1414654397 1302984113
3255 \begin_inset Flex Code
3258 \begin_layout Plain Layout
3260 \change_inserted 1414654397 1302984117
3269 \begin_inset Flex Code
3272 \begin_layout Plain Layout
3274 \change_inserted 1414654397 1302984121
3283 \begin_inset Flex Code
3286 \begin_layout Plain Layout
3288 \change_inserted 1414654397 1302984125
3296 format) switch to the
3297 \begin_inset Flex Code
3300 \begin_layout Plain Layout
3302 \change_inserted 1414654397 1302984131
3303 LyX\SpecialChar \menuseparator
3312 \begin_inset Flex Code
3315 \begin_layout Plain Layout
3317 \change_inserted 1414654397 1302984137
3318 Tools\SpecialChar \menuseparator
3319 Preferences\SpecialChar \menuseparator
3320 File Handling\SpecialChar \menuseparator
3329 (Make sure you add the switch after the script name, not before it.)
3334 \begin_layout Section
3335 Fancy Headers and Footers
3338 \begin_layout Standard
3339 The default page layout is rather plain; for an
3340 \begin_inset Flex Code
3343 \begin_layout Plain Layout
3349 document class, all you get is a centered page number at the bottom of
3351 This document uses KOMA-script's book class, so it appears to be a bit
3353 But to really put on a show, you need to set the document page style to
3355 \begin_inset Quotes eld
3359 \begin_inset Quotes erd
3362 , as mentioned in the
3367 This section describes the LaTeX code you need to insert in your LaTeX
3368 preamble in order to get the desired effects.
3371 \begin_layout Standard
3372 For more information on fancy headers, see the
3373 \begin_inset Flex Code
3376 \begin_layout Plain Layout
3382 package documentation.
3384 \begin_inset Flex URL
3387 \begin_layout Plain Layout
3389 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3397 \begin_layout Standard
3398 The page header is divided into three fields, not surprisingly labeled
3399 \begin_inset Quotes eld
3403 \begin_inset Quotes erd
3407 \begin_inset Quotes eld
3411 \begin_inset Quotes erd
3415 \begin_inset Quotes eld
3419 \begin_inset Quotes erd
3423 The footer is also divided into these three fields.
3424 The LaTeX commands to set these fields in the simplest manner are
3425 \begin_inset Flex Code
3428 \begin_layout Plain Layout
3437 \begin_inset Flex Code
3440 \begin_layout Plain Layout
3449 \begin_inset Flex Code
3452 \begin_layout Plain Layout
3461 \begin_inset Flex Code
3464 \begin_layout Plain Layout
3473 Suppose you wish to put your name in the upper left hand corner of each
3475 Simply insert the following command in the preamble:
3478 \begin_layout Standard
3487 \begin_layout Standard
3488 You will now see your name in the upper left.
3489 If a field has a default entry that you would like to get rid of (often
3490 the page number appears in the central footer, simply include a command
3491 with a blank argument, e.
3492 \begin_inset space \thinspace{}
3498 \begin_layout Standard
3506 \begin_layout Standard
3507 Let's get really fancy: lets put the section number with the word
3508 \begin_inset Quotes eld
3512 \begin_inset Quotes erd
3516 \begin_inset space \thinspace{}
3520 \begin_inset space \space{}
3523 Section 3) in the upper left, the page number (e.
3524 \begin_inset space \thinspace{}
3528 \begin_inset space \space{}
3531 Page 4) in the upper right, your name in the lower left, and the date in
3533 The following commands should now appear in the preamble:
3536 \begin_layout Standard
3546 \begin_layout Standard
3554 \begin_layout Standard
3564 \begin_layout Standard
3573 \begin_layout Standard
3581 \begin_layout Standard
3591 \begin_layout Standard
3593 \begin_inset Flex Code
3596 \begin_layout Plain Layout
3605 \begin_inset Flex Code
3608 \begin_layout Plain Layout
3616 access LaTeX's section and page counters, and so print out the current
3617 section and page numbers.
3619 \begin_inset Flex Code
3622 \begin_layout Plain Layout
3630 simply prints out today's date.
3633 \begin_layout Standard
3634 The thicknesses of the horizontal rules drawn beneath the header and above
3635 the footer can also be modified.
3636 If you don't want one of the rules, set its thickness to 0.
3637 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3643 \begin_inset Flex Code
3646 \begin_layout Plain Layout
3651 headrulewidth}{0.4pt}
3657 \begin_inset Flex Code
3660 \begin_layout Plain Layout
3665 footrulewidth}{0.4pt}
3670 to set the thicknesses.
3673 \begin_layout Standard
3674 You can switch the header/footer settings on and off for individual pages
3676 \begin_inset Flex Code
3679 \begin_layout Plain Layout
3682 thispagestyle{empty}
3688 \begin_inset Flex Code
3691 \begin_layout Plain Layout
3694 thispagestyle{plain}
3700 \begin_inset Flex Code
3703 \begin_layout Plain Layout
3706 thispagestyle{fancy}
3712 Simply insert them in the text on the page you want changed and mark them
3714 In fact, title pages are marked as plain by default, while following pages
3715 are marked fancy when using the global fancy setting.
3718 \begin_layout Standard
3719 As a final example, it is possible to include an image in the header or
3721 Suppose you want to put a company logo in the upper lefthand corner.
3722 You might try something like
3725 \begin_layout Standard
3734 includegraphics{logo.eps}}}
3737 \begin_layout Standard
3739 (you may need to preface this with
3740 \begin_inset Flex Code
3743 \begin_layout Plain Layout
3747 usepackage{graphics}
3752 if you don't include graphics elsewhere in your document).
3755 \begin_layout Section
3756 Itemize Bullet Selection
3757 \begin_inset CommandInset label
3766 \begin_layout Standard
3772 \begin_layout Subsection
3776 \begin_layout Standard
3777 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3778 Using this dialog you can easily specify what bullet shape to use at each
3779 level of an itemized list.
3780 These settings are document-wide so you won't be able to specify different
3781 sets of bullets for different paragraphs.
3785 \begin_layout Plain Layout
3786 Well, actually you can but you'll have to do it by hand.
3794 \begin_layout Subsection
3798 \begin_layout Standard
3799 Open the dialog by selecting the
3800 \begin_inset Flex MenuItem
3803 \begin_layout Plain Layout
3804 Document\SpecialChar \menuseparator
3810 menu item and then select the
3811 \begin_inset Flex MenuItem
3814 \begin_layout Plain Layout
3823 \begin_layout Standard
3824 The dialog provides you with a table of bullet shapes.
3825 A column of buttons on the left of the table provides access to the six
3826 different panels of bullet shapes.
3827 The row of buttons across the top is used to select which bullet depth
3829 A text entry under the table shows the currently selected bullet shape's
3830 LaTeX equivalent and this can be edited if desired.
3831 If you do modify the text you will also need to specify any needed packages
3832 in the LaTeX preamble.
3835 \begin_layout Standard
3836 The six panels are divided up by the packages they require.
3837 The following table shows the mappings from button name to LaTeX packages.
3840 \begin_layout Standard
3842 \begin_inset Tabular
3843 <lyxtabular version="3" rows="7" columns="2">
3844 <features tabularvalignment="middle">
3845 <column alignment="center" valignment="top" width="0pt">
3846 <column alignment="center" valignment="top" width="0pt">
3848 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3851 \begin_layout Plain Layout
3866 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3869 \begin_layout Plain Layout
3886 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3889 \begin_layout Plain Layout
3904 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3907 \begin_layout Plain Layout
3923 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3926 \begin_layout Plain Layout
3941 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3944 \begin_layout Plain Layout
3961 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3964 \begin_layout Plain Layout
3979 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3982 \begin_layout Plain Layout
3999 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4002 \begin_layout Plain Layout
4017 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4020 \begin_layout Plain Layout
4037 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4040 \begin_layout Plain Layout
4055 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4058 \begin_layout Plain Layout
4075 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4078 \begin_layout Plain Layout
4093 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4096 \begin_layout Plain Layout
4119 \begin_layout Standard
4120 LyX doesn't stop you using bullets from packages you don't have.
4121 If you get errors from LaTeX when you try to view or print the file, then
4122 it is likely you are missing a package.
4126 \begin_layout Plain Layout
4127 LyX doesn't restrict your use since you may be editing locally and exporting
4136 \begin_layout Subsection
4140 \begin_layout Standard
4141 Select which bullet depth you want to change then select the bullet shape
4143 Any changes will not be visible in LyX, but are visible when viewing the
4147 \begin_layout Standard
4148 You can reset a bullet shape to the default simply by clicking your right
4149 mouse button on the appropriate bullet depth button.
4153 \begin_layout Plain Layout
4158 want to have multiple sets of paragraphs with different sets of bullets
4159 in each, then you're going to have to get your hands dirty with TeX code.
4160 The bullet selection dialog can help though because it provides you with
4161 the LaTeX code for a wide range of bullet shapes.
4162 To make your own custom paragraphs you have the following options:
4165 \begin_layout Plain Layout
4169 \begin_layout Plain Layout
4185 \begin_layout Plain Layout
4189 \begin_layout Plain Layout
4211 \begin_layout Itemize
4212 Use the LaTeX command
4213 \begin_inset Flex Code
4216 \begin_layout Plain Layout
4224 to specify a new bullet shape for a given depth.
4225 You'll also need to save the current bullet shape so you can restore it
4227 In this itemized list the following LaTeX code was used to change the bullet
4228 used for the first depth.
4232 \begin_layout LyX-Code
4242 \begin_layout LyX-Code
4259 \begin_layout Itemize
4260 Note that the itemize depth is specified in Roman numerals as part of the
4270 \begin_layout Itemize
4274 \begin_layout Plain Layout
4287 Specify each individual entry by starting each item with the bullet shape
4288 enclosed in square brackets and set as
4289 \begin_inset Flex MenuItem
4292 \begin_layout Plain Layout
4299 For example, this item was started with
4300 \begin_inset Flex Code
4303 \begin_layout Plain Layout
4318 \begin_layout Plain Layout
4322 \begin_layout Plain Layout
4338 \begin_layout Plain Layout
4339 You'll also need to revert the labelitem back to its previous setting for
4340 the global bullet shape settings to remain in effect.
4341 The way used here was:
4344 \begin_layout LyX-Code
4359 \begin_layout Chapter
4360 LyX and the World Wide Web
4363 \begin_layout Standard
4364 LyX has long supported the export of documents to various web-friendly formats,
4366 Before verson 2.0, however, HTML export was always accomplished by the use
4367 of external converters.
4371 \begin_layout Plain Layout
4372 For details on the use of external converters with LyX, see the
4376 section of the Customization manual.
4381 These fall into two large groups: there are converters that use LaTeX as
4382 an intermediate format, such as
4383 \begin_inset Flex Code
4386 \begin_layout Plain Layout
4393 \begin_inset Flex Code
4396 \begin_layout Plain Layout
4403 \begin_inset Flex Code
4406 \begin_layout Plain Layout
4412 , relying upon LyX to produce the LaTeX; and there is a converter that works
4413 directly on LyX files,
4414 \begin_inset Flex Code
4417 \begin_layout Plain Layout
4424 All of these have different advantages and disadvantages.
4428 \begin_layout Standard
4429 The LaTeX-based converters have the advantage that, in principle, they know
4430 everything about the exported document that LaTeX does.
4431 Such converters do not care, for example, if a certain block of code was
4432 produced by LyX or was Evil Red Text.
4433 These converters know about
4434 \begin_inset Flex Code
4437 \begin_layout Plain Layout
4443 files, counters, and references, and can often make use of the
4444 \begin_inset Flex Code
4447 \begin_layout Plain Layout
4453 files generated by BibTeX.
4454 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4455 said that only TeX itself understands TeX---and LaTeX-based converters
4456 will often choke on what seem to be quite simple constructs; complex ones
4457 can throw them completely, and as of this writing, for example, the
4461 manual will not export with
4462 \begin_inset Flex Code
4465 \begin_layout Plain Layout
4471 , though the others will.
4472 The other issue concerns how math is handled.
4473 These converters typically convert the formulae into little pictures that
4474 are then linked from the HTML document.
4475 Since these are actually generated by LaTeX, they are accurate.
4476 But they do not scale well, and just getting them to look as if they are
4477 actually meant to be in your document---so that the font sizes seem to
4478 be roughly the same---can be a challenge.
4481 \begin_layout Standard
4483 \begin_inset Flex Code
4486 \begin_layout Plain Layout
4493 \begin_inset CommandInset href
4495 name "http://elyxer.nongnu.org/"
4496 target "http://elyxer.nongnu.org/"
4500 ) solves some of these problems.
4501 In particular, the formulae it produces scale perfectly, since it renders
4502 math using a combination of HTML and CSS rather than converting the formulae
4504 But even moderately complex formula are rendered less well than with
4505 \begin_inset Flex Code
4508 \begin_layout Plain Layout
4514 ; this reflects the limitations of HTML.
4518 \begin_layout Plain Layout
4520 \begin_inset Flex Code
4523 \begin_layout Plain Layout
4529 can also use jsMath and MathJax for equations, but this setting is only
4530 available globally and requires one to have access to a server that runs
4536 More importantly (as of version 1.1.1, at least),
4537 \begin_inset Flex Code
4540 \begin_layout Plain Layout
4546 has limited support for math macros and no support for user-defined paragraph
4547 or character styles.
4548 These limitations make
4549 \begin_inset Flex Code
4552 \begin_layout Plain Layout
4558 unsuitable for many of the documents LyX users produce.
4559 In principle, of course, these problems could be solved, but the LyX developers
4560 have decided to follow a different path and have made LyX itself capable
4561 of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4565 \begin_layout Standard
4566 As of this writing, XHTML output remains under development and should probably
4568 \begin_inset Quotes eld
4572 \begin_inset Quotes erd
4579 \begin_layout Plain Layout
4581 \begin_inset Flex Code
4584 \begin_layout Plain Layout
4585 development/HTML.notes
4590 , which can be found in the LyX source tree or
4591 \begin_inset CommandInset href
4593 name "accessed online"
4594 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4598 , usually contains up-to-date information about the state of XHTML output.
4599 See also the list of XHTML bugs on
4600 \begin_inset CommandInset href
4602 name "the bug tracker"
4603 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"
4612 Still, the developers have chosen this approach because it has several
4613 potential advantages over the other two.
4616 \begin_layout Standard
4617 These advantages are primarily due to the fact that the XHTML output routines,
4618 since they are part of LyX, know everything LyX knows about the document
4623 \begin_layout Plain Layout
4624 Another advantage is that, since these routines are internal to LyX, they
4625 are immune to changes in LyX's file format, or to changes in the semantics
4631 So they know about the table of contents (as displayed in the outline),
4632 about the counters associated with different paragraph styles, and about
4633 user-defined styles.
4634 The XHTML output routines know what LyX knows about internationalization,
4635 too, so they will output
4636 \begin_inset Quotes eld
4640 \begin_inset Quotes erd
4644 \begin_inset Quotes eld
4652 \begin_inset Quotes erd
4655 , depending upon the language in effect at the time.
4659 \begin_layout Standard
4660 Quite generally, the output routines know what LyX knows about document
4661 layout, that is, about how the document is to be rendered on screen.
4662 We use this information when we output the document as XHTML.
4667 generates CSS style information corresponding to the layout information
4668 it uses to render the document on screen: if section headings are supposed
4669 to be sans-serif and bold as seen in LyX, then (by default) they will be
4670 sans-serif and bold when viewed in a web browser, too.
4671 And this is true not just for pre-defined styles, like Section, but for
4672 any style, including user-defined styles.
4673 Indeed, the XHTML output routines make no distinction between user-defined
4674 paragraph and character styles and LyX's own pre-defined styles: in each
4675 case, everything LyX knows about the styles is contained in the layout
4677 And much the same is true as regards pre-defined textual insets, such as
4678 footnotes, and various custom insets.
4682 \begin_layout Standard
4683 The result is that XHTML output can be customized and extended in exactly
4684 the same way LaTeX output can be customized and extended: through layout
4686 See chapter five of the
4690 manual for the details.
4693 \begin_layout Standard
4694 The remainder of this chapter contains more detailed information on XHTML
4695 output, its limitations, and ways to work around those limitations.
4698 \begin_layout Section
4699 Math Output in XHTML
4702 \begin_layout Standard
4703 LyX offers four choices for how math is rendered.
4704 These have various advantages and disadvantages:
4707 \begin_layout Itemize
4709 \begin_inset Newline newline
4712 MathML is a dialect of XML designed specifically for mathematics on the
4713 web, and it typically renders very well in browsers that support it.
4714 The disadvantage is that not all browsers support MathML, and support is
4715 not complete even in the Gecko-based browsers, such as Firefox.
4716 \begin_inset Newline newline
4719 If LyX is unable to render a formula as MathML---for example, if the formula
4721 \begin_inset Flex Code
4724 \begin_layout Plain Layout
4730 package or ERT---then it will instead output the formula as an image.
4734 \begin_layout Itemize
4736 \begin_inset Newline newline
4740 \begin_inset Flex Code
4743 \begin_layout Plain Layout
4749 outputs math as HTML, styled by CSS.
4753 \begin_layout Plain Layout
4754 LyX has borrowed some of the CSS for its HTML output from
4755 \begin_inset Flex Code
4758 \begin_layout Plain Layout
4769 For simple formulae, this can work quite well, though with more complicated
4770 formulae it tends to break down.
4771 Still, this method has the advantage that it is very widely supported and
4772 so it may be appropriate for documents that contain only a little, fairly
4774 \begin_inset Newline newline
4777 If Lyx is unable to render a formula as HTML---for example, if the formula
4779 \begin_inset Flex Code
4782 \begin_layout Plain Layout
4788 package or ERT---then it will instead output the formula as an image.
4792 \begin_layout Itemize
4794 \begin_inset Newline newline
4798 \begin_inset Flex Code
4801 \begin_layout Plain Layout
4807 , LyX will output formulae as images, the very same images, in fact, that
4808 are used for instant preview.
4812 \begin_layout Plain Layout
4813 Instant preview does
4817 have to be on for images to be output, however.
4822 The advantage to this method is that the images are simply generated by
4823 LaTeX, so they are very accurate.
4824 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4825 so they do not scale terribly well, and one cannot copy them, etc.
4826 (As of this writing, there are also problems about equation numbering.
4828 \begin_inset CommandInset href
4831 target "http://www.lyx.org/trac/ticket/6894"
4836 \begin_inset Newline newline
4839 The size of the images can be controlled by setting the
4840 \begin_inset Quotes eld
4844 \begin_inset Quotes erd
4848 \begin_inset Flex MenuItem
4851 \begin_layout Plain Layout
4852 Document\SpecialChar \menuseparator
4853 Settings\SpecialChar \menuseparator
4863 \begin_layout Plain Layout
4864 For those who want to know, this controls the resolution of the image in
4865 dots per inch and is based upon a default of 75 dpi.
4871 \begin_inset Newline newline
4874 If LyX for some reason fails to create an image for a formula (e.g., if a
4875 required LaTeX package is not installed), then it will fall back to outputing
4879 \begin_layout Itemize
4881 \begin_inset Newline newline
4884 Finally, LyX will happily output math as LaTeX.
4885 As well as being the output of last resort, this method can be used with
4887 \begin_inset CommandInset href
4890 target "http://www.math.union.edu/~dpvc/jsMath/"
4894 , which uses JavaScript to render LaTeX embedded in HTML documents.
4895 LyX wraps the LaTeX in either a
4896 \begin_inset Flex Code
4899 \begin_layout Plain Layout
4905 (for inline formulas) or
4906 \begin_inset Flex Code
4909 \begin_layout Plain Layout
4915 (for displayed formulas) with
4916 \begin_inset Flex Code
4919 \begin_layout Plain Layout
4925 , as is required for jsMath.
4928 \begin_layout Standard
4929 One of these output methods must be selected under
4930 \begin_inset Flex MenuItem
4933 \begin_layout Plain Layout
4934 Document\SpecialChar \menuseparator
4935 Settings\SpecialChar \menuseparator
4942 By default, LyX outputs MathML.
4943 This is a document-wide setting, therefore.
4946 \begin_layout Standard
4947 Eventually, LyX will offer the user the option to select an alternate output
4948 method for a particular inset, say, one that isn't being rendered very
4953 \begin_layout Plain Layout
4954 That said, since LyX falls back to images if the inset contains ERT, then
4955 one can force output as an image by putting some harmless ERT into the
4957 \begin_inset Formula $a=b\relax$
4968 \begin_layout Section
4969 Bibliography and Citations
4972 \begin_layout Standard
4973 XHTML output fully supports bibliographies and citations.
4977 \begin_layout Standard
4978 Citation labels are generated by the same machinery that generates LyX's
4979 on-screen labels, so the labels will look in the output much as they do
4980 in LyX, though better.
4981 If you are using numerical citations, then LyX will output numerical labels,
4982 such as [1] or [17], rather than simply showing the citation key in square
4983 brackets, as it does on-screen.
4984 If you are using author-year citations, then LyX will add lowercase letters
4985 to the years, just as BibTeX does, if it finds more than one citation for
4986 a given author-year combination.
4987 The labels will be printed with the bibliography entries.
4988 Note that there is, at present, no way to customize the appearance of the
4989 labels, for example, to choose between square brackets and parentheses.
4992 \begin_layout Standard
4993 Bibliography output is handled by the same machinery that handles the presentati
4994 on of reference information in the citation dialog, so you will see in the
4995 XHTML output pretty much what you would see if you were to look at a given
4996 entry in the citation dialog.
4997 The formatting can be customized in your layout file or, preferably, in
5003 manual for the details.
5006 \begin_layout Standard
5007 The main defect at present is that cross-referenced information is printed
5008 with every entry with which it is associated.
5009 So you can see things like this:
5014 \begin_inset Quotes eld
5017 Context and Logical Form
5018 \begin_inset Quotes erd
5023 Language in Context: Selected Essays
5025 (Oxford: Oxford University Press, 2007), pp.
5031 \begin_inset Quotes eld
5034 Semantics in Context
5035 \begin_inset Quotes erd
5040 Language in Context: Selected Essays
5042 (Oxford: Oxford University Press, 2007), pp.
5046 \begin_layout Standard
5047 This should be fixed before long.
5050 \begin_layout Standard
5051 There is no support at present for sectioned bibliographies.
5052 If you have multiple bibliographies, then LyX will print the same bibliography
5056 \begin_layout Section
5060 \begin_layout Standard
5061 LyX will happily export indexes as XHTML, but with certain limitations at
5065 \begin_layout Standard
5066 Index export will be most reliable when you do not attempt to use the fancy
5067 constructs that are described in the section on indexes in the
5075 \begin_layout Plain Layout
5076 The main issue here is that LyX itself does not really handle these.
5077 It just lets you enter what you would have to enter in raw LaTeX.
5082 We'll describe how they are handled using the subsection headings from
5086 \begin_layout Itemize
5087 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5088 these, but the entries must be separated by
5089 \begin_inset Quotes eld
5093 \begin_inset Quotes erd
5096 , that is, there must be spaces around the exclamation point.
5097 This is because it is otherwise too difficult to check for escaped exclamation
5098 points, ones in math, and so forth.
5101 \begin_layout Itemize
5102 Page Ranges: There is no support at all for page ranges, since these make
5103 no sense with XHMTL.
5104 Instead, you will just get two index entries, one at either end.
5107 \begin_layout Itemize
5108 Cross-referencing: There is no support for cross-referencing.
5109 If LyX finds an entry containing the
5110 \begin_inset Quotes eld
5113 |see\SpecialChar \ldots{}
5115 \begin_inset Quotes erd
5118 construct, it is just dropped, and the rest is treated as an ordinary index
5122 \begin_layout Itemize
5123 Index Entry Order: LyX does support attempts to fix the sorting order.
5124 It will take what is before the first `@' it finds and use that for sorting,
5125 taking what follows the first `@' to be the actual entry.
5126 At present, LyX does not check for escaped `@', so do not try to index
5130 \begin_layout Itemize
5131 Index Entry Layout: You can format entries by using the text style dialog,
5132 or by using any other method available within LyX itself.
5133 There is no support for constructs like:
5134 \begin_inset Quotes eld
5138 \begin_inset Quotes erd
5142 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5143 and everything that follows it.
5146 \begin_layout Itemize
5147 Multiple Indexes: There is no support for multiple indexes.
5148 Rather, all index entries will be printed as one large index.
5149 To avoid our printing several versions of the index, we print only the
5150 main index, so make sure you have one.
5153 \begin_layout Section
5154 Nomenclature and Glossary
5157 \begin_layout Standard
5158 There is at present no support for glossaries.
5159 Adding it would be fairly trivial, and welcome.
5162 \begin_layout Chapter
5166 \begin_layout Section
5170 \begin_layout Standard
5171 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5172 and retrieve information about the LyX internal state.
5173 This is only intended for advanced users, but they should find it useful.
5174 It is by writing to the LyX server, for example, that bibliography managers,
5175 such as JabRef, are able to
5176 \begin_inset Quotes eld
5180 \begin_inset Quotes erd
5186 \begin_layout Section
5187 Starting the LyX Server
5190 \begin_layout Standard
5191 The LyX server works through the use of a pair of named pipes.
5192 These are usually located in
5193 \begin_inset Flex Code
5196 \begin_layout Plain Layout
5202 , (except on Windows, where
5206 named pipes are special objects located in
5207 \begin_inset Flex Code
5210 \begin_layout Plain Layout
5222 ) and have the names
5223 \begin_inset Quotes eld
5227 \begin_inset Flex Code
5230 \begin_layout Plain Layout
5237 \begin_inset Quotes erd
5241 \begin_inset Quotes eld
5245 \begin_inset Flex Code
5248 \begin_layout Plain Layout
5255 \begin_inset Quotes erd
5259 External programs write into
5260 \begin_inset Flex Code
5263 \begin_layout Plain Layout
5269 and read back data from
5270 \begin_inset Flex Code
5273 \begin_layout Plain Layout
5280 The stem of the pipe names can be defined in the
5281 \begin_inset Flex MenuItem
5284 \begin_layout Plain Layout
5285 Tools\SpecialChar \menuseparator
5292 \begin_inset Flex Code
5295 \begin_layout Plain Layout
5296 "/home/myhome/lyxpipe"
5302 \begin_inset Flex Code
5305 \begin_layout Plain Layout
5319 on Windows (but any working path can be used).
5324 configure this manually in order for the server to start.
5327 \begin_layout Standard
5329 \begin_inset Flex Code
5332 \begin_layout Plain Layout
5339 \begin_inset Flex Code
5342 \begin_layout Plain Layout
5348 ' to create the pipes.
5349 If one of the pipes already exists, LyX will assume that another LyX process
5350 is already running and will not start the server.
5351 On POSIX (Unix like) systems, if for some other reason, an unused
5352 \begin_inset Quotes eld
5356 \begin_inset Quotes erd
5359 pipe is left in existence when LyX closes, then LyX will try to delete
5361 If this fails for some reason, you will need to delete the pipes manually
5362 and then restart LyX.
5363 On Windows, pipes are deleted by the OS on program termination or crash,
5365 \begin_inset Quotes eld
5369 \begin_inset Quotes erd
5372 pipes should not be possible.
5375 \begin_layout Standard
5376 To have several LyX processes with servers at the same time, you have to
5377 use different configurations, perhaps by using separate user directories,
5379 \begin_inset Flex Code
5382 \begin_layout Plain Layout
5388 file, for each process.
5391 \begin_layout Standard
5392 If you are developing a client program, you might find it useful to enable
5393 debugging information from the LyX server.
5394 Do this by starting LyX as
5395 \begin_inset Flex Code
5398 \begin_layout Plain Layout
5407 \begin_layout Standard
5408 You can find a complete example client written in C in the source distribution
5410 \begin_inset Flex Code
5413 \begin_layout Plain Layout
5414 development/lyxserver/server_monitor.c
5422 \begin_layout Standard
5423 Another useful tool is command-line based client you will find in
5424 \begin_inset Flex Code
5427 \begin_layout Plain Layout
5428 src/client/lyxclient
5436 \begin_layout Section
5437 Normal communication
5440 \begin_layout Standard
5441 To issue a LyX call, the client writes a line of ASCII text into the input
5443 This line has the following format:
5460 \begin_layout Description
5461 clientname is a name that the client can choose arbitrarily.
5462 Its only use is that LyX will echo it if it sends an answer—so a client
5463 can dispatch results from different requesters.
5466 \begin_layout Description
5467 function is the function you want LyX to perform.
5468 It is the same as the commands you'd use in the minibuffer.
5471 \begin_layout Description
5472 argument is an optional argument which is meaningful only to some functions
5474 \begin_inset Quotes eld
5478 \begin_inset Quotes erd
5481 LFUN will insert the argument as text at the cursor position).
5484 \begin_layout Standard
5485 The answer from LyX will arrive in the output pipe and be of the form
5502 \begin_layout Standard
5511 are just echoed from the command request, while
5515 is more or less useful information filled according to how the command
5516 execution worked out.
5517 Some commands, such as
5518 \begin_inset Quotes eld
5522 \begin_inset Quotes erd
5525 , will return information about the internal state of LyX, while other will
5526 return an empty data-response.
5527 This means that the command execution went fine.
5530 \begin_layout Standard
5531 In case of errors, the response from LyX will have this form
5548 \begin_layout Standard
5553 should contain an explanation of why the command failed.
5556 \begin_layout Standard
5560 \begin_layout LyX-Code
5561 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5562 \begin_inset Newline newline
5565 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5566 \begin_inset Newline newline
5569 read a <~/.lyxpipe.out
5570 \begin_inset Newline newline
5576 \begin_layout Section
5580 \begin_layout Standard
5581 LyX can notify clients of events going on asynchronously.
5582 Currently it will only do this if the user binds a key sequence with the
5584 \begin_inset Quotes eld
5588 \begin_inset Quotes erd
5592 The format of the string LyX sends is as follows:
5596 \begin_inset Flex Code
5599 \begin_layout Plain Layout
5610 \begin_layout Standard
5615 is the printed representation of the key sequence that was actually typed
5619 \begin_layout Standard
5620 This mechanism can be used to extend LyX's command set and implement macros.
5621 Bind some key sequence to
5622 \begin_inset Quotes eld
5626 \begin_inset Quotes erd
5630 Then start a client that listens on the output pipe, dispatches the command
5631 according to the sequence, and starts a function that may use LyX calls
5632 and LyX requests to issue a command or a series of commands to LyX.
5635 \begin_layout Section
5636 The simple LyX Server Protocol
5639 \begin_layout Standard
5640 LyX implements a simple protocol that can be used for session management.
5641 All messages are of the form
5654 \begin_layout Standard
5660 \begin_inset Quotes eld
5664 \begin_inset Quotes erd
5668 \begin_inset Quotes eld
5672 \begin_inset Quotes erd
5677 \begin_inset Quotes eld
5681 \begin_inset Quotes erd
5684 is received from a client, LyX will report back to inform the client that
5685 it's listening to it's messages, while
5686 \begin_inset Quotes eld
5690 \begin_inset Quotes erd
5693 sent from LyX will inform clients that LyX is closing.
5696 \begin_layout Section
5697 Reverse DVI/PDF search
5700 \begin_layout Standard
5701 Some DVI/PDF viewers
5705 \begin_layout Plain Layout
5706 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5707 Skim on Mac OSX and SumatraPDF on Windows.
5716 facility (also called
5721 This means that you can tell LyX to put the cursor to a specific line in
5722 the document by clicking at the respective position in the DVI/PDF output.
5723 To achieve this, the viewer must be able to communicate with LyX.
5724 This is done via the LyX server either by using the named pipe (
5728 ), or the UNIX domain socket (
5732 ) that LyX creates in its temporary directory (this is the way the
5733 \begin_inset Flex Code
5736 \begin_layout Plain Layout
5742 program communicates with LyX).
5743 In some cases, you need a helper script that mediates between the viewer
5744 and LyX, in others, the viewer can communicate with LyX directly.
5745 This depends on the selected viewer and on your operating system.
5746 The same applies to the way viewers need to be configured and the way the
5747 reverse search is actually performed.
5748 In what follows, we will thus describe how to setup reverse search for
5750 Before we turn to this, though, we will explain what needs to be done generally
5751 to enable reverse search in the DVI/PDF output.
5754 \begin_layout Subsection
5755 \begin_inset CommandInset label
5757 name "sub:rev-search"
5764 \begin_layout Standard
5765 In most cases LyX will do the work for you by enabling
5766 \begin_inset Flex MenuItem
5769 \begin_layout Plain Layout
5770 Document\SpecialChar \menuseparator
5771 Output\SpecialChar \menuseparator
5772 Synchronize with Output
5778 In such a case LyX will automatically insert the necessary SyncTeX macro
5779 (for PDF) or load the srcltx package (for DVI) respectively.
5780 This option can be easily reached also on
5781 \begin_inset Flex Code
5784 \begin_layout Plain Layout
5793 \begin_layout Standard
5794 If you need a different setting, you can select or input a custom macro
5795 from the drop down box just below
5796 \begin_inset Flex MenuItem
5799 \begin_layout Plain Layout
5800 Document\SpecialChar \menuseparator
5801 Output\SpecialChar \menuseparator
5802 Synchronize with Output
5810 \begin_layout Standard
5811 Please note that including the
5812 \begin_inset Flex Code
5815 \begin_layout Plain Layout
5822 \begin_inset Flex Code
5825 \begin_layout Plain Layout
5831 sometimes has an undesired impact on the typesetting.
5832 Thus, you should switch output synchronization off for the final typesetting
5834 \begin_inset Flex Code
5837 \begin_layout Plain Layout
5844 \begin_inset Flex Code
5847 \begin_layout Plain Layout
5856 \begin_layout Standard
5857 In case you need some more special settings that are not covered by the
5858 automatic settings, read the next section about how to set up output synchroniz
5860 If the automatic setup suits your needs, you can readily jump to section
5861 \begin_inset space ~
5865 \begin_inset CommandInset ref
5867 reference "sub:configuring-viewers"
5871 , where the necessary configuration steps in your viewer -- needed both
5872 with the automatic and the manual setup -- are described.
5875 \begin_layout Subsection
5879 \begin_layout Standard
5880 LaTeX provides several different methods for reverse search.
5881 Some are built-in in the
5882 \begin_inset Flex Code
5885 \begin_layout Plain Layout
5891 program, some are provided by external packages.
5892 Your choice depends on whether your LaTeX distribution already provides
5893 a given method (the built-in methods are rather new) and whether your viewer
5895 The available methods are described in the following.
5898 \begin_layout Subsubsection*
5899 Built-in DVI-search via src-specials (DVI only)
5902 \begin_layout Standard
5903 This method provides the DVI file with the necessary information for reverse
5905 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5906 distribution should include it), and it works reliably.
5907 To enable it, change the
5908 \begin_inset Flex MenuItem
5911 \begin_layout Plain Layout
5916 \begin_layout Plain Layout
5929 \begin_inset Flex MenuItem
5932 \begin_layout Plain Layout
5937 \begin_layout Plain Layout
5944 eX (plain)->DraftDVI
5950 \begin_inset Flex MenuItem
5953 \begin_layout Plain Layout
5954 Preferences\SpecialChar \menuseparator
5955 File Handling\SpecialChar \menuseparator
5962 \begin_inset Flex Code
5965 \begin_layout Plain Layout
5966 latex -src-specials $$i
5972 If this doesn't work, check if your TeX engine needs different options
5973 (the syntax might differ in some distributions).
5976 \begin_layout Subsubsection*
5977 External Packages (PDFSync and scrltx)
5980 \begin_layout Standard
5989 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5991 In order to enable it, load the packages in the LyX preamble:
5994 \begin_layout Itemize
5995 \begin_inset Flex Code
5998 \begin_layout Plain Layout
6006 for reverse PDF search,
6009 \begin_layout Itemize
6011 \begin_inset Flex Code
6014 \begin_layout Plain Layout
6017 usepackage[active]{srcltx}
6022 for reverse DVI search.
6025 \begin_layout Standard
6026 If you want to be able to perform both DVI and PDF reverse searches, you
6027 can also insert in the preamble the following lines
6030 \begin_layout LyX-Code
6034 \begin_inset Newline newline
6040 \begin_inset Newline newline
6046 \begin_inset Newline newline
6052 \begin_inset Newline newline
6057 usepackage[active]{srcltx}
6058 \begin_inset Newline newline
6066 \begin_layout Standard
6067 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6068 right package will be used.
6071 \begin_layout Standard
6072 Note that PDFSync might affect the output layout of your document.
6073 It is therefore advised to disable PDFsync for final documents.
6076 \begin_layout Subsubsection*
6077 Built-in reverse search via SyncTeX (DVI and PDF)
6080 \begin_layout Standard
6082 \begin_inset Flex Code
6085 \begin_layout Plain Layout
6091 have built-in support for both PDF and DVI reverse search.
6096 facility is basically the result of the integration of the PDFSync package
6097 to the pdftex program and its merge with the
6102 You need at least TeXLive 2008 or a recent MikTeX distribution in order
6104 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6105 already provide SyncTeX support.
6108 \begin_layout Standard
6109 To enable SyncTeX for DVI output, change the
6110 \begin_inset Flex MenuItem
6113 \begin_layout Plain Layout
6118 \begin_layout Plain Layout
6131 \begin_inset Flex MenuItem
6134 \begin_layout Plain Layout
6139 \begin_layout Plain Layout
6146 eX (plain) -> DraftDVI
6152 \begin_inset Flex MenuItem
6155 \begin_layout Plain Layout
6156 Preferences\SpecialChar \menuseparator
6157 File Handling\SpecialChar \menuseparator
6164 \begin_inset Flex Code
6167 \begin_layout Plain Layout
6168 latex -synctex=1 $$i
6173 , and for PDF output, change the
6174 \begin_inset Flex MenuItem
6177 \begin_layout Plain Layout
6182 \begin_layout Plain Layout
6189 eX (pdflatex) -> PDF (pdflatex)
6195 \begin_inset Flex Code
6198 \begin_layout Plain Layout
6199 pdflatex -synctex=1 $$i
6205 Check the documentation of your viewer whether the viewer needs to be configure
6206 d for the use with SyncTeX.
6210 \begin_layout Plain Layout
6212 \begin_inset Flex Code
6215 \begin_layout Plain Layout
6221 option enables gzip compression.
6222 If your viewer does not support it, you should instead use
6223 \begin_inset Flex Code
6226 \begin_layout Plain Layout
6240 \begin_layout Subsection
6241 Configuring and using specific viewers
6242 \begin_inset CommandInset label
6244 name "sub:configuring-viewers"
6251 \begin_layout Subsubsection*
6252 Xdvi (all platforms)
6255 \begin_layout Standard
6257 \begin_inset Flex Code
6260 \begin_layout Plain Layout
6266 , you don't need to do anything else for performing a reverse DVI search,
6267 as LyX already provides the necessary hooks for automatically using the
6269 \begin_inset Flex Code
6272 \begin_layout Plain Layout
6279 Just setup your document as described above (reverse search is triggered
6280 by Ctrl-click or Alt-click on Mac OSX, respectively).
6283 \begin_layout Standard
6284 However, if for whatever reason you want to use the named pipe instead of
6285 the socket for communicating with LyX, simply change the DVI viewer in
6287 \begin_inset Flex MenuItem
6290 \begin_layout Plain Layout
6291 Preferences\SpecialChar \menuseparator
6292 File Handling\SpecialChar \menuseparator
6302 \begin_layout Plain Layout
6303 On Mac OSX you have to use
6304 \begin_inset Flex Code
6307 \begin_layout Plain Layout
6308 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6319 \begin_inset Flex Code
6322 \begin_layout Plain Layout
6323 xdvi -editor 'lyxeditor.sh %f %l'
6329 \begin_inset Flex Code
6332 \begin_layout Plain Layout
6338 is a suitable script.
6339 For example, a minimal shell script is the following one:
6342 \begin_layout LyX-Code
6344 \begin_inset Newline newline
6347 LYXPIPE="/path/to/lyxpipe"
6348 \begin_inset Newline newline
6351 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6352 \begin_inset Newline newline
6355 echo "$COMMAND" > "${LYXPIPE}".in || exit
6356 \begin_inset Newline newline
6359 read < "${LYXPIPE}".out || exit
6362 \begin_layout Standard
6364 \begin_inset Flex Code
6367 \begin_layout Plain Layout
6377 \begin_layout Plain Layout
6384 XServer pipe path specified in
6385 \begin_inset Flex MenuItem
6388 \begin_layout Plain Layout
6389 Preferences\SpecialChar \menuseparator
6399 \begin_layout Plain Layout
6401 \begin_inset Flex Code
6404 \begin_layout Plain Layout
6410 folder of a source distribution you can find a
6411 \begin_inset Flex Code
6414 \begin_layout Plain Layout
6420 script which is able to locate the
6424 based on your preferences.
6432 \begin_layout Subsubsection*
6436 \begin_layout Standard
6438 \begin_inset Flex Code
6441 \begin_layout Plain Layout
6442 /Applications/MacDviX_Folder/calleditor.script
6447 , add the following lines:
6450 \begin_layout LyX-Code
6455 \begin_layout Plain Layout
6462 X.app/Contents/MacOS/lyxeditor "$2" $1
6463 \begin_inset Newline newline
6469 \begin_layout Standard
6470 Modify the lines accordingly if you install LyX somewhere else than in the
6471 Applications folder.
6474 \begin_layout Standard
6475 Reverse search is triggered by Alt-click (OPTION-click).
6478 \begin_layout Subsubsection*
6482 \begin_layout Standard
6484 \begin_inset Flex Code
6487 \begin_layout Plain Layout
6488 open -a Skim.app $$i
6493 to the viewer setting in
6494 \begin_inset Flex MenuItem
6497 \begin_layout Plain Layout
6498 Preferences\SpecialChar \menuseparator
6499 File Handling\SpecialChar \menuseparator
6500 File formats\SpecialChar \menuseparator
6507 \begin_inset Flex MenuItem
6510 \begin_layout Plain Layout
6511 Skim\SpecialChar \menuseparator
6512 Preferences\SpecialChar \menuseparator
6522 \begin_layout Plain Layout
6532 \begin_layout Standard
6533 Reverse search is triggered by COMMAND-SHIFT-click
6536 \begin_layout Subsubsection*
6540 \begin_layout Standard
6542 \begin_inset Flex MenuItem
6545 \begin_layout Plain Layout
6546 Settings\SpecialChar \menuseparator
6547 Configure Okular\SpecialChar \ldots{}
6548 \SpecialChar \menuseparator
6555 \begin_inset Quotes eld
6559 \begin_inset Quotes erd
6563 \begin_inset Flex Code
6566 \begin_layout Plain Layout
6575 \begin_layout Standard
6576 Reverse search is triggered by SHIFT-click.
6579 \begin_layout Subsubsection*
6583 \begin_layout Standard
6584 Launch yap, choose its
6585 \begin_inset Flex MenuItem
6588 \begin_layout Plain Layout
6589 View\SpecialChar \menuseparator
6596 \begin_inset Quotes eld
6600 \begin_inset Quotes erd
6605 \begin_inset Quotes eld
6608 New\SpecialChar \ldots{}
6610 \begin_inset Quotes erd
6613 button and, in the window that opens, enter
6614 \begin_inset Quotes eld
6618 \begin_inset Quotes erd
6621 (or any other name you like) in the
6622 \begin_inset Quotes eld
6626 \begin_inset Quotes erd
6630 Now click on the button labeled
6631 \begin_inset Quotes eld
6634 \SpecialChar \ldots{}
6636 \begin_inset Quotes erd
6639 to open a file dialog and navigate to the directory containing the batch
6641 \begin_inset Flex Code
6644 \begin_layout Plain Layout
6652 \begin_inset Flex Code
6655 \begin_layout Plain Layout
6661 and then specify the program arguments as
6662 \begin_inset Flex Code
6665 \begin_layout Plain Layout
6673 \begin_inset Flex Code
6676 \begin_layout Plain Layout
6682 wrapper is used for communicating with LyX through the
6689 \begin_layout LyX-Code
6691 \begin_inset Newline newline
6694 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6703 \begin_inset Newline newline
6717 \begin_layout Standard
6718 Make sure that the LyXServer pipe path you specified in LyX is
6719 \begin_inset Flex Code
6722 \begin_layout Plain Layout
6736 , otherwise change the
6737 \begin_inset Flex Code
6740 \begin_layout Plain Layout
6746 wrapper accordingly.
6749 \begin_layout Standard
6750 In yap, reverse search is triggered by double-click.
6753 \begin_layout Subsubsection*
6754 SumatraPDF (Windows)
6757 \begin_layout Standard
6758 In order to use SumatraPDF for inverse search, enter
6759 \begin_inset Flex Code
6762 \begin_layout Plain Layout
6763 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6768 in the viewer setting in
6769 \begin_inset Flex MenuItem
6772 \begin_layout Plain Layout
6773 Preferences\SpecialChar \menuseparator
6774 File Handling\SpecialChar \menuseparator
6775 File formats\SpecialChar \menuseparator
6782 \begin_inset Flex Code
6785 \begin_layout Plain Layout
6791 is the previous wrapper.
6792 If SumatraPDF.exe is not in your command PATH, use its full file name.
6795 \begin_layout Standard
6796 Reverse search is triggered by double-click.
6799 \begin_layout Subsubsection*
6803 \begin_layout Standard
6804 First of all, make sure that yap is your default DVI viewer in the Windows
6805 environment, then launch it, choose its
6806 \begin_inset Flex MenuItem
6809 \begin_layout Plain Layout
6810 View\SpecialChar \menuseparator
6817 \begin_inset Quotes eld
6821 \begin_inset Quotes erd
6826 \begin_inset Quotes eld
6829 New\SpecialChar \ldots{}
6831 \begin_inset Quotes erd
6834 button and, in the window that opens, enter
6835 \begin_inset Quotes eld
6839 \begin_inset Quotes erd
6842 (or any other name you like) in the
6843 \begin_inset Quotes eld
6847 \begin_inset Quotes erd
6851 Now click on the button labeled
6852 \begin_inset Quotes eld
6855 \SpecialChar \ldots{}
6857 \begin_inset Quotes erd
6860 to open a file dialog and navigate to the directory containing the
6861 \begin_inset Flex Code
6864 \begin_layout Plain Layout
6870 program (which is installed by default on Cygwin along with the LyX executable).
6872 \begin_inset Flex Code
6875 \begin_layout Plain Layout
6881 and then specify the program arguments as
6882 \begin_inset Flex Code
6885 \begin_layout Plain Layout
6892 In this way, you will be using the
6896 for communicating with LyX.
6897 If, for whatever reason, you want to use the
6902 \begin_inset Flex Code
6905 \begin_layout Plain Layout
6911 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6914 \begin_layout Standard
6915 In yap, reverse search is triggered by double-click.
6918 \begin_layout Subsubsection*
6922 \begin_layout Standard
6923 In order to use SumatraPDF for inverse search, enter
6924 \begin_inset Flex Code
6927 \begin_layout Plain Layout
6933 in the viewer setting in
6934 \begin_inset Flex MenuItem
6937 \begin_layout Plain Layout
6938 Preferences\SpecialChar \menuseparator
6939 File Handling\SpecialChar \menuseparator
6940 File formats\SpecialChar \menuseparator
6947 \begin_inset Flex Code
6950 \begin_layout Plain Layout
6956 is the following script (to be placed in your command PATH,
6957 \begin_inset Flex Code
6960 \begin_layout Plain Layout
6966 being the best choice):
6969 \begin_layout LyX-Code
6971 \begin_inset Newline newline
6975 \begin_inset Newline newline
6978 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6981 \begin_layout Standard
6982 This wrapper script is needed because SumatraPDF is a native Windows application
6983 and does not understand the posix paths used by the Cygwin version of LyX.
6984 If SumatraPDF.exe is not in your command PATH, use its full posix path in
6987 \begin_inset Flex Code
6990 \begin_layout Plain Layout
6996 enables communication via the
7002 \begin_inset Flex Code
7005 \begin_layout Plain Layout
7011 option if you want to use the
7015 , and be sure to specify the LyXServer pipe path in the LyX preferences.
7018 \begin_layout Standard
7019 Reverse search is triggered by double-click.
7022 \begin_layout Section
7026 \begin_layout Standard
7027 Forward search is, as the name implies, in a sense the
7028 \begin_inset Quotes eld
7032 \begin_inset Quotes erd
7036 It allows you to let the viewer jump to a given position from within LyX.
7037 If forward search is set up (as described in what follows), you can put
7038 the cursor anywhere in your LyX document, and hit
7039 \begin_inset Flex MenuItem
7042 \begin_layout Plain Layout
7043 Navigate\SpecialChar \menuseparator
7050 \begin_inset Flex MenuItem
7053 \begin_layout Plain Layout
7059 in the context menu via right mouse click), and then the viewer will jump
7060 to that position as well.
7061 This implies, of course, that your viewer supports this function.
7064 \begin_layout Standard
7065 To make forward search possible, you first need to provide the generated
7066 output PDF/DVI file with additional information about the TeX sources.
7067 This can be done via the methods described in the section
7068 \begin_inset CommandInset ref
7070 reference "sub:rev-search"
7077 \begin_layout Standard
7078 Additionally, you need to configure LyX for using your viewers in
7079 \begin_inset Flex MenuItem
7082 \begin_layout Plain Layout
7083 Tools\SpecialChar \menuseparator
7084 Preferences\SpecialChar \menuseparator
7085 Output\SpecialChar \menuseparator
7092 We provide a range of tested configurations for some viewers, which you
7093 can select from the drop down list.
7094 If none of these configurations suits you, you have to find out and enter
7095 a suitable configuration yourself.
7096 The definition syntax uses the following placeholders:
7099 \begin_layout Itemize
7101 \begin_inset Flex Code
7104 \begin_layout Plain Layout
7113 \begin_layout Itemize
7115 \begin_inset Flex Code
7118 \begin_layout Plain Layout
7124 : name of the (temporary) exported .tex file
7127 \begin_layout Itemize
7129 \begin_inset Flex Code
7132 \begin_layout Plain Layout
7138 : name of the exported output file (either dvi or pdf, depending on which
7139 one exists in the temporary directory)
7142 \begin_layout Standard
7143 Note that only some of the viewers provide full forward search functionality,
7144 among them yap, xdvi, okular and Sumatra PDF
7148 \begin_layout Plain Layout
7149 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
7156 While many of the widespread PDF viewers (most notably Adobe Reader) do
7157 not support forward search at all, some other viewers -- e.
7158 \begin_inset space \thinspace{}
7162 evince and xpdf -- allow at least to reload the document and jump to a
7163 specific page of the file, so you can at least navigate
7164 \begin_inset Quotes eld
7168 \begin_inset Quotes erd
7172 These latter functionality is provided by an external call of synctex (see
7173 the predefined example configurations).
7177 \begin_layout Standard
7178 Forward search works both with DVI and PDF output.
7179 LyX simply checks which preview format you have used before (i.
7180 \begin_inset space \thinspace{}
7183 e., which format is already there in the temporary directory) and chooses
7184 the appropriate configuration for the respective format.
7188 \begin_layout Chapter
7189 Special Document Classes
7192 \begin_layout Section
7196 \begin_layout Standard
7202 \begin_layout Subsection
7206 \begin_layout Standard
7207 This section describes how LyX can be used to write articles for submission
7208 to the scientific journal
7210 Astronomy and Astrophysics
7212 (www.edpsciences.fr/aa/
7213 \begin_inset Flex URL
7216 \begin_layout Plain Layout
7218 http://www.edpsciences.fr/aa/
7223 ) using Version 5.01 of the document class
7228 This package can be downloaded from the ftp site
7231 \begin_layout Standard
7232 \begin_inset VSpace medskip
7238 \begin_layout Standard
7240 \begin_inset Flex URL
7243 \begin_layout Plain Layout
7245 ftp://ftp.edpsciences.org/pub/aa/readme.html
7253 \begin_layout Standard
7254 \begin_inset VSpace medskip
7260 \begin_layout Standard
7261 A manual comes together with that package, and this text is not meant to
7262 replace the original manual but is merely a short guide in how to realize
7263 the correct form of your paper.
7267 \begin_layout Standard
7268 Please note that the publisher of the journal was changed from Springer
7269 to EDP Sciences starting January 1, 2001.
7270 That change involved also some slight changes to the style files, namely
7271 the removal of the thesaurus command.
7272 The LyX class aa supports the newest version of these style files, V 5.01.
7273 If you have an older version installed, please upgrade.
7274 For compatibility, the old (version 4) layout has been kept as
7279 Please refer to the comments in
7281 LyXDir/layouts/aapaper.layout
7286 \begin_layout Subsection
7290 \begin_layout Standard
7291 It is recommended you start from the example template distributed with LyX.
7292 If you are not using a template, note the following settings:
7295 \begin_layout Itemize
7302 Document\SpecialChar \menuseparator
7305 dialog (OK, that one was obvious).
7308 \begin_layout Itemize
7309 Don't change the option
7312 \begin_inset space ~
7322 The whole layout is done by the macros, you shouldn't change anything.
7325 \begin_layout Subsection
7329 \begin_layout Standard
7330 First thing to enter is the header information.
7331 It consists of seven entries, of which some are optional.
7335 \begin_layout Itemize
7343 \begin_layout Itemize
7351 \begin_layout Itemize
7359 \begin_layout Itemize
7367 \begin_layout Itemize
7372 : [optional] if more than one author: whom to contact for offprint requests.
7375 \begin_layout Itemize
7380 : [optional] mail address for contacts.
7383 \begin_layout Itemize
7391 Received: <date>; Accepted <date>
7394 \begin_layout Standard
7395 There is no need to issue the
7401 command, this is done automatically by LyX when the header is finished.
7402 Although the order of the single header entries doesn't matter it is advised
7403 to keep the above sequence, just to get the best optics and meets the layout
7404 of the real document.
7407 \begin_layout Standard
7408 If you want to place footnotes in the header block, e.
7409 \begin_inset space \thinspace{}
7413 \begin_inset space \space{}
7416 to state your present address, just use the standard footnote via the menu
7419 Insert\SpecialChar \menuseparator
7423 LyX will automagically use the term
7432 \begin_layout Standard
7433 In addition to these topics, the macros use three additional LaTeX commands
7434 that have no counterpart in LyX:
7437 \begin_layout Itemize
7444 to separate different names for more than one author and institute, respectivel
7448 \begin_layout Itemize
7455 to mark corresponding author/institute pairs.
7456 The institutes are numbered sequentially as they appear in the
7460 field, so you have to put a marker to each author.
7463 \begin_layout Itemize
7470 to supply an email address for fast contact.
7473 \begin_layout Standard
7474 In all cases, the appropriate command has to be entered in LyX and marked
7480 \begin_layout Subsection
7484 \begin_layout Standard
7485 The abstract should immediately follow the header block.
7486 With version 5 the abstract environment was changed to a command, and there
7487 is now a resctriction to only one paragraph.
7488 In addition, it should contain an entry with the keywords.
7489 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7496 by hand and mark it as LaTeX code.
7497 Refer to the example paper.
7500 \begin_layout Subsection
7501 Supported environments
7504 \begin_layout Standard
7505 The A&A paper layout supports the following environments for structuring
7509 \begin_layout Itemize
7515 \begin_layout Itemize
7521 \begin_layout Itemize
7527 \begin_layout Itemize
7533 \begin_layout Itemize
7539 \begin_layout Itemize
7545 \begin_layout Itemize
7551 \begin_layout Itemize
7557 \begin_layout Itemize
7563 \begin_layout Itemize
7569 \begin_layout Itemize
7575 \begin_layout Itemize
7581 \begin_layout Subsection
7582 Commands not supported by LyX
7585 \begin_layout Standard
7586 Some commands are not yet supported by the
7591 Some have already been mentioned.
7592 For the sake of completeness, they are listed all together here:
7595 \begin_layout Itemize
7603 \begin_layout Itemize
7611 \begin_layout Itemize
7619 \begin_layout Itemize
7627 \begin_layout Itemize
7635 \begin_layout Itemize
7643 \begin_layout Itemize
7651 \begin_layout Itemize
7659 \begin_layout Standard
7660 If you want to use any of these commands, you have to enter them yourself.
7663 Do not forget to mark them as LaTeX code!
7666 \begin_layout Subsection
7667 Figure and Table Floats
7670 \begin_layout Standard
7671 LyX provides support for the necessary float environments
7673 figure, figure*, table
7679 , therefore we won't tell much about it here.
7683 \begin_inset space ~
7689 Just remember that tables should be left-aligned.
7690 For that, select the table and change the alignment in
7692 Edit\SpecialChar \menuseparator
7694 \begin_inset space ~
7700 \begin_layout Standard
7701 There is only one special thing: the figures with caption besides the figure.
7702 To create such a figure, you have to do the following:
7705 \begin_layout Enumerate
7706 Create a wide figure float:
7708 Insert\SpecialChar \menuseparator
7709 Float\SpecialChar \menuseparator
7712 , then right click in the figure and select
7718 \begin_inset space ~
7726 \begin_layout Enumerate
7727 Enter your caption text.
7730 \begin_layout Enumerate
7735 to move the cursor above the caption.
7738 \begin_layout Enumerate
7742 \begin_layout Enumerate
7743 Position the cursor behind the figure and insert a horizontal fill:
7745 Insert\SpecialChar \menuseparator
7747 \begin_inset space ~
7750 Character\SpecialChar \menuseparator
7752 \begin_inset space ~
7760 \begin_layout Enumerate
7761 Switch to LaTeX mode:
7764 \begin_inset space ~
7772 \begin_layout Enumerate
7782 Do not close the brace!
7785 \begin_layout Enumerate
7786 Position the cursor behind the caption text, switch to LaTeX mode and insert
7790 \begin_inset space ~
7802 \begin_layout Standard
7803 Also, refer to the figures in the example paper.
7806 \begin_layout Subsection
7810 \begin_layout Standard
7811 For submission, the paper has to be formated in a special double-spacing
7813 For this purpose, you have to give the option
7817 to the documentclass.
7818 This must be done using the extra class options field in the
7820 Document\SpecialChar \menuseparator
7824 Just enter the string
7831 \begin_layout Subsection
7835 \begin_layout Standard
7840 directory contains an example paper written with LyX.
7841 It is the example paper from the original macro package, translated to
7843 Use it for inspiration, and compare the original LaTeX code with LyX way
7847 \begin_layout Section
7851 \begin_layout Standard
7857 \begin_layout Subsection
7861 \begin_layout Standard
7862 AASTeX is a set of macros produced by the American Astronomical Society
7863 to facilitate electronic manuscript submission to the three journals they
7864 publish: the Astrophysical Journal (including the Letters and Supplement),
7865 the Astronomical Journal, and the Publications of the Astronomical Society
7867 LyX has proven to be an excellent tool for generating these documents,
7868 especially given its equation, citation, and figure handling capabilities.
7869 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7870 is the version described here, or higher.
7871 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7872 incompatible with LyX.
7873 The AASTeX package may be downloaded from the AASTeX Web site
7876 \begin_layout Standard
7877 \begin_inset VSpace medskip
7883 \begin_layout Standard
7885 \begin_inset Flex URL
7888 \begin_layout Plain Layout
7890 http://www.journals.uchicago.edu/AAS/AASTeX
7898 \begin_layout Standard
7899 \begin_inset VSpace medskip
7905 \begin_layout Standard
7906 A complete user guide is contained in that package and you should familiarize
7907 yourself with it thoroughly before embarking on writing a paper in LyX.
7908 LyX will not reduce the need to figure out all the AASTeX commands, it
7909 will only reduce the drudgery of typing everything in.
7910 It is your responsibility to ensure that the final exported LaTeX document
7911 conforms completely to the requirements of the journal to which you are
7912 submitting your paper.
7915 \begin_layout Subsection
7916 Starting a New Paper
7919 \begin_layout Standard
7920 I strongly suggest that you start with the AASTeX template file.
7923 File\SpecialChar \menuseparator
7930 , enter the new file name, then choose the
7935 This will show the most common fields found in a manuscript.
7936 Simply overwrite the existing text (including the brackets,
7940 ) with the correct information.
7941 Many of the AASTeX commands and environments can be implemented directly
7942 in LyX, but some cannot: most noticeably
7954 , which should stick out like a sore thumb if you actually just opened the
7956 For commands such as these, the LaTeX code must be entered directly and
7958 Such commands are referred to as TeX code, or Evil Red Text.
7959 I tried to minimize the amount of TeX code needed in an AASTeX document,
7960 but there is still a bit more required than any of us would like.
7963 \begin_layout Subsection
7964 Finishing Your Paper
7967 \begin_layout Standard
7968 When the paper is finished to your satisfaction and previews/prints correctly,
7970 \begin_inset Quotes eld
7974 \begin_inset Quotes erd
7977 actions which need to be done before you submit it to the journals.
7981 \begin_layout Enumerate
7982 Export your paper as a LaTeX file (
7984 File\SpecialChar \menuseparator
7985 Export\SpecialChar \menuseparator
7992 \begin_layout Enumerate
7997 file with your favorite text editor
8001 \begin_layout Enumerate
8002 remove the comment lines before the
8011 \begin_layout Enumerate
8016 usepackage...{fontenc}
8018 line if it appears (usually just after
8033 \begin_layout Enumerate
8034 remove everything between (and including) the
8046 commands, except for any commands you specifically put into the LaTeX preamble
8047 (which should appear immediately after the
8048 \begin_inset Quotes eld
8051 User specified LaTeX commands
8052 \begin_inset Quotes erd
8063 \begin_layout Enumerate
8064 Run the resulting file through LaTeX to make sure it still processes correctly.
8067 \begin_layout Enumerate
8068 Reread the journal requirements to make sure your filenames and formats
8072 \begin_layout Enumerate
8076 \begin_layout Subsection
8077 Comments On Specific Commands
8080 \begin_layout Standard
8081 I will not describe the detailed usage of the individual AASTeX commands:
8082 the AASTeX User Guide (
8086 ) gives a good description of each.
8087 Thus it's probably easiest for me to go down the list as found in the guide
8088 and offer comments where necessary.
8089 So let's begin \SpecialChar \ldots{}
8093 \begin_layout Subsubsection
8094 Things that work as expected
8097 \begin_layout Standard
8101 \begin_layout Plain Layout
8113 \begin_layout Standard
8114 Because they work as you might expect, I simply list them and the section
8215 begin{thebibliography}
8223 (2.13.2), all the cite commands and their variations (2.13.2), the generic
8224 graphicx figure commands (2.14.1),
8248 (2.15.4, amongst other places),
8275 \begin_layout Standard
8276 The following style options also work correctly:
8297 Simply put them in the
8303 Layout\SpecialChar \menuseparator
8309 \begin_layout Standard
8313 \begin_layout Plain Layout
8325 \begin_layout Subsubsection
8326 Things that work, but require more comment
8329 \begin_layout Standard
8330 The following items work, but require a little more discussion:
8333 \begin_layout Itemize
8334 These items are reserved for use by the journal editors, but you can put
8335 them into the LaTeX preamble if you feel compelled to do so:
8368 \begin_layout Itemize
8369 These items may be placed in the LaTeX preamble, and are included as blanks
8370 in the template file:
8391 \begin_layout Itemize
8398 (2.3) – can only be used
8399 \begin_inset Quotes eld
8403 \begin_inset Quotes erd
8406 , not in the middle of a paragraph.
8407 Use TeX code if you need to embed it.
8410 \begin_layout Itemize
8417 (2.3) – will have extra {} after it.
8418 This should not cause an error.
8421 \begin_layout Itemize
8428 (2.6) – can only be used
8429 \begin_inset Quotes eld
8433 \begin_inset Quotes erd
8436 , not in the middle of a paragraph.
8437 Use TeX code if you need to embed it.
8440 \begin_layout Itemize
8447 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8451 \begin_layout Itemize
8465 \begin_layout Itemize
8472 (2.9) – will have extra {} after it.
8473 This should not cause an error.
8476 \begin_layout Itemize
8483 (2.11) – will have extra {} after it.
8484 This should not cause an error.
8487 \begin_layout Itemize
8494 (2.14.2) – you can insert an optional filename argument by placing the cursor
8495 at the beginning of the text and selecting
8497 Insert\SpecialChar \menuseparator
8502 \begin_inset Quotes eld
8506 \begin_inset Quotes erd
8509 inserts an optional argument of the type needed by
8516 Hopefully it will be renamed someday.
8519 \begin_layout Itemize
8532 for the catalog ID optional parameter
8535 \begin_layout Itemize
8548 for the catalog ID optional parameter
8551 \begin_layout Subsubsection
8552 Things not implemented, use TeX code
8555 \begin_layout Standard
8559 \begin_layout Plain Layout
8571 \begin_layout Standard
8594 setcounter{equation}
8596 (2.12), Journal name abbreviations (2.13.4),
8632 (2.15.4, insert it as the first element in the lefthand cell after where
8634 Don't use any of LyX's rules in the table),
8646 (2.15.5), much of Misc (2.17, except
8697 \begin_layout Standard
8701 \begin_layout Plain Layout
8713 \begin_layout Subsubsection
8714 Things that cannot be implemented
8717 \begin_layout Standard
8718 \SpecialChar \ldots{}
8719 at least in any meaningful sort of way, so I suggest ignoring them.
8720 They are the references environment (2.13.3), and the deluxetable environment
8722 If you really, really need to use deluxetable, I suggest editing it in
8723 a separate file with a text editor, then using
8725 Insert\SpecialChar \menuseparator
8727 \begin_inset space ~
8732 to include it in your LyX document.
8737 file to see an example of this.
8740 \begin_layout Subsection
8741 FAQs, Tips, Tricks, and Other Ruminations
8744 \begin_layout Subsubsection
8745 Getting LyX and AASTeX to cooperate
8748 \begin_layout Standard
8749 It can be a bit tricky to get LyX to recognize a new layout and document
8751 When all else fails, do this:
8754 \begin_layout Enumerate
8755 Make certain that LaTeX can find AASTeX.
8756 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8757 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8764 \begin_layout Enumerate
8776 \begin_layout Enumerate
8779 Tools\SpecialChar \menuseparator
8782 in LyX, then restart LyX.
8785 \begin_layout Enumerate
8786 Open a regular new file, not from a template.
8787 Does AASTeX appear in the class list in
8789 Document\SpecialChar \menuseparator
8795 \begin_layout Standard
8796 If you get a warning from an existing AASTeX document about not being able
8797 to find the AASTeX layout or a message about
8798 \begin_inset Quotes eld
8801 You should not mix title layouts with normal ones
8802 \begin_inset Quotes erd
8805 , things haven't been installed correctly.
8808 \begin_layout Subsubsection
8809 LaTeX error processing a table
8812 \begin_layout Standard
8813 LyX, by default, attempts to center the table caption/title.
8814 This seems to produce a bad interaction in AASTeX so you should click somewhere
8815 in the caption/title, then select
8817 Edit\SpecialChar \menuseparator
8819 \begin_inset space ~
8833 This took care of it for me.
8836 \begin_layout Subsubsection
8840 \begin_layout Standard
8841 A couple of things: 1) I have noticed some funny spacing in the reference
8842 entries in the text.
8843 When you enter the bibliography item data, make sure their is
8847 space between the last author and the parenthesis setting off the year;
8851 \begin_inset space \thinspace{}
8855 \begin_inset space \space{}
8869 2) Entering the references at all is not obvious.
8870 The easiest thing is to start typing your first reference at the end of
8871 the document, then mark it as type
8876 That will put a small gray box in front of what you just typed.
8877 Click on the box to fill in the rest of the information.
8878 For new references, go to the end of an existing reference and press return.
8879 That will create a new line with its own box, etc.
8882 \begin_layout Subsubsection
8886 \begin_layout Standard
8887 Even though AASTeX provides its own figure commands (
8893 , for example), I much prefer LaTeX's standard figure commands (with the
8902 \begin_inset space ~
8905 commands as TeX code into a Figure Float box if you desire, but I never
8906 have much luck getting the layout right.
8907 With the standard graphics, LyX will insert a
8911 usepackage{graphicx}
8913 command into the LaTeX preamble and handle the figures in the standard
8914 LaTeX2e way, interspersing the figures in the text.
8915 I believe ApJ accepts figures exactly this way now; AJ might still use
8917 \begin_inset Quotes eld
8920 stack everything at the end
8921 \begin_inset Quotes erd
8927 \begin_layout Subsubsection
8928 Things I could have done, but didn't
8931 \begin_layout Standard
8933 \begin_inset Quotes eld
8937 \begin_inset Quotes erd
8940 things I could have implemented, but chose not to.
8941 For instance, I saw no point in double-spacing the text in the LyX window,
8942 even though it is double-spaced in the paper manuscript.
8943 Also, I chose not to make separate layouts for the preprint and preprint2
8945 Since I assume you will spend most of your time in the plain manuscript
8946 mode anyway, I decided not to chew up more disk space with this.
8950 \begin_layout Subsection
8954 \begin_layout Standard
8955 Your mileage may vary.
8956 I've now had papers published by both ApJ and AJ that have had 98% of the
8957 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8959 I have had no trouble with the submission process, and I'm sure the journals
8960 were never aware that there might be a difference.
8961 So, go forth and publish!
8964 \begin_layout Section
8968 \begin_layout Standard
8971 David Johnson; updated by Richard Heck
8974 \begin_layout Standard
8975 \begin_inset VSpace bigskip
8981 \begin_layout Standard
8983 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8984 papers to be submitted to American Mathematical Society publications.
8985 The layouts are not tailored to a specific journal, but easily can be.
8986 You should refer to the AMS documentation for specific instructions for
8987 each journal (usually it will entail only changing a single line in the
8989 That documentation is available on the Web at
8990 \begin_inset Flex URL
8993 \begin_layout Plain Layout
9001 \begin_inset Flex URL
9004 \begin_layout Plain Layout
9006 ftp://ftp.ams.org/pub/tex/amslatex/
9012 These layouts are appropriate, and useful, for any mathematical writing.
9016 \begin_layout Standard
9017 There are two basic AMS LaTeX layouts:
9020 \begin_layout Itemize
9021 amsart: The standard AMS article format.
9024 \begin_layout Itemize
9025 amsbook: the standard AMS book (really, monograph) format.
9029 \begin_layout Standard
9030 The layouts themselves contain only the minimum necessary to use the AMS
9032 They do not, in particular, contain any of the `theorem' environments used
9033 for setting theorems, lemmas, and the like.
9034 These are contained, instead, in the
9035 \begin_inset Flex Code
9038 \begin_layout Plain Layout
9044 module, which is loaded by default when when you select one of the AMS
9046 (It can also be used with other classes and can be removed, if you would
9047 rather use something else.) Less commonly used environments are in the
9048 \begin_inset Flex Code
9051 \begin_layout Plain Layout
9052 Theorems (AMS-Extended)
9057 module, which must be loaded manually.
9060 \begin_layout Standard
9061 By default, theorems and the like are numbered consecutively throughout
9062 the document, but this may be modified by loading the module
9063 \begin_inset Flex Code
9066 \begin_layout Plain Layout
9067 Theorems (Order by Section)
9072 or, if you are using
9073 \begin_inset Flex Code
9076 \begin_layout Plain Layout
9083 \begin_inset Flex Code
9086 \begin_layout Plain Layout
9087 Theorems (Order by Chapter)
9093 These will number the results as
9094 \begin_inset Formula $n.m$
9097 , where the first number refers to the section (or chapter) and the second
9098 refers to the total number of results so far in that section (or chapter).
9099 Many environments are also available unnumbered.
9100 These are indicated by an asterisk at the end.
9101 If you happen to want
9105 unnumbered results, the module
9106 \begin_inset Flex Code
9109 \begin_layout Plain Layout
9115 provides that option.
9118 \begin_layout Standard
9119 Note that these modules do not
9123 to be used with the AMS classes.
9124 It is perfectly possible to use the
9125 \begin_inset Flex Code
9128 \begin_layout Plain Layout
9134 module, and the others mentioned, with other classes, such as
9135 \begin_inset Flex Code
9138 \begin_layout Plain Layout
9145 \begin_inset Flex Code
9148 \begin_layout Plain Layout
9155 \begin_inset Flex Code
9158 \begin_layout Plain Layout
9167 \begin_layout Subsection
9168 What these layouts provide
9171 \begin_layout Standard
9172 There is a long list of included environments provided by these layouts.
9173 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9174 variety of `theorem' environments.
9175 However, the AMS recommends the environments that are available in LyX.
9179 \begin_layout Standard
9180 The following environments—as well as the standard environments, such as
9182 \begin_inset Flex Noun
9185 \begin_layout Plain Layout
9192 \begin_inset Flex Noun
9195 \begin_layout Plain Layout
9202 \begin_inset Flex Noun
9205 \begin_layout Plain Layout
9212 \begin_inset Flex Noun
9215 \begin_layout Plain Layout
9222 \begin_inset Flex Noun
9225 \begin_layout Plain Layout
9232 \begin_inset Flex Code
9235 \begin_layout Plain Layout
9242 \begin_inset Flex Code
9245 \begin_layout Plain Layout
9254 \begin_layout Description
9255 Address This should be the author's permanent address.
9258 \begin_layout Description
9260 \begin_inset space ~
9263 Address This should be the author's temporary address at the time of submission,
9264 if different from the Address.
9267 \begin_layout Description
9268 Email Author's e-mail address
9271 \begin_layout Description
9272 URL Author's Web address, if desired.
9275 \begin_layout Description
9276 Keywords Key words or phrases used to identify specific topics discussed
9280 \begin_layout Description
9281 Subjectclass These refer to the AMS Subject Classifications, published and
9284 Mathematical Reviews
9287 These are also available online at the AMS cites listed above.
9290 \begin_layout Description
9294 \begin_layout Description
9298 \begin_layout Description
9302 \begin_layout Standard
9303 The following environments are provided by both the
9304 \begin_inset Flex Code
9307 \begin_layout Plain Layout
9314 \begin_inset Flex Code
9317 \begin_layout Plain Layout
9323 modules, in the latter case in both starred (unnumbered) and unstarred
9324 (numbered) versions.
9325 These same environments are provided only in the starred versions by the
9327 \begin_inset Flex Code
9330 \begin_layout Plain Layout
9339 \begin_layout Theorem
9340 This is typically used for the statements of major results.
9344 \begin_layout Corollary*
9345 This is used for statements which follow fairly directly from previous statement
9347 Again, these can be major results.
9352 These are smaller results needed to prove other statements.
9355 \begin_layout Proposition
9356 These are less major results which (hopefully) add to the general theory
9360 \begin_layout Conjecture
9361 These are statements provided without justification, which the author does
9362 not know how to prove, but which seem to be true (to the author, at least).
9365 \begin_layout Definition*
9366 Guess what this is for.
9367 The font is different for this environment than for the previous ones.
9371 \begin_layout Example*
9372 Used for examples illustrating proven results.
9375 \begin_layout Problem
9376 It's not really known what this is for.
9377 You should figure it out.
9380 \begin_layout Exercise*
9381 Write a description for this one.
9384 \begin_layout Remark
9385 This environment is also a type of theorem, usually a lesser sort of observation.
9388 \begin_layout Claim*
9389 Often used in the course of giving a proof of a larger result.
9393 Generally, these are used to break up long arguments, using specific instances
9399 The numbering scheme for cases is on its own, not together with other numbered
9405 At the end of this environment, a QED symbol (usually a square, but it can
9406 vary with different styles) is placed.
9407 If you want to have other environments within this one—for example, Case
9408 environments—and have the QED symbol appear only after them, then the other
9409 environments need to be nested within the proof environment.
9412 Nesting Environments
9418 for information on nesting.
9421 \begin_layout Standard
9422 And these environments are provided by
9423 \begin_inset Flex Code
9426 \begin_layout Plain Layout
9427 Theorems (AMS-Extended)
9435 \begin_layout Criterion*
9436 A required condition.
9439 \begin_layout Algorithm*
9440 A general procedure to be used.
9443 \begin_layout Axiom*
9444 This is a property or statement taken as true within the system being discussed.
9447 \begin_layout Condition*
9448 Sometimes used to state a condition assumed within the present context of
9453 Similar to a Remark.
9456 \begin_layout Notation*
9457 Used for the explanation of, yes, notation.
9460 \begin_layout Summary
9461 Do we really need to tell you?
9464 \begin_layout Acknowledgement*
9468 \begin_layout Conclusion*
9469 Sometimes used at the end of a long train of argument.
9473 Used in a way similar to Proposition, though perhaps lower on the scale.
9476 \begin_layout Standard
9477 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9479 They need to be available on your system in order to use these environments.
9482 \begin_layout Section
9490 \begin_layout Standard
9496 \begin_layout Subsection
9500 \begin_layout Standard
9501 These are the layout files for some of the journals of the American Geophysical
9503 It is assumed that you have both the AGU's own class files and AGUplus
9504 installed (everything to be found at
9505 \begin_inset Flex URL
9508 \begin_layout Plain Layout
9510 ftp://ftp.agu.org/journals/latex/journals
9518 \begin_layout Subsection
9522 \begin_layout Standard
9532 They are still called this in the LyX GUI, though their LaTeX equivalents
9533 in the AGU classes are
9544 \begin_layout Standard
9545 Newly defined styles are
9582 These are mostly manuscript attributes and defined in the AGU class documentati
9586 \begin_layout Standard
9587 I suspect this is still badly incomplete.
9590 \begin_layout Subsection
9594 \begin_layout Standard
9611 \begin_layout Subsection
9615 \begin_layout Itemize
9618 Journal of Geophysical Research
9627 \begin_layout Standard
9628 Add your own, it isn't so hard! Look at the
9639 \begin_layout Subsection
9640 Bugs and things to remember
9643 \begin_layout Standard
9644 In order to use the new layouts, you must remember to do the following for
9648 \begin_layout Enumerate
9654 This can be done in the
9656 Layout\SpecialChar \menuseparator
9661 Document\SpecialChar \menuseparator
9665 (AGU articles are always in English, right? So
9672 \begin_layout Enumerate
9682 (Yes, this is a bug.)
9685 \begin_layout Enumerate
9686 Make sure you use the
9690 bibliography style, by entering
9694 into the second field of the BibTeX inset.
9695 None of the standard styles will do.
9698 \begin_layout Section
9702 \begin_layout Standard
9708 \begin_layout Subsection
9712 \begin_layout Standard
9713 Broadway is for writing plays.
9714 The format is more decorative than Hollywood, and much less standardized.
9715 This format should be suitable for workshops.
9718 \begin_layout Subsection
9722 \begin_layout Standard
9723 The same as in Hollywood.
9726 \begin_layout Subsection
9730 \begin_layout Standard
9735 names as labels then cross-reference the label to insert the name.
9736 The cross-reference dialog will show the current cast of characters.
9739 \begin_layout Subsection
9740 Paper size and Margins
9743 \begin_layout Standard
9744 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9747 \begin_layout Subsection
9751 \begin_layout Standard
9752 The following environments are available.
9753 You can use broadway.bind to get the bind keys shown at the right.
9756 \begin_layout Itemize
9760 \begin_inset Newline newline
9765 You should not have to use this, but it is here for anything that does not
9769 \begin_layout Itemize
9773 \begin_inset space \hfill{}
9777 \begin_inset Newline newline
9782 Used to describe stage setting and the action.
9783 First use of speaker names in all CAPs.
9786 \begin_layout Itemize
9790 \begin_inset space \hfill{}
9794 \begin_inset Newline newline
9799 Automatically numbered.
9800 On screen it will be arabic, but will print as Roman.
9803 \begin_layout Itemize
9807 \begin_inset space \hfill{}
9811 \begin_inset Newline newline
9821 It is just centered text.
9824 \begin_layout Itemize
9828 \begin_inset space \hfill{}
9832 \begin_inset Newline newline
9837 Not automatically numbered.
9838 You supply the number.
9839 This is because I couldn't figure out how.
9842 \begin_layout Itemize
9846 \begin_inset space \hfill{}
9850 \begin_inset Newline newline
9855 A special case of Narrative to describe the setting and action as the curtain
9859 \begin_layout Itemize
9863 \begin_inset space \hfill{}
9867 \begin_inset Newline newline
9872 The speaker's (actor's) title, centered in all CAPS.
9875 \begin_layout Itemize
9879 \begin_inset space \hfill{}
9883 \begin_inset Newline newline
9888 Instructions to the speaker.
9889 The parentheses are automatically inserted.
9890 The ( will appear on screen, but both will be in the printed play.
9891 This environment is only used within
9898 \begin_layout Itemize
9902 \begin_inset space \hfill{}
9906 \begin_inset Newline newline
9911 What the Speaker says.
9914 \begin_layout Itemize
9918 \begin_inset space \hfill{}
9922 \begin_inset Newline newline
9927 The curtain comes down.
9930 \begin_layout Itemize
9934 \begin_inset space \hfill{}
9940 \begin_layout Itemize
9944 \begin_inset space \hfill{}
9950 \begin_layout Itemize
9954 \begin_inset space \hfill{}
9960 \begin_layout Standard
9964 \begin_layout Section
9968 \begin_layout Standard
9973 can be used to type letters according to German conventions.
9974 A template file is included in
9976 .../lyx/share/templates
9978 for you to use as a starting point.
9981 \begin_layout Section
9989 \begin_layout Standard
9995 \begin_layout Subsection
9999 \begin_layout Standard
10000 This is the layout file for the European Geophysical Society journals.
10005 can be downloaded from the web site of the EGS under
10006 \begin_inset Flex URL
10009 \begin_layout Plain Layout
10019 \begin_layout Subsection
10023 \begin_layout Standard
10026 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
10034 The current layout file is unfortunately very unmodular and would benefit
10035 from using the various
10042 \begin_layout Section
10046 \begin_layout Standard
10052 \begin_layout Standard
10053 Elsevier Science Publishers B.V.
10054 provides a standard LaTeX document class (
10058 ) for submitting articles to their various journals.
10059 The style file can be downloaded directly from their web site:
10060 \begin_inset Flex URL
10063 \begin_layout Plain Layout
10065 http://www.elsevier.com/wps/find/authorsview.authors/latex
10071 Instructions are supplied along with the class file, which details the
10072 requirements of the publishers.
10073 LyX includes a package that allows for the use of this class, by a layout
10074 and a template file.
10075 Installation of the class file is the same as for any other LaTeX package;
10076 instructions are provided in the Elsevier documentation.
10079 \begin_layout Standard
10089 As the Elsevier class file is based mainly on the standard article class,
10090 most of the normal functionality is provided.
10091 The Elsevier class defines a number of mathematical environments, which
10092 are similar to the AMS environments.
10093 These commands are all described in the Elsevier documentation, and are
10097 \begin_layout Standard
10098 The easiest way to use the Elsevier style is to base documents on the included
10100 It is best not to use options such as fancy headings or the geometry package,
10101 as elements such as these are defined by Elsevier in their style file.
10102 Ideally, no extra packages except those mentioned in the Elsevier documentation
10104 Essentially, Elsevier require as
10105 \begin_inset Quotes eld
10109 \begin_inset Quotes erd
10112 a LaTeX file as possible, as their intention is to take the supplied file
10113 and replace the class file with one for the particular journal to which
10114 the paper has been submitted.
10115 This also means that not too much time should be spent on the formating
10117 When it comes to be published, this will change anyway.
10118 The rest of the usage for this layout is substantially the same as for
10119 the normal article class.
10120 For details of what Elsevier do and don't allow, refer to their documentation.
10123 \begin_layout Section
10129 \begin_inset CommandInset label
10138 \begin_layout Standard
10144 \begin_layout Subsection
10148 \begin_layout Standard
10149 This section describes how to use LyX to make slides for overhead projectors.
10150 There are two document classes that can do this: the default slides class
10156 This section documents the latter.
10159 \begin_layout Standard
10160 I'm going to say this again, nice and clear, so that there's no misunderstanding
10164 \begin_layout Standard
10165 \begin_inset VSpace bigskip
10171 \begin_layout Standard
10175 This section documents the class
10176 \begin_inset Quotes eld
10184 \begin_inset Quotes erd
10192 \begin_layout Standard
10193 \begin_inset VSpace bigskip
10199 \begin_layout Standard
10200 If you're looking for the documentation for
10201 \begin_inset Quotes eld
10209 \begin_inset Quotes erd
10212 , check out section
10213 \begin_inset space ~
10217 \begin_inset CommandInset ref
10219 reference "sec:slitex"
10224 If your machine doesn't have the
10229 \begin_inset Quotes eld
10237 \begin_inset Quotes erd
10240 ] installed, you'll probably have to use the default
10244 class, which isn't quite as good as
10249 \begin_layout Standard
10254 class is designed for use with version 2.1 of the
10258 LaTeX class file which is now an integral part of LaTeX2e.
10261 \begin_layout Subsection
10265 \begin_layout Standard
10266 Obviously, to use this document class, you need to select
10267 \begin_inset Quotes eld
10275 \begin_inset Quotes erd
10285 \begin_inset space ~
10291 There are some settings in the
10294 \begin_inset space ~
10299 dialog that you should know about that are specific to this class:
10302 \begin_layout Itemize
10303 Don't change the options
10314 \begin_inset space ~
10320 They're ignored by the
10327 \begin_layout Itemize
10328 The default font size is 20
10329 \begin_inset space \thinspace{}
10332 pt with the other options being 17
10333 \begin_inset space \thinspace{}
10337 \begin_inset space \thinspace{}
10341 \begin_inset space \thinspace{}
10347 \begin_layout Itemize
10348 The default font is
10356 but all math equations are still typeset in the usual roman font.
10359 \begin_layout Itemize
10364 supports A4 and Letter paper sizes as well as a special size for working
10366 \begin_inset space \thinspace{}
10370 It doesn't support A5, B5, legal or executive paper sizes.
10373 \begin_layout Itemize
10374 Don't bother changing the
10378 settings because they are ignored anyway.
10379 All floats appear where they are defined in the text.
10382 \begin_layout Itemize
10387 setting behaves a bit differently for this class.
10392 provides extensive footer and header capabilities including a user-defined
10395 \begin_inset space ~
10399 \begin_inset CommandInset ref
10401 reference "sec:foilfoot"
10406 The title page is treated differently to all other pages in the document
10415 has the logo centered at the bottom of the page (if one is defined).
10416 The possible page style choices and what they do are as follows:
10420 \begin_layout Labeling
10421 \labelwidthstring MMMMMMM
10428 The final output contains no page numbers, or other headers or footers
10429 (except footnotes of course).
10433 \begin_layout Labeling
10434 \labelwidthstring MMMMMMM
10441 The final output contains page numbers centered at the bottom of the page.
10442 No other headings or footers (other than footnotes).
10445 \begin_layout Labeling
10446 \labelwidthstring MMMMMMM
10451 Page numbers in lower right corner.
10452 Additional headers and footers are also shown.
10453 This is also the default.
10456 \begin_layout Labeling
10457 \labelwidthstring MMMMMMM
10462 Gives you access to the
10466 package although its use with
10470 is discouraged by the writer of the
10474 package because of some potential page layout clashes.
10478 \begin_layout Subsubsection
10482 \begin_layout Standard
10483 The following options may be used in the extra class options in the
10485 Document\SpecialChar \menuseparator
10491 \begin_layout Labeling
10492 \labelwidthstring MMMMMMx
10497 This sets up the page layout for 7.33
10498 \begin_inset space \thinspace{}
10502 \begin_inset space \thinspace{}
10505 in paper, which is about the same aspect ratio as a 35
10506 \begin_inset space \thinspace{}
10509 mm slide, making it a bit easier to work with this medium.
10512 \begin_layout Labeling
10513 \labelwidthstring MMMMMMx
10518 Places a rule across the page below the header on every page except the
10522 \begin_layout Labeling
10523 \labelwidthstring MMMMMMx
10528 Places a rule across the page above the footer on every page except the
10532 \begin_layout Labeling
10533 \labelwidthstring MMMMMMx
10538 This is automatically set each time you create a new
10547 to use the dvips driver to rotate those pages that are set as landscape
10551 \begin_layout Labeling
10552 \labelwidthstring MMMMMMx
10557 Simply changes the page dimensions to those of a landscape page but doesn't
10559 Thus if you use this option you need to use an external program to rotate
10560 each page or feed your paper through your printer as landscape.
10561 Note that this option effectively reverses the roles of the
10569 environments (don't worry these are described in the next section).
10572 \begin_layout Labeling
10573 \labelwidthstring MMMMMMx
10578 Equation numbers on the left.
10581 \begin_layout Labeling
10582 \labelwidthstring MMMMMMx
10587 Flush-left equations.
10590 \begin_layout Subsection
10591 Supported Environments
10594 \begin_layout Standard
10595 Most of the environments commonly supported in other classes are also supported
10601 There are several additional environments provided by
10605 as well as a couple added by LyX.
10606 The following environments are shared with other classes:
10609 \begin_layout Standard
10613 \begin_layout Plain Layout
10617 begin{multicols}{2}
10625 \begin_layout Itemize
10631 \begin_layout Itemize
10637 \begin_layout Itemize
10643 \begin_layout Itemize
10649 \begin_layout Itemize
10655 \begin_layout Itemize
10661 \begin_layout Itemize
10667 \begin_layout Itemize
10673 \begin_layout Itemize
10679 \begin_layout Itemize
10685 \begin_layout Itemize
10691 \begin_layout Itemize
10697 \begin_layout Itemize
10703 \begin_layout Itemize
10709 \begin_layout Itemize
10715 \begin_layout Itemize
10721 \begin_layout Itemize
10727 \begin_layout Itemize
10733 \begin_layout Standard
10737 \begin_layout Plain Layout
10749 \begin_layout Standard
10750 That is, all the major environments apart from the sectioning environments.
10751 Since foils are essentially self-contained sections, with a title and body,
10756 provides specific commands for starting new foils and these are:
10759 \begin_layout Itemize
10765 \begin_layout Itemize
10771 \begin_layout Standard
10772 LyX also provides slightly modified versions of these two environments called:
10775 \begin_layout Itemize
10781 \begin_layout Itemize
10784 ShortRotatefoilhead
10787 \begin_layout Standard
10788 and the differences will be explained in the next section.
10791 \begin_layout Standard
10792 Since foils are often used in presenting ideas or new theorems and such
10797 also provides a comprehensive box of goodies for presenting them:
10800 \begin_layout Standard
10804 \begin_layout Plain Layout
10808 begin{multicols}{2}
10816 \begin_layout Itemize
10822 \begin_layout Itemize
10828 \begin_layout Itemize
10834 \begin_layout Itemize
10840 \begin_layout Itemize
10846 \begin_layout Itemize
10852 \begin_layout Itemize
10858 \begin_layout Itemize
10864 \begin_layout Itemize
10870 \begin_layout Itemize
10876 \begin_layout Itemize
10882 \begin_layout Standard
10886 \begin_layout Plain Layout
10898 \begin_layout Standard
10899 The starred versions are unnumbered while the unstarred versions are numbered.
10900 There are also two list environments added by LyX and these are:
10903 \begin_layout Itemize
10909 \begin_layout Itemize
10915 \begin_layout Standard
10920 provides some powerful header and footer capabilities that are best set
10921 in the preamble although they may be set at any point in a document.
10922 If you want to change these settings in your document the best place to
10923 do so is at the very top of a foil, i.
10924 \begin_inset space \thinspace{}
10930 \begin_inset space \space{}
10935 straight after the foilhead.
10938 \begin_layout Standard
10939 For this purpose, the following command styles are provided [
10946 \begin_layout Standard
10950 \begin_layout Plain Layout
10954 begin{multicols}{2}
10962 \begin_layout Itemize
10966 \begin_inset space ~
10972 \begin_layout Itemize
10978 \begin_layout Itemize
10982 \begin_inset space ~
10988 \begin_layout Itemize
10992 \begin_inset space ~
10998 \begin_layout Itemize
11002 \begin_inset space ~
11009 \begin_layout Standard
11010 \begin_inset space ~
11017 \begin_layout Standard
11021 \begin_layout Plain Layout
11033 \begin_layout Standard
11034 There are also a few commands provided by
11038 that aren't directly supported by LyX but I'll tell you what they do and
11039 how to use them in section
11040 \begin_inset space ~
11044 \begin_inset CommandInset ref
11046 reference "sec:unsuppfoils"
11053 \begin_layout Subsection
11054 Building a Set of Foils
11057 \begin_layout Standard
11058 This section will give a simple introduction to using the different environments
11059 to build a set of foils.
11060 If you want to see an example set of foils, take a look at the
11064 file you find in LyX's
11071 \begin_layout Subsubsection
11072 Give It a Title Page
11075 \begin_layout Standard
11076 Unlike other classes that provide
11096 creates the title on a page of its own.
11097 If you leave out the
11101 environment LaTeX will substitute the current date (every time you regenerate
11105 \begin_layout Subsubsection
11109 \begin_layout Standard
11110 As I mentioned earlier, there are four ways of starting a new foil.
11111 For portrait foils you should use
11120 The difference between these two environments is the amount of space between
11121 the title of the foil (the foilhead) and the body of the foil.
11124 \begin_layout Standard
11125 Landscape foils are generated using the
11131 ShortRotatefoilhead
11134 Again the only difference is the spacing between foilhead and body.
11135 Both of the short versions have 0.5 inches less separation between the foilhead
11140 \begin_layout Standard
11141 One problem with the support for landscape foils is the requirement that
11142 you have to use the
11146 driver to generate the PostScript output otherwise the foils won't be rotated.
11147 It is possible to get landscape foils even if you haven't got the
11151 driver provided you can feed your foils sideways through your printer ;-)
11154 \begin_layout Subsubsection
11155 Theorems, Lemmas, Proofs and more
11158 \begin_layout Standard
11159 Due to a small bug in LyX you can't have two of the same type of these environme
11160 nts directly following each other.
11161 They must be separated by something.
11162 If you try, you will just be extending the previous environment as if you
11163 had merged the two environments together.
11164 So, how do you get around this problem? The simplest option is to insert
11165 some text between the two environments or add a
11169 environment between the two with just a
11170 \begin_inset Quotes eld
11178 \begin_inset Quotes erd
11182 This will force LyX to produce two separate environments and hence the
11183 correct LaTeX output.
11184 An example is provided in the example file included with the LyX distribution.
11185 Remember, this problem only occurs if you are trying to place two of the
11186 same type of theorem-like environments one directly after the other.
11189 \begin_layout Subsubsection
11193 \begin_layout Standard
11194 You get all the commonly supported list styles found in other classes as
11195 well as two new ones.
11196 I'll only describe the new ones here.
11197 If you want to find out more about the other list environments check out
11203 If you intend to use itemized lists you might also want to read about the
11207 \begin_inset space ~
11211 \begin_inset space ~
11216 dialog described above in section
11217 \begin_inset space ~
11221 \begin_inset CommandInset ref
11223 reference "sec:bullet"
11230 \begin_layout Standard
11231 The two new list styles,
11239 , are designed to make it easier for you to create lists of do's and don'ts
11240 or right and wrong by providing dedicated environments that use a tick
11241 or a cross as the label of the list.
11242 These lists are in fact dedicated variants of the
11247 They do however require that you have the
11251 packages installed.
11254 \begin_layout Subsubsection
11258 \begin_layout Standard
11263 redefines the floating tables and figures so that they appear exactly where
11264 they are in the text rather than pushing them to the top of the page or
11265 to some user specified location.
11266 In fact if you change the float placement settings they are simply ignored.
11269 \begin_layout Subsubsection
11270 Page Headers and Footers
11271 \begin_inset CommandInset label
11273 name "sec:foilfoot"
11280 \begin_layout Standard
11284 \begin_inset space ~
11293 are two commands used to control the left-footer text string.
11294 The first is meant to allow you to include a graphic logo on your foils
11296 \begin_inset Quotes eld
11304 \begin_inset Quotes erd
11308 While the second is meant to provide a classification for the audience,
11312 \begin_inset space \thinspace{}
11318 \begin_inset space \space{}
11322 It is empty by default.
11325 \begin_layout Standard
11326 The remaining page corners can be filled by
11329 \begin_inset space ~
11334 (which defaults to page numbers),
11337 \begin_inset space ~
11345 \begin_inset space ~
11353 \begin_layout Subsection
11359 \begin_inset CommandInset label
11361 name "sec:unsuppfoils"
11368 \begin_layout Standard
11369 All the commands mentioned below need to be set in a
11377 within another environment.
11380 \begin_layout Subsubsection
11384 \begin_layout Standard
11385 All lengths are adjusted using the
11408 should be replaced by the name given to the length you want to change and
11413 is the length value.
11414 All lengths should be specified in units of length such as inches (
11426 ) or relative to some document or font-based length such as
11436 \begin_layout Standard
11437 It's possible to change the spacing between a foilhead and the body of the
11438 foil by adjusting the length specified by
11445 For example, to make
11450 \begin_inset space \space{}
11453 in closer to their bodies put the following in the preamble:
11459 foilheadskip}{-0.5in}
11462 \begin_layout Standard
11463 The spacings around floats can be adjusted by setting these lengths:
11466 \begin_layout Labeling
11467 \labelwidthstring MMMMMMMMMMM
11474 Separation between the text and the top of the float
11477 \begin_layout Labeling
11478 \labelwidthstring MMMMMMMMMMM
11485 Separation between the float and the caption
11488 \begin_layout Labeling
11489 \labelwidthstring MMMMMMMMMMM
11496 Separation between the caption and the following text
11499 \begin_layout Labeling
11500 \labelwidthstring MMMMMMMMMMM
11507 You can make the captions narrower than the surrounding text by adjusting
11509 Best done relative to
11518 \begin_layout Standard
11519 There are also several title page related lengths that you may find useful
11520 if you have a long title or several authors:
11523 \begin_layout Labeling
11524 \labelwidthstring MMMMMMMMMMM
11531 Separation from headers to
11536 \begin_layout Labeling
11537 \labelwidthstring MMMMMMMMMMM
11555 \begin_layout Labeling
11556 \labelwidthstring MMMMMMMMMMM
11570 \begin_layout Labeling
11571 \labelwidthstring MMMMMMMMMMM
11587 \begin_layout Labeling
11588 \labelwidthstring MMMMMMMMMMM
11604 \begin_layout Standard
11605 The last length related command affects all the list environments.
11616 a list environment then all the vertical spacing between the list items
11618 Note that this is a command not a length so it doesn't require
11624 like the stuff mentioned above.
11627 \begin_layout Subsubsection
11628 Headers and Footers
11631 \begin_layout Standard
11644 commands control whether the logo in the
11648 definition appear on a given page.
11655 in the preamble then none of the foils will have the logo on them.
11656 If you don't want the logo on a particular page place the
11662 directly after the foilhead of that page and the
11668 directly after the next foilhead.
11671 \begin_layout Standard
11672 If you decide to use the
11676 page style setting in the
11679 \begin_inset space ~
11684 dialog you should probably add
11694 to your preamble so headers and footers on landscape pages are correctly
11695 placed when rotated.
11696 This is due to some clashes between the page layouts provided by the
11707 \begin_layout Section
11708 Hollywood (Hollywood spec scripts)
11711 \begin_layout Standard
11717 \begin_layout Subsection
11721 \begin_layout Standard
11722 Getting the format of a Hollywood script right is a
11723 \begin_inset Quotes eld
11727 \begin_inset Quotes erd
11730 It is designed to make the readers focus on content and to be easy and
11731 familiar for the actors to read.
11732 Each page of a script should be one minute of film.
11733 Nothing goes in a script that you cannot see or hear on screen.
11734 The courier 12 pt font should be used throughout.
11738 \begin_layout Subsection
11742 \begin_layout Standard
11743 Speakers' lines should NEVER break in mid-sentence.
11744 If a speaker's lines continue over a page break, repeat the
11748 title followed by (Cont'd).
11751 \begin_layout Subsection
11755 \begin_layout Standard
11760 names as labels then cross-reference the label to insert the name.
11761 The cross-reference dialog will show the current cast of characters.
11762 You can use this to insert the speaker name in narratives also.
11765 \begin_layout Subsection
11766 Paper size and Margins
11769 \begin_layout Standard
11770 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11773 \begin_layout Subsection
11777 \begin_layout Standard
11778 The following environments are available.
11779 You can use hollywood.bind to get the bind keys shown at the right.
11782 \begin_layout Itemize
11786 \begin_inset Newline newline
11791 Used where nothing else works.
11795 \begin_layout Itemize
11801 \begin_inset space \hfill{}
11809 \begin_inset Newline newline
11812 Usually followed by something like
11813 \begin_inset Quotes eld
11816 on Sally waking up.
11817 \begin_inset Quotes erd
11823 \begin_layout Itemize
11827 \begin_inset space \hfill{}
11831 \begin_inset Newline newline
11836 Introduces a new INTERIOR camera set-up.
11837 Always followed by DAY or NIGHT, or something similar to define the lighting
11839 Everthing on this line in CAPS.
11842 \begin_layout Itemize
11846 \begin_inset space \hfill{}
11850 \begin_inset Newline newline
11855 Introduces a new EXTERIOR camera set-up.
11856 Everthing on this line in CAPS.
11859 \begin_layout Itemize
11863 \begin_inset space \hfill{}
11867 \begin_inset Newline newline
11872 The character speaking.
11875 \begin_layout Itemize
11879 \begin_inset space \hfill{}
11883 \begin_inset Newline newline
11888 Instructions to the speaker.
11889 The () are automatically inserted, but only the ( will show in LyX.
11890 Both will be printed.
11893 \begin_layout Itemize
11897 \begin_inset space \hfill{}
11901 \begin_inset Newline newline
11913 \begin_layout Itemize
11917 \begin_inset space \hfill{}
11921 \begin_inset Newline newline
11926 Camera movement instruction.
11928 \begin_inset space \thinspace{}
11932 \begin_inset space \space{}
11938 \begin_layout Itemize
11942 \begin_inset space \hfill{}
11948 \begin_layout Itemize
11952 \begin_inset space \hfill{}
11958 \begin_layout Itemize
11962 \begin_inset space \hfill{}
11968 \begin_layout Itemize
11972 \begin_inset space \hfill{}
11978 \begin_layout Subsection
11982 \begin_layout Itemize
11986 \begin_layout Itemize
11990 \begin_layout Itemize
11992 \begin_inset space \thinspace{}
11999 \begin_layout Itemize
12004 \begin_layout Itemize
12005 PAN — camera movement
12008 \begin_layout Itemize
12009 INSERT — cut to close-up of
12012 \begin_layout Section
12016 \begin_layout Standard
12019 Panayotis Papasotiriou
12022 \begin_layout Subsection
12026 \begin_layout Standard
12027 The ijmpc package is a set of macros that facilitates electronic manuscript
12030 International Journal of Modern Physics C
12033 Similarly, the ijmpd package is for creating manuscripts to be submitted
12036 International Journal of Modern Physics D
12039 Both journals are published by World Scientific.
12040 The corresponding document classes are named
12049 These files, together with instructions for the authors, can be downloaded
12051 \begin_inset Flex URL
12054 \begin_layout Plain Layout
12056 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
12062 \begin_inset Flex URL
12065 \begin_layout Plain Layout
12067 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
12073 Both packages are modified versions of the standard
12074 \begin_inset Quotes eld
12078 \begin_inset Quotes erd
12081 package, and they are almost (but not exactly) identical.
12082 Most of their features are supported by LyX.
12083 I have used LyX successfully to write articles submitted to both journals
12084 without any problem.
12087 \begin_layout Subsection
12091 \begin_layout Standard
12092 As usual, the easiest way to write a paper is to start with a template.
12095 File\SpecialChar \menuseparator
12114 This will give an (almost) empty document that includes the most common
12115 fields found in a manuscript.
12116 Simply overwrite the existing text (including the brackets,
12121 You should keep in mind the following remarks.
12124 \begin_layout Enumerate
12125 LyX won't let you change the font size and the page style of the document,
12126 because such modifications are not allowed by both packages.
12129 \begin_layout Enumerate
12130 The language of the document should not be changed.
12131 Before previewing your paper, be sure that the babel package is not used.
12132 To do this, click on
12134 Tools\SpecialChar \menuseparator
12145 checkbox in the language settings, and click on
12153 , if you wish to make this change permanent).
12156 \begin_layout Enumerate
12158 \begin_inset Quotes eld
12162 \begin_inset Quotes erd
12165 style must be used to define keywords.
12168 \begin_layout Enumerate
12169 The ijmpc package provides a style named
12170 \begin_inset Quotes eld
12173 Classification Codes
12174 \begin_inset Quotes erd
12177 , which can be used to define classification codes, such as PACS numbers.
12178 Note that this facility is not supported by the ijmpd package.
12181 \begin_layout Enumerate
12182 Several new environments are available:
12183 \begin_inset Quotes eld
12187 \begin_inset Quotes erd
12191 \begin_inset Quotes eld
12195 \begin_inset Quotes erd
12199 \begin_inset Quotes eld
12203 \begin_inset Quotes erd
12207 \begin_inset Quotes eld
12211 \begin_inset Quotes erd
12215 \begin_inset Quotes eld
12219 \begin_inset Quotes erd
12223 \begin_inset Quotes eld
12227 \begin_inset Quotes erd
12231 \begin_inset Quotes eld
12235 \begin_inset Quotes erd
12239 \begin_inset Quotes eld
12243 \begin_inset Quotes erd
12247 \begin_inset Quotes eld
12251 \begin_inset Quotes erd
12255 \begin_inset Quotes eld
12259 \begin_inset Quotes erd
12263 \begin_inset Quotes eld
12267 \begin_inset Quotes erd
12271 \begin_inset Quotes eld
12275 \begin_inset Quotes erd
12279 \begin_inset Quotes eld
12283 \begin_inset Quotes erd
12287 \begin_inset Quotes eld
12291 \begin_inset Quotes erd
12295 Their use is more or less obvious.
12296 LyX supports all these environments; it will use the proper label, text
12297 style, and numbering scheme for each of them.
12300 \begin_layout Enumerate
12301 Both packages use basic citations; the natbib package should not be used.
12302 In LyX, citation references are shown as usual; in the output, citations
12303 are shown as superscripts.
12304 If you want to use a citation as normal text, you should use the
12309 \begin_inset space \thinspace{}
12313 \begin_inset space \space{}
12317 \begin_inset Quotes eld
12321 \begin_inset space \space{}
12331 \begin_inset Quotes erd
12337 \begin_layout Enumerate
12339 \begin_inset Quotes eld
12343 \begin_inset Quotes erd
12346 section in both packages.
12347 To put acknowledgments, just use the
12348 \begin_inset Quotes eld
12352 \begin_inset Quotes erd
12358 \begin_layout Enumerate
12359 Appendices may be added to the paper,
12363 the Acknowledgments and
12368 LyX provides a special environment, called
12369 \begin_inset Quotes eld
12373 \begin_inset Quotes erd
12376 which marks the beginning of the appendices.
12377 This environment should be left blank; it just sends a LaTeX command, but
12378 nothing is really printed.
12380 \begin_inset Quotes eld
12384 \begin_inset Quotes erd
12387 is printed with blue letters, as a signal that all sections after that
12388 point are appendices.
12389 To write an appendix, use the
12390 \begin_inset Quotes eld
12394 \begin_inset Quotes erd
12398 LyX will number each appendix with capital letters, as required by both
12401 \begin_inset Quotes eld
12405 \begin_inset Quotes erd
12412 be present before the first appendix; if not, all appendices will be numbered
12413 as normal sections in the output.
12416 \begin_layout Enumerate
12417 The ijmpc and the ijmpd packages use the
12421 command to implement table captions.
12422 As a result, a table created by LyX is printed correctly, but its caption
12424 However, you can use some TeX code to overcome this problem, so that captions
12425 are printed as expected.
12426 To do so, create a float table as usual, remove the caption, and replace
12427 it with the TeX code
12437 (sic); you must also the TeX code
12441 immediately after the tabular material.
12442 Study the example table included in the template files to see how this
12443 trick is implemented.
12444 Alternatively, If you need table captions, you should implement the whole
12449 file, then include this file to the LyX document (
12451 Insert\SpecialChar \menuseparator
12452 File\SpecialChar \menuseparator
12454 \begin_inset space ~
12460 Details on how to create a table float can be found in the files
12468 , included in the corresponding packages.
12471 \begin_layout Subsection
12472 Preparing a paper for submission
12475 \begin_layout Standard
12476 Before you submit your paper you must export the LyX document as a LaTeX
12479 File\SpecialChar \menuseparator
12480 Export\SpecialChar \menuseparator
12487 \begin_layout Plain Layout
12488 Actually you have the choice between LaTeX (plain) and pdflatex.
12489 If you intend to use pdflatex to prepare the paper, you should use the
12490 pdflatex option so that included graphics are converted to PDF format,
12491 ready for use by pdflatex.
12496 , then make the following changes to the resulting
12503 \begin_layout Enumerate
12504 Remove the comment lines before the
12513 \begin_layout Enumerate
12514 Remove everything between (and including) the
12526 commands, except for any commands you specifically put into the LaTeX preamble.
12529 \begin_layout Standard
12534 file should be saved and processed through LaTeX as many times as necessary.
12535 You may also want to check the resulting
12542 \begin_layout Subsection
12546 \begin_layout Standard
12547 The use of TeX code is reduced to two commands, which must be placed at
12548 the top of the document.
12549 If you started writing your paper by using the
12557 template, the TeX code needed is already in its place; you usually don't
12559 You may only modify the first TeX code to specify the information printed
12560 to the top of odd and even pages (authors' names and short paper's title,
12562 This TeX code must have the form
12566 markboth{Authors' Names}{Short Paper's Title}
12571 \begin_layout Section
12575 \begin_layout Standard
12581 \begin_layout Subsection
12585 \begin_layout Standard
12586 The iopart package provides a document class to create electronic manuscript
12587 submission to the journals published by the Institute of Physics.
12588 Instructions for the authors how to create a paper using the iopart class
12589 can be downloaded together with the iopart package from the site
12590 \begin_inset Flex URL
12593 \begin_layout Plain Layout
12595 ftp://ftp.iop.org/pub/journals/latex2e
12603 \begin_layout Subsection
12607 \begin_layout Standard
12608 The easiest way to write a paper is to start with the file
12612 that is available in LyX's examples files folder.
12613 Open this file, save it under a new name, and start writing.
12614 The example file explains how to use the special text environments.
12615 Here are the most important advices:
12618 \begin_layout Itemize
12619 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12622 Use AMS math package
12624 in the document settings under
12631 \begin_layout Itemize
12634 The title environment defines the kind of your paper.
12635 So use one of the following environments for the title:
12639 \begin_layout Itemize
12648 \begin_layout Itemize
12657 \begin_layout Itemize
12663 for a Topical review
12666 \begin_layout Itemize
12675 \begin_layout Itemize
12684 \begin_layout Itemize
12690 for a Paper (same as Title)
12693 \begin_layout Itemize
12699 for a Preliminary communication
12702 \begin_layout Itemize
12708 for a Rapid communication
12711 \begin_layout Itemize
12717 for a Letter to the editor
12721 \begin_layout Itemize
12724 All title environments except of
12728 can have an optional short title.
12731 \begin_layout Itemize
12732 There is a general title environment
12736 which is not directly supported by the LyX.
12737 This can be used as TeX code when your document doesn't fit into one of
12738 the other title types.
12741 \begin_layout Standard
12742 For more informations like hints for special table and formula formatting,
12743 look at the IOP author guidelines.
12746 \begin_layout Section
12750 \begin_layout Standard
12753 Panayotis Papasotiriou
12756 \begin_layout Subsection
12760 \begin_layout Standard
12761 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12762 that facilitates electronic manuscript submission to the journals they
12764 Most known of them (at least in my domain of interest) are
12766 Astrophysics and Space Science
12772 , but there are many others (see a complete list at
12773 \begin_inset Flex URL
12776 \begin_layout Plain Layout
12778 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12784 The Kluwer package may be downloaded from the site
12785 \begin_inset Flex URL
12788 \begin_layout Plain Layout
12790 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12796 A complete user guide is contained in that package (but it can also be
12797 downloaded separately).
12800 \begin_layout Standard
12801 LyX supports many features of the package but not everything.
12802 However, the TeX code needed is reduced to some
12803 \begin_inset Quotes eld
12807 \begin_inset Quotes erd
12810 commands of the package (see
12811 \begin_inset space ~
12815 \begin_inset CommandInset ref
12817 reference "subsec:kluwer_peculiarities"
12822 I have recently used LyX to write an article submitted to the
12824 Astrophysics and Space Science
12826 without any problem.
12829 \begin_layout Subsection
12833 \begin_layout Standard
12834 The easiest way to write a paper is to start with the Kluwer template file.
12837 File\SpecialChar \menuseparator
12849 This will give an (almost) empty document that includes the most common
12850 fields found in a manuscript and a short description of their use.
12851 As in most templates, simply overwrite the existing text (including the
12856 ) with the correct information.
12859 \begin_layout Subsection
12860 Preparing a paper for submission
12863 \begin_layout Standard
12864 As in the AASTeX package, before you submit your paper to a journal you
12866 \begin_inset Quotes eld
12870 \begin_inset Quotes erd
12876 \begin_layout Enumerate
12877 Export your paper as a LaTeX file.
12878 To do this, click on
12880 File\SpecialChar \menuseparator
12881 Export\SpecialChar \menuseparator
12888 \begin_layout Enumerate
12893 file with a text editor and make the following changes
12897 \begin_layout Enumerate
12898 remove the comment lines before the
12907 \begin_layout Enumerate
12908 remove everything between (and including) the
12920 commands, except for any commands you specifically put into the LaTeX preamble.
12923 \begin_layout Standard
12932 \begin_layout Enumerate
12937 file through LaTeX as many times as necessary (usually up to three).
12940 \begin_layout Enumerate
12946 \begin_inset space \thinspace{}
12950 \begin_inset space \space{}
12957 , and check if everything is OK (it should, if you didn't make any mistake).
12960 \begin_layout Subsection
12961 \begin_inset Quotes eld
12965 \begin_inset Quotes erd
12968 of the Kluwer package
12969 \begin_inset CommandInset label
12971 name "subsec:kluwer_peculiarities"
12978 \begin_layout Standard
12979 The Kluwer package has the following
12980 \begin_inset Quotes eld
12984 \begin_inset Quotes erd
12990 \begin_layout Enumerate
12991 It is possible to write multiple articles in the same LaTeX file
12995 \begin_layout Plain Layout
12996 I can't imagine any good reason to do this.
13002 Each article must be included in the environment
13003 \begin_inset Quotes eld
13007 \begin_inset Quotes erd
13011 Unfortunately, this environment cannot be omitted, even if you write just
13013 Therefore, each article starts with the command
13019 and, obviously, ends with the command
13026 Although this can be implemented in LyX, I didn't included it, since it
13027 looks ugly and can confuse the novice user.
13028 Therefore, you need to enter them directly and mark them as LaTeX code
13030 \begin_inset Quotes eld
13034 \begin_inset Quotes erd
13040 \begin_layout Enumerate
13041 Information given at the beginning of the article (i.
13042 \begin_inset space \thinspace{}
13046 \begin_inset space \space{}
13049 title, subtitle, author, institution, running title, running author, abstract
13050 and keywords) must be included in an environment called
13051 \begin_inset Quotes eld
13055 \begin_inset Quotes erd
13059 This is not implemented in LyX, so you must enter title, subtitle etc.
13060 \begin_inset space ~
13063 between two TeX code lines (
13078 \begin_layout Enumerate
13079 According to the user manual, the label of each bibliography item must be
13103 \begin_layout Standard
13108 template takes care of all these
13109 \begin_inset Quotes eld
13113 \begin_inset Quotes erd
13117 If you start a new paper using this template you don't need to do anything
13122 \begin_layout Enumerate
13123 don't delete the TeX code included in the template, and
13126 \begin_layout Enumerate
13127 copy the example bibliography item included in the template and modify it
13128 as necessary to enter new bibliography items.
13131 \begin_layout Section
13135 \begin_layout Standard
13141 \begin_layout Subsection
13145 \begin_layout Standard
13146 The LyX document classes
13148 article (koma-script)
13152 report (koma-script)
13170 correspond to the LaTeX document classes
13187 \begin_inset space ~
13190 of the Koma-Script family.
13191 They are replacements for the standard document classes
13207 , resp., and fit better to European typography conventions in a number of
13211 \begin_layout Itemize
13212 Standard character size is 11pt in
13214 article (koma-script)
13218 report (koma-script)
13226 letter (koma-script)
13231 \begin_layout Itemize
13232 Headings, labels of the description environment, and a number of elements
13235 letter (koma-script)
13237 document class are set in a bold sans serif font.
13241 \begin_layout Plain Layout
13242 There is a big difference between the bold sans serif old cm fonts and new
13243 ec fonts, especially in the appearance of headings.
13244 In comparison, the ec bold sans serif fonts look a bit thin.
13245 Here the LaTeX package
13253 helps to produce the
13254 \begin_inset Quotes eld
13258 \begin_inset Quotes erd
13261 appearance when using the ec fonts.
13266 The numbering of chapter headings is made in the same way as the numbering
13267 of section headings, that is without the extra line
13268 \begin_inset Quotes eld
13271 Chapter\SpecialChar \ldots{}
13273 \begin_inset Quotes erd
13277 In addition, the appearance of the headings can be modified by using a
13278 number of options (in LyX to be entered in the field
13281 \begin_inset space ~
13288 Layout\SpecialChar \menuseparator
13295 \begin_layout Itemize
13296 The main means in the Koma-Script document classes to design the type area
13305 (in LyX to be entered in the extra class options field in the dialog
13307 Document\SpecialChar \menuseparator
13311 They make a clearer modification of page margins possible as do the options
13314 Document\SpecialChar \menuseparator
13321 \begin_layout Itemize
13322 The LaTeX document classes of the Koma-Script family define a number of
13323 additional commands.
13324 Those part of it which makes sense in LyX is implemented in corresponding
13328 \begin_layout Standard
13329 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13330 can be found in the Koma-Script documentation
13341 \begin_layout Subsection
13342 article (koma-script), report (koma-script), and book (koma-script)
13345 \begin_layout Standard
13346 The document classes
13348 article (koma-script)
13352 report (koma-script)
13362 are implemented in the layout files
13375 They contain all the paragraph types of the corresponding standard document
13388 , resp., partly modified, with the exception of the LyX specific
13392 -type, which is replaced by the new
13396 -type having the same functionality.
13401 -Type there is a number of new paragraph types added.
13408 letter (koma-script)
13413 \begin_layout Itemize
13422 : are equivalents to
13430 , resp., additionally inserting an entry in the table of contents.
13439 are not contained in
13441 article (koma-script)
13446 \begin_layout Itemize
13455 : behave exactly as
13463 , resp., additionally clearing running heads.
13468 is not contained in
13470 article (koma-script)
13476 \begin_layout Plain Layout
13489 report (koma-script)
13491 , but since this is identical to
13495 , is has not been implemented in LyX.
13503 \begin_layout Itemize
13508 : generates a heading directly above the following paragraph in the standard
13509 character size without affecting the structure of the document.
13512 \begin_layout Itemize
13521 are special captions which respect the different space settings needed
13522 for captions placed above or below an element (if you follow strict typographic
13523 rules, you might want to place table captions always above the table).
13524 You can also use the class option
13528 , which will switch
13541 You need at least Koma-Script version 2.8q to use this.
13544 \begin_layout Itemize
13549 : can be used to set a bonmot, e.
13550 \begin_inset space \thinspace{}
13554 \begin_inset space \space{}
13557 at the beginning of a chapter.
13558 If you use the optional argument (
13560 Insert\SpecialChar \menuseparator
13562 \begin_inset space ~
13567 ), you can insert the dictum's author there.
13568 Dictum and author are separated by a line.
13569 You need at least Koma-Script version 2.8q to use this.
13574 is not contained in
13576 article (koma-script)
13581 \begin_layout Standard
13582 The following types, together with the standard types
13594 , form the title area of the document.
13595 They must be entered ahead of the first
13596 \begin_inset Quotes eld
13600 \begin_inset Quotes erd
13607 \begin_layout Plain Layout
13608 The corresponding LaTeX commands must appear before the
13619 When such a type is used more than once, the latter usage overwrites the
13620 former one, that means, for every type only the latest usage is valid.
13621 The order of the different types however has, like
13633 , no effect on the appearance of the produced document.
13636 \begin_layout Itemize
13641 : produces a centered paragraph above the ordinary title (
13653 ) for the subject of the document.
13656 \begin_layout Itemize
13661 : produces a centered paragraph below the ordinary title (
13673 ) for the publishers' name.
13676 \begin_layout Itemize
13683 report (koma-script)
13689 produces a centered paragraph on its own page behind the title page, or
13692 article (koma-script)
13694 produces a centered paragraph below the ordinary title (
13710 ) for a dedication.
13713 \begin_layout Itemize
13718 : produces a left aligned paragraph above the ordinary title (
13734 ) for a document`s head.
13737 \begin_layout Itemize
13742 : produces in a double-sided print in
13744 report (koma-script)
13750 a left-aligned paragraph at the top of the title page`s back or has no
13751 effect in a single-sided print or in
13753 article (koma-script)
13758 \begin_layout Itemize
13763 : produces in a double-sided print in
13765 report (koma-script)
13771 a left-aligned paragraph at the bottom of the title page`s back or has
13772 no effect in a single-sided print or in
13774 article (koma-script)
13779 \begin_layout Itemize
13784 : produces a special
13785 \begin_inset Quotes eld
13789 \begin_inset Quotes erd
13792 page ahead of the actual document containing a paragraph without special
13796 \begin_layout Standard
13797 The layout files for the document classes
13799 article (koma-script)
13803 report (koma-script)
13809 do include the file
13814 This is thought of as a place to define your own types.
13819 in your personal layout directory and edit the file!
13822 \begin_layout Subsection
13823 letter (koma-script)
13826 \begin_layout Standard
13830 \begin_layout Plain Layout
13842 \begin_layout Standard
13846 letter (koma-script)
13848 is implemented in the layout file
13853 It contains all the paragraph types of the corresponding standard document
13858 , partly modified, with the exception of the LyX specific types
13870 type, which is replaced by the new
13875 In addition, it contains, in contrast to the standard document class, the
13893 Furthermore, there are a number of new letter specific types.
13896 \begin_layout Standard
13900 \begin_layout Plain Layout
13912 \begin_layout Standard
13913 The appearance of the letter produced by this document class can be controlled
13914 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13918 \begin_layout Plain Layout
13919 For example, the standard appearance of the letter`s heading, consisting
13920 of name and address, is quite self-willed.
13922 \begin_inset Quotes eld
13926 \begin_inset Quotes erd
13929 heading is produced by the following LaTeX commands in the preamble:
13932 \begin_layout LyX-Code
13942 \begin_layout LyX-Code
13958 \begin_layout LyX-Code
13968 \begin_layout LyX-Code
13988 A detailed German description of such LaTeX commands can be found in the
13989 Koma-Script documentation
13994 With it, the letter's author can produce his personal letter layout.
13997 \begin_layout Standard
14006 define the beginning of the letter and must be used in every letter.
14007 To emphasize them in the LyX document class, they are marked with the letter
14017 \begin_inset space ~
14020 in the left margin.
14021 It is possible to write any number of letters in one file.
14026 type produces a new letter using the same addressee and a
14030 type produces a new addressee.
14047 are ordinary paragraph types and can also be used several times in one
14048 and the same letter.
14051 \begin_layout Itemize
14056 : produces a paragraph for the addressee and implicitly defines the beginning
14060 \begin_layout Itemize
14065 : produces a paragraph for the form of address and implicitly produces a
14069 \begin_layout Itemize
14074 : produces a paragraph for a close.
14077 \begin_layout Itemize
14082 : produces a paragraph for a postscript.
14085 \begin_layout Itemize
14090 : produces a paragraph for a distribution list.
14093 \begin_layout Itemize
14098 : produces a paragraph for enclosures.
14101 \begin_layout Standard
14142 are input types provided with a label to enter information, which will
14143 be processed by the document class.
14147 \begin_layout Plain Layout
14148 It could be seen as a matter of inconsequence, that the types
14156 described above are not such input types as well.
14157 Because of the special meaning of those types, however, I have implemented
14158 them as ordinary paragraph types with a one letter mark in the left margin.
14159 Moreover, it would affect my feeling of symmetry, if the
14167 type had such a serious different appearance.
14172 The types must be used ahead of the corresponding
14179 \begin_layout Standard
14180 An implementation of these types in a WYSIWYG fashion does not seem to make
14181 sense, because the real appearance of the produced letter does not only
14182 depend on the usage of the particular type, but also on other factors.
14183 For example, a signature entered in the
14187 type will in the standard behavior appear in the produced letter only,
14188 when in the same letter also a
14193 The entered value of the
14197 type will in the standard behavior not appear in the produced letter at
14199 The possibility to design the letter`s heading freely is already indicated
14200 in a footnote above.
14203 \begin_layout Standard
14204 The input types can also be used as empty paragraphs.
14205 This makes sense e.
14206 \begin_inset space \thinspace{}
14210 \begin_inset space \space{}
14222 type is not used at all, in the standard behavior the value of the
14226 type is used as signature, whereas if an empty
14230 type is used, no signature value is defined.
14233 \begin_layout Standard
14234 By using the input types it is possible to write a letter template, containing
14235 filled input types with your personal dates (name, address, etc.) and empty
14236 input types for other dates you want to enter.
14239 \begin_layout Itemize
14244 : sender's name, in the standard behavior appears as a centered paragraph
14245 in small caps in the letter`s heading.
14248 \begin_layout Itemize
14253 : sender's signature, in the standard behavior appears below the
14262 type is used, the value of the
14266 type appears instead.
14269 \begin_layout Itemize
14274 : sender's address, in the standard behavior appears in a centered paragraph
14275 in the letter`s heading below the sender's name.
14278 \begin_layout Itemize
14283 : sender's telephone number, in the standard behavior only sets the LaTeX
14293 \begin_layout Itemize
14298 : place of the letter`s making.
14301 \begin_layout Itemize
14306 : date of the letter`s making.
14315 , in the standard behavior, produce the place and the date in a right-aligned
14316 line below the addressee's field.
14321 type is used, neither place nor date appear, independent of the value of
14331 type is used, the date of the letter `s production is used.
14334 \begin_layout Itemize
14339 : sender`s back address, in the standard behavior appears above the addressee's
14340 field in a small sans serif font.
14343 \begin_layout Itemize
14348 : special mail information, in the standard behavior appears underlined
14349 above the addressee's field below the back address.
14352 \begin_layout Itemize
14357 : additional information, in the standard behavior appears on right side
14358 below the addressee`s field.
14361 \begin_layout Itemize
14366 : the letter's title, in the standard behavior appears in a big, bold, sans
14367 serif font above the subject.
14370 \begin_layout Itemize
14375 : the letter's subject, in the standard behavior appears in a bold font
14383 \begin_layout Standard
14404 produce a business letter like line above the
14408 line containing the fields
14409 \begin_inset Quotes eld
14413 \begin_inset Quotes erd
14417 \begin_inset Quotes eld
14421 \begin_inset Quotes erd
14425 \begin_inset Quotes eld
14429 \begin_inset Quotes erd
14433 \begin_inset Quotes eld
14437 \begin_inset Quotes erd
14441 \begin_inset Quotes eld
14445 \begin_inset Quotes erd
14449 \begin_inset Quotes eld
14453 \begin_inset Quotes erd
14457 For the date field, the value of the
14463 \begin_inset Quotes eld
14466 business letter types
14467 \begin_inset Quotes erd
14470 is used, the value of the
14474 type however does not appear, but only the LaTeX variable
14481 The ordinary output of place and date in a right-aligned line below the
14482 addressee`s field is suppressed.
14483 The types are implemented as input types provided with a label and must
14484 be used ahead of the corresponding
14491 \begin_layout Itemize
14499 \begin_layout Itemize
14507 \begin_layout Itemize
14515 \begin_layout Itemize
14523 \begin_layout Itemize
14531 \begin_layout Subsection
14532 The new letter class: letter (koma-script v.2)
14535 \begin_layout Standard
14541 \begin_layout Standard
14542 \begin_inset VSpace medskip
14548 \begin_layout Standard
14550 Koma-Script version 2.8 has introduced a new letter class
14554 which supersedes the now unsupported
14559 It has — on the LaTeX side — a completely new interface and is not compatible
14560 with the old class.
14561 Therefore, LyX supports both, though it is recommended you use the new
14565 \begin_layout Standard
14566 This class covers the same functionality as
14568 letter (koma-script),
14571 The basic items are
14575 (receiver's address, same as
14579 in the old layout),
14592 will start a new letter (i.
14593 \begin_inset space \thinspace{}
14597 \begin_inset space \space{}
14600 you can write several letters per document).
14601 New elements are sender's
14617 and the possibility to use a
14623 Insert\SpecialChar \menuseparator
14629 \begin_layout Standard
14630 The biggest improvement is, though, that the letter's layout is configurable
14631 to meet almost any needs.
14632 This can be done via the preamble or with a special style file (Letter
14633 Class Option, extension
14637 ), that will be read in as a class option.
14641 \begin_layout Plain Layout
14642 The KOMA package comes with some default
14647 There is, for instance, a
14651 file that follows german typesetting rules, or a
14655 that provides the default layout of the old
14660 The latter can be loaded with the class option
14669 ayout\SpecialChar \menuseparator
14674 ocument\SpecialChar \menuseparator
14686 template that is included in LyX for examples.
14687 A detailed description is to be found in the Koma-Script documentation
14695 \begin_layout Subsection
14699 \begin_layout Standard
14700 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14704 \begin_layout Itemize
14705 The chapter number of a
14709 type appears on a line of its own above the chapter heading instead of
14710 appearing in the same line ahead of it.
14711 The cause for that is the LyX internal behavior for the labeltype
14715 in the layout file.
14718 \begin_layout Itemize
14719 The headings of the types
14727 are only put in the
14728 \begin_inset Quotes eld
14732 \begin_inset Quotes erd
14735 LaTeX table of contents, but not in the LyX table of contents (
14737 Document\SpecialChar \menuseparator
14739 \begin_inset space ~
14743 \begin_inset space ~
14751 \begin_layout Itemize
14752 The paragraphs in a
14756 document class appear in a skip separation mode, not indented.
14757 This is the standard behavior, no special LaTeX commands are needed for
14761 Document\SpecialChar \menuseparator
14764 dialog the corresponding radio button indicates
14773 value always has the effect that extra LaTeX commands are inserted in the
14774 document to produce the gap, which is not what is wanted in this case.
14777 \begin_layout Section
14778 Latex8 (IEEE Conference Papers)
14781 \begin_layout Standard
14787 \begin_layout Subsection
14791 \begin_layout Standard
14792 Since this class is specifically for writing submissions to IEEE sponsored
14793 conferences I strongly recommend that you get a copy of their Authors Kit.
14798 package and associated bibliography style file is included in the kit.
14799 The Authors Kit is usually sent out by email once your initial submission
14801 There is a lot of useful information in the Authors Kit explaining formatting
14802 restrictions and so on and I will assume you have read this since that
14803 means I don't have to repeat it all here.
14806 \begin_layout Subsection
14810 \begin_layout Standard
14811 [AR\SpecialChar \@.
14815 \begin_layout Subsection
14816 Supported Environments
14819 \begin_layout Itemize
14825 \begin_layout Itemize
14831 \begin_layout Itemize
14837 \begin_layout Itemize
14843 \begin_layout Itemize
14849 \begin_layout Itemize
14855 \begin_layout Itemize
14861 \begin_layout Itemize
14867 \begin_layout Itemize
14873 \begin_layout Subsection
14874 Differences Between Screen and Paper
14877 \begin_layout Standard
14878 There are slight differences in appearance mainly with the presentation
14879 of section counters.
14880 On screen the trailing period of the section counter is missing but it
14881 will appear in the output so don't let this worry you.
14884 \begin_layout Section
14888 \begin_layout Standard
14894 \begin_layout Subsection
14898 \begin_layout Standard
14899 Memoir is a very powerful and constantly evolving class.
14900 It has been designed with regard to fictional and non-fictional literature.
14901 Its aim is to let the user have maximum control over the typesetting of
14903 Memoir is based on the standard book class, but it can also emulate the
14904 article class (see below).
14907 \begin_layout Standard
14908 Peter Wilson, the developer of Memoir, is known as the author of lots of
14909 useful packages in the LaTeX world.
14910 Most of them have been merged with Memoir.
14911 Therefore, it is much easier to layout the table of contents, appendices,
14912 chapter designs and such.
14913 LyX, though, does not support all of these goodies natively.
14914 Some of them might be added to forthcoming releases
14918 \begin_layout Plain Layout
14919 You are invited to send suggestions to
14920 \begin_inset Flex URL
14923 \begin_layout Plain Layout
14925 lyx-devel@lists.lyx.org
14935 , lots will probably never, due to the limitations of LyX's framework.
14936 Of course you can still use all features with the help of some native LaTeX
14941 \begin_layout Plain Layout
14946 \begin_layout Plain Layout
14956 \begin_inset space ~
14960 \begin_inset CommandInset ref
14962 reference "sec:Inserting-TeX-Code"
14972 In this section, we can only list those features which are natively supported
14974 For detailed descriptions (and for the rest of features) we recommend you
14975 have a look at the detailed manual of the Memoir class
14979 \begin_layout Plain Layout
14984 \begin_layout Plain Layout
14994 \begin_inset Flex URL
14997 \begin_layout Plain Layout
14999 CTAN:/macros/latex/memoir/memman.pdf
15009 , which is not only a user guide for the class, but also both a comprehensive
15010 description on good typesetting and a superb example for good typesetting
15014 \begin_layout Subsection
15015 Basic features and restrictions
15018 \begin_layout Standard
15019 Memoir supports basically all features of the standard book classes.
15020 There are, however, some differences, as follows:
15023 \begin_layout Description
15025 \begin_inset space ~
15028 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
15031 \begin_layout Description
15033 \begin_inset space ~
15036 style: The fancy page style is not supported, due to a command clash between
15037 Memoir and the fancyhdr package (they both define a command with the same
15038 name, which confuses LaTeX).
15039 Instead, Memoir comes with a number of its own page styles (see
15041 Layout\SpecialChar \menuseparator
15042 Document\SpecialChar \menuseparator
15044 \begin_inset space ~
15050 If you want to use these for the chapter pages, you have to use the command
15057 in the main text or in preamble (e.
15058 \begin_inset space \thinspace{}
15062 \begin_inset space \space{}
15069 chapterstyle{companion}
15074 \begin_layout Description
15075 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
15076 optional argument in the standard classes.
15077 With this, you can specify an alternative version of the title for the
15078 table of contents and the headers (for instance, if the title is too long).
15079 In LyX, you can do this via
15081 Insert\SpecialChar \menuseparator
15083 \begin_inset space ~
15088 at the beginning of a chapter/section.
15089 Memoir features a second optional argument and thus separates the table
15090 of contents from the header.
15091 You can define three variants of a title with this: one for the main text,
15092 one for the table of contents, and one for the headers.
15093 Simply insert two optional arguments if you need this feature, the first
15094 one containing the short title for the Table of Contents, the second one
15095 containing an alternative short title for the headers.
15098 \begin_layout Description
15099 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
15100 of contents, the list of figures and the list of table start a new page
15102 Memoir does not follow this route.
15103 You have to insert a page break yourself, if you want to have one.
15106 \begin_layout Description
15107 Titlepage: For some unknown reason, Memoir uses pagination on the title
15108 page (in the standard classes, title pages are
15109 \begin_inset Quotes eld
15113 \begin_inset Quotes erd
15117 \begin_inset space \thinspace{}
15121 \begin_inset space \space{}
15125 If you want an empty title page, type
15129 aliaspagestyle{title}{empty}
15134 \begin_layout Description
15135 Article: With the class option
15141 Layout\SpecialChar \menuseparator
15142 Document\SpecialChar \menuseparator
15144 \begin_inset space ~
15149 ), you can emulate article style.
15150 That is, counters (footnotes, figures, tables etc.) will not be reset on
15151 new chapters, chapters don't start a new page (but are—in contrary to
15152 \begin_inset Quotes eld
15156 \begin_inset Quotes erd
15159 article classes—still allowed), parts, though, use their own page, as in
15163 \begin_layout Description
15164 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
15165 font commands, which have been used in the old LaTeX version 2.09 (e.
15166 \begin_inset space \thinspace{}
15170 \begin_inset space \space{}
15186 It produces an error and stops LaTeX whenever such a command appears.
15191 reallows the commands and spits out warnings instead (which does at least
15193 Since a lot of packages and particularly BibTeX style files are still using
15194 those commands, we have decided to use this option by default.
15197 \begin_layout Subsection
15201 \begin_layout Standard
15202 We will only describe the features supported by LyX (which is not much currently
15204 Please consult the Memoir manual
15208 \begin_layout Plain Layout
15213 \begin_layout Plain Layout
15223 \begin_inset Flex URL
15226 \begin_layout Plain Layout
15228 CTAN:/macros/latex/memoir/memman.pdf
15241 \begin_layout Description
15242 Abstract: You may wonder why an abstract is an extra feature.
15243 Well, it is in book class.
15244 Usually books don't have abstracts.
15245 Memoir, however, has.
15246 You can use it wherever and how often you like.
15249 \begin_layout Description
15250 Chapterprecis: You may know this older typesetting style: The contents of
15251 a chapter are summarized below the title and also in the table of contents
15253 \begin_inset space \thinspace{}
15257 \begin_inset space \space{}
15262 Our hero arrives in Troia; he loses some friends; he finds others
15265 Chapterprecis does exactly this.
15266 It is therefore only sensible below a chapter.
15269 \begin_layout Description
15270 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
15271 The epigraph environment provides an elegant way of typesetting such a
15273 The motto itself (text) and its author (source) are divided by a short
15275 Unfortunately, we have to fool LyX a bit here again, since the environment
15276 needs two arguments (text and source).
15277 In this case, we have to use curly brackets (in TeX mode) between the two
15288 <author of the slogan>.
15291 \begin_layout Description
15292 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
15293 complex figurative poems).
15294 LyX can only support a few of them.
15295 One is poemtitle, which is a centered title for poems, which will also
15296 be added to the table of contents (verse is the standard environment for
15298 Memoir has some enhanced versions of verse, but you need to use TeX code,
15299 because they have to be nested inside regular verse environments, which
15300 is not possible with LyX).
15303 \begin_layout Description
15304 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
15307 \begin_layout Section
15308 Article (mwart), book (mwbk) and report (mwrep)
15309 \begin_inset Argument
15312 \begin_layout Plain Layout
15325 \begin_layout Standard
15331 \begin_layout Standard
15332 The LyX document classes
15348 correspond to the LaTeX document classes
15361 They are replacements for the standard document classes
15373 , resp., and fit better to Polish typography conventions in a number of points.
15377 \begin_layout Standard
15381 \begin_layout Itemize
15382 Unnumbered titles (with star, e.
15383 \begin_inset space \thinspace{}
15387 \begin_inset space \space{}
15394 ) are added into table of contents,
15397 \begin_layout Itemize
15398 Additional page styles:
15402 \begin_layout Description
15403 uheadings header with separated lines,
15406 \begin_layout Description
15407 myheadings custom header, contents headers via commands:
15422 \begin_layout Description
15423 myuheadings custom header with separated lines,
15426 \begin_layout Description
15427 outer page number is placed on outer side of page
15431 \begin_layout Itemize
15436 \begin_layout Description
15437 rmheadings serif titles — default,
15440 \begin_layout Description
15441 sfheadings sansserif titles,
15444 \begin_layout Description
15445 authortitle on title page first placed is author next title — default,
15448 \begin_layout Description
15449 titleauthor on title page first placed is title next author,
15452 \begin_layout Description
15453 withmarginpar reserve place on page for margins.
15457 \begin_layout Section
15461 \begin_layout Standard
15466 provides an alternative to the standard
15471 It provides similar functionality, but you might prefer this layout with
15472 sans serif sections, headings, and more.
15475 \begin_layout Section
15479 \begin_layout Standard
15485 \begin_layout Standard
15486 \begin_inset VSpace bigskip
15492 \begin_layout Standard
15497 \begin_inset space ~
15502 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15503 \begin_inset Formula $\beta$
15506 release of May, 1999) class.
15509 \begin_layout Standard
15514 textclass, which works with RevTeX 3.1.
15515 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15516 That means that it doesn't interact very well with LyX, which requires
15517 LaTeX2e, although it has been kludged to work.
15518 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15522 \begin_inset space ~
15527 textclass should also be pretty easy to use.
15530 \begin_layout Standard
15531 These documents are supposed to be used in
15535 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15536 macros, and assume you'll know what to put in the preamble if necessary.
15539 \begin_layout Subsection
15543 \begin_layout Standard
15544 All you need to do is install RevTeX 4, as described in the package's README
15546 The package can be found at The RevTeX 4 Web Site
15547 \begin_inset Flex URL
15550 \begin_layout Plain Layout
15552 http://publish.aps.org/revtex4/
15558 Install it somewhere that LaTeX can see it.
15559 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15561 \begin_inset space \thinspace{}
15565 \begin_inset space \space{}
15568 not the directory where you installed the class file.) Then, if you reconfigure
15569 LyX, it will find the class file and let you use the RevTeX4 textclass.
15572 \begin_layout Standard
15573 Probably the easiest way to get started is either to import a RevTeX 4 document
15581 \begin_inset space ~
15586 template, found in the templates directory.
15589 \begin_layout Subsection
15593 \begin_layout Standard
15594 Optional arguments to
15601 \begin_inset Quotes eld
15605 \begin_inset Quotes erd
15609 \begin_inset Quotes eld
15613 \begin_inset Quotes erd
15623 \begin_inset space ~
15631 \begin_inset space ~
15637 Remember that in RevTeX, at least one optional argument is required!
15640 \begin_layout Standard
15641 Other preamble matter, like
15648 \begin_inset space ~
15654 \begin_inset space ~
15659 dialog, also as usual.
15662 \begin_layout Subsection
15666 \begin_layout Standard
15667 The layouts basically correspond to the commands in RevTeX4.0.
15668 For example, the Email layout corresponds to
15675 Note that (at least as of RevTeX 4.0 Beta), the
15683 layouts are exactly equivalent, so you shouldn't need to use both.
15687 \begin_layout Plain Layout
15688 In case you're curious, both were included so that
15692 would be able to translate both
15712 \begin_layout Subsection
15716 \begin_layout Standard
15717 There are a couple of important unique aspects of RevTeX 4 which might cause
15718 bugs that will be even more confusing in LyX.
15721 \begin_layout Standard
15739 The LyX equivalent is that there is a separate Thanks layout.
15744 write footnotes in the
15748 layout, or weird things may happen.
15749 See the RevTeX 4 documentation for more details.
15752 \begin_layout Standard
15756 \begin_inset space ~
15764 \begin_inset space ~
15773 layouts must be placed
15781 layout and the corresponding
15798 , the LaTeX won't compile.
15801 \begin_layout Subsection
15805 \begin_layout Standard
15806 The main problem with this layout is that you can't use the optional arguments
15807 to layouts like Email and Title.
15808 (The problem is not unique to this layout; you can't use optional arguments
15809 to the Section layouts either.) This means that after you export that file
15810 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15811 need to edit the LaTeX file with a text editor to add the optional arguments
15813 \begin_inset space \thinspace{}
15817 \begin_inset space \space{}
15820 the running title for the page headers.
15821 Lacking these layouts makes the
15827 (and the equivalent
15833 ) useless, so the corresponding layouts don't exist, and will have to be
15838 \begin_layout Plain Layout
15843 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15844 has not been updated yet to take advantage of it.
15852 \begin_layout Section
15853 Springer Journals (
15860 \begin_layout Standard
15866 \begin_layout Subsection
15870 \begin_layout Standard
15871 These are the layout files for some of the journal formats used by Springer
15872 Verlag and listed on
15873 \begin_inset Flex URL
15876 \begin_layout Plain Layout
15878 http://www.springer.de/author/tex/help-journals.html
15883 , where you should also go to fetch the class files (yes, these are LaTeX2e
15885 It is a modular system: the things common to all journals are implemented
15890 , which journal-specific layout files (such as, e.
15891 \begin_inset space \thinspace{}
15895 \begin_inset space \space{}
15902 for Journal of Geodesy) can include.
15905 \begin_layout Standard
15906 This means that implementing support for any other Springer journal on this
15907 list is as simple as writing your own
15915 file following the outline given in
15923 \begin_layout Standard
15924 It is reasonably well tested only for the Journal of Geodesy.
15933 come with the standard LyX distribution.
15934 Install the relevant class file (downloaded from Springer) in a proper
15935 directory, reconfigure LaTeX (in the teTeX case by running
15939 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15940 and it should work.
15943 \begin_layout Subsection
15947 \begin_layout Standard
15948 A large number of theorem-like styles —
15954 \SpecialChar \ldots{}
15960 \begin_layout Standard
15963 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15964 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15967 See the Springer class file documentation for details.
15970 \begin_layout Subsection
15974 \begin_layout Itemize
15986 \begin_layout Itemize
15989 Probability Theory and Related Fields
15995 — Jean-Marc Lasgouttes
15998 \begin_layout Standard
15999 Add your own, it isn't so hard!
16002 \begin_layout Subsection
16006 \begin_layout Standard
16007 These files are partly based on the older
16011 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
16012 file from Springer.
16017 layout, are now defunct.
16018 Jean-Marc Lasgouttes helped out big in making me find my way around the
16019 LyX layout file mechanism.
16022 \begin_layout Subsection
16026 \begin_layout Standard
16028 But probably less than in the old hacked-LaTeX
16035 \begin_layout Standard
16037 \begin_inset space \thinspace{}
16040 g.: does not display the number for theorem-like layouts, just #.
16043 \begin_layout Section
16049 \begin_inset CommandInset label
16058 \begin_layout Standard
16066 \begin_layout Subsection
16070 \begin_layout Standard
16071 This section describes how to use LyX to make slides for overhead projectors.
16072 There are two document classes that can do this: the default slides class
16078 This section documents the former.
16081 \begin_layout Standard
16082 I'm going to say this again, nice and clear, so that there's no misunderstanding
16086 \begin_layout Standard
16087 \begin_inset VSpace bigskip
16093 \begin_layout Standard
16097 This section documents the class
16098 \begin_inset Quotes eld
16106 \begin_inset Quotes erd
16114 \begin_layout Standard
16115 \begin_inset VSpace bigskip
16121 \begin_layout Standard
16122 If you're looking for the documentation for
16123 \begin_inset Quotes eld
16131 \begin_inset Quotes erd
16134 , check out section
16135 \begin_inset space ~
16139 \begin_inset CommandInset ref
16141 reference "sec:foiltex"
16151 \begin_inset Quotes eld
16159 \begin_inset Quotes erd
16162 ] is actually somewhat better than the default
16170 \begin_layout Plain Layout
16171 \SpecialChar \ldots{}
16172 or so I've been told repeatedly by its advocates.
16173 Having never used it, I have no idea if this claim is true or not.
16178 which this section documents.
16181 \begin_layout Standard
16182 This class is the LaTeX2e improvement of the old
16187 Every LaTeX2e distribution includes this class [which I'll just refer to
16189 \begin_inset Quotes eld
16197 \begin_inset Quotes erd
16200 from now on], so you're bound to have it.
16201 As I noted earlier, there are other classes, such as
16205 , which also produce slides for overhead projectors and do a better job
16207 However, there are some things which
16211 can do which the others can't, such as generate overlays.
16212 Read on to learn more!
16215 \begin_layout Subsection
16217 \begin_inset CommandInset label
16219 name "sec:slidesetup"
16226 \begin_layout Standard
16227 Obviously, to use this document class, you need to select
16228 \begin_inset Quotes eld
16236 \begin_inset Quotes erd
16239 from the class list in the
16241 Document\SpecialChar \menuseparator
16245 There are some other special things you should know about this class:
16248 \begin_layout Itemize
16249 Don't bother changing the options
16254 They're not supported by the
16261 \begin_layout Itemize
16265 \begin_inset space ~
16270 behaves a bit differently for this class.
16271 The possible choices and what they do are as follows:
16275 \begin_layout Description
16280 The final output contains page numbers in the lower right corner.
16283 \begin_layout Description
16292 , but also prints out any time markers you've put in.
16293 This is the default.
16296 \begin_layout Description
16301 The final output contains no page numbers, time markers, or alignment markers.
16305 \begin_layout Itemize
16310 class has an extra option:
16316 \begin_inset Quotes eld
16324 \begin_inset Quotes erd
16327 in the extra class options.
16331 \begin_layout Standard
16332 Using this options allows you to add time markers to
16338 \begin_inset space ~
16342 \begin_inset CommandInset ref
16344 reference "sec:slideNote"
16352 \begin_layout Standard
16353 You can also use the template file
16354 \begin_inset Quotes eld
16362 \begin_inset Quotes erd
16365 to automatically set up a document to use the
16371 File\SpecialChar \menuseparator
16373 \begin_inset space ~
16377 \begin_inset space ~
16382 to open your new document].
16383 The template file also contains some examples of the special paragraph
16384 environments used by this class.
16385 I'll describe those next.
16388 \begin_layout Subsection
16389 Paragraph Environments
16392 \begin_layout Subsubsection
16393 Supported Environments
16396 \begin_layout Standard
16397 The first thing you'll notice when you start up a new
16401 document is the font size and type: it's the equivalent of the size
16402 \begin_inset Quotes eld
16410 \begin_inset Quotes erd
16416 \begin_inset space ~
16422 This is also what's used in the output.
16424 \begin_inset Quotes eld
16428 \begin_inset Quotes erd
16431 to remind you that this is a slide.
16432 Your final slides will use a larger font; ergo, you'll have less space.
16433 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16436 \begin_layout Standard
16437 The next thing that becomes obvious is the changes to the paragraph environment
16438 pull-down box [at the far-left end of the toolbar].
16439 Most of the paragraph environments you're used to seeing are missing.
16440 There are also five new ones.
16445 class itself only supports certain paragraph environments:
16448 \begin_layout Itemize
16454 \begin_layout Itemize
16460 \begin_layout Itemize
16466 \begin_layout Itemize
16472 \begin_layout Itemize
16478 \begin_layout Itemize
16484 \begin_layout Itemize
16490 \begin_layout Itemize
16496 \begin_layout Itemize
16502 \begin_layout Itemize
16508 \begin_layout Itemize
16514 \begin_layout Standard
16515 All of the other standard environments, including the section-heading environmen
16516 ts, aren't used in the
16523 \begin_layout Standard
16524 On the other hand, you'll notice the following new environments:
16527 \begin_layout Itemize
16533 \begin_layout Itemize
16539 \begin_layout Itemize
16545 \begin_layout Itemize
16551 \begin_layout Itemize
16557 \begin_layout Standard
16558 These five are kind of quirky, due to a
16559 \begin_inset Quotes eld
16563 \begin_inset Quotes erd
16567 You see, LyX doesn't permit you to nest any other paragraph environment
16568 into an empty environment.
16569 Now, that's fine and dandy, but it means that you wouldn't be able to start
16570 a slide with anything except plain text.
16571 To deal with this, I've performed a little
16572 \begin_inset Quotes eld
16576 \begin_inset Quotes erd
16582 \begin_layout Subsubsection
16583 Quirks of the New Environments
16584 \begin_inset CommandInset label
16586 name "sec:slideQuirk"
16593 \begin_layout Standard
16594 All five of the new paragraph environments are somewhat quirky due to inherent
16595 limitiations in the current version of LyX.
16596 As I just mentioned, LyX forbids environments that begin with another environme
16598 To get around this, the
16602 environment isn't a paragraph environment as described in the
16610 \begin_layout Standard
16611 You should consider
16624 \begin_inset Quotes eld
16627 pseudo-environments.
16628 \begin_inset Quotes erd
16631 They look like a section heading or a
16632 \begin_inset Quotes eld
16640 \begin_inset Quotes erd
16643 but really begin a [and, if necessary, end the previous] paragraph environment.
16653 \begin_inset Quotes eld
16657 \begin_inset Quotes erd
16660 These two perform some action.
16663 \begin_layout Standard
16664 A common feature of all five environments,
16684 , is a rather long-ish label.
16685 The text following this label — ordinarily the contents of the paragraph
16686 environment — is utterly irrelevant for
16707 LyX completely ignores it.
16708 In fact, you can leave these five environments completely empty.
16712 \begin_layout Standard
16717 to put any text after the rather long-ish label, you might want to.
16718 This could be a short description of the contents of the
16723 In that case, enter your descriptive comment and hit
16727 as you normally would.
16730 \begin_layout Standard
16731 If, on the other hand, you don't want to enter any descriptive text, you'll
16732 hit another LyX quirk.
16733 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16734 environment until you put something in the old one.
16738 \begin_layout Itemize
16739 Start entering the text that will
16767 \begin_layout Itemize
16768 Now move to the beginning of that paragraph.
16772 \begin_layout Itemize
16781 \begin_layout Itemize
16782 Finally, change this new, empty paragraph to a
16806 \begin_layout Standard
16807 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16811 \begin_layout Subsection
16812 Making a Presentation with
16825 \begin_layout Subsubsection
16833 \begin_layout Standard
16834 If you're expecting this section to teach you how to actually make a presentatio
16835 n, you'll be sorely disappointed.
16836 Naturally, I'll describe all of the ways the
16840 class can assist you in preparing the materials for a presentation.
16841 Filling in the contents, however, is up to you.
16846 the LyX philosophy.]
16849 \begin_layout Standard
16854 environment [in the manner described in section
16855 \begin_inset space ~
16859 \begin_inset CommandInset ref
16861 reference "sec:slideQuirk"
16865 ] tells LyX to begin a new slide [duh].
16866 The label for this environment/
16867 \begin_inset Quotes erd
16871 \begin_inset Quotes erd
16875 \begin_inset Quotes eld
16879 \begin_inset Quotes erd
16882 in cool blue, followed by the label,
16883 \begin_inset Quotes eld
16887 \begin_inset Quotes erd
16891 Any text or paragraph environments that follow this one go on the new slide.
16895 \begin_layout Standard
16896 Slides are probably the only time you'll need to forcibly end pages in LyX
16897 (this can be specified in the
16902 In fact, you'll want to, once you finish entering the contents of one slide.
16903 If you've entered more text than can physically fit on a slide, the extra
16904 overflows onto a new slide.
16905 I don't recommend doing this, however, since the overflow slide won't have
16906 any page number on it.
16907 Furthermore, it may interfere with any
16911 you've made to accompany the oversized
16918 \begin_layout Standard
16927 environments work the same way as the
16932 They both create an
16933 \begin_inset Quotes eld
16937 \begin_inset Quotes erd
16940 followed by a label [
16941 \begin_inset Quotes eld
16945 \begin_inset Quotes erd
16949 \begin_inset Quotes eld
16953 \begin_inset Quotes erd
16957 The color is a stunning magenta instead of blue, and the
16958 \begin_inset Quotes eld
16962 \begin_inset Quotes erd
16965 will look different, in style and in length.
16966 The label fonts of all three also differ from one another.
16969 \begin_layout Standard
16974 , if the contents of a
16982 exceed the physical size of a slide or sheet of paper, the extra will overflow
16984 Again, you should avoid this.
16985 It defeats the whole purpose of
16996 \begin_layout Subsubsection
17006 \begin_layout Standard
17011 is a slide that sits atop another slide.
17012 Perhaps you wish to discuss a figure on the main
17016 before displaying the text associated with it.
17017 One way to accomplish this is tape a flap of dark paper over the part of
17022 you want to display later.
17023 This method fails, however, if you wish to overlap one graph with another,
17025 You would then have to fumble while speaking to align the two separate,
17030 s to align the two graphs.
17035 environment in both cases makes life much easier.
17038 \begin_layout Standard
17043 receives the page number of its
17044 \begin_inset Quotes eld
17048 \begin_inset Quotes erd
17056 \begin_inset Quotes eld
17064 \begin_inset Quotes erd
17071 \begin_layout Plain Layout
17072 Presumably, mutliple
17077 \begin_inset Quotes eld
17085 \begin_inset Quotes erd
17089 \begin_inset Quotes eld
17097 \begin_inset Quotes erd
17101 \begin_inset Quotes eld
17109 \begin_inset Quotes erd
17113 \begin_inset space ~
17116 appended to the page number of the parent
17126 Clearly, you want the contents of both the
17134 to each fit on a single physical slide! You should probably consider an
17140 \begin_inset Quotes eld
17144 \begin_inset Quotes erd
17156 class provides a visual cue for this: the label at the start of an
17160 is shorter than that at the start of a
17165 Lastly, when you generate printable output, you'll find alignment markers
17166 in all four corners of both the
17170 page and its parent
17175 These will assist you in lining up the two physical slides.
17178 \begin_layout Standard
17179 The major problem in overlaying two slides is aligning the contents of the
17180 two transparencies.
17181 How much space should you leave for that graph on the second slide? Worse
17182 still, what if you want a graph and a sentence on second slide, but there
17183 is text on the main transparency that goes in between them? You could try
17184 and insert vertical space of the right size.
17185 The better way is to use
17196 \begin_layout Standard
17197 As their names imply,
17205 are two command-like paragraph environments that make all subsequent text
17206 invisible and visible, respectively.
17208 \begin_inset space ~
17212 \begin_inset CommandInset ref
17214 reference "sec:slideQuirk"
17218 that you don't place anything
17222 these two environments, however.
17227 , it inserts a centered, sky-blue label into the page reading
17228 \begin_inset Quotes eld
17231 <Invisible Text Follows>
17232 \begin_inset Quotes erd
17236 For paragraphs following this label, the parts of the
17244 ; it doesn't matter which] where they would be contain instead blank space.
17248 \begin_layout Standard
17253 , the corresponding centered label is
17254 \begin_inset Quotes eld
17257 <Visible Text Follows>
17258 \begin_inset Quotes erd
17262 Paragraphs following this label behave normally.
17263 Note that the beginning of a new
17275 automatically shuts off an
17280 It's therefore not necessary to use
17291 \begin_layout Standard
17292 By now, it should be obvious how to create overlay transparencies using
17293 the proper combination of
17312 \begin_layout Enumerate
17317 , including everything that will appear on it, whether on the main slide
17325 \begin_layout Enumerate
17326 Before each figure or paragraph that will appear only on the
17335 If necessary, insert a
17339 environment after the
17346 \begin_layout Enumerate
17351 immediately following the
17358 \begin_layout Enumerate
17359 Copy the contents of this
17370 \begin_layout Enumerate
17375 , change all of the
17386 \begin_layout Standard
17388 You've just made an
17395 \begin_layout Standard
17396 There's one problem with the way I've designed the LyX
17400 class: you can't make text in the middle of a paragraph invisible, nor
17401 make text in the middle of an invisible paragraph visible again.
17402 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17406 \begin_layout Plain Layout
17407 The commands of interest are:
17410 \begin_layout Itemize
17415 invisible \SpecialChar \ldots{}
17419 \begin_layout Itemize
17424 visible \SpecialChar \ldots{}
17428 \begin_layout Plain Layout
17429 \SpecialChar \ldots{}
17430 and need to be marked as TeX.
17432 \begin_inset Quotes eld
17436 \begin_inset Quotes erd
17439 you wish to change goes in between the brackets [and after the
17452 If you don't know how to mark text as TeX, see the appropriate section
17465 \begin_layout Subsubsection
17475 \begin_inset CommandInset label
17477 name "sec:slideNote"
17484 \begin_layout Standard
17493 is associated with a
17494 \begin_inset Quotes eld
17498 \begin_inset Quotes erd
17510 class provides visual cues.
17515 is shorter than that of a
17519 [yet longer than that of an
17523 ] and, like the label of an
17527 is shockingly magenta.
17528 Additionally, the printed
17532 has the page number of its
17533 \begin_inset Quotes eld
17537 \begin_inset Quotes erd
17545 \begin_inset Quotes eld
17553 \begin_inset Quotes erd
17557 \begin_inset Quotes eld
17565 \begin_inset Quotes erd
17569 \begin_inset Quotes eld
17577 \begin_inset Quotes erd
17581 You can have multiple
17585 s associated with a single
17597 , you'll probably want to break up long
17601 s so that they fit on a single sheet of paper.
17604 \begin_layout Standard
17609 is obvious: it contains anything additional you might want to say about
17615 It could also be used as a sheet of reminders for a particular
17620 In the case of the latter, you might want to make use of time markers.
17626 \begin_inset Quotes eld
17630 \begin_inset Quotes erd
17633 support for time markers, a
17638 So, you'll have to resort to using the LaTeX codes.
17641 \begin_layout Standard
17642 To use time markers, you'll need to specify the extra class option
17643 \begin_inset Quotes eld
17651 \begin_inset Quotes erd
17655 \begin_inset space ~
17659 \begin_inset CommandInset ref
17661 reference "sec:slidesetup"
17666 This option turns on timing marks, which will appear in the lower-left-hand
17672 To set what appears in the time marker, you use the LaTeX commands
17673 \begin_inset Quotes eld
17683 \begin_inset Quotes erd
17687 \begin_inset Quotes eld
17697 \begin_inset Quotes erd
17701 The arguments of both commands are time measured in seconds.
17703 \begin_inset Quotes eld
17713 \begin_inset Quotes erd
17716 sets the time marker to a given time.
17718 \begin_inset Quotes eld
17728 \begin_inset Quotes erd
17731 increments the time marker by the specified amount.
17732 Using time markers and
17736 s in this fashion, you can remind yourself how much time to spend on a particula
17744 \begin_layout Standard
17745 There's one last feature to describe.
17746 Clearly, you'd like to print out all of your
17754 s on transparencies while printing all of your
17771 with which it is associated.
17772 What's a person to do?
17775 \begin_layout Standard
17776 Luckily, there are two LaTeX commands that allow you to select what to print
17778 Both must be placed into the preamble of your document.
17780 \begin_inset Quotes eld
17792 \begin_inset Quotes erd
17795 will cause the output to contain only the
17804 Correspondingly, the command
17805 \begin_inset Quotes eld
17817 \begin_inset Quotes erd
17820 prevents the output of anything but
17825 I'd advise placing both commands in the preamble and initially comment
17827 You can then preview your entire presentation as you write.
17828 When you're done writing, you can then uncomment one of the two to select
17829 what you want to print.
17830 I like to uncomment
17831 \begin_inset Quotes eld
17843 \begin_inset Quotes erd
17846 , print to a file with
17847 \begin_inset Quotes eld
17855 \begin_inset Quotes erd
17858 in its name, comment it back out, then uncomment
17859 \begin_inset Quotes eld
17871 \begin_inset Quotes erd
17875 \begin_inset Quotes eld
17883 \begin_inset Quotes erd
17887 I can then send either file to a printer, loading transparencies or plain
17888 paper as appropriate.
17891 \begin_layout Standard
17892 You can also provide other arguments to the
17893 \begin_inset Quotes eld
17903 \begin_inset Quotes erd
17907 \begin_inset Quotes eld
17917 \begin_inset Quotes erd
17921 See a good LaTeX book for details.
17924 \begin_layout Subsection
17929 Class Template File
17932 \begin_layout Standard
17933 I have also provided a template file,
17934 \begin_inset Quotes eld
17942 \begin_inset Quotes erd
17950 To use it, begin your new presentation with
17955 ile\SpecialChar \menuseparator
17957 \begin_inset space ~
17961 \begin_inset space ~
17971 Your new LyX presentation file will contain an example
17992 additionally contain an example of the use of
18001 Lastly, the preamble will contain:
18004 \begin_layout LyX-Code
18005 % Uncomment to print out only slides and overlays
18008 \begin_layout LyX-Code
18012 \begin_layout LyX-Code
18018 \begin_inset Newline newline
18024 \begin_layout LyX-Code
18025 % Uncomment to print out only notes
18028 \begin_layout LyX-Code
18032 \begin_layout LyX-Code
18040 \begin_layout Standard
18041 One final thing: I created this class to support the LaTeX2e
18042 \begin_inset Quotes eld
18050 \begin_inset Quotes erd
18053 class, one of the built-in LaTeX2e classes.
18054 Neither I nor the rest of the LyX Team endorse or oppose the use of this
18055 built-in slide class.
18056 It's here if you want it or need it.
18057 There exist other LaTeX2e classes for creating presentations, such as the
18063 \begin_inset space ~
18067 \begin_inset CommandInset ref
18069 reference "sec:foiltex"
18074 \begin_inset Quotes eld
18082 \begin_inset Quotes erd
18085 package [present on some TeX distributions].
18086 The latter is not yet supported under LyX.
18090 \begin_layout Plain Layout
18091 Perhaps you can take on the task\SpecialChar \ldots{}
18097 I know nothing about these other classes.
18098 Try them out to see what sort of alternative they provide.
18101 \begin_layout Chapter
18102 LyX Features needing Extra Software
18105 \begin_layout Section
18109 \begin_layout Standard
18115 \begin_layout Subsection
18119 \begin_layout Standard
18128 \begin_layout Plain Layout
18133 is not yet available when you are using the LaTeX distribution MiKTeX.
18138 , you'll find in the
18145 \begin_inset space ~
18156 \begin_inset CommandInset href
18158 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
18165 \begin_layout Standard
18170 package is a program that was written by
18171 \begin_inset Flex Noun
18174 \begin_layout Plain Layout
18176 \begin_inset space ~
18184 in frustration because some constructs in LaTeX are sometimes non-intuitive,
18185 and easy to forget.
18186 The program runs over your LaTeX file, checks the integrity of the file,
18187 and flags some common errors.
18188 In other technical words, it is
18195 \begin_layout Standard
18196 Well, what is a syntax checker doing in LyX which is supposed to produce
18197 correct LaTeX anyways? The answer is simple: Just as
18201 not only checks the
18205 of C programs, but also does
18209 checks for type-errors,
18213 catches some common
18217 errors, in addition to the syntactical ones.
18222 is capable of detecting several common errors, such as
18225 \begin_layout Itemize
18226 Ellipsis detection:
18227 \begin_inset Newline newline
18230 Use \SpecialChar \ldots{}
18234 \begin_layout Itemize
18235 No space in front of/after parenthesis:
18236 \begin_inset Newline newline
18242 \begin_layout Itemize
18243 Enforcement of normal space after common abbreviations:
18244 \begin_inset Newline newline
18248 \begin_inset space \thinspace{}
18252 \begin_inset space \space{}
18255 is too wide spacing.
18258 \begin_layout Itemize
18259 Enforcement of end-of-sentence space when the last sentence ends with a
18261 \begin_inset Newline newline
18265 And this is wrong spacing.
18268 \begin_layout Itemize
18269 Space in front of labels and similar commands:
18270 \begin_inset Newline newline
18273 The label should stick right up to the text to avoid falling to a wrong
18276 \begin_inset CommandInset label
18286 \begin_layout Plain Layout
18287 This footnote is in danger of falling off to a wrong page
18292 The label is separated too much.
18295 \begin_layout Itemize
18296 Space in front of references, instead of hard spaces:
18297 \begin_inset Newline newline
18300 In you are in bad luck, the text will break right between the referenced
18301 text and reference number, and that's a pity.
18303 \begin_inset CommandInset ref
18305 reference "sec:chktex"
18312 \begin_layout Itemize
18314 \begin_inset Quotes eld
18318 \begin_inset Quotes erd
18322 \begin_inset Formula $\times$
18326 \begin_inset Newline newline
18329 2x2 looks cheap compared to
18330 \begin_inset Formula $2\times2$
18336 \begin_layout Standard
18337 and more \SpecialChar \ldots{}
18338 It is an invaluable tool when you are
18339 \begin_inset Quotes eld
18343 \begin_inset Quotes erd
18346 your document before printing, and you should run it right after the obligatory
18347 spelling check, and before you go fine tuning the typesetting.
18350 \begin_layout Subsection
18354 \begin_layout Standard
18355 If you have the program installed, usage is as simple as choosing
18357 Tools\SpecialChar \menuseparator
18359 \begin_inset space ~
18365 This will make LyX generate a LaTeX file of your document, start
18369 to check it, and then make LyX insert
18370 \begin_inset Quotes eld
18374 \begin_inset Quotes erd
18377 with the warnings from
18381 , if there were any.
18382 The warnings will be placed close to the point of the mistake, and you
18383 can quickly find them by using the
18385 Navigate\SpecialChar \menuseparator
18388 menu item, or the shortcut key
18397 Open the error boxes by clicking on them with the mouse, or use the shortcut
18406 bindings, or the corresponding
18415 Read the warning and correct the mistake, if it is a mistake.
18416 If you have trouble understanding what the warning is about, you can safely
18418 Remember that there is a hidden layer between the document on screen and
18419 the technical details in invoking
18423 , and this gap can make some warnings seem arcane or just right down plain
18427 \begin_layout Standard
18428 This document is an excellent testing bed for the feature, and it should
18429 provide quite a few warnings for you to fiddle with.
18430 Since computers are only so smart, expect most of the warnings to be false
18434 \begin_layout Subsection
18435 How to fine tune it
18438 \begin_layout Standard
18439 Sometimes, you'll find that
18443 makes more noise than suits your mood.
18444 Then you can choose not to use it, wait until your mood changes, or try
18449 to get better along with you.
18450 Another choice in the most desperate situations is to use
18452 View\SpecialChar \menuseparator
18454 \begin_inset space ~
18458 \begin_inset space ~
18462 \begin_inset space ~
18467 , which will get rid of all warnings instantly.
18470 \begin_layout Standard
18479 very configurable and extensible, you shouldn't expect to solve all problems
18485 Since LyX has to generate a somewhat special LaTeX file to be able to match
18486 the line numbers from the
18494 \begin_layout Plain Layout
18495 You can inspect the specific output from
18501 Edit\SpecialChar \menuseparator
18503 \begin_inset space ~
18507 \begin_inset space ~
18521 to the internal document structure, some of the warnings will not seen
18522 to appear correctly.
18523 There are two things you can do about this:
18526 \begin_layout Itemize
18531 invocation command line in
18547 installation configuration file (usually with the file
18552 See below to learn what warnings can be enabled and disabled on the command
18557 \begin_layout Itemize
18558 Export your document as a raw LaTeX file using
18560 File\SpecialChar \menuseparator
18561 Export\SpecialChar \menuseparator
18569 Invoked in this way, it can be a hassle to find the corresponding place
18570 in the document inside LyX, but with a little patience, you should be able
18574 \begin_layout Standard
18575 Here follows the warning messages that can be enabled and disabled in
18584 to disable a warning, and
18588 to enable a warning.
18589 The emphasized entries are disabled by default, because the default is
18592 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18597 \begin_layout Standard
18598 Notice that you should only use the options that enable and disable warnings,
18599 because LyX relies on some of the other command line parameters to be set
18600 in a specific way to have a chance to communicate with
18607 \begin_layout Enumerate
18611 Command terminated with space.
18614 \begin_layout Enumerate
18617 Non-breaking space (
18618 \begin_inset Quotes eld
18626 \begin_inset Quotes erd
18629 ) should have been used.
18632 \begin_layout Enumerate
18636 You should enclose the previous parenthesis with
18637 \begin_inset Quotes eld
18645 \begin_inset Quotes erd
18651 \begin_layout Enumerate
18654 Italic correction (
18655 \begin_inset Quotes eld
18665 \begin_inset Quotes erd
18668 ) found in non-italic buffer.
18671 \begin_layout Enumerate
18674 Italic correction (
18675 \begin_inset Quotes eld
18685 \begin_inset Quotes erd
18688 ) found more than once.
18691 \begin_layout Enumerate
18695 No italic correction (
18696 \begin_inset Quotes eld
18706 \begin_inset Quotes erd
18712 \begin_layout Enumerate
18716 \begin_inset Quotes eld
18724 \begin_inset Quotes erd
18728 \begin_inset Quotes eld
18736 \begin_inset Quotes erd
18742 \begin_layout Enumerate
18745 Wrong length of dash may have been used.
18748 \begin_layout Enumerate
18752 \begin_inset Quotes eld
18760 \begin_inset Quotes erd
18764 \begin_inset Quotes eld
18772 \begin_inset Quotes erd
18778 \begin_layout Enumerate
18782 \begin_inset Quotes eld
18790 \begin_inset Quotes erd
18796 \begin_layout Enumerate
18800 \begin_inset Quotes eld
18808 \begin_inset Quotes erd
18811 to achieve an ellipsis.
18814 \begin_layout Enumerate
18817 Inter-word spacing (
18818 \begin_inset Quotes eld
18828 \begin_inset Quotes eld
18831 ) should perhaps be used.
18834 \begin_layout Enumerate
18837 Inter-sentence spacing (
18838 \begin_inset Quotes eld
18848 \begin_inset Quotes erd
18851 ) should perhaps be used.
18854 \begin_layout Enumerate
18857 Could not find argument for command.
18860 \begin_layout Enumerate
18864 \begin_inset Quotes eld
18872 \begin_inset Quotes erd
18878 \begin_layout Enumerate
18881 Math mode still on at end of LaTeX file.
18884 \begin_layout Enumerate
18888 \begin_inset Quotes eld
18896 \begin_inset Quotes erd
18899 doesn't match the number of
18900 \begin_inset Quotes eld
18908 \begin_inset Quotes erd
18914 \begin_layout Enumerate
18917 You should use either
18920 \begin_inset Quotes eld
18928 \begin_inset Quotes erd
18933 as an alternative to
18934 \begin_inset Quotes eld
18942 \begin_inset Quotes erd
18948 \begin_layout Enumerate
18955 " (ASCII 39) instead of "
18962 \begin_layout Enumerate
18965 User-specified pattern found.
18968 \begin_layout Enumerate
18971 This command might not be intended.
18974 \begin_layout Enumerate
18981 \begin_layout Enumerate
18999 \begin_layout Enumerate
19002 Delete this space to maintain correct page references.
19005 \begin_layout Enumerate
19009 You might wish to put this between a pair of
19010 \begin_inset Quotes eld
19018 \begin_inset Quotes erd
19024 \begin_layout Enumerate
19027 You ought to remove spaces in front of punctuation.
19030 \begin_layout Enumerate
19033 Could not execute LaTeX command.
19036 \begin_layout Enumerate
19045 in front of small punctuation.
19048 \begin_layout Enumerate
19056 may look prettier here.
19059 \begin_layout Enumerate
19063 Multiple spaces detected in output.
19066 \begin_layout Enumerate
19069 This text may be ignored.
19072 \begin_layout Enumerate
19078 \begin_inset Quotes eld
19083 to begin quotation, not
19090 \begin_layout Enumerate
19097 to end quotation, not
19100 \begin_inset Quotes eld
19108 \begin_layout Enumerate
19114 \begin_layout Enumerate
19117 You should perhaps use
19118 \begin_inset Quotes eld
19126 \begin_inset Quotes erd
19132 \begin_layout Enumerate
19135 You should put a space in front of/after parenthesis.
19138 \begin_layout Enumerate
19141 You should avoid spaces in front of/after parenthesis.
19144 \begin_layout Enumerate
19148 You should not use punctuation in front of/after quotes.
19151 \begin_layout Enumerate
19154 Double space found.
19157 \begin_layout Enumerate
19160 You should put punctuation outside inner/inside display math mode.
19163 \begin_layout Enumerate
19166 You ought to not use primitive TeX in LaTeX code.
19169 \begin_layout Enumerate
19172 You should remove spaces in front of
19173 \begin_inset Quotes eld
19181 \begin_inset Quotes erd
19187 \begin_layout Enumerate
19190 \begin_inset Quotes eld
19198 \begin_inset Quotes erd
19201 is normally not followed by
19202 \begin_inset Quotes eld
19210 \begin_inset Quotes erd
19216 \begin_layout Standard
19217 In later versions of LyX, we hope to provide a more complete interface to
19218 this tool (and it's smaller cousin
19222 ) to exploit the full power of it.
19223 But it's not exactly useless as it is now: go try it on one of your existing
19224 documents of a certain length and be surprised.
19227 \begin_layout Section
19228 Version Control in LyX
19231 \begin_layout Standard
19234 Lars Gullik Bjønnes
19241 \begin_layout Subsection
19245 \begin_layout Standard
19246 A friend of mine wanted to try LyX for a group project.
19247 When he didn't find support for version control or file locking, he dropped
19249 This angered me a bit, so I thought that I should at least make support
19250 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
19251 This has been done.
19252 LyX now supports some of the most basic RCS/CVS/SVN commands.
19253 If you need something a bit more sophisticated you will have to do that
19254 manually in a terminal.
19257 \begin_layout Standard
19258 Before you begin to use the version control features in LyX, you should
19259 be familiar with RCS/CVS/SVN usage before start using it under LyX.
19260 Also note that CVS support is not as good as subversion support so we advice
19262 Good place to start with Subversion is SVN Book
19266 \begin_layout Plain Layout
19267 \begin_inset CommandInset href
19269 target "http://svnbook.red-bean.com/"
19279 In case of RCS you should read
19280 \begin_inset Quotes eld
19284 \begin_inset Quotes erd
19287 (a man file, read it with
19292 This file describes all the basic features of RCS.
19293 You should especially notice the comment about a RCS directory, and the
19294 notion of a master RCS file (the file ending in
19301 \begin_layout Standard
19302 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
19303 package—no guarantees are made for older versions.
19304 Most of the log messages are not currently displayed after operations —
19305 you can check them in Messages pane if unsure.
19308 \begin_layout Standard
19309 For introducing your own external commands consult vc-command in the manual
19313 \begin_layout Subsection
19314 RCS commands in LyX
19317 \begin_layout Standard
19318 The following sections describe the RCS commands supported by LyX.
19319 You can find them in the
19321 File\SpecialChar \menuseparator
19323 \begin_inset space ~
19329 LyX was tested against RCS 5.7.
19332 \begin_layout Subsubsection
19338 \begin_layout Standard
19339 If your document is not under revision control, this is the only item shown
19341 And if it is under revision control, the
19345 item is not visible.
19349 \begin_layout Standard
19350 This command registers your document with RCS (unless you are under the
19351 directory managed by CVS)\SpecialChar \@.
19352 You are asked interactively to supply an initial
19353 description of the document.
19354 The document is now set in Read-Only mode and you have to
19357 \begin_inset space ~
19361 \begin_inset space ~
19365 \begin_inset space ~
19370 , before making any changes to it.
19371 A document under revision control has a
19372 \begin_inset Quotes eld
19375 [RCS:<version> <locker>]
19376 \begin_inset Quotes erd
19379 item tagged to the filename in the minibuffer.
19382 \begin_layout Standard
19383 RCS command that is run:
19385 ci -q -u -i -t-"<initial description>" <file-name>
19388 \begin_layout Standard
19393 to understand the switches.
19397 \begin_layout Subsubsection
19403 \begin_layout Standard
19404 When you are finished editing a file, you check in your changes.
19405 When you do this, you are asked for a description of the changes.
19406 This is stored in the history log.
19407 The version number is bumped, your changes are applied to the master RCS
19408 file, the document is unlocked and set to Read-Only mode.
19412 \begin_layout Standard
19415 ci -q -u -m"<description>" <file-name>
19418 \begin_layout Subsubsection
19424 \begin_layout Standard
19425 By doing this you lock the document so that only you can edit it.
19426 This will also make the document Read-Write only for you.
19427 You will usually continue editing for a while and when you are finished
19428 you check in your changes.
19429 The status line is changed to reflect that you have locked the file.
19433 \begin_layout Standard
19436 co -q -l <file-name>
19439 \begin_layout Subsubsection
19442 Revert To Repository Version
19445 \begin_layout Standard
19446 This will discard all changes made to the document since the last check
19448 You get a warning before changes are discarded.
19451 \begin_layout Standard
19454 co -f -u<version> <file-name>
19457 \begin_layout Subsubsection
19463 \begin_layout Standard
19464 This makes as if the last check in never happened.
19465 No changes are made to the document loaded into LyX, but the last version
19466 is removed from the master RCS file.
19470 \begin_layout Standard
19473 rcs -o<version> <file-name>
19476 \begin_layout Subsubsection
19482 \begin_layout Standard
19483 This shows the complete history of the RCS document.
19488 is shown in a browser.
19496 \begin_layout Subsubsection
19500 \begin_layout Standard
19501 LyX supports RCS version number information (only), see
19502 \begin_inset CommandInset ref
19504 reference "sub:VCS-Revision-Information"
19511 \begin_layout Subsection
19512 CVS commands in LyX
19515 \begin_layout Standard
19516 A subset of CVS operations is supported by LyX.
19517 You can find the commands in the
19519 File\SpecialChar \menuseparator
19521 \begin_inset space ~
19527 The version control system SVN is more powerful, so please use it instead
19528 of CVS if possible.
19531 \begin_layout Subsubsection
19537 \begin_layout Standard
19538 If you start from scratch with CVS you have to create your repository and
19539 checkout the working copy with external tools.
19540 If you're using a client-server setup you may need to login before doing
19541 the first repository checkout.
19544 \begin_layout Standard
19545 If your documents are under revision control and others are using the same
19546 repository problems arise when different changes to the same document at
19547 the same location happen.
19548 Standard CVS repositories doesn't operate with a file locking mechanism.
19549 This may be surprising, but conflicts only occur if people disagree on
19550 the proper content of the same part of a document.
19551 So, if co-workers are used to communicate regularly, these conflicts occur
19553 If they don't communicate they have a fundamental problem anyway.
19554 Nevertheless some people like to work with so called
19555 \begin_inset Quotes eld
19559 \begin_inset Quotes erd
19563 If they do so the working copy of all files is readonly when checked out
19564 first and the user starts editing after using a special command to make
19565 the working copy writable.
19566 When the changes are checked in the working copy returns to readonly state.
19567 With LyX one has to edit the
19568 \begin_inset Flex Code
19571 \begin_layout Plain Layout
19577 file and add the line
19578 \begin_inset Flex Code
19581 \begin_layout Plain Layout
19587 to work with reserved checkouts.
19588 The benefit is the possibility to see who is using a writable copy of some
19590 It's not guaranteed only one user makes a copy writable.
19593 \begin_layout Standard
19594 LyX tries to guess if you're using reserved or non-reserved checkouts.
19595 If your working copy is readonly or it is writable and an additional copy
19596 of your document exists in the CVS/Base sub-directory a reserved otherwise
19597 a non-reserved checkout is assumed.
19598 When a reserved checkout is detected you have to use
19599 \begin_inset Flex MenuItem
19602 \begin_layout Plain Layout
19608 to make your working copy writable if it's readonly.
19610 \begin_inset Flex MenuItem
19613 \begin_layout Plain Layout
19619 operation is possible and that makes your working copy readonly again after
19620 transferring your changes to the repository.
19623 \begin_layout Standard
19624 More information about CVS can be found here
19625 \begin_inset Flex URL
19628 \begin_layout Plain Layout
19630 http://www.nongnu.org/cvs
19636 \begin_inset Flex URL
19639 \begin_layout Plain Layout
19641 http://ximbiot.com/cvs
19649 \begin_layout Standard
19654 to understand the sub-commands and the switches mentioned below.
19657 \begin_layout Subsubsection
19663 \begin_layout Standard
19664 If your document is not under revision control, this is the only item shown
19666 And if it is under revision control, the
19673 item is not visible.
19677 \begin_layout Standard
19678 This command registers in CVS your document
19679 \begin_inset Flex Strong
19682 \begin_layout Plain Layout
19690 in case you have already the documents directory under CVS control (in
19696 This means you have to create or checkout the archive by yourself using
19698 (In case you forget that step LyX registers the document with RCS.)
19701 \begin_layout Standard
19702 Then you are asked interactively to supply an initial description of the
19704 Don't forget that registered file is not yet checked in.
19707 \begin_layout Standard
19708 CVS command that is run:
19710 cvs -q add -m"<entered message>" "<file-name>"
19713 \begin_layout Standard
19718 above and for all other CVS commands is an abbreviation for
19719 \begin_inset Quotes eld
19722 change the current working directory to file location and use the file name
19723 without path component as argument
19724 \begin_inset Quotes erd
19730 \begin_layout Subsubsection
19736 \begin_layout Standard
19737 When you are finished editing a file, you commit your changes.
19738 When you do this and you had changed the document, you are asked for a
19739 description of the changes.
19740 After that changes are written to the repository.
19741 In case you didn't change the document and a reserved checkout is detected
19742 the reservation made on
19743 \begin_inset Flex MenuItem
19746 \begin_layout Plain Layout
19755 \begin_layout Labeling
19756 \labelwidthstring 00.00.0000
19758 \begin_inset space ~
19762 \begin_inset space ~
19766 \begin_inset Newline newline
19770 \begin_inset Flex Code
19773 \begin_layout Plain Layout
19776 -q commit -m"<description>" "<file-name>"
19782 \begin_inset Newline newline
19786 \begin_inset Flex Code
19789 \begin_layout Plain Layout
19800 \begin_layout Subsubsection
19806 \begin_layout Standard
19807 When you are sharing a repository with others, you may have to incorporate
19808 their changes into your working copy.
19811 \begin_layout Standard
19814 cvs -q update "<file-name>"
19817 \begin_layout Standard
19818 If a readonly checkout is detected the working copy is made writable and
19822 \begin_layout Standard
19825 cvs -q edit "<file-name>"
19828 \begin_layout Subsubsection
19831 Revert To Repository Version
19834 \begin_layout Standard
19835 This will discard all changes made to the document since the last check
19837 You get a warning before changes are discarded.
19838 Firstly the file is deleted, secondly CVS update command is run.
19841 \begin_layout Standard
19844 cvs -q update "<file-name>"
19847 \begin_layout Standard
19848 If a reserved checkout is detected and the working copy has no changes only
19849 the reservation is undone.
19852 \begin_layout Standard
19855 cvs -q unedit "<file-name>"
19858 \begin_layout Subsubsection
19859 Update of the local directory checkout from repository
19862 \begin_layout Standard
19863 Once your documents gets more complex, containing sub-documents and pictures,
19865 \begin_inset Flex Code
19868 \begin_layout Plain Layout
19874 files and so on using version control becomes more complicated.
19875 LyX supports updating the whole tree in which resides the document.
19876 This become especially useful once you cooperate with people which neither
19877 have detailed knowledge about CVS usage nor they have ambition to commit
19878 additional material to the repository.
19879 You have to organize the files structure so that all external files are
19880 in the same directory or subdirectories of the document.
19881 It's good practice anyway to store multipart documents in an extra directory.
19884 \begin_layout Standard
19886 \begin_inset Flex Code
19889 \begin_layout Plain Layout
19890 Update local directory from repository
19895 command updates the whole directory.
19896 If local changes are detected user is warned before update starts.
19897 In case of merge conflicts both versions of the conflicting document parts
19898 are placed in the final document.
19899 You have to review and correct the result of the merge.
19900 You'll find the conflicts enclosed in pairs of
19901 \begin_inset Flex Code
19904 \begin_layout Plain Layout
19911 \begin_inset Flex Code
19914 \begin_layout Plain Layout
19921 \begin_inset Flex Code
19924 \begin_layout Plain Layout
19931 The first part is your version as before the update operation with the
19932 document name prepended.
19933 The second one is the repository version with the version number after
19935 \begin_inset Flex Code
19938 \begin_layout Plain Layout
19947 \begin_layout Labeling
19948 \labelwidthstring 00.00.0000
19950 \begin_inset space ~
19954 \begin_inset space ~
19958 \begin_inset Newline newline
19962 \begin_inset Flex Code
19965 \begin_layout Plain Layout
19973 (Ask if changes are detected.)
19974 \begin_inset Newline newline
19978 \begin_inset Flex Code
19981 \begin_layout Plain Layout
19982 cd $path; cvs -q update
19992 \begin_layout Standard
19994 \begin_inset Flex Code
19997 \begin_layout Plain Layout
20003 stands for the path to the document.
20006 \begin_layout Subsubsection
20012 \begin_layout Standard
20013 This shows the complete history of the CVS document.
20016 cvs log "<file-name>"
20018 is shown in a browser.
20021 \begin_layout Subsection
20022 SVN commands in LyX
20025 \begin_layout Standard
20026 SVN is now partially supported by LyX.
20027 You can find the commands in the
20029 File\SpecialChar \menuseparator
20031 \begin_inset space ~
20037 Please note that if you use password protected access to repository via
20038 ssh, you will be asked in terminal window.
20039 LyX was tested against SVN 1.5 and 1.6
20043 \begin_layout Plain Layout
20044 Most of the commands will work with 1.4 too, see
20045 \begin_inset CommandInset ref
20047 reference "sub:SVN-Repo-Update"
20059 \begin_layout Subsubsection
20065 \begin_layout Standard
20066 If your document is not under revision control, this is the only item shown
20068 And if it is under revision control, the
20075 item is not visible.
20079 \begin_layout Standard
20080 This command registers in SVN your document ONLY in case you have already
20081 the documents directory under SVN control (in particular
20086 This means you have to checkout the archive by yourself.
20090 \begin_layout Standard
20091 Then you are asked interactively to supply an initial description of the
20093 Don't forget that registered file is not yet commited.
20096 \begin_layout Standard
20097 SVN command that is run:
20100 \begin_inset Quotes eld
20104 \begin_inset Quotes erd
20110 \begin_layout Standard
20115 to understand the switches.
20119 \begin_layout Subsubsection
20125 \begin_layout Standard
20126 When you are finished editing a file, you commit your changes.
20127 When you do this, you are asked for a description of the changes.
20128 After that changes are commited.
20131 \begin_layout Standard
20136 \begin_layout Plain Layout
20137 In case locking is not enabled.
20139 \begin_inset CommandInset ref
20141 reference "subsec:SVN-File-Locking"
20152 svn commit -q -m"<description>" <file-name>
20155 \begin_layout Subsubsection
20161 \begin_layout Standard
20162 Updates the changes of this file from the repository.
20163 Be sure you understand SVN merging and conflicts resolving before using
20164 this function, because all conflicts has to be resolved manually by you!
20167 \begin_layout Standard
20172 \begin_layout Plain Layout
20180 svn update --non-interactive
20181 \begin_inset Quotes eld
20185 \begin_inset Quotes erd
20191 \begin_layout Subsubsection
20194 Revert To Repository Version
20197 \begin_layout Standard
20198 This will discard all changes made to the document since the last check
20200 You get a warning before changes are discarded.
20204 \begin_layout Standard
20208 \begin_inset Quotes eld
20212 \begin_inset Quotes erd
20218 \begin_layout Subsubsection
20219 \begin_inset CommandInset label
20221 name "sub:SVN-Repo-Update"
20225 Update of the local directory checkout from repository
20229 \begin_layout Plain Layout
20230 Note that this command will work only with subversion
20231 \begin_inset Formula $\geqq1.5$
20242 \begin_layout Standard
20243 All the commands above have one shortcomming - they deal with the current
20245 Once your document contains pictures, includes external
20246 \begin_inset Flex Code
20249 \begin_layout Plain Layout
20255 files and so on administration becomes more complicated.
20256 LyX now supports updating the whole tree in which resides the document
20260 \begin_layout Plain Layout
20261 One need to organize the files structure so that all external files are
20262 in the same directory or subdirectories of the document.
20269 This become especially useful once you cooperate with people which neither
20270 know about subversion management nor they have ambition to commit additional
20271 material to the repository.
20275 \begin_layout Standard
20276 \begin_inset Flex Code
20279 \begin_layout Plain Layout
20280 Update local directory from repository
20285 command updates the whole directory and in case of merge conflicts local
20286 version of the files are left, so no unintended data loss occurs.
20287 If local changes are detected user is warned before update starts.
20290 \begin_layout Labeling
20291 \labelwidthstring 00.00.0000
20293 \begin_inset space ~
20297 \begin_inset space ~
20301 \begin_inset Newline newline
20305 \begin_inset Flex Code
20308 \begin_layout Plain Layout
20314 (Ask if changes are detected.)
20315 \begin_inset Newline newline
20319 \begin_inset Flex Code
20322 \begin_layout Plain Layout
20323 svn update --accept mine-full $path
20331 \begin_layout Standard
20333 \begin_inset Flex Code
20336 \begin_layout Plain Layout
20342 stands for the path to the document.
20345 \begin_layout Subsubsection
20351 \begin_layout Standard
20352 This shows the complete history of the SVN document.
20356 \begin_inset Quotes eld
20360 \begin_inset Quotes erd
20365 is shown in a browser.
20368 \begin_layout Subsubsection
20370 \begin_inset CommandInset label
20372 name "subsec:SVN-File-Locking"
20379 \begin_layout Standard
20380 The file exchange through various revision control systems brings the problem
20381 of merge conflicts in case two different users try to edit the same (parts
20383 When such a conflict happens it needs manual resolving and one reasonable
20384 alternative is to provide some kind of locking mechanism, which guarantees
20385 that only one user is allowed to edit file at the given time.
20388 \begin_layout Standard
20389 SVN has two such mechanisms to provide mutual exclusivity for file access
20390 - locks and automatic setting of write permissions (see sec.
20392 \begin_inset CommandInset ref
20394 reference "subsec:Automatical-Locking-Property"
20399 \begin_inset Flex Code
20402 \begin_layout Plain Layout
20412 \begin_layout Plain Layout
20413 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20419 If this property is detected for a given document LyX starts to use SVN
20420 locks for document editing automatically and the whole check-in/out mechanism
20421 switches to the same regimen as for RCS.
20422 This in particular means there are two different modes of file use in LyX:
20425 \begin_layout Itemize
20427 The loaded file is in the read-only mode.
20428 For editing on needs to check-out.
20433 consists of updating from the repository and gaining write lock.
20434 If the lock is not possible to obtain, we remain in unlocked state.
20437 \begin_layout Itemize
20439 The loaded file is in the 'normal' edit mode.
20440 No other user is allowed to edit the file.
20445 consists of commiting changes and releasing write-lock.
20446 If no changes have been made to the document, no commit will be produced
20450 \begin_layout Plain Layout
20451 Don't be puzzled by the fact that you will be asked for commit message anyway.
20456 and only the write-lock will be released.
20459 \begin_layout Standard
20463 \begin_layout Labeling
20464 \labelwidthstring 00.00.0000
20467 svn commit -q -m"<description>" "<file-name>"
20468 \begin_inset Newline newline
20471 svn unlock "<file-name>"
20474 \begin_layout Labeling
20475 \labelwidthstring 00.00.0000
20478 svn update "<file-name>"
20479 \begin_inset Newline newline
20482 svn lock "<file-name>"
20485 \begin_layout Subsubsection
20488 \begin_inset CommandInset label
20490 name "subsec:Automatical-Locking-Property"
20496 Automatic Locking Property
20499 \begin_layout Standard
20500 The above mentioned automatic setting of write permissions of the .lyx file
20506 ile\SpecialChar \menuseparator
20512 \begin_inset space ~
20515 Control\SpecialChar \menuseparator
20520 oggle locking property
20523 This command is active only when the file is not locked on the svn server
20525 you need to check-out before proceeding).
20528 \begin_layout Labeling
20529 \labelwidthstring 00.00.0000
20531 \begin_inset space ~
20537 \begin_layout Labeling
20538 \labelwidthstring 00.00.0000
20541 svn propset svn:needs-lock ON "<file-name>"
20544 \begin_layout Labeling
20545 \labelwidthstring 00.00.0000
20548 svn propdel svn:needs-lock "<file-name>"
20551 \begin_layout Subsubsection
20552 \begin_inset CommandInset label
20554 name "sub:VCS-Revision-Information"
20558 Revision Information in Documents
20561 \begin_layout Standard
20562 There are more possibilities how to activate revision information in our
20566 \begin_layout Itemize
20567 LyX supports directly:
20571 \begin_layout Itemize
20572 tree revision information (
20573 \begin_inset Flex Code
20576 \begin_layout Plain Layout
20583 The result is the output of the
20584 \begin_inset Flex Code
20587 \begin_layout Plain Layout
20593 command, the following table gives you an idea, how to read the results.
20596 \begin_layout Standard
20598 \begin_inset Tabular
20599 <lyxtabular version="3" rows="6" columns="2">
20600 <features tabularvalignment="middle">
20601 <column alignment="center" valignment="top" width="0">
20602 <column alignment="center" valignment="top" width="0">
20604 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20607 \begin_layout Plain Layout
20613 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20616 \begin_layout Plain Layout
20624 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20627 \begin_layout Plain Layout
20633 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20636 \begin_layout Plain Layout
20637 mixed revision working copy
20644 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20647 \begin_layout Plain Layout
20653 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20656 \begin_layout Plain Layout
20657 modified working copy
20664 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20667 \begin_layout Plain Layout
20673 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20676 \begin_layout Plain Layout
20677 switched working copy
20684 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20687 \begin_layout Plain Layout
20693 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20696 \begin_layout Plain Layout
20697 partial working copy, from a sparse checkout
20704 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20707 \begin_layout Plain Layout
20713 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20716 \begin_layout Plain Layout
20717 mixed revision, modified, switched working copy
20730 \begin_layout Itemize
20731 file revision information.
20732 The result comes from parsing the output of
20733 \begin_inset Flex Code
20736 \begin_layout Plain Layout
20738 \begin_inset space ~
20742 \begin_inset space ~
20746 \begin_inset space ~
20755 Supported flags are:
20759 \begin_layout Itemize
20760 version number of the last commit (
20761 \begin_inset Flex Code
20764 \begin_layout Plain Layout
20773 \begin_layout Itemize
20774 author of the last commit (
20775 \begin_inset Flex Code
20778 \begin_layout Plain Layout
20787 \begin_layout Itemize
20788 date of the last commit (
20789 \begin_inset Flex Code
20792 \begin_layout Plain Layout
20801 \begin_layout Itemize
20802 time of the last commit (
20803 \begin_inset Flex Code
20806 \begin_layout Plain Layout
20816 \begin_layout Standard
20817 You can obtain this info via InsetInfo (e.g.
20819 \begin_inset Flex Code
20822 \begin_layout Plain Layout
20823 info-insert buffer vcs-date
20829 The information will be available only when you have the file stored under
20830 svn managment (i.e.
20832 \begin_inset Flex Code
20835 \begin_layout Plain Layout
20841 directory is available with your document).
20845 \begin_layout Itemize
20846 Another---a hacking one---possibility is to use svn keywords
20850 \begin_layout Plain Layout
20851 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20857 In short -- you set file keywords property (e.g.
20860 svn propset svn:keywords 'Rev' file.lyx
20862 ) and then paste keyword TeX code
20866 \begin_layout Plain Layout
20867 This is an easy way how to ensure that LyX won't break the line in the middle
20873 tag in your document (e.g.
20878 \begin_layout Plain Layout
20886 This way svn client will automatically substitute revision number (e.g.
20891 \begin_layout Plain Layout
20898 ) after each update and commit.
20899 There are more problems with this approach.
20900 Firstly, the '$' character is used in TeX world for math equations, so
20901 any occurence of math formula
20902 \begin_inset Formula $Rev$
20906 \begin_inset Formula $Rev:59$
20909 in your LyX document.
20910 Similarly for other keywords like Id, Date, Author, etc.
20911 Secondly svn output is dependent on your locales, so its very easy that
20912 svn would produce some problematic strings once Date is used.
20913 Thirdly you get the whole 'Rev: 59' string in your document instead of
20915 Until subversion implements user's custom keywords it will be hard to use
20916 this approach reliably or let LyX to support it directly.
20919 \begin_layout Subsection
20920 SVN and Windows Environment
20923 \begin_layout Quote
20924 My inclination is to say that if the user cannot figure out the command
20925 line operations on their own fairly quickly, they would be well advised
20926 to use TortoiseSVN.
20932 \begin_layout Subsubsection
20936 \begin_layout Standard
20937 In addition to installing LyX, and having access to a Subversion repository,
20938 the user will need to install the Subversion client program.
20939 A Windows installer for the client program is available from
20940 \begin_inset CommandInset href
20943 target "http://www.collab.net/nonav/downloads/subversion/"
20948 The user may also want to install
20949 \begin_inset CommandInset href
20952 target "http://tortoisesvn.tigris.org/"
20956 , which integrates Subversion operations into the context (rightclick) menu
20957 of Windows Explorer.
20958 Operations done outside LyX will typically be more convenient using the
20959 Explorer context menu.
20960 Note that TortoiseSVN is not a replacement for the client program, which
20961 is what LyX itself will use.
20964 \begin_layout Subsubsection
20965 Bringing a document under Subversion control
20968 \begin_layout Standard
20969 Before a LyX document can be brought under version control in Subversion,
20970 its parent directory needs to be under version control.
20971 If the document is being added to a project already in the repository,
20972 this is accomplished by checking the project out to the directory where
20973 the new document will be placed.
20974 If the project itself is not yet under version control (for instance, if
20975 this document starts a new project), the directory must be imported into
20977 This is done outside LyX.
20978 Both import and checkout are easily accomplished from the Explorer context
20979 menu using TortoiseSVN, or alternatively can be done using the command
20980 line client at a DOS prompt.
20981 The procedure for importing the project using TortoiseSVN is described
20982 below, assuming an existing repository and a new project being started
20990 For information on using the Subversion client program, run
20997 \begin_layout Enumerate
21004 in Windows Explorer, right click it, and select
21006 TortoiseSVN > Repo-browser
21009 If necessary, adjust the URL for the repository, then click OK.
21012 \begin_layout Enumerate
21013 Right click the level of the repository under which you want to place the
21014 new project folder (typically the top level) and click
21016 Create folder\SpecialChar \ldots{}
21019 Supply a name for the project folder and click OK.
21020 Add a message for the log file if desired, then click OK again.
21021 The new project folder should appear in the repository.
21022 Finally, click OK again to exit the repository browser.
21025 \begin_layout Enumerate
21026 Once again right click
21032 , this time selecting SVN Checkout\SpecialChar \ldots{}
21033 Select the URL of the project folder
21034 you just created in the repository, and set the checkout directory to
21042 You will be warned about a non-empty folder; click OK to proceed.
21043 You should now have a
21054 \begin_layout Enumerate
21055 Create or open your document in LyX and click
21060 ile\SpecialChar \menuseparator
21066 \begin_inset space ~
21069 Control\SpecialChar \menuseparator
21077 Add a log message and click OK to commit the document to version control.
21080 \begin_layout Standard
21081 From this point onward, you should have full functionality in the
21086 ile\SpecialChar \menuseparator
21092 \begin_inset space ~
21098 You also have the option of checking the document in and out, viewing its
21100 using the TortoiseSVN context menu in Windows Explorer or the Subversion
21101 client program from a command prompt.
21104 \begin_layout Subsubsection
21105 SSH tunnel used with SVN under Windows
21108 \begin_layout Standard
21109 Compared with Linux setting up svn client to communicate over ssh under
21110 Windows is a rather troublesome task.
21111 We will at least offer some hints how to setup the client side but prior
21112 knowledge about ssh and the Windows command line is needed, also be prepared
21113 for a great deal of frustration\SpecialChar \ldots{}
21117 \begin_layout Enumerate
21118 Get a svn client for windows, as described in the previous sections.
21119 When it is a fresh install run some svn command (e.g.
21121 \begin_inset Flex Code
21124 \begin_layout Plain Layout
21130 ) to create config files, which you will need to change later on.
21133 \begin_layout Enumerate
21134 Choose a ssh client for Windows.
21135 There are several possibilities, we will use the one from Putty tools
21139 \begin_layout Plain Layout
21140 \begin_inset Flex URL
21143 \begin_layout Plain Layout
21145 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21156 You will need to set the connection up so that the client doesn't ask for
21157 any password from you.
21158 To keep things easy we will use only keys without any additional password
21163 \begin_layout Enumerate
21165 \begin_inset Flex Code
21168 \begin_layout Plain Layout
21175 Save your private .ppk key file and put the public one on the server side.
21176 If the SVN server runs on Linux, note that the format of the public key
21177 is not compatible with Linux openssh and you will need to direcly copy-paste
21180 Public key for pasting into OpenSSH authorized_keys file
21182 :” edit field into the server's
21183 \begin_inset Flex Code
21186 \begin_layout Plain Layout
21187 ~/.ssh/authorized_keys
21193 \begin_inset Flex Code
21196 \begin_layout Plain Layout
21205 \begin_layout Enumerate
21207 \begin_inset Flex Code
21210 \begin_layout Plain Layout
21217 In the SVN config file
21221 \begin_layout Plain Layout
21222 Exact path depends on Windows version, usually somewhere around
21223 \begin_inset Flex Code
21226 \begin_layout Plain Layout
21229 Documents and Settings
21243 \begin_inset Flex Code
21246 \begin_layout Plain Layout
21261 , section [tunnels], setup ssh command, e.g.
21263 \begin_inset Flex Code
21266 \begin_layout Plain Layout
21267 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21276 \begin_layout Plain Layout
21277 It will usually take a lot of time to get exact command right and it depends
21279 For example do not have some remote server saved as a default session in
21281 If things fail, try to connect via plink without SVN first.
21290 \begin_layout Enumerate
21291 Checkout the SVN archive, e.g.
21293 \begin_inset Flex Code
21296 \begin_layout Plain Layout
21297 svn co svn+ssh://user@server/repository_path
21305 \begin_layout Subsubsection
21306 End-of-Line Conversions
21309 \begin_layout Standard
21310 When the collsraborators are mixing Linux and Windows environments, LyX
21311 will use different line endings inside the .lyx files.
21312 This is not a problem as far as LyX functionality is concerned, but the
21313 commit diffs will be huge and merge-conflicts prone.
21314 Fortunately SVN itself knows
21318 \begin_layout Plain Layout
21319 \begin_inset Flex URL
21322 \begin_layout Plain Layout
21324 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21334 how to deal with CR/LF problems when switching .lyx files to the
21335 \begin_inset Flex Code
21338 \begin_layout Plain Layout
21348 \begin_layout Plain Layout
21350 \begin_inset Flex Code
21353 \begin_layout Plain Layout
21354 svn propset svn:eol-style native FILE_NAME
21367 \begin_layout Subsection
21371 \begin_layout Standard
21372 With the recent addition of the vc-command function LyX power users are
21373 allowed to create their own commands for revision control.
21376 \begin_layout Standard
21377 As an example you can see how two TortoiseSVN commands could be integrated
21381 \begin_layout Description
21383 \begin_inset Flex Code
21386 \begin_layout Plain Layout
21387 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21395 \begin_layout Description
21397 \begin_inset Flex Code
21400 \begin_layout Plain Layout
21401 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21409 \begin_layout Subsection
21410 Version control and Document comparison
21413 \begin_layout Standard
21414 One of the typical uses of version control is to inspect the changes between
21415 revisions, usually by creating
21416 \begin_inset Flex Code
21419 \begin_layout Plain Layout
21426 While this is useful for plain text files, it is much less useful in the
21427 case of LyX files, which have more complicated structure.
21428 Hence we provide binding to the Document comparison feature.
21429 They are two ways of calling this feature - either by direct call of
21430 \begin_inset Flex Code
21433 \begin_layout Plain Layout
21439 LyX function (for details see LyX functions manual) or by icon/menu item
21441 \begin_inset Flex MenuItem
21444 \begin_layout Plain Layout
21445 Compare with older revision...
21451 One can either compare two chosen revisions of the document or he can simply
21452 compare the current version of edited text with older revisions (where
21454 \begin_inset Flex MenuItem
21457 \begin_layout Plain Layout
21463 ' revisions back means comparison of the edited file with last commited
21468 \begin_layout Standard
21469 This feature is supported for SVN and RCS though due to the more complicated
21470 versioning scheme of RCS there is a constraint -- when addressing the revisions
21471 in dialog, numbers always point to the last number in RCS revision number,
21476 \begin_layout Section
21477 Literate Programming
21480 \begin_layout Standard
21485 (kayvan@sylvan.com)
21489 original documentation written by
21491 Edmar Wienskoski Jr.
21494 (edmar-w-jr@technologist.com)
21497 \begin_layout Subsection
21501 \begin_layout Standard
21502 The main purpose of this documentation is to show you how to use LyX for
21503 literate programming, where it is assumed that you are familiar with this
21504 programming technique, and know what
21505 \begin_inset Quotes eld
21509 \begin_inset Quotes erd
21513 \begin_inset Quotes eld
21517 \begin_inset Quotes erd
21521 If that is not the case, please follow the web links provided in the following
21523 There is a lot of good documentation out there covering old development
21524 history to the latest tools tips.
21527 \begin_layout Standard
21528 It is also assumed that you are familiar with LyX itself to a point that
21529 you are comfortable changing your LyX preferences, and X resources file.
21530 If that is not the case please refer to other LyX documentation to cover
21531 your specific needs.
21534 \begin_layout Subsection
21535 Literate Programming
21538 \begin_layout Standard
21539 From the Literate Programming FAQ:
21542 \begin_layout Quotation
21543 Literate programming is the combination of documentation and source together
21544 in a fashion suited for reading by human beings.
21545 In fact, literate programs should be enjoyable reading, even inviting!
21546 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21547 and documentation in a single file.
21548 Literate programming tools then parse the file to produce either readable
21549 documentation or compilable source.
21550 The WEB style of literate programming was created by D.
21551 \begin_inset space \thinspace{}
21555 Knuth during the development of his TeX typesetting software.
21559 \begin_layout Standard
21560 Another excerpt says:
21563 \begin_layout Quotation
21566 How is literate programming different from verbose commenting?
21569 \begin_layout Quotation
21570 There are three distinguishing characteristics.
21571 In order of importance, they are:
21575 \begin_layout Itemize
21576 flexible order of elaboration
21579 \begin_layout Itemize
21580 automatic support for browsing
21583 \begin_layout Itemize
21584 typeset documentation, especially diagrams and mathematics
21588 \begin_layout Standard
21589 Now that I sparked your curiosity, take a look in the references.
21592 \begin_layout Subsubsection
21596 \begin_layout Standard
21597 The complete Literate Programming FAQ can be found at:
21600 \begin_layout Quote
21601 Literate Programming FAQ
21602 \begin_inset Flex URL
21605 \begin_layout Plain Layout
21607 http://www.literateprogramming.com/lpfaq.pdf
21615 \begin_layout Standard
21616 The FAQ lists 23 (twenty three!) different literate programming tools.
21617 Where some are specialized or
21618 \begin_inset Quotes eld
21622 \begin_inset Quotes erd
21625 for particular programming languages, while other have general scope.
21630 for my own use for several reasons:
21633 \begin_layout Itemize
21634 It can generate the documentation either in LaTeX or HTML.
21637 \begin_layout Itemize
21638 It has a open architecture, i.
21639 \begin_inset space \thinspace{}
21643 \begin_inset space \space{}
21646 it is easy to plug in new filters and to perform special processing that
21651 \begin_layout Itemize
21652 There is a good selection of filters available already (the HTML is one
21656 \begin_layout Itemize
21660 \begin_layout Standard
21661 The Noweb web page can be found at:
21664 \begin_layout Quote
21666 \begin_inset Flex URL
21669 \begin_layout Plain Layout
21671 http://www.cs.virginia.edu/~nr/noweb/
21679 \begin_layout Standard
21680 Starting from there you can reach many other interesting links and even
21681 some literate program examples.
21684 \begin_layout Subsection
21685 LyX and Literate Programming
21688 \begin_layout Standard
21689 The LyX support for Literate Programming is provided by using the generic
21690 LyX converters mechanism.
21691 This support is provided in a
21692 \begin_inset Quotes eld
21696 \begin_inset Quotes erd
21700 \begin_inset space \thinspace{}
21704 \begin_inset space \space{}
21707 you will be able to use this new LyX feature with some other literate programmin
21708 g tool of your choice by just changing your LyX preferences.
21711 \begin_layout Subsubsection
21712 Generating documents and code (weaving and tangling)
21715 \begin_layout Paragraph
21716 Selecting the document class
21719 \begin_layout Standard
21720 If you have installed Noweb and LyX successfully, whenever you open a new
21721 document or try to change the document class of an existing one, you will
21722 find that there are three new document classes available:
21725 \begin_layout Itemize
21729 \begin_layout Itemize
21733 \begin_layout Itemize
21737 \begin_layout Standard
21738 You must select one of them to create your literate documents from.
21742 \begin_layout Standard
21743 Note that literate documents are not limited to these three classes.
21744 New classes can be generated from other styles like letter or in combination
21745 with other class variations like Article (AMS).
21746 If you have special needs that cannot be covered by one of the existing
21747 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21748 will arrange to insert a new entry, or teach you how to do it.
21752 \begin_layout Plain Layout
21753 It is very simple, it involves the creation of a file with four lines, and
21754 re-running of the auto configuration.
21759 Moreover, if you use a literate tool other than Noweb you may need to create
21760 a new set of document classes for it.
21763 \begin_layout Paragraph
21767 \begin_layout Standard
21768 LyX enables you to write code with a layout named
21776 \begin_layout Plain Layout
21777 The equivalent Noweb term is
21778 \begin_inset Quotes eld
21782 \begin_inset Quotes erd
21786 For historical reasons, I got used to the term
21787 \begin_inset Quotes eld
21791 \begin_inset Quotes erd
21794 introduced by other literate tool named Nuweb, which I used for many years
21795 before rendering myself to Noweb.
21800 Noweb delimits scraps like this:
21803 \begin_layout LyX-Code
21807 \begin_layout LyX-Code
21811 \begin_layout LyX-Code
21815 \begin_layout LyX-Code
21819 \begin_layout LyX-Code
21823 \begin_layout Standard
21824 The problem is that whatever is written in between the << and the
21828 must be taken literally, i.
21829 \begin_inset space \thinspace{}
21833 \begin_inset space \space{}
21836 LyX should be prevented from making any special interpretation of what has
21838 This is handled by a special layout named Scrap, that works like a normal
21839 paragraph but has a free spacing capability.
21842 \begin_layout Standard
21843 The down side of the Scrap paragraph layout is that consecutive paragraphs
21844 of code will be spaced with one empty line in the source code and also
21845 in the printed documentation.
21846 The work around is to enter each line of code within a single Scrap, with
21847 a newline (ctrl-return).
21848 The example above will look like this:
21852 \begin_layout Plain Layout
21853 If you have a printed version of this document you will not see any difference
21854 between the previous example and this one.
21862 \begin_layout LyX-Code
21864 \begin_inset Newline newline
21868 \begin_inset Newline newline
21872 \begin_inset Newline newline
21876 \begin_inset Newline newline
21882 \begin_layout Standard
21883 This layout works fine.
21884 The only real inconvenience is that you have to type ctrl-return instead
21889 \begin_layout Plain Layout
21890 It is in my list of
21891 \begin_inset Quotes eld
21895 \begin_inset Quotes erd
21906 \begin_layout Standard
21907 As a special note, you can also use the
21908 \begin_inset Quotes eld
21912 \begin_inset Quotes erd
21915 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21919 \begin_layout LyX-Code
21921 \begin_inset Newline newline
21924 def some_function(args):
21925 \begin_inset Newline newline
21928 "This is the doc string for this function."
21929 \begin_inset Newline newline
21932 print "My args: ", args
21935 \begin_layout LyX-Code
21936 @ %def some_function
21939 \begin_layout Standard
21940 For an example of this usage and the resulting cross-reference output, look
21941 at the Literate python program in
21943 LIBDIR/examples/listerrors.lyx
21945 which should make this all clear.
21948 \begin_layout Paragraph
21949 Generating the documentation
21952 \begin_layout Standard
21953 At this point you already have a new document file with a proper document
21954 class, and with some code and text on it.
21955 How do I print it? The answer is simple, you select
21957 View\SpecialChar \menuseparator
21961 Just like you would do for a plain document.
21962 No special procedure is required.
21965 \begin_layout Standard
21966 To help orientate you, I will now explain what happens inside LyX:
21969 \begin_layout Enumerate
21972 Update\SpecialChar \menuseparator
21975 menu option is chosen, a LaTeX file is generated.
21980 \begin_layout Standard
21981 If the document is of any literate class the generated file will be named
21982 with an extension name defined by the
21983 \begin_inset Quotes eld
21987 \begin_inset Quotes erd
21990 format (defined in the Preferences panel), otherwise the file will have
21999 \begin_layout Enumerate
22000 Note that the only difference so far is in the name of the file, no special
22001 processing is required by LyX.
22002 Given that you formatted the code using the Scrap layout that, by itself,
22003 takes care of the business.
22006 \begin_layout Enumerate
22007 If the document is of any literate class LyX will then use the internal
22008 LyX to Noweb converter, followed by the Noweb to LaTeX converter
22012 \begin_layout Plain Layout
22013 The converters are defined in the
22015 Tools\SpecialChar \menuseparator
22019 \begin_inset Quotes eld
22023 \begin_inset Quotes erd
22035 manual for general information about converters.
22040 to generate the LaTeX file.
22044 \begin_layout Standard
22045 Otherwise it will just skip this step.
22049 \begin_layout Enumerate
22050 Finally, LaTeX is invoked and the regular post processing continues as in
22054 \begin_layout Standard
22055 Independence from a particular
22056 \begin_inset Quotes eld
22060 \begin_inset Quotes erd
22063 is easily achieved by changing the commands that are run by the various
22067 \begin_layout Paragraph
22068 Generating the code
22071 \begin_layout Standard
22072 When the build menu option is chosen or the corresponding button in the
22073 toolbar is pressed, a LaTeX file is generated just like step 1 above.
22074 Next, LyX invokes the
22079 This converter needs to be defined by the user and is not installed by
22080 default, though the Program format is.
22081 This converter (like any other converter) will have two parts:
22084 \begin_layout Enumerate
22085 The converter program itself.
22086 This program performs the conversion from the one format to the other (in
22087 this case, from the Noweb format to the Program pseudo-format).
22090 \begin_layout Enumerate
22091 The error log parser.
22092 This is a program whose sole purpose is to rewrite error messages in a
22093 format that LyX understands.
22094 This makes it possible for LyX to place error boxes in the right places
22095 in the file buffer.
22098 \begin_layout Standard
22099 The first part, the
22100 \begin_inset Quotes eld
22104 \begin_inset Quotes erd
22107 setting, should be set to
22108 \begin_inset Quotes eld
22116 \begin_inset Quotes erd
22120 This basically means that LyX will call
22121 \begin_inset Quotes eld
22125 \begin_inset Quotes erd
22128 (a program or script) with the name of the Noweb file (normally a file
22129 in the LyX temp directory).
22133 \begin_layout Standard
22134 This is an implementation of
22135 \begin_inset Quotes eld
22139 \begin_inset Quotes erd
22142 that you can place in a directory on your path:
22145 \begin_layout LyX-Code
22149 \begin_layout LyX-Code
22153 \begin_layout LyX-Code
22154 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
22157 \begin_layout Standard
22158 The next part of the converter setting is the
22159 \begin_inset Quotes eld
22163 \begin_inset Quotes erd
22166 which is to be set to
22167 \begin_inset Quotes eld
22172 parselog=listerrors
22175 \begin_inset Quotes erd
22179 This will run any errors that are generated by the
22180 \begin_inset Quotes eld
22184 \begin_inset Quotes erd
22187 process through the
22188 \begin_inset Quotes eld
22192 \begin_inset Quotes erd
22198 \begin_layout Standard
22199 The converter code looks in
22207 then on the path for the
22208 \begin_inset Quotes eld
22212 \begin_inset Quotes erd
22218 \begin_layout Standard
22219 The build will normally take place in LyX's temporary directory, so the
22220 files produced by the conversion will be in that directory.
22221 LyX will copy out what it regards as the `main' file, but the
22225 conversion may produce several files, and so most of these would then be
22226 deleted when LyX was closed.
22227 The present solution is to use a `copier',
22231 \begin_layout Plain Layout
22240 manual for information on these.
22249 script in its default mode, so that the entire contents of the temporary
22250 directory is copied.
22251 More will get copied than is needed, to be sure, but nothing will be lost.
22252 If, however, you know what extensions the generated files will have, this
22253 can be improved by using the
22262 This option takes a comma-separated list of extensions to copy.
22263 So, for example, if the conversion will generate only files with the extensions
22272 , then the correct definition would be:
22275 \begin_layout LyX-Code
22276 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
22279 \begin_layout Standard
22280 The result will be that only files with these two extensions will be copied
22284 \begin_layout Paragraph
22285 Build instructions in the document
22288 \begin_layout Standard
22289 The last piece of the integration between LyX and noweb is the
22290 \begin_inset Quotes eld
22294 \begin_inset Quotes erd
22298 Generally, the instructions for building your program should be embedded
22299 in a scrap of its own.
22301 \begin_inset Quotes eld
22305 \begin_inset Quotes erd
22308 above uses the notangle command to look for this scrap (called
22309 \begin_inset Quotes eld
22313 \begin_inset Quotes erd
22316 ) and runs its contents through
22317 \begin_inset Quotes eld
22321 \begin_inset Quotes erd
22327 \begin_layout Standard
22328 Typically, such a scrap would look something like this:
22331 \begin_layout LyX-Code
22333 \begin_inset Newline newline
22337 \begin_inset Newline newline
22341 \begin_inset Newline newline
22344 if [ -z "${NOWEB_SOURCE}" ]
22345 \begin_inset Newline newline
22349 \begin_inset Newline newline
22352 NOWEB_SOURCE=myfile.nw
22353 \begin_inset Newline newline
22357 \begin_inset Newline newline
22361 code to extract files ...]
22362 \begin_inset Newline newline
22366 code to compile files ...]
22367 \begin_inset Newline newline
22373 \begin_layout Standard
22376 LIBDIR/examples/listerrors.lyx
22380 LIBDIR/examples/Literate.lyx
22382 which implement two versions of the
22383 \begin_inset Quotes eld
22387 \begin_inset Quotes erd
22390 program for some illustrations of how all of these pieces go together or
22393 LIBDIR/examples/noweb2lyx.lyx.
22396 Interestingly, these three files show off the language-indepence of the
22397 LyX literate programming support since they are written in Python, C and
22401 \begin_layout Subsubsection
22405 \begin_layout Standard
22406 All the Literate Programming support is configured by the
22408 Tools\SpecialChar \menuseparator
22412 \begin_inset Quotes eld
22416 \begin_inset Quotes erd
22420 The important parts are:
22423 \begin_layout Description
22425 \begin_inset space ~
22429 \begin_inset Quotes eld
22433 \begin_inset Quotes erd
22437 \begin_inset space ~
22440 format Set up via the Formats tab, this is where the Noweb-specific pieces
22450 , the file extension is set to
22455 This tells LyX to create a file with a
22459 extension in the first step of the conversion process.
22462 \begin_layout Description
22464 \begin_inset space ~
22472 \begin_inset space ~
22475 format This is an empty format whose sole purpose is to be the endpoint
22476 of a conversion (which then allows us to set up a converter for it).
22479 \begin_layout Description
22488 This converter performs the
22489 \begin_inset Quotes eld
22493 \begin_inset Quotes erd
22496 of the literate document.
22497 For Noweb, it is set to
22498 \begin_inset Quotes eld
22503 noweave -delay -index $$i > $$o
22506 \begin_inset Quotes erd
22512 \begin_layout Description
22522 \begin_inset Quotes eld
22526 \begin_inset Quotes erd
22530 As stated above, the Converter is set to
22531 \begin_inset Quotes eld
22539 \begin_inset Quotes erd
22542 , with Flags set to
22543 \begin_inset Quotes eld
22548 originaldir,parselog=listerrors
22551 \begin_inset Quotes erd
22557 \begin_layout Subsubsection
22561 \begin_layout Standard
22562 There is also a new function implemented in the LyX server, the
22563 \begin_inset Quotes eld
22566 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22570 \begin_layout Standard
22571 When debugging code with ddd/gdb, it is possible to invoke a text editor
22572 at the current execution position with a single key stroke.
22573 The default ddd configuration for that is shift-ctrl-V.
22574 It happens that you can define the editor command line invocation in ddd
22577 Edit\SpecialChar \menuseparator
22578 Preferences\SpecialChar \menuseparator
22581 dialog and changing the "Edit Sources" entry.
22584 \begin_layout Standard
22585 I take advantage of the new created LyX server function and this ddd feature,
22587 \begin_inset Quotes eld
22591 \begin_inset Quotes erd
22597 \begin_layout LyX-Code
22598 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22601 \begin_layout Standard
22602 With this, whenever you are using ddd and find a point in the program that
22603 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22604 ddd you forward this information to LyX through the LyX server and then
22605 the LyX window will show the same file with the cursor at the same position
22606 ddd was pointing to.
22607 No more guessing or long scrolling to locate a point in the program back
22611 \begin_layout Standard
22612 Note however that you must enable the LyX server to get this feature working
22613 (it is disabled by default).
22614 You can enable it in
22626 ) by entering in the
22631 \begin_inset Quotes eld
22636 /home/<your-home-directory>/.lyx/lyxpipe
22639 \begin_inset Quotes erd
22645 \begin_layout Standard
22646 Read the LyX server documentation in the
22648 Customization Manual
22650 for further information.
22653 \begin_layout Subsubsection
22657 \begin_layout Standard
22658 There are six new buttons that can be added to your LyX toolbar.
22659 Five of these buttons are short cuts to layout styles:
22680 The last one is a short cut to the
22681 \begin_inset Quotes eld
22685 \begin_inset Quotes erd
22692 \begin_layout Standard
22693 LyX has a range of buttons that are available for tool bar customization.
22694 In my toolbar I like to combine the six short cuts above with two more:
22699 \SpecialChar \menuseparator
22704 \SpecialChar \menuseparator
22711 View\SpecialChar \menuseparator
22715 Here is how it looks like:
22718 \begin_layout LyX-Code
22722 \begin_layout LyX-Code
22726 \begin_layout LyX-Code
22727 Icon "layout Standard"
22730 \begin_layout LyX-Code
22731 Icon "layout Section"
22734 \begin_layout LyX-Code
22735 Icon "layout LaTeX"
22738 \begin_layout LyX-Code
22739 Icon "layout LyX-Code"
22742 \begin_layout LyX-Code
22743 Icon "layout Scrap"
22746 \begin_layout LyX-Code
22750 \begin_layout LyX-Code
22754 \begin_layout LyX-Code
22755 Icon "buffer-typeset"
22758 \begin_layout LyX-Code
22759 Icon "build-program"
22762 \begin_layout LyX-Code
22766 \begin_layout LyX-Code
22770 \begin_layout LyX-Code
22774 \begin_layout LyX-Code
22778 \begin_layout LyX-Code
22782 \begin_layout Subsubsection
22783 Colors customization
22786 \begin_layout Standard
22787 There are a number of colors in LyX that can be customized in
22792 One of the things that bothers people is the LaTeX font color.
22793 The default color is red, since the scraps uses LaTeX font, and there is
22794 a lot of scraps in literate documents, you may get tired of seeing everything
22796 You can change it by going to the tabs
22805 \begin_layout Standard
22806 The next thing is the visible presence of the newline character in the screen.
22807 You can choose the color of this particular character and make it blend
22809 I recommend you choosing a color that is close to the background but not
22810 equal, that way you still can see it is there, but it is not bothering
22815 \begin_layout Chapter
22816 Secrets of the LaTeX Masters
22817 \begin_inset CommandInset label
22826 \begin_layout Standard
22827 Though LyX is a powerful tool, it cannot hope to support everything that
22828 can be done with pure TeX/LaTeX.
22829 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22830 as long as you are not afraid to use that
22831 \begin_inset Quotes eld
22835 \begin_inset Quotes erd
22838 button on the toolbar or add things to the LaTeX preamble.
22839 This section lists some tips, tricks, and otherwise cool ideas to give
22840 your document that extra little flair.
22843 Do try this at home
22845 , just start with something a little smaller and less important than your
22849 \begin_layout Standard
22850 Most ideas in this section require less common files in your LaTeX installation.
22851 If you have a system like TeXLive, most will already be available.
22852 A few, however, will need to be downloaded from one of the CTAN archives.
22853 Often, there are several ways to do something, or several LaTeX style files
22854 which do the same thing.
22855 We do not endorse one choice over another, we simply claim that we have
22856 done a particular task with a particular file.
22857 Put on your wizard hat, keep an eye out for dragons, and let us begin.
22860 \begin_layout Section
22864 \begin_layout Standard
22867 Lars Gullik Bjønnes
22870 \begin_layout Subsection
22874 \begin_layout Standard
22875 The aim for this chapter
22879 \begin_layout Plain Layout
22880 Editor's note: Lars' original chapter was a masterful description of how
22886 However, it was too long to flow smoothly in this document.
22887 I have therefore chosen to excerpt the most important sections here (sorry,
22888 Lars); you can read the original chapter (and more of the story!) in the
22891 examples/multicol.lyx
22899 is to show how the LaTeX package
22903 can be used in a LyX document.
22904 As LyX doesn't support the
22908 package natively yet, we have to use some small hacks.
22909 By reading this section it should be obvious how to do this.
22912 \begin_layout Subsection
22916 \begin_layout Standard
22921 package allows switching between one and multicolumn format on the same
22923 Footnotes are handled correctly (for the most part), but will be placed
22924 at the bottom of the page and not under each column.
22925 LaTeX's float mechanism, however, is partly disabled in the current implementat
22927 At the moment only page-wide floats can be used within the scope of the
22931 \begin_layout Subsection
22935 \begin_layout Subsubsection
22939 \begin_layout Standard
22940 If you want to have two columns in your text, you have use LaTeX mode to
22945 begin{multicols}{2}
22947 at the point where you want the two column layout to start, and then
22953 where you want it to end.
22957 \begin_layout Standard
22961 \begin_layout Plain Layout
22965 begin{multicols}{2}
22973 \begin_layout Standard
22978 The Adventure of the Empty House
22981 \begin_inset Newline newline
22986 Sir Arthur Conan Doyle
22989 \begin_layout Standard
22992 It was in the spring of the year 1894 that all London was interested, and
22993 the fashionable world dismayed, by the murder of the Honourable Ronald
22994 Adair under most unusual and inexplicable circumstances.
22995 The public has already learned those particulars of the crime which came
22996 out in the police investigation, but a good deal was suppressed upon that
22997 occasion, since the case for the prosecution was so overwhelmingly strong
22998 that it was not necessary to bring forward all the facts.
22999 Only now, at the end of nearly ten years, am I allowed to supply those
23000 missing links which make up the whole of that remarkable chain.
23001 The crime was of interest in itself, but that interest was as nothing to
23002 me compared to the inconceivable sequel, which afforded me the greatest
23003 shock and surprise of any event in my adventurous life.
23004 Even now, after this long interval, I find myself thrilling as I think
23005 of it, and feeling once more that sudden flood of joy, amazement, and increduli
23006 ty which utterly submerged my mind.
23007 Let me say to that public, which has shown some interest in those glimpses
23008 which I have occasionally given them of the thoughts and actions of a very
23009 remarkable man, that they are not to blame me if I have not shared my knowledge
23010 with them, for I should have considered it my first duty to do so, had
23011 I not been barred by a positive prohibition from his own lips, which was
23012 only withdrawn upon the third of last month.
23015 \begin_layout Standard
23019 \begin_layout Plain Layout
23031 \begin_layout Subsubsection
23035 \begin_layout Standard
23036 The same pattern is used when you want more than two columns:
23039 \begin_layout Standard
23043 \begin_layout Plain Layout
23047 begin{multicols}{3}
23055 \begin_layout Standard
23058 It can be imagined that my close intimacy with Sherlock Holmes had interested
23059 me deeply in crime, and that after his disappearance I never failed to
23060 read with care the various problems which came before the public.
23061 And I even attempted, more than once, for my own private satisfaction,
23062 to employ his methods in their solution, though with indifferent success.
23063 There was none, however, which appealed to me like this tragedy of Ronald
23065 As I read the evidence at the inquest, which led up to a verdict of willful
23066 murder against some person or persons unknown, I realized more clearly
23067 than I had ever done the loss which the community had sustained by the
23068 death of Sherlock Holmes.
23069 There were points about this strange business which would, I was sure,
23070 have specially appealed to him, and the efforts of the police would have
23071 been supplemented, or more probably anticipated, by the trained observation
23072 and the alert mind of the first criminal agent in Europe.
23073 All day, as I drove upon my round, I turned over the case in my mind and
23074 found no explanation which appeared to me to be adequate.
23075 At the risk of telling a twice-told tale, I will recapitulate the facts
23076 as they were known to the public at the conclusion of the inquest.
23079 \begin_layout Standard
23083 \begin_layout Plain Layout
23095 \begin_layout Standard
23096 You can have more than 3 columns if you want to, but that might not be very
23097 pleasant for the eye.
23100 \begin_layout Subsubsection
23101 Columns inside columns
23104 \begin_layout Standard
23105 You can even have columns inside columns:
23108 \begin_layout Standard
23112 \begin_layout Plain Layout
23116 begin{multicols}{2}
23124 \begin_layout Standard
23127 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
23128 at that time governor of one of the Australian colonies.
23129 Adair's mother had returned from Australia to undergo the operation for
23130 cataract, and she, her son Ronald, and her daughter Hilda were living together
23134 \begin_layout Standard
23138 \begin_layout Plain Layout
23142 begin{multicols}{2}
23150 \begin_layout Standard
23153 The youth moved in the best society–had, so far as was known, no enemies
23154 and no particular vices.
23155 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
23156 had been broken off by mutual consent some months before, and there was
23157 no sign that it had left any very profound feeling behind it.
23158 For the rest {sic} the man's life moved in a narrow and conventional circle,
23159 for his habits were quiet and his nature unemotional.
23160 Yet it was upon this easy-going young aristocrat that death came, in most
23161 strange and unexpected form, between the hours of ten and eleven-twenty
23162 on the night of March 30, 1894.
23165 \begin_layout Standard
23169 \begin_layout Plain Layout
23181 \begin_layout Standard
23184 Ronald Adair was fond of cards–playing continually, but never for such stakes
23186 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
23187 It was shown that, after dinner on the day of his death, he had played
23188 a rubber of whist at the latter club.
23189 He had also played there in the afternoon.
23194 The evidence of those who had played with him– Mr.
23195 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
23196 and that there was a fairly equal fall of the cards.
23197 Adair might have lost five pounds, but not more.
23198 His fortune was a considerable one, and such a loss could not in any way
23200 He had played nearly every day at one club or other, but he was a cautious
23201 player, and usually rose a winner.
23202 It came out in evidence that, in partnership with Colonel Moran, he had
23203 actually won as much as four hundred and twenty pounds in a sitting, some
23204 weeks before, from Godfrey Milner and Lord Balmoral.
23205 So much for his recent history as it came out at the inquest.
23208 \begin_layout Standard
23212 \begin_layout Plain Layout
23224 \begin_layout Standard
23225 Please do read the file
23227 examples/multicol.lyx
23229 for more advanced examples including column and header spacing, vertical
23230 separator lines, and more.
23233 \begin_layout Section
23238 Paragraph Environment
23239 \begin_inset Argument
23242 \begin_layout Plain Layout
23243 Numbering in Enumerate
23251 \begin_layout Standard
23257 \begin_layout Standard
23258 \begin_inset VSpace bigskip
23264 \begin_layout Standard
23266 The default numbering for the
23270 paragraph environment begins with Arabic numbers and ends with uppercase
23272 Suppose, however, you wanted a different type of numbering scheme.
23273 Here's a quickie example of how to change the numbering scheme:
23276 \begin_layout LyX-Code
23286 \begin_layout LyX-Code
23296 \begin_layout LyX-Code
23306 \begin_layout LyX-Code
23316 \begin_layout Standard
23317 \SpecialChar \ldots{}
23318 which changes the numbering scheme to uppercase Roman numerals, uppercase
23319 letters, Arabic numbers, and lowercase letter.
23322 \begin_layout Standard
23323 Additionally, the previous example also adds a little bit extra to the numbering
23325 For example, the first level label actually looks like:
23326 \begin_inset Quotes eld
23330 \begin_inset Quotes erd
23334 For ease of reading, we'll describe what the numbering schemes look like
23335 using a notation something like this: <
23336 \begin_inset Quotes eld
23340 \begin_inset Quotes erd
23344 \begin_inset space ~
23348 \begin_inset Quotes erd
23352 \begin_inset Quotes erd
23356 \begin_inset space ~
23360 \begin_inset Quotes erd
23364 \begin_inset Quotes erd
23368 \begin_inset space ~
23372 \begin_inset Quotes eld
23376 \begin_inset Quotes erd
23383 \begin_layout Standard
23384 As you can see in the example, there is a label command for each nesting
23391 \SpecialChar \ldots{}
23398 , as well as a counter,
23402 \SpecialChar \ldots{}
23408 There are also five
23409 \begin_inset Quotes eld
23413 \begin_inset Quotes erd
23446 , each of which take one counter as an argument.
23447 You can add characters before or after these, but there's no need to add
23451 \begin_layout Standard
23452 You can get really fancy with these.
23456 \begin_layout LyX-Code
23470 \begin_layout LyX-Code
23482 \begin_layout LyX-Code
23492 \begin_layout LyX-Code
23502 \begin_layout Standard
23503 produces the somewhat out of hand numbering scheme: <
23504 \begin_inset Quotes eld
23508 \begin_inset Quotes erd
23512 \begin_inset space ~
23516 \begin_inset Quotes erd
23520 \begin_inset Quotes erd
23524 \begin_inset space ~
23528 \begin_inset Quotes erd
23532 \begin_inset Quotes erd
23536 \begin_inset space ~
23540 \begin_inset Quotes eld
23544 \begin_inset Quotes erd
23551 \begin_layout Section
23555 \begin_layout Standard
23561 \begin_layout Standard
23562 \begin_inset VSpace bigskip
23568 \begin_layout Standard
23573 \begin_layout Plain Layout
23579 tmpfont}{cmr17 scaled 2500}{
23591 \begin_layout Standard
23596 \begin_layout Plain Layout
23607 hose of you who like the style of old books probably also like
23608 \begin_inset Quotes eld
23612 \begin_inset Quotes erd
23615 —those large capital letters which begin each new chapter or section.
23616 Implementing them with plain LyX/LaTeX is straightforward (assuming you
23617 know some plain TeX!) but does require a lot of work and many iterations,
23618 as you can see by all the ugly TeX-mode stuff at the beginning of this
23622 \begin_layout Standard
23626 \begin_layout Plain Layout
23632 bigdrop{-1em}{3}{ptmri}{T}+
23637 here is a much easier way of doing this, of course.
23646 ) package from CTAN allows a simple way to add such letters to your documents.
23647 Since this package is not a standard part of TeXLive, I can't demonstrate
23648 it within this document, but if you copy this paragraph to a new document,
23650 \begin_inset Quotes eld
23660 \begin_inset Quotes erd
23663 and the pluses from the TeX code at the beginning of the paragraph, and
23668 usepackage{dropcaps}
23670 to your LaTeX preamble, you will get a nice Times Roman Italic
23671 \begin_inset Quotes eld
23675 \begin_inset Quotes erd
23678 , whose height is three lines of text and which protrudes 1 em into the
23680 (Make certain you have copied
23681 \begin_inset Quotes eld
23689 \begin_inset Quotes erd
23692 into a directory where TeX can see it.) The first argument is the amount
23693 of indentation; in this case the negative sign moves it into the margin.
23694 The second argument is the height of the letter in number of lines of text.
23695 The third argument is the font name: virtually anything which has a tfm
23696 file should work (wade through the
23698 .../texmf/fonts/tfm
23700 directory for possibilities).
23701 My personal favorite is
23702 \begin_inset Quotes eld
23710 \begin_inset Quotes erd
23713 , a fancy German font specifically designed for dropped capitals.
23714 The fourth argument is the letter (or letters) to be dropped.
23719 package also offers the
23725 command, as well as a slightly simplified
23734 \begin_layout Section
23735 Non-standard Paragraph Shapes
23738 \begin_layout Standard
23744 \begin_layout Standard
23745 \begin_inset VSpace bigskip
23751 \begin_layout Standard
23755 \begin_layout Plain Layout
23767 \begin_layout Standard
23771 \begin_layout Plain Layout
23780 \begin_layout Plain Layout
23794 \begin_layout Standard
23799 \begin_layout Plain Layout
23810 \begin_layout Plain Layout
23819 \begin_layout Plain Layout
23828 \begin_layout Plain Layout
23837 \begin_layout Plain Layout
23846 \begin_layout Plain Layout
23855 \begin_layout Plain Layout
23864 \begin_layout Plain Layout
23873 \begin_layout Plain Layout
23882 \begin_layout Plain Layout
23891 \begin_layout Plain Layout
23900 \begin_layout Plain Layout
23909 \begin_layout Plain Layout
23918 \begin_layout Plain Layout
23927 \begin_layout Plain Layout
23936 \begin_layout Plain Layout
23945 \begin_layout Plain Layout
23954 \begin_layout Plain Layout
23963 \begin_layout Plain Layout
23972 \begin_layout Plain Layout
23978 There are times when the tyranny of rectangular paragraphs must be overthrown.
23979 In such situations, a call to the delightful plain TeX command
23986 As you can see, completely arbitrary shapes can be laid out with a suitable
23987 set of linelength definitions.
23988 While this parshape may look a bit silly and useless, one could conceive
23989 of situations such as finely tuned dropped capitals, word wrapping around
23990 non-rectangular graphics, etc.
23991 which will benefit from such handcrafting.
23994 \begin_layout Standard
23995 \begin_inset VSpace bigskip
24001 \begin_layout Standard
24006 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
24013 is the number of lines of text which define the paragraph.
24014 If there turn out to be fewer lines, the shape is truncated; if there are
24015 more, the excess lines have the same dimensions as the last line of the
24025 entries specify the indentation of the line from the left margin, and the
24026 length of the line as measured from that point.
24027 The shape applies only to the current paragraph; everything is reset to
24028 normal for the next paragraph.
24031 \begin_layout Standard
24035 \begin_layout Plain Layout
24047 \begin_layout Section
24051 \begin_layout Standard
24052 As you can see, the examples in this section range from the useful to the
24054 While I don't expect that anyone will ever need the paragraph shape demonstrate
24055 d in the last section, the important point is that you can do almost anything
24056 you want in LyX if you are willing to figure out how to do it in TeX and
24058 TeX is a fantastically powerful typesetting system and all that power is
24059 available to you since LyX uses it as its backend.