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
120 \paragraph_separation indent
121 \paragraph_indentation default
122 \quotes_language english
125 \paperpagestyle headings
126 \tracking_changes false
127 \output_changes false
136 Additional LyX Features
139 \begin_layout Subtitle
148 \begin_layout Plain Layout
150 Principal maintainer of this file is
155 If you have comments or error corrections, please send them to the LyX
156 Documentation mailing list,
157 \begin_inset Flex Code
160 \begin_layout Plain Layout
162 <lyx-docs@lists.lyx.org>
175 \begin_layout Standard
176 \begin_inset CommandInset toc
177 LatexCommand tableofcontents
184 \begin_layout Chapter
188 \begin_layout Standard
189 This manual is essentially Part II of the
191 User's Guide\SpecialChar \@.
194 The reason for separating this document out is simple: the
198 is already quite lengthy, and it contains information on all of the basic
199 features one needs to know in order to prepare most documents.
200 However, the LyX Team has worked to make LyX extensible through various
201 configuration files and external packages.
202 That means that if you want to support the Fizzwizzle LaTeX package, you
203 can create a layout file (or module) for it without having to alter LyX
205 We've already had contributions of several new features this way, and some
206 of them are documented here.
207 There are also some more `advanced' features, such as how to control the
208 presentation of bibliographies and how to work with multi-part documents,
209 that are not covered in the
213 and are discussed here.
216 \begin_layout Standard
217 This manual also documents some special features, like fax support, version
218 control, and SGML support, which require additional software to work properly.
219 There is also a chapter on LyX's support for HTML.
220 And lastly, there's a chapter of LaTeX tools and tips, things you can use
221 to spruce up your documents by directly using the powerful features of
227 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
230 \begin_layout Standard
231 If you haven't read the
235 yet, you are definitely in the wrong manual.
240 is the first place to go, since it describes the notation and format of
242 You should also be thoroughly familiar with the
246 and all of the basic features of LyX before attempting to read this one.
249 \begin_layout Standard
250 Since many of the topics in this manual depend heavily on LyX's interaction
251 with LaTeX, this first chapter covers the inner workings of LyX and how
252 to direct LyX to generate exactly the LaTeX code you want.
253 It is obviously for more seasoned LyX users.
256 \begin_layout Chapter
260 \begin_layout Section
264 \begin_layout Standard
265 This chapter is for both TeX-nicians and the LaTeX-curious.
266 In it, we'll explain how LyX and LaTeX work together to produce printable
268 This is the only place in any of the manuals where we assume you know something
272 \begin_layout Standard
273 At one time, LyX was called a
274 \begin_inset Quotes eld
277 WYSIWYM frontend to LaTeX,
278 \begin_inset Quotes erd
281 but that's no longer true.
282 There are frontends to LaTeX out there.
286 \begin_layout Plain Layout
287 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
288 There are also the LaTeX modes for vi and emacs, of course.
293 These are basically text editors with the ability to run LaTeX and mark
294 any errors in the file you're editing.
303 run LaTeX, and it also indicates errors in the file, it also does much,
305 For one thing, you don't need to know LaTeX to use LyX effectively.
306 And LyX has added its own extensions to LaTeX.
307 Try the following sometime: select
308 \begin_inset Flex MenuItem
311 \begin_layout Plain Layout
312 Export\SpecialChar \menuseparator
319 \begin_inset Flex MenuItem
322 \begin_layout Plain Layout
329 \begin_inset Flex MenuItem
332 \begin_layout Plain Layout
333 View\SpecialChar \menuseparator
339 ), then look at the preamble of the resulting
340 \begin_inset Flex Code
343 \begin_layout Plain Layout
350 You'll notice a variety of new macros defined specifically by LyX.
351 These macros are defined automatically, according to the features you use
355 \begin_layout Standard
356 There are several commands that automatically invoke LaTeX.
360 \begin_layout Itemize
361 \begin_inset Flex MenuItem
364 \begin_layout Plain Layout
365 View\SpecialChar \menuseparator
374 \begin_layout Itemize
375 \begin_inset Flex MenuItem
378 \begin_layout Plain Layout
379 View\SpecialChar \menuseparator
380 Update\SpecialChar \menuseparator
389 \begin_layout Itemize
390 \begin_inset Flex MenuItem
393 \begin_layout Plain Layout
394 File\SpecialChar \menuseparator
403 \begin_layout Itemize
404 \begin_inset Flex MenuItem
407 \begin_layout Plain Layout
408 File\SpecialChar \menuseparator
417 \begin_layout Standard
418 They will only invoke LaTeX if the file has changed since the last time
423 \begin_layout Standard
424 When LyX runs LaTeX on the file you're editing, it performs these steps:
427 \begin_layout Enumerate
428 Convert the document to LaTeX and save to a file with the extension
429 \begin_inset Flex Code
432 \begin_layout Plain Layout
439 \begin_inset Flex Code
442 \begin_layout Plain Layout
451 \begin_layout Enumerate
453 \begin_inset Flex Code
456 \begin_layout Plain Layout
462 file (maybe several times), and run any other commands (such as
463 \begin_inset Flex Code
466 \begin_layout Plain Layout
473 \begin_inset Flex Code
476 \begin_layout Plain Layout
482 ) needed to compile the LaTeX file.
485 \begin_layout Enumerate
486 If there are any errors, show the error log.
489 \begin_layout Standard
490 If you've run LaTeX using
491 \begin_inset Flex MenuItem
494 \begin_layout Plain Layout
497 \SpecialChar \menuseparator
505 , LyX then runs a DVI viewer to display the DVI-file.
507 \begin_inset Flex MenuItem
510 \begin_layout Plain Layout
513 \SpecialChar \menuseparator
521 , LyX performs further steps:
524 \begin_layout Itemize
526 \begin_inset Flex Code
529 \begin_layout Plain Layout
535 to convert the DVI file to PostScript.
538 \begin_layout Itemize
539 Run a PostScript viewer, such as
540 \begin_inset Flex Code
543 \begin_layout Plain Layout
549 , to display the PostScript file.
552 \begin_layout Standard
553 LyX does similar things when viewing, or exporting, other formats.
556 \begin_layout Section
557 Translating LaTeX files into LyX
560 \begin_layout Standard
561 You can import a LaTeX file into LyX by using the
562 \begin_inset Flex MenuItem
565 \begin_layout Plain Layout
566 File\SpecialChar \menuseparator
567 Import\SpecialChar \menuseparator
574 This will call a program named
575 \begin_inset Flex Code
578 \begin_layout Plain Layout
584 which will create a file
585 \begin_inset Flex Code
588 \begin_layout Plain Layout
595 \begin_inset Flex Code
598 \begin_layout Plain Layout
605 LyX will then open that file.
609 \begin_layout Plain Layout
610 \begin_inset Flex Code
613 \begin_layout Plain Layout
619 can also be run from the command line, of course.
627 \begin_layout Standard
628 \begin_inset Flex Code
631 \begin_layout Plain Layout
637 will translate most legal LaTeX, but not everything.
638 It will put things it doesn't understand into TeX code, so after translating
640 \begin_inset Flex Code
643 \begin_layout Plain Layout
649 , you can look for TeX code and hand-edit it until it looks right.
652 \begin_layout Standard
653 If you don't know what TeX code is, read the next section.
656 \begin_layout Section
657 \begin_inset CommandInset label
659 name "sec:Inserting-TeX-Code"
663 Inserting TeX Code into LyX Documents
666 \begin_layout Standard
667 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
668 You can always insert TeX code into any LyX document.
669 LyX cannot, and will never be able to, display every possible LaTeX construct.
670 If ever you need to insert LaTeX commands into your LyX document, you can
672 \begin_inset Flex Code
675 \begin_layout Plain Layout
681 box, which you can insert into your document with
682 \begin_inset Flex MenuItem
685 \begin_layout Plain Layout
686 Insert\SpecialChar \menuseparator
695 \begin_layout Standard
696 Here's an example of inserting LaTeX commands in a LyX document.
697 The code looks like this:
700 \begin_layout LyX-Code
704 \begin_inset Newline newline
710 \begin_inset Newline newline
713 This is an example for a minipage environment.
715 \begin_inset Newline newline
718 can put nearly everything in it, even (non-floating)
719 \begin_inset Newline newline
724 \begin_inset Newline newline
730 \begin_inset Newline newline
734 \begin_inset Newline newline
740 \begin_inset Newline newline
746 \begin_inset Newline newline
752 \begin_inset Newline newline
757 \begin_inset Newline newline
763 \begin_inset Newline newline
769 \begin_inset Newline newline
775 \begin_inset Newline newline
783 \begin_layout LyX-Code
787 \begin_layout Standard
789 \begin_inset Flex Code
792 \begin_layout Plain Layout
798 box containing this text is directly after this paragraph.
799 Those of you reading the manual in LyX will only see the TeX code inset.
800 Those reading a printed version of the manuals will see the actual results:
803 \begin_layout Standard
807 \begin_layout Plain Layout
814 \begin_layout Plain Layout
821 \begin_layout Plain Layout
823 This is an example for a minipage environment.
824 You can put nearly everything in it, even (non-floating) figures and tables.
828 \begin_layout Plain Layout
835 \begin_layout Plain Layout
840 \begin_layout Plain Layout
847 \begin_layout Plain Layout
854 \begin_layout Plain Layout
861 \begin_layout Plain Layout
867 \begin_layout Plain Layout
874 \begin_layout Plain Layout
881 \begin_layout Plain Layout
888 \begin_layout Plain Layout
900 \begin_layout Standard
901 In addition to using TeX code, you can also create a separate file containing
902 some complex LaTeX structure and then use
903 \begin_inset Flex MenuItem
906 \begin_layout Plain Layout
907 Insert\SpecialChar \menuseparator
917 to include your file (you should select the type
918 \begin_inset Flex Code
921 \begin_layout Plain Layout
928 We recommend that you only do this if you have a
929 \begin_inset Flex Code
932 \begin_layout Plain Layout
943 Otherwise, you'll have a big job tracking down LaTeX errors.
946 \begin_layout Standard
947 There are a few last points to emphasize:
950 \begin_layout Itemize
955 check if your LaTeX code is correct.
958 \begin_layout Itemize
959 Beware reinventing the wheel.
962 \begin_layout Standard
963 On that last point, LyX does have quite a few features tucked into it, and
965 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
966 feature before you decide you have to do it by hand.
967 Moreover, there are numerous LaTeX packages out there to do all sorts of
968 things, from labels to envelopes to fancy multipage tables.
970 \begin_inset CommandInset href
973 target "http://www.ctan.org/"
977 for details, and see chapter
978 \begin_inset CommandInset ref
980 reference "cha:secrets"
987 \begin_layout Standard
988 If you do need to do some wild and fancy things within your document, be
989 sure to check out a good LaTeX book for assistance.
990 There are a number of them listed in the bibliography of the
997 \begin_layout Section
998 LyX and the LaTeX Preamble
1001 \begin_layout Subsection
1002 About the LaTeX Preamble
1005 \begin_layout Standard
1006 If you already know LaTeX, there is no need to explain here what the preamble
1008 If you don't, the following will give you some ideas—we recommend again
1009 that you consult a LaTeX book for further information.
1010 In any case, you should read the points below, because they explain what
1011 you can do and what you don't need to do in the LaTeX preamble of a LyX
1015 \begin_layout Standard
1016 The LaTeX preamble comes at the very beginning of a document,
1024 \begin_layout Itemize
1025 Declare the document class.
1027 \begin_inset Newline newline
1030 LyX already does this for you.
1031 If you're a seasoned LaTeX-nician, and you have a custom document class
1032 you want to use, check out the
1034 Customization Manual
1036 for information on how to make LyX interface to it.
1039 \begin_layout Itemize
1040 Declare the usage of packages.
1042 \begin_inset Newline newline
1045 LaTeX packages provide special commands, which are only available within
1046 a document when the package has been declared in the preamble.
1047 For example, the package
1048 \begin_inset Flex Code
1051 \begin_layout Plain Layout
1057 forces all paragraphs to be indented.
1058 There are other packages for labels, envelopes, margins, etc.
1062 \begin_layout Itemize
1063 Set counters, variables, lengths and widths.
1065 \begin_inset Newline newline
1068 There are several LaTeX counters and variables which
1072 be set globally from within the preamble in order to have the desired effect.
1073 (There are variables which you can set and reset inside the document, too.)
1074 Margins are a good example of something which must be set in the preamble.
1075 Another example is the label format for lists.
1076 You can actually set these just about anywhere, but it's best to do it
1077 just once, inside the preamble.
1080 \begin_layout Itemize
1081 Declare user defined commands (with
1082 \begin_inset Flex Code
1085 \begin_layout Plain Layout
1094 \begin_inset Flex Code
1097 \begin_layout Plain Layout
1106 \begin_inset Newline newline
1109 These are abbreviations for LaTeX commands which appear very often inside
1111 Although the preamble is a good place to declare such commands, they
1115 be declared anywhere (before they are used for the first time, of course).
1116 This can be useful if there is a lot of raw LaTeX code in your document,
1117 which normally should not be the case.
1120 \begin_layout Standard
1121 LyX adds its own set of definitions to the preamble of the
1122 \begin_inset Flex Code
1125 \begin_layout Plain Layout
1132 This makes LaTeX files generated by LyX portable.
1135 \begin_layout Subsection
1136 Changing the Preamble
1139 \begin_layout Standard
1140 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1141 can't change them without patching LyX itself.
1142 You can, however, add your own stuff to the preamble by selecting
1143 \begin_inset Flex MenuItem
1146 \begin_layout Plain Layout
1148 \begin_inset space ~
1157 \begin_inset Flex MenuItem
1160 \begin_layout Plain Layout
1161 Document\SpecialChar \menuseparator
1168 LyX adds anything in the
1169 \begin_inset Flex MenuItem
1172 \begin_layout Plain Layout
1178 dialog to its own built-in preamble.
1179 Before adding your own declarations in the preamble, you should make sure
1180 that LyX doesn't already support what you want to do.
1181 (Remember what we said about reinventing the wheel?) Also,
1183 make sure your preamble code is correct
1186 LyX doesn't check it for you.
1187 If there is an error, you're likely to get an error like
1188 \begin_inset Quotes eld
1192 \begin_inset Flex Code
1195 \begin_layout Plain Layout
1204 \begin_inset Quotes erd
1208 If you see this error, check your preamble.
1211 \begin_layout Subsection
1215 \begin_layout Standard
1216 Here are some examples of what you can add to a preamble, and what they
1220 \begin_layout Subsubsection
1224 \begin_layout Standard
1225 There are two variables under LaTeX that control page position:
1226 \begin_inset Flex Code
1229 \begin_layout Plain Layout
1238 \begin_inset Flex Code
1241 \begin_layout Plain Layout
1250 Their names should be self-explanatory.
1251 These variables are useful if you think for a moment about computer labels.
1252 Sometimes, the size of a print medium and the area of the medium that you
1253 can actually print on aren't the same.
1255 \begin_inset Flex Code
1258 \begin_layout Plain Layout
1267 \begin_inset Flex Code
1270 \begin_layout Plain Layout
1281 \begin_layout Standard
1282 The default values for
1283 \begin_inset Flex Code
1286 \begin_layout Plain Layout
1295 \begin_inset Flex Code
1298 \begin_layout Plain Layout
1307 \begin_inset space \thinspace{}
1311 \begin_inset space \thinspace{}
1315 \begin_inset space \space{}
1318 the page isn't shifted.
1319 Unfortunately, some DVI drivers always seem to shift the page.
1320 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1321 If you're using LyX on a system that you don't personally maintain, and
1322 your sysadmin is a doofus,
1323 \begin_inset Flex Code
1326 \begin_layout Plain Layout
1335 \begin_inset Flex Code
1338 \begin_layout Plain Layout
1347 Suppose your left and top margins are always 0.5
1348 \begin_inset space \thinspace{}
1352 You can add this to the preamble:
1355 \begin_layout LyX-Code
1363 \begin_layout LyX-Code
1371 \begin_layout Standard
1372 and your margins should now be correct.
1375 \begin_layout Subsubsection
1379 \begin_layout Standard
1380 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1381 There's a rather nice package, available at your nearest CTAN archive,
1382 for printing sheets of labels:
1383 \begin_inset Flex Code
1386 \begin_layout Plain Layout
1393 Now, your system may not have this package installed by default.
1394 We leave that up to you to check.
1395 You'll also want to read the documentation for it; we're not going to do
1397 Since this is an example, however, we'll give you an example of how you
1401 \begin_layout Standard
1402 First, make sure you're using the
1403 \begin_inset Flex Code
1406 \begin_layout Plain Layout
1413 Next, you need to put the following in your preamble:
1416 \begin_layout LyX-Code
1422 \begin_layout LyX-Code
1428 \begin_layout LyX-Code
1434 \begin_layout LyX-Code
1440 \begin_layout LyX-Code
1446 \begin_layout LyX-Code
1452 \begin_layout LyX-Code
1458 \begin_layout Standard
1459 This sets things up for Avery label sheets, stock #5360.
1460 You're now ready to print labels, but you'll need to insert LaTeX code,
1461 placing the commands
1462 \begin_inset Flex Code
1465 \begin_layout Plain Layout
1474 \begin_inset Flex Code
1477 \begin_layout Plain Layout
1485 around each label text.
1486 This and other special features of
1487 \begin_inset Flex Code
1490 \begin_layout Plain Layout
1496 are explained in its documentation.
1499 \begin_layout Standard
1500 Someday, someone may write a LyX layout file to support this package directly.
1501 Maybe that someone is you.
1504 \begin_layout Subsubsection
1505 Example #3: Paragraph Indentation
1508 \begin_layout Standard
1509 Americans are trained to indent the first line of
1514 As with all of their other weird quirks, most Americans will whine and
1515 moan until they can have their way and indent the first line of all paragraphs.
1524 \begin_layout Standard
1525 Of course, this behavior isn't standard typography.
1526 In books, you typically only indent the first line of a paragraph
1530 it follows another one.
1531 The idea behind indenting the first line of a paragraph is to distinguish
1532 neighboring paragraphs from one another.
1533 If there is no previous paragraph—for example, if it follows a figure or
1534 is the first paragraph in a section—then there is no need for indentation.
1538 \begin_layout Standard
1539 If you're a typical American (we're still joking!), though, you don't care
1540 about such esoteric things; you want your indentation! Add this to the
1544 \begin_layout LyX-Code
1547 usepackage{indentfirst}
1550 \begin_layout Standard
1551 If your TeX distribution isn't braindead, you'll have this package, and
1552 all of your paragraphs will get the indentation the Founding Fathers intended
1556 \begin_layout Subsubsection
1557 Example #4: This Document
1560 \begin_layout Standard
1561 You can also check out the preamble of this document to get an idea of some
1562 of the advanced things you can do.
1563 Also, there are more examples and an assortment of LaTeX
1564 \begin_inset Quotes eld
1568 \begin_inset Quotes erd
1572 \begin_inset space ~
1576 \begin_inset CommandInset ref
1578 reference "cha:secrets"
1586 \begin_layout Section
1587 LyX and LaTeX Errors
1590 \begin_layout Standard
1591 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1593 It then uses the logfile from the LaTeX run to do a post-mortem.
1594 After analyzing the logfile,LyX displays a dialog listing the errors.
1595 Clicking on any one of them will take you to the position in your LyX file
1596 where the error occurred.
1600 \begin_layout Plain Layout
1602 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1604 There are also cases where LaTeX reports the error on one line, but the
1605 actual error is earlier.
1606 This is not unlike forgetting a closing brace in a program: You'll get
1607 an error, but only later.
1615 \begin_layout Standard
1616 Some folks also like to look at the log file directly: It is available from
1618 \begin_inset Flex MenuItem
1621 \begin_layout Plain Layout
1624 \SpecialChar \menuseparator
1628 \begin_inset space ~
1637 There are some fairly common error messages and warnings.
1638 We'll cover those here.
1639 You should look at a good LaTeX book for a complete listing.
1642 \begin_layout Itemize
1643 \begin_inset Flex Code
1646 \begin_layout Plain Layout
1653 \begin_inset Newline newline
1656 Anything beginning with these words is a warning message for the purpose
1658 \begin_inset Quotes eld
1662 \begin_inset Quotes erd
1665 the LaTeX code itself.
1666 You'll get messages like this if you added or changed cross-references
1667 or bibliography entries, in which case, LaTeX is trying to tell you that
1668 you need to make another run.
1669 You can by-and-large ignore these.
1672 \begin_layout Itemize
1673 \begin_inset Flex Code
1676 \begin_layout Plain Layout
1683 \begin_inset Newline newline
1686 Another warning message, this time about fonts which LaTeX couldn't find.
1687 The rest of the message will often say something about a replacement font
1689 You can safely ignore these, too.
1692 \begin_layout Itemize
1693 \begin_inset Flex Code
1696 \begin_layout Plain Layout
1705 \begin_inset Newline newline
1713 They are warnings about lines that were too long and run past the right
1715 Almost always, this is unnoticeable in the final output.
1716 (It can be just a point or two.) Or, only one or two characters extend past
1718 LaTeX seems to generate at least one of these messages for just about any
1720 \begin_inset Newline newline
1723 You can ignore these messages.
1724 Your eyes will tell you if there's a problem with something that's too
1725 wide; just look at the output.
1729 \begin_layout Plain Layout
1730 You can also enable the `draft' option in
1731 \begin_inset Flex MenuItem
1734 \begin_layout Plain Layout
1737 \SpecialChar \menuseparator
1745 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1753 \begin_layout Itemize
1754 \begin_inset Flex Code
1757 \begin_layout Plain Layout
1766 \begin_inset Newline newline
1769 Not quite as common as its cousin.
1770 LaTeX seems to like to print lines that are a bit too wide as opposed to
1771 ones that are a bit too narrow.
1772 We have no idea why.
1775 \begin_layout Itemize
1776 \begin_inset Flex Code
1779 \begin_layout Plain Layout
1788 \begin_inset Flex Code
1791 \begin_layout Plain Layout
1800 \begin_inset Newline newline
1803 Warnings about troubles breaking the page.
1804 Once again, just look at the output.
1805 Your eyes will tell you where something has gone wrong.
1808 \begin_layout Itemize
1809 \begin_inset Flex Code
1812 \begin_layout Plain Layout
1814 \begin_inset Quotes els
1818 \begin_inset Quotes ers
1827 \begin_inset Newline newline
1831 \begin_inset Quotes eld
1835 \begin_inset Quotes erd
1838 isn't installed on this system.
1839 This usually appears because some package your document needs isn't installed.
1840 If you didn't touch the preamble or didn't use the
1841 \begin_inset Flex Code
1844 \begin_layout Plain Layout
1852 command, then one of the packages LyX tried to load is missing.
1854 \begin_inset Flex MenuItem
1857 \begin_layout Plain Layout
1858 Help\SpecialChar \menuseparator
1864 to get a list of packages that LyX knows about.
1865 This file is updated whenever you reconfigure LyX (using
1866 \begin_inset Flex MenuItem
1869 \begin_layout Plain Layout
1870 Tools\SpecialChar \menuseparator
1876 ) and tells you which packages have been detected and what they do.
1877 \begin_inset Newline newline
1881 \begin_inset Flex Code
1884 \begin_layout Plain Layout
1892 command and the package in question isn't installed, then you'll need to
1893 install it yourself.
1896 \begin_layout Itemize
1897 \begin_inset Flex Code
1900 \begin_layout Plain Layout
1901 LaTeX Error: Unknown option
1907 \begin_inset Newline newline
1910 Error messages beginning with this are trying to tell you that you specified
1911 a bad or undefined option to a package.
1912 Check the package's documentation.
1915 \begin_layout Itemize
1916 \begin_inset Flex Code
1919 \begin_layout Plain Layout
1920 Undefined control sequence
1926 \begin_inset Newline newline
1929 If you've inserted LaTeX code into your document, but made a typo, you'll
1931 You may have forgotten to load a package.
1932 In any case, this error message usually means that you used an undefined
1937 \begin_layout Standard
1938 There are other error and warning messages.
1939 Some are self-explanatory.
1940 These are usually LaTeX messages.
1941 Others are downright cryptic.
1942 These are usually TeX error messages, and we really have
1946 what they mean or how to decipher them.
1950 \begin_layout Standard
1951 There's a general sequence you should follow if you get error messages:
1954 \begin_layout Enumerate
1955 Look at the LaTeX code you inserted for typos.
1958 \begin_layout Enumerate
1959 If there are no typos, check that you used the command(s) correctly.
1962 \begin_layout Enumerate
1963 If you get a bunch of error boxes piled up at the very top of the document—and
1964 especially if you see a
1965 \begin_inset Quotes eld
1969 \begin_inset Flex Code
1972 \begin_layout Plain Layout
1981 \begin_inset Quotes erd
1984 error—it means that there are errors in the preamble.
1985 Start debugging your preamble.
1988 \begin_layout Enumerate
1989 If you didn't add anything to the preamble and didn't add any LaTeX code
1990 to the document, the first suspect is your LaTeX distribution itself.
1991 Check for missing packages and install them.
1994 \begin_layout Enumerate
1995 Okay, so there are no missing packages.
1996 Did you use any of the fine-tuning options in LyX? Specifically, did you
2001 any of them, like trying to manually insert lots of
2002 \begin_inset Flex Code
2005 \begin_layout Plain Layout
2007 \begin_inset space ~
2016 \begin_inset Flex Code
2019 \begin_layout Plain Layout
2026 \begin_inset Flex Code
2029 \begin_layout Plain Layout
2035 ? Did you try to kludge something together with these instead of using the
2036 appropriate paragraph environment?
2039 \begin_layout Enumerate
2040 All right, you didn't use any of the fine-tuning options, you played by
2042 Did you try to pull a fancy maneuver? Did you do something funky inside
2043 a table or an equation, like inserting a graphic into a table cell?
2046 \begin_layout Enumerate
2047 Do you have long sections of text where LaTeX cannot find a place to break
2048 a line? By default, LaTeX is rather strict about how much extra inter-word
2049 spacing it will add in order to break a line.
2050 Preferably, you should rework the paragraph to avoid the problem.
2051 If this isn't an option, you can wrap your text in
2052 \begin_inset Flex Code
2055 \begin_layout Plain Layout
2063 to make LaTeX's line breaking more, well, sloppy.
2066 \begin_layout Enumerate
2067 Did you go overboard with the nesting? LyX (currently) doesn't check to
2068 make sure you're in the limits for nesting environments.
2069 If you nested a bunch of environments to the
2070 \begin_inset Formula $17^{\mathrm{th}}$
2073 level, that's the problem.
2074 (The limit in LaTeX is five.)
2077 \begin_layout Enumerate
2078 Okay, you didn't get any error messages, but your output looks awful.
2079 If you have a table or figure that's too wide or long for the page, you
2084 \begin_layout Enumerate
2085 rescale the figure so it fits.
2088 \begin_layout Enumerate
2089 trim down the table so it fits.
2093 \begin_layout Enumerate
2094 If something else is wrong with the output, and you didn't try to pull anything
2095 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2098 \begin_layout Standard
2099 If all this doesn't help—well, then
2103 you might have found a bug in LyX\SpecialChar \ldots{}
2107 \begin_layout Chapter
2111 \begin_layout Section
2112 Customizing Bibliographies with BibTeX
2115 \begin_layout Standard
2116 The most basic information about how to use BibTeX with LyX is contained
2119 Bibliography databases (BibTeX)
2126 The following subsections explain special bibliography features supported
2130 \begin_layout Subsection
2131 Alternative Citation Styles
2134 \begin_layout Standard
2135 Standard BibTeX uses numbers (e.
2136 \begin_inset space \thinspace{}
2140 \begin_inset space \space{}
2144 \begin_inset Quotes eld
2148 \begin_inset Quotes erd
2151 ) to refer to a cited work.
2152 However, in many scientific disciplines, other citation styles are in use.
2153 The most common one is the author-year style (e.
2154 \begin_inset space \thinspace{}
2158 \begin_inset space \space{}
2162 \begin_inset Quotes eld
2166 \begin_inset Quotes erd
2170 LyX supports two packages that provide this style,
2171 \begin_inset Flex Code
2174 \begin_layout Plain Layout
2181 \begin_inset Flex Code
2184 \begin_layout Plain Layout
2191 Both packages have their pros and cons, which cannot be listed in detail.
2192 If you only want to have simple author-year (or author-numerical) style,
2193 or if you want to use one of the countless style files for
2194 \begin_inset Flex Code
2197 \begin_layout Plain Layout
2203 , than the established
2204 \begin_inset Flex Code
2207 \begin_layout Plain Layout
2213 package is probably your choice.
2214 If you need special features like short title references, ibidem etc., you
2216 \begin_inset Flex Code
2219 \begin_layout Plain Layout
2228 \begin_layout Standard
2229 The handling of both packages in LyX is basically the same.
2231 \begin_inset Flex MenuItem
2234 \begin_layout Plain Layout
2235 Document\SpecialChar \menuseparator
2242 \begin_inset Flex MenuItem
2245 \begin_layout Plain Layout
2252 \begin_inset Flex MenuItem
2255 \begin_layout Plain Layout
2262 \begin_inset Flex MenuItem
2265 \begin_layout Plain Layout
2272 With both packages, you will get some extra features in the citation dialog
2273 and you can select the style of the reference (
2274 \begin_inset Quotes eld
2278 \begin_inset Quotes erd
2282 \begin_inset Quotes eld
2286 \begin_inset Quotes erd
2290 \begin_inset Quotes eld
2294 \begin_inset Quotes erd
2298 \begin_inset Quotes eld
2302 \begin_inset Quotes erd
2306 Note that both packages need specifically designed style files.
2307 They both ship their own, but there are lots of additional style files,
2308 and there is even an interactive style file builder
2312 \begin_layout Plain Layout
2314 \begin_inset Flex URL
2317 \begin_layout Plain Layout
2319 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2330 \begin_inset Flex Code
2333 \begin_layout Plain Layout
2342 \begin_layout Subsection
2343 Sectioned Bibliographies
2346 \begin_layout Standard
2347 Sometimes you might need to divide your bibliography into several sections.
2348 If you are for instance a historian, the possibility to separate sources
2349 and scientific works is most likely a
2350 \begin_inset Quotes eld
2354 \begin_inset Quotes erd
2358 Unfortunately, BibTeX itself does not allow you to do this.
2359 But with the help of some LaTeX packages, BibTeX can be extended to fit
2363 \begin_layout Standard
2364 LyX provides native support for one of these packages,
2372 \begin_layout Plain Layout
2374 \begin_inset Flex URL
2377 \begin_layout Plain Layout
2379 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2389 The advantage of this package (compared to other packages like
2393 ) is that you don't need to define new citation commands.
2394 Instead, you need to prepare different bibliographic databases which include
2395 the entries for the different sections of the bibliography.
2396 For example: If you want to divide your bibliography into the sections
2398 \begin_inset Quotes eld
2402 \begin_inset Quotes erd
2406 \begin_inset Quotes eld
2410 \begin_inset Quotes erd
2413 , you first need to create two bibliographic databases, e.
2414 \begin_inset space \thinspace{}
2418 \begin_inset space \space{}
2422 \begin_inset Flex Code
2425 \begin_layout Plain Layout
2432 \begin_inset Flex Code
2435 \begin_layout Plain Layout
2445 \begin_layout Standard
2447 \begin_inset Flex MenuItem
2450 \begin_layout Plain Layout
2451 Document\SpecialChar \menuseparator
2458 \begin_inset Flex MenuItem
2461 \begin_layout Plain Layout
2468 \begin_inset Flex MenuItem
2471 \begin_layout Plain Layout
2472 Sectioned bibliography
2478 Now you can insert multiple BibTeX bibliographies, one for each section
2479 of your bibliography.
2480 Returning to our example: Insert the BibTeX bibliography
2481 \begin_inset Flex Code
2484 \begin_layout Plain Layout
2490 and a second one for the database
2491 \begin_inset Flex Code
2494 \begin_layout Plain Layout
2501 You are free to use the same or different styles for each section.
2502 Additionally, you can chose if the bibliography section should contain
2504 \begin_inset Quotes eld
2507 all cited references
2508 \begin_inset Quotes erd
2511 of the specified database(s) (which is the default),
2512 \begin_inset Quotes eld
2515 all uncited references
2516 \begin_inset Quotes erd
2520 \begin_inset Quotes eld
2524 \begin_inset Quotes erd
2528 This might be useful if you would like to separate your bibliography into
2530 \begin_inset Quotes eld
2534 \begin_inset Quotes erd
2538 \begin_inset Quotes eld
2542 \begin_inset Quotes erd
2546 \begin_inset Quotes eld
2550 \begin_inset Quotes erd
2554 The titles for the sections can be added as ordinary sections or subsections.
2556 \begin_inset Flex Code
2559 \begin_layout Plain Layout
2565 removes the bibliography title, you have manually re-add that, too (as
2566 a chapter* or section*, for instance).
2569 \begin_layout Subsection
2570 Multiple Bibliographies
2573 \begin_layout Standard
2574 Multiple bibliographies, e.
2575 \begin_inset space \thinspace{}
2579 \begin_inset space \space{}
2582 a bibliography for each section or chapter of the document, are not supported
2585 \begin_inset Flex Code
2588 \begin_layout Plain Layout
2594 package, which is used for the creation of sectioned bibliographies in
2595 LyX (see the previous section), provides an easy way to solve this task,
2596 if you are willing to use some
2597 \begin_inset Flex MenuItem
2600 \begin_layout Plain Layout
2607 \begin_inset space ~
2611 \begin_inset CommandInset ref
2613 reference "sec:Inserting-TeX-Code"
2621 \begin_layout Plain Layout
2622 An alternative approach is to use the
2623 \begin_inset Flex Code
2626 \begin_layout Plain Layout
2633 \begin_inset Flex Code
2636 \begin_layout Plain Layout
2642 package, respectively.
2650 \begin_layout Standard
2652 \begin_inset Flex MenuItem
2655 \begin_layout Plain Layout
2656 Document\SpecialChar \menuseparator
2663 \begin_inset Flex MenuItem
2666 \begin_layout Plain Layout
2673 \begin_inset Flex MenuItem
2676 \begin_layout Plain Layout
2677 Sectioned bibliography
2683 In the document, you have to enclose the sections, which shall contain
2684 their own bibliography (including the BibTeX bibliography itself), between
2686 \begin_inset Flex Code
2689 \begin_layout Plain Layout
2698 \begin_inset Flex Code
2701 \begin_layout Plain Layout
2709 (those commands have to be inserted as TeX code).
2710 The bibliography will contain all references which have been cited in the
2712 \begin_inset Flex Code
2715 \begin_layout Plain Layout
2726 If you are using this approach, then every citation reference has to be
2728 \begin_inset Flex Code
2731 \begin_layout Plain Layout
2739 \begin_inset Flex Code
2742 \begin_layout Plain Layout
2751 \begin_layout Section
2755 \begin_layout Subsection
2759 \begin_layout Standard
2760 When you are working on a large file with many sections, it is often convenient
2761 to break up the document into several files, or perhaps you have something
2762 where a table may change from time to time, but the preceding text does
2764 In these cases, you should seriously consider using multipart documents.
2765 For example, scientific papers often have five major sections: the introduction
2766 , observations, results, discussion, and conclusion.
2767 Each of these could be its own separate LyX file, with one
2768 \begin_inset Quotes eld
2772 \begin_inset Quotes erd
2775 file which contains the title, authors, abstract, references, etc., plus
2776 the five included files.
2777 It is important to note that each of these files is a full LyX file which
2778 can be formatted and printed on its own, as well as included in a master
2780 Each of these files must have the same document class, however—don't attempt
2781 to mix book classes with article classes.
2782 You may also include LaTeX files; however, these files must not have their
2784 \begin_inset space \thinspace{}
2788 \begin_inset space \space{}
2791 everything up to and including the
2792 \begin_inset Flex Code
2795 \begin_layout Plain Layout
2804 \begin_inset Flex Code
2807 \begin_layout Plain Layout
2815 line must be deleted) or else errors will be generated when you try to
2819 \begin_layout Standard
2820 LyX allows you to include files quite easily with
2821 \begin_inset Flex MenuItem
2824 \begin_layout Plain Layout
2825 Insert\SpecialChar \menuseparator
2827 \begin_inset space ~
2836 When you click on this selection a small box is inserted into the file
2837 at the current cursor location.
2838 Clicking on the box raises a dialog which allows you to select the file
2839 to be included, and the method of its inclusion.
2843 \begin_layout Standard
2844 The file selection box should by now be obvious.
2845 The three inclusion methods are
2846 \begin_inset Quotes eld
2850 \begin_inset Quotes erd
2854 \begin_inset Quotes eld
2858 \begin_inset Quotes erd
2862 \begin_inset Quotes eld
2866 \begin_inset Quotes erd
2870 The difference between
2871 \begin_inset Quotes eld
2875 \begin_inset Quotes erd
2879 \begin_inset Quotes eld
2883 \begin_inset Quotes erd
2886 is really only meaningful to LaTeXperts, but the practical difference is
2887 that files which are
2888 \begin_inset Quotes eld
2892 \begin_inset Quotes erd
2895 are typeset beginning on a new page, while files which are
2896 \begin_inset Quotes eld
2900 \begin_inset Quotes erd
2903 are typeset starting on the current page.
2906 \begin_layout Standard
2907 Generally, the master file is converted into a full LaTeX file before typesettin
2908 g, while the included files are converted to LaTeX files which do not have
2909 all the preamble information.
2912 \begin_layout Standard
2914 \begin_inset Quotes eld
2918 \begin_inset Quotes erd
2921 included file allows you to include a file typeset exactly as it appears
2923 \begin_inset space \thinspace{}
2927 \begin_inset space \space{}
2931 \begin_inset Flex Code
2934 \begin_layout Plain Layout
2940 mode, with the characters set in a fixed-width typewriter font.
2941 Normally, spaces in this file are invisible, though two consecutive spaces
2942 are conserved, unlike LyX's normal treatment of spaces.
2943 However, setting the
2944 \begin_inset Flex MenuItem
2947 \begin_layout Plain Layout
2949 \begin_inset space ~
2953 \begin_inset space ~
2957 \begin_inset space ~
2965 checkbox typesets a mark to unambiguously define the presence of a space.
2969 \begin_layout Subsection
2970 Cross-References Between Files
2973 \begin_layout Standard
2974 \begin_inset Box Shadowbox
2984 height_special "totalheight"
2987 \begin_layout Plain Layout
2988 This section is somewhat out of date.
2989 Need to describe default master documents and how children are opened when
2999 \begin_layout Standard
3000 It is possible to set up cross-references between the different files.
3001 First, open all the files in question: let's call them A and B in a two
3002 file example, where B is included in A.
3003 Let's say you insert a label in A, then want to reference it in B.
3004 Open the cross-reference dialog in whilst in document B, and you can select
3006 \begin_inset Quotes eld
3010 \begin_inset Quotes erd
3016 \begin_layout Subsection
3017 Bibliography Lists in all Subdocuments
3020 \begin_layout Standard
3021 \begin_inset Box Frameless
3031 height_special "totalheight"
3034 \begin_layout Plain Layout
3035 This section also needs updating.
3036 There is now material about this on the wiki, and it could be copied here.
3044 \begin_layout Standard
3045 Copy the bibliography list with all entries to all subdocuments and transform
3047 This way LyX will find the
3048 \begin_inset Flex Code
3051 \begin_layout Plain Layout
3057 -files and you can easily insert references without making the bibliography
3061 \begin_layout Standard
3062 As the bibliography list is in a comment, LaTeX won't use use it and the
3063 references will look like this: [?], instead of like this: [1].
3064 One solution is to use the LaTeX-package
3065 \begin_inset Flex Code
3068 \begin_layout Plain Layout
3074 that will only include comments by processing the files separately.
3075 To do this, add in the LaTeX preamble of every subdocument the following:
3078 \begin_layout LyX-Code
3084 \begin_layout LyX-Code
3087 includecomment{comment}
3090 \begin_layout Standard
3092 \begin_inset Flex URL
3095 \begin_layout Plain Layout
3097 http://wiki.lyx.org/FAQ/Unsorted#toc31
3105 \begin_layout Section
3109 \begin_layout Standard
3110 Users sometimes need to be able to
3111 \begin_inset Quotes eld
3115 \begin_inset Quotes erd
3118 a LyX file together with all the images (and other files) on which it depends,
3119 either for sending to a publisher or for sharing with a co-author.
3120 LyX 2.0 includes a Python script (
3121 \begin_inset Flex Code
3124 \begin_layout Plain Layout
3130 ) that automates this process.
3131 To use it, you must have either the
3132 \begin_inset Flex Code
3135 \begin_layout Plain Layout
3142 \begin_inset Flex Code
3145 \begin_layout Plain Layout
3151 python modules installed on your system.
3152 By default, the script prefers the
3153 \begin_inset Flex Code
3156 \begin_layout Plain Layout
3163 \begin_inset Flex Code
3166 \begin_layout Plain Layout
3172 format on Unix-like systems and the
3173 \begin_inset Flex Code
3176 \begin_layout Plain Layout
3185 \begin_layout Standard
3186 LyX's configuration process will set the script up to export a `LyX Archive',
3187 and this format will then be available under
3188 \begin_inset Flex Code
3191 \begin_layout Plain Layout
3192 File\SpecialChar \menuseparator
3201 \begin_layout Standard
3202 Independently of the platform, the generation of a particular archive format
3203 can be forced by adding either the
3204 \begin_inset Flex Code
3207 \begin_layout Plain Layout
3214 \begin_inset Flex Code
3217 \begin_layout Plain Layout
3224 \begin_inset Flex Code
3227 \begin_layout Plain Layout
3234 \begin_inset Flex Code
3237 \begin_layout Plain Layout
3243 format) switch to the
3244 \begin_inset Flex Code
3247 \begin_layout Plain Layout
3248 LyX\SpecialChar \menuseparator
3255 \begin_inset Flex Code
3258 \begin_layout Plain Layout
3259 Tools\SpecialChar \menuseparator
3260 Preferences\SpecialChar \menuseparator
3261 File Handling\SpecialChar \menuseparator
3268 (Make sure you add the switch after the script name, not before it.)
3271 \begin_layout Section
3272 Fancy Headers and Footers
3275 \begin_layout Standard
3276 The default page layout is rather plain; for an
3277 \begin_inset Flex Code
3280 \begin_layout Plain Layout
3286 document class, all you get is a centered page number at the bottom of
3288 This document uses KOMA-script's book class, so it appears to be a bit
3290 But to really put on a show, you need to set the document page style to
3292 \begin_inset Quotes eld
3296 \begin_inset Quotes erd
3299 , as mentioned in the
3304 This section describes the LaTeX code you need to insert in your LaTeX
3305 preamble in order to get the desired effects.
3308 \begin_layout Standard
3309 For more information on fancy headers, see the
3310 \begin_inset Flex Code
3313 \begin_layout Plain Layout
3319 package documentation.
3321 \begin_inset Flex URL
3324 \begin_layout Plain Layout
3326 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3334 \begin_layout Standard
3335 The page header is divided into three fields, not surprisingly labeled
3336 \begin_inset Quotes eld
3340 \begin_inset Quotes erd
3344 \begin_inset Quotes eld
3348 \begin_inset Quotes erd
3352 \begin_inset Quotes eld
3356 \begin_inset Quotes erd
3360 The footer is also divided into these three fields.
3361 The LaTeX commands to set these fields in the simplest manner are
3362 \begin_inset Flex Code
3365 \begin_layout Plain Layout
3374 \begin_inset Flex Code
3377 \begin_layout Plain Layout
3386 \begin_inset Flex Code
3389 \begin_layout Plain Layout
3398 \begin_inset Flex Code
3401 \begin_layout Plain Layout
3410 Suppose you wish to put your name in the upper left hand corner of each
3412 Simply insert the following command in the preamble:
3415 \begin_layout Standard
3424 \begin_layout Standard
3425 You will now see your name in the upper left.
3426 If a field has a default entry that you would like to get rid of (often
3427 the page number appears in the central footer, simply include a command
3428 with a blank argument, e.
3429 \begin_inset space \thinspace{}
3435 \begin_layout Standard
3443 \begin_layout Standard
3444 Let's get really fancy: lets put the section number with the word
3445 \begin_inset Quotes eld
3449 \begin_inset Quotes erd
3453 \begin_inset space \thinspace{}
3457 \begin_inset space \space{}
3460 Section 3) in the upper left, the page number (e.
3461 \begin_inset space \thinspace{}
3465 \begin_inset space \space{}
3468 Page 4) in the upper right, your name in the lower left, and the date in
3470 The following commands should now appear in the preamble:
3473 \begin_layout Standard
3483 \begin_layout Standard
3491 \begin_layout Standard
3501 \begin_layout Standard
3510 \begin_layout Standard
3518 \begin_layout Standard
3528 \begin_layout Standard
3530 \begin_inset Flex Code
3533 \begin_layout Plain Layout
3542 \begin_inset Flex Code
3545 \begin_layout Plain Layout
3553 access LaTeX's section and page counters, and so print out the current
3554 section and page numbers.
3556 \begin_inset Flex Code
3559 \begin_layout Plain Layout
3567 simply prints out today's date.
3570 \begin_layout Standard
3571 The thicknesses of the horizontal rules drawn beneath the header and above
3572 the footer can also be modified.
3573 If you don't want one of the rules, set its thickness to 0.
3574 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3580 \begin_inset Flex Code
3583 \begin_layout Plain Layout
3588 headrulewidth}{0.4pt}
3594 \begin_inset Flex Code
3597 \begin_layout Plain Layout
3602 footrulewidth}{0.4pt}
3607 to set the thicknesses.
3610 \begin_layout Standard
3611 You can switch the header/footer settings on and off for individual pages
3613 \begin_inset Flex Code
3616 \begin_layout Plain Layout
3619 thispagestyle{empty}
3625 \begin_inset Flex Code
3628 \begin_layout Plain Layout
3631 thispagestyle{plain}
3637 \begin_inset Flex Code
3640 \begin_layout Plain Layout
3643 thispagestyle{fancy}
3649 Simply insert them in the text on the page you want changed and mark them
3651 In fact, title pages are marked as plain by default, while following pages
3652 are marked fancy when using the global fancy setting.
3655 \begin_layout Standard
3656 As a final example, it is possible to include an image in the header or
3658 Suppose you want to put a company logo in the upper lefthand corner.
3659 You might try something like
3662 \begin_layout Standard
3671 includegraphics{logo.eps}}}
3674 \begin_layout Standard
3676 (you may need to preface this with
3677 \begin_inset Flex Code
3680 \begin_layout Plain Layout
3684 usepackage{graphics}
3689 if you don't include graphics elsewhere in your document).
3692 \begin_layout Section
3693 Itemize Bullet Selection
3694 \begin_inset CommandInset label
3703 \begin_layout Standard
3709 \begin_layout Subsection
3713 \begin_layout Standard
3714 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3715 Using this dialog you can easily specify what bullet shape to use at each
3716 level of an itemized list.
3717 These settings are document-wide so you won't be able to specify different
3718 sets of bullets for different paragraphs.
3722 \begin_layout Plain Layout
3723 Well, actually you can but you'll have to do it by hand.
3731 \begin_layout Subsection
3735 \begin_layout Standard
3736 Open the dialog by selecting the
3737 \begin_inset Flex MenuItem
3740 \begin_layout Plain Layout
3741 Document\SpecialChar \menuseparator
3747 menu item and then select the
3748 \begin_inset Flex MenuItem
3751 \begin_layout Plain Layout
3760 \begin_layout Standard
3761 The dialog provides you with a table of bullet shapes.
3762 A column of buttons on the left of the table provides access to the six
3763 different panels of bullet shapes.
3764 The row of buttons across the top is used to select which bullet depth
3766 A text entry under the table shows the currently selected bullet shape's
3767 LaTeX equivalent and this can be edited if desired.
3768 If you do modify the text you will also need to specify any needed packages
3769 in the LaTeX preamble.
3772 \begin_layout Standard
3773 The six panels are divided up by the packages they require.
3774 The following table shows the mappings from button name to LaTeX packages.
3777 \begin_layout Standard
3779 \begin_inset Tabular
3780 <lyxtabular version="3" rows="7" columns="2">
3781 <features tabularvalignment="middle">
3782 <column alignment="center" valignment="top" width="0pt">
3783 <column alignment="center" valignment="top" width="0pt">
3785 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3788 \begin_layout Plain Layout
3803 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3806 \begin_layout Plain Layout
3823 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3826 \begin_layout Plain Layout
3841 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3844 \begin_layout Plain Layout
3860 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3863 \begin_layout Plain Layout
3878 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3881 \begin_layout Plain Layout
3898 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3901 \begin_layout Plain Layout
3916 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3919 \begin_layout Plain Layout
3936 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3939 \begin_layout Plain Layout
3954 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3957 \begin_layout Plain Layout
3974 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3977 \begin_layout Plain Layout
3992 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3995 \begin_layout Plain Layout
4012 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4015 \begin_layout Plain Layout
4030 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4033 \begin_layout Plain Layout
4056 \begin_layout Standard
4057 LyX doesn't stop you using bullets from packages you don't have.
4058 If you get errors from LaTeX when you try to view or print the file, then
4059 it is likely you are missing a package.
4063 \begin_layout Plain Layout
4064 LyX doesn't restrict your use since you may be editing locally and exporting
4073 \begin_layout Subsection
4077 \begin_layout Standard
4078 Select which bullet depth you want to change then select the bullet shape
4080 Any changes will not be visible in LyX, but are visible when viewing the
4084 \begin_layout Standard
4085 You can reset a bullet shape to the default simply by clicking your right
4086 mouse button on the appropriate bullet depth button.
4090 \begin_layout Plain Layout
4095 want to have multiple sets of paragraphs with different sets of bullets
4096 in each, then you're going to have to get your hands dirty with TeX code.
4097 The bullet selection dialog can help though because it provides you with
4098 the LaTeX code for a wide range of bullet shapes.
4099 To make your own custom paragraphs you have the following options:
4102 \begin_layout Plain Layout
4106 \begin_layout Plain Layout
4122 \begin_layout Plain Layout
4126 \begin_layout Plain Layout
4148 \begin_layout Itemize
4149 Use the LaTeX command
4150 \begin_inset Flex Code
4153 \begin_layout Plain Layout
4161 to specify a new bullet shape for a given depth.
4162 You'll also need to save the current bullet shape so you can restore it
4164 In this itemized list the following LaTeX code was used to change the bullet
4165 used for the first depth.
4169 \begin_layout LyX-Code
4179 \begin_layout LyX-Code
4196 \begin_layout Itemize
4197 Note that the itemize depth is specified in Roman numerals as part of the
4207 \begin_layout Itemize
4211 \begin_layout Plain Layout
4224 Specify each individual entry by starting each item with the bullet shape
4225 enclosed in square brackets and set as
4226 \begin_inset Flex MenuItem
4229 \begin_layout Plain Layout
4236 For example, this item was started with
4237 \begin_inset Flex Code
4240 \begin_layout Plain Layout
4255 \begin_layout Plain Layout
4259 \begin_layout Plain Layout
4275 \begin_layout Plain Layout
4276 You'll also need to revert the labelitem back to its previous setting for
4277 the global bullet shape settings to remain in effect.
4278 The way used here was:
4281 \begin_layout LyX-Code
4296 \begin_layout Chapter
4297 LyX and the World Wide Web
4300 \begin_layout Standard
4301 LyX has long supported the export of documents to various web-friendly formats,
4303 Before verson 2.0, however, HTML export was always accomplished by the use
4304 of external converters.
4308 \begin_layout Plain Layout
4309 For details on the use of external converters with LyX, see the
4313 section of the Customization manual.
4318 These fall into two large groups: there are converters that use LaTeX as
4319 an intermediate format, such as
4320 \begin_inset Flex Code
4323 \begin_layout Plain Layout
4330 \begin_inset Flex Code
4333 \begin_layout Plain Layout
4340 \begin_inset Flex Code
4343 \begin_layout Plain Layout
4349 , relying upon LyX to produce the LaTeX; and there is a converter that works
4350 directly on LyX files,
4351 \begin_inset Flex Code
4354 \begin_layout Plain Layout
4361 All of these have different advantages and disadvantages.
4365 \begin_layout Standard
4366 The LaTeX-based converters have the advantage that, in principle, they know
4367 everything about the exported document that LaTeX does.
4368 Such converters do not care, for example, if a certain block of code was
4369 produced by LyX or was Evil Red Text.
4370 These converters know about
4371 \begin_inset Flex Code
4374 \begin_layout Plain Layout
4380 files, counters, and references, and can often make use of the
4381 \begin_inset Flex Code
4384 \begin_layout Plain Layout
4390 files generated by BibTeX.
4391 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4392 said that only TeX itself understands TeX---and LaTeX-based converters
4393 will often choke on what seem to be quite simple constructs; complex ones
4394 can throw them completely, and as of this writing, for example, the
4398 manual will not export with
4399 \begin_inset Flex Code
4402 \begin_layout Plain Layout
4408 , though the others will.
4409 The other issue concerns how math is handled.
4410 These converters typically convert the formulae into little pictures that
4411 are then linked from the HTML document.
4412 Since these are actually generated by LaTeX, they are accurate.
4413 But they do not scale well, and just getting them to look as if they are
4414 actually meant to be in your document---so that the font sizes seem to
4415 be roughly the same---can be a challenge.
4418 \begin_layout Standard
4420 \begin_inset Flex Code
4423 \begin_layout Plain Layout
4430 \begin_inset CommandInset href
4432 name "http://elyxer.nongnu.org/"
4433 target "http://elyxer.nongnu.org/"
4437 ) solves some of these problems.
4438 In particular, the formulae it produces scale perfectly, since it renders
4439 math using a combination of HTML and CSS rather than converting the formulae
4441 But even moderately complex formula are rendered less well than with
4442 \begin_inset Flex Code
4445 \begin_layout Plain Layout
4451 ; this reflects the limitations of HTML.
4455 \begin_layout Plain Layout
4457 \begin_inset Flex Code
4460 \begin_layout Plain Layout
4466 can also use jsMath and MathJax for equations, but this setting is only
4467 available globally and requires one to have access to a server that runs
4473 More importantly (as of version 1.1.1, at least),
4474 \begin_inset Flex Code
4477 \begin_layout Plain Layout
4483 has limited support for math macros and no support for user-defined paragraph
4484 or character styles.
4485 These limitations make
4486 \begin_inset Flex Code
4489 \begin_layout Plain Layout
4495 unsuitable for many of the documents LyX users produce.
4496 In principle, of course, these problems could be solved, but the LyX developers
4497 have decided to follow a different path and have made LyX itself capable
4498 of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4502 \begin_layout Standard
4503 As of this writing, XHTML output remains under development and should probably
4505 \begin_inset Quotes eld
4509 \begin_inset Quotes erd
4516 \begin_layout Plain Layout
4518 \begin_inset Flex Code
4521 \begin_layout Plain Layout
4522 development/HTML.notes
4527 , which can be found in the LyX source tree or
4528 \begin_inset CommandInset href
4530 name "accessed online"
4531 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4535 , usually contains up-to-date information about the state of XHTML output.
4536 See also the list of XHTML bugs on
4537 \begin_inset CommandInset href
4539 name "the bug tracker"
4540 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"
4549 Still, the developers have chosen this approach because it has several
4550 potential advantages over the other two.
4553 \begin_layout Standard
4554 These advantages are primarily due to the fact that the XHTML output routines,
4555 since they are part of LyX, know everything LyX knows about the document
4560 \begin_layout Plain Layout
4561 Another advantage is that, since these routines are internal to LyX, they
4562 are immune to changes in LyX's file format, or to changes in the semantics
4568 So they know about the table of contents (as displayed in the outline),
4569 about the counters associated with different paragraph styles, and about
4570 user-defined styles.
4571 The XHTML output routines know what LyX knows about internationalization,
4572 too, so they will output
4573 \begin_inset Quotes eld
4577 \begin_inset Quotes erd
4581 \begin_inset Quotes eld
4589 \begin_inset Quotes erd
4592 , depending upon the language in effect at the time.
4596 \begin_layout Standard
4597 Quite generally, the output routines know what LyX knows about document
4598 layout, that is, about how the document is to be rendered on screen.
4599 We use this information when we output the document as XHTML.
4604 generates CSS style information corresponding to the layout information
4605 it uses to render the document on screen: if section headings are supposed
4606 to be sans-serif and bold as seen in LyX, then (by default) they will be
4607 sans-serif and bold when viewed in a web browser, too.
4608 And this is true not just for pre-defined styles, like Section, but for
4609 any style, including user-defined styles.
4610 Indeed, the XHTML output routines make no distinction between user-defined
4611 paragraph and character styles and LyX's own pre-defined styles: in each
4612 case, everything LyX knows about the styles is contained in the layout
4614 And much the same is true as regards pre-defined textual insets, such as
4615 footnotes, and various custom insets.
4619 \begin_layout Standard
4620 The result is that XHTML output can be customized and extended in exactly
4621 the same way LaTeX output can be customized and extended: through layout
4623 See chapter five of the
4627 manual for the details.
4630 \begin_layout Standard
4631 The remainder of this chapter contains more detailed information on XHTML
4632 output, its limitations, and ways to work around those limitations.
4635 \begin_layout Section
4636 Math Output in XHTML
4639 \begin_layout Standard
4640 LyX offers four choices for how math is rendered.
4641 These have various advantages and disadvantages:
4644 \begin_layout Itemize
4646 \begin_inset Newline newline
4649 MathML is a dialect of XML designed specifically for mathematics on the
4650 web, and it typically renders very well in browsers that support it.
4651 The disadvantage is that not all browsers support MathML, and support is
4652 not complete even in the Gecko-based browsers, such as Firefox.
4653 \begin_inset Newline newline
4656 If LyX is unable to render a formula as MathML---for example, if the formula
4658 \begin_inset Flex Code
4661 \begin_layout Plain Layout
4667 package or ERT---then it will instead output the formula as an image.
4671 \begin_layout Itemize
4673 \begin_inset Newline newline
4677 \begin_inset Flex Code
4680 \begin_layout Plain Layout
4686 outputs math as HTML, styled by CSS.
4690 \begin_layout Plain Layout
4691 LyX has borrowed some of the CSS for its HTML output from
4692 \begin_inset Flex Code
4695 \begin_layout Plain Layout
4706 For simple formulae, this can work quite well, though with more complicated
4707 formulae it tends to break down.
4708 Still, this method has the advantage that it is very widely supported and
4709 so it may be appropriate for documents that contain only a little, fairly
4711 \begin_inset Newline newline
4714 If Lyx is unable to render a formula as HTML---for example, if the formula
4716 \begin_inset Flex Code
4719 \begin_layout Plain Layout
4725 package or ERT---then it will instead output the formula as an image.
4729 \begin_layout Itemize
4731 \begin_inset Newline newline
4735 \begin_inset Flex Code
4738 \begin_layout Plain Layout
4744 , LyX will output formulae as images, the very same images, in fact, that
4745 are used for instant preview.
4749 \begin_layout Plain Layout
4750 Instant preview does
4754 have to be on for images to be output, however.
4759 The advantage to this method is that the images are simply generated by
4760 LaTeX, so they are very accurate.
4761 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4762 so they do not scale terribly well, and one cannot copy them, etc.
4763 (As of this writing, there are also problems about equation numbering.
4765 \begin_inset CommandInset href
4768 target "http://www.lyx.org/trac/ticket/6894"
4773 \begin_inset Newline newline
4776 The size of the images can be controlled by setting the
4777 \begin_inset Quotes eld
4781 \begin_inset Quotes erd
4785 \begin_inset Flex MenuItem
4788 \begin_layout Plain Layout
4789 Document\SpecialChar \menuseparator
4790 Settings\SpecialChar \menuseparator
4800 \begin_layout Plain Layout
4801 For those who want to know, this controls the resolution of the image in
4802 dots per inch and is based upon a default of 75 dpi.
4808 \begin_inset Newline newline
4811 If LyX for some reason fails to create an image for a formula (e.g., if a
4812 required LaTeX package is not installed), then it will fall back to outputing
4816 \begin_layout Itemize
4818 \begin_inset Newline newline
4821 Finally, LyX will happily output math as LaTeX.
4822 As well as being the output of last resort, this method can be used with
4824 \begin_inset CommandInset href
4827 target "http://www.math.union.edu/~dpvc/jsMath/"
4831 , which uses JavaScript to render LaTeX embedded in HTML documents.
4832 LyX wraps the LaTeX in either a
4833 \begin_inset Flex Code
4836 \begin_layout Plain Layout
4842 (for inline formulas) or
4843 \begin_inset Flex Code
4846 \begin_layout Plain Layout
4852 (for displayed formulas) with
4853 \begin_inset Flex Code
4856 \begin_layout Plain Layout
4862 , as is required for jsMath.
4865 \begin_layout Standard
4866 One of these output methods must be selected under
4867 \begin_inset Flex MenuItem
4870 \begin_layout Plain Layout
4871 Document\SpecialChar \menuseparator
4872 Settings\SpecialChar \menuseparator
4879 By default, LyX outputs MathML.
4880 This is a document-wide setting, therefore.
4883 \begin_layout Standard
4884 Eventually, LyX will offer the user the option to select an alternate output
4885 method for a particular inset, say, one that isn't being rendered very
4890 \begin_layout Plain Layout
4891 That said, since LyX falls back to images if the inset contains ERT, then
4892 one can force output as an image by putting some harmless ERT into the
4894 \begin_inset Formula $a=b\relax$
4905 \begin_layout Section
4906 Bibliography and Citations
4909 \begin_layout Standard
4910 XHTML output fully supports bibliographies and citations.
4914 \begin_layout Standard
4915 Citation labels are generated by the same machinery that generates LyX's
4916 on-screen labels, so the labels will look in the output much as they do
4917 in LyX, though better.
4918 If you are using numerical citations, then LyX will output numerical labels,
4919 such as [1] or [17], rather than simply showing the citation key in square
4920 brackets, as it does on-screen.
4921 If you are using author-year citations, then LyX will add lowercase letters
4922 to the years, just as BibTeX does, if it finds more than one citation for
4923 a given author-year combination.
4924 The labels will be printed with the bibliography entries.
4925 Note that there is, at present, no way to customize the appearance of the
4926 labels, for example, to choose between square brackets and parentheses.
4929 \begin_layout Standard
4930 Bibliography output is handled by the same machinery that handles the presentati
4931 on of reference information in the citation dialog, so you will see in the
4932 XHTML output pretty much what you would see if you were to look at a given
4933 entry in the citation dialog.
4934 The formatting can be customized in your layout file or, preferably, in
4940 manual for the details.
4943 \begin_layout Standard
4944 The main defect at present is that cross-referenced information is printed
4945 with every entry with which it is associated.
4946 So you can see things like this:
4951 \begin_inset Quotes eld
4954 Context and Logical Form
4955 \begin_inset Quotes erd
4960 Language in Context: Selected Essays
4962 (Oxford: Oxford University Press, 2007), pp.
4968 \begin_inset Quotes eld
4971 Semantics in Context
4972 \begin_inset Quotes erd
4977 Language in Context: Selected Essays
4979 (Oxford: Oxford University Press, 2007), pp.
4983 \begin_layout Standard
4984 This should be fixed before long.
4987 \begin_layout Standard
4988 There is no support at present for sectioned bibliographies.
4989 If you have multiple bibliographies, then LyX will print the same bibliography
4993 \begin_layout Section
4997 \begin_layout Standard
4998 LyX will happily export indexes as XHTML, but with certain limitations at
5002 \begin_layout Standard
5003 Index export will be most reliable when you do not attempt to use the fancy
5004 constructs that are described in the section on indexes in the
5012 \begin_layout Plain Layout
5013 The main issue here is that LyX itself does not really handle these.
5014 It just lets you enter what you would have to enter in raw LaTeX.
5019 We'll describe how they are handled using the subsection headings from
5023 \begin_layout Itemize
5024 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5025 these, but the entries must be separated by
5026 \begin_inset Quotes eld
5030 \begin_inset Quotes erd
5033 , that is, there must be spaces around the exclamation point.
5034 This is because it is otherwise too difficult to check for escaped exclamation
5035 points, ones in math, and so forth.
5038 \begin_layout Itemize
5039 Page Ranges: There is no support at all for page ranges, since these make
5040 no sense with XHMTL.
5041 Instead, you will just get two index entries, one at either end.
5044 \begin_layout Itemize
5045 Cross-referencing: There is no support for cross-referencing.
5046 If LyX finds an entry containing the
5047 \begin_inset Quotes eld
5050 |see\SpecialChar \ldots{}
5052 \begin_inset Quotes erd
5055 construct, it is just dropped, and the rest is treated as an ordinary index
5059 \begin_layout Itemize
5060 Index Entry Order: LyX does support attempts to fix the sorting order.
5061 It will take what is before the first `@' it finds and use that for sorting,
5062 taking what follows the first `@' to be the actual entry.
5063 At present, LyX does not check for escaped `@', so do not try to index
5067 \begin_layout Itemize
5068 Index Entry Layout: You can format entries by using the text style dialog,
5069 or by using any other method available within LyX itself.
5070 There is no support for constructs like:
5071 \begin_inset Quotes eld
5075 \begin_inset Quotes erd
5079 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5080 and everything that follows it.
5083 \begin_layout Itemize
5084 Multiple Indexes: There is no support for multiple indexes.
5085 Rather, all index entries will be printed as one large index.
5086 To avoid our printing several versions of the index, we print only the
5087 main index, so make sure you have one.
5090 \begin_layout Section
5091 Nomenclature and Glossary
5094 \begin_layout Standard
5095 There is at present no support for glossaries.
5096 Adding it would be fairly trivial, and welcome.
5099 \begin_layout Chapter
5103 \begin_layout Section
5107 \begin_layout Standard
5108 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5109 and retrieve information about the LyX internal state.
5110 This is only intended for advanced users, but they should find it useful.
5111 It is by writing to the LyX server, for example, that bibliography managers,
5112 such as JabRef, are able to
5113 \begin_inset Quotes eld
5117 \begin_inset Quotes erd
5123 \begin_layout Section
5124 Starting the LyX Server
5127 \begin_layout Standard
5128 The LyX server works through the use of a pair of named pipes.
5129 These are usually located in
5130 \begin_inset Flex Code
5133 \begin_layout Plain Layout
5139 , (except on Windows, where
5143 named pipes are special objects located in
5144 \begin_inset Flex Code
5147 \begin_layout Plain Layout
5159 ) and have the names
5160 \begin_inset Quotes eld
5164 \begin_inset Flex Code
5167 \begin_layout Plain Layout
5174 \begin_inset Quotes erd
5178 \begin_inset Quotes eld
5182 \begin_inset Flex Code
5185 \begin_layout Plain Layout
5192 \begin_inset Quotes erd
5196 External programs write into
5197 \begin_inset Flex Code
5200 \begin_layout Plain Layout
5206 and read back data from
5207 \begin_inset Flex Code
5210 \begin_layout Plain Layout
5217 The stem of the pipe names can be defined in the
5218 \begin_inset Flex MenuItem
5221 \begin_layout Plain Layout
5222 Tools\SpecialChar \menuseparator
5229 \begin_inset Flex Code
5232 \begin_layout Plain Layout
5233 "/home/myhome/lyxpipe"
5239 \begin_inset Flex Code
5242 \begin_layout Plain Layout
5256 on Windows (but any working path can be used).
5261 configure this manually in order for the server to start.
5264 \begin_layout Standard
5266 \begin_inset Flex Code
5269 \begin_layout Plain Layout
5276 \begin_inset Flex Code
5279 \begin_layout Plain Layout
5285 ' to create the pipes.
5286 If one of the pipes already exists, LyX will assume that another LyX process
5287 is already running and will not start the server.
5288 On POSIX (Unix like) systems, if for some other reason, an unused
5289 \begin_inset Quotes eld
5293 \begin_inset Quotes erd
5296 pipe is left in existence when LyX closes, then LyX will try to delete
5298 If this fails for some reason, you will need to delete the pipes manually
5299 and then restart LyX.
5300 On Windows, pipes are deleted by the OS on program termination or crash,
5302 \begin_inset Quotes eld
5306 \begin_inset Quotes erd
5309 pipes should not be possible.
5312 \begin_layout Standard
5313 To have several LyX processes with servers at the same time, you have to
5314 use different configurations, perhaps by using separate user directories,
5316 \begin_inset Flex Code
5319 \begin_layout Plain Layout
5325 file, for each process.
5328 \begin_layout Standard
5329 If you are developing a client program, you might find it useful to enable
5330 debugging information from the LyX server.
5331 Do this by starting LyX as
5332 \begin_inset Flex Code
5335 \begin_layout Plain Layout
5344 \begin_layout Standard
5345 You can find a complete example client written in C in the source distribution
5347 \begin_inset Flex Code
5350 \begin_layout Plain Layout
5351 development/lyxserver/server_monitor.c
5359 \begin_layout Standard
5360 Another useful tool is command-line based client you will find in
5361 \begin_inset Flex Code
5364 \begin_layout Plain Layout
5365 src/client/lyxclient
5373 \begin_layout Section
5374 Normal communication
5377 \begin_layout Standard
5378 To issue a LyX call, the client writes a line of ASCII text into the input
5380 This line has the following format:
5397 \begin_layout Description
5398 clientname is a name that the client can choose arbitrarily.
5399 Its only use is that LyX will echo it if it sends an answer—so a client
5400 can dispatch results from different requesters.
5403 \begin_layout Description
5404 function is the function you want LyX to perform.
5405 It is the same as the commands you'd use in the minibuffer.
5408 \begin_layout Description
5409 argument is an optional argument which is meaningful only to some functions
5411 \begin_inset Quotes eld
5415 \begin_inset Quotes erd
5418 LFUN will insert the argument as text at the cursor position).
5421 \begin_layout Standard
5422 The answer from LyX will arrive in the output pipe and be of the form
5439 \begin_layout Standard
5448 are just echoed from the command request, while
5452 is more or less useful information filled according to how the command
5453 execution worked out.
5454 Some commands, such as
5455 \begin_inset Quotes eld
5459 \begin_inset Quotes erd
5462 , will return information about the internal state of LyX, while other will
5463 return an empty data-response.
5464 This means that the command execution went fine.
5467 \begin_layout Standard
5468 In case of errors, the response from LyX will have this form
5485 \begin_layout Standard
5490 should contain an explanation of why the command failed.
5493 \begin_layout Standard
5497 \begin_layout LyX-Code
5498 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5499 \begin_inset Newline newline
5502 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5503 \begin_inset Newline newline
5506 read a <~/.lyxpipe.out
5507 \begin_inset Newline newline
5513 \begin_layout Section
5517 \begin_layout Standard
5518 LyX can notify clients of events going on asynchronously.
5519 Currently it will only do this if the user binds a key sequence with the
5521 \begin_inset Quotes eld
5525 \begin_inset Quotes erd
5529 The format of the string LyX sends is as follows:
5533 \begin_inset Flex Code
5536 \begin_layout Plain Layout
5547 \begin_layout Standard
5552 is the printed representation of the key sequence that was actually typed
5556 \begin_layout Standard
5557 This mechanism can be used to extend LyX's command set and implement macros.
5558 Bind some key sequence to
5559 \begin_inset Quotes eld
5563 \begin_inset Quotes erd
5567 Then start a client that listens on the output pipe, dispatches the command
5568 according to the sequence, and starts a function that may use LyX calls
5569 and LyX requests to issue a command or a series of commands to LyX.
5572 \begin_layout Section
5573 The simple LyX Server Protocol
5576 \begin_layout Standard
5577 LyX implements a simple protocol that can be used for session management.
5578 All messages are of the form
5591 \begin_layout Standard
5597 \begin_inset Quotes eld
5601 \begin_inset Quotes erd
5605 \begin_inset Quotes eld
5609 \begin_inset Quotes erd
5614 \begin_inset Quotes eld
5618 \begin_inset Quotes erd
5621 is received from a client, LyX will report back to inform the client that
5622 it's listening to it's messages, while
5623 \begin_inset Quotes eld
5627 \begin_inset Quotes erd
5630 sent from LyX will inform clients that LyX is closing.
5633 \begin_layout Section
5634 Reverse DVI/PDF search
5637 \begin_layout Standard
5638 Some DVI/PDF viewers
5642 \begin_layout Plain Layout
5643 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5644 Skim on Mac OSX and SumatraPDF on Windows.
5653 facility (also called
5658 This means that you can tell LyX to put the cursor to a specific line in
5659 the document by clicking at the respective position in the DVI/PDF output.
5660 To achieve this, the viewer must be able to communicate with LyX.
5661 This is done via the LyX server either by using the named pipe (
5665 ), or the UNIX domain socket (
5669 ) that LyX creates in its temporary directory (this is the way the
5670 \begin_inset Flex Code
5673 \begin_layout Plain Layout
5679 program communicates with LyX).
5680 In some cases, you need a helper script that mediates between the viewer
5681 and LyX, in others, the viewer can communicate with LyX directly.
5682 This depends on the selected viewer and on your operating system.
5683 The same applies to the way viewers need to be configured and the way the
5684 reverse search is actually performed.
5685 In what follows, we will thus describe how to setup reverse search for
5687 Before we turn to this, though, we will explain what needs to be done generally
5688 to enable reverse search in the DVI/PDF output.
5691 \begin_layout Subsection
5693 \begin_inset CommandInset label
5695 name "sub:rev-search"
5702 \begin_layout Standard
5703 In most cases LyX will do the work for you by enabling
5704 \begin_inset Flex MenuItem
5707 \begin_layout Plain Layout
5708 Document\SpecialChar \menuseparator
5709 Output\SpecialChar \menuseparator
5710 Synchronize with Output
5716 In such a case LyX will automatically insert the necessary SyncTeX macro
5717 (for PDF) or load the srcltx package (for DVI) respectively.
5718 This option can be easily reached also on
5719 \begin_inset Flex Code
5722 \begin_layout Plain Layout
5731 \begin_layout Standard
5732 If you need a different setting, you can select or input a custom macro
5733 from the drop down box just below
5734 \begin_inset Flex MenuItem
5737 \begin_layout Plain Layout
5738 Document\SpecialChar \menuseparator
5739 Settings\SpecialChar \menuseparator
5740 Output\SpecialChar \menuseparator
5741 Synchronize with Output
5749 \begin_layout Standard
5750 Please note that including the
5751 \begin_inset Flex Code
5754 \begin_layout Plain Layout
5761 \begin_inset Flex Code
5764 \begin_layout Plain Layout
5770 sometimes has an undesired impact on the typesetting.
5771 Thus, you should switch output synchronization off for the final typesetting
5773 \begin_inset Flex Code
5776 \begin_layout Plain Layout
5783 \begin_inset Flex Code
5786 \begin_layout Plain Layout
5795 \begin_layout Standard
5796 In case you need some more special settings that are not covered by the
5797 automatic settings, read the next section about how to set up output synchroniz
5799 If the automatic setup suits your needs, you can readily jump to section
5800 \begin_inset space ~
5804 \begin_inset CommandInset ref
5806 reference "sub:configuring-viewers"
5810 , where the necessary configuration steps in your viewer -- needed both
5811 with the automatic and the manual setup -- are described.
5814 \begin_layout Subsection
5818 \begin_layout Standard
5819 LaTeX provides several different methods for reverse search.
5820 Some are built-in in the
5821 \begin_inset Flex Code
5824 \begin_layout Plain Layout
5830 program, some are provided by external packages.
5831 Your choice depends on whether your LaTeX distribution already provides
5832 a given method (the built-in methods are rather new) and whether your viewer
5834 The available methods are described in the following.
5837 \begin_layout Subsubsection*
5838 Built-in DVI-search via src-specials (DVI only)
5841 \begin_layout Standard
5842 This method provides the DVI file with the necessary information for reverse
5844 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5845 distribution should include it), and it works reliably.
5846 To enable it, change the
5847 \begin_inset Flex MenuItem
5850 \begin_layout Plain Layout
5855 \begin_layout Plain Layout
5868 \begin_inset Flex MenuItem
5871 \begin_layout Plain Layout
5876 \begin_layout Plain Layout
5883 eX (plain)->DraftDVI
5889 \begin_inset Flex MenuItem
5892 \begin_layout Plain Layout
5893 Preferences\SpecialChar \menuseparator
5894 File Handling\SpecialChar \menuseparator
5901 \begin_inset Flex Code
5904 \begin_layout Plain Layout
5905 latex -src-specials $$i
5911 If this doesn't work, check if your TeX engine needs different options
5912 (the syntax might differ in some distributions).
5915 \begin_layout Subsubsection*
5916 External Packages (PDFSync and scrltx)
5919 \begin_layout Standard
5928 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5930 In order to enable it, load the packages in the LyX preamble:
5933 \begin_layout Itemize
5934 \begin_inset Flex Code
5937 \begin_layout Plain Layout
5945 for reverse PDF search,
5948 \begin_layout Itemize
5949 \begin_inset Flex Code
5952 \begin_layout Plain Layout
5955 usepackage[active]{srcltx}
5960 for reverse DVI search.
5963 \begin_layout Standard
5964 If you want to be able to perform both DVI and PDF reverse searches, you
5965 can also insert in the preamble the following lines
5968 \begin_layout LyX-Code
5972 \begin_inset Newline newline
5978 \begin_inset Newline newline
5984 \begin_inset Newline newline
5990 \begin_inset Newline newline
5995 usepackage[active]{srcltx}
5996 \begin_inset Newline newline
6004 \begin_layout Standard
6005 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6006 right package will be used.
6009 \begin_layout Standard
6010 Note that PDFSync might affect the output layout of your document.
6011 It is therefore advised to disable PDFsync for final documents.
6014 \begin_layout Subsubsection*
6015 Built-in reverse search via SyncTeX (DVI and PDF)
6018 \begin_layout Standard
6020 \begin_inset Flex Code
6023 \begin_layout Plain Layout
6029 have built-in support for both PDF and DVI reverse search.
6034 facility is basically the result of the integration of the PDFSync package
6035 to the pdftex program and its merge with the
6040 You need at least TeXLive 2008 or a recent MikTeX distribution in order
6042 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6043 already provide SyncTeX support.
6046 \begin_layout Standard
6047 To enable SyncTeX for DVI output, change the
6048 \begin_inset Flex MenuItem
6051 \begin_layout Plain Layout
6056 \begin_layout Plain Layout
6069 \begin_inset Flex MenuItem
6072 \begin_layout Plain Layout
6077 \begin_layout Plain Layout
6084 eX (plain) -> DraftDVI
6090 \begin_inset Flex MenuItem
6093 \begin_layout Plain Layout
6094 Preferences\SpecialChar \menuseparator
6095 File Handling\SpecialChar \menuseparator
6102 \begin_inset Flex Code
6105 \begin_layout Plain Layout
6106 latex -synctex=1 $$i
6111 , and for PDF output, change the
6112 \begin_inset Flex MenuItem
6115 \begin_layout Plain Layout
6120 \begin_layout Plain Layout
6127 eX (pdflatex) -> PDF (pdflatex)
6133 \begin_inset Flex Code
6136 \begin_layout Plain Layout
6137 pdflatex -synctex=1 $$i
6143 Check the documentation of your viewer whether the viewer needs to be configure
6144 d for the use with SyncTeX.
6148 \begin_layout Plain Layout
6150 \begin_inset Flex Code
6153 \begin_layout Plain Layout
6159 option enables gzip compression.
6160 If your viewer does not support it, you should instead use
6161 \begin_inset Flex Code
6164 \begin_layout Plain Layout
6178 \begin_layout Subsection
6179 Configuring and using specific viewers
6180 \begin_inset CommandInset label
6182 name "sub:configuring-viewers"
6189 \begin_layout Subsubsection*
6190 Xdvi (all platforms)
6193 \begin_layout Standard
6195 \begin_inset Flex Code
6198 \begin_layout Plain Layout
6204 , you don't need to do anything else for performing a reverse DVI search,
6205 as LyX already provides the necessary hooks for automatically using the
6207 \begin_inset Flex Code
6210 \begin_layout Plain Layout
6217 Just setup your document as described above (reverse search is triggered
6218 by Ctrl-click or Alt-click on Mac OSX, respectively).
6221 \begin_layout Standard
6222 However, if for whatever reason you want to use the named pipe instead of
6223 the socket for communicating with LyX, simply change the DVI viewer in
6225 \begin_inset Flex MenuItem
6228 \begin_layout Plain Layout
6229 Preferences\SpecialChar \menuseparator
6230 File Handling\SpecialChar \menuseparator
6240 \begin_layout Plain Layout
6241 On Mac OSX you have to use
6242 \begin_inset Flex Code
6245 \begin_layout Plain Layout
6246 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6257 \begin_inset Flex Code
6260 \begin_layout Plain Layout
6261 xdvi -editor 'lyxeditor.sh %f %l'
6267 \begin_inset Flex Code
6270 \begin_layout Plain Layout
6276 is a suitable script.
6277 For example, a minimal shell script is the following one:
6280 \begin_layout LyX-Code
6282 \begin_inset Newline newline
6285 LYXPIPE="/path/to/lyxpipe"
6286 \begin_inset Newline newline
6289 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6290 \begin_inset Newline newline
6293 echo "$COMMAND" > "${LYXPIPE}".in || exit
6294 \begin_inset Newline newline
6297 read < "${LYXPIPE}".out || exit
6300 \begin_layout Standard
6302 \begin_inset Flex Code
6305 \begin_layout Plain Layout
6315 \begin_layout Plain Layout
6322 XServer pipe path specified in
6323 \begin_inset Flex MenuItem
6326 \begin_layout Plain Layout
6327 Preferences\SpecialChar \menuseparator
6337 \begin_layout Plain Layout
6339 \begin_inset Flex Code
6342 \begin_layout Plain Layout
6348 folder of a source distribution you can find a
6349 \begin_inset Flex Code
6352 \begin_layout Plain Layout
6358 script which is able to locate the
6362 based on your preferences.
6370 \begin_layout Subsubsection*
6374 \begin_layout Standard
6376 \begin_inset Flex Code
6379 \begin_layout Plain Layout
6380 /Applications/MacDviX_Folder/calleditor.script
6385 , add the following lines:
6388 \begin_layout LyX-Code
6393 \begin_layout Plain Layout
6400 X.app/Contents/MacOS/lyxeditor "$2" $1
6401 \begin_inset Newline newline
6407 \begin_layout Standard
6408 Modify the lines accordingly if you install LyX somewhere else than in the
6409 Applications folder.
6412 \begin_layout Standard
6413 Reverse search is triggered by Alt-click (OPTION-click).
6416 \begin_layout Subsubsection*
6420 \begin_layout Standard
6422 \begin_inset Flex Code
6425 \begin_layout Plain Layout
6426 open -a Skim.app $$i
6431 to the viewer setting in
6432 \begin_inset Flex MenuItem
6435 \begin_layout Plain Layout
6436 Preferences\SpecialChar \menuseparator
6437 File Handling\SpecialChar \menuseparator
6438 File formats\SpecialChar \menuseparator
6445 \begin_inset Flex MenuItem
6448 \begin_layout Plain Layout
6449 Skim\SpecialChar \menuseparator
6450 Preferences\SpecialChar \menuseparator
6460 \begin_layout Plain Layout
6470 \begin_layout Standard
6471 Reverse search is triggered by COMMAND-SHIFT-click
6474 \begin_layout Subsubsection*
6478 \begin_layout Standard
6480 \begin_inset Flex MenuItem
6483 \begin_layout Plain Layout
6484 Settings\SpecialChar \menuseparator
6485 Configure Okular\SpecialChar \ldots{}
6486 \SpecialChar \menuseparator
6493 \begin_inset Quotes eld
6497 \begin_inset Quotes erd
6501 \begin_inset Flex Code
6504 \begin_layout Plain Layout
6513 \begin_layout Standard
6514 Reverse search is triggered by SHIFT-click.
6517 \begin_layout Subsubsection*
6521 \begin_layout Standard
6522 Launch yap, choose its
6523 \begin_inset Flex MenuItem
6526 \begin_layout Plain Layout
6527 View\SpecialChar \menuseparator
6534 \begin_inset Quotes eld
6538 \begin_inset Quotes erd
6543 \begin_inset Quotes eld
6546 New\SpecialChar \ldots{}
6548 \begin_inset Quotes erd
6551 button and, in the window that opens, enter
6552 \begin_inset Quotes eld
6556 \begin_inset Quotes erd
6559 (or any other name you like) in the
6560 \begin_inset Quotes eld
6564 \begin_inset Quotes erd
6568 Now click on the button labeled
6569 \begin_inset Quotes eld
6572 \SpecialChar \ldots{}
6574 \begin_inset Quotes erd
6577 to open a file dialog and navigate to the directory containing the batch
6579 \begin_inset Flex Code
6582 \begin_layout Plain Layout
6590 \begin_inset Flex Code
6593 \begin_layout Plain Layout
6599 and then specify the program arguments as
6600 \begin_inset Flex Code
6603 \begin_layout Plain Layout
6611 \begin_inset Flex Code
6614 \begin_layout Plain Layout
6620 wrapper is used for communicating with LyX through the
6627 \begin_layout LyX-Code
6629 \begin_inset Newline newline
6632 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6641 \begin_inset Newline newline
6655 \begin_layout Standard
6656 Make sure that the LyXServer pipe path you specified in LyX is
6657 \begin_inset Flex Code
6660 \begin_layout Plain Layout
6674 , otherwise change the
6675 \begin_inset Flex Code
6678 \begin_layout Plain Layout
6684 wrapper accordingly.
6687 \begin_layout Standard
6688 In yap, reverse search is triggered by double-click.
6691 \begin_layout Subsubsection*
6692 SumatraPDF (Windows)
6695 \begin_layout Standard
6696 In order to use SumatraPDF for inverse search, enter
6697 \begin_inset Flex Code
6700 \begin_layout Plain Layout
6701 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6706 in the viewer setting in
6707 \begin_inset Flex MenuItem
6710 \begin_layout Plain Layout
6711 Preferences\SpecialChar \menuseparator
6712 File Handling\SpecialChar \menuseparator
6713 File formats\SpecialChar \menuseparator
6720 \begin_inset Flex Code
6723 \begin_layout Plain Layout
6729 is the previous wrapper.
6730 If SumatraPDF.exe is not in your command PATH, use its full file name.
6733 \begin_layout Standard
6734 Reverse search is triggered by double-click.
6737 \begin_layout Subsubsection*
6741 \begin_layout Standard
6742 First of all, make sure that yap is your default DVI viewer in the Windows
6743 environment, then launch it, choose its
6744 \begin_inset Flex MenuItem
6747 \begin_layout Plain Layout
6748 View\SpecialChar \menuseparator
6755 \begin_inset Quotes eld
6759 \begin_inset Quotes erd
6764 \begin_inset Quotes eld
6767 New\SpecialChar \ldots{}
6769 \begin_inset Quotes erd
6772 button and, in the window that opens, enter
6773 \begin_inset Quotes eld
6777 \begin_inset Quotes erd
6780 (or any other name you like) in the
6781 \begin_inset Quotes eld
6785 \begin_inset Quotes erd
6789 Now click on the button labeled
6790 \begin_inset Quotes eld
6793 \SpecialChar \ldots{}
6795 \begin_inset Quotes erd
6798 to open a file dialog and navigate to the directory containing the
6799 \begin_inset Flex Code
6802 \begin_layout Plain Layout
6808 program (which is installed by default on Cygwin along with the LyX executable).
6810 \begin_inset Flex Code
6813 \begin_layout Plain Layout
6819 and then specify the program arguments as
6820 \begin_inset Flex Code
6823 \begin_layout Plain Layout
6830 In this way, you will be using the
6834 for communicating with LyX.
6835 If, for whatever reason, you want to use the
6840 \begin_inset Flex Code
6843 \begin_layout Plain Layout
6849 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6852 \begin_layout Standard
6853 In yap, reverse search is triggered by double-click.
6856 \begin_layout Subsubsection*
6860 \begin_layout Standard
6861 In order to use SumatraPDF for inverse search, enter
6862 \begin_inset Flex Code
6865 \begin_layout Plain Layout
6871 in the viewer setting in
6872 \begin_inset Flex MenuItem
6875 \begin_layout Plain Layout
6876 Preferences\SpecialChar \menuseparator
6877 File Handling\SpecialChar \menuseparator
6878 File formats\SpecialChar \menuseparator
6885 \begin_inset Flex Code
6888 \begin_layout Plain Layout
6894 is the following script (to be placed in your command PATH,
6895 \begin_inset Flex Code
6898 \begin_layout Plain Layout
6904 being the best choice):
6907 \begin_layout LyX-Code
6909 \begin_inset Newline newline
6913 \begin_inset Newline newline
6916 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6919 \begin_layout Standard
6920 This wrapper script is needed because SumatraPDF is a native Windows application
6921 and does not understand the posix paths used by the Cygwin version of LyX.
6922 If SumatraPDF.exe is not in your command PATH, use its full posix path in
6925 \begin_inset Flex Code
6928 \begin_layout Plain Layout
6934 enables communication via the
6940 \begin_inset Flex Code
6943 \begin_layout Plain Layout
6949 option if you want to use the
6953 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6956 \begin_layout Standard
6957 Reverse search is triggered by double-click.
6960 \begin_layout Section
6964 \begin_layout Standard
6965 Forward search is, as the name implies, in a sense the
6966 \begin_inset Quotes eld
6970 \begin_inset Quotes erd
6974 It allows you to let the viewer jump to a given position from within LyX.
6975 If forward search is set up (as described in what follows), you can put
6976 the cursor anywhere in your LyX document, and hit
6977 \begin_inset Flex MenuItem
6980 \begin_layout Plain Layout
6981 Navigate\SpecialChar \menuseparator
6988 \begin_inset Flex MenuItem
6991 \begin_layout Plain Layout
6997 in the context menu via right mouse click), and then the viewer will jump
6998 to that position as well.
6999 This implies, of course, that your viewer supports this function.
7002 \begin_layout Standard
7003 To make forward search possible, you first need to provide the generated
7004 output PDF/DVI file with additional information about the TeX sources.
7005 This can be done via the methods described in the section
7006 \begin_inset CommandInset ref
7008 reference "sub:rev-search"
7015 \begin_layout Standard
7016 Additionally, you need to configure LyX for using your viewers in
7017 \begin_inset Flex MenuItem
7020 \begin_layout Plain Layout
7021 Tools\SpecialChar \menuseparator
7022 Preferences\SpecialChar \menuseparator
7023 Output\SpecialChar \menuseparator
7030 We provide a range of tested configurations for some viewers, which you
7031 can select from the drop down list.
7032 If none of these configurations suits you, you have to find out and enter
7033 a suitable configuration yourself.
7034 The definition syntax uses the following placeholders:
7037 \begin_layout Itemize
7039 \begin_inset Flex Code
7042 \begin_layout Plain Layout
7051 \begin_layout Itemize
7053 \begin_inset Flex Code
7056 \begin_layout Plain Layout
7062 : name of the (temporary) exported .tex file
7065 \begin_layout Itemize
7067 \begin_inset Flex Code
7070 \begin_layout Plain Layout
7076 : name of the exported output file (either dvi or pdf, depending on which
7077 one exists in the temporary directory)
7080 \begin_layout Standard
7081 Note that only some of the viewers provide full forward search functionality,
7082 among them yap, xdvi, okular and Sumatra PDF
7086 \begin_layout Plain Layout
7087 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
7094 While many of the widespread PDF viewers (most notably Adobe Reader) do
7095 not support forward search at all, some other viewers -- e.
7096 \begin_inset space \thinspace{}
7100 evince and xpdf -- allow at least to reload the document and jump to a
7101 specific page of the file, so you can at least navigate
7102 \begin_inset Quotes eld
7106 \begin_inset Quotes erd
7110 These latter functionality is provided by an external call of synctex (see
7111 the predefined example configurations).
7115 \begin_layout Standard
7116 Forward search works both with DVI and PDF output.
7117 LyX simply checks which preview format you have used before (i.
7118 \begin_inset space \thinspace{}
7121 e., which format is already there in the temporary directory) and chooses
7122 the appropriate configuration for the respective format.
7125 \begin_layout Chapter
7126 Special Document Classes
7129 \begin_layout Section
7133 \begin_layout Standard
7139 \begin_layout Subsection
7143 \begin_layout Standard
7144 This section describes how LyX can be used to write articles for submission
7145 to the scientific journal
7147 Astronomy and Astrophysics
7149 (www.edpsciences.fr/aa/
7150 \begin_inset Flex URL
7153 \begin_layout Plain Layout
7155 http://www.edpsciences.fr/aa/
7160 ) using Version 5.01 of the document class
7165 This package can be downloaded from the ftp site
7168 \begin_layout Standard
7169 \begin_inset VSpace medskip
7175 \begin_layout Standard
7177 \begin_inset Flex URL
7180 \begin_layout Plain Layout
7182 ftp://ftp.edpsciences.org/pub/aa/readme.html
7190 \begin_layout Standard
7191 \begin_inset VSpace medskip
7197 \begin_layout Standard
7198 A manual comes together with that package, and this text is not meant to
7199 replace the original manual but is merely a short guide in how to realize
7200 the correct form of your paper.
7204 \begin_layout Standard
7205 Please note that the publisher of the journal was changed from Springer
7206 to EDP Sciences starting January 1, 2001.
7207 That change involved also some slight changes to the style files, namely
7208 the removal of the thesaurus command.
7209 The LyX class aa supports the newest version of these style files, V 5.01.
7210 If you have an older version installed, please upgrade.
7211 For compatibility, the old (version 4) layout has been kept as
7216 Please refer to the comments in
7218 LyXDir/layouts/aapaper.layout
7223 \begin_layout Subsection
7227 \begin_layout Standard
7228 It is recommended you start from the example template distributed with LyX.
7229 If you are not using a template, note the following settings:
7232 \begin_layout Itemize
7239 Document\SpecialChar \menuseparator
7242 dialog (OK, that one was obvious).
7245 \begin_layout Itemize
7246 Don't change the option
7249 \begin_inset space ~
7259 The whole layout is done by the macros, you shouldn't change anything.
7262 \begin_layout Subsection
7266 \begin_layout Standard
7267 First thing to enter is the header information.
7268 It consists of seven entries, of which some are optional.
7272 \begin_layout Itemize
7280 \begin_layout Itemize
7288 \begin_layout Itemize
7296 \begin_layout Itemize
7304 \begin_layout Itemize
7309 : [optional] if more than one author: whom to contact for offprint requests.
7312 \begin_layout Itemize
7317 : [optional] mail address for contacts.
7320 \begin_layout Itemize
7328 Received: <date>; Accepted <date>
7331 \begin_layout Standard
7332 There is no need to issue the
7338 command, this is done automatically by LyX when the header is finished.
7339 Although the order of the single header entries doesn't matter it is advised
7340 to keep the above sequence, just to get the best optics and meets the layout
7341 of the real document.
7344 \begin_layout Standard
7345 If you want to place footnotes in the header block, e.
7346 \begin_inset space \thinspace{}
7350 \begin_inset space \space{}
7353 to state your present address, just use the standard footnote via the menu
7356 Insert\SpecialChar \menuseparator
7360 LyX will automagically use the term
7369 \begin_layout Standard
7370 In addition to these topics, the macros use three additional LaTeX commands
7371 that have no counterpart in LyX:
7374 \begin_layout Itemize
7381 to separate different names for more than one author and institute, respectivel
7385 \begin_layout Itemize
7392 to mark corresponding author/institute pairs.
7393 The institutes are numbered sequentially as they appear in the
7397 field, so you have to put a marker to each author.
7400 \begin_layout Itemize
7407 to supply an email address for fast contact.
7410 \begin_layout Standard
7411 In all cases, the appropriate command has to be entered in LyX and marked
7417 \begin_layout Subsection
7421 \begin_layout Standard
7422 The abstract should immediately follow the header block.
7423 With version 5 the abstract environment was changed to a command, and there
7424 is now a resctriction to only one paragraph.
7425 In addition, it should contain an entry with the keywords.
7426 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7433 by hand and mark it as LaTeX code.
7434 Refer to the example paper.
7437 \begin_layout Subsection
7438 Supported environments
7441 \begin_layout Standard
7442 The A&A paper layout supports the following environments for structuring
7446 \begin_layout Itemize
7452 \begin_layout Itemize
7458 \begin_layout Itemize
7464 \begin_layout Itemize
7470 \begin_layout Itemize
7476 \begin_layout Itemize
7482 \begin_layout Itemize
7488 \begin_layout Itemize
7494 \begin_layout Itemize
7500 \begin_layout Itemize
7506 \begin_layout Itemize
7512 \begin_layout Itemize
7518 \begin_layout Subsection
7519 Commands not supported by LyX
7522 \begin_layout Standard
7523 Some commands are not yet supported by the
7528 Some have already been mentioned.
7529 For the sake of completeness, they are listed all together here:
7532 \begin_layout Itemize
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 Standard
7597 If you want to use any of these commands, you have to enter them yourself.
7600 Do not forget to mark them as LaTeX code!
7603 \begin_layout Subsection
7604 Figure and Table Floats
7607 \begin_layout Standard
7608 LyX provides support for the necessary float environments
7610 figure, figure*, table
7616 , therefore we won't tell much about it here.
7620 \begin_inset space ~
7626 Just remember that tables should be left-aligned.
7627 For that, select the table and change the alignment in
7629 Edit\SpecialChar \menuseparator
7631 \begin_inset space ~
7637 \begin_layout Standard
7638 There is only one special thing: the figures with caption besides the figure.
7639 To create such a figure, you have to do the following:
7642 \begin_layout Enumerate
7643 Create a wide figure float:
7645 Insert\SpecialChar \menuseparator
7646 Float\SpecialChar \menuseparator
7649 , then right click in the figure and select
7655 \begin_inset space ~
7663 \begin_layout Enumerate
7664 Enter your caption text.
7667 \begin_layout Enumerate
7672 to move the cursor above the caption.
7675 \begin_layout Enumerate
7679 \begin_layout Enumerate
7680 Position the cursor behind the figure and insert a horizontal fill:
7682 Insert\SpecialChar \menuseparator
7684 \begin_inset space ~
7687 Character\SpecialChar \menuseparator
7689 \begin_inset space ~
7697 \begin_layout Enumerate
7698 Switch to LaTeX mode:
7701 \begin_inset space ~
7709 \begin_layout Enumerate
7719 Do not close the brace!
7722 \begin_layout Enumerate
7723 Position the cursor behind the caption text, switch to LaTeX mode and insert
7727 \begin_inset space ~
7739 \begin_layout Standard
7740 Also, refer to the figures in the example paper.
7743 \begin_layout Subsection
7747 \begin_layout Standard
7748 For submission, the paper has to be formated in a special double-spacing
7750 For this purpose, you have to give the option
7754 to the documentclass.
7755 This must be done using the extra class options field in the
7757 Document\SpecialChar \menuseparator
7761 Just enter the string
7768 \begin_layout Subsection
7772 \begin_layout Standard
7777 directory contains an example paper written with LyX.
7778 It is the example paper from the original macro package, translated to
7780 Use it for inspiration, and compare the original LaTeX code with LyX way
7784 \begin_layout Section
7788 \begin_layout Standard
7794 \begin_layout Subsection
7798 \begin_layout Standard
7799 AASTeX is a set of macros produced by the American Astronomical Society
7800 to facilitate electronic manuscript submission to the three journals they
7801 publish: the Astrophysical Journal (including the Letters and Supplement),
7802 the Astronomical Journal, and the Publications of the Astronomical Society
7804 LyX has proven to be an excellent tool for generating these documents,
7805 especially given its equation, citation, and figure handling capabilities.
7806 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7807 is the version described here, or higher.
7808 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7809 incompatible with LyX.
7810 The AASTeX package may be downloaded from the AASTeX Web site
7813 \begin_layout Standard
7814 \begin_inset VSpace medskip
7820 \begin_layout Standard
7822 \begin_inset Flex URL
7825 \begin_layout Plain Layout
7827 http://www.journals.uchicago.edu/AAS/AASTeX
7835 \begin_layout Standard
7836 \begin_inset VSpace medskip
7842 \begin_layout Standard
7843 A complete user guide is contained in that package and you should familiarize
7844 yourself with it thoroughly before embarking on writing a paper in LyX.
7845 LyX will not reduce the need to figure out all the AASTeX commands, it
7846 will only reduce the drudgery of typing everything in.
7847 It is your responsibility to ensure that the final exported LaTeX document
7848 conforms completely to the requirements of the journal to which you are
7849 submitting your paper.
7852 \begin_layout Subsection
7853 Starting a New Paper
7856 \begin_layout Standard
7857 I strongly suggest that you start with the AASTeX template file.
7860 File\SpecialChar \menuseparator
7867 , enter the new file name, then choose the
7872 This will show the most common fields found in a manuscript.
7873 Simply overwrite the existing text (including the brackets,
7877 ) with the correct information.
7878 Many of the AASTeX commands and environments can be implemented directly
7879 in LyX, but some cannot: most noticeably
7891 , which should stick out like a sore thumb if you actually just opened the
7893 For commands such as these, the LaTeX code must be entered directly and
7895 Such commands are referred to as TeX code, or Evil Red Text.
7896 I tried to minimize the amount of TeX code needed in an AASTeX document,
7897 but there is still a bit more required than any of us would like.
7900 \begin_layout Subsection
7901 Finishing Your Paper
7904 \begin_layout Standard
7905 When the paper is finished to your satisfaction and previews/prints correctly,
7907 \begin_inset Quotes eld
7911 \begin_inset Quotes erd
7914 actions which need to be done before you submit it to the journals.
7918 \begin_layout Enumerate
7919 Export your paper as a LaTeX file (
7921 File\SpecialChar \menuseparator
7922 Export\SpecialChar \menuseparator
7929 \begin_layout Enumerate
7934 file with your favorite text editor
7938 \begin_layout Enumerate
7939 remove the comment lines before the
7948 \begin_layout Enumerate
7953 usepackage...{fontenc}
7955 line if it appears (usually just after
7970 \begin_layout Enumerate
7971 remove everything between (and including) the
7983 commands, except for any commands you specifically put into the LaTeX preamble
7984 (which should appear immediately after the
7985 \begin_inset Quotes eld
7988 User specified LaTeX commands
7989 \begin_inset Quotes erd
8000 \begin_layout Enumerate
8001 Run the resulting file through LaTeX to make sure it still processes correctly.
8004 \begin_layout Enumerate
8005 Reread the journal requirements to make sure your filenames and formats
8009 \begin_layout Enumerate
8013 \begin_layout Subsection
8014 Comments On Specific Commands
8017 \begin_layout Standard
8018 I will not describe the detailed usage of the individual AASTeX commands:
8019 the AASTeX User Guide (
8023 ) gives a good description of each.
8024 Thus it's probably easiest for me to go down the list as found in the guide
8025 and offer comments where necessary.
8026 So let's begin \SpecialChar \ldots{}
8030 \begin_layout Subsubsection
8031 Things that work as expected
8034 \begin_layout Standard
8035 Because they work as you might expect, I simply list them and the section
8136 begin{thebibliography}
8144 (2.13.2), all the cite commands and their variations (2.13.2), the generic
8145 graphicx figure commands (2.14.1),
8169 (2.15.4, amongst other places),
8196 \begin_layout Standard
8197 The following style options also work correctly:
8218 Simply put them in the
8224 Layout\SpecialChar \menuseparator
8230 \begin_layout Subsubsection
8231 Things that work, but require more comment
8234 \begin_layout Standard
8235 The following items work, but require a little more discussion:
8238 \begin_layout Itemize
8239 These items are reserved for use by the journal editors, but you can put
8240 them into the LaTeX preamble if you feel compelled to do so:
8273 \begin_layout Itemize
8274 These items may be placed in the LaTeX preamble, and are included as blanks
8275 in the template file:
8296 \begin_layout Itemize
8303 (2.3) – can only be used
8304 \begin_inset Quotes eld
8308 \begin_inset Quotes erd
8311 , not in the middle of a paragraph.
8312 Use TeX code if you need to embed it.
8315 \begin_layout Itemize
8322 (2.3) – will have extra {} after it.
8323 This should not cause an error.
8326 \begin_layout Itemize
8333 (2.6) – can only be used
8334 \begin_inset Quotes eld
8338 \begin_inset Quotes erd
8341 , not in the middle of a paragraph.
8342 Use TeX code if you need to embed it.
8345 \begin_layout Itemize
8352 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8356 \begin_layout Itemize
8370 \begin_layout Itemize
8377 (2.9) – will have extra {} after it.
8378 This should not cause an error.
8381 \begin_layout Itemize
8388 (2.11) – will have extra {} after it.
8389 This should not cause an error.
8392 \begin_layout Itemize
8399 (2.14.2) – you can insert an optional filename argument by placing the cursor
8400 at the beginning of the text and selecting
8402 Insert\SpecialChar \menuseparator
8407 \begin_inset Quotes eld
8411 \begin_inset Quotes erd
8414 inserts an optional argument of the type needed by
8421 Hopefully it will be renamed someday.
8424 \begin_layout Itemize
8437 for the catalog ID optional parameter
8440 \begin_layout Itemize
8453 for the catalog ID optional parameter
8456 \begin_layout Subsubsection
8457 Things not implemented, use TeX code
8460 \begin_layout Standard
8483 setcounter{equation}
8485 (2.12), Journal name abbreviations (2.13.4),
8521 (2.15.4, insert it as the first element in the lefthand cell after where
8523 Don't use any of LyX's rules in the table),
8535 (2.15.5), much of Misc (2.17, except
8586 \begin_layout Subsubsection
8587 Things that cannot be implemented
8590 \begin_layout Standard
8591 \SpecialChar \ldots{}
8592 at least in any meaningful sort of way, so I suggest ignoring them.
8593 They are the references environment (2.13.3), and the deluxetable environment
8595 If you really, really need to use deluxetable, I suggest editing it in
8596 a separate file with a text editor, then using
8598 Insert\SpecialChar \menuseparator
8600 \begin_inset space ~
8605 to include it in your LyX document.
8610 file to see an example of this.
8613 \begin_layout Subsection
8614 FAQs, Tips, Tricks, and Other Ruminations
8617 \begin_layout Subsubsection
8618 Getting LyX and AASTeX to cooperate
8621 \begin_layout Standard
8622 It can be a bit tricky to get LyX to recognize a new layout and document
8624 When all else fails, do this:
8627 \begin_layout Enumerate
8628 Make certain that LaTeX can find AASTeX.
8629 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8630 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8637 \begin_layout Enumerate
8649 \begin_layout Enumerate
8652 Tools\SpecialChar \menuseparator
8655 in LyX, then restart LyX.
8658 \begin_layout Enumerate
8659 Open a regular new file, not from a template.
8660 Does AASTeX appear in the class list in
8662 Document\SpecialChar \menuseparator
8668 \begin_layout Standard
8669 If you get a warning from an existing AASTeX document about not being able
8670 to find the AASTeX layout or a message about
8671 \begin_inset Quotes eld
8674 You should not mix title layouts with normal ones
8675 \begin_inset Quotes erd
8678 , things haven't been installed correctly.
8681 \begin_layout Subsubsection
8682 LaTeX error processing a table
8685 \begin_layout Standard
8686 LyX, by default, attempts to center the table caption/title.
8687 This seems to produce a bad interaction in AASTeX so you should click somewhere
8688 in the caption/title, then select
8690 Edit\SpecialChar \menuseparator
8692 \begin_inset space ~
8706 This took care of it for me.
8709 \begin_layout Subsubsection
8713 \begin_layout Standard
8714 A couple of things: 1) I have noticed some funny spacing in the reference
8715 entries in the text.
8716 When you enter the bibliography item data, make sure their is
8720 space between the last author and the parenthesis setting off the year;
8724 \begin_inset space \thinspace{}
8728 \begin_inset space \space{}
8742 2) Entering the references at all is not obvious.
8743 The easiest thing is to start typing your first reference at the end of
8744 the document, then mark it as type
8749 That will put a small gray box in front of what you just typed.
8750 Click on the box to fill in the rest of the information.
8751 For new references, go to the end of an existing reference and press return.
8752 That will create a new line with its own box, etc.
8755 \begin_layout Subsubsection
8759 \begin_layout Standard
8760 Even though AASTeX provides its own figure commands (
8766 , for example), I much prefer LaTeX's standard figure commands (with the
8775 \begin_inset space ~
8778 commands as TeX code into a Figure Float box if you desire, but I never
8779 have much luck getting the layout right.
8780 With the standard graphics, LyX will insert a
8784 usepackage{graphicx}
8786 command into the LaTeX preamble and handle the figures in the standard
8787 LaTeX2e way, interspersing the figures in the text.
8788 I believe ApJ accepts figures exactly this way now; AJ might still use
8790 \begin_inset Quotes eld
8793 stack everything at the end
8794 \begin_inset Quotes erd
8800 \begin_layout Subsubsection
8801 Things I could have done, but didn't
8804 \begin_layout Standard
8806 \begin_inset Quotes eld
8810 \begin_inset Quotes erd
8813 things I could have implemented, but chose not to.
8814 For instance, I saw no point in double-spacing the text in the LyX window,
8815 even though it is double-spaced in the paper manuscript.
8816 Also, I chose not to make separate layouts for the preprint and preprint2
8818 Since I assume you will spend most of your time in the plain manuscript
8819 mode anyway, I decided not to chew up more disk space with this.
8823 \begin_layout Subsection
8827 \begin_layout Standard
8828 Your mileage may vary.
8829 I've now had papers published by both ApJ and AJ that have had 98% of the
8830 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8832 I have had no trouble with the submission process, and I'm sure the journals
8833 were never aware that there might be a difference.
8834 So, go forth and publish!
8837 \begin_layout Section
8841 \begin_layout Standard
8851 \begin_layout Standard
8852 \begin_inset VSpace bigskip
8858 \begin_layout Standard
8860 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8861 papers to be submitted to American Mathematical Society publications.
8862 The layouts are not tailored to a specific journal, but easily can be.
8863 You should refer to the AMS documentation for specific instructions for
8864 each journal (usually it will entail only changing a single line in the
8866 That documentation is available on the Web at
8867 \begin_inset Flex URL
8870 \begin_layout Plain Layout
8878 \begin_inset Flex URL
8881 \begin_layout Plain Layout
8883 ftp://ftp.ams.org/pub/tex/amslatex/
8889 These layouts are appropriate, and useful, for any mathematical writing.
8893 \begin_layout Standard
8894 There are two basic AMS LaTeX layouts:
8897 \begin_layout Itemize
8898 amsart: The standard AMS article format.
8901 \begin_layout Itemize
8902 amsbook: the standard AMS book (really, monograph) format.
8906 \begin_layout Standard
8907 The layouts themselves contain only the minimum necessary to use the AMS
8909 They do not, in particular, contain any of the `theorem' environments used
8910 for setting theorems, lemmas, and the like.
8911 These are contained, instead, in the
8912 \begin_inset Flex Code
8915 \begin_layout Plain Layout
8921 module, which is loaded by default when when you select one of the AMS
8923 (It can also be used with other classes and can be removed, if you would
8924 rather use something else.) Less commonly used environments are in the
8925 \begin_inset Flex Code
8928 \begin_layout Plain Layout
8929 Theorems (AMS-Extended)
8934 module, which must be loaded manually.
8937 \begin_layout Standard
8938 By default, theorems and the like are numbered consecutively throughout
8939 the document, but this may be modified by loading the module
8940 \begin_inset Flex Code
8943 \begin_layout Plain Layout
8944 Theorems (Order by Section)
8949 or, if you are using
8950 \begin_inset Flex Code
8953 \begin_layout Plain Layout
8960 \begin_inset Flex Code
8963 \begin_layout Plain Layout
8964 Theorems (Order by Chapter)
8970 These will number the results as
8971 \begin_inset Formula $n.m$
8974 , where the first number refers to the section (or chapter) and the second
8975 refers to the total number of results so far in that section (or chapter).
8976 Many environments are also available unnumbered.
8977 These are indicated by an asterisk at the end.
8978 If you happen to want
8982 unnumbered results, the module
8983 \begin_inset Flex Code
8986 \begin_layout Plain Layout
8992 provides that option.
8995 \begin_layout Standard
8996 Note that these modules do not
9000 to be used with the AMS classes.
9001 It is perfectly possible to use the
9002 \begin_inset Flex Code
9005 \begin_layout Plain Layout
9011 module, and the others mentioned, with other classes, such as
9012 \begin_inset Flex Code
9015 \begin_layout Plain Layout
9022 \begin_inset Flex Code
9025 \begin_layout Plain Layout
9032 \begin_inset Flex Code
9035 \begin_layout Plain Layout
9044 \begin_layout Subsection
9045 What these layouts provide
9048 \begin_layout Standard
9049 There is a long list of included environments provided by these layouts.
9050 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9051 variety of `theorem' environments.
9052 However, the AMS recommends the environments that are available in LyX.
9056 \begin_layout Standard
9057 The following environments—as well as the standard environments, such as
9059 \begin_inset Flex Noun
9062 \begin_layout Plain Layout
9069 \begin_inset Flex Noun
9072 \begin_layout Plain Layout
9079 \begin_inset Flex Noun
9082 \begin_layout Plain Layout
9089 \begin_inset Flex Noun
9092 \begin_layout Plain Layout
9099 \begin_inset Flex Noun
9102 \begin_layout Plain Layout
9109 \begin_inset Flex Code
9112 \begin_layout Plain Layout
9119 \begin_inset Flex Code
9122 \begin_layout Plain Layout
9131 \begin_layout Description
9132 Address This should be the author's permanent address.
9135 \begin_layout Description
9137 \begin_inset space ~
9140 Address This should be the author's temporary address at the time of submission,
9141 if different from the Address.
9144 \begin_layout Description
9145 Email Author's e-mail address
9148 \begin_layout Description
9149 URL Author's Web address, if desired.
9152 \begin_layout Description
9153 Keywords Key words or phrases used to identify specific topics discussed
9157 \begin_layout Description
9158 Subjectclass These refer to the AMS Subject Classifications, published and
9161 Mathematical Reviews
9164 These are also available online at the AMS cites listed above.
9167 \begin_layout Description
9171 \begin_layout Description
9175 \begin_layout Description
9179 \begin_layout Standard
9180 The following environments are provided by both the
9181 \begin_inset Flex Code
9184 \begin_layout Plain Layout
9191 \begin_inset Flex Code
9194 \begin_layout Plain Layout
9200 modules, in the latter case in both starred (unnumbered) and unstarred
9201 (numbered) versions.
9202 These same environments are provided only in the starred versions by the
9204 \begin_inset Flex Code
9207 \begin_layout Plain Layout
9216 \begin_layout Theorem
9217 This is typically used for the statements of major results.
9221 \begin_layout Corollary*
9222 This is used for statements which follow fairly directly from previous statement
9224 Again, these can be major results.
9229 These are smaller results needed to prove other statements.
9232 \begin_layout Proposition
9233 These are less major results which (hopefully) add to the general theory
9237 \begin_layout Conjecture
9238 These are statements provided without justification, which the author does
9239 not know how to prove, but which seem to be true (to the author, at least).
9242 \begin_layout Definition*
9243 Guess what this is for.
9244 The font is different for this environment than for the previous ones.
9248 \begin_layout Example*
9249 Used for examples illustrating proven results.
9252 \begin_layout Problem
9253 It's not really known what this is for.
9254 You should figure it out.
9257 \begin_layout Exercise*
9258 Write a description for this one.
9261 \begin_layout Remark
9262 This environment is also a type of theorem, usually a lesser sort of observation.
9265 \begin_layout Claim*
9266 Often used in the course of giving a proof of a larger result.
9270 Generally, these are used to break up long arguments, using specific instances
9276 The numbering scheme for cases is on its own, not together with other numbered
9282 At the end of this environment, a QED symbol (usually a square, but it can
9283 vary with different styles) is placed.
9284 If you want to have other environments within this one—for example, Case
9285 environments—and have the QED symbol appear only after them, then the other
9286 environments need to be nested within the proof environment.
9289 Nesting Environments
9295 for information on nesting.
9298 \begin_layout Standard
9299 And these environments are provided by
9300 \begin_inset Flex Code
9303 \begin_layout Plain Layout
9304 Theorems (AMS-Extended)
9312 \begin_layout Criterion*
9313 A required condition.
9316 \begin_layout Algorithm*
9317 A general procedure to be used.
9320 \begin_layout Axiom*
9321 This is a property or statement taken as true within the system being discussed.
9324 \begin_layout Condition*
9325 Sometimes used to state a condition assumed within the present context of
9330 Similar to a Remark.
9333 \begin_layout Notation*
9334 Used for the explanation of, yes, notation.
9337 \begin_layout Summary
9338 Do we really need to tell you?
9341 \begin_layout Acknowledgement*
9345 \begin_layout Conclusion*
9346 Sometimes used at the end of a long train of argument.
9350 Used in a way similar to Proposition, though perhaps lower on the scale.
9353 \begin_layout Standard
9354 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9356 They need to be available on your system in order to use these environments.
9359 \begin_layout Section
9367 \begin_layout Standard
9373 \begin_layout Subsection
9377 \begin_layout Standard
9378 These are the layout files for some of the journals of the American Geophysical
9380 It is assumed that you have both the AGU's own class files and AGUplus
9381 installed (everything to be found at
9382 \begin_inset Flex URL
9385 \begin_layout Plain Layout
9387 ftp://ftp.agu.org/journals/latex/journals
9395 \begin_layout Subsection
9399 \begin_layout Standard
9409 They are still called this in the LyX GUI, though their LaTeX equivalents
9410 in the AGU classes are
9421 \begin_layout Standard
9422 Newly defined styles are
9459 These are mostly manuscript attributes and defined in the AGU class documentati
9463 \begin_layout Standard
9464 I suspect this is still badly incomplete.
9467 \begin_layout Subsection
9471 \begin_layout Standard
9488 \begin_layout Subsection
9492 \begin_layout Itemize
9495 Journal of Geophysical Research
9504 \begin_layout Standard
9505 Add your own, it isn't so hard! Look at the
9516 \begin_layout Subsection
9517 Bugs and things to remember
9520 \begin_layout Standard
9521 In order to use the new layouts, you must remember to do the following for
9525 \begin_layout Enumerate
9531 This can be done in the
9533 Layout\SpecialChar \menuseparator
9538 Document\SpecialChar \menuseparator
9542 (AGU articles are always in English, right? So
9549 \begin_layout Enumerate
9559 (Yes, this is a bug.)
9562 \begin_layout Enumerate
9563 Make sure you use the
9567 bibliography style, by entering
9571 into the second field of the BibTeX inset.
9572 None of the standard styles will do.
9575 \begin_layout Section
9579 \begin_layout Standard
9585 \begin_layout Subsection
9589 \begin_layout Standard
9590 Broadway is for writing plays.
9591 The format is more decorative than Hollywood, and much less standardized.
9592 This format should be suitable for workshops.
9595 \begin_layout Subsection
9599 \begin_layout Standard
9600 The same as in Hollywood.
9603 \begin_layout Subsection
9607 \begin_layout Standard
9612 names as labels then cross-reference the label to insert the name.
9613 The cross-reference dialog will show the current cast of characters.
9616 \begin_layout Subsection
9617 Paper size and Margins
9620 \begin_layout Standard
9621 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9624 \begin_layout Subsection
9628 \begin_layout Standard
9629 The following environments are available.
9630 You can use broadway.bind to get the bind keys shown at the right.
9633 \begin_layout Itemize
9637 \begin_inset Newline newline
9642 You should not have to use this, but it is here for anything that does not
9646 \begin_layout Itemize
9650 \begin_inset space \hfill{}
9654 \begin_inset Newline newline
9659 Used to describe stage setting and the action.
9660 First use of speaker names in all CAPs.
9663 \begin_layout Itemize
9667 \begin_inset space \hfill{}
9671 \begin_inset Newline newline
9676 Automatically numbered.
9677 On screen it will be arabic, but will print as Roman.
9680 \begin_layout Itemize
9684 \begin_inset space \hfill{}
9688 \begin_inset Newline newline
9698 It is just centered text.
9701 \begin_layout Itemize
9705 \begin_inset space \hfill{}
9709 \begin_inset Newline newline
9714 Not automatically numbered.
9715 You supply the number.
9716 This is because I couldn't figure out how.
9719 \begin_layout Itemize
9723 \begin_inset space \hfill{}
9727 \begin_inset Newline newline
9732 A special case of Narrative to describe the setting and action as the curtain
9736 \begin_layout Itemize
9740 \begin_inset space \hfill{}
9744 \begin_inset Newline newline
9749 The speaker's (actor's) title, centered in all CAPS.
9752 \begin_layout Itemize
9756 \begin_inset space \hfill{}
9760 \begin_inset Newline newline
9765 Instructions to the speaker.
9766 The parentheses are automatically inserted.
9767 The ( will appear on screen, but both will be in the printed play.
9768 This environment is only used within
9775 \begin_layout Itemize
9779 \begin_inset space \hfill{}
9783 \begin_inset Newline newline
9788 What the Speaker says.
9791 \begin_layout Itemize
9795 \begin_inset space \hfill{}
9799 \begin_inset Newline newline
9804 The curtain comes down.
9807 \begin_layout Itemize
9811 \begin_inset space \hfill{}
9817 \begin_layout Itemize
9821 \begin_inset space \hfill{}
9827 \begin_layout Itemize
9831 \begin_inset space \hfill{}
9837 \begin_layout Standard
9841 \begin_layout Section
9845 \begin_layout Standard
9850 can be used to type letters according to German conventions.
9851 A template file is included in
9853 .../lyx/share/templates
9855 for you to use as a starting point.
9858 \begin_layout Section
9866 \begin_layout Standard
9872 \begin_layout Subsection
9876 \begin_layout Standard
9877 This is the layout file for the European Geophysical Society journals.
9882 can be downloaded from the web site of the EGS under
9883 \begin_inset Flex URL
9886 \begin_layout Plain Layout
9896 \begin_layout Subsection
9900 \begin_layout Standard
9903 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9911 The current layout file is unfortunately very unmodular and would benefit
9912 from using the various
9919 \begin_layout Section
9923 \begin_layout Standard
9924 See the LyX template file
9929 It contains all infos you need.
9932 \begin_layout Section
9938 \begin_inset CommandInset label
9947 \begin_layout Standard
9953 \begin_layout Subsection
9957 \begin_layout Standard
9958 This section describes how to use LyX to make slides for overhead projectors.
9959 There are two document classes that can do this: the default slides class
9965 This section documents the latter.
9968 \begin_layout Standard
9969 I'm going to say this again, nice and clear, so that there's no misunderstanding
9973 \begin_layout Standard
9974 \begin_inset VSpace bigskip
9980 \begin_layout Standard
9984 This section documents the class
9985 \begin_inset Quotes eld
9993 \begin_inset Quotes erd
10001 \begin_layout Standard
10002 \begin_inset VSpace bigskip
10008 \begin_layout Standard
10009 If you're looking for the documentation for
10010 \begin_inset Quotes eld
10018 \begin_inset Quotes erd
10021 , check out section
10022 \begin_inset space ~
10026 \begin_inset CommandInset ref
10028 reference "sec:slitex"
10033 If your machine doesn't have the
10038 \begin_inset Quotes eld
10046 \begin_inset Quotes erd
10049 ] installed, you'll probably have to use the default
10053 class, which isn't quite as good as
10058 \begin_layout Standard
10063 class is designed for use with version 2.1 of the
10067 LaTeX class file which is now an integral part of LaTeX2e.
10070 \begin_layout Subsection
10074 \begin_layout Standard
10075 Obviously, to use this document class, you need to select
10076 \begin_inset Quotes eld
10084 \begin_inset Quotes erd
10094 \begin_inset space ~
10100 There are some settings in the
10103 \begin_inset space ~
10108 dialog that you should know about that are specific to this class:
10111 \begin_layout Itemize
10112 Don't change the options
10123 \begin_inset space ~
10129 They're ignored by the
10136 \begin_layout Itemize
10137 The default font size is 20
10138 \begin_inset space \thinspace{}
10141 pt with the other options being 17
10142 \begin_inset space \thinspace{}
10146 \begin_inset space \thinspace{}
10150 \begin_inset space \thinspace{}
10156 \begin_layout Itemize
10157 The default font is
10165 but all math equations are still typeset in the usual roman font.
10168 \begin_layout Itemize
10173 supports A4 and Letter paper sizes as well as a special size for working
10175 \begin_inset space \thinspace{}
10179 It doesn't support A5, B5, legal or executive paper sizes.
10182 \begin_layout Itemize
10183 Don't bother changing the
10187 settings because they are ignored anyway.
10188 All floats appear where they are defined in the text.
10191 \begin_layout Itemize
10196 setting behaves a bit differently for this class.
10201 provides extensive footer and header capabilities including a user-defined
10204 \begin_inset space ~
10208 \begin_inset CommandInset ref
10210 reference "sec:foilfoot"
10215 The title page is treated differently to all other pages in the document
10224 has the logo centered at the bottom of the page (if one is defined).
10225 The possible page style choices and what they do are as follows:
10229 \begin_layout Labeling
10230 \labelwidthstring MMMMMMM
10237 The final output contains no page numbers, or other headers or footers
10238 (except footnotes of course).
10242 \begin_layout Labeling
10243 \labelwidthstring MMMMMMM
10250 The final output contains page numbers centered at the bottom of the page.
10251 No other headings or footers (other than footnotes).
10254 \begin_layout Labeling
10255 \labelwidthstring MMMMMMM
10260 Page numbers in lower right corner.
10261 Additional headers and footers are also shown.
10262 This is also the default.
10265 \begin_layout Labeling
10266 \labelwidthstring MMMMMMM
10271 Gives you access to the
10275 package although its use with
10279 is discouraged by the writer of the
10283 package because of some potential page layout clashes.
10287 \begin_layout Subsubsection
10291 \begin_layout Standard
10292 The following options may be used in the extra class options in the
10294 Document\SpecialChar \menuseparator
10300 \begin_layout Labeling
10301 \labelwidthstring MMMMMMx
10306 This sets up the page layout for 7.33
10307 \begin_inset space \thinspace{}
10311 \begin_inset space \thinspace{}
10314 in paper, which is about the same aspect ratio as a 35
10315 \begin_inset space \thinspace{}
10318 mm slide, making it a bit easier to work with this medium.
10321 \begin_layout Labeling
10322 \labelwidthstring MMMMMMx
10327 Places a rule across the page below the header on every page except the
10331 \begin_layout Labeling
10332 \labelwidthstring MMMMMMx
10337 Places a rule across the page above the footer on every page except the
10341 \begin_layout Labeling
10342 \labelwidthstring MMMMMMx
10347 This is automatically set each time you create a new
10356 to use the dvips driver to rotate those pages that are set as landscape
10360 \begin_layout Labeling
10361 \labelwidthstring MMMMMMx
10366 Simply changes the page dimensions to those of a landscape page but doesn't
10368 Thus if you use this option you need to use an external program to rotate
10369 each page or feed your paper through your printer as landscape.
10370 Note that this option effectively reverses the roles of the
10378 environments (don't worry these are described in the next section).
10381 \begin_layout Labeling
10382 \labelwidthstring MMMMMMx
10387 Equation numbers on the left.
10390 \begin_layout Labeling
10391 \labelwidthstring MMMMMMx
10396 Flush-left equations.
10399 \begin_layout Subsection
10400 Supported Environments
10403 \begin_layout Standard
10404 Most of the environments commonly supported in other classes are also supported
10410 There are several additional environments provided by
10414 as well as a couple added by LyX.
10415 The following environments are shared with other classes:
10418 \begin_layout Standard
10422 \begin_layout Plain Layout
10426 begin{multicols}{2}
10434 \begin_layout Itemize
10440 \begin_layout Itemize
10446 \begin_layout Itemize
10452 \begin_layout Itemize
10458 \begin_layout Itemize
10464 \begin_layout Itemize
10470 \begin_layout Itemize
10476 \begin_layout Itemize
10482 \begin_layout Itemize
10488 \begin_layout Itemize
10494 \begin_layout Itemize
10500 \begin_layout Itemize
10506 \begin_layout Itemize
10512 \begin_layout Itemize
10518 \begin_layout Itemize
10524 \begin_layout Itemize
10530 \begin_layout Itemize
10536 \begin_layout Itemize
10542 \begin_layout Standard
10546 \begin_layout Plain Layout
10558 \begin_layout Standard
10559 That is, all the major environments apart from the sectioning environments.
10560 Since foils are essentially self-contained sections, with a title and body,
10565 provides specific commands for starting new foils and these are:
10568 \begin_layout Itemize
10574 \begin_layout Itemize
10580 \begin_layout Standard
10581 LyX also provides slightly modified versions of these two environments called:
10584 \begin_layout Itemize
10590 \begin_layout Itemize
10593 ShortRotatefoilhead
10596 \begin_layout Standard
10597 and the differences will be explained in the next section.
10600 \begin_layout Standard
10601 Since foils are often used in presenting ideas or new theorems and such
10606 also provides a comprehensive box of goodies for presenting them:
10609 \begin_layout Standard
10613 \begin_layout Plain Layout
10617 begin{multicols}{2}
10625 \begin_layout Itemize
10631 \begin_layout Itemize
10637 \begin_layout Itemize
10643 \begin_layout Itemize
10649 \begin_layout Itemize
10655 \begin_layout Itemize
10661 \begin_layout Itemize
10667 \begin_layout Itemize
10673 \begin_layout Itemize
10679 \begin_layout Itemize
10685 \begin_layout Itemize
10691 \begin_layout Standard
10695 \begin_layout Plain Layout
10707 \begin_layout Standard
10708 The starred versions are unnumbered while the unstarred versions are numbered.
10709 There are also two list environments added by LyX and these are:
10712 \begin_layout Itemize
10718 \begin_layout Itemize
10724 \begin_layout Standard
10729 provides some powerful header and footer capabilities that are best set
10730 in the preamble although they may be set at any point in a document.
10731 If you want to change these settings in your document the best place to
10732 do so is at the very top of a foil, i.
10733 \begin_inset space \thinspace{}
10739 \begin_inset space \space{}
10744 straight after the foilhead.
10747 \begin_layout Standard
10748 For this purpose, the following command styles are provided [
10755 \begin_layout Standard
10759 \begin_layout Plain Layout
10763 begin{multicols}{2}
10771 \begin_layout Itemize
10775 \begin_inset space ~
10781 \begin_layout Itemize
10787 \begin_layout Itemize
10791 \begin_inset space ~
10797 \begin_layout Itemize
10801 \begin_inset space ~
10807 \begin_layout Itemize
10811 \begin_inset space ~
10818 \begin_layout Standard
10819 \begin_inset space ~
10826 \begin_layout Standard
10830 \begin_layout Plain Layout
10842 \begin_layout Standard
10843 There are also a few commands provided by
10847 that aren't directly supported by LyX but I'll tell you what they do and
10848 how to use them in section
10849 \begin_inset space ~
10853 \begin_inset CommandInset ref
10855 reference "sec:unsuppfoils"
10862 \begin_layout Subsection
10863 Building a Set of Foils
10866 \begin_layout Standard
10867 This section will give a simple introduction to using the different environments
10868 to build a set of foils.
10869 If you want to see an example set of foils, take a look at the
10873 file you find in LyX's
10880 \begin_layout Subsubsection
10881 Give It a Title Page
10884 \begin_layout Standard
10885 Unlike other classes that provide
10905 creates the title on a page of its own.
10906 If you leave out the
10910 environment LaTeX will substitute the current date (every time you regenerate
10914 \begin_layout Subsubsection
10918 \begin_layout Standard
10919 As I mentioned earlier, there are four ways of starting a new foil.
10920 For portrait foils you should use
10929 The difference between these two environments is the amount of space between
10930 the title of the foil (the foilhead) and the body of the foil.
10933 \begin_layout Standard
10934 Landscape foils are generated using the
10940 ShortRotatefoilhead
10943 Again the only difference is the spacing between foilhead and body.
10944 Both of the short versions have 0.5 inches less separation between the foilhead
10949 \begin_layout Standard
10950 One problem with the support for landscape foils is the requirement that
10951 you have to use the
10955 driver to generate the PostScript output otherwise the foils won't be rotated.
10956 It is possible to get landscape foils even if you haven't got the
10960 driver provided you can feed your foils sideways through your printer ;-)
10963 \begin_layout Subsubsection
10964 Theorems, Lemmas, Proofs and more
10967 \begin_layout Standard
10968 Due to a small bug in LyX you can't have two of the same type of these environme
10969 nts directly following each other.
10970 They must be separated by something.
10971 If you try, you will just be extending the previous environment as if you
10972 had merged the two environments together.
10973 So, how do you get around this problem? The simplest option is to insert
10974 some text between the two environments or add a
10978 environment between the two with just a
10979 \begin_inset Quotes eld
10987 \begin_inset Quotes erd
10991 This will force LyX to produce two separate environments and hence the
10992 correct LaTeX output.
10993 An example is provided in the example file included with the LyX distribution.
10994 Remember, this problem only occurs if you are trying to place two of the
10995 same type of theorem-like environments one directly after the other.
10998 \begin_layout Subsubsection
11002 \begin_layout Standard
11003 You get all the commonly supported list styles found in other classes as
11004 well as two new ones.
11005 I'll only describe the new ones here.
11006 If you want to find out more about the other list environments check out
11012 If you intend to use itemized lists you might also want to read about the
11016 \begin_inset space ~
11020 \begin_inset space ~
11025 dialog described above in section
11026 \begin_inset space ~
11030 \begin_inset CommandInset ref
11032 reference "sec:bullet"
11039 \begin_layout Standard
11040 The two new list styles,
11048 , are designed to make it easier for you to create lists of do's and don'ts
11049 or right and wrong by providing dedicated environments that use a tick
11050 or a cross as the label of the list.
11051 These lists are in fact dedicated variants of the
11056 They do however require that you have the
11060 packages installed.
11063 \begin_layout Subsubsection
11067 \begin_layout Standard
11072 redefines the floating tables and figures so that they appear exactly where
11073 they are in the text rather than pushing them to the top of the page or
11074 to some user specified location.
11075 In fact if you change the float placement settings they are simply ignored.
11078 \begin_layout Subsubsection
11079 Page Headers and Footers
11080 \begin_inset CommandInset label
11082 name "sec:foilfoot"
11089 \begin_layout Standard
11093 \begin_inset space ~
11102 are two commands used to control the left-footer text string.
11103 The first is meant to allow you to include a graphic logo on your foils
11105 \begin_inset Quotes eld
11113 \begin_inset Quotes erd
11117 While the second is meant to provide a classification for the audience,
11121 \begin_inset space \thinspace{}
11127 \begin_inset space \space{}
11131 It is empty by default.
11134 \begin_layout Standard
11135 The remaining page corners can be filled by
11138 \begin_inset space ~
11143 (which defaults to page numbers),
11146 \begin_inset space ~
11154 \begin_inset space ~
11162 \begin_layout Subsection
11168 \begin_inset CommandInset label
11170 name "sec:unsuppfoils"
11177 \begin_layout Standard
11178 All the commands mentioned below need to be set in a
11186 within another environment.
11189 \begin_layout Subsubsection
11193 \begin_layout Standard
11194 All lengths are adjusted using the
11217 should be replaced by the name given to the length you want to change and
11222 is the length value.
11223 All lengths should be specified in units of length such as inches (
11235 ) or relative to some document or font-based length such as
11245 \begin_layout Standard
11246 It's possible to change the spacing between a foilhead and the body of the
11247 foil by adjusting the length specified by
11254 For example, to make
11259 \begin_inset space \space{}
11262 in closer to their bodies put the following in the preamble:
11268 foilheadskip}{-0.5in}
11271 \begin_layout Standard
11272 The spacings around floats can be adjusted by setting these lengths:
11275 \begin_layout Labeling
11276 \labelwidthstring MMMMMMMMMMM
11283 Separation between the text and the top of the float
11286 \begin_layout Labeling
11287 \labelwidthstring MMMMMMMMMMM
11294 Separation between the float and the caption
11297 \begin_layout Labeling
11298 \labelwidthstring MMMMMMMMMMM
11305 Separation between the caption and the following text
11308 \begin_layout Labeling
11309 \labelwidthstring MMMMMMMMMMM
11316 You can make the captions narrower than the surrounding text by adjusting
11318 Best done relative to
11327 \begin_layout Standard
11328 There are also several title page related lengths that you may find useful
11329 if you have a long title or several authors:
11332 \begin_layout Labeling
11333 \labelwidthstring MMMMMMMMMMM
11340 Separation from headers to
11345 \begin_layout Labeling
11346 \labelwidthstring MMMMMMMMMMM
11364 \begin_layout Labeling
11365 \labelwidthstring MMMMMMMMMMM
11379 \begin_layout Labeling
11380 \labelwidthstring MMMMMMMMMMM
11396 \begin_layout Labeling
11397 \labelwidthstring MMMMMMMMMMM
11413 \begin_layout Standard
11414 The last length related command affects all the list environments.
11425 a list environment then all the vertical spacing between the list items
11427 Note that this is a command not a length so it doesn't require
11433 like the stuff mentioned above.
11436 \begin_layout Subsubsection
11437 Headers and Footers
11440 \begin_layout Standard
11453 commands control whether the logo in the
11457 definition appear on a given page.
11464 in the preamble then none of the foils will have the logo on them.
11465 If you don't want the logo on a particular page place the
11471 directly after the foilhead of that page and the
11477 directly after the next foilhead.
11480 \begin_layout Standard
11481 If you decide to use the
11485 page style setting in the
11488 \begin_inset space ~
11493 dialog you should probably add
11503 to your preamble so headers and footers on landscape pages are correctly
11504 placed when rotated.
11505 This is due to some clashes between the page layouts provided by the
11516 \begin_layout Section
11517 Hollywood (Hollywood spec scripts)
11520 \begin_layout Standard
11526 \begin_layout Subsection
11530 \begin_layout Standard
11531 Getting the format of a Hollywood script right is a
11532 \begin_inset Quotes eld
11536 \begin_inset Quotes erd
11539 It is designed to make the readers focus on content and to be easy and
11540 familiar for the actors to read.
11541 Each page of a script should be one minute of film.
11542 Nothing goes in a script that you cannot see or hear on screen.
11543 The courier 12 pt font should be used throughout.
11547 \begin_layout Subsection
11551 \begin_layout Standard
11552 Speakers' lines should NEVER break in mid-sentence.
11553 If a speaker's lines continue over a page break, repeat the
11557 title followed by (Cont'd).
11560 \begin_layout Subsection
11564 \begin_layout Standard
11569 names as labels then cross-reference the label to insert the name.
11570 The cross-reference dialog will show the current cast of characters.
11571 You can use this to insert the speaker name in narratives also.
11574 \begin_layout Subsection
11575 Paper size and Margins
11578 \begin_layout Standard
11579 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11582 \begin_layout Subsection
11586 \begin_layout Standard
11587 The following environments are available.
11588 You can use hollywood.bind to get the bind keys shown at the right.
11591 \begin_layout Itemize
11595 \begin_inset Newline newline
11600 Used where nothing else works.
11604 \begin_layout Itemize
11610 \begin_inset space \hfill{}
11618 \begin_inset Newline newline
11621 Usually followed by something like
11622 \begin_inset Quotes eld
11625 on Sally waking up.
11626 \begin_inset Quotes erd
11632 \begin_layout Itemize
11636 \begin_inset space \hfill{}
11640 \begin_inset Newline newline
11645 Introduces a new INTERIOR camera set-up.
11646 Always followed by DAY or NIGHT, or something similar to define the lighting
11648 Everthing on this line in CAPS.
11651 \begin_layout Itemize
11655 \begin_inset space \hfill{}
11659 \begin_inset Newline newline
11664 Introduces a new EXTERIOR camera set-up.
11665 Everthing on this line in CAPS.
11668 \begin_layout Itemize
11672 \begin_inset space \hfill{}
11676 \begin_inset Newline newline
11681 The character speaking.
11684 \begin_layout Itemize
11688 \begin_inset space \hfill{}
11692 \begin_inset Newline newline
11697 Instructions to the speaker.
11698 The () are automatically inserted, but only the ( will show in LyX.
11699 Both will be printed.
11702 \begin_layout Itemize
11706 \begin_inset space \hfill{}
11710 \begin_inset Newline newline
11722 \begin_layout Itemize
11726 \begin_inset space \hfill{}
11730 \begin_inset Newline newline
11735 Camera movement instruction.
11737 \begin_inset space \thinspace{}
11741 \begin_inset space \space{}
11747 \begin_layout Itemize
11751 \begin_inset space \hfill{}
11757 \begin_layout Itemize
11761 \begin_inset space \hfill{}
11767 \begin_layout Itemize
11771 \begin_inset space \hfill{}
11777 \begin_layout Itemize
11781 \begin_inset space \hfill{}
11787 \begin_layout Subsection
11791 \begin_layout Itemize
11795 \begin_layout Itemize
11799 \begin_layout Itemize
11801 \begin_inset space \thinspace{}
11808 \begin_layout Itemize
11813 \begin_layout Itemize
11814 PAN — camera movement
11817 \begin_layout Itemize
11818 INSERT — cut to close-up of
11821 \begin_layout Section
11825 \begin_layout Standard
11828 Panayotis Papasotiriou
11831 \begin_layout Subsection
11835 \begin_layout Standard
11836 The ijmpc package is a set of macros that facilitates electronic manuscript
11839 International Journal of Modern Physics C
11842 Similarly, the ijmpd package is for creating manuscripts to be submitted
11845 International Journal of Modern Physics D
11848 Both journals are published by World Scientific.
11849 The corresponding document classes are named
11858 These files, together with instructions for the authors, can be downloaded
11860 \begin_inset Flex URL
11863 \begin_layout Plain Layout
11865 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11871 \begin_inset Flex URL
11874 \begin_layout Plain Layout
11876 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11882 Both packages are modified versions of the standard
11883 \begin_inset Quotes eld
11887 \begin_inset Quotes erd
11890 package, and they are almost (but not exactly) identical.
11891 Most of their features are supported by LyX.
11892 I have used LyX successfully to write articles submitted to both journals
11893 without any problem.
11896 \begin_layout Subsection
11900 \begin_layout Standard
11901 As usual, the easiest way to write a paper is to start with a template.
11904 File\SpecialChar \menuseparator
11923 This will give an (almost) empty document that includes the most common
11924 fields found in a manuscript.
11925 Simply overwrite the existing text (including the brackets,
11930 You should keep in mind the following remarks.
11933 \begin_layout Enumerate
11934 LyX won't let you change the font size and the page style of the document,
11935 because such modifications are not allowed by both packages.
11938 \begin_layout Enumerate
11939 The language of the document should not be changed.
11940 Before previewing your paper, be sure that the babel package is not used.
11941 To do this, click on
11943 Tools\SpecialChar \menuseparator
11954 checkbox in the language settings, and click on
11962 , if you wish to make this change permanent).
11965 \begin_layout Enumerate
11967 \begin_inset Quotes eld
11971 \begin_inset Quotes erd
11974 style must be used to define keywords.
11977 \begin_layout Enumerate
11978 The ijmpc package provides a style named
11979 \begin_inset Quotes eld
11982 Classification Codes
11983 \begin_inset Quotes erd
11986 , which can be used to define classification codes, such as PACS numbers.
11987 Note that this facility is not supported by the ijmpd package.
11990 \begin_layout Enumerate
11991 Several new environments are available:
11992 \begin_inset Quotes eld
11996 \begin_inset Quotes erd
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 Their use is more or less obvious.
12105 LyX supports all these environments; it will use the proper label, text
12106 style, and numbering scheme for each of them.
12109 \begin_layout Enumerate
12110 Both packages use basic citations; the natbib package should not be used.
12111 In LyX, citation references are shown as usual; in the output, citations
12112 are shown as superscripts.
12113 If you want to use a citation as normal text, you should use the
12118 \begin_inset space \thinspace{}
12122 \begin_inset space \space{}
12126 \begin_inset Quotes eld
12130 \begin_inset space \space{}
12140 \begin_inset Quotes erd
12146 \begin_layout Enumerate
12148 \begin_inset Quotes eld
12152 \begin_inset Quotes erd
12155 section in both packages.
12156 To put acknowledgments, just use the
12157 \begin_inset Quotes eld
12161 \begin_inset Quotes erd
12167 \begin_layout Enumerate
12168 Appendices may be added to the paper,
12172 the Acknowledgments and
12177 LyX provides a special environment, called
12178 \begin_inset Quotes eld
12182 \begin_inset Quotes erd
12185 which marks the beginning of the appendices.
12186 This environment should be left blank; it just sends a LaTeX command, but
12187 nothing is really printed.
12189 \begin_inset Quotes eld
12193 \begin_inset Quotes erd
12196 is printed with blue letters, as a signal that all sections after that
12197 point are appendices.
12198 To write an appendix, use the
12199 \begin_inset Quotes eld
12203 \begin_inset Quotes erd
12207 LyX will number each appendix with capital letters, as required by both
12210 \begin_inset Quotes eld
12214 \begin_inset Quotes erd
12221 be present before the first appendix; if not, all appendices will be numbered
12222 as normal sections in the output.
12225 \begin_layout Enumerate
12226 The ijmpc and the ijmpd packages use the
12230 command to implement table captions.
12231 As a result, a table created by LyX is printed correctly, but its caption
12233 However, you can use some TeX code to overcome this problem, so that captions
12234 are printed as expected.
12235 To do so, create a float table as usual, remove the caption, and replace
12236 it with the TeX code
12246 (sic); you must also the TeX code
12250 immediately after the tabular material.
12251 Study the example table included in the template files to see how this
12252 trick is implemented.
12253 Alternatively, If you need table captions, you should implement the whole
12258 file, then include this file to the LyX document (
12260 Insert\SpecialChar \menuseparator
12261 File\SpecialChar \menuseparator
12263 \begin_inset space ~
12269 Details on how to create a table float can be found in the files
12277 , included in the corresponding packages.
12280 \begin_layout Subsection
12281 Preparing a paper for submission
12284 \begin_layout Standard
12285 Before you submit your paper you must export the LyX document as a LaTeX
12288 File\SpecialChar \menuseparator
12289 Export\SpecialChar \menuseparator
12296 \begin_layout Plain Layout
12297 Actually you have the choice between LaTeX (plain) and pdflatex.
12298 If you intend to use pdflatex to prepare the paper, you should use the
12299 pdflatex option so that included graphics are converted to PDF format,
12300 ready for use by pdflatex.
12305 , then make the following changes to the resulting
12312 \begin_layout Enumerate
12313 Remove the comment lines before the
12322 \begin_layout Enumerate
12323 Remove everything between (and including) the
12335 commands, except for any commands you specifically put into the LaTeX preamble.
12338 \begin_layout Standard
12343 file should be saved and processed through LaTeX as many times as necessary.
12344 You may also want to check the resulting
12351 \begin_layout Subsection
12355 \begin_layout Standard
12356 The use of TeX code is reduced to two commands, which must be placed at
12357 the top of the document.
12358 If you started writing your paper by using the
12366 template, the TeX code needed is already in its place; you usually don't
12368 You may only modify the first TeX code to specify the information printed
12369 to the top of odd and even pages (authors' names and short paper's title,
12371 This TeX code must have the form
12375 markboth{Authors' Names}{Short Paper's Title}
12380 \begin_layout Section
12384 \begin_layout Standard
12390 \begin_layout Subsection
12394 \begin_layout Standard
12395 The iopart package provides a document class to create electronic manuscript
12396 submission to the journals published by the Institute of Physics.
12397 Instructions for the authors how to create a paper using the iopart class
12398 can be downloaded together with the iopart package from the site
12399 \begin_inset Flex URL
12402 \begin_layout Plain Layout
12404 ftp://ftp.iop.org/pub/journals/latex2e
12412 \begin_layout Subsection
12416 \begin_layout Standard
12417 The easiest way to write a paper is to start with the file
12421 that is available in LyX's examples files folder.
12422 Open this file, save it under a new name, and start writing.
12423 The example file explains how to use the special text environments.
12424 Here are the most important advices:
12427 \begin_layout Itemize
12428 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12431 Use AMS math package
12433 in the document settings under
12440 \begin_layout Itemize
12443 The title environment defines the kind of your paper.
12444 So use one of the following environments for the title:
12448 \begin_layout Itemize
12457 \begin_layout Itemize
12466 \begin_layout Itemize
12472 for a Topical review
12475 \begin_layout Itemize
12484 \begin_layout Itemize
12493 \begin_layout Itemize
12499 for a Paper (same as Title)
12502 \begin_layout Itemize
12508 for a Preliminary communication
12511 \begin_layout Itemize
12517 for a Rapid communication
12520 \begin_layout Itemize
12526 for a Letter to the editor
12530 \begin_layout Itemize
12533 All title environments except of
12537 can have an optional short title.
12540 \begin_layout Itemize
12541 There is a general title environment
12545 which is not directly supported by the LyX.
12546 This can be used as TeX code when your document doesn't fit into one of
12547 the other title types.
12550 \begin_layout Standard
12551 For more informations like hints for special table and formula formatting,
12552 look at the IOP author guidelines.
12555 \begin_layout Section
12559 \begin_layout Standard
12562 Panayotis Papasotiriou
12565 \begin_layout Subsection
12569 \begin_layout Standard
12570 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12571 that facilitates electronic manuscript submission to the journals they
12573 Most known of them (at least in my domain of interest) are
12575 Astrophysics and Space Science
12581 , but there are many others (see a complete list at
12582 \begin_inset Flex URL
12585 \begin_layout Plain Layout
12587 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12593 The Kluwer package may be downloaded from the site
12594 \begin_inset Flex URL
12597 \begin_layout Plain Layout
12599 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12605 A complete user guide is contained in that package (but it can also be
12606 downloaded separately).
12609 \begin_layout Standard
12610 LyX supports many features of the package but not everything.
12611 However, the TeX code needed is reduced to some
12612 \begin_inset Quotes eld
12616 \begin_inset Quotes erd
12619 commands of the package (see
12620 \begin_inset space ~
12624 \begin_inset CommandInset ref
12626 reference "subsec:kluwer_peculiarities"
12631 I have recently used LyX to write an article submitted to the
12633 Astrophysics and Space Science
12635 without any problem.
12638 \begin_layout Subsection
12642 \begin_layout Standard
12643 The easiest way to write a paper is to start with the Kluwer template file.
12646 File\SpecialChar \menuseparator
12658 This will give an (almost) empty document that includes the most common
12659 fields found in a manuscript and a short description of their use.
12660 As in most templates, simply overwrite the existing text (including the
12665 ) with the correct information.
12668 \begin_layout Subsection
12669 Preparing a paper for submission
12672 \begin_layout Standard
12673 As in the AASTeX package, before you submit your paper to a journal you
12675 \begin_inset Quotes eld
12679 \begin_inset Quotes erd
12685 \begin_layout Enumerate
12686 Export your paper as a LaTeX file.
12687 To do this, click on
12689 File\SpecialChar \menuseparator
12690 Export\SpecialChar \menuseparator
12697 \begin_layout Enumerate
12702 file with a text editor and make the following changes
12706 \begin_layout Enumerate
12707 remove the comment lines before the
12716 \begin_layout Enumerate
12717 remove everything between (and including) the
12729 commands, except for any commands you specifically put into the LaTeX preamble.
12732 \begin_layout Standard
12741 \begin_layout Enumerate
12746 file through LaTeX as many times as necessary (usually up to three).
12749 \begin_layout Enumerate
12755 \begin_inset space \thinspace{}
12759 \begin_inset space \space{}
12766 , and check if everything is OK (it should, if you didn't make any mistake).
12769 \begin_layout Subsection
12770 \begin_inset Quotes eld
12774 \begin_inset Quotes erd
12777 of the Kluwer package
12778 \begin_inset CommandInset label
12780 name "subsec:kluwer_peculiarities"
12787 \begin_layout Standard
12788 The Kluwer package has the following
12789 \begin_inset Quotes eld
12793 \begin_inset Quotes erd
12799 \begin_layout Enumerate
12800 It is possible to write multiple articles in the same LaTeX file
12804 \begin_layout Plain Layout
12805 I can't imagine any good reason to do this.
12811 Each article must be included in the environment
12812 \begin_inset Quotes eld
12816 \begin_inset Quotes erd
12820 Unfortunately, this environment cannot be omitted, even if you write just
12822 Therefore, each article starts with the command
12828 and, obviously, ends with the command
12835 Although this can be implemented in LyX, I didn't included it, since it
12836 looks ugly and can confuse the novice user.
12837 Therefore, you need to enter them directly and mark them as LaTeX code
12839 \begin_inset Quotes eld
12843 \begin_inset Quotes erd
12849 \begin_layout Enumerate
12850 Information given at the beginning of the article (i.
12851 \begin_inset space \thinspace{}
12855 \begin_inset space \space{}
12858 title, subtitle, author, institution, running title, running author, abstract
12859 and keywords) must be included in an environment called
12860 \begin_inset Quotes eld
12864 \begin_inset Quotes erd
12868 This is not implemented in LyX, so you must enter title, subtitle etc.
12869 \begin_inset space ~
12872 between two TeX code lines (
12887 \begin_layout Enumerate
12888 According to the user manual, the label of each bibliography item must be
12912 \begin_layout Standard
12917 template takes care of all these
12918 \begin_inset Quotes eld
12922 \begin_inset Quotes erd
12926 If you start a new paper using this template you don't need to do anything
12931 \begin_layout Enumerate
12932 don't delete the TeX code included in the template, and
12935 \begin_layout Enumerate
12936 copy the example bibliography item included in the template and modify it
12937 as necessary to enter new bibliography items.
12940 \begin_layout Section
12944 \begin_layout Standard
12950 \begin_layout Subsection
12954 \begin_layout Standard
12955 The LyX document classes
12957 article (koma-script)
12961 report (koma-script)
12979 correspond to the LaTeX document classes
12996 \begin_inset space ~
12999 of the Koma-Script family.
13000 They are replacements for the standard document classes
13016 , resp., and fit better to European typography conventions in a number of
13020 \begin_layout Itemize
13021 Standard character size is 11pt in
13023 article (koma-script)
13027 report (koma-script)
13035 letter (koma-script)
13040 \begin_layout Itemize
13041 Headings, labels of the description environment, and a number of elements
13044 letter (koma-script)
13046 document class are set in a bold sans serif font.
13050 \begin_layout Plain Layout
13051 There is a big difference between the bold sans serif old cm fonts and new
13052 ec fonts, especially in the appearance of headings.
13053 In comparison, the ec bold sans serif fonts look a bit thin.
13054 Here the LaTeX package
13062 helps to produce the
13063 \begin_inset Quotes eld
13067 \begin_inset Quotes erd
13070 appearance when using the ec fonts.
13075 The numbering of chapter headings is made in the same way as the numbering
13076 of section headings, that is without the extra line
13077 \begin_inset Quotes eld
13080 Chapter\SpecialChar \ldots{}
13082 \begin_inset Quotes erd
13086 In addition, the appearance of the headings can be modified by using a
13087 number of options (in LyX to be entered in the field
13090 \begin_inset space ~
13097 Layout\SpecialChar \menuseparator
13104 \begin_layout Itemize
13105 The main means in the Koma-Script document classes to design the type area
13114 (in LyX to be entered in the extra class options field in the dialog
13116 Document\SpecialChar \menuseparator
13120 They make a clearer modification of page margins possible as do the options
13123 Document\SpecialChar \menuseparator
13130 \begin_layout Itemize
13131 The LaTeX document classes of the Koma-Script family define a number of
13132 additional commands.
13133 Those part of it which makes sense in LyX is implemented in corresponding
13137 \begin_layout Standard
13138 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13139 can be found in the Koma-Script documentation
13150 \begin_layout Subsection
13151 article (koma-script), report (koma-script), and book (koma-script)
13154 \begin_layout Standard
13155 The document classes
13157 article (koma-script)
13161 report (koma-script)
13171 are implemented in the layout files
13184 They contain all the paragraph types of the corresponding standard document
13197 , resp., partly modified, with the exception of the LyX specific
13201 -type, which is replaced by the new
13205 -type having the same functionality.
13210 -Type there is a number of new paragraph types added.
13217 letter (koma-script)
13222 \begin_layout Itemize
13231 : are equivalents to
13239 , resp., additionally inserting an entry in the table of contents.
13248 are not contained in
13250 article (koma-script)
13255 \begin_layout Itemize
13264 : behave exactly as
13272 , resp., additionally clearing running heads.
13277 is not contained in
13279 article (koma-script)
13285 \begin_layout Plain Layout
13298 report (koma-script)
13300 , but since this is identical to
13304 , is has not been implemented in LyX.
13312 \begin_layout Itemize
13317 : generates a heading directly above the following paragraph in the standard
13318 character size without affecting the structure of the document.
13321 \begin_layout Itemize
13330 are special captions which respect the different space settings needed
13331 for captions placed above or below an element (if you follow strict typographic
13332 rules, you might want to place table captions always above the table).
13333 You can also use the class option
13337 , which will switch
13350 You need at least Koma-Script version 2.8q to use this.
13353 \begin_layout Itemize
13358 : can be used to set a bonmot, e.
13359 \begin_inset space \thinspace{}
13363 \begin_inset space \space{}
13366 at the beginning of a chapter.
13367 If you use the optional argument (
13369 Insert\SpecialChar \menuseparator
13371 \begin_inset space ~
13376 ), you can insert the dictum's author there.
13377 Dictum and author are separated by a line.
13378 You need at least Koma-Script version 2.8q to use this.
13383 is not contained in
13385 article (koma-script)
13390 \begin_layout Standard
13391 The following types, together with the standard types
13403 , form the title area of the document.
13404 They must be entered ahead of the first
13405 \begin_inset Quotes eld
13409 \begin_inset Quotes erd
13416 \begin_layout Plain Layout
13417 The corresponding LaTeX commands must appear before the
13428 When such a type is used more than once, the latter usage overwrites the
13429 former one, that means, for every type only the latest usage is valid.
13430 The order of the different types however has, like
13442 , no effect on the appearance of the produced document.
13445 \begin_layout Itemize
13450 : produces a centered paragraph above the ordinary title (
13462 ) for the subject of the document.
13465 \begin_layout Itemize
13470 : produces a centered paragraph below the ordinary title (
13482 ) for the publishers' name.
13485 \begin_layout Itemize
13492 report (koma-script)
13498 produces a centered paragraph on its own page behind the title page, or
13501 article (koma-script)
13503 produces a centered paragraph below the ordinary title (
13519 ) for a dedication.
13522 \begin_layout Itemize
13527 : produces a left aligned paragraph above the ordinary title (
13543 ) for a document`s head.
13546 \begin_layout Itemize
13551 : produces in a double-sided print in
13553 report (koma-script)
13559 a left-aligned paragraph at the top of the title page`s back or has no
13560 effect in a single-sided print or in
13562 article (koma-script)
13567 \begin_layout Itemize
13572 : produces in a double-sided print in
13574 report (koma-script)
13580 a left-aligned paragraph at the bottom of the title page`s back or has
13581 no effect in a single-sided print or in
13583 article (koma-script)
13588 \begin_layout Itemize
13593 : produces a special
13594 \begin_inset Quotes eld
13598 \begin_inset Quotes erd
13601 page ahead of the actual document containing a paragraph without special
13605 \begin_layout Standard
13606 The layout files for the document classes
13608 article (koma-script)
13612 report (koma-script)
13618 do include the file
13623 This is thought of as a place to define your own types.
13628 in your personal layout directory and edit the file!
13631 \begin_layout Subsection
13632 letter (koma-script)
13635 \begin_layout Standard
13639 letter (koma-script)
13641 is implemented in the layout file
13646 It contains all the paragraph types of the corresponding standard document
13651 , partly modified, with the exception of the LyX specific types
13663 type, which is replaced by the new
13668 In addition, it contains, in contrast to the standard document class, the
13686 Furthermore, there are a number of new letter specific types.
13689 \begin_layout Standard
13690 The appearance of the letter produced by this document class can be controlled
13691 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13695 \begin_layout Plain Layout
13696 For example, the standard appearance of the letter`s heading, consisting
13697 of name and address, is quite self-willed.
13699 \begin_inset Quotes eld
13703 \begin_inset Quotes erd
13706 heading is produced by the following LaTeX commands in the preamble:
13709 \begin_layout LyX-Code
13719 \begin_layout LyX-Code
13735 \begin_layout LyX-Code
13745 \begin_layout LyX-Code
13765 A detailed German description of such LaTeX commands can be found in the
13766 Koma-Script documentation
13771 With it, the letter's author can produce his personal letter layout.
13774 \begin_layout Standard
13783 define the beginning of the letter and must be used in every letter.
13784 To emphasize them in the LyX document class, they are marked with the letter
13794 \begin_inset space ~
13797 in the left margin.
13798 It is possible to write any number of letters in one file.
13803 type produces a new letter using the same addressee and a
13807 type produces a new addressee.
13824 are ordinary paragraph types and can also be used several times in one
13825 and the same letter.
13828 \begin_layout Itemize
13833 : produces a paragraph for the addressee and implicitly defines the beginning
13837 \begin_layout Itemize
13842 : produces a paragraph for the form of address and implicitly produces a
13846 \begin_layout Itemize
13851 : produces a paragraph for a close.
13854 \begin_layout Itemize
13859 : produces a paragraph for a postscript.
13862 \begin_layout Itemize
13867 : produces a paragraph for a distribution list.
13870 \begin_layout Itemize
13875 : produces a paragraph for enclosures.
13878 \begin_layout Standard
13919 are input types provided with a label to enter information, which will
13920 be processed by the document class.
13924 \begin_layout Plain Layout
13925 It could be seen as a matter of inconsequence, that the types
13933 described above are not such input types as well.
13934 Because of the special meaning of those types, however, I have implemented
13935 them as ordinary paragraph types with a one letter mark in the left margin.
13936 Moreover, it would affect my feeling of symmetry, if the
13944 type had such a serious different appearance.
13949 The types must be used ahead of the corresponding
13956 \begin_layout Standard
13957 An implementation of these types in a WYSIWYG fashion does not seem to make
13958 sense, because the real appearance of the produced letter does not only
13959 depend on the usage of the particular type, but also on other factors.
13960 For example, a signature entered in the
13964 type will in the standard behavior appear in the produced letter only,
13965 when in the same letter also a
13970 The entered value of the
13974 type will in the standard behavior not appear in the produced letter at
13976 The possibility to design the letter`s heading freely is already indicated
13977 in a footnote above.
13980 \begin_layout Standard
13981 The input types can also be used as empty paragraphs.
13982 This makes sense e.
13983 \begin_inset space \thinspace{}
13987 \begin_inset space \space{}
13999 type is not used at all, in the standard behavior the value of the
14003 type is used as signature, whereas if an empty
14007 type is used, no signature value is defined.
14010 \begin_layout Standard
14011 By using the input types it is possible to write a letter template, containing
14012 filled input types with your personal dates (name, address, etc.) and empty
14013 input types for other dates you want to enter.
14016 \begin_layout Itemize
14021 : sender's name, in the standard behavior appears as a centered paragraph
14022 in small caps in the letter`s heading.
14025 \begin_layout Itemize
14030 : sender's signature, in the standard behavior appears below the
14039 type is used, the value of the
14043 type appears instead.
14046 \begin_layout Itemize
14051 : sender's address, in the standard behavior appears in a centered paragraph
14052 in the letter`s heading below the sender's name.
14055 \begin_layout Itemize
14060 : sender's telephone number, in the standard behavior only sets the LaTeX
14070 \begin_layout Itemize
14075 : place of the letter`s making.
14078 \begin_layout Itemize
14083 : date of the letter`s making.
14092 , in the standard behavior, produce the place and the date in a right-aligned
14093 line below the addressee's field.
14098 type is used, neither place nor date appear, independent of the value of
14108 type is used, the date of the letter `s production is used.
14111 \begin_layout Itemize
14116 : sender`s back address, in the standard behavior appears above the addressee's
14117 field in a small sans serif font.
14120 \begin_layout Itemize
14125 : special mail information, in the standard behavior appears underlined
14126 above the addressee's field below the back address.
14129 \begin_layout Itemize
14134 : additional information, in the standard behavior appears on right side
14135 below the addressee`s field.
14138 \begin_layout Itemize
14143 : the letter's title, in the standard behavior appears in a big, bold, sans
14144 serif font above the subject.
14147 \begin_layout Itemize
14152 : the letter's subject, in the standard behavior appears in a bold font
14160 \begin_layout Standard
14181 produce a business letter like line above the
14185 line containing the fields
14186 \begin_inset Quotes eld
14190 \begin_inset Quotes erd
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 For the date field, the value of the
14240 \begin_inset Quotes eld
14243 business letter types
14244 \begin_inset Quotes erd
14247 is used, the value of the
14251 type however does not appear, but only the LaTeX variable
14258 The ordinary output of place and date in a right-aligned line below the
14259 addressee`s field is suppressed.
14260 The types are implemented as input types provided with a label and must
14261 be used ahead of the corresponding
14268 \begin_layout Itemize
14276 \begin_layout Itemize
14284 \begin_layout Itemize
14292 \begin_layout Itemize
14300 \begin_layout Itemize
14308 \begin_layout Subsection
14309 The new letter class: letter (koma-script v.2)
14312 \begin_layout Standard
14318 \begin_layout Standard
14319 \begin_inset VSpace medskip
14325 \begin_layout Standard
14327 Koma-Script version 2.8 has introduced a new letter class
14331 which supersedes the now unsupported
14336 It has — on the LaTeX side — a completely new interface and is not compatible
14337 with the old class.
14338 Therefore, LyX supports both, though it is recommended you use the new
14342 \begin_layout Standard
14343 This class covers the same functionality as
14345 letter (koma-script),
14348 The basic items are
14352 (receiver's address, same as
14356 in the old layout),
14369 will start a new letter (i.
14370 \begin_inset space \thinspace{}
14374 \begin_inset space \space{}
14377 you can write several letters per document).
14378 New elements are sender's
14394 and the possibility to use a
14400 Insert\SpecialChar \menuseparator
14406 \begin_layout Standard
14407 The biggest improvement is, though, that the letter's layout is configurable
14408 to meet almost any needs.
14409 This can be done via the preamble or with a special style file (Letter
14410 Class Option, extension
14414 ), that will be read in as a class option.
14418 \begin_layout Plain Layout
14419 The KOMA package comes with some default
14424 There is, for instance, a
14428 file that follows german typesetting rules, or a
14432 that provides the default layout of the old
14437 The latter can be loaded with the class option
14446 ayout\SpecialChar \menuseparator
14451 ocument\SpecialChar \menuseparator
14463 template that is included in LyX for examples.
14464 A detailed description is to be found in the Koma-Script documentation
14472 \begin_layout Subsection
14476 \begin_layout Standard
14477 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14481 \begin_layout Itemize
14482 The chapter number of a
14486 type appears on a line of its own above the chapter heading instead of
14487 appearing in the same line ahead of it.
14488 The cause for that is the LyX internal behavior for the labeltype
14492 in the layout file.
14495 \begin_layout Itemize
14496 The headings of the types
14504 are only put in the
14505 \begin_inset Quotes eld
14509 \begin_inset Quotes erd
14512 LaTeX table of contents, but not in the LyX table of contents (
14514 Document\SpecialChar \menuseparator
14516 \begin_inset space ~
14520 \begin_inset space ~
14528 \begin_layout Itemize
14529 The paragraphs in a
14533 document class appear in a skip separation mode, not indented.
14534 This is the standard behavior, no special LaTeX commands are needed for
14538 Document\SpecialChar \menuseparator
14541 dialog the corresponding radio button indicates
14550 value always has the effect that extra LaTeX commands are inserted in the
14551 document to produce the gap, which is not what is wanted in this case.
14554 \begin_layout Section
14558 \begin_layout Standard
14564 \begin_layout Subsection
14568 \begin_layout Standard
14569 Memoir is a very powerful and constantly evolving class.
14570 It has been designed with regard to fictional and non-fictional literature.
14571 Its aim is to let the user have maximum control over the typesetting of
14573 Memoir is based on the standard book class, but it can also emulate the
14574 article class (see below).
14577 \begin_layout Standard
14578 Peter Wilson, the developer of Memoir, is known as the author of lots of
14579 useful packages in the LaTeX world.
14580 Most of them have been merged with Memoir.
14581 Therefore, it is much easier to layout the table of contents, appendices,
14582 chapter designs and such.
14583 LyX, though, does not support all of these goodies natively.
14584 Some of them might be added to forthcoming releases
14588 \begin_layout Plain Layout
14589 You are invited to send suggestions to
14590 \begin_inset Flex URL
14593 \begin_layout Plain Layout
14595 lyx-devel@lists.lyx.org
14605 , lots will probably never, due to the limitations of LyX's framework.
14606 Of course you can still use all features with the help of some native LaTeX
14611 \begin_layout Plain Layout
14616 \begin_layout Plain Layout
14626 \begin_inset space ~
14630 \begin_inset CommandInset ref
14632 reference "sec:Inserting-TeX-Code"
14642 In this section, we can only list those features which are natively supported
14644 For detailed descriptions (and for the rest of features) we recommend you
14645 have a look at the detailed manual of the Memoir class
14649 \begin_layout Plain Layout
14654 \begin_layout Plain Layout
14664 \begin_inset Flex URL
14667 \begin_layout Plain Layout
14669 CTAN:/macros/latex/memoir/memman.pdf
14679 , which is not only a user guide for the class, but also both a comprehensive
14680 description on good typesetting and a superb example for good typesetting
14684 \begin_layout Subsection
14685 Basic features and restrictions
14688 \begin_layout Standard
14689 Memoir supports basically all features of the standard book classes.
14690 There are, however, some differences, as follows:
14693 \begin_layout Description
14695 \begin_inset space ~
14698 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14701 \begin_layout Description
14703 \begin_inset space ~
14706 style: The fancy page style is not supported, due to a command clash between
14707 Memoir and the fancyhdr package (they both define a command with the same
14708 name, which confuses LaTeX).
14709 Instead, Memoir comes with a number of its own page styles (see
14711 Layout\SpecialChar \menuseparator
14712 Document\SpecialChar \menuseparator
14714 \begin_inset space ~
14720 If you want to use these for the chapter pages, you have to use the command
14727 in the main text or in preamble (e.
14728 \begin_inset space \thinspace{}
14732 \begin_inset space \space{}
14739 chapterstyle{companion}
14744 \begin_layout Description
14745 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14746 optional argument in the standard classes.
14747 With this, you can specify an alternative version of the title for the
14748 table of contents and the headers (for instance, if the title is too long).
14749 In LyX, you can do this via
14751 Insert\SpecialChar \menuseparator
14753 \begin_inset space ~
14758 at the beginning of a chapter/section.
14759 Memoir features a second optional argument and thus separates the table
14760 of contents from the header.
14761 You can define three variants of a title with this: one for the main text,
14762 one for the table of contents, and one for the headers.
14763 Simply insert two optional arguments if you need this feature, the first
14764 one containing the short title for the Table of Contents, the second one
14765 containing an alternative short title for the headers.
14768 \begin_layout Description
14769 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14770 of contents, the list of figures and the list of table start a new page
14772 Memoir does not follow this route.
14773 You have to insert a page break yourself, if you want to have one.
14776 \begin_layout Description
14777 Titlepage: For some unknown reason, Memoir uses pagination on the title
14778 page (in the standard classes, title pages are
14779 \begin_inset Quotes eld
14783 \begin_inset Quotes erd
14787 \begin_inset space \thinspace{}
14791 \begin_inset space \space{}
14795 If you want an empty title page, type
14799 aliaspagestyle{title}{empty}
14804 \begin_layout Description
14805 Article: With the class option
14811 Layout\SpecialChar \menuseparator
14812 Document\SpecialChar \menuseparator
14814 \begin_inset space ~
14819 ), you can emulate article style.
14820 That is, counters (footnotes, figures, tables etc.) will not be reset on
14821 new chapters, chapters don't start a new page (but are—in contrary to
14822 \begin_inset Quotes eld
14826 \begin_inset Quotes erd
14829 article classes—still allowed), parts, though, use their own page, as in
14833 \begin_layout Description
14834 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14835 font commands, which have been used in the old LaTeX version 2.09 (e.
14836 \begin_inset space \thinspace{}
14840 \begin_inset space \space{}
14856 It produces an error and stops LaTeX whenever such a command appears.
14861 reallows the commands and spits out warnings instead (which does at least
14863 Since a lot of packages and particularly BibTeX style files are still using
14864 those commands, we have decided to use this option by default.
14867 \begin_layout Subsection
14871 \begin_layout Standard
14872 We will only describe the features supported by LyX (which is not much currently
14874 Please consult the Memoir manual
14878 \begin_layout Plain Layout
14883 \begin_layout Plain Layout
14893 \begin_inset Flex URL
14896 \begin_layout Plain Layout
14898 CTAN:/macros/latex/memoir/memman.pdf
14911 \begin_layout Description
14912 Abstract: You may wonder why an abstract is an extra feature.
14913 Well, it is in book class.
14914 Usually books don't have abstracts.
14915 Memoir, however, has.
14916 You can use it wherever and how often you like.
14919 \begin_layout Description
14920 Chapterprecis: You may know this older typesetting style: The contents of
14921 a chapter are summarized below the title and also in the table of contents
14923 \begin_inset space \thinspace{}
14927 \begin_inset space \space{}
14932 Our hero arrives in Troia; he loses some friends; he finds others
14935 Chapterprecis does exactly this.
14936 It is therefore only sensible below a chapter.
14939 \begin_layout Description
14940 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14941 The epigraph environment provides an elegant way of typesetting such a
14943 The motto itself (text) and its author (source) are divided by a short
14945 Unfortunately, we have to fool LyX a bit here again, since the environment
14946 needs two arguments (text and source).
14947 In this case, we have to use curly brackets (in TeX mode) between the two
14958 <author of the slogan>.
14961 \begin_layout Description
14962 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14963 complex figurative poems).
14964 LyX can only support a few of them.
14965 One is poemtitle, which is a centered title for poems, which will also
14966 be added to the table of contents (verse is the standard environment for
14968 Memoir has some enhanced versions of verse, but you need to use TeX code,
14969 because they have to be nested inside regular verse environments, which
14970 is not possible with LyX).
14973 \begin_layout Description
14974 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14977 \begin_layout Section
14978 Article (mwart), book (mwbk) and report (mwrep)
14979 \begin_inset Argument
14982 \begin_layout Plain Layout
14995 \begin_layout Standard
15001 \begin_layout Standard
15002 The LyX document classes
15018 correspond to the LaTeX document classes
15031 They are replacements for the standard document classes
15043 , resp., and fit better to Polish typography conventions in a number of points.
15047 \begin_layout Standard
15051 \begin_layout Itemize
15052 Unnumbered titles (with star, e.
15053 \begin_inset space \thinspace{}
15057 \begin_inset space \space{}
15064 ) are added into table of contents,
15067 \begin_layout Itemize
15068 Additional page styles:
15072 \begin_layout Description
15073 uheadings header with separated lines,
15076 \begin_layout Description
15077 myheadings custom header, contents headers via commands:
15092 \begin_layout Description
15093 myuheadings custom header with separated lines,
15096 \begin_layout Description
15097 outer page number is placed on outer side of page
15101 \begin_layout Itemize
15106 \begin_layout Description
15107 rmheadings serif titles — default,
15110 \begin_layout Description
15111 sfheadings sansserif titles,
15114 \begin_layout Description
15115 authortitle on title page first placed is author next title — default,
15118 \begin_layout Description
15119 titleauthor on title page first placed is title next author,
15122 \begin_layout Description
15123 withmarginpar reserve place on page for margins.
15127 \begin_layout Section
15131 \begin_layout Standard
15136 provides an alternative to the standard
15141 It provides similar functionality, but you might prefer this layout with
15142 sans serif sections, headings, and more.
15145 \begin_layout Section
15149 \begin_layout Standard
15155 \begin_layout Standard
15156 \begin_inset VSpace bigskip
15162 \begin_layout Standard
15167 \begin_inset space ~
15172 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15173 \begin_inset Formula $\beta$
15176 release of May, 1999) class.
15179 \begin_layout Standard
15184 textclass, which works with RevTeX 3.1.
15185 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15186 That means that it doesn't interact very well with LyX, which requires
15187 LaTeX2e, although it has been kludged to work.
15188 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15192 \begin_inset space ~
15197 textclass should also be pretty easy to use.
15200 \begin_layout Standard
15201 These documents are supposed to be used in
15205 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15206 macros, and assume you'll know what to put in the preamble if necessary.
15209 \begin_layout Subsection
15213 \begin_layout Standard
15214 All you need to do is install RevTeX 4, as described in the package's README
15216 The package can be found at The RevTeX 4 Web Site
15217 \begin_inset Flex URL
15220 \begin_layout Plain Layout
15222 http://publish.aps.org/revtex4/
15228 Install it somewhere that LaTeX can see it.
15229 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15231 \begin_inset space \thinspace{}
15235 \begin_inset space \space{}
15238 not the directory where you installed the class file.) Then, if you reconfigure
15239 LyX, it will find the class file and let you use the RevTeX4 textclass.
15242 \begin_layout Standard
15243 Probably the easiest way to get started is either to import a RevTeX 4 document
15251 \begin_inset space ~
15256 template, found in the templates directory.
15259 \begin_layout Subsection
15263 \begin_layout Standard
15264 Optional arguments to
15271 \begin_inset Quotes eld
15275 \begin_inset Quotes erd
15279 \begin_inset Quotes eld
15283 \begin_inset Quotes erd
15293 \begin_inset space ~
15301 \begin_inset space ~
15307 Remember that in RevTeX, at least one optional argument is required!
15310 \begin_layout Standard
15311 Other preamble matter, like
15318 \begin_inset space ~
15324 \begin_inset space ~
15329 dialog, also as usual.
15332 \begin_layout Subsection
15336 \begin_layout Standard
15337 The layouts basically correspond to the commands in RevTeX4.0.
15338 For example, the Email layout corresponds to
15345 Note that (at least as of RevTeX 4.0 Beta), the
15353 layouts are exactly equivalent, so you shouldn't need to use both.
15357 \begin_layout Plain Layout
15358 In case you're curious, both were included so that
15362 would be able to translate both
15382 \begin_layout Subsection
15386 \begin_layout Standard
15387 There are a couple of important unique aspects of RevTeX 4 which might cause
15388 bugs that will be even more confusing in LyX.
15391 \begin_layout Standard
15409 The LyX equivalent is that there is a separate Thanks layout.
15414 write footnotes in the
15418 layout, or weird things may happen.
15419 See the RevTeX 4 documentation for more details.
15422 \begin_layout Standard
15426 \begin_inset space ~
15434 \begin_inset space ~
15443 layouts must be placed
15451 layout and the corresponding
15468 , the LaTeX won't compile.
15471 \begin_layout Subsection
15475 \begin_layout Standard
15476 The main problem with this layout is that you can't use the optional arguments
15477 to layouts like Email and Title.
15478 (The problem is not unique to this layout; you can't use optional arguments
15479 to the Section layouts either.) This means that after you export that file
15480 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15481 need to edit the LaTeX file with a text editor to add the optional arguments
15483 \begin_inset space \thinspace{}
15487 \begin_inset space \space{}
15490 the running title for the page headers.
15491 Lacking these layouts makes the
15497 (and the equivalent
15503 ) useless, so the corresponding layouts don't exist, and will have to be
15508 \begin_layout Plain Layout
15513 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15514 has not been updated yet to take advantage of it.
15522 \begin_layout Section
15523 Springer Journals (
15530 \begin_layout Standard
15536 \begin_layout Subsection
15540 \begin_layout Standard
15541 These are the layout files for some of the journal formats used by Springer
15542 Verlag and listed on
15543 \begin_inset Flex URL
15546 \begin_layout Plain Layout
15548 http://www.springer.de/author/tex/help-journals.html
15553 , where you should also go to fetch the class files (yes, these are LaTeX2e
15555 It is a modular system: the things common to all journals are implemented
15560 , which journal-specific layout files (such as, e.
15561 \begin_inset space \thinspace{}
15565 \begin_inset space \space{}
15572 for Journal of Geodesy) can include.
15575 \begin_layout Standard
15576 This means that implementing support for any other Springer journal on this
15577 list is as simple as writing your own
15585 file following the outline given in
15593 \begin_layout Standard
15594 It is reasonably well tested only for the Journal of Geodesy.
15603 come with the standard LyX distribution.
15604 Install the relevant class file (downloaded from Springer) in a proper
15605 directory, reconfigure LaTeX (in the teTeX case by running
15609 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15610 and it should work.
15613 \begin_layout Subsection
15617 \begin_layout Standard
15618 A large number of theorem-like styles —
15624 \SpecialChar \ldots{}
15630 \begin_layout Standard
15633 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15634 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15637 See the Springer class file documentation for details.
15640 \begin_layout Subsection
15644 \begin_layout Itemize
15656 \begin_layout Itemize
15659 Probability Theory and Related Fields
15665 — Jean-Marc Lasgouttes
15668 \begin_layout Standard
15669 Add your own, it isn't so hard!
15672 \begin_layout Subsection
15676 \begin_layout Standard
15677 These files are partly based on the older
15681 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15682 file from Springer.
15687 layout, are now defunct.
15688 Jean-Marc Lasgouttes helped out big in making me find my way around the
15689 LyX layout file mechanism.
15692 \begin_layout Subsection
15696 \begin_layout Standard
15698 But probably less than in the old hacked-LaTeX
15705 \begin_layout Standard
15707 \begin_inset space \thinspace{}
15710 g.: does not display the number for theorem-like layouts, just #.
15713 \begin_layout Section
15719 \begin_inset CommandInset label
15728 \begin_layout Standard
15736 \begin_layout Subsection
15740 \begin_layout Standard
15741 This section describes how to use LyX to make slides for overhead projectors.
15742 There are two document classes that can do this: the default slides class
15748 This section documents the former.
15751 \begin_layout Standard
15752 I'm going to say this again, nice and clear, so that there's no misunderstanding
15756 \begin_layout Standard
15757 \begin_inset VSpace bigskip
15763 \begin_layout Standard
15767 This section documents the class
15768 \begin_inset Quotes eld
15776 \begin_inset Quotes erd
15784 \begin_layout Standard
15785 \begin_inset VSpace bigskip
15791 \begin_layout Standard
15792 If you're looking for the documentation for
15793 \begin_inset Quotes eld
15801 \begin_inset Quotes erd
15804 , check out section
15805 \begin_inset space ~
15809 \begin_inset CommandInset ref
15811 reference "sec:foiltex"
15821 \begin_inset Quotes eld
15829 \begin_inset Quotes erd
15832 ] is actually somewhat better than the default
15840 \begin_layout Plain Layout
15841 \SpecialChar \ldots{}
15842 or so I've been told repeatedly by its advocates.
15843 Having never used it, I have no idea if this claim is true or not.
15848 which this section documents.
15851 \begin_layout Standard
15852 This class is the LaTeX2e improvement of the old
15857 Every LaTeX2e distribution includes this class [which I'll just refer to
15859 \begin_inset Quotes eld
15867 \begin_inset Quotes erd
15870 from now on], so you're bound to have it.
15871 As I noted earlier, there are other classes, such as
15875 , which also produce slides for overhead projectors and do a better job
15877 However, there are some things which
15881 can do which the others can't, such as generate overlays.
15882 Read on to learn more!
15885 \begin_layout Subsection
15887 \begin_inset CommandInset label
15889 name "sec:slidesetup"
15896 \begin_layout Standard
15897 Obviously, to use this document class, you need to select
15898 \begin_inset Quotes eld
15906 \begin_inset Quotes erd
15909 from the class list in the
15911 Document\SpecialChar \menuseparator
15915 There are some other special things you should know about this class:
15918 \begin_layout Itemize
15919 Don't bother changing the options
15924 They're not supported by the
15931 \begin_layout Itemize
15935 \begin_inset space ~
15940 behaves a bit differently for this class.
15941 The possible choices and what they do are as follows:
15945 \begin_layout Description
15950 The final output contains page numbers in the lower right corner.
15953 \begin_layout Description
15962 , but also prints out any time markers you've put in.
15963 This is the default.
15966 \begin_layout Description
15971 The final output contains no page numbers, time markers, or alignment markers.
15975 \begin_layout Itemize
15980 class has an extra option:
15986 \begin_inset Quotes eld
15994 \begin_inset Quotes erd
15997 in the extra class options.
16001 \begin_layout Standard
16002 Using this options allows you to add time markers to
16008 \begin_inset space ~
16012 \begin_inset CommandInset ref
16014 reference "sec:slideNote"
16022 \begin_layout Standard
16023 You can also use the template file
16024 \begin_inset Quotes eld
16032 \begin_inset Quotes erd
16035 to automatically set up a document to use the
16041 File\SpecialChar \menuseparator
16043 \begin_inset space ~
16047 \begin_inset space ~
16052 to open your new document].
16053 The template file also contains some examples of the special paragraph
16054 environments used by this class.
16055 I'll describe those next.
16058 \begin_layout Subsection
16059 Paragraph Environments
16062 \begin_layout Subsubsection
16063 Supported Environments
16066 \begin_layout Standard
16067 The first thing you'll notice when you start up a new
16071 document is the font size and type: it's the equivalent of the size
16072 \begin_inset Quotes eld
16080 \begin_inset Quotes erd
16086 \begin_inset space ~
16092 This is also what's used in the output.
16094 \begin_inset Quotes eld
16098 \begin_inset Quotes erd
16101 to remind you that this is a slide.
16102 Your final slides will use a larger font; ergo, you'll have less space.
16103 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16106 \begin_layout Standard
16107 The next thing that becomes obvious is the changes to the paragraph environment
16108 pull-down box [at the far-left end of the toolbar].
16109 Most of the paragraph environments you're used to seeing are missing.
16110 There are also five new ones.
16115 class itself only supports certain paragraph environments:
16118 \begin_layout Itemize
16124 \begin_layout Itemize
16130 \begin_layout Itemize
16136 \begin_layout Itemize
16142 \begin_layout Itemize
16148 \begin_layout Itemize
16154 \begin_layout Itemize
16160 \begin_layout Itemize
16166 \begin_layout Itemize
16172 \begin_layout Itemize
16178 \begin_layout Itemize
16184 \begin_layout Standard
16185 All of the other standard environments, including the section-heading environmen
16186 ts, aren't used in the
16193 \begin_layout Standard
16194 On the other hand, you'll notice the following new environments:
16197 \begin_layout Itemize
16203 \begin_layout Itemize
16209 \begin_layout Itemize
16215 \begin_layout Itemize
16221 \begin_layout Itemize
16227 \begin_layout Standard
16228 These five are kind of quirky, due to a
16229 \begin_inset Quotes eld
16233 \begin_inset Quotes erd
16237 You see, LyX doesn't permit you to nest any other paragraph environment
16238 into an empty environment.
16239 Now, that's fine and dandy, but it means that you wouldn't be able to start
16240 a slide with anything except plain text.
16241 To deal with this, I've performed a little
16242 \begin_inset Quotes eld
16246 \begin_inset Quotes erd
16252 \begin_layout Subsubsection
16253 Quirks of the New Environments
16254 \begin_inset CommandInset label
16256 name "sec:slideQuirk"
16263 \begin_layout Standard
16264 All five of the new paragraph environments are somewhat quirky due to inherent
16265 limitiations in the current version of LyX.
16266 As I just mentioned, LyX forbids environments that begin with another environme
16268 To get around this, the
16272 environment isn't a paragraph environment as described in the
16280 \begin_layout Standard
16281 You should consider
16294 \begin_inset Quotes eld
16297 pseudo-environments.
16298 \begin_inset Quotes erd
16301 They look like a section heading or a
16302 \begin_inset Quotes eld
16310 \begin_inset Quotes erd
16313 but really begin a [and, if necessary, end the previous] paragraph environment.
16323 \begin_inset Quotes eld
16327 \begin_inset Quotes erd
16330 These two perform some action.
16333 \begin_layout Standard
16334 A common feature of all five environments,
16354 , is a rather long-ish label.
16355 The text following this label — ordinarily the contents of the paragraph
16356 environment — is utterly irrelevant for
16377 LyX completely ignores it.
16378 In fact, you can leave these five environments completely empty.
16382 \begin_layout Standard
16387 to put any text after the rather long-ish label, you might want to.
16388 This could be a short description of the contents of the
16393 In that case, enter your descriptive comment and hit
16397 as you normally would.
16400 \begin_layout Standard
16401 If, on the other hand, you don't want to enter any descriptive text, you'll
16402 hit another LyX quirk.
16403 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16404 environment until you put something in the old one.
16408 \begin_layout Itemize
16409 Start entering the text that will
16437 \begin_layout Itemize
16438 Now move to the beginning of that paragraph.
16442 \begin_layout Itemize
16451 \begin_layout Itemize
16452 Finally, change this new, empty paragraph to a
16476 \begin_layout Standard
16477 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16481 \begin_layout Subsection
16482 Making a Presentation with
16495 \begin_layout Subsubsection
16503 \begin_layout Standard
16504 If you're expecting this section to teach you how to actually make a presentatio
16505 n, you'll be sorely disappointed.
16506 Naturally, I'll describe all of the ways the
16510 class can assist you in preparing the materials for a presentation.
16511 Filling in the contents, however, is up to you.
16516 the LyX philosophy.]
16519 \begin_layout Standard
16524 environment [in the manner described in section
16525 \begin_inset space ~
16529 \begin_inset CommandInset ref
16531 reference "sec:slideQuirk"
16535 ] tells LyX to begin a new slide [duh].
16536 The label for this environment/
16537 \begin_inset Quotes erd
16541 \begin_inset Quotes erd
16545 \begin_inset Quotes eld
16549 \begin_inset Quotes erd
16552 in cool blue, followed by the label,
16553 \begin_inset Quotes eld
16557 \begin_inset Quotes erd
16561 Any text or paragraph environments that follow this one go on the new slide.
16565 \begin_layout Standard
16566 Slides are probably the only time you'll need to forcibly end pages in LyX
16567 (this can be specified in the
16572 In fact, you'll want to, once you finish entering the contents of one slide.
16573 If you've entered more text than can physically fit on a slide, the extra
16574 overflows onto a new slide.
16575 I don't recommend doing this, however, since the overflow slide won't have
16576 any page number on it.
16577 Furthermore, it may interfere with any
16581 you've made to accompany the oversized
16588 \begin_layout Standard
16597 environments work the same way as the
16602 They both create an
16603 \begin_inset Quotes eld
16607 \begin_inset Quotes erd
16610 followed by a label [
16611 \begin_inset Quotes eld
16615 \begin_inset Quotes erd
16619 \begin_inset Quotes eld
16623 \begin_inset Quotes erd
16627 The color is a stunning magenta instead of blue, and the
16628 \begin_inset Quotes eld
16632 \begin_inset Quotes erd
16635 will look different, in style and in length.
16636 The label fonts of all three also differ from one another.
16639 \begin_layout Standard
16644 , if the contents of a
16652 exceed the physical size of a slide or sheet of paper, the extra will overflow
16654 Again, you should avoid this.
16655 It defeats the whole purpose of
16666 \begin_layout Subsubsection
16676 \begin_layout Standard
16681 is a slide that sits atop another slide.
16682 Perhaps you wish to discuss a figure on the main
16686 before displaying the text associated with it.
16687 One way to accomplish this is tape a flap of dark paper over the part of
16692 you want to display later.
16693 This method fails, however, if you wish to overlap one graph with another,
16695 You would then have to fumble while speaking to align the two separate,
16700 s to align the two graphs.
16705 environment in both cases makes life much easier.
16708 \begin_layout Standard
16713 receives the page number of its
16714 \begin_inset Quotes eld
16718 \begin_inset Quotes erd
16726 \begin_inset Quotes eld
16734 \begin_inset Quotes erd
16741 \begin_layout Plain Layout
16742 Presumably, mutliple
16747 \begin_inset Quotes eld
16755 \begin_inset Quotes erd
16759 \begin_inset Quotes eld
16767 \begin_inset Quotes erd
16771 \begin_inset Quotes eld
16779 \begin_inset Quotes erd
16783 \begin_inset space ~
16786 appended to the page number of the parent
16796 Clearly, you want the contents of both the
16804 to each fit on a single physical slide! You should probably consider an
16810 \begin_inset Quotes eld
16814 \begin_inset Quotes erd
16826 class provides a visual cue for this: the label at the start of an
16830 is shorter than that at the start of a
16835 Lastly, when you generate printable output, you'll find alignment markers
16836 in all four corners of both the
16840 page and its parent
16845 These will assist you in lining up the two physical slides.
16848 \begin_layout Standard
16849 The major problem in overlaying two slides is aligning the contents of the
16850 two transparencies.
16851 How much space should you leave for that graph on the second slide? Worse
16852 still, what if you want a graph and a sentence on second slide, but there
16853 is text on the main transparency that goes in between them? You could try
16854 and insert vertical space of the right size.
16855 The better way is to use
16866 \begin_layout Standard
16867 As their names imply,
16875 are two command-like paragraph environments that make all subsequent text
16876 invisible and visible, respectively.
16878 \begin_inset space ~
16882 \begin_inset CommandInset ref
16884 reference "sec:slideQuirk"
16888 that you don't place anything
16892 these two environments, however.
16897 , it inserts a centered, sky-blue label into the page reading
16898 \begin_inset Quotes eld
16901 <Invisible Text Follows>
16902 \begin_inset Quotes erd
16906 For paragraphs following this label, the parts of the
16914 ; it doesn't matter which] where they would be contain instead blank space.
16918 \begin_layout Standard
16923 , the corresponding centered label is
16924 \begin_inset Quotes eld
16927 <Visible Text Follows>
16928 \begin_inset Quotes erd
16932 Paragraphs following this label behave normally.
16933 Note that the beginning of a new
16945 automatically shuts off an
16950 It's therefore not necessary to use
16961 \begin_layout Standard
16962 By now, it should be obvious how to create overlay transparencies using
16963 the proper combination of
16982 \begin_layout Enumerate
16987 , including everything that will appear on it, whether on the main slide
16995 \begin_layout Enumerate
16996 Before each figure or paragraph that will appear only on the
17005 If necessary, insert a
17009 environment after the
17016 \begin_layout Enumerate
17021 immediately following the
17028 \begin_layout Enumerate
17029 Copy the contents of this
17040 \begin_layout Enumerate
17045 , change all of the
17056 \begin_layout Standard
17058 You've just made an
17065 \begin_layout Standard
17066 There's one problem with the way I've designed the LyX
17070 class: you can't make text in the middle of a paragraph invisible, nor
17071 make text in the middle of an invisible paragraph visible again.
17072 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17076 \begin_layout Plain Layout
17077 The commands of interest are:
17080 \begin_layout Itemize
17085 invisible \SpecialChar \ldots{}
17089 \begin_layout Itemize
17094 visible \SpecialChar \ldots{}
17098 \begin_layout Plain Layout
17099 \SpecialChar \ldots{}
17100 and need to be marked as TeX.
17102 \begin_inset Quotes eld
17106 \begin_inset Quotes erd
17109 you wish to change goes in between the brackets [and after the
17122 If you don't know how to mark text as TeX, see the appropriate section
17135 \begin_layout Subsubsection
17145 \begin_inset CommandInset label
17147 name "sec:slideNote"
17154 \begin_layout Standard
17163 is associated with a
17164 \begin_inset Quotes eld
17168 \begin_inset Quotes erd
17180 class provides visual cues.
17185 is shorter than that of a
17189 [yet longer than that of an
17193 ] and, like the label of an
17197 is shockingly magenta.
17198 Additionally, the printed
17202 has the page number of its
17203 \begin_inset Quotes eld
17207 \begin_inset Quotes erd
17215 \begin_inset Quotes eld
17223 \begin_inset Quotes erd
17227 \begin_inset Quotes eld
17235 \begin_inset Quotes erd
17239 \begin_inset Quotes eld
17247 \begin_inset Quotes erd
17251 You can have multiple
17255 s associated with a single
17267 , you'll probably want to break up long
17271 s so that they fit on a single sheet of paper.
17274 \begin_layout Standard
17279 is obvious: it contains anything additional you might want to say about
17285 It could also be used as a sheet of reminders for a particular
17290 In the case of the latter, you might want to make use of time markers.
17296 \begin_inset Quotes eld
17300 \begin_inset Quotes erd
17303 support for time markers, a
17308 So, you'll have to resort to using the LaTeX codes.
17311 \begin_layout Standard
17312 To use time markers, you'll need to specify the extra class option
17313 \begin_inset Quotes eld
17321 \begin_inset Quotes erd
17325 \begin_inset space ~
17329 \begin_inset CommandInset ref
17331 reference "sec:slidesetup"
17336 This option turns on timing marks, which will appear in the lower-left-hand
17342 To set what appears in the time marker, you use the LaTeX commands
17343 \begin_inset Quotes eld
17353 \begin_inset Quotes erd
17357 \begin_inset Quotes eld
17367 \begin_inset Quotes erd
17371 The arguments of both commands are time measured in seconds.
17373 \begin_inset Quotes eld
17383 \begin_inset Quotes erd
17386 sets the time marker to a given time.
17388 \begin_inset Quotes eld
17398 \begin_inset Quotes erd
17401 increments the time marker by the specified amount.
17402 Using time markers and
17406 s in this fashion, you can remind yourself how much time to spend on a particula
17414 \begin_layout Standard
17415 There's one last feature to describe.
17416 Clearly, you'd like to print out all of your
17424 s on transparencies while printing all of your
17441 with which it is associated.
17442 What's a person to do?
17445 \begin_layout Standard
17446 Luckily, there are two LaTeX commands that allow you to select what to print
17448 Both must be placed into the preamble of your document.
17450 \begin_inset Quotes eld
17462 \begin_inset Quotes erd
17465 will cause the output to contain only the
17474 Correspondingly, the command
17475 \begin_inset Quotes eld
17487 \begin_inset Quotes erd
17490 prevents the output of anything but
17495 I'd advise placing both commands in the preamble and initially comment
17497 You can then preview your entire presentation as you write.
17498 When you're done writing, you can then uncomment one of the two to select
17499 what you want to print.
17500 I like to uncomment
17501 \begin_inset Quotes eld
17513 \begin_inset Quotes erd
17516 , print to a file with
17517 \begin_inset Quotes eld
17525 \begin_inset Quotes erd
17528 in its name, comment it back out, then uncomment
17529 \begin_inset Quotes eld
17541 \begin_inset Quotes erd
17545 \begin_inset Quotes eld
17553 \begin_inset Quotes erd
17557 I can then send either file to a printer, loading transparencies or plain
17558 paper as appropriate.
17561 \begin_layout Standard
17562 You can also provide other arguments to the
17563 \begin_inset Quotes eld
17573 \begin_inset Quotes erd
17577 \begin_inset Quotes eld
17587 \begin_inset Quotes erd
17591 See a good LaTeX book for details.
17594 \begin_layout Subsection
17599 Class Template File
17602 \begin_layout Standard
17603 I have also provided a template file,
17604 \begin_inset Quotes eld
17612 \begin_inset Quotes erd
17620 To use it, begin your new presentation with
17625 ile\SpecialChar \menuseparator
17627 \begin_inset space ~
17631 \begin_inset space ~
17641 Your new LyX presentation file will contain an example
17662 additionally contain an example of the use of
17671 Lastly, the preamble will contain:
17674 \begin_layout LyX-Code
17675 % Uncomment to print out only slides and overlays
17678 \begin_layout LyX-Code
17682 \begin_layout LyX-Code
17688 \begin_inset Newline newline
17694 \begin_layout LyX-Code
17695 % Uncomment to print out only notes
17698 \begin_layout LyX-Code
17702 \begin_layout LyX-Code
17710 \begin_layout Standard
17711 One final thing: I created this class to support the LaTeX2e
17712 \begin_inset Quotes eld
17720 \begin_inset Quotes erd
17723 class, one of the built-in LaTeX2e classes.
17724 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17725 built-in slide class.
17726 It's here if you want it or need it.
17727 There exist other LaTeX2e classes for creating presentations, such as the
17733 \begin_inset space ~
17737 \begin_inset CommandInset ref
17739 reference "sec:foiltex"
17744 \begin_inset Quotes eld
17752 \begin_inset Quotes erd
17755 package [present on some TeX distributions].
17756 The latter is not yet supported under LyX.
17760 \begin_layout Plain Layout
17761 Perhaps you can take on the task\SpecialChar \ldots{}
17767 I know nothing about these other classes.
17768 Try them out to see what sort of alternative they provide.
17771 \begin_layout Chapter
17772 LyX Features needing Extra Software
17775 \begin_layout Section
17779 \begin_layout Standard
17785 \begin_layout Subsection
17789 \begin_layout Standard
17798 \begin_layout Plain Layout
17803 is not yet available when you are using the LaTeX distribution MiKTeX.
17808 , you'll find in the
17815 \begin_inset space ~
17826 \begin_inset CommandInset href
17828 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17835 \begin_layout Standard
17840 package is a program that was written by
17841 \begin_inset Flex Noun
17844 \begin_layout Plain Layout
17846 \begin_inset space ~
17854 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17855 and easy to forget.
17856 The program runs over your LaTeX file, checks the integrity of the file,
17857 and flags some common errors.
17858 In other technical words, it is
17865 \begin_layout Standard
17866 Well, what is a syntax checker doing in LyX which is supposed to produce
17867 correct LaTeX anyways? The answer is simple: Just as
17871 not only checks the
17875 of C programs, but also does
17879 checks for type-errors,
17883 catches some common
17887 errors, in addition to the syntactical ones.
17892 is capable of detecting several common errors, such as
17895 \begin_layout Itemize
17896 Ellipsis detection:
17897 \begin_inset Newline newline
17900 Use \SpecialChar \ldots{}
17904 \begin_layout Itemize
17905 No space in front of/after parenthesis:
17906 \begin_inset Newline newline
17912 \begin_layout Itemize
17913 Enforcement of normal space after common abbreviations:
17914 \begin_inset Newline newline
17918 \begin_inset space \thinspace{}
17922 \begin_inset space \space{}
17925 is too wide spacing.
17928 \begin_layout Itemize
17929 Enforcement of end-of-sentence space when the last sentence ends with a
17931 \begin_inset Newline newline
17935 And this is wrong spacing.
17938 \begin_layout Itemize
17939 Space in front of labels and similar commands:
17940 \begin_inset Newline newline
17943 The label should stick right up to the text to avoid falling to a wrong
17946 \begin_inset CommandInset label
17956 \begin_layout Plain Layout
17957 This footnote is in danger of falling off to a wrong page
17962 The label is separated too much.
17965 \begin_layout Itemize
17966 Space in front of references, instead of hard spaces:
17967 \begin_inset Newline newline
17970 In you are in bad luck, the text will break right between the referenced
17971 text and reference number, and that's a pity.
17973 \begin_inset CommandInset ref
17975 reference "sec:chktex"
17982 \begin_layout Itemize
17984 \begin_inset Quotes eld
17988 \begin_inset Quotes erd
17992 \begin_inset Formula $\times$
17996 \begin_inset Newline newline
17999 2x2 looks cheap compared to
18000 \begin_inset Formula $2\times2$
18006 \begin_layout Standard
18007 and more \SpecialChar \ldots{}
18008 It is an invaluable tool when you are
18009 \begin_inset Quotes eld
18013 \begin_inset Quotes erd
18016 your document before printing, and you should run it right after the obligatory
18017 spelling check, and before you go fine tuning the typesetting.
18020 \begin_layout Subsection
18024 \begin_layout Standard
18025 If you have the program installed, usage is as simple as choosing
18027 Tools\SpecialChar \menuseparator
18029 \begin_inset space ~
18035 This will make LyX generate a LaTeX file of your document, start
18039 to check it, and then make LyX insert
18040 \begin_inset Quotes eld
18044 \begin_inset Quotes erd
18047 with the warnings from
18051 , if there were any.
18052 The warnings will be placed close to the point of the mistake, and you
18053 can quickly find them by using the
18055 Navigate\SpecialChar \menuseparator
18058 menu item, or the shortcut key
18067 Open the error boxes by clicking on them with the mouse, or use the shortcut
18076 bindings, or the corresponding
18085 Read the warning and correct the mistake, if it is a mistake.
18086 If you have trouble understanding what the warning is about, you can safely
18088 Remember that there is a hidden layer between the document on screen and
18089 the technical details in invoking
18093 , and this gap can make some warnings seem arcane or just right down plain
18097 \begin_layout Standard
18098 This document is an excellent testing bed for the feature, and it should
18099 provide quite a few warnings for you to fiddle with.
18100 Since computers are only so smart, expect most of the warnings to be false
18104 \begin_layout Subsection
18105 How to fine tune it
18108 \begin_layout Standard
18109 Sometimes, you'll find that
18113 makes more noise than suits your mood.
18114 Then you can choose not to use it, wait until your mood changes, or try
18119 to get better along with you.
18122 \begin_layout Standard
18131 very configurable and extensible, you shouldn't expect to solve all problems
18137 Since LyX has to generate a somewhat special LaTeX file to be able to match
18138 the line numbers from the
18146 \begin_layout Plain Layout
18147 You can inspect the specific output from
18153 Edit\SpecialChar \menuseparator
18155 \begin_inset space ~
18159 \begin_inset space ~
18173 to the internal document structure, some of the warnings will not seen
18174 to appear correctly.
18175 There are two things you can do about this:
18178 \begin_layout Itemize
18183 invocation command line in
18199 installation configuration file (usually with the file
18204 See below to learn what warnings can be enabled and disabled on the command
18209 \begin_layout Itemize
18210 Export your document as a raw LaTeX file using
18212 File\SpecialChar \menuseparator
18213 Export\SpecialChar \menuseparator
18221 Invoked in this way, it can be a hassle to find the corresponding place
18222 in the document inside LyX, but with a little patience, you should be able
18226 \begin_layout Standard
18227 Here follows the warning messages that can be enabled and disabled in
18236 to disable a warning, and
18240 to enable a warning.
18241 The emphasized entries are disabled by default, because the default is
18244 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18249 \begin_layout Standard
18250 Notice that you should only use the options that enable and disable warnings,
18251 because LyX relies on some of the other command line parameters to be set
18252 in a specific way to have a chance to communicate with
18259 \begin_layout Enumerate
18263 Command terminated with space.
18266 \begin_layout Enumerate
18269 Non-breaking space (
18270 \begin_inset Quotes eld
18278 \begin_inset Quotes erd
18281 ) should have been used.
18284 \begin_layout Enumerate
18288 You should enclose the previous parenthesis with
18289 \begin_inset Quotes eld
18297 \begin_inset Quotes erd
18303 \begin_layout Enumerate
18306 Italic correction (
18307 \begin_inset Quotes eld
18317 \begin_inset Quotes erd
18320 ) found in non-italic buffer.
18323 \begin_layout Enumerate
18326 Italic correction (
18327 \begin_inset Quotes eld
18337 \begin_inset Quotes erd
18340 ) found more than once.
18343 \begin_layout Enumerate
18347 No italic correction (
18348 \begin_inset Quotes eld
18358 \begin_inset Quotes erd
18364 \begin_layout Enumerate
18368 \begin_inset Quotes eld
18376 \begin_inset Quotes erd
18380 \begin_inset Quotes eld
18388 \begin_inset Quotes erd
18394 \begin_layout Enumerate
18397 Wrong length of dash may have been used.
18400 \begin_layout Enumerate
18404 \begin_inset Quotes eld
18412 \begin_inset Quotes erd
18416 \begin_inset Quotes eld
18424 \begin_inset Quotes erd
18430 \begin_layout Enumerate
18434 \begin_inset Quotes eld
18442 \begin_inset Quotes erd
18448 \begin_layout Enumerate
18452 \begin_inset Quotes eld
18460 \begin_inset Quotes erd
18463 to achieve an ellipsis.
18466 \begin_layout Enumerate
18469 Inter-word spacing (
18470 \begin_inset Quotes eld
18480 \begin_inset Quotes eld
18483 ) should perhaps be used.
18486 \begin_layout Enumerate
18489 Inter-sentence spacing (
18490 \begin_inset Quotes eld
18500 \begin_inset Quotes erd
18503 ) should perhaps be used.
18506 \begin_layout Enumerate
18509 Could not find argument for command.
18512 \begin_layout Enumerate
18516 \begin_inset Quotes eld
18524 \begin_inset Quotes erd
18530 \begin_layout Enumerate
18533 Math mode still on at end of LaTeX file.
18536 \begin_layout Enumerate
18540 \begin_inset Quotes eld
18548 \begin_inset Quotes erd
18551 doesn't match the number of
18552 \begin_inset Quotes eld
18560 \begin_inset Quotes erd
18566 \begin_layout Enumerate
18569 You should use either
18572 \begin_inset Quotes eld
18580 \begin_inset Quotes erd
18585 as an alternative to
18586 \begin_inset Quotes eld
18594 \begin_inset Quotes erd
18600 \begin_layout Enumerate
18607 " (ASCII 39) instead of "
18614 \begin_layout Enumerate
18617 User-specified pattern found.
18620 \begin_layout Enumerate
18623 This command might not be intended.
18626 \begin_layout Enumerate
18633 \begin_layout Enumerate
18651 \begin_layout Enumerate
18654 Delete this space to maintain correct page references.
18657 \begin_layout Enumerate
18661 You might wish to put this between a pair of
18662 \begin_inset Quotes eld
18670 \begin_inset Quotes erd
18676 \begin_layout Enumerate
18679 You ought to remove spaces in front of punctuation.
18682 \begin_layout Enumerate
18685 Could not execute LaTeX command.
18688 \begin_layout Enumerate
18697 in front of small punctuation.
18700 \begin_layout Enumerate
18708 may look prettier here.
18711 \begin_layout Enumerate
18715 Multiple spaces detected in output.
18718 \begin_layout Enumerate
18721 This text may be ignored.
18724 \begin_layout Enumerate
18730 \begin_inset Quotes eld
18735 to begin quotation, not
18742 \begin_layout Enumerate
18749 to end quotation, not
18752 \begin_inset Quotes eld
18760 \begin_layout Enumerate
18766 \begin_layout Enumerate
18769 You should perhaps use
18770 \begin_inset Quotes eld
18778 \begin_inset Quotes erd
18784 \begin_layout Enumerate
18787 You should put a space in front of/after parenthesis.
18790 \begin_layout Enumerate
18793 You should avoid spaces in front of/after parenthesis.
18796 \begin_layout Enumerate
18800 You should not use punctuation in front of/after quotes.
18803 \begin_layout Enumerate
18806 Double space found.
18809 \begin_layout Enumerate
18812 You should put punctuation outside inner/inside display math mode.
18815 \begin_layout Enumerate
18818 You ought to not use primitive TeX in LaTeX code.
18821 \begin_layout Enumerate
18824 You should remove spaces in front of
18825 \begin_inset Quotes eld
18833 \begin_inset Quotes erd
18839 \begin_layout Enumerate
18842 \begin_inset Quotes eld
18850 \begin_inset Quotes erd
18853 is normally not followed by
18854 \begin_inset Quotes eld
18862 \begin_inset Quotes erd
18868 \begin_layout Standard
18869 In later versions of LyX, we hope to provide a more complete interface to
18870 this tool (and it's smaller cousin
18874 ) to exploit the full power of it.
18875 But it's not exactly useless as it is now: go try it on one of your existing
18876 documents of a certain length and be surprised.
18879 \begin_layout Section
18880 Version Control in LyX
18883 \begin_layout Standard
18886 Lars Gullik Bjønnes
18893 \begin_layout Subsection
18897 \begin_layout Standard
18898 A friend of mine wanted to try LyX for a group project.
18899 When he didn't find support for version control or file locking, he dropped
18901 This angered me a bit, so I thought that I should at least make support
18902 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18903 This has been done.
18904 LyX now supports some of the most basic RCS/CVS/SVN commands.
18905 If you need something a bit more sophisticated you will have to do that
18906 manually in a terminal.
18909 \begin_layout Standard
18910 Also note that CVS support is not as good as subversion support so we advice
18912 Good place to start with Subversion is SVN Book
18916 \begin_layout Plain Layout
18917 \begin_inset CommandInset href
18919 target "http://svnbook.red-bean.com/"
18929 In case of RCS you should read
18930 \begin_inset Quotes eld
18934 \begin_inset Quotes erd
18937 (a man file, read it with
18942 This file describes all the basic features of RCS.
18943 You should especially notice the comment about a RCS directory, and the
18944 notion of a master RCS file (the file ending in
18951 \begin_layout Standard
18952 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18953 package—no guarantees are made for older versions.
18954 Most of the log messages are not currently displayed after operations —
18955 you can check them in Messages pane if unsure.
18958 \begin_layout Standard
18959 For introducing your own external commands consult vc-command in the manual
18963 \begin_layout Subsection
18964 RCS commands in LyX
18967 \begin_layout Standard
18968 The following sections describe the RCS commands supported by LyX.
18969 You can find them in the
18971 File\SpecialChar \menuseparator
18973 \begin_inset space ~
18979 LyX was tested against RCS 5.7.
18982 \begin_layout Subsubsection
18988 \begin_layout Standard
18989 If your document is not under revision control, this is the only item shown
18991 And if it is under revision control, the
18995 item is not visible.
18999 \begin_layout Standard
19000 This command registers your document with RCS (unless you are under the
19001 directory managed by CVS)\SpecialChar \@.
19002 You are asked interactively to supply an initial
19003 description of the document.
19004 The document is now set in Read-Only mode and you have to
19007 \begin_inset space ~
19011 \begin_inset space ~
19015 \begin_inset space ~
19020 , before making any changes to it.
19021 A document under revision control has a
19022 \begin_inset Quotes eld
19025 [RCS:<version> <locker>]
19026 \begin_inset Quotes erd
19029 item tagged to the filename in the minibuffer.
19032 \begin_layout Standard
19033 RCS command that is run:
19035 ci -q -u -i -t-"<initial description>" <file-name>
19038 \begin_layout Standard
19043 to understand the switches.
19047 \begin_layout Subsubsection
19053 \begin_layout Standard
19054 When you are finished editing a file, you check in your changes.
19055 When you do this, you are asked for a description of the changes.
19056 This is stored in the history log.
19057 The version number is bumped, your changes are applied to the master RCS
19058 file, the document is unlocked and set to Read-Only mode.
19062 \begin_layout Standard
19065 ci -q -u -m"<description>" <file-name>
19068 \begin_layout Subsubsection
19074 \begin_layout Standard
19075 By doing this you lock the document so that only you can edit it.
19076 This will also make the document Read-Write only for you.
19077 You will usually continue editing for a while and when you are finished
19078 you check in your changes.
19079 The status line is changed to reflect that you have locked the file.
19083 \begin_layout Standard
19086 co -q -l <file-name>
19089 \begin_layout Subsubsection
19092 Revert To Repository Version
19095 \begin_layout Standard
19096 This will discard all changes made to the document since the last check
19098 You get a warning before changes are discarded.
19101 \begin_layout Standard
19104 co -f -u<version> <file-name>
19107 \begin_layout Subsubsection
19113 \begin_layout Standard
19114 This makes as if the last check in never happened.
19115 No changes are made to the document loaded into LyX, but the last version
19116 is removed from the master RCS file.
19120 \begin_layout Standard
19123 rcs -o<version> <file-name>
19126 \begin_layout Subsubsection
19132 \begin_layout Standard
19133 This shows the complete history of the RCS document.
19138 is shown in a browser.
19146 \begin_layout Subsubsection
19150 \begin_layout Standard
19151 LyX supports RCS version number, author name, date and time of last commit.
19152 All those are extracted from
19154 rlog -r <file-name>
19157 For other details see
19158 \begin_inset CommandInset ref
19160 reference "sub:VCS-Revision-Information"
19167 \begin_layout Subsection
19168 CVS commands in LyX
19171 \begin_layout Standard
19172 A subset of CVS operations is supported by LyX.
19173 You can find the commands in the
19175 File\SpecialChar \menuseparator
19177 \begin_inset space ~
19183 The version control system SVN is more powerful, so please use it instead
19184 of CVS if possible.
19187 \begin_layout Subsubsection
19193 \begin_layout Standard
19194 If you start from scratch with CVS you have to create your repository and
19195 checkout the working copy with external tools.
19196 If you're using a client-server setup you may need to login before doing
19197 the first repository checkout.
19200 \begin_layout Standard
19201 If your documents are under revision control and others are using the same
19202 repository problems arise when different changes to the same document at
19203 the same location happen.
19204 Standard CVS repositories doesn't operate with a file locking mechanism.
19205 This may be surprising, but conflicts only occur if people disagree on
19206 the proper content of the same part of a document.
19207 So, if co-workers are used to communicate regularly, these conflicts occur
19209 If they don't communicate they have a fundamental problem anyway.
19210 Nevertheless some people like to work with so called
19211 \begin_inset Quotes eld
19215 \begin_inset Quotes erd
19219 If they do so the working copy of all files is readonly when checked out
19220 first and the user starts editing after using a special command to make
19221 the working copy writable.
19222 When the changes are checked in the working copy returns to readonly state.
19223 With LyX one has to edit the
19224 \begin_inset Flex Code
19227 \begin_layout Plain Layout
19233 file and add the line
19234 \begin_inset Flex Code
19237 \begin_layout Plain Layout
19243 to work with reserved checkouts.
19244 The benefit is the possibility to see who is using a writable copy of some
19246 It's not guaranteed only one user makes a copy writable.
19249 \begin_layout Standard
19250 LyX tries to guess if you're using reserved or non-reserved checkouts.
19251 If your working copy is readonly or it is writable and an additional copy
19252 of your document exists in the CVS/Base sub-directory a reserved otherwise
19253 a non-reserved checkout is assumed.
19254 When a reserved checkout is detected you have to use
19255 \begin_inset Flex MenuItem
19258 \begin_layout Plain Layout
19264 to make your working copy writable if it's readonly.
19266 \begin_inset Flex MenuItem
19269 \begin_layout Plain Layout
19275 operation is possible and that makes your working copy readonly again after
19276 transferring your changes to the repository.
19279 \begin_layout Standard
19280 More information about CVS can be found here
19281 \begin_inset Flex URL
19284 \begin_layout Plain Layout
19286 http://www.nongnu.org/cvs
19292 \begin_inset Flex URL
19295 \begin_layout Plain Layout
19297 http://ximbiot.com/cvs
19305 \begin_layout Standard
19310 to understand the sub-commands and the switches mentioned below.
19313 \begin_layout Subsubsection
19319 \begin_layout Standard
19320 If your document is not under revision control, this is the only item shown
19322 And if it is under revision control, the
19329 item is not visible.
19333 \begin_layout Standard
19334 This command registers in CVS your document
19335 \begin_inset Flex Strong
19338 \begin_layout Plain Layout
19346 in case you have already the documents directory under CVS control (in
19352 This means you have to create or checkout the archive by yourself using
19354 (In case you forget that step LyX registers the document with RCS.)
19357 \begin_layout Standard
19358 Then you are asked interactively to supply an initial description of the
19360 Don't forget that registered file is not yet checked in.
19363 \begin_layout Standard
19364 CVS command that is run:
19366 cvs -q add -m"<entered message>" "<file-name>"
19369 \begin_layout Standard
19374 above and for all other CVS commands is an abbreviation for
19375 \begin_inset Quotes eld
19378 change the current working directory to file location and use the file name
19379 without path component as argument
19380 \begin_inset Quotes erd
19386 \begin_layout Subsubsection
19392 \begin_layout Standard
19393 When you are finished editing a file, you commit your changes.
19394 When you do this and you had changed the document, you are asked for a
19395 description of the changes.
19396 After that changes are written to the repository.
19397 In case you didn't change the document and a reserved checkout is detected
19398 the reservation made on
19399 \begin_inset Flex MenuItem
19402 \begin_layout Plain Layout
19411 \begin_layout Labeling
19412 \labelwidthstring 00.00.0000
19414 \begin_inset space ~
19418 \begin_inset space ~
19422 \begin_inset Newline newline
19426 \begin_inset Flex Code
19429 \begin_layout Plain Layout
19432 -q commit -m"<description>" "<file-name>"
19438 \begin_inset Newline newline
19442 \begin_inset Flex Code
19445 \begin_layout Plain Layout
19456 \begin_layout Subsubsection
19462 \begin_layout Standard
19463 When you are sharing a repository with others, you may have to incorporate
19464 their changes into your working copy.
19467 \begin_layout Standard
19470 cvs -q update "<file-name>"
19473 \begin_layout Standard
19474 If a readonly checkout is detected the working copy is made writable and
19478 \begin_layout Standard
19481 cvs -q edit "<file-name>"
19484 \begin_layout Subsubsection
19487 Revert To Repository Version
19490 \begin_layout Standard
19491 This will discard all changes made to the document since the last check
19493 You get a warning before changes are discarded.
19494 Firstly the file is deleted, secondly CVS update command is run.
19497 \begin_layout Standard
19500 cvs -q update "<file-name>"
19503 \begin_layout Standard
19504 If a reserved checkout is detected and the working copy has no changes only
19505 the reservation is undone.
19508 \begin_layout Standard
19511 cvs -q unedit "<file-name>"
19514 \begin_layout Subsubsection
19515 Update of the local directory checkout from repository
19518 \begin_layout Standard
19519 Once your documents gets more complex, containing sub-documents and pictures,
19521 \begin_inset Flex Code
19524 \begin_layout Plain Layout
19530 files and so on using version control becomes more complicated.
19531 LyX supports updating the whole tree in which resides the document.
19532 This become especially useful once you cooperate with people which neither
19533 have detailed knowledge about CVS usage nor they have ambition to commit
19534 additional material to the repository.
19535 You have to organize the files structure so that all external files are
19536 in the same directory or subdirectories of the document.
19537 It's good practice anyway to store multipart documents in an extra directory.
19540 \begin_layout Standard
19542 \begin_inset Flex Code
19545 \begin_layout Plain Layout
19546 Update local directory from repository
19551 command updates the whole directory.
19552 If local changes are detected user is warned before update starts.
19553 In case of merge conflicts both versions of the conflicting document parts
19554 are placed in the final document.
19555 You have to review and correct the result of the merge.
19556 You'll find the conflicts enclosed in pairs of
19557 \begin_inset Flex Code
19560 \begin_layout Plain Layout
19567 \begin_inset Flex Code
19570 \begin_layout Plain Layout
19577 \begin_inset Flex Code
19580 \begin_layout Plain Layout
19587 The first part is your version as before the update operation with the
19588 document name prepended.
19589 The second one is the repository version with the version number after
19591 \begin_inset Flex Code
19594 \begin_layout Plain Layout
19603 \begin_layout Labeling
19604 \labelwidthstring 00.00.0000
19606 \begin_inset space ~
19610 \begin_inset space ~
19614 \begin_inset Newline newline
19618 \begin_inset Flex Code
19621 \begin_layout Plain Layout
19629 (Ask if changes are detected.)
19630 \begin_inset Newline newline
19634 \begin_inset Flex Code
19637 \begin_layout Plain Layout
19638 cd $path; cvs -q update
19648 \begin_layout Standard
19650 \begin_inset Flex Code
19653 \begin_layout Plain Layout
19659 stands for the path to the document.
19662 \begin_layout Subsubsection
19668 \begin_layout Standard
19669 This shows the complete history of the CVS document.
19672 cvs log "<file-name>"
19674 is shown in a browser.
19677 \begin_layout Subsection
19678 SVN commands in LyX
19681 \begin_layout Standard
19682 SVN is now partially supported by LyX.
19683 You can find the commands in the
19685 File\SpecialChar \menuseparator
19687 \begin_inset space ~
19693 Please note that if you use password protected access to repository via
19694 ssh, you will be asked in terminal window.
19695 LyX was tested against SVN 1.5 and 1.6
19699 \begin_layout Plain Layout
19700 Most of the commands will work with 1.4 too, see
19701 \begin_inset CommandInset ref
19703 reference "sub:SVN-Repo-Update"
19715 \begin_layout Subsubsection
19721 \begin_layout Standard
19722 If your document is not under revision control, this is the only item shown
19724 And if it is under revision control, the
19731 item is not visible.
19735 \begin_layout Standard
19736 This command registers in SVN your document ONLY in case you have already
19737 the documents directory under SVN control (in particular
19742 This means you have to checkout the archive by yourself.
19746 \begin_layout Standard
19747 Then you are asked interactively to supply an initial description of the
19749 Don't forget that registered file is not yet commited.
19752 \begin_layout Standard
19753 SVN command that is run:
19756 \begin_inset Quotes eld
19760 \begin_inset Quotes erd
19766 \begin_layout Standard
19771 to understand the switches.
19775 \begin_layout Subsubsection
19781 \begin_layout Standard
19782 When you are finished editing a file, you commit your changes.
19783 When you do this, you are asked for a description of the changes.
19784 After that changes are commited.
19787 \begin_layout Standard
19792 \begin_layout Plain Layout
19793 In case locking is not enabled.
19795 \begin_inset CommandInset ref
19797 reference "subsec:SVN-File-Locking"
19808 svn commit -q -m"<description>" <file-name>
19811 \begin_layout Subsubsection
19817 \begin_layout Standard
19818 Updates the changes of this file from the repository.
19819 Be sure you understand SVN merging and conflicts resolving before using
19820 this function, because all conflicts has to be resolved manually by you!
19823 \begin_layout Standard
19828 \begin_layout Plain Layout
19836 svn update --non-interactive
19837 \begin_inset Quotes eld
19841 \begin_inset Quotes erd
19847 \begin_layout Subsubsection
19850 Revert To Repository Version
19853 \begin_layout Standard
19854 This will discard all changes made to the document since the last check
19856 You get a warning before changes are discarded.
19860 \begin_layout Standard
19864 \begin_inset Quotes eld
19868 \begin_inset Quotes erd
19874 \begin_layout Subsubsection
19875 \begin_inset CommandInset label
19877 name "sub:SVN-Repo-Update"
19881 Update of the local directory checkout from repository
19885 \begin_layout Plain Layout
19886 Note that this command will work only with subversion
19887 \begin_inset Formula $\geqq1.5$
19898 \begin_layout Standard
19899 All the commands above have one shortcomming - they deal with the current
19901 Once your document contains pictures, includes external
19902 \begin_inset Flex Code
19905 \begin_layout Plain Layout
19911 files and so on administration becomes more complicated.
19912 LyX now supports updating the whole tree in which resides the document
19916 \begin_layout Plain Layout
19917 One need to organize the files structure so that all external files are
19918 in the same directory or subdirectories of the document.
19925 This become especially useful once you cooperate with people which neither
19926 know about subversion management nor they have ambition to commit additional
19927 material to the repository.
19931 \begin_layout Standard
19932 \begin_inset Flex Code
19935 \begin_layout Plain Layout
19936 Update local directory from repository
19941 command updates the whole directory and in case of merge conflicts local
19942 version of the files are left, so no unintended data loss occurs.
19943 If local changes are detected user is warned before update starts.
19946 \begin_layout Labeling
19947 \labelwidthstring 00.00.0000
19949 \begin_inset space ~
19953 \begin_inset space ~
19957 \begin_inset Newline newline
19961 \begin_inset Flex Code
19964 \begin_layout Plain Layout
19970 (Ask if changes are detected.)
19971 \begin_inset Newline newline
19975 \begin_inset Flex Code
19978 \begin_layout Plain Layout
19979 svn update --accept mine-full $path
19987 \begin_layout Standard
19989 \begin_inset Flex Code
19992 \begin_layout Plain Layout
19998 stands for the path to the document.
20001 \begin_layout Subsubsection
20007 \begin_layout Standard
20008 This shows the complete history of the SVN document.
20012 \begin_inset Quotes eld
20016 \begin_inset Quotes erd
20021 is shown in a browser.
20024 \begin_layout Subsubsection
20026 \begin_inset CommandInset label
20028 name "subsec:SVN-File-Locking"
20035 \begin_layout Standard
20036 The file exchange through various revision control systems brings the problem
20037 of merge conflicts in case two different users try to edit the same (parts
20039 When such a conflict happens it needs manual resolving and one reasonable
20040 alternative is to provide some kind of locking mechanism, which guarantees
20041 that only one user is allowed to edit file at the given time.
20044 \begin_layout Standard
20045 SVN has two such mechanisms to provide mutual exclusivity for file access
20046 - locks and automatic setting of write permissions (see sec.
20048 \begin_inset CommandInset ref
20050 reference "subsec:Automatical-Locking-Property"
20055 \begin_inset Flex Code
20058 \begin_layout Plain Layout
20068 \begin_layout Plain Layout
20069 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20075 If this property is detected for a given document LyX starts to use SVN
20076 locks for document editing automatically and the whole check-in/out mechanism
20077 switches to the same regimen as for RCS.
20078 This in particular means there are two different modes of file use in LyX:
20081 \begin_layout Itemize
20083 The loaded file is in the read-only mode.
20084 For editing on needs to check-out.
20089 consists of updating from the repository and gaining write lock.
20090 If the lock is not possible to obtain, we remain in unlocked state.
20093 \begin_layout Itemize
20095 The loaded file is in the 'normal' edit mode.
20096 No other user is allowed to edit the file.
20101 consists of commiting changes and releasing write-lock.
20102 If no changes have been made to the document, no commit will be produced
20106 \begin_layout Plain Layout
20107 Don't be puzzled by the fact that you will be asked for commit message anyway.
20112 and only the write-lock will be released.
20115 \begin_layout Standard
20119 \begin_layout Labeling
20120 \labelwidthstring 00.00.0000
20123 svn commit -q -m"<description>" "<file-name>"
20124 \begin_inset Newline newline
20127 svn unlock "<file-name>"
20130 \begin_layout Labeling
20131 \labelwidthstring 00.00.0000
20134 svn update "<file-name>"
20135 \begin_inset Newline newline
20138 svn lock "<file-name>"
20141 \begin_layout Subsubsection
20144 \begin_inset CommandInset label
20146 name "subsec:Automatical-Locking-Property"
20152 Automatic Locking Property
20155 \begin_layout Standard
20156 The above mentioned automatic setting of write permissions of the .lyx file
20162 ile\SpecialChar \menuseparator
20168 \begin_inset space ~
20171 Control\SpecialChar \menuseparator
20176 oggle locking property
20179 This command is active only when the file is not locked on the svn server
20181 you need to check-out before proceeding).
20184 \begin_layout Labeling
20185 \labelwidthstring 00.00.0000
20187 \begin_inset space ~
20193 \begin_layout Labeling
20194 \labelwidthstring 00.00.0000
20197 svn propset svn:needs-lock ON "<file-name>"
20200 \begin_layout Labeling
20201 \labelwidthstring 00.00.0000
20204 svn propdel svn:needs-lock "<file-name>"
20207 \begin_layout Subsubsection
20208 \begin_inset CommandInset label
20210 name "sub:VCS-Revision-Information"
20214 Revision Information in Documents
20217 \begin_layout Standard
20218 There are more possibilities how to activate revision information in our
20222 \begin_layout Itemize
20223 LyX supports directly:
20227 \begin_layout Itemize
20228 tree revision information (
20229 \begin_inset Flex Code
20232 \begin_layout Plain Layout
20239 The result is the output of the
20240 \begin_inset Flex Code
20243 \begin_layout Plain Layout
20249 command, the following table gives you an idea, how to read the results.
20252 \begin_layout Standard
20254 \begin_inset Tabular
20255 <lyxtabular version="3" rows="6" columns="2">
20256 <features tabularvalignment="middle">
20257 <column alignment="center" valignment="top" width="0">
20258 <column alignment="center" valignment="top" width="0">
20260 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20263 \begin_layout Plain Layout
20269 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20272 \begin_layout Plain Layout
20280 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20283 \begin_layout Plain Layout
20289 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20292 \begin_layout Plain Layout
20293 mixed revision working copy
20300 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20303 \begin_layout Plain Layout
20309 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20312 \begin_layout Plain Layout
20313 modified working copy
20320 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20323 \begin_layout Plain Layout
20329 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20332 \begin_layout Plain Layout
20333 switched working copy
20340 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20343 \begin_layout Plain Layout
20349 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20352 \begin_layout Plain Layout
20353 partial working copy, from a sparse checkout
20360 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20363 \begin_layout Plain Layout
20369 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20372 \begin_layout Plain Layout
20373 mixed revision, modified, switched working copy
20386 \begin_layout Itemize
20387 file revision information.
20388 The result comes from parsing the output of
20389 \begin_inset Flex Code
20392 \begin_layout Plain Layout
20394 \begin_inset space ~
20398 \begin_inset space ~
20402 \begin_inset space ~
20411 Supported flags are:
20415 \begin_layout Itemize
20416 version number of the last commit (
20417 \begin_inset Flex Code
20420 \begin_layout Plain Layout
20429 \begin_layout Itemize
20430 author of the last commit (
20431 \begin_inset Flex Code
20434 \begin_layout Plain Layout
20443 \begin_layout Itemize
20444 date of the last commit (
20445 \begin_inset Flex Code
20448 \begin_layout Plain Layout
20457 \begin_layout Itemize
20458 time of the last commit (
20459 \begin_inset Flex Code
20462 \begin_layout Plain Layout
20472 \begin_layout Standard
20473 You can obtain this info via InsetInfo (e.g.
20475 \begin_inset Flex Code
20478 \begin_layout Plain Layout
20479 info-insert buffer vcs-date
20485 The information will be available only when you have the file stored under
20486 svn managment (i.e.
20488 \begin_inset Flex Code
20491 \begin_layout Plain Layout
20497 directory is available with your document).
20501 \begin_layout Itemize
20502 Another---a hacking one---possibility is to use svn keywords
20506 \begin_layout Plain Layout
20507 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20513 In short -- you set file keywords property (e.g.
20516 svn propset svn:keywords 'Rev' file.lyx
20518 ) and then paste keyword TeX code
20522 \begin_layout Plain Layout
20523 This is an easy way how to ensure that LyX won't break the line in the middle
20529 tag in your document (e.g.
20534 \begin_layout Plain Layout
20542 This way svn client will automatically substitute revision number (e.g.
20547 \begin_layout Plain Layout
20554 ) after each update and commit.
20555 There are more problems with this approach.
20556 Firstly, the '$' character is used in TeX world for math equations, so
20557 any occurence of math formula
20558 \begin_inset Formula $Rev$
20562 \begin_inset Formula $Rev:59$
20565 in your LyX document.
20566 Similarly for other keywords like Id, Date, Author, etc.
20567 Secondly svn output is dependent on your locales, so its very easy that
20568 svn would produce some problematic strings once Date is used.
20569 Thirdly you get the whole 'Rev: 59' string in your document instead of
20571 Until subversion implements user's custom keywords it will be hard to use
20572 this approach reliably or let LyX to support it directly.
20575 \begin_layout Subsection
20576 SVN and Windows Environment
20579 \begin_layout Quote
20580 My inclination is to say that if the user cannot figure out the command
20581 line operations on their own fairly quickly, they would be well advised
20582 to use TortoiseSVN.
20588 \begin_layout Subsubsection
20592 \begin_layout Standard
20593 In addition to installing LyX, and having access to a Subversion repository,
20594 the user will need to install the Subversion client program.
20595 A Windows installer for the client program is available from
20596 \begin_inset CommandInset href
20599 target "http://www.collab.net/nonav/downloads/subversion/"
20604 The user may also want to install
20605 \begin_inset CommandInset href
20608 target "http://tortoisesvn.tigris.org/"
20612 , which integrates Subversion operations into the context (rightclick) menu
20613 of Windows Explorer.
20614 Operations done outside LyX will typically be more convenient using the
20615 Explorer context menu.
20616 Note that TortoiseSVN is not a replacement for the client program, which
20617 is what LyX itself will use.
20620 \begin_layout Subsubsection
20621 Bringing a document under Subversion control
20624 \begin_layout Standard
20625 Before a LyX document can be brought under version control in Subversion,
20626 its parent directory needs to be under version control.
20627 If the document is being added to a project already in the repository,
20628 this is accomplished by checking the project out to the directory where
20629 the new document will be placed.
20630 If the project itself is not yet under version control (for instance, if
20631 this document starts a new project), the directory must be imported into
20633 This is done outside LyX.
20634 Both import and checkout are easily accomplished from the Explorer context
20635 menu using TortoiseSVN, or alternatively can be done using the command
20636 line client at a DOS prompt.
20637 The procedure for importing the project using TortoiseSVN is described
20638 below, assuming an existing repository and a new project being started
20646 For information on using the Subversion client program, run
20653 \begin_layout Enumerate
20660 in Windows Explorer, right click it, and select
20662 TortoiseSVN > Repo-browser
20665 If necessary, adjust the URL for the repository, then click OK.
20668 \begin_layout Enumerate
20669 Right click the level of the repository under which you want to place the
20670 new project folder (typically the top level) and click
20672 Create folder\SpecialChar \ldots{}
20675 Supply a name for the project folder and click OK.
20676 Add a message for the log file if desired, then click OK again.
20677 The new project folder should appear in the repository.
20678 Finally, click OK again to exit the repository browser.
20681 \begin_layout Enumerate
20682 Once again right click
20688 , this time selecting SVN Checkout\SpecialChar \ldots{}
20689 Select the URL of the project folder
20690 you just created in the repository, and set the checkout directory to
20698 You will be warned about a non-empty folder; click OK to proceed.
20699 You should now have a
20710 \begin_layout Enumerate
20711 Create or open your document in LyX and click
20716 ile\SpecialChar \menuseparator
20722 \begin_inset space ~
20725 Control\SpecialChar \menuseparator
20733 Add a log message and click OK to commit the document to version control.
20736 \begin_layout Standard
20737 From this point onward, you should have full functionality in the
20742 ile\SpecialChar \menuseparator
20748 \begin_inset space ~
20754 You also have the option of checking the document in and out, viewing its
20756 using the TortoiseSVN context menu in Windows Explorer or the Subversion
20757 client program from a command prompt.
20760 \begin_layout Subsubsection
20761 SSH tunnel used with SVN under Windows
20764 \begin_layout Standard
20765 Compared with Linux setting up svn client to communicate over ssh under
20766 Windows is a rather troublesome task.
20767 We will at least offer some hints how to setup the client side but prior
20768 knowledge about ssh and the Windows command line is needed, also be prepared
20769 for a great deal of frustration\SpecialChar \ldots{}
20773 \begin_layout Enumerate
20774 Get a svn client for windows, as described in the previous sections.
20775 When it is a fresh install run some svn command (e.g.
20777 \begin_inset Flex Code
20780 \begin_layout Plain Layout
20786 ) to create config files, which you will need to change later on.
20789 \begin_layout Enumerate
20790 Choose a ssh client for Windows.
20791 There are several possibilities, we will use the one from Putty tools
20795 \begin_layout Plain Layout
20796 \begin_inset Flex URL
20799 \begin_layout Plain Layout
20801 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20812 You will need to set the connection up so that the client doesn't ask for
20813 any password from you.
20814 To keep things easy we will use only keys without any additional password
20819 \begin_layout Enumerate
20821 \begin_inset Flex Code
20824 \begin_layout Plain Layout
20831 Save your private .ppk key file and put the public one on the server side.
20832 If the SVN server runs on Linux, note that the format of the public key
20833 is not compatible with Linux openssh and you will need to direcly copy-paste
20836 Public key for pasting into OpenSSH authorized_keys file
20838 :” edit field into the server's
20839 \begin_inset Flex Code
20842 \begin_layout Plain Layout
20843 ~/.ssh/authorized_keys
20849 \begin_inset Flex Code
20852 \begin_layout Plain Layout
20861 \begin_layout Enumerate
20863 \begin_inset Flex Code
20866 \begin_layout Plain Layout
20873 In the SVN config file
20877 \begin_layout Plain Layout
20878 Exact path depends on Windows version, usually somewhere around
20879 \begin_inset Flex Code
20882 \begin_layout Plain Layout
20885 Documents and Settings
20899 \begin_inset Flex Code
20902 \begin_layout Plain Layout
20917 , section [tunnels], setup ssh command, e.g.
20919 \begin_inset Flex Code
20922 \begin_layout Plain Layout
20923 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20932 \begin_layout Plain Layout
20933 It will usually take a lot of time to get exact command right and it depends
20935 For example do not have some remote server saved as a default session in
20937 If things fail, try to connect via plink without SVN first.
20946 \begin_layout Enumerate
20947 Checkout the SVN archive, e.g.
20949 \begin_inset Flex Code
20952 \begin_layout Plain Layout
20953 svn co svn+ssh://user@server/repository_path
20961 \begin_layout Subsubsection
20962 End-of-Line Conversions
20965 \begin_layout Standard
20966 When the collsraborators are mixing Linux and Windows environments, LyX
20967 will use different line endings inside the .lyx files.
20968 This is not a problem as far as LyX functionality is concerned, but the
20969 commit diffs will be huge and merge-conflicts prone.
20970 Fortunately SVN itself knows
20974 \begin_layout Plain Layout
20975 \begin_inset Flex URL
20978 \begin_layout Plain Layout
20980 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20990 how to deal with CR/LF problems when switching .lyx files to the
20991 \begin_inset Flex Code
20994 \begin_layout Plain Layout
21004 \begin_layout Plain Layout
21006 \begin_inset Flex Code
21009 \begin_layout Plain Layout
21010 svn propset svn:eol-style native FILE_NAME
21023 \begin_layout Subsection
21027 \begin_layout Standard
21028 With the recent addition of the vc-command function LyX power users are
21029 allowed to create their own commands for revision control.
21032 \begin_layout Standard
21033 As an example you can see how two TortoiseSVN commands could be integrated
21037 \begin_layout Description
21039 \begin_inset Flex Code
21042 \begin_layout Plain Layout
21043 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21051 \begin_layout Description
21053 \begin_inset Flex Code
21056 \begin_layout Plain Layout
21057 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21065 \begin_layout Subsection
21066 Version control and Document comparison
21069 \begin_layout Standard
21070 One of the typical uses of version control is to inspect the changes between
21071 revisions, usually by creating
21072 \begin_inset Flex Code
21075 \begin_layout Plain Layout
21082 While this is useful for plain text files, it is much less useful in the
21083 case of LyX files, which have more complicated structure.
21084 Hence we provide binding to the Document comparison feature.
21085 They are two ways of calling this feature - either by direct call of
21086 \begin_inset Flex Code
21089 \begin_layout Plain Layout
21095 LyX function (for details see LyX functions manual) or by icon/menu item
21097 \begin_inset Flex MenuItem
21100 \begin_layout Plain Layout
21101 Compare with older revision...
21107 One can either compare two chosen revisions of the document or he can simply
21108 compare the current version of edited text with older revisions (where
21110 \begin_inset Flex MenuItem
21113 \begin_layout Plain Layout
21119 ' revisions back means comparison of the edited file with last commited
21124 \begin_layout Standard
21125 This feature is supported for SVN and RCS though due to the more complicated
21126 versioning scheme of RCS there is a constraint -- when addressing the revisions
21127 in dialog, numbers always point to the last number in RCS revision number,
21132 \begin_layout Section
21133 Literate Programming
21136 \begin_layout Standard
21141 (kayvan@sylvan.com)
21145 original documentation written by
21147 Edmar Wienskoski Jr.
21150 (edmar-w-jr@technologist.com)
21153 \begin_layout Subsection
21157 \begin_layout Standard
21158 The main purpose of this documentation is to show you how to use LyX for
21159 literate programming, where it is assumed that you are familiar with this
21160 programming technique, and know what
21161 \begin_inset Quotes eld
21165 \begin_inset Quotes erd
21169 \begin_inset Quotes eld
21173 \begin_inset Quotes erd
21177 If that is not the case, please follow the web links provided in the following
21179 There is a lot of good documentation out there covering old development
21180 history to the latest tools tips.
21183 \begin_layout Standard
21184 It is also assumed that you are familiar with LyX itself to a point that
21185 you are comfortable changing your LyX preferences, and X resources file.
21186 If that is not the case please refer to other LyX documentation to cover
21187 your specific needs.
21190 \begin_layout Subsection
21191 Literate Programming
21194 \begin_layout Standard
21195 From the Literate Programming FAQ:
21198 \begin_layout Quotation
21199 Literate programming is the combination of documentation and source together
21200 in a fashion suited for reading by human beings.
21201 In fact, literate programs should be enjoyable reading, even inviting!
21202 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21203 and documentation in a single file.
21204 Literate programming tools then parse the file to produce either readable
21205 documentation or compilable source.
21206 The WEB style of literate programming was created by D.
21207 \begin_inset space \thinspace{}
21211 Knuth during the development of his TeX typesetting software.
21215 \begin_layout Standard
21216 Another excerpt says:
21219 \begin_layout Quotation
21222 How is literate programming different from verbose commenting?
21225 \begin_layout Quotation
21226 There are three distinguishing characteristics.
21227 In order of importance, they are:
21231 \begin_layout Itemize
21232 flexible order of elaboration
21235 \begin_layout Itemize
21236 automatic support for browsing
21239 \begin_layout Itemize
21240 typeset documentation, especially diagrams and mathematics
21244 \begin_layout Standard
21245 Now that I sparked your curiosity, take a look in the references.
21248 \begin_layout Subsubsection
21252 \begin_layout Standard
21253 The complete Literate Programming FAQ can be found at:
21256 \begin_layout Quote
21257 Literate Programming FAQ
21258 \begin_inset Flex URL
21261 \begin_layout Plain Layout
21263 http://www.literateprogramming.com/lpfaq.pdf
21271 \begin_layout Standard
21272 The FAQ lists 23 (twenty three!) different literate programming tools.
21273 Where some are specialized or
21274 \begin_inset Quotes eld
21278 \begin_inset Quotes erd
21281 for particular programming languages, while other have general scope.
21286 for my own use for several reasons:
21289 \begin_layout Itemize
21290 It can generate the documentation either in LaTeX or HTML.
21293 \begin_layout Itemize
21294 It has a open architecture, i.
21295 \begin_inset space \thinspace{}
21299 \begin_inset space \space{}
21302 it is easy to plug in new filters and to perform special processing that
21307 \begin_layout Itemize
21308 There is a good selection of filters available already (the HTML is one
21312 \begin_layout Itemize
21316 \begin_layout Standard
21317 The Noweb web page can be found at:
21320 \begin_layout Quote
21322 \begin_inset Flex URL
21325 \begin_layout Plain Layout
21327 http://www.cs.virginia.edu/~nr/noweb/
21335 \begin_layout Standard
21336 Starting from there you can reach many other interesting links and even
21337 some literate program examples.
21340 \begin_layout Subsection
21341 LyX and Literate Programming
21344 \begin_layout Standard
21345 The LyX support for Literate Programming is provided by using the generic
21346 LyX converters mechanism.
21347 This support is provided in a
21348 \begin_inset Quotes eld
21352 \begin_inset Quotes erd
21356 \begin_inset space \thinspace{}
21360 \begin_inset space \space{}
21363 you will be able to use this new LyX feature with some other literate programmin
21364 g tool of your choice by just changing your LyX preferences.
21367 \begin_layout Subsubsection
21368 Generating documents and code (weaving and tangling)
21371 \begin_layout Paragraph
21372 Selecting the document class
21375 \begin_layout Standard
21376 If you have installed Noweb and LyX successfully, whenever you open a new
21377 document or try to change the document class of an existing one, you will
21378 find that there are three new document classes available:
21381 \begin_layout Itemize
21385 \begin_layout Itemize
21389 \begin_layout Itemize
21393 \begin_layout Standard
21394 You must select one of them to create your literate documents from.
21398 \begin_layout Standard
21399 Note that literate documents are not limited to these three classes.
21400 New classes can be generated from other styles like letter or in combination
21401 with other class variations like Article (AMS).
21402 If you have special needs that cannot be covered by one of the existing
21403 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21404 will arrange to insert a new entry, or teach you how to do it.
21408 \begin_layout Plain Layout
21409 It is very simple, it involves the creation of a file with four lines, and
21410 re-running of the auto configuration.
21415 Moreover, if you use a literate tool other than Noweb you may need to create
21416 a new set of document classes for it.
21419 \begin_layout Paragraph
21423 \begin_layout Standard
21424 LyX enables you to write code with a layout named
21432 \begin_layout Plain Layout
21433 The equivalent Noweb term is
21434 \begin_inset Quotes eld
21438 \begin_inset Quotes erd
21442 For historical reasons, I got used to the term
21443 \begin_inset Quotes eld
21447 \begin_inset Quotes erd
21450 introduced by other literate tool named Nuweb, which I used for many years
21451 before rendering myself to Noweb.
21456 Noweb delimits scraps like this:
21459 \begin_layout LyX-Code
21463 \begin_layout LyX-Code
21467 \begin_layout LyX-Code
21471 \begin_layout LyX-Code
21475 \begin_layout LyX-Code
21479 \begin_layout Standard
21480 The problem is that whatever is written in between the << and the
21484 must be taken literally, i.
21485 \begin_inset space \thinspace{}
21489 \begin_inset space \space{}
21492 LyX should be prevented from making any special interpretation of what has
21494 This is handled by a special layout named Scrap, that works like a normal
21495 paragraph but has a free spacing capability.
21498 \begin_layout Standard
21499 The down side of the Scrap paragraph layout is that consecutive paragraphs
21500 of code will be spaced with one empty line in the source code and also
21501 in the printed documentation.
21502 The work around is to enter each line of code within a single Scrap, with
21503 a newline (ctrl-return).
21504 The example above will look like this:
21508 \begin_layout Plain Layout
21509 If you have a printed version of this document you will not see any difference
21510 between the previous example and this one.
21518 \begin_layout LyX-Code
21520 \begin_inset Newline newline
21524 \begin_inset Newline newline
21528 \begin_inset Newline newline
21532 \begin_inset Newline newline
21538 \begin_layout Standard
21539 This layout works fine.
21540 The only real inconvenience is that you have to type ctrl-return instead
21545 \begin_layout Plain Layout
21546 It is in my list of
21547 \begin_inset Quotes eld
21551 \begin_inset Quotes erd
21562 \begin_layout Standard
21563 As a special note, you can also use the
21564 \begin_inset Quotes eld
21568 \begin_inset Quotes erd
21571 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21575 \begin_layout LyX-Code
21577 \begin_inset Newline newline
21580 def some_function(args):
21581 \begin_inset Newline newline
21584 "This is the doc string for this function."
21585 \begin_inset Newline newline
21588 print "My args: ", args
21591 \begin_layout LyX-Code
21592 @ %def some_function
21595 \begin_layout Standard
21596 For an example of this usage and the resulting cross-reference output, look
21597 at the Literate python program in
21599 LIBDIR/examples/listerrors.lyx
21601 which should make this all clear.
21604 \begin_layout Paragraph
21605 Generating the documentation
21608 \begin_layout Standard
21609 At this point you already have a new document file with a proper document
21610 class, and with some code and text on it.
21611 How do I print it? The answer is simple, you select
21613 View\SpecialChar \menuseparator
21617 Just like you would do for a plain document.
21618 No special procedure is required.
21621 \begin_layout Standard
21622 To help orientate you, I will now explain what happens inside LyX:
21625 \begin_layout Enumerate
21628 Update\SpecialChar \menuseparator
21631 menu option is chosen, a LaTeX file is generated.
21636 \begin_layout Standard
21637 If the document is of any literate class the generated file will be named
21638 with an extension name defined by the
21639 \begin_inset Quotes eld
21643 \begin_inset Quotes erd
21646 format (defined in the Preferences panel), otherwise the file will have
21655 \begin_layout Enumerate
21656 Note that the only difference so far is in the name of the file, no special
21657 processing is required by LyX.
21658 Given that you formatted the code using the Scrap layout that, by itself,
21659 takes care of the business.
21662 \begin_layout Enumerate
21663 If the document is of any literate class LyX will then use the internal
21664 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21668 \begin_layout Plain Layout
21669 The converters are defined in the
21671 Tools\SpecialChar \menuseparator
21675 \begin_inset Quotes eld
21679 \begin_inset Quotes erd
21691 manual for general information about converters.
21696 to generate the LaTeX file.
21700 \begin_layout Standard
21701 Otherwise it will just skip this step.
21705 \begin_layout Enumerate
21706 Finally, LaTeX is invoked and the regular post processing continues as in
21710 \begin_layout Standard
21711 Independence from a particular
21712 \begin_inset Quotes eld
21716 \begin_inset Quotes erd
21719 is easily achieved by changing the commands that are run by the various
21723 \begin_layout Paragraph
21724 Generating the code
21727 \begin_layout Standard
21728 When the build menu option is chosen or the corresponding button in the
21729 toolbar is pressed, a LaTeX file is generated just like step 1 above.
21730 Next, LyX invokes the
21735 This converter needs to be defined by the user and is not installed by
21736 default, though the Program format is.
21737 This converter (like any other converter) will have two parts:
21740 \begin_layout Enumerate
21741 The converter program itself.
21742 This program performs the conversion from the one format to the other (in
21743 this case, from the Noweb format to the Program pseudo-format).
21746 \begin_layout Enumerate
21747 The error log parser.
21748 This is a program whose sole purpose is to rewrite error messages in a
21749 format that LyX understands.
21750 This makes it possible for LyX to place error boxes in the right places
21751 in the file buffer.
21754 \begin_layout Standard
21755 The first part, the
21756 \begin_inset Quotes eld
21760 \begin_inset Quotes erd
21763 setting, should be set to
21764 \begin_inset Quotes eld
21772 \begin_inset Quotes erd
21776 This basically means that LyX will call
21777 \begin_inset Quotes eld
21781 \begin_inset Quotes erd
21784 (a program or script) with the name of the Noweb file (normally a file
21785 in the LyX temp directory).
21789 \begin_layout Standard
21790 This is an implementation of
21791 \begin_inset Quotes eld
21795 \begin_inset Quotes erd
21798 that you can place in a directory on your path:
21801 \begin_layout LyX-Code
21805 \begin_layout LyX-Code
21809 \begin_layout LyX-Code
21810 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21813 \begin_layout Standard
21814 The next part of the converter setting is the
21815 \begin_inset Quotes eld
21819 \begin_inset Quotes erd
21822 which is to be set to
21823 \begin_inset Quotes eld
21828 parselog=listerrors
21831 \begin_inset Quotes erd
21835 This will run any errors that are generated by the
21836 \begin_inset Quotes eld
21840 \begin_inset Quotes erd
21843 process through the
21844 \begin_inset Quotes eld
21848 \begin_inset Quotes erd
21854 \begin_layout Standard
21855 The converter code looks in
21863 then on the path for the
21864 \begin_inset Quotes eld
21868 \begin_inset Quotes erd
21874 \begin_layout Standard
21875 The build will normally take place in LyX's temporary directory, so the
21876 files produced by the conversion will be in that directory.
21877 LyX will copy out what it regards as the `main' file, but the
21881 conversion may produce several files, and so most of these would then be
21882 deleted when LyX was closed.
21883 The present solution is to use a `copier',
21887 \begin_layout Plain Layout
21896 manual for information on these.
21905 script in its default mode, so that the entire contents of the temporary
21906 directory is copied.
21907 More will get copied than is needed, to be sure, but nothing will be lost.
21908 If, however, you know what extensions the generated files will have, this
21909 can be improved by using the
21918 This option takes a comma-separated list of extensions to copy.
21919 So, for example, if the conversion will generate only files with the extensions
21928 , then the correct definition would be:
21931 \begin_layout LyX-Code
21932 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21935 \begin_layout Standard
21936 The result will be that only files with these two extensions will be copied
21940 \begin_layout Paragraph
21941 Build instructions in the document
21944 \begin_layout Standard
21945 The last piece of the integration between LyX and noweb is the
21946 \begin_inset Quotes eld
21950 \begin_inset Quotes erd
21954 Generally, the instructions for building your program should be embedded
21955 in a scrap of its own.
21957 \begin_inset Quotes eld
21961 \begin_inset Quotes erd
21964 above uses the notangle command to look for this scrap (called
21965 \begin_inset Quotes eld
21969 \begin_inset Quotes erd
21972 ) and runs its contents through
21973 \begin_inset Quotes eld
21977 \begin_inset Quotes erd
21983 \begin_layout Standard
21984 Typically, such a scrap would look something like this:
21987 \begin_layout LyX-Code
21989 \begin_inset Newline newline
21993 \begin_inset Newline newline
21997 \begin_inset Newline newline
22000 if [ -z "${NOWEB_SOURCE}" ]
22001 \begin_inset Newline newline
22005 \begin_inset Newline newline
22008 NOWEB_SOURCE=myfile.nw
22009 \begin_inset Newline newline
22013 \begin_inset Newline newline
22017 code to extract files ...]
22018 \begin_inset Newline newline
22022 code to compile files ...]
22023 \begin_inset Newline newline
22029 \begin_layout Standard
22032 LIBDIR/examples/listerrors.lyx
22036 LIBDIR/examples/Literate.lyx
22038 which implement two versions of the
22039 \begin_inset Quotes eld
22043 \begin_inset Quotes erd
22046 program for some illustrations of how all of these pieces go together or
22049 LIBDIR/examples/noweb2lyx.lyx.
22052 Interestingly, these three files show off the language-indepence of the
22053 LyX literate programming support since they are written in Python, C and
22057 \begin_layout Subsubsection
22061 \begin_layout Standard
22062 All the Literate Programming support is configured by the
22064 Tools\SpecialChar \menuseparator
22068 \begin_inset Quotes eld
22072 \begin_inset Quotes erd
22076 The important parts are:
22079 \begin_layout Description
22081 \begin_inset space ~
22085 \begin_inset Quotes eld
22089 \begin_inset Quotes erd
22093 \begin_inset space ~
22096 format Set up via the Formats tab, this is where the Noweb-specific pieces
22106 , the file extension is set to
22111 This tells LyX to create a file with a
22115 extension in the first step of the conversion process.
22118 \begin_layout Description
22120 \begin_inset space ~
22128 \begin_inset space ~
22131 format This is an empty format whose sole purpose is to be the endpoint
22132 of a conversion (which then allows us to set up a converter for it).
22135 \begin_layout Description
22144 This converter performs the
22145 \begin_inset Quotes eld
22149 \begin_inset Quotes erd
22152 of the literate document.
22153 For Noweb, it is set to
22154 \begin_inset Quotes eld
22159 noweave -delay -index $$i > $$o
22162 \begin_inset Quotes erd
22168 \begin_layout Description
22178 \begin_inset Quotes eld
22182 \begin_inset Quotes erd
22186 As stated above, the Converter is set to
22187 \begin_inset Quotes eld
22195 \begin_inset Quotes erd
22198 , with Flags set to
22199 \begin_inset Quotes eld
22204 originaldir,parselog=listerrors
22207 \begin_inset Quotes erd
22213 \begin_layout Subsubsection
22217 \begin_layout Standard
22218 There is also a new function implemented in the LyX server, the
22219 \begin_inset Quotes eld
22222 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22226 \begin_layout Standard
22227 When debugging code with ddd/gdb, it is possible to invoke a text editor
22228 at the current execution position with a single key stroke.
22229 The default ddd configuration for that is shift-ctrl-V.
22230 It happens that you can define the editor command line invocation in ddd
22233 Edit\SpecialChar \menuseparator
22234 Preferences\SpecialChar \menuseparator
22237 dialog and changing the "Edit Sources" entry.
22240 \begin_layout Standard
22241 I take advantage of the new created LyX server function and this ddd feature,
22243 \begin_inset Quotes eld
22247 \begin_inset Quotes erd
22253 \begin_layout LyX-Code
22254 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22257 \begin_layout Standard
22258 With this, whenever you are using ddd and find a point in the program that
22259 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22260 ddd you forward this information to LyX through the LyX server and then
22261 the LyX window will show the same file with the cursor at the same position
22262 ddd was pointing to.
22263 No more guessing or long scrolling to locate a point in the program back
22267 \begin_layout Standard
22268 Note however that you must enable the LyX server to get this feature working
22269 (it is disabled by default).
22270 You can enable it in
22282 ) by entering in the
22287 \begin_inset Quotes eld
22292 /home/<your-home-directory>/.lyx/lyxpipe
22295 \begin_inset Quotes erd
22301 \begin_layout Standard
22302 Read the LyX server documentation in the
22304 Customization Manual
22306 for further information.
22309 \begin_layout Subsubsection
22313 \begin_layout Standard
22314 There are six new buttons that can be added to your LyX toolbar.
22315 Five of these buttons are short cuts to layout styles:
22336 The last one is a short cut to the
22337 \begin_inset Quotes eld
22341 \begin_inset Quotes erd
22348 \begin_layout Standard
22349 LyX has a range of buttons that are available for tool bar customization.
22350 In my toolbar I like to combine the six short cuts above with two more:
22355 \SpecialChar \menuseparator
22360 \SpecialChar \menuseparator
22367 View\SpecialChar \menuseparator
22371 Here is how it looks like:
22374 \begin_layout LyX-Code
22378 \begin_layout LyX-Code
22382 \begin_layout LyX-Code
22383 Icon "layout Standard"
22386 \begin_layout LyX-Code
22387 Icon "layout Section"
22390 \begin_layout LyX-Code
22391 Icon "layout LaTeX"
22394 \begin_layout LyX-Code
22395 Icon "layout LyX-Code"
22398 \begin_layout LyX-Code
22399 Icon "layout Scrap"
22402 \begin_layout LyX-Code
22406 \begin_layout LyX-Code
22410 \begin_layout LyX-Code
22411 Icon "buffer-typeset"
22414 \begin_layout LyX-Code
22415 Icon "build-program"
22418 \begin_layout LyX-Code
22422 \begin_layout LyX-Code
22426 \begin_layout LyX-Code
22430 \begin_layout LyX-Code
22434 \begin_layout LyX-Code
22438 \begin_layout Subsubsection
22439 Colors customization
22442 \begin_layout Standard
22443 There are a number of colors in LyX that can be customized in
22448 One of the things that bothers people is the LaTeX font color.
22449 The default color is red, since the scraps uses LaTeX font, and there is
22450 a lot of scraps in literate documents, you may get tired of seeing everything
22452 You can change it by going to the tabs
22461 \begin_layout Standard
22462 The next thing is the visible presence of the newline character in the screen.
22463 You can choose the color of this particular character and make it blend
22465 I recommend you choosing a color that is close to the background but not
22466 equal, that way you still can see it is there, but it is not bothering
22471 \begin_layout Chapter
22475 \begin_layout Standard
22476 You can do everything with LyX that you can do with LaTeX.
22477 However, LyX cannot support every LaTeX feature directly.
22478 But you can always use TeX Code.
22479 This chapter shows you some more special things you might want to use.
22480 For other special things you can do with figures, tables, floats, boxes
22481 and notes, have a look at the
22488 \begin_layout Section
22489 Multiple Text Columns
22492 \begin_layout Standard
22493 This feature is independent of the option
22495 Two-column document
22497 in the document settings under
22502 If you want to have 2
22503 \begin_inset space ~
22506 columns for the whole document, it is recommended to use the
22508 Two-column document
22511 For all other cases use this feature.
22514 \begin_layout Standard
22515 To use multiple text columns in your document, you have to load the module
22522 Document\SpecialChar \menuseparator
22523 Settings\SpecialChar \menuseparator
22526 ) and must have the LaTeX-package
22531 \begin_inset Index idx
22534 \begin_layout Plain Layout
22535 LaTeX-packages ! multicol
22543 \begin_layout Standard
22544 Footnotes within multiple columns will be placed at the bottom of the page
22545 and not under each column.
22546 Within the different columns you can use everything, with the limitation
22547 that for floats you need to use the float option
22554 \begin_layout Subsection
22558 \begin_layout Standard
22559 If you want to have 2 columns in your text, use the style
22561 Begin Multiple Columns
22563 where the columns should start.
22564 The content of the style is the number of the columns, so in this case
22566 \begin_inset Quotes eld
22570 \begin_inset Quotes erd
22574 At the point where the columns should end use the style
22576 End Multiple Columns
22581 \begin_layout Standard
22582 Here is an example:
22585 \begin_layout Begin Multiple Columns
22589 \begin_layout Standard
22594 The Adventure of the Empty House
22597 \begin_inset Newline newline
22602 Sir Arthur Conan Doyle
22605 \begin_layout Standard
22608 It was in the spring of the year 1894 that all London was interested, and
22609 the fashionable world dismayed, by the murder of the Honourable Ronald
22610 Adair under most unusual and inexplicable circumstances.
22611 The public has already learned those particulars of the crime which came
22612 out in the police investigation, but a good deal was suppressed upon that
22613 occasion, since the case for the prosecution was so overwhelmingly strong
22614 that it was not necessary to bring forward all the facts.
22615 Only now, at the end of nearly ten years, am I allowed to supply those
22616 missing links which make up the whole of that remarkable chain.
22617 The crime was of interest in itself, but that interest was as nothing to
22618 me compared to the inconceivable sequel, which afforded me the greatest
22619 shock and surprise of any event in my adventurous life.
22620 Even now, after this long interval, I find myself thrilling as I think
22621 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22622 ty which utterly submerged my mind.
22623 Let me say to that public, which has shown some interest in those glimpses
22624 which I have occasionally given them of the thoughts and actions of a very
22625 remarkable man, that they are not to blame me if I have not shared my knowledge
22626 with them, for I should have considered it my first duty to do so, had
22627 I not been barred by a positive prohibition from his own lips, which was
22628 only withdrawn upon the third of last month.
22631 \begin_layout End Multiple Columns
22635 \begin_layout Standard
22636 Here is an example with 3
22637 \begin_inset space ~
22643 \begin_layout Begin Multiple Columns
22647 \begin_layout Standard
22650 It can be imagined that my close intimacy with Sherlock Holmes had interested
22651 me deeply in crime, and that after his disappearance I never failed to
22652 read with care the various problems which came before the public.
22653 And I even attempted, more than once, for my own private satisfaction,
22654 to employ his methods in their solution, though with indifferent success.
22655 There was none, however, which appealed to me like this tragedy of Ronald
22657 As I read the evidence at the inquest, which led up to a verdict of willful
22658 murder against some person or persons unknown, I realized more clearly
22659 than I had ever done the loss which the community had sustained by the
22660 death of Sherlock Holmes.
22661 There were points about this strange business which would, I was sure,
22662 have specially appealed to him, and the efforts of the police would have
22663 been supplemented, or more probably anticipated, by the trained observation
22664 and the alert mind of the first criminal agent in Europe.
22665 All day, as I drove upon my round, I turned over the case in my mind and
22666 found no explanation which appeared to me to be adequate.
22667 At the risk of telling a twice-told tale, I will recapitulate the facts
22668 as they were known to the public at the conclusion of the inquest.
22671 \begin_layout End Multiple Columns
22675 \begin_layout Standard
22676 You can have up to 10
22677 \begin_inset space ~
22680 columns if you want to, but that might not be very pleasant for the readers
22684 \begin_layout Standard
22685 \begin_inset Newpage newpage
22691 \begin_layout Subsection
22692 Columns inside Columns
22695 \begin_layout Standard
22696 You can also have columns inside columns:
22699 \begin_layout Begin Multiple Columns
22703 \begin_layout Standard
22706 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22707 at that time governor of one of the Australian colonies.
22708 Adair's mother had returned from Australia to undergo the operation for
22709 cataract, and she, her son Ronald, and her daughter Hilda were living together
22713 \begin_layout Begin Multiple Columns
22717 \begin_layout Standard
22720 The youth moved in the best society–had, so far as was known, no enemies
22721 and no particular vices.
22722 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22723 had been broken off by mutual consent some months before, and there was
22724 no sign that it had left any very profound feeling behind it.
22725 For the rest {sic} the man's life moved in a narrow and conventional circle,
22726 for his habits were quiet and his nature unemotional.
22727 Yet it was upon this easy-going young aristocrat that death came, in most
22728 strange and unexpected form, between the hours of ten and eleven-twenty
22729 on the night of March 30, 1894.
22732 \begin_layout End Multiple Columns
22736 \begin_layout Standard
22739 Ronald Adair was fond of cards–playing continually, but never for such stakes
22741 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22742 It was shown that, after dinner on the day of his death, he had played
22743 a rubber of whist at the latter club.
22744 He had also played there in the afternoon.
22749 The evidence of those who had played with him– Mr.
22750 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22751 and that there was a fairly equal fall of the cards.
22752 Adair might have lost five pounds, but not more.
22753 His fortune was a considerable one, and such a loss could not in any way
22755 He had played nearly every day at one club or other, but he was a cautious
22756 player, and usually rose a winner.
22757 It came out in evidence that, in partnership with Colonel Moran, he had
22758 actually won as much as four hundred and twenty pounds in a sitting, some
22759 weeks before, from Godfrey Milner and Lord Balmoral.
22760 So much for his recent history as it came out at the inquest.
22763 \begin_layout End Multiple Columns
22767 \begin_layout Subsection
22771 \begin_layout Standard
22772 The examples in this section show some more special features of multiple
22776 \begin_layout Standard
22777 For more features of multiple columns, have a look at the documentation
22778 of the LaTeX-package
22783 \begin_inset Index idx
22786 \begin_layout Plain Layout
22787 LaTeX-packages ! multicol
22793 \begin_inset CommandInset citation
22802 \begin_layout Subsubsection
22806 \begin_layout Standard
22807 To add a preface text for multiple columns, add the command
22810 \begin_layout Standard
22816 \begin_layout Standard
22817 as TeX Code behind the number of columns in the
22819 Begin Multiple Columns
22822 behind the command write the text.
22823 At the end of the style use the command
22826 \begin_layout Standard
22832 \begin_layout Standard
22834 An example with some preface text:
22837 \begin_layout Standard
22838 \begin_inset VSpace bigskip
22844 \begin_layout Begin Multiple Columns
22849 \begin_layout Plain Layout
22856 And the story continues and continues and continues and continues\SpecialChar \ldots{}
22861 \begin_layout Plain Layout
22871 \begin_layout Standard
22874 On the evening of the crime, he returned from the club exactly at ten.
22875 His mother and sister were out spending the evening with a relation.
22876 The servant deposed that she heard him enter the front room on the second
22877 floor, generally used as his sitting-room.
22878 She had lit a fire there, and as it smoked she had opened the window.
22879 No sound was heard from the room until eleven-twenty, the hour of the return
22880 of Lady Maynooth and her daughter.
22881 Desiring to say good-night, she attempted to enter her son's room.
22882 The door was locked on the inside, and no answer could be got to their
22883 cries and knocking.
22884 Help was obtained, and the door forced.
22885 The unfortunate young man was found lying near the table.
22886 His head had been horribly mutilated by an expanding revolver bullet, but
22887 no weapon of any sort was to be found in the room.
22890 \begin_layout End Multiple Columns
22894 \begin_layout Standard
22895 You can also use a section heading as the preface if you use a section command
22896 as TeX Code behind the first TeX Code.
22897 For example the command
22900 \begin_layout Standard
22905 subsection{subsection title}
22908 \begin_layout Standard
22909 creates a subsection.
22910 In this example the preface is a subsubsection:
22913 \begin_layout Begin Multiple Columns
22918 \begin_layout Plain Layout
22929 \begin_layout Plain Layout
22938 This is a subsubsection heading as a preface
22942 \begin_layout Plain Layout
22953 \begin_layout Plain Layout
22963 \begin_layout Standard
22966 A minute examination of the circumstances served only to make the case more
22968 In the first place, no reason could be given why the young man should have
22969 fastened the door upon the inside.
22970 There was the possibility that the murderer had done this, and had afterwards
22971 escaped by the window.
22972 The drop was at least twenty feet, however, and a bed of crocuses in full
22974 Neither the flowers nor the earth showed any sign of having been disturbed,
22975 nor were there any marks upon the narrow strip of grass which separated
22976 the house from the road.
22977 Apparently, therefore, it was the young man himself who had fastened the
22979 But how did he come by his death? No one could have climbed up to the window
22980 without leaving traces.
22981 Suppose a man had fired through the window, he would indeed be a remarkable
22982 shot who could with a revolver inflict so deadly a wound.
22983 Again, Park Lane is a frequented thoroughfare; there is a cab stand within
22984 a hundred yards of the house.
22985 No one had heard a shot.
22988 \begin_layout End Multiple Columns
22992 \begin_layout Standard
22993 If there is less vertical space left on the page at the beginning of the
22994 multiple columns than needed for 6
22995 \begin_inset space ~
22998 text lines, a page break will be inserted before the multiple columns.
22999 Depending on the number of lines of the preface text, you might want to
23001 It is determined by inserting the command
23004 \begin_layout Standard
23012 \begin_layout Standard
23013 as TeX Code behind the preface definition but before the final
23022 is hereby the number of text lines.
23023 In this example the space is set to 7
23024 \begin_inset space ~
23030 \begin_layout Begin Multiple Columns
23035 \begin_layout Plain Layout
23046 \begin_layout Plain Layout
23055 This is the sectioning command
23056 \begin_inset Newline newline
23060 \begin_inset Newline newline
23063 with multiple text lines
23067 \begin_layout Plain Layout
23078 \begin_layout Plain Layout
23091 \begin_layout Plain Layout
23101 \begin_layout Standard
23104 On the evening of the crime, he returned from the club exactly at ten.
23105 His mother and sister were out spending the evening with a relation.
23106 The servant deposed that she heard him enter the front room on the second
23107 floor, generally used as his sitting-room.
23108 She had lit a fire there, and as it smoked she had opened the window.
23109 No sound was heard from the room until eleven-twenty, the hour of the return
23110 of Lady Maynooth and her daughter.
23111 Desiring to say good-night, she attempted to enter her son's room.
23112 The door was locked on the inside, and no answer could be got to their
23113 cries and knocking.
23114 Help was obtained, and the door forced.
23115 The unfortunate young man was found lying near the table.
23116 His head had been horribly mutilated by an expanding revolver bullet, but
23117 no weapon of any sort was to be found in the room.
23120 \begin_layout End Multiple Columns
23124 \begin_layout Subsubsection
23128 \begin_layout Standard
23129 The amount of space before and after multiple columns can be changed by
23130 changing the length
23137 For example the command
23140 \begin_layout Standard
23150 \begin_layout Standard
23151 in TeX Code changes its value to 3
23152 \begin_inset space \thinspace{}
23156 The change must be made before the multiple columns' start.
23157 The predefined value is 13
23158 \begin_inset space \thinspace{}
23164 \begin_layout Standard
23172 \begin_inset space \thinspace{}
23178 \begin_layout Standard
23182 \begin_layout Plain Layout
23188 multicolsep}{2.5cm}
23196 \begin_layout Begin Multiple Columns
23200 \begin_layout Standard
23203 All day I turned these facts over in my mind, endeavouring to hit upon some
23204 theory which could reconcile them all, and to find that line of least resistanc
23205 e which my poor friend had declared to be the starting-point of every investigat
23207 I confess that I made little progress.
23208 In the evening I strolled across the Park, and found myself about six o'clock
23209 at the Oxford Street end of Park Lane.
23210 A group of loafers upon the pavements, all staring up at a particular window,
23211 directed me to the house which I had come to see.
23212 A tall, thin man with coloured glasses, whom I strongly suspected of being
23213 a plain-clothes detective, was pointing out some theory of his own, while
23214 the others crowded round to listen to what he said.
23215 I got as near him as I could, but his observations seemed to me to be absurd,
23216 so I withdrew again in some disgust.
23217 As I did so I struck against an elderly, deformed man, who had been behind
23218 me, and I knocked down several books which he was carrying.
23221 \begin_layout End Multiple Columns
23225 \begin_layout Standard
23226 \begin_inset Note Greyedout
23229 \begin_layout Plain Layout
23234 The values you set with
23240 will be used for all following multiple columns until to change them again.
23248 \begin_layout Standard
23252 \begin_layout Plain Layout
23264 \begin_inset Note Note
23267 \begin_layout Plain Layout
23268 go back to the default
23276 \begin_layout Subsubsection
23280 \begin_layout Standard
23281 The width of the columns is automatically calculated, but you can modify
23282 the space between the columns.
23283 This is done by changing the length
23290 Its predefined value is 10
23291 \begin_inset space \thinspace{}
23295 Here is an example where
23302 \begin_inset space \thinspace{}
23308 \begin_layout Standard
23312 \begin_layout Plain Layout
23326 \begin_layout Begin Multiple Columns
23330 \begin_layout Standard
23333 My observations of No.
23334 \begin_inset space \space{}
23337 427 Park Lane did little to clear up the problem in which I was interested.
23338 The house was separated from the street by a low wall and railing, the
23339 whole not more than five feet high.
23340 It was perfectly easy, therefore, for anyone to get into the garden, but
23341 the window was entirely inaccessible, since there was no water pipe or
23342 anything which could help the most active man to climb it.
23343 More puzzled than ever, I retraced my steps to Kensington.
23344 I had not been in my study five minutes when the maid entered to say that
23345 a person desired to see me.
23346 To my astonishment it was none other than my strange old book collector,
23347 his sharp, wizened face peering out from a frame of white hair, and his
23348 precious volumes, a dozen of them at least, wedged under his right arm.
23351 \begin_layout End Multiple Columns
23355 \begin_layout Standard
23359 \begin_layout Plain Layout
23371 \begin_inset Note Note
23374 \begin_layout Plain Layout
23375 go back to the default
23383 \begin_layout Subsubsection
23387 \begin_layout Standard
23388 Between the columns a rule with a width of the length
23395 If this rule width is set to 0
23396 \begin_inset space \thinspace{}
23399 pt (this is the default), the rule is suppressed.
23400 In the following example, the line separating the columns is 2
23401 \begin_inset space \thinspace{}
23407 \begin_layout Standard
23411 \begin_layout Plain Layout
23417 columnseprule}{2pt}
23425 \begin_layout Begin Multiple Columns
23429 \begin_layout Standard
23432 \begin_inset Quotes eld
23435 You're surprised to see me, sir,
23436 \begin_inset Quotes erd
23439 said he, in a strange, croaking voice.
23442 \begin_layout Standard
23445 I acknowledged that I was.
23448 \begin_layout Standard
23451 \begin_inset Quotes eld
23454 Well, I've a conscience, sir, and when I chanced to see you go into this
23455 house, as I came hobbling after you, I thought to myself, I'll just step
23456 in and see that kind gentleman, and tell him that if I was a bit gruff
23457 in my manner there was not any harm meant, and that I am much obliged to
23458 him for picking up my books.
23459 \begin_inset Quotes erd
23465 \begin_layout Standard
23468 \begin_inset Quotes eld
23471 You make too much of a trifle,
23472 \begin_inset Quotes erd
23477 \begin_inset Quotes eld
23480 May I ask how you knew who I was?
23481 \begin_inset Quotes erd
23487 \begin_layout Standard
23490 \begin_inset Quotes eld
23493 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
23494 you'll find my little bookshop at the corner of Church Street, and very
23495 happy to see you, I am sure.
23496 Maybe you collect yourself, sir.
23500 \begin_inset space ~
23513 --a bargain, every one of them.
23514 With five volumes you could just fill that gap on that second shelf.
23515 It looks untidy, does it not, sir?
23516 \begin_inset Quotes erd
23522 \begin_layout End Multiple Columns
23526 \begin_layout Standard
23530 \begin_layout Plain Layout
23536 columnseprule}{0pt}
23542 \begin_inset Note Note
23545 \begin_layout Plain Layout
23546 go back to the default
23554 \begin_layout Standard
23555 \begin_inset Newpage newpage
23561 \begin_layout Section
23562 Non-standard Paragraph Shapes
23565 \begin_layout Standard
23569 \begin_layout Plain Layout
23581 \begin_layout Standard
23585 \begin_layout Plain Layout
23594 \begin_layout Plain Layout
23608 \begin_layout Standard
23613 \begin_layout Plain Layout
23624 \begin_layout Plain Layout
23633 \begin_layout Plain Layout
23642 \begin_layout Plain Layout
23651 \begin_layout Plain Layout
23660 \begin_layout Plain Layout
23669 \begin_layout Plain Layout
23678 \begin_layout Plain Layout
23687 \begin_layout Plain Layout
23696 \begin_layout Plain Layout
23705 \begin_layout Plain Layout
23714 \begin_layout Plain Layout
23723 \begin_layout Plain Layout
23732 \begin_layout Plain Layout
23741 \begin_layout Plain Layout
23750 \begin_layout Plain Layout
23759 \begin_layout Plain Layout
23768 \begin_layout Plain Layout
23777 \begin_layout Plain Layout
23786 \begin_layout Plain Layout
23792 There are times when the tyranny of rectangular paragraphs must be overthrown.
23793 In such situations, a call to the delightful plain TeX command
23800 As you can see, completely arbitrary shapes can be laid out with a suitable
23801 set of line length definitions.
23802 While this parshape may look a bit silly and useless, one could conceive
23803 of situations such as finely tuned dropped capitals, word wrapping around
23804 non-rectangular graphics, etc.
23805 which will benefit from such handcrafting.
23808 \begin_layout Standard
23809 \begin_inset VSpace bigskip
23815 \begin_layout Standard
23820 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23827 is the number of lines of text which define the paragraph.
23828 If there turn out to be fewer lines, the shape is truncated; if there are
23829 more, the excess lines have the same dimensions as the last line of the
23839 entries specify the indentation of the line from the left margin, and the
23840 length of the line as measured from that point.
23841 The shape applies only to the current paragraph; everything is reset to
23842 normal for the next paragraph.
23845 \begin_layout Standard
23849 \begin_layout Plain Layout
23861 \begin_layout Bibliography
23862 \begin_inset CommandInset bibitem
23863 LatexCommand bibitem
23868 Documentation of the LaTeX-package
23869 \begin_inset CommandInset href
23872 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
23877 \begin_inset Index idx
23880 \begin_layout Plain Layout
23881 LaTeX-packages ! multicol