1 #LyX 2.0.0svn 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}}
75 \font_typewriter default
76 \font_default_family default
84 \default_output_format default
86 \bibtex_command default
87 \index_command default
91 \pdf_title "LyX's Additional Features manual"
92 \pdf_author "LyX Team"
93 \pdf_subject "LyX's additional features documentation"
94 \pdf_keywords "LyX, Documentation, Additional"
96 \pdf_bookmarksnumbered true
97 \pdf_bookmarksopen false
98 \pdf_bookmarksopenlevel 1
103 \pdf_pdfusetitle false
104 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false, pdfpagelabels"
114 \paperorientation portrait
123 \paragraph_separation indent
124 \paragraph_indentation default
125 \quotes_language english
128 \paperpagestyle headings
129 \tracking_changes true
130 \output_changes false
135 \author 3 "Stephan Witt"
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
3107 Fancy Headers and Footers
3110 \begin_layout Standard
3111 The default page layout is rather plain; for an
3112 \begin_inset Flex Code
3115 \begin_layout Plain Layout
3121 document class, all you get is a centered page number at the bottom of
3123 This document uses KOMA-script's book class, so it appears to be a bit
3125 But to really put on a show, you need to set the document page style to
3127 \begin_inset Quotes eld
3131 \begin_inset Quotes erd
3134 , as mentioned in the
3139 This section describes the LaTeX code you need to insert in your LaTeX
3140 preamble in order to get the desired effects.
3143 \begin_layout Standard
3144 For more information on fancy headers, see the
3145 \begin_inset Flex Code
3148 \begin_layout Plain Layout
3154 package documentation.
3156 \begin_inset Flex URL
3159 \begin_layout Plain Layout
3161 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3169 \begin_layout Standard
3170 The page header is divided into three fields, not surprisingly labeled
3171 \begin_inset Quotes eld
3175 \begin_inset Quotes erd
3179 \begin_inset Quotes eld
3183 \begin_inset Quotes erd
3187 \begin_inset Quotes eld
3191 \begin_inset Quotes erd
3195 The footer is also divided into these three fields.
3196 The LaTeX commands to set these fields in the simplest manner are
3197 \begin_inset Flex Code
3200 \begin_layout Plain Layout
3209 \begin_inset Flex Code
3212 \begin_layout Plain Layout
3221 \begin_inset Flex Code
3224 \begin_layout Plain Layout
3233 \begin_inset Flex Code
3236 \begin_layout Plain Layout
3245 Suppose you wish to put your name in the upper left hand corner of each
3247 Simply insert the following command in the preamble:
3250 \begin_layout Standard
3259 \begin_layout Standard
3260 You will now see your name in the upper left.
3261 If a field has a default entry that you would like to get rid of (often
3262 the page number appears in the central footer, simply include a command
3263 with a blank argument, e.
3264 \begin_inset space \thinspace{}
3270 \begin_layout Standard
3278 \begin_layout Standard
3279 Let's get really fancy: lets put the section number with the word
3280 \begin_inset Quotes eld
3284 \begin_inset Quotes erd
3288 \begin_inset space \thinspace{}
3292 \begin_inset space \space{}
3295 Section 3) in the upper left, the page number (e.
3296 \begin_inset space \thinspace{}
3300 \begin_inset space \space{}
3303 Page 4) in the upper right, your name in the lower left, and the date in
3305 The following commands should now appear in the preamble:
3308 \begin_layout Standard
3318 \begin_layout Standard
3326 \begin_layout Standard
3336 \begin_layout Standard
3345 \begin_layout Standard
3353 \begin_layout Standard
3363 \begin_layout Standard
3365 \begin_inset Flex Code
3368 \begin_layout Plain Layout
3377 \begin_inset Flex Code
3380 \begin_layout Plain Layout
3388 access LaTeX's section and page counters, and so print out the current
3389 section and page numbers.
3391 \begin_inset Flex Code
3394 \begin_layout Plain Layout
3402 simply prints out today's date.
3405 \begin_layout Standard
3406 The thicknesses of the horizontal rules drawn beneath the header and above
3407 the footer can also be modified.
3408 If you don't want one of the rules, set its thickness to 0.
3409 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3415 \begin_inset Flex Code
3418 \begin_layout Plain Layout
3423 headrulewidth}{0.4pt}
3429 \begin_inset Flex Code
3432 \begin_layout Plain Layout
3437 footrulewidth}{0.4pt}
3442 to set the thicknesses.
3445 \begin_layout Standard
3446 You can switch the header/footer settings on and off for individual pages
3448 \begin_inset Flex Code
3451 \begin_layout Plain Layout
3454 thispagestyle{empty}
3460 \begin_inset Flex Code
3463 \begin_layout Plain Layout
3466 thispagestyle{plain}
3472 \begin_inset Flex Code
3475 \begin_layout Plain Layout
3478 thispagestyle{fancy}
3484 Simply insert them in the text on the page you want changed and mark them
3486 In fact, title pages are marked as plain by default, while following pages
3487 are marked fancy when using the global fancy setting.
3490 \begin_layout Standard
3491 As a final example, it is possible to include an image in the header or
3493 Suppose you want to put a company logo in the upper lefthand corner.
3494 You might try something like
3497 \begin_layout Standard
3506 includegraphics{logo.eps}}}
3509 \begin_layout Standard
3511 (you may need to preface this with
3512 \begin_inset Flex Code
3515 \begin_layout Plain Layout
3519 usepackage{graphics}
3524 if you don't include graphics elsewhere in your document).
3527 \begin_layout Section
3528 Itemize Bullet Selection
3529 \begin_inset CommandInset label
3538 \begin_layout Standard
3544 \begin_layout Subsection
3548 \begin_layout Standard
3549 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3550 Using this dialog you can easily specify what bullet shape to use at each
3551 level of an itemized list.
3552 These settings are document-wide so you won't be able to specify different
3553 sets of bullets for different paragraphs.
3557 \begin_layout Plain Layout
3558 Well, actually you can but you'll have to do it by hand.
3566 \begin_layout Subsection
3570 \begin_layout Standard
3571 Open the dialog by selecting the
3572 \begin_inset Flex MenuItem
3575 \begin_layout Plain Layout
3576 Document\SpecialChar \menuseparator
3582 menu item and then select the
3583 \begin_inset Flex MenuItem
3586 \begin_layout Plain Layout
3595 \begin_layout Standard
3596 The dialog provides you with a table of bullet shapes.
3597 A column of buttons on the left of the table provides access to the six
3598 different panels of bullet shapes.
3599 The row of buttons across the top is used to select which bullet depth
3601 A text entry under the table shows the currently selected bullet shape's
3602 LaTeX equivalent and this can be edited if desired.
3603 If you do modify the text you will also need to specify any needed packages
3604 in the LaTeX preamble.
3607 \begin_layout Standard
3608 The six panels are divided up by the packages they require.
3609 The following table shows the mappings from button name to LaTeX packages.
3612 \begin_layout Standard
3614 \begin_inset Tabular
3615 <lyxtabular version="3" rows="7" columns="2">
3616 <features tabularvalignment="middle">
3617 <column alignment="center" valignment="top" width="0pt">
3618 <column alignment="center" valignment="top" width="0pt">
3620 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3623 \begin_layout Plain Layout
3638 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3641 \begin_layout Plain Layout
3658 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3661 \begin_layout Plain Layout
3676 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3679 \begin_layout Plain Layout
3695 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3698 \begin_layout Plain Layout
3713 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3716 \begin_layout Plain Layout
3733 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3736 \begin_layout Plain Layout
3751 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3754 \begin_layout Plain Layout
3771 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3774 \begin_layout Plain Layout
3789 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3792 \begin_layout Plain Layout
3809 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3812 \begin_layout Plain Layout
3827 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3830 \begin_layout Plain Layout
3847 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3850 \begin_layout Plain Layout
3865 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3868 \begin_layout Plain Layout
3891 \begin_layout Standard
3892 LyX doesn't stop you using bullets from packages you don't have.
3893 If you get errors from LaTeX when you try to view or print the file, then
3894 it is likely you are missing a package.
3898 \begin_layout Plain Layout
3899 LyX doesn't restrict your use since you may be editing locally and exporting
3908 \begin_layout Subsection
3912 \begin_layout Standard
3913 Select which bullet depth you want to change then select the bullet shape
3915 Any changes will not be visible in LyX, but are visible when viewing the
3919 \begin_layout Standard
3920 You can reset a bullet shape to the default simply by clicking your right
3921 mouse button on the appropriate bullet depth button.
3925 \begin_layout Plain Layout
3930 want to have multiple sets of paragraphs with different sets of bullets
3931 in each, then you're going to have to get your hands dirty with TeX code.
3932 The bullet selection dialog can help though because it provides you with
3933 the LaTeX code for a wide range of bullet shapes.
3934 To make your own custom paragraphs you have the following options:
3937 \begin_layout Plain Layout
3941 \begin_layout Plain Layout
3957 \begin_layout Plain Layout
3961 \begin_layout Plain Layout
3983 \begin_layout Itemize
3984 Use the LaTeX command
3985 \begin_inset Flex Code
3988 \begin_layout Plain Layout
3996 to specify a new bullet shape for a given depth.
3997 You'll also need to save the current bullet shape so you can restore it
3999 In this itemized list the following LaTeX code was used to change the bullet
4000 used for the first depth.
4004 \begin_layout LyX-Code
4014 \begin_layout LyX-Code
4031 \begin_layout Itemize
4032 Note that the itemize depth is specified in Roman numerals as part of the
4042 \begin_layout Itemize
4046 \begin_layout Plain Layout
4059 Specify each individual entry by starting each item with the bullet shape
4060 enclosed in square brackets and set as
4061 \begin_inset Flex MenuItem
4064 \begin_layout Plain Layout
4071 For example, this item was started with
4072 \begin_inset Flex Code
4075 \begin_layout Plain Layout
4090 \begin_layout Plain Layout
4094 \begin_layout Plain Layout
4110 \begin_layout Plain Layout
4111 You'll also need to revert the labelitem back to its previous setting for
4112 the global bullet shape settings to remain in effect.
4113 The way used here was:
4116 \begin_layout LyX-Code
4131 \begin_layout Chapter
4132 LyX and the World Wide Web
4135 \begin_layout Standard
4136 LyX has long supported the export of documents to various web-friendly formats,
4138 Before verson 2.0, however, HTML export was always accomplished by the use
4139 of external converters.
4143 \begin_layout Plain Layout
4144 For details on the use of external converters with LyX, see the
4148 section of the Customization manual.
4153 These fall into two large groups: there are converters that use LaTeX as
4154 an intermediate format, such as
4155 \begin_inset Flex Code
4158 \begin_layout Plain Layout
4165 \begin_inset Flex Code
4168 \begin_layout Plain Layout
4175 \begin_inset Flex Code
4178 \begin_layout Plain Layout
4184 , relying upon LyX to produce the LaTeX; and there is a converter that works
4185 directly on LyX files,
4186 \begin_inset Flex Code
4189 \begin_layout Plain Layout
4196 All of these have different advantages and disadvantages.
4200 \begin_layout Standard
4201 The LaTeX-based converters have the advantage that, in principle, they know
4202 everything about the exported document that LaTeX does.
4203 Such converters do not care, for example, if a certain block of code was
4204 produced by LyX or was Evil Red Text.
4205 These converters know about
4206 \begin_inset Flex Code
4209 \begin_layout Plain Layout
4215 files, counters, and references, and can often make use of the
4216 \begin_inset Flex Code
4219 \begin_layout Plain Layout
4225 files generated by BibTeX.
4226 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4227 said that only TeX itself understands TeX---and LaTeX-based converters
4228 will often choke on what seem to be quite simple constructs; complex ones
4229 can throw them completely, and as of this writing, for example, the
4233 manual will not export with
4234 \begin_inset Flex Code
4237 \begin_layout Plain Layout
4243 , though the others will.
4244 The other issue concerns how math is handled.
4245 These converters typically convert the formulae into little pictures that
4246 are then linked from the HTML document.
4247 Since these are actually generated by LaTeX, they are accurate.
4248 But they do not scale well, and just getting them to look as if they are
4249 actually meant to be in your document---so that the font sizes seem to
4250 be roughly the same---can be a challenge.
4253 \begin_layout Standard
4255 \begin_inset Flex Code
4258 \begin_layout Plain Layout
4264 solves some of these problems.
4265 In particular, its rendering of math tends to look better than
4266 \begin_inset Flex Code
4269 \begin_layout Plain Layout
4275 's, at least in simpler cases, since it renders math using a combination
4276 of HTML and CSS rather than converting the formulae to images.
4277 But more complex formula tend to be rendered less well than with
4278 \begin_inset Flex Code
4281 \begin_layout Plain Layout
4287 , since there is no reasonable way of scaling parentheses in HTML, for example.
4288 More importantly (as of version 0.39, at least),
4289 \begin_inset Flex Code
4292 \begin_layout Plain Layout
4298 has no support for math macros, for user-defined paragraph or character
4299 styles, or for tables of contents and figures, and its treatment of cross-refer
4301 These limitations make
4302 \begin_inset Flex Code
4305 \begin_layout Plain Layout
4311 unsuitable for many of the documents more advanced LyX users would produce.
4312 In principle, of course, all of these problems could be solved, but the
4313 LyX developers have decided to follow a different path and have made LyX
4314 itself capable of writing XHTML, just as it is capable of writing LaTeX,
4315 DocBook, and plaintext.
4318 \begin_layout Standard
4319 As of this writing, XHTML output remains under development and should probably
4321 \begin_inset Quotes eld
4325 \begin_inset Quotes erd
4332 \begin_layout Plain Layout
4334 \begin_inset Flex Code
4337 \begin_layout Plain Layout
4338 development/HTML.notes
4343 , which can be found in the LyX source tree or
4344 \begin_inset CommandInset href
4346 name "accessed online"
4347 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4351 , usually contains up-to-date information about the state of XHTML output.
4356 Still, the developers have chosen this approach because it has several
4357 potential advantages over the other two.
4360 \begin_layout Standard
4361 These advantages are primarily due to the fact that the XHTML output routines,
4362 since they are part of LyX, know everything LyX knows about the document
4367 \begin_layout Plain Layout
4368 Another advantege is that, since these routines are internal to LyX, they
4369 are immune to changes in LyX's file format, or to changes in the semantics
4375 So they know about the table of contents (as displayed in the outline),
4376 about the counters associated with different paragraph styles, and about
4377 user-defined styles.
4378 The XHTML output routines know what LyX knows about internationalization,
4379 too, so they will output
4380 \begin_inset Quotes eld
4384 \begin_inset Quotes erd
4388 \begin_inset Quotes eld
4396 \begin_inset Quotes erd
4399 , depending upon the language in effect at the time.
4403 \begin_layout Standard
4404 Quite generally, the output routines know everything LyX knows about document
4405 layout, that is, about how the document is to be rendered on screen.
4406 We use this information when we output the document as XHTML.
4411 generates CSS style information corresponding to the layout information
4412 it uses to render the document on screen: if section headings are supposed
4413 to be sans-serif and bold as seen in LyX, then (by default) they will be
4414 sans-serif and bold when viewed in a web browser, too.
4415 And this is true not just for pre-defined styles, like Section, but for
4416 any style, including user-defined styles.
4417 Indeed, the XHTML output routines make no distinction between user-defined
4418 paragraph and character styles and LyX's own pre-defined styles: in each
4419 case, everything LyX knows about the styles is contained in the layout
4421 And much the same is true as regards pre-defined textual insets, such as
4422 footnotes, and various custom insets.
4426 \begin_layout Standard
4427 The result is that XHTML output can be customized and extended in
4431 the same way LaTeX output can be customized and extended: through layout
4433 See chapter five of the
4437 manual for the details.
4440 \begin_layout Standard
4441 The remainder of this chapter contains more detailed information on XHTML
4442 output, its limitations, and ways to work around those limitations.
4445 \begin_layout Section
4446 Math Output in XHTML
4449 \begin_layout Standard
4450 LyX offers four choices for how math is rendered.
4451 These have various advantages and disadvantages:
4454 \begin_layout Itemize
4456 \begin_inset Newline newline
4459 MathML is a dialect of XML designed specifically for mathematics on the
4460 web, and it typically renders very well in browsers that support it.
4461 The disadvantage is that not all browsers support MathML, and support is
4462 not complete even in the Gecko-based browsers, such as Firefox.
4463 \begin_inset Newline newline
4466 If LyX is unable to render a formula as MathML---for example, if the formula
4468 \begin_inset Flex Code
4471 \begin_layout Plain Layout
4478 \change_deleted 1 1289155717
4480 \change_inserted 1 1289155720
4483 ---then it will instead output the formula as an image.
4487 \begin_layout Itemize
4489 \begin_inset Newline newline
4493 \begin_inset Flex Code
4496 \begin_layout Plain Layout
4502 outputs math as HTML, styled by CSS.
4506 \begin_layout Plain Layout
4507 LyX has borrowed some of the CSS for its HTML output from
4508 \begin_inset Flex Code
4511 \begin_layout Plain Layout
4522 For simple formulae, this can work quite well, though with more complicated
4523 formulae it tends to break down.
4524 Still, this method has the advantage that it is very widely supported and
4525 so it may be appropriate for documents that contain only a little, fairly
4527 \begin_inset Newline newline
4530 If Lyx is unable to render a formula as MathML---for example, if the formula
4532 \begin_inset Flex Code
4535 \begin_layout Plain Layout
4542 \change_deleted 1 1289155751
4544 \change_inserted 1 1289155754
4547 ---then it will instead output the formula as an image.
4551 \begin_layout Itemize
4553 \begin_inset Newline newline
4557 \begin_inset Flex Code
4560 \begin_layout Plain Layout
4566 , LyX will output formulae as images, the very same images, in fact, that
4567 are used for instant preview.
4571 \begin_layout Plain Layout
4572 Instant preview does
4576 have to be on for images to be output, however.
4581 The advantage to this method is that the images are simply generated by
4582 LaTeX, so they are very accurate.
4583 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4584 so they do not scale terribly well, and one cannot copy them, etc.
4585 \begin_inset Newline newline
4588 The size of the images can be controlled by setting the
4589 \begin_inset Quotes eld
4593 \begin_inset Quotes erd
4597 \begin_inset Flex MenuItem
4600 \begin_layout Plain Layout
4601 Document\SpecialChar \menuseparator
4602 Settings\SpecialChar \menuseparator
4612 \begin_layout Plain Layout
4613 For those who want to know, this controls the resolution of the image in
4614 dots per inch and is based upon a default of 75 dpi.
4620 \begin_inset Newline newline
4623 If LyX for some reason fails to create an image for a formula (e.g., if a
4624 required LaTeX package is not installed), then it will fall back to outputing
4628 \begin_layout Itemize
4630 \begin_inset Newline newline
4633 Finally, LyX will happily output math as LaTeX.
4634 As well as being the output of last resort, this method can be used with
4636 \begin_inset CommandInset href
4639 target "http://www.math.union.edu/~dpvc/jsMath/"
4643 , which uses JavaScript to render LaTeX embedded in HTML documents.
4644 LyX wraps the LaTeX in either a
4645 \begin_inset Flex Code
4648 \begin_layout Plain Layout
4654 (for inline formulas) or
4655 \begin_inset Flex Code
4658 \begin_layout Plain Layout
4664 (for displayed formulas) with
4665 \begin_inset Flex Code
4668 \begin_layout Plain Layout
4674 , as is required for jsMath.
4677 \begin_layout Standard
4678 One of these output methods must be selected under
4679 \begin_inset Flex MenuItem
4682 \begin_layout Plain Layout
4683 Document\SpecialChar \menuseparator
4684 Settings\SpecialChar \menuseparator
4691 By default, LyX outputs MathML.
4692 This is a document-wide setting, therefore.
4695 \begin_layout Standard
4696 Eventually, LyX will offer the user the option to select an alternate output
4697 method for a particular inset, say, one that isn't being rendered very
4702 \begin_layout Plain Layout
4703 That said, since LyX falls back to images if the inset contains
4704 \change_deleted 1 1289155760
4706 \change_inserted 1 1289155765
4709 , then one can force output as an image by putting some harmless
4710 \change_deleted 1 1289155770
4712 \change_inserted 1 1289155774
4715 into the math, for example:
4716 \begin_inset Formula $a=b\relax$
4727 \begin_layout Section
4728 Bibliography and Citations
4731 \begin_layout Standard
4732 XHTML output fully supports bibliographies and citations.
4736 \begin_layout Standard
4737 Citation labels are generated by the same machinery that generates LyX's
4738 on-screen labels, so the labels will look in the output much as they do
4739 in LyX, though better.
4740 If you are using numerical citations, then LyX will output numerical labels,
4741 such as [1] or [17], rather than simply showing the citation key in square
4742 brackets, as it does on-screen.
4743 If you are using author-year citations, then LyX will add lowercase letters
4744 to the years, just as BibTeX does, if it finds more than one citation for
4745 a given author-year combination.
4746 The labels will be printed with the bibliography entries.
4747 Note that there is, at present, no way to customize the appearance of the
4748 labels, for example, to choose between square brackets and parentheses.
4751 \begin_layout Standard
4752 Bibliography output is handled by the same machinery that handles the presentati
4753 on of reference information in the citation dialog, so you will see in the
4754 XHTML output pretty much what you would see if you were to look at a given
4755 entry in the citation dialog.
4756 The formatting can be customized in your layout file or, preferably, in
4762 manual for the details.
4765 \begin_layout Standard
4766 The main defect at present is that cross-referenced information is printed
4767 with every entry with which it is associated.
4768 So you can see things like this:
4773 \begin_inset Quotes eld
4776 Context and Logical Form
4777 \begin_inset Quotes erd
4782 Language in Context: Selected Essays
4784 (Oxford: Oxford University Press, 2007), pp.
4790 \begin_inset Quotes eld
4793 Semantics in Context
4794 \begin_inset Quotes erd
4799 Language in Context: Selected Essays
4801 (Oxford: Oxford University Press, 2007), pp.
4805 \begin_layout Standard
4806 This should be fixed before long.
4809 \begin_layout Standard
4810 There is no support at present for sectioned bibliographies.
4811 If you have multiple bibliographies, then LyX will print the same bibliography
4815 \begin_layout Section
4819 \begin_layout Standard
4820 LyX will happily export indexes as XHTML, but with certain limitations at
4824 \begin_layout Standard
4825 Index export will be most reliable when you do not attempt to use the fancy
4826 constructs that are described in the section on indexes in the
4834 \begin_layout Plain Layout
4835 The main issue here is that LyX itself does not really handle these.
4836 It just lets you enter what you would have to enter in raw LaTeX.
4841 We'll describe how they are handled using the subsection headings from
4845 \begin_layout Itemize
4846 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4847 these, but the entries must be separated by
4848 \begin_inset Quotes eld
4852 \begin_inset Quotes erd
4855 , that is, there must be spaces around the exclamation point.
4856 This is because it is otherwise too difficult to check for escaped exclamation
4857 points, ones in math, and so forth.
4860 \begin_layout Itemize
4861 Page Ranges: There is no support at all for page ranges, since these make
4862 no sense with XHMTL.
4863 Instead, you will just get two index entries, one at either end.
4866 \begin_layout Itemize
4867 Cross-referencing: There is no support for cross-referencing.
4868 If LyX finds an entry containing the
4869 \begin_inset Quotes eld
4872 |see\SpecialChar \ldots{}
4874 \begin_inset Quotes erd
4877 construct, it is just dropped, and the rest is treated as an ordinary index
4881 \begin_layout Itemize
4882 Index Entry Order: LyX does support attempts to fix the sorting order.
4883 It will take what is before the first `@' it finds and use that for sorting,
4884 taking what follows the first `@' to be the actual entry.
4885 At present, LyX does not check for escaped `@', so do not try to index
4889 \begin_layout Itemize
4890 Index Entry Layout: You can format entries by using the text style dialog,
4891 or by using any other method available within LyX itself.
4892 There is no support for constructs like:
4893 \begin_inset Quotes eld
4897 \begin_inset Quotes erd
4901 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
4902 and everything that follows it.
4905 \begin_layout Itemize
4906 Multiple Indexes: There is no support for multiple indexes.
4907 Rather, all index entries will be printed as one large index.
4908 To avoid our printing several versions of the index, we print only the
4909 main index, so make sure you have one.
4912 \begin_layout Section
4913 Nomenclature and Glossary
4916 \begin_layout Standard
4917 There is at present no support for glossaries.
4920 \begin_layout Chapter
4924 \begin_layout Section
4928 \begin_layout Standard
4929 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4930 and retrieve information about the LyX internal state.
4931 This is only intended for advanced users, but they should find it useful.
4932 It is by writing to the LyX server, for example, that bibliography managers,
4933 such as JabRef, are able to
4934 \begin_inset Quotes eld
4938 \begin_inset Quotes erd
4944 \begin_layout Section
4945 Starting the LyX Server
4948 \begin_layout Standard
4949 The LyX server works through the use of a pair of named pipes.
4950 These are usually located in
4951 \begin_inset Flex Code
4954 \begin_layout Plain Layout
4960 , (except on Windows, where
4964 named pipes are special objects located in
4965 \begin_inset Flex Code
4968 \begin_layout Plain Layout
4980 ) and have the names
4981 \begin_inset Quotes eld
4985 \begin_inset Flex Code
4988 \begin_layout Plain Layout
4995 \begin_inset Quotes erd
4999 \begin_inset Quotes eld
5003 \begin_inset Flex Code
5006 \begin_layout Plain Layout
5013 \begin_inset Quotes erd
5017 External programs write into
5018 \begin_inset Flex Code
5021 \begin_layout Plain Layout
5027 and read back data from
5028 \begin_inset Flex Code
5031 \begin_layout Plain Layout
5038 The stem of the pipe names can be defined in the
5039 \begin_inset Flex MenuItem
5042 \begin_layout Plain Layout
5043 Tools\SpecialChar \menuseparator
5050 \begin_inset Flex Code
5053 \begin_layout Plain Layout
5054 "/home/myhome/lyxpipe"
5060 \begin_inset Flex Code
5063 \begin_layout Plain Layout
5082 configure this manually in order for the server to start.
5085 \begin_layout Standard
5087 \begin_inset Flex Code
5090 \begin_layout Plain Layout
5097 \begin_inset Flex Code
5100 \begin_layout Plain Layout
5106 ' to create the pipes.
5107 If one of the pipes already exists, LyX will assume that another LyX process
5108 is already running and will not start the server.
5109 On POSIX (Unix like) systems, if for some other reason, an unused
5110 \begin_inset Quotes eld
5114 \begin_inset Quotes erd
5117 pipe is left in existence when LyX closes, then LyX will try to delete
5119 If this fails for some reason, you will need to delete the pipes manually
5120 and then restart LyX.
5121 On Windows, pipes are deleted by the OS on program termination or crash,
5123 \begin_inset Quotes eld
5127 \begin_inset Quotes erd
5130 pipes should not be possible.
5133 \begin_layout Standard
5134 To have several LyX processes with servers at the same time, you have to
5135 use different configurations, perhaps by using separate user directories,
5137 \begin_inset Flex Code
5140 \begin_layout Plain Layout
5146 file, for each process.
5149 \begin_layout Standard
5150 If you are developing a client program, you might find it useful to enable
5151 debugging information from the LyX server.
5152 Do this by starting LyX as
5153 \begin_inset Flex Code
5156 \begin_layout Plain Layout
5165 \begin_layout Standard
5166 You can find a complete example client written in C in the source distribution
5168 \begin_inset Flex Code
5171 \begin_layout Plain Layout
5172 development/lyxserver/server_monitor.c
5180 \begin_layout Standard
5181 Another useful tool is command-line based client you will find in
5182 \begin_inset Flex Code
5185 \begin_layout Plain Layout
5186 src/client/lyxclient
5194 \begin_layout Section
5195 Normal communication
5198 \begin_layout Standard
5199 To issue a LyX call, the client writes a line of ASCII text into the input
5201 This line has the following format:
5218 \begin_layout Description
5219 clientname is a name that the client can choose arbitrarily.
5220 Its only use is that LyX will echo it if it sends an answer—so a client
5221 can dispatch results from different requesters.
5224 \begin_layout Description
5225 function is the function you want LyX to perform.
5226 It is the same as the commands you'd use in the minibuffer.
5229 \begin_layout Description
5230 argument is an optional argument which is meaningful only to some functions
5232 \begin_inset Quotes eld
5236 \begin_inset Quotes erd
5239 LFUN will insert the argument as text at the cursor position).
5242 \begin_layout Standard
5243 The answer from LyX will arrive in the output pipe and be of the form
5260 \begin_layout Standard
5269 are just echoed from the command request, while
5273 is more or less useful information filled according to how the command
5274 execution worked out.
5275 Some commands, such as
5276 \begin_inset Quotes eld
5280 \begin_inset Quotes erd
5283 , will return information about the internal state of LyX, while other will
5284 return an empty data-response.
5285 This means that the command execution went fine.
5288 \begin_layout Standard
5289 In case of errors, the response from LyX will have this form
5306 \begin_layout Standard
5311 should contain an explanation of why the command failed.
5314 \begin_layout Standard
5318 \begin_layout LyX-Code
5319 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5320 \begin_inset Newline newline
5323 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5324 \begin_inset Newline newline
5327 read a <~/.lyxpipe.out
5328 \begin_inset Newline newline
5334 \begin_layout Section
5338 \begin_layout Standard
5339 LyX can notify clients of events going on asynchronously.
5340 Currently it will only do this if the user binds a key sequence with the
5342 \begin_inset Quotes eld
5346 \begin_inset Quotes erd
5350 The format of the string LyX sends is as follows:
5354 \begin_inset Flex Code
5357 \begin_layout Plain Layout
5368 \begin_layout Standard
5373 is the printed representation of the key sequence that was actually typed
5377 \begin_layout Standard
5378 This mechanism can be used to extend LyX's command set and implement macros.
5379 Bind some key sequence to
5380 \begin_inset Quotes eld
5384 \begin_inset Quotes erd
5388 Then start a client that listens on the output pipe, dispatches the command
5389 according to the sequence, and starts a function that may use LyX calls
5390 and LyX requests to issue a command or a series of commands to LyX.
5393 \begin_layout Section
5394 The simple LyX Server Protocol
5397 \begin_layout Standard
5398 LyX implements a simple protocol that can be used for session management.
5399 All messages are of the form
5412 \begin_layout Standard
5418 \begin_inset Quotes eld
5422 \begin_inset Quotes erd
5426 \begin_inset Quotes eld
5430 \begin_inset Quotes erd
5435 \begin_inset Quotes eld
5439 \begin_inset Quotes erd
5442 is received from a client, LyX will report back to inform the client that
5443 it's listening to it's messages, while
5444 \begin_inset Quotes eld
5448 \begin_inset Quotes erd
5451 sent from LyX will inform clients that LyX is closing.
5454 \begin_layout Section
5455 Reverse DVI/PDF search
5458 \begin_layout Standard
5459 Some DVI/PDF viewers
5463 \begin_layout Plain Layout
5464 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5465 Skim on Mac OSX and SumatraPDF on Windows.
5474 facility (also called
5479 This means that you can tell LyX to put the cursor to a specific line in
5480 the document by clicking at the respective position in the DVI/PDF output.
5481 To achieve this, the viewer must be able to communicate with LyX.
5482 This is done via the LyX server either by using the named pipe (
5486 ), or the UNIX domain socket (
5490 ) that LyX creates in its temporary directory (this is the way the
5491 \begin_inset Flex Code
5494 \begin_layout Plain Layout
5500 program communicates with LyX).
5501 In some cases, you need a helper script that mediates between the viewer
5502 and LyX, in others, the viewer can communicate with LyX directly.
5503 This depends on the selected viewer and on your operating system.
5504 The same applies to the way viewers need to be configured and the way the
5505 reverse search is actually performed.
5506 In what follows, we will thus describe how to setup reverse search for
5508 Before we turn to this, though, we will explain what needs to be done generally
5509 to enable reverse search in the DVI/PDF output.
5512 \begin_layout Subsection
5514 \change_inserted 2 1274788899
5515 \begin_inset CommandInset label
5517 name "sub:rev-search"
5521 Automatical enabling
5524 \begin_layout Standard
5526 \change_inserted 2 1274789582
5527 In most cases LyX will do the work for you by enabling
5528 \begin_inset Flex MenuItem
5531 \begin_layout Plain Layout
5533 \change_inserted 2 1274789026
5534 Document\SpecialChar \menuseparator
5535 Output\SpecialChar \menuseparator
5542 In such a case LyX will automatically insert SyncTeX macro (for PDF) or
5543 srcltx package (for DVI) respectively.
5544 This option can be easily reached also on
5545 \begin_inset Flex Code
5548 \begin_layout Plain Layout
5550 \change_inserted 2 1274789582
5561 \begin_layout Standard
5563 \change_inserted 2 1274789534
5564 Plase note that including
5565 \begin_inset Flex Code
5568 \begin_layout Plain Layout
5570 \change_inserted 2 1274789498
5579 \begin_inset Flex Code
5582 \begin_layout Plain Layout
5584 \change_inserted 2 1274789484
5592 sometimes have an impact on the typeset and you should switch them off
5593 for the final typesets.
5598 \begin_layout Standard
5600 \change_inserted 2 1274789340
5601 You can also define custom macro in preferences and in case you need some
5602 special tweaks read the next section about manual enabling.
5608 \begin_layout Subsection
5610 \change_inserted 2 1274788680
5616 \begin_layout Standard
5617 LaTeX provides several different methods for reverse search.
5618 Some are built-in in the
5619 \begin_inset Flex Code
5622 \begin_layout Plain Layout
5628 program, some are provided by external packages.
5629 Your choice depends on whether your LaTeX distribution already provides
5630 a given method (the built-in methods are rather new) and whether your viewer
5632 The available methods are described in the following.
5633 \change_inserted 2 1274788557
5637 \begin_layout Subsubsection*
5638 Built-in DVI-search via src-specials (DVI only)
5641 \begin_layout Standard
5642 This method provides the DVI file with the necessary information for reverse
5644 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5645 distribution should include it), and it works reliably.
5646 To enable it, change the
5647 \begin_inset Flex MenuItem
5650 \begin_layout Plain Layout
5655 \begin_layout Plain Layout
5668 \begin_inset Flex MenuItem
5671 \begin_layout Plain Layout
5676 \begin_layout Plain Layout
5683 eX (plain)->DraftDVI
5689 \begin_inset Flex MenuItem
5692 \begin_layout Plain Layout
5693 Preferences\SpecialChar \menuseparator
5694 File Handling\SpecialChar \menuseparator
5701 \begin_inset Flex Code
5704 \begin_layout Plain Layout
5705 latex -src-specials $$i
5711 If this doesn't work, check if your TeX engine needs different options
5712 (the syntax might differ in some distributions).
5715 \begin_layout Subsubsection*
5716 External Packages (PDFSync and scrltx)
5719 \begin_layout Standard
5728 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5730 In order to enable it, load the packages in the LyX preamble:
5733 \begin_layout Itemize
5734 \begin_inset Flex Code
5737 \begin_layout Plain Layout
5745 for reverse PDF search,
5748 \begin_layout Itemize
5750 \begin_inset Flex Code
5753 \begin_layout Plain Layout
5756 usepackage[active]{srcltx}
5761 for reverse DVI search.
5764 \begin_layout Standard
5765 If you want to be able to perform both DVI and PDF reverse searches, you
5766 can also insert in the preamble the following lines
5769 \begin_layout LyX-Code
5773 \begin_inset Newline newline
5779 \begin_inset Newline newline
5785 \begin_inset Newline newline
5791 \begin_inset Newline newline
5796 usepackage[active]{srcltx}
5797 \begin_inset Newline newline
5805 \begin_layout Standard
5806 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5807 right package will be used.
5810 \begin_layout Standard
5811 Note that PDFSync might affect the output layout of your document.
5812 It is therefore advised to disable PDFsync for final documents.
5815 \begin_layout Subsubsection*
5816 Built-in reverse search via SyncTeX (DVI and PDF)
5819 \begin_layout Standard
5821 \begin_inset Flex Code
5824 \begin_layout Plain Layout
5830 have built-in support for both PDF and DVI reverse search.
5835 facility is basically the result of the integration of the PDFSync package
5836 to the pdftex program and its merge with the
5841 You need at least TeXLive 2008 or a recent MikTeX distribution in order
5843 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
5844 already provide SyncTeX support.
5847 \begin_layout Standard
5848 To enable SyncTeX for DVI output, change the
5849 \begin_inset Flex MenuItem
5852 \begin_layout Plain Layout
5857 \begin_layout Plain Layout
5870 \begin_inset Flex MenuItem
5873 \begin_layout Plain Layout
5878 \begin_layout Plain Layout
5885 eX (plain) -> DraftDVI
5891 \begin_inset Flex MenuItem
5894 \begin_layout Plain Layout
5895 Preferences\SpecialChar \menuseparator
5896 File Handling\SpecialChar \menuseparator
5903 \begin_inset Flex Code
5906 \begin_layout Plain Layout
5907 latex -synctex=1 $$i
5912 , and for PDF output, change the
5913 \begin_inset Flex MenuItem
5916 \begin_layout Plain Layout
5921 \begin_layout Plain Layout
5928 eX (pdflatex) -> PDF (pdflatex)
5934 \begin_inset Flex Code
5937 \begin_layout Plain Layout
5938 pdflatex -synctex=1 $$i
5944 Check the documentation of your viewer whether the viewer needs to be configure
5945 d for the use with SyncTeX.
5949 \begin_layout Plain Layout
5951 \begin_inset Flex Code
5954 \begin_layout Plain Layout
5960 option enables gzip compression.
5961 If your viewer does not support it, you should instead use
5962 \begin_inset Flex Code
5965 \begin_layout Plain Layout
5979 \begin_layout Subsection
5980 Configuring and using specific viewers
5983 \begin_layout Subsubsection*
5984 Xdvi (all platforms)
5987 \begin_layout Standard
5989 \begin_inset Flex Code
5992 \begin_layout Plain Layout
5998 , you don't need to do anything else for performing a reverse DVI search,
5999 as LyX already provides the necessary hooks for automatically using the
6001 \begin_inset Flex Code
6004 \begin_layout Plain Layout
6011 Just setup your document as described above (reverse search is triggered
6012 by Ctrl-click or Alt-click on Mac OSX, respectively).
6015 \begin_layout Standard
6016 However, if for whatever reason you want to use the named pipe instead of
6017 the socket for communicating with LyX, simply change the DVI viewer in
6019 \begin_inset Flex MenuItem
6022 \begin_layout Plain Layout
6023 Preferences\SpecialChar \menuseparator
6024 File Handling\SpecialChar \menuseparator
6034 \begin_layout Plain Layout
6035 On Mac OSX you have to use
6036 \begin_inset Flex Code
6039 \begin_layout Plain Layout
6040 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6051 \begin_inset Flex Code
6054 \begin_layout Plain Layout
6055 xdvi -editor 'lyxeditor.sh %f %l'
6061 \begin_inset Flex Code
6064 \begin_layout Plain Layout
6070 is a suitable script.
6071 For example, a minimal shell script is the following one:
6074 \begin_layout LyX-Code
6076 \begin_inset Newline newline
6079 LYXPIPE="/path/to/lyxpipe"
6080 \begin_inset Newline newline
6083 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6084 \begin_inset Newline newline
6087 echo "$COMMAND" > "${LYXPIPE}".in || exit
6088 \begin_inset Newline newline
6091 read < "${LYXPIPE}".out || exit
6094 \begin_layout Standard
6096 \begin_inset Flex Code
6099 \begin_layout Plain Layout
6109 \begin_layout Plain Layout
6116 XServer pipe path specified in
6117 \begin_inset Flex MenuItem
6120 \begin_layout Plain Layout
6121 Preferences\SpecialChar \menuseparator
6131 \begin_layout Plain Layout
6133 \begin_inset Flex Code
6136 \begin_layout Plain Layout
6142 folder of a source distribution you can find a
6143 \begin_inset Flex Code
6146 \begin_layout Plain Layout
6152 script which is able to locate the
6156 based on your preferences.
6164 \begin_layout Subsubsection*
6168 \begin_layout Standard
6170 \begin_inset Flex Code
6173 \begin_layout Plain Layout
6174 /Applications/MacDviX_Folder/calleditor.script
6179 , add the following lines:
6182 \begin_layout LyX-Code
6187 \begin_layout Plain Layout
6194 X.app/Contents/MacOS/lyxeditor "$2" $1
6195 \begin_inset Newline newline
6201 \begin_layout Standard
6202 Modify the lines accordingly if you install LyX somewhere else than in the
6203 Applications folder.
6206 \begin_layout Standard
6207 Reverse search is triggered by Alt-click (OPTION-click).
6210 \begin_layout Subsubsection*
6214 \begin_layout Standard
6216 \begin_inset Flex Code
6219 \begin_layout Plain Layout
6220 open -a Skim.app $$i
6225 to the viewer setting in
6226 \begin_inset Flex MenuItem
6229 \begin_layout Plain Layout
6230 Preferences\SpecialChar \menuseparator
6231 File Handling\SpecialChar \menuseparator
6232 File formats\SpecialChar \menuseparator
6239 \begin_inset Flex MenuItem
6242 \begin_layout Plain Layout
6243 Skim\SpecialChar \menuseparator
6244 Preferences\SpecialChar \menuseparator
6254 \begin_layout Plain Layout
6264 \begin_layout Standard
6265 Reverse search is triggered by COMMAND-SHIFT-click
6268 \begin_layout Subsubsection*
6272 \begin_layout Standard
6274 \begin_inset Flex MenuItem
6277 \begin_layout Plain Layout
6278 Settings\SpecialChar \menuseparator
6279 Configure Okular\SpecialChar \ldots{}
6280 \SpecialChar \menuseparator
6287 \begin_inset Quotes eld
6291 \begin_inset Quotes erd
6295 \begin_inset Flex Code
6298 \begin_layout Plain Layout
6307 \begin_layout Standard
6308 Reverse search is triggered by SHIFT-click.
6311 \begin_layout Subsubsection*
6315 \begin_layout Standard
6316 Launch yap, choose its
6317 \begin_inset Flex MenuItem
6320 \begin_layout Plain Layout
6321 View\SpecialChar \menuseparator
6328 \begin_inset Quotes eld
6332 \begin_inset Quotes erd
6337 \begin_inset Quotes eld
6340 New\SpecialChar \ldots{}
6342 \begin_inset Quotes erd
6345 button and, in the window that opens, enter
6346 \begin_inset Quotes eld
6350 \begin_inset Quotes erd
6353 (or any other name you like) in the
6354 \begin_inset Quotes eld
6358 \begin_inset Quotes erd
6362 Now click on the button labeled
6363 \begin_inset Quotes eld
6366 \SpecialChar \ldots{}
6368 \begin_inset Quotes erd
6371 to open a file dialog and navigate to the directory containing the batch
6373 \begin_inset Flex Code
6376 \begin_layout Plain Layout
6384 \begin_inset Flex Code
6387 \begin_layout Plain Layout
6393 and then specify the program arguments as
6394 \begin_inset Flex Code
6397 \begin_layout Plain Layout
6405 \begin_inset Flex Code
6408 \begin_layout Plain Layout
6414 wrapper is used for communicating with LyX through the
6421 \begin_layout LyX-Code
6423 \begin_inset Newline newline
6426 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6435 \begin_inset Newline newline
6449 \begin_layout Standard
6450 Make sure that the LyXServer pipe path you specified in LyX is
6451 \begin_inset Flex Code
6454 \begin_layout Plain Layout
6468 , otherwise change the
6469 \begin_inset Flex Code
6472 \begin_layout Plain Layout
6478 wrapper accordingly.
6481 \begin_layout Standard
6482 In yap, reverse search is triggered by double-click.
6485 \begin_layout Subsubsection*
6486 SumatraPDF (Windows)
6489 \begin_layout Standard
6490 In order to use SumatraPDF for inverse search, enter
6491 \begin_inset Flex Code
6494 \begin_layout Plain Layout
6495 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6500 in the viewer setting in
6501 \begin_inset Flex MenuItem
6504 \begin_layout Plain Layout
6505 Preferences\SpecialChar \menuseparator
6506 File Handling\SpecialChar \menuseparator
6507 File formats\SpecialChar \menuseparator
6514 \begin_inset Flex Code
6517 \begin_layout Plain Layout
6523 is the previous wrapper.
6524 If SumatraPDF.exe is not in your command PATH, use its full file name.
6527 \begin_layout Standard
6528 Reverse search is triggered by double-click.
6531 \begin_layout Subsubsection*
6535 \begin_layout Standard
6536 First of all, make sure that yap is your default DVI viewer in the Windows
6537 environment, then launch it, choose its
6538 \begin_inset Flex MenuItem
6541 \begin_layout Plain Layout
6542 View\SpecialChar \menuseparator
6549 \begin_inset Quotes eld
6553 \begin_inset Quotes erd
6558 \begin_inset Quotes eld
6561 New\SpecialChar \ldots{}
6563 \begin_inset Quotes erd
6566 button and, in the window that opens, enter
6567 \begin_inset Quotes eld
6571 \begin_inset Quotes erd
6574 (or any other name you like) in the
6575 \begin_inset Quotes eld
6579 \begin_inset Quotes erd
6583 Now click on the button labeled
6584 \begin_inset Quotes eld
6587 \SpecialChar \ldots{}
6589 \begin_inset Quotes erd
6592 to open a file dialog and navigate to the directory containing the
6593 \begin_inset Flex Code
6596 \begin_layout Plain Layout
6602 program (which is installed by default on Cygwin along with the LyX executable).
6604 \begin_inset Flex Code
6607 \begin_layout Plain Layout
6613 and then specify the program arguments as
6614 \begin_inset Flex Code
6617 \begin_layout Plain Layout
6624 In this way, you will be using the
6628 for communicating with LyX.
6629 If, for whatever reason, you want to use the
6634 \begin_inset Flex Code
6637 \begin_layout Plain Layout
6643 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6646 \begin_layout Standard
6647 In yap, reverse search is triggered by double-click.
6650 \begin_layout Subsubsection*
6654 \begin_layout Standard
6655 In order to use SumatraPDF for inverse search, enter
6656 \begin_inset Flex Code
6659 \begin_layout Plain Layout
6665 in the viewer setting in
6666 \begin_inset Flex MenuItem
6669 \begin_layout Plain Layout
6670 Preferences\SpecialChar \menuseparator
6671 File Handling\SpecialChar \menuseparator
6672 File formats\SpecialChar \menuseparator
6679 \begin_inset Flex Code
6682 \begin_layout Plain Layout
6688 is the following script (to be placed in your command PATH,
6689 \begin_inset Flex Code
6692 \begin_layout Plain Layout
6698 being the best choice):
6701 \begin_layout LyX-Code
6703 \begin_inset Newline newline
6707 \begin_inset Newline newline
6710 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6713 \begin_layout Standard
6714 This wrapper script is needed because SumatraPDF is a native Windows application
6715 and does not understand the posix paths used by the Cygwin version of LyX.
6716 If SumatraPDF.exe is not in your command PATH, use its full posix path in
6719 \begin_inset Flex Code
6722 \begin_layout Plain Layout
6728 enables communication via the
6734 \begin_inset Flex Code
6737 \begin_layout Plain Layout
6743 option if you want to use the
6747 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6750 \begin_layout Standard
6751 Reverse search is triggered by double-click.
6752 \change_inserted 1 1271453423
6756 \begin_layout Section
6758 \change_inserted 1 1271453442
6762 \begin_layout Standard
6764 \change_inserted 1 1271454338
6765 To make forward search possible you need to provide generated output PDF/DVI
6766 file with additional information about TeX sources.
6767 This can be done via the methods described in the section
6768 \begin_inset CommandInset ref
6770 reference "sub:rev-search"
6777 \begin_layout Standard
6779 \change_inserted 1 1271454479
6780 Secondly you need to configure LyX for using your viewers in
6781 \begin_inset Flex MenuItem
6784 \begin_layout Plain Layout
6786 \change_inserted 1 1271453866
6787 Preferences\SpecialChar \menuseparator
6788 Output\SpecialChar \menuseparator
6795 Only some of the viewers allows this operation --- yap, xdvi, okular, Sumatra
6800 \begin_layout Plain Layout
6802 \change_inserted 1 1271454273
6803 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
6812 Some other viewers allow at least reloading and positioning to particular
6813 page of the file --- Evince or xpdf --- for these cases you can use external
6815 Please study the prepared examples in the Preferences dialog.
6820 \begin_layout Chapter
6821 Special Document Classes
6824 \begin_layout Section
6828 \begin_layout Standard
6834 \begin_layout Subsection
6838 \begin_layout Standard
6839 This section describes how LyX can be used to write articles for submission
6840 to the scientific journal
6842 Astronomy and Astrophysics
6844 (www.edpsciences.fr/aa/
6845 \begin_inset Flex URL
6848 \begin_layout Plain Layout
6850 http://www.edpsciences.fr/aa/
6855 ) using Version 5.01 of the document class
6860 This package can be downloaded from the ftp site
6863 \begin_layout Standard
6864 \begin_inset VSpace medskip
6870 \begin_layout Standard
6872 \begin_inset Flex URL
6875 \begin_layout Plain Layout
6877 ftp://ftp.edpsciences.org/pub/aa/readme.html
6885 \begin_layout Standard
6886 \begin_inset VSpace medskip
6892 \begin_layout Standard
6893 A manual comes together with that package, and this text is not meant to
6894 replace the original manual but is merely a short guide in how to realize
6895 the correct form of your paper.
6899 \begin_layout Standard
6900 Please note that the publisher of the journal was changed from Springer
6901 to EDP Sciences starting January 1, 2001.
6902 That change involved also some slight changes to the style files, namely
6903 the removal of the thesaurus command.
6904 The LyX class aa supports the newest version of these style files, V 5.01.
6905 If you have an older version installed, please upgrade.
6906 For compatibility, the old (version 4) layout has been kept as
6911 Please refer to the comments in
6913 LyXDir/layouts/aapaper.layout
6918 \begin_layout Subsection
6922 \begin_layout Standard
6923 It is recommended you start from the example template distributed with LyX.
6924 If you are not using a template, note the following settings:
6927 \begin_layout Itemize
6934 Document\SpecialChar \menuseparator
6937 dialog (OK, that one was obvious).
6940 \begin_layout Itemize
6941 Don't change the option
6944 \begin_inset space ~
6954 The whole layout is done by the macros, you shouldn't change anything.
6957 \begin_layout Subsection
6961 \begin_layout Standard
6962 First thing to enter is the header information.
6963 It consists of seven entries, of which some are optional.
6967 \begin_layout Itemize
6975 \begin_layout Itemize
6983 \begin_layout Itemize
6991 \begin_layout Itemize
6999 \begin_layout Itemize
7004 : [optional] if more than one author: whom to contact for offprint requests.
7007 \begin_layout Itemize
7012 : [optional] mail address for contacts.
7015 \begin_layout Itemize
7023 Received: <date>; Accepted <date>
7026 \begin_layout Standard
7027 There is no need to issue the
7033 command, this is done automatically by LyX when the header is finished.
7034 Although the order of the single header entries doesn't matter it is advised
7035 to keep the above sequence, just to get the best optics and meets the layout
7036 of the real document.
7039 \begin_layout Standard
7040 If you want to place footnotes in the header block, e.
7041 \begin_inset space \thinspace{}
7045 \begin_inset space \space{}
7048 to state your present address, just use the standard footnote via the menu
7051 Insert\SpecialChar \menuseparator
7055 LyX will automagically use the term
7064 \begin_layout Standard
7065 In addition to these topics, the macros use three additional LaTeX commands
7066 that have no counterpart in LyX:
7069 \begin_layout Itemize
7076 to separate different names for more than one author and institute, respectivel
7080 \begin_layout Itemize
7087 to mark corresponding author/institute pairs.
7088 The institutes are numbered sequentially as they appear in the
7092 field, so you have to put a marker to each author.
7095 \begin_layout Itemize
7102 to supply an email address for fast contact.
7105 \begin_layout Standard
7106 In all cases, the appropriate command has to be entered in LyX and marked
7112 \begin_layout Subsection
7116 \begin_layout Standard
7117 The abstract should immediately follow the header block.
7118 With version 5 the abstract environment was changed to a command, and there
7119 is now a resctriction to only one paragraph.
7120 In addition, it should contain an entry with the keywords.
7121 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7128 by hand and mark it as LaTeX code.
7129 Refer to the example paper.
7132 \begin_layout Subsection
7133 Supported environments
7136 \begin_layout Standard
7137 The A&A paper layout supports the following environments for structuring
7141 \begin_layout Itemize
7147 \begin_layout Itemize
7153 \begin_layout Itemize
7159 \begin_layout Itemize
7165 \begin_layout Itemize
7171 \begin_layout Itemize
7177 \begin_layout Itemize
7183 \begin_layout Itemize
7189 \begin_layout Itemize
7195 \begin_layout Itemize
7201 \begin_layout Itemize
7207 \begin_layout Itemize
7213 \begin_layout Subsection
7214 Commands not supported by LyX
7217 \begin_layout Standard
7218 Some commands are not yet supported by the
7223 Some have already been mentioned.
7224 For the sake of completeness, they are listed all together here:
7227 \begin_layout Itemize
7235 \begin_layout Itemize
7243 \begin_layout Itemize
7251 \begin_layout Itemize
7259 \begin_layout Itemize
7267 \begin_layout Itemize
7275 \begin_layout Itemize
7283 \begin_layout Itemize
7291 \begin_layout Standard
7292 If you want to use any of these commands, you have to enter them yourself.
7295 Do not forget to mark them as LaTeX code!
7298 \begin_layout Subsection
7299 Figure and Table Floats
7302 \begin_layout Standard
7303 LyX provides support for the necessary float environments
7305 figure, figure*, table
7311 , therefore we won't tell much about it here.
7315 \begin_inset space ~
7321 Just remember that tables should be left-aligned.
7322 For that, select the table and change the alignment in
7324 Edit\SpecialChar \menuseparator
7326 \begin_inset space ~
7332 \begin_layout Standard
7333 There is only one special thing: the figures with caption besides the figure.
7334 To create such a figure, you have to do the following:
7337 \begin_layout Enumerate
7338 Create a wide figure float:
7340 Insert\SpecialChar \menuseparator
7341 Float\SpecialChar \menuseparator
7344 , then right click in the figure and select
7350 \begin_inset space ~
7358 \begin_layout Enumerate
7359 Enter your caption text.
7362 \begin_layout Enumerate
7367 to move the cursor above the caption.
7370 \begin_layout Enumerate
7374 \begin_layout Enumerate
7375 Position the cursor behind the figure and insert a horizontal fill:
7377 Insert\SpecialChar \menuseparator
7379 \begin_inset space ~
7382 Character\SpecialChar \menuseparator
7384 \begin_inset space ~
7392 \begin_layout Enumerate
7393 Switch to LaTeX mode:
7396 \begin_inset space ~
7404 \begin_layout Enumerate
7414 Do not close the brace!
7417 \begin_layout Enumerate
7418 Position the cursor behind the caption text, switch to LaTeX mode and insert
7422 \begin_inset space ~
7434 \begin_layout Standard
7435 Also, refer to the figures in the example paper.
7438 \begin_layout Subsection
7442 \begin_layout Standard
7443 For submission, the paper has to be formated in a special double-spacing
7445 For this purpose, you have to give the option
7449 to the documentclass.
7450 This must be done using the extra class options field in the
7452 Document\SpecialChar \menuseparator
7456 Just enter the string
7463 \begin_layout Subsection
7467 \begin_layout Standard
7472 directory contains an example paper written with LyX.
7473 It is the example paper from the original macro package, translated to
7475 Use it for inspiration, and compare the original LaTeX code with LyX way
7479 \begin_layout Section
7483 \begin_layout Standard
7489 \begin_layout Subsection
7493 \begin_layout Standard
7494 AASTeX is a set of macros produced by the American Astronomical Society
7495 to facilitate electronic manuscript submission to the three journals they
7496 publish: the Astrophysical Journal (including the Letters and Supplement),
7497 the Astronomical Journal, and the Publications of the Astronomical Society
7499 LyX has proven to be an excellent tool for generating these documents,
7500 especially given its equation, citation, and figure handling capabilities.
7501 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7502 is the version described here, or higher.
7503 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7504 incompatible with LyX.
7505 The AASTeX package may be downloaded from the AASTeX Web site
7508 \begin_layout Standard
7509 \begin_inset VSpace medskip
7515 \begin_layout Standard
7517 \begin_inset Flex URL
7520 \begin_layout Plain Layout
7522 http://www.journals.uchicago.edu/AAS/AASTeX
7530 \begin_layout Standard
7531 \begin_inset VSpace medskip
7537 \begin_layout Standard
7538 A complete user guide is contained in that package and you should familiarize
7539 yourself with it thoroughly before embarking on writing a paper in LyX.
7540 LyX will not reduce the need to figure out all the AASTeX commands, it
7541 will only reduce the drudgery of typing everything in.
7542 It is your responsibility to ensure that the final exported LaTeX document
7543 conforms completely to the requirements of the journal to which you are
7544 submitting your paper.
7547 \begin_layout Subsection
7548 Starting a New Paper
7551 \begin_layout Standard
7552 I strongly suggest that you start with the AASTeX template file.
7555 File\SpecialChar \menuseparator
7562 , enter the new file name, then choose the
7567 This will show the most common fields found in a manuscript.
7568 Simply overwrite the existing text (including the brackets,
7572 ) with the correct information.
7573 Many of the AASTeX commands and environments can be implemented directly
7574 in LyX, but some cannot: most noticeably
7586 , which should stick out like a sore thumb if you actually just opened the
7588 For commands such as these, the LaTeX code must be entered directly and
7590 Such commands are referred to as TeX code, or Evil Red Text.
7591 I tried to minimize the amount of TeX code needed in an AASTeX document,
7592 but there is still a bit more required than any of us would like.
7595 \begin_layout Subsection
7596 Finishing Your Paper
7599 \begin_layout Standard
7600 When the paper is finished to your satisfaction and previews/prints correctly,
7602 \begin_inset Quotes eld
7606 \begin_inset Quotes erd
7609 actions which need to be done before you submit it to the journals.
7613 \begin_layout Enumerate
7614 Export your paper as a LaTeX file (
7616 File\SpecialChar \menuseparator
7617 Export\SpecialChar \menuseparator
7624 \begin_layout Enumerate
7629 file with your favorite text editor
7633 \begin_layout Enumerate
7634 remove the comment lines before the
7643 \begin_layout Enumerate
7648 usepackage...{fontenc}
7650 line if it appears (usually just after
7665 \begin_layout Enumerate
7666 remove everything between (and including) the
7678 commands, except for any commands you specifically put into the LaTeX preamble
7679 (which should appear immediately after the
7680 \begin_inset Quotes eld
7683 User specified LaTeX commands
7684 \begin_inset Quotes erd
7695 \begin_layout Enumerate
7696 Run the resulting file through LaTeX to make sure it still processes correctly.
7699 \begin_layout Enumerate
7700 Reread the journal requirements to make sure your filenames and formats
7704 \begin_layout Enumerate
7708 \begin_layout Subsection
7709 Comments On Specific Commands
7712 \begin_layout Standard
7713 I will not describe the detailed usage of the individual AASTeX commands:
7714 the AASTeX User Guide (
7718 ) gives a good description of each.
7719 Thus it's probably easiest for me to go down the list as found in the guide
7720 and offer comments where necessary.
7721 So let's begin \SpecialChar \ldots{}
7725 \begin_layout Subsubsection
7726 Things that work as expected
7729 \begin_layout Standard
7733 \begin_layout Plain Layout
7745 \begin_layout Standard
7746 Because they work as you might expect, I simply list them and the section
7847 begin{thebibliography}
7855 (2.13.2), all the cite commands and their variations (2.13.2), the generic
7856 graphicx figure commands (2.14.1),
7880 (2.15.4, amongst other places),
7907 \begin_layout Standard
7908 The following style options also work correctly:
7929 Simply put them in the
7935 Layout\SpecialChar \menuseparator
7941 \begin_layout Standard
7945 \begin_layout Plain Layout
7957 \begin_layout Subsubsection
7958 Things that work, but require more comment
7961 \begin_layout Standard
7962 The following items work, but require a little more discussion:
7965 \begin_layout Itemize
7966 These items are reserved for use by the journal editors, but you can put
7967 them into the LaTeX preamble if you feel compelled to do so:
8000 \begin_layout Itemize
8001 These items may be placed in the LaTeX preamble, and are included as blanks
8002 in the template file:
8023 \begin_layout Itemize
8030 (2.3) – can only be used
8031 \begin_inset Quotes eld
8035 \begin_inset Quotes erd
8038 , not in the middle of a paragraph.
8039 Use TeX code if you need to embed it.
8042 \begin_layout Itemize
8049 (2.3) – will have extra {} after it.
8050 This should not cause an error.
8053 \begin_layout Itemize
8060 (2.6) – can only be used
8061 \begin_inset Quotes eld
8065 \begin_inset Quotes erd
8068 , not in the middle of a paragraph.
8069 Use TeX code if you need to embed it.
8072 \begin_layout Itemize
8079 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8083 \begin_layout Itemize
8097 \begin_layout Itemize
8104 (2.9) – will have extra {} after it.
8105 This should not cause an error.
8108 \begin_layout Itemize
8115 (2.11) – will have extra {} after it.
8116 This should not cause an error.
8119 \begin_layout Itemize
8126 (2.14.2) – you can insert an optional filename argument by placing the cursor
8127 at the beginning of the text and selecting
8129 Insert\SpecialChar \menuseparator
8134 \begin_inset Quotes eld
8138 \begin_inset Quotes erd
8141 inserts an optional argument of the type needed by
8148 Hopefully it will be renamed someday.
8151 \begin_layout Itemize
8164 for the catalog ID optional parameter
8167 \begin_layout Itemize
8180 for the catalog ID optional parameter
8183 \begin_layout Subsubsection
8184 Things not implemented, use TeX code
8187 \begin_layout Standard
8191 \begin_layout Plain Layout
8203 \begin_layout Standard
8226 setcounter{equation}
8228 (2.12), Journal name abbreviations (2.13.4),
8264 (2.15.4, insert it as the first element in the lefthand cell after where
8266 Don't use any of LyX's rules in the table),
8278 (2.15.5), much of Misc (2.17, except
8329 \begin_layout Standard
8333 \begin_layout Plain Layout
8345 \begin_layout Subsubsection
8346 Things that cannot be implemented
8349 \begin_layout Standard
8350 \SpecialChar \ldots{}
8351 at least in any meaningful sort of way, so I suggest ignoring them.
8352 They are the references environment (2.13.3), and the deluxetable environment
8354 If you really, really need to use deluxetable, I suggest editing it in
8355 a separate file with a text editor, then using
8357 Insert\SpecialChar \menuseparator
8359 \begin_inset space ~
8364 to include it in your LyX document.
8369 file to see an example of this.
8372 \begin_layout Subsection
8373 FAQs, Tips, Tricks, and Other Ruminations
8376 \begin_layout Subsubsection
8377 Getting LyX and AASTeX to cooperate
8380 \begin_layout Standard
8381 It can be a bit tricky to get LyX to recognize a new layout and document
8383 When all else fails, do this:
8386 \begin_layout Enumerate
8387 Make certain that LaTeX can find AASTeX.
8388 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8389 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8396 \begin_layout Enumerate
8408 \begin_layout Enumerate
8411 Tools\SpecialChar \menuseparator
8414 in LyX, then restart LyX.
8417 \begin_layout Enumerate
8418 Open a regular new file, not from a template.
8419 Does AASTeX appear in the class list in
8421 Document\SpecialChar \menuseparator
8427 \begin_layout Standard
8428 If you get a warning from an existing AASTeX document about not being able
8429 to find the AASTeX layout or a message about
8430 \begin_inset Quotes eld
8433 You should not mix title layouts with normal ones
8434 \begin_inset Quotes erd
8437 , things haven't been installed correctly.
8440 \begin_layout Subsubsection
8441 LaTeX error processing a table
8444 \begin_layout Standard
8445 LyX, by default, attempts to center the table caption/title.
8446 This seems to produce a bad interaction in AASTeX so you should click somewhere
8447 in the caption/title, then select
8449 Edit\SpecialChar \menuseparator
8451 \begin_inset space ~
8465 This took care of it for me.
8468 \begin_layout Subsubsection
8472 \begin_layout Standard
8473 A couple of things: 1) I have noticed some funny spacing in the reference
8474 entries in the text.
8475 When you enter the bibliography item data, make sure their is
8479 space between the last author and the parenthesis setting off the year;
8483 \begin_inset space \thinspace{}
8487 \begin_inset space \space{}
8501 2) Entering the references at all is not obvious.
8502 The easiest thing is to start typing your first reference at the end of
8503 the document, then mark it as type
8508 That will put a small gray box in front of what you just typed.
8509 Click on the box to fill in the rest of the information.
8510 For new references, go to the end of an existing reference and press return.
8511 That will create a new line with its own box, etc.
8514 \begin_layout Subsubsection
8518 \begin_layout Standard
8519 Even though AASTeX provides its own figure commands (
8525 , for example), I much prefer LaTeX's standard figure commands (with the
8534 \begin_inset space ~
8537 commands as TeX code into a Figure Float box if you desire, but I never
8538 have much luck getting the layout right.
8539 With the standard graphics, LyX will insert a
8543 usepackage{graphicx}
8545 command into the LaTeX preamble and handle the figures in the standard
8546 LaTeX2e way, interspersing the figures in the text.
8547 I believe ApJ accepts figures exactly this way now; AJ might still use
8549 \begin_inset Quotes eld
8552 stack everything at the end
8553 \begin_inset Quotes erd
8559 \begin_layout Subsubsection
8560 Things I could have done, but didn't
8563 \begin_layout Standard
8565 \begin_inset Quotes eld
8569 \begin_inset Quotes erd
8572 things I could have implemented, but chose not to.
8573 For instance, I saw no point in double-spacing the text in the LyX window,
8574 even though it is double-spaced in the paper manuscript.
8575 Also, I chose not to make separate layouts for the preprint and preprint2
8577 Since I assume you will spend most of your time in the plain manuscript
8578 mode anyway, I decided not to chew up more disk space with this.
8582 \begin_layout Subsection
8586 \begin_layout Standard
8587 Your mileage may vary.
8588 I've now had papers published by both ApJ and AJ that have had 98% of the
8589 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8591 I have had no trouble with the submission process, and I'm sure the journals
8592 were never aware that there might be a difference.
8593 So, go forth and publish!
8596 \begin_layout Section
8600 \begin_layout Standard
8603 David Johnson; updated by Richard Heck
8606 \begin_layout Standard
8607 \begin_inset VSpace bigskip
8613 \begin_layout Standard
8615 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8616 papers to be submitted to American Mathematical Society publications.
8617 The layouts are not tailored to a specific journal, but easily can be.
8618 You should refer to the AMS documentation for specific instructions for
8619 each journal (usually it will entail only changing a single line in the
8621 That documentation is available on the Web at
8622 \begin_inset Flex URL
8625 \begin_layout Plain Layout
8633 \begin_inset Flex URL
8636 \begin_layout Plain Layout
8638 ftp://ftp.ams.org/pub/tex/amslatex/
8644 These layouts are appropriate, and useful, for any mathematical writing.
8648 \begin_layout Standard
8649 There are two basic AMS LaTeX layouts:
8652 \begin_layout Itemize
8653 amsart: The standard AMS article format.
8656 \begin_layout Itemize
8657 amsbook: the standard AMS book (really, monograph) format.
8661 \begin_layout Standard
8662 The layouts themselves contain only the minimum necessary to use the AMS
8664 They do not, in particular, contain any of the `theorem' environments used
8665 for setting theorems, lemmas, and the like.
8666 These are contained, instead, in the
8667 \begin_inset Flex Code
8670 \begin_layout Plain Layout
8676 module, which is loaded by default when when you select one of the AMS
8678 (It can also be used with other classes and can be removed, if you would
8679 rather use something else.) Less commonly used environments are in the
8680 \begin_inset Flex Code
8683 \begin_layout Plain Layout
8684 Theorems (AMS-Extended)
8689 module, which must be loaded manually.
8692 \begin_layout Standard
8693 By default, theorems and the like are numbered consecutively throughout
8694 the document, but this may be modified by loading the module
8695 \begin_inset Flex Code
8698 \begin_layout Plain Layout
8699 Theorems (Order by Section)
8704 or, if you are using
8705 \begin_inset Flex Code
8708 \begin_layout Plain Layout
8715 \begin_inset Flex Code
8718 \begin_layout Plain Layout
8719 Theorems (Order by Chapter)
8725 These will number the results as
8726 \begin_inset Formula $n.m$
8729 , where the first number refers to the section (or chapter) and the second
8730 refers to the total number of results so far in that section (or chapter).
8731 Many environments are also available unnumbered.
8732 These are indicated by an asterisk at the end.
8733 If you happen to want
8737 unnumbered results, the module
8738 \begin_inset Flex Code
8741 \begin_layout Plain Layout
8747 provides that option.
8750 \begin_layout Standard
8751 Note that these modules do not
8755 to be used with the AMS classes.
8756 It is perfectly possible to use the
8757 \begin_inset Flex Code
8760 \begin_layout Plain Layout
8766 module, and the others mentioned, with other classes, such as
8767 \begin_inset Flex Code
8770 \begin_layout Plain Layout
8777 \begin_inset Flex Code
8780 \begin_layout Plain Layout
8787 \begin_inset Flex Code
8790 \begin_layout Plain Layout
8799 \begin_layout Subsection
8800 What these layouts provide
8803 \begin_layout Standard
8804 There is a long list of included environments provided by these layouts.
8805 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8806 variety of `theorem' environments.
8807 However, the AMS recommends the environments that are available in LyX.
8811 \begin_layout Standard
8812 The following environments—as well as the standard environments, such as
8814 \begin_inset Flex Noun
8817 \begin_layout Plain Layout
8824 \begin_inset Flex Noun
8827 \begin_layout Plain Layout
8834 \begin_inset Flex Noun
8837 \begin_layout Plain Layout
8844 \begin_inset Flex Noun
8847 \begin_layout Plain Layout
8854 \begin_inset Flex Noun
8857 \begin_layout Plain Layout
8864 \begin_inset Flex Code
8867 \begin_layout Plain Layout
8874 \begin_inset Flex Code
8877 \begin_layout Plain Layout
8886 \begin_layout Description
8887 Address This should be the author's permanent address.
8890 \begin_layout Description
8892 \begin_inset space ~
8895 Address This should be the author's temporary address at the time of submission,
8896 if different from the Address.
8899 \begin_layout Description
8900 Email Author's e-mail address
8903 \begin_layout Description
8904 URL Author's Web address, if desired.
8907 \begin_layout Description
8908 Keywords Key words or phrases used to identify specific topics discussed
8912 \begin_layout Description
8913 Subjectclass These refer to the AMS Subject Classifications, published and
8916 Mathematical Reviews
8919 These are also available online at the AMS cites listed above.
8922 \begin_layout Description
8926 \begin_layout Description
8930 \begin_layout Description
8934 \begin_layout Standard
8935 The following environments are provided by both the
8936 \begin_inset Flex Code
8939 \begin_layout Plain Layout
8946 \begin_inset Flex Code
8949 \begin_layout Plain Layout
8955 modules, in the latter case in both starred (unnumbered) and unstarred
8956 (numbered) versions.
8957 These same environments are provided only in the starred versions by the
8959 \begin_inset Flex Code
8962 \begin_layout Plain Layout
8971 \begin_layout Theorem
8972 This is typically used for the statements of major results.
8976 \begin_layout Corollary*
8977 This is used for statements which follow fairly directly from previous statement
8979 Again, these can be major results.
8984 These are smaller results needed to prove other statements.
8987 \begin_layout Proposition
8988 These are less major results which (hopefully) add to the general theory
8992 \begin_layout Conjecture
8993 These are statements provided without justification, which the author does
8994 not know how to prove, but which seem to be true (to the author, at least).
8997 \begin_layout Definition*
8998 Guess what this is for.
8999 The font is different for this environment than for the previous ones.
9003 \begin_layout Example*
9004 Used for examples illustrating proven results.
9007 \begin_layout Problem
9008 It's not really known what this is for.
9009 You should figure it out.
9012 \begin_layout Exercise*
9013 Write a description for this one.
9016 \begin_layout Remark
9017 This environment is also a type of theorem, usually a lesser sort of observation.
9020 \begin_layout Claim*
9021 Often used in the course of giving a proof of a larger result.
9025 Generally, these are used to break up long arguments, using specific instances
9031 The numbering scheme for cases is on its own, not together with other numbered
9037 At the end of this environment, a QED symbol (usually a square, but it can
9038 vary with different styles) is placed.
9039 If you want to have other environments within this one—for example, Case
9040 environments—and have the QED symbol appear only after them, then the other
9041 environments need to be nested within the proof environment.
9044 Nesting Environments
9050 for information on nesting.
9053 \begin_layout Standard
9054 And these environments are provided by
9055 \begin_inset Flex Code
9058 \begin_layout Plain Layout
9059 Theorems (AMS-Extended)
9067 \begin_layout Criterion*
9068 A required condition.
9071 \begin_layout Algorithm*
9072 A general procedure to be used.
9075 \begin_layout Axiom*
9076 This is a property or statement taken as true within the system being discussed.
9079 \begin_layout Condition*
9080 Sometimes used to state a condition assumed within the present context of
9085 Similar to a Remark.
9088 \begin_layout Notation*
9089 Used for the explanation of, yes, notation.
9092 \begin_layout Summary
9093 Do we really need to tell you?
9096 \begin_layout Acknowledgement*
9100 \begin_layout Conclusion*
9101 Sometimes used at the end of a long train of argument.
9105 Used in a way similar to Proposition, though perhaps lower on the scale.
9108 \begin_layout Standard
9109 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9111 They need to be available on your system in order to use these environments.
9114 \begin_layout Section
9122 \begin_layout Standard
9128 \begin_layout Subsection
9132 \begin_layout Standard
9133 These are the layout files for some of the journals of the American Geophysical
9135 It is assumed that you have both the AGU's own class files and AGUplus
9136 installed (everything to be found at
9137 \begin_inset Flex URL
9140 \begin_layout Plain Layout
9142 ftp://ftp.agu.org/journals/latex/journals
9150 \begin_layout Subsection
9154 \begin_layout Standard
9164 They are still called this in the LyX GUI, though their LaTeX equivalents
9165 in the AGU classes are
9176 \begin_layout Standard
9177 Newly defined styles are
9214 These are mostly manuscript attributes and defined in the AGU class documentati
9218 \begin_layout Standard
9219 I suspect this is still badly incomplete.
9222 \begin_layout Subsection
9226 \begin_layout Standard
9243 \begin_layout Subsection
9247 \begin_layout Itemize
9250 Journal of Geophysical Research
9259 \begin_layout Standard
9260 Add your own, it isn't so hard! Look at the
9271 \begin_layout Subsection
9272 Bugs and things to remember
9275 \begin_layout Standard
9276 In order to use the new layouts, you must remember to do the following for
9280 \begin_layout Enumerate
9286 This can be done in the
9288 Layout\SpecialChar \menuseparator
9293 Document\SpecialChar \menuseparator
9297 (AGU articles are always in English, right? So
9304 \begin_layout Enumerate
9314 (Yes, this is a bug.)
9317 \begin_layout Enumerate
9318 Make sure you use the
9322 bibliography style, by entering
9326 into the second field of the BibTeX inset.
9327 None of the standard styles will do.
9330 \begin_layout Section
9334 \begin_layout Standard
9340 \begin_layout Subsection
9344 \begin_layout Standard
9345 Broadway is for writing plays.
9346 The format is more decorative than Hollywood, and much less standardized.
9347 This format should be suitable for workshops.
9350 \begin_layout Subsection
9354 \begin_layout Standard
9355 The same as in Hollywood.
9358 \begin_layout Subsection
9362 \begin_layout Standard
9367 names as labels then cross-reference the label to insert the name.
9368 The cross-reference dialog will show the current cast of characters.
9371 \begin_layout Subsection
9372 Paper size and Margins
9375 \begin_layout Standard
9376 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9379 \begin_layout Subsection
9383 \begin_layout Standard
9384 The following environments are available.
9385 You can use broadway.bind to get the bind keys shown at the right.
9388 \begin_layout Itemize
9392 \begin_inset Newline newline
9397 You should not have to use this, but it is here for anything that does not
9401 \begin_layout Itemize
9405 \begin_inset space \hfill{}
9409 \begin_inset Newline newline
9414 Used to describe stage setting and the action.
9415 First use of speaker names in all CAPs.
9418 \begin_layout Itemize
9422 \begin_inset space \hfill{}
9426 \begin_inset Newline newline
9431 Automatically numbered.
9432 On screen it will be arabic, but will print as Roman.
9435 \begin_layout Itemize
9439 \begin_inset space \hfill{}
9443 \begin_inset Newline newline
9453 It is just centered text.
9456 \begin_layout Itemize
9460 \begin_inset space \hfill{}
9464 \begin_inset Newline newline
9469 Not automatically numbered.
9470 You supply the number.
9471 This is because I couldn't figure out how.
9474 \begin_layout Itemize
9478 \begin_inset space \hfill{}
9482 \begin_inset Newline newline
9487 A special case of Narrative to describe the setting and action as the curtain
9491 \begin_layout Itemize
9495 \begin_inset space \hfill{}
9499 \begin_inset Newline newline
9504 The speaker's (actor's) title, centered in all CAPS.
9507 \begin_layout Itemize
9511 \begin_inset space \hfill{}
9515 \begin_inset Newline newline
9520 Instructions to the speaker.
9521 The parentheses are automatically inserted.
9522 The ( will appear on screen, but both will be in the printed play.
9523 This environment is only used within
9530 \begin_layout Itemize
9534 \begin_inset space \hfill{}
9538 \begin_inset Newline newline
9543 What the Speaker says.
9546 \begin_layout Itemize
9550 \begin_inset space \hfill{}
9554 \begin_inset Newline newline
9559 The curtain comes down.
9562 \begin_layout Itemize
9566 \begin_inset space \hfill{}
9572 \begin_layout Itemize
9576 \begin_inset space \hfill{}
9582 \begin_layout Itemize
9586 \begin_inset space \hfill{}
9592 \begin_layout Standard
9596 \begin_layout Section
9600 \begin_layout Standard
9605 can be used to type letters according to German conventions.
9606 A template file is included in
9608 .../lyx/share/templates
9610 for you to use as a starting point.
9613 \begin_layout Section
9621 \begin_layout Standard
9627 \begin_layout Subsection
9631 \begin_layout Standard
9632 This is the layout file for the European Geophysical Society journals.
9637 can be downloaded from the web site of the EGS under
9638 \begin_inset Flex URL
9641 \begin_layout Plain Layout
9651 \begin_layout Subsection
9655 \begin_layout Standard
9658 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9666 The current layout file is unfortunately very unmodular and would benefit
9667 from using the various
9674 \begin_layout Section
9678 \begin_layout Standard
9684 \begin_layout Standard
9685 Elsevier Science Publishers B.V.
9686 provides a standard LaTeX document class (
9690 ) for submitting articles to their various journals.
9691 The style file can be downloaded directly from their web site:
9692 \begin_inset Flex URL
9695 \begin_layout Plain Layout
9697 http://www.elsevier.com/wps/find/authorsview.authors/latex
9703 Instructions are supplied along with the class file, which details the
9704 requirements of the publishers.
9705 LyX includes a package that allows for the use of this class, by a layout
9706 and a template file.
9707 Installation of the class file is the same as for any other LaTeX package;
9708 instructions are provided in the Elsevier documentation.
9711 \begin_layout Standard
9721 As the Elsevier class file is based mainly on the standard article class,
9722 most of the normal functionality is provided.
9723 The Elsevier class defines a number of mathematical environments, which
9724 are similar to the AMS environments.
9725 These commands are all described in the Elsevier documentation, and are
9729 \begin_layout Standard
9730 The easiest way to use the Elsevier style is to base documents on the included
9732 It is best not to use options such as fancy headings or the geometry package,
9733 as elements such as these are defined by Elsevier in their style file.
9734 Ideally, no extra packages except those mentioned in the Elsevier documentation
9736 Essentially, Elsevier require as
9737 \begin_inset Quotes eld
9741 \begin_inset Quotes erd
9744 a LaTeX file as possible, as their intention is to take the supplied file
9745 and replace the class file with one for the particular journal to which
9746 the paper has been submitted.
9747 This also means that not too much time should be spent on the formating
9749 When it comes to be published, this will change anyway.
9750 The rest of the usage for this layout is substantially the same as for
9751 the normal article class.
9752 For details of what Elsevier do and don't allow, refer to their documentation.
9755 \begin_layout Section
9761 \begin_inset CommandInset label
9770 \begin_layout Standard
9776 \begin_layout Subsection
9780 \begin_layout Standard
9781 This section describes how to use LyX to make slides for overhead projectors.
9782 There are two document classes that can do this: the default slides class
9788 This section documents the latter.
9791 \begin_layout Standard
9792 I'm going to say this again, nice and clear, so that there's no misunderstanding
9796 \begin_layout Standard
9797 \begin_inset VSpace bigskip
9803 \begin_layout Standard
9807 This section documents the class
9808 \begin_inset Quotes eld
9816 \begin_inset Quotes erd
9824 \begin_layout Standard
9825 \begin_inset VSpace bigskip
9831 \begin_layout Standard
9832 If you're looking for the documentation for
9833 \begin_inset Quotes eld
9841 \begin_inset Quotes erd
9845 \begin_inset space ~
9849 \begin_inset CommandInset ref
9851 reference "sec:slitex"
9856 If your machine doesn't have the
9861 \begin_inset Quotes eld
9869 \begin_inset Quotes erd
9872 ] installed, you'll probably have to use the default
9876 class, which isn't quite as good as
9881 \begin_layout Standard
9886 class is designed for use with version 2.1 of the
9890 LaTeX class file which is now an integral part of LaTeX2e.
9893 \begin_layout Subsection
9897 \begin_layout Standard
9898 Obviously, to use this document class, you need to select
9899 \begin_inset Quotes eld
9907 \begin_inset Quotes erd
9917 \begin_inset space ~
9923 There are some settings in the
9926 \begin_inset space ~
9931 dialog that you should know about that are specific to this class:
9934 \begin_layout Itemize
9935 Don't change the options
9946 \begin_inset space ~
9952 They're ignored by the
9959 \begin_layout Itemize
9960 The default font size is 20
9961 \begin_inset space \thinspace{}
9964 pt with the other options being 17
9965 \begin_inset space \thinspace{}
9969 \begin_inset space \thinspace{}
9973 \begin_inset space \thinspace{}
9979 \begin_layout Itemize
9988 but all math equations are still typeset in the usual roman font.
9991 \begin_layout Itemize
9996 supports A4 and Letter paper sizes as well as a special size for working
9998 \begin_inset space \thinspace{}
10002 It doesn't support A5, B5, legal or executive paper sizes.
10005 \begin_layout Itemize
10006 Don't bother changing the
10010 settings because they are ignored anyway.
10011 All floats appear where they are defined in the text.
10014 \begin_layout Itemize
10019 setting behaves a bit differently for this class.
10024 provides extensive footer and header capabilities including a user-defined
10027 \begin_inset space ~
10031 \begin_inset CommandInset ref
10033 reference "sec:foilfoot"
10038 The title page is treated differently to all other pages in the document
10047 has the logo centered at the bottom of the page (if one is defined).
10048 The possible page style choices and what they do are as follows:
10052 \begin_layout Labeling
10053 \labelwidthstring MMMMMMM
10060 The final output contains no page numbers, or other headers or footers
10061 (except footnotes of course).
10065 \begin_layout Labeling
10066 \labelwidthstring MMMMMMM
10073 The final output contains page numbers centered at the bottom of the page.
10074 No other headings or footers (other than footnotes).
10077 \begin_layout Labeling
10078 \labelwidthstring MMMMMMM
10083 Page numbers in lower right corner.
10084 Additional headers and footers are also shown.
10085 This is also the default.
10088 \begin_layout Labeling
10089 \labelwidthstring MMMMMMM
10094 Gives you access to the
10098 package although its use with
10102 is discouraged by the writer of the
10106 package because of some potential page layout clashes.
10110 \begin_layout Subsubsection
10114 \begin_layout Standard
10115 The following options may be used in the extra class options in the
10117 Document\SpecialChar \menuseparator
10123 \begin_layout Labeling
10124 \labelwidthstring MMMMMMx
10129 This sets up the page layout for 7.33
10130 \begin_inset space \thinspace{}
10134 \begin_inset space \thinspace{}
10137 in paper, which is about the same aspect ratio as a 35
10138 \begin_inset space \thinspace{}
10141 mm slide, making it a bit easier to work with this medium.
10144 \begin_layout Labeling
10145 \labelwidthstring MMMMMMx
10150 Places a rule across the page below the header on every page except the
10154 \begin_layout Labeling
10155 \labelwidthstring MMMMMMx
10160 Places a rule across the page above the footer on every page except the
10164 \begin_layout Labeling
10165 \labelwidthstring MMMMMMx
10170 This is automatically set each time you create a new
10179 to use the dvips driver to rotate those pages that are set as landscape
10183 \begin_layout Labeling
10184 \labelwidthstring MMMMMMx
10189 Simply changes the page dimensions to those of a landscape page but doesn't
10191 Thus if you use this option you need to use an external program to rotate
10192 each page or feed your paper through your printer as landscape.
10193 Note that this option effectively reverses the roles of the
10201 environments (don't worry these are described in the next section).
10204 \begin_layout Labeling
10205 \labelwidthstring MMMMMMx
10210 Equation numbers on the left.
10213 \begin_layout Labeling
10214 \labelwidthstring MMMMMMx
10219 Flush-left equations.
10222 \begin_layout Subsection
10223 Supported Environments
10226 \begin_layout Standard
10227 Most of the environments commonly supported in other classes are also supported
10233 There are several additional environments provided by
10237 as well as a couple added by LyX.
10238 The following environments are shared with other classes:
10241 \begin_layout Standard
10245 \begin_layout Plain Layout
10249 begin{multicols}{2}
10257 \begin_layout Itemize
10263 \begin_layout Itemize
10269 \begin_layout Itemize
10275 \begin_layout Itemize
10281 \begin_layout Itemize
10287 \begin_layout Itemize
10293 \begin_layout Itemize
10299 \begin_layout Itemize
10305 \begin_layout Itemize
10311 \begin_layout Itemize
10317 \begin_layout Itemize
10323 \begin_layout Itemize
10329 \begin_layout Itemize
10335 \begin_layout Itemize
10341 \begin_layout Itemize
10347 \begin_layout Itemize
10353 \begin_layout Itemize
10359 \begin_layout Itemize
10365 \begin_layout Standard
10369 \begin_layout Plain Layout
10381 \begin_layout Standard
10382 That is, all the major environments apart from the sectioning environments.
10383 Since foils are essentially self-contained sections, with a title and body,
10388 provides specific commands for starting new foils and these are:
10391 \begin_layout Itemize
10397 \begin_layout Itemize
10403 \begin_layout Standard
10404 LyX also provides slightly modified versions of these two environments called:
10407 \begin_layout Itemize
10413 \begin_layout Itemize
10416 ShortRotatefoilhead
10419 \begin_layout Standard
10420 and the differences will be explained in the next section.
10423 \begin_layout Standard
10424 Since foils are often used in presenting ideas or new theorems and such
10429 also provides a comprehensive box of goodies for presenting them:
10432 \begin_layout Standard
10436 \begin_layout Plain Layout
10440 begin{multicols}{2}
10448 \begin_layout Itemize
10454 \begin_layout Itemize
10460 \begin_layout Itemize
10466 \begin_layout Itemize
10472 \begin_layout Itemize
10478 \begin_layout Itemize
10484 \begin_layout Itemize
10490 \begin_layout Itemize
10496 \begin_layout Itemize
10502 \begin_layout Itemize
10508 \begin_layout Itemize
10514 \begin_layout Standard
10518 \begin_layout Plain Layout
10530 \begin_layout Standard
10531 The starred versions are unnumbered while the unstarred versions are numbered.
10532 There are also two list environments added by LyX and these are:
10535 \begin_layout Itemize
10541 \begin_layout Itemize
10547 \begin_layout Standard
10552 provides some powerful header and footer capabilities that are best set
10553 in the preamble although they may be set at any point in a document.
10554 If you want to change these settings in your document the best place to
10555 do so is at the very top of a foil, i.
10556 \begin_inset space \thinspace{}
10562 \begin_inset space \space{}
10567 straight after the foilhead.
10570 \begin_layout Standard
10571 For this purpose, the following command styles are provided [
10578 \begin_layout Standard
10582 \begin_layout Plain Layout
10586 begin{multicols}{2}
10594 \begin_layout Itemize
10598 \begin_inset space ~
10604 \begin_layout Itemize
10610 \begin_layout Itemize
10614 \begin_inset space ~
10620 \begin_layout Itemize
10624 \begin_inset space ~
10630 \begin_layout Itemize
10634 \begin_inset space ~
10641 \begin_layout Standard
10642 \begin_inset space ~
10649 \begin_layout Standard
10653 \begin_layout Plain Layout
10665 \begin_layout Standard
10666 There are also a few commands provided by
10670 that aren't directly supported by LyX but I'll tell you what they do and
10671 how to use them in section
10672 \begin_inset space ~
10676 \begin_inset CommandInset ref
10678 reference "sec:unsuppfoils"
10685 \begin_layout Subsection
10686 Building a Set of Foils
10689 \begin_layout Standard
10690 This section will give a simple introduction to using the different environments
10691 to build a set of foils.
10692 If you want to see an example set of foils, take a look at the
10696 file you find in LyX's
10703 \begin_layout Subsubsection
10704 Give It a Title Page
10707 \begin_layout Standard
10708 Unlike other classes that provide
10728 creates the title on a page of its own.
10729 If you leave out the
10733 environment LaTeX will substitute the current date (every time you regenerate
10737 \begin_layout Subsubsection
10741 \begin_layout Standard
10742 As I mentioned earlier, there are four ways of starting a new foil.
10743 For portrait foils you should use
10752 The difference between these two environments is the amount of space between
10753 the title of the foil (the foilhead) and the body of the foil.
10756 \begin_layout Standard
10757 Landscape foils are generated using the
10763 ShortRotatefoilhead
10766 Again the only difference is the spacing between foilhead and body.
10767 Both of the short versions have 0.5 inches less separation between the foilhead
10772 \begin_layout Standard
10773 One problem with the support for landscape foils is the requirement that
10774 you have to use the
10778 driver to generate the PostScript output otherwise the foils won't be rotated.
10779 It is possible to get landscape foils even if you haven't got the
10783 driver provided you can feed your foils sideways through your printer ;-)
10786 \begin_layout Subsubsection
10787 Theorems, Lemmas, Proofs and more
10790 \begin_layout Standard
10791 Due to a small bug in LyX you can't have two of the same type of these environme
10792 nts directly following each other.
10793 They must be separated by something.
10794 If you try, you will just be extending the previous environment as if you
10795 had merged the two environments together.
10796 So, how do you get around this problem? The simplest option is to insert
10797 some text between the two environments or add a
10801 environment between the two with just a
10802 \begin_inset Quotes eld
10810 \begin_inset Quotes erd
10814 This will force LyX to produce two separate environments and hence the
10815 correct LaTeX output.
10816 An example is provided in the example file included with the LyX distribution.
10817 Remember, this problem only occurs if you are trying to place two of the
10818 same type of theorem-like environments one directly after the other.
10821 \begin_layout Subsubsection
10825 \begin_layout Standard
10826 You get all the commonly supported list styles found in other classes as
10827 well as two new ones.
10828 I'll only describe the new ones here.
10829 If you want to find out more about the other list environments check out
10835 If you intend to use itemized lists you might also want to read about the
10839 \begin_inset space ~
10843 \begin_inset space ~
10848 dialog described above in section
10849 \begin_inset space ~
10853 \begin_inset CommandInset ref
10855 reference "sec:bullet"
10862 \begin_layout Standard
10863 The two new list styles,
10871 , are designed to make it easier for you to create lists of do's and don'ts
10872 or right and wrong by providing dedicated environments that use a tick
10873 or a cross as the label of the list.
10874 These lists are in fact dedicated variants of the
10879 They do however require that you have the
10883 packages installed.
10886 \begin_layout Subsubsection
10890 \begin_layout Standard
10895 redefines the floating tables and figures so that they appear exactly where
10896 they are in the text rather than pushing them to the top of the page or
10897 to some user specified location.
10898 In fact if you change the float placement settings they are simply ignored.
10901 \begin_layout Subsubsection
10902 Page Headers and Footers
10903 \begin_inset CommandInset label
10905 name "sec:foilfoot"
10912 \begin_layout Standard
10916 \begin_inset space ~
10925 are two commands used to control the left-footer text string.
10926 The first is meant to allow you to include a graphic logo on your foils
10928 \begin_inset Quotes eld
10936 \begin_inset Quotes erd
10940 While the second is meant to provide a classification for the audience,
10944 \begin_inset space \thinspace{}
10950 \begin_inset space \space{}
10954 It is empty by default.
10957 \begin_layout Standard
10958 The remaining page corners can be filled by
10961 \begin_inset space ~
10966 (which defaults to page numbers),
10969 \begin_inset space ~
10977 \begin_inset space ~
10985 \begin_layout Subsection
10991 \begin_inset CommandInset label
10993 name "sec:unsuppfoils"
11000 \begin_layout Standard
11001 All the commands mentioned below need to be set in a
11009 within another environment.
11012 \begin_layout Subsubsection
11016 \begin_layout Standard
11017 All lengths are adjusted using the
11040 should be replaced by the name given to the length you want to change and
11045 is the length value.
11046 All lengths should be specified in units of length such as inches (
11058 ) or relative to some document or font-based length such as
11068 \begin_layout Standard
11069 It's possible to change the spacing between a foilhead and the body of the
11070 foil by adjusting the length specified by
11077 For example, to make
11082 \begin_inset space \space{}
11085 in closer to their bodies put the following in the preamble:
11091 foilheadskip}{-0.5in}
11094 \begin_layout Standard
11095 The spacings around floats can be adjusted by setting these lengths:
11098 \begin_layout Labeling
11099 \labelwidthstring MMMMMMMMMMM
11106 Separation between the text and the top of the float
11109 \begin_layout Labeling
11110 \labelwidthstring MMMMMMMMMMM
11117 Separation between the float and the caption
11120 \begin_layout Labeling
11121 \labelwidthstring MMMMMMMMMMM
11128 Separation between the caption and the following text
11131 \begin_layout Labeling
11132 \labelwidthstring MMMMMMMMMMM
11139 You can make the captions narrower than the surrounding text by adjusting
11141 Best done relative to
11150 \begin_layout Standard
11151 There are also several title page related lengths that you may find useful
11152 if you have a long title or several authors:
11155 \begin_layout Labeling
11156 \labelwidthstring MMMMMMMMMMM
11163 Separation from headers to
11168 \begin_layout Labeling
11169 \labelwidthstring MMMMMMMMMMM
11187 \begin_layout Labeling
11188 \labelwidthstring MMMMMMMMMMM
11202 \begin_layout Labeling
11203 \labelwidthstring MMMMMMMMMMM
11219 \begin_layout Labeling
11220 \labelwidthstring MMMMMMMMMMM
11236 \begin_layout Standard
11237 The last length related command affects all the list environments.
11248 a list environment then all the vertical spacing between the list items
11250 Note that this is a command not a length so it doesn't require
11256 like the stuff mentioned above.
11259 \begin_layout Subsubsection
11260 Headers and Footers
11263 \begin_layout Standard
11276 commands control whether the logo in the
11280 definition appear on a given page.
11287 in the preamble then none of the foils will have the logo on them.
11288 If you don't want the logo on a particular page place the
11294 directly after the foilhead of that page and the
11300 directly after the next foilhead.
11303 \begin_layout Standard
11304 If you decide to use the
11308 page style setting in the
11311 \begin_inset space ~
11316 dialog you should probably add
11326 to your preamble so headers and footers on landscape pages are correctly
11327 placed when rotated.
11328 This is due to some clashes between the page layouts provided by the
11339 \begin_layout Section
11340 Hollywood (Hollywood spec scripts)
11343 \begin_layout Standard
11349 \begin_layout Subsection
11353 \begin_layout Standard
11354 Getting the format of a Hollywood script right is a
11355 \begin_inset Quotes eld
11359 \begin_inset Quotes erd
11362 It is designed to make the readers focus on content and to be easy and
11363 familiar for the actors to read.
11364 Each page of a script should be one minute of film.
11365 Nothing goes in a script that you cannot see or hear on screen.
11366 The courier 12 pt font should be used throughout.
11370 \begin_layout Subsection
11374 \begin_layout Standard
11375 Speakers' lines should NEVER break in mid-sentence.
11376 If a speaker's lines continue over a page break, repeat the
11380 title followed by (Cont'd).
11383 \begin_layout Subsection
11387 \begin_layout Standard
11392 names as labels then cross-reference the label to insert the name.
11393 The cross-reference dialog will show the current cast of characters.
11394 You can use this to insert the speaker name in narratives also.
11397 \begin_layout Subsection
11398 Paper size and Margins
11401 \begin_layout Standard
11402 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11405 \begin_layout Subsection
11409 \begin_layout Standard
11410 The following environments are available.
11411 You can use hollywood.bind to get the bind keys shown at the right.
11414 \begin_layout Itemize
11418 \begin_inset Newline newline
11423 Used where nothing else works.
11427 \begin_layout Itemize
11433 \begin_inset space \hfill{}
11441 \begin_inset Newline newline
11444 Usually followed by something like
11445 \begin_inset Quotes eld
11448 on Sally waking up.
11449 \begin_inset Quotes erd
11455 \begin_layout Itemize
11459 \begin_inset space \hfill{}
11463 \begin_inset Newline newline
11468 Introduces a new INTERIOR camera set-up.
11469 Always followed by DAY or NIGHT, or something similar to define the lighting
11471 Everthing on this line in CAPS.
11474 \begin_layout Itemize
11478 \begin_inset space \hfill{}
11482 \begin_inset Newline newline
11487 Introduces a new EXTERIOR camera set-up.
11488 Everthing on this line in CAPS.
11491 \begin_layout Itemize
11495 \begin_inset space \hfill{}
11499 \begin_inset Newline newline
11504 The character speaking.
11507 \begin_layout Itemize
11511 \begin_inset space \hfill{}
11515 \begin_inset Newline newline
11520 Instructions to the speaker.
11521 The () are automatically inserted, but only the ( will show in LyX.
11522 Both will be printed.
11525 \begin_layout Itemize
11529 \begin_inset space \hfill{}
11533 \begin_inset Newline newline
11545 \begin_layout Itemize
11549 \begin_inset space \hfill{}
11553 \begin_inset Newline newline
11558 Camera movement instruction.
11560 \begin_inset space \thinspace{}
11564 \begin_inset space \space{}
11570 \begin_layout Itemize
11574 \begin_inset space \hfill{}
11580 \begin_layout Itemize
11584 \begin_inset space \hfill{}
11590 \begin_layout Itemize
11594 \begin_inset space \hfill{}
11600 \begin_layout Itemize
11604 \begin_inset space \hfill{}
11610 \begin_layout Subsection
11614 \begin_layout Itemize
11618 \begin_layout Itemize
11622 \begin_layout Itemize
11624 \begin_inset space \thinspace{}
11631 \begin_layout Itemize
11636 \begin_layout Itemize
11637 PAN — camera movement
11640 \begin_layout Itemize
11641 INSERT — cut to close-up of
11644 \begin_layout Section
11648 \begin_layout Standard
11651 Panayotis Papasotiriou
11654 \begin_layout Subsection
11658 \begin_layout Standard
11659 The ijmpc package is a set of macros that facilitates electronic manuscript
11662 International Journal of Modern Physics C
11665 Similarly, the ijmpd package is for creating manuscripts to be submitted
11668 International Journal of Modern Physics D
11671 Both journals are published by World Scientific.
11672 The corresponding document classes are named
11681 These files, together with instructions for the authors, can be downloaded
11683 \begin_inset Flex URL
11686 \begin_layout Plain Layout
11688 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11694 \begin_inset Flex URL
11697 \begin_layout Plain Layout
11699 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11705 Both packages are modified versions of the standard
11706 \begin_inset Quotes eld
11710 \begin_inset Quotes erd
11713 package, and they are almost (but not exactly) identical.
11714 Most of their features are supported by LyX.
11715 I have used LyX successfully to write articles submitted to both journals
11716 without any problem.
11719 \begin_layout Subsection
11723 \begin_layout Standard
11724 As usual, the easiest way to write a paper is to start with a template.
11727 File\SpecialChar \menuseparator
11746 This will give an (almost) empty document that includes the most common
11747 fields found in a manuscript.
11748 Simply overwrite the existing text (including the brackets,
11753 You should keep in mind the following remarks.
11756 \begin_layout Enumerate
11757 LyX won't let you change the font size and the page style of the document,
11758 because such modifications are not allowed by both packages.
11761 \begin_layout Enumerate
11762 The language of the document should not be changed.
11763 Before previewing your paper, be sure that the babel package is not used.
11764 To do this, click on
11766 Tools\SpecialChar \menuseparator
11777 checkbox in the language settings, and click on
11785 , if you wish to make this change permanent).
11788 \begin_layout Enumerate
11790 \begin_inset Quotes eld
11794 \begin_inset Quotes erd
11797 style must be used to define keywords.
11800 \begin_layout Enumerate
11801 The ijmpc package provides a style named
11802 \begin_inset Quotes eld
11805 Classification Codes
11806 \begin_inset Quotes erd
11809 , which can be used to define classification codes, such as PACS numbers.
11810 Note that this facility is not supported by the ijmpd package.
11813 \begin_layout Enumerate
11814 Several new environments are available:
11815 \begin_inset Quotes eld
11819 \begin_inset Quotes erd
11823 \begin_inset Quotes eld
11827 \begin_inset Quotes erd
11831 \begin_inset Quotes eld
11835 \begin_inset Quotes erd
11839 \begin_inset Quotes eld
11843 \begin_inset Quotes erd
11847 \begin_inset Quotes eld
11851 \begin_inset Quotes erd
11855 \begin_inset Quotes eld
11859 \begin_inset Quotes erd
11863 \begin_inset Quotes eld
11867 \begin_inset Quotes erd
11871 \begin_inset Quotes eld
11875 \begin_inset Quotes erd
11879 \begin_inset Quotes eld
11883 \begin_inset Quotes erd
11887 \begin_inset Quotes eld
11891 \begin_inset Quotes erd
11895 \begin_inset Quotes eld
11899 \begin_inset Quotes erd
11903 \begin_inset Quotes eld
11907 \begin_inset Quotes erd
11911 \begin_inset Quotes eld
11915 \begin_inset Quotes erd
11919 \begin_inset Quotes eld
11923 \begin_inset Quotes erd
11927 Their use is more or less obvious.
11928 LyX supports all these environments; it will use the proper label, text
11929 style, and numbering scheme for each of them.
11932 \begin_layout Enumerate
11933 Both packages use basic citations; the natbib package should not be used.
11934 In LyX, citation references are shown as usual; in the output, citations
11935 are shown as superscripts.
11936 If you want to use a citation as normal text, you should use the
11941 \begin_inset space \thinspace{}
11945 \begin_inset space \space{}
11949 \begin_inset Quotes eld
11953 \begin_inset space \space{}
11963 \begin_inset Quotes erd
11969 \begin_layout Enumerate
11971 \begin_inset Quotes eld
11975 \begin_inset Quotes erd
11978 section in both packages.
11979 To put acknowledgments, just use the
11980 \begin_inset Quotes eld
11984 \begin_inset Quotes erd
11990 \begin_layout Enumerate
11991 Appendices may be added to the paper,
11995 the Acknowledgments and
12000 LyX provides a special environment, called
12001 \begin_inset Quotes eld
12005 \begin_inset Quotes erd
12008 which marks the beginning of the appendices.
12009 This environment should be left blank; it just sends a LaTeX command, but
12010 nothing is really printed.
12012 \begin_inset Quotes eld
12016 \begin_inset Quotes erd
12019 is printed with blue letters, as a signal that all sections after that
12020 point are appendices.
12021 To write an appendix, use the
12022 \begin_inset Quotes eld
12026 \begin_inset Quotes erd
12030 LyX will number each appendix with capital letters, as required by both
12033 \begin_inset Quotes eld
12037 \begin_inset Quotes erd
12044 be present before the first appendix; if not, all appendices will be numbered
12045 as normal sections in the output.
12048 \begin_layout Enumerate
12049 The ijmpc and the ijmpd packages use the
12053 command to implement table captions.
12054 As a result, a table created by LyX is printed correctly, but its caption
12056 However, you can use some TeX code to overcome this problem, so that captions
12057 are printed as expected.
12058 To do so, create a float table as usual, remove the caption, and replace
12059 it with the TeX code
12069 (sic); you must also the TeX code
12073 immediately after the tabular material.
12074 Study the example table included in the template files to see how this
12075 trick is implemented.
12076 Alternatively, If you need table captions, you should implement the whole
12081 file, then include this file to the LyX document (
12083 Insert\SpecialChar \menuseparator
12084 File\SpecialChar \menuseparator
12086 \begin_inset space ~
12092 Details on how to create a table float can be found in the files
12100 , included in the corresponding packages.
12103 \begin_layout Subsection
12104 Preparing a paper for submission
12107 \begin_layout Standard
12108 Before you submit your paper you must export the LyX document as a LaTeX
12111 File\SpecialChar \menuseparator
12112 Export\SpecialChar \menuseparator
12119 \begin_layout Plain Layout
12120 Actually you have the choice between LaTeX (plain) and pdflatex.
12121 If you intend to use pdflatex to prepare the paper, you should use the
12122 pdflatex option so that included graphics are converted to PDF format,
12123 ready for use by pdflatex.
12128 , then make the following changes to the resulting
12135 \begin_layout Enumerate
12136 Remove the comment lines before the
12145 \begin_layout Enumerate
12146 Remove everything between (and including) the
12158 commands, except for any commands you specifically put into the LaTeX preamble.
12161 \begin_layout Standard
12166 file should be saved and processed through LaTeX as many times as necessary.
12167 You may also want to check the resulting
12174 \begin_layout Subsection
12178 \begin_layout Standard
12179 The use of TeX code is reduced to two commands, which must be placed at
12180 the top of the document.
12181 If you started writing your paper by using the
12189 template, the TeX code needed is already in its place; you usually don't
12191 You may only modify the first TeX code to specify the information printed
12192 to the top of odd and even pages (authors' names and short paper's title,
12194 This TeX code must have the form
12198 markboth{Authors' Names}{Short Paper's Title}
12203 \begin_layout Section
12207 \begin_layout Standard
12213 \begin_layout Subsection
12217 \begin_layout Standard
12218 The iopart package provides a document class to create electronic manuscript
12219 submission to the journals published by the Institute of Physics.
12220 Instructions for the authors how to create a paper using the iopart class
12221 can be downloaded together with the iopart package from the site
12222 \begin_inset Flex URL
12225 \begin_layout Plain Layout
12227 ftp://ftp.iop.org/pub/journals/latex2e
12235 \begin_layout Subsection
12239 \begin_layout Standard
12240 The easiest way to write a paper is to start with the file
12244 that is available in LyX's examples files folder.
12245 Open this file, save it under a new name, and start writing.
12246 The example file explains how to use the special text environments.
12247 Here are the most important advices:
12250 \begin_layout Itemize
12251 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12254 Use AMS math package
12256 in the document settings under
12263 \begin_layout Itemize
12266 The title environment defines the kind of your paper.
12267 So use one of the following environments for the title:
12271 \begin_layout Itemize
12280 \begin_layout Itemize
12289 \begin_layout Itemize
12295 for a Topical review
12298 \begin_layout Itemize
12307 \begin_layout Itemize
12316 \begin_layout Itemize
12322 for a Paper (same as Title)
12325 \begin_layout Itemize
12331 for a Preliminary communication
12334 \begin_layout Itemize
12340 for a Rapid communication
12343 \begin_layout Itemize
12349 for a Letter to the editor
12353 \begin_layout Itemize
12356 All title environments except of
12360 can have an optional short title.
12363 \begin_layout Itemize
12364 There is a general title environment
12368 which is not directly supported by the LyX.
12369 This can be used as TeX code when your document doesn't fit into one of
12370 the other title types.
12373 \begin_layout Standard
12374 For more informations like hints for special table and formula formatting,
12375 look at the IOP author guidelines.
12378 \begin_layout Section
12382 \begin_layout Standard
12385 Panayotis Papasotiriou
12388 \begin_layout Subsection
12392 \begin_layout Standard
12393 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12394 that facilitates electronic manuscript submission to the journals they
12396 Most known of them (at least in my domain of interest) are
12398 Astrophysics and Space Science
12404 , but there are many others (see a complete list at
12405 \begin_inset Flex URL
12408 \begin_layout Plain Layout
12410 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12416 The Kluwer package may be downloaded from the site
12417 \begin_inset Flex URL
12420 \begin_layout Plain Layout
12422 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12428 A complete user guide is contained in that package (but it can also be
12429 downloaded separately).
12432 \begin_layout Standard
12433 LyX supports many features of the package but not everything.
12434 However, the TeX code needed is reduced to some
12435 \begin_inset Quotes eld
12439 \begin_inset Quotes erd
12442 commands of the package (see
12443 \begin_inset space ~
12447 \begin_inset CommandInset ref
12449 reference "subsec:kluwer_peculiarities"
12454 I have recently used LyX to write an article submitted to the
12456 Astrophysics and Space Science
12458 without any problem.
12461 \begin_layout Subsection
12465 \begin_layout Standard
12466 The easiest way to write a paper is to start with the Kluwer template file.
12469 File\SpecialChar \menuseparator
12481 This will give an (almost) empty document that includes the most common
12482 fields found in a manuscript and a short description of their use.
12483 As in most templates, simply overwrite the existing text (including the
12488 ) with the correct information.
12491 \begin_layout Subsection
12492 Preparing a paper for submission
12495 \begin_layout Standard
12496 As in the AASTeX package, before you submit your paper to a journal you
12498 \begin_inset Quotes eld
12502 \begin_inset Quotes erd
12508 \begin_layout Enumerate
12509 Export your paper as a LaTeX file.
12510 To do this, click on
12512 File\SpecialChar \menuseparator
12513 Export\SpecialChar \menuseparator
12520 \begin_layout Enumerate
12525 file with a text editor and make the following changes
12529 \begin_layout Enumerate
12530 remove the comment lines before the
12539 \begin_layout Enumerate
12540 remove everything between (and including) the
12552 commands, except for any commands you specifically put into the LaTeX preamble.
12555 \begin_layout Standard
12564 \begin_layout Enumerate
12569 file through LaTeX as many times as necessary (usually up to three).
12572 \begin_layout Enumerate
12578 \begin_inset space \thinspace{}
12582 \begin_inset space \space{}
12589 , and check if everything is OK (it should, if you didn't make any mistake).
12592 \begin_layout Subsection
12593 \begin_inset Quotes eld
12597 \begin_inset Quotes erd
12600 of the Kluwer package
12601 \begin_inset CommandInset label
12603 name "subsec:kluwer_peculiarities"
12610 \begin_layout Standard
12611 The Kluwer package has the following
12612 \begin_inset Quotes eld
12616 \begin_inset Quotes erd
12622 \begin_layout Enumerate
12623 It is possible to write multiple articles in the same LaTeX file
12627 \begin_layout Plain Layout
12628 I can't imagine any good reason to do this.
12634 Each article must be included in the environment
12635 \begin_inset Quotes eld
12639 \begin_inset Quotes erd
12643 Unfortunately, this environment cannot be omitted, even if you write just
12645 Therefore, each article starts with the command
12651 and, obviously, ends with the command
12658 Although this can be implemented in LyX, I didn't included it, since it
12659 looks ugly and can confuse the novice user.
12660 Therefore, you need to enter them directly and mark them as LaTeX code
12662 \begin_inset Quotes eld
12666 \begin_inset Quotes erd
12672 \begin_layout Enumerate
12673 Information given at the beginning of the article (i.
12674 \begin_inset space \thinspace{}
12678 \begin_inset space \space{}
12681 title, subtitle, author, institution, running title, running author, abstract
12682 and keywords) must be included in an environment called
12683 \begin_inset Quotes eld
12687 \begin_inset Quotes erd
12691 This is not implemented in LyX, so you must enter title, subtitle etc.
12692 \begin_inset space ~
12695 between two TeX code lines (
12710 \begin_layout Enumerate
12711 According to the user manual, the label of each bibliography item must be
12735 \begin_layout Standard
12740 template takes care of all these
12741 \begin_inset Quotes eld
12745 \begin_inset Quotes erd
12749 If you start a new paper using this template you don't need to do anything
12754 \begin_layout Enumerate
12755 don't delete the TeX code included in the template, and
12758 \begin_layout Enumerate
12759 copy the example bibliography item included in the template and modify it
12760 as necessary to enter new bibliography items.
12763 \begin_layout Section
12767 \begin_layout Standard
12773 \begin_layout Subsection
12777 \begin_layout Standard
12778 The LyX document classes
12780 article (koma-script)
12784 report (koma-script)
12802 correspond to the LaTeX document classes
12819 \begin_inset space ~
12822 of the Koma-Script family.
12823 They are replacements for the standard document classes
12839 , resp., and fit better to European typography conventions in a number of
12843 \begin_layout Itemize
12844 Standard character size is 11pt in
12846 article (koma-script)
12850 report (koma-script)
12858 letter (koma-script)
12863 \begin_layout Itemize
12864 Headings, labels of the description environment, and a number of elements
12867 letter (koma-script)
12869 document class are set in a bold sans serif font.
12873 \begin_layout Plain Layout
12874 There is a big difference between the bold sans serif old cm fonts and new
12875 ec fonts, especially in the appearance of headings.
12876 In comparison, the ec bold sans serif fonts look a bit thin.
12877 Here the LaTeX package
12885 helps to produce the
12886 \begin_inset Quotes eld
12890 \begin_inset Quotes erd
12893 appearance when using the ec fonts.
12898 The numbering of chapter headings is made in the same way as the numbering
12899 of section headings, that is without the extra line
12900 \begin_inset Quotes eld
12903 Chapter\SpecialChar \ldots{}
12905 \begin_inset Quotes erd
12909 In addition, the appearance of the headings can be modified by using a
12910 number of options (in LyX to be entered in the field
12913 \begin_inset space ~
12920 Layout\SpecialChar \menuseparator
12927 \begin_layout Itemize
12928 The main means in the Koma-Script document classes to design the type area
12937 (in LyX to be entered in the extra class options field in the dialog
12939 Document\SpecialChar \menuseparator
12943 They make a clearer modification of page margins possible as do the options
12946 Document\SpecialChar \menuseparator
12953 \begin_layout Itemize
12954 The LaTeX document classes of the Koma-Script family define a number of
12955 additional commands.
12956 Those part of it which makes sense in LyX is implemented in corresponding
12960 \begin_layout Standard
12961 Detailed descriptions of the LaTeX document classes of the Koma-Script family
12962 can be found in the Koma-Script documentation
12973 \begin_layout Subsection
12974 article (koma-script), report (koma-script), and book (koma-script)
12977 \begin_layout Standard
12978 The document classes
12980 article (koma-script)
12984 report (koma-script)
12994 are implemented in the layout files
13007 They contain all the paragraph types of the corresponding standard document
13020 , resp., partly modified, with the exception of the LyX specific
13024 -type, which is replaced by the new
13028 -type having the same functionality.
13033 -Type there is a number of new paragraph types added.
13040 letter (koma-script)
13045 \begin_layout Itemize
13054 : are equivalents to
13062 , resp., additionally inserting an entry in the table of contents.
13071 are not contained in
13073 article (koma-script)
13078 \begin_layout Itemize
13087 : behave exactly as
13095 , resp., additionally clearing running heads.
13100 is not contained in
13102 article (koma-script)
13108 \begin_layout Plain Layout
13121 report (koma-script)
13123 , but since this is identical to
13127 , is has not been implemented in LyX.
13135 \begin_layout Itemize
13140 : generates a heading directly above the following paragraph in the standard
13141 character size without affecting the structure of the document.
13144 \begin_layout Itemize
13153 are special captions which respect the different space settings needed
13154 for captions placed above or below an element (if you follow strict typographic
13155 rules, you might want to place table captions always above the table).
13156 You can also use the class option
13160 , which will switch
13173 You need at least Koma-Script version 2.8q to use this.
13176 \begin_layout Itemize
13181 : can be used to set a bonmot, e.
13182 \begin_inset space \thinspace{}
13186 \begin_inset space \space{}
13189 at the beginning of a chapter.
13190 If you use the optional argument (
13192 Insert\SpecialChar \menuseparator
13194 \begin_inset space ~
13199 ), you can insert the dictum's author there.
13200 Dictum and author are separated by a line.
13201 You need at least Koma-Script version 2.8q to use this.
13206 is not contained in
13208 article (koma-script)
13213 \begin_layout Standard
13214 The following types, together with the standard types
13226 , form the title area of the document.
13227 They must be entered ahead of the first
13228 \begin_inset Quotes eld
13232 \begin_inset Quotes erd
13239 \begin_layout Plain Layout
13240 The corresponding LaTeX commands must appear before the
13251 When such a type is used more than once, the latter usage overwrites the
13252 former one, that means, for every type only the latest usage is valid.
13253 The order of the different types however has, like
13265 , no effect on the appearance of the produced document.
13268 \begin_layout Itemize
13273 : produces a centered paragraph above the ordinary title (
13285 ) for the subject of the document.
13288 \begin_layout Itemize
13293 : produces a centered paragraph below the ordinary title (
13305 ) for the publishers' name.
13308 \begin_layout Itemize
13315 report (koma-script)
13321 produces a centered paragraph on its own page behind the title page, or
13324 article (koma-script)
13326 produces a centered paragraph below the ordinary title (
13342 ) for a dedication.
13345 \begin_layout Itemize
13350 : produces a left aligned paragraph above the ordinary title (
13366 ) for a document`s head.
13369 \begin_layout Itemize
13374 : produces in a double-sided print in
13376 report (koma-script)
13382 a left-aligned paragraph at the top of the title page`s back or has no
13383 effect in a single-sided print or in
13385 article (koma-script)
13390 \begin_layout Itemize
13395 : produces in a double-sided print in
13397 report (koma-script)
13403 a left-aligned paragraph at the bottom of the title page`s back or has
13404 no effect in a single-sided print or in
13406 article (koma-script)
13411 \begin_layout Itemize
13416 : produces a special
13417 \begin_inset Quotes eld
13421 \begin_inset Quotes erd
13424 page ahead of the actual document containing a paragraph without special
13428 \begin_layout Standard
13429 The layout files for the document classes
13431 article (koma-script)
13435 report (koma-script)
13441 do include the file
13446 This is thought of as a place to define your own types.
13451 in your personal layout directory and edit the file!
13454 \begin_layout Subsection
13455 letter (koma-script)
13458 \begin_layout Standard
13462 \begin_layout Plain Layout
13474 \begin_layout Standard
13478 letter (koma-script)
13480 is implemented in the layout file
13485 It contains all the paragraph types of the corresponding standard document
13490 , partly modified, with the exception of the LyX specific types
13502 type, which is replaced by the new
13507 In addition, it contains, in contrast to the standard document class, the
13525 Furthermore, there are a number of new letter specific types.
13528 \begin_layout Standard
13532 \begin_layout Plain Layout
13544 \begin_layout Standard
13545 The appearance of the letter produced by this document class can be controlled
13546 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13550 \begin_layout Plain Layout
13551 For example, the standard appearance of the letter`s heading, consisting
13552 of name and address, is quite self-willed.
13554 \begin_inset Quotes eld
13558 \begin_inset Quotes erd
13561 heading is produced by the following LaTeX commands in the preamble:
13564 \begin_layout LyX-Code
13574 \begin_layout LyX-Code
13590 \begin_layout LyX-Code
13600 \begin_layout LyX-Code
13620 A detailed German description of such LaTeX commands can be found in the
13621 Koma-Script documentation
13626 With it, the letter's author can produce his personal letter layout.
13629 \begin_layout Standard
13638 define the beginning of the letter and must be used in every letter.
13639 To emphasize them in the LyX document class, they are marked with the letter
13649 \begin_inset space ~
13652 in the left margin.
13653 It is possible to write any number of letters in one file.
13658 type produces a new letter using the same addressee and a
13662 type produces a new addressee.
13679 are ordinary paragraph types and can also be used several times in one
13680 and the same letter.
13683 \begin_layout Itemize
13688 : produces a paragraph for the addressee and implicitly defines the beginning
13692 \begin_layout Itemize
13697 : produces a paragraph for the form of address and implicitly produces a
13701 \begin_layout Itemize
13706 : produces a paragraph for a close.
13709 \begin_layout Itemize
13714 : produces a paragraph for a postscript.
13717 \begin_layout Itemize
13722 : produces a paragraph for a distribution list.
13725 \begin_layout Itemize
13730 : produces a paragraph for enclosures.
13733 \begin_layout Standard
13774 are input types provided with a label to enter information, which will
13775 be processed by the document class.
13779 \begin_layout Plain Layout
13780 It could be seen as a matter of inconsequence, that the types
13788 described above are not such input types as well.
13789 Because of the special meaning of those types, however, I have implemented
13790 them as ordinary paragraph types with a one letter mark in the left margin.
13791 Moreover, it would affect my feeling of symmetry, if the
13799 type had such a serious different appearance.
13804 The types must be used ahead of the corresponding
13811 \begin_layout Standard
13812 An implementation of these types in a WYSIWYG fashion does not seem to make
13813 sense, because the real appearance of the produced letter does not only
13814 depend on the usage of the particular type, but also on other factors.
13815 For example, a signature entered in the
13819 type will in the standard behavior appear in the produced letter only,
13820 when in the same letter also a
13825 The entered value of the
13829 type will in the standard behavior not appear in the produced letter at
13831 The possibility to design the letter`s heading freely is already indicated
13832 in a footnote above.
13835 \begin_layout Standard
13836 The input types can also be used as empty paragraphs.
13837 This makes sense e.
13838 \begin_inset space \thinspace{}
13842 \begin_inset space \space{}
13854 type is not used at all, in the standard behavior the value of the
13858 type is used as signature, whereas if an empty
13862 type is used, no signature value is defined.
13865 \begin_layout Standard
13866 By using the input types it is possible to write a letter template, containing
13867 filled input types with your personal dates (name, address, etc.) and empty
13868 input types for other dates you want to enter.
13871 \begin_layout Itemize
13876 : sender's name, in the standard behavior appears as a centered paragraph
13877 in small caps in the letter`s heading.
13880 \begin_layout Itemize
13885 : sender's signature, in the standard behavior appears below the
13894 type is used, the value of the
13898 type appears instead.
13901 \begin_layout Itemize
13906 : sender's address, in the standard behavior appears in a centered paragraph
13907 in the letter`s heading below the sender's name.
13910 \begin_layout Itemize
13915 : sender's telephone number, in the standard behavior only sets the LaTeX
13925 \begin_layout Itemize
13930 : place of the letter`s making.
13933 \begin_layout Itemize
13938 : date of the letter`s making.
13947 , in the standard behavior, produce the place and the date in a right-aligned
13948 line below the addressee's field.
13953 type is used, neither place nor date appear, independent of the value of
13963 type is used, the date of the letter `s production is used.
13966 \begin_layout Itemize
13971 : sender`s back address, in the standard behavior appears above the addressee's
13972 field in a small sans serif font.
13975 \begin_layout Itemize
13980 : special mail information, in the standard behavior appears underlined
13981 above the addressee's field below the back address.
13984 \begin_layout Itemize
13989 : additional information, in the standard behavior appears on right side
13990 below the addressee`s field.
13993 \begin_layout Itemize
13998 : the letter's title, in the standard behavior appears in a big, bold, sans
13999 serif font above the subject.
14002 \begin_layout Itemize
14007 : the letter's subject, in the standard behavior appears in a bold font
14015 \begin_layout Standard
14036 produce a business letter like line above the
14040 line containing the fields
14041 \begin_inset Quotes eld
14045 \begin_inset Quotes erd
14049 \begin_inset Quotes eld
14053 \begin_inset Quotes erd
14057 \begin_inset Quotes eld
14061 \begin_inset Quotes erd
14065 \begin_inset Quotes eld
14069 \begin_inset Quotes erd
14073 \begin_inset Quotes eld
14077 \begin_inset Quotes erd
14081 \begin_inset Quotes eld
14085 \begin_inset Quotes erd
14089 For the date field, the value of the
14095 \begin_inset Quotes eld
14098 business letter types
14099 \begin_inset Quotes erd
14102 is used, the value of the
14106 type however does not appear, but only the LaTeX variable
14113 The ordinary output of place and date in a right-aligned line below the
14114 addressee`s field is suppressed.
14115 The types are implemented as input types provided with a label and must
14116 be used ahead of the corresponding
14123 \begin_layout Itemize
14131 \begin_layout Itemize
14139 \begin_layout Itemize
14147 \begin_layout Itemize
14155 \begin_layout Itemize
14163 \begin_layout Subsection
14164 The new letter class: letter (koma-script v.2)
14167 \begin_layout Standard
14173 \begin_layout Standard
14174 \begin_inset VSpace medskip
14180 \begin_layout Standard
14182 Koma-Script version 2.8 has introduced a new letter class
14186 which supersedes the now unsupported
14191 It has — on the LaTeX side — a completely new interface and is not compatible
14192 with the old class.
14193 Therefore, LyX supports both, though it is recommended you use the new
14197 \begin_layout Standard
14198 This class covers the same functionality as
14200 letter (koma-script),
14203 The basic items are
14207 (receiver's address, same as
14211 in the old layout),
14224 will start a new letter (i.
14225 \begin_inset space \thinspace{}
14229 \begin_inset space \space{}
14232 you can write several letters per document).
14233 New elements are sender's
14249 and the possibility to use a
14255 Insert\SpecialChar \menuseparator
14261 \begin_layout Standard
14262 The biggest improvement is, though, that the letter's layout is configurable
14263 to meet almost any needs.
14264 This can be done via the preamble or with a special style file (Letter
14265 Class Option, extension
14269 ), that will be read in as a class option.
14273 \begin_layout Plain Layout
14274 The KOMA package comes with some default
14279 There is, for instance, a
14283 file that follows german typesetting rules, or a
14287 that provides the default layout of the old
14292 The latter can be loaded with the class option
14301 ayout\SpecialChar \menuseparator
14306 ocument\SpecialChar \menuseparator
14318 template that is included in LyX for examples.
14319 A detailed description is to be found in the Koma-Script documentation
14327 \begin_layout Subsection
14331 \begin_layout Standard
14332 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14336 \begin_layout Itemize
14337 The chapter number of a
14341 type appears on a line of its own above the chapter heading instead of
14342 appearing in the same line ahead of it.
14343 The cause for that is the LyX internal behavior for the labeltype
14347 in the layout file.
14350 \begin_layout Itemize
14351 The headings of the types
14359 are only put in the
14360 \begin_inset Quotes eld
14364 \begin_inset Quotes erd
14367 LaTeX table of contents, but not in the LyX table of contents (
14369 Document\SpecialChar \menuseparator
14371 \begin_inset space ~
14375 \begin_inset space ~
14383 \begin_layout Itemize
14384 The paragraphs in a
14388 document class appear in a skip separation mode, not indented.
14389 This is the standard behavior, no special LaTeX commands are needed for
14393 Document\SpecialChar \menuseparator
14396 dialog the corresponding radio button indicates
14405 value always has the effect that extra LaTeX commands are inserted in the
14406 document to produce the gap, which is not what is wanted in this case.
14409 \begin_layout Section
14410 Latex8 (IEEE Conference Papers)
14413 \begin_layout Standard
14419 \begin_layout Subsection
14423 \begin_layout Standard
14424 Since this class is specifically for writing submissions to IEEE sponsored
14425 conferences I strongly recommend that you get a copy of their Authors Kit.
14430 package and associated bibliography style file is included in the kit.
14431 The Authors Kit is usually sent out by email once your initial submission
14433 There is a lot of useful information in the Authors Kit explaining formatting
14434 restrictions and so on and I will assume you have read this since that
14435 means I don't have to repeat it all here.
14438 \begin_layout Subsection
14442 \begin_layout Standard
14443 [AR\SpecialChar \@.
14447 \begin_layout Subsection
14448 Supported Environments
14451 \begin_layout Itemize
14457 \begin_layout Itemize
14463 \begin_layout Itemize
14469 \begin_layout Itemize
14475 \begin_layout Itemize
14481 \begin_layout Itemize
14487 \begin_layout Itemize
14493 \begin_layout Itemize
14499 \begin_layout Itemize
14505 \begin_layout Subsection
14506 Differences Between Screen and Paper
14509 \begin_layout Standard
14510 There are slight differences in appearance mainly with the presentation
14511 of section counters.
14512 On screen the trailing period of the section counter is missing but it
14513 will appear in the output so don't let this worry you.
14516 \begin_layout Section
14520 \begin_layout Standard
14526 \begin_layout Subsection
14530 \begin_layout Standard
14531 Memoir is a very powerful and constantly evolving class.
14532 It has been designed with regard to fictional and non-fictional literature.
14533 Its aim is to let the user have maximum control over the typesetting of
14535 Memoir is based on the standard book class, but it can also emulate the
14536 article class (see below).
14539 \begin_layout Standard
14540 Peter Wilson, the developer of Memoir, is known as the author of lots of
14541 useful packages in the LaTeX world.
14542 Most of them have been merged with Memoir.
14543 Therefore, it is much easier to layout the table of contents, appendices,
14544 chapter designs and such.
14545 LyX, though, does not support all of these goodies natively.
14546 Some of them might be added to forthcoming releases
14550 \begin_layout Plain Layout
14551 You are invited to send suggestions to
14552 \begin_inset Flex URL
14555 \begin_layout Plain Layout
14557 lyx-devel@lists.lyx.org
14567 , lots will probably never, due to the limitations of LyX's framework.
14568 Of course you can still use all features with the help of some native LaTeX
14573 \begin_layout Plain Layout
14578 \begin_layout Plain Layout
14588 \begin_inset space ~
14592 \begin_inset CommandInset ref
14594 reference "sec:Inserting-TeX-Code"
14604 In this section, we can only list those features which are natively supported
14606 For detailed descriptions (and for the rest of features) we recommend you
14607 have a look at the detailed manual of the Memoir class
14611 \begin_layout Plain Layout
14616 \begin_layout Plain Layout
14626 \begin_inset Flex URL
14629 \begin_layout Plain Layout
14631 CTAN:/macros/latex/memoir/memman.pdf
14641 , which is not only a user guide for the class, but also both a comprehensive
14642 description on good typesetting and a superb example for good typesetting
14646 \begin_layout Subsection
14647 Basic features and restrictions
14650 \begin_layout Standard
14651 Memoir supports basically all features of the standard book classes.
14652 There are, however, some differences, as follows:
14655 \begin_layout Description
14657 \begin_inset space ~
14660 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14663 \begin_layout Description
14665 \begin_inset space ~
14668 style: The fancy page style is not supported, due to a command clash between
14669 Memoir and the fancyhdr package (they both define a command with the same
14670 name, which confuses LaTeX).
14671 Instead, Memoir comes with a number of its own page styles (see
14673 Layout\SpecialChar \menuseparator
14674 Document\SpecialChar \menuseparator
14676 \begin_inset space ~
14682 If you want to use these for the chapter pages, you have to use the command
14689 in the main text or in preamble (e.
14690 \begin_inset space \thinspace{}
14694 \begin_inset space \space{}
14701 chapterstyle{companion}
14706 \begin_layout Description
14707 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14708 optional argument in the standard classes.
14709 With this, you can specify an alternative version of the title for the
14710 table of contents and the headers (for instance, if the title is too long).
14711 In LyX, you can do this via
14713 Insert\SpecialChar \menuseparator
14715 \begin_inset space ~
14720 at the beginning of a chapter/section.
14721 Memoir features a second optional argument and thus separates the table
14722 of contents from the header.
14723 You can define three variants of a title with this: one for the main text,
14724 one for the table of contents, and one for the headers.
14725 Simply insert two optional arguments if you need this feature, the first
14726 one containing the short title for the Table of Contents, the second one
14727 containing an alternative short title for the headers.
14730 \begin_layout Description
14731 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14732 of contents, the list of figures and the list of table start a new page
14734 Memoir does not follow this route.
14735 You have to insert a page break yourself, if you want to have one.
14738 \begin_layout Description
14739 Titlepage: For some unknown reason, Memoir uses pagination on the title
14740 page (in the standard classes, title pages are
14741 \begin_inset Quotes eld
14745 \begin_inset Quotes erd
14749 \begin_inset space \thinspace{}
14753 \begin_inset space \space{}
14757 If you want an empty title page, type
14761 aliaspagestyle{title}{empty}
14766 \begin_layout Description
14767 Article: With the class option
14773 Layout\SpecialChar \menuseparator
14774 Document\SpecialChar \menuseparator
14776 \begin_inset space ~
14781 ), you can emulate article style.
14782 That is, counters (footnotes, figures, tables etc.) will not be reset on
14783 new chapters, chapters don't start a new page (but are—in contrary to
14784 \begin_inset Quotes eld
14788 \begin_inset Quotes erd
14791 article classes—still allowed), parts, though, use their own page, as in
14795 \begin_layout Description
14796 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14797 font commands, which have been used in the old LaTeX version 2.09 (e.
14798 \begin_inset space \thinspace{}
14802 \begin_inset space \space{}
14818 It produces an error and stops LaTeX whenever such a command appears.
14823 reallows the commands and spits out warnings instead (which does at least
14825 Since a lot of packages and particularly BibTeX style files are still using
14826 those commands, we have decided to use this option by default.
14829 \begin_layout Subsection
14833 \begin_layout Standard
14834 We will only describe the features supported by LyX (which is not much currently
14836 Please consult the Memoir manual
14840 \begin_layout Plain Layout
14845 \begin_layout Plain Layout
14855 \begin_inset Flex URL
14858 \begin_layout Plain Layout
14860 CTAN:/macros/latex/memoir/memman.pdf
14873 \begin_layout Description
14874 Abstract: You may wonder why an abstract is an extra feature.
14875 Well, it is in book class.
14876 Usually books don't have abstracts.
14877 Memoir, however, has.
14878 You can use it wherever and how often you like.
14881 \begin_layout Description
14882 Chapterprecis: You may know this older typesetting style: The contents of
14883 a chapter are summarized below the title and also in the table of contents
14885 \begin_inset space \thinspace{}
14889 \begin_inset space \space{}
14894 Our hero arrives in Troia; he loses some friends; he finds others
14897 Chapterprecis does exactly this.
14898 It is therefore only sensible below a chapter.
14901 \begin_layout Description
14902 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14903 The epigraph environment provides an elegant way of typesetting such a
14905 The motto itself (text) and its author (source) are divided by a short
14907 Unfortunately, we have to fool LyX a bit here again, since the environment
14908 needs two arguments (text and source).
14909 In this case, we have to use curly brackets (in TeX mode) between the two
14920 <author of the slogan>.
14923 \begin_layout Description
14924 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14925 complex figurative poems).
14926 LyX can only support a few of them.
14927 One is poemtitle, which is a centered title for poems, which will also
14928 be added to the table of contents (verse is the standard environment for
14930 Memoir has some enhanced versions of verse, but you need to use TeX code,
14931 because they have to be nested inside regular verse environments, which
14932 is not possible with LyX).
14935 \begin_layout Description
14936 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14939 \begin_layout Section
14940 Article (mwart), book (mwbk) and report (mwrep)
14941 \begin_inset Argument
14944 \begin_layout Plain Layout
14957 \begin_layout Standard
14963 \begin_layout Standard
14964 The LyX document classes
14980 correspond to the LaTeX document classes
14993 They are replacements for the standard document classes
15005 , resp., and fit better to Polish typography conventions in a number of points.
15009 \begin_layout Standard
15013 \begin_layout Itemize
15014 Unnumbered titles (with star, e.
15015 \begin_inset space \thinspace{}
15019 \begin_inset space \space{}
15026 ) are added into table of contents,
15029 \begin_layout Itemize
15030 Additional page styles:
15034 \begin_layout Description
15035 uheadings header with separated lines,
15038 \begin_layout Description
15039 myheadings custom header, contents headers via commands:
15054 \begin_layout Description
15055 myuheadings custom header with separated lines,
15058 \begin_layout Description
15059 outer page number is placed on outer side of page
15063 \begin_layout Itemize
15068 \begin_layout Description
15069 rmheadings serif titles — default,
15072 \begin_layout Description
15073 sfheadings sansserif titles,
15076 \begin_layout Description
15077 authortitle on title page first placed is author next title — default,
15080 \begin_layout Description
15081 titleauthor on title page first placed is title next author,
15084 \begin_layout Description
15085 withmarginpar reserve place on page for margins.
15089 \begin_layout Section
15093 \begin_layout Standard
15098 provides an alternative to the standard
15103 It provides similar functionality, but you might prefer this layout with
15104 sans serif sections, headings, and more.
15107 \begin_layout Section
15111 \begin_layout Standard
15117 \begin_layout Standard
15118 \begin_inset VSpace bigskip
15124 \begin_layout Standard
15129 \begin_inset space ~
15134 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15135 \begin_inset Formula $\beta$
15138 release of May, 1999) class.
15141 \begin_layout Standard
15146 textclass, which works with RevTeX 3.1.
15147 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15148 That means that it doesn't interact very well with LyX, which requires
15149 LaTeX2e, although it has been kludged to work.
15150 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15154 \begin_inset space ~
15159 textclass should also be pretty easy to use.
15162 \begin_layout Standard
15163 These documents are supposed to be used in
15167 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15168 macros, and assume you'll know what to put in the preamble if necessary.
15171 \begin_layout Subsection
15175 \begin_layout Standard
15176 All you need to do is install RevTeX 4, as described in the package's README
15178 The package can be found at The RevTeX 4 Web Site
15179 \begin_inset Flex URL
15182 \begin_layout Plain Layout
15184 http://publish.aps.org/revtex4/
15190 Install it somewhere that LaTeX can see it.
15191 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15193 \begin_inset space \thinspace{}
15197 \begin_inset space \space{}
15200 not the directory where you installed the class file.) Then, if you reconfigure
15201 LyX, it will find the class file and let you use the RevTeX4 textclass.
15204 \begin_layout Standard
15205 Probably the easiest way to get started is either to import a RevTeX 4 document
15213 \begin_inset space ~
15218 template, found in the templates directory.
15221 \begin_layout Subsection
15225 \begin_layout Standard
15226 Optional arguments to
15233 \begin_inset Quotes eld
15237 \begin_inset Quotes erd
15241 \begin_inset Quotes eld
15245 \begin_inset Quotes erd
15255 \begin_inset space ~
15263 \begin_inset space ~
15269 Remember that in RevTeX, at least one optional argument is required!
15272 \begin_layout Standard
15273 Other preamble matter, like
15280 \begin_inset space ~
15286 \begin_inset space ~
15291 dialog, also as usual.
15294 \begin_layout Subsection
15298 \begin_layout Standard
15299 The layouts basically correspond to the commands in RevTeX4.0.
15300 For example, the Email layout corresponds to
15307 Note that (at least as of RevTeX 4.0 Beta), the
15315 layouts are exactly equivalent, so you shouldn't need to use both.
15319 \begin_layout Plain Layout
15320 In case you're curious, both were included so that
15324 would be able to translate both
15344 \begin_layout Subsection
15348 \begin_layout Standard
15349 There are a couple of important unique aspects of RevTeX 4 which might cause
15350 bugs that will be even more confusing in LyX.
15353 \begin_layout Standard
15371 The LyX equivalent is that there is a separate Thanks layout.
15376 write footnotes in the
15380 layout, or weird things may happen.
15381 See the RevTeX 4 documentation for more details.
15384 \begin_layout Standard
15388 \begin_inset space ~
15396 \begin_inset space ~
15405 layouts must be placed
15413 layout and the corresponding
15430 , the LaTeX won't compile.
15433 \begin_layout Subsection
15437 \begin_layout Standard
15438 The main problem with this layout is that you can't use the optional arguments
15439 to layouts like Email and Title.
15440 (The problem is not unique to this layout; you can't use optional arguments
15441 to the Section layouts either.) This means that after you export that file
15442 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15443 need to edit the LaTeX file with a text editor to add the optional arguments
15445 \begin_inset space \thinspace{}
15449 \begin_inset space \space{}
15452 the running title for the page headers.
15453 Lacking these layouts makes the
15459 (and the equivalent
15465 ) useless, so the corresponding layouts don't exist, and will have to be
15470 \begin_layout Plain Layout
15475 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15476 has not been updated yet to take advantage of it.
15484 \begin_layout Section
15485 Springer Journals (
15492 \begin_layout Standard
15498 \begin_layout Subsection
15502 \begin_layout Standard
15503 These are the layout files for some of the journal formats used by Springer
15504 Verlag and listed on
15505 \begin_inset Flex URL
15508 \begin_layout Plain Layout
15510 http://www.springer.de/author/tex/help-journals.html
15515 , where you should also go to fetch the class files (yes, these are LaTeX2e
15517 It is a modular system: the things common to all journals are implemented
15522 , which journal-specific layout files (such as, e.
15523 \begin_inset space \thinspace{}
15527 \begin_inset space \space{}
15534 for Journal of Geodesy) can include.
15537 \begin_layout Standard
15538 This means that implementing support for any other Springer journal on this
15539 list is as simple as writing your own
15547 file following the outline given in
15555 \begin_layout Standard
15556 It is reasonably well tested only for the Journal of Geodesy.
15565 come with the standard LyX distribution.
15566 Install the relevant class file (downloaded from Springer) in a proper
15567 directory, reconfigure LaTeX (in the teTeX case by running
15571 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15572 and it should work.
15575 \begin_layout Subsection
15579 \begin_layout Standard
15580 A large number of theorem-like styles —
15586 \SpecialChar \ldots{}
15592 \begin_layout Standard
15595 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15596 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15599 See the Springer class file documentation for details.
15602 \begin_layout Subsection
15606 \begin_layout Itemize
15618 \begin_layout Itemize
15621 Probability Theory and Related Fields
15627 — Jean-Marc Lasgouttes
15630 \begin_layout Standard
15631 Add your own, it isn't so hard!
15634 \begin_layout Subsection
15638 \begin_layout Standard
15639 These files are partly based on the older
15643 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15644 file from Springer.
15649 layout, are now defunct.
15650 Jean-Marc Lasgouttes helped out big in making me find my way around the
15651 LyX layout file mechanism.
15654 \begin_layout Subsection
15658 \begin_layout Standard
15660 But probably less than in the old hacked-LaTeX
15667 \begin_layout Standard
15669 \begin_inset space \thinspace{}
15672 g.: does not display the number for theorem-like layouts, just #.
15675 \begin_layout Section
15681 \begin_inset CommandInset label
15690 \begin_layout Standard
15698 \begin_layout Subsection
15702 \begin_layout Standard
15703 This section describes how to use LyX to make slides for overhead projectors.
15704 There are two document classes that can do this: the default slides class
15710 This section documents the former.
15713 \begin_layout Standard
15714 I'm going to say this again, nice and clear, so that there's no misunderstanding
15718 \begin_layout Standard
15719 \begin_inset VSpace bigskip
15725 \begin_layout Standard
15729 This section documents the class
15730 \begin_inset Quotes eld
15738 \begin_inset Quotes erd
15746 \begin_layout Standard
15747 \begin_inset VSpace bigskip
15753 \begin_layout Standard
15754 If you're looking for the documentation for
15755 \begin_inset Quotes eld
15763 \begin_inset Quotes erd
15766 , check out section
15767 \begin_inset space ~
15771 \begin_inset CommandInset ref
15773 reference "sec:foiltex"
15783 \begin_inset Quotes eld
15791 \begin_inset Quotes erd
15794 ] is actually somewhat better than the default
15802 \begin_layout Plain Layout
15803 \SpecialChar \ldots{}
15804 or so I've been told repeatedly by its advocates.
15805 Having never used it, I have no idea if this claim is true or not.
15810 which this section documents.
15813 \begin_layout Standard
15814 This class is the LaTeX2e improvement of the old
15819 Every LaTeX2e distribution includes this class [which I'll just refer to
15821 \begin_inset Quotes eld
15829 \begin_inset Quotes erd
15832 from now on], so you're bound to have it.
15833 As I noted earlier, there are other classes, such as
15837 , which also produce slides for overhead projectors and do a better job
15839 However, there are some things which
15843 can do which the others can't, such as generate overlays.
15844 Read on to learn more!
15847 \begin_layout Subsection
15849 \begin_inset CommandInset label
15851 name "sec:slidesetup"
15858 \begin_layout Standard
15859 Obviously, to use this document class, you need to select
15860 \begin_inset Quotes eld
15868 \begin_inset Quotes erd
15871 from the class list in the
15873 Document\SpecialChar \menuseparator
15877 There are some other special things you should know about this class:
15880 \begin_layout Itemize
15881 Don't bother changing the options
15886 They're not supported by the
15893 \begin_layout Itemize
15897 \begin_inset space ~
15902 behaves a bit differently for this class.
15903 The possible choices and what they do are as follows:
15907 \begin_layout Description
15912 The final output contains page numbers in the lower right corner.
15915 \begin_layout Description
15924 , but also prints out any time markers you've put in.
15925 This is the default.
15928 \begin_layout Description
15933 The final output contains no page numbers, time markers, or alignment markers.
15937 \begin_layout Itemize
15942 class has an extra option:
15948 \begin_inset Quotes eld
15956 \begin_inset Quotes erd
15959 in the extra class options.
15963 \begin_layout Standard
15964 Using this options allows you to add time markers to
15970 \begin_inset space ~
15974 \begin_inset CommandInset ref
15976 reference "sec:slideNote"
15984 \begin_layout Standard
15985 You can also use the template file
15986 \begin_inset Quotes eld
15994 \begin_inset Quotes erd
15997 to automatically set up a document to use the
16003 File\SpecialChar \menuseparator
16005 \begin_inset space ~
16009 \begin_inset space ~
16014 to open your new document].
16015 The template file also contains some examples of the special paragraph
16016 environments used by this class.
16017 I'll describe those next.
16020 \begin_layout Subsection
16021 Paragraph Environments
16024 \begin_layout Subsubsection
16025 Supported Environments
16028 \begin_layout Standard
16029 The first thing you'll notice when you start up a new
16033 document is the font size and type: it's the equivalent of the size
16034 \begin_inset Quotes eld
16042 \begin_inset Quotes erd
16048 \begin_inset space ~
16054 This is also what's used in the output.
16056 \begin_inset Quotes eld
16060 \begin_inset Quotes erd
16063 to remind you that this is a slide.
16064 Your final slides will use a larger font; ergo, you'll have less space.
16065 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16068 \begin_layout Standard
16069 The next thing that becomes obvious is the changes to the paragraph environment
16070 pull-down box [at the far-left end of the toolbar].
16071 Most of the paragraph environments you're used to seeing are missing.
16072 There are also five new ones.
16077 class itself only supports certain paragraph environments:
16080 \begin_layout Itemize
16086 \begin_layout Itemize
16092 \begin_layout Itemize
16098 \begin_layout Itemize
16104 \begin_layout Itemize
16110 \begin_layout Itemize
16116 \begin_layout Itemize
16122 \begin_layout Itemize
16128 \begin_layout Itemize
16134 \begin_layout Itemize
16140 \begin_layout Itemize
16146 \begin_layout Standard
16147 All of the other standard environments, including the section-heading environmen
16148 ts, aren't used in the
16155 \begin_layout Standard
16156 On the other hand, you'll notice the following new environments:
16159 \begin_layout Itemize
16165 \begin_layout Itemize
16171 \begin_layout Itemize
16177 \begin_layout Itemize
16183 \begin_layout Itemize
16189 \begin_layout Standard
16190 These five are kind of quirky, due to a
16191 \begin_inset Quotes eld
16195 \begin_inset Quotes erd
16199 You see, LyX doesn't permit you to nest any other paragraph environment
16200 into an empty environment.
16201 Now, that's fine and dandy, but it means that you wouldn't be able to start
16202 a slide with anything except plain text.
16203 To deal with this, I've performed a little
16204 \begin_inset Quotes eld
16208 \begin_inset Quotes erd
16214 \begin_layout Subsubsection
16215 Quirks of the New Environments
16216 \begin_inset CommandInset label
16218 name "sec:slideQuirk"
16225 \begin_layout Standard
16226 All five of the new paragraph environments are somewhat quirky due to inherent
16227 limitiations in the current version of LyX.
16228 As I just mentioned, LyX forbids environments that begin with another environme
16230 To get around this, the
16234 environment isn't a paragraph environment as described in the
16242 \begin_layout Standard
16243 You should consider
16256 \begin_inset Quotes eld
16259 pseudo-environments.
16260 \begin_inset Quotes erd
16263 They look like a section heading or a
16264 \begin_inset Quotes eld
16272 \begin_inset Quotes erd
16275 but really begin a [and, if necessary, end the previous] paragraph environment.
16285 \begin_inset Quotes eld
16289 \begin_inset Quotes erd
16292 These two perform some action.
16295 \begin_layout Standard
16296 A common feature of all five environments,
16316 , is a rather long-ish label.
16317 The text following this label — ordinarily the contents of the paragraph
16318 environment — is utterly irrelevant for
16339 LyX completely ignores it.
16340 In fact, you can leave these five environments completely empty.
16344 \begin_layout Standard
16349 to put any text after the rather long-ish label, you might want to.
16350 This could be a short description of the contents of the
16355 In that case, enter your descriptive comment and hit
16359 as you normally would.
16362 \begin_layout Standard
16363 If, on the other hand, you don't want to enter any descriptive text, you'll
16364 hit another LyX quirk.
16365 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16366 environment until you put something in the old one.
16370 \begin_layout Itemize
16371 Start entering the text that will
16399 \begin_layout Itemize
16400 Now move to the beginning of that paragraph.
16404 \begin_layout Itemize
16413 \begin_layout Itemize
16414 Finally, change this new, empty paragraph to a
16438 \begin_layout Standard
16439 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16443 \begin_layout Subsection
16444 Making a Presentation with
16457 \begin_layout Subsubsection
16465 \begin_layout Standard
16466 If you're expecting this section to teach you how to actually make a presentatio
16467 n, you'll be sorely disappointed.
16468 Naturally, I'll describe all of the ways the
16472 class can assist you in preparing the materials for a presentation.
16473 Filling in the contents, however, is up to you.
16478 the LyX philosophy.]
16481 \begin_layout Standard
16486 environment [in the manner described in section
16487 \begin_inset space ~
16491 \begin_inset CommandInset ref
16493 reference "sec:slideQuirk"
16497 ] tells LyX to begin a new slide [duh].
16498 The label for this environment/
16499 \begin_inset Quotes erd
16503 \begin_inset Quotes erd
16507 \begin_inset Quotes eld
16511 \begin_inset Quotes erd
16514 in cool blue, followed by the label,
16515 \begin_inset Quotes eld
16519 \begin_inset Quotes erd
16523 Any text or paragraph environments that follow this one go on the new slide.
16527 \begin_layout Standard
16528 Slides are probably the only time you'll need to forcibly end pages in LyX
16529 (this can be specified in the
16534 In fact, you'll want to, once you finish entering the contents of one slide.
16535 If you've entered more text than can physically fit on a slide, the extra
16536 overflows onto a new slide.
16537 I don't recommend doing this, however, since the overflow slide won't have
16538 any page number on it.
16539 Furthermore, it may interfere with any
16543 you've made to accompany the oversized
16550 \begin_layout Standard
16559 environments work the same way as the
16564 They both create an
16565 \begin_inset Quotes eld
16569 \begin_inset Quotes erd
16572 followed by a label [
16573 \begin_inset Quotes eld
16577 \begin_inset Quotes erd
16581 \begin_inset Quotes eld
16585 \begin_inset Quotes erd
16589 The color is a stunning magenta instead of blue, and the
16590 \begin_inset Quotes eld
16594 \begin_inset Quotes erd
16597 will look different, in style and in length.
16598 The label fonts of all three also differ from one another.
16601 \begin_layout Standard
16606 , if the contents of a
16614 exceed the physical size of a slide or sheet of paper, the extra will overflow
16616 Again, you should avoid this.
16617 It defeats the whole purpose of
16628 \begin_layout Subsubsection
16638 \begin_layout Standard
16643 is a slide that sits atop another slide.
16644 Perhaps you wish to discuss a figure on the main
16648 before displaying the text associated with it.
16649 One way to accomplish this is tape a flap of dark paper over the part of
16654 you want to display later.
16655 This method fails, however, if you wish to overlap one graph with another,
16657 You would then have to fumble while speaking to align the two separate,
16662 s to align the two graphs.
16667 environment in both cases makes life much easier.
16670 \begin_layout Standard
16675 receives the page number of its
16676 \begin_inset Quotes eld
16680 \begin_inset Quotes erd
16688 \begin_inset Quotes eld
16696 \begin_inset Quotes erd
16703 \begin_layout Plain Layout
16704 Presumably, mutliple
16709 \begin_inset Quotes eld
16717 \begin_inset Quotes erd
16721 \begin_inset Quotes eld
16729 \begin_inset Quotes erd
16733 \begin_inset Quotes eld
16741 \begin_inset Quotes erd
16745 \begin_inset space ~
16748 appended to the page number of the parent
16758 Clearly, you want the contents of both the
16766 to each fit on a single physical slide! You should probably consider an
16772 \begin_inset Quotes eld
16776 \begin_inset Quotes erd
16788 class provides a visual cue for this: the label at the start of an
16792 is shorter than that at the start of a
16797 Lastly, when you generate printable output, you'll find alignment markers
16798 in all four corners of both the
16802 page and its parent
16807 These will assist you in lining up the two physical slides.
16810 \begin_layout Standard
16811 The major problem in overlaying two slides is aligning the contents of the
16812 two transparencies.
16813 How much space should you leave for that graph on the second slide? Worse
16814 still, what if you want a graph and a sentence on second slide, but there
16815 is text on the main transparency that goes in between them? You could try
16816 and insert vertical space of the right size.
16817 The better way is to use
16828 \begin_layout Standard
16829 As their names imply,
16837 are two command-like paragraph environments that make all subsequent text
16838 invisible and visible, respectively.
16840 \begin_inset space ~
16844 \begin_inset CommandInset ref
16846 reference "sec:slideQuirk"
16850 that you don't place anything
16854 these two environments, however.
16859 , it inserts a centered, sky-blue label into the page reading
16860 \begin_inset Quotes eld
16863 <Invisible Text Follows>
16864 \begin_inset Quotes erd
16868 For paragraphs following this label, the parts of the
16876 ; it doesn't matter which] where they would be contain instead blank space.
16880 \begin_layout Standard
16885 , the corresponding centered label is
16886 \begin_inset Quotes eld
16889 <Visible Text Follows>
16890 \begin_inset Quotes erd
16894 Paragraphs following this label behave normally.
16895 Note that the beginning of a new
16907 automatically shuts off an
16912 It's therefore not necessary to use
16923 \begin_layout Standard
16924 By now, it should be obvious how to create overlay transparencies using
16925 the proper combination of
16944 \begin_layout Enumerate
16949 , including everything that will appear on it, whether on the main slide
16957 \begin_layout Enumerate
16958 Before each figure or paragraph that will appear only on the
16967 If necessary, insert a
16971 environment after the
16978 \begin_layout Enumerate
16983 immediately following the
16990 \begin_layout Enumerate
16991 Copy the contents of this
17002 \begin_layout Enumerate
17007 , change all of the
17018 \begin_layout Standard
17020 You've just made an
17027 \begin_layout Standard
17028 There's one problem with the way I've designed the LyX
17032 class: you can't make text in the middle of a paragraph invisible, nor
17033 make text in the middle of an invisible paragraph visible again.
17034 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17038 \begin_layout Plain Layout
17039 The commands of interest are:
17042 \begin_layout Itemize
17047 invisible \SpecialChar \ldots{}
17051 \begin_layout Itemize
17056 visible \SpecialChar \ldots{}
17060 \begin_layout Plain Layout
17061 \SpecialChar \ldots{}
17062 and need to be marked as TeX.
17064 \begin_inset Quotes eld
17068 \begin_inset Quotes erd
17071 you wish to change goes in between the brackets [and after the
17084 If you don't know how to mark text as TeX, see the appropriate section
17097 \begin_layout Subsubsection
17107 \begin_inset CommandInset label
17109 name "sec:slideNote"
17116 \begin_layout Standard
17125 is associated with a
17126 \begin_inset Quotes eld
17130 \begin_inset Quotes erd
17142 class provides visual cues.
17147 is shorter than that of a
17151 [yet longer than that of an
17155 ] and, like the label of an
17159 is shockingly magenta.
17160 Additionally, the printed
17164 has the page number of its
17165 \begin_inset Quotes eld
17169 \begin_inset Quotes erd
17177 \begin_inset Quotes eld
17185 \begin_inset Quotes erd
17189 \begin_inset Quotes eld
17197 \begin_inset Quotes erd
17201 \begin_inset Quotes eld
17209 \begin_inset Quotes erd
17213 You can have multiple
17217 s associated with a single
17229 , you'll probably want to break up long
17233 s so that they fit on a single sheet of paper.
17236 \begin_layout Standard
17241 is obvious: it contains anything additional you might want to say about
17247 It could also be used as a sheet of reminders for a particular
17252 In the case of the latter, you might want to make use of time markers.
17258 \begin_inset Quotes eld
17262 \begin_inset Quotes erd
17265 support for time markers, a
17270 So, you'll have to resort to using the LaTeX codes.
17273 \begin_layout Standard
17274 To use time markers, you'll need to specify the extra class option
17275 \begin_inset Quotes eld
17283 \begin_inset Quotes erd
17287 \begin_inset space ~
17291 \begin_inset CommandInset ref
17293 reference "sec:slidesetup"
17298 This option turns on timing marks, which will appear in the lower-left-hand
17304 To set what appears in the time marker, you use the LaTeX commands
17305 \begin_inset Quotes eld
17315 \begin_inset Quotes erd
17319 \begin_inset Quotes eld
17329 \begin_inset Quotes erd
17333 The arguments of both commands are time measured in seconds.
17335 \begin_inset Quotes eld
17345 \begin_inset Quotes erd
17348 sets the time marker to a given time.
17350 \begin_inset Quotes eld
17360 \begin_inset Quotes erd
17363 increments the time marker by the specified amount.
17364 Using time markers and
17368 s in this fashion, you can remind yourself how much time to spend on a particula
17376 \begin_layout Standard
17377 There's one last feature to describe.
17378 Clearly, you'd like to print out all of your
17386 s on transparencies while printing all of your
17403 with which it is associated.
17404 What's a person to do?
17407 \begin_layout Standard
17408 Luckily, there are two LaTeX commands that allow you to select what to print
17410 Both must be placed into the preamble of your document.
17412 \begin_inset Quotes eld
17424 \begin_inset Quotes erd
17427 will cause the output to contain only the
17436 Correspondingly, the command
17437 \begin_inset Quotes eld
17449 \begin_inset Quotes erd
17452 prevents the output of anything but
17457 I'd advise placing both commands in the preamble and initially comment
17459 You can then preview your entire presentation as you write.
17460 When you're done writing, you can then uncomment one of the two to select
17461 what you want to print.
17462 I like to uncomment
17463 \begin_inset Quotes eld
17475 \begin_inset Quotes erd
17478 , print to a file with
17479 \begin_inset Quotes eld
17487 \begin_inset Quotes erd
17490 in its name, comment it back out, then uncomment
17491 \begin_inset Quotes eld
17503 \begin_inset Quotes erd
17507 \begin_inset Quotes eld
17515 \begin_inset Quotes erd
17519 I can then send either file to a printer, loading transparencies or plain
17520 paper as appropriate.
17523 \begin_layout Standard
17524 You can also provide other arguments to the
17525 \begin_inset Quotes eld
17535 \begin_inset Quotes erd
17539 \begin_inset Quotes eld
17549 \begin_inset Quotes erd
17553 See a good LaTeX book for details.
17556 \begin_layout Subsection
17561 Class Template File
17564 \begin_layout Standard
17565 I have also provided a template file,
17566 \begin_inset Quotes eld
17574 \begin_inset Quotes erd
17582 To use it, begin your new presentation with
17587 ile\SpecialChar \menuseparator
17589 \begin_inset space ~
17593 \begin_inset space ~
17603 Your new LyX presentation file will contain an example
17624 additionally contain an example of the use of
17633 Lastly, the preamble will contain:
17636 \begin_layout LyX-Code
17637 % Uncomment to print out only slides and overlays
17640 \begin_layout LyX-Code
17644 \begin_layout LyX-Code
17650 \begin_inset Newline newline
17656 \begin_layout LyX-Code
17657 % Uncomment to print out only notes
17660 \begin_layout LyX-Code
17664 \begin_layout LyX-Code
17672 \begin_layout Standard
17673 One final thing: I created this class to support the LaTeX2e
17674 \begin_inset Quotes eld
17682 \begin_inset Quotes erd
17685 class, one of the built-in LaTeX2e classes.
17686 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17687 built-in slide class.
17688 It's here if you want it or need it.
17689 There exist other LaTeX2e classes for creating presentations, such as the
17695 \begin_inset space ~
17699 \begin_inset CommandInset ref
17701 reference "sec:foiltex"
17706 \begin_inset Quotes eld
17714 \begin_inset Quotes erd
17717 package [present on some TeX distributions].
17718 The latter is not yet supported under LyX.
17722 \begin_layout Plain Layout
17723 Perhaps you can take on the task\SpecialChar \ldots{}
17729 I know nothing about these other classes.
17730 Try them out to see what sort of alternative they provide.
17733 \begin_layout Chapter
17734 LyX Features needing Extra Software
17737 \begin_layout Section
17741 \begin_layout Standard
17747 \begin_layout Subsection
17751 \begin_layout Standard
17760 \begin_layout Plain Layout
17765 is not yet available when you are using the LaTeX distribution MiKTeX.
17770 , you'll find in the
17777 \begin_inset space ~
17788 \begin_inset CommandInset href
17790 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17797 \begin_layout Standard
17802 package is a program that was written by
17803 \begin_inset Flex Noun
17806 \begin_layout Plain Layout
17808 \begin_inset space ~
17816 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17817 and easy to forget.
17818 The program runs over your LaTeX file, checks the integrity of the file,
17819 and flags some common errors.
17820 In other technical words, it is
17827 \begin_layout Standard
17828 Well, what is a syntax checker doing in LyX which is supposed to produce
17829 correct LaTeX anyways? The answer is simple: Just as
17833 not only checks the
17837 of C programs, but also does
17841 checks for type-errors,
17845 catches some common
17849 errors, in addition to the syntactical ones.
17854 is capable of detecting several common errors, such as
17857 \begin_layout Itemize
17858 Ellipsis detection:
17859 \begin_inset Newline newline
17862 Use \SpecialChar \ldots{}
17866 \begin_layout Itemize
17867 No space in front of/after parenthesis:
17868 \begin_inset Newline newline
17874 \begin_layout Itemize
17875 Enforcement of normal space after common abbreviations:
17876 \begin_inset Newline newline
17880 \begin_inset space \thinspace{}
17884 \begin_inset space \space{}
17887 is too wide spacing.
17890 \begin_layout Itemize
17891 Enforcement of end-of-sentence space when the last sentence ends with a
17893 \begin_inset Newline newline
17897 And this is wrong spacing.
17900 \begin_layout Itemize
17901 Space in front of labels and similar commands:
17902 \begin_inset Newline newline
17905 The label should stick right up to the text to avoid falling to a wrong
17908 \begin_inset CommandInset label
17918 \begin_layout Plain Layout
17919 This footnote is in danger of falling off to a wrong page
17924 The label is separated too much.
17927 \begin_layout Itemize
17928 Space in front of references, instead of hard spaces:
17929 \begin_inset Newline newline
17932 In you are in bad luck, the text will break right between the referenced
17933 text and reference number, and that's a pity.
17935 \begin_inset CommandInset ref
17937 reference "sec:chktex"
17944 \begin_layout Itemize
17946 \begin_inset Quotes eld
17950 \begin_inset Quotes erd
17954 \begin_inset Formula $\times$
17958 \begin_inset Newline newline
17961 2x2 looks cheap compared to
17962 \begin_inset Formula $2\times2$
17968 \begin_layout Standard
17969 and more \SpecialChar \ldots{}
17970 It is an invaluable tool when you are
17971 \begin_inset Quotes eld
17975 \begin_inset Quotes erd
17978 your document before printing, and you should run it right after the obligatory
17979 spelling check, and before you go fine tuning the typesetting.
17982 \begin_layout Subsection
17986 \begin_layout Standard
17987 If you have the program installed, usage is as simple as choosing
17989 Tools\SpecialChar \menuseparator
17991 \begin_inset space ~
17997 This will make LyX generate a LaTeX file of your document, start
18001 to check it, and then make LyX insert
18002 \begin_inset Quotes eld
18006 \begin_inset Quotes erd
18009 with the warnings from
18013 , if there were any.
18014 The warnings will be placed close to the point of the mistake, and you
18015 can quickly find them by using the
18017 Navigate\SpecialChar \menuseparator
18020 menu item, or the shortcut key
18029 Open the error boxes by clicking on them with the mouse, or use the shortcut
18038 bindings, or the corresponding
18047 Read the warning and correct the mistake, if it is a mistake.
18048 If you have trouble understanding what the warning is about, you can safely
18050 Remember that there is a hidden layer between the document on screen and
18051 the technical details in invoking
18055 , and this gap can make some warnings seem arcane or just right down plain
18059 \begin_layout Standard
18060 This document is an excellent testing bed for the feature, and it should
18061 provide quite a few warnings for you to fiddle with.
18062 Since computers are only so smart, expect most of the warnings to be false
18066 \begin_layout Subsection
18067 How to fine tune it
18070 \begin_layout Standard
18071 Sometimes, you'll find that
18075 makes more noise than suits your mood.
18076 Then you can choose not to use it, wait until your mood changes, or try
18081 to get better along with you.
18082 Another choice in the most desperate situations is to use
18084 View\SpecialChar \menuseparator
18086 \begin_inset space ~
18090 \begin_inset space ~
18094 \begin_inset space ~
18099 , which will get rid of all warnings instantly.
18102 \begin_layout Standard
18111 very configurable and extensible, you shouldn't expect to solve all problems
18117 Since LyX has to generate a somewhat special LaTeX file to be able to match
18118 the line numbers from the
18126 \begin_layout Plain Layout
18127 You can inspect the specific output from
18133 Edit\SpecialChar \menuseparator
18135 \begin_inset space ~
18139 \begin_inset space ~
18153 to the internal document structure, some of the warnings will not seen
18154 to appear correctly.
18155 There are two things you can do about this:
18158 \begin_layout Itemize
18163 invocation command line in
18179 installation configuration file (usually with the file
18184 See below to learn what warnings can be enabled and disabled on the command
18189 \begin_layout Itemize
18190 Export your document as a raw LaTeX file using
18192 File\SpecialChar \menuseparator
18193 Export\SpecialChar \menuseparator
18201 Invoked in this way, it can be a hassle to find the corresponding place
18202 in the document inside LyX, but with a little patience, you should be able
18206 \begin_layout Standard
18207 Here follows the warning messages that can be enabled and disabled in
18216 to disable a warning, and
18220 to enable a warning.
18221 The emphasized entries are disabled by default, because the default is
18224 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18229 \begin_layout Standard
18230 Notice that you should only use the options that enable and disable warnings,
18231 because LyX relies on some of the other command line parameters to be set
18232 in a specific way to have a chance to communicate with
18239 \begin_layout Enumerate
18243 Command terminated with space.
18246 \begin_layout Enumerate
18249 Non-breaking space (
18250 \begin_inset Quotes eld
18258 \begin_inset Quotes erd
18261 ) should have been used.
18264 \begin_layout Enumerate
18268 You should enclose the previous parenthesis with
18269 \begin_inset Quotes eld
18277 \begin_inset Quotes erd
18283 \begin_layout Enumerate
18286 Italic correction (
18287 \begin_inset Quotes eld
18297 \begin_inset Quotes erd
18300 ) found in non-italic buffer.
18303 \begin_layout Enumerate
18306 Italic correction (
18307 \begin_inset Quotes eld
18317 \begin_inset Quotes erd
18320 ) found more than once.
18323 \begin_layout Enumerate
18327 No italic correction (
18328 \begin_inset Quotes eld
18338 \begin_inset Quotes erd
18344 \begin_layout Enumerate
18348 \begin_inset Quotes eld
18356 \begin_inset Quotes erd
18360 \begin_inset Quotes eld
18368 \begin_inset Quotes erd
18374 \begin_layout Enumerate
18377 Wrong length of dash may have been used.
18380 \begin_layout Enumerate
18384 \begin_inset Quotes eld
18392 \begin_inset Quotes erd
18396 \begin_inset Quotes eld
18404 \begin_inset Quotes erd
18410 \begin_layout Enumerate
18414 \begin_inset Quotes eld
18422 \begin_inset Quotes erd
18428 \begin_layout Enumerate
18432 \begin_inset Quotes eld
18440 \begin_inset Quotes erd
18443 to achieve an ellipsis.
18446 \begin_layout Enumerate
18449 Inter-word spacing (
18450 \begin_inset Quotes eld
18460 \begin_inset Quotes eld
18463 ) should perhaps be used.
18466 \begin_layout Enumerate
18469 Inter-sentence spacing (
18470 \begin_inset Quotes eld
18480 \begin_inset Quotes erd
18483 ) should perhaps be used.
18486 \begin_layout Enumerate
18489 Could not find argument for command.
18492 \begin_layout Enumerate
18496 \begin_inset Quotes eld
18504 \begin_inset Quotes erd
18510 \begin_layout Enumerate
18513 Math mode still on at end of LaTeX file.
18516 \begin_layout Enumerate
18520 \begin_inset Quotes eld
18528 \begin_inset Quotes erd
18531 doesn't match the number of
18532 \begin_inset Quotes eld
18540 \begin_inset Quotes erd
18546 \begin_layout Enumerate
18549 You should use either
18552 \begin_inset Quotes eld
18560 \begin_inset Quotes erd
18565 as an alternative to
18566 \begin_inset Quotes eld
18574 \begin_inset Quotes erd
18580 \begin_layout Enumerate
18587 " (ASCII 39) instead of "
18594 \begin_layout Enumerate
18597 User-specified pattern found.
18600 \begin_layout Enumerate
18603 This command might not be intended.
18606 \begin_layout Enumerate
18613 \begin_layout Enumerate
18631 \begin_layout Enumerate
18634 Delete this space to maintain correct page references.
18637 \begin_layout Enumerate
18641 You might wish to put this between a pair of
18642 \begin_inset Quotes eld
18650 \begin_inset Quotes erd
18656 \begin_layout Enumerate
18659 You ought to remove spaces in front of punctuation.
18662 \begin_layout Enumerate
18665 Could not execute LaTeX command.
18668 \begin_layout Enumerate
18677 in front of small punctuation.
18680 \begin_layout Enumerate
18688 may look prettier here.
18691 \begin_layout Enumerate
18695 Multiple spaces detected in output.
18698 \begin_layout Enumerate
18701 This text may be ignored.
18704 \begin_layout Enumerate
18710 \begin_inset Quotes eld
18715 to begin quotation, not
18722 \begin_layout Enumerate
18729 to end quotation, not
18732 \begin_inset Quotes eld
18740 \begin_layout Enumerate
18746 \begin_layout Enumerate
18749 You should perhaps use
18750 \begin_inset Quotes eld
18758 \begin_inset Quotes erd
18764 \begin_layout Enumerate
18767 You should put a space in front of/after parenthesis.
18770 \begin_layout Enumerate
18773 You should avoid spaces in front of/after parenthesis.
18776 \begin_layout Enumerate
18780 You should not use punctuation in front of/after quotes.
18783 \begin_layout Enumerate
18786 Double space found.
18789 \begin_layout Enumerate
18792 You should put punctuation outside inner/inside display math mode.
18795 \begin_layout Enumerate
18798 You ought to not use primitive TeX in LaTeX code.
18801 \begin_layout Enumerate
18804 You should remove spaces in front of
18805 \begin_inset Quotes eld
18813 \begin_inset Quotes erd
18819 \begin_layout Enumerate
18822 \begin_inset Quotes eld
18830 \begin_inset Quotes erd
18833 is normally not followed by
18834 \begin_inset Quotes eld
18842 \begin_inset Quotes erd
18848 \begin_layout Standard
18849 In later versions of LyX, we hope to provide a more complete interface to
18850 this tool (and it's smaller cousin
18854 ) to exploit the full power of it.
18855 But it's not exactly useless as it is now: go try it on one of your existing
18856 documents of a certain length and be surprised.
18859 \begin_layout Section
18860 Version Control in LyX
18863 \begin_layout Standard
18866 Lars Gullik Bjønnes
18873 \begin_layout Subsection
18877 \begin_layout Standard
18878 A friend of mine wanted to try LyX for a group project.
18879 When he didn't find support for version control or file locking, he dropped
18881 This angered me a bit, so I thought that I should at least make support
18882 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18883 This has been done.
18884 LyX now supports some of the most basic RCS/CVS/SVN commands.
18885 If you need something a bit more sophisticated you will have to do that
18886 manually in a terminal.
18889 \begin_layout Standard
18890 Before you begin to use the version control features in LyX, you should
18891 be familiar with RCS/CVS/SVN usage before start using it under LyX.
18892 Also note that CVS support
18893 \change_deleted 3 1288125350
18895 \change_inserted 3 1288125359
18897 \change_deleted 3 1288125367
18898 obsoloted by introducing
18900 subversion support so we advice using SVN instead.
18901 Good place to start with Subversion is SVN Book
18905 \begin_layout Plain Layout
18906 \begin_inset CommandInset href
18908 target "http://svnbook.red-bean.com/"
18918 In case of RCS you should read
18919 \begin_inset Quotes eld
18923 \begin_inset Quotes erd
18926 (a man file, read it with
18931 This file describes all the basic features of RCS.
18932 You should especially notice the comment about a RCS directory, and the
18933 notion of a master RCS file (the file ending in
18940 \begin_layout Standard
18941 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18942 package—no guarantees are made for older versions.
18943 Most of the log messages are not currently displayed after operations
18944 \change_deleted 3 1288125419
18946 \change_inserted 3 1288125419
18949 you can check them in Messages pane if unsure.
18952 \begin_layout Standard
18953 For introducing your own external commands consult vc-command in the manual
18957 \begin_layout Subsection
18958 RCS commands in LyX
18961 \begin_layout Standard
18962 The following sections describe the RCS commands supported by LyX.
18963 You can find them in the
18965 File\SpecialChar \menuseparator
18967 \begin_inset space ~
18973 LyX was tested against RCS 5.7.
18976 \begin_layout Subsubsection
18982 \begin_layout Standard
18983 If your document is not under revision control, this is the only item shown
18985 And if it is under revision control, the
18989 item is not visible.
18993 \begin_layout Standard
18994 This command registers your document with RCS (unless you are under the
18995 directory managed by CVS)\SpecialChar \@.
18996 You are asked interactively to supply an initial
18997 description of the document.
18998 The document is now set in Read-Only mode and you have to
19001 \begin_inset space ~
19005 \begin_inset space ~
19009 \begin_inset space ~
19014 , before making any changes to it.
19015 A document under revision control has a
19016 \begin_inset Quotes eld
19019 [RCS:<version> <locker>]
19020 \begin_inset Quotes erd
19023 item tagged to the filename in the minibuffer.
19026 \begin_layout Standard
19027 RCS command that is run:
19029 ci -q -u -i -t-"<initial description>" <file-name>
19032 \begin_layout Standard
19037 to understand the switches.
19041 \begin_layout Subsubsection
19047 \begin_layout Standard
19048 When you are finished editing a file, you check in your changes.
19049 When you do this, you are asked for a description of the changes.
19050 This is stored in the history log.
19051 The version number is bumped, your changes are applied to the master RCS
19052 file, the document is unlocked and set to Read-Only mode.
19056 \begin_layout Standard
19059 ci -q -u -m"<description>" <file-name>
19062 \begin_layout Subsubsection
19068 \begin_layout Standard
19069 By doing this you lock the document so that only you can edit it.
19070 This will also make the document Read-Write only for you.
19071 You will usually continue editing for a while and when you are finished
19072 you check in your changes.
19073 The status line is changed to reflect that you have locked the file.
19077 \begin_layout Standard
19080 co -q -l <file-name>
19083 \begin_layout Subsubsection
19086 Revert To Repository Version
19089 \begin_layout Standard
19090 This will discard all changes made to the document since the last check
19092 You get a warning before changes are discarded.
19095 \begin_layout Standard
19098 co -f -u<version> <file-name>
19101 \begin_layout Subsubsection
19107 \begin_layout Standard
19108 This makes as if the last check in never happened.
19109 No changes are made to the document loaded into LyX, but the last version
19110 is removed from the master RCS file.
19114 \begin_layout Standard
19117 rcs -o<version> <file-name>
19120 \begin_layout Subsubsection
19126 \begin_layout Standard
19127 This shows the complete history of the RCS document.
19132 is shown in a browser.
19140 \begin_layout Subsubsection
19144 \begin_layout Standard
19145 LyX supports RCS version number information (only), see
19146 \begin_inset CommandInset ref
19148 reference "sub:VCS-Revision-Information"
19155 \begin_layout Subsection
19156 CVS commands in LyX
19159 \begin_layout Standard
19161 \change_inserted 3 1288247612
19165 \change_inserted 3 1288247626
19169 \change_deleted 3 1288243981
19173 You can find the commands in the
19175 File\SpecialChar \menuseparator
19177 \begin_inset space ~
19184 \change_inserted 3 1288244251
19185 The version control system SVN is more powerful
19186 \change_deleted 3 1288244024
19187 Focus of the development moved to SVN support
19189 , so please use it instead of CVS if possible.
19192 \begin_layout Subsubsection
19194 \change_inserted 3 1288247508
19200 \begin_layout Standard
19202 \change_inserted 3 1288250722
19203 If you start from scratch with CVS you have to create your repository and
19204 checkout the working copy with external tools.
19205 If you're using a client-server setup you may need to login before doing
19206 the first repository checkout.
19209 \begin_layout Standard
19211 \change_inserted 3 1288334713
19212 If your documents are under revision control and others are using the same
19213 repository problems arise when different changes to the same document at
19214 the same location happen.
19215 Standard CVS repositories doesn't operate with a file locking mechanism.
19216 This may be surprising, but conflicts only occur if people disagree on
19217 the proper content of the same part of a document.
19218 So, if co-workers are used to communicate regularly, these conflicts occur
19220 If they don't communicate they have a fundamental problem anyway.
19221 Nevertheless some people like to work with so called
19222 \begin_inset Quotes eld
19226 \begin_inset Quotes erd
19230 If they do so the working copy of all files is readonly when checked out
19231 first and the user starts editing after using a special command to make
19232 the working copy writable.
19233 When the changes are checked in the working copy returns to readonly state.
19234 With LyX one has to edit the
19235 \begin_inset Flex Code
19238 \begin_layout Plain Layout
19240 \change_inserted 3 1288249115
19248 file and add the line
19249 \begin_inset Flex Code
19252 \begin_layout Plain Layout
19254 \change_inserted 3 1288249133
19262 to work with reserved checkouts.
19263 The benefit is the possibility to see who is using a writable copy of some
19265 It's not guaranteed only one user makes a copy writable.
19268 \begin_layout Standard
19270 \change_inserted 3 1288335184
19271 LyX tries to guess if you're using reserved or non-reserved checkouts.
19272 If your working copy is readonly or it is writable and an additional copy
19273 of your document exists in the CVS/Base sub-directory a reserved otherwise
19274 a non-reserved checkout is assumed.
19275 When a reserved checkout is detected you have to use
19276 \begin_inset Flex MenuItem
19279 \begin_layout Plain Layout
19281 \change_inserted 3 1288250009
19289 to make your working copy writable if it's readonly.
19291 \begin_inset Flex MenuItem
19294 \begin_layout Plain Layout
19296 \change_inserted 3 1288250087
19304 operation is possible and that makes your working copy readonly again after
19305 transferring your changes to the repository.
19310 \begin_layout Standard
19312 \change_inserted 3 1288334864
19313 More information about CVS can be found here
19314 \begin_inset Flex URL
19317 \begin_layout Plain Layout
19319 \change_inserted 3 1288247651
19321 http://www.nongnu.org/cvs
19327 \begin_inset Flex URL
19330 \begin_layout Plain Layout
19332 \change_inserted 3 1288249216
19334 http://ximbiot.com/cvs
19344 \begin_layout Standard
19346 \change_inserted 3 1288334912
19351 to understand the sub-commands and the switches mentioned below.
19354 \begin_layout Subsubsection
19360 \begin_layout Standard
19361 If your document is not under revision control, this is the only item shown
19363 And if it is under revision control, the
19370 item is not visible.
19374 \begin_layout Standard
19375 This command registers in CVS your document
19376 \change_deleted 3 1288340087
19378 \change_inserted 3 1288340119
19382 \begin_inset Flex Strong
19385 \begin_layout Plain Layout
19387 \change_inserted 3 1288340119
19401 in case you have already the documents directory under CVS control (in
19407 This means you have to
19408 \change_inserted 3 1288244315
19411 checkout the archive by yourself
19412 \change_inserted 3 1288250891
19413 using external tools
19417 \change_inserted 3 1288340303
19418 (In case you forget that step LyX registers the document with RCS.)
19423 \begin_layout Standard
19424 Then you are asked interactively to supply an initial description of the
19426 Don't forget that registered file is not yet
19427 \change_deleted 3 1288335206
19429 \change_inserted 3 1288335207
19435 \begin_layout Standard
19436 CVS command that is run:
19439 \change_deleted 3 1288125821
19441 \begin_inset Quotes erd
19445 \change_inserted 3 1288125838
19449 \change_deleted 3 1288125821
19451 \begin_inset Quotes eld
19455 \change_inserted 3 1288125844
19459 \change_deleted 3 1288125847
19461 \begin_inset Quotes erd
19465 \change_inserted 3 1288125847
19471 \begin_layout Standard
19473 \change_deleted 3 1288334858
19478 to understand the switches.
19479 \change_inserted 3 1288333847
19483 \begin_layout Standard
19485 \change_inserted 3 1288334097
19490 above and for all other CVS commands is an abbreviation for
19491 \begin_inset Quotes eld
19494 change the current working directory to file location and use the file name
19495 without path component as argument
19496 \begin_inset Quotes erd
19501 \change_deleted 3 1288333847
19507 \begin_layout Subsubsection
19513 \begin_layout Standard
19514 When you are finished editing a file, you commit your changes.
19516 \change_inserted 3 1288250244
19517 and you had changed the document
19519 , you are asked for a description of the changes.
19520 After that changes are
19521 \change_deleted 3 1288335277
19523 \change_inserted 3 1288335294
19524 written to the repository
19528 \change_inserted 3 1288339925
19529 In case you didn't change the document and a reserved checkout is detected
19530 the reservation made on
19531 \begin_inset Flex MenuItem
19534 \begin_layout Plain Layout
19536 \change_inserted 3 1288250359
19549 \begin_layout Labeling
19550 \labelwidthstring 00.00.0000
19552 \change_inserted 3 1288250487
19554 \begin_inset space ~
19558 \begin_inset space ~
19562 \begin_inset Newline newline
19566 \begin_inset Flex Code
19569 \begin_layout Plain Layout
19571 \change_inserted 3 1288250469
19574 -q commit -m"<description>" "<file-name>"
19580 \begin_inset Newline newline
19584 \begin_inset Flex Code
19587 \begin_layout Plain Layout
19589 \change_inserted 3 1288250960
19600 \change_deleted 3 1288250529
19603 cvs -q commit -m"<description>" "<file-name>"
19608 \begin_layout Subsubsection
19610 \change_inserted 3 1288246619
19616 \begin_layout Standard
19618 \change_inserted 3 1288249364
19619 When you are sharing a repository with others, you may have to incorporate
19620 their changes into your working copy.
19623 \begin_layout Standard
19625 \change_inserted 3 1288250585
19628 cvs -q update "<file-name>"
19631 \begin_layout Standard
19633 \change_inserted 3 1288334180
19634 If a readonly checkout is detected the working copy is made writable and
19638 \begin_layout Standard
19640 \change_inserted 3 1288250685
19643 cvs -q edit "<file-name>"
19646 \begin_layout Subsubsection
19649 Revert To Repository Version
19652 \begin_layout Standard
19653 This will discard all changes made to the document since the last check
19655 You get a warning before changes are discarded.
19656 Firstly the file is deleted, secondly CVS update command is run.
19659 \begin_layout Standard
19663 \change_inserted 3 1288246762
19667 \change_deleted 3 1288125856
19669 \begin_inset Quotes eld
19673 \change_inserted 3 1288125856
19677 \change_deleted 3 1288125856
19679 \begin_inset Quotes erd
19683 \change_inserted 3 1288251381
19687 \begin_layout Standard
19689 \change_inserted 3 1288334211
19690 If a reserved checkout is detected and the working copy has no changes only
19691 the reservation is undone.
19694 \begin_layout Standard
19696 \change_inserted 3 1288251440
19699 cvs -q unedit "<file-name>"
19704 \begin_layout Subsubsection
19706 \change_inserted 3 1288126016
19707 Update of the local directory checkout from repository
19710 \begin_layout Standard
19712 \change_inserted 3 1288339359
19713 Once your documents gets more complex, containing sub-documents and pictures,
19715 \begin_inset Flex Code
19718 \begin_layout Plain Layout
19720 \change_inserted 3 1288126016
19726 files and so on using version control becomes more complicated.
19727 LyX supports updating the whole tree in which resides the document.
19728 This become especially useful once you cooperate with people which neither
19729 have detailed knowledge about CVS usage nor they have ambition to commit
19730 additional material to the repository.
19731 You have to organize the files structure so that all external files are
19732 in the same directory or subdirectories of the document.
19733 It's good practice anyway to store multipart documents in an extra directory.
19738 \begin_layout Standard
19740 \change_inserted 3 1288341358
19742 \begin_inset Flex Code
19745 \begin_layout Plain Layout
19747 \change_inserted 3 1288126016
19748 Update local directory from repository
19753 command updates the whole directory.
19754 If local changes are detected user is warned before update starts.
19755 In case of merge conflicts both versions of the conflicting document parts
19756 are placed in the final document.
19757 You have to review and correct the result of the merge.
19758 You'll find the conflicts enclosed in pairs of
19759 \begin_inset Flex Code
19762 \begin_layout Plain Layout
19764 \change_inserted 3 1288341002
19773 \begin_inset Flex Code
19776 \begin_layout Plain Layout
19778 \change_inserted 3 1288340987
19787 \begin_inset Flex Code
19790 \begin_layout Plain Layout
19792 \change_inserted 3 1288341043
19801 The first part is your version as before the update operation with the
19802 document name prepended.
19803 The second one is the repository version with the version number after
19805 \begin_inset Flex Code
19808 \begin_layout Plain Layout
19810 \change_inserted 3 1288341281
19823 \begin_layout Labeling
19824 \labelwidthstring 00.00.0000
19826 \change_inserted 3 1288340598
19828 \begin_inset space ~
19832 \begin_inset space ~
19836 \begin_inset Newline newline
19840 \begin_inset Flex Code
19843 \begin_layout Plain Layout
19845 \change_inserted 3 1288334066
19855 (Ask if changes are detected.)
19856 \begin_inset Newline newline
19860 \begin_inset Flex Code
19863 \begin_layout Plain Layout
19865 \change_inserted 3 1288334063
19866 cd $path; cvs -q update
19878 \begin_layout Standard
19880 \change_inserted 3 1288126016
19882 \begin_inset Flex Code
19885 \begin_layout Plain Layout
19887 \change_inserted 3 1288126016
19893 stands for the path to the document.
19896 \begin_layout Subsubsection
19902 \begin_layout Standard
19903 This shows the complete history of the CVS document.
19907 \change_deleted 3 1288125861
19909 \begin_inset Quotes eld
19913 \change_inserted 3 1288125861
19917 \change_deleted 3 1288125864
19919 \begin_inset Quotes erd
19923 \change_inserted 3 1288125864
19928 is shown in a browser.
19931 \begin_layout Subsection
19932 SVN commands in LyX
19935 \begin_layout Standard
19936 SVN is now partially supported by LyX.
19937 You can find the commands in the
19939 File\SpecialChar \menuseparator
19941 \begin_inset space ~
19947 Please note that if you use password protected access to repository via
19948 ssh, you will be asked in terminal window.
19949 LyX was tested against SVN 1.5 and 1.6
19953 \begin_layout Plain Layout
19954 Most of the commands will work with 1.4 too, see
19955 \begin_inset CommandInset ref
19957 reference "sub:SVN-Repo-Update"
19969 \begin_layout Subsubsection
19975 \begin_layout Standard
19976 If your document is not under revision control, this is the only item shown
19978 And if it is under revision control, the
19985 item is not visible.
19989 \begin_layout Standard
19990 This command registers in SVN your document ONLY in case you have already
19991 the documents directory under SVN control (in particular
19996 This means you have to checkout the archive by yourself.
20000 \begin_layout Standard
20001 Then you are asked interactively to supply an initial description of the
20003 Don't forget that registered file is not yet commited.
20006 \begin_layout Standard
20007 SVN command that is run:
20010 \begin_inset Quotes eld
20014 \begin_inset Quotes erd
20020 \begin_layout Standard
20025 to understand the switches.
20029 \begin_layout Subsubsection
20035 \begin_layout Standard
20036 When you are finished editing a file, you commit your changes.
20037 When you do this, you are asked for a description of the changes.
20038 After that changes are commited.
20041 \begin_layout Standard
20046 \begin_layout Plain Layout
20047 In case locking is not enabled.
20049 \begin_inset CommandInset ref
20051 reference "subsec:SVN-File-Locking"
20062 svn commit -q -m"<description>" <file-name>
20065 \begin_layout Subsubsection
20071 \begin_layout Standard
20072 Updates the changes of this file from the repository.
20073 Be sure you understand SVN merging and conflicts resolving before using
20074 this function, because all conflicts has to be resolved manually by you!
20077 \begin_layout Standard
20082 \begin_layout Plain Layout
20090 svn update --non-interactive
20091 \begin_inset Quotes eld
20095 \begin_inset Quotes erd
20101 \begin_layout Subsubsection
20104 Revert To Repository Version
20107 \begin_layout Standard
20108 This will discard all changes made to the document since the last check
20110 You get a warning before changes are discarded.
20114 \begin_layout Standard
20118 \begin_inset Quotes eld
20122 \begin_inset Quotes erd
20128 \begin_layout Subsubsection
20129 \begin_inset CommandInset label
20131 name "sub:SVN-Repo-Update"
20135 Update of the local directory checkout from repository
20139 \begin_layout Plain Layout
20140 Note that this command will work only with subversion
20141 \begin_inset Formula $\geqq1.5$
20152 \begin_layout Standard
20153 All the commands above have one shortcomming - they deal with the current
20155 Once your document contains pictures, includes external
20156 \begin_inset Flex Code
20159 \begin_layout Plain Layout
20165 files and so on administration becomes more complicated.
20166 LyX now supports updating the whole tree in which resides the document
20170 \begin_layout Plain Layout
20171 One need to organize the files structure so that all external files are
20172 in the same directory or subdirectories of the document.
20179 This become especially useful once you cooperate with people which neither
20180 know about subversion management nor they have ambition to commit additional
20181 material to the repository.
20185 \begin_layout Standard
20186 \begin_inset Flex Code
20189 \begin_layout Plain Layout
20190 Update local directory from repository
20195 command updates the whole directory and in case of merge conflicts local
20196 version of the files are left, so no unintended data loss occurs.
20197 If local changes are detected user is warned before update starts.
20200 \begin_layout Labeling
20201 \labelwidthstring 00.00.0000
20203 \begin_inset space ~
20207 \begin_inset space ~
20211 \begin_inset Newline newline
20215 \begin_inset Flex Code
20218 \begin_layout Plain Layout
20224 (Ask if changes are detected.)
20225 \begin_inset Newline newline
20229 \begin_inset Flex Code
20232 \begin_layout Plain Layout
20233 svn update --accept mine-full $path
20241 \begin_layout Standard
20243 \begin_inset Flex Code
20246 \begin_layout Plain Layout
20252 stands for the path to the document.
20255 \begin_layout Subsubsection
20261 \begin_layout Standard
20262 This shows the complete history of the SVN document.
20266 \begin_inset Quotes eld
20270 \begin_inset Quotes erd
20275 is shown in a browser.
20278 \begin_layout Subsubsection
20280 \begin_inset CommandInset label
20282 name "subsec:SVN-File-Locking"
20289 \begin_layout Standard
20290 The file exchange through various revision control systems brings the problem
20291 of merge conflicts in case two different users try to edit the same (parts
20293 When such a conflict happens it needs manual resolving and one reasonable
20294 alternative is to provide some kind of locking mechanism, which guarantees
20295 that only one user is allowed to edit file at the given time.
20298 \begin_layout Standard
20299 SVN has two such mechanisms to provide mutual exclusivity for file access
20300 - locks and automatic setting of write permissions (see sec.
20302 \begin_inset CommandInset ref
20304 reference "subsec:Automatical-Locking-Property"
20309 \begin_inset Flex Code
20312 \begin_layout Plain Layout
20322 \begin_layout Plain Layout
20323 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20329 If this property is detected for a given document LyX starts to use SVN
20330 locks for document editing automatically and the whole check-in/out mechanism
20331 switches to the same regimen as for RCS.
20332 This in particular means there are two different modes of file use in LyX:
20335 \begin_layout Itemize
20337 The loaded file is in the read-only mode.
20338 For editing on needs to check-out.
20343 consists of updating from the repository and gaining write lock.
20344 If the lock is not possible to obtain, we remain in unlocked state.
20347 \begin_layout Itemize
20349 The loaded file is in the 'normal' edit mode.
20350 No other user is allowed to edit the file.
20355 consists of commiting changes and releasing write-lock.
20356 If no changes have been made to the document, no commit will be produced
20360 \begin_layout Plain Layout
20361 Don't be puzzled by the fact that you will be asked for commit message anyway.
20366 and only the write-lock will be released.
20369 \begin_layout Standard
20373 \begin_layout Labeling
20374 \labelwidthstring 00.00.0000
20377 svn commit -q -m"<description>" "<file-name>"
20378 \begin_inset Newline newline
20381 svn unlock "<file-name>"
20384 \begin_layout Labeling
20385 \labelwidthstring 00.00.0000
20388 svn update "<file-name>"
20389 \begin_inset Newline newline
20392 svn lock "<file-name>"
20395 \begin_layout Subsubsection
20398 \begin_inset CommandInset label
20400 name "subsec:Automatical-Locking-Property"
20406 Automatic Locking Property
20409 \begin_layout Standard
20410 The above mentioned automatic setting of write permissions of the .lyx file
20416 ile\SpecialChar \menuseparator
20422 \begin_inset space ~
20425 Control\SpecialChar \menuseparator
20430 oggle locking property
20433 This command is active only when the file is not locked on the svn server
20435 you need to check-out before proceeding).
20438 \begin_layout Labeling
20439 \labelwidthstring 00.00.0000
20441 \begin_inset space ~
20447 \begin_layout Labeling
20448 \labelwidthstring 00.00.0000
20451 svn propset svn:needs-lock ON "<file-name>"
20454 \begin_layout Labeling
20455 \labelwidthstring 00.00.0000
20458 svn propdel svn:needs-lock "<file-name>"
20461 \begin_layout Subsubsection
20462 \begin_inset CommandInset label
20464 name "sub:VCS-Revision-Information"
20468 Revision Information in Documents
20471 \begin_layout Standard
20472 There are more possibilities how to activate revision information in our
20476 \begin_layout Itemize
20477 LyX supports directly:
20481 \begin_layout Itemize
20482 tree revision information (
20483 \begin_inset Flex Code
20486 \begin_layout Plain Layout
20493 The result is the output of the
20494 \begin_inset Flex Code
20497 \begin_layout Plain Layout
20503 command, the following table gives you an idea, how to read the results.
20506 \begin_layout Standard
20508 \begin_inset Tabular
20509 <lyxtabular version="3" rows="6" columns="2">
20510 <features tabularvalignment="middle">
20511 <column alignment="center" valignment="top" width="0">
20512 <column alignment="center" valignment="top" width="0">
20514 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20517 \begin_layout Plain Layout
20523 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20526 \begin_layout Plain Layout
20534 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20537 \begin_layout Plain Layout
20543 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20546 \begin_layout Plain Layout
20547 mixed revision working copy
20554 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20557 \begin_layout Plain Layout
20563 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20566 \begin_layout Plain Layout
20567 modified working copy
20574 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20577 \begin_layout Plain Layout
20583 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20586 \begin_layout Plain Layout
20587 switched working copy
20594 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20597 \begin_layout Plain Layout
20603 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20606 \begin_layout Plain Layout
20607 partial working copy, from a sparse checkout
20614 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20617 \begin_layout Plain Layout
20623 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20626 \begin_layout Plain Layout
20627 mixed revision, modified, switched working copy
20640 \begin_layout Itemize
20641 file revision information.
20642 The result comes from parsing the output of
20643 \begin_inset Flex Code
20646 \begin_layout Plain Layout
20648 \begin_inset space ~
20652 \begin_inset space ~
20656 \begin_inset space ~
20665 Supported flags are:
20669 \begin_layout Itemize
20670 version number of the last commit (
20671 \begin_inset Flex Code
20674 \begin_layout Plain Layout
20683 \begin_layout Itemize
20684 author of the last commit (
20685 \begin_inset Flex Code
20688 \begin_layout Plain Layout
20697 \begin_layout Itemize
20698 date of the last commit (
20699 \begin_inset Flex Code
20702 \begin_layout Plain Layout
20711 \begin_layout Itemize
20712 time of the last commit (
20713 \begin_inset Flex Code
20716 \begin_layout Plain Layout
20726 \begin_layout Standard
20727 You can obtain this info via InsetInfo (e.g.
20729 \begin_inset Flex Code
20732 \begin_layout Plain Layout
20733 info-insert buffer vcs-date
20739 The information will be available only when you have the file stored under
20740 svn managment (i.e.
20742 \begin_inset Flex Code
20745 \begin_layout Plain Layout
20751 directory is available with your document).
20755 \begin_layout Itemize
20756 Another---a hacking one---possibility is to use svn keywords
20760 \begin_layout Plain Layout
20761 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20767 In short -- you set file keywords property (e.g.
20770 svn propset svn:keywords 'Rev' file.lyx
20772 ) and then paste keyword TeX code
20776 \begin_layout Plain Layout
20777 This is an easy way how to ensure that LyX won't break the line in the middle
20783 tag in your document (e.g.
20788 \begin_layout Plain Layout
20796 This way svn client will automatically substitute revision number (e.g.
20801 \begin_layout Plain Layout
20808 ) after each update and commit.
20809 There are more problems with this approach.
20810 Firstly, the '$' character is used in TeX world for math equations, so
20811 any occurence of math formula
20812 \begin_inset Formula $Rev$
20816 \begin_inset Formula $Rev:59$
20819 in your LyX document.
20820 Similarly for other keywords like Id, Date, Author, etc.
20821 Secondly svn output is dependent on your locales, so its very easy that
20822 svn would produce some problematic strings once Date is used.
20823 Thirdly you get the whole 'Rev: 59' string in your document instead of
20825 Until subversion implements user's custom keywords it will be hard to use
20826 this approach reliably or let LyX to support it directly.
20829 \begin_layout Subsection
20830 SVN and Windows Environment
20833 \begin_layout Quote
20834 My inclination is to say that if the user cannot figure out the command
20835 line operations on their own fairly quickly, they would be well advised
20836 to use TortoiseSVN.
20842 \begin_layout Subsubsection
20846 \begin_layout Standard
20847 In addition to installing LyX, and having access to a Subversion repository,
20848 the user will need to install the Subversion client program.
20849 A Windows installer for the client program is available from
20850 \begin_inset CommandInset href
20853 target "http://www.collab.net/nonav/downloads/subversion/"
20858 The user may also want to install
20859 \begin_inset CommandInset href
20862 target "http://tortoisesvn.tigris.org/"
20866 , which integrates Subversion operations into the context (rightclick) menu
20867 of Windows Explorer.
20868 Operations done outside LyX will typically be more convenient using the
20869 Explorer context menu.
20870 Note that TortoiseSVN is not a replacement for the client program, which
20871 is what LyX itself will use.
20874 \begin_layout Subsubsection
20875 Bringing a document under Subversion control
20878 \begin_layout Standard
20879 Before a LyX document can be brought under version control in Subversion,
20880 its parent directory needs to be under version control.
20881 If the document is being added to a project already in the repository,
20882 this is accomplished by checking the project out to the directory where
20883 the new document will be placed.
20884 If the project itself is not yet under version control (for instance, if
20885 this document starts a new project), the directory must be imported into
20887 This is done outside LyX.
20888 Both import and checkout are easily accomplished from the Explorer context
20889 menu using TortoiseSVN, or alternatively can be done using the command
20890 line client at a DOS prompt.
20891 The procedure for importing the project using TortoiseSVN is described
20892 below, assuming an existing repository and a new project being started
20900 For information on using the Subversion client program, run
20907 \begin_layout Enumerate
20914 in Windows Explorer, right click it, and select
20916 TortoiseSVN > Repo-browser
20919 If necessary, adjust the URL for the repository, then click OK.
20922 \begin_layout Enumerate
20923 Right click the level of the repository under which you want to place the
20924 new project folder (typically the top level) and click
20926 Create folder\SpecialChar \ldots{}
20929 Supply a name for the project folder and click OK.
20930 Add a message for the log file if desired, then click OK again.
20931 The new project folder should appear in the repository.
20932 Finally, click OK again to exit the repository browser.
20935 \begin_layout Enumerate
20936 Once again right click
20942 , this time selecting SVN Checkout\SpecialChar \ldots{}
20943 Select the URL of the project folder
20944 you just created in the repository, and set the checkout directory to
20952 You will be warned about a non-empty folder; click OK to proceed.
20953 You should now have a
20964 \begin_layout Enumerate
20965 Create or open your document in LyX and click
20970 ile\SpecialChar \menuseparator
20976 \begin_inset space ~
20979 Control\SpecialChar \menuseparator
20987 Add a log message and click OK to commit the document to version control.
20990 \begin_layout Standard
20991 From this point onward, you should have full functionality in the
20996 ile\SpecialChar \menuseparator
21002 \begin_inset space ~
21008 You also have the option of checking the document in and out, viewing its
21010 using the TortoiseSVN context menu in Windows Explorer or the Subversion
21011 client program from a command prompt.
21014 \begin_layout Subsubsection
21016 \change_inserted 3 1288376976
21019 nel used with SVN under Windows
21022 \begin_layout Standard
21023 Compared with Linux setting up svn client to communicate over ssh under
21024 Windows is a rather troublesome task.
21025 We will at least offer some hints how to setup the client side but prior
21026 knowledge about ssh and the Windows command line is needed, also be prepared
21027 for a great deal of frustration\SpecialChar \ldots{}
21031 \begin_layout Enumerate
21032 Get a svn client for windows, as described in the previous sections.
21033 When it is a fresh install run some svn command (e.g.
21035 \begin_inset Flex Code
21038 \begin_layout Plain Layout
21044 ) to create config files, which you will need to change later on.
21047 \begin_layout Enumerate
21048 Choose a ssh client for Windows.
21049 There are several possibilities, we will use the one from Putty tools
21053 \begin_layout Plain Layout
21054 \begin_inset Flex URL
21057 \begin_layout Plain Layout
21059 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21070 You will need to set the connection up so that the client doesn't ask for
21071 any password from you.
21072 To keep things easy we will use only keys without any additional password
21077 \begin_layout Enumerate
21079 \begin_inset Flex Code
21082 \begin_layout Plain Layout
21089 Save your private .ppk key file and put the public one on the server side.
21090 If the SVN server runs on Linux, note that the format of the public key
21091 is not compatible with Linux openssh and you will need to direcly copy-paste
21094 Public key for pasting into OpenSSH authorized_keys file
21096 :” edit field into the server's
21097 \begin_inset Flex Code
21100 \begin_layout Plain Layout
21101 ~/.ssh/authorized_keys
21107 \begin_inset Flex Code
21110 \begin_layout Plain Layout
21119 \begin_layout Enumerate
21121 \begin_inset Flex Code
21124 \begin_layout Plain Layout
21131 In the SVN config file
21135 \begin_layout Plain Layout
21136 Exact path depends on Windows version, usually somewhere around
21137 \begin_inset Flex Code
21140 \begin_layout Plain Layout
21143 Documents and Settings
21157 \begin_inset Flex Code
21160 \begin_layout Plain Layout
21175 , section [tunnels], setup ssh command, e.g.
21177 \begin_inset Flex Code
21180 \begin_layout Plain Layout
21181 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21190 \begin_layout Plain Layout
21191 It will usually take a lot of time to get exact command right and it depends
21193 For example do not have some remote server saved as a default session in
21195 If things fail, try to connect via plink without SVN first.
21204 \begin_layout Enumerate
21205 Checkout the SVN archive, e.g.
21207 \begin_inset Flex Code
21210 \begin_layout Plain Layout
21211 svn co svn+ssh://user@server/repository_path
21219 \begin_layout Subsubsection
21220 End-of-Line Conversions
21223 \begin_layout Standard
21224 When the collsraborators are mixing Linux and Windows environments, LyX
21225 will use different line endings inside the .lyx files.
21226 This is not a problem as far as LyX functionality is concerned, but the
21227 commit diffs will be huge and merge-conflicts prone.
21228 Fortunately SVN itself knows
21232 \begin_layout Plain Layout
21233 \begin_inset Flex URL
21236 \begin_layout Plain Layout
21238 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21248 how to deal with CR/LF problems when switching .lyx files to the
21249 \begin_inset Flex Code
21252 \begin_layout Plain Layout
21262 \begin_layout Plain Layout
21264 \begin_inset Flex Code
21267 \begin_layout Plain Layout
21268 svn propset svn:eol-style native FILE_NAME
21281 \begin_layout Subsection
21285 \begin_layout Standard
21286 With the recent addition of the vc-command function LyX power users are
21287 allowed to create their own commands for revision control.
21290 \begin_layout Standard
21291 As an example you can see how two TortoiseSVN commands could be integrated
21295 \begin_layout Description
21297 \begin_inset Flex Code
21300 \begin_layout Plain Layout
21301 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21309 \begin_layout Description
21311 \begin_inset Flex Code
21314 \begin_layout Plain Layout
21315 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21323 \begin_layout Subsection
21324 Version control and Document comparison
21327 \begin_layout Standard
21328 One of the typical uses of version control is to inspect the changes between
21329 revisions, usually by creating
21330 \begin_inset Flex Code
21333 \begin_layout Plain Layout
21340 While this is useful for plain text files, it is much less useful in the
21341 case of LyX files, which have more complicated structure.
21342 Hence we provide binding to the Document comparison feature.
21343 They are two ways of calling this feature - either by direct call of
21344 \begin_inset Flex Code
21347 \begin_layout Plain Layout
21353 LyX function (for details see LyX functions manual) or by icon/menu item
21355 \begin_inset Flex MenuItem
21358 \begin_layout Plain Layout
21359 Compare with older revision...
21365 One can either compare two chosen revisions of the document or he can simply
21366 compare the current version of edited text with older revisions (where
21368 \begin_inset Flex MenuItem
21371 \begin_layout Plain Layout
21377 ' revisions back means comparison of the edited file with last commited
21382 \begin_layout Standard
21383 This feature is supported for SVN and RCS though due to the more complicated
21384 versioning scheme of RCS there is a constraint -- when addressing the revisions
21385 in dialog, numbers always point to the last number in RCS revision number,
21390 \begin_layout Section
21391 Literate Programming
21394 \begin_layout Standard
21399 (kayvan@sylvan.com)
21403 original documentation written by
21405 Edmar Wienskoski Jr.
21408 (edmar-w-jr@technologist.com)
21411 \begin_layout Subsection
21415 \begin_layout Standard
21416 The main purpose of this documentation is to show you how to use LyX for
21417 literate programming, where it is assumed that you are familiar with this
21418 programming technique, and know what
21419 \begin_inset Quotes eld
21423 \begin_inset Quotes erd
21427 \begin_inset Quotes eld
21431 \begin_inset Quotes erd
21435 If that is not the case, please follow the web links provided in the following
21437 There is a lot of good documentation out there covering old development
21438 history to the latest tools tips.
21441 \begin_layout Standard
21442 It is also assumed that you are familiar with LyX itself to a point that
21443 you are comfortable changing your LyX preferences, and X resources file.
21444 If that is not the case please refer to other LyX documentation to cover
21445 your specific needs.
21448 \begin_layout Subsection
21449 Literate Programming
21452 \begin_layout Standard
21453 From the Literate Programming FAQ:
21456 \begin_layout Quotation
21457 Literate programming is the combination of documentation and source together
21458 in a fashion suited for reading by human beings.
21459 In fact, literate programs should be enjoyable reading, even inviting!
21460 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21461 and documentation in a single file.
21462 Literate programming tools then parse the file to produce either readable
21463 documentation or compilable source.
21464 The WEB style of literate programming was created by D.
21465 \begin_inset space \thinspace{}
21469 Knuth during the development of his TeX typesetting software.
21473 \begin_layout Standard
21474 Another excerpt says:
21477 \begin_layout Quotation
21480 How is literate programming different from verbose commenting?
21483 \begin_layout Quotation
21484 There are three distinguishing characteristics.
21485 In order of importance, they are:
21489 \begin_layout Itemize
21490 flexible order of elaboration
21493 \begin_layout Itemize
21494 automatic support for browsing
21497 \begin_layout Itemize
21498 typeset documentation, especially diagrams and mathematics
21502 \begin_layout Standard
21503 Now that I sparked your curiosity, take a look in the references.
21506 \begin_layout Subsubsection
21510 \begin_layout Standard
21511 The complete Literate Programming FAQ can be found at:
21514 \begin_layout Quote
21515 Literate Programming FAQ
21516 \begin_inset Flex URL
21519 \begin_layout Plain Layout
21521 http://www.literateprogramming.com/lpfaq.pdf
21529 \begin_layout Standard
21530 The FAQ lists 23 (twenty three!) different literate programming tools.
21531 Where some are specialized or
21532 \begin_inset Quotes eld
21536 \begin_inset Quotes erd
21539 for particular programming languages, while other have general scope.
21544 for my own use for several reasons:
21547 \begin_layout Itemize
21548 It can generate the documentation either in LaTeX or HTML.
21551 \begin_layout Itemize
21552 It has a open architecture, i.
21553 \begin_inset space \thinspace{}
21557 \begin_inset space \space{}
21560 it is easy to plug in new filters and to perform special processing that
21565 \begin_layout Itemize
21566 There is a good selection of filters available already (the HTML is one
21570 \begin_layout Itemize
21574 \begin_layout Standard
21575 The Noweb web page can be found at:
21578 \begin_layout Quote
21580 \begin_inset Flex URL
21583 \begin_layout Plain Layout
21585 http://www.cs.virginia.edu/~nr/noweb/
21593 \begin_layout Standard
21594 Starting from there you can reach many other interesting links and even
21595 some literate program examples.
21598 \begin_layout Subsection
21599 LyX and Literate Programming
21602 \begin_layout Standard
21603 The LyX support for Literate Programming is provided by using the generic
21604 LyX converters mechanism.
21605 This support is provided in a
21606 \begin_inset Quotes eld
21610 \begin_inset Quotes erd
21614 \begin_inset space \thinspace{}
21618 \begin_inset space \space{}
21621 you will be able to use this new LyX feature with some other literate programmin
21622 g tool of your choice by just changing your LyX preferences.
21625 \begin_layout Subsubsection
21626 Generating documents and code (weaving and tangling)
21629 \begin_layout Paragraph
21630 Selecting the document class
21633 \begin_layout Standard
21634 If you have installed Noweb and LyX successfully, whenever you open a new
21635 document or try to change the document class of an existing one, you will
21636 find that there are three new document classes available:
21639 \begin_layout Itemize
21643 \begin_layout Itemize
21647 \begin_layout Itemize
21651 \begin_layout Standard
21652 You must select one of them to create your literate documents from.
21656 \begin_layout Standard
21657 Note that literate documents are not limited to these three classes.
21658 New classes can be generated from other styles like letter or in combination
21659 with other class variations like Article (AMS).
21660 If you have special needs that cannot be covered by one of the existing
21661 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21662 will arrange to insert a new entry, or teach you how to do it.
21666 \begin_layout Plain Layout
21667 It is very simple, it involves the creation of a file with four lines, and
21668 re-running of the auto configuration.
21673 Moreover, if you use a literate tool other than Noweb you may need to create
21674 a new set of document classes for it.
21677 \begin_layout Paragraph
21681 \begin_layout Standard
21682 LyX enables you to write code with a layout named
21690 \begin_layout Plain Layout
21691 The equivalent Noweb term is
21692 \begin_inset Quotes eld
21696 \begin_inset Quotes erd
21700 For historical reasons, I got used to the term
21701 \begin_inset Quotes eld
21705 \begin_inset Quotes erd
21708 introduced by other literate tool named Nuweb, which I used for many years
21709 before rendering myself to Noweb.
21714 Noweb delimits scraps like this:
21717 \begin_layout LyX-Code
21721 \begin_layout LyX-Code
21725 \begin_layout LyX-Code
21729 \begin_layout LyX-Code
21733 \begin_layout LyX-Code
21737 \begin_layout Standard
21738 The problem is that whatever is written in between the << and the
21742 must be taken literally, i.
21743 \begin_inset space \thinspace{}
21747 \begin_inset space \space{}
21750 LyX should be prevented from making any special interpretation of what has
21752 This is handled by a special layout named Scrap, that works like a normal
21753 paragraph but has a free spacing capability.
21756 \begin_layout Standard
21757 The down side of the Scrap paragraph layout is that consecutive paragraphs
21758 of code will be spaced with one empty line in the source code and also
21759 in the printed documentation.
21760 The work around is to enter each line of code within a single Scrap, with
21761 a newline (ctrl-return).
21762 The example above will look like this:
21766 \begin_layout Plain Layout
21767 If you have a printed version of this document you will not see any difference
21768 between the previous example and this one.
21776 \begin_layout LyX-Code
21778 \begin_inset Newline newline
21782 \begin_inset Newline newline
21786 \begin_inset Newline newline
21790 \begin_inset Newline newline
21796 \begin_layout Standard
21797 This layout works fine.
21798 The only real inconvenience is that you have to type ctrl-return instead
21803 \begin_layout Plain Layout
21804 It is in my list of
21805 \begin_inset Quotes eld
21809 \begin_inset Quotes erd
21820 \begin_layout Standard
21821 As a special note, you can also use the
21822 \begin_inset Quotes eld
21826 \begin_inset Quotes erd
21829 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21833 \begin_layout LyX-Code
21835 \begin_inset Newline newline
21838 def some_function(args):
21839 \begin_inset Newline newline
21842 "This is the doc string for this function."
21843 \begin_inset Newline newline
21846 print "My args: ", args
21849 \begin_layout LyX-Code
21850 @ %def some_function
21853 \begin_layout Standard
21854 For an example of this usage and the resulting cross-reference output, look
21855 at the Literate python program in
21857 LIBDIR/examples/listerrors.lyx
21859 which should make this all clear.
21862 \begin_layout Paragraph
21863 Generating the documentation
21866 \begin_layout Standard
21867 At this point you already have a new document file with a proper document
21868 class, and with some code and text on it.
21869 How do I print it? The answer is simple, you select
21871 View\SpecialChar \menuseparator
21875 Just like you would do for a plain document.
21876 No special procedure is required.
21879 \begin_layout Standard
21880 To help orientate you, I will now explain what happens inside LyX:
21883 \begin_layout Enumerate
21886 Update\SpecialChar \menuseparator
21889 menu option is chosen, a LaTeX file is generated.
21894 \begin_layout Standard
21895 If the document is of any literate class the generated file will be named
21896 with an extension name defined by the
21897 \begin_inset Quotes eld
21901 \begin_inset Quotes erd
21904 format (defined in the Preferences panel), otherwise the file will have
21913 \begin_layout Enumerate
21914 Note that the only difference so far is in the name of the file, no special
21915 processing is required by LyX.
21916 Given that you formatted the code using the Scrap layout that, by itself,
21917 takes care of the business.
21920 \begin_layout Enumerate
21921 If the document is of any literate class LyX will then use the internal
21922 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21926 \begin_layout Plain Layout
21927 The converters are defined in the
21929 Tools\SpecialChar \menuseparator
21933 \begin_inset Quotes eld
21937 \begin_inset Quotes erd
21949 manual for general information about converters.
21954 to generate the LaTeX file.
21958 \begin_layout Standard
21959 Otherwise it will just skip this step.
21963 \begin_layout Enumerate
21964 Finally, LaTeX is invoked and the regular post processing continues as in
21968 \begin_layout Standard
21969 Independence from a particular
21970 \begin_inset Quotes eld
21974 \begin_inset Quotes erd
21977 is easily achieved by changing the commands that are run by the various
21981 \begin_layout Paragraph
21982 Generating the code
21985 \begin_layout Standard
21986 When the build menu option is chosen or the corresponding button in the
21987 toolbar is pressed, a LaTeX file is generated just like step 1 above.
21988 Next, LyX invokes the
21993 This converter needs to be defined by the user and is not installed by
21994 default, though the Program format is.
21995 This converter (like any other converter) will have two parts:
21998 \begin_layout Enumerate
21999 The converter program itself.
22000 This program performs the conversion from the one format to the other (in
22001 this case, from the Noweb format to the Program pseudo-format).
22004 \begin_layout Enumerate
22005 The error log parser.
22006 This is a program whose sole purpose is to rewrite error messages in a
22007 format that LyX understands.
22008 This makes it possible for LyX to place error boxes in the right places
22009 in the file buffer.
22012 \begin_layout Standard
22013 The first part, the
22014 \begin_inset Quotes eld
22018 \begin_inset Quotes erd
22021 setting, should be set to
22022 \begin_inset Quotes eld
22030 \begin_inset Quotes erd
22034 This basically means that LyX will call
22035 \begin_inset Quotes eld
22039 \begin_inset Quotes erd
22042 (a program or script) with the name of the Noweb file (normally a file
22043 in the LyX temp directory).
22047 \begin_layout Standard
22048 This is an implementation of
22049 \begin_inset Quotes eld
22053 \begin_inset Quotes erd
22056 that you can place in a directory on your path:
22059 \begin_layout LyX-Code
22063 \begin_layout LyX-Code
22067 \begin_layout LyX-Code
22068 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
22071 \begin_layout Standard
22072 The next part of the converter setting is the
22073 \begin_inset Quotes eld
22077 \begin_inset Quotes erd
22080 which is to be set to
22081 \begin_inset Quotes eld
22086 parselog=listerrors
22089 \begin_inset Quotes erd
22093 This will run any errors that are generated by the
22094 \begin_inset Quotes eld
22098 \begin_inset Quotes erd
22101 process through the
22102 \begin_inset Quotes eld
22106 \begin_inset Quotes erd
22112 \begin_layout Standard
22113 The converter code looks in
22121 then on the path for the
22122 \begin_inset Quotes eld
22126 \begin_inset Quotes erd
22132 \begin_layout Standard
22133 The build will normally take place in LyX's temporary directory, so the
22134 files produced by the conversion will be in that directory.
22135 LyX will copy out what it regards as the `main' file, but the
22139 conversion may produce several files, and so most of these would then be
22140 deleted when LyX was closed.
22141 The present solution is to use a `copier',
22145 \begin_layout Plain Layout
22154 manual for information on these.
22163 script in its default mode, so that the entire contents of the temporary
22164 directory is copied.
22165 More will get copied than is needed, to be sure, but nothing will be lost.
22166 If, however, you know what extensions the generated files will have, this
22167 can be improved by using the
22176 This option takes a comma-separated list of extensions to copy.
22177 So, for example, if the conversion will generate only files with the extensions
22186 , then the correct definition would be:
22189 \begin_layout LyX-Code
22190 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
22193 \begin_layout Standard
22194 The result will be that only files with these two extensions will be copied
22198 \begin_layout Paragraph
22199 Build instructions in the document
22202 \begin_layout Standard
22203 The last piece of the integration between LyX and noweb is the
22204 \begin_inset Quotes eld
22208 \begin_inset Quotes erd
22212 Generally, the instructions for building your program should be embedded
22213 in a scrap of its own.
22215 \begin_inset Quotes eld
22219 \begin_inset Quotes erd
22222 above uses the notangle command to look for this scrap (called
22223 \begin_inset Quotes eld
22227 \begin_inset Quotes erd
22230 ) and runs its contents through
22231 \begin_inset Quotes eld
22235 \begin_inset Quotes erd
22241 \begin_layout Standard
22242 Typically, such a scrap would look something like this:
22245 \begin_layout LyX-Code
22247 \begin_inset Newline newline
22251 \begin_inset Newline newline
22255 \begin_inset Newline newline
22258 if [ -z "${NOWEB_SOURCE}" ]
22259 \begin_inset Newline newline
22263 \begin_inset Newline newline
22266 NOWEB_SOURCE=myfile.nw
22267 \begin_inset Newline newline
22271 \begin_inset Newline newline
22275 code to extract files ...]
22276 \begin_inset Newline newline
22280 code to compile files ...]
22281 \begin_inset Newline newline
22287 \begin_layout Standard
22290 LIBDIR/examples/listerrors.lyx
22294 LIBDIR/examples/Literate.lyx
22296 which implement two versions of the
22297 \begin_inset Quotes eld
22301 \begin_inset Quotes erd
22304 program for some illustrations of how all of these pieces go together or
22307 LIBDIR/examples/noweb2lyx.lyx.
22310 Interestingly, these three files show off the language-indepence of the
22311 LyX literate programming support since they are written in Python, C and
22315 \begin_layout Subsubsection
22319 \begin_layout Standard
22320 All the Literate Programming support is configured by the
22322 Tools\SpecialChar \menuseparator
22326 \begin_inset Quotes eld
22330 \begin_inset Quotes erd
22334 The important parts are:
22337 \begin_layout Description
22339 \begin_inset space ~
22343 \begin_inset Quotes eld
22347 \begin_inset Quotes erd
22351 \begin_inset space ~
22354 format Set up via the Formats tab, this is where the Noweb-specific pieces
22364 , the file extension is set to
22369 This tells LyX to create a file with a
22373 extension in the first step of the conversion process.
22376 \begin_layout Description
22378 \begin_inset space ~
22386 \begin_inset space ~
22389 format This is an empty format whose sole purpose is to be the endpoint
22390 of a conversion (which then allows us to set up a converter for it).
22393 \begin_layout Description
22402 This converter performs the
22403 \begin_inset Quotes eld
22407 \begin_inset Quotes erd
22410 of the literate document.
22411 For Noweb, it is set to
22412 \begin_inset Quotes eld
22417 noweave -delay -index $$i > $$o
22420 \begin_inset Quotes erd
22426 \begin_layout Description
22436 \begin_inset Quotes eld
22440 \begin_inset Quotes erd
22444 As stated above, the Converter is set to
22445 \begin_inset Quotes eld
22453 \begin_inset Quotes erd
22456 , with Flags set to
22457 \begin_inset Quotes eld
22462 originaldir,parselog=listerrors
22465 \begin_inset Quotes erd
22471 \begin_layout Subsubsection
22475 \begin_layout Standard
22476 There is also a new function implemented in the LyX server, the
22477 \begin_inset Quotes eld
22480 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22484 \begin_layout Standard
22485 When debugging code with ddd/gdb, it is possible to invoke a text editor
22486 at the current execution position with a single key stroke.
22487 The default ddd configuration for that is shift-ctrl-V.
22488 It happens that you can define the editor command line invocation in ddd
22491 Edit\SpecialChar \menuseparator
22492 Preferences\SpecialChar \menuseparator
22495 dialog and changing the "Edit Sources" entry.
22498 \begin_layout Standard
22499 I take advantage of the new created LyX server function and this ddd feature,
22501 \begin_inset Quotes eld
22505 \begin_inset Quotes erd
22511 \begin_layout LyX-Code
22512 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22515 \begin_layout Standard
22516 With this, whenever you are using ddd and find a point in the program that
22517 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22518 ddd you forward this information to LyX through the LyX server and then
22519 the LyX window will show the same file with the cursor at the same position
22520 ddd was pointing to.
22521 No more guessing or long scrolling to locate a point in the program back
22525 \begin_layout Standard
22526 Note however that you must enable the LyX server to get this feature working
22527 (it is disabled by default).
22528 You can enable it in
22540 ) by entering in the
22545 \begin_inset Quotes eld
22550 /home/<your-home-directory>/.lyx/lyxpipe
22553 \begin_inset Quotes erd
22559 \begin_layout Standard
22560 Read the LyX server documentation in the
22562 Customization Manual
22564 for further information.
22567 \begin_layout Subsubsection
22571 \begin_layout Standard
22572 There are six new buttons that can be added to your LyX toolbar.
22573 Five of these buttons are short cuts to layout styles:
22594 The last one is a short cut to the
22595 \begin_inset Quotes eld
22599 \begin_inset Quotes erd
22606 \begin_layout Standard
22607 LyX has a range of buttons that are available for tool bar customization.
22608 In my toolbar I like to combine the six short cuts above with two more:
22613 \SpecialChar \menuseparator
22618 \SpecialChar \menuseparator
22625 View\SpecialChar \menuseparator
22629 Here is how it looks like:
22632 \begin_layout LyX-Code
22636 \begin_layout LyX-Code
22640 \begin_layout LyX-Code
22641 Icon "layout Standard"
22644 \begin_layout LyX-Code
22645 Icon "layout Section"
22648 \begin_layout LyX-Code
22649 Icon "layout LaTeX"
22652 \begin_layout LyX-Code
22653 Icon "layout LyX-Code"
22656 \begin_layout LyX-Code
22657 Icon "layout Scrap"
22660 \begin_layout LyX-Code
22664 \begin_layout LyX-Code
22668 \begin_layout LyX-Code
22669 Icon "buffer-typeset"
22672 \begin_layout LyX-Code
22673 Icon "build-program"
22676 \begin_layout LyX-Code
22680 \begin_layout LyX-Code
22684 \begin_layout LyX-Code
22688 \begin_layout LyX-Code
22692 \begin_layout LyX-Code
22696 \begin_layout Subsubsection
22697 Colors customization
22700 \begin_layout Standard
22701 There are a number of colors in LyX that can be customized in
22706 One of the things that bothers people is the LaTeX font color.
22707 The default color is red, since the scraps uses LaTeX font, and there is
22708 a lot of scraps in literate documents, you may get tired of seeing everything
22710 You can change it by going to the tabs
22719 \begin_layout Standard
22720 The next thing is the visible presence of the newline character in the screen.
22721 You can choose the color of this particular character and make it blend
22723 I recommend you choosing a color that is close to the background but not
22724 equal, that way you still can see it is there, but it is not bothering
22729 \begin_layout Chapter
22730 Secrets of the LaTeX Masters
22731 \begin_inset CommandInset label
22740 \begin_layout Standard
22741 Though LyX is a powerful tool, it cannot hope to support everything that
22742 can be done with pure TeX/LaTeX.
22743 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22744 as long as you are not afraid to use that
22745 \begin_inset Quotes eld
22749 \begin_inset Quotes erd
22752 button on the toolbar or add things to the LaTeX preamble.
22753 This section lists some tips, tricks, and otherwise cool ideas to give
22754 your document that extra little flair.
22757 Do try this at home
22759 , just start with something a little smaller and less important than your
22763 \begin_layout Standard
22764 Most ideas in this section require less common files in your LaTeX installation.
22765 If you have a system like TeXLive, most will already be available.
22766 A few, however, will need to be downloaded from one of the CTAN archives.
22767 Often, there are several ways to do something, or several LaTeX style files
22768 which do the same thing.
22769 We do not endorse one choice over another, we simply claim that we have
22770 done a particular task with a particular file.
22771 Put on your wizard hat, keep an eye out for dragons, and let us begin.
22774 \begin_layout Section
22778 \begin_layout Standard
22781 Lars Gullik Bjønnes
22784 \begin_layout Subsection
22788 \begin_layout Standard
22789 The aim for this chapter
22793 \begin_layout Plain Layout
22794 Editor's note: Lars' original chapter was a masterful description of how
22800 However, it was too long to flow smoothly in this document.
22801 I have therefore chosen to excerpt the most important sections here (sorry,
22802 Lars); you can read the original chapter (and more of the story!) in the
22805 examples/multicol.lyx
22813 is to show how the LaTeX package
22817 can be used in a LyX document.
22818 As LyX doesn't support the
22822 package natively yet, we have to use some small hacks.
22823 By reading this section it should be obvious how to do this.
22826 \begin_layout Subsection
22830 \begin_layout Standard
22835 package allows switching between one and multicolumn format on the same
22837 Footnotes are handled correctly (for the most part), but will be placed
22838 at the bottom of the page and not under each column.
22839 LaTeX's float mechanism, however, is partly disabled in the current implementat
22841 At the moment only page-wide floats can be used within the scope of the
22845 \begin_layout Subsection
22849 \begin_layout Subsubsection
22853 \begin_layout Standard
22854 If you want to have two columns in your text, you have use LaTeX mode to
22859 begin{multicols}{2}
22861 at the point where you want the two column layout to start, and then
22867 where you want it to end.
22871 \begin_layout Standard
22875 \begin_layout Plain Layout
22879 begin{multicols}{2}
22887 \begin_layout Standard
22892 The Adventure of the Empty House
22895 \begin_inset Newline newline
22900 Sir Arthur Conan Doyle
22903 \begin_layout Standard
22906 It was in the spring of the year 1894 that all London was interested, and
22907 the fashionable world dismayed, by the murder of the Honourable Ronald
22908 Adair under most unusual and inexplicable circumstances.
22909 The public has already learned those particulars of the crime which came
22910 out in the police investigation, but a good deal was suppressed upon that
22911 occasion, since the case for the prosecution was so overwhelmingly strong
22912 that it was not necessary to bring forward all the facts.
22913 Only now, at the end of nearly ten years, am I allowed to supply those
22914 missing links which make up the whole of that remarkable chain.
22915 The crime was of interest in itself, but that interest was as nothing to
22916 me compared to the inconceivable sequel, which afforded me the greatest
22917 shock and surprise of any event in my adventurous life.
22918 Even now, after this long interval, I find myself thrilling as I think
22919 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22920 ty which utterly submerged my mind.
22921 Let me say to that public, which has shown some interest in those glimpses
22922 which I have occasionally given them of the thoughts and actions of a very
22923 remarkable man, that they are not to blame me if I have not shared my knowledge
22924 with them, for I should have considered it my first duty to do so, had
22925 I not been barred by a positive prohibition from his own lips, which was
22926 only withdrawn upon the third of last month.
22929 \begin_layout Standard
22933 \begin_layout Plain Layout
22945 \begin_layout Subsubsection
22949 \begin_layout Standard
22950 The same pattern is used when you want more than two columns:
22953 \begin_layout Standard
22957 \begin_layout Plain Layout
22961 begin{multicols}{3}
22969 \begin_layout Standard
22972 It can be imagined that my close intimacy with Sherlock Holmes had interested
22973 me deeply in crime, and that after his disappearance I never failed to
22974 read with care the various problems which came before the public.
22975 And I even attempted, more than once, for my own private satisfaction,
22976 to employ his methods in their solution, though with indifferent success.
22977 There was none, however, which appealed to me like this tragedy of Ronald
22979 As I read the evidence at the inquest, which led up to a verdict of willful
22980 murder against some person or persons unknown, I realized more clearly
22981 than I had ever done the loss which the community had sustained by the
22982 death of Sherlock Holmes.
22983 There were points about this strange business which would, I was sure,
22984 have specially appealed to him, and the efforts of the police would have
22985 been supplemented, or more probably anticipated, by the trained observation
22986 and the alert mind of the first criminal agent in Europe.
22987 All day, as I drove upon my round, I turned over the case in my mind and
22988 found no explanation which appeared to me to be adequate.
22989 At the risk of telling a twice-told tale, I will recapitulate the facts
22990 as they were known to the public at the conclusion of the inquest.
22993 \begin_layout Standard
22997 \begin_layout Plain Layout
23009 \begin_layout Standard
23010 You can have more than 3 columns if you want to, but that might not be very
23011 pleasant for the eye.
23014 \begin_layout Subsubsection
23015 Columns inside columns
23018 \begin_layout Standard
23019 You can even have columns inside columns:
23022 \begin_layout Standard
23026 \begin_layout Plain Layout
23030 begin{multicols}{2}
23038 \begin_layout Standard
23041 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
23042 at that time governor of one of the Australian colonies.
23043 Adair's mother had returned from Australia to undergo the operation for
23044 cataract, and she, her son Ronald, and her daughter Hilda were living together
23048 \begin_layout Standard
23052 \begin_layout Plain Layout
23056 begin{multicols}{2}
23064 \begin_layout Standard
23067 The youth moved in the best society–had, so far as was known, no enemies
23068 and no particular vices.
23069 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
23070 had been broken off by mutual consent some months before, and there was
23071 no sign that it had left any very profound feeling behind it.
23072 For the rest {sic} the man's life moved in a narrow and conventional circle,
23073 for his habits were quiet and his nature unemotional.
23074 Yet it was upon this easy-going young aristocrat that death came, in most
23075 strange and unexpected form, between the hours of ten and eleven-twenty
23076 on the night of March 30, 1894.
23079 \begin_layout Standard
23083 \begin_layout Plain Layout
23095 \begin_layout Standard
23098 Ronald Adair was fond of cards–playing continually, but never for such stakes
23100 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
23101 It was shown that, after dinner on the day of his death, he had played
23102 a rubber of whist at the latter club.
23103 He had also played there in the afternoon.
23108 The evidence of those who had played with him– Mr.
23109 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
23110 and that there was a fairly equal fall of the cards.
23111 Adair might have lost five pounds, but not more.
23112 His fortune was a considerable one, and such a loss could not in any way
23114 He had played nearly every day at one club or other, but he was a cautious
23115 player, and usually rose a winner.
23116 It came out in evidence that, in partnership with Colonel Moran, he had
23117 actually won as much as four hundred and twenty pounds in a sitting, some
23118 weeks before, from Godfrey Milner and Lord Balmoral.
23119 So much for his recent history as it came out at the inquest.
23122 \begin_layout Standard
23126 \begin_layout Plain Layout
23138 \begin_layout Standard
23139 Please do read the file
23141 examples/multicol.lyx
23143 for more advanced examples including column and header spacing, vertical
23144 separator lines, and more.
23147 \begin_layout Section
23152 Paragraph Environment
23153 \begin_inset Argument
23156 \begin_layout Plain Layout
23157 Numbering in Enumerate
23165 \begin_layout Standard
23171 \begin_layout Standard
23172 \begin_inset VSpace bigskip
23178 \begin_layout Standard
23180 The default numbering for the
23184 paragraph environment begins with Arabic numbers and ends with uppercase
23186 Suppose, however, you wanted a different type of numbering scheme.
23187 Here's a quickie example of how to change the numbering scheme:
23190 \begin_layout LyX-Code
23200 \begin_layout LyX-Code
23210 \begin_layout LyX-Code
23220 \begin_layout LyX-Code
23230 \begin_layout Standard
23231 \SpecialChar \ldots{}
23232 which changes the numbering scheme to uppercase Roman numerals, uppercase
23233 letters, Arabic numbers, and lowercase letter.
23236 \begin_layout Standard
23237 Additionally, the previous example also adds a little bit extra to the numbering
23239 For example, the first level label actually looks like:
23240 \begin_inset Quotes eld
23244 \begin_inset Quotes erd
23248 For ease of reading, we'll describe what the numbering schemes look like
23249 using a notation something like this: <
23250 \begin_inset Quotes eld
23254 \begin_inset Quotes erd
23258 \begin_inset space ~
23262 \begin_inset Quotes erd
23266 \begin_inset Quotes erd
23270 \begin_inset space ~
23274 \begin_inset Quotes erd
23278 \begin_inset Quotes erd
23282 \begin_inset space ~
23286 \begin_inset Quotes eld
23290 \begin_inset Quotes erd
23297 \begin_layout Standard
23298 As you can see in the example, there is a label command for each nesting
23305 \SpecialChar \ldots{}
23312 , as well as a counter,
23316 \SpecialChar \ldots{}
23322 There are also five
23323 \begin_inset Quotes eld
23327 \begin_inset Quotes erd
23360 , each of which take one counter as an argument.
23361 You can add characters before or after these, but there's no need to add
23365 \begin_layout Standard
23366 You can get really fancy with these.
23370 \begin_layout LyX-Code
23384 \begin_layout LyX-Code
23396 \begin_layout LyX-Code
23406 \begin_layout LyX-Code
23416 \begin_layout Standard
23417 produces the somewhat out of hand numbering scheme: <
23418 \begin_inset Quotes eld
23422 \begin_inset Quotes erd
23426 \begin_inset space ~
23430 \begin_inset Quotes erd
23434 \begin_inset Quotes erd
23438 \begin_inset space ~
23442 \begin_inset Quotes erd
23446 \begin_inset Quotes erd
23450 \begin_inset space ~
23454 \begin_inset Quotes eld
23458 \begin_inset Quotes erd
23465 \begin_layout Section
23469 \begin_layout Standard
23475 \begin_layout Standard
23476 \begin_inset VSpace bigskip
23482 \begin_layout Standard
23487 \begin_layout Plain Layout
23493 tmpfont}{cmr17 scaled 2500}{
23505 \begin_layout Standard
23510 \begin_layout Plain Layout
23521 hose of you who like the style of old books probably also like
23522 \begin_inset Quotes eld
23526 \begin_inset Quotes erd
23529 —those large capital letters which begin each new chapter or section.
23530 Implementing them with plain LyX/LaTeX is straightforward (assuming you
23531 know some plain TeX!) but does require a lot of work and many iterations,
23532 as you can see by all the ugly TeX-mode stuff at the beginning of this
23536 \begin_layout Standard
23540 \begin_layout Plain Layout
23546 bigdrop{-1em}{3}{ptmri}{T}+
23551 here is a much easier way of doing this, of course.
23560 ) package from CTAN allows a simple way to add such letters to your documents.
23561 Since this package is not a standard part of TeXLive, I can't demonstrate
23562 it within this document, but if you copy this paragraph to a new document,
23564 \begin_inset Quotes eld
23574 \begin_inset Quotes erd
23577 and the pluses from the TeX code at the beginning of the paragraph, and
23582 usepackage{dropcaps}
23584 to your LaTeX preamble, you will get a nice Times Roman Italic
23585 \begin_inset Quotes eld
23589 \begin_inset Quotes erd
23592 , whose height is three lines of text and which protrudes 1 em into the
23594 (Make certain you have copied
23595 \begin_inset Quotes eld
23603 \begin_inset Quotes erd
23606 into a directory where TeX can see it.) The first argument is the amount
23607 of indentation; in this case the negative sign moves it into the margin.
23608 The second argument is the height of the letter in number of lines of text.
23609 The third argument is the font name: virtually anything which has a tfm
23610 file should work (wade through the
23612 .../texmf/fonts/tfm
23614 directory for possibilities).
23615 My personal favorite is
23616 \begin_inset Quotes eld
23624 \begin_inset Quotes erd
23627 , a fancy German font specifically designed for dropped capitals.
23628 The fourth argument is the letter (or letters) to be dropped.
23633 package also offers the
23639 command, as well as a slightly simplified
23648 \begin_layout Section
23649 Non-standard Paragraph Shapes
23652 \begin_layout Standard
23658 \begin_layout Standard
23659 \begin_inset VSpace bigskip
23665 \begin_layout Standard
23669 \begin_layout Plain Layout
23681 \begin_layout Standard
23685 \begin_layout Plain Layout
23694 \begin_layout Plain Layout
23708 \begin_layout Standard
23713 \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
23886 \begin_layout Plain Layout
23892 There are times when the tyranny of rectangular paragraphs must be overthrown.
23893 In such situations, a call to the delightful plain TeX command
23900 As you can see, completely arbitrary shapes can be laid out with a suitable
23901 set of linelength definitions.
23902 While this parshape may look a bit silly and useless, one could conceive
23903 of situations such as finely tuned dropped capitals, word wrapping around
23904 non-rectangular graphics, etc.
23905 which will benefit from such handcrafting.
23908 \begin_layout Standard
23909 \begin_inset VSpace bigskip
23915 \begin_layout Standard
23920 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23927 is the number of lines of text which define the paragraph.
23928 If there turn out to be fewer lines, the shape is truncated; if there are
23929 more, the excess lines have the same dimensions as the last line of the
23939 entries specify the indentation of the line from the left margin, and the
23940 length of the line as measured from that point.
23941 The shape applies only to the current paragraph; everything is reset to
23942 normal for the next paragraph.
23945 \begin_layout Standard
23949 \begin_layout Plain Layout
23961 \begin_layout Section
23965 \begin_layout Standard
23966 As you can see, the examples in this section range from the useful to the
23968 While I don't expect that anyone will ever need the paragraph shape demonstrate
23969 d in the last section, the important point is that you can do almost anything
23970 you want in LyX if you are willing to figure out how to do it in TeX and
23972 TeX is a fantastically powerful typesetting system and all that power is
23973 available to you since LyX uses it as its backend.