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
3106 \begin_layout Section
3108 \change_inserted 1414654397 1302963669
3112 \begin_layout Standard
3114 \change_inserted 1414654397 1302963893
3115 Users sometimes need to be able to
3116 \begin_inset Quotes eld
3120 \begin_inset Quotes erd
3123 a LyX file together with all the images (and other files) on which it depends,
3124 either for sending to a publisher or for sharing with a co-author.
3125 LyX 2.0 includes a Python script (written by Enrico Forestieri) that automates
3127 To use it, you must have either
3128 \begin_inset Flex Code
3131 \begin_layout Plain Layout
3133 \change_inserted 1414654397 1302963710
3142 \begin_inset Flex Code
3145 \begin_layout Plain Layout
3147 \change_inserted 1414654397 1302963714
3155 installed on your system.
3156 At present, the script prefers
3157 \begin_inset Flex Code
3160 \begin_layout Plain Layout
3162 \change_inserted 1414654397 1302963720
3170 and, if it is available, then it will compress the archive using
3171 \begin_inset Flex Code
3174 \begin_layout Plain Layout
3176 \change_inserted 1414654397 1302963726
3185 \begin_inset Flex Code
3188 \begin_layout Plain Layout
3190 \change_inserted 1414654397 1302963730
3200 \begin_inset Flex Code
3203 \begin_layout Plain Layout
3205 \change_inserted 1414654397 1302963866
3213 is available, then it will use that.)
3216 \begin_layout Standard
3218 \change_inserted 1414654397 1302963889
3219 If the appropriate programs are available, then LyX's configuration process
3220 will set the script up to export a `LyX Archive', and this format will
3221 then be available under
3222 \begin_inset Flex Code
3225 \begin_layout Plain Layout
3227 \change_inserted 1414654397 1302963776
3228 File\SpecialChar \menuseparator
3239 \begin_layout Section
3240 Fancy Headers and Footers
3243 \begin_layout Standard
3244 The default page layout is rather plain; for an
3245 \begin_inset Flex Code
3248 \begin_layout Plain Layout
3254 document class, all you get is a centered page number at the bottom of
3256 This document uses KOMA-script's book class, so it appears to be a bit
3258 But to really put on a show, you need to set the document page style to
3260 \begin_inset Quotes eld
3264 \begin_inset Quotes erd
3267 , as mentioned in the
3272 This section describes the LaTeX code you need to insert in your LaTeX
3273 preamble in order to get the desired effects.
3276 \begin_layout Standard
3277 For more information on fancy headers, see the
3278 \begin_inset Flex Code
3281 \begin_layout Plain Layout
3287 package documentation.
3289 \begin_inset Flex URL
3292 \begin_layout Plain Layout
3294 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3302 \begin_layout Standard
3303 The page header is divided into three fields, not surprisingly labeled
3304 \begin_inset Quotes eld
3308 \begin_inset Quotes erd
3312 \begin_inset Quotes eld
3316 \begin_inset Quotes erd
3320 \begin_inset Quotes eld
3324 \begin_inset Quotes erd
3328 The footer is also divided into these three fields.
3329 The LaTeX commands to set these fields in the simplest manner are
3330 \begin_inset Flex Code
3333 \begin_layout Plain Layout
3342 \begin_inset Flex Code
3345 \begin_layout Plain Layout
3354 \begin_inset Flex Code
3357 \begin_layout Plain Layout
3366 \begin_inset Flex Code
3369 \begin_layout Plain Layout
3378 Suppose you wish to put your name in the upper left hand corner of each
3380 Simply insert the following command in the preamble:
3383 \begin_layout Standard
3392 \begin_layout Standard
3393 You will now see your name in the upper left.
3394 If a field has a default entry that you would like to get rid of (often
3395 the page number appears in the central footer, simply include a command
3396 with a blank argument, e.
3397 \begin_inset space \thinspace{}
3403 \begin_layout Standard
3411 \begin_layout Standard
3412 Let's get really fancy: lets put the section number with the word
3413 \begin_inset Quotes eld
3417 \begin_inset Quotes erd
3421 \begin_inset space \thinspace{}
3425 \begin_inset space \space{}
3428 Section 3) in the upper left, the page number (e.
3429 \begin_inset space \thinspace{}
3433 \begin_inset space \space{}
3436 Page 4) in the upper right, your name in the lower left, and the date in
3438 The following commands should now appear in the preamble:
3441 \begin_layout Standard
3451 \begin_layout Standard
3459 \begin_layout Standard
3469 \begin_layout Standard
3478 \begin_layout Standard
3486 \begin_layout Standard
3496 \begin_layout Standard
3498 \begin_inset Flex Code
3501 \begin_layout Plain Layout
3510 \begin_inset Flex Code
3513 \begin_layout Plain Layout
3521 access LaTeX's section and page counters, and so print out the current
3522 section and page numbers.
3524 \begin_inset Flex Code
3527 \begin_layout Plain Layout
3535 simply prints out today's date.
3538 \begin_layout Standard
3539 The thicknesses of the horizontal rules drawn beneath the header and above
3540 the footer can also be modified.
3541 If you don't want one of the rules, set its thickness to 0.
3542 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3548 \begin_inset Flex Code
3551 \begin_layout Plain Layout
3556 headrulewidth}{0.4pt}
3562 \begin_inset Flex Code
3565 \begin_layout Plain Layout
3570 footrulewidth}{0.4pt}
3575 to set the thicknesses.
3578 \begin_layout Standard
3579 You can switch the header/footer settings on and off for individual pages
3581 \begin_inset Flex Code
3584 \begin_layout Plain Layout
3587 thispagestyle{empty}
3593 \begin_inset Flex Code
3596 \begin_layout Plain Layout
3599 thispagestyle{plain}
3605 \begin_inset Flex Code
3608 \begin_layout Plain Layout
3611 thispagestyle{fancy}
3617 Simply insert them in the text on the page you want changed and mark them
3619 In fact, title pages are marked as plain by default, while following pages
3620 are marked fancy when using the global fancy setting.
3623 \begin_layout Standard
3624 As a final example, it is possible to include an image in the header or
3626 Suppose you want to put a company logo in the upper lefthand corner.
3627 You might try something like
3630 \begin_layout Standard
3639 includegraphics{logo.eps}}}
3642 \begin_layout Standard
3644 (you may need to preface this with
3645 \begin_inset Flex Code
3648 \begin_layout Plain Layout
3652 usepackage{graphics}
3657 if you don't include graphics elsewhere in your document).
3660 \begin_layout Section
3661 Itemize Bullet Selection
3662 \begin_inset CommandInset label
3671 \begin_layout Standard
3677 \begin_layout Subsection
3681 \begin_layout Standard
3682 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3683 Using this dialog you can easily specify what bullet shape to use at each
3684 level of an itemized list.
3685 These settings are document-wide so you won't be able to specify different
3686 sets of bullets for different paragraphs.
3690 \begin_layout Plain Layout
3691 Well, actually you can but you'll have to do it by hand.
3699 \begin_layout Subsection
3703 \begin_layout Standard
3704 Open the dialog by selecting the
3705 \begin_inset Flex MenuItem
3708 \begin_layout Plain Layout
3709 Document\SpecialChar \menuseparator
3715 menu item and then select the
3716 \begin_inset Flex MenuItem
3719 \begin_layout Plain Layout
3728 \begin_layout Standard
3729 The dialog provides you with a table of bullet shapes.
3730 A column of buttons on the left of the table provides access to the six
3731 different panels of bullet shapes.
3732 The row of buttons across the top is used to select which bullet depth
3734 A text entry under the table shows the currently selected bullet shape's
3735 LaTeX equivalent and this can be edited if desired.
3736 If you do modify the text you will also need to specify any needed packages
3737 in the LaTeX preamble.
3740 \begin_layout Standard
3741 The six panels are divided up by the packages they require.
3742 The following table shows the mappings from button name to LaTeX packages.
3745 \begin_layout Standard
3747 \begin_inset Tabular
3748 <lyxtabular version="3" rows="7" columns="2">
3749 <features tabularvalignment="middle">
3750 <column alignment="center" valignment="top" width="0pt">
3751 <column alignment="center" valignment="top" width="0pt">
3753 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3756 \begin_layout Plain Layout
3771 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3774 \begin_layout Plain Layout
3791 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3794 \begin_layout Plain Layout
3809 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3812 \begin_layout Plain Layout
3828 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3831 \begin_layout Plain Layout
3846 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3849 \begin_layout Plain Layout
3866 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3869 \begin_layout Plain Layout
3884 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3887 \begin_layout Plain Layout
3904 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3907 \begin_layout Plain Layout
3922 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3925 \begin_layout Plain Layout
3942 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3945 \begin_layout Plain Layout
3960 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3963 \begin_layout Plain Layout
3980 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3983 \begin_layout Plain Layout
3998 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4001 \begin_layout Plain Layout
4024 \begin_layout Standard
4025 LyX doesn't stop you using bullets from packages you don't have.
4026 If you get errors from LaTeX when you try to view or print the file, then
4027 it is likely you are missing a package.
4031 \begin_layout Plain Layout
4032 LyX doesn't restrict your use since you may be editing locally and exporting
4041 \begin_layout Subsection
4045 \begin_layout Standard
4046 Select which bullet depth you want to change then select the bullet shape
4048 Any changes will not be visible in LyX, but are visible when viewing the
4052 \begin_layout Standard
4053 You can reset a bullet shape to the default simply by clicking your right
4054 mouse button on the appropriate bullet depth button.
4058 \begin_layout Plain Layout
4063 want to have multiple sets of paragraphs with different sets of bullets
4064 in each, then you're going to have to get your hands dirty with TeX code.
4065 The bullet selection dialog can help though because it provides you with
4066 the LaTeX code for a wide range of bullet shapes.
4067 To make your own custom paragraphs you have the following options:
4070 \begin_layout Plain Layout
4074 \begin_layout Plain Layout
4090 \begin_layout Plain Layout
4094 \begin_layout Plain Layout
4116 \begin_layout Itemize
4117 Use the LaTeX command
4118 \begin_inset Flex Code
4121 \begin_layout Plain Layout
4129 to specify a new bullet shape for a given depth.
4130 You'll also need to save the current bullet shape so you can restore it
4132 In this itemized list the following LaTeX code was used to change the bullet
4133 used for the first depth.
4137 \begin_layout LyX-Code
4147 \begin_layout LyX-Code
4164 \begin_layout Itemize
4165 Note that the itemize depth is specified in Roman numerals as part of the
4175 \begin_layout Itemize
4179 \begin_layout Plain Layout
4192 Specify each individual entry by starting each item with the bullet shape
4193 enclosed in square brackets and set as
4194 \begin_inset Flex MenuItem
4197 \begin_layout Plain Layout
4204 For example, this item was started with
4205 \begin_inset Flex Code
4208 \begin_layout Plain Layout
4223 \begin_layout Plain Layout
4227 \begin_layout Plain Layout
4243 \begin_layout Plain Layout
4244 You'll also need to revert the labelitem back to its previous setting for
4245 the global bullet shape settings to remain in effect.
4246 The way used here was:
4249 \begin_layout LyX-Code
4264 \begin_layout Chapter
4265 LyX and the World Wide Web
4268 \begin_layout Standard
4269 LyX has long supported the export of documents to various web-friendly formats,
4271 Before verson 2.0, however, HTML export was always accomplished by the use
4272 of external converters.
4276 \begin_layout Plain Layout
4277 For details on the use of external converters with LyX, see the
4281 section of the Customization manual.
4286 These fall into two large groups: there are converters that use LaTeX as
4287 an intermediate format, such as
4288 \begin_inset Flex Code
4291 \begin_layout Plain Layout
4298 \begin_inset Flex Code
4301 \begin_layout Plain Layout
4308 \begin_inset Flex Code
4311 \begin_layout Plain Layout
4317 , relying upon LyX to produce the LaTeX; and there is a converter that works
4318 directly on LyX files,
4319 \begin_inset Flex Code
4322 \begin_layout Plain Layout
4329 All of these have different advantages and disadvantages.
4333 \begin_layout Standard
4334 The LaTeX-based converters have the advantage that, in principle, they know
4335 everything about the exported document that LaTeX does.
4336 Such converters do not care, for example, if a certain block of code was
4337 produced by LyX or was Evil Red Text.
4338 These converters know about
4339 \begin_inset Flex Code
4342 \begin_layout Plain Layout
4348 files, counters, and references, and can often make use of the
4349 \begin_inset Flex Code
4352 \begin_layout Plain Layout
4358 files generated by BibTeX.
4359 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4360 said that only TeX itself understands TeX---and LaTeX-based converters
4361 will often choke on what seem to be quite simple constructs; complex ones
4362 can throw them completely, and as of this writing, for example, the
4366 manual will not export with
4367 \begin_inset Flex Code
4370 \begin_layout Plain Layout
4376 , though the others will.
4377 The other issue concerns how math is handled.
4378 These converters typically convert the formulae into little pictures that
4379 are then linked from the HTML document.
4380 Since these are actually generated by LaTeX, they are accurate.
4381 But they do not scale well, and just getting them to look as if they are
4382 actually meant to be in your document---so that the font sizes seem to
4383 be roughly the same---can be a challenge.
4386 \begin_layout Standard
4388 \begin_inset Flex Code
4391 \begin_layout Plain Layout
4398 \begin_inset CommandInset href
4400 name "http://elyxer.nongnu.org/"
4401 target "http://elyxer.nongnu.org/"
4405 ) solves some of these problems.
4406 In particular, the formulae it produces scale perfectly, since it renders
4407 math using a combination of HTML and CSS rather than converting the formulae
4409 But even moderately complex formula are rendered less well than with
4410 \begin_inset Flex Code
4413 \begin_layout Plain Layout
4419 ; this reflects the limitations of HTML.
4423 \begin_layout Plain Layout
4425 \begin_inset Flex Code
4428 \begin_layout Plain Layout
4434 can also use jsMath and MathJax for equations, but this setting is only
4435 available globally and requires one to have access to a server that runs
4441 More importantly (as of version 1.1.1, at least),
4442 \begin_inset Flex Code
4445 \begin_layout Plain Layout
4451 has limited support for math macros and no support for user-defined paragraph
4452 or character styles.
4453 These limitations make
4454 \begin_inset Flex Code
4457 \begin_layout Plain Layout
4463 unsuitable for many of the documents LyX users produce.
4464 In principle, of course, these problems could be solved, but the LyX developers
4465 have decided to follow a different path and have made LyX itself capable
4466 of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4470 \begin_layout Standard
4471 As of this writing, XHTML output remains under development and should probably
4473 \begin_inset Quotes eld
4477 \begin_inset Quotes erd
4484 \begin_layout Plain Layout
4486 \begin_inset Flex Code
4489 \begin_layout Plain Layout
4490 development/HTML.notes
4495 , which can be found in the LyX source tree or
4496 \begin_inset CommandInset href
4498 name "accessed online"
4499 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4503 , usually contains up-to-date information about the state of XHTML output.
4504 See also the list of XHTML bugs on
4505 \begin_inset CommandInset href
4507 name "the bug tracker"
4508 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"
4517 Still, the developers have chosen this approach because it has several
4518 potential advantages over the other two.
4521 \begin_layout Standard
4522 These advantages are primarily due to the fact that the XHTML output routines,
4523 since they are part of LyX, know everything LyX knows about the document
4528 \begin_layout Plain Layout
4529 Another advantage is that, since these routines are internal to LyX, they
4530 are immune to changes in LyX's file format, or to changes in the semantics
4536 So they know about the table of contents (as displayed in the outline),
4537 about the counters associated with different paragraph styles, and about
4538 user-defined styles.
4539 The XHTML output routines know what LyX knows about internationalization,
4540 too, so they will output
4541 \begin_inset Quotes eld
4545 \begin_inset Quotes erd
4549 \begin_inset Quotes eld
4557 \begin_inset Quotes erd
4560 , depending upon the language in effect at the time.
4564 \begin_layout Standard
4565 Quite generally, the output routines know what LyX knows about document
4566 layout, that is, about how the document is to be rendered on screen.
4567 We use this information when we output the document as XHTML.
4572 generates CSS style information corresponding to the layout information
4573 it uses to render the document on screen: if section headings are supposed
4574 to be sans-serif and bold as seen in LyX, then (by default) they will be
4575 sans-serif and bold when viewed in a web browser, too.
4576 And this is true not just for pre-defined styles, like Section, but for
4577 any style, including user-defined styles.
4578 Indeed, the XHTML output routines make no distinction between user-defined
4579 paragraph and character styles and LyX's own pre-defined styles: in each
4580 case, everything LyX knows about the styles is contained in the layout
4582 And much the same is true as regards pre-defined textual insets, such as
4583 footnotes, and various custom insets.
4587 \begin_layout Standard
4588 The result is that XHTML output can be customized and extended in exactly
4589 the same way LaTeX output can be customized and extended: through layout
4591 See chapter five of the
4595 manual for the details.
4598 \begin_layout Standard
4599 The remainder of this chapter contains more detailed information on XHTML
4600 output, its limitations, and ways to work around those limitations.
4603 \begin_layout Section
4604 Math Output in XHTML
4607 \begin_layout Standard
4608 LyX offers four choices for how math is rendered.
4609 These have various advantages and disadvantages:
4612 \begin_layout Itemize
4614 \begin_inset Newline newline
4617 MathML is a dialect of XML designed specifically for mathematics on the
4618 web, and it typically renders very well in browsers that support it.
4619 The disadvantage is that not all browsers support MathML, and support is
4620 not complete even in the Gecko-based browsers, such as Firefox.
4621 \begin_inset Newline newline
4624 If LyX is unable to render a formula as MathML---for example, if the formula
4626 \begin_inset Flex Code
4629 \begin_layout Plain Layout
4635 package or ERT---then it will instead output the formula as an image.
4639 \begin_layout Itemize
4641 \begin_inset Newline newline
4645 \begin_inset Flex Code
4648 \begin_layout Plain Layout
4654 outputs math as HTML, styled by CSS.
4658 \begin_layout Plain Layout
4659 LyX has borrowed some of the CSS for its HTML output from
4660 \begin_inset Flex Code
4663 \begin_layout Plain Layout
4674 For simple formulae, this can work quite well, though with more complicated
4675 formulae it tends to break down.
4676 Still, this method has the advantage that it is very widely supported and
4677 so it may be appropriate for documents that contain only a little, fairly
4679 \begin_inset Newline newline
4682 If Lyx is unable to render a formula as HTML---for example, if the formula
4684 \begin_inset Flex Code
4687 \begin_layout Plain Layout
4693 package or ERT---then it will instead output the formula as an image.
4697 \begin_layout Itemize
4699 \begin_inset Newline newline
4703 \begin_inset Flex Code
4706 \begin_layout Plain Layout
4712 , LyX will output formulae as images, the very same images, in fact, that
4713 are used for instant preview.
4717 \begin_layout Plain Layout
4718 Instant preview does
4722 have to be on for images to be output, however.
4727 The advantage to this method is that the images are simply generated by
4728 LaTeX, so they are very accurate.
4729 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4730 so they do not scale terribly well, and one cannot copy them, etc.
4731 (As of this writing, there are also problems about equation numbering.
4733 \begin_inset CommandInset href
4736 target "http://www.lyx.org/trac/ticket/6894"
4741 \begin_inset Newline newline
4744 The size of the images can be controlled by setting the
4745 \begin_inset Quotes eld
4749 \begin_inset Quotes erd
4753 \begin_inset Flex MenuItem
4756 \begin_layout Plain Layout
4757 Document\SpecialChar \menuseparator
4758 Settings\SpecialChar \menuseparator
4768 \begin_layout Plain Layout
4769 For those who want to know, this controls the resolution of the image in
4770 dots per inch and is based upon a default of 75 dpi.
4776 \begin_inset Newline newline
4779 If LyX for some reason fails to create an image for a formula (e.g., if a
4780 required LaTeX package is not installed), then it will fall back to outputing
4784 \begin_layout Itemize
4786 \begin_inset Newline newline
4789 Finally, LyX will happily output math as LaTeX.
4790 As well as being the output of last resort, this method can be used with
4792 \begin_inset CommandInset href
4795 target "http://www.math.union.edu/~dpvc/jsMath/"
4799 , which uses JavaScript to render LaTeX embedded in HTML documents.
4800 LyX wraps the LaTeX in either a
4801 \begin_inset Flex Code
4804 \begin_layout Plain Layout
4810 (for inline formulas) or
4811 \begin_inset Flex Code
4814 \begin_layout Plain Layout
4820 (for displayed formulas) with
4821 \begin_inset Flex Code
4824 \begin_layout Plain Layout
4830 , as is required for jsMath.
4833 \begin_layout Standard
4834 One of these output methods must be selected under
4835 \begin_inset Flex MenuItem
4838 \begin_layout Plain Layout
4839 Document\SpecialChar \menuseparator
4840 Settings\SpecialChar \menuseparator
4847 By default, LyX outputs MathML.
4848 This is a document-wide setting, therefore.
4851 \begin_layout Standard
4852 Eventually, LyX will offer the user the option to select an alternate output
4853 method for a particular inset, say, one that isn't being rendered very
4858 \begin_layout Plain Layout
4859 That said, since LyX falls back to images if the inset contains ERT, then
4860 one can force output as an image by putting some harmless ERT into the
4862 \begin_inset Formula $a=b\relax$
4873 \begin_layout Section
4874 Bibliography and Citations
4877 \begin_layout Standard
4878 XHTML output fully supports bibliographies and citations.
4882 \begin_layout Standard
4883 Citation labels are generated by the same machinery that generates LyX's
4884 on-screen labels, so the labels will look in the output much as they do
4885 in LyX, though better.
4886 If you are using numerical citations, then LyX will output numerical labels,
4887 such as [1] or [17], rather than simply showing the citation key in square
4888 brackets, as it does on-screen.
4889 If you are using author-year citations, then LyX will add lowercase letters
4890 to the years, just as BibTeX does, if it finds more than one citation for
4891 a given author-year combination.
4892 The labels will be printed with the bibliography entries.
4893 Note that there is, at present, no way to customize the appearance of the
4894 labels, for example, to choose between square brackets and parentheses.
4897 \begin_layout Standard
4898 Bibliography output is handled by the same machinery that handles the presentati
4899 on of reference information in the citation dialog, so you will see in the
4900 XHTML output pretty much what you would see if you were to look at a given
4901 entry in the citation dialog.
4902 The formatting can be customized in your layout file or, preferably, in
4908 manual for the details.
4911 \begin_layout Standard
4912 The main defect at present is that cross-referenced information is printed
4913 with every entry with which it is associated.
4914 So you can see things like this:
4919 \begin_inset Quotes eld
4922 Context and Logical Form
4923 \begin_inset Quotes erd
4928 Language in Context: Selected Essays
4930 (Oxford: Oxford University Press, 2007), pp.
4936 \begin_inset Quotes eld
4939 Semantics in Context
4940 \begin_inset Quotes erd
4945 Language in Context: Selected Essays
4947 (Oxford: Oxford University Press, 2007), pp.
4951 \begin_layout Standard
4952 This should be fixed before long.
4955 \begin_layout Standard
4956 There is no support at present for sectioned bibliographies.
4957 If you have multiple bibliographies, then LyX will print the same bibliography
4961 \begin_layout Section
4965 \begin_layout Standard
4966 LyX will happily export indexes as XHTML, but with certain limitations at
4970 \begin_layout Standard
4971 Index export will be most reliable when you do not attempt to use the fancy
4972 constructs that are described in the section on indexes in the
4980 \begin_layout Plain Layout
4981 The main issue here is that LyX itself does not really handle these.
4982 It just lets you enter what you would have to enter in raw LaTeX.
4987 We'll describe how they are handled using the subsection headings from
4991 \begin_layout Itemize
4992 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4993 these, but the entries must be separated by
4994 \begin_inset Quotes eld
4998 \begin_inset Quotes erd
5001 , that is, there must be spaces around the exclamation point.
5002 This is because it is otherwise too difficult to check for escaped exclamation
5003 points, ones in math, and so forth.
5006 \begin_layout Itemize
5007 Page Ranges: There is no support at all for page ranges, since these make
5008 no sense with XHMTL.
5009 Instead, you will just get two index entries, one at either end.
5012 \begin_layout Itemize
5013 Cross-referencing: There is no support for cross-referencing.
5014 If LyX finds an entry containing the
5015 \begin_inset Quotes eld
5018 |see\SpecialChar \ldots{}
5020 \begin_inset Quotes erd
5023 construct, it is just dropped, and the rest is treated as an ordinary index
5027 \begin_layout Itemize
5028 Index Entry Order: LyX does support attempts to fix the sorting order.
5029 It will take what is before the first `@' it finds and use that for sorting,
5030 taking what follows the first `@' to be the actual entry.
5031 At present, LyX does not check for escaped `@', so do not try to index
5035 \begin_layout Itemize
5036 Index Entry Layout: You can format entries by using the text style dialog,
5037 or by using any other method available within LyX itself.
5038 There is no support for constructs like:
5039 \begin_inset Quotes eld
5043 \begin_inset Quotes erd
5047 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5048 and everything that follows it.
5051 \begin_layout Itemize
5052 Multiple Indexes: There is no support for multiple indexes.
5053 Rather, all index entries will be printed as one large index.
5054 To avoid our printing several versions of the index, we print only the
5055 main index, so make sure you have one.
5058 \begin_layout Section
5059 Nomenclature and Glossary
5062 \begin_layout Standard
5063 There is at present no support for glossaries.
5064 Adding it would be fairly trivial, and welcome.
5067 \begin_layout Chapter
5071 \begin_layout Section
5075 \begin_layout Standard
5076 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5077 and retrieve information about the LyX internal state.
5078 This is only intended for advanced users, but they should find it useful.
5079 It is by writing to the LyX server, for example, that bibliography managers,
5080 such as JabRef, are able to
5081 \begin_inset Quotes eld
5085 \begin_inset Quotes erd
5091 \begin_layout Section
5092 Starting the LyX Server
5095 \begin_layout Standard
5096 The LyX server works through the use of a pair of named pipes.
5097 These are usually located in
5098 \begin_inset Flex Code
5101 \begin_layout Plain Layout
5107 , (except on Windows, where
5111 named pipes are special objects located in
5112 \begin_inset Flex Code
5115 \begin_layout Plain Layout
5127 ) and have the names
5128 \begin_inset Quotes eld
5132 \begin_inset Flex Code
5135 \begin_layout Plain Layout
5142 \begin_inset Quotes erd
5146 \begin_inset Quotes eld
5150 \begin_inset Flex Code
5153 \begin_layout Plain Layout
5160 \begin_inset Quotes erd
5164 External programs write into
5165 \begin_inset Flex Code
5168 \begin_layout Plain Layout
5174 and read back data from
5175 \begin_inset Flex Code
5178 \begin_layout Plain Layout
5185 The stem of the pipe names can be defined in the
5186 \begin_inset Flex MenuItem
5189 \begin_layout Plain Layout
5190 Tools\SpecialChar \menuseparator
5197 \begin_inset Flex Code
5200 \begin_layout Plain Layout
5201 "/home/myhome/lyxpipe"
5207 \begin_inset Flex Code
5210 \begin_layout Plain Layout
5224 on Windows (but any working path can be used).
5229 configure this manually in order for the server to start.
5232 \begin_layout Standard
5234 \begin_inset Flex Code
5237 \begin_layout Plain Layout
5244 \begin_inset Flex Code
5247 \begin_layout Plain Layout
5253 ' to create the pipes.
5254 If one of the pipes already exists, LyX will assume that another LyX process
5255 is already running and will not start the server.
5256 On POSIX (Unix like) systems, if for some other reason, an unused
5257 \begin_inset Quotes eld
5261 \begin_inset Quotes erd
5264 pipe is left in existence when LyX closes, then LyX will try to delete
5266 If this fails for some reason, you will need to delete the pipes manually
5267 and then restart LyX.
5268 On Windows, pipes are deleted by the OS on program termination or crash,
5270 \begin_inset Quotes eld
5274 \begin_inset Quotes erd
5277 pipes should not be possible.
5280 \begin_layout Standard
5281 To have several LyX processes with servers at the same time, you have to
5282 use different configurations, perhaps by using separate user directories,
5284 \begin_inset Flex Code
5287 \begin_layout Plain Layout
5293 file, for each process.
5296 \begin_layout Standard
5297 If you are developing a client program, you might find it useful to enable
5298 debugging information from the LyX server.
5299 Do this by starting LyX as
5300 \begin_inset Flex Code
5303 \begin_layout Plain Layout
5312 \begin_layout Standard
5313 You can find a complete example client written in C in the source distribution
5315 \begin_inset Flex Code
5318 \begin_layout Plain Layout
5319 development/lyxserver/server_monitor.c
5327 \begin_layout Standard
5328 Another useful tool is command-line based client you will find in
5329 \begin_inset Flex Code
5332 \begin_layout Plain Layout
5333 src/client/lyxclient
5341 \begin_layout Section
5342 Normal communication
5345 \begin_layout Standard
5346 To issue a LyX call, the client writes a line of ASCII text into the input
5348 This line has the following format:
5365 \begin_layout Description
5366 clientname is a name that the client can choose arbitrarily.
5367 Its only use is that LyX will echo it if it sends an answer—so a client
5368 can dispatch results from different requesters.
5371 \begin_layout Description
5372 function is the function you want LyX to perform.
5373 It is the same as the commands you'd use in the minibuffer.
5376 \begin_layout Description
5377 argument is an optional argument which is meaningful only to some functions
5379 \begin_inset Quotes eld
5383 \begin_inset Quotes erd
5386 LFUN will insert the argument as text at the cursor position).
5389 \begin_layout Standard
5390 The answer from LyX will arrive in the output pipe and be of the form
5407 \begin_layout Standard
5416 are just echoed from the command request, while
5420 is more or less useful information filled according to how the command
5421 execution worked out.
5422 Some commands, such as
5423 \begin_inset Quotes eld
5427 \begin_inset Quotes erd
5430 , will return information about the internal state of LyX, while other will
5431 return an empty data-response.
5432 This means that the command execution went fine.
5435 \begin_layout Standard
5436 In case of errors, the response from LyX will have this form
5453 \begin_layout Standard
5458 should contain an explanation of why the command failed.
5461 \begin_layout Standard
5465 \begin_layout LyX-Code
5466 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5467 \begin_inset Newline newline
5470 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5471 \begin_inset Newline newline
5474 read a <~/.lyxpipe.out
5475 \begin_inset Newline newline
5481 \begin_layout Section
5485 \begin_layout Standard
5486 LyX can notify clients of events going on asynchronously.
5487 Currently it will only do this if the user binds a key sequence with the
5489 \begin_inset Quotes eld
5493 \begin_inset Quotes erd
5497 The format of the string LyX sends is as follows:
5501 \begin_inset Flex Code
5504 \begin_layout Plain Layout
5515 \begin_layout Standard
5520 is the printed representation of the key sequence that was actually typed
5524 \begin_layout Standard
5525 This mechanism can be used to extend LyX's command set and implement macros.
5526 Bind some key sequence to
5527 \begin_inset Quotes eld
5531 \begin_inset Quotes erd
5535 Then start a client that listens on the output pipe, dispatches the command
5536 according to the sequence, and starts a function that may use LyX calls
5537 and LyX requests to issue a command or a series of commands to LyX.
5540 \begin_layout Section
5541 The simple LyX Server Protocol
5544 \begin_layout Standard
5545 LyX implements a simple protocol that can be used for session management.
5546 All messages are of the form
5559 \begin_layout Standard
5565 \begin_inset Quotes eld
5569 \begin_inset Quotes erd
5573 \begin_inset Quotes eld
5577 \begin_inset Quotes erd
5582 \begin_inset Quotes eld
5586 \begin_inset Quotes erd
5589 is received from a client, LyX will report back to inform the client that
5590 it's listening to it's messages, while
5591 \begin_inset Quotes eld
5595 \begin_inset Quotes erd
5598 sent from LyX will inform clients that LyX is closing.
5601 \begin_layout Section
5602 Reverse DVI/PDF search
5605 \begin_layout Standard
5606 Some DVI/PDF viewers
5610 \begin_layout Plain Layout
5611 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5612 Skim on Mac OSX and SumatraPDF on Windows.
5621 facility (also called
5626 This means that you can tell LyX to put the cursor to a specific line in
5627 the document by clicking at the respective position in the DVI/PDF output.
5628 To achieve this, the viewer must be able to communicate with LyX.
5629 This is done via the LyX server either by using the named pipe (
5633 ), or the UNIX domain socket (
5637 ) that LyX creates in its temporary directory (this is the way the
5638 \begin_inset Flex Code
5641 \begin_layout Plain Layout
5647 program communicates with LyX).
5648 In some cases, you need a helper script that mediates between the viewer
5649 and LyX, in others, the viewer can communicate with LyX directly.
5650 This depends on the selected viewer and on your operating system.
5651 The same applies to the way viewers need to be configured and the way the
5652 reverse search is actually performed.
5653 In what follows, we will thus describe how to setup reverse search for
5655 Before we turn to this, though, we will explain what needs to be done generally
5656 to enable reverse search in the DVI/PDF output.
5659 \begin_layout Subsection
5660 \begin_inset CommandInset label
5662 name "sub:rev-search"
5669 \begin_layout Standard
5670 In most cases LyX will do the work for you by enabling
5671 \begin_inset Flex MenuItem
5674 \begin_layout Plain Layout
5675 Document\SpecialChar \menuseparator
5676 Output\SpecialChar \menuseparator
5677 Synchronize with Output
5683 In such a case LyX will automatically insert the necessary SyncTeX macro
5684 (for PDF) or load the srcltx package (for DVI) respectively.
5685 This option can be easily reached also on
5686 \begin_inset Flex Code
5689 \begin_layout Plain Layout
5698 \begin_layout Standard
5699 If you need a different setting, you can select or input a custom macro
5700 from the drop down box just below
5701 \begin_inset Flex MenuItem
5704 \begin_layout Plain Layout
5705 Document\SpecialChar \menuseparator
5706 Output\SpecialChar \menuseparator
5707 Synchronize with Output
5715 \begin_layout Standard
5716 Please note that including the
5717 \begin_inset Flex Code
5720 \begin_layout Plain Layout
5727 \begin_inset Flex Code
5730 \begin_layout Plain Layout
5736 sometimes has an undesired impact on the typesetting.
5737 Thus, you should switch output synchronization off for the final typesetting
5739 \begin_inset Flex Code
5742 \begin_layout Plain Layout
5749 \begin_inset Flex Code
5752 \begin_layout Plain Layout
5761 \begin_layout Standard
5762 In case you need some more special settings that are not covered by the
5763 automatic settings, read the next section about how to set up output synchroniz
5765 If the automatic setup suits your needs, you can readily jump to section
5766 \begin_inset space ~
5770 \begin_inset CommandInset ref
5772 reference "sub:configuring-viewers"
5776 , where the necessary configuration steps in your viewer -- needed both
5777 with the automatic and the manual setup -- are described.
5780 \begin_layout Subsection
5784 \begin_layout Standard
5785 LaTeX provides several different methods for reverse search.
5786 Some are built-in in the
5787 \begin_inset Flex Code
5790 \begin_layout Plain Layout
5796 program, some are provided by external packages.
5797 Your choice depends on whether your LaTeX distribution already provides
5798 a given method (the built-in methods are rather new) and whether your viewer
5800 The available methods are described in the following.
5803 \begin_layout Subsubsection*
5804 Built-in DVI-search via src-specials (DVI only)
5807 \begin_layout Standard
5808 This method provides the DVI file with the necessary information for reverse
5810 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5811 distribution should include it), and it works reliably.
5812 To enable it, change the
5813 \begin_inset Flex MenuItem
5816 \begin_layout Plain Layout
5821 \begin_layout Plain Layout
5834 \begin_inset Flex MenuItem
5837 \begin_layout Plain Layout
5842 \begin_layout Plain Layout
5849 eX (plain)->DraftDVI
5855 \begin_inset Flex MenuItem
5858 \begin_layout Plain Layout
5859 Preferences\SpecialChar \menuseparator
5860 File Handling\SpecialChar \menuseparator
5867 \begin_inset Flex Code
5870 \begin_layout Plain Layout
5871 latex -src-specials $$i
5877 If this doesn't work, check if your TeX engine needs different options
5878 (the syntax might differ in some distributions).
5881 \begin_layout Subsubsection*
5882 External Packages (PDFSync and scrltx)
5885 \begin_layout Standard
5894 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5896 In order to enable it, load the packages in the LyX preamble:
5899 \begin_layout Itemize
5900 \begin_inset Flex Code
5903 \begin_layout Plain Layout
5911 for reverse PDF search,
5914 \begin_layout Itemize
5916 \begin_inset Flex Code
5919 \begin_layout Plain Layout
5922 usepackage[active]{srcltx}
5927 for reverse DVI search.
5930 \begin_layout Standard
5931 If you want to be able to perform both DVI and PDF reverse searches, you
5932 can also insert in the preamble the following lines
5935 \begin_layout LyX-Code
5939 \begin_inset Newline newline
5945 \begin_inset Newline newline
5951 \begin_inset Newline newline
5957 \begin_inset Newline newline
5962 usepackage[active]{srcltx}
5963 \begin_inset Newline newline
5971 \begin_layout Standard
5972 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5973 right package will be used.
5976 \begin_layout Standard
5977 Note that PDFSync might affect the output layout of your document.
5978 It is therefore advised to disable PDFsync for final documents.
5981 \begin_layout Subsubsection*
5982 Built-in reverse search via SyncTeX (DVI and PDF)
5985 \begin_layout Standard
5987 \begin_inset Flex Code
5990 \begin_layout Plain Layout
5996 have built-in support for both PDF and DVI reverse search.
6001 facility is basically the result of the integration of the PDFSync package
6002 to the pdftex program and its merge with the
6007 You need at least TeXLive 2008 or a recent MikTeX distribution in order
6009 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6010 already provide SyncTeX support.
6013 \begin_layout Standard
6014 To enable SyncTeX for DVI output, change the
6015 \begin_inset Flex MenuItem
6018 \begin_layout Plain Layout
6023 \begin_layout Plain Layout
6036 \begin_inset Flex MenuItem
6039 \begin_layout Plain Layout
6044 \begin_layout Plain Layout
6051 eX (plain) -> DraftDVI
6057 \begin_inset Flex MenuItem
6060 \begin_layout Plain Layout
6061 Preferences\SpecialChar \menuseparator
6062 File Handling\SpecialChar \menuseparator
6069 \begin_inset Flex Code
6072 \begin_layout Plain Layout
6073 latex -synctex=1 $$i
6078 , and for PDF output, change the
6079 \begin_inset Flex MenuItem
6082 \begin_layout Plain Layout
6087 \begin_layout Plain Layout
6094 eX (pdflatex) -> PDF (pdflatex)
6100 \begin_inset Flex Code
6103 \begin_layout Plain Layout
6104 pdflatex -synctex=1 $$i
6110 Check the documentation of your viewer whether the viewer needs to be configure
6111 d for the use with SyncTeX.
6115 \begin_layout Plain Layout
6117 \begin_inset Flex Code
6120 \begin_layout Plain Layout
6126 option enables gzip compression.
6127 If your viewer does not support it, you should instead use
6128 \begin_inset Flex Code
6131 \begin_layout Plain Layout
6145 \begin_layout Subsection
6146 Configuring and using specific viewers
6147 \begin_inset CommandInset label
6149 name "sub:configuring-viewers"
6156 \begin_layout Subsubsection*
6157 Xdvi (all platforms)
6160 \begin_layout Standard
6162 \begin_inset Flex Code
6165 \begin_layout Plain Layout
6171 , you don't need to do anything else for performing a reverse DVI search,
6172 as LyX already provides the necessary hooks for automatically using the
6174 \begin_inset Flex Code
6177 \begin_layout Plain Layout
6184 Just setup your document as described above (reverse search is triggered
6185 by Ctrl-click or Alt-click on Mac OSX, respectively).
6188 \begin_layout Standard
6189 However, if for whatever reason you want to use the named pipe instead of
6190 the socket for communicating with LyX, simply change the DVI viewer in
6192 \begin_inset Flex MenuItem
6195 \begin_layout Plain Layout
6196 Preferences\SpecialChar \menuseparator
6197 File Handling\SpecialChar \menuseparator
6207 \begin_layout Plain Layout
6208 On Mac OSX you have to use
6209 \begin_inset Flex Code
6212 \begin_layout Plain Layout
6213 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6224 \begin_inset Flex Code
6227 \begin_layout Plain Layout
6228 xdvi -editor 'lyxeditor.sh %f %l'
6234 \begin_inset Flex Code
6237 \begin_layout Plain Layout
6243 is a suitable script.
6244 For example, a minimal shell script is the following one:
6247 \begin_layout LyX-Code
6249 \begin_inset Newline newline
6252 LYXPIPE="/path/to/lyxpipe"
6253 \begin_inset Newline newline
6256 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6257 \begin_inset Newline newline
6260 echo "$COMMAND" > "${LYXPIPE}".in || exit
6261 \begin_inset Newline newline
6264 read < "${LYXPIPE}".out || exit
6267 \begin_layout Standard
6269 \begin_inset Flex Code
6272 \begin_layout Plain Layout
6282 \begin_layout Plain Layout
6289 XServer pipe path specified in
6290 \begin_inset Flex MenuItem
6293 \begin_layout Plain Layout
6294 Preferences\SpecialChar \menuseparator
6304 \begin_layout Plain Layout
6306 \begin_inset Flex Code
6309 \begin_layout Plain Layout
6315 folder of a source distribution you can find a
6316 \begin_inset Flex Code
6319 \begin_layout Plain Layout
6325 script which is able to locate the
6329 based on your preferences.
6337 \begin_layout Subsubsection*
6341 \begin_layout Standard
6343 \begin_inset Flex Code
6346 \begin_layout Plain Layout
6347 /Applications/MacDviX_Folder/calleditor.script
6352 , add the following lines:
6355 \begin_layout LyX-Code
6360 \begin_layout Plain Layout
6367 X.app/Contents/MacOS/lyxeditor "$2" $1
6368 \begin_inset Newline newline
6374 \begin_layout Standard
6375 Modify the lines accordingly if you install LyX somewhere else than in the
6376 Applications folder.
6379 \begin_layout Standard
6380 Reverse search is triggered by Alt-click (OPTION-click).
6383 \begin_layout Subsubsection*
6387 \begin_layout Standard
6389 \begin_inset Flex Code
6392 \begin_layout Plain Layout
6393 open -a Skim.app $$i
6398 to the viewer setting in
6399 \begin_inset Flex MenuItem
6402 \begin_layout Plain Layout
6403 Preferences\SpecialChar \menuseparator
6404 File Handling\SpecialChar \menuseparator
6405 File formats\SpecialChar \menuseparator
6412 \begin_inset Flex MenuItem
6415 \begin_layout Plain Layout
6416 Skim\SpecialChar \menuseparator
6417 Preferences\SpecialChar \menuseparator
6427 \begin_layout Plain Layout
6437 \begin_layout Standard
6438 Reverse search is triggered by COMMAND-SHIFT-click
6441 \begin_layout Subsubsection*
6445 \begin_layout Standard
6447 \begin_inset Flex MenuItem
6450 \begin_layout Plain Layout
6451 Settings\SpecialChar \menuseparator
6452 Configure Okular\SpecialChar \ldots{}
6453 \SpecialChar \menuseparator
6460 \begin_inset Quotes eld
6464 \begin_inset Quotes erd
6468 \begin_inset Flex Code
6471 \begin_layout Plain Layout
6480 \begin_layout Standard
6481 Reverse search is triggered by SHIFT-click.
6484 \begin_layout Subsubsection*
6488 \begin_layout Standard
6489 Launch yap, choose its
6490 \begin_inset Flex MenuItem
6493 \begin_layout Plain Layout
6494 View\SpecialChar \menuseparator
6501 \begin_inset Quotes eld
6505 \begin_inset Quotes erd
6510 \begin_inset Quotes eld
6513 New\SpecialChar \ldots{}
6515 \begin_inset Quotes erd
6518 button and, in the window that opens, enter
6519 \begin_inset Quotes eld
6523 \begin_inset Quotes erd
6526 (or any other name you like) in the
6527 \begin_inset Quotes eld
6531 \begin_inset Quotes erd
6535 Now click on the button labeled
6536 \begin_inset Quotes eld
6539 \SpecialChar \ldots{}
6541 \begin_inset Quotes erd
6544 to open a file dialog and navigate to the directory containing the batch
6546 \begin_inset Flex Code
6549 \begin_layout Plain Layout
6557 \begin_inset Flex Code
6560 \begin_layout Plain Layout
6566 and then specify the program arguments as
6567 \begin_inset Flex Code
6570 \begin_layout Plain Layout
6578 \begin_inset Flex Code
6581 \begin_layout Plain Layout
6587 wrapper is used for communicating with LyX through the
6594 \begin_layout LyX-Code
6596 \begin_inset Newline newline
6599 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6608 \begin_inset Newline newline
6622 \begin_layout Standard
6623 Make sure that the LyXServer pipe path you specified in LyX is
6624 \begin_inset Flex Code
6627 \begin_layout Plain Layout
6641 , otherwise change the
6642 \begin_inset Flex Code
6645 \begin_layout Plain Layout
6651 wrapper accordingly.
6654 \begin_layout Standard
6655 In yap, reverse search is triggered by double-click.
6658 \begin_layout Subsubsection*
6659 SumatraPDF (Windows)
6662 \begin_layout Standard
6663 In order to use SumatraPDF for inverse search, enter
6664 \begin_inset Flex Code
6667 \begin_layout Plain Layout
6668 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6673 in the viewer setting in
6674 \begin_inset Flex MenuItem
6677 \begin_layout Plain Layout
6678 Preferences\SpecialChar \menuseparator
6679 File Handling\SpecialChar \menuseparator
6680 File formats\SpecialChar \menuseparator
6687 \begin_inset Flex Code
6690 \begin_layout Plain Layout
6696 is the previous wrapper.
6697 If SumatraPDF.exe is not in your command PATH, use its full file name.
6700 \begin_layout Standard
6701 Reverse search is triggered by double-click.
6704 \begin_layout Subsubsection*
6708 \begin_layout Standard
6709 First of all, make sure that yap is your default DVI viewer in the Windows
6710 environment, then launch it, choose its
6711 \begin_inset Flex MenuItem
6714 \begin_layout Plain Layout
6715 View\SpecialChar \menuseparator
6722 \begin_inset Quotes eld
6726 \begin_inset Quotes erd
6731 \begin_inset Quotes eld
6734 New\SpecialChar \ldots{}
6736 \begin_inset Quotes erd
6739 button and, in the window that opens, enter
6740 \begin_inset Quotes eld
6744 \begin_inset Quotes erd
6747 (or any other name you like) in the
6748 \begin_inset Quotes eld
6752 \begin_inset Quotes erd
6756 Now click on the button labeled
6757 \begin_inset Quotes eld
6760 \SpecialChar \ldots{}
6762 \begin_inset Quotes erd
6765 to open a file dialog and navigate to the directory containing the
6766 \begin_inset Flex Code
6769 \begin_layout Plain Layout
6775 program (which is installed by default on Cygwin along with the LyX executable).
6777 \begin_inset Flex Code
6780 \begin_layout Plain Layout
6786 and then specify the program arguments as
6787 \begin_inset Flex Code
6790 \begin_layout Plain Layout
6797 In this way, you will be using the
6801 for communicating with LyX.
6802 If, for whatever reason, you want to use the
6807 \begin_inset Flex Code
6810 \begin_layout Plain Layout
6816 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6819 \begin_layout Standard
6820 In yap, reverse search is triggered by double-click.
6823 \begin_layout Subsubsection*
6827 \begin_layout Standard
6828 In order to use SumatraPDF for inverse search, enter
6829 \begin_inset Flex Code
6832 \begin_layout Plain Layout
6838 in the viewer setting in
6839 \begin_inset Flex MenuItem
6842 \begin_layout Plain Layout
6843 Preferences\SpecialChar \menuseparator
6844 File Handling\SpecialChar \menuseparator
6845 File formats\SpecialChar \menuseparator
6852 \begin_inset Flex Code
6855 \begin_layout Plain Layout
6861 is the following script (to be placed in your command PATH,
6862 \begin_inset Flex Code
6865 \begin_layout Plain Layout
6871 being the best choice):
6874 \begin_layout LyX-Code
6876 \begin_inset Newline newline
6880 \begin_inset Newline newline
6883 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6886 \begin_layout Standard
6887 This wrapper script is needed because SumatraPDF is a native Windows application
6888 and does not understand the posix paths used by the Cygwin version of LyX.
6889 If SumatraPDF.exe is not in your command PATH, use its full posix path in
6892 \begin_inset Flex Code
6895 \begin_layout Plain Layout
6901 enables communication via the
6907 \begin_inset Flex Code
6910 \begin_layout Plain Layout
6916 option if you want to use the
6920 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6923 \begin_layout Standard
6924 Reverse search is triggered by double-click.
6927 \begin_layout Section
6931 \begin_layout Standard
6932 Forward search is, as the name implies, in a sense the
6933 \begin_inset Quotes eld
6937 \begin_inset Quotes erd
6941 It allows you to let the viewer jump to a given position from within LyX.
6942 If forward search is set up (as described in what follows), you can put
6943 the cursor anywhere in your LyX document, and hit
6944 \begin_inset Flex MenuItem
6947 \begin_layout Plain Layout
6948 Navigate\SpecialChar \menuseparator
6955 \begin_inset Flex MenuItem
6958 \begin_layout Plain Layout
6964 in the context menu via right mouse click), and then the viewer will jump
6965 to that position as well.
6966 This implies, of course, that your viewer supports this function.
6969 \begin_layout Standard
6970 To make forward search possible, you first need to provide the generated
6971 output PDF/DVI file with additional information about the TeX sources.
6972 This can be done via the methods described in the section
6973 \begin_inset CommandInset ref
6975 reference "sub:rev-search"
6982 \begin_layout Standard
6983 Additionally, you need to configure LyX for using your viewers in
6984 \begin_inset Flex MenuItem
6987 \begin_layout Plain Layout
6988 Tools\SpecialChar \menuseparator
6989 Preferences\SpecialChar \menuseparator
6990 Output\SpecialChar \menuseparator
6997 We provide a range of tested configurations for some viewers, which you
6998 can select from the drop down list.
6999 If none of these configurations suits you, you have to find out and enter
7000 a suitable configuration yourself.
7001 The definition syntax uses the following placeholders:
7004 \begin_layout Itemize
7006 \begin_inset Flex Code
7009 \begin_layout Plain Layout
7018 \begin_layout Itemize
7020 \begin_inset Flex Code
7023 \begin_layout Plain Layout
7029 : name of the (temporary) exported .tex file
7032 \begin_layout Itemize
7034 \begin_inset Flex Code
7037 \begin_layout Plain Layout
7043 : name of the exported output file (either dvi or pdf, depending on which
7044 one exists in the temporary directory)
7047 \begin_layout Standard
7048 Note that only some of the viewers provide full forward search functionality,
7049 among them yap, xdvi, okular and Sumatra PDF
7053 \begin_layout Plain Layout
7054 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
7061 While many of the widespread PDF viewers (most notably Adobe Reader) do
7062 not support forward search at all, some other viewers -- e.
7063 \begin_inset space \thinspace{}
7067 evince and xpdf -- allow at least to reload the document and jump to a
7068 specific page of the file, so you can at least navigate
7069 \begin_inset Quotes eld
7073 \begin_inset Quotes erd
7077 These latter functionality is provided by an external call of synctex (see
7078 the predefined example configurations).
7082 \begin_layout Standard
7083 Forward search works both with DVI and PDF output.
7084 LyX simply checks which preview format you have used before (i.
7085 \begin_inset space \thinspace{}
7088 e., which format is already there in the temporary directory) and chooses
7089 the appropriate configuration for the respective format.
7093 \begin_layout Chapter
7094 Special Document Classes
7097 \begin_layout Section
7101 \begin_layout Standard
7107 \begin_layout Subsection
7111 \begin_layout Standard
7112 This section describes how LyX can be used to write articles for submission
7113 to the scientific journal
7115 Astronomy and Astrophysics
7117 (www.edpsciences.fr/aa/
7118 \begin_inset Flex URL
7121 \begin_layout Plain Layout
7123 http://www.edpsciences.fr/aa/
7128 ) using Version 5.01 of the document class
7133 This package can be downloaded from the ftp site
7136 \begin_layout Standard
7137 \begin_inset VSpace medskip
7143 \begin_layout Standard
7145 \begin_inset Flex URL
7148 \begin_layout Plain Layout
7150 ftp://ftp.edpsciences.org/pub/aa/readme.html
7158 \begin_layout Standard
7159 \begin_inset VSpace medskip
7165 \begin_layout Standard
7166 A manual comes together with that package, and this text is not meant to
7167 replace the original manual but is merely a short guide in how to realize
7168 the correct form of your paper.
7172 \begin_layout Standard
7173 Please note that the publisher of the journal was changed from Springer
7174 to EDP Sciences starting January 1, 2001.
7175 That change involved also some slight changes to the style files, namely
7176 the removal of the thesaurus command.
7177 The LyX class aa supports the newest version of these style files, V 5.01.
7178 If you have an older version installed, please upgrade.
7179 For compatibility, the old (version 4) layout has been kept as
7184 Please refer to the comments in
7186 LyXDir/layouts/aapaper.layout
7191 \begin_layout Subsection
7195 \begin_layout Standard
7196 It is recommended you start from the example template distributed with LyX.
7197 If you are not using a template, note the following settings:
7200 \begin_layout Itemize
7207 Document\SpecialChar \menuseparator
7210 dialog (OK, that one was obvious).
7213 \begin_layout Itemize
7214 Don't change the option
7217 \begin_inset space ~
7227 The whole layout is done by the macros, you shouldn't change anything.
7230 \begin_layout Subsection
7234 \begin_layout Standard
7235 First thing to enter is the header information.
7236 It consists of seven entries, of which some are optional.
7240 \begin_layout Itemize
7248 \begin_layout Itemize
7256 \begin_layout Itemize
7264 \begin_layout Itemize
7272 \begin_layout Itemize
7277 : [optional] if more than one author: whom to contact for offprint requests.
7280 \begin_layout Itemize
7285 : [optional] mail address for contacts.
7288 \begin_layout Itemize
7296 Received: <date>; Accepted <date>
7299 \begin_layout Standard
7300 There is no need to issue the
7306 command, this is done automatically by LyX when the header is finished.
7307 Although the order of the single header entries doesn't matter it is advised
7308 to keep the above sequence, just to get the best optics and meets the layout
7309 of the real document.
7312 \begin_layout Standard
7313 If you want to place footnotes in the header block, e.
7314 \begin_inset space \thinspace{}
7318 \begin_inset space \space{}
7321 to state your present address, just use the standard footnote via the menu
7324 Insert\SpecialChar \menuseparator
7328 LyX will automagically use the term
7337 \begin_layout Standard
7338 In addition to these topics, the macros use three additional LaTeX commands
7339 that have no counterpart in LyX:
7342 \begin_layout Itemize
7349 to separate different names for more than one author and institute, respectivel
7353 \begin_layout Itemize
7360 to mark corresponding author/institute pairs.
7361 The institutes are numbered sequentially as they appear in the
7365 field, so you have to put a marker to each author.
7368 \begin_layout Itemize
7375 to supply an email address for fast contact.
7378 \begin_layout Standard
7379 In all cases, the appropriate command has to be entered in LyX and marked
7385 \begin_layout Subsection
7389 \begin_layout Standard
7390 The abstract should immediately follow the header block.
7391 With version 5 the abstract environment was changed to a command, and there
7392 is now a resctriction to only one paragraph.
7393 In addition, it should contain an entry with the keywords.
7394 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7401 by hand and mark it as LaTeX code.
7402 Refer to the example paper.
7405 \begin_layout Subsection
7406 Supported environments
7409 \begin_layout Standard
7410 The A&A paper layout supports the following environments for structuring
7414 \begin_layout Itemize
7420 \begin_layout Itemize
7426 \begin_layout Itemize
7432 \begin_layout Itemize
7438 \begin_layout Itemize
7444 \begin_layout Itemize
7450 \begin_layout Itemize
7456 \begin_layout Itemize
7462 \begin_layout Itemize
7468 \begin_layout Itemize
7474 \begin_layout Itemize
7480 \begin_layout Itemize
7486 \begin_layout Subsection
7487 Commands not supported by LyX
7490 \begin_layout Standard
7491 Some commands are not yet supported by the
7496 Some have already been mentioned.
7497 For the sake of completeness, they are listed all together here:
7500 \begin_layout Itemize
7508 \begin_layout Itemize
7516 \begin_layout Itemize
7524 \begin_layout Itemize
7532 \begin_layout Itemize
7540 \begin_layout Itemize
7548 \begin_layout Itemize
7556 \begin_layout Itemize
7564 \begin_layout Standard
7565 If you want to use any of these commands, you have to enter them yourself.
7568 Do not forget to mark them as LaTeX code!
7571 \begin_layout Subsection
7572 Figure and Table Floats
7575 \begin_layout Standard
7576 LyX provides support for the necessary float environments
7578 figure, figure*, table
7584 , therefore we won't tell much about it here.
7588 \begin_inset space ~
7594 Just remember that tables should be left-aligned.
7595 For that, select the table and change the alignment in
7597 Edit\SpecialChar \menuseparator
7599 \begin_inset space ~
7605 \begin_layout Standard
7606 There is only one special thing: the figures with caption besides the figure.
7607 To create such a figure, you have to do the following:
7610 \begin_layout Enumerate
7611 Create a wide figure float:
7613 Insert\SpecialChar \menuseparator
7614 Float\SpecialChar \menuseparator
7617 , then right click in the figure and select
7623 \begin_inset space ~
7631 \begin_layout Enumerate
7632 Enter your caption text.
7635 \begin_layout Enumerate
7640 to move the cursor above the caption.
7643 \begin_layout Enumerate
7647 \begin_layout Enumerate
7648 Position the cursor behind the figure and insert a horizontal fill:
7650 Insert\SpecialChar \menuseparator
7652 \begin_inset space ~
7655 Character\SpecialChar \menuseparator
7657 \begin_inset space ~
7665 \begin_layout Enumerate
7666 Switch to LaTeX mode:
7669 \begin_inset space ~
7677 \begin_layout Enumerate
7687 Do not close the brace!
7690 \begin_layout Enumerate
7691 Position the cursor behind the caption text, switch to LaTeX mode and insert
7695 \begin_inset space ~
7707 \begin_layout Standard
7708 Also, refer to the figures in the example paper.
7711 \begin_layout Subsection
7715 \begin_layout Standard
7716 For submission, the paper has to be formated in a special double-spacing
7718 For this purpose, you have to give the option
7722 to the documentclass.
7723 This must be done using the extra class options field in the
7725 Document\SpecialChar \menuseparator
7729 Just enter the string
7736 \begin_layout Subsection
7740 \begin_layout Standard
7745 directory contains an example paper written with LyX.
7746 It is the example paper from the original macro package, translated to
7748 Use it for inspiration, and compare the original LaTeX code with LyX way
7752 \begin_layout Section
7756 \begin_layout Standard
7762 \begin_layout Subsection
7766 \begin_layout Standard
7767 AASTeX is a set of macros produced by the American Astronomical Society
7768 to facilitate electronic manuscript submission to the three journals they
7769 publish: the Astrophysical Journal (including the Letters and Supplement),
7770 the Astronomical Journal, and the Publications of the Astronomical Society
7772 LyX has proven to be an excellent tool for generating these documents,
7773 especially given its equation, citation, and figure handling capabilities.
7774 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7775 is the version described here, or higher.
7776 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7777 incompatible with LyX.
7778 The AASTeX package may be downloaded from the AASTeX Web site
7781 \begin_layout Standard
7782 \begin_inset VSpace medskip
7788 \begin_layout Standard
7790 \begin_inset Flex URL
7793 \begin_layout Plain Layout
7795 http://www.journals.uchicago.edu/AAS/AASTeX
7803 \begin_layout Standard
7804 \begin_inset VSpace medskip
7810 \begin_layout Standard
7811 A complete user guide is contained in that package and you should familiarize
7812 yourself with it thoroughly before embarking on writing a paper in LyX.
7813 LyX will not reduce the need to figure out all the AASTeX commands, it
7814 will only reduce the drudgery of typing everything in.
7815 It is your responsibility to ensure that the final exported LaTeX document
7816 conforms completely to the requirements of the journal to which you are
7817 submitting your paper.
7820 \begin_layout Subsection
7821 Starting a New Paper
7824 \begin_layout Standard
7825 I strongly suggest that you start with the AASTeX template file.
7828 File\SpecialChar \menuseparator
7835 , enter the new file name, then choose the
7840 This will show the most common fields found in a manuscript.
7841 Simply overwrite the existing text (including the brackets,
7845 ) with the correct information.
7846 Many of the AASTeX commands and environments can be implemented directly
7847 in LyX, but some cannot: most noticeably
7859 , which should stick out like a sore thumb if you actually just opened the
7861 For commands such as these, the LaTeX code must be entered directly and
7863 Such commands are referred to as TeX code, or Evil Red Text.
7864 I tried to minimize the amount of TeX code needed in an AASTeX document,
7865 but there is still a bit more required than any of us would like.
7868 \begin_layout Subsection
7869 Finishing Your Paper
7872 \begin_layout Standard
7873 When the paper is finished to your satisfaction and previews/prints correctly,
7875 \begin_inset Quotes eld
7879 \begin_inset Quotes erd
7882 actions which need to be done before you submit it to the journals.
7886 \begin_layout Enumerate
7887 Export your paper as a LaTeX file (
7889 File\SpecialChar \menuseparator
7890 Export\SpecialChar \menuseparator
7897 \begin_layout Enumerate
7902 file with your favorite text editor
7906 \begin_layout Enumerate
7907 remove the comment lines before the
7916 \begin_layout Enumerate
7921 usepackage...{fontenc}
7923 line if it appears (usually just after
7938 \begin_layout Enumerate
7939 remove everything between (and including) the
7951 commands, except for any commands you specifically put into the LaTeX preamble
7952 (which should appear immediately after the
7953 \begin_inset Quotes eld
7956 User specified LaTeX commands
7957 \begin_inset Quotes erd
7968 \begin_layout Enumerate
7969 Run the resulting file through LaTeX to make sure it still processes correctly.
7972 \begin_layout Enumerate
7973 Reread the journal requirements to make sure your filenames and formats
7977 \begin_layout Enumerate
7981 \begin_layout Subsection
7982 Comments On Specific Commands
7985 \begin_layout Standard
7986 I will not describe the detailed usage of the individual AASTeX commands:
7987 the AASTeX User Guide (
7991 ) gives a good description of each.
7992 Thus it's probably easiest for me to go down the list as found in the guide
7993 and offer comments where necessary.
7994 So let's begin \SpecialChar \ldots{}
7998 \begin_layout Subsubsection
7999 Things that work as expected
8002 \begin_layout Standard
8006 \begin_layout Plain Layout
8018 \begin_layout Standard
8019 Because they work as you might expect, I simply list them and the section
8120 begin{thebibliography}
8128 (2.13.2), all the cite commands and their variations (2.13.2), the generic
8129 graphicx figure commands (2.14.1),
8153 (2.15.4, amongst other places),
8180 \begin_layout Standard
8181 The following style options also work correctly:
8202 Simply put them in the
8208 Layout\SpecialChar \menuseparator
8214 \begin_layout Standard
8218 \begin_layout Plain Layout
8230 \begin_layout Subsubsection
8231 Things that work, but require more comment
8234 \begin_layout Standard
8235 The following items work, but require a little more discussion:
8238 \begin_layout Itemize
8239 These items are reserved for use by the journal editors, but you can put
8240 them into the LaTeX preamble if you feel compelled to do so:
8273 \begin_layout Itemize
8274 These items may be placed in the LaTeX preamble, and are included as blanks
8275 in the template file:
8296 \begin_layout Itemize
8303 (2.3) – can only be used
8304 \begin_inset Quotes eld
8308 \begin_inset Quotes erd
8311 , not in the middle of a paragraph.
8312 Use TeX code if you need to embed it.
8315 \begin_layout Itemize
8322 (2.3) – will have extra {} after it.
8323 This should not cause an error.
8326 \begin_layout Itemize
8333 (2.6) – can only be used
8334 \begin_inset Quotes eld
8338 \begin_inset Quotes erd
8341 , not in the middle of a paragraph.
8342 Use TeX code if you need to embed it.
8345 \begin_layout Itemize
8352 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8356 \begin_layout Itemize
8370 \begin_layout Itemize
8377 (2.9) – will have extra {} after it.
8378 This should not cause an error.
8381 \begin_layout Itemize
8388 (2.11) – will have extra {} after it.
8389 This should not cause an error.
8392 \begin_layout Itemize
8399 (2.14.2) – you can insert an optional filename argument by placing the cursor
8400 at the beginning of the text and selecting
8402 Insert\SpecialChar \menuseparator
8407 \begin_inset Quotes eld
8411 \begin_inset Quotes erd
8414 inserts an optional argument of the type needed by
8421 Hopefully it will be renamed someday.
8424 \begin_layout Itemize
8437 for the catalog ID optional parameter
8440 \begin_layout Itemize
8453 for the catalog ID optional parameter
8456 \begin_layout Subsubsection
8457 Things not implemented, use TeX code
8460 \begin_layout Standard
8464 \begin_layout Plain Layout
8476 \begin_layout Standard
8499 setcounter{equation}
8501 (2.12), Journal name abbreviations (2.13.4),
8537 (2.15.4, insert it as the first element in the lefthand cell after where
8539 Don't use any of LyX's rules in the table),
8551 (2.15.5), much of Misc (2.17, except
8602 \begin_layout Standard
8606 \begin_layout Plain Layout
8618 \begin_layout Subsubsection
8619 Things that cannot be implemented
8622 \begin_layout Standard
8623 \SpecialChar \ldots{}
8624 at least in any meaningful sort of way, so I suggest ignoring them.
8625 They are the references environment (2.13.3), and the deluxetable environment
8627 If you really, really need to use deluxetable, I suggest editing it in
8628 a separate file with a text editor, then using
8630 Insert\SpecialChar \menuseparator
8632 \begin_inset space ~
8637 to include it in your LyX document.
8642 file to see an example of this.
8645 \begin_layout Subsection
8646 FAQs, Tips, Tricks, and Other Ruminations
8649 \begin_layout Subsubsection
8650 Getting LyX and AASTeX to cooperate
8653 \begin_layout Standard
8654 It can be a bit tricky to get LyX to recognize a new layout and document
8656 When all else fails, do this:
8659 \begin_layout Enumerate
8660 Make certain that LaTeX can find AASTeX.
8661 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8662 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8669 \begin_layout Enumerate
8681 \begin_layout Enumerate
8684 Tools\SpecialChar \menuseparator
8687 in LyX, then restart LyX.
8690 \begin_layout Enumerate
8691 Open a regular new file, not from a template.
8692 Does AASTeX appear in the class list in
8694 Document\SpecialChar \menuseparator
8700 \begin_layout Standard
8701 If you get a warning from an existing AASTeX document about not being able
8702 to find the AASTeX layout or a message about
8703 \begin_inset Quotes eld
8706 You should not mix title layouts with normal ones
8707 \begin_inset Quotes erd
8710 , things haven't been installed correctly.
8713 \begin_layout Subsubsection
8714 LaTeX error processing a table
8717 \begin_layout Standard
8718 LyX, by default, attempts to center the table caption/title.
8719 This seems to produce a bad interaction in AASTeX so you should click somewhere
8720 in the caption/title, then select
8722 Edit\SpecialChar \menuseparator
8724 \begin_inset space ~
8738 This took care of it for me.
8741 \begin_layout Subsubsection
8745 \begin_layout Standard
8746 A couple of things: 1) I have noticed some funny spacing in the reference
8747 entries in the text.
8748 When you enter the bibliography item data, make sure their is
8752 space between the last author and the parenthesis setting off the year;
8756 \begin_inset space \thinspace{}
8760 \begin_inset space \space{}
8774 2) Entering the references at all is not obvious.
8775 The easiest thing is to start typing your first reference at the end of
8776 the document, then mark it as type
8781 That will put a small gray box in front of what you just typed.
8782 Click on the box to fill in the rest of the information.
8783 For new references, go to the end of an existing reference and press return.
8784 That will create a new line with its own box, etc.
8787 \begin_layout Subsubsection
8791 \begin_layout Standard
8792 Even though AASTeX provides its own figure commands (
8798 , for example), I much prefer LaTeX's standard figure commands (with the
8807 \begin_inset space ~
8810 commands as TeX code into a Figure Float box if you desire, but I never
8811 have much luck getting the layout right.
8812 With the standard graphics, LyX will insert a
8816 usepackage{graphicx}
8818 command into the LaTeX preamble and handle the figures in the standard
8819 LaTeX2e way, interspersing the figures in the text.
8820 I believe ApJ accepts figures exactly this way now; AJ might still use
8822 \begin_inset Quotes eld
8825 stack everything at the end
8826 \begin_inset Quotes erd
8832 \begin_layout Subsubsection
8833 Things I could have done, but didn't
8836 \begin_layout Standard
8838 \begin_inset Quotes eld
8842 \begin_inset Quotes erd
8845 things I could have implemented, but chose not to.
8846 For instance, I saw no point in double-spacing the text in the LyX window,
8847 even though it is double-spaced in the paper manuscript.
8848 Also, I chose not to make separate layouts for the preprint and preprint2
8850 Since I assume you will spend most of your time in the plain manuscript
8851 mode anyway, I decided not to chew up more disk space with this.
8855 \begin_layout Subsection
8859 \begin_layout Standard
8860 Your mileage may vary.
8861 I've now had papers published by both ApJ and AJ that have had 98% of the
8862 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8864 I have had no trouble with the submission process, and I'm sure the journals
8865 were never aware that there might be a difference.
8866 So, go forth and publish!
8869 \begin_layout Section
8873 \begin_layout Standard
8876 David Johnson; updated by Richard Heck
8879 \begin_layout Standard
8880 \begin_inset VSpace bigskip
8886 \begin_layout Standard
8888 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8889 papers to be submitted to American Mathematical Society publications.
8890 The layouts are not tailored to a specific journal, but easily can be.
8891 You should refer to the AMS documentation for specific instructions for
8892 each journal (usually it will entail only changing a single line in the
8894 That documentation is available on the Web at
8895 \begin_inset Flex URL
8898 \begin_layout Plain Layout
8906 \begin_inset Flex URL
8909 \begin_layout Plain Layout
8911 ftp://ftp.ams.org/pub/tex/amslatex/
8917 These layouts are appropriate, and useful, for any mathematical writing.
8921 \begin_layout Standard
8922 There are two basic AMS LaTeX layouts:
8925 \begin_layout Itemize
8926 amsart: The standard AMS article format.
8929 \begin_layout Itemize
8930 amsbook: the standard AMS book (really, monograph) format.
8934 \begin_layout Standard
8935 The layouts themselves contain only the minimum necessary to use the AMS
8937 They do not, in particular, contain any of the `theorem' environments used
8938 for setting theorems, lemmas, and the like.
8939 These are contained, instead, in the
8940 \begin_inset Flex Code
8943 \begin_layout Plain Layout
8949 module, which is loaded by default when when you select one of the AMS
8951 (It can also be used with other classes and can be removed, if you would
8952 rather use something else.) Less commonly used environments are in the
8953 \begin_inset Flex Code
8956 \begin_layout Plain Layout
8957 Theorems (AMS-Extended)
8962 module, which must be loaded manually.
8965 \begin_layout Standard
8966 By default, theorems and the like are numbered consecutively throughout
8967 the document, but this may be modified by loading the module
8968 \begin_inset Flex Code
8971 \begin_layout Plain Layout
8972 Theorems (Order by Section)
8977 or, if you are using
8978 \begin_inset Flex Code
8981 \begin_layout Plain Layout
8988 \begin_inset Flex Code
8991 \begin_layout Plain Layout
8992 Theorems (Order by Chapter)
8998 These will number the results as
8999 \begin_inset Formula $n.m$
9002 , where the first number refers to the section (or chapter) and the second
9003 refers to the total number of results so far in that section (or chapter).
9004 Many environments are also available unnumbered.
9005 These are indicated by an asterisk at the end.
9006 If you happen to want
9010 unnumbered results, the module
9011 \begin_inset Flex Code
9014 \begin_layout Plain Layout
9020 provides that option.
9023 \begin_layout Standard
9024 Note that these modules do not
9028 to be used with the AMS classes.
9029 It is perfectly possible to use the
9030 \begin_inset Flex Code
9033 \begin_layout Plain Layout
9039 module, and the others mentioned, with other classes, such as
9040 \begin_inset Flex Code
9043 \begin_layout Plain Layout
9050 \begin_inset Flex Code
9053 \begin_layout Plain Layout
9060 \begin_inset Flex Code
9063 \begin_layout Plain Layout
9072 \begin_layout Subsection
9073 What these layouts provide
9076 \begin_layout Standard
9077 There is a long list of included environments provided by these layouts.
9078 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9079 variety of `theorem' environments.
9080 However, the AMS recommends the environments that are available in LyX.
9084 \begin_layout Standard
9085 The following environments—as well as the standard environments, such as
9087 \begin_inset Flex Noun
9090 \begin_layout Plain Layout
9097 \begin_inset Flex Noun
9100 \begin_layout Plain Layout
9107 \begin_inset Flex Noun
9110 \begin_layout Plain Layout
9117 \begin_inset Flex Noun
9120 \begin_layout Plain Layout
9127 \begin_inset Flex Noun
9130 \begin_layout Plain Layout
9137 \begin_inset Flex Code
9140 \begin_layout Plain Layout
9147 \begin_inset Flex Code
9150 \begin_layout Plain Layout
9159 \begin_layout Description
9160 Address This should be the author's permanent address.
9163 \begin_layout Description
9165 \begin_inset space ~
9168 Address This should be the author's temporary address at the time of submission,
9169 if different from the Address.
9172 \begin_layout Description
9173 Email Author's e-mail address
9176 \begin_layout Description
9177 URL Author's Web address, if desired.
9180 \begin_layout Description
9181 Keywords Key words or phrases used to identify specific topics discussed
9185 \begin_layout Description
9186 Subjectclass These refer to the AMS Subject Classifications, published and
9189 Mathematical Reviews
9192 These are also available online at the AMS cites listed above.
9195 \begin_layout Description
9199 \begin_layout Description
9203 \begin_layout Description
9207 \begin_layout Standard
9208 The following environments are provided by both the
9209 \begin_inset Flex Code
9212 \begin_layout Plain Layout
9219 \begin_inset Flex Code
9222 \begin_layout Plain Layout
9228 modules, in the latter case in both starred (unnumbered) and unstarred
9229 (numbered) versions.
9230 These same environments are provided only in the starred versions by the
9232 \begin_inset Flex Code
9235 \begin_layout Plain Layout
9244 \begin_layout Theorem
9245 This is typically used for the statements of major results.
9249 \begin_layout Corollary*
9250 This is used for statements which follow fairly directly from previous statement
9252 Again, these can be major results.
9257 These are smaller results needed to prove other statements.
9260 \begin_layout Proposition
9261 These are less major results which (hopefully) add to the general theory
9265 \begin_layout Conjecture
9266 These are statements provided without justification, which the author does
9267 not know how to prove, but which seem to be true (to the author, at least).
9270 \begin_layout Definition*
9271 Guess what this is for.
9272 The font is different for this environment than for the previous ones.
9276 \begin_layout Example*
9277 Used for examples illustrating proven results.
9280 \begin_layout Problem
9281 It's not really known what this is for.
9282 You should figure it out.
9285 \begin_layout Exercise*
9286 Write a description for this one.
9289 \begin_layout Remark
9290 This environment is also a type of theorem, usually a lesser sort of observation.
9293 \begin_layout Claim*
9294 Often used in the course of giving a proof of a larger result.
9298 Generally, these are used to break up long arguments, using specific instances
9304 The numbering scheme for cases is on its own, not together with other numbered
9310 At the end of this environment, a QED symbol (usually a square, but it can
9311 vary with different styles) is placed.
9312 If you want to have other environments within this one—for example, Case
9313 environments—and have the QED symbol appear only after them, then the other
9314 environments need to be nested within the proof environment.
9317 Nesting Environments
9323 for information on nesting.
9326 \begin_layout Standard
9327 And these environments are provided by
9328 \begin_inset Flex Code
9331 \begin_layout Plain Layout
9332 Theorems (AMS-Extended)
9340 \begin_layout Criterion*
9341 A required condition.
9344 \begin_layout Algorithm*
9345 A general procedure to be used.
9348 \begin_layout Axiom*
9349 This is a property or statement taken as true within the system being discussed.
9352 \begin_layout Condition*
9353 Sometimes used to state a condition assumed within the present context of
9358 Similar to a Remark.
9361 \begin_layout Notation*
9362 Used for the explanation of, yes, notation.
9365 \begin_layout Summary
9366 Do we really need to tell you?
9369 \begin_layout Acknowledgement*
9373 \begin_layout Conclusion*
9374 Sometimes used at the end of a long train of argument.
9378 Used in a way similar to Proposition, though perhaps lower on the scale.
9381 \begin_layout Standard
9382 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9384 They need to be available on your system in order to use these environments.
9387 \begin_layout Section
9395 \begin_layout Standard
9401 \begin_layout Subsection
9405 \begin_layout Standard
9406 These are the layout files for some of the journals of the American Geophysical
9408 It is assumed that you have both the AGU's own class files and AGUplus
9409 installed (everything to be found at
9410 \begin_inset Flex URL
9413 \begin_layout Plain Layout
9415 ftp://ftp.agu.org/journals/latex/journals
9423 \begin_layout Subsection
9427 \begin_layout Standard
9437 They are still called this in the LyX GUI, though their LaTeX equivalents
9438 in the AGU classes are
9449 \begin_layout Standard
9450 Newly defined styles are
9487 These are mostly manuscript attributes and defined in the AGU class documentati
9491 \begin_layout Standard
9492 I suspect this is still badly incomplete.
9495 \begin_layout Subsection
9499 \begin_layout Standard
9516 \begin_layout Subsection
9520 \begin_layout Itemize
9523 Journal of Geophysical Research
9532 \begin_layout Standard
9533 Add your own, it isn't so hard! Look at the
9544 \begin_layout Subsection
9545 Bugs and things to remember
9548 \begin_layout Standard
9549 In order to use the new layouts, you must remember to do the following for
9553 \begin_layout Enumerate
9559 This can be done in the
9561 Layout\SpecialChar \menuseparator
9566 Document\SpecialChar \menuseparator
9570 (AGU articles are always in English, right? So
9577 \begin_layout Enumerate
9587 (Yes, this is a bug.)
9590 \begin_layout Enumerate
9591 Make sure you use the
9595 bibliography style, by entering
9599 into the second field of the BibTeX inset.
9600 None of the standard styles will do.
9603 \begin_layout Section
9607 \begin_layout Standard
9613 \begin_layout Subsection
9617 \begin_layout Standard
9618 Broadway is for writing plays.
9619 The format is more decorative than Hollywood, and much less standardized.
9620 This format should be suitable for workshops.
9623 \begin_layout Subsection
9627 \begin_layout Standard
9628 The same as in Hollywood.
9631 \begin_layout Subsection
9635 \begin_layout Standard
9640 names as labels then cross-reference the label to insert the name.
9641 The cross-reference dialog will show the current cast of characters.
9644 \begin_layout Subsection
9645 Paper size and Margins
9648 \begin_layout Standard
9649 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9652 \begin_layout Subsection
9656 \begin_layout Standard
9657 The following environments are available.
9658 You can use broadway.bind to get the bind keys shown at the right.
9661 \begin_layout Itemize
9665 \begin_inset Newline newline
9670 You should not have to use this, but it is here for anything that does not
9674 \begin_layout Itemize
9678 \begin_inset space \hfill{}
9682 \begin_inset Newline newline
9687 Used to describe stage setting and the action.
9688 First use of speaker names in all CAPs.
9691 \begin_layout Itemize
9695 \begin_inset space \hfill{}
9699 \begin_inset Newline newline
9704 Automatically numbered.
9705 On screen it will be arabic, but will print as Roman.
9708 \begin_layout Itemize
9712 \begin_inset space \hfill{}
9716 \begin_inset Newline newline
9726 It is just centered text.
9729 \begin_layout Itemize
9733 \begin_inset space \hfill{}
9737 \begin_inset Newline newline
9742 Not automatically numbered.
9743 You supply the number.
9744 This is because I couldn't figure out how.
9747 \begin_layout Itemize
9751 \begin_inset space \hfill{}
9755 \begin_inset Newline newline
9760 A special case of Narrative to describe the setting and action as the curtain
9764 \begin_layout Itemize
9768 \begin_inset space \hfill{}
9772 \begin_inset Newline newline
9777 The speaker's (actor's) title, centered in all CAPS.
9780 \begin_layout Itemize
9784 \begin_inset space \hfill{}
9788 \begin_inset Newline newline
9793 Instructions to the speaker.
9794 The parentheses are automatically inserted.
9795 The ( will appear on screen, but both will be in the printed play.
9796 This environment is only used within
9803 \begin_layout Itemize
9807 \begin_inset space \hfill{}
9811 \begin_inset Newline newline
9816 What the Speaker says.
9819 \begin_layout Itemize
9823 \begin_inset space \hfill{}
9827 \begin_inset Newline newline
9832 The curtain comes down.
9835 \begin_layout Itemize
9839 \begin_inset space \hfill{}
9845 \begin_layout Itemize
9849 \begin_inset space \hfill{}
9855 \begin_layout Itemize
9859 \begin_inset space \hfill{}
9865 \begin_layout Standard
9869 \begin_layout Section
9873 \begin_layout Standard
9878 can be used to type letters according to German conventions.
9879 A template file is included in
9881 .../lyx/share/templates
9883 for you to use as a starting point.
9886 \begin_layout Section
9894 \begin_layout Standard
9900 \begin_layout Subsection
9904 \begin_layout Standard
9905 This is the layout file for the European Geophysical Society journals.
9910 can be downloaded from the web site of the EGS under
9911 \begin_inset Flex URL
9914 \begin_layout Plain Layout
9924 \begin_layout Subsection
9928 \begin_layout Standard
9931 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9939 The current layout file is unfortunately very unmodular and would benefit
9940 from using the various
9947 \begin_layout Section
9951 \begin_layout Standard
9957 \begin_layout Standard
9958 Elsevier Science Publishers B.V.
9959 provides a standard LaTeX document class (
9963 ) for submitting articles to their various journals.
9964 The style file can be downloaded directly from their web site:
9965 \begin_inset Flex URL
9968 \begin_layout Plain Layout
9970 http://www.elsevier.com/wps/find/authorsview.authors/latex
9976 Instructions are supplied along with the class file, which details the
9977 requirements of the publishers.
9978 LyX includes a package that allows for the use of this class, by a layout
9979 and a template file.
9980 Installation of the class file is the same as for any other LaTeX package;
9981 instructions are provided in the Elsevier documentation.
9984 \begin_layout Standard
9994 As the Elsevier class file is based mainly on the standard article class,
9995 most of the normal functionality is provided.
9996 The Elsevier class defines a number of mathematical environments, which
9997 are similar to the AMS environments.
9998 These commands are all described in the Elsevier documentation, and are
10002 \begin_layout Standard
10003 The easiest way to use the Elsevier style is to base documents on the included
10005 It is best not to use options such as fancy headings or the geometry package,
10006 as elements such as these are defined by Elsevier in their style file.
10007 Ideally, no extra packages except those mentioned in the Elsevier documentation
10009 Essentially, Elsevier require as
10010 \begin_inset Quotes eld
10014 \begin_inset Quotes erd
10017 a LaTeX file as possible, as their intention is to take the supplied file
10018 and replace the class file with one for the particular journal to which
10019 the paper has been submitted.
10020 This also means that not too much time should be spent on the formating
10022 When it comes to be published, this will change anyway.
10023 The rest of the usage for this layout is substantially the same as for
10024 the normal article class.
10025 For details of what Elsevier do and don't allow, refer to their documentation.
10028 \begin_layout Section
10034 \begin_inset CommandInset label
10043 \begin_layout Standard
10049 \begin_layout Subsection
10053 \begin_layout Standard
10054 This section describes how to use LyX to make slides for overhead projectors.
10055 There are two document classes that can do this: the default slides class
10061 This section documents the latter.
10064 \begin_layout Standard
10065 I'm going to say this again, nice and clear, so that there's no misunderstanding
10069 \begin_layout Standard
10070 \begin_inset VSpace bigskip
10076 \begin_layout Standard
10080 This section documents the class
10081 \begin_inset Quotes eld
10089 \begin_inset Quotes erd
10097 \begin_layout Standard
10098 \begin_inset VSpace bigskip
10104 \begin_layout Standard
10105 If you're looking for the documentation for
10106 \begin_inset Quotes eld
10114 \begin_inset Quotes erd
10117 , check out section
10118 \begin_inset space ~
10122 \begin_inset CommandInset ref
10124 reference "sec:slitex"
10129 If your machine doesn't have the
10134 \begin_inset Quotes eld
10142 \begin_inset Quotes erd
10145 ] installed, you'll probably have to use the default
10149 class, which isn't quite as good as
10154 \begin_layout Standard
10159 class is designed for use with version 2.1 of the
10163 LaTeX class file which is now an integral part of LaTeX2e.
10166 \begin_layout Subsection
10170 \begin_layout Standard
10171 Obviously, to use this document class, you need to select
10172 \begin_inset Quotes eld
10180 \begin_inset Quotes erd
10190 \begin_inset space ~
10196 There are some settings in the
10199 \begin_inset space ~
10204 dialog that you should know about that are specific to this class:
10207 \begin_layout Itemize
10208 Don't change the options
10219 \begin_inset space ~
10225 They're ignored by the
10232 \begin_layout Itemize
10233 The default font size is 20
10234 \begin_inset space \thinspace{}
10237 pt with the other options being 17
10238 \begin_inset space \thinspace{}
10242 \begin_inset space \thinspace{}
10246 \begin_inset space \thinspace{}
10252 \begin_layout Itemize
10253 The default font is
10261 but all math equations are still typeset in the usual roman font.
10264 \begin_layout Itemize
10269 supports A4 and Letter paper sizes as well as a special size for working
10271 \begin_inset space \thinspace{}
10275 It doesn't support A5, B5, legal or executive paper sizes.
10278 \begin_layout Itemize
10279 Don't bother changing the
10283 settings because they are ignored anyway.
10284 All floats appear where they are defined in the text.
10287 \begin_layout Itemize
10292 setting behaves a bit differently for this class.
10297 provides extensive footer and header capabilities including a user-defined
10300 \begin_inset space ~
10304 \begin_inset CommandInset ref
10306 reference "sec:foilfoot"
10311 The title page is treated differently to all other pages in the document
10320 has the logo centered at the bottom of the page (if one is defined).
10321 The possible page style choices and what they do are as follows:
10325 \begin_layout Labeling
10326 \labelwidthstring MMMMMMM
10333 The final output contains no page numbers, or other headers or footers
10334 (except footnotes of course).
10338 \begin_layout Labeling
10339 \labelwidthstring MMMMMMM
10346 The final output contains page numbers centered at the bottom of the page.
10347 No other headings or footers (other than footnotes).
10350 \begin_layout Labeling
10351 \labelwidthstring MMMMMMM
10356 Page numbers in lower right corner.
10357 Additional headers and footers are also shown.
10358 This is also the default.
10361 \begin_layout Labeling
10362 \labelwidthstring MMMMMMM
10367 Gives you access to the
10371 package although its use with
10375 is discouraged by the writer of the
10379 package because of some potential page layout clashes.
10383 \begin_layout Subsubsection
10387 \begin_layout Standard
10388 The following options may be used in the extra class options in the
10390 Document\SpecialChar \menuseparator
10396 \begin_layout Labeling
10397 \labelwidthstring MMMMMMx
10402 This sets up the page layout for 7.33
10403 \begin_inset space \thinspace{}
10407 \begin_inset space \thinspace{}
10410 in paper, which is about the same aspect ratio as a 35
10411 \begin_inset space \thinspace{}
10414 mm slide, making it a bit easier to work with this medium.
10417 \begin_layout Labeling
10418 \labelwidthstring MMMMMMx
10423 Places a rule across the page below the header on every page except the
10427 \begin_layout Labeling
10428 \labelwidthstring MMMMMMx
10433 Places a rule across the page above the footer on every page except the
10437 \begin_layout Labeling
10438 \labelwidthstring MMMMMMx
10443 This is automatically set each time you create a new
10452 to use the dvips driver to rotate those pages that are set as landscape
10456 \begin_layout Labeling
10457 \labelwidthstring MMMMMMx
10462 Simply changes the page dimensions to those of a landscape page but doesn't
10464 Thus if you use this option you need to use an external program to rotate
10465 each page or feed your paper through your printer as landscape.
10466 Note that this option effectively reverses the roles of the
10474 environments (don't worry these are described in the next section).
10477 \begin_layout Labeling
10478 \labelwidthstring MMMMMMx
10483 Equation numbers on the left.
10486 \begin_layout Labeling
10487 \labelwidthstring MMMMMMx
10492 Flush-left equations.
10495 \begin_layout Subsection
10496 Supported Environments
10499 \begin_layout Standard
10500 Most of the environments commonly supported in other classes are also supported
10506 There are several additional environments provided by
10510 as well as a couple added by LyX.
10511 The following environments are shared with other classes:
10514 \begin_layout Standard
10518 \begin_layout Plain Layout
10522 begin{multicols}{2}
10530 \begin_layout Itemize
10536 \begin_layout Itemize
10542 \begin_layout Itemize
10548 \begin_layout Itemize
10554 \begin_layout Itemize
10560 \begin_layout Itemize
10566 \begin_layout Itemize
10572 \begin_layout Itemize
10578 \begin_layout Itemize
10584 \begin_layout Itemize
10590 \begin_layout Itemize
10596 \begin_layout Itemize
10602 \begin_layout Itemize
10608 \begin_layout Itemize
10614 \begin_layout Itemize
10620 \begin_layout Itemize
10626 \begin_layout Itemize
10632 \begin_layout Itemize
10638 \begin_layout Standard
10642 \begin_layout Plain Layout
10654 \begin_layout Standard
10655 That is, all the major environments apart from the sectioning environments.
10656 Since foils are essentially self-contained sections, with a title and body,
10661 provides specific commands for starting new foils and these are:
10664 \begin_layout Itemize
10670 \begin_layout Itemize
10676 \begin_layout Standard
10677 LyX also provides slightly modified versions of these two environments called:
10680 \begin_layout Itemize
10686 \begin_layout Itemize
10689 ShortRotatefoilhead
10692 \begin_layout Standard
10693 and the differences will be explained in the next section.
10696 \begin_layout Standard
10697 Since foils are often used in presenting ideas or new theorems and such
10702 also provides a comprehensive box of goodies for presenting them:
10705 \begin_layout Standard
10709 \begin_layout Plain Layout
10713 begin{multicols}{2}
10721 \begin_layout Itemize
10727 \begin_layout Itemize
10733 \begin_layout Itemize
10739 \begin_layout Itemize
10745 \begin_layout Itemize
10751 \begin_layout Itemize
10757 \begin_layout Itemize
10763 \begin_layout Itemize
10769 \begin_layout Itemize
10775 \begin_layout Itemize
10781 \begin_layout Itemize
10787 \begin_layout Standard
10791 \begin_layout Plain Layout
10803 \begin_layout Standard
10804 The starred versions are unnumbered while the unstarred versions are numbered.
10805 There are also two list environments added by LyX and these are:
10808 \begin_layout Itemize
10814 \begin_layout Itemize
10820 \begin_layout Standard
10825 provides some powerful header and footer capabilities that are best set
10826 in the preamble although they may be set at any point in a document.
10827 If you want to change these settings in your document the best place to
10828 do so is at the very top of a foil, i.
10829 \begin_inset space \thinspace{}
10835 \begin_inset space \space{}
10840 straight after the foilhead.
10843 \begin_layout Standard
10844 For this purpose, the following command styles are provided [
10851 \begin_layout Standard
10855 \begin_layout Plain Layout
10859 begin{multicols}{2}
10867 \begin_layout Itemize
10871 \begin_inset space ~
10877 \begin_layout Itemize
10883 \begin_layout Itemize
10887 \begin_inset space ~
10893 \begin_layout Itemize
10897 \begin_inset space ~
10903 \begin_layout Itemize
10907 \begin_inset space ~
10914 \begin_layout Standard
10915 \begin_inset space ~
10922 \begin_layout Standard
10926 \begin_layout Plain Layout
10938 \begin_layout Standard
10939 There are also a few commands provided by
10943 that aren't directly supported by LyX but I'll tell you what they do and
10944 how to use them in section
10945 \begin_inset space ~
10949 \begin_inset CommandInset ref
10951 reference "sec:unsuppfoils"
10958 \begin_layout Subsection
10959 Building a Set of Foils
10962 \begin_layout Standard
10963 This section will give a simple introduction to using the different environments
10964 to build a set of foils.
10965 If you want to see an example set of foils, take a look at the
10969 file you find in LyX's
10976 \begin_layout Subsubsection
10977 Give It a Title Page
10980 \begin_layout Standard
10981 Unlike other classes that provide
11001 creates the title on a page of its own.
11002 If you leave out the
11006 environment LaTeX will substitute the current date (every time you regenerate
11010 \begin_layout Subsubsection
11014 \begin_layout Standard
11015 As I mentioned earlier, there are four ways of starting a new foil.
11016 For portrait foils you should use
11025 The difference between these two environments is the amount of space between
11026 the title of the foil (the foilhead) and the body of the foil.
11029 \begin_layout Standard
11030 Landscape foils are generated using the
11036 ShortRotatefoilhead
11039 Again the only difference is the spacing between foilhead and body.
11040 Both of the short versions have 0.5 inches less separation between the foilhead
11045 \begin_layout Standard
11046 One problem with the support for landscape foils is the requirement that
11047 you have to use the
11051 driver to generate the PostScript output otherwise the foils won't be rotated.
11052 It is possible to get landscape foils even if you haven't got the
11056 driver provided you can feed your foils sideways through your printer ;-)
11059 \begin_layout Subsubsection
11060 Theorems, Lemmas, Proofs and more
11063 \begin_layout Standard
11064 Due to a small bug in LyX you can't have two of the same type of these environme
11065 nts directly following each other.
11066 They must be separated by something.
11067 If you try, you will just be extending the previous environment as if you
11068 had merged the two environments together.
11069 So, how do you get around this problem? The simplest option is to insert
11070 some text between the two environments or add a
11074 environment between the two with just a
11075 \begin_inset Quotes eld
11083 \begin_inset Quotes erd
11087 This will force LyX to produce two separate environments and hence the
11088 correct LaTeX output.
11089 An example is provided in the example file included with the LyX distribution.
11090 Remember, this problem only occurs if you are trying to place two of the
11091 same type of theorem-like environments one directly after the other.
11094 \begin_layout Subsubsection
11098 \begin_layout Standard
11099 You get all the commonly supported list styles found in other classes as
11100 well as two new ones.
11101 I'll only describe the new ones here.
11102 If you want to find out more about the other list environments check out
11108 If you intend to use itemized lists you might also want to read about the
11112 \begin_inset space ~
11116 \begin_inset space ~
11121 dialog described above in section
11122 \begin_inset space ~
11126 \begin_inset CommandInset ref
11128 reference "sec:bullet"
11135 \begin_layout Standard
11136 The two new list styles,
11144 , are designed to make it easier for you to create lists of do's and don'ts
11145 or right and wrong by providing dedicated environments that use a tick
11146 or a cross as the label of the list.
11147 These lists are in fact dedicated variants of the
11152 They do however require that you have the
11156 packages installed.
11159 \begin_layout Subsubsection
11163 \begin_layout Standard
11168 redefines the floating tables and figures so that they appear exactly where
11169 they are in the text rather than pushing them to the top of the page or
11170 to some user specified location.
11171 In fact if you change the float placement settings they are simply ignored.
11174 \begin_layout Subsubsection
11175 Page Headers and Footers
11176 \begin_inset CommandInset label
11178 name "sec:foilfoot"
11185 \begin_layout Standard
11189 \begin_inset space ~
11198 are two commands used to control the left-footer text string.
11199 The first is meant to allow you to include a graphic logo on your foils
11201 \begin_inset Quotes eld
11209 \begin_inset Quotes erd
11213 While the second is meant to provide a classification for the audience,
11217 \begin_inset space \thinspace{}
11223 \begin_inset space \space{}
11227 It is empty by default.
11230 \begin_layout Standard
11231 The remaining page corners can be filled by
11234 \begin_inset space ~
11239 (which defaults to page numbers),
11242 \begin_inset space ~
11250 \begin_inset space ~
11258 \begin_layout Subsection
11264 \begin_inset CommandInset label
11266 name "sec:unsuppfoils"
11273 \begin_layout Standard
11274 All the commands mentioned below need to be set in a
11282 within another environment.
11285 \begin_layout Subsubsection
11289 \begin_layout Standard
11290 All lengths are adjusted using the
11313 should be replaced by the name given to the length you want to change and
11318 is the length value.
11319 All lengths should be specified in units of length such as inches (
11331 ) or relative to some document or font-based length such as
11341 \begin_layout Standard
11342 It's possible to change the spacing between a foilhead and the body of the
11343 foil by adjusting the length specified by
11350 For example, to make
11355 \begin_inset space \space{}
11358 in closer to their bodies put the following in the preamble:
11364 foilheadskip}{-0.5in}
11367 \begin_layout Standard
11368 The spacings around floats can be adjusted by setting these lengths:
11371 \begin_layout Labeling
11372 \labelwidthstring MMMMMMMMMMM
11379 Separation between the text and the top of the float
11382 \begin_layout Labeling
11383 \labelwidthstring MMMMMMMMMMM
11390 Separation between the float and the caption
11393 \begin_layout Labeling
11394 \labelwidthstring MMMMMMMMMMM
11401 Separation between the caption and the following text
11404 \begin_layout Labeling
11405 \labelwidthstring MMMMMMMMMMM
11412 You can make the captions narrower than the surrounding text by adjusting
11414 Best done relative to
11423 \begin_layout Standard
11424 There are also several title page related lengths that you may find useful
11425 if you have a long title or several authors:
11428 \begin_layout Labeling
11429 \labelwidthstring MMMMMMMMMMM
11436 Separation from headers to
11441 \begin_layout Labeling
11442 \labelwidthstring MMMMMMMMMMM
11460 \begin_layout Labeling
11461 \labelwidthstring MMMMMMMMMMM
11475 \begin_layout Labeling
11476 \labelwidthstring MMMMMMMMMMM
11492 \begin_layout Labeling
11493 \labelwidthstring MMMMMMMMMMM
11509 \begin_layout Standard
11510 The last length related command affects all the list environments.
11521 a list environment then all the vertical spacing between the list items
11523 Note that this is a command not a length so it doesn't require
11529 like the stuff mentioned above.
11532 \begin_layout Subsubsection
11533 Headers and Footers
11536 \begin_layout Standard
11549 commands control whether the logo in the
11553 definition appear on a given page.
11560 in the preamble then none of the foils will have the logo on them.
11561 If you don't want the logo on a particular page place the
11567 directly after the foilhead of that page and the
11573 directly after the next foilhead.
11576 \begin_layout Standard
11577 If you decide to use the
11581 page style setting in the
11584 \begin_inset space ~
11589 dialog you should probably add
11599 to your preamble so headers and footers on landscape pages are correctly
11600 placed when rotated.
11601 This is due to some clashes between the page layouts provided by the
11612 \begin_layout Section
11613 Hollywood (Hollywood spec scripts)
11616 \begin_layout Standard
11622 \begin_layout Subsection
11626 \begin_layout Standard
11627 Getting the format of a Hollywood script right is a
11628 \begin_inset Quotes eld
11632 \begin_inset Quotes erd
11635 It is designed to make the readers focus on content and to be easy and
11636 familiar for the actors to read.
11637 Each page of a script should be one minute of film.
11638 Nothing goes in a script that you cannot see or hear on screen.
11639 The courier 12 pt font should be used throughout.
11643 \begin_layout Subsection
11647 \begin_layout Standard
11648 Speakers' lines should NEVER break in mid-sentence.
11649 If a speaker's lines continue over a page break, repeat the
11653 title followed by (Cont'd).
11656 \begin_layout Subsection
11660 \begin_layout Standard
11665 names as labels then cross-reference the label to insert the name.
11666 The cross-reference dialog will show the current cast of characters.
11667 You can use this to insert the speaker name in narratives also.
11670 \begin_layout Subsection
11671 Paper size and Margins
11674 \begin_layout Standard
11675 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11678 \begin_layout Subsection
11682 \begin_layout Standard
11683 The following environments are available.
11684 You can use hollywood.bind to get the bind keys shown at the right.
11687 \begin_layout Itemize
11691 \begin_inset Newline newline
11696 Used where nothing else works.
11700 \begin_layout Itemize
11706 \begin_inset space \hfill{}
11714 \begin_inset Newline newline
11717 Usually followed by something like
11718 \begin_inset Quotes eld
11721 on Sally waking up.
11722 \begin_inset Quotes erd
11728 \begin_layout Itemize
11732 \begin_inset space \hfill{}
11736 \begin_inset Newline newline
11741 Introduces a new INTERIOR camera set-up.
11742 Always followed by DAY or NIGHT, or something similar to define the lighting
11744 Everthing on this line in CAPS.
11747 \begin_layout Itemize
11751 \begin_inset space \hfill{}
11755 \begin_inset Newline newline
11760 Introduces a new EXTERIOR camera set-up.
11761 Everthing on this line in CAPS.
11764 \begin_layout Itemize
11768 \begin_inset space \hfill{}
11772 \begin_inset Newline newline
11777 The character speaking.
11780 \begin_layout Itemize
11784 \begin_inset space \hfill{}
11788 \begin_inset Newline newline
11793 Instructions to the speaker.
11794 The () are automatically inserted, but only the ( will show in LyX.
11795 Both will be printed.
11798 \begin_layout Itemize
11802 \begin_inset space \hfill{}
11806 \begin_inset Newline newline
11818 \begin_layout Itemize
11822 \begin_inset space \hfill{}
11826 \begin_inset Newline newline
11831 Camera movement instruction.
11833 \begin_inset space \thinspace{}
11837 \begin_inset space \space{}
11843 \begin_layout Itemize
11847 \begin_inset space \hfill{}
11853 \begin_layout Itemize
11857 \begin_inset space \hfill{}
11863 \begin_layout Itemize
11867 \begin_inset space \hfill{}
11873 \begin_layout Itemize
11877 \begin_inset space \hfill{}
11883 \begin_layout Subsection
11887 \begin_layout Itemize
11891 \begin_layout Itemize
11895 \begin_layout Itemize
11897 \begin_inset space \thinspace{}
11904 \begin_layout Itemize
11909 \begin_layout Itemize
11910 PAN — camera movement
11913 \begin_layout Itemize
11914 INSERT — cut to close-up of
11917 \begin_layout Section
11921 \begin_layout Standard
11924 Panayotis Papasotiriou
11927 \begin_layout Subsection
11931 \begin_layout Standard
11932 The ijmpc package is a set of macros that facilitates electronic manuscript
11935 International Journal of Modern Physics C
11938 Similarly, the ijmpd package is for creating manuscripts to be submitted
11941 International Journal of Modern Physics D
11944 Both journals are published by World Scientific.
11945 The corresponding document classes are named
11954 These files, together with instructions for the authors, can be downloaded
11956 \begin_inset Flex URL
11959 \begin_layout Plain Layout
11961 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11967 \begin_inset Flex URL
11970 \begin_layout Plain Layout
11972 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11978 Both packages are modified versions of the standard
11979 \begin_inset Quotes eld
11983 \begin_inset Quotes erd
11986 package, and they are almost (but not exactly) identical.
11987 Most of their features are supported by LyX.
11988 I have used LyX successfully to write articles submitted to both journals
11989 without any problem.
11992 \begin_layout Subsection
11996 \begin_layout Standard
11997 As usual, the easiest way to write a paper is to start with a template.
12000 File\SpecialChar \menuseparator
12019 This will give an (almost) empty document that includes the most common
12020 fields found in a manuscript.
12021 Simply overwrite the existing text (including the brackets,
12026 You should keep in mind the following remarks.
12029 \begin_layout Enumerate
12030 LyX won't let you change the font size and the page style of the document,
12031 because such modifications are not allowed by both packages.
12034 \begin_layout Enumerate
12035 The language of the document should not be changed.
12036 Before previewing your paper, be sure that the babel package is not used.
12037 To do this, click on
12039 Tools\SpecialChar \menuseparator
12050 checkbox in the language settings, and click on
12058 , if you wish to make this change permanent).
12061 \begin_layout Enumerate
12063 \begin_inset Quotes eld
12067 \begin_inset Quotes erd
12070 style must be used to define keywords.
12073 \begin_layout Enumerate
12074 The ijmpc package provides a style named
12075 \begin_inset Quotes eld
12078 Classification Codes
12079 \begin_inset Quotes erd
12082 , which can be used to define classification codes, such as PACS numbers.
12083 Note that this facility is not supported by the ijmpd package.
12086 \begin_layout Enumerate
12087 Several new environments are available:
12088 \begin_inset Quotes eld
12092 \begin_inset Quotes erd
12096 \begin_inset Quotes eld
12100 \begin_inset Quotes erd
12104 \begin_inset Quotes eld
12108 \begin_inset Quotes erd
12112 \begin_inset Quotes eld
12116 \begin_inset Quotes erd
12120 \begin_inset Quotes eld
12124 \begin_inset Quotes erd
12128 \begin_inset Quotes eld
12132 \begin_inset Quotes erd
12136 \begin_inset Quotes eld
12140 \begin_inset Quotes erd
12144 \begin_inset Quotes eld
12148 \begin_inset Quotes erd
12152 \begin_inset Quotes eld
12156 \begin_inset Quotes erd
12160 \begin_inset Quotes eld
12164 \begin_inset Quotes erd
12168 \begin_inset Quotes eld
12172 \begin_inset Quotes erd
12176 \begin_inset Quotes eld
12180 \begin_inset Quotes erd
12184 \begin_inset Quotes eld
12188 \begin_inset Quotes erd
12192 \begin_inset Quotes eld
12196 \begin_inset Quotes erd
12200 Their use is more or less obvious.
12201 LyX supports all these environments; it will use the proper label, text
12202 style, and numbering scheme for each of them.
12205 \begin_layout Enumerate
12206 Both packages use basic citations; the natbib package should not be used.
12207 In LyX, citation references are shown as usual; in the output, citations
12208 are shown as superscripts.
12209 If you want to use a citation as normal text, you should use the
12214 \begin_inset space \thinspace{}
12218 \begin_inset space \space{}
12222 \begin_inset Quotes eld
12226 \begin_inset space \space{}
12236 \begin_inset Quotes erd
12242 \begin_layout Enumerate
12244 \begin_inset Quotes eld
12248 \begin_inset Quotes erd
12251 section in both packages.
12252 To put acknowledgments, just use the
12253 \begin_inset Quotes eld
12257 \begin_inset Quotes erd
12263 \begin_layout Enumerate
12264 Appendices may be added to the paper,
12268 the Acknowledgments and
12273 LyX provides a special environment, called
12274 \begin_inset Quotes eld
12278 \begin_inset Quotes erd
12281 which marks the beginning of the appendices.
12282 This environment should be left blank; it just sends a LaTeX command, but
12283 nothing is really printed.
12285 \begin_inset Quotes eld
12289 \begin_inset Quotes erd
12292 is printed with blue letters, as a signal that all sections after that
12293 point are appendices.
12294 To write an appendix, use the
12295 \begin_inset Quotes eld
12299 \begin_inset Quotes erd
12303 LyX will number each appendix with capital letters, as required by both
12306 \begin_inset Quotes eld
12310 \begin_inset Quotes erd
12317 be present before the first appendix; if not, all appendices will be numbered
12318 as normal sections in the output.
12321 \begin_layout Enumerate
12322 The ijmpc and the ijmpd packages use the
12326 command to implement table captions.
12327 As a result, a table created by LyX is printed correctly, but its caption
12329 However, you can use some TeX code to overcome this problem, so that captions
12330 are printed as expected.
12331 To do so, create a float table as usual, remove the caption, and replace
12332 it with the TeX code
12342 (sic); you must also the TeX code
12346 immediately after the tabular material.
12347 Study the example table included in the template files to see how this
12348 trick is implemented.
12349 Alternatively, If you need table captions, you should implement the whole
12354 file, then include this file to the LyX document (
12356 Insert\SpecialChar \menuseparator
12357 File\SpecialChar \menuseparator
12359 \begin_inset space ~
12365 Details on how to create a table float can be found in the files
12373 , included in the corresponding packages.
12376 \begin_layout Subsection
12377 Preparing a paper for submission
12380 \begin_layout Standard
12381 Before you submit your paper you must export the LyX document as a LaTeX
12384 File\SpecialChar \menuseparator
12385 Export\SpecialChar \menuseparator
12392 \begin_layout Plain Layout
12393 Actually you have the choice between LaTeX (plain) and pdflatex.
12394 If you intend to use pdflatex to prepare the paper, you should use the
12395 pdflatex option so that included graphics are converted to PDF format,
12396 ready for use by pdflatex.
12401 , then make the following changes to the resulting
12408 \begin_layout Enumerate
12409 Remove the comment lines before the
12418 \begin_layout Enumerate
12419 Remove everything between (and including) the
12431 commands, except for any commands you specifically put into the LaTeX preamble.
12434 \begin_layout Standard
12439 file should be saved and processed through LaTeX as many times as necessary.
12440 You may also want to check the resulting
12447 \begin_layout Subsection
12451 \begin_layout Standard
12452 The use of TeX code is reduced to two commands, which must be placed at
12453 the top of the document.
12454 If you started writing your paper by using the
12462 template, the TeX code needed is already in its place; you usually don't
12464 You may only modify the first TeX code to specify the information printed
12465 to the top of odd and even pages (authors' names and short paper's title,
12467 This TeX code must have the form
12471 markboth{Authors' Names}{Short Paper's Title}
12476 \begin_layout Section
12480 \begin_layout Standard
12486 \begin_layout Subsection
12490 \begin_layout Standard
12491 The iopart package provides a document class to create electronic manuscript
12492 submission to the journals published by the Institute of Physics.
12493 Instructions for the authors how to create a paper using the iopart class
12494 can be downloaded together with the iopart package from the site
12495 \begin_inset Flex URL
12498 \begin_layout Plain Layout
12500 ftp://ftp.iop.org/pub/journals/latex2e
12508 \begin_layout Subsection
12512 \begin_layout Standard
12513 The easiest way to write a paper is to start with the file
12517 that is available in LyX's examples files folder.
12518 Open this file, save it under a new name, and start writing.
12519 The example file explains how to use the special text environments.
12520 Here are the most important advices:
12523 \begin_layout Itemize
12524 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12527 Use AMS math package
12529 in the document settings under
12536 \begin_layout Itemize
12539 The title environment defines the kind of your paper.
12540 So use one of the following environments for the title:
12544 \begin_layout Itemize
12553 \begin_layout Itemize
12562 \begin_layout Itemize
12568 for a Topical review
12571 \begin_layout Itemize
12580 \begin_layout Itemize
12589 \begin_layout Itemize
12595 for a Paper (same as Title)
12598 \begin_layout Itemize
12604 for a Preliminary communication
12607 \begin_layout Itemize
12613 for a Rapid communication
12616 \begin_layout Itemize
12622 for a Letter to the editor
12626 \begin_layout Itemize
12629 All title environments except of
12633 can have an optional short title.
12636 \begin_layout Itemize
12637 There is a general title environment
12641 which is not directly supported by the LyX.
12642 This can be used as TeX code when your document doesn't fit into one of
12643 the other title types.
12646 \begin_layout Standard
12647 For more informations like hints for special table and formula formatting,
12648 look at the IOP author guidelines.
12651 \begin_layout Section
12655 \begin_layout Standard
12658 Panayotis Papasotiriou
12661 \begin_layout Subsection
12665 \begin_layout Standard
12666 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12667 that facilitates electronic manuscript submission to the journals they
12669 Most known of them (at least in my domain of interest) are
12671 Astrophysics and Space Science
12677 , but there are many others (see a complete list at
12678 \begin_inset Flex URL
12681 \begin_layout Plain Layout
12683 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12689 The Kluwer package may be downloaded from the site
12690 \begin_inset Flex URL
12693 \begin_layout Plain Layout
12695 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12701 A complete user guide is contained in that package (but it can also be
12702 downloaded separately).
12705 \begin_layout Standard
12706 LyX supports many features of the package but not everything.
12707 However, the TeX code needed is reduced to some
12708 \begin_inset Quotes eld
12712 \begin_inset Quotes erd
12715 commands of the package (see
12716 \begin_inset space ~
12720 \begin_inset CommandInset ref
12722 reference "subsec:kluwer_peculiarities"
12727 I have recently used LyX to write an article submitted to the
12729 Astrophysics and Space Science
12731 without any problem.
12734 \begin_layout Subsection
12738 \begin_layout Standard
12739 The easiest way to write a paper is to start with the Kluwer template file.
12742 File\SpecialChar \menuseparator
12754 This will give an (almost) empty document that includes the most common
12755 fields found in a manuscript and a short description of their use.
12756 As in most templates, simply overwrite the existing text (including the
12761 ) with the correct information.
12764 \begin_layout Subsection
12765 Preparing a paper for submission
12768 \begin_layout Standard
12769 As in the AASTeX package, before you submit your paper to a journal you
12771 \begin_inset Quotes eld
12775 \begin_inset Quotes erd
12781 \begin_layout Enumerate
12782 Export your paper as a LaTeX file.
12783 To do this, click on
12785 File\SpecialChar \menuseparator
12786 Export\SpecialChar \menuseparator
12793 \begin_layout Enumerate
12798 file with a text editor and make the following changes
12802 \begin_layout Enumerate
12803 remove the comment lines before the
12812 \begin_layout Enumerate
12813 remove everything between (and including) the
12825 commands, except for any commands you specifically put into the LaTeX preamble.
12828 \begin_layout Standard
12837 \begin_layout Enumerate
12842 file through LaTeX as many times as necessary (usually up to three).
12845 \begin_layout Enumerate
12851 \begin_inset space \thinspace{}
12855 \begin_inset space \space{}
12862 , and check if everything is OK (it should, if you didn't make any mistake).
12865 \begin_layout Subsection
12866 \begin_inset Quotes eld
12870 \begin_inset Quotes erd
12873 of the Kluwer package
12874 \begin_inset CommandInset label
12876 name "subsec:kluwer_peculiarities"
12883 \begin_layout Standard
12884 The Kluwer package has the following
12885 \begin_inset Quotes eld
12889 \begin_inset Quotes erd
12895 \begin_layout Enumerate
12896 It is possible to write multiple articles in the same LaTeX file
12900 \begin_layout Plain Layout
12901 I can't imagine any good reason to do this.
12907 Each article must be included in the environment
12908 \begin_inset Quotes eld
12912 \begin_inset Quotes erd
12916 Unfortunately, this environment cannot be omitted, even if you write just
12918 Therefore, each article starts with the command
12924 and, obviously, ends with the command
12931 Although this can be implemented in LyX, I didn't included it, since it
12932 looks ugly and can confuse the novice user.
12933 Therefore, you need to enter them directly and mark them as LaTeX code
12935 \begin_inset Quotes eld
12939 \begin_inset Quotes erd
12945 \begin_layout Enumerate
12946 Information given at the beginning of the article (i.
12947 \begin_inset space \thinspace{}
12951 \begin_inset space \space{}
12954 title, subtitle, author, institution, running title, running author, abstract
12955 and keywords) must be included in an environment called
12956 \begin_inset Quotes eld
12960 \begin_inset Quotes erd
12964 This is not implemented in LyX, so you must enter title, subtitle etc.
12965 \begin_inset space ~
12968 between two TeX code lines (
12983 \begin_layout Enumerate
12984 According to the user manual, the label of each bibliography item must be
13008 \begin_layout Standard
13013 template takes care of all these
13014 \begin_inset Quotes eld
13018 \begin_inset Quotes erd
13022 If you start a new paper using this template you don't need to do anything
13027 \begin_layout Enumerate
13028 don't delete the TeX code included in the template, and
13031 \begin_layout Enumerate
13032 copy the example bibliography item included in the template and modify it
13033 as necessary to enter new bibliography items.
13036 \begin_layout Section
13040 \begin_layout Standard
13046 \begin_layout Subsection
13050 \begin_layout Standard
13051 The LyX document classes
13053 article (koma-script)
13057 report (koma-script)
13075 correspond to the LaTeX document classes
13092 \begin_inset space ~
13095 of the Koma-Script family.
13096 They are replacements for the standard document classes
13112 , resp., and fit better to European typography conventions in a number of
13116 \begin_layout Itemize
13117 Standard character size is 11pt in
13119 article (koma-script)
13123 report (koma-script)
13131 letter (koma-script)
13136 \begin_layout Itemize
13137 Headings, labels of the description environment, and a number of elements
13140 letter (koma-script)
13142 document class are set in a bold sans serif font.
13146 \begin_layout Plain Layout
13147 There is a big difference between the bold sans serif old cm fonts and new
13148 ec fonts, especially in the appearance of headings.
13149 In comparison, the ec bold sans serif fonts look a bit thin.
13150 Here the LaTeX package
13158 helps to produce the
13159 \begin_inset Quotes eld
13163 \begin_inset Quotes erd
13166 appearance when using the ec fonts.
13171 The numbering of chapter headings is made in the same way as the numbering
13172 of section headings, that is without the extra line
13173 \begin_inset Quotes eld
13176 Chapter\SpecialChar \ldots{}
13178 \begin_inset Quotes erd
13182 In addition, the appearance of the headings can be modified by using a
13183 number of options (in LyX to be entered in the field
13186 \begin_inset space ~
13193 Layout\SpecialChar \menuseparator
13200 \begin_layout Itemize
13201 The main means in the Koma-Script document classes to design the type area
13210 (in LyX to be entered in the extra class options field in the dialog
13212 Document\SpecialChar \menuseparator
13216 They make a clearer modification of page margins possible as do the options
13219 Document\SpecialChar \menuseparator
13226 \begin_layout Itemize
13227 The LaTeX document classes of the Koma-Script family define a number of
13228 additional commands.
13229 Those part of it which makes sense in LyX is implemented in corresponding
13233 \begin_layout Standard
13234 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13235 can be found in the Koma-Script documentation
13246 \begin_layout Subsection
13247 article (koma-script), report (koma-script), and book (koma-script)
13250 \begin_layout Standard
13251 The document classes
13253 article (koma-script)
13257 report (koma-script)
13267 are implemented in the layout files
13280 They contain all the paragraph types of the corresponding standard document
13293 , resp., partly modified, with the exception of the LyX specific
13297 -type, which is replaced by the new
13301 -type having the same functionality.
13306 -Type there is a number of new paragraph types added.
13313 letter (koma-script)
13318 \begin_layout Itemize
13327 : are equivalents to
13335 , resp., additionally inserting an entry in the table of contents.
13344 are not contained in
13346 article (koma-script)
13351 \begin_layout Itemize
13360 : behave exactly as
13368 , resp., additionally clearing running heads.
13373 is not contained in
13375 article (koma-script)
13381 \begin_layout Plain Layout
13394 report (koma-script)
13396 , but since this is identical to
13400 , is has not been implemented in LyX.
13408 \begin_layout Itemize
13413 : generates a heading directly above the following paragraph in the standard
13414 character size without affecting the structure of the document.
13417 \begin_layout Itemize
13426 are special captions which respect the different space settings needed
13427 for captions placed above or below an element (if you follow strict typographic
13428 rules, you might want to place table captions always above the table).
13429 You can also use the class option
13433 , which will switch
13446 You need at least Koma-Script version 2.8q to use this.
13449 \begin_layout Itemize
13454 : can be used to set a bonmot, e.
13455 \begin_inset space \thinspace{}
13459 \begin_inset space \space{}
13462 at the beginning of a chapter.
13463 If you use the optional argument (
13465 Insert\SpecialChar \menuseparator
13467 \begin_inset space ~
13472 ), you can insert the dictum's author there.
13473 Dictum and author are separated by a line.
13474 You need at least Koma-Script version 2.8q to use this.
13479 is not contained in
13481 article (koma-script)
13486 \begin_layout Standard
13487 The following types, together with the standard types
13499 , form the title area of the document.
13500 They must be entered ahead of the first
13501 \begin_inset Quotes eld
13505 \begin_inset Quotes erd
13512 \begin_layout Plain Layout
13513 The corresponding LaTeX commands must appear before the
13524 When such a type is used more than once, the latter usage overwrites the
13525 former one, that means, for every type only the latest usage is valid.
13526 The order of the different types however has, like
13538 , no effect on the appearance of the produced document.
13541 \begin_layout Itemize
13546 : produces a centered paragraph above the ordinary title (
13558 ) for the subject of the document.
13561 \begin_layout Itemize
13566 : produces a centered paragraph below the ordinary title (
13578 ) for the publishers' name.
13581 \begin_layout Itemize
13588 report (koma-script)
13594 produces a centered paragraph on its own page behind the title page, or
13597 article (koma-script)
13599 produces a centered paragraph below the ordinary title (
13615 ) for a dedication.
13618 \begin_layout Itemize
13623 : produces a left aligned paragraph above the ordinary title (
13639 ) for a document`s head.
13642 \begin_layout Itemize
13647 : produces in a double-sided print in
13649 report (koma-script)
13655 a left-aligned paragraph at the top of the title page`s back or has no
13656 effect in a single-sided print or in
13658 article (koma-script)
13663 \begin_layout Itemize
13668 : produces in a double-sided print in
13670 report (koma-script)
13676 a left-aligned paragraph at the bottom of the title page`s back or has
13677 no effect in a single-sided print or in
13679 article (koma-script)
13684 \begin_layout Itemize
13689 : produces a special
13690 \begin_inset Quotes eld
13694 \begin_inset Quotes erd
13697 page ahead of the actual document containing a paragraph without special
13701 \begin_layout Standard
13702 The layout files for the document classes
13704 article (koma-script)
13708 report (koma-script)
13714 do include the file
13719 This is thought of as a place to define your own types.
13724 in your personal layout directory and edit the file!
13727 \begin_layout Subsection
13728 letter (koma-script)
13731 \begin_layout Standard
13735 \begin_layout Plain Layout
13747 \begin_layout Standard
13751 letter (koma-script)
13753 is implemented in the layout file
13758 It contains all the paragraph types of the corresponding standard document
13763 , partly modified, with the exception of the LyX specific types
13775 type, which is replaced by the new
13780 In addition, it contains, in contrast to the standard document class, the
13798 Furthermore, there are a number of new letter specific types.
13801 \begin_layout Standard
13805 \begin_layout Plain Layout
13817 \begin_layout Standard
13818 The appearance of the letter produced by this document class can be controlled
13819 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13823 \begin_layout Plain Layout
13824 For example, the standard appearance of the letter`s heading, consisting
13825 of name and address, is quite self-willed.
13827 \begin_inset Quotes eld
13831 \begin_inset Quotes erd
13834 heading is produced by the following LaTeX commands in the preamble:
13837 \begin_layout LyX-Code
13847 \begin_layout LyX-Code
13863 \begin_layout LyX-Code
13873 \begin_layout LyX-Code
13893 A detailed German description of such LaTeX commands can be found in the
13894 Koma-Script documentation
13899 With it, the letter's author can produce his personal letter layout.
13902 \begin_layout Standard
13911 define the beginning of the letter and must be used in every letter.
13912 To emphasize them in the LyX document class, they are marked with the letter
13922 \begin_inset space ~
13925 in the left margin.
13926 It is possible to write any number of letters in one file.
13931 type produces a new letter using the same addressee and a
13935 type produces a new addressee.
13952 are ordinary paragraph types and can also be used several times in one
13953 and the same letter.
13956 \begin_layout Itemize
13961 : produces a paragraph for the addressee and implicitly defines the beginning
13965 \begin_layout Itemize
13970 : produces a paragraph for the form of address and implicitly produces a
13974 \begin_layout Itemize
13979 : produces a paragraph for a close.
13982 \begin_layout Itemize
13987 : produces a paragraph for a postscript.
13990 \begin_layout Itemize
13995 : produces a paragraph for a distribution list.
13998 \begin_layout Itemize
14003 : produces a paragraph for enclosures.
14006 \begin_layout Standard
14047 are input types provided with a label to enter information, which will
14048 be processed by the document class.
14052 \begin_layout Plain Layout
14053 It could be seen as a matter of inconsequence, that the types
14061 described above are not such input types as well.
14062 Because of the special meaning of those types, however, I have implemented
14063 them as ordinary paragraph types with a one letter mark in the left margin.
14064 Moreover, it would affect my feeling of symmetry, if the
14072 type had such a serious different appearance.
14077 The types must be used ahead of the corresponding
14084 \begin_layout Standard
14085 An implementation of these types in a WYSIWYG fashion does not seem to make
14086 sense, because the real appearance of the produced letter does not only
14087 depend on the usage of the particular type, but also on other factors.
14088 For example, a signature entered in the
14092 type will in the standard behavior appear in the produced letter only,
14093 when in the same letter also a
14098 The entered value of the
14102 type will in the standard behavior not appear in the produced letter at
14104 The possibility to design the letter`s heading freely is already indicated
14105 in a footnote above.
14108 \begin_layout Standard
14109 The input types can also be used as empty paragraphs.
14110 This makes sense e.
14111 \begin_inset space \thinspace{}
14115 \begin_inset space \space{}
14127 type is not used at all, in the standard behavior the value of the
14131 type is used as signature, whereas if an empty
14135 type is used, no signature value is defined.
14138 \begin_layout Standard
14139 By using the input types it is possible to write a letter template, containing
14140 filled input types with your personal dates (name, address, etc.) and empty
14141 input types for other dates you want to enter.
14144 \begin_layout Itemize
14149 : sender's name, in the standard behavior appears as a centered paragraph
14150 in small caps in the letter`s heading.
14153 \begin_layout Itemize
14158 : sender's signature, in the standard behavior appears below the
14167 type is used, the value of the
14171 type appears instead.
14174 \begin_layout Itemize
14179 : sender's address, in the standard behavior appears in a centered paragraph
14180 in the letter`s heading below the sender's name.
14183 \begin_layout Itemize
14188 : sender's telephone number, in the standard behavior only sets the LaTeX
14198 \begin_layout Itemize
14203 : place of the letter`s making.
14206 \begin_layout Itemize
14211 : date of the letter`s making.
14220 , in the standard behavior, produce the place and the date in a right-aligned
14221 line below the addressee's field.
14226 type is used, neither place nor date appear, independent of the value of
14236 type is used, the date of the letter `s production is used.
14239 \begin_layout Itemize
14244 : sender`s back address, in the standard behavior appears above the addressee's
14245 field in a small sans serif font.
14248 \begin_layout Itemize
14253 : special mail information, in the standard behavior appears underlined
14254 above the addressee's field below the back address.
14257 \begin_layout Itemize
14262 : additional information, in the standard behavior appears on right side
14263 below the addressee`s field.
14266 \begin_layout Itemize
14271 : the letter's title, in the standard behavior appears in a big, bold, sans
14272 serif font above the subject.
14275 \begin_layout Itemize
14280 : the letter's subject, in the standard behavior appears in a bold font
14288 \begin_layout Standard
14309 produce a business letter like line above the
14313 line containing the fields
14314 \begin_inset Quotes eld
14318 \begin_inset Quotes erd
14322 \begin_inset Quotes eld
14326 \begin_inset Quotes erd
14330 \begin_inset Quotes eld
14334 \begin_inset Quotes erd
14338 \begin_inset Quotes eld
14342 \begin_inset Quotes erd
14346 \begin_inset Quotes eld
14350 \begin_inset Quotes erd
14354 \begin_inset Quotes eld
14358 \begin_inset Quotes erd
14362 For the date field, the value of the
14368 \begin_inset Quotes eld
14371 business letter types
14372 \begin_inset Quotes erd
14375 is used, the value of the
14379 type however does not appear, but only the LaTeX variable
14386 The ordinary output of place and date in a right-aligned line below the
14387 addressee`s field is suppressed.
14388 The types are implemented as input types provided with a label and must
14389 be used ahead of the corresponding
14396 \begin_layout Itemize
14404 \begin_layout Itemize
14412 \begin_layout Itemize
14420 \begin_layout Itemize
14428 \begin_layout Itemize
14436 \begin_layout Subsection
14437 The new letter class: letter (koma-script v.2)
14440 \begin_layout Standard
14446 \begin_layout Standard
14447 \begin_inset VSpace medskip
14453 \begin_layout Standard
14455 Koma-Script version 2.8 has introduced a new letter class
14459 which supersedes the now unsupported
14464 It has — on the LaTeX side — a completely new interface and is not compatible
14465 with the old class.
14466 Therefore, LyX supports both, though it is recommended you use the new
14470 \begin_layout Standard
14471 This class covers the same functionality as
14473 letter (koma-script),
14476 The basic items are
14480 (receiver's address, same as
14484 in the old layout),
14497 will start a new letter (i.
14498 \begin_inset space \thinspace{}
14502 \begin_inset space \space{}
14505 you can write several letters per document).
14506 New elements are sender's
14522 and the possibility to use a
14528 Insert\SpecialChar \menuseparator
14534 \begin_layout Standard
14535 The biggest improvement is, though, that the letter's layout is configurable
14536 to meet almost any needs.
14537 This can be done via the preamble or with a special style file (Letter
14538 Class Option, extension
14542 ), that will be read in as a class option.
14546 \begin_layout Plain Layout
14547 The KOMA package comes with some default
14552 There is, for instance, a
14556 file that follows german typesetting rules, or a
14560 that provides the default layout of the old
14565 The latter can be loaded with the class option
14574 ayout\SpecialChar \menuseparator
14579 ocument\SpecialChar \menuseparator
14591 template that is included in LyX for examples.
14592 A detailed description is to be found in the Koma-Script documentation
14600 \begin_layout Subsection
14604 \begin_layout Standard
14605 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14609 \begin_layout Itemize
14610 The chapter number of a
14614 type appears on a line of its own above the chapter heading instead of
14615 appearing in the same line ahead of it.
14616 The cause for that is the LyX internal behavior for the labeltype
14620 in the layout file.
14623 \begin_layout Itemize
14624 The headings of the types
14632 are only put in the
14633 \begin_inset Quotes eld
14637 \begin_inset Quotes erd
14640 LaTeX table of contents, but not in the LyX table of contents (
14642 Document\SpecialChar \menuseparator
14644 \begin_inset space ~
14648 \begin_inset space ~
14656 \begin_layout Itemize
14657 The paragraphs in a
14661 document class appear in a skip separation mode, not indented.
14662 This is the standard behavior, no special LaTeX commands are needed for
14666 Document\SpecialChar \menuseparator
14669 dialog the corresponding radio button indicates
14678 value always has the effect that extra LaTeX commands are inserted in the
14679 document to produce the gap, which is not what is wanted in this case.
14682 \begin_layout Section
14683 Latex8 (IEEE Conference Papers)
14686 \begin_layout Standard
14692 \begin_layout Subsection
14696 \begin_layout Standard
14697 Since this class is specifically for writing submissions to IEEE sponsored
14698 conferences I strongly recommend that you get a copy of their Authors Kit.
14703 package and associated bibliography style file is included in the kit.
14704 The Authors Kit is usually sent out by email once your initial submission
14706 There is a lot of useful information in the Authors Kit explaining formatting
14707 restrictions and so on and I will assume you have read this since that
14708 means I don't have to repeat it all here.
14711 \begin_layout Subsection
14715 \begin_layout Standard
14716 [AR\SpecialChar \@.
14720 \begin_layout Subsection
14721 Supported Environments
14724 \begin_layout Itemize
14730 \begin_layout Itemize
14736 \begin_layout Itemize
14742 \begin_layout Itemize
14748 \begin_layout Itemize
14754 \begin_layout Itemize
14760 \begin_layout Itemize
14766 \begin_layout Itemize
14772 \begin_layout Itemize
14778 \begin_layout Subsection
14779 Differences Between Screen and Paper
14782 \begin_layout Standard
14783 There are slight differences in appearance mainly with the presentation
14784 of section counters.
14785 On screen the trailing period of the section counter is missing but it
14786 will appear in the output so don't let this worry you.
14789 \begin_layout Section
14793 \begin_layout Standard
14799 \begin_layout Subsection
14803 \begin_layout Standard
14804 Memoir is a very powerful and constantly evolving class.
14805 It has been designed with regard to fictional and non-fictional literature.
14806 Its aim is to let the user have maximum control over the typesetting of
14808 Memoir is based on the standard book class, but it can also emulate the
14809 article class (see below).
14812 \begin_layout Standard
14813 Peter Wilson, the developer of Memoir, is known as the author of lots of
14814 useful packages in the LaTeX world.
14815 Most of them have been merged with Memoir.
14816 Therefore, it is much easier to layout the table of contents, appendices,
14817 chapter designs and such.
14818 LyX, though, does not support all of these goodies natively.
14819 Some of them might be added to forthcoming releases
14823 \begin_layout Plain Layout
14824 You are invited to send suggestions to
14825 \begin_inset Flex URL
14828 \begin_layout Plain Layout
14830 lyx-devel@lists.lyx.org
14840 , lots will probably never, due to the limitations of LyX's framework.
14841 Of course you can still use all features with the help of some native LaTeX
14846 \begin_layout Plain Layout
14851 \begin_layout Plain Layout
14861 \begin_inset space ~
14865 \begin_inset CommandInset ref
14867 reference "sec:Inserting-TeX-Code"
14877 In this section, we can only list those features which are natively supported
14879 For detailed descriptions (and for the rest of features) we recommend you
14880 have a look at the detailed manual of the Memoir class
14884 \begin_layout Plain Layout
14889 \begin_layout Plain Layout
14899 \begin_inset Flex URL
14902 \begin_layout Plain Layout
14904 CTAN:/macros/latex/memoir/memman.pdf
14914 , which is not only a user guide for the class, but also both a comprehensive
14915 description on good typesetting and a superb example for good typesetting
14919 \begin_layout Subsection
14920 Basic features and restrictions
14923 \begin_layout Standard
14924 Memoir supports basically all features of the standard book classes.
14925 There are, however, some differences, as follows:
14928 \begin_layout Description
14930 \begin_inset space ~
14933 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14936 \begin_layout Description
14938 \begin_inset space ~
14941 style: The fancy page style is not supported, due to a command clash between
14942 Memoir and the fancyhdr package (they both define a command with the same
14943 name, which confuses LaTeX).
14944 Instead, Memoir comes with a number of its own page styles (see
14946 Layout\SpecialChar \menuseparator
14947 Document\SpecialChar \menuseparator
14949 \begin_inset space ~
14955 If you want to use these for the chapter pages, you have to use the command
14962 in the main text or in preamble (e.
14963 \begin_inset space \thinspace{}
14967 \begin_inset space \space{}
14974 chapterstyle{companion}
14979 \begin_layout Description
14980 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14981 optional argument in the standard classes.
14982 With this, you can specify an alternative version of the title for the
14983 table of contents and the headers (for instance, if the title is too long).
14984 In LyX, you can do this via
14986 Insert\SpecialChar \menuseparator
14988 \begin_inset space ~
14993 at the beginning of a chapter/section.
14994 Memoir features a second optional argument and thus separates the table
14995 of contents from the header.
14996 You can define three variants of a title with this: one for the main text,
14997 one for the table of contents, and one for the headers.
14998 Simply insert two optional arguments if you need this feature, the first
14999 one containing the short title for the Table of Contents, the second one
15000 containing an alternative short title for the headers.
15003 \begin_layout Description
15004 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
15005 of contents, the list of figures and the list of table start a new page
15007 Memoir does not follow this route.
15008 You have to insert a page break yourself, if you want to have one.
15011 \begin_layout Description
15012 Titlepage: For some unknown reason, Memoir uses pagination on the title
15013 page (in the standard classes, title pages are
15014 \begin_inset Quotes eld
15018 \begin_inset Quotes erd
15022 \begin_inset space \thinspace{}
15026 \begin_inset space \space{}
15030 If you want an empty title page, type
15034 aliaspagestyle{title}{empty}
15039 \begin_layout Description
15040 Article: With the class option
15046 Layout\SpecialChar \menuseparator
15047 Document\SpecialChar \menuseparator
15049 \begin_inset space ~
15054 ), you can emulate article style.
15055 That is, counters (footnotes, figures, tables etc.) will not be reset on
15056 new chapters, chapters don't start a new page (but are—in contrary to
15057 \begin_inset Quotes eld
15061 \begin_inset Quotes erd
15064 article classes—still allowed), parts, though, use their own page, as in
15068 \begin_layout Description
15069 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
15070 font commands, which have been used in the old LaTeX version 2.09 (e.
15071 \begin_inset space \thinspace{}
15075 \begin_inset space \space{}
15091 It produces an error and stops LaTeX whenever such a command appears.
15096 reallows the commands and spits out warnings instead (which does at least
15098 Since a lot of packages and particularly BibTeX style files are still using
15099 those commands, we have decided to use this option by default.
15102 \begin_layout Subsection
15106 \begin_layout Standard
15107 We will only describe the features supported by LyX (which is not much currently
15109 Please consult the Memoir manual
15113 \begin_layout Plain Layout
15118 \begin_layout Plain Layout
15128 \begin_inset Flex URL
15131 \begin_layout Plain Layout
15133 CTAN:/macros/latex/memoir/memman.pdf
15146 \begin_layout Description
15147 Abstract: You may wonder why an abstract is an extra feature.
15148 Well, it is in book class.
15149 Usually books don't have abstracts.
15150 Memoir, however, has.
15151 You can use it wherever and how often you like.
15154 \begin_layout Description
15155 Chapterprecis: You may know this older typesetting style: The contents of
15156 a chapter are summarized below the title and also in the table of contents
15158 \begin_inset space \thinspace{}
15162 \begin_inset space \space{}
15167 Our hero arrives in Troia; he loses some friends; he finds others
15170 Chapterprecis does exactly this.
15171 It is therefore only sensible below a chapter.
15174 \begin_layout Description
15175 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
15176 The epigraph environment provides an elegant way of typesetting such a
15178 The motto itself (text) and its author (source) are divided by a short
15180 Unfortunately, we have to fool LyX a bit here again, since the environment
15181 needs two arguments (text and source).
15182 In this case, we have to use curly brackets (in TeX mode) between the two
15193 <author of the slogan>.
15196 \begin_layout Description
15197 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
15198 complex figurative poems).
15199 LyX can only support a few of them.
15200 One is poemtitle, which is a centered title for poems, which will also
15201 be added to the table of contents (verse is the standard environment for
15203 Memoir has some enhanced versions of verse, but you need to use TeX code,
15204 because they have to be nested inside regular verse environments, which
15205 is not possible with LyX).
15208 \begin_layout Description
15209 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
15212 \begin_layout Section
15213 Article (mwart), book (mwbk) and report (mwrep)
15214 \begin_inset Argument
15217 \begin_layout Plain Layout
15230 \begin_layout Standard
15236 \begin_layout Standard
15237 The LyX document classes
15253 correspond to the LaTeX document classes
15266 They are replacements for the standard document classes
15278 , resp., and fit better to Polish typography conventions in a number of points.
15282 \begin_layout Standard
15286 \begin_layout Itemize
15287 Unnumbered titles (with star, e.
15288 \begin_inset space \thinspace{}
15292 \begin_inset space \space{}
15299 ) are added into table of contents,
15302 \begin_layout Itemize
15303 Additional page styles:
15307 \begin_layout Description
15308 uheadings header with separated lines,
15311 \begin_layout Description
15312 myheadings custom header, contents headers via commands:
15327 \begin_layout Description
15328 myuheadings custom header with separated lines,
15331 \begin_layout Description
15332 outer page number is placed on outer side of page
15336 \begin_layout Itemize
15341 \begin_layout Description
15342 rmheadings serif titles — default,
15345 \begin_layout Description
15346 sfheadings sansserif titles,
15349 \begin_layout Description
15350 authortitle on title page first placed is author next title — default,
15353 \begin_layout Description
15354 titleauthor on title page first placed is title next author,
15357 \begin_layout Description
15358 withmarginpar reserve place on page for margins.
15362 \begin_layout Section
15366 \begin_layout Standard
15371 provides an alternative to the standard
15376 It provides similar functionality, but you might prefer this layout with
15377 sans serif sections, headings, and more.
15380 \begin_layout Section
15384 \begin_layout Standard
15390 \begin_layout Standard
15391 \begin_inset VSpace bigskip
15397 \begin_layout Standard
15402 \begin_inset space ~
15407 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15408 \begin_inset Formula $\beta$
15411 release of May, 1999) class.
15414 \begin_layout Standard
15419 textclass, which works with RevTeX 3.1.
15420 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15421 That means that it doesn't interact very well with LyX, which requires
15422 LaTeX2e, although it has been kludged to work.
15423 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15427 \begin_inset space ~
15432 textclass should also be pretty easy to use.
15435 \begin_layout Standard
15436 These documents are supposed to be used in
15440 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15441 macros, and assume you'll know what to put in the preamble if necessary.
15444 \begin_layout Subsection
15448 \begin_layout Standard
15449 All you need to do is install RevTeX 4, as described in the package's README
15451 The package can be found at The RevTeX 4 Web Site
15452 \begin_inset Flex URL
15455 \begin_layout Plain Layout
15457 http://publish.aps.org/revtex4/
15463 Install it somewhere that LaTeX can see it.
15464 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15466 \begin_inset space \thinspace{}
15470 \begin_inset space \space{}
15473 not the directory where you installed the class file.) Then, if you reconfigure
15474 LyX, it will find the class file and let you use the RevTeX4 textclass.
15477 \begin_layout Standard
15478 Probably the easiest way to get started is either to import a RevTeX 4 document
15486 \begin_inset space ~
15491 template, found in the templates directory.
15494 \begin_layout Subsection
15498 \begin_layout Standard
15499 Optional arguments to
15506 \begin_inset Quotes eld
15510 \begin_inset Quotes erd
15514 \begin_inset Quotes eld
15518 \begin_inset Quotes erd
15528 \begin_inset space ~
15536 \begin_inset space ~
15542 Remember that in RevTeX, at least one optional argument is required!
15545 \begin_layout Standard
15546 Other preamble matter, like
15553 \begin_inset space ~
15559 \begin_inset space ~
15564 dialog, also as usual.
15567 \begin_layout Subsection
15571 \begin_layout Standard
15572 The layouts basically correspond to the commands in RevTeX4.0.
15573 For example, the Email layout corresponds to
15580 Note that (at least as of RevTeX 4.0 Beta), the
15588 layouts are exactly equivalent, so you shouldn't need to use both.
15592 \begin_layout Plain Layout
15593 In case you're curious, both were included so that
15597 would be able to translate both
15617 \begin_layout Subsection
15621 \begin_layout Standard
15622 There are a couple of important unique aspects of RevTeX 4 which might cause
15623 bugs that will be even more confusing in LyX.
15626 \begin_layout Standard
15644 The LyX equivalent is that there is a separate Thanks layout.
15649 write footnotes in the
15653 layout, or weird things may happen.
15654 See the RevTeX 4 documentation for more details.
15657 \begin_layout Standard
15661 \begin_inset space ~
15669 \begin_inset space ~
15678 layouts must be placed
15686 layout and the corresponding
15703 , the LaTeX won't compile.
15706 \begin_layout Subsection
15710 \begin_layout Standard
15711 The main problem with this layout is that you can't use the optional arguments
15712 to layouts like Email and Title.
15713 (The problem is not unique to this layout; you can't use optional arguments
15714 to the Section layouts either.) This means that after you export that file
15715 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15716 need to edit the LaTeX file with a text editor to add the optional arguments
15718 \begin_inset space \thinspace{}
15722 \begin_inset space \space{}
15725 the running title for the page headers.
15726 Lacking these layouts makes the
15732 (and the equivalent
15738 ) useless, so the corresponding layouts don't exist, and will have to be
15743 \begin_layout Plain Layout
15748 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15749 has not been updated yet to take advantage of it.
15757 \begin_layout Section
15758 Springer Journals (
15765 \begin_layout Standard
15771 \begin_layout Subsection
15775 \begin_layout Standard
15776 These are the layout files for some of the journal formats used by Springer
15777 Verlag and listed on
15778 \begin_inset Flex URL
15781 \begin_layout Plain Layout
15783 http://www.springer.de/author/tex/help-journals.html
15788 , where you should also go to fetch the class files (yes, these are LaTeX2e
15790 It is a modular system: the things common to all journals are implemented
15795 , which journal-specific layout files (such as, e.
15796 \begin_inset space \thinspace{}
15800 \begin_inset space \space{}
15807 for Journal of Geodesy) can include.
15810 \begin_layout Standard
15811 This means that implementing support for any other Springer journal on this
15812 list is as simple as writing your own
15820 file following the outline given in
15828 \begin_layout Standard
15829 It is reasonably well tested only for the Journal of Geodesy.
15838 come with the standard LyX distribution.
15839 Install the relevant class file (downloaded from Springer) in a proper
15840 directory, reconfigure LaTeX (in the teTeX case by running
15844 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15845 and it should work.
15848 \begin_layout Subsection
15852 \begin_layout Standard
15853 A large number of theorem-like styles —
15859 \SpecialChar \ldots{}
15865 \begin_layout Standard
15868 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15869 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15872 See the Springer class file documentation for details.
15875 \begin_layout Subsection
15879 \begin_layout Itemize
15891 \begin_layout Itemize
15894 Probability Theory and Related Fields
15900 — Jean-Marc Lasgouttes
15903 \begin_layout Standard
15904 Add your own, it isn't so hard!
15907 \begin_layout Subsection
15911 \begin_layout Standard
15912 These files are partly based on the older
15916 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15917 file from Springer.
15922 layout, are now defunct.
15923 Jean-Marc Lasgouttes helped out big in making me find my way around the
15924 LyX layout file mechanism.
15927 \begin_layout Subsection
15931 \begin_layout Standard
15933 But probably less than in the old hacked-LaTeX
15940 \begin_layout Standard
15942 \begin_inset space \thinspace{}
15945 g.: does not display the number for theorem-like layouts, just #.
15948 \begin_layout Section
15954 \begin_inset CommandInset label
15963 \begin_layout Standard
15971 \begin_layout Subsection
15975 \begin_layout Standard
15976 This section describes how to use LyX to make slides for overhead projectors.
15977 There are two document classes that can do this: the default slides class
15983 This section documents the former.
15986 \begin_layout Standard
15987 I'm going to say this again, nice and clear, so that there's no misunderstanding
15991 \begin_layout Standard
15992 \begin_inset VSpace bigskip
15998 \begin_layout Standard
16002 This section documents the class
16003 \begin_inset Quotes eld
16011 \begin_inset Quotes erd
16019 \begin_layout Standard
16020 \begin_inset VSpace bigskip
16026 \begin_layout Standard
16027 If you're looking for the documentation for
16028 \begin_inset Quotes eld
16036 \begin_inset Quotes erd
16039 , check out section
16040 \begin_inset space ~
16044 \begin_inset CommandInset ref
16046 reference "sec:foiltex"
16056 \begin_inset Quotes eld
16064 \begin_inset Quotes erd
16067 ] is actually somewhat better than the default
16075 \begin_layout Plain Layout
16076 \SpecialChar \ldots{}
16077 or so I've been told repeatedly by its advocates.
16078 Having never used it, I have no idea if this claim is true or not.
16083 which this section documents.
16086 \begin_layout Standard
16087 This class is the LaTeX2e improvement of the old
16092 Every LaTeX2e distribution includes this class [which I'll just refer to
16094 \begin_inset Quotes eld
16102 \begin_inset Quotes erd
16105 from now on], so you're bound to have it.
16106 As I noted earlier, there are other classes, such as
16110 , which also produce slides for overhead projectors and do a better job
16112 However, there are some things which
16116 can do which the others can't, such as generate overlays.
16117 Read on to learn more!
16120 \begin_layout Subsection
16122 \begin_inset CommandInset label
16124 name "sec:slidesetup"
16131 \begin_layout Standard
16132 Obviously, to use this document class, you need to select
16133 \begin_inset Quotes eld
16141 \begin_inset Quotes erd
16144 from the class list in the
16146 Document\SpecialChar \menuseparator
16150 There are some other special things you should know about this class:
16153 \begin_layout Itemize
16154 Don't bother changing the options
16159 They're not supported by the
16166 \begin_layout Itemize
16170 \begin_inset space ~
16175 behaves a bit differently for this class.
16176 The possible choices and what they do are as follows:
16180 \begin_layout Description
16185 The final output contains page numbers in the lower right corner.
16188 \begin_layout Description
16197 , but also prints out any time markers you've put in.
16198 This is the default.
16201 \begin_layout Description
16206 The final output contains no page numbers, time markers, or alignment markers.
16210 \begin_layout Itemize
16215 class has an extra option:
16221 \begin_inset Quotes eld
16229 \begin_inset Quotes erd
16232 in the extra class options.
16236 \begin_layout Standard
16237 Using this options allows you to add time markers to
16243 \begin_inset space ~
16247 \begin_inset CommandInset ref
16249 reference "sec:slideNote"
16257 \begin_layout Standard
16258 You can also use the template file
16259 \begin_inset Quotes eld
16267 \begin_inset Quotes erd
16270 to automatically set up a document to use the
16276 File\SpecialChar \menuseparator
16278 \begin_inset space ~
16282 \begin_inset space ~
16287 to open your new document].
16288 The template file also contains some examples of the special paragraph
16289 environments used by this class.
16290 I'll describe those next.
16293 \begin_layout Subsection
16294 Paragraph Environments
16297 \begin_layout Subsubsection
16298 Supported Environments
16301 \begin_layout Standard
16302 The first thing you'll notice when you start up a new
16306 document is the font size and type: it's the equivalent of the size
16307 \begin_inset Quotes eld
16315 \begin_inset Quotes erd
16321 \begin_inset space ~
16327 This is also what's used in the output.
16329 \begin_inset Quotes eld
16333 \begin_inset Quotes erd
16336 to remind you that this is a slide.
16337 Your final slides will use a larger font; ergo, you'll have less space.
16338 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16341 \begin_layout Standard
16342 The next thing that becomes obvious is the changes to the paragraph environment
16343 pull-down box [at the far-left end of the toolbar].
16344 Most of the paragraph environments you're used to seeing are missing.
16345 There are also five new ones.
16350 class itself only supports certain paragraph environments:
16353 \begin_layout Itemize
16359 \begin_layout Itemize
16365 \begin_layout Itemize
16371 \begin_layout Itemize
16377 \begin_layout Itemize
16383 \begin_layout Itemize
16389 \begin_layout Itemize
16395 \begin_layout Itemize
16401 \begin_layout Itemize
16407 \begin_layout Itemize
16413 \begin_layout Itemize
16419 \begin_layout Standard
16420 All of the other standard environments, including the section-heading environmen
16421 ts, aren't used in the
16428 \begin_layout Standard
16429 On the other hand, you'll notice the following new environments:
16432 \begin_layout Itemize
16438 \begin_layout Itemize
16444 \begin_layout Itemize
16450 \begin_layout Itemize
16456 \begin_layout Itemize
16462 \begin_layout Standard
16463 These five are kind of quirky, due to a
16464 \begin_inset Quotes eld
16468 \begin_inset Quotes erd
16472 You see, LyX doesn't permit you to nest any other paragraph environment
16473 into an empty environment.
16474 Now, that's fine and dandy, but it means that you wouldn't be able to start
16475 a slide with anything except plain text.
16476 To deal with this, I've performed a little
16477 \begin_inset Quotes eld
16481 \begin_inset Quotes erd
16487 \begin_layout Subsubsection
16488 Quirks of the New Environments
16489 \begin_inset CommandInset label
16491 name "sec:slideQuirk"
16498 \begin_layout Standard
16499 All five of the new paragraph environments are somewhat quirky due to inherent
16500 limitiations in the current version of LyX.
16501 As I just mentioned, LyX forbids environments that begin with another environme
16503 To get around this, the
16507 environment isn't a paragraph environment as described in the
16515 \begin_layout Standard
16516 You should consider
16529 \begin_inset Quotes eld
16532 pseudo-environments.
16533 \begin_inset Quotes erd
16536 They look like a section heading or a
16537 \begin_inset Quotes eld
16545 \begin_inset Quotes erd
16548 but really begin a [and, if necessary, end the previous] paragraph environment.
16558 \begin_inset Quotes eld
16562 \begin_inset Quotes erd
16565 These two perform some action.
16568 \begin_layout Standard
16569 A common feature of all five environments,
16589 , is a rather long-ish label.
16590 The text following this label — ordinarily the contents of the paragraph
16591 environment — is utterly irrelevant for
16612 LyX completely ignores it.
16613 In fact, you can leave these five environments completely empty.
16617 \begin_layout Standard
16622 to put any text after the rather long-ish label, you might want to.
16623 This could be a short description of the contents of the
16628 In that case, enter your descriptive comment and hit
16632 as you normally would.
16635 \begin_layout Standard
16636 If, on the other hand, you don't want to enter any descriptive text, you'll
16637 hit another LyX quirk.
16638 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16639 environment until you put something in the old one.
16643 \begin_layout Itemize
16644 Start entering the text that will
16672 \begin_layout Itemize
16673 Now move to the beginning of that paragraph.
16677 \begin_layout Itemize
16686 \begin_layout Itemize
16687 Finally, change this new, empty paragraph to a
16711 \begin_layout Standard
16712 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16716 \begin_layout Subsection
16717 Making a Presentation with
16730 \begin_layout Subsubsection
16738 \begin_layout Standard
16739 If you're expecting this section to teach you how to actually make a presentatio
16740 n, you'll be sorely disappointed.
16741 Naturally, I'll describe all of the ways the
16745 class can assist you in preparing the materials for a presentation.
16746 Filling in the contents, however, is up to you.
16751 the LyX philosophy.]
16754 \begin_layout Standard
16759 environment [in the manner described in section
16760 \begin_inset space ~
16764 \begin_inset CommandInset ref
16766 reference "sec:slideQuirk"
16770 ] tells LyX to begin a new slide [duh].
16771 The label for this environment/
16772 \begin_inset Quotes erd
16776 \begin_inset Quotes erd
16780 \begin_inset Quotes eld
16784 \begin_inset Quotes erd
16787 in cool blue, followed by the label,
16788 \begin_inset Quotes eld
16792 \begin_inset Quotes erd
16796 Any text or paragraph environments that follow this one go on the new slide.
16800 \begin_layout Standard
16801 Slides are probably the only time you'll need to forcibly end pages in LyX
16802 (this can be specified in the
16807 In fact, you'll want to, once you finish entering the contents of one slide.
16808 If you've entered more text than can physically fit on a slide, the extra
16809 overflows onto a new slide.
16810 I don't recommend doing this, however, since the overflow slide won't have
16811 any page number on it.
16812 Furthermore, it may interfere with any
16816 you've made to accompany the oversized
16823 \begin_layout Standard
16832 environments work the same way as the
16837 They both create an
16838 \begin_inset Quotes eld
16842 \begin_inset Quotes erd
16845 followed by a label [
16846 \begin_inset Quotes eld
16850 \begin_inset Quotes erd
16854 \begin_inset Quotes eld
16858 \begin_inset Quotes erd
16862 The color is a stunning magenta instead of blue, and the
16863 \begin_inset Quotes eld
16867 \begin_inset Quotes erd
16870 will look different, in style and in length.
16871 The label fonts of all three also differ from one another.
16874 \begin_layout Standard
16879 , if the contents of a
16887 exceed the physical size of a slide or sheet of paper, the extra will overflow
16889 Again, you should avoid this.
16890 It defeats the whole purpose of
16901 \begin_layout Subsubsection
16911 \begin_layout Standard
16916 is a slide that sits atop another slide.
16917 Perhaps you wish to discuss a figure on the main
16921 before displaying the text associated with it.
16922 One way to accomplish this is tape a flap of dark paper over the part of
16927 you want to display later.
16928 This method fails, however, if you wish to overlap one graph with another,
16930 You would then have to fumble while speaking to align the two separate,
16935 s to align the two graphs.
16940 environment in both cases makes life much easier.
16943 \begin_layout Standard
16948 receives the page number of its
16949 \begin_inset Quotes eld
16953 \begin_inset Quotes erd
16961 \begin_inset Quotes eld
16969 \begin_inset Quotes erd
16976 \begin_layout Plain Layout
16977 Presumably, mutliple
16982 \begin_inset Quotes eld
16990 \begin_inset Quotes erd
16994 \begin_inset Quotes eld
17002 \begin_inset Quotes erd
17006 \begin_inset Quotes eld
17014 \begin_inset Quotes erd
17018 \begin_inset space ~
17021 appended to the page number of the parent
17031 Clearly, you want the contents of both the
17039 to each fit on a single physical slide! You should probably consider an
17045 \begin_inset Quotes eld
17049 \begin_inset Quotes erd
17061 class provides a visual cue for this: the label at the start of an
17065 is shorter than that at the start of a
17070 Lastly, when you generate printable output, you'll find alignment markers
17071 in all four corners of both the
17075 page and its parent
17080 These will assist you in lining up the two physical slides.
17083 \begin_layout Standard
17084 The major problem in overlaying two slides is aligning the contents of the
17085 two transparencies.
17086 How much space should you leave for that graph on the second slide? Worse
17087 still, what if you want a graph and a sentence on second slide, but there
17088 is text on the main transparency that goes in between them? You could try
17089 and insert vertical space of the right size.
17090 The better way is to use
17101 \begin_layout Standard
17102 As their names imply,
17110 are two command-like paragraph environments that make all subsequent text
17111 invisible and visible, respectively.
17113 \begin_inset space ~
17117 \begin_inset CommandInset ref
17119 reference "sec:slideQuirk"
17123 that you don't place anything
17127 these two environments, however.
17132 , it inserts a centered, sky-blue label into the page reading
17133 \begin_inset Quotes eld
17136 <Invisible Text Follows>
17137 \begin_inset Quotes erd
17141 For paragraphs following this label, the parts of the
17149 ; it doesn't matter which] where they would be contain instead blank space.
17153 \begin_layout Standard
17158 , the corresponding centered label is
17159 \begin_inset Quotes eld
17162 <Visible Text Follows>
17163 \begin_inset Quotes erd
17167 Paragraphs following this label behave normally.
17168 Note that the beginning of a new
17180 automatically shuts off an
17185 It's therefore not necessary to use
17196 \begin_layout Standard
17197 By now, it should be obvious how to create overlay transparencies using
17198 the proper combination of
17217 \begin_layout Enumerate
17222 , including everything that will appear on it, whether on the main slide
17230 \begin_layout Enumerate
17231 Before each figure or paragraph that will appear only on the
17240 If necessary, insert a
17244 environment after the
17251 \begin_layout Enumerate
17256 immediately following the
17263 \begin_layout Enumerate
17264 Copy the contents of this
17275 \begin_layout Enumerate
17280 , change all of the
17291 \begin_layout Standard
17293 You've just made an
17300 \begin_layout Standard
17301 There's one problem with the way I've designed the LyX
17305 class: you can't make text in the middle of a paragraph invisible, nor
17306 make text in the middle of an invisible paragraph visible again.
17307 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17311 \begin_layout Plain Layout
17312 The commands of interest are:
17315 \begin_layout Itemize
17320 invisible \SpecialChar \ldots{}
17324 \begin_layout Itemize
17329 visible \SpecialChar \ldots{}
17333 \begin_layout Plain Layout
17334 \SpecialChar \ldots{}
17335 and need to be marked as TeX.
17337 \begin_inset Quotes eld
17341 \begin_inset Quotes erd
17344 you wish to change goes in between the brackets [and after the
17357 If you don't know how to mark text as TeX, see the appropriate section
17370 \begin_layout Subsubsection
17380 \begin_inset CommandInset label
17382 name "sec:slideNote"
17389 \begin_layout Standard
17398 is associated with a
17399 \begin_inset Quotes eld
17403 \begin_inset Quotes erd
17415 class provides visual cues.
17420 is shorter than that of a
17424 [yet longer than that of an
17428 ] and, like the label of an
17432 is shockingly magenta.
17433 Additionally, the printed
17437 has the page number of its
17438 \begin_inset Quotes eld
17442 \begin_inset Quotes erd
17450 \begin_inset Quotes eld
17458 \begin_inset Quotes erd
17462 \begin_inset Quotes eld
17470 \begin_inset Quotes erd
17474 \begin_inset Quotes eld
17482 \begin_inset Quotes erd
17486 You can have multiple
17490 s associated with a single
17502 , you'll probably want to break up long
17506 s so that they fit on a single sheet of paper.
17509 \begin_layout Standard
17514 is obvious: it contains anything additional you might want to say about
17520 It could also be used as a sheet of reminders for a particular
17525 In the case of the latter, you might want to make use of time markers.
17531 \begin_inset Quotes eld
17535 \begin_inset Quotes erd
17538 support for time markers, a
17543 So, you'll have to resort to using the LaTeX codes.
17546 \begin_layout Standard
17547 To use time markers, you'll need to specify the extra class option
17548 \begin_inset Quotes eld
17556 \begin_inset Quotes erd
17560 \begin_inset space ~
17564 \begin_inset CommandInset ref
17566 reference "sec:slidesetup"
17571 This option turns on timing marks, which will appear in the lower-left-hand
17577 To set what appears in the time marker, you use the LaTeX commands
17578 \begin_inset Quotes eld
17588 \begin_inset Quotes erd
17592 \begin_inset Quotes eld
17602 \begin_inset Quotes erd
17606 The arguments of both commands are time measured in seconds.
17608 \begin_inset Quotes eld
17618 \begin_inset Quotes erd
17621 sets the time marker to a given time.
17623 \begin_inset Quotes eld
17633 \begin_inset Quotes erd
17636 increments the time marker by the specified amount.
17637 Using time markers and
17641 s in this fashion, you can remind yourself how much time to spend on a particula
17649 \begin_layout Standard
17650 There's one last feature to describe.
17651 Clearly, you'd like to print out all of your
17659 s on transparencies while printing all of your
17676 with which it is associated.
17677 What's a person to do?
17680 \begin_layout Standard
17681 Luckily, there are two LaTeX commands that allow you to select what to print
17683 Both must be placed into the preamble of your document.
17685 \begin_inset Quotes eld
17697 \begin_inset Quotes erd
17700 will cause the output to contain only the
17709 Correspondingly, the command
17710 \begin_inset Quotes eld
17722 \begin_inset Quotes erd
17725 prevents the output of anything but
17730 I'd advise placing both commands in the preamble and initially comment
17732 You can then preview your entire presentation as you write.
17733 When you're done writing, you can then uncomment one of the two to select
17734 what you want to print.
17735 I like to uncomment
17736 \begin_inset Quotes eld
17748 \begin_inset Quotes erd
17751 , print to a file with
17752 \begin_inset Quotes eld
17760 \begin_inset Quotes erd
17763 in its name, comment it back out, then uncomment
17764 \begin_inset Quotes eld
17776 \begin_inset Quotes erd
17780 \begin_inset Quotes eld
17788 \begin_inset Quotes erd
17792 I can then send either file to a printer, loading transparencies or plain
17793 paper as appropriate.
17796 \begin_layout Standard
17797 You can also provide other arguments to the
17798 \begin_inset Quotes eld
17808 \begin_inset Quotes erd
17812 \begin_inset Quotes eld
17822 \begin_inset Quotes erd
17826 See a good LaTeX book for details.
17829 \begin_layout Subsection
17834 Class Template File
17837 \begin_layout Standard
17838 I have also provided a template file,
17839 \begin_inset Quotes eld
17847 \begin_inset Quotes erd
17855 To use it, begin your new presentation with
17860 ile\SpecialChar \menuseparator
17862 \begin_inset space ~
17866 \begin_inset space ~
17876 Your new LyX presentation file will contain an example
17897 additionally contain an example of the use of
17906 Lastly, the preamble will contain:
17909 \begin_layout LyX-Code
17910 % Uncomment to print out only slides and overlays
17913 \begin_layout LyX-Code
17917 \begin_layout LyX-Code
17923 \begin_inset Newline newline
17929 \begin_layout LyX-Code
17930 % Uncomment to print out only notes
17933 \begin_layout LyX-Code
17937 \begin_layout LyX-Code
17945 \begin_layout Standard
17946 One final thing: I created this class to support the LaTeX2e
17947 \begin_inset Quotes eld
17955 \begin_inset Quotes erd
17958 class, one of the built-in LaTeX2e classes.
17959 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17960 built-in slide class.
17961 It's here if you want it or need it.
17962 There exist other LaTeX2e classes for creating presentations, such as the
17968 \begin_inset space ~
17972 \begin_inset CommandInset ref
17974 reference "sec:foiltex"
17979 \begin_inset Quotes eld
17987 \begin_inset Quotes erd
17990 package [present on some TeX distributions].
17991 The latter is not yet supported under LyX.
17995 \begin_layout Plain Layout
17996 Perhaps you can take on the task\SpecialChar \ldots{}
18002 I know nothing about these other classes.
18003 Try them out to see what sort of alternative they provide.
18006 \begin_layout Chapter
18007 LyX Features needing Extra Software
18010 \begin_layout Section
18014 \begin_layout Standard
18020 \begin_layout Subsection
18024 \begin_layout Standard
18033 \begin_layout Plain Layout
18038 is not yet available when you are using the LaTeX distribution MiKTeX.
18043 , you'll find in the
18050 \begin_inset space ~
18061 \begin_inset CommandInset href
18063 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
18070 \begin_layout Standard
18075 package is a program that was written by
18076 \begin_inset Flex Noun
18079 \begin_layout Plain Layout
18081 \begin_inset space ~
18089 in frustration because some constructs in LaTeX are sometimes non-intuitive,
18090 and easy to forget.
18091 The program runs over your LaTeX file, checks the integrity of the file,
18092 and flags some common errors.
18093 In other technical words, it is
18100 \begin_layout Standard
18101 Well, what is a syntax checker doing in LyX which is supposed to produce
18102 correct LaTeX anyways? The answer is simple: Just as
18106 not only checks the
18110 of C programs, but also does
18114 checks for type-errors,
18118 catches some common
18122 errors, in addition to the syntactical ones.
18127 is capable of detecting several common errors, such as
18130 \begin_layout Itemize
18131 Ellipsis detection:
18132 \begin_inset Newline newline
18135 Use \SpecialChar \ldots{}
18139 \begin_layout Itemize
18140 No space in front of/after parenthesis:
18141 \begin_inset Newline newline
18147 \begin_layout Itemize
18148 Enforcement of normal space after common abbreviations:
18149 \begin_inset Newline newline
18153 \begin_inset space \thinspace{}
18157 \begin_inset space \space{}
18160 is too wide spacing.
18163 \begin_layout Itemize
18164 Enforcement of end-of-sentence space when the last sentence ends with a
18166 \begin_inset Newline newline
18170 And this is wrong spacing.
18173 \begin_layout Itemize
18174 Space in front of labels and similar commands:
18175 \begin_inset Newline newline
18178 The label should stick right up to the text to avoid falling to a wrong
18181 \begin_inset CommandInset label
18191 \begin_layout Plain Layout
18192 This footnote is in danger of falling off to a wrong page
18197 The label is separated too much.
18200 \begin_layout Itemize
18201 Space in front of references, instead of hard spaces:
18202 \begin_inset Newline newline
18205 In you are in bad luck, the text will break right between the referenced
18206 text and reference number, and that's a pity.
18208 \begin_inset CommandInset ref
18210 reference "sec:chktex"
18217 \begin_layout Itemize
18219 \begin_inset Quotes eld
18223 \begin_inset Quotes erd
18227 \begin_inset Formula $\times$
18231 \begin_inset Newline newline
18234 2x2 looks cheap compared to
18235 \begin_inset Formula $2\times2$
18241 \begin_layout Standard
18242 and more \SpecialChar \ldots{}
18243 It is an invaluable tool when you are
18244 \begin_inset Quotes eld
18248 \begin_inset Quotes erd
18251 your document before printing, and you should run it right after the obligatory
18252 spelling check, and before you go fine tuning the typesetting.
18255 \begin_layout Subsection
18259 \begin_layout Standard
18260 If you have the program installed, usage is as simple as choosing
18262 Tools\SpecialChar \menuseparator
18264 \begin_inset space ~
18270 This will make LyX generate a LaTeX file of your document, start
18274 to check it, and then make LyX insert
18275 \begin_inset Quotes eld
18279 \begin_inset Quotes erd
18282 with the warnings from
18286 , if there were any.
18287 The warnings will be placed close to the point of the mistake, and you
18288 can quickly find them by using the
18290 Navigate\SpecialChar \menuseparator
18293 menu item, or the shortcut key
18302 Open the error boxes by clicking on them with the mouse, or use the shortcut
18311 bindings, or the corresponding
18320 Read the warning and correct the mistake, if it is a mistake.
18321 If you have trouble understanding what the warning is about, you can safely
18323 Remember that there is a hidden layer between the document on screen and
18324 the technical details in invoking
18328 , and this gap can make some warnings seem arcane or just right down plain
18332 \begin_layout Standard
18333 This document is an excellent testing bed for the feature, and it should
18334 provide quite a few warnings for you to fiddle with.
18335 Since computers are only so smart, expect most of the warnings to be false
18339 \begin_layout Subsection
18340 How to fine tune it
18343 \begin_layout Standard
18344 Sometimes, you'll find that
18348 makes more noise than suits your mood.
18349 Then you can choose not to use it, wait until your mood changes, or try
18354 to get better along with you.
18355 Another choice in the most desperate situations is to use
18357 View\SpecialChar \menuseparator
18359 \begin_inset space ~
18363 \begin_inset space ~
18367 \begin_inset space ~
18372 , which will get rid of all warnings instantly.
18375 \begin_layout Standard
18384 very configurable and extensible, you shouldn't expect to solve all problems
18390 Since LyX has to generate a somewhat special LaTeX file to be able to match
18391 the line numbers from the
18399 \begin_layout Plain Layout
18400 You can inspect the specific output from
18406 Edit\SpecialChar \menuseparator
18408 \begin_inset space ~
18412 \begin_inset space ~
18426 to the internal document structure, some of the warnings will not seen
18427 to appear correctly.
18428 There are two things you can do about this:
18431 \begin_layout Itemize
18436 invocation command line in
18452 installation configuration file (usually with the file
18457 See below to learn what warnings can be enabled and disabled on the command
18462 \begin_layout Itemize
18463 Export your document as a raw LaTeX file using
18465 File\SpecialChar \menuseparator
18466 Export\SpecialChar \menuseparator
18474 Invoked in this way, it can be a hassle to find the corresponding place
18475 in the document inside LyX, but with a little patience, you should be able
18479 \begin_layout Standard
18480 Here follows the warning messages that can be enabled and disabled in
18489 to disable a warning, and
18493 to enable a warning.
18494 The emphasized entries are disabled by default, because the default is
18497 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18502 \begin_layout Standard
18503 Notice that you should only use the options that enable and disable warnings,
18504 because LyX relies on some of the other command line parameters to be set
18505 in a specific way to have a chance to communicate with
18512 \begin_layout Enumerate
18516 Command terminated with space.
18519 \begin_layout Enumerate
18522 Non-breaking space (
18523 \begin_inset Quotes eld
18531 \begin_inset Quotes erd
18534 ) should have been used.
18537 \begin_layout Enumerate
18541 You should enclose the previous parenthesis with
18542 \begin_inset Quotes eld
18550 \begin_inset Quotes erd
18556 \begin_layout Enumerate
18559 Italic correction (
18560 \begin_inset Quotes eld
18570 \begin_inset Quotes erd
18573 ) found in non-italic buffer.
18576 \begin_layout Enumerate
18579 Italic correction (
18580 \begin_inset Quotes eld
18590 \begin_inset Quotes erd
18593 ) found more than once.
18596 \begin_layout Enumerate
18600 No italic correction (
18601 \begin_inset Quotes eld
18611 \begin_inset Quotes erd
18617 \begin_layout Enumerate
18621 \begin_inset Quotes eld
18629 \begin_inset Quotes erd
18633 \begin_inset Quotes eld
18641 \begin_inset Quotes erd
18647 \begin_layout Enumerate
18650 Wrong length of dash may have been used.
18653 \begin_layout Enumerate
18657 \begin_inset Quotes eld
18665 \begin_inset Quotes erd
18669 \begin_inset Quotes eld
18677 \begin_inset Quotes erd
18683 \begin_layout Enumerate
18687 \begin_inset Quotes eld
18695 \begin_inset Quotes erd
18701 \begin_layout Enumerate
18705 \begin_inset Quotes eld
18713 \begin_inset Quotes erd
18716 to achieve an ellipsis.
18719 \begin_layout Enumerate
18722 Inter-word spacing (
18723 \begin_inset Quotes eld
18733 \begin_inset Quotes eld
18736 ) should perhaps be used.
18739 \begin_layout Enumerate
18742 Inter-sentence spacing (
18743 \begin_inset Quotes eld
18753 \begin_inset Quotes erd
18756 ) should perhaps be used.
18759 \begin_layout Enumerate
18762 Could not find argument for command.
18765 \begin_layout Enumerate
18769 \begin_inset Quotes eld
18777 \begin_inset Quotes erd
18783 \begin_layout Enumerate
18786 Math mode still on at end of LaTeX file.
18789 \begin_layout Enumerate
18793 \begin_inset Quotes eld
18801 \begin_inset Quotes erd
18804 doesn't match the number of
18805 \begin_inset Quotes eld
18813 \begin_inset Quotes erd
18819 \begin_layout Enumerate
18822 You should use either
18825 \begin_inset Quotes eld
18833 \begin_inset Quotes erd
18838 as an alternative to
18839 \begin_inset Quotes eld
18847 \begin_inset Quotes erd
18853 \begin_layout Enumerate
18860 " (ASCII 39) instead of "
18867 \begin_layout Enumerate
18870 User-specified pattern found.
18873 \begin_layout Enumerate
18876 This command might not be intended.
18879 \begin_layout Enumerate
18886 \begin_layout Enumerate
18904 \begin_layout Enumerate
18907 Delete this space to maintain correct page references.
18910 \begin_layout Enumerate
18914 You might wish to put this between a pair of
18915 \begin_inset Quotes eld
18923 \begin_inset Quotes erd
18929 \begin_layout Enumerate
18932 You ought to remove spaces in front of punctuation.
18935 \begin_layout Enumerate
18938 Could not execute LaTeX command.
18941 \begin_layout Enumerate
18950 in front of small punctuation.
18953 \begin_layout Enumerate
18961 may look prettier here.
18964 \begin_layout Enumerate
18968 Multiple spaces detected in output.
18971 \begin_layout Enumerate
18974 This text may be ignored.
18977 \begin_layout Enumerate
18983 \begin_inset Quotes eld
18988 to begin quotation, not
18995 \begin_layout Enumerate
19002 to end quotation, not
19005 \begin_inset Quotes eld
19013 \begin_layout Enumerate
19019 \begin_layout Enumerate
19022 You should perhaps use
19023 \begin_inset Quotes eld
19031 \begin_inset Quotes erd
19037 \begin_layout Enumerate
19040 You should put a space in front of/after parenthesis.
19043 \begin_layout Enumerate
19046 You should avoid spaces in front of/after parenthesis.
19049 \begin_layout Enumerate
19053 You should not use punctuation in front of/after quotes.
19056 \begin_layout Enumerate
19059 Double space found.
19062 \begin_layout Enumerate
19065 You should put punctuation outside inner/inside display math mode.
19068 \begin_layout Enumerate
19071 You ought to not use primitive TeX in LaTeX code.
19074 \begin_layout Enumerate
19077 You should remove spaces in front of
19078 \begin_inset Quotes eld
19086 \begin_inset Quotes erd
19092 \begin_layout Enumerate
19095 \begin_inset Quotes eld
19103 \begin_inset Quotes erd
19106 is normally not followed by
19107 \begin_inset Quotes eld
19115 \begin_inset Quotes erd
19121 \begin_layout Standard
19122 In later versions of LyX, we hope to provide a more complete interface to
19123 this tool (and it's smaller cousin
19127 ) to exploit the full power of it.
19128 But it's not exactly useless as it is now: go try it on one of your existing
19129 documents of a certain length and be surprised.
19132 \begin_layout Section
19133 Version Control in LyX
19136 \begin_layout Standard
19139 Lars Gullik Bjønnes
19146 \begin_layout Subsection
19150 \begin_layout Standard
19151 A friend of mine wanted to try LyX for a group project.
19152 When he didn't find support for version control or file locking, he dropped
19154 This angered me a bit, so I thought that I should at least make support
19155 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
19156 This has been done.
19157 LyX now supports some of the most basic RCS/CVS/SVN commands.
19158 If you need something a bit more sophisticated you will have to do that
19159 manually in a terminal.
19162 \begin_layout Standard
19163 Before you begin to use the version control features in LyX, you should
19164 be familiar with RCS/CVS/SVN usage before start using it under LyX.
19165 Also note that CVS support is not as good as subversion support so we advice
19167 Good place to start with Subversion is SVN Book
19171 \begin_layout Plain Layout
19172 \begin_inset CommandInset href
19174 target "http://svnbook.red-bean.com/"
19184 In case of RCS you should read
19185 \begin_inset Quotes eld
19189 \begin_inset Quotes erd
19192 (a man file, read it with
19197 This file describes all the basic features of RCS.
19198 You should especially notice the comment about a RCS directory, and the
19199 notion of a master RCS file (the file ending in
19206 \begin_layout Standard
19207 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
19208 package—no guarantees are made for older versions.
19209 Most of the log messages are not currently displayed after operations —
19210 you can check them in Messages pane if unsure.
19213 \begin_layout Standard
19214 For introducing your own external commands consult vc-command in the manual
19218 \begin_layout Subsection
19219 RCS commands in LyX
19222 \begin_layout Standard
19223 The following sections describe the RCS commands supported by LyX.
19224 You can find them in the
19226 File\SpecialChar \menuseparator
19228 \begin_inset space ~
19234 LyX was tested against RCS 5.7.
19237 \begin_layout Subsubsection
19243 \begin_layout Standard
19244 If your document is not under revision control, this is the only item shown
19246 And if it is under revision control, the
19250 item is not visible.
19254 \begin_layout Standard
19255 This command registers your document with RCS (unless you are under the
19256 directory managed by CVS)\SpecialChar \@.
19257 You are asked interactively to supply an initial
19258 description of the document.
19259 The document is now set in Read-Only mode and you have to
19262 \begin_inset space ~
19266 \begin_inset space ~
19270 \begin_inset space ~
19275 , before making any changes to it.
19276 A document under revision control has a
19277 \begin_inset Quotes eld
19280 [RCS:<version> <locker>]
19281 \begin_inset Quotes erd
19284 item tagged to the filename in the minibuffer.
19287 \begin_layout Standard
19288 RCS command that is run:
19290 ci -q -u -i -t-"<initial description>" <file-name>
19293 \begin_layout Standard
19298 to understand the switches.
19302 \begin_layout Subsubsection
19308 \begin_layout Standard
19309 When you are finished editing a file, you check in your changes.
19310 When you do this, you are asked for a description of the changes.
19311 This is stored in the history log.
19312 The version number is bumped, your changes are applied to the master RCS
19313 file, the document is unlocked and set to Read-Only mode.
19317 \begin_layout Standard
19320 ci -q -u -m"<description>" <file-name>
19323 \begin_layout Subsubsection
19329 \begin_layout Standard
19330 By doing this you lock the document so that only you can edit it.
19331 This will also make the document Read-Write only for you.
19332 You will usually continue editing for a while and when you are finished
19333 you check in your changes.
19334 The status line is changed to reflect that you have locked the file.
19338 \begin_layout Standard
19341 co -q -l <file-name>
19344 \begin_layout Subsubsection
19347 Revert To Repository Version
19350 \begin_layout Standard
19351 This will discard all changes made to the document since the last check
19353 You get a warning before changes are discarded.
19356 \begin_layout Standard
19359 co -f -u<version> <file-name>
19362 \begin_layout Subsubsection
19368 \begin_layout Standard
19369 This makes as if the last check in never happened.
19370 No changes are made to the document loaded into LyX, but the last version
19371 is removed from the master RCS file.
19375 \begin_layout Standard
19378 rcs -o<version> <file-name>
19381 \begin_layout Subsubsection
19387 \begin_layout Standard
19388 This shows the complete history of the RCS document.
19393 is shown in a browser.
19401 \begin_layout Subsubsection
19405 \begin_layout Standard
19406 LyX supports RCS version number information (only), see
19407 \begin_inset CommandInset ref
19409 reference "sub:VCS-Revision-Information"
19416 \begin_layout Subsection
19417 CVS commands in LyX
19420 \begin_layout Standard
19421 A subset of CVS operations is supported by LyX.
19422 You can find the commands in the
19424 File\SpecialChar \menuseparator
19426 \begin_inset space ~
19432 The version control system SVN is more powerful, so please use it instead
19433 of CVS if possible.
19436 \begin_layout Subsubsection
19442 \begin_layout Standard
19443 If you start from scratch with CVS you have to create your repository and
19444 checkout the working copy with external tools.
19445 If you're using a client-server setup you may need to login before doing
19446 the first repository checkout.
19449 \begin_layout Standard
19450 If your documents are under revision control and others are using the same
19451 repository problems arise when different changes to the same document at
19452 the same location happen.
19453 Standard CVS repositories doesn't operate with a file locking mechanism.
19454 This may be surprising, but conflicts only occur if people disagree on
19455 the proper content of the same part of a document.
19456 So, if co-workers are used to communicate regularly, these conflicts occur
19458 If they don't communicate they have a fundamental problem anyway.
19459 Nevertheless some people like to work with so called
19460 \begin_inset Quotes eld
19464 \begin_inset Quotes erd
19468 If they do so the working copy of all files is readonly when checked out
19469 first and the user starts editing after using a special command to make
19470 the working copy writable.
19471 When the changes are checked in the working copy returns to readonly state.
19472 With LyX one has to edit the
19473 \begin_inset Flex Code
19476 \begin_layout Plain Layout
19482 file and add the line
19483 \begin_inset Flex Code
19486 \begin_layout Plain Layout
19492 to work with reserved checkouts.
19493 The benefit is the possibility to see who is using a writable copy of some
19495 It's not guaranteed only one user makes a copy writable.
19498 \begin_layout Standard
19499 LyX tries to guess if you're using reserved or non-reserved checkouts.
19500 If your working copy is readonly or it is writable and an additional copy
19501 of your document exists in the CVS/Base sub-directory a reserved otherwise
19502 a non-reserved checkout is assumed.
19503 When a reserved checkout is detected you have to use
19504 \begin_inset Flex MenuItem
19507 \begin_layout Plain Layout
19513 to make your working copy writable if it's readonly.
19515 \begin_inset Flex MenuItem
19518 \begin_layout Plain Layout
19524 operation is possible and that makes your working copy readonly again after
19525 transferring your changes to the repository.
19528 \begin_layout Standard
19529 More information about CVS can be found here
19530 \begin_inset Flex URL
19533 \begin_layout Plain Layout
19535 http://www.nongnu.org/cvs
19541 \begin_inset Flex URL
19544 \begin_layout Plain Layout
19546 http://ximbiot.com/cvs
19554 \begin_layout Standard
19559 to understand the sub-commands and the switches mentioned below.
19562 \begin_layout Subsubsection
19568 \begin_layout Standard
19569 If your document is not under revision control, this is the only item shown
19571 And if it is under revision control, the
19578 item is not visible.
19582 \begin_layout Standard
19583 This command registers in CVS your document
19584 \begin_inset Flex Strong
19587 \begin_layout Plain Layout
19595 in case you have already the documents directory under CVS control (in
19601 This means you have to create or checkout the archive by yourself using
19603 (In case you forget that step LyX registers the document with RCS.)
19606 \begin_layout Standard
19607 Then you are asked interactively to supply an initial description of the
19609 Don't forget that registered file is not yet checked in.
19612 \begin_layout Standard
19613 CVS command that is run:
19615 cvs -q add -m"<entered message>" "<file-name>"
19618 \begin_layout Standard
19623 above and for all other CVS commands is an abbreviation for
19624 \begin_inset Quotes eld
19627 change the current working directory to file location and use the file name
19628 without path component as argument
19629 \begin_inset Quotes erd
19635 \begin_layout Subsubsection
19641 \begin_layout Standard
19642 When you are finished editing a file, you commit your changes.
19643 When you do this and you had changed the document, you are asked for a
19644 description of the changes.
19645 After that changes are written to the repository.
19646 In case you didn't change the document and a reserved checkout is detected
19647 the reservation made on
19648 \begin_inset Flex MenuItem
19651 \begin_layout Plain Layout
19660 \begin_layout Labeling
19661 \labelwidthstring 00.00.0000
19663 \begin_inset space ~
19667 \begin_inset space ~
19671 \begin_inset Newline newline
19675 \begin_inset Flex Code
19678 \begin_layout Plain Layout
19681 -q commit -m"<description>" "<file-name>"
19687 \begin_inset Newline newline
19691 \begin_inset Flex Code
19694 \begin_layout Plain Layout
19705 \begin_layout Subsubsection
19711 \begin_layout Standard
19712 When you are sharing a repository with others, you may have to incorporate
19713 their changes into your working copy.
19716 \begin_layout Standard
19719 cvs -q update "<file-name>"
19722 \begin_layout Standard
19723 If a readonly checkout is detected the working copy is made writable and
19727 \begin_layout Standard
19730 cvs -q edit "<file-name>"
19733 \begin_layout Subsubsection
19736 Revert To Repository Version
19739 \begin_layout Standard
19740 This will discard all changes made to the document since the last check
19742 You get a warning before changes are discarded.
19743 Firstly the file is deleted, secondly CVS update command is run.
19746 \begin_layout Standard
19749 cvs -q update "<file-name>"
19752 \begin_layout Standard
19753 If a reserved checkout is detected and the working copy has no changes only
19754 the reservation is undone.
19757 \begin_layout Standard
19760 cvs -q unedit "<file-name>"
19763 \begin_layout Subsubsection
19764 Update of the local directory checkout from repository
19767 \begin_layout Standard
19768 Once your documents gets more complex, containing sub-documents and pictures,
19770 \begin_inset Flex Code
19773 \begin_layout Plain Layout
19779 files and so on using version control becomes more complicated.
19780 LyX supports updating the whole tree in which resides the document.
19781 This become especially useful once you cooperate with people which neither
19782 have detailed knowledge about CVS usage nor they have ambition to commit
19783 additional material to the repository.
19784 You have to organize the files structure so that all external files are
19785 in the same directory or subdirectories of the document.
19786 It's good practice anyway to store multipart documents in an extra directory.
19789 \begin_layout Standard
19791 \begin_inset Flex Code
19794 \begin_layout Plain Layout
19795 Update local directory from repository
19800 command updates the whole directory.
19801 If local changes are detected user is warned before update starts.
19802 In case of merge conflicts both versions of the conflicting document parts
19803 are placed in the final document.
19804 You have to review and correct the result of the merge.
19805 You'll find the conflicts enclosed in pairs of
19806 \begin_inset Flex Code
19809 \begin_layout Plain Layout
19816 \begin_inset Flex Code
19819 \begin_layout Plain Layout
19826 \begin_inset Flex Code
19829 \begin_layout Plain Layout
19836 The first part is your version as before the update operation with the
19837 document name prepended.
19838 The second one is the repository version with the version number after
19840 \begin_inset Flex Code
19843 \begin_layout Plain Layout
19852 \begin_layout Labeling
19853 \labelwidthstring 00.00.0000
19855 \begin_inset space ~
19859 \begin_inset space ~
19863 \begin_inset Newline newline
19867 \begin_inset Flex Code
19870 \begin_layout Plain Layout
19878 (Ask if changes are detected.)
19879 \begin_inset Newline newline
19883 \begin_inset Flex Code
19886 \begin_layout Plain Layout
19887 cd $path; cvs -q update
19897 \begin_layout Standard
19899 \begin_inset Flex Code
19902 \begin_layout Plain Layout
19908 stands for the path to the document.
19911 \begin_layout Subsubsection
19917 \begin_layout Standard
19918 This shows the complete history of the CVS document.
19921 cvs log "<file-name>"
19923 is shown in a browser.
19926 \begin_layout Subsection
19927 SVN commands in LyX
19930 \begin_layout Standard
19931 SVN is now partially supported by LyX.
19932 You can find the commands in the
19934 File\SpecialChar \menuseparator
19936 \begin_inset space ~
19942 Please note that if you use password protected access to repository via
19943 ssh, you will be asked in terminal window.
19944 LyX was tested against SVN 1.5 and 1.6
19948 \begin_layout Plain Layout
19949 Most of the commands will work with 1.4 too, see
19950 \begin_inset CommandInset ref
19952 reference "sub:SVN-Repo-Update"
19964 \begin_layout Subsubsection
19970 \begin_layout Standard
19971 If your document is not under revision control, this is the only item shown
19973 And if it is under revision control, the
19980 item is not visible.
19984 \begin_layout Standard
19985 This command registers in SVN your document ONLY in case you have already
19986 the documents directory under SVN control (in particular
19991 This means you have to checkout the archive by yourself.
19995 \begin_layout Standard
19996 Then you are asked interactively to supply an initial description of the
19998 Don't forget that registered file is not yet commited.
20001 \begin_layout Standard
20002 SVN command that is run:
20005 \begin_inset Quotes eld
20009 \begin_inset Quotes erd
20015 \begin_layout Standard
20020 to understand the switches.
20024 \begin_layout Subsubsection
20030 \begin_layout Standard
20031 When you are finished editing a file, you commit your changes.
20032 When you do this, you are asked for a description of the changes.
20033 After that changes are commited.
20036 \begin_layout Standard
20041 \begin_layout Plain Layout
20042 In case locking is not enabled.
20044 \begin_inset CommandInset ref
20046 reference "subsec:SVN-File-Locking"
20057 svn commit -q -m"<description>" <file-name>
20060 \begin_layout Subsubsection
20066 \begin_layout Standard
20067 Updates the changes of this file from the repository.
20068 Be sure you understand SVN merging and conflicts resolving before using
20069 this function, because all conflicts has to be resolved manually by you!
20072 \begin_layout Standard
20077 \begin_layout Plain Layout
20085 svn update --non-interactive
20086 \begin_inset Quotes eld
20090 \begin_inset Quotes erd
20096 \begin_layout Subsubsection
20099 Revert To Repository Version
20102 \begin_layout Standard
20103 This will discard all changes made to the document since the last check
20105 You get a warning before changes are discarded.
20109 \begin_layout Standard
20113 \begin_inset Quotes eld
20117 \begin_inset Quotes erd
20123 \begin_layout Subsubsection
20124 \begin_inset CommandInset label
20126 name "sub:SVN-Repo-Update"
20130 Update of the local directory checkout from repository
20134 \begin_layout Plain Layout
20135 Note that this command will work only with subversion
20136 \begin_inset Formula $\geqq1.5$
20147 \begin_layout Standard
20148 All the commands above have one shortcomming - they deal with the current
20150 Once your document contains pictures, includes external
20151 \begin_inset Flex Code
20154 \begin_layout Plain Layout
20160 files and so on administration becomes more complicated.
20161 LyX now supports updating the whole tree in which resides the document
20165 \begin_layout Plain Layout
20166 One need to organize the files structure so that all external files are
20167 in the same directory or subdirectories of the document.
20174 This become especially useful once you cooperate with people which neither
20175 know about subversion management nor they have ambition to commit additional
20176 material to the repository.
20180 \begin_layout Standard
20181 \begin_inset Flex Code
20184 \begin_layout Plain Layout
20185 Update local directory from repository
20190 command updates the whole directory and in case of merge conflicts local
20191 version of the files are left, so no unintended data loss occurs.
20192 If local changes are detected user is warned before update starts.
20195 \begin_layout Labeling
20196 \labelwidthstring 00.00.0000
20198 \begin_inset space ~
20202 \begin_inset space ~
20206 \begin_inset Newline newline
20210 \begin_inset Flex Code
20213 \begin_layout Plain Layout
20219 (Ask if changes are detected.)
20220 \begin_inset Newline newline
20224 \begin_inset Flex Code
20227 \begin_layout Plain Layout
20228 svn update --accept mine-full $path
20236 \begin_layout Standard
20238 \begin_inset Flex Code
20241 \begin_layout Plain Layout
20247 stands for the path to the document.
20250 \begin_layout Subsubsection
20256 \begin_layout Standard
20257 This shows the complete history of the SVN document.
20261 \begin_inset Quotes eld
20265 \begin_inset Quotes erd
20270 is shown in a browser.
20273 \begin_layout Subsubsection
20275 \begin_inset CommandInset label
20277 name "subsec:SVN-File-Locking"
20284 \begin_layout Standard
20285 The file exchange through various revision control systems brings the problem
20286 of merge conflicts in case two different users try to edit the same (parts
20288 When such a conflict happens it needs manual resolving and one reasonable
20289 alternative is to provide some kind of locking mechanism, which guarantees
20290 that only one user is allowed to edit file at the given time.
20293 \begin_layout Standard
20294 SVN has two such mechanisms to provide mutual exclusivity for file access
20295 - locks and automatic setting of write permissions (see sec.
20297 \begin_inset CommandInset ref
20299 reference "subsec:Automatical-Locking-Property"
20304 \begin_inset Flex Code
20307 \begin_layout Plain Layout
20317 \begin_layout Plain Layout
20318 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20324 If this property is detected for a given document LyX starts to use SVN
20325 locks for document editing automatically and the whole check-in/out mechanism
20326 switches to the same regimen as for RCS.
20327 This in particular means there are two different modes of file use in LyX:
20330 \begin_layout Itemize
20332 The loaded file is in the read-only mode.
20333 For editing on needs to check-out.
20338 consists of updating from the repository and gaining write lock.
20339 If the lock is not possible to obtain, we remain in unlocked state.
20342 \begin_layout Itemize
20344 The loaded file is in the 'normal' edit mode.
20345 No other user is allowed to edit the file.
20350 consists of commiting changes and releasing write-lock.
20351 If no changes have been made to the document, no commit will be produced
20355 \begin_layout Plain Layout
20356 Don't be puzzled by the fact that you will be asked for commit message anyway.
20361 and only the write-lock will be released.
20364 \begin_layout Standard
20368 \begin_layout Labeling
20369 \labelwidthstring 00.00.0000
20372 svn commit -q -m"<description>" "<file-name>"
20373 \begin_inset Newline newline
20376 svn unlock "<file-name>"
20379 \begin_layout Labeling
20380 \labelwidthstring 00.00.0000
20383 svn update "<file-name>"
20384 \begin_inset Newline newline
20387 svn lock "<file-name>"
20390 \begin_layout Subsubsection
20393 \begin_inset CommandInset label
20395 name "subsec:Automatical-Locking-Property"
20401 Automatic Locking Property
20404 \begin_layout Standard
20405 The above mentioned automatic setting of write permissions of the .lyx file
20411 ile\SpecialChar \menuseparator
20417 \begin_inset space ~
20420 Control\SpecialChar \menuseparator
20425 oggle locking property
20428 This command is active only when the file is not locked on the svn server
20430 you need to check-out before proceeding).
20433 \begin_layout Labeling
20434 \labelwidthstring 00.00.0000
20436 \begin_inset space ~
20442 \begin_layout Labeling
20443 \labelwidthstring 00.00.0000
20446 svn propset svn:needs-lock ON "<file-name>"
20449 \begin_layout Labeling
20450 \labelwidthstring 00.00.0000
20453 svn propdel svn:needs-lock "<file-name>"
20456 \begin_layout Subsubsection
20457 \begin_inset CommandInset label
20459 name "sub:VCS-Revision-Information"
20463 Revision Information in Documents
20466 \begin_layout Standard
20467 There are more possibilities how to activate revision information in our
20471 \begin_layout Itemize
20472 LyX supports directly:
20476 \begin_layout Itemize
20477 tree revision information (
20478 \begin_inset Flex Code
20481 \begin_layout Plain Layout
20488 The result is the output of the
20489 \begin_inset Flex Code
20492 \begin_layout Plain Layout
20498 command, the following table gives you an idea, how to read the results.
20501 \begin_layout Standard
20503 \begin_inset Tabular
20504 <lyxtabular version="3" rows="6" columns="2">
20505 <features tabularvalignment="middle">
20506 <column alignment="center" valignment="top" width="0">
20507 <column alignment="center" valignment="top" width="0">
20509 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20512 \begin_layout Plain Layout
20518 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20521 \begin_layout Plain Layout
20529 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20532 \begin_layout Plain Layout
20538 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20541 \begin_layout Plain Layout
20542 mixed revision working copy
20549 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20552 \begin_layout Plain Layout
20558 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20561 \begin_layout Plain Layout
20562 modified working copy
20569 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20572 \begin_layout Plain Layout
20578 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20581 \begin_layout Plain Layout
20582 switched working copy
20589 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20592 \begin_layout Plain Layout
20598 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20601 \begin_layout Plain Layout
20602 partial working copy, from a sparse checkout
20609 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20612 \begin_layout Plain Layout
20618 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20621 \begin_layout Plain Layout
20622 mixed revision, modified, switched working copy
20635 \begin_layout Itemize
20636 file revision information.
20637 The result comes from parsing the output of
20638 \begin_inset Flex Code
20641 \begin_layout Plain Layout
20643 \begin_inset space ~
20647 \begin_inset space ~
20651 \begin_inset space ~
20660 Supported flags are:
20664 \begin_layout Itemize
20665 version number of the last commit (
20666 \begin_inset Flex Code
20669 \begin_layout Plain Layout
20678 \begin_layout Itemize
20679 author of the last commit (
20680 \begin_inset Flex Code
20683 \begin_layout Plain Layout
20692 \begin_layout Itemize
20693 date of the last commit (
20694 \begin_inset Flex Code
20697 \begin_layout Plain Layout
20706 \begin_layout Itemize
20707 time of the last commit (
20708 \begin_inset Flex Code
20711 \begin_layout Plain Layout
20721 \begin_layout Standard
20722 You can obtain this info via InsetInfo (e.g.
20724 \begin_inset Flex Code
20727 \begin_layout Plain Layout
20728 info-insert buffer vcs-date
20734 The information will be available only when you have the file stored under
20735 svn managment (i.e.
20737 \begin_inset Flex Code
20740 \begin_layout Plain Layout
20746 directory is available with your document).
20750 \begin_layout Itemize
20751 Another---a hacking one---possibility is to use svn keywords
20755 \begin_layout Plain Layout
20756 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20762 In short -- you set file keywords property (e.g.
20765 svn propset svn:keywords 'Rev' file.lyx
20767 ) and then paste keyword TeX code
20771 \begin_layout Plain Layout
20772 This is an easy way how to ensure that LyX won't break the line in the middle
20778 tag in your document (e.g.
20783 \begin_layout Plain Layout
20791 This way svn client will automatically substitute revision number (e.g.
20796 \begin_layout Plain Layout
20803 ) after each update and commit.
20804 There are more problems with this approach.
20805 Firstly, the '$' character is used in TeX world for math equations, so
20806 any occurence of math formula
20807 \begin_inset Formula $Rev$
20811 \begin_inset Formula $Rev:59$
20814 in your LyX document.
20815 Similarly for other keywords like Id, Date, Author, etc.
20816 Secondly svn output is dependent on your locales, so its very easy that
20817 svn would produce some problematic strings once Date is used.
20818 Thirdly you get the whole 'Rev: 59' string in your document instead of
20820 Until subversion implements user's custom keywords it will be hard to use
20821 this approach reliably or let LyX to support it directly.
20824 \begin_layout Subsection
20825 SVN and Windows Environment
20828 \begin_layout Quote
20829 My inclination is to say that if the user cannot figure out the command
20830 line operations on their own fairly quickly, they would be well advised
20831 to use TortoiseSVN.
20837 \begin_layout Subsubsection
20841 \begin_layout Standard
20842 In addition to installing LyX, and having access to a Subversion repository,
20843 the user will need to install the Subversion client program.
20844 A Windows installer for the client program is available from
20845 \begin_inset CommandInset href
20848 target "http://www.collab.net/nonav/downloads/subversion/"
20853 The user may also want to install
20854 \begin_inset CommandInset href
20857 target "http://tortoisesvn.tigris.org/"
20861 , which integrates Subversion operations into the context (rightclick) menu
20862 of Windows Explorer.
20863 Operations done outside LyX will typically be more convenient using the
20864 Explorer context menu.
20865 Note that TortoiseSVN is not a replacement for the client program, which
20866 is what LyX itself will use.
20869 \begin_layout Subsubsection
20870 Bringing a document under Subversion control
20873 \begin_layout Standard
20874 Before a LyX document can be brought under version control in Subversion,
20875 its parent directory needs to be under version control.
20876 If the document is being added to a project already in the repository,
20877 this is accomplished by checking the project out to the directory where
20878 the new document will be placed.
20879 If the project itself is not yet under version control (for instance, if
20880 this document starts a new project), the directory must be imported into
20882 This is done outside LyX.
20883 Both import and checkout are easily accomplished from the Explorer context
20884 menu using TortoiseSVN, or alternatively can be done using the command
20885 line client at a DOS prompt.
20886 The procedure for importing the project using TortoiseSVN is described
20887 below, assuming an existing repository and a new project being started
20895 For information on using the Subversion client program, run
20902 \begin_layout Enumerate
20909 in Windows Explorer, right click it, and select
20911 TortoiseSVN > Repo-browser
20914 If necessary, adjust the URL for the repository, then click OK.
20917 \begin_layout Enumerate
20918 Right click the level of the repository under which you want to place the
20919 new project folder (typically the top level) and click
20921 Create folder\SpecialChar \ldots{}
20924 Supply a name for the project folder and click OK.
20925 Add a message for the log file if desired, then click OK again.
20926 The new project folder should appear in the repository.
20927 Finally, click OK again to exit the repository browser.
20930 \begin_layout Enumerate
20931 Once again right click
20937 , this time selecting SVN Checkout\SpecialChar \ldots{}
20938 Select the URL of the project folder
20939 you just created in the repository, and set the checkout directory to
20947 You will be warned about a non-empty folder; click OK to proceed.
20948 You should now have a
20959 \begin_layout Enumerate
20960 Create or open your document in LyX and click
20965 ile\SpecialChar \menuseparator
20971 \begin_inset space ~
20974 Control\SpecialChar \menuseparator
20982 Add a log message and click OK to commit the document to version control.
20985 \begin_layout Standard
20986 From this point onward, you should have full functionality in the
20991 ile\SpecialChar \menuseparator
20997 \begin_inset space ~
21003 You also have the option of checking the document in and out, viewing its
21005 using the TortoiseSVN context menu in Windows Explorer or the Subversion
21006 client program from a command prompt.
21009 \begin_layout Subsubsection
21010 SSH tunnel used with SVN under Windows
21013 \begin_layout Standard
21014 Compared with Linux setting up svn client to communicate over ssh under
21015 Windows is a rather troublesome task.
21016 We will at least offer some hints how to setup the client side but prior
21017 knowledge about ssh and the Windows command line is needed, also be prepared
21018 for a great deal of frustration\SpecialChar \ldots{}
21022 \begin_layout Enumerate
21023 Get a svn client for windows, as described in the previous sections.
21024 When it is a fresh install run some svn command (e.g.
21026 \begin_inset Flex Code
21029 \begin_layout Plain Layout
21035 ) to create config files, which you will need to change later on.
21038 \begin_layout Enumerate
21039 Choose a ssh client for Windows.
21040 There are several possibilities, we will use the one from Putty tools
21044 \begin_layout Plain Layout
21045 \begin_inset Flex URL
21048 \begin_layout Plain Layout
21050 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21061 You will need to set the connection up so that the client doesn't ask for
21062 any password from you.
21063 To keep things easy we will use only keys without any additional password
21068 \begin_layout Enumerate
21070 \begin_inset Flex Code
21073 \begin_layout Plain Layout
21080 Save your private .ppk key file and put the public one on the server side.
21081 If the SVN server runs on Linux, note that the format of the public key
21082 is not compatible with Linux openssh and you will need to direcly copy-paste
21085 Public key for pasting into OpenSSH authorized_keys file
21087 :” edit field into the server's
21088 \begin_inset Flex Code
21091 \begin_layout Plain Layout
21092 ~/.ssh/authorized_keys
21098 \begin_inset Flex Code
21101 \begin_layout Plain Layout
21110 \begin_layout Enumerate
21112 \begin_inset Flex Code
21115 \begin_layout Plain Layout
21122 In the SVN config file
21126 \begin_layout Plain Layout
21127 Exact path depends on Windows version, usually somewhere around
21128 \begin_inset Flex Code
21131 \begin_layout Plain Layout
21134 Documents and Settings
21148 \begin_inset Flex Code
21151 \begin_layout Plain Layout
21166 , section [tunnels], setup ssh command, e.g.
21168 \begin_inset Flex Code
21171 \begin_layout Plain Layout
21172 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21181 \begin_layout Plain Layout
21182 It will usually take a lot of time to get exact command right and it depends
21184 For example do not have some remote server saved as a default session in
21186 If things fail, try to connect via plink without SVN first.
21195 \begin_layout Enumerate
21196 Checkout the SVN archive, e.g.
21198 \begin_inset Flex Code
21201 \begin_layout Plain Layout
21202 svn co svn+ssh://user@server/repository_path
21210 \begin_layout Subsubsection
21211 End-of-Line Conversions
21214 \begin_layout Standard
21215 When the collsraborators are mixing Linux and Windows environments, LyX
21216 will use different line endings inside the .lyx files.
21217 This is not a problem as far as LyX functionality is concerned, but the
21218 commit diffs will be huge and merge-conflicts prone.
21219 Fortunately SVN itself knows
21223 \begin_layout Plain Layout
21224 \begin_inset Flex URL
21227 \begin_layout Plain Layout
21229 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21239 how to deal with CR/LF problems when switching .lyx files to the
21240 \begin_inset Flex Code
21243 \begin_layout Plain Layout
21253 \begin_layout Plain Layout
21255 \begin_inset Flex Code
21258 \begin_layout Plain Layout
21259 svn propset svn:eol-style native FILE_NAME
21272 \begin_layout Subsection
21276 \begin_layout Standard
21277 With the recent addition of the vc-command function LyX power users are
21278 allowed to create their own commands for revision control.
21281 \begin_layout Standard
21282 As an example you can see how two TortoiseSVN commands could be integrated
21286 \begin_layout Description
21288 \begin_inset Flex Code
21291 \begin_layout Plain Layout
21292 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21300 \begin_layout Description
21302 \begin_inset Flex Code
21305 \begin_layout Plain Layout
21306 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21314 \begin_layout Subsection
21315 Version control and Document comparison
21318 \begin_layout Standard
21319 One of the typical uses of version control is to inspect the changes between
21320 revisions, usually by creating
21321 \begin_inset Flex Code
21324 \begin_layout Plain Layout
21331 While this is useful for plain text files, it is much less useful in the
21332 case of LyX files, which have more complicated structure.
21333 Hence we provide binding to the Document comparison feature.
21334 They are two ways of calling this feature - either by direct call of
21335 \begin_inset Flex Code
21338 \begin_layout Plain Layout
21344 LyX function (for details see LyX functions manual) or by icon/menu item
21346 \begin_inset Flex MenuItem
21349 \begin_layout Plain Layout
21350 Compare with older revision...
21356 One can either compare two chosen revisions of the document or he can simply
21357 compare the current version of edited text with older revisions (where
21359 \begin_inset Flex MenuItem
21362 \begin_layout Plain Layout
21368 ' revisions back means comparison of the edited file with last commited
21373 \begin_layout Standard
21374 This feature is supported for SVN and RCS though due to the more complicated
21375 versioning scheme of RCS there is a constraint -- when addressing the revisions
21376 in dialog, numbers always point to the last number in RCS revision number,
21381 \begin_layout Section
21382 Literate Programming
21385 \begin_layout Standard
21390 (kayvan@sylvan.com)
21394 original documentation written by
21396 Edmar Wienskoski Jr.
21399 (edmar-w-jr@technologist.com)
21402 \begin_layout Subsection
21406 \begin_layout Standard
21407 The main purpose of this documentation is to show you how to use LyX for
21408 literate programming, where it is assumed that you are familiar with this
21409 programming technique, and know what
21410 \begin_inset Quotes eld
21414 \begin_inset Quotes erd
21418 \begin_inset Quotes eld
21422 \begin_inset Quotes erd
21426 If that is not the case, please follow the web links provided in the following
21428 There is a lot of good documentation out there covering old development
21429 history to the latest tools tips.
21432 \begin_layout Standard
21433 It is also assumed that you are familiar with LyX itself to a point that
21434 you are comfortable changing your LyX preferences, and X resources file.
21435 If that is not the case please refer to other LyX documentation to cover
21436 your specific needs.
21439 \begin_layout Subsection
21440 Literate Programming
21443 \begin_layout Standard
21444 From the Literate Programming FAQ:
21447 \begin_layout Quotation
21448 Literate programming is the combination of documentation and source together
21449 in a fashion suited for reading by human beings.
21450 In fact, literate programs should be enjoyable reading, even inviting!
21451 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21452 and documentation in a single file.
21453 Literate programming tools then parse the file to produce either readable
21454 documentation or compilable source.
21455 The WEB style of literate programming was created by D.
21456 \begin_inset space \thinspace{}
21460 Knuth during the development of his TeX typesetting software.
21464 \begin_layout Standard
21465 Another excerpt says:
21468 \begin_layout Quotation
21471 How is literate programming different from verbose commenting?
21474 \begin_layout Quotation
21475 There are three distinguishing characteristics.
21476 In order of importance, they are:
21480 \begin_layout Itemize
21481 flexible order of elaboration
21484 \begin_layout Itemize
21485 automatic support for browsing
21488 \begin_layout Itemize
21489 typeset documentation, especially diagrams and mathematics
21493 \begin_layout Standard
21494 Now that I sparked your curiosity, take a look in the references.
21497 \begin_layout Subsubsection
21501 \begin_layout Standard
21502 The complete Literate Programming FAQ can be found at:
21505 \begin_layout Quote
21506 Literate Programming FAQ
21507 \begin_inset Flex URL
21510 \begin_layout Plain Layout
21512 http://www.literateprogramming.com/lpfaq.pdf
21520 \begin_layout Standard
21521 The FAQ lists 23 (twenty three!) different literate programming tools.
21522 Where some are specialized or
21523 \begin_inset Quotes eld
21527 \begin_inset Quotes erd
21530 for particular programming languages, while other have general scope.
21535 for my own use for several reasons:
21538 \begin_layout Itemize
21539 It can generate the documentation either in LaTeX or HTML.
21542 \begin_layout Itemize
21543 It has a open architecture, i.
21544 \begin_inset space \thinspace{}
21548 \begin_inset space \space{}
21551 it is easy to plug in new filters and to perform special processing that
21556 \begin_layout Itemize
21557 There is a good selection of filters available already (the HTML is one
21561 \begin_layout Itemize
21565 \begin_layout Standard
21566 The Noweb web page can be found at:
21569 \begin_layout Quote
21571 \begin_inset Flex URL
21574 \begin_layout Plain Layout
21576 http://www.cs.virginia.edu/~nr/noweb/
21584 \begin_layout Standard
21585 Starting from there you can reach many other interesting links and even
21586 some literate program examples.
21589 \begin_layout Subsection
21590 LyX and Literate Programming
21593 \begin_layout Standard
21594 The LyX support for Literate Programming is provided by using the generic
21595 LyX converters mechanism.
21596 This support is provided in a
21597 \begin_inset Quotes eld
21601 \begin_inset Quotes erd
21605 \begin_inset space \thinspace{}
21609 \begin_inset space \space{}
21612 you will be able to use this new LyX feature with some other literate programmin
21613 g tool of your choice by just changing your LyX preferences.
21616 \begin_layout Subsubsection
21617 Generating documents and code (weaving and tangling)
21620 \begin_layout Paragraph
21621 Selecting the document class
21624 \begin_layout Standard
21625 If you have installed Noweb and LyX successfully, whenever you open a new
21626 document or try to change the document class of an existing one, you will
21627 find that there are three new document classes available:
21630 \begin_layout Itemize
21634 \begin_layout Itemize
21638 \begin_layout Itemize
21642 \begin_layout Standard
21643 You must select one of them to create your literate documents from.
21647 \begin_layout Standard
21648 Note that literate documents are not limited to these three classes.
21649 New classes can be generated from other styles like letter or in combination
21650 with other class variations like Article (AMS).
21651 If you have special needs that cannot be covered by one of the existing
21652 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21653 will arrange to insert a new entry, or teach you how to do it.
21657 \begin_layout Plain Layout
21658 It is very simple, it involves the creation of a file with four lines, and
21659 re-running of the auto configuration.
21664 Moreover, if you use a literate tool other than Noweb you may need to create
21665 a new set of document classes for it.
21668 \begin_layout Paragraph
21672 \begin_layout Standard
21673 LyX enables you to write code with a layout named
21681 \begin_layout Plain Layout
21682 The equivalent Noweb term is
21683 \begin_inset Quotes eld
21687 \begin_inset Quotes erd
21691 For historical reasons, I got used to the term
21692 \begin_inset Quotes eld
21696 \begin_inset Quotes erd
21699 introduced by other literate tool named Nuweb, which I used for many years
21700 before rendering myself to Noweb.
21705 Noweb delimits scraps like this:
21708 \begin_layout LyX-Code
21712 \begin_layout LyX-Code
21716 \begin_layout LyX-Code
21720 \begin_layout LyX-Code
21724 \begin_layout LyX-Code
21728 \begin_layout Standard
21729 The problem is that whatever is written in between the << and the
21733 must be taken literally, i.
21734 \begin_inset space \thinspace{}
21738 \begin_inset space \space{}
21741 LyX should be prevented from making any special interpretation of what has
21743 This is handled by a special layout named Scrap, that works like a normal
21744 paragraph but has a free spacing capability.
21747 \begin_layout Standard
21748 The down side of the Scrap paragraph layout is that consecutive paragraphs
21749 of code will be spaced with one empty line in the source code and also
21750 in the printed documentation.
21751 The work around is to enter each line of code within a single Scrap, with
21752 a newline (ctrl-return).
21753 The example above will look like this:
21757 \begin_layout Plain Layout
21758 If you have a printed version of this document you will not see any difference
21759 between the previous example and this one.
21767 \begin_layout LyX-Code
21769 \begin_inset Newline newline
21773 \begin_inset Newline newline
21777 \begin_inset Newline newline
21781 \begin_inset Newline newline
21787 \begin_layout Standard
21788 This layout works fine.
21789 The only real inconvenience is that you have to type ctrl-return instead
21794 \begin_layout Plain Layout
21795 It is in my list of
21796 \begin_inset Quotes eld
21800 \begin_inset Quotes erd
21811 \begin_layout Standard
21812 As a special note, you can also use the
21813 \begin_inset Quotes eld
21817 \begin_inset Quotes erd
21820 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21824 \begin_layout LyX-Code
21826 \begin_inset Newline newline
21829 def some_function(args):
21830 \begin_inset Newline newline
21833 "This is the doc string for this function."
21834 \begin_inset Newline newline
21837 print "My args: ", args
21840 \begin_layout LyX-Code
21841 @ %def some_function
21844 \begin_layout Standard
21845 For an example of this usage and the resulting cross-reference output, look
21846 at the Literate python program in
21848 LIBDIR/examples/listerrors.lyx
21850 which should make this all clear.
21853 \begin_layout Paragraph
21854 Generating the documentation
21857 \begin_layout Standard
21858 At this point you already have a new document file with a proper document
21859 class, and with some code and text on it.
21860 How do I print it? The answer is simple, you select
21862 View\SpecialChar \menuseparator
21866 Just like you would do for a plain document.
21867 No special procedure is required.
21870 \begin_layout Standard
21871 To help orientate you, I will now explain what happens inside LyX:
21874 \begin_layout Enumerate
21877 Update\SpecialChar \menuseparator
21880 menu option is chosen, a LaTeX file is generated.
21885 \begin_layout Standard
21886 If the document is of any literate class the generated file will be named
21887 with an extension name defined by the
21888 \begin_inset Quotes eld
21892 \begin_inset Quotes erd
21895 format (defined in the Preferences panel), otherwise the file will have
21904 \begin_layout Enumerate
21905 Note that the only difference so far is in the name of the file, no special
21906 processing is required by LyX.
21907 Given that you formatted the code using the Scrap layout that, by itself,
21908 takes care of the business.
21911 \begin_layout Enumerate
21912 If the document is of any literate class LyX will then use the internal
21913 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21917 \begin_layout Plain Layout
21918 The converters are defined in the
21920 Tools\SpecialChar \menuseparator
21924 \begin_inset Quotes eld
21928 \begin_inset Quotes erd
21940 manual for general information about converters.
21945 to generate the LaTeX file.
21949 \begin_layout Standard
21950 Otherwise it will just skip this step.
21954 \begin_layout Enumerate
21955 Finally, LaTeX is invoked and the regular post processing continues as in
21959 \begin_layout Standard
21960 Independence from a particular
21961 \begin_inset Quotes eld
21965 \begin_inset Quotes erd
21968 is easily achieved by changing the commands that are run by the various
21972 \begin_layout Paragraph
21973 Generating the code
21976 \begin_layout Standard
21977 When the build menu option is chosen or the corresponding button in the
21978 toolbar is pressed, a LaTeX file is generated just like step 1 above.
21979 Next, LyX invokes the
21984 This converter needs to be defined by the user and is not installed by
21985 default, though the Program format is.
21986 This converter (like any other converter) will have two parts:
21989 \begin_layout Enumerate
21990 The converter program itself.
21991 This program performs the conversion from the one format to the other (in
21992 this case, from the Noweb format to the Program pseudo-format).
21995 \begin_layout Enumerate
21996 The error log parser.
21997 This is a program whose sole purpose is to rewrite error messages in a
21998 format that LyX understands.
21999 This makes it possible for LyX to place error boxes in the right places
22000 in the file buffer.
22003 \begin_layout Standard
22004 The first part, the
22005 \begin_inset Quotes eld
22009 \begin_inset Quotes erd
22012 setting, should be set to
22013 \begin_inset Quotes eld
22021 \begin_inset Quotes erd
22025 This basically means that LyX will call
22026 \begin_inset Quotes eld
22030 \begin_inset Quotes erd
22033 (a program or script) with the name of the Noweb file (normally a file
22034 in the LyX temp directory).
22038 \begin_layout Standard
22039 This is an implementation of
22040 \begin_inset Quotes eld
22044 \begin_inset Quotes erd
22047 that you can place in a directory on your path:
22050 \begin_layout LyX-Code
22054 \begin_layout LyX-Code
22058 \begin_layout LyX-Code
22059 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
22062 \begin_layout Standard
22063 The next part of the converter setting is the
22064 \begin_inset Quotes eld
22068 \begin_inset Quotes erd
22071 which is to be set to
22072 \begin_inset Quotes eld
22077 parselog=listerrors
22080 \begin_inset Quotes erd
22084 This will run any errors that are generated by the
22085 \begin_inset Quotes eld
22089 \begin_inset Quotes erd
22092 process through the
22093 \begin_inset Quotes eld
22097 \begin_inset Quotes erd
22103 \begin_layout Standard
22104 The converter code looks in
22112 then on the path for the
22113 \begin_inset Quotes eld
22117 \begin_inset Quotes erd
22123 \begin_layout Standard
22124 The build will normally take place in LyX's temporary directory, so the
22125 files produced by the conversion will be in that directory.
22126 LyX will copy out what it regards as the `main' file, but the
22130 conversion may produce several files, and so most of these would then be
22131 deleted when LyX was closed.
22132 The present solution is to use a `copier',
22136 \begin_layout Plain Layout
22145 manual for information on these.
22154 script in its default mode, so that the entire contents of the temporary
22155 directory is copied.
22156 More will get copied than is needed, to be sure, but nothing will be lost.
22157 If, however, you know what extensions the generated files will have, this
22158 can be improved by using the
22167 This option takes a comma-separated list of extensions to copy.
22168 So, for example, if the conversion will generate only files with the extensions
22177 , then the correct definition would be:
22180 \begin_layout LyX-Code
22181 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
22184 \begin_layout Standard
22185 The result will be that only files with these two extensions will be copied
22189 \begin_layout Paragraph
22190 Build instructions in the document
22193 \begin_layout Standard
22194 The last piece of the integration between LyX and noweb is the
22195 \begin_inset Quotes eld
22199 \begin_inset Quotes erd
22203 Generally, the instructions for building your program should be embedded
22204 in a scrap of its own.
22206 \begin_inset Quotes eld
22210 \begin_inset Quotes erd
22213 above uses the notangle command to look for this scrap (called
22214 \begin_inset Quotes eld
22218 \begin_inset Quotes erd
22221 ) and runs its contents through
22222 \begin_inset Quotes eld
22226 \begin_inset Quotes erd
22232 \begin_layout Standard
22233 Typically, such a scrap would look something like this:
22236 \begin_layout LyX-Code
22238 \begin_inset Newline newline
22242 \begin_inset Newline newline
22246 \begin_inset Newline newline
22249 if [ -z "${NOWEB_SOURCE}" ]
22250 \begin_inset Newline newline
22254 \begin_inset Newline newline
22257 NOWEB_SOURCE=myfile.nw
22258 \begin_inset Newline newline
22262 \begin_inset Newline newline
22266 code to extract files ...]
22267 \begin_inset Newline newline
22271 code to compile files ...]
22272 \begin_inset Newline newline
22278 \begin_layout Standard
22281 LIBDIR/examples/listerrors.lyx
22285 LIBDIR/examples/Literate.lyx
22287 which implement two versions of the
22288 \begin_inset Quotes eld
22292 \begin_inset Quotes erd
22295 program for some illustrations of how all of these pieces go together or
22298 LIBDIR/examples/noweb2lyx.lyx.
22301 Interestingly, these three files show off the language-indepence of the
22302 LyX literate programming support since they are written in Python, C and
22306 \begin_layout Subsubsection
22310 \begin_layout Standard
22311 All the Literate Programming support is configured by the
22313 Tools\SpecialChar \menuseparator
22317 \begin_inset Quotes eld
22321 \begin_inset Quotes erd
22325 The important parts are:
22328 \begin_layout Description
22330 \begin_inset space ~
22334 \begin_inset Quotes eld
22338 \begin_inset Quotes erd
22342 \begin_inset space ~
22345 format Set up via the Formats tab, this is where the Noweb-specific pieces
22355 , the file extension is set to
22360 This tells LyX to create a file with a
22364 extension in the first step of the conversion process.
22367 \begin_layout Description
22369 \begin_inset space ~
22377 \begin_inset space ~
22380 format This is an empty format whose sole purpose is to be the endpoint
22381 of a conversion (which then allows us to set up a converter for it).
22384 \begin_layout Description
22393 This converter performs the
22394 \begin_inset Quotes eld
22398 \begin_inset Quotes erd
22401 of the literate document.
22402 For Noweb, it is set to
22403 \begin_inset Quotes eld
22408 noweave -delay -index $$i > $$o
22411 \begin_inset Quotes erd
22417 \begin_layout Description
22427 \begin_inset Quotes eld
22431 \begin_inset Quotes erd
22435 As stated above, the Converter is set to
22436 \begin_inset Quotes eld
22444 \begin_inset Quotes erd
22447 , with Flags set to
22448 \begin_inset Quotes eld
22453 originaldir,parselog=listerrors
22456 \begin_inset Quotes erd
22462 \begin_layout Subsubsection
22466 \begin_layout Standard
22467 There is also a new function implemented in the LyX server, the
22468 \begin_inset Quotes eld
22471 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22475 \begin_layout Standard
22476 When debugging code with ddd/gdb, it is possible to invoke a text editor
22477 at the current execution position with a single key stroke.
22478 The default ddd configuration for that is shift-ctrl-V.
22479 It happens that you can define the editor command line invocation in ddd
22482 Edit\SpecialChar \menuseparator
22483 Preferences\SpecialChar \menuseparator
22486 dialog and changing the "Edit Sources" entry.
22489 \begin_layout Standard
22490 I take advantage of the new created LyX server function and this ddd feature,
22492 \begin_inset Quotes eld
22496 \begin_inset Quotes erd
22502 \begin_layout LyX-Code
22503 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22506 \begin_layout Standard
22507 With this, whenever you are using ddd and find a point in the program that
22508 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22509 ddd you forward this information to LyX through the LyX server and then
22510 the LyX window will show the same file with the cursor at the same position
22511 ddd was pointing to.
22512 No more guessing or long scrolling to locate a point in the program back
22516 \begin_layout Standard
22517 Note however that you must enable the LyX server to get this feature working
22518 (it is disabled by default).
22519 You can enable it in
22531 ) by entering in the
22536 \begin_inset Quotes eld
22541 /home/<your-home-directory>/.lyx/lyxpipe
22544 \begin_inset Quotes erd
22550 \begin_layout Standard
22551 Read the LyX server documentation in the
22553 Customization Manual
22555 for further information.
22558 \begin_layout Subsubsection
22562 \begin_layout Standard
22563 There are six new buttons that can be added to your LyX toolbar.
22564 Five of these buttons are short cuts to layout styles:
22585 The last one is a short cut to the
22586 \begin_inset Quotes eld
22590 \begin_inset Quotes erd
22597 \begin_layout Standard
22598 LyX has a range of buttons that are available for tool bar customization.
22599 In my toolbar I like to combine the six short cuts above with two more:
22604 \SpecialChar \menuseparator
22609 \SpecialChar \menuseparator
22616 View\SpecialChar \menuseparator
22620 Here is how it looks like:
22623 \begin_layout LyX-Code
22627 \begin_layout LyX-Code
22631 \begin_layout LyX-Code
22632 Icon "layout Standard"
22635 \begin_layout LyX-Code
22636 Icon "layout Section"
22639 \begin_layout LyX-Code
22640 Icon "layout LaTeX"
22643 \begin_layout LyX-Code
22644 Icon "layout LyX-Code"
22647 \begin_layout LyX-Code
22648 Icon "layout Scrap"
22651 \begin_layout LyX-Code
22655 \begin_layout LyX-Code
22659 \begin_layout LyX-Code
22660 Icon "buffer-typeset"
22663 \begin_layout LyX-Code
22664 Icon "build-program"
22667 \begin_layout LyX-Code
22671 \begin_layout LyX-Code
22675 \begin_layout LyX-Code
22679 \begin_layout LyX-Code
22683 \begin_layout LyX-Code
22687 \begin_layout Subsubsection
22688 Colors customization
22691 \begin_layout Standard
22692 There are a number of colors in LyX that can be customized in
22697 One of the things that bothers people is the LaTeX font color.
22698 The default color is red, since the scraps uses LaTeX font, and there is
22699 a lot of scraps in literate documents, you may get tired of seeing everything
22701 You can change it by going to the tabs
22710 \begin_layout Standard
22711 The next thing is the visible presence of the newline character in the screen.
22712 You can choose the color of this particular character and make it blend
22714 I recommend you choosing a color that is close to the background but not
22715 equal, that way you still can see it is there, but it is not bothering
22720 \begin_layout Chapter
22721 Secrets of the LaTeX Masters
22722 \begin_inset CommandInset label
22731 \begin_layout Standard
22732 Though LyX is a powerful tool, it cannot hope to support everything that
22733 can be done with pure TeX/LaTeX.
22734 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22735 as long as you are not afraid to use that
22736 \begin_inset Quotes eld
22740 \begin_inset Quotes erd
22743 button on the toolbar or add things to the LaTeX preamble.
22744 This section lists some tips, tricks, and otherwise cool ideas to give
22745 your document that extra little flair.
22748 Do try this at home
22750 , just start with something a little smaller and less important than your
22754 \begin_layout Standard
22755 Most ideas in this section require less common files in your LaTeX installation.
22756 If you have a system like TeXLive, most will already be available.
22757 A few, however, will need to be downloaded from one of the CTAN archives.
22758 Often, there are several ways to do something, or several LaTeX style files
22759 which do the same thing.
22760 We do not endorse one choice over another, we simply claim that we have
22761 done a particular task with a particular file.
22762 Put on your wizard hat, keep an eye out for dragons, and let us begin.
22765 \begin_layout Section
22769 \begin_layout Standard
22772 Lars Gullik Bjønnes
22775 \begin_layout Subsection
22779 \begin_layout Standard
22780 The aim for this chapter
22784 \begin_layout Plain Layout
22785 Editor's note: Lars' original chapter was a masterful description of how
22791 However, it was too long to flow smoothly in this document.
22792 I have therefore chosen to excerpt the most important sections here (sorry,
22793 Lars); you can read the original chapter (and more of the story!) in the
22796 examples/multicol.lyx
22804 is to show how the LaTeX package
22808 can be used in a LyX document.
22809 As LyX doesn't support the
22813 package natively yet, we have to use some small hacks.
22814 By reading this section it should be obvious how to do this.
22817 \begin_layout Subsection
22821 \begin_layout Standard
22826 package allows switching between one and multicolumn format on the same
22828 Footnotes are handled correctly (for the most part), but will be placed
22829 at the bottom of the page and not under each column.
22830 LaTeX's float mechanism, however, is partly disabled in the current implementat
22832 At the moment only page-wide floats can be used within the scope of the
22836 \begin_layout Subsection
22840 \begin_layout Subsubsection
22844 \begin_layout Standard
22845 If you want to have two columns in your text, you have use LaTeX mode to
22850 begin{multicols}{2}
22852 at the point where you want the two column layout to start, and then
22858 where you want it to end.
22862 \begin_layout Standard
22866 \begin_layout Plain Layout
22870 begin{multicols}{2}
22878 \begin_layout Standard
22883 The Adventure of the Empty House
22886 \begin_inset Newline newline
22891 Sir Arthur Conan Doyle
22894 \begin_layout Standard
22897 It was in the spring of the year 1894 that all London was interested, and
22898 the fashionable world dismayed, by the murder of the Honourable Ronald
22899 Adair under most unusual and inexplicable circumstances.
22900 The public has already learned those particulars of the crime which came
22901 out in the police investigation, but a good deal was suppressed upon that
22902 occasion, since the case for the prosecution was so overwhelmingly strong
22903 that it was not necessary to bring forward all the facts.
22904 Only now, at the end of nearly ten years, am I allowed to supply those
22905 missing links which make up the whole of that remarkable chain.
22906 The crime was of interest in itself, but that interest was as nothing to
22907 me compared to the inconceivable sequel, which afforded me the greatest
22908 shock and surprise of any event in my adventurous life.
22909 Even now, after this long interval, I find myself thrilling as I think
22910 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22911 ty which utterly submerged my mind.
22912 Let me say to that public, which has shown some interest in those glimpses
22913 which I have occasionally given them of the thoughts and actions of a very
22914 remarkable man, that they are not to blame me if I have not shared my knowledge
22915 with them, for I should have considered it my first duty to do so, had
22916 I not been barred by a positive prohibition from his own lips, which was
22917 only withdrawn upon the third of last month.
22920 \begin_layout Standard
22924 \begin_layout Plain Layout
22936 \begin_layout Subsubsection
22940 \begin_layout Standard
22941 The same pattern is used when you want more than two columns:
22944 \begin_layout Standard
22948 \begin_layout Plain Layout
22952 begin{multicols}{3}
22960 \begin_layout Standard
22963 It can be imagined that my close intimacy with Sherlock Holmes had interested
22964 me deeply in crime, and that after his disappearance I never failed to
22965 read with care the various problems which came before the public.
22966 And I even attempted, more than once, for my own private satisfaction,
22967 to employ his methods in their solution, though with indifferent success.
22968 There was none, however, which appealed to me like this tragedy of Ronald
22970 As I read the evidence at the inquest, which led up to a verdict of willful
22971 murder against some person or persons unknown, I realized more clearly
22972 than I had ever done the loss which the community had sustained by the
22973 death of Sherlock Holmes.
22974 There were points about this strange business which would, I was sure,
22975 have specially appealed to him, and the efforts of the police would have
22976 been supplemented, or more probably anticipated, by the trained observation
22977 and the alert mind of the first criminal agent in Europe.
22978 All day, as I drove upon my round, I turned over the case in my mind and
22979 found no explanation which appeared to me to be adequate.
22980 At the risk of telling a twice-told tale, I will recapitulate the facts
22981 as they were known to the public at the conclusion of the inquest.
22984 \begin_layout Standard
22988 \begin_layout Plain Layout
23000 \begin_layout Standard
23001 You can have more than 3 columns if you want to, but that might not be very
23002 pleasant for the eye.
23005 \begin_layout Subsubsection
23006 Columns inside columns
23009 \begin_layout Standard
23010 You can even have columns inside columns:
23013 \begin_layout Standard
23017 \begin_layout Plain Layout
23021 begin{multicols}{2}
23029 \begin_layout Standard
23032 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
23033 at that time governor of one of the Australian colonies.
23034 Adair's mother had returned from Australia to undergo the operation for
23035 cataract, and she, her son Ronald, and her daughter Hilda were living together
23039 \begin_layout Standard
23043 \begin_layout Plain Layout
23047 begin{multicols}{2}
23055 \begin_layout Standard
23058 The youth moved in the best society–had, so far as was known, no enemies
23059 and no particular vices.
23060 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
23061 had been broken off by mutual consent some months before, and there was
23062 no sign that it had left any very profound feeling behind it.
23063 For the rest {sic} the man's life moved in a narrow and conventional circle,
23064 for his habits were quiet and his nature unemotional.
23065 Yet it was upon this easy-going young aristocrat that death came, in most
23066 strange and unexpected form, between the hours of ten and eleven-twenty
23067 on the night of March 30, 1894.
23070 \begin_layout Standard
23074 \begin_layout Plain Layout
23086 \begin_layout Standard
23089 Ronald Adair was fond of cards–playing continually, but never for such stakes
23091 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
23092 It was shown that, after dinner on the day of his death, he had played
23093 a rubber of whist at the latter club.
23094 He had also played there in the afternoon.
23099 The evidence of those who had played with him– Mr.
23100 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
23101 and that there was a fairly equal fall of the cards.
23102 Adair might have lost five pounds, but not more.
23103 His fortune was a considerable one, and such a loss could not in any way
23105 He had played nearly every day at one club or other, but he was a cautious
23106 player, and usually rose a winner.
23107 It came out in evidence that, in partnership with Colonel Moran, he had
23108 actually won as much as four hundred and twenty pounds in a sitting, some
23109 weeks before, from Godfrey Milner and Lord Balmoral.
23110 So much for his recent history as it came out at the inquest.
23113 \begin_layout Standard
23117 \begin_layout Plain Layout
23129 \begin_layout Standard
23130 Please do read the file
23132 examples/multicol.lyx
23134 for more advanced examples including column and header spacing, vertical
23135 separator lines, and more.
23138 \begin_layout Section
23143 Paragraph Environment
23144 \begin_inset Argument
23147 \begin_layout Plain Layout
23148 Numbering in Enumerate
23156 \begin_layout Standard
23162 \begin_layout Standard
23163 \begin_inset VSpace bigskip
23169 \begin_layout Standard
23171 The default numbering for the
23175 paragraph environment begins with Arabic numbers and ends with uppercase
23177 Suppose, however, you wanted a different type of numbering scheme.
23178 Here's a quickie example of how to change the numbering scheme:
23181 \begin_layout LyX-Code
23191 \begin_layout LyX-Code
23201 \begin_layout LyX-Code
23211 \begin_layout LyX-Code
23221 \begin_layout Standard
23222 \SpecialChar \ldots{}
23223 which changes the numbering scheme to uppercase Roman numerals, uppercase
23224 letters, Arabic numbers, and lowercase letter.
23227 \begin_layout Standard
23228 Additionally, the previous example also adds a little bit extra to the numbering
23230 For example, the first level label actually looks like:
23231 \begin_inset Quotes eld
23235 \begin_inset Quotes erd
23239 For ease of reading, we'll describe what the numbering schemes look like
23240 using a notation something like this: <
23241 \begin_inset Quotes eld
23245 \begin_inset Quotes erd
23249 \begin_inset space ~
23253 \begin_inset Quotes erd
23257 \begin_inset Quotes erd
23261 \begin_inset space ~
23265 \begin_inset Quotes erd
23269 \begin_inset Quotes erd
23273 \begin_inset space ~
23277 \begin_inset Quotes eld
23281 \begin_inset Quotes erd
23288 \begin_layout Standard
23289 As you can see in the example, there is a label command for each nesting
23296 \SpecialChar \ldots{}
23303 , as well as a counter,
23307 \SpecialChar \ldots{}
23313 There are also five
23314 \begin_inset Quotes eld
23318 \begin_inset Quotes erd
23351 , each of which take one counter as an argument.
23352 You can add characters before or after these, but there's no need to add
23356 \begin_layout Standard
23357 You can get really fancy with these.
23361 \begin_layout LyX-Code
23375 \begin_layout LyX-Code
23387 \begin_layout LyX-Code
23397 \begin_layout LyX-Code
23407 \begin_layout Standard
23408 produces the somewhat out of hand numbering scheme: <
23409 \begin_inset Quotes eld
23413 \begin_inset Quotes erd
23417 \begin_inset space ~
23421 \begin_inset Quotes erd
23425 \begin_inset Quotes erd
23429 \begin_inset space ~
23433 \begin_inset Quotes erd
23437 \begin_inset Quotes erd
23441 \begin_inset space ~
23445 \begin_inset Quotes eld
23449 \begin_inset Quotes erd
23456 \begin_layout Section
23460 \begin_layout Standard
23466 \begin_layout Standard
23467 \begin_inset VSpace bigskip
23473 \begin_layout Standard
23478 \begin_layout Plain Layout
23484 tmpfont}{cmr17 scaled 2500}{
23496 \begin_layout Standard
23501 \begin_layout Plain Layout
23512 hose of you who like the style of old books probably also like
23513 \begin_inset Quotes eld
23517 \begin_inset Quotes erd
23520 —those large capital letters which begin each new chapter or section.
23521 Implementing them with plain LyX/LaTeX is straightforward (assuming you
23522 know some plain TeX!) but does require a lot of work and many iterations,
23523 as you can see by all the ugly TeX-mode stuff at the beginning of this
23527 \begin_layout Standard
23531 \begin_layout Plain Layout
23537 bigdrop{-1em}{3}{ptmri}{T}+
23542 here is a much easier way of doing this, of course.
23551 ) package from CTAN allows a simple way to add such letters to your documents.
23552 Since this package is not a standard part of TeXLive, I can't demonstrate
23553 it within this document, but if you copy this paragraph to a new document,
23555 \begin_inset Quotes eld
23565 \begin_inset Quotes erd
23568 and the pluses from the TeX code at the beginning of the paragraph, and
23573 usepackage{dropcaps}
23575 to your LaTeX preamble, you will get a nice Times Roman Italic
23576 \begin_inset Quotes eld
23580 \begin_inset Quotes erd
23583 , whose height is three lines of text and which protrudes 1 em into the
23585 (Make certain you have copied
23586 \begin_inset Quotes eld
23594 \begin_inset Quotes erd
23597 into a directory where TeX can see it.) The first argument is the amount
23598 of indentation; in this case the negative sign moves it into the margin.
23599 The second argument is the height of the letter in number of lines of text.
23600 The third argument is the font name: virtually anything which has a tfm
23601 file should work (wade through the
23603 .../texmf/fonts/tfm
23605 directory for possibilities).
23606 My personal favorite is
23607 \begin_inset Quotes eld
23615 \begin_inset Quotes erd
23618 , a fancy German font specifically designed for dropped capitals.
23619 The fourth argument is the letter (or letters) to be dropped.
23624 package also offers the
23630 command, as well as a slightly simplified
23639 \begin_layout Section
23640 Non-standard Paragraph Shapes
23643 \begin_layout Standard
23649 \begin_layout Standard
23650 \begin_inset VSpace bigskip
23656 \begin_layout Standard
23660 \begin_layout Plain Layout
23672 \begin_layout Standard
23676 \begin_layout Plain Layout
23685 \begin_layout Plain Layout
23699 \begin_layout Standard
23704 \begin_layout Plain Layout
23715 \begin_layout Plain Layout
23724 \begin_layout Plain Layout
23733 \begin_layout Plain Layout
23742 \begin_layout Plain Layout
23751 \begin_layout Plain Layout
23760 \begin_layout Plain Layout
23769 \begin_layout Plain Layout
23778 \begin_layout Plain Layout
23787 \begin_layout Plain Layout
23796 \begin_layout Plain Layout
23805 \begin_layout Plain Layout
23814 \begin_layout Plain Layout
23823 \begin_layout Plain Layout
23832 \begin_layout Plain Layout
23841 \begin_layout Plain Layout
23850 \begin_layout Plain Layout
23859 \begin_layout Plain Layout
23868 \begin_layout Plain Layout
23877 \begin_layout Plain Layout
23883 There are times when the tyranny of rectangular paragraphs must be overthrown.
23884 In such situations, a call to the delightful plain TeX command
23891 As you can see, completely arbitrary shapes can be laid out with a suitable
23892 set of linelength definitions.
23893 While this parshape may look a bit silly and useless, one could conceive
23894 of situations such as finely tuned dropped capitals, word wrapping around
23895 non-rectangular graphics, etc.
23896 which will benefit from such handcrafting.
23899 \begin_layout Standard
23900 \begin_inset VSpace bigskip
23906 \begin_layout Standard
23911 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23918 is the number of lines of text which define the paragraph.
23919 If there turn out to be fewer lines, the shape is truncated; if there are
23920 more, the excess lines have the same dimensions as the last line of the
23930 entries specify the indentation of the line from the left margin, and the
23931 length of the line as measured from that point.
23932 The shape applies only to the current paragraph; everything is reset to
23933 normal for the next paragraph.
23936 \begin_layout Standard
23940 \begin_layout Plain Layout
23952 \begin_layout Section
23956 \begin_layout Standard
23957 As you can see, the examples in this section range from the useful to the
23959 While I don't expect that anyone will ever need the paragraph shape demonstrate
23960 d in the last section, the important point is that you can do almost anything
23961 you want in LyX if you are willing to figure out how to do it in TeX and
23963 TeX is a fantastically powerful typesetting system and all that power is
23964 available to you since LyX uses it as its backend.