1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 % This preamble is designed to ensure that the manual prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the manual may not print out as expected. If you
12 % have problems LaTeXing this file, please contact
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
20 % set fonts for nicer pdf view
21 \IfFileExists{lmodern.sty}
22 {\usepackage{lmodern}}{}
24 \fi % end if pdflatex is used
26 % the pages of the TOC are numbered roman
27 % and a PDF-bookmark for the TOC is added
29 \let\myTOC\tableofcontents
30 \renewcommand{\tableofcontents}{%
31 \pdfbookmark[1]{\contentsname}{}
34 \pagenumbering{arabic}}
36 % used for multi-column text
39 % extra space for tables
40 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
42 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
43 \use_default_options false
50 \maintain_unincluded_children false
53 InsetLayout CharStyle:MenuItem
62 \newcommand*{\menuitem}[1]{{\sffamily #1}}
67 \language_package default
72 \font_typewriter default
73 \font_default_family default
74 \use_non_tex_fonts false
81 \default_output_format default
83 \bibtex_command default
84 \index_command default
88 \pdf_title "LyX's Additional Features manual"
89 \pdf_author "LyX Team"
90 \pdf_subject "LyX's additional features documentation"
91 \pdf_keywords "LyX, Documentation, Additional"
93 \pdf_bookmarksnumbered true
94 \pdf_bookmarksopen false
95 \pdf_bookmarksopenlevel 1
100 \pdf_pdfusetitle false
101 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
111 \paperorientation portrait
114 \notefontcolor #0000ff
121 \paragraph_separation indent
122 \paragraph_indentation default
123 \quotes_language english
126 \paperpagestyle headings
127 \tracking_changes false
128 \output_changes false
137 Additional LyX Features
140 \begin_layout Subtitle
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
3110 \begin_layout Standard
3111 Users sometimes need to be able to
3112 \begin_inset Quotes eld
3116 \begin_inset Quotes erd
3119 a LyX file together with all the images (and other files) on which it depends,
3120 either for sending to a publisher or for sharing with a co-author.
3121 LyX 2.0 includes a Python script (
3122 \begin_inset Flex Code
3125 \begin_layout Plain Layout
3131 ) that automates this process.
3132 To use it, you must have either the
3133 \begin_inset Flex Code
3136 \begin_layout Plain Layout
3143 \begin_inset Flex Code
3146 \begin_layout Plain Layout
3152 python modules installed on your system.
3153 By default, the script prefers the
3154 \begin_inset Flex Code
3157 \begin_layout Plain Layout
3164 \begin_inset Flex Code
3167 \begin_layout Plain Layout
3173 format on Unix-like systems and the
3174 \begin_inset Flex Code
3177 \begin_layout Plain Layout
3186 \begin_layout Standard
3187 LyX's configuration process will set the script up to export a `LyX Archive',
3188 and this format will then be available under
3189 \begin_inset Flex Code
3192 \begin_layout Plain Layout
3193 File\SpecialChar \menuseparator
3202 \begin_layout Standard
3203 Independently of the platform, the generation of a particular archive format
3204 can be forced by adding either the
3205 \begin_inset Flex Code
3208 \begin_layout Plain Layout
3215 \begin_inset Flex Code
3218 \begin_layout Plain Layout
3225 \begin_inset Flex Code
3228 \begin_layout Plain Layout
3235 \begin_inset Flex Code
3238 \begin_layout Plain Layout
3244 format) switch to the
3245 \begin_inset Flex Code
3248 \begin_layout Plain Layout
3249 LyX\SpecialChar \menuseparator
3256 \begin_inset Flex Code
3259 \begin_layout Plain Layout
3260 Tools\SpecialChar \menuseparator
3261 Preferences\SpecialChar \menuseparator
3262 File Handling\SpecialChar \menuseparator
3269 (Make sure you add the switch after the script name, not before it.)
3272 \begin_layout Section
3273 Fancy Headers and Footers
3276 \begin_layout Standard
3277 The default page layout is rather plain; for an
3278 \begin_inset Flex Code
3281 \begin_layout Plain Layout
3287 document class, all you get is a centered page number at the bottom of
3289 This document uses KOMA-script's book class, so it appears to be a bit
3291 But to really put on a show, you need to set the document page style to
3293 \begin_inset Quotes eld
3297 \begin_inset Quotes erd
3300 , as mentioned in the
3305 This section describes the LaTeX code you need to insert in your LaTeX
3306 preamble in order to get the desired effects.
3309 \begin_layout Standard
3310 For more information on fancy headers, see the
3311 \begin_inset Flex Code
3314 \begin_layout Plain Layout
3320 package documentation.
3322 \begin_inset Flex URL
3325 \begin_layout Plain Layout
3327 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3335 \begin_layout Standard
3336 The page header is divided into three fields, not surprisingly labeled
3337 \begin_inset Quotes eld
3341 \begin_inset Quotes erd
3345 \begin_inset Quotes eld
3349 \begin_inset Quotes erd
3353 \begin_inset Quotes eld
3357 \begin_inset Quotes erd
3361 The footer is also divided into these three fields.
3362 The LaTeX commands to set these fields in the simplest manner are
3363 \begin_inset Flex Code
3366 \begin_layout Plain Layout
3375 \begin_inset Flex Code
3378 \begin_layout Plain Layout
3387 \begin_inset Flex Code
3390 \begin_layout Plain Layout
3399 \begin_inset Flex Code
3402 \begin_layout Plain Layout
3411 Suppose you wish to put your name in the upper left hand corner of each
3413 Simply insert the following command in the preamble:
3416 \begin_layout Standard
3425 \begin_layout Standard
3426 You will now see your name in the upper left.
3427 If a field has a default entry that you would like to get rid of (often
3428 the page number appears in the central footer, simply include a command
3429 with a blank argument, e.
3430 \begin_inset space \thinspace{}
3436 \begin_layout Standard
3444 \begin_layout Standard
3445 Let's get really fancy: lets put the section number with the word
3446 \begin_inset Quotes eld
3450 \begin_inset Quotes erd
3454 \begin_inset space \thinspace{}
3458 \begin_inset space \space{}
3461 Section 3) in the upper left, the page number (e.
3462 \begin_inset space \thinspace{}
3466 \begin_inset space \space{}
3469 Page 4) in the upper right, your name in the lower left, and the date in
3471 The following commands should now appear in the preamble:
3474 \begin_layout Standard
3484 \begin_layout Standard
3492 \begin_layout Standard
3502 \begin_layout Standard
3511 \begin_layout Standard
3519 \begin_layout Standard
3529 \begin_layout Standard
3531 \begin_inset Flex Code
3534 \begin_layout Plain Layout
3543 \begin_inset Flex Code
3546 \begin_layout Plain Layout
3554 access LaTeX's section and page counters, and so print out the current
3555 section and page numbers.
3557 \begin_inset Flex Code
3560 \begin_layout Plain Layout
3568 simply prints out today's date.
3571 \begin_layout Standard
3572 The thicknesses of the horizontal rules drawn beneath the header and above
3573 the footer can also be modified.
3574 If you don't want one of the rules, set its thickness to 0.
3575 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3581 \begin_inset Flex Code
3584 \begin_layout Plain Layout
3589 headrulewidth}{0.4pt}
3595 \begin_inset Flex Code
3598 \begin_layout Plain Layout
3603 footrulewidth}{0.4pt}
3608 to set the thicknesses.
3611 \begin_layout Standard
3612 You can switch the header/footer settings on and off for individual pages
3614 \begin_inset Flex Code
3617 \begin_layout Plain Layout
3620 thispagestyle{empty}
3626 \begin_inset Flex Code
3629 \begin_layout Plain Layout
3632 thispagestyle{plain}
3638 \begin_inset Flex Code
3641 \begin_layout Plain Layout
3644 thispagestyle{fancy}
3650 Simply insert them in the text on the page you want changed and mark them
3652 In fact, title pages are marked as plain by default, while following pages
3653 are marked fancy when using the global fancy setting.
3656 \begin_layout Standard
3657 As a final example, it is possible to include an image in the header or
3659 Suppose you want to put a company logo in the upper lefthand corner.
3660 You might try something like
3663 \begin_layout Standard
3672 includegraphics{logo.eps}}}
3675 \begin_layout Standard
3677 (you may need to preface this with
3678 \begin_inset Flex Code
3681 \begin_layout Plain Layout
3685 usepackage{graphics}
3690 if you don't include graphics elsewhere in your document).
3693 \begin_layout Section
3694 Itemize Bullet Selection
3695 \begin_inset CommandInset label
3704 \begin_layout Standard
3710 \begin_layout Subsection
3714 \begin_layout Standard
3715 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3716 Using this dialog you can easily specify what bullet shape to use at each
3717 level of an itemized list.
3718 These settings are document-wide so you won't be able to specify different
3719 sets of bullets for different paragraphs.
3723 \begin_layout Plain Layout
3724 Well, actually you can but you'll have to do it by hand.
3732 \begin_layout Subsection
3736 \begin_layout Standard
3737 Open the dialog by selecting the
3738 \begin_inset Flex MenuItem
3741 \begin_layout Plain Layout
3742 Document\SpecialChar \menuseparator
3748 menu item and then select the
3749 \begin_inset Flex MenuItem
3752 \begin_layout Plain Layout
3761 \begin_layout Standard
3762 The dialog provides you with a table of bullet shapes.
3763 A column of buttons on the left of the table provides access to the six
3764 different panels of bullet shapes.
3765 The row of buttons across the top is used to select which bullet depth
3767 A text entry under the table shows the currently selected bullet shape's
3768 LaTeX equivalent and this can be edited if desired.
3769 If you do modify the text you will also need to specify any needed packages
3770 in the LaTeX preamble.
3773 \begin_layout Standard
3774 The six panels are divided up by the packages they require.
3775 The following table shows the mappings from button name to LaTeX packages.
3778 \begin_layout Standard
3780 \begin_inset Tabular
3781 <lyxtabular version="3" rows="7" columns="2">
3782 <features tabularvalignment="middle">
3783 <column alignment="center" valignment="top" width="0pt">
3784 <column alignment="center" valignment="top" width="0pt">
3786 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3789 \begin_layout Plain Layout
3804 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3807 \begin_layout Plain Layout
3824 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3827 \begin_layout Plain Layout
3842 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3845 \begin_layout Plain Layout
3861 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3864 \begin_layout Plain Layout
3879 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3882 \begin_layout Plain Layout
3899 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3902 \begin_layout Plain Layout
3917 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3920 \begin_layout Plain Layout
3937 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3940 \begin_layout Plain Layout
3955 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3958 \begin_layout Plain Layout
3975 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3978 \begin_layout Plain Layout
3993 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3996 \begin_layout Plain Layout
4013 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4016 \begin_layout Plain Layout
4031 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4034 \begin_layout Plain Layout
4057 \begin_layout Standard
4058 LyX doesn't stop you using bullets from packages you don't have.
4059 If you get errors from LaTeX when you try to view or print the file, then
4060 it is likely you are missing a package.
4064 \begin_layout Plain Layout
4065 LyX doesn't restrict your use since you may be editing locally and exporting
4074 \begin_layout Subsection
4078 \begin_layout Standard
4079 Select which bullet depth you want to change then select the bullet shape
4081 Any changes will not be visible in LyX, but are visible when viewing the
4085 \begin_layout Standard
4086 You can reset a bullet shape to the default simply by clicking your right
4087 mouse button on the appropriate bullet depth button.
4091 \begin_layout Plain Layout
4096 want to have multiple sets of paragraphs with different sets of bullets
4097 in each, then you're going to have to get your hands dirty with TeX code.
4098 The bullet selection dialog can help though because it provides you with
4099 the LaTeX code for a wide range of bullet shapes.
4100 To make your own custom paragraphs you have the following options:
4103 \begin_layout Plain Layout
4107 \begin_layout Plain Layout
4123 \begin_layout Plain Layout
4127 \begin_layout Plain Layout
4149 \begin_layout Itemize
4150 Use the LaTeX command
4151 \begin_inset Flex Code
4154 \begin_layout Plain Layout
4162 to specify a new bullet shape for a given depth.
4163 You'll also need to save the current bullet shape so you can restore it
4165 In this itemized list the following LaTeX code was used to change the bullet
4166 used for the first depth.
4170 \begin_layout LyX-Code
4180 \begin_layout LyX-Code
4197 \begin_layout Itemize
4198 Note that the itemize depth is specified in Roman numerals as part of the
4208 \begin_layout Itemize
4212 \begin_layout Plain Layout
4225 Specify each individual entry by starting each item with the bullet shape
4226 enclosed in square brackets and set as
4227 \begin_inset Flex MenuItem
4230 \begin_layout Plain Layout
4237 For example, this item was started with
4238 \begin_inset Flex Code
4241 \begin_layout Plain Layout
4256 \begin_layout Plain Layout
4260 \begin_layout Plain Layout
4276 \begin_layout Plain Layout
4277 You'll also need to revert the labelitem back to its previous setting for
4278 the global bullet shape settings to remain in effect.
4279 The way used here was:
4282 \begin_layout LyX-Code
4297 \begin_layout Chapter
4298 LyX and the World Wide Web
4301 \begin_layout Standard
4302 LyX has long supported the export of documents to various web-friendly formats,
4304 Before verson 2.0, however, HTML export was always accomplished by the use
4305 of external converters.
4309 \begin_layout Plain Layout
4310 For details on the use of external converters with LyX, see the
4314 section of the Customization manual.
4319 These fall into two large groups: there are converters that use LaTeX as
4320 an intermediate format, such as
4321 \begin_inset Flex Code
4324 \begin_layout Plain Layout
4331 \begin_inset Flex Code
4334 \begin_layout Plain Layout
4341 \begin_inset Flex Code
4344 \begin_layout Plain Layout
4350 , relying upon LyX to produce the LaTeX; and there is a converter that works
4351 directly on LyX files,
4352 \begin_inset Flex Code
4355 \begin_layout Plain Layout
4362 All of these have different advantages and disadvantages.
4366 \begin_layout Standard
4367 The LaTeX-based converters have the advantage that, in principle, they know
4368 everything about the exported document that LaTeX does.
4369 Such converters do not care, for example, if a certain block of code was
4370 produced by LyX or was Evil Red Text.
4371 These converters know about
4372 \begin_inset Flex Code
4375 \begin_layout Plain Layout
4381 files, counters, and references, and can often make use of the
4382 \begin_inset Flex Code
4385 \begin_layout Plain Layout
4391 files generated by BibTeX.
4392 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4393 said that only TeX itself understands TeX---and LaTeX-based converters
4394 will often choke on what seem to be quite simple constructs; complex ones
4395 can throw them completely, and as of this writing, for example, the
4399 manual will not export with
4400 \begin_inset Flex Code
4403 \begin_layout Plain Layout
4409 , though the others will.
4410 The other issue concerns how math is handled.
4411 These converters typically convert the formulae into little pictures that
4412 are then linked from the HTML document.
4413 Since these are actually generated by LaTeX, they are accurate.
4414 But they do not scale well, and just getting them to look as if they are
4415 actually meant to be in your document---so that the font sizes seem to
4416 be roughly the same---can be a challenge.
4419 \begin_layout Standard
4421 \begin_inset Flex Code
4424 \begin_layout Plain Layout
4431 \begin_inset CommandInset href
4433 name "http://elyxer.nongnu.org/"
4434 target "http://elyxer.nongnu.org/"
4438 ) solves some of these problems.
4439 In particular, the formulae it produces scale perfectly, since it renders
4440 math using a combination of HTML and CSS rather than converting the formulae
4442 But even moderately complex formula are rendered less well than with
4443 \begin_inset Flex Code
4446 \begin_layout Plain Layout
4452 ; this reflects the limitations of HTML.
4456 \begin_layout Plain Layout
4458 \begin_inset Flex Code
4461 \begin_layout Plain Layout
4467 can also use jsMath and MathJax for equations, but this setting is only
4468 available globally and requires one to have access to a server that runs
4474 More importantly (as of version 1.1.1, at least),
4475 \begin_inset Flex Code
4478 \begin_layout Plain Layout
4484 has limited support for math macros and no support for user-defined paragraph
4485 or character styles.
4486 These limitations make
4487 \begin_inset Flex Code
4490 \begin_layout Plain Layout
4496 unsuitable for many of the documents LyX users produce.
4497 In principle, of course, these problems could be solved, but the LyX developers
4498 have decided to follow a different path and have made LyX itself capable
4499 of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4503 \begin_layout Standard
4504 As of this writing, XHTML output remains under development and should probably
4506 \begin_inset Quotes eld
4510 \begin_inset Quotes erd
4517 \begin_layout Plain Layout
4519 \begin_inset Flex Code
4522 \begin_layout Plain Layout
4523 development/HTML.notes
4528 , which can be found in the LyX source tree or
4529 \begin_inset CommandInset href
4531 name "accessed online"
4532 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4536 , usually contains up-to-date information about the state of XHTML output.
4537 See also the list of XHTML bugs on
4538 \begin_inset CommandInset href
4540 name "the bug tracker"
4541 target "http://www.lyx.org/trac/query?status=reopened&status=assigned&status=new&max=0&component=xhtml+export&order=id&col=id&col=summary&col=reporter&col=keywords&keywords=%21%7Efixedintrunk&desc=1"
4550 Still, the developers have chosen this approach because it has several
4551 potential advantages over the other two.
4554 \begin_layout Standard
4555 These advantages are primarily due to the fact that the XHTML output routines,
4556 since they are part of LyX, know everything LyX knows about the document
4561 \begin_layout Plain Layout
4562 Another advantage is that, since these routines are internal to LyX, they
4563 are immune to changes in LyX's file format, or to changes in the semantics
4569 So they know about the table of contents (as displayed in the outline),
4570 about the counters associated with different paragraph styles, and about
4571 user-defined styles.
4572 The XHTML output routines know what LyX knows about internationalization,
4573 too, so they will output
4574 \begin_inset Quotes eld
4578 \begin_inset Quotes erd
4582 \begin_inset Quotes eld
4590 \begin_inset Quotes erd
4593 , depending upon the language in effect at the time.
4597 \begin_layout Standard
4598 Quite generally, the output routines know what LyX knows about document
4599 layout, that is, about how the document is to be rendered on screen.
4600 We use this information when we output the document as XHTML.
4605 generates CSS style information corresponding to the layout information
4606 it uses to render the document on screen: if section headings are supposed
4607 to be sans-serif and bold as seen in LyX, then (by default) they will be
4608 sans-serif and bold when viewed in a web browser, too.
4609 And this is true not just for pre-defined styles, like Section, but for
4610 any style, including user-defined styles.
4611 Indeed, the XHTML output routines make no distinction between user-defined
4612 paragraph and character styles and LyX's own pre-defined styles: in each
4613 case, everything LyX knows about the styles is contained in the layout
4615 And much the same is true as regards pre-defined textual insets, such as
4616 footnotes, and various custom insets.
4620 \begin_layout Standard
4621 The result is that XHTML output can be customized and extended in exactly
4622 the same way LaTeX output can be customized and extended: through layout
4624 See chapter five of the
4628 manual for the details.
4631 \begin_layout Standard
4632 The remainder of this chapter contains more detailed information on XHTML
4633 output, its limitations, and ways to work around those limitations.
4636 \begin_layout Section
4637 Math Output in XHTML
4640 \begin_layout Standard
4641 LyX offers four choices for how math is rendered.
4642 These have various advantages and disadvantages:
4645 \begin_layout Itemize
4647 \begin_inset Newline newline
4650 MathML is a dialect of XML designed specifically for mathematics on the
4651 web, and it typically renders very well in browsers that support it.
4652 The disadvantage is that not all browsers support MathML, and support is
4653 not complete even in the Gecko-based browsers, such as Firefox.
4654 \begin_inset Newline newline
4657 If LyX is unable to render a formula as MathML---for example, if the formula
4659 \begin_inset Flex Code
4662 \begin_layout Plain Layout
4668 package or ERT---then it will instead output the formula as an image.
4672 \begin_layout Itemize
4674 \begin_inset Newline newline
4678 \begin_inset Flex Code
4681 \begin_layout Plain Layout
4687 outputs math as HTML, styled by CSS.
4691 \begin_layout Plain Layout
4692 LyX has borrowed some of the CSS for its HTML output from
4693 \begin_inset Flex Code
4696 \begin_layout Plain Layout
4707 For simple formulae, this can work quite well, though with more complicated
4708 formulae it tends to break down.
4709 Still, this method has the advantage that it is very widely supported and
4710 so it may be appropriate for documents that contain only a little, fairly
4712 \begin_inset Newline newline
4715 If Lyx is unable to render a formula as HTML---for example, if the formula
4717 \begin_inset Flex Code
4720 \begin_layout Plain Layout
4726 package or ERT---then it will instead output the formula as an image.
4730 \begin_layout Itemize
4732 \begin_inset Newline newline
4736 \begin_inset Flex Code
4739 \begin_layout Plain Layout
4745 , LyX will output formulae as images, the very same images, in fact, that
4746 are used for instant preview.
4750 \begin_layout Plain Layout
4751 Instant preview does
4755 have to be on for images to be output, however.
4760 The advantage to this method is that the images are simply generated by
4761 LaTeX, so they are very accurate.
4762 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4763 so they do not scale terribly well, and one cannot copy them, etc.
4764 (As of this writing, there are also problems about equation numbering.
4766 \begin_inset CommandInset href
4769 target "http://www.lyx.org/trac/ticket/6894"
4774 \begin_inset Newline newline
4777 The size of the images can be controlled by setting the
4778 \begin_inset Quotes eld
4782 \begin_inset Quotes erd
4786 \begin_inset Flex MenuItem
4789 \begin_layout Plain Layout
4790 Document\SpecialChar \menuseparator
4791 Settings\SpecialChar \menuseparator
4801 \begin_layout Plain Layout
4802 For those who want to know, this controls the resolution of the image in
4803 dots per inch and is based upon a default of 75 dpi.
4809 \begin_inset Newline newline
4812 If LyX for some reason fails to create an image for a formula (e.g., if a
4813 required LaTeX package is not installed), then it will fall back to outputing
4817 \begin_layout Itemize
4819 \begin_inset Newline newline
4822 Finally, LyX will happily output math as LaTeX.
4823 As well as being the output of last resort, this method can be used with
4825 \begin_inset CommandInset href
4828 target "http://www.math.union.edu/~dpvc/jsMath/"
4832 , which uses JavaScript to render LaTeX embedded in HTML documents.
4833 LyX wraps the LaTeX in either a
4834 \begin_inset Flex Code
4837 \begin_layout Plain Layout
4843 (for inline formulas) or
4844 \begin_inset Flex Code
4847 \begin_layout Plain Layout
4853 (for displayed formulas) with
4854 \begin_inset Flex Code
4857 \begin_layout Plain Layout
4863 , as is required for jsMath.
4866 \begin_layout Standard
4867 One of these output methods must be selected under
4868 \begin_inset Flex MenuItem
4871 \begin_layout Plain Layout
4872 Document\SpecialChar \menuseparator
4873 Settings\SpecialChar \menuseparator
4880 By default, LyX outputs MathML.
4881 This is a document-wide setting, therefore.
4884 \begin_layout Standard
4885 Eventually, LyX will offer the user the option to select an alternate output
4886 method for a particular inset, say, one that isn't being rendered very
4891 \begin_layout Plain Layout
4892 That said, since LyX falls back to images if the inset contains ERT, then
4893 one can force output as an image by putting some harmless ERT into the
4895 \begin_inset Formula $a=b\relax$
4906 \begin_layout Section
4907 Bibliography and Citations
4910 \begin_layout Standard
4911 XHTML output fully supports bibliographies and citations.
4915 \begin_layout Standard
4916 Citation labels are generated by the same machinery that generates LyX's
4917 on-screen labels, so the labels will look in the output much as they do
4918 in LyX, though better.
4919 If you are using numerical citations, then LyX will output numerical labels,
4920 such as [1] or [17], rather than simply showing the citation key in square
4921 brackets, as it does on-screen.
4922 If you are using author-year citations, then LyX will add lowercase letters
4923 to the years, just as BibTeX does, if it finds more than one citation for
4924 a given author-year combination.
4925 The labels will be printed with the bibliography entries.
4926 Note that there is, at present, no way to customize the appearance of the
4927 labels, for example, to choose between square brackets and parentheses.
4930 \begin_layout Standard
4931 Bibliography output is handled by the same machinery that handles the presentati
4932 on of reference information in the citation dialog, so you will see in the
4933 XHTML output pretty much what you would see if you were to look at a given
4934 entry in the citation dialog.
4935 The formatting can be customized in your layout file or, preferably, in
4941 manual for the details.
4944 \begin_layout Standard
4945 The main defect at present is that cross-referenced information is printed
4946 with every entry with which it is associated.
4947 So you can see things like this:
4952 \begin_inset Quotes eld
4955 Context and Logical Form
4956 \begin_inset Quotes erd
4961 Language in Context: Selected Essays
4963 (Oxford: Oxford University Press, 2007), pp.
4969 \begin_inset Quotes eld
4972 Semantics in Context
4973 \begin_inset Quotes erd
4978 Language in Context: Selected Essays
4980 (Oxford: Oxford University Press, 2007), pp.
4984 \begin_layout Standard
4985 This should be fixed before long.
4988 \begin_layout Standard
4989 There is no support at present for sectioned bibliographies.
4990 If you have multiple bibliographies, then LyX will print the same bibliography
4994 \begin_layout Section
4998 \begin_layout Standard
4999 LyX will happily export indexes as XHTML, but with certain limitations at
5003 \begin_layout Standard
5004 Index export will be most reliable when you do not attempt to use the fancy
5005 constructs that are described in the section on indexes in the
5013 \begin_layout Plain Layout
5014 The main issue here is that LyX itself does not really handle these.
5015 It just lets you enter what you would have to enter in raw LaTeX.
5020 We'll describe how they are handled using the subsection headings from
5024 \begin_layout Itemize
5025 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5026 these, but the entries must be separated by
5027 \begin_inset Quotes eld
5031 \begin_inset Quotes erd
5034 , that is, there must be spaces around the exclamation point.
5035 This is because it is otherwise too difficult to check for escaped exclamation
5036 points, ones in math, and so forth.
5039 \begin_layout Itemize
5040 Page Ranges: There is no support at all for page ranges, since these make
5041 no sense with XHMTL.
5042 Instead, you will just get two index entries, one at either end.
5045 \begin_layout Itemize
5046 Cross-referencing: There is no support for cross-referencing.
5047 If LyX finds an entry containing the
5048 \begin_inset Quotes eld
5051 |see\SpecialChar \ldots{}
5053 \begin_inset Quotes erd
5056 construct, it is just dropped, and the rest is treated as an ordinary index
5060 \begin_layout Itemize
5061 Index Entry Order: LyX does support attempts to fix the sorting order.
5062 It will take what is before the first `@' it finds and use that for sorting,
5063 taking what follows the first `@' to be the actual entry.
5064 At present, LyX does not check for escaped `@', so do not try to index
5068 \begin_layout Itemize
5069 Index Entry Layout: You can format entries by using the text style dialog,
5070 or by using any other method available within LyX itself.
5071 There is no support for constructs like:
5072 \begin_inset Quotes eld
5076 \begin_inset Quotes erd
5080 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5081 and everything that follows it.
5084 \begin_layout Itemize
5085 Multiple Indexes: There is no support for multiple indexes.
5086 Rather, all index entries will be printed as one large index.
5087 To avoid our printing several versions of the index, we print only the
5088 main index, so make sure you have one.
5091 \begin_layout Section
5092 Nomenclature and Glossary
5095 \begin_layout Standard
5096 There is at present no support for glossaries.
5097 Adding it would be fairly trivial, and welcome.
5100 \begin_layout Chapter
5104 \begin_layout Section
5108 \begin_layout Standard
5109 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5110 and retrieve information about the LyX internal state.
5111 This is only intended for advanced users, but they should find it useful.
5112 It is by writing to the LyX server, for example, that bibliography managers,
5113 such as JabRef, are able to
5114 \begin_inset Quotes eld
5118 \begin_inset Quotes erd
5124 \begin_layout Section
5125 Starting the LyX Server
5128 \begin_layout Standard
5129 The LyX server works through the use of a pair of named pipes.
5130 These are usually located in
5131 \begin_inset Flex Code
5134 \begin_layout Plain Layout
5140 , (except on Windows, where
5144 named pipes are special objects located in
5145 \begin_inset Flex Code
5148 \begin_layout Plain Layout
5160 ) and have the names
5161 \begin_inset Quotes eld
5165 \begin_inset Flex Code
5168 \begin_layout Plain Layout
5175 \begin_inset Quotes erd
5179 \begin_inset Quotes eld
5183 \begin_inset Flex Code
5186 \begin_layout Plain Layout
5193 \begin_inset Quotes erd
5197 External programs write into
5198 \begin_inset Flex Code
5201 \begin_layout Plain Layout
5207 and read back data from
5208 \begin_inset Flex Code
5211 \begin_layout Plain Layout
5218 The stem of the pipe names can be defined in the
5219 \begin_inset Flex MenuItem
5222 \begin_layout Plain Layout
5223 Tools\SpecialChar \menuseparator
5230 \begin_inset Flex Code
5233 \begin_layout Plain Layout
5234 "/home/myhome/lyxpipe"
5240 \begin_inset Flex Code
5243 \begin_layout Plain Layout
5257 on Windows (but any working path can be used).
5262 configure this manually in order for the server to start.
5265 \begin_layout Standard
5267 \begin_inset Flex Code
5270 \begin_layout Plain Layout
5277 \begin_inset Flex Code
5280 \begin_layout Plain Layout
5286 ' to create the pipes.
5287 If one of the pipes already exists, LyX will assume that another LyX process
5288 is already running and will not start the server.
5289 On POSIX (Unix like) systems, if for some other reason, an unused
5290 \begin_inset Quotes eld
5294 \begin_inset Quotes erd
5297 pipe is left in existence when LyX closes, then LyX will try to delete
5299 If this fails for some reason, you will need to delete the pipes manually
5300 and then restart LyX.
5301 On Windows, pipes are deleted by the OS on program termination or crash,
5303 \begin_inset Quotes eld
5307 \begin_inset Quotes erd
5310 pipes should not be possible.
5313 \begin_layout Standard
5314 To have several LyX processes with servers at the same time, you have to
5315 use different configurations, perhaps by using separate user directories,
5317 \begin_inset Flex Code
5320 \begin_layout Plain Layout
5326 file, for each process.
5329 \begin_layout Standard
5330 If you are developing a client program, you might find it useful to enable
5331 debugging information from the LyX server.
5332 Do this by starting LyX as
5333 \begin_inset Flex Code
5336 \begin_layout Plain Layout
5345 \begin_layout Standard
5346 You can find a complete example client written in C in the source distribution
5348 \begin_inset Flex Code
5351 \begin_layout Plain Layout
5352 development/lyxserver/server_monitor.c
5360 \begin_layout Standard
5361 Another useful tool is command-line based client you will find in
5362 \begin_inset Flex Code
5365 \begin_layout Plain Layout
5366 src/client/lyxclient
5374 \begin_layout Section
5375 Normal communication
5378 \begin_layout Standard
5379 To issue a LyX call, the client writes a line of ASCII text into the input
5381 This line has the following format:
5398 \begin_layout Description
5399 clientname is a name that the client can choose arbitrarily.
5400 Its only use is that LyX will echo it if it sends an answer—so a client
5401 can dispatch results from different requesters.
5404 \begin_layout Description
5405 function is the function you want LyX to perform.
5406 It is the same as the commands you'd use in the minibuffer.
5409 \begin_layout Description
5410 argument is an optional argument which is meaningful only to some functions
5412 \begin_inset Quotes eld
5416 \begin_inset Quotes erd
5419 LFUN will insert the argument as text at the cursor position).
5422 \begin_layout Standard
5423 The answer from LyX will arrive in the output pipe and be of the form
5440 \begin_layout Standard
5449 are just echoed from the command request, while
5453 is more or less useful information filled according to how the command
5454 execution worked out.
5455 Some commands, such as
5456 \begin_inset Quotes eld
5460 \begin_inset Quotes erd
5463 , will return information about the internal state of LyX, while other will
5464 return an empty data-response.
5465 This means that the command execution went fine.
5468 \begin_layout Standard
5469 In case of errors, the response from LyX will have this form
5486 \begin_layout Standard
5491 should contain an explanation of why the command failed.
5494 \begin_layout Standard
5498 \begin_layout LyX-Code
5499 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5500 \begin_inset Newline newline
5503 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5504 \begin_inset Newline newline
5507 read a <~/.lyxpipe.out
5508 \begin_inset Newline newline
5514 \begin_layout Section
5518 \begin_layout Standard
5519 LyX can notify clients of events going on asynchronously.
5520 Currently it will only do this if the user binds a key sequence with the
5522 \begin_inset Quotes eld
5526 \begin_inset Quotes erd
5530 The format of the string LyX sends is as follows:
5534 \begin_inset Flex Code
5537 \begin_layout Plain Layout
5548 \begin_layout Standard
5553 is the printed representation of the key sequence that was actually typed
5557 \begin_layout Standard
5558 This mechanism can be used to extend LyX's command set and implement macros.
5559 Bind some key sequence to
5560 \begin_inset Quotes eld
5564 \begin_inset Quotes erd
5568 Then start a client that listens on the output pipe, dispatches the command
5569 according to the sequence, and starts a function that may use LyX calls
5570 and LyX requests to issue a command or a series of commands to LyX.
5573 \begin_layout Section
5574 The simple LyX Server Protocol
5577 \begin_layout Standard
5578 LyX implements a simple protocol that can be used for session management.
5579 All messages are of the form
5592 \begin_layout Standard
5598 \begin_inset Quotes eld
5602 \begin_inset Quotes erd
5606 \begin_inset Quotes eld
5610 \begin_inset Quotes erd
5615 \begin_inset Quotes eld
5619 \begin_inset Quotes erd
5622 is received from a client, LyX will report back to inform the client that
5623 it's listening to it's messages, while
5624 \begin_inset Quotes eld
5628 \begin_inset Quotes erd
5631 sent from LyX will inform clients that LyX is closing.
5634 \begin_layout Section
5635 Reverse DVI/PDF search
5638 \begin_layout Standard
5639 Some DVI/PDF viewers
5643 \begin_layout Plain Layout
5644 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5645 Skim on Mac OSX and SumatraPDF on Windows.
5654 facility (also called
5659 This means that you can tell LyX to put the cursor to a specific line in
5660 the document by clicking at the respective position in the DVI/PDF output.
5661 To achieve this, the viewer must be able to communicate with LyX.
5662 This is done via the LyX server either by using the named pipe (
5666 ), or the UNIX domain socket (
5670 ) that LyX creates in its temporary directory (this is the way the
5671 \begin_inset Flex Code
5674 \begin_layout Plain Layout
5680 program communicates with LyX).
5681 In some cases, you need a helper script that mediates between the viewer
5682 and LyX, in others, the viewer can communicate with LyX directly.
5683 This depends on the selected viewer and on your operating system.
5684 The same applies to the way viewers need to be configured and the way the
5685 reverse search is actually performed.
5686 In what follows, we will thus describe how to setup reverse search for
5688 Before we turn to this, though, we will explain what needs to be done generally
5689 to enable reverse search in the DVI/PDF output.
5692 \begin_layout Subsection
5694 \begin_inset CommandInset label
5696 name "sub:rev-search"
5703 \begin_layout Standard
5704 In most cases LyX will do the work for you by enabling the option
5705 \begin_inset Flex MenuItem
5708 \begin_layout Plain Layout
5709 Synchronize with Output
5715 \begin_inset Flex MenuItem
5718 \begin_layout Plain Layout
5719 Document\SpecialChar \menuseparator
5720 Settings\SpecialChar \menuseparator
5727 In such a case LyX will automatically insert the necessary SyncTeX macro
5728 (for PDF) or load the srcltx package (for DVI) respectively.
5729 This option can be easily reached also on
5730 \begin_inset Flex Code
5733 \begin_layout Plain Layout
5742 \begin_layout Standard
5743 If you need a different setting, you can select or input a custom macro
5744 from the drop down box just below
5745 \begin_inset Flex MenuItem
5748 \begin_layout Plain Layout
5749 Document\SpecialChar \menuseparator
5750 Settings\SpecialChar \menuseparator
5751 Output\SpecialChar \menuseparator
5752 Synchronize with Output
5760 \begin_layout Standard
5761 Note that the method
5762 \begin_inset Flex Code
5765 \begin_layout Plain Layout
5773 enables gzip compression.
5774 If your viewer does not support it, you should instead use
5775 \begin_inset Flex Code
5778 \begin_layout Plain Layout
5789 \begin_layout Standard
5790 Please aöso note that including the
5791 \begin_inset Flex Code
5794 \begin_layout Plain Layout
5801 \begin_inset Flex Code
5804 \begin_layout Plain Layout
5810 sometimes has an undesired impact on the typesetting.
5811 Thus, you should switch output synchronization off for the final typesetting
5813 \begin_inset Flex Code
5816 \begin_layout Plain Layout
5823 \begin_inset Flex Code
5826 \begin_layout Plain Layout
5836 \begin_layout Standard
5837 In case you need some more special settings that are not covered by the
5838 automatic settings, read the next section about how to set up output synchroniz
5840 If the automatic setup suits your needs, you can readily jump to section
5841 \begin_inset space ~
5845 \begin_inset CommandInset ref
5847 reference "sub:configuring-viewers"
5851 , where the necessary configuration steps in your viewer -- needed both
5852 with the automatic and the manual setup -- are described.
5855 \begin_layout Subsection
5859 \begin_layout Standard
5860 LaTeX provides several different methods for reverse search.
5861 Some are built-in in the
5862 \begin_inset Flex Code
5865 \begin_layout Plain Layout
5871 program, some are provided by external packages.
5872 Your choice depends on whether your LaTeX distribution already provides
5873 a given method (the built-in methods are rather new) and whether your viewer
5875 The available methods are described in the following.
5878 \begin_layout Subsubsection*
5879 Built-in DVI-search via src-specials (DVI only)
5882 \begin_layout Standard
5883 This method provides the DVI file with the necessary information for reverse
5885 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5886 distribution should include it), and it works reliably.
5887 To enable it, change the
5888 \begin_inset Flex MenuItem
5891 \begin_layout Plain Layout
5896 \begin_layout Plain Layout
5909 \begin_inset Flex MenuItem
5912 \begin_layout Plain Layout
5917 \begin_layout Plain Layout
5924 eX (plain)->DraftDVI
5930 \begin_inset Flex MenuItem
5933 \begin_layout Plain Layout
5934 Preferences\SpecialChar \menuseparator
5935 File Handling\SpecialChar \menuseparator
5942 \begin_inset Flex Code
5945 \begin_layout Plain Layout
5946 latex -src-specials $$i
5952 If this doesn't work, check if your TeX engine needs different options
5953 (the syntax might differ in some distributions).
5956 \begin_layout Subsubsection*
5957 External Packages (PDFSync and scrltx)
5960 \begin_layout Standard
5969 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5971 In order to enable it, load the packages in the LyX preamble:
5974 \begin_layout Itemize
5975 \begin_inset Flex Code
5978 \begin_layout Plain Layout
5986 for reverse PDF search,
5989 \begin_layout Itemize
5990 \begin_inset Flex Code
5993 \begin_layout Plain Layout
5996 usepackage[active]{srcltx}
6001 for reverse DVI search.
6004 \begin_layout Standard
6005 If you want to be able to perform both DVI and PDF reverse searches, you
6006 can also insert in the preamble the following lines
6009 \begin_layout LyX-Code
6013 \begin_inset Newline newline
6019 \begin_inset Newline newline
6025 \begin_inset Newline newline
6031 \begin_inset Newline newline
6036 usepackage[active]{srcltx}
6037 \begin_inset Newline newline
6045 \begin_layout Standard
6046 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6047 right package will be used.
6050 \begin_layout Standard
6051 Note that PDFSync might affect the output layout of your document.
6052 It is therefore advised to disable PDFsync for final documents.
6055 \begin_layout Subsubsection*
6056 Built-in reverse search via SyncTeX (DVI and PDF)
6059 \begin_layout Standard
6061 \begin_inset Flex Code
6064 \begin_layout Plain Layout
6070 have built-in support for both PDF and DVI reverse search.
6075 facility is basically the result of the integration of the PDFSync package
6076 to the pdftex program and its merge with the
6081 You need at least TeXLive 2008 or a recent MikTeX distribution in order
6083 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6084 already provide SyncTeX support.
6087 \begin_layout Standard
6088 To enable SyncTeX for DVI output, change the
6089 \begin_inset Flex MenuItem
6092 \begin_layout Plain Layout
6097 \begin_layout Plain Layout
6110 \begin_inset Flex MenuItem
6113 \begin_layout Plain Layout
6118 \begin_layout Plain Layout
6125 eX (plain) -> DraftDVI
6131 \begin_inset Flex MenuItem
6134 \begin_layout Plain Layout
6135 Preferences\SpecialChar \menuseparator
6136 File Handling\SpecialChar \menuseparator
6143 \begin_inset Flex Code
6146 \begin_layout Plain Layout
6147 latex -synctex=1 $$i
6152 , and for PDF output, change the
6153 \begin_inset Flex MenuItem
6156 \begin_layout Plain Layout
6161 \begin_layout Plain Layout
6168 eX (pdflatex) -> PDF (pdflatex)
6174 \begin_inset Flex Code
6177 \begin_layout Plain Layout
6178 pdflatex -synctex=1 $$i
6184 Check the documentation of your viewer whether the viewer needs to be configure
6185 d for the use with SyncTeX.
6189 \begin_layout Plain Layout
6190 Note that the option
6191 \begin_inset Flex Code
6194 \begin_layout Plain Layout
6200 option enables gzip compression.
6201 If your viewer does not support it, you should instead use
6202 \begin_inset Flex Code
6205 \begin_layout Plain Layout
6219 \begin_layout Subsection
6220 Configuring and using specific viewers
6221 \begin_inset CommandInset label
6223 name "sub:configuring-viewers"
6230 \begin_layout Subsubsection*
6231 Xdvi (all platforms)
6234 \begin_layout Standard
6236 \begin_inset Flex Code
6239 \begin_layout Plain Layout
6245 , you don't need to do anything else for performing a reverse DVI search,
6246 as LyX already provides the necessary hooks for automatically using the
6248 \begin_inset Flex Code
6251 \begin_layout Plain Layout
6258 Just setup your document as described above (reverse search is triggered
6259 by Ctrl-click or Alt-click on Mac OSX, respectively).
6262 \begin_layout Standard
6263 However, if for whatever reason you want to use the named pipe instead of
6264 the socket for communicating with LyX, simply change the DVI viewer in
6266 \begin_inset Flex MenuItem
6269 \begin_layout Plain Layout
6270 Preferences\SpecialChar \menuseparator
6271 File Handling\SpecialChar \menuseparator
6281 \begin_layout Plain Layout
6282 On Mac OSX you have to use
6283 \begin_inset Flex Code
6286 \begin_layout Plain Layout
6287 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6298 \begin_inset Flex Code
6301 \begin_layout Plain Layout
6302 xdvi -editor 'lyxeditor.sh %f %l'
6308 \begin_inset Flex Code
6311 \begin_layout Plain Layout
6317 is a suitable script.
6318 For example, a minimal shell script is the following one:
6321 \begin_layout LyX-Code
6323 \begin_inset Newline newline
6326 LYXPIPE="/path/to/lyxpipe"
6327 \begin_inset Newline newline
6330 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6331 \begin_inset Newline newline
6334 echo "$COMMAND" > "${LYXPIPE}".in || exit
6335 \begin_inset Newline newline
6338 read < "${LYXPIPE}".out || exit
6341 \begin_layout Standard
6343 \begin_inset Flex Code
6346 \begin_layout Plain Layout
6356 \begin_layout Plain Layout
6363 XServer pipe path specified in
6364 \begin_inset Flex MenuItem
6367 \begin_layout Plain Layout
6368 Preferences\SpecialChar \menuseparator
6378 \begin_layout Plain Layout
6380 \begin_inset Flex Code
6383 \begin_layout Plain Layout
6389 folder of a source distribution you can find a
6390 \begin_inset Flex Code
6393 \begin_layout Plain Layout
6399 script which is able to locate the
6403 based on your preferences.
6411 \begin_layout Subsubsection*
6415 \begin_layout Standard
6417 \begin_inset Flex Code
6420 \begin_layout Plain Layout
6421 /Applications/MacDviX_Folder/calleditor.script
6426 , add the following lines:
6429 \begin_layout LyX-Code
6434 \begin_layout Plain Layout
6441 X.app/Contents/MacOS/lyxeditor "$2" $1
6442 \begin_inset Newline newline
6448 \begin_layout Standard
6449 Modify the lines accordingly if you install LyX somewhere else than in the
6450 Applications folder.
6453 \begin_layout Standard
6454 Reverse search is triggered by Alt-click (OPTION-click).
6457 \begin_layout Subsubsection*
6461 \begin_layout Standard
6463 \begin_inset Flex Code
6466 \begin_layout Plain Layout
6467 open -a Skim.app $$i
6472 to the viewer setting in
6473 \begin_inset Flex MenuItem
6476 \begin_layout Plain Layout
6477 Preferences\SpecialChar \menuseparator
6478 File Handling\SpecialChar \menuseparator
6479 File formats\SpecialChar \menuseparator
6486 \begin_inset Flex MenuItem
6489 \begin_layout Plain Layout
6490 Skim\SpecialChar \menuseparator
6491 Preferences\SpecialChar \menuseparator
6501 \begin_layout Plain Layout
6511 \begin_layout Standard
6512 Reverse search is triggered by COMMAND-SHIFT-click
6515 \begin_layout Subsubsection*
6519 \begin_layout Standard
6521 \begin_inset Flex MenuItem
6524 \begin_layout Plain Layout
6525 Settings\SpecialChar \menuseparator
6526 Configure Okular\SpecialChar \ldots{}
6527 \SpecialChar \menuseparator
6534 \begin_inset Quotes eld
6538 \begin_inset Quotes erd
6542 \begin_inset Flex Code
6545 \begin_layout Plain Layout
6554 \begin_layout Standard
6555 Reverse search is triggered by SHIFT-click.
6558 \begin_layout Subsubsection*
6562 \begin_layout Standard
6563 Launch yap, choose its
6564 \begin_inset Flex MenuItem
6567 \begin_layout Plain Layout
6568 View\SpecialChar \menuseparator
6575 \begin_inset Quotes eld
6579 \begin_inset Quotes erd
6584 \begin_inset Quotes eld
6587 New\SpecialChar \ldots{}
6589 \begin_inset Quotes erd
6592 button and, in the window that opens, enter
6593 \begin_inset Quotes eld
6597 \begin_inset Quotes erd
6600 (or any other name you like) in the
6601 \begin_inset Quotes eld
6605 \begin_inset Quotes erd
6609 Now click on the button labeled
6610 \begin_inset Quotes eld
6613 \SpecialChar \ldots{}
6615 \begin_inset Quotes erd
6618 to open a file dialog and navigate to the directory containing the batch
6620 \begin_inset Flex Code
6623 \begin_layout Plain Layout
6631 \begin_inset Flex Code
6634 \begin_layout Plain Layout
6640 and then specify the program arguments as
6641 \begin_inset Flex Code
6644 \begin_layout Plain Layout
6652 \begin_inset Flex Code
6655 \begin_layout Plain Layout
6661 wrapper is used for communicating with LyX through the
6668 \begin_layout LyX-Code
6670 \begin_inset Newline newline
6673 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6682 \begin_inset Newline newline
6696 \begin_layout Standard
6697 Make sure that the LyXServer pipe path you specified in LyX is
6698 \begin_inset Flex Code
6701 \begin_layout Plain Layout
6715 , otherwise change the
6716 \begin_inset Flex Code
6719 \begin_layout Plain Layout
6725 wrapper accordingly.
6728 \begin_layout Standard
6729 In yap, reverse search is triggered by double-click.
6732 \begin_layout Subsubsection*
6733 SumatraPDF (Windows)
6736 \begin_layout Standard
6737 In order to use SumatraPDF for inverse search, enter
6738 \begin_inset Flex Code
6741 \begin_layout Plain Layout
6742 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6747 in the viewer setting in
6748 \begin_inset Flex MenuItem
6751 \begin_layout Plain Layout
6752 Preferences\SpecialChar \menuseparator
6753 File Handling\SpecialChar \menuseparator
6754 File formats\SpecialChar \menuseparator
6761 \begin_inset Flex Code
6764 \begin_layout Plain Layout
6770 is the previous wrapper.
6771 If SumatraPDF.exe is not in your command PATH, use its full file name.
6774 \begin_layout Standard
6775 Reverse search is triggered by double-click.
6778 \begin_layout Subsubsection*
6782 \begin_layout Standard
6783 First of all, make sure that yap is your default DVI viewer in the Windows
6784 environment, then launch it, choose its
6785 \begin_inset Flex MenuItem
6788 \begin_layout Plain Layout
6789 View\SpecialChar \menuseparator
6796 \begin_inset Quotes eld
6800 \begin_inset Quotes erd
6805 \begin_inset Quotes eld
6808 New\SpecialChar \ldots{}
6810 \begin_inset Quotes erd
6813 button and, in the window that opens, enter
6814 \begin_inset Quotes eld
6818 \begin_inset Quotes erd
6821 (or any other name you like) in the
6822 \begin_inset Quotes eld
6826 \begin_inset Quotes erd
6830 Now click on the button labeled
6831 \begin_inset Quotes eld
6834 \SpecialChar \ldots{}
6836 \begin_inset Quotes erd
6839 to open a file dialog and navigate to the directory containing the
6840 \begin_inset Flex Code
6843 \begin_layout Plain Layout
6849 program (which is installed by default on Cygwin along with the LyX executable).
6851 \begin_inset Flex Code
6854 \begin_layout Plain Layout
6860 and then specify the program arguments as
6861 \begin_inset Flex Code
6864 \begin_layout Plain Layout
6871 In this way, you will be using the
6875 for communicating with LyX.
6876 If, for whatever reason, you want to use the
6881 \begin_inset Flex Code
6884 \begin_layout Plain Layout
6890 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6893 \begin_layout Standard
6894 In yap, reverse search is triggered by double-click.
6897 \begin_layout Subsubsection*
6901 \begin_layout Standard
6902 In order to use SumatraPDF for inverse search, enter
6903 \begin_inset Flex Code
6906 \begin_layout Plain Layout
6907 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6912 in the viewer setting in
6913 \begin_inset Flex MenuItem
6916 \begin_layout Plain Layout
6917 Preferences\SpecialChar \menuseparator
6918 File Handling\SpecialChar \menuseparator
6919 File formats\SpecialChar \menuseparator
6926 If SumatraPDF.exe is not in your command PATH, use its full posix path.
6928 \begin_inset Flex Code
6931 \begin_layout Plain Layout
6937 enables communication via the
6943 \begin_inset Flex Code
6946 \begin_layout Plain Layout
6952 option if you want to use the
6956 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6959 \begin_layout Standard
6960 Reverse search is triggered by double-click.
6963 \begin_layout Section
6967 \begin_layout Standard
6968 Forward search is, as the name implies, in a sense the
6969 \begin_inset Quotes eld
6973 \begin_inset Quotes erd
6977 It allows you to let the viewer jump to a given position from within LyX.
6978 If forward search is set up (as described in what follows), you can put
6979 the cursor anywhere in your LyX document, and hit
6980 \begin_inset Flex MenuItem
6983 \begin_layout Plain Layout
6984 Navigate\SpecialChar \menuseparator
6991 \begin_inset Flex MenuItem
6994 \begin_layout Plain Layout
7000 in the context menu via right mouse click), and then the viewer will jump
7001 to that position as well.
7002 This implies, of course, that your viewer supports this function.
7005 \begin_layout Standard
7006 To make forward search possible, you first need to provide the generated
7007 output PDF/DVI file with additional information about the TeX sources.
7008 This can be done via the methods described in the section
7009 \begin_inset CommandInset ref
7011 reference "sub:rev-search"
7018 \begin_layout Standard
7019 Additionally, you need to configure LyX for using your viewers in
7020 \begin_inset Flex MenuItem
7023 \begin_layout Plain Layout
7024 Tools\SpecialChar \menuseparator
7025 Preferences\SpecialChar \menuseparator
7026 Output\SpecialChar \menuseparator
7033 We provide a range of tested configurations for some viewers, which you
7034 can select from the drop down list.
7035 If none of these configurations suits you, you have to find out and enter
7036 a suitable configuration yourself.
7037 The definition syntax uses the following placeholders:
7040 \begin_layout Itemize
7042 \begin_inset Flex Code
7045 \begin_layout Plain Layout
7054 \begin_layout Itemize
7056 \begin_inset Flex Code
7059 \begin_layout Plain Layout
7065 : name of the (temporary) exported .tex file
7068 \begin_layout Itemize
7070 \begin_inset Flex Code
7073 \begin_layout Plain Layout
7079 : name of the exported output file (either dvi or pdf, depending on which
7080 one exists in the temporary directory)
7083 \begin_layout Standard
7084 Note that only some of the viewers provide full forward search functionality,
7085 among them yap, xdvi, okular and Sumatra PDF.
7089 \begin_layout Plain Layout
7090 For Sumatra CMCDDE is needed --- downloadable from
7091 \begin_inset CommandInset href
7093 target "http://www.istri.fr/zip/CMCDDE.zip"
7102 While many of the widespread PDF viewers (most notably Adobe Reader) do
7103 not support forward search at all, some other viewers -- e.
7104 \begin_inset space \thinspace{}
7108 evince and xpdf -- allow at least to reload the document and jump to a
7109 specific page of the file, so you can at least navigate
7110 \begin_inset Quotes eld
7114 \begin_inset Quotes erd
7118 These latter functionality is provided by an external call of synctex (see
7119 the predefined example configurations).
7123 \begin_layout Standard
7124 Forward search works both with DVI and PDF output.
7125 LyX simply checks which preview format you have used before (i.
7126 \begin_inset space \thinspace{}
7129 e., which format is already there in the temporary directory) and chooses
7130 the appropriate configuration for the respective format.
7133 \begin_layout Chapter
7134 Special Document Classes
7137 \begin_layout Section
7141 \begin_layout Standard
7147 \begin_layout Subsection
7151 \begin_layout Standard
7152 This section describes how LyX can be used to write articles for submission
7153 to the scientific journal
7155 Astronomy and Astrophysics
7157 (www.edpsciences.fr/aa/
7158 \begin_inset Flex URL
7161 \begin_layout Plain Layout
7163 http://www.edpsciences.fr/aa/
7168 ) using Version 5.01 of the document class
7173 This package can be downloaded from the ftp site
7176 \begin_layout Standard
7177 \begin_inset VSpace medskip
7183 \begin_layout Standard
7185 \begin_inset Flex URL
7188 \begin_layout Plain Layout
7190 ftp://ftp.edpsciences.org/pub/aa/readme.html
7198 \begin_layout Standard
7199 \begin_inset VSpace medskip
7205 \begin_layout Standard
7206 A manual comes together with that package, and this text is not meant to
7207 replace the original manual but is merely a short guide in how to realize
7208 the correct form of your paper.
7212 \begin_layout Standard
7213 Please note that the publisher of the journal was changed from Springer
7214 to EDP Sciences starting January 1, 2001.
7215 That change involved also some slight changes to the style files, namely
7216 the removal of the thesaurus command.
7217 The LyX class aa supports the newest version of these style files, V 5.01.
7218 If you have an older version installed, please upgrade.
7219 For compatibility, the old (version 4) layout has been kept as
7224 Please refer to the comments in
7226 LyXDir/layouts/aapaper.layout
7231 \begin_layout Subsection
7235 \begin_layout Standard
7236 It is recommended you start from the example template distributed with LyX.
7237 If you are not using a template, note the following settings:
7240 \begin_layout Itemize
7247 Document\SpecialChar \menuseparator
7250 dialog (OK, that one was obvious).
7253 \begin_layout Itemize
7254 Don't change the option
7257 \begin_inset space ~
7267 The whole layout is done by the macros, you shouldn't change anything.
7270 \begin_layout Subsection
7274 \begin_layout Standard
7275 First thing to enter is the header information.
7276 It consists of seven entries, of which some are optional.
7280 \begin_layout Itemize
7288 \begin_layout Itemize
7296 \begin_layout Itemize
7304 \begin_layout Itemize
7312 \begin_layout Itemize
7317 : [optional] if more than one author: whom to contact for offprint requests.
7320 \begin_layout Itemize
7325 : [optional] mail address for contacts.
7328 \begin_layout Itemize
7336 Received: <date>; Accepted <date>
7339 \begin_layout Standard
7340 There is no need to issue the
7346 command, this is done automatically by LyX when the header is finished.
7347 Although the order of the single header entries doesn't matter it is advised
7348 to keep the above sequence, just to get the best optics and meets the layout
7349 of the real document.
7352 \begin_layout Standard
7353 If you want to place footnotes in the header block, e.
7354 \begin_inset space \thinspace{}
7358 \begin_inset space \space{}
7361 to state your present address, just use the standard footnote via the menu
7364 Insert\SpecialChar \menuseparator
7368 LyX will automagically use the term
7377 \begin_layout Standard
7378 In addition to these topics, the macros use three additional LaTeX commands
7379 that have no counterpart in LyX:
7382 \begin_layout Itemize
7389 to separate different names for more than one author and institute, respectivel
7393 \begin_layout Itemize
7400 to mark corresponding author/institute pairs.
7401 The institutes are numbered sequentially as they appear in the
7405 field, so you have to put a marker to each author.
7408 \begin_layout Itemize
7415 to supply an email address for fast contact.
7418 \begin_layout Standard
7419 In all cases, the appropriate command has to be entered in LyX and marked
7425 \begin_layout Subsection
7429 \begin_layout Standard
7430 The abstract should immediately follow the header block.
7431 With version 5 the abstract environment was changed to a command, and there
7432 is now a resctriction to only one paragraph.
7433 In addition, it should contain an entry with the keywords.
7434 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7441 by hand and mark it as LaTeX code.
7442 Refer to the example paper.
7445 \begin_layout Subsection
7446 Supported environments
7449 \begin_layout Standard
7450 The A&A paper layout supports the following environments for structuring
7454 \begin_layout Itemize
7460 \begin_layout Itemize
7466 \begin_layout Itemize
7472 \begin_layout Itemize
7478 \begin_layout Itemize
7484 \begin_layout Itemize
7490 \begin_layout Itemize
7496 \begin_layout Itemize
7502 \begin_layout Itemize
7508 \begin_layout Itemize
7514 \begin_layout Itemize
7520 \begin_layout Itemize
7526 \begin_layout Subsection
7527 Commands not supported by LyX
7530 \begin_layout Standard
7531 Some commands are not yet supported by the
7536 Some have already been mentioned.
7537 For the sake of completeness, they are listed all together here:
7540 \begin_layout Itemize
7548 \begin_layout Itemize
7556 \begin_layout Itemize
7564 \begin_layout Itemize
7572 \begin_layout Itemize
7580 \begin_layout Itemize
7588 \begin_layout Itemize
7596 \begin_layout Itemize
7604 \begin_layout Standard
7605 If you want to use any of these commands, you have to enter them yourself.
7608 Do not forget to mark them as LaTeX code!
7611 \begin_layout Subsection
7612 Figure and Table Floats
7615 \begin_layout Standard
7616 LyX provides support for the necessary float environments
7618 figure, figure*, table
7624 , therefore we won't tell much about it here.
7628 \begin_inset space ~
7634 Just remember that tables should be left-aligned.
7635 For that, select the table and change the alignment in
7637 Edit\SpecialChar \menuseparator
7639 \begin_inset space ~
7645 \begin_layout Standard
7646 There is only one special thing: the figures with caption besides the figure.
7647 To create such a figure, you have to do the following:
7650 \begin_layout Enumerate
7651 Create a wide figure float:
7653 Insert\SpecialChar \menuseparator
7654 Float\SpecialChar \menuseparator
7657 , then right click in the figure and select
7663 \begin_inset space ~
7671 \begin_layout Enumerate
7672 Enter your caption text.
7675 \begin_layout Enumerate
7680 to move the cursor above the caption.
7683 \begin_layout Enumerate
7687 \begin_layout Enumerate
7688 Position the cursor behind the figure and insert a horizontal fill:
7690 Insert\SpecialChar \menuseparator
7692 \begin_inset space ~
7695 Character\SpecialChar \menuseparator
7697 \begin_inset space ~
7705 \begin_layout Enumerate
7706 Switch to LaTeX mode:
7709 \begin_inset space ~
7717 \begin_layout Enumerate
7727 Do not close the brace!
7730 \begin_layout Enumerate
7731 Position the cursor behind the caption text, switch to LaTeX mode and insert
7735 \begin_inset space ~
7747 \begin_layout Standard
7748 Also, refer to the figures in the example paper.
7751 \begin_layout Subsection
7755 \begin_layout Standard
7756 For submission, the paper has to be formated in a special double-spacing
7758 For this purpose, you have to give the option
7762 to the documentclass.
7763 This must be done using the extra class options field in the
7765 Document\SpecialChar \menuseparator
7769 Just enter the string
7776 \begin_layout Subsection
7780 \begin_layout Standard
7785 directory contains an example paper written with LyX.
7786 It is the example paper from the original macro package, translated to
7788 Use it for inspiration, and compare the original LaTeX code with LyX way
7792 \begin_layout Section
7796 \begin_layout Standard
7802 \begin_layout Subsection
7806 \begin_layout Standard
7807 AASTeX is a set of macros produced by the American Astronomical Society
7808 to facilitate electronic manuscript submission to the three journals they
7809 publish: the Astrophysical Journal (including the Letters and Supplement),
7810 the Astronomical Journal, and the Publications of the Astronomical Society
7812 LyX has proven to be an excellent tool for generating these documents,
7813 especially given its equation, citation, and figure handling capabilities.
7814 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7815 is the version described here, or higher.
7816 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7817 incompatible with LyX.
7818 The AASTeX package may be downloaded from the AASTeX Web site
7821 \begin_layout Standard
7822 \begin_inset VSpace medskip
7828 \begin_layout Standard
7830 \begin_inset Flex URL
7833 \begin_layout Plain Layout
7835 http://www.journals.uchicago.edu/AAS/AASTeX
7843 \begin_layout Standard
7844 \begin_inset VSpace medskip
7850 \begin_layout Standard
7851 A complete user guide is contained in that package and you should familiarize
7852 yourself with it thoroughly before embarking on writing a paper in LyX.
7853 LyX will not reduce the need to figure out all the AASTeX commands, it
7854 will only reduce the drudgery of typing everything in.
7855 It is your responsibility to ensure that the final exported LaTeX document
7856 conforms completely to the requirements of the journal to which you are
7857 submitting your paper.
7860 \begin_layout Subsection
7861 Starting a New Paper
7864 \begin_layout Standard
7865 I strongly suggest that you start with the AASTeX template file.
7868 File\SpecialChar \menuseparator
7875 , enter the new file name, then choose the
7880 This will show the most common fields found in a manuscript.
7881 Simply overwrite the existing text (including the brackets,
7885 ) with the correct information.
7886 Many of the AASTeX commands and environments can be implemented directly
7887 in LyX, but some cannot: most noticeably
7899 , which should stick out like a sore thumb if you actually just opened the
7901 For commands such as these, the LaTeX code must be entered directly and
7903 Such commands are referred to as TeX code, or Evil Red Text.
7904 I tried to minimize the amount of TeX code needed in an AASTeX document,
7905 but there is still a bit more required than any of us would like.
7908 \begin_layout Subsection
7909 Finishing Your Paper
7912 \begin_layout Standard
7913 When the paper is finished to your satisfaction and previews/prints correctly,
7915 \begin_inset Quotes eld
7919 \begin_inset Quotes erd
7922 actions which need to be done before you submit it to the journals.
7926 \begin_layout Enumerate
7927 Export your paper as a LaTeX file (
7929 File\SpecialChar \menuseparator
7930 Export\SpecialChar \menuseparator
7937 \begin_layout Enumerate
7942 file with your favorite text editor
7946 \begin_layout Enumerate
7947 remove the comment lines before the
7956 \begin_layout Enumerate
7961 usepackage...{fontenc}
7963 line if it appears (usually just after
7978 \begin_layout Enumerate
7979 remove everything between (and including) the
7991 commands, except for any commands you specifically put into the LaTeX preamble
7992 (which should appear immediately after the
7993 \begin_inset Quotes eld
7996 User specified LaTeX commands
7997 \begin_inset Quotes erd
8008 \begin_layout Enumerate
8009 Run the resulting file through LaTeX to make sure it still processes correctly.
8012 \begin_layout Enumerate
8013 Reread the journal requirements to make sure your filenames and formats
8017 \begin_layout Enumerate
8021 \begin_layout Subsection
8022 Comments On Specific Commands
8025 \begin_layout Standard
8026 I will not describe the detailed usage of the individual AASTeX commands:
8027 the AASTeX User Guide (
8031 ) gives a good description of each.
8032 Thus it's probably easiest for me to go down the list as found in the guide
8033 and offer comments where necessary.
8034 So let's begin \SpecialChar \ldots{}
8038 \begin_layout Subsubsection
8039 Things that work as expected
8042 \begin_layout Standard
8043 Because they work as you might expect, I simply list them and the section
8144 begin{thebibliography}
8152 (2.13.2), all the cite commands and their variations (2.13.2), the generic
8153 graphicx figure commands (2.14.1),
8177 (2.15.4, amongst other places),
8204 \begin_layout Standard
8205 The following style options also work correctly:
8226 Simply put them in the
8232 Layout\SpecialChar \menuseparator
8238 \begin_layout Subsubsection
8239 Things that work, but require more comment
8242 \begin_layout Standard
8243 The following items work, but require a little more discussion:
8246 \begin_layout Itemize
8247 These items are reserved for use by the journal editors, but you can put
8248 them into the LaTeX preamble if you feel compelled to do so:
8281 \begin_layout Itemize
8282 These items may be placed in the LaTeX preamble, and are included as blanks
8283 in the template file:
8304 \begin_layout Itemize
8311 (2.3) – can only be used
8312 \begin_inset Quotes eld
8316 \begin_inset Quotes erd
8319 , not in the middle of a paragraph.
8320 Use TeX code if you need to embed it.
8323 \begin_layout Itemize
8330 (2.3) – will have extra {} after it.
8331 This should not cause an error.
8334 \begin_layout Itemize
8341 (2.6) – can only be used
8342 \begin_inset Quotes eld
8346 \begin_inset Quotes erd
8349 , not in the middle of a paragraph.
8350 Use TeX code if you need to embed it.
8353 \begin_layout Itemize
8360 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8364 \begin_layout Itemize
8378 \begin_layout Itemize
8385 (2.9) – will have extra {} after it.
8386 This should not cause an error.
8389 \begin_layout Itemize
8396 (2.11) – will have extra {} after it.
8397 This should not cause an error.
8400 \begin_layout Itemize
8407 (2.14.2) – you can insert an optional filename argument by placing the cursor
8408 at the beginning of the text and selecting
8410 Insert\SpecialChar \menuseparator
8415 \begin_inset Quotes eld
8419 \begin_inset Quotes erd
8422 inserts an optional argument of the type needed by
8429 Hopefully it will be renamed someday.
8432 \begin_layout Itemize
8445 for the catalog ID optional parameter
8448 \begin_layout Itemize
8461 for the catalog ID optional parameter
8464 \begin_layout Subsubsection
8465 Things not implemented, use TeX code
8468 \begin_layout Standard
8491 setcounter{equation}
8493 (2.12), Journal name abbreviations (2.13.4),
8529 (2.15.4, insert it as the first element in the lefthand cell after where
8531 Don't use any of LyX's rules in the table),
8543 (2.15.5), much of Misc (2.17, except
8594 \begin_layout Subsubsection
8595 Things that cannot be implemented
8598 \begin_layout Standard
8599 \SpecialChar \ldots{}
8600 at least in any meaningful sort of way, so I suggest ignoring them.
8601 They are the references environment (2.13.3), and the deluxetable environment
8603 If you really, really need to use deluxetable, I suggest editing it in
8604 a separate file with a text editor, then using
8606 Insert\SpecialChar \menuseparator
8608 \begin_inset space ~
8613 to include it in your LyX document.
8618 file to see an example of this.
8621 \begin_layout Subsection
8622 FAQs, Tips, Tricks, and Other Ruminations
8625 \begin_layout Subsubsection
8626 Getting LyX and AASTeX to cooperate
8629 \begin_layout Standard
8630 It can be a bit tricky to get LyX to recognize a new layout and document
8632 When all else fails, do this:
8635 \begin_layout Enumerate
8636 Make certain that LaTeX can find AASTeX.
8637 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8638 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8645 \begin_layout Enumerate
8657 \begin_layout Enumerate
8660 Tools\SpecialChar \menuseparator
8663 in LyX, then restart LyX.
8666 \begin_layout Enumerate
8667 Open a regular new file, not from a template.
8668 Does AASTeX appear in the class list in
8670 Document\SpecialChar \menuseparator
8676 \begin_layout Standard
8677 If you get a warning from an existing AASTeX document about not being able
8678 to find the AASTeX layout or a message about
8679 \begin_inset Quotes eld
8682 You should not mix title layouts with normal ones
8683 \begin_inset Quotes erd
8686 , things haven't been installed correctly.
8689 \begin_layout Subsubsection
8690 LaTeX error processing a table
8693 \begin_layout Standard
8694 LyX, by default, attempts to center the table caption/title.
8695 This seems to produce a bad interaction in AASTeX so you should click somewhere
8696 in the caption/title, then select
8698 Edit\SpecialChar \menuseparator
8700 \begin_inset space ~
8714 This took care of it for me.
8717 \begin_layout Subsubsection
8721 \begin_layout Standard
8722 A couple of things: 1) I have noticed some funny spacing in the reference
8723 entries in the text.
8724 When you enter the bibliography item data, make sure their is
8728 space between the last author and the parenthesis setting off the year;
8732 \begin_inset space \thinspace{}
8736 \begin_inset space \space{}
8750 2) Entering the references at all is not obvious.
8751 The easiest thing is to start typing your first reference at the end of
8752 the document, then mark it as type
8757 That will put a small gray box in front of what you just typed.
8758 Click on the box to fill in the rest of the information.
8759 For new references, go to the end of an existing reference and press return.
8760 That will create a new line with its own box, etc.
8763 \begin_layout Subsubsection
8767 \begin_layout Standard
8768 Even though AASTeX provides its own figure commands (
8774 , for example), I much prefer LaTeX's standard figure commands (with the
8783 \begin_inset space ~
8786 commands as TeX code into a Figure Float box if you desire, but I never
8787 have much luck getting the layout right.
8788 With the standard graphics, LyX will insert a
8792 usepackage{graphicx}
8794 command into the LaTeX preamble and handle the figures in the standard
8795 LaTeX2e way, interspersing the figures in the text.
8796 I believe ApJ accepts figures exactly this way now; AJ might still use
8798 \begin_inset Quotes eld
8801 stack everything at the end
8802 \begin_inset Quotes erd
8808 \begin_layout Subsubsection
8809 Things I could have done, but didn't
8812 \begin_layout Standard
8814 \begin_inset Quotes eld
8818 \begin_inset Quotes erd
8821 things I could have implemented, but chose not to.
8822 For instance, I saw no point in double-spacing the text in the LyX window,
8823 even though it is double-spaced in the paper manuscript.
8824 Also, I chose not to make separate layouts for the preprint and preprint2
8826 Since I assume you will spend most of your time in the plain manuscript
8827 mode anyway, I decided not to chew up more disk space with this.
8831 \begin_layout Subsection
8835 \begin_layout Standard
8836 Your mileage may vary.
8837 I've now had papers published by both ApJ and AJ that have had 98% of the
8838 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8840 I have had no trouble with the submission process, and I'm sure the journals
8841 were never aware that there might be a difference.
8842 So, go forth and publish!
8845 \begin_layout Section
8849 \begin_layout Standard
8859 \begin_layout Standard
8860 \begin_inset VSpace bigskip
8866 \begin_layout Standard
8868 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8869 papers to be submitted to American Mathematical Society publications.
8870 The layouts are not tailored to a specific journal, but easily can be.
8871 You should refer to the AMS documentation for specific instructions for
8872 each journal (usually it will entail only changing a single line in the
8874 That documentation is available on the Web at
8875 \begin_inset Flex URL
8878 \begin_layout Plain Layout
8886 \begin_inset Flex URL
8889 \begin_layout Plain Layout
8891 ftp://ftp.ams.org/pub/tex/amslatex/
8897 These layouts are appropriate, and useful, for any mathematical writing.
8901 \begin_layout Standard
8902 There are two basic AMS LaTeX layouts:
8905 \begin_layout Itemize
8906 amsart: The standard AMS article format.
8909 \begin_layout Itemize
8910 amsbook: the standard AMS book (really, monograph) format.
8914 \begin_layout Standard
8915 The layouts themselves contain only the minimum necessary to use the AMS
8917 They do not, in particular, contain any of the `theorem' environments used
8918 for setting theorems, lemmas, and the like.
8919 These are contained, instead, in the
8920 \begin_inset Flex Code
8923 \begin_layout Plain Layout
8929 module, which is loaded by default when when you select one of the AMS
8931 (It can also be used with other classes and can be removed, if you would
8932 rather use something else.) Less commonly used environments are in the
8933 \begin_inset Flex Code
8936 \begin_layout Plain Layout
8937 Theorems (AMS-Extended)
8942 module, which must be loaded manually.
8945 \begin_layout Standard
8946 By default, theorems and the like are numbered consecutively throughout
8947 the document, but this may be modified by loading the module
8948 \begin_inset Flex Code
8951 \begin_layout Plain Layout
8952 Theorems (Order by Section)
8957 or, if you are using
8958 \begin_inset Flex Code
8961 \begin_layout Plain Layout
8968 \begin_inset Flex Code
8971 \begin_layout Plain Layout
8972 Theorems (Order by Chapter)
8978 These will number the results as
8979 \begin_inset Formula $n.m$
8982 , where the first number refers to the section (or chapter) and the second
8983 refers to the total number of results so far in that section (or chapter).
8984 Many environments are also available unnumbered.
8985 These are indicated by an asterisk at the end.
8986 If you happen to want
8990 unnumbered results, the module
8991 \begin_inset Flex Code
8994 \begin_layout Plain Layout
9000 provides that option.
9003 \begin_layout Standard
9004 Note that these modules do not
9008 to be used with the AMS classes.
9009 It is perfectly possible to use the
9010 \begin_inset Flex Code
9013 \begin_layout Plain Layout
9019 module, and the others mentioned, with other classes, such as
9020 \begin_inset Flex Code
9023 \begin_layout Plain Layout
9030 \begin_inset Flex Code
9033 \begin_layout Plain Layout
9040 \begin_inset Flex Code
9043 \begin_layout Plain Layout
9052 \begin_layout Subsection
9053 What these layouts provide
9056 \begin_layout Standard
9057 There is a long list of included environments provided by these layouts.
9058 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9059 variety of `theorem' environments.
9060 However, the AMS recommends the environments that are available in LyX.
9064 \begin_layout Standard
9065 The following environments—as well as the standard environments, such as
9067 \begin_inset Flex Noun
9070 \begin_layout Plain Layout
9077 \begin_inset Flex Noun
9080 \begin_layout Plain Layout
9087 \begin_inset Flex Noun
9090 \begin_layout Plain Layout
9097 \begin_inset Flex Noun
9100 \begin_layout Plain Layout
9107 \begin_inset Flex Noun
9110 \begin_layout Plain Layout
9117 \begin_inset Flex Code
9120 \begin_layout Plain Layout
9127 \begin_inset Flex Code
9130 \begin_layout Plain Layout
9139 \begin_layout Description
9140 Address This should be the author's permanent address.
9143 \begin_layout Description
9145 \begin_inset space ~
9148 Address This should be the author's temporary address at the time of submission,
9149 if different from the Address.
9152 \begin_layout Description
9153 Email Author's e-mail address
9156 \begin_layout Description
9157 URL Author's Web address, if desired.
9160 \begin_layout Description
9161 Keywords Key words or phrases used to identify specific topics discussed
9165 \begin_layout Description
9166 Subjectclass These refer to the AMS Subject Classifications, published and
9169 Mathematical Reviews
9172 These are also available online at the AMS cites listed above.
9175 \begin_layout Description
9179 \begin_layout Description
9183 \begin_layout Description
9187 \begin_layout Standard
9188 The following environments are provided by both the
9189 \begin_inset Flex Code
9192 \begin_layout Plain Layout
9199 \begin_inset Flex Code
9202 \begin_layout Plain Layout
9208 modules, in the latter case in both starred (unnumbered) and unstarred
9209 (numbered) versions.
9210 These same environments are provided only in the starred versions by the
9212 \begin_inset Flex Code
9215 \begin_layout Plain Layout
9224 \begin_layout Theorem
9225 This is typically used for the statements of major results.
9229 \begin_layout Corollary*
9230 This is used for statements which follow fairly directly from previous statement
9232 Again, these can be major results.
9237 These are smaller results needed to prove other statements.
9240 \begin_layout Proposition
9241 These are less major results which (hopefully) add to the general theory
9245 \begin_layout Conjecture
9246 These are statements provided without justification, which the author does
9247 not know how to prove, but which seem to be true (to the author, at least).
9250 \begin_layout Definition*
9251 Guess what this is for.
9252 The font is different for this environment than for the previous ones.
9256 \begin_layout Example*
9257 Used for examples illustrating proven results.
9260 \begin_layout Problem
9261 It's not really known what this is for.
9262 You should figure it out.
9265 \begin_layout Exercise*
9266 Write a description for this one.
9269 \begin_layout Remark
9270 This environment is also a type of theorem, usually a lesser sort of observation.
9273 \begin_layout Claim*
9274 Often used in the course of giving a proof of a larger result.
9278 Generally, these are used to break up long arguments, using specific instances
9284 The numbering scheme for cases is on its own, not together with other numbered
9290 At the end of this environment, a QED symbol (usually a square, but it can
9291 vary with different styles) is placed.
9292 If you want to have other environments within this one—for example, Case
9293 environments—and have the QED symbol appear only after them, then the other
9294 environments need to be nested within the proof environment.
9297 Nesting Environments
9303 for information on nesting.
9306 \begin_layout Standard
9307 And these environments are provided by
9308 \begin_inset Flex Code
9311 \begin_layout Plain Layout
9312 Theorems (AMS-Extended)
9320 \begin_layout Criterion*
9321 A required condition.
9324 \begin_layout Algorithm*
9325 A general procedure to be used.
9328 \begin_layout Axiom*
9329 This is a property or statement taken as true within the system being discussed.
9332 \begin_layout Condition*
9333 Sometimes used to state a condition assumed within the present context of
9338 Similar to a Remark.
9341 \begin_layout Notation*
9342 Used for the explanation of, yes, notation.
9345 \begin_layout Summary
9346 Do we really need to tell you?
9349 \begin_layout Acknowledgement*
9353 \begin_layout Conclusion*
9354 Sometimes used at the end of a long train of argument.
9358 Used in a way similar to Proposition, though perhaps lower on the scale.
9361 \begin_layout Standard
9362 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9364 They need to be available on your system in order to use these environments.
9367 \begin_layout Section
9375 \begin_layout Standard
9381 \begin_layout Subsection
9385 \begin_layout Standard
9386 These are the layout files for some of the journals of the American Geophysical
9388 It is assumed that you have both the AGU's own class files and AGUplus
9389 installed (everything to be found at
9390 \begin_inset Flex URL
9393 \begin_layout Plain Layout
9395 ftp://ftp.agu.org/journals/latex/journals
9403 \begin_layout Subsection
9407 \begin_layout Standard
9417 They are still called this in the LyX GUI, though their LaTeX equivalents
9418 in the AGU classes are
9429 \begin_layout Standard
9430 Newly defined styles are
9467 These are mostly manuscript attributes and defined in the AGU class documentati
9471 \begin_layout Standard
9472 I suspect this is still badly incomplete.
9475 \begin_layout Subsection
9479 \begin_layout Standard
9496 \begin_layout Subsection
9500 \begin_layout Itemize
9503 Journal of Geophysical Research
9512 \begin_layout Standard
9513 Add your own, it isn't so hard! Look at the
9524 \begin_layout Subsection
9525 Bugs and things to remember
9528 \begin_layout Standard
9529 In order to use the new layouts, you must remember to do the following for
9533 \begin_layout Enumerate
9539 This can be done in the
9541 Layout\SpecialChar \menuseparator
9546 Document\SpecialChar \menuseparator
9550 (AGU articles are always in English, right? So
9557 \begin_layout Enumerate
9567 (Yes, this is a bug.)
9570 \begin_layout Enumerate
9571 Make sure you use the
9575 bibliography style, by entering
9579 into the second field of the BibTeX inset.
9580 None of the standard styles will do.
9583 \begin_layout Section
9587 \begin_layout Standard
9593 \begin_layout Subsection
9597 \begin_layout Standard
9598 Broadway is for writing plays.
9599 The format is more decorative than Hollywood, and much less standardized.
9600 This format should be suitable for workshops.
9603 \begin_layout Subsection
9607 \begin_layout Standard
9608 The same as in Hollywood.
9611 \begin_layout Subsection
9615 \begin_layout Standard
9620 names as labels then cross-reference the label to insert the name.
9621 The cross-reference dialog will show the current cast of characters.
9624 \begin_layout Subsection
9625 Paper size and Margins
9628 \begin_layout Standard
9629 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9632 \begin_layout Subsection
9636 \begin_layout Standard
9637 The following environments are available.
9638 You can use broadway.bind to get the bind keys shown at the right.
9641 \begin_layout Itemize
9645 \begin_inset Newline newline
9650 You should not have to use this, but it is here for anything that does not
9654 \begin_layout Itemize
9658 \begin_inset space \hfill{}
9662 \begin_inset Newline newline
9667 Used to describe stage setting and the action.
9668 First use of speaker names in all CAPs.
9671 \begin_layout Itemize
9675 \begin_inset space \hfill{}
9679 \begin_inset Newline newline
9684 Automatically numbered.
9685 On screen it will be arabic, but will print as Roman.
9688 \begin_layout Itemize
9692 \begin_inset space \hfill{}
9696 \begin_inset Newline newline
9706 It is just centered text.
9709 \begin_layout Itemize
9713 \begin_inset space \hfill{}
9717 \begin_inset Newline newline
9722 Not automatically numbered.
9723 You supply the number.
9724 This is because I couldn't figure out how.
9727 \begin_layout Itemize
9731 \begin_inset space \hfill{}
9735 \begin_inset Newline newline
9740 A special case of Narrative to describe the setting and action as the curtain
9744 \begin_layout Itemize
9748 \begin_inset space \hfill{}
9752 \begin_inset Newline newline
9757 The speaker's (actor's) title, centered in all CAPS.
9760 \begin_layout Itemize
9764 \begin_inset space \hfill{}
9768 \begin_inset Newline newline
9773 Instructions to the speaker.
9774 The parentheses are automatically inserted.
9775 The ( will appear on screen, but both will be in the printed play.
9776 This environment is only used within
9783 \begin_layout Itemize
9787 \begin_inset space \hfill{}
9791 \begin_inset Newline newline
9796 What the Speaker says.
9799 \begin_layout Itemize
9803 \begin_inset space \hfill{}
9807 \begin_inset Newline newline
9812 The curtain comes down.
9815 \begin_layout Itemize
9819 \begin_inset space \hfill{}
9825 \begin_layout Itemize
9829 \begin_inset space \hfill{}
9835 \begin_layout Itemize
9839 \begin_inset space \hfill{}
9845 \begin_layout Standard
9849 \begin_layout Section
9853 \begin_layout Standard
9858 can be used to type letters according to German conventions.
9859 A template file is included in
9861 .../lyx/share/templates
9863 for you to use as a starting point.
9866 \begin_layout Section
9874 \begin_layout Standard
9880 \begin_layout Subsection
9884 \begin_layout Standard
9885 This is the layout file for the European Geophysical Society journals.
9890 can be downloaded from the web site of the EGS under
9891 \begin_inset Flex URL
9894 \begin_layout Plain Layout
9904 \begin_layout Subsection
9908 \begin_layout Standard
9911 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9919 The current layout file is unfortunately very unmodular and would benefit
9920 from using the various
9927 \begin_layout Section
9931 \begin_layout Standard
9932 See the LyX template file
9937 It contains all infos you need.
9940 \begin_layout Section
9946 \begin_inset CommandInset label
9955 \begin_layout Standard
9961 \begin_layout Subsection
9965 \begin_layout Standard
9966 This section describes how to use LyX to make slides for overhead projectors.
9967 There are two document classes that can do this: the default slides class
9973 This section documents the latter.
9976 \begin_layout Standard
9977 I'm going to say this again, nice and clear, so that there's no misunderstanding
9981 \begin_layout Standard
9982 \begin_inset VSpace bigskip
9988 \begin_layout Standard
9992 This section documents the class
9993 \begin_inset Quotes eld
10001 \begin_inset Quotes erd
10009 \begin_layout Standard
10010 \begin_inset VSpace bigskip
10016 \begin_layout Standard
10017 If you're looking for the documentation for
10018 \begin_inset Quotes eld
10026 \begin_inset Quotes erd
10029 , check out section
10030 \begin_inset space ~
10034 \begin_inset CommandInset ref
10036 reference "sec:slitex"
10041 If your machine doesn't have the
10046 \begin_inset Quotes eld
10054 \begin_inset Quotes erd
10057 ] installed, you'll probably have to use the default
10061 class, which isn't quite as good as
10066 \begin_layout Standard
10071 class is designed for use with version 2.1 of the
10075 LaTeX class file which is now an integral part of LaTeX2e.
10078 \begin_layout Subsection
10082 \begin_layout Standard
10083 Obviously, to use this document class, you need to select
10084 \begin_inset Quotes eld
10092 \begin_inset Quotes erd
10102 \begin_inset space ~
10108 There are some settings in the
10111 \begin_inset space ~
10116 dialog that you should know about that are specific to this class:
10119 \begin_layout Itemize
10120 Don't change the options
10131 \begin_inset space ~
10137 They're ignored by the
10144 \begin_layout Itemize
10145 The default font size is 20
10146 \begin_inset space \thinspace{}
10149 pt with the other options being 17
10150 \begin_inset space \thinspace{}
10154 \begin_inset space \thinspace{}
10158 \begin_inset space \thinspace{}
10164 \begin_layout Itemize
10165 The default font is
10173 but all math equations are still typeset in the usual roman font.
10176 \begin_layout Itemize
10181 supports A4 and Letter paper sizes as well as a special size for working
10183 \begin_inset space \thinspace{}
10187 It doesn't support A5, B5, legal or executive paper sizes.
10190 \begin_layout Itemize
10191 Don't bother changing the
10195 settings because they are ignored anyway.
10196 All floats appear where they are defined in the text.
10199 \begin_layout Itemize
10204 setting behaves a bit differently for this class.
10209 provides extensive footer and header capabilities including a user-defined
10212 \begin_inset space ~
10216 \begin_inset CommandInset ref
10218 reference "sec:foilfoot"
10223 The title page is treated differently to all other pages in the document
10232 has the logo centered at the bottom of the page (if one is defined).
10233 The possible page style choices and what they do are as follows:
10237 \begin_layout Labeling
10238 \labelwidthstring MMMMMMM
10245 The final output contains no page numbers, or other headers or footers
10246 (except footnotes of course).
10250 \begin_layout Labeling
10251 \labelwidthstring MMMMMMM
10258 The final output contains page numbers centered at the bottom of the page.
10259 No other headings or footers (other than footnotes).
10262 \begin_layout Labeling
10263 \labelwidthstring MMMMMMM
10268 Page numbers in lower right corner.
10269 Additional headers and footers are also shown.
10270 This is also the default.
10273 \begin_layout Labeling
10274 \labelwidthstring MMMMMMM
10279 Gives you access to the
10283 package although its use with
10287 is discouraged by the writer of the
10291 package because of some potential page layout clashes.
10295 \begin_layout Subsubsection
10299 \begin_layout Standard
10300 The following options may be used in the extra class options in the
10302 Document\SpecialChar \menuseparator
10308 \begin_layout Labeling
10309 \labelwidthstring MMMMMMx
10314 This sets up the page layout for 7.33
10315 \begin_inset space \thinspace{}
10319 \begin_inset space \thinspace{}
10322 in paper, which is about the same aspect ratio as a 35
10323 \begin_inset space \thinspace{}
10326 mm slide, making it a bit easier to work with this medium.
10329 \begin_layout Labeling
10330 \labelwidthstring MMMMMMx
10335 Places a rule across the page below the header on every page except the
10339 \begin_layout Labeling
10340 \labelwidthstring MMMMMMx
10345 Places a rule across the page above the footer on every page except the
10349 \begin_layout Labeling
10350 \labelwidthstring MMMMMMx
10355 This is automatically set each time you create a new
10364 to use the dvips driver to rotate those pages that are set as landscape
10368 \begin_layout Labeling
10369 \labelwidthstring MMMMMMx
10374 Simply changes the page dimensions to those of a landscape page but doesn't
10376 Thus if you use this option you need to use an external program to rotate
10377 each page or feed your paper through your printer as landscape.
10378 Note that this option effectively reverses the roles of the
10386 environments (don't worry these are described in the next section).
10389 \begin_layout Labeling
10390 \labelwidthstring MMMMMMx
10395 Equation numbers on the left.
10398 \begin_layout Labeling
10399 \labelwidthstring MMMMMMx
10404 Flush-left equations.
10407 \begin_layout Subsection
10408 Supported Environments
10411 \begin_layout Standard
10412 Most of the environments commonly supported in other classes are also supported
10418 There are several additional environments provided by
10422 as well as a couple added by LyX.
10423 The following environments are shared with other classes:
10426 \begin_layout Standard
10430 \begin_layout Plain Layout
10434 begin{multicols}{2}
10442 \begin_layout Itemize
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 Itemize
10520 \begin_layout Itemize
10526 \begin_layout Itemize
10532 \begin_layout Itemize
10538 \begin_layout Itemize
10544 \begin_layout Itemize
10550 \begin_layout Standard
10554 \begin_layout Plain Layout
10566 \begin_layout Standard
10567 That is, all the major environments apart from the sectioning environments.
10568 Since foils are essentially self-contained sections, with a title and body,
10573 provides specific commands for starting new foils and these are:
10576 \begin_layout Itemize
10582 \begin_layout Itemize
10588 \begin_layout Standard
10589 LyX also provides slightly modified versions of these two environments called:
10592 \begin_layout Itemize
10598 \begin_layout Itemize
10601 ShortRotatefoilhead
10604 \begin_layout Standard
10605 and the differences will be explained in the next section.
10608 \begin_layout Standard
10609 Since foils are often used in presenting ideas or new theorems and such
10614 also provides a comprehensive box of goodies for presenting them:
10617 \begin_layout Standard
10621 \begin_layout Plain Layout
10625 begin{multicols}{2}
10633 \begin_layout Itemize
10639 \begin_layout Itemize
10645 \begin_layout Itemize
10651 \begin_layout Itemize
10657 \begin_layout Itemize
10663 \begin_layout Itemize
10669 \begin_layout Itemize
10675 \begin_layout Itemize
10681 \begin_layout Itemize
10687 \begin_layout Itemize
10693 \begin_layout Itemize
10699 \begin_layout Standard
10703 \begin_layout Plain Layout
10715 \begin_layout Standard
10716 The starred versions are unnumbered while the unstarred versions are numbered.
10717 There are also two list environments added by LyX and these are:
10720 \begin_layout Itemize
10726 \begin_layout Itemize
10732 \begin_layout Standard
10737 provides some powerful header and footer capabilities that are best set
10738 in the preamble although they may be set at any point in a document.
10739 If you want to change these settings in your document the best place to
10740 do so is at the very top of a foil, i.
10741 \begin_inset space \thinspace{}
10747 \begin_inset space \space{}
10752 straight after the foilhead.
10755 \begin_layout Standard
10756 For this purpose, the following command styles are provided [
10763 \begin_layout Standard
10767 \begin_layout Plain Layout
10771 begin{multicols}{2}
10779 \begin_layout Itemize
10783 \begin_inset space ~
10789 \begin_layout Itemize
10795 \begin_layout Itemize
10799 \begin_inset space ~
10805 \begin_layout Itemize
10809 \begin_inset space ~
10815 \begin_layout Itemize
10819 \begin_inset space ~
10826 \begin_layout Standard
10827 \begin_inset space ~
10834 \begin_layout Standard
10838 \begin_layout Plain Layout
10850 \begin_layout Standard
10851 There are also a few commands provided by
10855 that aren't directly supported by LyX but I'll tell you what they do and
10856 how to use them in section
10857 \begin_inset space ~
10861 \begin_inset CommandInset ref
10863 reference "sec:unsuppfoils"
10870 \begin_layout Subsection
10871 Building a Set of Foils
10874 \begin_layout Standard
10875 This section will give a simple introduction to using the different environments
10876 to build a set of foils.
10877 If you want to see an example set of foils, take a look at the
10881 file you find in LyX's
10888 \begin_layout Subsubsection
10889 Give It a Title Page
10892 \begin_layout Standard
10893 Unlike other classes that provide
10913 creates the title on a page of its own.
10914 If you leave out the
10918 environment LaTeX will substitute the current date (every time you regenerate
10922 \begin_layout Subsubsection
10926 \begin_layout Standard
10927 As I mentioned earlier, there are four ways of starting a new foil.
10928 For portrait foils you should use
10937 The difference between these two environments is the amount of space between
10938 the title of the foil (the foilhead) and the body of the foil.
10941 \begin_layout Standard
10942 Landscape foils are generated using the
10948 ShortRotatefoilhead
10951 Again the only difference is the spacing between foilhead and body.
10952 Both of the short versions have 0.5 inches less separation between the foilhead
10957 \begin_layout Standard
10958 One problem with the support for landscape foils is the requirement that
10959 you have to use the
10963 driver to generate the PostScript output otherwise the foils won't be rotated.
10964 It is possible to get landscape foils even if you haven't got the
10968 driver provided you can feed your foils sideways through your printer ;-)
10971 \begin_layout Subsubsection
10972 Theorems, Lemmas, Proofs and more
10975 \begin_layout Standard
10976 Due to a small bug in LyX you can't have two of the same type of these environme
10977 nts directly following each other.
10978 They must be separated by something.
10979 If you try, you will just be extending the previous environment as if you
10980 had merged the two environments together.
10981 So, how do you get around this problem? The simplest option is to insert
10982 some text between the two environments or add a
10986 environment between the two with just a
10987 \begin_inset Quotes eld
10995 \begin_inset Quotes erd
10999 This will force LyX to produce two separate environments and hence the
11000 correct LaTeX output.
11001 An example is provided in the example file included with the LyX distribution.
11002 Remember, this problem only occurs if you are trying to place two of the
11003 same type of theorem-like environments one directly after the other.
11006 \begin_layout Subsubsection
11010 \begin_layout Standard
11011 You get all the commonly supported list styles found in other classes as
11012 well as two new ones.
11013 I'll only describe the new ones here.
11014 If you want to find out more about the other list environments check out
11020 If you intend to use itemized lists you might also want to read about the
11024 \begin_inset space ~
11028 \begin_inset space ~
11033 dialog described above in section
11034 \begin_inset space ~
11038 \begin_inset CommandInset ref
11040 reference "sec:bullet"
11047 \begin_layout Standard
11048 The two new list styles,
11056 , are designed to make it easier for you to create lists of do's and don'ts
11057 or right and wrong by providing dedicated environments that use a tick
11058 or a cross as the label of the list.
11059 These lists are in fact dedicated variants of the
11064 They do however require that you have the
11068 packages installed.
11071 \begin_layout Subsubsection
11075 \begin_layout Standard
11080 redefines the floating tables and figures so that they appear exactly where
11081 they are in the text rather than pushing them to the top of the page or
11082 to some user specified location.
11083 In fact if you change the float placement settings they are simply ignored.
11086 \begin_layout Subsubsection
11087 Page Headers and Footers
11088 \begin_inset CommandInset label
11090 name "sec:foilfoot"
11097 \begin_layout Standard
11101 \begin_inset space ~
11110 are two commands used to control the left-footer text string.
11111 The first is meant to allow you to include a graphic logo on your foils
11113 \begin_inset Quotes eld
11121 \begin_inset Quotes erd
11125 While the second is meant to provide a classification for the audience,
11129 \begin_inset space \thinspace{}
11135 \begin_inset space \space{}
11139 It is empty by default.
11142 \begin_layout Standard
11143 The remaining page corners can be filled by
11146 \begin_inset space ~
11151 (which defaults to page numbers),
11154 \begin_inset space ~
11162 \begin_inset space ~
11170 \begin_layout Subsection
11176 \begin_inset CommandInset label
11178 name "sec:unsuppfoils"
11185 \begin_layout Standard
11186 All the commands mentioned below need to be set in a
11194 within another environment.
11197 \begin_layout Subsubsection
11201 \begin_layout Standard
11202 All lengths are adjusted using the
11225 should be replaced by the name given to the length you want to change and
11230 is the length value.
11231 All lengths should be specified in units of length such as inches (
11243 ) or relative to some document or font-based length such as
11253 \begin_layout Standard
11254 It's possible to change the spacing between a foilhead and the body of the
11255 foil by adjusting the length specified by
11262 For example, to make
11267 \begin_inset space \space{}
11270 in closer to their bodies put the following in the preamble:
11276 foilheadskip}{-0.5in}
11279 \begin_layout Standard
11280 The spacings around floats can be adjusted by setting these lengths:
11283 \begin_layout Labeling
11284 \labelwidthstring MMMMMMMMMMM
11291 Separation between the text and the top of the float
11294 \begin_layout Labeling
11295 \labelwidthstring MMMMMMMMMMM
11302 Separation between the float and the caption
11305 \begin_layout Labeling
11306 \labelwidthstring MMMMMMMMMMM
11313 Separation between the caption and the following text
11316 \begin_layout Labeling
11317 \labelwidthstring MMMMMMMMMMM
11324 You can make the captions narrower than the surrounding text by adjusting
11326 Best done relative to
11335 \begin_layout Standard
11336 There are also several title page related lengths that you may find useful
11337 if you have a long title or several authors:
11340 \begin_layout Labeling
11341 \labelwidthstring MMMMMMMMMMM
11348 Separation from headers to
11353 \begin_layout Labeling
11354 \labelwidthstring MMMMMMMMMMM
11372 \begin_layout Labeling
11373 \labelwidthstring MMMMMMMMMMM
11387 \begin_layout Labeling
11388 \labelwidthstring MMMMMMMMMMM
11404 \begin_layout Labeling
11405 \labelwidthstring MMMMMMMMMMM
11421 \begin_layout Standard
11422 The last length related command affects all the list environments.
11433 a list environment then all the vertical spacing between the list items
11435 Note that this is a command not a length so it doesn't require
11441 like the stuff mentioned above.
11444 \begin_layout Subsubsection
11445 Headers and Footers
11448 \begin_layout Standard
11461 commands control whether the logo in the
11465 definition appear on a given page.
11472 in the preamble then none of the foils will have the logo on them.
11473 If you don't want the logo on a particular page place the
11479 directly after the foilhead of that page and the
11485 directly after the next foilhead.
11488 \begin_layout Standard
11489 If you decide to use the
11493 page style setting in the
11496 \begin_inset space ~
11501 dialog you should probably add
11511 to your preamble so headers and footers on landscape pages are correctly
11512 placed when rotated.
11513 This is due to some clashes between the page layouts provided by the
11524 \begin_layout Section
11525 Hollywood (Hollywood spec scripts)
11528 \begin_layout Standard
11534 \begin_layout Subsection
11538 \begin_layout Standard
11539 Getting the format of a Hollywood script right is a
11540 \begin_inset Quotes eld
11544 \begin_inset Quotes erd
11547 It is designed to make the readers focus on content and to be easy and
11548 familiar for the actors to read.
11549 Each page of a script should be one minute of film.
11550 Nothing goes in a script that you cannot see or hear on screen.
11551 The courier 12 pt font should be used throughout.
11555 \begin_layout Subsection
11559 \begin_layout Standard
11560 Speakers' lines should NEVER break in mid-sentence.
11561 If a speaker's lines continue over a page break, repeat the
11565 title followed by (Cont'd).
11568 \begin_layout Subsection
11572 \begin_layout Standard
11577 names as labels then cross-reference the label to insert the name.
11578 The cross-reference dialog will show the current cast of characters.
11579 You can use this to insert the speaker name in narratives also.
11582 \begin_layout Subsection
11583 Paper size and Margins
11586 \begin_layout Standard
11587 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11590 \begin_layout Subsection
11594 \begin_layout Standard
11595 The following environments are available.
11596 You can use hollywood.bind to get the bind keys shown at the right.
11599 \begin_layout Itemize
11603 \begin_inset Newline newline
11608 Used where nothing else works.
11612 \begin_layout Itemize
11618 \begin_inset space \hfill{}
11626 \begin_inset Newline newline
11629 Usually followed by something like
11630 \begin_inset Quotes eld
11633 on Sally waking up.
11634 \begin_inset Quotes erd
11640 \begin_layout Itemize
11644 \begin_inset space \hfill{}
11648 \begin_inset Newline newline
11653 Introduces a new INTERIOR camera set-up.
11654 Always followed by DAY or NIGHT, or something similar to define the lighting
11656 Everthing on this line in CAPS.
11659 \begin_layout Itemize
11663 \begin_inset space \hfill{}
11667 \begin_inset Newline newline
11672 Introduces a new EXTERIOR camera set-up.
11673 Everthing on this line in CAPS.
11676 \begin_layout Itemize
11680 \begin_inset space \hfill{}
11684 \begin_inset Newline newline
11689 The character speaking.
11692 \begin_layout Itemize
11696 \begin_inset space \hfill{}
11700 \begin_inset Newline newline
11705 Instructions to the speaker.
11706 The () are automatically inserted, but only the ( will show in LyX.
11707 Both will be printed.
11710 \begin_layout Itemize
11714 \begin_inset space \hfill{}
11718 \begin_inset Newline newline
11730 \begin_layout Itemize
11734 \begin_inset space \hfill{}
11738 \begin_inset Newline newline
11743 Camera movement instruction.
11745 \begin_inset space \thinspace{}
11749 \begin_inset space \space{}
11755 \begin_layout Itemize
11759 \begin_inset space \hfill{}
11765 \begin_layout Itemize
11769 \begin_inset space \hfill{}
11775 \begin_layout Itemize
11779 \begin_inset space \hfill{}
11785 \begin_layout Itemize
11789 \begin_inset space \hfill{}
11795 \begin_layout Subsection
11799 \begin_layout Itemize
11803 \begin_layout Itemize
11807 \begin_layout Itemize
11809 \begin_inset space \thinspace{}
11816 \begin_layout Itemize
11821 \begin_layout Itemize
11822 PAN — camera movement
11825 \begin_layout Itemize
11826 INSERT — cut to close-up of
11829 \begin_layout Section
11833 \begin_layout Standard
11836 Panayotis Papasotiriou
11839 \begin_layout Subsection
11843 \begin_layout Standard
11844 The ijmpc package is a set of macros that facilitates electronic manuscript
11847 International Journal of Modern Physics C
11850 Similarly, the ijmpd package is for creating manuscripts to be submitted
11853 International Journal of Modern Physics D
11856 Both journals are published by World Scientific.
11857 The corresponding document classes are named
11866 These files, together with instructions for the authors, can be downloaded
11868 \begin_inset Flex URL
11871 \begin_layout Plain Layout
11873 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11879 \begin_inset Flex URL
11882 \begin_layout Plain Layout
11884 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11890 Both packages are modified versions of the standard
11891 \begin_inset Quotes eld
11895 \begin_inset Quotes erd
11898 package, and they are almost (but not exactly) identical.
11899 Most of their features are supported by LyX.
11900 I have used LyX successfully to write articles submitted to both journals
11901 without any problem.
11904 \begin_layout Subsection
11908 \begin_layout Standard
11909 As usual, the easiest way to write a paper is to start with a template.
11912 File\SpecialChar \menuseparator
11931 This will give an (almost) empty document that includes the most common
11932 fields found in a manuscript.
11933 Simply overwrite the existing text (including the brackets,
11938 You should keep in mind the following remarks.
11941 \begin_layout Enumerate
11942 LyX won't let you change the font size and the page style of the document,
11943 because such modifications are not allowed by both packages.
11946 \begin_layout Enumerate
11947 The language of the document should not be changed.
11948 Before previewing your paper, be sure that the babel package is not used.
11949 To do this, click on
11951 Tools\SpecialChar \menuseparator
11962 checkbox in the language settings, and click on
11970 , if you wish to make this change permanent).
11973 \begin_layout Enumerate
11975 \begin_inset Quotes eld
11979 \begin_inset Quotes erd
11982 style must be used to define keywords.
11985 \begin_layout Enumerate
11986 The ijmpc package provides a style named
11987 \begin_inset Quotes eld
11990 Classification Codes
11991 \begin_inset Quotes erd
11994 , which can be used to define classification codes, such as PACS numbers.
11995 Note that this facility is not supported by the ijmpd package.
11998 \begin_layout Enumerate
11999 Several new environments are available:
12000 \begin_inset Quotes eld
12004 \begin_inset Quotes erd
12008 \begin_inset Quotes eld
12012 \begin_inset Quotes erd
12016 \begin_inset Quotes eld
12020 \begin_inset Quotes erd
12024 \begin_inset Quotes eld
12028 \begin_inset Quotes erd
12032 \begin_inset Quotes eld
12036 \begin_inset Quotes erd
12040 \begin_inset Quotes eld
12044 \begin_inset Quotes erd
12048 \begin_inset Quotes eld
12052 \begin_inset Quotes erd
12056 \begin_inset Quotes eld
12060 \begin_inset Quotes erd
12064 \begin_inset Quotes eld
12068 \begin_inset Quotes erd
12072 \begin_inset Quotes eld
12076 \begin_inset Quotes erd
12080 \begin_inset Quotes eld
12084 \begin_inset Quotes erd
12088 \begin_inset Quotes eld
12092 \begin_inset Quotes erd
12096 \begin_inset Quotes eld
12100 \begin_inset Quotes erd
12104 \begin_inset Quotes eld
12108 \begin_inset Quotes erd
12112 Their use is more or less obvious.
12113 LyX supports all these environments; it will use the proper label, text
12114 style, and numbering scheme for each of them.
12117 \begin_layout Enumerate
12118 Both packages use basic citations; the natbib package should not be used.
12119 In LyX, citation references are shown as usual; in the output, citations
12120 are shown as superscripts.
12121 If you want to use a citation as normal text, you should use the
12126 \begin_inset space \thinspace{}
12130 \begin_inset space \space{}
12134 \begin_inset Quotes eld
12138 \begin_inset space \space{}
12148 \begin_inset Quotes erd
12154 \begin_layout Enumerate
12156 \begin_inset Quotes eld
12160 \begin_inset Quotes erd
12163 section in both packages.
12164 To put acknowledgments, just use the
12165 \begin_inset Quotes eld
12169 \begin_inset Quotes erd
12175 \begin_layout Enumerate
12176 Appendices may be added to the paper,
12180 the Acknowledgments and
12185 LyX provides a special environment, called
12186 \begin_inset Quotes eld
12190 \begin_inset Quotes erd
12193 which marks the beginning of the appendices.
12194 This environment should be left blank; it just sends a LaTeX command, but
12195 nothing is really printed.
12197 \begin_inset Quotes eld
12201 \begin_inset Quotes erd
12204 is printed with blue letters, as a signal that all sections after that
12205 point are appendices.
12206 To write an appendix, use the
12207 \begin_inset Quotes eld
12211 \begin_inset Quotes erd
12215 LyX will number each appendix with capital letters, as required by both
12218 \begin_inset Quotes eld
12222 \begin_inset Quotes erd
12229 be present before the first appendix; if not, all appendices will be numbered
12230 as normal sections in the output.
12233 \begin_layout Enumerate
12234 The ijmpc and the ijmpd packages use the
12238 command to implement table captions.
12239 As a result, a table created by LyX is printed correctly, but its caption
12241 However, you can use some TeX code to overcome this problem, so that captions
12242 are printed as expected.
12243 To do so, create a float table as usual, remove the caption, and replace
12244 it with the TeX code
12254 (sic); you must also the TeX code
12258 immediately after the tabular material.
12259 Study the example table included in the template files to see how this
12260 trick is implemented.
12261 Alternatively, If you need table captions, you should implement the whole
12266 file, then include this file to the LyX document (
12268 Insert\SpecialChar \menuseparator
12269 File\SpecialChar \menuseparator
12271 \begin_inset space ~
12277 Details on how to create a table float can be found in the files
12285 , included in the corresponding packages.
12288 \begin_layout Subsection
12289 Preparing a paper for submission
12292 \begin_layout Standard
12293 Before you submit your paper you must export the LyX document as a LaTeX
12296 File\SpecialChar \menuseparator
12297 Export\SpecialChar \menuseparator
12304 \begin_layout Plain Layout
12305 Actually you have the choice between LaTeX (plain) and pdflatex.
12306 If you intend to use pdflatex to prepare the paper, you should use the
12307 pdflatex option so that included graphics are converted to PDF format,
12308 ready for use by pdflatex.
12313 , then make the following changes to the resulting
12320 \begin_layout Enumerate
12321 Remove the comment lines before the
12330 \begin_layout Enumerate
12331 Remove everything between (and including) the
12343 commands, except for any commands you specifically put into the LaTeX preamble.
12346 \begin_layout Standard
12351 file should be saved and processed through LaTeX as many times as necessary.
12352 You may also want to check the resulting
12359 \begin_layout Subsection
12363 \begin_layout Standard
12364 The use of TeX code is reduced to two commands, which must be placed at
12365 the top of the document.
12366 If you started writing your paper by using the
12374 template, the TeX code needed is already in its place; you usually don't
12376 You may only modify the first TeX code to specify the information printed
12377 to the top of odd and even pages (authors' names and short paper's title,
12379 This TeX code must have the form
12383 markboth{Authors' Names}{Short Paper's Title}
12388 \begin_layout Section
12392 \begin_layout Standard
12398 \begin_layout Subsection
12402 \begin_layout Standard
12403 The iopart package provides a document class to create electronic manuscript
12404 submission to the journals published by the Institute of Physics.
12405 Instructions for the authors how to create a paper using the iopart class
12406 can be downloaded together with the iopart package from the site
12407 \begin_inset Flex URL
12410 \begin_layout Plain Layout
12412 ftp://ftp.iop.org/pub/journals/latex2e
12420 \begin_layout Subsection
12424 \begin_layout Standard
12425 The easiest way to write a paper is to start with the file
12429 that is available in LyX's examples files folder.
12430 Open this file, save it under a new name, and start writing.
12431 The example file explains how to use the special text environments.
12432 Here are the most important advices:
12435 \begin_layout Itemize
12436 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12439 Use AMS math package
12441 in the document settings under
12448 \begin_layout Itemize
12451 The title environment defines the kind of your paper.
12452 So use one of the following environments for the title:
12456 \begin_layout Itemize
12465 \begin_layout Itemize
12474 \begin_layout Itemize
12480 for a Topical review
12483 \begin_layout Itemize
12492 \begin_layout Itemize
12501 \begin_layout Itemize
12507 for a Paper (same as Title)
12510 \begin_layout Itemize
12516 for a Preliminary communication
12519 \begin_layout Itemize
12525 for a Rapid communication
12528 \begin_layout Itemize
12534 for a Letter to the editor
12538 \begin_layout Itemize
12541 All title environments except of
12545 can have an optional short title.
12548 \begin_layout Itemize
12549 There is a general title environment
12553 which is not directly supported by the LyX.
12554 This can be used as TeX code when your document doesn't fit into one of
12555 the other title types.
12558 \begin_layout Standard
12559 For more informations like hints for special table and formula formatting,
12560 look at the IOP author guidelines.
12563 \begin_layout Section
12567 \begin_layout Standard
12570 Panayotis Papasotiriou
12573 \begin_layout Subsection
12577 \begin_layout Standard
12578 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12579 that facilitates electronic manuscript submission to the journals they
12581 Most known of them (at least in my domain of interest) are
12583 Astrophysics and Space Science
12589 , but there are many others (see a complete list at
12590 \begin_inset Flex URL
12593 \begin_layout Plain Layout
12595 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12601 The Kluwer package may be downloaded from the site
12602 \begin_inset Flex URL
12605 \begin_layout Plain Layout
12607 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12613 A complete user guide is contained in that package (but it can also be
12614 downloaded separately).
12617 \begin_layout Standard
12618 LyX supports many features of the package but not everything.
12619 However, the TeX code needed is reduced to some
12620 \begin_inset Quotes eld
12624 \begin_inset Quotes erd
12627 commands of the package (see
12628 \begin_inset space ~
12632 \begin_inset CommandInset ref
12634 reference "subsec:kluwer_peculiarities"
12639 I have recently used LyX to write an article submitted to the
12641 Astrophysics and Space Science
12643 without any problem.
12646 \begin_layout Subsection
12650 \begin_layout Standard
12651 The easiest way to write a paper is to start with the Kluwer template file.
12654 File\SpecialChar \menuseparator
12666 This will give an (almost) empty document that includes the most common
12667 fields found in a manuscript and a short description of their use.
12668 As in most templates, simply overwrite the existing text (including the
12673 ) with the correct information.
12676 \begin_layout Subsection
12677 Preparing a paper for submission
12680 \begin_layout Standard
12681 As in the AASTeX package, before you submit your paper to a journal you
12683 \begin_inset Quotes eld
12687 \begin_inset Quotes erd
12693 \begin_layout Enumerate
12694 Export your paper as a LaTeX file.
12695 To do this, click on
12697 File\SpecialChar \menuseparator
12698 Export\SpecialChar \menuseparator
12705 \begin_layout Enumerate
12710 file with a text editor and make the following changes
12714 \begin_layout Enumerate
12715 remove the comment lines before the
12724 \begin_layout Enumerate
12725 remove everything between (and including) the
12737 commands, except for any commands you specifically put into the LaTeX preamble.
12740 \begin_layout Standard
12749 \begin_layout Enumerate
12754 file through LaTeX as many times as necessary (usually up to three).
12757 \begin_layout Enumerate
12763 \begin_inset space \thinspace{}
12767 \begin_inset space \space{}
12774 , and check if everything is OK (it should, if you didn't make any mistake).
12777 \begin_layout Subsection
12778 \begin_inset Quotes eld
12782 \begin_inset Quotes erd
12785 of the Kluwer package
12786 \begin_inset CommandInset label
12788 name "subsec:kluwer_peculiarities"
12795 \begin_layout Standard
12796 The Kluwer package has the following
12797 \begin_inset Quotes eld
12801 \begin_inset Quotes erd
12807 \begin_layout Enumerate
12808 It is possible to write multiple articles in the same LaTeX file
12812 \begin_layout Plain Layout
12813 I can't imagine any good reason to do this.
12819 Each article must be included in the environment
12820 \begin_inset Quotes eld
12824 \begin_inset Quotes erd
12828 Unfortunately, this environment cannot be omitted, even if you write just
12830 Therefore, each article starts with the command
12836 and, obviously, ends with the command
12843 Although this can be implemented in LyX, I didn't included it, since it
12844 looks ugly and can confuse the novice user.
12845 Therefore, you need to enter them directly and mark them as LaTeX code
12847 \begin_inset Quotes eld
12851 \begin_inset Quotes erd
12857 \begin_layout Enumerate
12858 Information given at the beginning of the article (i.
12859 \begin_inset space \thinspace{}
12863 \begin_inset space \space{}
12866 title, subtitle, author, institution, running title, running author, abstract
12867 and keywords) must be included in an environment called
12868 \begin_inset Quotes eld
12872 \begin_inset Quotes erd
12876 This is not implemented in LyX, so you must enter title, subtitle etc.
12877 \begin_inset space ~
12880 between two TeX code lines (
12895 \begin_layout Enumerate
12896 According to the user manual, the label of each bibliography item must be
12920 \begin_layout Standard
12925 template takes care of all these
12926 \begin_inset Quotes eld
12930 \begin_inset Quotes erd
12934 If you start a new paper using this template you don't need to do anything
12939 \begin_layout Enumerate
12940 don't delete the TeX code included in the template, and
12943 \begin_layout Enumerate
12944 copy the example bibliography item included in the template and modify it
12945 as necessary to enter new bibliography items.
12948 \begin_layout Section
12952 \begin_layout Standard
12958 \begin_layout Subsection
12962 \begin_layout Standard
12963 The LyX document classes
12965 article (koma-script)
12969 report (koma-script)
12987 correspond to the LaTeX document classes
13004 \begin_inset space ~
13007 of the Koma-Script family.
13008 They are replacements for the standard document classes
13024 , resp., and fit better to European typography conventions in a number of
13028 \begin_layout Itemize
13029 Standard character size is 11pt in
13031 article (koma-script)
13035 report (koma-script)
13043 letter (koma-script)
13048 \begin_layout Itemize
13049 Headings, labels of the description environment, and a number of elements
13052 letter (koma-script)
13054 document class are set in a bold sans serif font.
13058 \begin_layout Plain Layout
13059 There is a big difference between the bold sans serif old cm fonts and new
13060 ec fonts, especially in the appearance of headings.
13061 In comparison, the ec bold sans serif fonts look a bit thin.
13062 Here the LaTeX package
13070 helps to produce the
13071 \begin_inset Quotes eld
13075 \begin_inset Quotes erd
13078 appearance when using the ec fonts.
13083 The numbering of chapter headings is made in the same way as the numbering
13084 of section headings, that is without the extra line
13085 \begin_inset Quotes eld
13088 Chapter\SpecialChar \ldots{}
13090 \begin_inset Quotes erd
13094 In addition, the appearance of the headings can be modified by using a
13095 number of options (in LyX to be entered in the field
13098 \begin_inset space ~
13105 Layout\SpecialChar \menuseparator
13112 \begin_layout Itemize
13113 The main means in the Koma-Script document classes to design the type area
13122 (in LyX to be entered in the extra class options field in the dialog
13124 Document\SpecialChar \menuseparator
13128 They make a clearer modification of page margins possible as do the options
13131 Document\SpecialChar \menuseparator
13138 \begin_layout Itemize
13139 The LaTeX document classes of the Koma-Script family define a number of
13140 additional commands.
13141 Those part of it which makes sense in LyX is implemented in corresponding
13145 \begin_layout Standard
13146 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13147 can be found in the Koma-Script documentation
13158 \begin_layout Subsection
13159 article (koma-script), report (koma-script), and book (koma-script)
13162 \begin_layout Standard
13163 The document classes
13165 article (koma-script)
13169 report (koma-script)
13179 are implemented in the layout files
13192 They contain all the paragraph types of the corresponding standard document
13205 , resp., partly modified, with the exception of the LyX specific
13209 -type, which is replaced by the new
13213 -type having the same functionality.
13218 -Type there is a number of new paragraph types added.
13225 letter (koma-script)
13230 \begin_layout Itemize
13239 : are equivalents to
13247 , resp., additionally inserting an entry in the table of contents.
13256 are not contained in
13258 article (koma-script)
13263 \begin_layout Itemize
13272 : behave exactly as
13280 , resp., additionally clearing running heads.
13285 is not contained in
13287 article (koma-script)
13293 \begin_layout Plain Layout
13306 report (koma-script)
13308 , but since this is identical to
13312 , is has not been implemented in LyX.
13320 \begin_layout Itemize
13325 : generates a heading directly above the following paragraph in the standard
13326 character size without affecting the structure of the document.
13329 \begin_layout Itemize
13338 are special captions which respect the different space settings needed
13339 for captions placed above or below an element (if you follow strict typographic
13340 rules, you might want to place table captions always above the table).
13341 You can also use the class option
13345 , which will switch
13358 You need at least Koma-Script version 2.8q to use this.
13361 \begin_layout Itemize
13366 : can be used to set a bonmot, e.
13367 \begin_inset space \thinspace{}
13371 \begin_inset space \space{}
13374 at the beginning of a chapter.
13375 If you use the optional argument (
13377 Insert\SpecialChar \menuseparator
13379 \begin_inset space ~
13384 ), you can insert the dictum's author there.
13385 Dictum and author are separated by a line.
13386 You need at least Koma-Script version 2.8q to use this.
13391 is not contained in
13393 article (koma-script)
13398 \begin_layout Standard
13399 The following types, together with the standard types
13411 , form the title area of the document.
13412 They must be entered ahead of the first
13413 \begin_inset Quotes eld
13417 \begin_inset Quotes erd
13424 \begin_layout Plain Layout
13425 The corresponding LaTeX commands must appear before the
13436 When such a type is used more than once, the latter usage overwrites the
13437 former one, that means, for every type only the latest usage is valid.
13438 The order of the different types however has, like
13450 , no effect on the appearance of the produced document.
13453 \begin_layout Itemize
13458 : produces a centered paragraph above the ordinary title (
13470 ) for the subject of the document.
13473 \begin_layout Itemize
13478 : produces a centered paragraph below the ordinary title (
13490 ) for the publishers' name.
13493 \begin_layout Itemize
13500 report (koma-script)
13506 produces a centered paragraph on its own page behind the title page, or
13509 article (koma-script)
13511 produces a centered paragraph below the ordinary title (
13527 ) for a dedication.
13530 \begin_layout Itemize
13535 : produces a left aligned paragraph above the ordinary title (
13551 ) for a document`s head.
13554 \begin_layout Itemize
13559 : produces in a double-sided print in
13561 report (koma-script)
13567 a left-aligned paragraph at the top of the title page`s back or has no
13568 effect in a single-sided print or in
13570 article (koma-script)
13575 \begin_layout Itemize
13580 : produces in a double-sided print in
13582 report (koma-script)
13588 a left-aligned paragraph at the bottom of the title page`s back or has
13589 no effect in a single-sided print or in
13591 article (koma-script)
13596 \begin_layout Itemize
13601 : produces a special
13602 \begin_inset Quotes eld
13606 \begin_inset Quotes erd
13609 page ahead of the actual document containing a paragraph without special
13613 \begin_layout Standard
13614 The layout files for the document classes
13616 article (koma-script)
13620 report (koma-script)
13626 do include the file
13631 This is thought of as a place to define your own types.
13636 in your personal layout directory and edit the file!
13639 \begin_layout Subsection
13640 letter (koma-script)
13643 \begin_layout Standard
13647 letter (koma-script)
13649 is implemented in the layout file
13654 It contains all the paragraph types of the corresponding standard document
13659 , partly modified, with the exception of the LyX specific types
13671 type, which is replaced by the new
13676 In addition, it contains, in contrast to the standard document class, the
13694 Furthermore, there are a number of new letter specific types.
13697 \begin_layout Standard
13698 The appearance of the letter produced by this document class can be controlled
13699 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13703 \begin_layout Plain Layout
13704 For example, the standard appearance of the letter`s heading, consisting
13705 of name and address, is quite self-willed.
13707 \begin_inset Quotes eld
13711 \begin_inset Quotes erd
13714 heading is produced by the following LaTeX commands in the preamble:
13717 \begin_layout LyX-Code
13727 \begin_layout LyX-Code
13743 \begin_layout LyX-Code
13753 \begin_layout LyX-Code
13773 A detailed German description of such LaTeX commands can be found in the
13774 Koma-Script documentation
13779 With it, the letter's author can produce his personal letter layout.
13782 \begin_layout Standard
13791 define the beginning of the letter and must be used in every letter.
13792 To emphasize them in the LyX document class, they are marked with the letter
13802 \begin_inset space ~
13805 in the left margin.
13806 It is possible to write any number of letters in one file.
13811 type produces a new letter using the same addressee and a
13815 type produces a new addressee.
13832 are ordinary paragraph types and can also be used several times in one
13833 and the same letter.
13836 \begin_layout Itemize
13841 : produces a paragraph for the addressee and implicitly defines the beginning
13845 \begin_layout Itemize
13850 : produces a paragraph for the form of address and implicitly produces a
13854 \begin_layout Itemize
13859 : produces a paragraph for a close.
13862 \begin_layout Itemize
13867 : produces a paragraph for a postscript.
13870 \begin_layout Itemize
13875 : produces a paragraph for a distribution list.
13878 \begin_layout Itemize
13883 : produces a paragraph for enclosures.
13886 \begin_layout Standard
13927 are input types provided with a label to enter information, which will
13928 be processed by the document class.
13932 \begin_layout Plain Layout
13933 It could be seen as a matter of inconsequence, that the types
13941 described above are not such input types as well.
13942 Because of the special meaning of those types, however, I have implemented
13943 them as ordinary paragraph types with a one letter mark in the left margin.
13944 Moreover, it would affect my feeling of symmetry, if the
13952 type had such a serious different appearance.
13957 The types must be used ahead of the corresponding
13964 \begin_layout Standard
13965 An implementation of these types in a WYSIWYG fashion does not seem to make
13966 sense, because the real appearance of the produced letter does not only
13967 depend on the usage of the particular type, but also on other factors.
13968 For example, a signature entered in the
13972 type will in the standard behavior appear in the produced letter only,
13973 when in the same letter also a
13978 The entered value of the
13982 type will in the standard behavior not appear in the produced letter at
13984 The possibility to design the letter`s heading freely is already indicated
13985 in a footnote above.
13988 \begin_layout Standard
13989 The input types can also be used as empty paragraphs.
13990 This makes sense e.
13991 \begin_inset space \thinspace{}
13995 \begin_inset space \space{}
14007 type is not used at all, in the standard behavior the value of the
14011 type is used as signature, whereas if an empty
14015 type is used, no signature value is defined.
14018 \begin_layout Standard
14019 By using the input types it is possible to write a letter template, containing
14020 filled input types with your personal dates (name, address, etc.) and empty
14021 input types for other dates you want to enter.
14024 \begin_layout Itemize
14029 : sender's name, in the standard behavior appears as a centered paragraph
14030 in small caps in the letter`s heading.
14033 \begin_layout Itemize
14038 : sender's signature, in the standard behavior appears below the
14047 type is used, the value of the
14051 type appears instead.
14054 \begin_layout Itemize
14059 : sender's address, in the standard behavior appears in a centered paragraph
14060 in the letter`s heading below the sender's name.
14063 \begin_layout Itemize
14068 : sender's telephone number, in the standard behavior only sets the LaTeX
14078 \begin_layout Itemize
14083 : place of the letter`s making.
14086 \begin_layout Itemize
14091 : date of the letter`s making.
14100 , in the standard behavior, produce the place and the date in a right-aligned
14101 line below the addressee's field.
14106 type is used, neither place nor date appear, independent of the value of
14116 type is used, the date of the letter `s production is used.
14119 \begin_layout Itemize
14124 : sender`s back address, in the standard behavior appears above the addressee's
14125 field in a small sans serif font.
14128 \begin_layout Itemize
14133 : special mail information, in the standard behavior appears underlined
14134 above the addressee's field below the back address.
14137 \begin_layout Itemize
14142 : additional information, in the standard behavior appears on right side
14143 below the addressee`s field.
14146 \begin_layout Itemize
14151 : the letter's title, in the standard behavior appears in a big, bold, sans
14152 serif font above the subject.
14155 \begin_layout Itemize
14160 : the letter's subject, in the standard behavior appears in a bold font
14168 \begin_layout Standard
14189 produce a business letter like line above the
14193 line containing the fields
14194 \begin_inset Quotes eld
14198 \begin_inset Quotes erd
14202 \begin_inset Quotes eld
14206 \begin_inset Quotes erd
14210 \begin_inset Quotes eld
14214 \begin_inset Quotes erd
14218 \begin_inset Quotes eld
14222 \begin_inset Quotes erd
14226 \begin_inset Quotes eld
14230 \begin_inset Quotes erd
14234 \begin_inset Quotes eld
14238 \begin_inset Quotes erd
14242 For the date field, the value of the
14248 \begin_inset Quotes eld
14251 business letter types
14252 \begin_inset Quotes erd
14255 is used, the value of the
14259 type however does not appear, but only the LaTeX variable
14266 The ordinary output of place and date in a right-aligned line below the
14267 addressee`s field is suppressed.
14268 The types are implemented as input types provided with a label and must
14269 be used ahead of the corresponding
14276 \begin_layout Itemize
14284 \begin_layout Itemize
14292 \begin_layout Itemize
14300 \begin_layout Itemize
14308 \begin_layout Itemize
14316 \begin_layout Subsection
14317 The new letter class: letter (koma-script v.2)
14320 \begin_layout Standard
14326 \begin_layout Standard
14327 \begin_inset VSpace medskip
14333 \begin_layout Standard
14335 Koma-Script version 2.8 has introduced a new letter class
14339 which supersedes the now unsupported
14344 It has — on the LaTeX side — a completely new interface and is not compatible
14345 with the old class.
14346 Therefore, LyX supports both, though it is recommended you use the new
14350 \begin_layout Standard
14351 This class covers the same functionality as
14353 letter (koma-script),
14356 The basic items are
14360 (receiver's address, same as
14364 in the old layout),
14377 will start a new letter (i.
14378 \begin_inset space \thinspace{}
14382 \begin_inset space \space{}
14385 you can write several letters per document).
14386 New elements are sender's
14402 and the possibility to use a
14408 Insert\SpecialChar \menuseparator
14414 \begin_layout Standard
14415 The biggest improvement is, though, that the letter's layout is configurable
14416 to meet almost any needs.
14417 This can be done via the preamble or with a special style file (Letter
14418 Class Option, extension
14422 ), that will be read in as a class option.
14426 \begin_layout Plain Layout
14427 The KOMA package comes with some default
14432 There is, for instance, a
14436 file that follows german typesetting rules, or a
14440 that provides the default layout of the old
14445 The latter can be loaded with the class option
14454 ayout\SpecialChar \menuseparator
14459 ocument\SpecialChar \menuseparator
14471 template that is included in LyX for examples.
14472 A detailed description is to be found in the Koma-Script documentation
14480 \begin_layout Subsection
14484 \begin_layout Standard
14485 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14489 \begin_layout Itemize
14490 The chapter number of a
14494 type appears on a line of its own above the chapter heading instead of
14495 appearing in the same line ahead of it.
14496 The cause for that is the LyX internal behavior for the labeltype
14500 in the layout file.
14503 \begin_layout Itemize
14504 The headings of the types
14512 are only put in the
14513 \begin_inset Quotes eld
14517 \begin_inset Quotes erd
14520 LaTeX table of contents, but not in the LyX table of contents (
14522 Document\SpecialChar \menuseparator
14524 \begin_inset space ~
14528 \begin_inset space ~
14536 \begin_layout Itemize
14537 The paragraphs in a
14541 document class appear in a skip separation mode, not indented.
14542 This is the standard behavior, no special LaTeX commands are needed for
14546 Document\SpecialChar \menuseparator
14549 dialog the corresponding radio button indicates
14558 value always has the effect that extra LaTeX commands are inserted in the
14559 document to produce the gap, which is not what is wanted in this case.
14562 \begin_layout Section
14566 \begin_layout Standard
14572 \begin_layout Subsection
14576 \begin_layout Standard
14577 Memoir is a very powerful and constantly evolving class.
14578 It has been designed with regard to fictional and non-fictional literature.
14579 Its aim is to let the user have maximum control over the typesetting of
14581 Memoir is based on the standard book class, but it can also emulate the
14582 article class (see below).
14585 \begin_layout Standard
14586 Peter Wilson, the developer of Memoir, is known as the author of lots of
14587 useful packages in the LaTeX world.
14588 Most of them have been merged with Memoir.
14589 Therefore, it is much easier to layout the table of contents, appendices,
14590 chapter designs and such.
14591 LyX, though, does not support all of these goodies natively.
14592 Some of them might be added to forthcoming releases
14596 \begin_layout Plain Layout
14597 You are invited to send suggestions to
14598 \begin_inset Flex URL
14601 \begin_layout Plain Layout
14603 lyx-devel@lists.lyx.org
14613 , lots will probably never, due to the limitations of LyX's framework.
14614 Of course you can still use all features with the help of some native LaTeX
14619 \begin_layout Plain Layout
14624 \begin_layout Plain Layout
14634 \begin_inset space ~
14638 \begin_inset CommandInset ref
14640 reference "sec:Inserting-TeX-Code"
14650 In this section, we can only list those features which are natively supported
14652 For detailed descriptions (and for the rest of features) we recommend you
14653 have a look at the detailed manual of the Memoir class
14657 \begin_layout Plain Layout
14662 \begin_layout Plain Layout
14672 \begin_inset Flex URL
14675 \begin_layout Plain Layout
14677 CTAN:/macros/latex/memoir/memman.pdf
14687 , which is not only a user guide for the class, but also both a comprehensive
14688 description on good typesetting and a superb example for good typesetting
14692 \begin_layout Subsection
14693 Basic features and restrictions
14696 \begin_layout Standard
14697 Memoir supports basically all features of the standard book classes.
14698 There are, however, some differences, as follows:
14701 \begin_layout Description
14703 \begin_inset space ~
14706 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14709 \begin_layout Description
14711 \begin_inset space ~
14714 style: The fancy page style is not supported, due to a command clash between
14715 Memoir and the fancyhdr package (they both define a command with the same
14716 name, which confuses LaTeX).
14717 Instead, Memoir comes with a number of its own page styles (see
14719 Layout\SpecialChar \menuseparator
14720 Document\SpecialChar \menuseparator
14722 \begin_inset space ~
14728 If you want to use these for the chapter pages, you have to use the command
14735 in the main text or in preamble (e.
14736 \begin_inset space \thinspace{}
14740 \begin_inset space \space{}
14747 chapterstyle{companion}
14752 \begin_layout Description
14753 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14754 optional argument in the standard classes.
14755 With this, you can specify an alternative version of the title for the
14756 table of contents and the headers (for instance, if the title is too long).
14757 In LyX, you can do this via
14759 Insert\SpecialChar \menuseparator
14761 \begin_inset space ~
14766 at the beginning of a chapter/section.
14767 Memoir features a second optional argument and thus separates the table
14768 of contents from the header.
14769 You can define three variants of a title with this: one for the main text,
14770 one for the table of contents, and one for the headers.
14771 Simply insert two optional arguments if you need this feature, the first
14772 one containing the short title for the Table of Contents, the second one
14773 containing an alternative short title for the headers.
14776 \begin_layout Description
14777 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14778 of contents, the list of figures and the list of table start a new page
14780 Memoir does not follow this route.
14781 You have to insert a page break yourself, if you want to have one.
14784 \begin_layout Description
14785 Titlepage: For some unknown reason, Memoir uses pagination on the title
14786 page (in the standard classes, title pages are
14787 \begin_inset Quotes eld
14791 \begin_inset Quotes erd
14795 \begin_inset space \thinspace{}
14799 \begin_inset space \space{}
14803 If you want an empty title page, type
14807 aliaspagestyle{title}{empty}
14812 \begin_layout Description
14813 Article: With the class option
14819 Layout\SpecialChar \menuseparator
14820 Document\SpecialChar \menuseparator
14822 \begin_inset space ~
14827 ), you can emulate article style.
14828 That is, counters (footnotes, figures, tables etc.) will not be reset on
14829 new chapters, chapters don't start a new page (but are—in contrary to
14830 \begin_inset Quotes eld
14834 \begin_inset Quotes erd
14837 article classes—still allowed), parts, though, use their own page, as in
14841 \begin_layout Description
14842 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14843 font commands, which have been used in the old LaTeX version 2.09 (e.
14844 \begin_inset space \thinspace{}
14848 \begin_inset space \space{}
14864 It produces an error and stops LaTeX whenever such a command appears.
14869 reallows the commands and spits out warnings instead (which does at least
14871 Since a lot of packages and particularly BibTeX style files are still using
14872 those commands, we have decided to use this option by default.
14875 \begin_layout Subsection
14879 \begin_layout Standard
14880 We will only describe the features supported by LyX (which is not much currently
14882 Please consult the Memoir manual
14886 \begin_layout Plain Layout
14891 \begin_layout Plain Layout
14901 \begin_inset Flex URL
14904 \begin_layout Plain Layout
14906 CTAN:/macros/latex/memoir/memman.pdf
14919 \begin_layout Description
14920 Abstract: You may wonder why an abstract is an extra feature.
14921 Well, it is in book class.
14922 Usually books don't have abstracts.
14923 Memoir, however, has.
14924 You can use it wherever and how often you like.
14927 \begin_layout Description
14928 Chapterprecis: You may know this older typesetting style: The contents of
14929 a chapter are summarized below the title and also in the table of contents
14931 \begin_inset space \thinspace{}
14935 \begin_inset space \space{}
14940 Our hero arrives in Troia; he loses some friends; he finds others
14943 Chapterprecis does exactly this.
14944 It is therefore only sensible below a chapter.
14947 \begin_layout Description
14948 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14949 The epigraph environment provides an elegant way of typesetting such a
14951 The motto itself (text) and its author (source) are divided by a short
14953 Unfortunately, we have to fool LyX a bit here again, since the environment
14954 needs two arguments (text and source).
14955 In this case, we have to use curly brackets (in TeX mode) between the two
14966 <author of the slogan>.
14969 \begin_layout Description
14970 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14971 complex figurative poems).
14972 LyX can only support a few of them.
14973 One is poemtitle, which is a centered title for poems, which will also
14974 be added to the table of contents (verse is the standard environment for
14976 Memoir has some enhanced versions of verse, but you need to use TeX code,
14977 because they have to be nested inside regular verse environments, which
14978 is not possible with LyX).
14981 \begin_layout Description
14982 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14985 \begin_layout Section
14986 Article (mwart), book (mwbk) and report (mwrep)
14987 \begin_inset Argument
14990 \begin_layout Plain Layout
15003 \begin_layout Standard
15009 \begin_layout Standard
15010 The LyX document classes
15026 correspond to the LaTeX document classes
15039 They are replacements for the standard document classes
15051 , resp., and fit better to Polish typography conventions in a number of points.
15055 \begin_layout Standard
15059 \begin_layout Itemize
15060 Unnumbered titles (with star, e.
15061 \begin_inset space \thinspace{}
15065 \begin_inset space \space{}
15072 ) are added into table of contents,
15075 \begin_layout Itemize
15076 Additional page styles:
15080 \begin_layout Description
15081 uheadings header with separated lines,
15084 \begin_layout Description
15085 myheadings custom header, contents headers via commands:
15100 \begin_layout Description
15101 myuheadings custom header with separated lines,
15104 \begin_layout Description
15105 outer page number is placed on outer side of page
15109 \begin_layout Itemize
15114 \begin_layout Description
15115 rmheadings serif titles — default,
15118 \begin_layout Description
15119 sfheadings sansserif titles,
15122 \begin_layout Description
15123 authortitle on title page first placed is author next title — default,
15126 \begin_layout Description
15127 titleauthor on title page first placed is title next author,
15130 \begin_layout Description
15131 withmarginpar reserve place on page for margins.
15135 \begin_layout Section
15139 \begin_layout Standard
15144 provides an alternative to the standard
15149 It provides similar functionality, but you might prefer this layout with
15150 sans serif sections, headings, and more.
15153 \begin_layout Section
15157 \begin_layout Standard
15163 \begin_layout Standard
15164 \begin_inset VSpace bigskip
15170 \begin_layout Standard
15175 \begin_inset space ~
15180 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15181 \begin_inset Formula $\beta$
15184 release of May, 1999) class.
15187 \begin_layout Standard
15192 textclass, which works with RevTeX 3.1.
15193 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15194 That means that it doesn't interact very well with LyX, which requires
15195 LaTeX2e, although it has been kludged to work.
15196 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15200 \begin_inset space ~
15205 textclass should also be pretty easy to use.
15208 \begin_layout Standard
15209 These documents are supposed to be used in
15213 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15214 macros, and assume you'll know what to put in the preamble if necessary.
15217 \begin_layout Subsection
15221 \begin_layout Standard
15222 All you need to do is install RevTeX 4, as described in the package's README
15224 The package can be found at The RevTeX 4 Web Site
15225 \begin_inset Flex URL
15228 \begin_layout Plain Layout
15230 http://publish.aps.org/revtex4/
15236 Install it somewhere that LaTeX can see it.
15237 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15239 \begin_inset space \thinspace{}
15243 \begin_inset space \space{}
15246 not the directory where you installed the class file.) Then, if you reconfigure
15247 LyX, it will find the class file and let you use the RevTeX4 textclass.
15250 \begin_layout Standard
15251 Probably the easiest way to get started is either to import a RevTeX 4 document
15259 \begin_inset space ~
15264 template, found in the templates directory.
15267 \begin_layout Subsection
15271 \begin_layout Standard
15272 Optional arguments to
15279 \begin_inset Quotes eld
15283 \begin_inset Quotes erd
15287 \begin_inset Quotes eld
15291 \begin_inset Quotes erd
15301 \begin_inset space ~
15309 \begin_inset space ~
15315 Remember that in RevTeX, at least one optional argument is required!
15318 \begin_layout Standard
15319 Other preamble matter, like
15326 \begin_inset space ~
15332 \begin_inset space ~
15337 dialog, also as usual.
15340 \begin_layout Subsection
15344 \begin_layout Standard
15345 The layouts basically correspond to the commands in RevTeX4.0.
15346 For example, the Email layout corresponds to
15353 Note that (at least as of RevTeX 4.0 Beta), the
15361 layouts are exactly equivalent, so you shouldn't need to use both.
15365 \begin_layout Plain Layout
15366 In case you're curious, both were included so that
15370 would be able to translate both
15390 \begin_layout Subsection
15394 \begin_layout Standard
15395 There are a couple of important unique aspects of RevTeX 4 which might cause
15396 bugs that will be even more confusing in LyX.
15399 \begin_layout Standard
15417 The LyX equivalent is that there is a separate Thanks layout.
15422 write footnotes in the
15426 layout, or weird things may happen.
15427 See the RevTeX 4 documentation for more details.
15430 \begin_layout Standard
15434 \begin_inset space ~
15442 \begin_inset space ~
15451 layouts must be placed
15459 layout and the corresponding
15476 , the LaTeX won't compile.
15479 \begin_layout Subsection
15483 \begin_layout Standard
15484 The main problem with this layout is that you can't use the optional arguments
15485 to layouts like Email and Title.
15486 (The problem is not unique to this layout; you can't use optional arguments
15487 to the Section layouts either.) This means that after you export that file
15488 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15489 need to edit the LaTeX file with a text editor to add the optional arguments
15491 \begin_inset space \thinspace{}
15495 \begin_inset space \space{}
15498 the running title for the page headers.
15499 Lacking these layouts makes the
15505 (and the equivalent
15511 ) useless, so the corresponding layouts don't exist, and will have to be
15516 \begin_layout Plain Layout
15521 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15522 has not been updated yet to take advantage of it.
15530 \begin_layout Section
15531 Springer Journals (
15538 \begin_layout Standard
15544 \begin_layout Subsection
15548 \begin_layout Standard
15549 These are the layout files for some of the journal formats used by Springer
15550 Verlag and listed on
15551 \begin_inset Flex URL
15554 \begin_layout Plain Layout
15556 http://www.springer.de/author/tex/help-journals.html
15561 , where you should also go to fetch the class files (yes, these are LaTeX2e
15563 It is a modular system: the things common to all journals are implemented
15568 , which journal-specific layout files (such as, e.
15569 \begin_inset space \thinspace{}
15573 \begin_inset space \space{}
15580 for Journal of Geodesy) can include.
15583 \begin_layout Standard
15584 This means that implementing support for any other Springer journal on this
15585 list is as simple as writing your own
15593 file following the outline given in
15601 \begin_layout Standard
15602 It is reasonably well tested only for the Journal of Geodesy.
15611 come with the standard LyX distribution.
15612 Install the relevant class file (downloaded from Springer) in a proper
15613 directory, reconfigure LaTeX (in the teTeX case by running
15617 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15618 and it should work.
15621 \begin_layout Subsection
15625 \begin_layout Standard
15626 A large number of theorem-like styles —
15632 \SpecialChar \ldots{}
15638 \begin_layout Standard
15641 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15642 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15645 See the Springer class file documentation for details.
15648 \begin_layout Subsection
15652 \begin_layout Itemize
15664 \begin_layout Itemize
15667 Probability Theory and Related Fields
15673 — Jean-Marc Lasgouttes
15676 \begin_layout Standard
15677 Add your own, it isn't so hard!
15680 \begin_layout Subsection
15684 \begin_layout Standard
15685 These files are partly based on the older
15689 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15690 file from Springer.
15695 layout, are now defunct.
15696 Jean-Marc Lasgouttes helped out big in making me find my way around the
15697 LyX layout file mechanism.
15700 \begin_layout Subsection
15704 \begin_layout Standard
15706 But probably less than in the old hacked-LaTeX
15713 \begin_layout Standard
15715 \begin_inset space \thinspace{}
15718 g.: does not display the number for theorem-like layouts, just #.
15721 \begin_layout Section
15727 \begin_inset CommandInset label
15736 \begin_layout Standard
15744 \begin_layout Subsection
15748 \begin_layout Standard
15749 This section describes how to use LyX to make slides for overhead projectors.
15750 There are two document classes that can do this: the default slides class
15756 This section documents the former.
15759 \begin_layout Standard
15760 I'm going to say this again, nice and clear, so that there's no misunderstanding
15764 \begin_layout Standard
15765 \begin_inset VSpace bigskip
15771 \begin_layout Standard
15775 This section documents the class
15776 \begin_inset Quotes eld
15784 \begin_inset Quotes erd
15792 \begin_layout Standard
15793 \begin_inset VSpace bigskip
15799 \begin_layout Standard
15800 If you're looking for the documentation for
15801 \begin_inset Quotes eld
15809 \begin_inset Quotes erd
15812 , check out section
15813 \begin_inset space ~
15817 \begin_inset CommandInset ref
15819 reference "sec:foiltex"
15829 \begin_inset Quotes eld
15837 \begin_inset Quotes erd
15840 ] is actually somewhat better than the default
15848 \begin_layout Plain Layout
15849 \SpecialChar \ldots{}
15850 or so I've been told repeatedly by its advocates.
15851 Having never used it, I have no idea if this claim is true or not.
15856 which this section documents.
15859 \begin_layout Standard
15860 This class is the LaTeX2e improvement of the old
15865 Every LaTeX2e distribution includes this class [which I'll just refer to
15867 \begin_inset Quotes eld
15875 \begin_inset Quotes erd
15878 from now on], so you're bound to have it.
15879 As I noted earlier, there are other classes, such as
15883 , which also produce slides for overhead projectors and do a better job
15885 However, there are some things which
15889 can do which the others can't, such as generate overlays.
15890 Read on to learn more!
15893 \begin_layout Subsection
15895 \begin_inset CommandInset label
15897 name "sec:slidesetup"
15904 \begin_layout Standard
15905 Obviously, to use this document class, you need to select
15906 \begin_inset Quotes eld
15914 \begin_inset Quotes erd
15917 from the class list in the
15919 Document\SpecialChar \menuseparator
15923 There are some other special things you should know about this class:
15926 \begin_layout Itemize
15927 Don't bother changing the options
15932 They're not supported by the
15939 \begin_layout Itemize
15943 \begin_inset space ~
15948 behaves a bit differently for this class.
15949 The possible choices and what they do are as follows:
15953 \begin_layout Description
15958 The final output contains page numbers in the lower right corner.
15961 \begin_layout Description
15970 , but also prints out any time markers you've put in.
15971 This is the default.
15974 \begin_layout Description
15979 The final output contains no page numbers, time markers, or alignment markers.
15983 \begin_layout Itemize
15988 class has an extra option:
15994 \begin_inset Quotes eld
16002 \begin_inset Quotes erd
16005 in the extra class options.
16009 \begin_layout Standard
16010 Using this options allows you to add time markers to
16016 \begin_inset space ~
16020 \begin_inset CommandInset ref
16022 reference "sec:slideNote"
16030 \begin_layout Standard
16031 You can also use the template file
16032 \begin_inset Quotes eld
16040 \begin_inset Quotes erd
16043 to automatically set up a document to use the
16049 File\SpecialChar \menuseparator
16051 \begin_inset space ~
16055 \begin_inset space ~
16060 to open your new document].
16061 The template file also contains some examples of the special paragraph
16062 environments used by this class.
16063 I'll describe those next.
16066 \begin_layout Subsection
16067 Paragraph Environments
16070 \begin_layout Subsubsection
16071 Supported Environments
16074 \begin_layout Standard
16075 The first thing you'll notice when you start up a new
16079 document is the font size and type: it's the equivalent of the size
16080 \begin_inset Quotes eld
16088 \begin_inset Quotes erd
16094 \begin_inset space ~
16100 This is also what's used in the output.
16102 \begin_inset Quotes eld
16106 \begin_inset Quotes erd
16109 to remind you that this is a slide.
16110 Your final slides will use a larger font; ergo, you'll have less space.
16111 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16114 \begin_layout Standard
16115 The next thing that becomes obvious is the changes to the paragraph environment
16116 pull-down box [at the far-left end of the toolbar].
16117 Most of the paragraph environments you're used to seeing are missing.
16118 There are also five new ones.
16123 class itself only supports certain paragraph environments:
16126 \begin_layout Itemize
16132 \begin_layout Itemize
16138 \begin_layout Itemize
16144 \begin_layout Itemize
16150 \begin_layout Itemize
16156 \begin_layout Itemize
16162 \begin_layout Itemize
16168 \begin_layout Itemize
16174 \begin_layout Itemize
16180 \begin_layout Itemize
16186 \begin_layout Itemize
16192 \begin_layout Standard
16193 All of the other standard environments, including the section-heading environmen
16194 ts, aren't used in the
16201 \begin_layout Standard
16202 On the other hand, you'll notice the following new environments:
16205 \begin_layout Itemize
16211 \begin_layout Itemize
16217 \begin_layout Itemize
16223 \begin_layout Itemize
16229 \begin_layout Itemize
16235 \begin_layout Standard
16236 These five are kind of quirky, due to a
16237 \begin_inset Quotes eld
16241 \begin_inset Quotes erd
16245 You see, LyX doesn't permit you to nest any other paragraph environment
16246 into an empty environment.
16247 Now, that's fine and dandy, but it means that you wouldn't be able to start
16248 a slide with anything except plain text.
16249 To deal with this, I've performed a little
16250 \begin_inset Quotes eld
16254 \begin_inset Quotes erd
16260 \begin_layout Subsubsection
16261 Quirks of the New Environments
16262 \begin_inset CommandInset label
16264 name "sec:slideQuirk"
16271 \begin_layout Standard
16272 All five of the new paragraph environments are somewhat quirky due to inherent
16273 limitiations in the current version of LyX.
16274 As I just mentioned, LyX forbids environments that begin with another environme
16276 To get around this, the
16280 environment isn't a paragraph environment as described in the
16288 \begin_layout Standard
16289 You should consider
16302 \begin_inset Quotes eld
16305 pseudo-environments.
16306 \begin_inset Quotes erd
16309 They look like a section heading or a
16310 \begin_inset Quotes eld
16318 \begin_inset Quotes erd
16321 but really begin a [and, if necessary, end the previous] paragraph environment.
16331 \begin_inset Quotes eld
16335 \begin_inset Quotes erd
16338 These two perform some action.
16341 \begin_layout Standard
16342 A common feature of all five environments,
16362 , is a rather long-ish label.
16363 The text following this label — ordinarily the contents of the paragraph
16364 environment — is utterly irrelevant for
16385 LyX completely ignores it.
16386 In fact, you can leave these five environments completely empty.
16390 \begin_layout Standard
16395 to put any text after the rather long-ish label, you might want to.
16396 This could be a short description of the contents of the
16401 In that case, enter your descriptive comment and hit
16405 as you normally would.
16408 \begin_layout Standard
16409 If, on the other hand, you don't want to enter any descriptive text, you'll
16410 hit another LyX quirk.
16411 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16412 environment until you put something in the old one.
16416 \begin_layout Itemize
16417 Start entering the text that will
16445 \begin_layout Itemize
16446 Now move to the beginning of that paragraph.
16450 \begin_layout Itemize
16459 \begin_layout Itemize
16460 Finally, change this new, empty paragraph to a
16484 \begin_layout Standard
16485 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16489 \begin_layout Subsection
16490 Making a Presentation with
16503 \begin_layout Subsubsection
16511 \begin_layout Standard
16512 If you're expecting this section to teach you how to actually make a presentatio
16513 n, you'll be sorely disappointed.
16514 Naturally, I'll describe all of the ways the
16518 class can assist you in preparing the materials for a presentation.
16519 Filling in the contents, however, is up to you.
16524 the LyX philosophy.]
16527 \begin_layout Standard
16532 environment [in the manner described in section
16533 \begin_inset space ~
16537 \begin_inset CommandInset ref
16539 reference "sec:slideQuirk"
16543 ] tells LyX to begin a new slide [duh].
16544 The label for this environment/
16545 \begin_inset Quotes erd
16549 \begin_inset Quotes erd
16553 \begin_inset Quotes eld
16557 \begin_inset Quotes erd
16560 in cool blue, followed by the label,
16561 \begin_inset Quotes eld
16565 \begin_inset Quotes erd
16569 Any text or paragraph environments that follow this one go on the new slide.
16573 \begin_layout Standard
16574 Slides are probably the only time you'll need to forcibly end pages in LyX
16575 (this can be specified in the
16580 In fact, you'll want to, once you finish entering the contents of one slide.
16581 If you've entered more text than can physically fit on a slide, the extra
16582 overflows onto a new slide.
16583 I don't recommend doing this, however, since the overflow slide won't have
16584 any page number on it.
16585 Furthermore, it may interfere with any
16589 you've made to accompany the oversized
16596 \begin_layout Standard
16605 environments work the same way as the
16610 They both create an
16611 \begin_inset Quotes eld
16615 \begin_inset Quotes erd
16618 followed by a label [
16619 \begin_inset Quotes eld
16623 \begin_inset Quotes erd
16627 \begin_inset Quotes eld
16631 \begin_inset Quotes erd
16635 The color is a stunning magenta instead of blue, and the
16636 \begin_inset Quotes eld
16640 \begin_inset Quotes erd
16643 will look different, in style and in length.
16644 The label fonts of all three also differ from one another.
16647 \begin_layout Standard
16652 , if the contents of a
16660 exceed the physical size of a slide or sheet of paper, the extra will overflow
16662 Again, you should avoid this.
16663 It defeats the whole purpose of
16674 \begin_layout Subsubsection
16684 \begin_layout Standard
16689 is a slide that sits atop another slide.
16690 Perhaps you wish to discuss a figure on the main
16694 before displaying the text associated with it.
16695 One way to accomplish this is tape a flap of dark paper over the part of
16700 you want to display later.
16701 This method fails, however, if you wish to overlap one graph with another,
16703 You would then have to fumble while speaking to align the two separate,
16708 s to align the two graphs.
16713 environment in both cases makes life much easier.
16716 \begin_layout Standard
16721 receives the page number of its
16722 \begin_inset Quotes eld
16726 \begin_inset Quotes erd
16734 \begin_inset Quotes eld
16742 \begin_inset Quotes erd
16749 \begin_layout Plain Layout
16750 Presumably, mutliple
16755 \begin_inset Quotes eld
16763 \begin_inset Quotes erd
16767 \begin_inset Quotes eld
16775 \begin_inset Quotes erd
16779 \begin_inset Quotes eld
16787 \begin_inset Quotes erd
16791 \begin_inset space ~
16794 appended to the page number of the parent
16804 Clearly, you want the contents of both the
16812 to each fit on a single physical slide! You should probably consider an
16818 \begin_inset Quotes eld
16822 \begin_inset Quotes erd
16834 class provides a visual cue for this: the label at the start of an
16838 is shorter than that at the start of a
16843 Lastly, when you generate printable output, you'll find alignment markers
16844 in all four corners of both the
16848 page and its parent
16853 These will assist you in lining up the two physical slides.
16856 \begin_layout Standard
16857 The major problem in overlaying two slides is aligning the contents of the
16858 two transparencies.
16859 How much space should you leave for that graph on the second slide? Worse
16860 still, what if you want a graph and a sentence on second slide, but there
16861 is text on the main transparency that goes in between them? You could try
16862 and insert vertical space of the right size.
16863 The better way is to use
16874 \begin_layout Standard
16875 As their names imply,
16883 are two command-like paragraph environments that make all subsequent text
16884 invisible and visible, respectively.
16886 \begin_inset space ~
16890 \begin_inset CommandInset ref
16892 reference "sec:slideQuirk"
16896 that you don't place anything
16900 these two environments, however.
16905 , it inserts a centered, sky-blue label into the page reading
16906 \begin_inset Quotes eld
16909 <Invisible Text Follows>
16910 \begin_inset Quotes erd
16914 For paragraphs following this label, the parts of the
16922 ; it doesn't matter which] where they would be contain instead blank space.
16926 \begin_layout Standard
16931 , the corresponding centered label is
16932 \begin_inset Quotes eld
16935 <Visible Text Follows>
16936 \begin_inset Quotes erd
16940 Paragraphs following this label behave normally.
16941 Note that the beginning of a new
16953 automatically shuts off an
16958 It's therefore not necessary to use
16969 \begin_layout Standard
16970 By now, it should be obvious how to create overlay transparencies using
16971 the proper combination of
16990 \begin_layout Enumerate
16995 , including everything that will appear on it, whether on the main slide
17003 \begin_layout Enumerate
17004 Before each figure or paragraph that will appear only on the
17013 If necessary, insert a
17017 environment after the
17024 \begin_layout Enumerate
17029 immediately following the
17036 \begin_layout Enumerate
17037 Copy the contents of this
17048 \begin_layout Enumerate
17053 , change all of the
17064 \begin_layout Standard
17066 You've just made an
17073 \begin_layout Standard
17074 There's one problem with the way I've designed the LyX
17078 class: you can't make text in the middle of a paragraph invisible, nor
17079 make text in the middle of an invisible paragraph visible again.
17080 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17084 \begin_layout Plain Layout
17085 The commands of interest are:
17088 \begin_layout Itemize
17093 invisible \SpecialChar \ldots{}
17097 \begin_layout Itemize
17102 visible \SpecialChar \ldots{}
17106 \begin_layout Plain Layout
17107 \SpecialChar \ldots{}
17108 and need to be marked as TeX.
17110 \begin_inset Quotes eld
17114 \begin_inset Quotes erd
17117 you wish to change goes in between the brackets [and after the
17130 If you don't know how to mark text as TeX, see the appropriate section
17143 \begin_layout Subsubsection
17153 \begin_inset CommandInset label
17155 name "sec:slideNote"
17162 \begin_layout Standard
17171 is associated with a
17172 \begin_inset Quotes eld
17176 \begin_inset Quotes erd
17188 class provides visual cues.
17193 is shorter than that of a
17197 [yet longer than that of an
17201 ] and, like the label of an
17205 is shockingly magenta.
17206 Additionally, the printed
17210 has the page number of its
17211 \begin_inset Quotes eld
17215 \begin_inset Quotes erd
17223 \begin_inset Quotes eld
17231 \begin_inset Quotes erd
17235 \begin_inset Quotes eld
17243 \begin_inset Quotes erd
17247 \begin_inset Quotes eld
17255 \begin_inset Quotes erd
17259 You can have multiple
17263 s associated with a single
17275 , you'll probably want to break up long
17279 s so that they fit on a single sheet of paper.
17282 \begin_layout Standard
17287 is obvious: it contains anything additional you might want to say about
17293 It could also be used as a sheet of reminders for a particular
17298 In the case of the latter, you might want to make use of time markers.
17304 \begin_inset Quotes eld
17308 \begin_inset Quotes erd
17311 support for time markers, a
17316 So, you'll have to resort to using the LaTeX codes.
17319 \begin_layout Standard
17320 To use time markers, you'll need to specify the extra class option
17321 \begin_inset Quotes eld
17329 \begin_inset Quotes erd
17333 \begin_inset space ~
17337 \begin_inset CommandInset ref
17339 reference "sec:slidesetup"
17344 This option turns on timing marks, which will appear in the lower-left-hand
17350 To set what appears in the time marker, you use the LaTeX commands
17351 \begin_inset Quotes eld
17361 \begin_inset Quotes erd
17365 \begin_inset Quotes eld
17375 \begin_inset Quotes erd
17379 The arguments of both commands are time measured in seconds.
17381 \begin_inset Quotes eld
17391 \begin_inset Quotes erd
17394 sets the time marker to a given time.
17396 \begin_inset Quotes eld
17406 \begin_inset Quotes erd
17409 increments the time marker by the specified amount.
17410 Using time markers and
17414 s in this fashion, you can remind yourself how much time to spend on a particula
17422 \begin_layout Standard
17423 There's one last feature to describe.
17424 Clearly, you'd like to print out all of your
17432 s on transparencies while printing all of your
17449 with which it is associated.
17450 What's a person to do?
17453 \begin_layout Standard
17454 Luckily, there are two LaTeX commands that allow you to select what to print
17456 Both must be placed into the preamble of your document.
17458 \begin_inset Quotes eld
17470 \begin_inset Quotes erd
17473 will cause the output to contain only the
17482 Correspondingly, the command
17483 \begin_inset Quotes eld
17495 \begin_inset Quotes erd
17498 prevents the output of anything but
17503 I'd advise placing both commands in the preamble and initially comment
17505 You can then preview your entire presentation as you write.
17506 When you're done writing, you can then uncomment one of the two to select
17507 what you want to print.
17508 I like to uncomment
17509 \begin_inset Quotes eld
17521 \begin_inset Quotes erd
17524 , print to a file with
17525 \begin_inset Quotes eld
17533 \begin_inset Quotes erd
17536 in its name, comment it back out, then uncomment
17537 \begin_inset Quotes eld
17549 \begin_inset Quotes erd
17553 \begin_inset Quotes eld
17561 \begin_inset Quotes erd
17565 I can then send either file to a printer, loading transparencies or plain
17566 paper as appropriate.
17569 \begin_layout Standard
17570 You can also provide other arguments to the
17571 \begin_inset Quotes eld
17581 \begin_inset Quotes erd
17585 \begin_inset Quotes eld
17595 \begin_inset Quotes erd
17599 See a good LaTeX book for details.
17602 \begin_layout Subsection
17607 Class Template File
17610 \begin_layout Standard
17611 I have also provided a template file,
17612 \begin_inset Quotes eld
17620 \begin_inset Quotes erd
17628 To use it, begin your new presentation with
17633 ile\SpecialChar \menuseparator
17635 \begin_inset space ~
17639 \begin_inset space ~
17649 Your new LyX presentation file will contain an example
17670 additionally contain an example of the use of
17679 Lastly, the preamble will contain:
17682 \begin_layout LyX-Code
17683 % Uncomment to print out only slides and overlays
17686 \begin_layout LyX-Code
17690 \begin_layout LyX-Code
17696 \begin_inset Newline newline
17702 \begin_layout LyX-Code
17703 % Uncomment to print out only notes
17706 \begin_layout LyX-Code
17710 \begin_layout LyX-Code
17718 \begin_layout Standard
17719 One final thing: I created this class to support the LaTeX2e
17720 \begin_inset Quotes eld
17728 \begin_inset Quotes erd
17731 class, one of the built-in LaTeX2e classes.
17732 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17733 built-in slide class.
17734 It's here if you want it or need it.
17735 There exist other LaTeX2e classes for creating presentations, such as the
17741 \begin_inset space ~
17745 \begin_inset CommandInset ref
17747 reference "sec:foiltex"
17752 \begin_inset Quotes eld
17760 \begin_inset Quotes erd
17763 package [present on some TeX distributions].
17764 The latter is not yet supported under LyX.
17768 \begin_layout Plain Layout
17769 Perhaps you can take on the task\SpecialChar \ldots{}
17775 I know nothing about these other classes.
17776 Try them out to see what sort of alternative they provide.
17779 \begin_layout Chapter
17780 LyX Features needing Extra Software
17783 \begin_layout Section
17787 \begin_layout Standard
17793 \begin_layout Subsection
17797 \begin_layout Standard
17806 \begin_layout Plain Layout
17811 is not yet available when you are using the LaTeX distribution MiKTeX.
17816 , you'll find in the
17823 \begin_inset space ~
17834 \begin_inset CommandInset href
17836 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17843 \begin_layout Standard
17848 package is a program that was written by
17849 \begin_inset Flex Noun
17852 \begin_layout Plain Layout
17854 \begin_inset space ~
17862 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17863 and easy to forget.
17864 The program runs over your LaTeX file, checks the integrity of the file,
17865 and flags some common errors.
17866 In other technical words, it is
17873 \begin_layout Standard
17874 Well, what is a syntax checker doing in LyX which is supposed to produce
17875 correct LaTeX anyways? The answer is simple: Just as
17879 not only checks the
17883 of C programs, but also does
17887 checks for type-errors,
17891 catches some common
17895 errors, in addition to the syntactical ones.
17900 is capable of detecting several common errors, such as
17903 \begin_layout Itemize
17904 Ellipsis detection:
17905 \begin_inset Newline newline
17908 Use \SpecialChar \ldots{}
17912 \begin_layout Itemize
17913 No space in front of/after parenthesis:
17914 \begin_inset Newline newline
17920 \begin_layout Itemize
17921 Enforcement of normal space after common abbreviations:
17922 \begin_inset Newline newline
17926 \begin_inset space \thinspace{}
17930 \begin_inset space \space{}
17933 is too wide spacing.
17936 \begin_layout Itemize
17937 Enforcement of end-of-sentence space when the last sentence ends with a
17939 \begin_inset Newline newline
17943 And this is wrong spacing.
17946 \begin_layout Itemize
17947 Space in front of labels and similar commands:
17948 \begin_inset Newline newline
17951 The label should stick right up to the text to avoid falling to a wrong
17954 \begin_inset CommandInset label
17964 \begin_layout Plain Layout
17965 This footnote is in danger of falling off to a wrong page
17970 The label is separated too much.
17973 \begin_layout Itemize
17974 Space in front of references, instead of hard spaces:
17975 \begin_inset Newline newline
17978 In you are in bad luck, the text will break right between the referenced
17979 text and reference number, and that's a pity.
17981 \begin_inset CommandInset ref
17983 reference "sec:chktex"
17990 \begin_layout Itemize
17992 \begin_inset Quotes eld
17996 \begin_inset Quotes erd
18000 \begin_inset Formula $\times$
18004 \begin_inset Newline newline
18007 2x2 looks cheap compared to
18008 \begin_inset Formula $2\times2$
18014 \begin_layout Standard
18015 and more \SpecialChar \ldots{}
18016 It is an invaluable tool when you are
18017 \begin_inset Quotes eld
18021 \begin_inset Quotes erd
18024 your document before printing, and you should run it right after the obligatory
18025 spelling check, and before you go fine tuning the typesetting.
18028 \begin_layout Subsection
18032 \begin_layout Standard
18033 If you have the program installed, usage is as simple as choosing
18035 Tools\SpecialChar \menuseparator
18037 \begin_inset space ~
18043 This will make LyX generate a LaTeX file of your document, start
18047 to check it, and then make LyX insert
18048 \begin_inset Quotes eld
18052 \begin_inset Quotes erd
18055 with the warnings from
18059 , if there were any.
18060 The warnings will be placed close to the point of the mistake, and you
18061 can quickly find them by using the
18063 Navigate\SpecialChar \menuseparator
18066 menu item, or the shortcut key
18075 Open the error boxes by clicking on them with the mouse, or use the shortcut
18084 bindings, or the corresponding
18093 Read the warning and correct the mistake, if it is a mistake.
18094 If you have trouble understanding what the warning is about, you can safely
18096 Remember that there is a hidden layer between the document on screen and
18097 the technical details in invoking
18101 , and this gap can make some warnings seem arcane or just right down plain
18105 \begin_layout Standard
18106 This document is an excellent testing bed for the feature, and it should
18107 provide quite a few warnings for you to fiddle with.
18108 Since computers are only so smart, expect most of the warnings to be false
18112 \begin_layout Subsection
18113 How to fine tune it
18116 \begin_layout Standard
18117 Sometimes, you'll find that
18121 makes more noise than suits your mood.
18122 Then you can choose not to use it, wait until your mood changes, or try
18127 to get better along with you.
18130 \begin_layout Standard
18139 very configurable and extensible, you shouldn't expect to solve all problems
18145 Since LyX has to generate a somewhat special LaTeX file to be able to match
18146 the line numbers from the
18154 \begin_layout Plain Layout
18155 You can inspect the specific output from
18161 Edit\SpecialChar \menuseparator
18163 \begin_inset space ~
18167 \begin_inset space ~
18181 to the internal document structure, some of the warnings will not seen
18182 to appear correctly.
18183 There are two things you can do about this:
18186 \begin_layout Itemize
18191 invocation command line in
18207 installation configuration file (usually with the file
18212 See below to learn what warnings can be enabled and disabled on the command
18217 \begin_layout Itemize
18218 Export your document as a raw LaTeX file using
18220 File\SpecialChar \menuseparator
18221 Export\SpecialChar \menuseparator
18229 Invoked in this way, it can be a hassle to find the corresponding place
18230 in the document inside LyX, but with a little patience, you should be able
18234 \begin_layout Standard
18235 Here follows the warning messages that can be enabled and disabled in
18244 to disable a warning, and
18248 to enable a warning.
18249 The emphasized entries are disabled by default, because the default is
18252 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18257 \begin_layout Standard
18258 Notice that you should only use the options that enable and disable warnings,
18259 because LyX relies on some of the other command line parameters to be set
18260 in a specific way to have a chance to communicate with
18267 \begin_layout Enumerate
18271 Command terminated with space.
18274 \begin_layout Enumerate
18277 Non-breaking space (
18278 \begin_inset Quotes eld
18286 \begin_inset Quotes erd
18289 ) should have been used.
18292 \begin_layout Enumerate
18296 You should enclose the previous parenthesis with
18297 \begin_inset Quotes eld
18305 \begin_inset Quotes erd
18311 \begin_layout Enumerate
18314 Italic correction (
18315 \begin_inset Quotes eld
18325 \begin_inset Quotes erd
18328 ) found in non-italic buffer.
18331 \begin_layout Enumerate
18334 Italic correction (
18335 \begin_inset Quotes eld
18345 \begin_inset Quotes erd
18348 ) found more than once.
18351 \begin_layout Enumerate
18355 No italic correction (
18356 \begin_inset Quotes eld
18366 \begin_inset Quotes erd
18372 \begin_layout Enumerate
18376 \begin_inset Quotes eld
18384 \begin_inset Quotes erd
18388 \begin_inset Quotes eld
18396 \begin_inset Quotes erd
18402 \begin_layout Enumerate
18405 Wrong length of dash may have been used.
18408 \begin_layout Enumerate
18412 \begin_inset Quotes eld
18420 \begin_inset Quotes erd
18424 \begin_inset Quotes eld
18432 \begin_inset Quotes erd
18438 \begin_layout Enumerate
18442 \begin_inset Quotes eld
18450 \begin_inset Quotes erd
18456 \begin_layout Enumerate
18460 \begin_inset Quotes eld
18468 \begin_inset Quotes erd
18471 to achieve an ellipsis.
18474 \begin_layout Enumerate
18477 Inter-word spacing (
18478 \begin_inset Quotes eld
18488 \begin_inset Quotes eld
18491 ) should perhaps be used.
18494 \begin_layout Enumerate
18497 Inter-sentence spacing (
18498 \begin_inset Quotes eld
18508 \begin_inset Quotes erd
18511 ) should perhaps be used.
18514 \begin_layout Enumerate
18517 Could not find argument for command.
18520 \begin_layout Enumerate
18524 \begin_inset Quotes eld
18532 \begin_inset Quotes erd
18538 \begin_layout Enumerate
18541 Math mode still on at end of LaTeX file.
18544 \begin_layout Enumerate
18548 \begin_inset Quotes eld
18556 \begin_inset Quotes erd
18559 doesn't match the number of
18560 \begin_inset Quotes eld
18568 \begin_inset Quotes erd
18574 \begin_layout Enumerate
18577 You should use either
18580 \begin_inset Quotes eld
18588 \begin_inset Quotes erd
18593 as an alternative to
18594 \begin_inset Quotes eld
18602 \begin_inset Quotes erd
18608 \begin_layout Enumerate
18615 " (ASCII 39) instead of "
18622 \begin_layout Enumerate
18625 User-specified pattern found.
18628 \begin_layout Enumerate
18631 This command might not be intended.
18634 \begin_layout Enumerate
18641 \begin_layout Enumerate
18659 \begin_layout Enumerate
18662 Delete this space to maintain correct page references.
18665 \begin_layout Enumerate
18669 You might wish to put this between a pair of
18670 \begin_inset Quotes eld
18678 \begin_inset Quotes erd
18684 \begin_layout Enumerate
18687 You ought to remove spaces in front of punctuation.
18690 \begin_layout Enumerate
18693 Could not execute LaTeX command.
18696 \begin_layout Enumerate
18705 in front of small punctuation.
18708 \begin_layout Enumerate
18716 may look prettier here.
18719 \begin_layout Enumerate
18723 Multiple spaces detected in output.
18726 \begin_layout Enumerate
18729 This text may be ignored.
18732 \begin_layout Enumerate
18738 \begin_inset Quotes eld
18743 to begin quotation, not
18750 \begin_layout Enumerate
18757 to end quotation, not
18760 \begin_inset Quotes eld
18768 \begin_layout Enumerate
18774 \begin_layout Enumerate
18777 You should perhaps use
18778 \begin_inset Quotes eld
18786 \begin_inset Quotes erd
18792 \begin_layout Enumerate
18795 You should put a space in front of/after parenthesis.
18798 \begin_layout Enumerate
18801 You should avoid spaces in front of/after parenthesis.
18804 \begin_layout Enumerate
18808 You should not use punctuation in front of/after quotes.
18811 \begin_layout Enumerate
18814 Double space found.
18817 \begin_layout Enumerate
18820 You should put punctuation outside inner/inside display math mode.
18823 \begin_layout Enumerate
18826 You ought to not use primitive TeX in LaTeX code.
18829 \begin_layout Enumerate
18832 You should remove spaces in front of
18833 \begin_inset Quotes eld
18841 \begin_inset Quotes erd
18847 \begin_layout Enumerate
18850 \begin_inset Quotes eld
18858 \begin_inset Quotes erd
18861 is normally not followed by
18862 \begin_inset Quotes eld
18870 \begin_inset Quotes erd
18876 \begin_layout Standard
18877 In later versions of LyX, we hope to provide a more complete interface to
18878 this tool (and it's smaller cousin
18882 ) to exploit the full power of it.
18883 But it's not exactly useless as it is now: go try it on one of your existing
18884 documents of a certain length and be surprised.
18887 \begin_layout Section
18888 Version Control in LyX
18891 \begin_layout Standard
18894 Lars Gullik Bjønnes
18901 \begin_layout Subsection
18905 \begin_layout Standard
18906 A friend of mine wanted to try LyX for a group project.
18907 When he didn't find support for version control or file locking, he dropped
18909 This angered me a bit, so I thought that I should at least make support
18910 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18911 This has been done.
18912 LyX now supports some of the most basic RCS/CVS/SVN commands.
18913 If you need something a bit more sophisticated you will have to do that
18914 manually in a terminal.
18917 \begin_layout Standard
18918 Also note that CVS support is not as good as subversion support so we advice
18920 Good place to start with Subversion is SVN Book
18924 \begin_layout Plain Layout
18925 \begin_inset CommandInset href
18927 target "http://svnbook.red-bean.com/"
18937 In case of RCS you should read
18938 \begin_inset Quotes eld
18942 \begin_inset Quotes erd
18945 (a man file, read it with
18950 This file describes all the basic features of RCS.
18951 You should especially notice the comment about a RCS directory, and the
18952 notion of a master RCS file (the file ending in
18959 \begin_layout Standard
18960 Before you begin to use the version control features in LyX, you should
18961 be familiar with RCS/CVS/SVN usage.
18962 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18963 package—no guarantees are made for older versions.
18964 Most of the log messages are not currently displayed after operations —
18965 you can check them in Messages pane if unsure.
18968 \begin_layout Standard
18969 For introducing your own external commands consult vc-command in the manual
18973 \begin_layout Subsection
18974 RCS commands in LyX
18977 \begin_layout Standard
18978 The following sections describe the RCS commands supported by LyX.
18979 You can find them in the
18981 File\SpecialChar \menuseparator
18983 \begin_inset space ~
18989 LyX was tested against RCS 5.7.
18992 \begin_layout Subsubsection
18998 \begin_layout Standard
18999 If your document is not under revision control, this is the only item shown
19001 And if it is under revision control, the
19005 item is not visible.
19009 \begin_layout Standard
19010 This command registers your document with RCS (unless you are under the
19011 directory managed by CVS)\SpecialChar \@.
19012 You are asked interactively to supply an initial
19013 description of the document.
19014 The document is now set in Read-Only mode and you have to
19017 \begin_inset space ~
19021 \begin_inset space ~
19025 \begin_inset space ~
19030 , before making any changes to it.
19031 A document under revision control has a
19032 \begin_inset Quotes eld
19035 [RCS:<version> <locker>]
19036 \begin_inset Quotes erd
19039 item tagged to the filename in the minibuffer.
19042 \begin_layout Standard
19043 RCS command that is run:
19045 ci -q -u -i -t-"<initial description>" <file-name>
19048 \begin_layout Standard
19053 to understand the switches.
19057 \begin_layout Subsubsection
19063 \begin_layout Standard
19064 When you are finished editing a file, you check in your changes.
19065 When you do this, you are asked for a description of the changes.
19066 This is stored in the history log.
19067 The version number is bumped, your changes are applied to the master RCS
19068 file, the document is unlocked and set to Read-Only mode.
19072 \begin_layout Standard
19075 ci -q -u -m"<description>" <file-name>
19078 \begin_layout Subsubsection
19084 \begin_layout Standard
19085 By doing this you lock the document so that only you can edit it.
19086 This will also make the document Read-Write only for you.
19087 You will usually continue editing for a while and when you are finished
19088 you check in your changes.
19089 The status line is changed to reflect that you have locked the file.
19093 \begin_layout Standard
19096 co -q -l <file-name>
19099 \begin_layout Subsubsection
19102 Revert To Repository Version
19105 \begin_layout Standard
19106 This will discard all changes made to the document since the last check
19108 You get a warning before changes are discarded.
19111 \begin_layout Standard
19114 co -f -u<version> <file-name>
19117 \begin_layout Subsubsection
19123 \begin_layout Standard
19124 This makes as if the last check in never happened.
19125 No changes are made to the document loaded into LyX, but the last version
19126 is removed from the master RCS file.
19130 \begin_layout Standard
19133 rcs -o<version> <file-name>
19136 \begin_layout Subsubsection
19142 \begin_layout Standard
19143 This shows the complete history of the RCS document.
19148 is shown in a browser.
19156 \begin_layout Subsubsection
19160 \begin_layout Standard
19161 LyX supports RCS version number, author name, date and time of last commit.
19162 All those are extracted from
19164 rlog -r <file-name>
19167 For other details see
19168 \begin_inset CommandInset ref
19170 reference "sub:VCS-Revision-Information"
19177 \begin_layout Subsection
19178 CVS commands in LyX
19181 \begin_layout Standard
19182 A subset of CVS operations is supported by LyX.
19183 You can find the commands in the
19185 File\SpecialChar \menuseparator
19187 \begin_inset space ~
19193 The version control system SVN is more powerful, so please use it instead
19194 of CVS if possible.
19197 \begin_layout Subsubsection
19203 \begin_layout Standard
19204 If you start from scratch with CVS you have to create your repository and
19205 checkout the working copy with external tools.
19206 If you're using a client-server setup you may need to login before doing
19207 the first repository checkout.
19210 \begin_layout Standard
19211 If your documents are under revision control and others are using the same
19212 repository problems arise when different changes to the same document at
19213 the same location happen.
19214 Standard CVS repositories doesn't operate with a file locking mechanism.
19215 This may be surprising, but conflicts only occur if people disagree on
19216 the proper content of the same part of a document.
19217 So, if co-workers are used to communicate regularly, these conflicts occur
19219 If they don't communicate they have a fundamental problem anyway.
19220 Nevertheless some people like to work with so called
19221 \begin_inset Quotes eld
19225 \begin_inset Quotes erd
19229 If they do so the working copy of all files is readonly when checked out
19230 first and the user starts editing after using a special command to make
19231 the working copy writable.
19232 When the changes are checked in the working copy returns to readonly state.
19233 With LyX one has to edit the
19234 \begin_inset Flex Code
19237 \begin_layout Plain Layout
19243 file and add the line
19244 \begin_inset Flex Code
19247 \begin_layout Plain Layout
19253 to work with reserved checkouts.
19254 The benefit is the possibility to see who is using a writable copy of some
19256 It's not guaranteed only one user makes a copy writable.
19259 \begin_layout Standard
19260 LyX tries to guess if you're using reserved or non-reserved checkouts.
19261 If your working copy is readonly or it is writable and an additional copy
19262 of your document exists in the CVS/Base sub-directory a reserved otherwise
19263 a non-reserved checkout is assumed.
19264 When a reserved checkout is detected you have to use
19265 \begin_inset Flex MenuItem
19268 \begin_layout Plain Layout
19274 to make your working copy writable if it's readonly.
19276 \begin_inset Flex MenuItem
19279 \begin_layout Plain Layout
19285 operation is possible and that makes your working copy readonly again after
19286 transferring your changes to the repository.
19289 \begin_layout Standard
19290 More information about CVS can be found here
19291 \begin_inset Flex URL
19294 \begin_layout Plain Layout
19296 http://www.nongnu.org/cvs
19302 \begin_inset Flex URL
19305 \begin_layout Plain Layout
19307 http://ximbiot.com/cvs
19315 \begin_layout Standard
19320 to understand the sub-commands and the switches mentioned below.
19323 \begin_layout Subsubsection
19329 \begin_layout Standard
19330 If your document is not under revision control, this is the only item shown
19332 And if it is under revision control, the
19339 item is not visible.
19343 \begin_layout Standard
19344 This command registers in CVS your document
19345 \begin_inset Flex Strong
19348 \begin_layout Plain Layout
19356 in case you have already the documents directory under CVS control (in
19362 This means you have to create or checkout the archive by yourself using
19364 (In case you forget that step LyX registers the document with RCS.)
19367 \begin_layout Standard
19368 Then you are asked interactively to supply an initial description of the
19370 Don't forget that registered file is not yet checked in.
19373 \begin_layout Standard
19374 CVS command that is run:
19376 cvs -q add -m"<entered message>" "<file-name>"
19379 \begin_layout Standard
19384 above and for all other CVS commands is an abbreviation for
19385 \begin_inset Quotes eld
19388 change the current working directory to file location and use the file name
19389 without path component as argument
19390 \begin_inset Quotes erd
19396 \begin_layout Subsubsection
19402 \begin_layout Standard
19403 When you are finished editing a file, you commit your changes.
19404 When you do this and you had changed the document, you are asked for a
19405 description of the changes.
19406 After that changes are written to the repository.
19407 In case you didn't change the document and a reserved checkout is detected
19408 the reservation made on
19409 \begin_inset Flex MenuItem
19412 \begin_layout Plain Layout
19421 \begin_layout Labeling
19422 \labelwidthstring 00.00.0000
19424 \begin_inset space ~
19428 \begin_inset space ~
19432 \begin_inset Newline newline
19436 \begin_inset Flex Code
19439 \begin_layout Plain Layout
19442 -q commit -m"<description>" "<file-name>"
19448 \begin_inset Newline newline
19452 \begin_inset Flex Code
19455 \begin_layout Plain Layout
19466 \begin_layout Subsubsection
19472 \begin_layout Standard
19473 When you are sharing a repository with others, you may have to incorporate
19474 their changes into your working copy.
19477 \begin_layout Standard
19480 cvs -q update "<file-name>"
19483 \begin_layout Standard
19484 If a readonly checkout is detected the working copy is made writable and
19488 \begin_layout Standard
19491 cvs -q edit "<file-name>"
19494 \begin_layout Subsubsection
19497 Revert To Repository Version
19500 \begin_layout Standard
19501 This will discard all changes made to the document since the last check
19503 You get a warning before changes are discarded.
19504 Firstly the file is deleted, secondly CVS update command is run.
19507 \begin_layout Standard
19510 cvs -q update "<file-name>"
19513 \begin_layout Standard
19514 If a reserved checkout is detected and the working copy has no changes only
19515 the reservation is undone.
19518 \begin_layout Standard
19521 cvs -q unedit "<file-name>"
19524 \begin_layout Subsubsection
19525 Update of the local directory checkout from repository
19528 \begin_layout Standard
19529 Once your documents gets more complex, containing sub-documents and pictures,
19531 \begin_inset Flex Code
19534 \begin_layout Plain Layout
19540 files and so on using version control becomes more complicated.
19541 LyX supports updating the whole tree in which resides the document.
19542 This become especially useful once you cooperate with people which neither
19543 have detailed knowledge about CVS usage nor they have ambition to commit
19544 additional material to the repository.
19545 You have to organize the files structure so that all external files are
19546 in the same directory or subdirectories of the document.
19547 It's good practice anyway to store multipart documents in an extra directory.
19550 \begin_layout Standard
19552 \begin_inset Flex Code
19555 \begin_layout Plain Layout
19556 Update local directory from repository
19561 command updates the whole directory.
19562 If local changes are detected user is warned before update starts.
19563 In case of merge conflicts both versions of the conflicting document parts
19564 are placed in the final document.
19565 You have to review and correct the result of the merge.
19566 You'll find the conflicts enclosed in pairs of
19567 \begin_inset Flex Code
19570 \begin_layout Plain Layout
19577 \begin_inset Flex Code
19580 \begin_layout Plain Layout
19587 \begin_inset Flex Code
19590 \begin_layout Plain Layout
19597 The first part is your version as before the update operation with the
19598 document name prepended.
19599 The second one is the repository version with the version number after
19601 \begin_inset Flex Code
19604 \begin_layout Plain Layout
19613 \begin_layout Labeling
19614 \labelwidthstring 00.00.0000
19616 \begin_inset space ~
19620 \begin_inset space ~
19624 \begin_inset Newline newline
19628 \begin_inset Flex Code
19631 \begin_layout Plain Layout
19639 (Ask if changes are detected.)
19640 \begin_inset Newline newline
19644 \begin_inset Flex Code
19647 \begin_layout Plain Layout
19648 cd $path; cvs -q update
19658 \begin_layout Standard
19660 \begin_inset Flex Code
19663 \begin_layout Plain Layout
19669 stands for the path to the document.
19672 \begin_layout Subsubsection
19678 \begin_layout Standard
19679 This shows the complete history of the CVS document.
19682 cvs log "<file-name>"
19684 is shown in a browser.
19687 \begin_layout Subsection
19688 SVN commands in LyX
19691 \begin_layout Standard
19692 SVN is now partially supported by LyX.
19693 You can find the commands in the
19695 File\SpecialChar \menuseparator
19697 \begin_inset space ~
19703 Please note that if you use password protected access to repository via
19704 ssh, you will be asked in terminal window.
19705 LyX was tested against SVN 1.5 and 1.6
19709 \begin_layout Plain Layout
19710 Most of the commands will work with 1.4 too, see
19711 \begin_inset CommandInset ref
19713 reference "sub:SVN-Repo-Update"
19725 \begin_layout Subsubsection
19731 \begin_layout Standard
19732 If your document is not under revision control, this is the only item shown
19734 And if it is under revision control, the
19741 item is not visible.
19745 \begin_layout Standard
19746 This command registers in SVN your document ONLY in case you have already
19747 the documents directory under SVN control (in particular
19752 This means you have to checkout the archive by yourself.
19756 \begin_layout Standard
19757 Then you are asked interactively to supply an initial description of the
19759 Don't forget that registered file is not yet commited.
19762 \begin_layout Standard
19763 SVN command that is run:
19766 \begin_inset Quotes eld
19770 \begin_inset Quotes erd
19776 \begin_layout Standard
19781 to understand the switches.
19785 \begin_layout Subsubsection
19791 \begin_layout Standard
19792 When you are finished editing a file, you commit your changes.
19793 When you do this, you are asked for a description of the changes.
19794 After that changes are commited.
19797 \begin_layout Standard
19802 \begin_layout Plain Layout
19803 In case locking is not enabled.
19805 \begin_inset CommandInset ref
19807 reference "subsec:SVN-File-Locking"
19818 svn commit -q -m"<description>" <file-name>
19821 \begin_layout Subsubsection
19827 \begin_layout Standard
19828 Updates the changes of this file from the repository.
19829 Be sure you understand SVN merging and conflicts resolving before using
19830 this function, because all conflicts has to be resolved manually by you!
19833 \begin_layout Standard
19838 \begin_layout Plain Layout
19846 svn update --non-interactive
19847 \begin_inset Quotes eld
19851 \begin_inset Quotes erd
19857 \begin_layout Subsubsection
19860 Revert To Repository Version
19863 \begin_layout Standard
19864 This will discard all changes made to the document since the last check
19866 You get a warning before changes are discarded.
19870 \begin_layout Standard
19874 \begin_inset Quotes eld
19878 \begin_inset Quotes erd
19884 \begin_layout Subsubsection
19885 \begin_inset CommandInset label
19887 name "sub:SVN-Repo-Update"
19891 Update of the local directory checkout from repository
19895 \begin_layout Plain Layout
19896 Note that this command will work only with subversion
19897 \begin_inset Formula $\geqq1.5$
19908 \begin_layout Standard
19909 All the commands above have one shortcomming - they deal with the current
19911 Once your document contains pictures, includes external
19912 \begin_inset Flex Code
19915 \begin_layout Plain Layout
19921 files and so on administration becomes more complicated.
19922 LyX now supports updating the whole tree in which resides the document
19926 \begin_layout Plain Layout
19927 One need to organize the files structure so that all external files are
19928 in the same directory or subdirectories of the document.
19935 This become especially useful once you cooperate with people which neither
19936 know about subversion management nor they have ambition to commit additional
19937 material to the repository.
19941 \begin_layout Standard
19942 \begin_inset Flex Code
19945 \begin_layout Plain Layout
19946 Update local directory from repository
19951 command updates the whole directory and in case of merge conflicts local
19952 version of the files are left, so no unintended data loss occurs.
19953 If local changes are detected user is warned before update starts.
19956 \begin_layout Labeling
19957 \labelwidthstring 00.00.0000
19959 \begin_inset space ~
19963 \begin_inset space ~
19967 \begin_inset Newline newline
19971 \begin_inset Flex Code
19974 \begin_layout Plain Layout
19980 (Ask if changes are detected.)
19981 \begin_inset Newline newline
19985 \begin_inset Flex Code
19988 \begin_layout Plain Layout
19989 svn update --accept mine-full $path
19997 \begin_layout Standard
19999 \begin_inset Flex Code
20002 \begin_layout Plain Layout
20008 stands for the path to the document.
20011 \begin_layout Subsubsection
20017 \begin_layout Standard
20018 This shows the complete history of the SVN document.
20022 \begin_inset Quotes eld
20026 \begin_inset Quotes erd
20031 is shown in a browser.
20034 \begin_layout Subsubsection
20036 \begin_inset CommandInset label
20038 name "subsec:SVN-File-Locking"
20045 \begin_layout Standard
20046 The file exchange through various revision control systems brings the problem
20047 of merge conflicts in case two different users try to edit the same (parts
20049 When such a conflict happens it needs manual resolving and one reasonable
20050 alternative is to provide some kind of locking mechanism, which guarantees
20051 that only one user is allowed to edit file at the given time.
20054 \begin_layout Standard
20055 SVN has two such mechanisms to provide mutual exclusivity for file access
20056 - locks and automatic setting of write permissions (see sec.
20058 \begin_inset CommandInset ref
20060 reference "subsec:Automatical-Locking-Property"
20065 \begin_inset Flex Code
20068 \begin_layout Plain Layout
20078 \begin_layout Plain Layout
20079 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20085 If this property is detected for a given document LyX starts to use SVN
20086 locks for document editing automatically and the whole check-in/out mechanism
20087 switches to the same regimen as for RCS.
20088 This in particular means there are two different modes of file use in LyX:
20091 \begin_layout Itemize
20093 The loaded file is in the read-only mode.
20094 For editing on needs to check-out.
20099 consists of updating from the repository and gaining write lock.
20100 If the lock is not possible to obtain, we remain in unlocked state.
20103 \begin_layout Itemize
20105 The loaded file is in the 'normal' edit mode.
20106 No other user is allowed to edit the file.
20111 consists of commiting changes and releasing write-lock.
20112 If no changes have been made to the document, no commit will be produced
20116 \begin_layout Plain Layout
20117 Don't be puzzled by the fact that you will be asked for commit message anyway.
20122 and only the write-lock will be released.
20125 \begin_layout Standard
20129 \begin_layout Labeling
20130 \labelwidthstring 00.00.0000
20133 svn commit -q -m"<description>" "<file-name>"
20134 \begin_inset Newline newline
20137 svn unlock "<file-name>"
20140 \begin_layout Labeling
20141 \labelwidthstring 00.00.0000
20144 svn update "<file-name>"
20145 \begin_inset Newline newline
20148 svn lock "<file-name>"
20151 \begin_layout Subsubsection
20154 \begin_inset CommandInset label
20156 name "subsec:Automatical-Locking-Property"
20162 Automatic Locking Property
20165 \begin_layout Standard
20166 The above mentioned automatic setting of write permissions of the .lyx file
20172 ile\SpecialChar \menuseparator
20178 \begin_inset space ~
20181 Control\SpecialChar \menuseparator
20186 oggle locking property
20189 This command is active only when the file is not locked on the svn server
20191 you need to check-out before proceeding).
20194 \begin_layout Labeling
20195 \labelwidthstring 00.00.0000
20197 \begin_inset space ~
20203 \begin_layout Labeling
20204 \labelwidthstring 00.00.0000
20207 svn propset svn:needs-lock ON "<file-name>"
20210 \begin_layout Labeling
20211 \labelwidthstring 00.00.0000
20214 svn propdel svn:needs-lock "<file-name>"
20217 \begin_layout Subsubsection
20218 \begin_inset CommandInset label
20220 name "sub:VCS-Revision-Information"
20224 Revision Information in Documents
20227 \begin_layout Standard
20228 There are more possibilities how to activate revision information in our
20232 \begin_layout Itemize
20233 LyX supports directly:
20237 \begin_layout Itemize
20238 tree revision information (
20239 \begin_inset Flex Code
20242 \begin_layout Plain Layout
20249 The result is the output of the
20250 \begin_inset Flex Code
20253 \begin_layout Plain Layout
20259 command, the following table gives you an idea, how to read the results.
20262 \begin_layout Standard
20264 \begin_inset Tabular
20265 <lyxtabular version="3" rows="6" columns="2">
20266 <features tabularvalignment="middle">
20267 <column alignment="center" valignment="top" width="0">
20268 <column alignment="center" valignment="top" width="0">
20270 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20273 \begin_layout Plain Layout
20279 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20282 \begin_layout Plain Layout
20290 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20293 \begin_layout Plain Layout
20299 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20302 \begin_layout Plain Layout
20303 mixed revision working copy
20310 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20313 \begin_layout Plain Layout
20319 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20322 \begin_layout Plain Layout
20323 modified working copy
20330 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20333 \begin_layout Plain Layout
20339 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20342 \begin_layout Plain Layout
20343 switched working copy
20350 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20353 \begin_layout Plain Layout
20359 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20362 \begin_layout Plain Layout
20363 partial working copy, from a sparse checkout
20370 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20373 \begin_layout Plain Layout
20379 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20382 \begin_layout Plain Layout
20383 mixed revision, modified, switched working copy
20396 \begin_layout Itemize
20397 file revision information.
20398 The result comes from parsing the output of
20399 \begin_inset Flex Code
20402 \begin_layout Plain Layout
20404 \begin_inset space ~
20408 \begin_inset space ~
20412 \begin_inset space ~
20421 Supported flags are:
20425 \begin_layout Itemize
20426 version number of the last commit (
20427 \begin_inset Flex Code
20430 \begin_layout Plain Layout
20439 \begin_layout Itemize
20440 author of the last commit (
20441 \begin_inset Flex Code
20444 \begin_layout Plain Layout
20453 \begin_layout Itemize
20454 date of the last commit (
20455 \begin_inset Flex Code
20458 \begin_layout Plain Layout
20467 \begin_layout Itemize
20468 time of the last commit (
20469 \begin_inset Flex Code
20472 \begin_layout Plain Layout
20482 \begin_layout Standard
20483 You can obtain this info via InsetInfo (e.g.
20485 \begin_inset Flex Code
20488 \begin_layout Plain Layout
20489 info-insert buffer vcs-date
20495 The information will be available only when you have the file stored under
20496 svn managment (i.e.
20498 \begin_inset Flex Code
20501 \begin_layout Plain Layout
20507 directory is available with your document).
20511 \begin_layout Itemize
20512 Another---a hacking one---possibility is to use svn keywords
20516 \begin_layout Plain Layout
20517 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20523 In short -- you set file keywords property (e.g.
20526 svn propset svn:keywords 'Rev' file.lyx
20528 ) and then paste keyword TeX code
20532 \begin_layout Plain Layout
20533 This is an easy way how to ensure that LyX won't break the line in the middle
20539 tag in your document (e.g.
20544 \begin_layout Plain Layout
20552 This way svn client will automatically substitute revision number (e.g.
20557 \begin_layout Plain Layout
20564 ) after each update and commit.
20565 There are more problems with this approach.
20566 Firstly, the '$' character is used in TeX world for math equations, so
20567 any occurence of math formula
20568 \begin_inset Formula $Rev$
20572 \begin_inset Formula $Rev:59$
20575 in your LyX document.
20576 Similarly for other keywords like Id, Date, Author, etc.
20577 Secondly svn output is dependent on your locales, so its very easy that
20578 svn would produce some problematic strings once Date is used.
20579 Thirdly you get the whole 'Rev: 59' string in your document instead of
20581 Until subversion implements user's custom keywords it will be hard to use
20582 this approach reliably or let LyX to support it directly.
20585 \begin_layout Subsection
20586 SVN and Windows Environment
20589 \begin_layout Quote
20590 My inclination is to say that if the user cannot figure out the command
20591 line operations on their own fairly quickly, they would be well advised
20592 to use TortoiseSVN.
20598 \begin_layout Subsubsection
20602 \begin_layout Standard
20603 In addition to installing LyX, and having access to a Subversion repository,
20604 the user will need to install the Subversion client program.
20605 A Windows installer for the client program is available from
20606 \begin_inset CommandInset href
20609 target "http://www.collab.net/nonav/downloads/subversion/"
20614 The user may also want to install
20615 \begin_inset CommandInset href
20618 target "http://tortoisesvn.tigris.org/"
20622 , which integrates Subversion operations into the context (rightclick) menu
20623 of Windows Explorer.
20624 Operations done outside LyX will typically be more convenient using the
20625 Explorer context menu.
20626 Note that TortoiseSVN is not a replacement for the client program, which
20627 is what LyX itself will use.
20630 \begin_layout Subsubsection
20631 Bringing a document under Subversion control
20634 \begin_layout Standard
20635 Before a LyX document can be brought under version control in Subversion,
20636 its parent directory needs to be under version control.
20637 If the document is being added to a project already in the repository,
20638 this is accomplished by checking the project out to the directory where
20639 the new document will be placed.
20640 If the project itself is not yet under version control (for instance, if
20641 this document starts a new project), the directory must be imported into
20643 This is done outside LyX.
20644 Both import and checkout are easily accomplished from the Explorer context
20645 menu using TortoiseSVN, or alternatively can be done using the command
20646 line client at a DOS prompt.
20647 The procedure for importing the project using TortoiseSVN is described
20648 below, assuming an existing repository and a new project being started
20656 For information on using the Subversion client program, run
20663 \begin_layout Enumerate
20670 in Windows Explorer, right click it, and select
20672 TortoiseSVN > Repo-browser
20675 If necessary, adjust the URL for the repository, then click OK.
20678 \begin_layout Enumerate
20679 Right click the level of the repository under which you want to place the
20680 new project folder (typically the top level) and click
20682 Create folder\SpecialChar \ldots{}
20685 Supply a name for the project folder and click OK.
20686 Add a message for the log file if desired, then click OK again.
20687 The new project folder should appear in the repository.
20688 Finally, click OK again to exit the repository browser.
20691 \begin_layout Enumerate
20692 Once again right click
20698 , this time selecting SVN Checkout\SpecialChar \ldots{}
20699 Select the URL of the project folder
20700 you just created in the repository, and set the checkout directory to
20708 You will be warned about a non-empty folder; click OK to proceed.
20709 You should now have a
20720 \begin_layout Enumerate
20721 Create or open your document in LyX and click
20726 ile\SpecialChar \menuseparator
20732 \begin_inset space ~
20735 Control\SpecialChar \menuseparator
20743 Add a log message and click OK to commit the document to version control.
20746 \begin_layout Standard
20747 From this point onward, you should have full functionality in the
20752 ile\SpecialChar \menuseparator
20758 \begin_inset space ~
20764 You also have the option of checking the document in and out, viewing its
20766 using the TortoiseSVN context menu in Windows Explorer or the Subversion
20767 client program from a command prompt.
20770 \begin_layout Subsubsection
20771 SSH tunnel used with SVN under Windows
20774 \begin_layout Standard
20775 Compared with Linux setting up svn client to communicate over ssh under
20776 Windows is a rather troublesome task.
20777 We will at least offer some hints how to setup the client side but prior
20778 knowledge about ssh and the Windows command line is needed, also be prepared
20779 for a great deal of frustration\SpecialChar \ldots{}
20783 \begin_layout Enumerate
20784 Get a svn client for windows, as described in the previous sections.
20785 When it is a fresh install run some svn command (e.g.
20787 \begin_inset Flex Code
20790 \begin_layout Plain Layout
20796 ) to create config files, which you will need to change later on.
20799 \begin_layout Enumerate
20800 Choose a ssh client for Windows.
20801 There are several possibilities, we will use the one from Putty tools
20805 \begin_layout Plain Layout
20806 \begin_inset Flex URL
20809 \begin_layout Plain Layout
20811 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20822 You will need to set the connection up so that the client doesn't ask for
20823 any password from you.
20824 To keep things easy we will use only keys without any additional password
20829 \begin_layout Enumerate
20831 \begin_inset Flex Code
20834 \begin_layout Plain Layout
20841 Save your private .ppk key file and put the public one on the server side.
20842 If the SVN server runs on Linux, note that the format of the public key
20843 is not compatible with Linux openssh and you will need to direcly copy-paste
20846 Public key for pasting into OpenSSH authorized_keys file
20848 :” edit field into the server's
20849 \begin_inset Flex Code
20852 \begin_layout Plain Layout
20853 ~/.ssh/authorized_keys
20859 \begin_inset Flex Code
20862 \begin_layout Plain Layout
20871 \begin_layout Enumerate
20873 \begin_inset Flex Code
20876 \begin_layout Plain Layout
20883 In the SVN config file
20887 \begin_layout Plain Layout
20888 Exact path depends on Windows version, usually somewhere around
20889 \begin_inset Flex Code
20892 \begin_layout Plain Layout
20895 Documents and Settings
20909 \begin_inset Flex Code
20912 \begin_layout Plain Layout
20927 , section [tunnels], setup ssh command, e.g.
20929 \begin_inset Flex Code
20932 \begin_layout Plain Layout
20933 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20942 \begin_layout Plain Layout
20943 It will usually take a lot of time to get exact command right and it depends
20945 For example do not have some remote server saved as a default session in
20947 If things fail, try to connect via plink without SVN first.
20956 \begin_layout Enumerate
20957 Checkout the SVN archive, e.g.
20959 \begin_inset Flex Code
20962 \begin_layout Plain Layout
20963 svn co svn+ssh://user@server/repository_path
20971 \begin_layout Subsubsection
20972 End-of-Line Conversions
20975 \begin_layout Standard
20976 When the collaborators are mixing Linux and Windows environments, LyX will
20977 use different line endings inside the .lyx files.
20978 This is not a problem as far as LyX functionality is concerned, but the
20979 commit diffs will be huge and merge-conflicts prone.
20980 Fortunately SVN itself knows
20984 \begin_layout Plain Layout
20985 \begin_inset Flex URL
20988 \begin_layout Plain Layout
20990 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21000 how to deal with CR/LF problems when switching .lyx files to the
21001 \begin_inset Flex Code
21004 \begin_layout Plain Layout
21014 \begin_layout Plain Layout
21016 \begin_inset Flex Code
21019 \begin_layout Plain Layout
21020 svn propset svn:eol-style native FILE_NAME
21033 \begin_layout Subsection
21037 \begin_layout Standard
21038 With the recent addition of the vc-command function LyX power users are
21039 allowed to create their own commands for revision control.
21042 \begin_layout Standard
21043 As an example you can see how two TortoiseSVN commands could be integrated
21047 \begin_layout Description
21049 \begin_inset Flex Code
21052 \begin_layout Plain Layout
21053 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21061 \begin_layout Description
21063 \begin_inset Flex Code
21066 \begin_layout Plain Layout
21067 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21075 \begin_layout Subsection
21076 Version control and Document comparison
21079 \begin_layout Standard
21080 One of the typical uses of version control is to inspect the changes between
21081 revisions, usually by creating
21082 \begin_inset Flex Code
21085 \begin_layout Plain Layout
21092 While this is useful for plain text files, it is much less useful in the
21093 case of LyX files, which have more complicated structure.
21094 Hence we provide binding to the Document comparison feature.
21095 They are two ways of calling this feature - either by direct call of
21096 \begin_inset Flex Code
21099 \begin_layout Plain Layout
21105 LyX function (for details see LyX functions manual) or by icon/menu item
21107 \begin_inset Flex MenuItem
21110 \begin_layout Plain Layout
21111 Compare with older revision...
21117 One can either compare two chosen revisions of the document or he can simply
21118 compare the current version of edited text with older revisions (where
21120 \begin_inset Flex MenuItem
21123 \begin_layout Plain Layout
21129 ' revisions back means comparison of the edited file with last commited
21134 \begin_layout Standard
21135 This feature is supported for SVN and RCS though due to the more complicated
21136 versioning scheme of RCS there is a constraint -- when addressing the revisions
21137 in dialog, numbers always point to the last number in RCS revision number,
21142 \begin_layout Section
21143 Literate Programming
21146 \begin_layout Standard
21151 (kayvan@sylvan.com)
21155 original documentation written by
21157 Edmar Wienskoski Jr.
21160 (edmar-w-jr@technologist.com)
21163 \begin_layout Subsection
21167 \begin_layout Standard
21168 The main purpose of this documentation is to show you how to use LyX for
21169 literate programming, where it is assumed that you are familiar with this
21170 programming technique, and know what
21171 \begin_inset Quotes eld
21175 \begin_inset Quotes erd
21179 \begin_inset Quotes eld
21183 \begin_inset Quotes erd
21187 If that is not the case, please follow the web links provided in the following
21189 There is a lot of good documentation out there covering old development
21190 history to the latest tools tips.
21193 \begin_layout Standard
21194 It is also assumed that you are familiar with LyX itself to a point that
21195 you are comfortable changing your LyX preferences, and X resources file.
21196 If that is not the case please refer to other LyX documentation to cover
21197 your specific needs.
21200 \begin_layout Subsection
21201 Literate Programming
21204 \begin_layout Standard
21205 From the Literate Programming FAQ:
21208 \begin_layout Quotation
21209 Literate programming is the combination of documentation and source together
21210 in a fashion suited for reading by human beings.
21211 In fact, literate programs should be enjoyable reading, even inviting!
21212 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21213 and documentation in a single file.
21214 Literate programming tools then parse the file to produce either readable
21215 documentation or compilable source.
21216 The WEB style of literate programming was created by D.
21217 \begin_inset space \thinspace{}
21221 Knuth during the development of his TeX typesetting software.
21225 \begin_layout Standard
21226 Another excerpt says:
21229 \begin_layout Quotation
21232 How is literate programming different from verbose commenting?
21235 \begin_layout Quotation
21236 There are three distinguishing characteristics.
21237 In order of importance, they are:
21241 \begin_layout Itemize
21242 flexible order of elaboration
21245 \begin_layout Itemize
21246 automatic support for browsing
21249 \begin_layout Itemize
21250 typeset documentation, especially diagrams and mathematics
21254 \begin_layout Standard
21255 Now that I sparked your curiosity, take a look in the references.
21258 \begin_layout Subsubsection
21262 \begin_layout Standard
21263 The complete Literate Programming FAQ can be found at:
21266 \begin_layout Quote
21267 Literate Programming FAQ
21268 \begin_inset Flex URL
21271 \begin_layout Plain Layout
21273 http://www.literateprogramming.com/lpfaq.pdf
21281 \begin_layout Standard
21282 The FAQ lists 23 (twenty three!) different literate programming tools.
21283 Where some are specialized or
21284 \begin_inset Quotes eld
21288 \begin_inset Quotes erd
21291 for particular programming languages, while other have general scope.
21296 for my own use for several reasons:
21299 \begin_layout Itemize
21300 It can generate the documentation either in LaTeX or HTML.
21303 \begin_layout Itemize
21304 It has a open architecture, i.
21305 \begin_inset space \thinspace{}
21309 \begin_inset space \space{}
21312 it is easy to plug in new filters and to perform special processing that
21317 \begin_layout Itemize
21318 There is a good selection of filters available already (the HTML is one
21322 \begin_layout Itemize
21326 \begin_layout Standard
21327 The Noweb web page can be found at:
21330 \begin_layout Quote
21332 \begin_inset Flex URL
21335 \begin_layout Plain Layout
21337 http://www.cs.virginia.edu/~nr/noweb/
21345 \begin_layout Standard
21346 Starting from there you can reach many other interesting links and even
21347 some literate program examples.
21350 \begin_layout Subsection
21351 LyX and Literate Programming
21354 \begin_layout Standard
21355 The LyX support for Literate Programming is provided by using the generic
21356 LyX converters mechanism.
21357 This support is provided in a
21358 \begin_inset Quotes eld
21362 \begin_inset Quotes erd
21366 \begin_inset space \thinspace{}
21370 \begin_inset space \space{}
21373 you will be able to use this new LyX feature with some other literate programmin
21374 g tool of your choice by just changing your LyX preferences.
21377 \begin_layout Subsubsection
21378 Generating documents and code (weaving and tangling)
21381 \begin_layout Paragraph
21382 Selecting the document class
21385 \begin_layout Standard
21386 If you have installed Noweb and LyX successfully, whenever you open a new
21387 document or try to change the document class of an existing one, you will
21388 find that there are three new document classes available:
21391 \begin_layout Itemize
21395 \begin_layout Itemize
21399 \begin_layout Itemize
21403 \begin_layout Standard
21404 You must select one of them to create your literate documents from.
21408 \begin_layout Standard
21409 Note that literate documents are not limited to these three classes.
21410 New classes can be generated from other styles like letter or in combination
21411 with other class variations like Article (AMS).
21412 If you have special needs that cannot be covered by one of the existing
21413 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21414 will arrange to insert a new entry, or teach you how to do it.
21418 \begin_layout Plain Layout
21419 It is very simple, it involves the creation of a file with four lines, and
21420 re-running of the auto configuration.
21425 Moreover, if you use a literate tool other than Noweb you may need to create
21426 a new set of document classes for it.
21429 \begin_layout Paragraph
21433 \begin_layout Standard
21434 LyX enables you to write code with a layout named
21442 \begin_layout Plain Layout
21443 The equivalent Noweb term is
21444 \begin_inset Quotes eld
21448 \begin_inset Quotes erd
21452 For historical reasons, I got used to the term
21453 \begin_inset Quotes eld
21457 \begin_inset Quotes erd
21460 introduced by other literate tool named Nuweb, which I used for many years
21461 before rendering myself to Noweb.
21466 Noweb delimits scraps like this:
21469 \begin_layout LyX-Code
21473 \begin_layout LyX-Code
21477 \begin_layout LyX-Code
21481 \begin_layout LyX-Code
21485 \begin_layout LyX-Code
21489 \begin_layout Standard
21490 The problem is that whatever is written in between the << and the
21494 must be taken literally, i.
21495 \begin_inset space \thinspace{}
21499 \begin_inset space \space{}
21502 LyX should be prevented from making any special interpretation of what has
21504 This is handled by a special layout named Scrap, that works like a normal
21505 paragraph but has a free spacing capability.
21508 \begin_layout Standard
21509 The down side of the Scrap paragraph layout is that consecutive paragraphs
21510 of code will be spaced with one empty line in the source code and also
21511 in the printed documentation.
21512 The work around is to enter each line of code within a single Scrap, with
21513 a newline (ctrl-return).
21514 The example above will look like this:
21518 \begin_layout Plain Layout
21519 If you have a printed version of this document you will not see any difference
21520 between the previous example and this one.
21528 \begin_layout LyX-Code
21530 \begin_inset Newline newline
21534 \begin_inset Newline newline
21538 \begin_inset Newline newline
21542 \begin_inset Newline newline
21548 \begin_layout Standard
21549 This layout works fine.
21550 The only real inconvenience is that you have to type ctrl-return instead
21555 \begin_layout Plain Layout
21556 It is in my list of
21557 \begin_inset Quotes eld
21561 \begin_inset Quotes erd
21572 \begin_layout Standard
21573 As a special note, you can also use the
21574 \begin_inset Quotes eld
21578 \begin_inset Quotes erd
21581 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21585 \begin_layout LyX-Code
21587 \begin_inset Newline newline
21590 def some_function(args):
21591 \begin_inset Newline newline
21594 "This is the doc string for this function."
21595 \begin_inset Newline newline
21598 print "My args: ", args
21601 \begin_layout LyX-Code
21602 @ %def some_function
21605 \begin_layout Standard
21606 For an example of this usage and the resulting cross-reference output, look
21607 at the Literate python program in
21609 LIBDIR/examples/listerrors.lyx
21611 which should make this all clear.
21614 \begin_layout Paragraph
21615 Generating the documentation
21618 \begin_layout Standard
21619 At this point you already have a new document file with a proper document
21620 class, and with some code and text on it.
21621 How do I print it? The answer is simple, you select
21623 View\SpecialChar \menuseparator
21627 Just like you would do for a plain document.
21628 No special procedure is required.
21631 \begin_layout Standard
21632 To help orientate you, I will now explain what happens inside LyX:
21635 \begin_layout Enumerate
21638 Update\SpecialChar \menuseparator
21641 menu option is chosen, a LaTeX file is generated.
21646 \begin_layout Standard
21647 If the document is of any literate class the generated file will be named
21648 with an extension name defined by the
21649 \begin_inset Quotes eld
21653 \begin_inset Quotes erd
21656 format (defined in the Preferences panel), otherwise the file will have
21665 \begin_layout Enumerate
21666 Note that the only difference so far is in the name of the file, no special
21667 processing is required by LyX.
21668 Given that you formatted the code using the Scrap layout that, by itself,
21669 takes care of the business.
21672 \begin_layout Enumerate
21673 If the document is of any literate class LyX will then use the internal
21674 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21678 \begin_layout Plain Layout
21679 The converters are defined in the
21681 Tools\SpecialChar \menuseparator
21685 \begin_inset Quotes eld
21689 \begin_inset Quotes erd
21701 manual for general information about converters.
21706 to generate the LaTeX file.
21710 \begin_layout Standard
21711 Otherwise it will just skip this step.
21715 \begin_layout Enumerate
21716 Finally, LaTeX is invoked and the regular post processing continues as in
21720 \begin_layout Standard
21721 Independence from a particular
21722 \begin_inset Quotes eld
21726 \begin_inset Quotes erd
21729 is easily achieved by changing the commands that are run by the various
21733 \begin_layout Paragraph
21734 Generating the code
21737 \begin_layout Standard
21738 When the build menu option is chosen or the corresponding button in the
21739 toolbar is pressed, a LaTeX file is generated just like step 1 above.
21740 Next, LyX invokes the
21745 This converter needs to be defined by the user and is not installed by
21746 default, though the Program format is.
21747 This converter (like any other converter) will have two parts:
21750 \begin_layout Enumerate
21751 The converter program itself.
21752 This program performs the conversion from the one format to the other (in
21753 this case, from the Noweb format to the Program pseudo-format).
21756 \begin_layout Enumerate
21757 The error log parser.
21758 This is a program whose sole purpose is to rewrite error messages in a
21759 format that LyX understands.
21760 This makes it possible for LyX to place error boxes in the right places
21761 in the file buffer.
21764 \begin_layout Standard
21765 The first part, the
21766 \begin_inset Quotes eld
21770 \begin_inset Quotes erd
21773 setting, should be set to
21774 \begin_inset Quotes eld
21782 \begin_inset Quotes erd
21786 This basically means that LyX will call
21787 \begin_inset Quotes eld
21791 \begin_inset Quotes erd
21794 (a program or script) with the name of the Noweb file (normally a file
21795 in the LyX temp directory).
21799 \begin_layout Standard
21800 This is an implementation of
21801 \begin_inset Quotes eld
21805 \begin_inset Quotes erd
21808 that you can place in a directory on your path:
21811 \begin_layout LyX-Code
21815 \begin_layout LyX-Code
21819 \begin_layout LyX-Code
21820 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21823 \begin_layout Standard
21824 The next part of the converter setting is the
21825 \begin_inset Quotes eld
21829 \begin_inset Quotes erd
21832 which is to be set to
21833 \begin_inset Quotes eld
21838 parselog=listerrors
21841 \begin_inset Quotes erd
21845 This will run any errors that are generated by the
21846 \begin_inset Quotes eld
21850 \begin_inset Quotes erd
21853 process through the
21854 \begin_inset Quotes eld
21858 \begin_inset Quotes erd
21864 \begin_layout Standard
21865 The converter code looks in
21873 then on the path for the
21874 \begin_inset Quotes eld
21878 \begin_inset Quotes erd
21884 \begin_layout Standard
21885 The build will normally take place in LyX's temporary directory, so the
21886 files produced by the conversion will be in that directory.
21887 LyX will copy out what it regards as the `main' file, but the
21891 conversion may produce several files, and so most of these would then be
21892 deleted when LyX was closed.
21893 The present solution is to use a `copier',
21897 \begin_layout Plain Layout
21906 manual for information on these.
21915 script in its default mode, so that the entire contents of the temporary
21916 directory is copied.
21917 More will get copied than is needed, to be sure, but nothing will be lost.
21918 If, however, you know what extensions the generated files will have, this
21919 can be improved by using the
21928 This option takes a comma-separated list of extensions to copy.
21929 So, for example, if the conversion will generate only files with the extensions
21938 , then the correct definition would be:
21941 \begin_layout LyX-Code
21942 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21945 \begin_layout Standard
21946 The result will be that only files with these two extensions will be copied
21950 \begin_layout Paragraph
21951 Build instructions in the document
21954 \begin_layout Standard
21955 The last piece of the integration between LyX and noweb is the
21956 \begin_inset Quotes eld
21960 \begin_inset Quotes erd
21964 Generally, the instructions for building your program should be embedded
21965 in a scrap of its own.
21967 \begin_inset Quotes eld
21971 \begin_inset Quotes erd
21974 above uses the notangle command to look for this scrap (called
21975 \begin_inset Quotes eld
21979 \begin_inset Quotes erd
21982 ) and runs its contents through
21983 \begin_inset Quotes eld
21987 \begin_inset Quotes erd
21993 \begin_layout Standard
21994 Typically, such a scrap would look something like this:
21997 \begin_layout LyX-Code
21999 \begin_inset Newline newline
22003 \begin_inset Newline newline
22007 \begin_inset Newline newline
22010 if [ -z "${NOWEB_SOURCE}" ]
22011 \begin_inset Newline newline
22015 \begin_inset Newline newline
22018 NOWEB_SOURCE=myfile.nw
22019 \begin_inset Newline newline
22023 \begin_inset Newline newline
22027 code to extract files ...]
22028 \begin_inset Newline newline
22032 code to compile files ...]
22033 \begin_inset Newline newline
22039 \begin_layout Standard
22042 LIBDIR/examples/listerrors.lyx
22046 LIBDIR/examples/Literate.lyx
22048 which implement two versions of the
22049 \begin_inset Quotes eld
22053 \begin_inset Quotes erd
22056 program for some illustrations of how all of these pieces go together or
22059 LIBDIR/examples/noweb2lyx.lyx.
22062 Interestingly, these three files show off the language-indepence of the
22063 LyX literate programming support since they are written in Python, C and
22067 \begin_layout Subsubsection
22071 \begin_layout Standard
22072 All the Literate Programming support is configured by the
22074 Tools\SpecialChar \menuseparator
22078 \begin_inset Quotes eld
22082 \begin_inset Quotes erd
22086 The important parts are:
22089 \begin_layout Description
22091 \begin_inset space ~
22095 \begin_inset Quotes eld
22099 \begin_inset Quotes erd
22103 \begin_inset space ~
22106 format Set up via the Formats tab, this is where the Noweb-specific pieces
22116 , the file extension is set to
22121 This tells LyX to create a file with a
22125 extension in the first step of the conversion process.
22128 \begin_layout Description
22130 \begin_inset space ~
22138 \begin_inset space ~
22141 format This is an empty format whose sole purpose is to be the endpoint
22142 of a conversion (which then allows us to set up a converter for it).
22145 \begin_layout Description
22154 This converter performs the
22155 \begin_inset Quotes eld
22159 \begin_inset Quotes erd
22162 of the literate document.
22163 For Noweb, it is set to
22164 \begin_inset Quotes eld
22169 noweave -delay -index $$i > $$o
22172 \begin_inset Quotes erd
22178 \begin_layout Description
22188 \begin_inset Quotes eld
22192 \begin_inset Quotes erd
22196 As stated above, the Converter is set to
22197 \begin_inset Quotes eld
22205 \begin_inset Quotes erd
22208 , with Flags set to
22209 \begin_inset Quotes eld
22214 originaldir,parselog=listerrors
22217 \begin_inset Quotes erd
22223 \begin_layout Subsubsection
22227 \begin_layout Standard
22228 There is also a new function implemented in the LyX server, the
22229 \begin_inset Quotes eld
22232 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22236 \begin_layout Standard
22237 When debugging code with ddd/gdb, it is possible to invoke a text editor
22238 at the current execution position with a single key stroke.
22239 The default ddd configuration for that is shift-ctrl-V.
22240 It happens that you can define the editor command line invocation in ddd
22243 Edit\SpecialChar \menuseparator
22244 Preferences\SpecialChar \menuseparator
22247 dialog and changing the "Edit Sources" entry.
22250 \begin_layout Standard
22251 I take advantage of the new created LyX server function and this ddd feature,
22253 \begin_inset Quotes eld
22257 \begin_inset Quotes erd
22263 \begin_layout LyX-Code
22264 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22267 \begin_layout Standard
22268 With this, whenever you are using ddd and find a point in the program that
22269 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22270 ddd you forward this information to LyX through the LyX server and then
22271 the LyX window will show the same file with the cursor at the same position
22272 ddd was pointing to.
22273 No more guessing or long scrolling to locate a point in the program back
22277 \begin_layout Standard
22278 Note however that you must enable the LyX server to get this feature working
22279 (it is disabled by default).
22280 You can enable it in
22292 ) by entering in the
22297 \begin_inset Quotes eld
22302 /home/<your-home-directory>/.lyx/lyxpipe
22305 \begin_inset Quotes erd
22311 \begin_layout Standard
22312 Read the LyX server documentation in the
22314 Customization Manual
22316 for further information.
22319 \begin_layout Subsubsection
22323 \begin_layout Standard
22324 There are six new buttons that can be added to your LyX toolbar.
22325 Five of these buttons are short cuts to layout styles:
22346 The last one is a short cut to the
22347 \begin_inset Quotes eld
22351 \begin_inset Quotes erd
22358 \begin_layout Standard
22359 LyX has a range of buttons that are available for tool bar customization.
22360 In my toolbar I like to combine the six short cuts above with two more:
22365 \SpecialChar \menuseparator
22370 \SpecialChar \menuseparator
22377 View\SpecialChar \menuseparator
22381 Here is how it looks like:
22384 \begin_layout LyX-Code
22388 \begin_layout LyX-Code
22392 \begin_layout LyX-Code
22393 Icon "layout Standard"
22396 \begin_layout LyX-Code
22397 Icon "layout Section"
22400 \begin_layout LyX-Code
22401 Icon "layout LaTeX"
22404 \begin_layout LyX-Code
22405 Icon "layout LyX-Code"
22408 \begin_layout LyX-Code
22409 Icon "layout Scrap"
22412 \begin_layout LyX-Code
22416 \begin_layout LyX-Code
22420 \begin_layout LyX-Code
22421 Icon "buffer-typeset"
22424 \begin_layout LyX-Code
22425 Icon "build-program"
22428 \begin_layout LyX-Code
22432 \begin_layout LyX-Code
22436 \begin_layout LyX-Code
22440 \begin_layout LyX-Code
22444 \begin_layout LyX-Code
22448 \begin_layout Subsubsection
22449 Colors customization
22452 \begin_layout Standard
22453 There are a number of colors in LyX that can be customized in
22458 One of the things that bothers people is the LaTeX font color.
22459 The default color is red, since the scraps uses LaTeX font, and there is
22460 a lot of scraps in literate documents, you may get tired of seeing everything
22462 You can change it by going to the tabs
22471 \begin_layout Standard
22472 The next thing is the visible presence of the newline character in the screen.
22473 You can choose the color of this particular character and make it blend
22475 I recommend you choosing a color that is close to the background but not
22476 equal, that way you still can see it is there, but it is not bothering
22481 \begin_layout Chapter
22485 \begin_layout Standard
22486 You can do everything with LyX that you can do with LaTeX.
22487 However, LyX cannot support every LaTeX feature directly.
22488 But you can always use TeX Code.
22489 This chapter shows you some more special things you might want to use.
22490 For other special things you can do with figures, tables, floats, boxes
22491 and notes, have a look at the
22498 \begin_layout Section
22499 Multiple Text Columns
22502 \begin_layout Standard
22503 This feature is independent of the option
22505 Two-column document
22507 in the document settings under
22512 If you want to have 2
22513 \begin_inset space ~
22516 columns for the whole document, it is recommended to use the
22518 Two-column document
22521 For all other cases use this feature.
22524 \begin_layout Standard
22525 To use multiple text columns in your document, you have to load the module
22532 Document\SpecialChar \menuseparator
22533 Settings\SpecialChar \menuseparator
22536 ) and must have the LaTeX-package
22541 \begin_inset Index idx
22544 \begin_layout Plain Layout
22545 LaTeX-packages ! multicol
22553 \begin_layout Standard
22554 Footnotes within multiple columns will be placed at the bottom of the page
22555 and not under each column.
22556 Within the different columns you can use everything, with the limitation
22557 that for floats you need to use the float option
22564 \begin_layout Subsection
22568 \begin_layout Standard
22569 If you want to have 2 columns in your text, use the style
22571 Begin Multiple Columns
22573 where the columns should start.
22574 The content of the style is the number of the columns, so in this case
22576 \begin_inset Quotes eld
22580 \begin_inset Quotes erd
22584 At the point where the columns should end use the style
22586 End Multiple Columns
22591 \begin_layout Standard
22592 Here is an example:
22595 \begin_layout Begin Multiple Columns
22599 \begin_layout Standard
22604 The Adventure of the Empty House
22607 \begin_inset Newline newline
22612 Sir Arthur Conan Doyle
22615 \begin_layout Standard
22618 It was in the spring of the year 1894 that all London was interested, and
22619 the fashionable world dismayed, by the murder of the Honourable Ronald
22620 Adair under most unusual and inexplicable circumstances.
22621 The public has already learned those particulars of the crime which came
22622 out in the police investigation, but a good deal was suppressed upon that
22623 occasion, since the case for the prosecution was so overwhelmingly strong
22624 that it was not necessary to bring forward all the facts.
22625 Only now, at the end of nearly ten years, am I allowed to supply those
22626 missing links which make up the whole of that remarkable chain.
22627 The crime was of interest in itself, but that interest was as nothing to
22628 me compared to the inconceivable sequel, which afforded me the greatest
22629 shock and surprise of any event in my adventurous life.
22630 Even now, after this long interval, I find myself thrilling as I think
22631 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22632 ty which utterly submerged my mind.
22633 Let me say to that public, which has shown some interest in those glimpses
22634 which I have occasionally given them of the thoughts and actions of a very
22635 remarkable man, that they are not to blame me if I have not shared my knowledge
22636 with them, for I should have considered it my first duty to do so, had
22637 I not been barred by a positive prohibition from his own lips, which was
22638 only withdrawn upon the third of last month.
22641 \begin_layout End Multiple Columns
22645 \begin_layout Standard
22646 Here is an example with 3
22647 \begin_inset space ~
22653 \begin_layout Begin Multiple Columns
22657 \begin_layout Standard
22660 It can be imagined that my close intimacy with Sherlock Holmes had interested
22661 me deeply in crime, and that after his disappearance I never failed to
22662 read with care the various problems which came before the public.
22663 And I even attempted, more than once, for my own private satisfaction,
22664 to employ his methods in their solution, though with indifferent success.
22665 There was none, however, which appealed to me like this tragedy of Ronald
22667 As I read the evidence at the inquest, which led up to a verdict of willful
22668 murder against some person or persons unknown, I realized more clearly
22669 than I had ever done the loss which the community had sustained by the
22670 death of Sherlock Holmes.
22671 There were points about this strange business which would, I was sure,
22672 have specially appealed to him, and the efforts of the police would have
22673 been supplemented, or more probably anticipated, by the trained observation
22674 and the alert mind of the first criminal agent in Europe.
22675 All day, as I drove upon my round, I turned over the case in my mind and
22676 found no explanation which appeared to me to be adequate.
22677 At the risk of telling a twice-told tale, I will recapitulate the facts
22678 as they were known to the public at the conclusion of the inquest.
22681 \begin_layout End Multiple Columns
22685 \begin_layout Standard
22686 You can have up to 10
22687 \begin_inset space ~
22690 columns if you want to, but that might not be very pleasant for the readers
22694 \begin_layout Standard
22695 \begin_inset Newpage newpage
22701 \begin_layout Subsection
22702 Columns inside Columns
22705 \begin_layout Standard
22706 You can also have columns inside columns:
22709 \begin_layout Begin Multiple Columns
22713 \begin_layout Standard
22716 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22717 at that time governor of one of the Australian colonies.
22718 Adair's mother had returned from Australia to undergo the operation for
22719 cataract, and she, her son Ronald, and her daughter Hilda were living together
22723 \begin_layout Begin Multiple Columns
22727 \begin_layout Standard
22730 The youth moved in the best society–had, so far as was known, no enemies
22731 and no particular vices.
22732 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22733 had been broken off by mutual consent some months before, and there was
22734 no sign that it had left any very profound feeling behind it.
22735 For the rest {sic} the man's life moved in a narrow and conventional circle,
22736 for his habits were quiet and his nature unemotional.
22737 Yet it was upon this easy-going young aristocrat that death came, in most
22738 strange and unexpected form, between the hours of ten and eleven-twenty
22739 on the night of March 30, 1894.
22742 \begin_layout End Multiple Columns
22746 \begin_layout Standard
22749 Ronald Adair was fond of cards–playing continually, but never for such stakes
22751 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22752 It was shown that, after dinner on the day of his death, he had played
22753 a rubber of whist at the latter club.
22754 He had also played there in the afternoon.
22759 The evidence of those who had played with him– Mr.
22760 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22761 and that there was a fairly equal fall of the cards.
22762 Adair might have lost five pounds, but not more.
22763 His fortune was a considerable one, and such a loss could not in any way
22765 He had played nearly every day at one club or other, but he was a cautious
22766 player, and usually rose a winner.
22767 It came out in evidence that, in partnership with Colonel Moran, he had
22768 actually won as much as four hundred and twenty pounds in a sitting, some
22769 weeks before, from Godfrey Milner and Lord Balmoral.
22770 So much for his recent history as it came out at the inquest.
22773 \begin_layout End Multiple Columns
22777 \begin_layout Subsection
22781 \begin_layout Standard
22782 The examples in this section show some more special features of multiple
22786 \begin_layout Standard
22787 For more features of multiple columns, have a look at the documentation
22788 of the LaTeX-package
22793 \begin_inset Index idx
22796 \begin_layout Plain Layout
22797 LaTeX-packages ! multicol
22803 \begin_inset CommandInset citation
22812 \begin_layout Subsubsection
22816 \begin_layout Standard
22817 To add a preface text for multiple columns, add the command
22820 \begin_layout Standard
22826 \begin_layout Standard
22827 as TeX Code behind the number of columns in the
22829 Begin Multiple Columns
22832 behind the command write the text.
22833 At the end of the style use the command
22836 \begin_layout Standard
22842 \begin_layout Standard
22844 An example with some preface text:
22847 \begin_layout Standard
22848 \begin_inset VSpace bigskip
22854 \begin_layout Begin Multiple Columns
22859 \begin_layout Plain Layout
22866 And the story continues and continues and continues and continues\SpecialChar \ldots{}
22871 \begin_layout Plain Layout
22881 \begin_layout Standard
22884 On the evening of the crime, he returned from the club exactly at ten.
22885 His mother and sister were out spending the evening with a relation.
22886 The servant deposed that she heard him enter the front room on the second
22887 floor, generally used as his sitting-room.
22888 She had lit a fire there, and as it smoked she had opened the window.
22889 No sound was heard from the room until eleven-twenty, the hour of the return
22890 of Lady Maynooth and her daughter.
22891 Desiring to say good-night, she attempted to enter her son's room.
22892 The door was locked on the inside, and no answer could be got to their
22893 cries and knocking.
22894 Help was obtained, and the door forced.
22895 The unfortunate young man was found lying near the table.
22896 His head had been horribly mutilated by an expanding revolver bullet, but
22897 no weapon of any sort was to be found in the room.
22900 \begin_layout End Multiple Columns
22904 \begin_layout Standard
22905 You can also use a section heading as the preface if you use a section command
22906 as TeX Code behind the first TeX Code.
22907 For example the command
22910 \begin_layout Standard
22915 subsection{subsection title}
22918 \begin_layout Standard
22919 creates a subsection.
22920 In this example the preface is a subsubsection:
22923 \begin_layout Begin Multiple Columns
22928 \begin_layout Plain Layout
22939 \begin_layout Plain Layout
22948 This is a subsubsection heading as a preface
22952 \begin_layout Plain Layout
22963 \begin_layout Plain Layout
22973 \begin_layout Standard
22976 A minute examination of the circumstances served only to make the case more
22978 In the first place, no reason could be given why the young man should have
22979 fastened the door upon the inside.
22980 There was the possibility that the murderer had done this, and had afterwards
22981 escaped by the window.
22982 The drop was at least twenty feet, however, and a bed of crocuses in full
22984 Neither the flowers nor the earth showed any sign of having been disturbed,
22985 nor were there any marks upon the narrow strip of grass which separated
22986 the house from the road.
22987 Apparently, therefore, it was the young man himself who had fastened the
22989 But how did he come by his death? No one could have climbed up to the window
22990 without leaving traces.
22991 Suppose a man had fired through the window, he would indeed be a remarkable
22992 shot who could with a revolver inflict so deadly a wound.
22993 Again, Park Lane is a frequented thoroughfare; there is a cab stand within
22994 a hundred yards of the house.
22995 No one had heard a shot.
22998 \begin_layout End Multiple Columns
23002 \begin_layout Standard
23003 If there is less vertical space left on the page at the beginning of the
23004 multiple columns than needed for 6
23005 \begin_inset space ~
23008 text lines, a page break will be inserted before the multiple columns.
23009 Depending on the number of lines of the preface text, you might want to
23011 It is determined by inserting the command
23014 \begin_layout Standard
23022 \begin_layout Standard
23023 as TeX Code behind the preface definition but before the final
23032 is hereby the number of text lines.
23033 In this example the space is set to 7
23034 \begin_inset space ~
23040 \begin_layout Begin Multiple Columns
23045 \begin_layout Plain Layout
23056 \begin_layout Plain Layout
23065 This is the sectioning command
23066 \begin_inset Newline newline
23070 \begin_inset Newline newline
23073 with multiple text lines
23077 \begin_layout Plain Layout
23088 \begin_layout Plain Layout
23101 \begin_layout Plain Layout
23111 \begin_layout Standard
23114 On the evening of the crime, he returned from the club exactly at ten.
23115 His mother and sister were out spending the evening with a relation.
23116 The servant deposed that she heard him enter the front room on the second
23117 floor, generally used as his sitting-room.
23118 She had lit a fire there, and as it smoked she had opened the window.
23119 No sound was heard from the room until eleven-twenty, the hour of the return
23120 of Lady Maynooth and her daughter.
23121 Desiring to say good-night, she attempted to enter her son's room.
23122 The door was locked on the inside, and no answer could be got to their
23123 cries and knocking.
23124 Help was obtained, and the door forced.
23125 The unfortunate young man was found lying near the table.
23126 His head had been horribly mutilated by an expanding revolver bullet, but
23127 no weapon of any sort was to be found in the room.
23130 \begin_layout End Multiple Columns
23134 \begin_layout Subsubsection
23138 \begin_layout Standard
23139 The amount of space before and after multiple columns can be changed by
23140 changing the length
23147 For example the command
23150 \begin_layout Standard
23160 \begin_layout Standard
23161 in TeX Code changes its value to 3
23162 \begin_inset space \thinspace{}
23166 The change must be made before the multiple columns' start.
23167 The predefined value is 13
23168 \begin_inset space \thinspace{}
23174 \begin_layout Standard
23182 \begin_inset space \thinspace{}
23188 \begin_layout Standard
23192 \begin_layout Plain Layout
23198 multicolsep}{2.5cm}
23206 \begin_layout Begin Multiple Columns
23210 \begin_layout Standard
23213 All day I turned these facts over in my mind, endeavouring to hit upon some
23214 theory which could reconcile them all, and to find that line of least resistanc
23215 e which my poor friend had declared to be the starting-point of every investigat
23217 I confess that I made little progress.
23218 In the evening I strolled across the Park, and found myself about six o'clock
23219 at the Oxford Street end of Park Lane.
23220 A group of loafers upon the pavements, all staring up at a particular window,
23221 directed me to the house which I had come to see.
23222 A tall, thin man with coloured glasses, whom I strongly suspected of being
23223 a plain-clothes detective, was pointing out some theory of his own, while
23224 the others crowded round to listen to what he said.
23225 I got as near him as I could, but his observations seemed to me to be absurd,
23226 so I withdrew again in some disgust.
23227 As I did so I struck against an elderly, deformed man, who had been behind
23228 me, and I knocked down several books which he was carrying.
23231 \begin_layout End Multiple Columns
23235 \begin_layout Standard
23236 \begin_inset Note Greyedout
23239 \begin_layout Plain Layout
23244 The values you set with
23250 will be used for all following multiple columns until to change them again.
23258 \begin_layout Standard
23262 \begin_layout Plain Layout
23274 \begin_inset Note Note
23277 \begin_layout Plain Layout
23278 go back to the default
23286 \begin_layout Subsubsection
23290 \begin_layout Standard
23291 The width of the columns is automatically calculated, but you can modify
23292 the space between the columns.
23293 This is done by changing the length
23300 Its predefined value is 10
23301 \begin_inset space \thinspace{}
23305 Here is an example where
23312 \begin_inset space \thinspace{}
23318 \begin_layout Standard
23322 \begin_layout Plain Layout
23336 \begin_layout Begin Multiple Columns
23340 \begin_layout Standard
23343 My observations of No.
23344 \begin_inset space \space{}
23347 427 Park Lane did little to clear up the problem in which I was interested.
23348 The house was separated from the street by a low wall and railing, the
23349 whole not more than five feet high.
23350 It was perfectly easy, therefore, for anyone to get into the garden, but
23351 the window was entirely inaccessible, since there was no water pipe or
23352 anything which could help the most active man to climb it.
23353 More puzzled than ever, I retraced my steps to Kensington.
23354 I had not been in my study five minutes when the maid entered to say that
23355 a person desired to see me.
23356 To my astonishment it was none other than my strange old book collector,
23357 his sharp, wizened face peering out from a frame of white hair, and his
23358 precious volumes, a dozen of them at least, wedged under his right arm.
23361 \begin_layout End Multiple Columns
23365 \begin_layout Standard
23369 \begin_layout Plain Layout
23381 \begin_inset Note Note
23384 \begin_layout Plain Layout
23385 go back to the default
23393 \begin_layout Subsubsection
23397 \begin_layout Standard
23398 Between the columns a rule with a width of the length
23405 If this rule width is set to 0
23406 \begin_inset space \thinspace{}
23409 pt (this is the default), the rule is suppressed.
23410 In the following example, the line separating the columns is 2
23411 \begin_inset space \thinspace{}
23417 \begin_layout Standard
23421 \begin_layout Plain Layout
23427 columnseprule}{2pt}
23435 \begin_layout Begin Multiple Columns
23439 \begin_layout Standard
23442 \begin_inset Quotes eld
23445 You're surprised to see me, sir,
23446 \begin_inset Quotes erd
23449 said he, in a strange, croaking voice.
23452 \begin_layout Standard
23455 I acknowledged that I was.
23458 \begin_layout Standard
23461 \begin_inset Quotes eld
23464 Well, I've a conscience, sir, and when I chanced to see you go into this
23465 house, as I came hobbling after you, I thought to myself, I'll just step
23466 in and see that kind gentleman, and tell him that if I was a bit gruff
23467 in my manner there was not any harm meant, and that I am much obliged to
23468 him for picking up my books.
23469 \begin_inset Quotes erd
23475 \begin_layout Standard
23478 \begin_inset Quotes eld
23481 You make too much of a trifle,
23482 \begin_inset Quotes erd
23487 \begin_inset Quotes eld
23490 May I ask how you knew who I was?
23491 \begin_inset Quotes erd
23497 \begin_layout Standard
23500 \begin_inset Quotes eld
23503 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
23504 you'll find my little bookshop at the corner of Church Street, and very
23505 happy to see you, I am sure.
23506 Maybe you collect yourself, sir.
23510 \begin_inset space ~
23523 --a bargain, every one of them.
23524 With five volumes you could just fill that gap on that second shelf.
23525 It looks untidy, does it not, sir?
23526 \begin_inset Quotes erd
23532 \begin_layout End Multiple Columns
23536 \begin_layout Standard
23540 \begin_layout Plain Layout
23546 columnseprule}{0pt}
23552 \begin_inset Note Note
23555 \begin_layout Plain Layout
23556 go back to the default
23564 \begin_layout Standard
23565 \begin_inset Newpage newpage
23571 \begin_layout Section
23572 Non-standard Paragraph Shapes
23575 \begin_layout Standard
23579 \begin_layout Plain Layout
23591 \begin_layout Standard
23595 \begin_layout Plain Layout
23604 \begin_layout Plain Layout
23618 \begin_layout Standard
23623 \begin_layout Plain Layout
23634 \begin_layout Plain Layout
23643 \begin_layout Plain Layout
23652 \begin_layout Plain Layout
23661 \begin_layout Plain Layout
23670 \begin_layout Plain Layout
23679 \begin_layout Plain Layout
23688 \begin_layout Plain Layout
23697 \begin_layout Plain Layout
23706 \begin_layout Plain Layout
23715 \begin_layout Plain Layout
23724 \begin_layout Plain Layout
23733 \begin_layout Plain Layout
23742 \begin_layout Plain Layout
23751 \begin_layout Plain Layout
23760 \begin_layout Plain Layout
23769 \begin_layout Plain Layout
23778 \begin_layout Plain Layout
23787 \begin_layout Plain Layout
23796 \begin_layout Plain Layout
23802 There are times when the tyranny of rectangular paragraphs must be overthrown.
23803 In such situations, a call to the delightful plain TeX command
23810 As you can see, completely arbitrary shapes can be laid out with a suitable
23811 set of line length definitions.
23812 While this parshape may look a bit silly and useless, one could conceive
23813 of situations such as finely tuned dropped capitals, word wrapping around
23814 non-rectangular graphics, etc.
23815 which will benefit from such handcrafting.
23818 \begin_layout Standard
23819 \begin_inset VSpace bigskip
23825 \begin_layout Standard
23830 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23837 is the number of lines of text which define the paragraph.
23838 If there turn out to be fewer lines, the shape is truncated; if there are
23839 more, the excess lines have the same dimensions as the last line of the
23849 entries specify the indentation of the line from the left margin, and the
23850 length of the line as measured from that point.
23851 The shape applies only to the current paragraph; everything is reset to
23852 normal for the next paragraph.
23855 \begin_layout Standard
23859 \begin_layout Plain Layout
23871 \begin_layout Bibliography
23872 \begin_inset CommandInset bibitem
23873 LatexCommand bibitem
23878 Documentation of the LaTeX-package
23879 \begin_inset CommandInset href
23882 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
23887 \begin_inset Index idx
23890 \begin_layout Plain Layout
23891 LaTeX-packages ! multicol