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
49 \maintain_unincluded_children false
52 InsetLayout CharStyle:MenuItem
61 \newcommand*{\menuitem}[1]{{\sffamily #1}}
66 \language_package default
71 \font_typewriter default
72 \font_default_family default
73 \use_non_tex_fonts false
80 \default_output_format default
82 \bibtex_command default
83 \index_command default
87 \pdf_title "LyX's Additional Features manual"
88 \pdf_author "LyX Team"
89 \pdf_subject "LyX's additional features documentation"
90 \pdf_keywords "LyX, Documentation, Additional"
92 \pdf_bookmarksnumbered true
93 \pdf_bookmarksopen false
94 \pdf_bookmarksopenlevel 1
99 \pdf_pdfusetitle false
100 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
110 \paperorientation portrait
119 \paragraph_separation indent
120 \paragraph_indentation default
121 \quotes_language english
124 \paperpagestyle headings
125 \tracking_changes false
126 \output_changes false
135 Additional LyX Features
138 \begin_layout Subtitle
147 \begin_layout Plain Layout
149 Principal maintainer of this file is
154 If you have comments or error corrections, please send them to the LyX
155 Documentation mailing list,
156 \begin_inset Flex Code
159 \begin_layout Plain Layout
161 <lyx-docs@lists.lyx.org>
174 \begin_layout Standard
175 \begin_inset CommandInset toc
176 LatexCommand tableofcontents
183 \begin_layout Chapter
187 \begin_layout Standard
188 This manual is essentially Part II of the
190 User's Guide\SpecialChar \@.
193 The reason for separating this document out is simple: the
197 is already quite lengthy, and it contains information on all of the basic
198 features one needs to know in order to prepare most documents.
199 However, the LyX Team has worked to make LyX extensible through various
200 configuration files and external packages.
201 That means that if you want to support the Fizzwizzle LaTeX package, you
202 can create a layout file (or module) for it without having to alter LyX
204 We've already had contributions of several new features this way, and some
205 of them are documented here.
206 There are also some more `advanced' features, such as how to control the
207 presentation of bibliographies and how to work with multi-part documents,
208 that are not covered in the
212 and are discussed here.
215 \begin_layout Standard
216 This manual also documents some special features, like fax support, version
217 control, and SGML support, which require additional software to work properly.
218 There is also a chapter on LyX's support for HTML.
219 And lastly, there's a chapter of LaTeX tools and tips, things you can use
220 to spruce up your documents by directly using the powerful features of
226 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
229 \begin_layout Standard
230 If you haven't read the
234 yet, you are definitely in the wrong manual.
239 is the first place to go, since it describes the notation and format of
241 You should also be thoroughly familiar with the
245 and all of the basic features of LyX before attempting to read this one.
248 \begin_layout Standard
249 Since many of the topics in this manual depend heavily on LyX's interaction
250 with LaTeX, this first chapter covers the inner workings of LyX and how
251 to direct LyX to generate exactly the LaTeX code you want.
252 It is obviously for more seasoned LyX users.
255 \begin_layout Chapter
259 \begin_layout Section
263 \begin_layout Standard
264 This chapter is for both TeX-nicians and the LaTeX-curious.
265 In it, we'll explain how LyX and LaTeX work together to produce printable
267 This is the only place in any of the manuals where we assume you know something
271 \begin_layout Standard
272 At one time, LyX was called a
273 \begin_inset Quotes eld
276 WYSIWYM frontend to LaTeX,
277 \begin_inset Quotes erd
280 but that's no longer true.
281 There are frontends to LaTeX out there.
285 \begin_layout Plain Layout
286 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
287 There are also the LaTeX modes for vi and emacs, of course.
292 These are basically text editors with the ability to run LaTeX and mark
293 any errors in the file you're editing.
302 run LaTeX, and it also indicates errors in the file, it also does much,
304 For one thing, you don't need to know LaTeX to use LyX effectively.
305 And LyX has added its own extensions to LaTeX.
306 Try the following sometime: select
307 \begin_inset Flex MenuItem
310 \begin_layout Plain Layout
311 Export\SpecialChar \menuseparator
318 \begin_inset Flex MenuItem
321 \begin_layout Plain Layout
328 \begin_inset Flex MenuItem
331 \begin_layout Plain Layout
332 View\SpecialChar \menuseparator
338 ), then look at the preamble of the resulting
339 \begin_inset Flex Code
342 \begin_layout Plain Layout
349 You'll notice a variety of new macros defined specifically by LyX.
350 These macros are defined automatically, according to the features you use
354 \begin_layout Standard
355 There are several commands that automatically invoke LaTeX.
359 \begin_layout Itemize
360 \begin_inset Flex MenuItem
363 \begin_layout Plain Layout
364 View\SpecialChar \menuseparator
373 \begin_layout Itemize
374 \begin_inset Flex MenuItem
377 \begin_layout Plain Layout
378 View\SpecialChar \menuseparator
379 Update\SpecialChar \menuseparator
388 \begin_layout Itemize
389 \begin_inset Flex MenuItem
392 \begin_layout Plain Layout
393 File\SpecialChar \menuseparator
402 \begin_layout Itemize
403 \begin_inset Flex MenuItem
406 \begin_layout Plain Layout
407 File\SpecialChar \menuseparator
416 \begin_layout Standard
417 They will only invoke LaTeX if the file has changed since the last time
422 \begin_layout Standard
423 When LyX runs LaTeX on the file you're editing, it performs these steps:
426 \begin_layout Enumerate
427 Convert the document to LaTeX and save to a file with the extension
428 \begin_inset Flex Code
431 \begin_layout Plain Layout
438 \begin_inset Flex Code
441 \begin_layout Plain Layout
450 \begin_layout Enumerate
452 \begin_inset Flex Code
455 \begin_layout Plain Layout
461 file (maybe several times), and run any other commands (such as
462 \begin_inset Flex Code
465 \begin_layout Plain Layout
472 \begin_inset Flex Code
475 \begin_layout Plain Layout
481 ) needed to compile the LaTeX file.
484 \begin_layout Enumerate
485 If there are any errors, show the error log.
488 \begin_layout Standard
489 If you've run LaTeX using
490 \begin_inset Flex MenuItem
493 \begin_layout Plain Layout
496 \SpecialChar \menuseparator
504 , LyX then runs a DVI viewer to display the DVI-file.
506 \begin_inset Flex MenuItem
509 \begin_layout Plain Layout
512 \SpecialChar \menuseparator
520 , LyX performs further steps:
523 \begin_layout Itemize
525 \begin_inset Flex Code
528 \begin_layout Plain Layout
534 to convert the DVI file to PostScript.
537 \begin_layout Itemize
538 Run a PostScript viewer, such as
539 \begin_inset Flex Code
542 \begin_layout Plain Layout
548 , to display the PostScript file.
551 \begin_layout Standard
552 LyX does similar things when viewing, or exporting, other formats.
555 \begin_layout Section
556 Translating LaTeX files into LyX
559 \begin_layout Standard
560 You can import a LaTeX file into LyX by using the
561 \begin_inset Flex MenuItem
564 \begin_layout Plain Layout
565 File\SpecialChar \menuseparator
566 Import\SpecialChar \menuseparator
573 This will call a program named
574 \begin_inset Flex Code
577 \begin_layout Plain Layout
583 which will create a file
584 \begin_inset Flex Code
587 \begin_layout Plain Layout
594 \begin_inset Flex Code
597 \begin_layout Plain Layout
604 LyX will then open that file.
608 \begin_layout Plain Layout
609 \begin_inset Flex Code
612 \begin_layout Plain Layout
618 can also be run from the command line, of course.
626 \begin_layout Standard
627 \begin_inset Flex Code
630 \begin_layout Plain Layout
636 will translate most legal LaTeX, but not everything.
637 It will put things it doesn't understand into TeX code, so after translating
639 \begin_inset Flex Code
642 \begin_layout Plain Layout
648 , you can look for TeX code and hand-edit it until it looks right.
651 \begin_layout Standard
652 If you don't know what TeX code is, read the next section.
655 \begin_layout Section
656 \begin_inset CommandInset label
658 name "sec:Inserting-TeX-Code"
662 Inserting TeX Code into LyX Documents
665 \begin_layout Standard
666 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
667 You can always insert TeX code into any LyX document.
668 LyX cannot, and will never be able to, display every possible LaTeX construct.
669 If ever you need to insert LaTeX commands into your LyX document, you can
671 \begin_inset Flex Code
674 \begin_layout Plain Layout
680 box, which you can insert into your document with
681 \begin_inset Flex MenuItem
684 \begin_layout Plain Layout
685 Insert\SpecialChar \menuseparator
694 \begin_layout Standard
695 Here's an example of inserting LaTeX commands in a LyX document.
696 The code looks like this:
699 \begin_layout LyX-Code
703 \begin_inset Newline newline
709 \begin_inset Newline newline
712 This is an example for a minipage environment.
714 \begin_inset Newline newline
717 can put nearly everything in it, even (non-floating)
718 \begin_inset Newline newline
723 \begin_inset Newline newline
729 \begin_inset Newline newline
733 \begin_inset Newline newline
739 \begin_inset Newline newline
745 \begin_inset Newline newline
751 \begin_inset Newline newline
756 \begin_inset Newline newline
762 \begin_inset Newline newline
768 \begin_inset Newline newline
774 \begin_inset Newline newline
782 \begin_layout LyX-Code
786 \begin_layout Standard
788 \begin_inset Flex Code
791 \begin_layout Plain Layout
797 box containing this text is directly after this paragraph.
798 Those of you reading the manual in LyX will only see the TeX code inset.
799 Those reading a printed version of the manuals will see the actual results:
802 \begin_layout Standard
806 \begin_layout Plain Layout
813 \begin_layout Plain Layout
820 \begin_layout Plain Layout
822 This is an example for a minipage environment.
823 You can put nearly everything in it, even (non-floating) figures and tables.
827 \begin_layout Plain Layout
834 \begin_layout Plain Layout
839 \begin_layout Plain Layout
846 \begin_layout Plain Layout
853 \begin_layout Plain Layout
860 \begin_layout Plain Layout
866 \begin_layout Plain Layout
873 \begin_layout Plain Layout
880 \begin_layout Plain Layout
887 \begin_layout Plain Layout
899 \begin_layout Standard
900 In addition to using TeX code, you can also create a separate file containing
901 some complex LaTeX structure and then use
902 \begin_inset Flex MenuItem
905 \begin_layout Plain Layout
906 Insert\SpecialChar \menuseparator
916 to include your file (you should select the type
917 \begin_inset Flex Code
920 \begin_layout Plain Layout
927 We recommend that you only do this if you have a
928 \begin_inset Flex Code
931 \begin_layout Plain Layout
942 Otherwise, you'll have a big job tracking down LaTeX errors.
945 \begin_layout Standard
946 There are a few last points to emphasize:
949 \begin_layout Itemize
954 check if your LaTeX code is correct.
957 \begin_layout Itemize
958 Beware reinventing the wheel.
961 \begin_layout Standard
962 On that last point, LyX does have quite a few features tucked into it, and
964 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
965 feature before you decide you have to do it by hand.
966 Moreover, there are numerous LaTeX packages out there to do all sorts of
967 things, from labels to envelopes to fancy multipage tables.
969 \begin_inset CommandInset href
972 target "http://www.ctan.org/"
976 for details, and see chapter
977 \begin_inset CommandInset ref
979 reference "cha:secrets"
986 \begin_layout Standard
987 If you do need to do some wild and fancy things within your document, be
988 sure to check out a good LaTeX book for assistance.
989 There are a number of them listed in the bibliography of the
996 \begin_layout Section
997 LyX and the LaTeX Preamble
1000 \begin_layout Subsection
1001 About the LaTeX Preamble
1004 \begin_layout Standard
1005 If you already know LaTeX, there is no need to explain here what the preamble
1007 If you don't, the following will give you some ideas—we recommend again
1008 that you consult a LaTeX book for further information.
1009 In any case, you should read the points below, because they explain what
1010 you can do and what you don't need to do in the LaTeX preamble of a LyX
1014 \begin_layout Standard
1015 The LaTeX preamble comes at the very beginning of a document,
1023 \begin_layout Itemize
1024 Declare the document class.
1026 \begin_inset Newline newline
1029 LyX already does this for you.
1030 If you're a seasoned LaTeX-nician, and you have a custom document class
1031 you want to use, check out the
1033 Customization Manual
1035 for information on how to make LyX interface to it.
1038 \begin_layout Itemize
1039 Declare the usage of packages.
1041 \begin_inset Newline newline
1044 LaTeX packages provide special commands, which are only available within
1045 a document when the package has been declared in the preamble.
1046 For example, the package
1047 \begin_inset Flex Code
1050 \begin_layout Plain Layout
1056 forces all paragraphs to be indented.
1057 There are other packages for labels, envelopes, margins, etc.
1061 \begin_layout Itemize
1062 Set counters, variables, lengths and widths.
1064 \begin_inset Newline newline
1067 There are several LaTeX counters and variables which
1071 be set globally from within the preamble in order to have the desired effect.
1072 (There are variables which you can set and reset inside the document, too.)
1073 Margins are a good example of something which must be set in the preamble.
1074 Another example is the label format for lists.
1075 You can actually set these just about anywhere, but it's best to do it
1076 just once, inside the preamble.
1079 \begin_layout Itemize
1080 Declare user defined commands (with
1081 \begin_inset Flex Code
1084 \begin_layout Plain Layout
1093 \begin_inset Flex Code
1096 \begin_layout Plain Layout
1105 \begin_inset Newline newline
1108 These are abbreviations for LaTeX commands which appear very often inside
1110 Although the preamble is a good place to declare such commands, they
1114 be declared anywhere (before they are used for the first time, of course).
1115 This can be useful if there is a lot of raw LaTeX code in your document,
1116 which normally should not be the case.
1119 \begin_layout Standard
1120 LyX adds its own set of definitions to the preamble of the
1121 \begin_inset Flex Code
1124 \begin_layout Plain Layout
1131 This makes LaTeX files generated by LyX portable.
1134 \begin_layout Subsection
1135 Changing the Preamble
1138 \begin_layout Standard
1139 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1140 can't change them without patching LyX itself.
1141 You can, however, add your own stuff to the preamble by selecting
1142 \begin_inset Flex MenuItem
1145 \begin_layout Plain Layout
1147 \begin_inset space ~
1156 \begin_inset Flex MenuItem
1159 \begin_layout Plain Layout
1160 Document\SpecialChar \menuseparator
1167 LyX adds anything in the
1168 \begin_inset Flex MenuItem
1171 \begin_layout Plain Layout
1177 dialog to its own built-in preamble.
1178 Before adding your own declarations in the preamble, you should make sure
1179 that LyX doesn't already support what you want to do.
1180 (Remember what we said about reinventing the wheel?) Also,
1182 make sure your preamble code is correct
1185 LyX doesn't check it for you.
1186 If there is an error, you're likely to get an error like
1187 \begin_inset Quotes eld
1191 \begin_inset Flex Code
1194 \begin_layout Plain Layout
1203 \begin_inset Quotes erd
1207 If you see this error, check your preamble.
1210 \begin_layout Subsection
1214 \begin_layout Standard
1215 Here are some examples of what you can add to a preamble, and what they
1219 \begin_layout Subsubsection
1223 \begin_layout Standard
1224 There are two variables under LaTeX that control page position:
1225 \begin_inset Flex Code
1228 \begin_layout Plain Layout
1237 \begin_inset Flex Code
1240 \begin_layout Plain Layout
1249 Their names should be self-explanatory.
1250 These variables are useful if you think for a moment about computer labels.
1251 Sometimes, the size of a print medium and the area of the medium that you
1252 can actually print on aren't the same.
1254 \begin_inset Flex Code
1257 \begin_layout Plain Layout
1266 \begin_inset Flex Code
1269 \begin_layout Plain Layout
1280 \begin_layout Standard
1281 The default values for
1282 \begin_inset Flex Code
1285 \begin_layout Plain Layout
1294 \begin_inset Flex Code
1297 \begin_layout Plain Layout
1306 \begin_inset space \thinspace{}
1310 \begin_inset space \thinspace{}
1314 \begin_inset space \space{}
1317 the page isn't shifted.
1318 Unfortunately, some DVI drivers always seem to shift the page.
1319 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1320 If you're using LyX on a system that you don't personally maintain, and
1321 your sysadmin is a doofus,
1322 \begin_inset Flex Code
1325 \begin_layout Plain Layout
1334 \begin_inset Flex Code
1337 \begin_layout Plain Layout
1346 Suppose your left and top margins are always 0.5
1347 \begin_inset space \thinspace{}
1351 You can add this to the preamble:
1354 \begin_layout LyX-Code
1362 \begin_layout LyX-Code
1370 \begin_layout Standard
1371 and your margins should now be correct.
1374 \begin_layout Subsubsection
1378 \begin_layout Standard
1379 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1380 There's a rather nice package, available at your nearest CTAN archive,
1381 for printing sheets of labels:
1382 \begin_inset Flex Code
1385 \begin_layout Plain Layout
1392 Now, your system may not have this package installed by default.
1393 We leave that up to you to check.
1394 You'll also want to read the documentation for it; we're not going to do
1396 Since this is an example, however, we'll give you an example of how you
1400 \begin_layout Standard
1401 First, make sure you're using the
1402 \begin_inset Flex Code
1405 \begin_layout Plain Layout
1412 Next, you need to put the following in your preamble:
1415 \begin_layout LyX-Code
1421 \begin_layout LyX-Code
1427 \begin_layout LyX-Code
1433 \begin_layout LyX-Code
1439 \begin_layout LyX-Code
1445 \begin_layout LyX-Code
1451 \begin_layout LyX-Code
1457 \begin_layout Standard
1458 This sets things up for Avery label sheets, stock #5360.
1459 You're now ready to print labels, but you'll need to insert LaTeX code,
1460 placing the commands
1461 \begin_inset Flex Code
1464 \begin_layout Plain Layout
1473 \begin_inset Flex Code
1476 \begin_layout Plain Layout
1484 around each label text.
1485 This and other special features of
1486 \begin_inset Flex Code
1489 \begin_layout Plain Layout
1495 are explained in its documentation.
1498 \begin_layout Standard
1499 Someday, someone may write a LyX layout file to support this package directly.
1500 Maybe that someone is you.
1503 \begin_layout Subsubsection
1504 Example #3: Paragraph Indentation
1507 \begin_layout Standard
1508 Americans are trained to indent the first line of
1513 As with all of their other weird quirks, most Americans will whine and
1514 moan until they can have their way and indent the first line of all paragraphs.
1523 \begin_layout Standard
1524 Of course, this behavior isn't standard typography.
1525 In books, you typically only indent the first line of a paragraph
1529 it follows another one.
1530 The idea behind indenting the first line of a paragraph is to distinguish
1531 neighboring paragraphs from one another.
1532 If there is no previous paragraph—for example, if it follows a figure or
1533 is the first paragraph in a section—then there is no need for indentation.
1537 \begin_layout Standard
1538 If you're a typical American (we're still joking!), though, you don't care
1539 about such esoteric things; you want your indentation! Add this to the
1543 \begin_layout LyX-Code
1546 usepackage{indentfirst}
1549 \begin_layout Standard
1550 If your TeX distribution isn't braindead, you'll have this package, and
1551 all of your paragraphs will get the indentation the Founding Fathers intended
1555 \begin_layout Subsubsection
1556 Example #4: This Document
1559 \begin_layout Standard
1560 You can also check out the preamble of this document to get an idea of some
1561 of the advanced things you can do.
1562 Also, there are more examples and an assortment of LaTeX
1563 \begin_inset Quotes eld
1567 \begin_inset Quotes erd
1571 \begin_inset space ~
1575 \begin_inset CommandInset ref
1577 reference "cha:secrets"
1585 \begin_layout Section
1586 LyX and LaTeX Errors
1589 \begin_layout Standard
1590 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1592 It then uses the logfile from the LaTeX run to do a post-mortem.
1593 After analyzing the logfile,LyX displays a dialog listing the errors.
1594 Clicking on any one of them will take you to the position in your LyX file
1595 where the error occurred.
1599 \begin_layout Plain Layout
1601 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1603 There are also cases where LaTeX reports the error on one line, but the
1604 actual error is earlier.
1605 This is not unlike forgetting a closing brace in a program: You'll get
1606 an error, but only later.
1614 \begin_layout Standard
1615 Some folks also like to look at the log file directly: It is available from
1617 \begin_inset Flex MenuItem
1620 \begin_layout Plain Layout
1623 \SpecialChar \menuseparator
1627 \begin_inset space ~
1636 There are some fairly common error messages and warnings.
1637 We'll cover those here.
1638 You should look at a good LaTeX book for a complete listing.
1641 \begin_layout Itemize
1642 \begin_inset Flex Code
1645 \begin_layout Plain Layout
1652 \begin_inset Newline newline
1655 Anything beginning with these words is a warning message for the purpose
1657 \begin_inset Quotes eld
1661 \begin_inset Quotes erd
1664 the LaTeX code itself.
1665 You'll get messages like this if you added or changed cross-references
1666 or bibliography entries, in which case, LaTeX is trying to tell you that
1667 you need to make another run.
1668 You can by-and-large ignore these.
1671 \begin_layout Itemize
1672 \begin_inset Flex Code
1675 \begin_layout Plain Layout
1682 \begin_inset Newline newline
1685 Another warning message, this time about fonts which LaTeX couldn't find.
1686 The rest of the message will often say something about a replacement font
1688 You can safely ignore these, too.
1691 \begin_layout Itemize
1692 \begin_inset Flex Code
1695 \begin_layout Plain Layout
1704 \begin_inset Newline newline
1712 They are warnings about lines that were too long and run past the right
1714 Almost always, this is unnoticeable in the final output.
1715 (It can be just a point or two.) Or, only one or two characters extend past
1717 LaTeX seems to generate at least one of these messages for just about any
1719 \begin_inset Newline newline
1722 You can ignore these messages.
1723 Your eyes will tell you if there's a problem with something that's too
1724 wide; just look at the output.
1728 \begin_layout Plain Layout
1729 You can also enable the `draft' option in
1730 \begin_inset Flex MenuItem
1733 \begin_layout Plain Layout
1736 \SpecialChar \menuseparator
1744 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1752 \begin_layout Itemize
1753 \begin_inset Flex Code
1756 \begin_layout Plain Layout
1765 \begin_inset Newline newline
1768 Not quite as common as its cousin.
1769 LaTeX seems to like to print lines that are a bit too wide as opposed to
1770 ones that are a bit too narrow.
1771 We have no idea why.
1774 \begin_layout Itemize
1775 \begin_inset Flex Code
1778 \begin_layout Plain Layout
1787 \begin_inset Flex Code
1790 \begin_layout Plain Layout
1799 \begin_inset Newline newline
1802 Warnings about troubles breaking the page.
1803 Once again, just look at the output.
1804 Your eyes will tell you where something has gone wrong.
1807 \begin_layout Itemize
1808 \begin_inset Flex Code
1811 \begin_layout Plain Layout
1813 \begin_inset Quotes els
1817 \begin_inset Quotes ers
1826 \begin_inset Newline newline
1830 \begin_inset Quotes eld
1834 \begin_inset Quotes erd
1837 isn't installed on this system.
1838 This usually appears because some package your document needs isn't installed.
1839 If you didn't touch the preamble or didn't use the
1840 \begin_inset Flex Code
1843 \begin_layout Plain Layout
1851 command, then one of the packages LyX tried to load is missing.
1853 \begin_inset Flex MenuItem
1856 \begin_layout Plain Layout
1857 Help\SpecialChar \menuseparator
1863 to get a list of packages that LyX knows about.
1864 This file is updated whenever you reconfigure LyX (using
1865 \begin_inset Flex MenuItem
1868 \begin_layout Plain Layout
1869 Tools\SpecialChar \menuseparator
1875 ) and tells you which packages have been detected and what they do.
1876 \begin_inset Newline newline
1880 \begin_inset Flex Code
1883 \begin_layout Plain Layout
1891 command and the package in question isn't installed, then you'll need to
1892 install it yourself.
1895 \begin_layout Itemize
1896 \begin_inset Flex Code
1899 \begin_layout Plain Layout
1900 LaTeX Error: Unknown option
1906 \begin_inset Newline newline
1909 Error messages beginning with this are trying to tell you that you specified
1910 a bad or undefined option to a package.
1911 Check the package's documentation.
1914 \begin_layout Itemize
1915 \begin_inset Flex Code
1918 \begin_layout Plain Layout
1919 Undefined control sequence
1925 \begin_inset Newline newline
1928 If you've inserted LaTeX code into your document, but made a typo, you'll
1930 You may have forgotten to load a package.
1931 In any case, this error message usually means that you used an undefined
1936 \begin_layout Standard
1937 There are other error and warning messages.
1938 Some are self-explanatory.
1939 These are usually LaTeX messages.
1940 Others are downright cryptic.
1941 These are usually TeX error messages, and we really have
1945 what they mean or how to decipher them.
1949 \begin_layout Standard
1950 There's a general sequence you should follow if you get error messages:
1953 \begin_layout Enumerate
1954 Look at the LaTeX code you inserted for typos.
1957 \begin_layout Enumerate
1958 If there are no typos, check that you used the command(s) correctly.
1961 \begin_layout Enumerate
1962 If you get a bunch of error boxes piled up at the very top of the document—and
1963 especially if you see a
1964 \begin_inset Quotes eld
1968 \begin_inset Flex Code
1971 \begin_layout Plain Layout
1980 \begin_inset Quotes erd
1983 error—it means that there are errors in the preamble.
1984 Start debugging your preamble.
1987 \begin_layout Enumerate
1988 If you didn't add anything to the preamble and didn't add any LaTeX code
1989 to the document, the first suspect is your LaTeX distribution itself.
1990 Check for missing packages and install them.
1993 \begin_layout Enumerate
1994 Okay, so there are no missing packages.
1995 Did you use any of the fine-tuning options in LyX? Specifically, did you
2000 any of them, like trying to manually insert lots of
2001 \begin_inset Flex Code
2004 \begin_layout Plain Layout
2006 \begin_inset space ~
2015 \begin_inset Flex Code
2018 \begin_layout Plain Layout
2025 \begin_inset Flex Code
2028 \begin_layout Plain Layout
2034 ? Did you try to kludge something together with these instead of using the
2035 appropriate paragraph environment?
2038 \begin_layout Enumerate
2039 All right, you didn't use any of the fine-tuning options, you played by
2041 Did you try to pull a fancy maneuver? Did you do something funky inside
2042 a table or an equation, like inserting a graphic into a table cell?
2045 \begin_layout Enumerate
2046 Do you have long sections of text where LaTeX cannot find a place to break
2047 a line? By default, LaTeX is rather strict about how much extra inter-word
2048 spacing it will add in order to break a line.
2049 Preferably, you should rework the paragraph to avoid the problem.
2050 If this isn't an option, you can wrap your text in
2051 \begin_inset Flex Code
2054 \begin_layout Plain Layout
2062 to make LaTeX's line breaking more, well, sloppy.
2065 \begin_layout Enumerate
2066 Did you go overboard with the nesting? LyX (currently) doesn't check to
2067 make sure you're in the limits for nesting environments.
2068 If you nested a bunch of environments to the
2069 \begin_inset Formula $17^{\mathrm{th}}$
2072 level, that's the problem.
2073 (The limit in LaTeX is five.)
2076 \begin_layout Enumerate
2077 Okay, you didn't get any error messages, but your output looks awful.
2078 If you have a table or figure that's too wide or long for the page, you
2083 \begin_layout Enumerate
2084 rescale the figure so it fits.
2087 \begin_layout Enumerate
2088 trim down the table so it fits.
2092 \begin_layout Enumerate
2093 If something else is wrong with the output, and you didn't try to pull anything
2094 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2097 \begin_layout Standard
2098 If all this doesn't help—well, then
2102 you might have found a bug in LyX\SpecialChar \ldots{}
2106 \begin_layout Chapter
2110 \begin_layout Section
2111 Customizing Bibliographies with BibTeX
2114 \begin_layout Standard
2115 The most basic information about how to use BibTeX with LyX is contained
2118 Bibliography databases (BibTeX)
2125 The following subsections explain special bibliography features supported
2129 \begin_layout Subsection
2130 Alternative Citation Styles
2133 \begin_layout Standard
2134 Standard BibTeX uses numbers (e.
2135 \begin_inset space \thinspace{}
2139 \begin_inset space \space{}
2143 \begin_inset Quotes eld
2147 \begin_inset Quotes erd
2150 ) to refer to a cited work.
2151 However, in many scientific disciplines, other citation styles are in use.
2152 The most common one is the author-year style (e.
2153 \begin_inset space \thinspace{}
2157 \begin_inset space \space{}
2161 \begin_inset Quotes eld
2165 \begin_inset Quotes erd
2169 LyX supports two packages that provide this style,
2170 \begin_inset Flex Code
2173 \begin_layout Plain Layout
2180 \begin_inset Flex Code
2183 \begin_layout Plain Layout
2190 Both packages have their pros and cons, which cannot be listed in detail.
2191 If you only want to have simple author-year (or author-numerical) style,
2192 or if you want to use one of the countless style files for
2193 \begin_inset Flex Code
2196 \begin_layout Plain Layout
2202 , than the established
2203 \begin_inset Flex Code
2206 \begin_layout Plain Layout
2212 package is probably your choice.
2213 If you need special features like short title references, ibidem etc., you
2215 \begin_inset Flex Code
2218 \begin_layout Plain Layout
2227 \begin_layout Standard
2228 The handling of both packages in LyX is basically the same.
2230 \begin_inset Flex MenuItem
2233 \begin_layout Plain Layout
2234 Document\SpecialChar \menuseparator
2241 \begin_inset Flex MenuItem
2244 \begin_layout Plain Layout
2251 \begin_inset Flex MenuItem
2254 \begin_layout Plain Layout
2261 \begin_inset Flex MenuItem
2264 \begin_layout Plain Layout
2271 With both packages, you will get some extra features in the citation dialog
2272 and you can select the style of the reference (
2273 \begin_inset Quotes eld
2277 \begin_inset Quotes erd
2281 \begin_inset Quotes eld
2285 \begin_inset Quotes erd
2289 \begin_inset Quotes eld
2293 \begin_inset Quotes erd
2297 \begin_inset Quotes eld
2301 \begin_inset Quotes erd
2305 Note that both packages need specifically designed style files.
2306 They both ship their own, but there are lots of additional style files,
2307 and there is even an interactive style file builder
2311 \begin_layout Plain Layout
2313 \begin_inset Flex URL
2316 \begin_layout Plain Layout
2318 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2329 \begin_inset Flex Code
2332 \begin_layout Plain Layout
2341 \begin_layout Subsection
2342 Sectioned Bibliographies
2345 \begin_layout Standard
2346 Sometimes you might need to divide your bibliography into several sections.
2347 If you are for instance a historian, the possibility to separate sources
2348 and scientific works is most likely a
2349 \begin_inset Quotes eld
2353 \begin_inset Quotes erd
2357 Unfortunately, BibTeX itself does not allow you to do this.
2358 But with the help of some LaTeX packages, BibTeX can be extended to fit
2362 \begin_layout Standard
2363 LyX provides native support for one of these packages,
2371 \begin_layout Plain Layout
2373 \begin_inset Flex URL
2376 \begin_layout Plain Layout
2378 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2388 The advantage of this package (compared to other packages like
2392 ) is that you don't need to define new citation commands.
2393 Instead, you need to prepare different bibliographic databases which include
2394 the entries for the different sections of the bibliography.
2395 For example: If you want to divide your bibliography into the sections
2397 \begin_inset Quotes eld
2401 \begin_inset Quotes erd
2405 \begin_inset Quotes eld
2409 \begin_inset Quotes erd
2412 , you first need to create two bibliographic databases, e.
2413 \begin_inset space \thinspace{}
2417 \begin_inset space \space{}
2421 \begin_inset Flex Code
2424 \begin_layout Plain Layout
2431 \begin_inset Flex Code
2434 \begin_layout Plain Layout
2444 \begin_layout Standard
2446 \begin_inset Flex MenuItem
2449 \begin_layout Plain Layout
2450 Document\SpecialChar \menuseparator
2457 \begin_inset Flex MenuItem
2460 \begin_layout Plain Layout
2467 \begin_inset Flex MenuItem
2470 \begin_layout Plain Layout
2471 Sectioned bibliography
2477 Now you can insert multiple BibTeX bibliographies, one for each section
2478 of your bibliography.
2479 Returning to our example: Insert the BibTeX bibliography
2480 \begin_inset Flex Code
2483 \begin_layout Plain Layout
2489 and a second one for the database
2490 \begin_inset Flex Code
2493 \begin_layout Plain Layout
2500 You are free to use the same or different styles for each section.
2501 Additionally, you can chose if the bibliography section should contain
2503 \begin_inset Quotes eld
2506 all cited references
2507 \begin_inset Quotes erd
2510 of the specified database(s) (which is the default),
2511 \begin_inset Quotes eld
2514 all uncited references
2515 \begin_inset Quotes erd
2519 \begin_inset Quotes eld
2523 \begin_inset Quotes erd
2527 This might be useful if you would like to separate your bibliography into
2529 \begin_inset Quotes eld
2533 \begin_inset Quotes erd
2537 \begin_inset Quotes eld
2541 \begin_inset Quotes erd
2545 \begin_inset Quotes eld
2549 \begin_inset Quotes erd
2553 The titles for the sections can be added as ordinary sections or subsections.
2555 \begin_inset Flex Code
2558 \begin_layout Plain Layout
2564 removes the bibliography title, you have manually re-add that, too (as
2565 a chapter* or section*, for instance).
2568 \begin_layout Subsection
2569 Multiple Bibliographies
2572 \begin_layout Standard
2573 Multiple bibliographies, e.
2574 \begin_inset space \thinspace{}
2578 \begin_inset space \space{}
2581 a bibliography for each section or chapter of the document, are not supported
2584 \begin_inset Flex Code
2587 \begin_layout Plain Layout
2593 package, which is used for the creation of sectioned bibliographies in
2594 LyX (see the previous section), provides an easy way to solve this task,
2595 if you are willing to use some
2596 \begin_inset Flex MenuItem
2599 \begin_layout Plain Layout
2606 \begin_inset space ~
2610 \begin_inset CommandInset ref
2612 reference "sec:Inserting-TeX-Code"
2620 \begin_layout Plain Layout
2621 An alternative approach is to use the
2622 \begin_inset Flex Code
2625 \begin_layout Plain Layout
2632 \begin_inset Flex Code
2635 \begin_layout Plain Layout
2641 package, respectively.
2649 \begin_layout Standard
2651 \begin_inset Flex MenuItem
2654 \begin_layout Plain Layout
2655 Document\SpecialChar \menuseparator
2662 \begin_inset Flex MenuItem
2665 \begin_layout Plain Layout
2672 \begin_inset Flex MenuItem
2675 \begin_layout Plain Layout
2676 Sectioned bibliography
2682 In the document, you have to enclose the sections, which shall contain
2683 their own bibliography (including the BibTeX bibliography itself), between
2685 \begin_inset Flex Code
2688 \begin_layout Plain Layout
2697 \begin_inset Flex Code
2700 \begin_layout Plain Layout
2708 (those commands have to be inserted as TeX code).
2709 The bibliography will contain all references which have been cited in the
2711 \begin_inset Flex Code
2714 \begin_layout Plain Layout
2725 If you are using this approach, then every citation reference has to be
2727 \begin_inset Flex Code
2730 \begin_layout Plain Layout
2738 \begin_inset Flex Code
2741 \begin_layout Plain Layout
2750 \begin_layout Section
2754 \begin_layout Subsection
2758 \begin_layout Standard
2759 When you are working on a large file with many sections, it is often convenient
2760 to break up the document into several files, or perhaps you have something
2761 where a table may change from time to time, but the preceding text does
2763 In these cases, you should seriously consider using multipart documents.
2764 For example, scientific papers often have five major sections: the introduction
2765 , observations, results, discussion, and conclusion.
2766 Each of these could be its own separate LyX file, with one
2767 \begin_inset Quotes eld
2771 \begin_inset Quotes erd
2774 file which contains the title, authors, abstract, references, etc., plus
2775 the five included files.
2776 It is important to note that each of these files is a full LyX file which
2777 can be formatted and printed on its own, as well as included in a master
2779 Each of these files must have the same document class, however—don't attempt
2780 to mix book classes with article classes.
2781 You may also include LaTeX files; however, these files must not have their
2783 \begin_inset space \thinspace{}
2787 \begin_inset space \space{}
2790 everything up to and including the
2791 \begin_inset Flex Code
2794 \begin_layout Plain Layout
2803 \begin_inset Flex Code
2806 \begin_layout Plain Layout
2814 line must be deleted) or else errors will be generated when you try to
2818 \begin_layout Standard
2819 LyX allows you to include files quite easily with
2820 \begin_inset Flex MenuItem
2823 \begin_layout Plain Layout
2824 Insert\SpecialChar \menuseparator
2826 \begin_inset space ~
2835 When you click on this selection a small box is inserted into the file
2836 at the current cursor location.
2837 Clicking on the box raises a dialog which allows you to select the file
2838 to be included, and the method of its inclusion.
2842 \begin_layout Standard
2843 The file selection box should by now be obvious.
2844 The three inclusion methods are
2845 \begin_inset Quotes eld
2849 \begin_inset Quotes erd
2853 \begin_inset Quotes eld
2857 \begin_inset Quotes erd
2861 \begin_inset Quotes eld
2865 \begin_inset Quotes erd
2869 The difference between
2870 \begin_inset Quotes eld
2874 \begin_inset Quotes erd
2878 \begin_inset Quotes eld
2882 \begin_inset Quotes erd
2885 is really only meaningful to LaTeXperts, but the practical difference is
2886 that files which are
2887 \begin_inset Quotes eld
2891 \begin_inset Quotes erd
2894 are typeset beginning on a new page, while files which are
2895 \begin_inset Quotes eld
2899 \begin_inset Quotes erd
2902 are typeset starting on the current page.
2905 \begin_layout Standard
2906 Generally, the master file is converted into a full LaTeX file before typesettin
2907 g, while the included files are converted to LaTeX files which do not have
2908 all the preamble information.
2911 \begin_layout Standard
2913 \begin_inset Quotes eld
2917 \begin_inset Quotes erd
2920 included file allows you to include a file typeset exactly as it appears
2922 \begin_inset space \thinspace{}
2926 \begin_inset space \space{}
2930 \begin_inset Flex Code
2933 \begin_layout Plain Layout
2939 mode, with the characters set in a fixed-width typewriter font.
2940 Normally, spaces in this file are invisible, though two consecutive spaces
2941 are conserved, unlike LyX's normal treatment of spaces.
2942 However, setting the
2943 \begin_inset Flex MenuItem
2946 \begin_layout Plain Layout
2948 \begin_inset space ~
2952 \begin_inset space ~
2956 \begin_inset space ~
2964 checkbox typesets a mark to unambiguously define the presence of a space.
2968 \begin_layout Subsection
2969 Cross-References Between Files
2972 \begin_layout Standard
2973 \begin_inset Box Shadowbox
2983 height_special "totalheight"
2986 \begin_layout Plain Layout
2987 This section is somewhat out of date.
2988 Need to describe default master documents and how children are opened when
2998 \begin_layout Standard
2999 It is possible to set up cross-references between the different files.
3000 First, open all the files in question: let's call them A and B in a two
3001 file example, where B is included in A.
3002 Let's say you insert a label in A, then want to reference it in B.
3003 Open the cross-reference dialog in whilst in document B, and you can select
3005 \begin_inset Quotes eld
3009 \begin_inset Quotes erd
3015 \begin_layout Subsection
3016 Bibliography Lists in all Subdocuments
3019 \begin_layout Standard
3020 \begin_inset Box Frameless
3030 height_special "totalheight"
3033 \begin_layout Plain Layout
3034 This section also needs updating.
3035 There is now material about this on the wiki, and it could be copied here.
3043 \begin_layout Standard
3044 Copy the bibliography list with all entries to all subdocuments and transform
3046 This way LyX will find the
3047 \begin_inset Flex Code
3050 \begin_layout Plain Layout
3056 -files and you can easily insert references without making the bibliography
3060 \begin_layout Standard
3061 As the bibliography list is in a comment, LaTeX won't use use it and the
3062 references will look like this: [?], instead of like this: [1].
3063 One solution is to use the LaTeX-package
3064 \begin_inset Flex Code
3067 \begin_layout Plain Layout
3073 that will only include comments by processing the files separately.
3074 To do this, add in the LaTeX preamble of every subdocument the following:
3077 \begin_layout LyX-Code
3083 \begin_layout LyX-Code
3086 includecomment{comment}
3089 \begin_layout Standard
3091 \begin_inset Flex URL
3094 \begin_layout Plain Layout
3096 http://wiki.lyx.org/FAQ/Unsorted#toc31
3104 \begin_layout Section
3108 \begin_layout Standard
3109 Users sometimes need to be able to
3110 \begin_inset Quotes eld
3114 \begin_inset Quotes erd
3117 a LyX file together with all the images (and other files) on which it depends,
3118 either for sending to a publisher or for sharing with a co-author.
3119 LyX 2.0 includes a Python script (
3120 \begin_inset Flex Code
3123 \begin_layout Plain Layout
3129 ) that automates this process.
3130 To use it, you must have either the
3131 \begin_inset Flex Code
3134 \begin_layout Plain Layout
3141 \begin_inset Flex Code
3144 \begin_layout Plain Layout
3150 python modules installed on your system.
3151 By default, the script prefers the
3152 \begin_inset Flex Code
3155 \begin_layout Plain Layout
3162 \begin_inset Flex Code
3165 \begin_layout Plain Layout
3171 format on Unix-like systems and the
3172 \begin_inset Flex Code
3175 \begin_layout Plain Layout
3184 \begin_layout Standard
3185 LyX's configuration process will set the script up to export a `LyX Archive',
3186 and this format will then be available under
3187 \begin_inset Flex Code
3190 \begin_layout Plain Layout
3191 File\SpecialChar \menuseparator
3200 \begin_layout Standard
3201 Independently of the platform, the generation of a particular archive format
3202 can be forced by adding either the
3203 \begin_inset Flex Code
3206 \begin_layout Plain Layout
3213 \begin_inset Flex Code
3216 \begin_layout Plain Layout
3223 \begin_inset Flex Code
3226 \begin_layout Plain Layout
3233 \begin_inset Flex Code
3236 \begin_layout Plain Layout
3242 format) switch to the
3243 \begin_inset Flex Code
3246 \begin_layout Plain Layout
3247 LyX\SpecialChar \menuseparator
3254 \begin_inset Flex Code
3257 \begin_layout Plain Layout
3258 Tools\SpecialChar \menuseparator
3259 Preferences\SpecialChar \menuseparator
3260 File Handling\SpecialChar \menuseparator
3267 (Make sure you add the switch after the script name, not before it.)
3270 \begin_layout Section
3271 Fancy Headers and Footers
3274 \begin_layout Standard
3275 The default page layout is rather plain; for an
3276 \begin_inset Flex Code
3279 \begin_layout Plain Layout
3285 document class, all you get is a centered page number at the bottom of
3287 This document uses KOMA-script's book class, so it appears to be a bit
3289 But to really put on a show, you need to set the document page style to
3291 \begin_inset Quotes eld
3295 \begin_inset Quotes erd
3298 , as mentioned in the
3303 This section describes the LaTeX code you need to insert in your LaTeX
3304 preamble in order to get the desired effects.
3307 \begin_layout Standard
3308 For more information on fancy headers, see the
3309 \begin_inset Flex Code
3312 \begin_layout Plain Layout
3318 package documentation.
3320 \begin_inset Flex URL
3323 \begin_layout Plain Layout
3325 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3333 \begin_layout Standard
3334 The page header is divided into three fields, not surprisingly labeled
3335 \begin_inset Quotes eld
3339 \begin_inset Quotes erd
3343 \begin_inset Quotes eld
3347 \begin_inset Quotes erd
3351 \begin_inset Quotes eld
3355 \begin_inset Quotes erd
3359 The footer is also divided into these three fields.
3360 The LaTeX commands to set these fields in the simplest manner are
3361 \begin_inset Flex Code
3364 \begin_layout Plain Layout
3373 \begin_inset Flex Code
3376 \begin_layout Plain Layout
3385 \begin_inset Flex Code
3388 \begin_layout Plain Layout
3397 \begin_inset Flex Code
3400 \begin_layout Plain Layout
3409 Suppose you wish to put your name in the upper left hand corner of each
3411 Simply insert the following command in the preamble:
3414 \begin_layout Standard
3423 \begin_layout Standard
3424 You will now see your name in the upper left.
3425 If a field has a default entry that you would like to get rid of (often
3426 the page number appears in the central footer, simply include a command
3427 with a blank argument, e.
3428 \begin_inset space \thinspace{}
3434 \begin_layout Standard
3442 \begin_layout Standard
3443 Let's get really fancy: lets put the section number with the word
3444 \begin_inset Quotes eld
3448 \begin_inset Quotes erd
3452 \begin_inset space \thinspace{}
3456 \begin_inset space \space{}
3459 Section 3) in the upper left, the page number (e.
3460 \begin_inset space \thinspace{}
3464 \begin_inset space \space{}
3467 Page 4) in the upper right, your name in the lower left, and the date in
3469 The following commands should now appear in the preamble:
3472 \begin_layout Standard
3482 \begin_layout Standard
3490 \begin_layout Standard
3500 \begin_layout Standard
3509 \begin_layout Standard
3517 \begin_layout Standard
3527 \begin_layout Standard
3529 \begin_inset Flex Code
3532 \begin_layout Plain Layout
3541 \begin_inset Flex Code
3544 \begin_layout Plain Layout
3552 access LaTeX's section and page counters, and so print out the current
3553 section and page numbers.
3555 \begin_inset Flex Code
3558 \begin_layout Plain Layout
3566 simply prints out today's date.
3569 \begin_layout Standard
3570 The thicknesses of the horizontal rules drawn beneath the header and above
3571 the footer can also be modified.
3572 If you don't want one of the rules, set its thickness to 0.
3573 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3579 \begin_inset Flex Code
3582 \begin_layout Plain Layout
3587 headrulewidth}{0.4pt}
3593 \begin_inset Flex Code
3596 \begin_layout Plain Layout
3601 footrulewidth}{0.4pt}
3606 to set the thicknesses.
3609 \begin_layout Standard
3610 You can switch the header/footer settings on and off for individual pages
3612 \begin_inset Flex Code
3615 \begin_layout Plain Layout
3618 thispagestyle{empty}
3624 \begin_inset Flex Code
3627 \begin_layout Plain Layout
3630 thispagestyle{plain}
3636 \begin_inset Flex Code
3639 \begin_layout Plain Layout
3642 thispagestyle{fancy}
3648 Simply insert them in the text on the page you want changed and mark them
3650 In fact, title pages are marked as plain by default, while following pages
3651 are marked fancy when using the global fancy setting.
3654 \begin_layout Standard
3655 As a final example, it is possible to include an image in the header or
3657 Suppose you want to put a company logo in the upper lefthand corner.
3658 You might try something like
3661 \begin_layout Standard
3670 includegraphics{logo.eps}}}
3673 \begin_layout Standard
3675 (you may need to preface this with
3676 \begin_inset Flex Code
3679 \begin_layout Plain Layout
3683 usepackage{graphics}
3688 if you don't include graphics elsewhere in your document).
3691 \begin_layout Section
3692 Itemize Bullet Selection
3693 \begin_inset CommandInset label
3702 \begin_layout Standard
3708 \begin_layout Subsection
3712 \begin_layout Standard
3713 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3714 Using this dialog you can easily specify what bullet shape to use at each
3715 level of an itemized list.
3716 These settings are document-wide so you won't be able to specify different
3717 sets of bullets for different paragraphs.
3721 \begin_layout Plain Layout
3722 Well, actually you can but you'll have to do it by hand.
3730 \begin_layout Subsection
3734 \begin_layout Standard
3735 Open the dialog by selecting the
3736 \begin_inset Flex MenuItem
3739 \begin_layout Plain Layout
3740 Document\SpecialChar \menuseparator
3746 menu item and then select the
3747 \begin_inset Flex MenuItem
3750 \begin_layout Plain Layout
3759 \begin_layout Standard
3760 The dialog provides you with a table of bullet shapes.
3761 A column of buttons on the left of the table provides access to the six
3762 different panels of bullet shapes.
3763 The row of buttons across the top is used to select which bullet depth
3765 A text entry under the table shows the currently selected bullet shape's
3766 LaTeX equivalent and this can be edited if desired.
3767 If you do modify the text you will also need to specify any needed packages
3768 in the LaTeX preamble.
3771 \begin_layout Standard
3772 The six panels are divided up by the packages they require.
3773 The following table shows the mappings from button name to LaTeX packages.
3776 \begin_layout Standard
3778 \begin_inset Tabular
3779 <lyxtabular version="3" rows="7" columns="2">
3780 <features tabularvalignment="middle">
3781 <column alignment="center" valignment="top" width="0pt">
3782 <column alignment="center" valignment="top" width="0pt">
3784 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3787 \begin_layout Plain Layout
3802 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3805 \begin_layout Plain Layout
3822 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3825 \begin_layout Plain Layout
3840 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3843 \begin_layout Plain Layout
3859 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3862 \begin_layout Plain Layout
3877 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3880 \begin_layout Plain Layout
3897 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3900 \begin_layout Plain Layout
3915 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3918 \begin_layout Plain Layout
3935 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3938 \begin_layout Plain Layout
3953 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3956 \begin_layout Plain Layout
3973 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3976 \begin_layout Plain Layout
3991 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3994 \begin_layout Plain Layout
4011 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4014 \begin_layout Plain Layout
4029 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4032 \begin_layout Plain Layout
4055 \begin_layout Standard
4056 LyX doesn't stop you using bullets from packages you don't have.
4057 If you get errors from LaTeX when you try to view or print the file, then
4058 it is likely you are missing a package.
4062 \begin_layout Plain Layout
4063 LyX doesn't restrict your use since you may be editing locally and exporting
4072 \begin_layout Subsection
4076 \begin_layout Standard
4077 Select which bullet depth you want to change then select the bullet shape
4079 Any changes will not be visible in LyX, but are visible when viewing the
4083 \begin_layout Standard
4084 You can reset a bullet shape to the default simply by clicking your right
4085 mouse button on the appropriate bullet depth button.
4089 \begin_layout Plain Layout
4094 want to have multiple sets of paragraphs with different sets of bullets
4095 in each, then you're going to have to get your hands dirty with TeX code.
4096 The bullet selection dialog can help though because it provides you with
4097 the LaTeX code for a wide range of bullet shapes.
4098 To make your own custom paragraphs you have the following options:
4101 \begin_layout Plain Layout
4105 \begin_layout Plain Layout
4121 \begin_layout Plain Layout
4125 \begin_layout Plain Layout
4147 \begin_layout Itemize
4148 Use the LaTeX command
4149 \begin_inset Flex Code
4152 \begin_layout Plain Layout
4160 to specify a new bullet shape for a given depth.
4161 You'll also need to save the current bullet shape so you can restore it
4163 In this itemized list the following LaTeX code was used to change the bullet
4164 used for the first depth.
4168 \begin_layout LyX-Code
4178 \begin_layout LyX-Code
4195 \begin_layout Itemize
4196 Note that the itemize depth is specified in Roman numerals as part of the
4206 \begin_layout Itemize
4210 \begin_layout Plain Layout
4223 Specify each individual entry by starting each item with the bullet shape
4224 enclosed in square brackets and set as
4225 \begin_inset Flex MenuItem
4228 \begin_layout Plain Layout
4235 For example, this item was started with
4236 \begin_inset Flex Code
4239 \begin_layout Plain Layout
4254 \begin_layout Plain Layout
4258 \begin_layout Plain Layout
4274 \begin_layout Plain Layout
4275 You'll also need to revert the labelitem back to its previous setting for
4276 the global bullet shape settings to remain in effect.
4277 The way used here was:
4280 \begin_layout LyX-Code
4295 \begin_layout Chapter
4296 LyX and the World Wide Web
4299 \begin_layout Standard
4300 LyX has long supported the export of documents to various web-friendly formats,
4302 Before verson 2.0, however, HTML export was always accomplished by the use
4303 of external converters.
4307 \begin_layout Plain Layout
4308 For details on the use of external converters with LyX, see the
4312 section of the Customization manual.
4317 These fall into two large groups: there are converters that use LaTeX as
4318 an intermediate format, such as
4319 \begin_inset Flex Code
4322 \begin_layout Plain Layout
4329 \begin_inset Flex Code
4332 \begin_layout Plain Layout
4339 \begin_inset Flex Code
4342 \begin_layout Plain Layout
4348 , relying upon LyX to produce the LaTeX; and there is a converter that works
4349 directly on LyX files,
4350 \begin_inset Flex Code
4353 \begin_layout Plain Layout
4360 All of these have different advantages and disadvantages.
4364 \begin_layout Standard
4365 The LaTeX-based converters have the advantage that, in principle, they know
4366 everything about the exported document that LaTeX does.
4367 Such converters do not care, for example, if a certain block of code was
4368 produced by LyX or was Evil Red Text.
4369 These converters know about
4370 \begin_inset Flex Code
4373 \begin_layout Plain Layout
4379 files, counters, and references, and can often make use of the
4380 \begin_inset Flex Code
4383 \begin_layout Plain Layout
4389 files generated by BibTeX.
4390 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4391 said that only TeX itself understands TeX---and LaTeX-based converters
4392 will often choke on what seem to be quite simple constructs; complex ones
4393 can throw them completely, and as of this writing, for example, the
4397 manual will not export with
4398 \begin_inset Flex Code
4401 \begin_layout Plain Layout
4407 , though the others will.
4408 The other issue concerns how math is handled.
4409 These converters typically convert the formulae into little pictures that
4410 are then linked from the HTML document.
4411 Since these are actually generated by LaTeX, they are accurate.
4412 But they do not scale well, and just getting them to look as if they are
4413 actually meant to be in your document---so that the font sizes seem to
4414 be roughly the same---can be a challenge.
4417 \begin_layout Standard
4419 \begin_inset Flex Code
4422 \begin_layout Plain Layout
4429 \begin_inset CommandInset href
4431 name "http://elyxer.nongnu.org/"
4432 target "http://elyxer.nongnu.org/"
4436 ) solves some of these problems.
4437 In particular, the formulae it produces scale perfectly, since it renders
4438 math using a combination of HTML and CSS rather than converting the formulae
4440 But even moderately complex formula are rendered less well than with
4441 \begin_inset Flex Code
4444 \begin_layout Plain Layout
4450 ; this reflects the limitations of HTML.
4454 \begin_layout Plain Layout
4456 \begin_inset Flex Code
4459 \begin_layout Plain Layout
4465 can also use jsMath and MathJax for equations, but this setting is only
4466 available globally and requires one to have access to a server that runs
4472 More importantly (as of version 1.1.1, at least),
4473 \begin_inset Flex Code
4476 \begin_layout Plain Layout
4482 has limited support for math macros and no support for user-defined paragraph
4483 or character styles.
4484 These limitations make
4485 \begin_inset Flex Code
4488 \begin_layout Plain Layout
4494 unsuitable for many of the documents LyX users produce.
4495 In principle, of course, these problems could be solved, but the LyX developers
4496 have decided to follow a different path and have made LyX itself capable
4497 of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4501 \begin_layout Standard
4502 As of this writing, XHTML output remains under development and should probably
4504 \begin_inset Quotes eld
4508 \begin_inset Quotes erd
4515 \begin_layout Plain Layout
4517 \begin_inset Flex Code
4520 \begin_layout Plain Layout
4521 development/HTML.notes
4526 , which can be found in the LyX source tree or
4527 \begin_inset CommandInset href
4529 name "accessed online"
4530 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4534 , usually contains up-to-date information about the state of XHTML output.
4535 See also the list of XHTML bugs on
4536 \begin_inset CommandInset href
4538 name "the bug tracker"
4539 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"
4548 Still, the developers have chosen this approach because it has several
4549 potential advantages over the other two.
4552 \begin_layout Standard
4553 These advantages are primarily due to the fact that the XHTML output routines,
4554 since they are part of LyX, know everything LyX knows about the document
4559 \begin_layout Plain Layout
4560 Another advantage is that, since these routines are internal to LyX, they
4561 are immune to changes in LyX's file format, or to changes in the semantics
4567 So they know about the table of contents (as displayed in the outline),
4568 about the counters associated with different paragraph styles, and about
4569 user-defined styles.
4570 The XHTML output routines know what LyX knows about internationalization,
4571 too, so they will output
4572 \begin_inset Quotes eld
4576 \begin_inset Quotes erd
4580 \begin_inset Quotes eld
4588 \begin_inset Quotes erd
4591 , depending upon the language in effect at the time.
4595 \begin_layout Standard
4596 Quite generally, the output routines know what LyX knows about document
4597 layout, that is, about how the document is to be rendered on screen.
4598 We use this information when we output the document as XHTML.
4603 generates CSS style information corresponding to the layout information
4604 it uses to render the document on screen: if section headings are supposed
4605 to be sans-serif and bold as seen in LyX, then (by default) they will be
4606 sans-serif and bold when viewed in a web browser, too.
4607 And this is true not just for pre-defined styles, like Section, but for
4608 any style, including user-defined styles.
4609 Indeed, the XHTML output routines make no distinction between user-defined
4610 paragraph and character styles and LyX's own pre-defined styles: in each
4611 case, everything LyX knows about the styles is contained in the layout
4613 And much the same is true as regards pre-defined textual insets, such as
4614 footnotes, and various custom insets.
4618 \begin_layout Standard
4619 The result is that XHTML output can be customized and extended in exactly
4620 the same way LaTeX output can be customized and extended: through layout
4622 See chapter five of the
4626 manual for the details.
4629 \begin_layout Standard
4630 The remainder of this chapter contains more detailed information on XHTML
4631 output, its limitations, and ways to work around those limitations.
4634 \begin_layout Section
4635 Math Output in XHTML
4638 \begin_layout Standard
4639 LyX offers four choices for how math is rendered.
4640 These have various advantages and disadvantages:
4643 \begin_layout Itemize
4645 \begin_inset Newline newline
4648 MathML is a dialect of XML designed specifically for mathematics on the
4649 web, and it typically renders very well in browsers that support it.
4650 The disadvantage is that not all browsers support MathML, and support is
4651 not complete even in the Gecko-based browsers, such as Firefox.
4652 \begin_inset Newline newline
4655 If LyX is unable to render a formula as MathML---for example, if the formula
4657 \begin_inset Flex Code
4660 \begin_layout Plain Layout
4666 package or ERT---then it will instead output the formula as an image.
4670 \begin_layout Itemize
4672 \begin_inset Newline newline
4676 \begin_inset Flex Code
4679 \begin_layout Plain Layout
4685 outputs math as HTML, styled by CSS.
4689 \begin_layout Plain Layout
4690 LyX has borrowed some of the CSS for its HTML output from
4691 \begin_inset Flex Code
4694 \begin_layout Plain Layout
4705 For simple formulae, this can work quite well, though with more complicated
4706 formulae it tends to break down.
4707 Still, this method has the advantage that it is very widely supported and
4708 so it may be appropriate for documents that contain only a little, fairly
4710 \begin_inset Newline newline
4713 If Lyx is unable to render a formula as HTML---for example, if the formula
4715 \begin_inset Flex Code
4718 \begin_layout Plain Layout
4724 package or ERT---then it will instead output the formula as an image.
4728 \begin_layout Itemize
4730 \begin_inset Newline newline
4734 \begin_inset Flex Code
4737 \begin_layout Plain Layout
4743 , LyX will output formulae as images, the very same images, in fact, that
4744 are used for instant preview.
4748 \begin_layout Plain Layout
4749 Instant preview does
4753 have to be on for images to be output, however.
4758 The advantage to this method is that the images are simply generated by
4759 LaTeX, so they are very accurate.
4760 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4761 so they do not scale terribly well, and one cannot copy them, etc.
4762 (As of this writing, there are also problems about equation numbering.
4764 \begin_inset CommandInset href
4767 target "http://www.lyx.org/trac/ticket/6894"
4772 \begin_inset Newline newline
4775 The size of the images can be controlled by setting the
4776 \begin_inset Quotes eld
4780 \begin_inset Quotes erd
4784 \begin_inset Flex MenuItem
4787 \begin_layout Plain Layout
4788 Document\SpecialChar \menuseparator
4789 Settings\SpecialChar \menuseparator
4799 \begin_layout Plain Layout
4800 For those who want to know, this controls the resolution of the image in
4801 dots per inch and is based upon a default of 75 dpi.
4807 \begin_inset Newline newline
4810 If LyX for some reason fails to create an image for a formula (e.g., if a
4811 required LaTeX package is not installed), then it will fall back to outputing
4815 \begin_layout Itemize
4817 \begin_inset Newline newline
4820 Finally, LyX will happily output math as LaTeX.
4821 As well as being the output of last resort, this method can be used with
4823 \begin_inset CommandInset href
4826 target "http://www.math.union.edu/~dpvc/jsMath/"
4830 , which uses JavaScript to render LaTeX embedded in HTML documents.
4831 LyX wraps the LaTeX in either a
4832 \begin_inset Flex Code
4835 \begin_layout Plain Layout
4841 (for inline formulas) or
4842 \begin_inset Flex Code
4845 \begin_layout Plain Layout
4851 (for displayed formulas) with
4852 \begin_inset Flex Code
4855 \begin_layout Plain Layout
4861 , as is required for jsMath.
4864 \begin_layout Standard
4865 One of these output methods must be selected under
4866 \begin_inset Flex MenuItem
4869 \begin_layout Plain Layout
4870 Document\SpecialChar \menuseparator
4871 Settings\SpecialChar \menuseparator
4878 By default, LyX outputs MathML.
4879 This is a document-wide setting, therefore.
4882 \begin_layout Standard
4883 Eventually, LyX will offer the user the option to select an alternate output
4884 method for a particular inset, say, one that isn't being rendered very
4889 \begin_layout Plain Layout
4890 That said, since LyX falls back to images if the inset contains ERT, then
4891 one can force output as an image by putting some harmless ERT into the
4893 \begin_inset Formula $a=b\relax$
4904 \begin_layout Section
4905 Bibliography and Citations
4908 \begin_layout Standard
4909 XHTML output fully supports bibliographies and citations.
4913 \begin_layout Standard
4914 Citation labels are generated by the same machinery that generates LyX's
4915 on-screen labels, so the labels will look in the output much as they do
4916 in LyX, though better.
4917 If you are using numerical citations, then LyX will output numerical labels,
4918 such as [1] or [17], rather than simply showing the citation key in square
4919 brackets, as it does on-screen.
4920 If you are using author-year citations, then LyX will add lowercase letters
4921 to the years, just as BibTeX does, if it finds more than one citation for
4922 a given author-year combination.
4923 The labels will be printed with the bibliography entries.
4924 Note that there is, at present, no way to customize the appearance of the
4925 labels, for example, to choose between square brackets and parentheses.
4928 \begin_layout Standard
4929 Bibliography output is handled by the same machinery that handles the presentati
4930 on of reference information in the citation dialog, so you will see in the
4931 XHTML output pretty much what you would see if you were to look at a given
4932 entry in the citation dialog.
4933 The formatting can be customized in your layout file or, preferably, in
4939 manual for the details.
4942 \begin_layout Standard
4943 The main defect at present is that cross-referenced information is printed
4944 with every entry with which it is associated.
4945 So you can see things like this:
4950 \begin_inset Quotes eld
4953 Context and Logical Form
4954 \begin_inset Quotes erd
4959 Language in Context: Selected Essays
4961 (Oxford: Oxford University Press, 2007), pp.
4967 \begin_inset Quotes eld
4970 Semantics in Context
4971 \begin_inset Quotes erd
4976 Language in Context: Selected Essays
4978 (Oxford: Oxford University Press, 2007), pp.
4982 \begin_layout Standard
4983 This should be fixed before long.
4986 \begin_layout Standard
4987 There is no support at present for sectioned bibliographies.
4988 If you have multiple bibliographies, then LyX will print the same bibliography
4992 \begin_layout Section
4996 \begin_layout Standard
4997 LyX will happily export indexes as XHTML, but with certain limitations at
5001 \begin_layout Standard
5002 Index export will be most reliable when you do not attempt to use the fancy
5003 constructs that are described in the section on indexes in the
5011 \begin_layout Plain Layout
5012 The main issue here is that LyX itself does not really handle these.
5013 It just lets you enter what you would have to enter in raw LaTeX.
5018 We'll describe how they are handled using the subsection headings from
5022 \begin_layout Itemize
5023 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5024 these, but the entries must be separated by
5025 \begin_inset Quotes eld
5029 \begin_inset Quotes erd
5032 , that is, there must be spaces around the exclamation point.
5033 This is because it is otherwise too difficult to check for escaped exclamation
5034 points, ones in math, and so forth.
5037 \begin_layout Itemize
5038 Page Ranges: There is no support at all for page ranges, since these make
5039 no sense with XHMTL.
5040 Instead, you will just get two index entries, one at either end.
5043 \begin_layout Itemize
5044 Cross-referencing: There is no support for cross-referencing.
5045 If LyX finds an entry containing the
5046 \begin_inset Quotes eld
5049 |see\SpecialChar \ldots{}
5051 \begin_inset Quotes erd
5054 construct, it is just dropped, and the rest is treated as an ordinary index
5058 \begin_layout Itemize
5059 Index Entry Order: LyX does support attempts to fix the sorting order.
5060 It will take what is before the first `@' it finds and use that for sorting,
5061 taking what follows the first `@' to be the actual entry.
5062 At present, LyX does not check for escaped `@', so do not try to index
5066 \begin_layout Itemize
5067 Index Entry Layout: You can format entries by using the text style dialog,
5068 or by using any other method available within LyX itself.
5069 There is no support for constructs like:
5070 \begin_inset Quotes eld
5074 \begin_inset Quotes erd
5078 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5079 and everything that follows it.
5082 \begin_layout Itemize
5083 Multiple Indexes: There is no support for multiple indexes.
5084 Rather, all index entries will be printed as one large index.
5085 To avoid our printing several versions of the index, we print only the
5086 main index, so make sure you have one.
5089 \begin_layout Section
5090 Nomenclature and Glossary
5093 \begin_layout Standard
5094 There is at present no support for glossaries.
5095 Adding it would be fairly trivial, and welcome.
5098 \begin_layout Chapter
5102 \begin_layout Section
5106 \begin_layout Standard
5107 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5108 and retrieve information about the LyX internal state.
5109 This is only intended for advanced users, but they should find it useful.
5110 It is by writing to the LyX server, for example, that bibliography managers,
5111 such as JabRef, are able to
5112 \begin_inset Quotes eld
5116 \begin_inset Quotes erd
5122 \begin_layout Section
5123 Starting the LyX Server
5126 \begin_layout Standard
5127 The LyX server works through the use of a pair of named pipes.
5128 These are usually located in
5129 \begin_inset Flex Code
5132 \begin_layout Plain Layout
5138 , (except on Windows, where
5142 named pipes are special objects located in
5143 \begin_inset Flex Code
5146 \begin_layout Plain Layout
5158 ) and have the names
5159 \begin_inset Quotes eld
5163 \begin_inset Flex Code
5166 \begin_layout Plain Layout
5173 \begin_inset Quotes erd
5177 \begin_inset Quotes eld
5181 \begin_inset Flex Code
5184 \begin_layout Plain Layout
5191 \begin_inset Quotes erd
5195 External programs write into
5196 \begin_inset Flex Code
5199 \begin_layout Plain Layout
5205 and read back data from
5206 \begin_inset Flex Code
5209 \begin_layout Plain Layout
5216 The stem of the pipe names can be defined in the
5217 \begin_inset Flex MenuItem
5220 \begin_layout Plain Layout
5221 Tools\SpecialChar \menuseparator
5228 \begin_inset Flex Code
5231 \begin_layout Plain Layout
5232 "/home/myhome/lyxpipe"
5238 \begin_inset Flex Code
5241 \begin_layout Plain Layout
5255 on Windows (but any working path can be used).
5260 configure this manually in order for the server to start.
5263 \begin_layout Standard
5265 \begin_inset Flex Code
5268 \begin_layout Plain Layout
5275 \begin_inset Flex Code
5278 \begin_layout Plain Layout
5284 ' to create the pipes.
5285 If one of the pipes already exists, LyX will assume that another LyX process
5286 is already running and will not start the server.
5287 On POSIX (Unix like) systems, if for some other reason, an unused
5288 \begin_inset Quotes eld
5292 \begin_inset Quotes erd
5295 pipe is left in existence when LyX closes, then LyX will try to delete
5297 If this fails for some reason, you will need to delete the pipes manually
5298 and then restart LyX.
5299 On Windows, pipes are deleted by the OS on program termination or crash,
5301 \begin_inset Quotes eld
5305 \begin_inset Quotes erd
5308 pipes should not be possible.
5311 \begin_layout Standard
5312 To have several LyX processes with servers at the same time, you have to
5313 use different configurations, perhaps by using separate user directories,
5315 \begin_inset Flex Code
5318 \begin_layout Plain Layout
5324 file, for each process.
5327 \begin_layout Standard
5328 If you are developing a client program, you might find it useful to enable
5329 debugging information from the LyX server.
5330 Do this by starting LyX as
5331 \begin_inset Flex Code
5334 \begin_layout Plain Layout
5343 \begin_layout Standard
5344 You can find a complete example client written in C in the source distribution
5346 \begin_inset Flex Code
5349 \begin_layout Plain Layout
5350 development/lyxserver/server_monitor.c
5358 \begin_layout Standard
5359 Another useful tool is command-line based client you will find in
5360 \begin_inset Flex Code
5363 \begin_layout Plain Layout
5364 src/client/lyxclient
5372 \begin_layout Section
5373 Normal communication
5376 \begin_layout Standard
5377 To issue a LyX call, the client writes a line of ASCII text into the input
5379 This line has the following format:
5396 \begin_layout Description
5397 clientname is a name that the client can choose arbitrarily.
5398 Its only use is that LyX will echo it if it sends an answer—so a client
5399 can dispatch results from different requesters.
5402 \begin_layout Description
5403 function is the function you want LyX to perform.
5404 It is the same as the commands you'd use in the minibuffer.
5407 \begin_layout Description
5408 argument is an optional argument which is meaningful only to some functions
5410 \begin_inset Quotes eld
5414 \begin_inset Quotes erd
5417 LFUN will insert the argument as text at the cursor position).
5420 \begin_layout Standard
5421 The answer from LyX will arrive in the output pipe and be of the form
5438 \begin_layout Standard
5447 are just echoed from the command request, while
5451 is more or less useful information filled according to how the command
5452 execution worked out.
5453 Some commands, such as
5454 \begin_inset Quotes eld
5458 \begin_inset Quotes erd
5461 , will return information about the internal state of LyX, while other will
5462 return an empty data-response.
5463 This means that the command execution went fine.
5466 \begin_layout Standard
5467 In case of errors, the response from LyX will have this form
5484 \begin_layout Standard
5489 should contain an explanation of why the command failed.
5492 \begin_layout Standard
5496 \begin_layout LyX-Code
5497 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5498 \begin_inset Newline newline
5501 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5502 \begin_inset Newline newline
5505 read a <~/.lyxpipe.out
5506 \begin_inset Newline newline
5512 \begin_layout Section
5516 \begin_layout Standard
5517 LyX can notify clients of events going on asynchronously.
5518 Currently it will only do this if the user binds a key sequence with the
5520 \begin_inset Quotes eld
5524 \begin_inset Quotes erd
5528 The format of the string LyX sends is as follows:
5532 \begin_inset Flex Code
5535 \begin_layout Plain Layout
5546 \begin_layout Standard
5551 is the printed representation of the key sequence that was actually typed
5555 \begin_layout Standard
5556 This mechanism can be used to extend LyX's command set and implement macros.
5557 Bind some key sequence to
5558 \begin_inset Quotes eld
5562 \begin_inset Quotes erd
5566 Then start a client that listens on the output pipe, dispatches the command
5567 according to the sequence, and starts a function that may use LyX calls
5568 and LyX requests to issue a command or a series of commands to LyX.
5571 \begin_layout Section
5572 The simple LyX Server Protocol
5575 \begin_layout Standard
5576 LyX implements a simple protocol that can be used for session management.
5577 All messages are of the form
5590 \begin_layout Standard
5596 \begin_inset Quotes eld
5600 \begin_inset Quotes erd
5604 \begin_inset Quotes eld
5608 \begin_inset Quotes erd
5613 \begin_inset Quotes eld
5617 \begin_inset Quotes erd
5620 is received from a client, LyX will report back to inform the client that
5621 it's listening to it's messages, while
5622 \begin_inset Quotes eld
5626 \begin_inset Quotes erd
5629 sent from LyX will inform clients that LyX is closing.
5632 \begin_layout Section
5633 Reverse DVI/PDF search
5636 \begin_layout Standard
5637 Some DVI/PDF viewers
5641 \begin_layout Plain Layout
5642 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5643 Skim on Mac OSX and SumatraPDF on Windows.
5652 facility (also called
5657 This means that you can tell LyX to put the cursor to a specific line in
5658 the document by clicking at the respective position in the DVI/PDF output.
5659 To achieve this, the viewer must be able to communicate with LyX.
5660 This is done via the LyX server either by using the named pipe (
5664 ), or the UNIX domain socket (
5668 ) that LyX creates in its temporary directory (this is the way the
5669 \begin_inset Flex Code
5672 \begin_layout Plain Layout
5678 program communicates with LyX).
5679 In some cases, you need a helper script that mediates between the viewer
5680 and LyX, in others, the viewer can communicate with LyX directly.
5681 This depends on the selected viewer and on your operating system.
5682 The same applies to the way viewers need to be configured and the way the
5683 reverse search is actually performed.
5684 In what follows, we will thus describe how to setup reverse search for
5686 Before we turn to this, though, we will explain what needs to be done generally
5687 to enable reverse search in the DVI/PDF output.
5690 \begin_layout Subsection
5692 \begin_inset CommandInset label
5694 name "sub:rev-search"
5701 \begin_layout Standard
5702 In most cases LyX will do the work for you by enabling
5703 \begin_inset Flex MenuItem
5706 \begin_layout Plain Layout
5707 Document\SpecialChar \menuseparator
5708 Output\SpecialChar \menuseparator
5709 Synchronize with Output
5715 In such a case LyX will automatically insert the necessary SyncTeX macro
5716 (for PDF) or load the srcltx package (for DVI) respectively.
5717 This option can be easily reached also on
5718 \begin_inset Flex Code
5721 \begin_layout Plain Layout
5730 \begin_layout Standard
5731 If you need a different setting, you can select or input a custom macro
5732 from the drop down box just below
5733 \begin_inset Flex MenuItem
5736 \begin_layout Plain Layout
5737 Document\SpecialChar \menuseparator
5738 Settings\SpecialChar \menuseparator
5739 Output\SpecialChar \menuseparator
5740 Synchronize with Output
5748 \begin_layout Standard
5749 Please note that including the
5750 \begin_inset Flex Code
5753 \begin_layout Plain Layout
5760 \begin_inset Flex Code
5763 \begin_layout Plain Layout
5769 sometimes has an undesired impact on the typesetting.
5770 Thus, you should switch output synchronization off for the final typesetting
5772 \begin_inset Flex Code
5775 \begin_layout Plain Layout
5782 \begin_inset Flex Code
5785 \begin_layout Plain Layout
5794 \begin_layout Standard
5795 In case you need some more special settings that are not covered by the
5796 automatic settings, read the next section about how to set up output synchroniz
5798 If the automatic setup suits your needs, you can readily jump to section
5799 \begin_inset space ~
5803 \begin_inset CommandInset ref
5805 reference "sub:configuring-viewers"
5809 , where the necessary configuration steps in your viewer -- needed both
5810 with the automatic and the manual setup -- are described.
5813 \begin_layout Subsection
5817 \begin_layout Standard
5818 LaTeX provides several different methods for reverse search.
5819 Some are built-in in the
5820 \begin_inset Flex Code
5823 \begin_layout Plain Layout
5829 program, some are provided by external packages.
5830 Your choice depends on whether your LaTeX distribution already provides
5831 a given method (the built-in methods are rather new) and whether your viewer
5833 The available methods are described in the following.
5836 \begin_layout Subsubsection*
5837 Built-in DVI-search via src-specials (DVI only)
5840 \begin_layout Standard
5841 This method provides the DVI file with the necessary information for reverse
5843 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5844 distribution should include it), and it works reliably.
5845 To enable it, change the
5846 \begin_inset Flex MenuItem
5849 \begin_layout Plain Layout
5854 \begin_layout Plain Layout
5867 \begin_inset Flex MenuItem
5870 \begin_layout Plain Layout
5875 \begin_layout Plain Layout
5882 eX (plain)->DraftDVI
5888 \begin_inset Flex MenuItem
5891 \begin_layout Plain Layout
5892 Preferences\SpecialChar \menuseparator
5893 File Handling\SpecialChar \menuseparator
5900 \begin_inset Flex Code
5903 \begin_layout Plain Layout
5904 latex -src-specials $$i
5910 If this doesn't work, check if your TeX engine needs different options
5911 (the syntax might differ in some distributions).
5914 \begin_layout Subsubsection*
5915 External Packages (PDFSync and scrltx)
5918 \begin_layout Standard
5927 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5929 In order to enable it, load the packages in the LyX preamble:
5932 \begin_layout Itemize
5933 \begin_inset Flex Code
5936 \begin_layout Plain Layout
5944 for reverse PDF search,
5947 \begin_layout Itemize
5948 \begin_inset Flex Code
5951 \begin_layout Plain Layout
5954 usepackage[active]{srcltx}
5959 for reverse DVI search.
5962 \begin_layout Standard
5963 If you want to be able to perform both DVI and PDF reverse searches, you
5964 can also insert in the preamble the following lines
5967 \begin_layout LyX-Code
5971 \begin_inset Newline newline
5977 \begin_inset Newline newline
5983 \begin_inset Newline newline
5989 \begin_inset Newline newline
5994 usepackage[active]{srcltx}
5995 \begin_inset Newline newline
6003 \begin_layout Standard
6004 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6005 right package will be used.
6008 \begin_layout Standard
6009 Note that PDFSync might affect the output layout of your document.
6010 It is therefore advised to disable PDFsync for final documents.
6013 \begin_layout Subsubsection*
6014 Built-in reverse search via SyncTeX (DVI and PDF)
6017 \begin_layout Standard
6019 \begin_inset Flex Code
6022 \begin_layout Plain Layout
6028 have built-in support for both PDF and DVI reverse search.
6033 facility is basically the result of the integration of the PDFSync package
6034 to the pdftex program and its merge with the
6039 You need at least TeXLive 2008 or a recent MikTeX distribution in order
6041 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6042 already provide SyncTeX support.
6045 \begin_layout Standard
6046 To enable SyncTeX for DVI output, change the
6047 \begin_inset Flex MenuItem
6050 \begin_layout Plain Layout
6055 \begin_layout Plain Layout
6068 \begin_inset Flex MenuItem
6071 \begin_layout Plain Layout
6076 \begin_layout Plain Layout
6083 eX (plain) -> DraftDVI
6089 \begin_inset Flex MenuItem
6092 \begin_layout Plain Layout
6093 Preferences\SpecialChar \menuseparator
6094 File Handling\SpecialChar \menuseparator
6101 \begin_inset Flex Code
6104 \begin_layout Plain Layout
6105 latex -synctex=1 $$i
6110 , and for PDF output, change the
6111 \begin_inset Flex MenuItem
6114 \begin_layout Plain Layout
6119 \begin_layout Plain Layout
6126 eX (pdflatex) -> PDF (pdflatex)
6132 \begin_inset Flex Code
6135 \begin_layout Plain Layout
6136 pdflatex -synctex=1 $$i
6142 Check the documentation of your viewer whether the viewer needs to be configure
6143 d for the use with SyncTeX.
6147 \begin_layout Plain Layout
6149 \begin_inset Flex Code
6152 \begin_layout Plain Layout
6158 option enables gzip compression.
6159 If your viewer does not support it, you should instead use
6160 \begin_inset Flex Code
6163 \begin_layout Plain Layout
6177 \begin_layout Subsection
6178 Configuring and using specific viewers
6179 \begin_inset CommandInset label
6181 name "sub:configuring-viewers"
6188 \begin_layout Subsubsection*
6189 Xdvi (all platforms)
6192 \begin_layout Standard
6194 \begin_inset Flex Code
6197 \begin_layout Plain Layout
6203 , you don't need to do anything else for performing a reverse DVI search,
6204 as LyX already provides the necessary hooks for automatically using the
6206 \begin_inset Flex Code
6209 \begin_layout Plain Layout
6216 Just setup your document as described above (reverse search is triggered
6217 by Ctrl-click or Alt-click on Mac OSX, respectively).
6220 \begin_layout Standard
6221 However, if for whatever reason you want to use the named pipe instead of
6222 the socket for communicating with LyX, simply change the DVI viewer in
6224 \begin_inset Flex MenuItem
6227 \begin_layout Plain Layout
6228 Preferences\SpecialChar \menuseparator
6229 File Handling\SpecialChar \menuseparator
6239 \begin_layout Plain Layout
6240 On Mac OSX you have to use
6241 \begin_inset Flex Code
6244 \begin_layout Plain Layout
6245 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6256 \begin_inset Flex Code
6259 \begin_layout Plain Layout
6260 xdvi -editor 'lyxeditor.sh %f %l'
6266 \begin_inset Flex Code
6269 \begin_layout Plain Layout
6275 is a suitable script.
6276 For example, a minimal shell script is the following one:
6279 \begin_layout LyX-Code
6281 \begin_inset Newline newline
6284 LYXPIPE="/path/to/lyxpipe"
6285 \begin_inset Newline newline
6288 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6289 \begin_inset Newline newline
6292 echo "$COMMAND" > "${LYXPIPE}".in || exit
6293 \begin_inset Newline newline
6296 read < "${LYXPIPE}".out || exit
6299 \begin_layout Standard
6301 \begin_inset Flex Code
6304 \begin_layout Plain Layout
6314 \begin_layout Plain Layout
6321 XServer pipe path specified in
6322 \begin_inset Flex MenuItem
6325 \begin_layout Plain Layout
6326 Preferences\SpecialChar \menuseparator
6336 \begin_layout Plain Layout
6338 \begin_inset Flex Code
6341 \begin_layout Plain Layout
6347 folder of a source distribution you can find a
6348 \begin_inset Flex Code
6351 \begin_layout Plain Layout
6357 script which is able to locate the
6361 based on your preferences.
6369 \begin_layout Subsubsection*
6373 \begin_layout Standard
6375 \begin_inset Flex Code
6378 \begin_layout Plain Layout
6379 /Applications/MacDviX_Folder/calleditor.script
6384 , add the following lines:
6387 \begin_layout LyX-Code
6392 \begin_layout Plain Layout
6399 X.app/Contents/MacOS/lyxeditor "$2" $1
6400 \begin_inset Newline newline
6406 \begin_layout Standard
6407 Modify the lines accordingly if you install LyX somewhere else than in the
6408 Applications folder.
6411 \begin_layout Standard
6412 Reverse search is triggered by Alt-click (OPTION-click).
6415 \begin_layout Subsubsection*
6419 \begin_layout Standard
6421 \begin_inset Flex Code
6424 \begin_layout Plain Layout
6425 open -a Skim.app $$i
6430 to the viewer setting in
6431 \begin_inset Flex MenuItem
6434 \begin_layout Plain Layout
6435 Preferences\SpecialChar \menuseparator
6436 File Handling\SpecialChar \menuseparator
6437 File formats\SpecialChar \menuseparator
6444 \begin_inset Flex MenuItem
6447 \begin_layout Plain Layout
6448 Skim\SpecialChar \menuseparator
6449 Preferences\SpecialChar \menuseparator
6459 \begin_layout Plain Layout
6469 \begin_layout Standard
6470 Reverse search is triggered by COMMAND-SHIFT-click
6473 \begin_layout Subsubsection*
6477 \begin_layout Standard
6479 \begin_inset Flex MenuItem
6482 \begin_layout Plain Layout
6483 Settings\SpecialChar \menuseparator
6484 Configure Okular\SpecialChar \ldots{}
6485 \SpecialChar \menuseparator
6492 \begin_inset Quotes eld
6496 \begin_inset Quotes erd
6500 \begin_inset Flex Code
6503 \begin_layout Plain Layout
6512 \begin_layout Standard
6513 Reverse search is triggered by SHIFT-click.
6516 \begin_layout Subsubsection*
6520 \begin_layout Standard
6521 Launch yap, choose its
6522 \begin_inset Flex MenuItem
6525 \begin_layout Plain Layout
6526 View\SpecialChar \menuseparator
6533 \begin_inset Quotes eld
6537 \begin_inset Quotes erd
6542 \begin_inset Quotes eld
6545 New\SpecialChar \ldots{}
6547 \begin_inset Quotes erd
6550 button and, in the window that opens, enter
6551 \begin_inset Quotes eld
6555 \begin_inset Quotes erd
6558 (or any other name you like) in the
6559 \begin_inset Quotes eld
6563 \begin_inset Quotes erd
6567 Now click on the button labeled
6568 \begin_inset Quotes eld
6571 \SpecialChar \ldots{}
6573 \begin_inset Quotes erd
6576 to open a file dialog and navigate to the directory containing the batch
6578 \begin_inset Flex Code
6581 \begin_layout Plain Layout
6589 \begin_inset Flex Code
6592 \begin_layout Plain Layout
6598 and then specify the program arguments as
6599 \begin_inset Flex Code
6602 \begin_layout Plain Layout
6610 \begin_inset Flex Code
6613 \begin_layout Plain Layout
6619 wrapper is used for communicating with LyX through the
6626 \begin_layout LyX-Code
6628 \begin_inset Newline newline
6631 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6640 \begin_inset Newline newline
6654 \begin_layout Standard
6655 Make sure that the LyXServer pipe path you specified in LyX is
6656 \begin_inset Flex Code
6659 \begin_layout Plain Layout
6673 , otherwise change the
6674 \begin_inset Flex Code
6677 \begin_layout Plain Layout
6683 wrapper accordingly.
6686 \begin_layout Standard
6687 In yap, reverse search is triggered by double-click.
6690 \begin_layout Subsubsection*
6691 SumatraPDF (Windows)
6694 \begin_layout Standard
6695 In order to use SumatraPDF for inverse search, enter
6696 \begin_inset Flex Code
6699 \begin_layout Plain Layout
6700 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6705 in the viewer setting in
6706 \begin_inset Flex MenuItem
6709 \begin_layout Plain Layout
6710 Preferences\SpecialChar \menuseparator
6711 File Handling\SpecialChar \menuseparator
6712 File formats\SpecialChar \menuseparator
6719 \begin_inset Flex Code
6722 \begin_layout Plain Layout
6728 is the previous wrapper.
6729 If SumatraPDF.exe is not in your command PATH, use its full file name.
6732 \begin_layout Standard
6733 Reverse search is triggered by double-click.
6736 \begin_layout Subsubsection*
6740 \begin_layout Standard
6741 First of all, make sure that yap is your default DVI viewer in the Windows
6742 environment, then launch it, choose its
6743 \begin_inset Flex MenuItem
6746 \begin_layout Plain Layout
6747 View\SpecialChar \menuseparator
6754 \begin_inset Quotes eld
6758 \begin_inset Quotes erd
6763 \begin_inset Quotes eld
6766 New\SpecialChar \ldots{}
6768 \begin_inset Quotes erd
6771 button and, in the window that opens, enter
6772 \begin_inset Quotes eld
6776 \begin_inset Quotes erd
6779 (or any other name you like) in the
6780 \begin_inset Quotes eld
6784 \begin_inset Quotes erd
6788 Now click on the button labeled
6789 \begin_inset Quotes eld
6792 \SpecialChar \ldots{}
6794 \begin_inset Quotes erd
6797 to open a file dialog and navigate to the directory containing the
6798 \begin_inset Flex Code
6801 \begin_layout Plain Layout
6807 program (which is installed by default on Cygwin along with the LyX executable).
6809 \begin_inset Flex Code
6812 \begin_layout Plain Layout
6818 and then specify the program arguments as
6819 \begin_inset Flex Code
6822 \begin_layout Plain Layout
6829 In this way, you will be using the
6833 for communicating with LyX.
6834 If, for whatever reason, you want to use the
6839 \begin_inset Flex Code
6842 \begin_layout Plain Layout
6848 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6851 \begin_layout Standard
6852 In yap, reverse search is triggered by double-click.
6855 \begin_layout Subsubsection*
6859 \begin_layout Standard
6860 In order to use SumatraPDF for inverse search, enter
6861 \begin_inset Flex Code
6864 \begin_layout Plain Layout
6870 in the viewer setting in
6871 \begin_inset Flex MenuItem
6874 \begin_layout Plain Layout
6875 Preferences\SpecialChar \menuseparator
6876 File Handling\SpecialChar \menuseparator
6877 File formats\SpecialChar \menuseparator
6884 \begin_inset Flex Code
6887 \begin_layout Plain Layout
6893 is the following script (to be placed in your command PATH,
6894 \begin_inset Flex Code
6897 \begin_layout Plain Layout
6903 being the best choice):
6906 \begin_layout LyX-Code
6908 \begin_inset Newline newline
6912 \begin_inset Newline newline
6915 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6918 \begin_layout Standard
6919 This wrapper script is needed because SumatraPDF is a native Windows application
6920 and does not understand the posix paths used by the Cygwin version of LyX.
6921 If SumatraPDF.exe is not in your command PATH, use its full posix path in
6924 \begin_inset Flex Code
6927 \begin_layout Plain Layout
6933 enables communication via the
6939 \begin_inset Flex Code
6942 \begin_layout Plain Layout
6948 option if you want to use the
6952 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6955 \begin_layout Standard
6956 Reverse search is triggered by double-click.
6959 \begin_layout Section
6963 \begin_layout Standard
6964 Forward search is, as the name implies, in a sense the
6965 \begin_inset Quotes eld
6969 \begin_inset Quotes erd
6973 It allows you to let the viewer jump to a given position from within LyX.
6974 If forward search is set up (as described in what follows), you can put
6975 the cursor anywhere in your LyX document, and hit
6976 \begin_inset Flex MenuItem
6979 \begin_layout Plain Layout
6980 Navigate\SpecialChar \menuseparator
6987 \begin_inset Flex MenuItem
6990 \begin_layout Plain Layout
6996 in the context menu via right mouse click), and then the viewer will jump
6997 to that position as well.
6998 This implies, of course, that your viewer supports this function.
7001 \begin_layout Standard
7002 To make forward search possible, you first need to provide the generated
7003 output PDF/DVI file with additional information about the TeX sources.
7004 This can be done via the methods described in the section
7005 \begin_inset CommandInset ref
7007 reference "sub:rev-search"
7014 \begin_layout Standard
7015 Additionally, you need to configure LyX for using your viewers in
7016 \begin_inset Flex MenuItem
7019 \begin_layout Plain Layout
7020 Tools\SpecialChar \menuseparator
7021 Preferences\SpecialChar \menuseparator
7022 Output\SpecialChar \menuseparator
7029 We provide a range of tested configurations for some viewers, which you
7030 can select from the drop down list.
7031 If none of these configurations suits you, you have to find out and enter
7032 a suitable configuration yourself.
7033 The definition syntax uses the following placeholders:
7036 \begin_layout Itemize
7038 \begin_inset Flex Code
7041 \begin_layout Plain Layout
7050 \begin_layout Itemize
7052 \begin_inset Flex Code
7055 \begin_layout Plain Layout
7061 : name of the (temporary) exported .tex file
7064 \begin_layout Itemize
7066 \begin_inset Flex Code
7069 \begin_layout Plain Layout
7075 : name of the exported output file (either dvi or pdf, depending on which
7076 one exists in the temporary directory)
7079 \begin_layout Standard
7080 Note that only some of the viewers provide full forward search functionality,
7081 among them yap, xdvi, okular and Sumatra PDF
7085 \begin_layout Plain Layout
7086 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
7093 While many of the widespread PDF viewers (most notably Adobe Reader) do
7094 not support forward search at all, some other viewers -- e.
7095 \begin_inset space \thinspace{}
7099 evince and xpdf -- allow at least to reload the document and jump to a
7100 specific page of the file, so you can at least navigate
7101 \begin_inset Quotes eld
7105 \begin_inset Quotes erd
7109 These latter functionality is provided by an external call of synctex (see
7110 the predefined example configurations).
7114 \begin_layout Standard
7115 Forward search works both with DVI and PDF output.
7116 LyX simply checks which preview format you have used before (i.
7117 \begin_inset space \thinspace{}
7120 e., which format is already there in the temporary directory) and chooses
7121 the appropriate configuration for the respective format.
7124 \begin_layout Chapter
7125 Special Document Classes
7128 \begin_layout Section
7132 \begin_layout Standard
7138 \begin_layout Subsection
7142 \begin_layout Standard
7143 This section describes how LyX can be used to write articles for submission
7144 to the scientific journal
7146 Astronomy and Astrophysics
7148 (www.edpsciences.fr/aa/
7149 \begin_inset Flex URL
7152 \begin_layout Plain Layout
7154 http://www.edpsciences.fr/aa/
7159 ) using Version 5.01 of the document class
7164 This package can be downloaded from the ftp site
7167 \begin_layout Standard
7168 \begin_inset VSpace medskip
7174 \begin_layout Standard
7176 \begin_inset Flex URL
7179 \begin_layout Plain Layout
7181 ftp://ftp.edpsciences.org/pub/aa/readme.html
7189 \begin_layout Standard
7190 \begin_inset VSpace medskip
7196 \begin_layout Standard
7197 A manual comes together with that package, and this text is not meant to
7198 replace the original manual but is merely a short guide in how to realize
7199 the correct form of your paper.
7203 \begin_layout Standard
7204 Please note that the publisher of the journal was changed from Springer
7205 to EDP Sciences starting January 1, 2001.
7206 That change involved also some slight changes to the style files, namely
7207 the removal of the thesaurus command.
7208 The LyX class aa supports the newest version of these style files, V 5.01.
7209 If you have an older version installed, please upgrade.
7210 For compatibility, the old (version 4) layout has been kept as
7215 Please refer to the comments in
7217 LyXDir/layouts/aapaper.layout
7222 \begin_layout Subsection
7226 \begin_layout Standard
7227 It is recommended you start from the example template distributed with LyX.
7228 If you are not using a template, note the following settings:
7231 \begin_layout Itemize
7238 Document\SpecialChar \menuseparator
7241 dialog (OK, that one was obvious).
7244 \begin_layout Itemize
7245 Don't change the option
7248 \begin_inset space ~
7258 The whole layout is done by the macros, you shouldn't change anything.
7261 \begin_layout Subsection
7265 \begin_layout Standard
7266 First thing to enter is the header information.
7267 It consists of seven entries, of which some are optional.
7271 \begin_layout Itemize
7279 \begin_layout Itemize
7287 \begin_layout Itemize
7295 \begin_layout Itemize
7303 \begin_layout Itemize
7308 : [optional] if more than one author: whom to contact for offprint requests.
7311 \begin_layout Itemize
7316 : [optional] mail address for contacts.
7319 \begin_layout Itemize
7327 Received: <date>; Accepted <date>
7330 \begin_layout Standard
7331 There is no need to issue the
7337 command, this is done automatically by LyX when the header is finished.
7338 Although the order of the single header entries doesn't matter it is advised
7339 to keep the above sequence, just to get the best optics and meets the layout
7340 of the real document.
7343 \begin_layout Standard
7344 If you want to place footnotes in the header block, e.
7345 \begin_inset space \thinspace{}
7349 \begin_inset space \space{}
7352 to state your present address, just use the standard footnote via the menu
7355 Insert\SpecialChar \menuseparator
7359 LyX will automagically use the term
7368 \begin_layout Standard
7369 In addition to these topics, the macros use three additional LaTeX commands
7370 that have no counterpart in LyX:
7373 \begin_layout Itemize
7380 to separate different names for more than one author and institute, respectivel
7384 \begin_layout Itemize
7391 to mark corresponding author/institute pairs.
7392 The institutes are numbered sequentially as they appear in the
7396 field, so you have to put a marker to each author.
7399 \begin_layout Itemize
7406 to supply an email address for fast contact.
7409 \begin_layout Standard
7410 In all cases, the appropriate command has to be entered in LyX and marked
7416 \begin_layout Subsection
7420 \begin_layout Standard
7421 The abstract should immediately follow the header block.
7422 With version 5 the abstract environment was changed to a command, and there
7423 is now a resctriction to only one paragraph.
7424 In addition, it should contain an entry with the keywords.
7425 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7432 by hand and mark it as LaTeX code.
7433 Refer to the example paper.
7436 \begin_layout Subsection
7437 Supported environments
7440 \begin_layout Standard
7441 The A&A paper layout supports the following environments for structuring
7445 \begin_layout Itemize
7451 \begin_layout Itemize
7457 \begin_layout Itemize
7463 \begin_layout Itemize
7469 \begin_layout Itemize
7475 \begin_layout Itemize
7481 \begin_layout Itemize
7487 \begin_layout Itemize
7493 \begin_layout Itemize
7499 \begin_layout Itemize
7505 \begin_layout Itemize
7511 \begin_layout Itemize
7517 \begin_layout Subsection
7518 Commands not supported by LyX
7521 \begin_layout Standard
7522 Some commands are not yet supported by the
7527 Some have already been mentioned.
7528 For the sake of completeness, they are listed all together here:
7531 \begin_layout Itemize
7539 \begin_layout Itemize
7547 \begin_layout Itemize
7555 \begin_layout Itemize
7563 \begin_layout Itemize
7571 \begin_layout Itemize
7579 \begin_layout Itemize
7587 \begin_layout Itemize
7595 \begin_layout Standard
7596 If you want to use any of these commands, you have to enter them yourself.
7599 Do not forget to mark them as LaTeX code!
7602 \begin_layout Subsection
7603 Figure and Table Floats
7606 \begin_layout Standard
7607 LyX provides support for the necessary float environments
7609 figure, figure*, table
7615 , therefore we won't tell much about it here.
7619 \begin_inset space ~
7625 Just remember that tables should be left-aligned.
7626 For that, select the table and change the alignment in
7628 Edit\SpecialChar \menuseparator
7630 \begin_inset space ~
7636 \begin_layout Standard
7637 There is only one special thing: the figures with caption besides the figure.
7638 To create such a figure, you have to do the following:
7641 \begin_layout Enumerate
7642 Create a wide figure float:
7644 Insert\SpecialChar \menuseparator
7645 Float\SpecialChar \menuseparator
7648 , then right click in the figure and select
7654 \begin_inset space ~
7662 \begin_layout Enumerate
7663 Enter your caption text.
7666 \begin_layout Enumerate
7671 to move the cursor above the caption.
7674 \begin_layout Enumerate
7678 \begin_layout Enumerate
7679 Position the cursor behind the figure and insert a horizontal fill:
7681 Insert\SpecialChar \menuseparator
7683 \begin_inset space ~
7686 Character\SpecialChar \menuseparator
7688 \begin_inset space ~
7696 \begin_layout Enumerate
7697 Switch to LaTeX mode:
7700 \begin_inset space ~
7708 \begin_layout Enumerate
7718 Do not close the brace!
7721 \begin_layout Enumerate
7722 Position the cursor behind the caption text, switch to LaTeX mode and insert
7726 \begin_inset space ~
7738 \begin_layout Standard
7739 Also, refer to the figures in the example paper.
7742 \begin_layout Subsection
7746 \begin_layout Standard
7747 For submission, the paper has to be formated in a special double-spacing
7749 For this purpose, you have to give the option
7753 to the documentclass.
7754 This must be done using the extra class options field in the
7756 Document\SpecialChar \menuseparator
7760 Just enter the string
7767 \begin_layout Subsection
7771 \begin_layout Standard
7776 directory contains an example paper written with LyX.
7777 It is the example paper from the original macro package, translated to
7779 Use it for inspiration, and compare the original LaTeX code with LyX way
7783 \begin_layout Section
7787 \begin_layout Standard
7793 \begin_layout Subsection
7797 \begin_layout Standard
7798 AASTeX is a set of macros produced by the American Astronomical Society
7799 to facilitate electronic manuscript submission to the three journals they
7800 publish: the Astrophysical Journal (including the Letters and Supplement),
7801 the Astronomical Journal, and the Publications of the Astronomical Society
7803 LyX has proven to be an excellent tool for generating these documents,
7804 especially given its equation, citation, and figure handling capabilities.
7805 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7806 is the version described here, or higher.
7807 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7808 incompatible with LyX.
7809 The AASTeX package may be downloaded from the AASTeX Web site
7812 \begin_layout Standard
7813 \begin_inset VSpace medskip
7819 \begin_layout Standard
7821 \begin_inset Flex URL
7824 \begin_layout Plain Layout
7826 http://www.journals.uchicago.edu/AAS/AASTeX
7834 \begin_layout Standard
7835 \begin_inset VSpace medskip
7841 \begin_layout Standard
7842 A complete user guide is contained in that package and you should familiarize
7843 yourself with it thoroughly before embarking on writing a paper in LyX.
7844 LyX will not reduce the need to figure out all the AASTeX commands, it
7845 will only reduce the drudgery of typing everything in.
7846 It is your responsibility to ensure that the final exported LaTeX document
7847 conforms completely to the requirements of the journal to which you are
7848 submitting your paper.
7851 \begin_layout Subsection
7852 Starting a New Paper
7855 \begin_layout Standard
7856 I strongly suggest that you start with the AASTeX template file.
7859 File\SpecialChar \menuseparator
7866 , enter the new file name, then choose the
7871 This will show the most common fields found in a manuscript.
7872 Simply overwrite the existing text (including the brackets,
7876 ) with the correct information.
7877 Many of the AASTeX commands and environments can be implemented directly
7878 in LyX, but some cannot: most noticeably
7890 , which should stick out like a sore thumb if you actually just opened the
7892 For commands such as these, the LaTeX code must be entered directly and
7894 Such commands are referred to as TeX code, or Evil Red Text.
7895 I tried to minimize the amount of TeX code needed in an AASTeX document,
7896 but there is still a bit more required than any of us would like.
7899 \begin_layout Subsection
7900 Finishing Your Paper
7903 \begin_layout Standard
7904 When the paper is finished to your satisfaction and previews/prints correctly,
7906 \begin_inset Quotes eld
7910 \begin_inset Quotes erd
7913 actions which need to be done before you submit it to the journals.
7917 \begin_layout Enumerate
7918 Export your paper as a LaTeX file (
7920 File\SpecialChar \menuseparator
7921 Export\SpecialChar \menuseparator
7928 \begin_layout Enumerate
7933 file with your favorite text editor
7937 \begin_layout Enumerate
7938 remove the comment lines before the
7947 \begin_layout Enumerate
7952 usepackage...{fontenc}
7954 line if it appears (usually just after
7969 \begin_layout Enumerate
7970 remove everything between (and including) the
7982 commands, except for any commands you specifically put into the LaTeX preamble
7983 (which should appear immediately after the
7984 \begin_inset Quotes eld
7987 User specified LaTeX commands
7988 \begin_inset Quotes erd
7999 \begin_layout Enumerate
8000 Run the resulting file through LaTeX to make sure it still processes correctly.
8003 \begin_layout Enumerate
8004 Reread the journal requirements to make sure your filenames and formats
8008 \begin_layout Enumerate
8012 \begin_layout Subsection
8013 Comments On Specific Commands
8016 \begin_layout Standard
8017 I will not describe the detailed usage of the individual AASTeX commands:
8018 the AASTeX User Guide (
8022 ) gives a good description of each.
8023 Thus it's probably easiest for me to go down the list as found in the guide
8024 and offer comments where necessary.
8025 So let's begin \SpecialChar \ldots{}
8029 \begin_layout Subsubsection
8030 Things that work as expected
8033 \begin_layout Standard
8034 Because they work as you might expect, I simply list them and the section
8135 begin{thebibliography}
8143 (2.13.2), all the cite commands and their variations (2.13.2), the generic
8144 graphicx figure commands (2.14.1),
8168 (2.15.4, amongst other places),
8195 \begin_layout Standard
8196 The following style options also work correctly:
8217 Simply put them in the
8223 Layout\SpecialChar \menuseparator
8229 \begin_layout Subsubsection
8230 Things that work, but require more comment
8233 \begin_layout Standard
8234 The following items work, but require a little more discussion:
8237 \begin_layout Itemize
8238 These items are reserved for use by the journal editors, but you can put
8239 them into the LaTeX preamble if you feel compelled to do so:
8272 \begin_layout Itemize
8273 These items may be placed in the LaTeX preamble, and are included as blanks
8274 in the template file:
8295 \begin_layout Itemize
8302 (2.3) – can only be used
8303 \begin_inset Quotes eld
8307 \begin_inset Quotes erd
8310 , not in the middle of a paragraph.
8311 Use TeX code if you need to embed it.
8314 \begin_layout Itemize
8321 (2.3) – will have extra {} after it.
8322 This should not cause an error.
8325 \begin_layout Itemize
8332 (2.6) – can only be used
8333 \begin_inset Quotes eld
8337 \begin_inset Quotes erd
8340 , not in the middle of a paragraph.
8341 Use TeX code if you need to embed it.
8344 \begin_layout Itemize
8351 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8355 \begin_layout Itemize
8369 \begin_layout Itemize
8376 (2.9) – will have extra {} after it.
8377 This should not cause an error.
8380 \begin_layout Itemize
8387 (2.11) – will have extra {} after it.
8388 This should not cause an error.
8391 \begin_layout Itemize
8398 (2.14.2) – you can insert an optional filename argument by placing the cursor
8399 at the beginning of the text and selecting
8401 Insert\SpecialChar \menuseparator
8406 \begin_inset Quotes eld
8410 \begin_inset Quotes erd
8413 inserts an optional argument of the type needed by
8420 Hopefully it will be renamed someday.
8423 \begin_layout Itemize
8436 for the catalog ID optional parameter
8439 \begin_layout Itemize
8452 for the catalog ID optional parameter
8455 \begin_layout Subsubsection
8456 Things not implemented, use TeX code
8459 \begin_layout Standard
8482 setcounter{equation}
8484 (2.12), Journal name abbreviations (2.13.4),
8520 (2.15.4, insert it as the first element in the lefthand cell after where
8522 Don't use any of LyX's rules in the table),
8534 (2.15.5), much of Misc (2.17, except
8585 \begin_layout Subsubsection
8586 Things that cannot be implemented
8589 \begin_layout Standard
8590 \SpecialChar \ldots{}
8591 at least in any meaningful sort of way, so I suggest ignoring them.
8592 They are the references environment (2.13.3), and the deluxetable environment
8594 If you really, really need to use deluxetable, I suggest editing it in
8595 a separate file with a text editor, then using
8597 Insert\SpecialChar \menuseparator
8599 \begin_inset space ~
8604 to include it in your LyX document.
8609 file to see an example of this.
8612 \begin_layout Subsection
8613 FAQs, Tips, Tricks, and Other Ruminations
8616 \begin_layout Subsubsection
8617 Getting LyX and AASTeX to cooperate
8620 \begin_layout Standard
8621 It can be a bit tricky to get LyX to recognize a new layout and document
8623 When all else fails, do this:
8626 \begin_layout Enumerate
8627 Make certain that LaTeX can find AASTeX.
8628 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8629 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8636 \begin_layout Enumerate
8648 \begin_layout Enumerate
8651 Tools\SpecialChar \menuseparator
8654 in LyX, then restart LyX.
8657 \begin_layout Enumerate
8658 Open a regular new file, not from a template.
8659 Does AASTeX appear in the class list in
8661 Document\SpecialChar \menuseparator
8667 \begin_layout Standard
8668 If you get a warning from an existing AASTeX document about not being able
8669 to find the AASTeX layout or a message about
8670 \begin_inset Quotes eld
8673 You should not mix title layouts with normal ones
8674 \begin_inset Quotes erd
8677 , things haven't been installed correctly.
8680 \begin_layout Subsubsection
8681 LaTeX error processing a table
8684 \begin_layout Standard
8685 LyX, by default, attempts to center the table caption/title.
8686 This seems to produce a bad interaction in AASTeX so you should click somewhere
8687 in the caption/title, then select
8689 Edit\SpecialChar \menuseparator
8691 \begin_inset space ~
8705 This took care of it for me.
8708 \begin_layout Subsubsection
8712 \begin_layout Standard
8713 A couple of things: 1) I have noticed some funny spacing in the reference
8714 entries in the text.
8715 When you enter the bibliography item data, make sure their is
8719 space between the last author and the parenthesis setting off the year;
8723 \begin_inset space \thinspace{}
8727 \begin_inset space \space{}
8741 2) Entering the references at all is not obvious.
8742 The easiest thing is to start typing your first reference at the end of
8743 the document, then mark it as type
8748 That will put a small gray box in front of what you just typed.
8749 Click on the box to fill in the rest of the information.
8750 For new references, go to the end of an existing reference and press return.
8751 That will create a new line with its own box, etc.
8754 \begin_layout Subsubsection
8758 \begin_layout Standard
8759 Even though AASTeX provides its own figure commands (
8765 , for example), I much prefer LaTeX's standard figure commands (with the
8774 \begin_inset space ~
8777 commands as TeX code into a Figure Float box if you desire, but I never
8778 have much luck getting the layout right.
8779 With the standard graphics, LyX will insert a
8783 usepackage{graphicx}
8785 command into the LaTeX preamble and handle the figures in the standard
8786 LaTeX2e way, interspersing the figures in the text.
8787 I believe ApJ accepts figures exactly this way now; AJ might still use
8789 \begin_inset Quotes eld
8792 stack everything at the end
8793 \begin_inset Quotes erd
8799 \begin_layout Subsubsection
8800 Things I could have done, but didn't
8803 \begin_layout Standard
8805 \begin_inset Quotes eld
8809 \begin_inset Quotes erd
8812 things I could have implemented, but chose not to.
8813 For instance, I saw no point in double-spacing the text in the LyX window,
8814 even though it is double-spaced in the paper manuscript.
8815 Also, I chose not to make separate layouts for the preprint and preprint2
8817 Since I assume you will spend most of your time in the plain manuscript
8818 mode anyway, I decided not to chew up more disk space with this.
8822 \begin_layout Subsection
8826 \begin_layout Standard
8827 Your mileage may vary.
8828 I've now had papers published by both ApJ and AJ that have had 98% of the
8829 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8831 I have had no trouble with the submission process, and I'm sure the journals
8832 were never aware that there might be a difference.
8833 So, go forth and publish!
8836 \begin_layout Section
8840 \begin_layout Standard
8850 \begin_layout Standard
8851 \begin_inset VSpace bigskip
8857 \begin_layout Standard
8859 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8860 papers to be submitted to American Mathematical Society publications.
8861 The layouts are not tailored to a specific journal, but easily can be.
8862 You should refer to the AMS documentation for specific instructions for
8863 each journal (usually it will entail only changing a single line in the
8865 That documentation is available on the Web at
8866 \begin_inset Flex URL
8869 \begin_layout Plain Layout
8877 \begin_inset Flex URL
8880 \begin_layout Plain Layout
8882 ftp://ftp.ams.org/pub/tex/amslatex/
8888 These layouts are appropriate, and useful, for any mathematical writing.
8892 \begin_layout Standard
8893 There are two basic AMS LaTeX layouts:
8896 \begin_layout Itemize
8897 amsart: The standard AMS article format.
8900 \begin_layout Itemize
8901 amsbook: the standard AMS book (really, monograph) format.
8905 \begin_layout Standard
8906 The layouts themselves contain only the minimum necessary to use the AMS
8908 They do not, in particular, contain any of the `theorem' environments used
8909 for setting theorems, lemmas, and the like.
8910 These are contained, instead, in the
8911 \begin_inset Flex Code
8914 \begin_layout Plain Layout
8920 module, which is loaded by default when when you select one of the AMS
8922 (It can also be used with other classes and can be removed, if you would
8923 rather use something else.) Less commonly used environments are in the
8924 \begin_inset Flex Code
8927 \begin_layout Plain Layout
8928 Theorems (AMS-Extended)
8933 module, which must be loaded manually.
8936 \begin_layout Standard
8937 By default, theorems and the like are numbered consecutively throughout
8938 the document, but this may be modified by loading the module
8939 \begin_inset Flex Code
8942 \begin_layout Plain Layout
8943 Theorems (Order by Section)
8948 or, if you are using
8949 \begin_inset Flex Code
8952 \begin_layout Plain Layout
8959 \begin_inset Flex Code
8962 \begin_layout Plain Layout
8963 Theorems (Order by Chapter)
8969 These will number the results as
8970 \begin_inset Formula $n.m$
8973 , where the first number refers to the section (or chapter) and the second
8974 refers to the total number of results so far in that section (or chapter).
8975 Many environments are also available unnumbered.
8976 These are indicated by an asterisk at the end.
8977 If you happen to want
8981 unnumbered results, the module
8982 \begin_inset Flex Code
8985 \begin_layout Plain Layout
8991 provides that option.
8994 \begin_layout Standard
8995 Note that these modules do not
8999 to be used with the AMS classes.
9000 It is perfectly possible to use the
9001 \begin_inset Flex Code
9004 \begin_layout Plain Layout
9010 module, and the others mentioned, with other classes, such as
9011 \begin_inset Flex Code
9014 \begin_layout Plain Layout
9021 \begin_inset Flex Code
9024 \begin_layout Plain Layout
9031 \begin_inset Flex Code
9034 \begin_layout Plain Layout
9043 \begin_layout Subsection
9044 What these layouts provide
9047 \begin_layout Standard
9048 There is a long list of included environments provided by these layouts.
9049 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9050 variety of `theorem' environments.
9051 However, the AMS recommends the environments that are available in LyX.
9055 \begin_layout Standard
9056 The following environments—as well as the standard environments, such as
9058 \begin_inset Flex Noun
9061 \begin_layout Plain Layout
9068 \begin_inset Flex Noun
9071 \begin_layout Plain Layout
9078 \begin_inset Flex Noun
9081 \begin_layout Plain Layout
9088 \begin_inset Flex Noun
9091 \begin_layout Plain Layout
9098 \begin_inset Flex Noun
9101 \begin_layout Plain Layout
9108 \begin_inset Flex Code
9111 \begin_layout Plain Layout
9118 \begin_inset Flex Code
9121 \begin_layout Plain Layout
9130 \begin_layout Description
9131 Address This should be the author's permanent address.
9134 \begin_layout Description
9136 \begin_inset space ~
9139 Address This should be the author's temporary address at the time of submission,
9140 if different from the Address.
9143 \begin_layout Description
9144 Email Author's e-mail address
9147 \begin_layout Description
9148 URL Author's Web address, if desired.
9151 \begin_layout Description
9152 Keywords Key words or phrases used to identify specific topics discussed
9156 \begin_layout Description
9157 Subjectclass These refer to the AMS Subject Classifications, published and
9160 Mathematical Reviews
9163 These are also available online at the AMS cites listed above.
9166 \begin_layout Description
9170 \begin_layout Description
9174 \begin_layout Description
9178 \begin_layout Standard
9179 The following environments are provided by both the
9180 \begin_inset Flex Code
9183 \begin_layout Plain Layout
9190 \begin_inset Flex Code
9193 \begin_layout Plain Layout
9199 modules, in the latter case in both starred (unnumbered) and unstarred
9200 (numbered) versions.
9201 These same environments are provided only in the starred versions by the
9203 \begin_inset Flex Code
9206 \begin_layout Plain Layout
9215 \begin_layout Theorem
9216 This is typically used for the statements of major results.
9220 \begin_layout Corollary*
9221 This is used for statements which follow fairly directly from previous statement
9223 Again, these can be major results.
9228 These are smaller results needed to prove other statements.
9231 \begin_layout Proposition
9232 These are less major results which (hopefully) add to the general theory
9236 \begin_layout Conjecture
9237 These are statements provided without justification, which the author does
9238 not know how to prove, but which seem to be true (to the author, at least).
9241 \begin_layout Definition*
9242 Guess what this is for.
9243 The font is different for this environment than for the previous ones.
9247 \begin_layout Example*
9248 Used for examples illustrating proven results.
9251 \begin_layout Problem
9252 It's not really known what this is for.
9253 You should figure it out.
9256 \begin_layout Exercise*
9257 Write a description for this one.
9260 \begin_layout Remark
9261 This environment is also a type of theorem, usually a lesser sort of observation.
9264 \begin_layout Claim*
9265 Often used in the course of giving a proof of a larger result.
9269 Generally, these are used to break up long arguments, using specific instances
9275 The numbering scheme for cases is on its own, not together with other numbered
9281 At the end of this environment, a QED symbol (usually a square, but it can
9282 vary with different styles) is placed.
9283 If you want to have other environments within this one—for example, Case
9284 environments—and have the QED symbol appear only after them, then the other
9285 environments need to be nested within the proof environment.
9288 Nesting Environments
9294 for information on nesting.
9297 \begin_layout Standard
9298 And these environments are provided by
9299 \begin_inset Flex Code
9302 \begin_layout Plain Layout
9303 Theorems (AMS-Extended)
9311 \begin_layout Criterion*
9312 A required condition.
9315 \begin_layout Algorithm*
9316 A general procedure to be used.
9319 \begin_layout Axiom*
9320 This is a property or statement taken as true within the system being discussed.
9323 \begin_layout Condition*
9324 Sometimes used to state a condition assumed within the present context of
9329 Similar to a Remark.
9332 \begin_layout Notation*
9333 Used for the explanation of, yes, notation.
9336 \begin_layout Summary
9337 Do we really need to tell you?
9340 \begin_layout Acknowledgement*
9344 \begin_layout Conclusion*
9345 Sometimes used at the end of a long train of argument.
9349 Used in a way similar to Proposition, though perhaps lower on the scale.
9352 \begin_layout Standard
9353 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9355 They need to be available on your system in order to use these environments.
9358 \begin_layout Section
9366 \begin_layout Standard
9372 \begin_layout Subsection
9376 \begin_layout Standard
9377 These are the layout files for some of the journals of the American Geophysical
9379 It is assumed that you have both the AGU's own class files and AGUplus
9380 installed (everything to be found at
9381 \begin_inset Flex URL
9384 \begin_layout Plain Layout
9386 ftp://ftp.agu.org/journals/latex/journals
9394 \begin_layout Subsection
9398 \begin_layout Standard
9408 They are still called this in the LyX GUI, though their LaTeX equivalents
9409 in the AGU classes are
9420 \begin_layout Standard
9421 Newly defined styles are
9458 These are mostly manuscript attributes and defined in the AGU class documentati
9462 \begin_layout Standard
9463 I suspect this is still badly incomplete.
9466 \begin_layout Subsection
9470 \begin_layout Standard
9487 \begin_layout Subsection
9491 \begin_layout Itemize
9494 Journal of Geophysical Research
9503 \begin_layout Standard
9504 Add your own, it isn't so hard! Look at the
9515 \begin_layout Subsection
9516 Bugs and things to remember
9519 \begin_layout Standard
9520 In order to use the new layouts, you must remember to do the following for
9524 \begin_layout Enumerate
9530 This can be done in the
9532 Layout\SpecialChar \menuseparator
9537 Document\SpecialChar \menuseparator
9541 (AGU articles are always in English, right? So
9548 \begin_layout Enumerate
9558 (Yes, this is a bug.)
9561 \begin_layout Enumerate
9562 Make sure you use the
9566 bibliography style, by entering
9570 into the second field of the BibTeX inset.
9571 None of the standard styles will do.
9574 \begin_layout Section
9578 \begin_layout Standard
9584 \begin_layout Subsection
9588 \begin_layout Standard
9589 Broadway is for writing plays.
9590 The format is more decorative than Hollywood, and much less standardized.
9591 This format should be suitable for workshops.
9594 \begin_layout Subsection
9598 \begin_layout Standard
9599 The same as in Hollywood.
9602 \begin_layout Subsection
9606 \begin_layout Standard
9611 names as labels then cross-reference the label to insert the name.
9612 The cross-reference dialog will show the current cast of characters.
9615 \begin_layout Subsection
9616 Paper size and Margins
9619 \begin_layout Standard
9620 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9623 \begin_layout Subsection
9627 \begin_layout Standard
9628 The following environments are available.
9629 You can use broadway.bind to get the bind keys shown at the right.
9632 \begin_layout Itemize
9636 \begin_inset Newline newline
9641 You should not have to use this, but it is here for anything that does not
9645 \begin_layout Itemize
9649 \begin_inset space \hfill{}
9653 \begin_inset Newline newline
9658 Used to describe stage setting and the action.
9659 First use of speaker names in all CAPs.
9662 \begin_layout Itemize
9666 \begin_inset space \hfill{}
9670 \begin_inset Newline newline
9675 Automatically numbered.
9676 On screen it will be arabic, but will print as Roman.
9679 \begin_layout Itemize
9683 \begin_inset space \hfill{}
9687 \begin_inset Newline newline
9697 It is just centered text.
9700 \begin_layout Itemize
9704 \begin_inset space \hfill{}
9708 \begin_inset Newline newline
9713 Not automatically numbered.
9714 You supply the number.
9715 This is because I couldn't figure out how.
9718 \begin_layout Itemize
9722 \begin_inset space \hfill{}
9726 \begin_inset Newline newline
9731 A special case of Narrative to describe the setting and action as the curtain
9735 \begin_layout Itemize
9739 \begin_inset space \hfill{}
9743 \begin_inset Newline newline
9748 The speaker's (actor's) title, centered in all CAPS.
9751 \begin_layout Itemize
9755 \begin_inset space \hfill{}
9759 \begin_inset Newline newline
9764 Instructions to the speaker.
9765 The parentheses are automatically inserted.
9766 The ( will appear on screen, but both will be in the printed play.
9767 This environment is only used within
9774 \begin_layout Itemize
9778 \begin_inset space \hfill{}
9782 \begin_inset Newline newline
9787 What the Speaker says.
9790 \begin_layout Itemize
9794 \begin_inset space \hfill{}
9798 \begin_inset Newline newline
9803 The curtain comes down.
9806 \begin_layout Itemize
9810 \begin_inset space \hfill{}
9816 \begin_layout Itemize
9820 \begin_inset space \hfill{}
9826 \begin_layout Itemize
9830 \begin_inset space \hfill{}
9836 \begin_layout Standard
9840 \begin_layout Section
9844 \begin_layout Standard
9849 can be used to type letters according to German conventions.
9850 A template file is included in
9852 .../lyx/share/templates
9854 for you to use as a starting point.
9857 \begin_layout Section
9865 \begin_layout Standard
9871 \begin_layout Subsection
9875 \begin_layout Standard
9876 This is the layout file for the European Geophysical Society journals.
9881 can be downloaded from the web site of the EGS under
9882 \begin_inset Flex URL
9885 \begin_layout Plain Layout
9895 \begin_layout Subsection
9899 \begin_layout Standard
9902 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9910 The current layout file is unfortunately very unmodular and would benefit
9911 from using the various
9918 \begin_layout Section
9922 \begin_layout Standard
9923 See the LyX template file
9928 It contains all infos you need.
9931 \begin_layout Section
9937 \begin_inset CommandInset label
9946 \begin_layout Standard
9952 \begin_layout Subsection
9956 \begin_layout Standard
9957 This section describes how to use LyX to make slides for overhead projectors.
9958 There are two document classes that can do this: the default slides class
9964 This section documents the latter.
9967 \begin_layout Standard
9968 I'm going to say this again, nice and clear, so that there's no misunderstanding
9972 \begin_layout Standard
9973 \begin_inset VSpace bigskip
9979 \begin_layout Standard
9983 This section documents the class
9984 \begin_inset Quotes eld
9992 \begin_inset Quotes erd
10000 \begin_layout Standard
10001 \begin_inset VSpace bigskip
10007 \begin_layout Standard
10008 If you're looking for the documentation for
10009 \begin_inset Quotes eld
10017 \begin_inset Quotes erd
10020 , check out section
10021 \begin_inset space ~
10025 \begin_inset CommandInset ref
10027 reference "sec:slitex"
10032 If your machine doesn't have the
10037 \begin_inset Quotes eld
10045 \begin_inset Quotes erd
10048 ] installed, you'll probably have to use the default
10052 class, which isn't quite as good as
10057 \begin_layout Standard
10062 class is designed for use with version 2.1 of the
10066 LaTeX class file which is now an integral part of LaTeX2e.
10069 \begin_layout Subsection
10073 \begin_layout Standard
10074 Obviously, to use this document class, you need to select
10075 \begin_inset Quotes eld
10083 \begin_inset Quotes erd
10093 \begin_inset space ~
10099 There are some settings in the
10102 \begin_inset space ~
10107 dialog that you should know about that are specific to this class:
10110 \begin_layout Itemize
10111 Don't change the options
10122 \begin_inset space ~
10128 They're ignored by the
10135 \begin_layout Itemize
10136 The default font size is 20
10137 \begin_inset space \thinspace{}
10140 pt with the other options being 17
10141 \begin_inset space \thinspace{}
10145 \begin_inset space \thinspace{}
10149 \begin_inset space \thinspace{}
10155 \begin_layout Itemize
10156 The default font is
10164 but all math equations are still typeset in the usual roman font.
10167 \begin_layout Itemize
10172 supports A4 and Letter paper sizes as well as a special size for working
10174 \begin_inset space \thinspace{}
10178 It doesn't support A5, B5, legal or executive paper sizes.
10181 \begin_layout Itemize
10182 Don't bother changing the
10186 settings because they are ignored anyway.
10187 All floats appear where they are defined in the text.
10190 \begin_layout Itemize
10195 setting behaves a bit differently for this class.
10200 provides extensive footer and header capabilities including a user-defined
10203 \begin_inset space ~
10207 \begin_inset CommandInset ref
10209 reference "sec:foilfoot"
10214 The title page is treated differently to all other pages in the document
10223 has the logo centered at the bottom of the page (if one is defined).
10224 The possible page style choices and what they do are as follows:
10228 \begin_layout Labeling
10229 \labelwidthstring MMMMMMM
10236 The final output contains no page numbers, or other headers or footers
10237 (except footnotes of course).
10241 \begin_layout Labeling
10242 \labelwidthstring MMMMMMM
10249 The final output contains page numbers centered at the bottom of the page.
10250 No other headings or footers (other than footnotes).
10253 \begin_layout Labeling
10254 \labelwidthstring MMMMMMM
10259 Page numbers in lower right corner.
10260 Additional headers and footers are also shown.
10261 This is also the default.
10264 \begin_layout Labeling
10265 \labelwidthstring MMMMMMM
10270 Gives you access to the
10274 package although its use with
10278 is discouraged by the writer of the
10282 package because of some potential page layout clashes.
10286 \begin_layout Subsubsection
10290 \begin_layout Standard
10291 The following options may be used in the extra class options in the
10293 Document\SpecialChar \menuseparator
10299 \begin_layout Labeling
10300 \labelwidthstring MMMMMMx
10305 This sets up the page layout for 7.33
10306 \begin_inset space \thinspace{}
10310 \begin_inset space \thinspace{}
10313 in paper, which is about the same aspect ratio as a 35
10314 \begin_inset space \thinspace{}
10317 mm slide, making it a bit easier to work with this medium.
10320 \begin_layout Labeling
10321 \labelwidthstring MMMMMMx
10326 Places a rule across the page below the header on every page except the
10330 \begin_layout Labeling
10331 \labelwidthstring MMMMMMx
10336 Places a rule across the page above the footer on every page except the
10340 \begin_layout Labeling
10341 \labelwidthstring MMMMMMx
10346 This is automatically set each time you create a new
10355 to use the dvips driver to rotate those pages that are set as landscape
10359 \begin_layout Labeling
10360 \labelwidthstring MMMMMMx
10365 Simply changes the page dimensions to those of a landscape page but doesn't
10367 Thus if you use this option you need to use an external program to rotate
10368 each page or feed your paper through your printer as landscape.
10369 Note that this option effectively reverses the roles of the
10377 environments (don't worry these are described in the next section).
10380 \begin_layout Labeling
10381 \labelwidthstring MMMMMMx
10386 Equation numbers on the left.
10389 \begin_layout Labeling
10390 \labelwidthstring MMMMMMx
10395 Flush-left equations.
10398 \begin_layout Subsection
10399 Supported Environments
10402 \begin_layout Standard
10403 Most of the environments commonly supported in other classes are also supported
10409 There are several additional environments provided by
10413 as well as a couple added by LyX.
10414 The following environments are shared with other classes:
10417 \begin_layout Standard
10421 \begin_layout Plain Layout
10425 begin{multicols}{2}
10433 \begin_layout Itemize
10439 \begin_layout Itemize
10445 \begin_layout Itemize
10451 \begin_layout Itemize
10457 \begin_layout Itemize
10463 \begin_layout Itemize
10469 \begin_layout Itemize
10475 \begin_layout Itemize
10481 \begin_layout Itemize
10487 \begin_layout Itemize
10493 \begin_layout Itemize
10499 \begin_layout Itemize
10505 \begin_layout Itemize
10511 \begin_layout Itemize
10517 \begin_layout Itemize
10523 \begin_layout Itemize
10529 \begin_layout Itemize
10535 \begin_layout Itemize
10541 \begin_layout Standard
10545 \begin_layout Plain Layout
10557 \begin_layout Standard
10558 That is, all the major environments apart from the sectioning environments.
10559 Since foils are essentially self-contained sections, with a title and body,
10564 provides specific commands for starting new foils and these are:
10567 \begin_layout Itemize
10573 \begin_layout Itemize
10579 \begin_layout Standard
10580 LyX also provides slightly modified versions of these two environments called:
10583 \begin_layout Itemize
10589 \begin_layout Itemize
10592 ShortRotatefoilhead
10595 \begin_layout Standard
10596 and the differences will be explained in the next section.
10599 \begin_layout Standard
10600 Since foils are often used in presenting ideas or new theorems and such
10605 also provides a comprehensive box of goodies for presenting them:
10608 \begin_layout Standard
10612 \begin_layout Plain Layout
10616 begin{multicols}{2}
10624 \begin_layout Itemize
10630 \begin_layout Itemize
10636 \begin_layout Itemize
10642 \begin_layout Itemize
10648 \begin_layout Itemize
10654 \begin_layout Itemize
10660 \begin_layout Itemize
10666 \begin_layout Itemize
10672 \begin_layout Itemize
10678 \begin_layout Itemize
10684 \begin_layout Itemize
10690 \begin_layout Standard
10694 \begin_layout Plain Layout
10706 \begin_layout Standard
10707 The starred versions are unnumbered while the unstarred versions are numbered.
10708 There are also two list environments added by LyX and these are:
10711 \begin_layout Itemize
10717 \begin_layout Itemize
10723 \begin_layout Standard
10728 provides some powerful header and footer capabilities that are best set
10729 in the preamble although they may be set at any point in a document.
10730 If you want to change these settings in your document the best place to
10731 do so is at the very top of a foil, i.
10732 \begin_inset space \thinspace{}
10738 \begin_inset space \space{}
10743 straight after the foilhead.
10746 \begin_layout Standard
10747 For this purpose, the following command styles are provided [
10754 \begin_layout Standard
10758 \begin_layout Plain Layout
10762 begin{multicols}{2}
10770 \begin_layout Itemize
10774 \begin_inset space ~
10780 \begin_layout Itemize
10786 \begin_layout Itemize
10790 \begin_inset space ~
10796 \begin_layout Itemize
10800 \begin_inset space ~
10806 \begin_layout Itemize
10810 \begin_inset space ~
10817 \begin_layout Standard
10818 \begin_inset space ~
10825 \begin_layout Standard
10829 \begin_layout Plain Layout
10841 \begin_layout Standard
10842 There are also a few commands provided by
10846 that aren't directly supported by LyX but I'll tell you what they do and
10847 how to use them in section
10848 \begin_inset space ~
10852 \begin_inset CommandInset ref
10854 reference "sec:unsuppfoils"
10861 \begin_layout Subsection
10862 Building a Set of Foils
10865 \begin_layout Standard
10866 This section will give a simple introduction to using the different environments
10867 to build a set of foils.
10868 If you want to see an example set of foils, take a look at the
10872 file you find in LyX's
10879 \begin_layout Subsubsection
10880 Give It a Title Page
10883 \begin_layout Standard
10884 Unlike other classes that provide
10904 creates the title on a page of its own.
10905 If you leave out the
10909 environment LaTeX will substitute the current date (every time you regenerate
10913 \begin_layout Subsubsection
10917 \begin_layout Standard
10918 As I mentioned earlier, there are four ways of starting a new foil.
10919 For portrait foils you should use
10928 The difference between these two environments is the amount of space between
10929 the title of the foil (the foilhead) and the body of the foil.
10932 \begin_layout Standard
10933 Landscape foils are generated using the
10939 ShortRotatefoilhead
10942 Again the only difference is the spacing between foilhead and body.
10943 Both of the short versions have 0.5 inches less separation between the foilhead
10948 \begin_layout Standard
10949 One problem with the support for landscape foils is the requirement that
10950 you have to use the
10954 driver to generate the PostScript output otherwise the foils won't be rotated.
10955 It is possible to get landscape foils even if you haven't got the
10959 driver provided you can feed your foils sideways through your printer ;-)
10962 \begin_layout Subsubsection
10963 Theorems, Lemmas, Proofs and more
10966 \begin_layout Standard
10967 Due to a small bug in LyX you can't have two of the same type of these environme
10968 nts directly following each other.
10969 They must be separated by something.
10970 If you try, you will just be extending the previous environment as if you
10971 had merged the two environments together.
10972 So, how do you get around this problem? The simplest option is to insert
10973 some text between the two environments or add a
10977 environment between the two with just a
10978 \begin_inset Quotes eld
10986 \begin_inset Quotes erd
10990 This will force LyX to produce two separate environments and hence the
10991 correct LaTeX output.
10992 An example is provided in the example file included with the LyX distribution.
10993 Remember, this problem only occurs if you are trying to place two of the
10994 same type of theorem-like environments one directly after the other.
10997 \begin_layout Subsubsection
11001 \begin_layout Standard
11002 You get all the commonly supported list styles found in other classes as
11003 well as two new ones.
11004 I'll only describe the new ones here.
11005 If you want to find out more about the other list environments check out
11011 If you intend to use itemized lists you might also want to read about the
11015 \begin_inset space ~
11019 \begin_inset space ~
11024 dialog described above in section
11025 \begin_inset space ~
11029 \begin_inset CommandInset ref
11031 reference "sec:bullet"
11038 \begin_layout Standard
11039 The two new list styles,
11047 , are designed to make it easier for you to create lists of do's and don'ts
11048 or right and wrong by providing dedicated environments that use a tick
11049 or a cross as the label of the list.
11050 These lists are in fact dedicated variants of the
11055 They do however require that you have the
11059 packages installed.
11062 \begin_layout Subsubsection
11066 \begin_layout Standard
11071 redefines the floating tables and figures so that they appear exactly where
11072 they are in the text rather than pushing them to the top of the page or
11073 to some user specified location.
11074 In fact if you change the float placement settings they are simply ignored.
11077 \begin_layout Subsubsection
11078 Page Headers and Footers
11079 \begin_inset CommandInset label
11081 name "sec:foilfoot"
11088 \begin_layout Standard
11092 \begin_inset space ~
11101 are two commands used to control the left-footer text string.
11102 The first is meant to allow you to include a graphic logo on your foils
11104 \begin_inset Quotes eld
11112 \begin_inset Quotes erd
11116 While the second is meant to provide a classification for the audience,
11120 \begin_inset space \thinspace{}
11126 \begin_inset space \space{}
11130 It is empty by default.
11133 \begin_layout Standard
11134 The remaining page corners can be filled by
11137 \begin_inset space ~
11142 (which defaults to page numbers),
11145 \begin_inset space ~
11153 \begin_inset space ~
11161 \begin_layout Subsection
11167 \begin_inset CommandInset label
11169 name "sec:unsuppfoils"
11176 \begin_layout Standard
11177 All the commands mentioned below need to be set in a
11185 within another environment.
11188 \begin_layout Subsubsection
11192 \begin_layout Standard
11193 All lengths are adjusted using the
11216 should be replaced by the name given to the length you want to change and
11221 is the length value.
11222 All lengths should be specified in units of length such as inches (
11234 ) or relative to some document or font-based length such as
11244 \begin_layout Standard
11245 It's possible to change the spacing between a foilhead and the body of the
11246 foil by adjusting the length specified by
11253 For example, to make
11258 \begin_inset space \space{}
11261 in closer to their bodies put the following in the preamble:
11267 foilheadskip}{-0.5in}
11270 \begin_layout Standard
11271 The spacings around floats can be adjusted by setting these lengths:
11274 \begin_layout Labeling
11275 \labelwidthstring MMMMMMMMMMM
11282 Separation between the text and the top of the float
11285 \begin_layout Labeling
11286 \labelwidthstring MMMMMMMMMMM
11293 Separation between the float and the caption
11296 \begin_layout Labeling
11297 \labelwidthstring MMMMMMMMMMM
11304 Separation between the caption and the following text
11307 \begin_layout Labeling
11308 \labelwidthstring MMMMMMMMMMM
11315 You can make the captions narrower than the surrounding text by adjusting
11317 Best done relative to
11326 \begin_layout Standard
11327 There are also several title page related lengths that you may find useful
11328 if you have a long title or several authors:
11331 \begin_layout Labeling
11332 \labelwidthstring MMMMMMMMMMM
11339 Separation from headers to
11344 \begin_layout Labeling
11345 \labelwidthstring MMMMMMMMMMM
11363 \begin_layout Labeling
11364 \labelwidthstring MMMMMMMMMMM
11378 \begin_layout Labeling
11379 \labelwidthstring MMMMMMMMMMM
11395 \begin_layout Labeling
11396 \labelwidthstring MMMMMMMMMMM
11412 \begin_layout Standard
11413 The last length related command affects all the list environments.
11424 a list environment then all the vertical spacing between the list items
11426 Note that this is a command not a length so it doesn't require
11432 like the stuff mentioned above.
11435 \begin_layout Subsubsection
11436 Headers and Footers
11439 \begin_layout Standard
11452 commands control whether the logo in the
11456 definition appear on a given page.
11463 in the preamble then none of the foils will have the logo on them.
11464 If you don't want the logo on a particular page place the
11470 directly after the foilhead of that page and the
11476 directly after the next foilhead.
11479 \begin_layout Standard
11480 If you decide to use the
11484 page style setting in the
11487 \begin_inset space ~
11492 dialog you should probably add
11502 to your preamble so headers and footers on landscape pages are correctly
11503 placed when rotated.
11504 This is due to some clashes between the page layouts provided by the
11515 \begin_layout Section
11516 Hollywood (Hollywood spec scripts)
11519 \begin_layout Standard
11525 \begin_layout Subsection
11529 \begin_layout Standard
11530 Getting the format of a Hollywood script right is a
11531 \begin_inset Quotes eld
11535 \begin_inset Quotes erd
11538 It is designed to make the readers focus on content and to be easy and
11539 familiar for the actors to read.
11540 Each page of a script should be one minute of film.
11541 Nothing goes in a script that you cannot see or hear on screen.
11542 The courier 12 pt font should be used throughout.
11546 \begin_layout Subsection
11550 \begin_layout Standard
11551 Speakers' lines should NEVER break in mid-sentence.
11552 If a speaker's lines continue over a page break, repeat the
11556 title followed by (Cont'd).
11559 \begin_layout Subsection
11563 \begin_layout Standard
11568 names as labels then cross-reference the label to insert the name.
11569 The cross-reference dialog will show the current cast of characters.
11570 You can use this to insert the speaker name in narratives also.
11573 \begin_layout Subsection
11574 Paper size and Margins
11577 \begin_layout Standard
11578 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11581 \begin_layout Subsection
11585 \begin_layout Standard
11586 The following environments are available.
11587 You can use hollywood.bind to get the bind keys shown at the right.
11590 \begin_layout Itemize
11594 \begin_inset Newline newline
11599 Used where nothing else works.
11603 \begin_layout Itemize
11609 \begin_inset space \hfill{}
11617 \begin_inset Newline newline
11620 Usually followed by something like
11621 \begin_inset Quotes eld
11624 on Sally waking up.
11625 \begin_inset Quotes erd
11631 \begin_layout Itemize
11635 \begin_inset space \hfill{}
11639 \begin_inset Newline newline
11644 Introduces a new INTERIOR camera set-up.
11645 Always followed by DAY or NIGHT, or something similar to define the lighting
11647 Everthing on this line in CAPS.
11650 \begin_layout Itemize
11654 \begin_inset space \hfill{}
11658 \begin_inset Newline newline
11663 Introduces a new EXTERIOR camera set-up.
11664 Everthing on this line in CAPS.
11667 \begin_layout Itemize
11671 \begin_inset space \hfill{}
11675 \begin_inset Newline newline
11680 The character speaking.
11683 \begin_layout Itemize
11687 \begin_inset space \hfill{}
11691 \begin_inset Newline newline
11696 Instructions to the speaker.
11697 The () are automatically inserted, but only the ( will show in LyX.
11698 Both will be printed.
11701 \begin_layout Itemize
11705 \begin_inset space \hfill{}
11709 \begin_inset Newline newline
11721 \begin_layout Itemize
11725 \begin_inset space \hfill{}
11729 \begin_inset Newline newline
11734 Camera movement instruction.
11736 \begin_inset space \thinspace{}
11740 \begin_inset space \space{}
11746 \begin_layout Itemize
11750 \begin_inset space \hfill{}
11756 \begin_layout Itemize
11760 \begin_inset space \hfill{}
11766 \begin_layout Itemize
11770 \begin_inset space \hfill{}
11776 \begin_layout Itemize
11780 \begin_inset space \hfill{}
11786 \begin_layout Subsection
11790 \begin_layout Itemize
11794 \begin_layout Itemize
11798 \begin_layout Itemize
11800 \begin_inset space \thinspace{}
11807 \begin_layout Itemize
11812 \begin_layout Itemize
11813 PAN — camera movement
11816 \begin_layout Itemize
11817 INSERT — cut to close-up of
11820 \begin_layout Section
11824 \begin_layout Standard
11827 Panayotis Papasotiriou
11830 \begin_layout Subsection
11834 \begin_layout Standard
11835 The ijmpc package is a set of macros that facilitates electronic manuscript
11838 International Journal of Modern Physics C
11841 Similarly, the ijmpd package is for creating manuscripts to be submitted
11844 International Journal of Modern Physics D
11847 Both journals are published by World Scientific.
11848 The corresponding document classes are named
11857 These files, together with instructions for the authors, can be downloaded
11859 \begin_inset Flex URL
11862 \begin_layout Plain Layout
11864 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11870 \begin_inset Flex URL
11873 \begin_layout Plain Layout
11875 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11881 Both packages are modified versions of the standard
11882 \begin_inset Quotes eld
11886 \begin_inset Quotes erd
11889 package, and they are almost (but not exactly) identical.
11890 Most of their features are supported by LyX.
11891 I have used LyX successfully to write articles submitted to both journals
11892 without any problem.
11895 \begin_layout Subsection
11899 \begin_layout Standard
11900 As usual, the easiest way to write a paper is to start with a template.
11903 File\SpecialChar \menuseparator
11922 This will give an (almost) empty document that includes the most common
11923 fields found in a manuscript.
11924 Simply overwrite the existing text (including the brackets,
11929 You should keep in mind the following remarks.
11932 \begin_layout Enumerate
11933 LyX won't let you change the font size and the page style of the document,
11934 because such modifications are not allowed by both packages.
11937 \begin_layout Enumerate
11938 The language of the document should not be changed.
11939 Before previewing your paper, be sure that the babel package is not used.
11940 To do this, click on
11942 Tools\SpecialChar \menuseparator
11953 checkbox in the language settings, and click on
11961 , if you wish to make this change permanent).
11964 \begin_layout Enumerate
11966 \begin_inset Quotes eld
11970 \begin_inset Quotes erd
11973 style must be used to define keywords.
11976 \begin_layout Enumerate
11977 The ijmpc package provides a style named
11978 \begin_inset Quotes eld
11981 Classification Codes
11982 \begin_inset Quotes erd
11985 , which can be used to define classification codes, such as PACS numbers.
11986 Note that this facility is not supported by the ijmpd package.
11989 \begin_layout Enumerate
11990 Several new environments are available:
11991 \begin_inset Quotes eld
11995 \begin_inset Quotes erd
11999 \begin_inset Quotes eld
12003 \begin_inset Quotes erd
12007 \begin_inset Quotes eld
12011 \begin_inset Quotes erd
12015 \begin_inset Quotes eld
12019 \begin_inset Quotes erd
12023 \begin_inset Quotes eld
12027 \begin_inset Quotes erd
12031 \begin_inset Quotes eld
12035 \begin_inset Quotes erd
12039 \begin_inset Quotes eld
12043 \begin_inset Quotes erd
12047 \begin_inset Quotes eld
12051 \begin_inset Quotes erd
12055 \begin_inset Quotes eld
12059 \begin_inset Quotes erd
12063 \begin_inset Quotes eld
12067 \begin_inset Quotes erd
12071 \begin_inset Quotes eld
12075 \begin_inset Quotes erd
12079 \begin_inset Quotes eld
12083 \begin_inset Quotes erd
12087 \begin_inset Quotes eld
12091 \begin_inset Quotes erd
12095 \begin_inset Quotes eld
12099 \begin_inset Quotes erd
12103 Their use is more or less obvious.
12104 LyX supports all these environments; it will use the proper label, text
12105 style, and numbering scheme for each of them.
12108 \begin_layout Enumerate
12109 Both packages use basic citations; the natbib package should not be used.
12110 In LyX, citation references are shown as usual; in the output, citations
12111 are shown as superscripts.
12112 If you want to use a citation as normal text, you should use the
12117 \begin_inset space \thinspace{}
12121 \begin_inset space \space{}
12125 \begin_inset Quotes eld
12129 \begin_inset space \space{}
12139 \begin_inset Quotes erd
12145 \begin_layout Enumerate
12147 \begin_inset Quotes eld
12151 \begin_inset Quotes erd
12154 section in both packages.
12155 To put acknowledgments, just use the
12156 \begin_inset Quotes eld
12160 \begin_inset Quotes erd
12166 \begin_layout Enumerate
12167 Appendices may be added to the paper,
12171 the Acknowledgments and
12176 LyX provides a special environment, called
12177 \begin_inset Quotes eld
12181 \begin_inset Quotes erd
12184 which marks the beginning of the appendices.
12185 This environment should be left blank; it just sends a LaTeX command, but
12186 nothing is really printed.
12188 \begin_inset Quotes eld
12192 \begin_inset Quotes erd
12195 is printed with blue letters, as a signal that all sections after that
12196 point are appendices.
12197 To write an appendix, use the
12198 \begin_inset Quotes eld
12202 \begin_inset Quotes erd
12206 LyX will number each appendix with capital letters, as required by both
12209 \begin_inset Quotes eld
12213 \begin_inset Quotes erd
12220 be present before the first appendix; if not, all appendices will be numbered
12221 as normal sections in the output.
12224 \begin_layout Enumerate
12225 The ijmpc and the ijmpd packages use the
12229 command to implement table captions.
12230 As a result, a table created by LyX is printed correctly, but its caption
12232 However, you can use some TeX code to overcome this problem, so that captions
12233 are printed as expected.
12234 To do so, create a float table as usual, remove the caption, and replace
12235 it with the TeX code
12245 (sic); you must also the TeX code
12249 immediately after the tabular material.
12250 Study the example table included in the template files to see how this
12251 trick is implemented.
12252 Alternatively, If you need table captions, you should implement the whole
12257 file, then include this file to the LyX document (
12259 Insert\SpecialChar \menuseparator
12260 File\SpecialChar \menuseparator
12262 \begin_inset space ~
12268 Details on how to create a table float can be found in the files
12276 , included in the corresponding packages.
12279 \begin_layout Subsection
12280 Preparing a paper for submission
12283 \begin_layout Standard
12284 Before you submit your paper you must export the LyX document as a LaTeX
12287 File\SpecialChar \menuseparator
12288 Export\SpecialChar \menuseparator
12295 \begin_layout Plain Layout
12296 Actually you have the choice between LaTeX (plain) and pdflatex.
12297 If you intend to use pdflatex to prepare the paper, you should use the
12298 pdflatex option so that included graphics are converted to PDF format,
12299 ready for use by pdflatex.
12304 , then make the following changes to the resulting
12311 \begin_layout Enumerate
12312 Remove the comment lines before the
12321 \begin_layout Enumerate
12322 Remove everything between (and including) the
12334 commands, except for any commands you specifically put into the LaTeX preamble.
12337 \begin_layout Standard
12342 file should be saved and processed through LaTeX as many times as necessary.
12343 You may also want to check the resulting
12350 \begin_layout Subsection
12354 \begin_layout Standard
12355 The use of TeX code is reduced to two commands, which must be placed at
12356 the top of the document.
12357 If you started writing your paper by using the
12365 template, the TeX code needed is already in its place; you usually don't
12367 You may only modify the first TeX code to specify the information printed
12368 to the top of odd and even pages (authors' names and short paper's title,
12370 This TeX code must have the form
12374 markboth{Authors' Names}{Short Paper's Title}
12379 \begin_layout Section
12383 \begin_layout Standard
12389 \begin_layout Subsection
12393 \begin_layout Standard
12394 The iopart package provides a document class to create electronic manuscript
12395 submission to the journals published by the Institute of Physics.
12396 Instructions for the authors how to create a paper using the iopart class
12397 can be downloaded together with the iopart package from the site
12398 \begin_inset Flex URL
12401 \begin_layout Plain Layout
12403 ftp://ftp.iop.org/pub/journals/latex2e
12411 \begin_layout Subsection
12415 \begin_layout Standard
12416 The easiest way to write a paper is to start with the file
12420 that is available in LyX's examples files folder.
12421 Open this file, save it under a new name, and start writing.
12422 The example file explains how to use the special text environments.
12423 Here are the most important advices:
12426 \begin_layout Itemize
12427 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12430 Use AMS math package
12432 in the document settings under
12439 \begin_layout Itemize
12442 The title environment defines the kind of your paper.
12443 So use one of the following environments for the title:
12447 \begin_layout Itemize
12456 \begin_layout Itemize
12465 \begin_layout Itemize
12471 for a Topical review
12474 \begin_layout Itemize
12483 \begin_layout Itemize
12492 \begin_layout Itemize
12498 for a Paper (same as Title)
12501 \begin_layout Itemize
12507 for a Preliminary communication
12510 \begin_layout Itemize
12516 for a Rapid communication
12519 \begin_layout Itemize
12525 for a Letter to the editor
12529 \begin_layout Itemize
12532 All title environments except of
12536 can have an optional short title.
12539 \begin_layout Itemize
12540 There is a general title environment
12544 which is not directly supported by the LyX.
12545 This can be used as TeX code when your document doesn't fit into one of
12546 the other title types.
12549 \begin_layout Standard
12550 For more informations like hints for special table and formula formatting,
12551 look at the IOP author guidelines.
12554 \begin_layout Section
12558 \begin_layout Standard
12561 Panayotis Papasotiriou
12564 \begin_layout Subsection
12568 \begin_layout Standard
12569 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12570 that facilitates electronic manuscript submission to the journals they
12572 Most known of them (at least in my domain of interest) are
12574 Astrophysics and Space Science
12580 , but there are many others (see a complete list at
12581 \begin_inset Flex URL
12584 \begin_layout Plain Layout
12586 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12592 The Kluwer package may be downloaded from the site
12593 \begin_inset Flex URL
12596 \begin_layout Plain Layout
12598 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12604 A complete user guide is contained in that package (but it can also be
12605 downloaded separately).
12608 \begin_layout Standard
12609 LyX supports many features of the package but not everything.
12610 However, the TeX code needed is reduced to some
12611 \begin_inset Quotes eld
12615 \begin_inset Quotes erd
12618 commands of the package (see
12619 \begin_inset space ~
12623 \begin_inset CommandInset ref
12625 reference "subsec:kluwer_peculiarities"
12630 I have recently used LyX to write an article submitted to the
12632 Astrophysics and Space Science
12634 without any problem.
12637 \begin_layout Subsection
12641 \begin_layout Standard
12642 The easiest way to write a paper is to start with the Kluwer template file.
12645 File\SpecialChar \menuseparator
12657 This will give an (almost) empty document that includes the most common
12658 fields found in a manuscript and a short description of their use.
12659 As in most templates, simply overwrite the existing text (including the
12664 ) with the correct information.
12667 \begin_layout Subsection
12668 Preparing a paper for submission
12671 \begin_layout Standard
12672 As in the AASTeX package, before you submit your paper to a journal you
12674 \begin_inset Quotes eld
12678 \begin_inset Quotes erd
12684 \begin_layout Enumerate
12685 Export your paper as a LaTeX file.
12686 To do this, click on
12688 File\SpecialChar \menuseparator
12689 Export\SpecialChar \menuseparator
12696 \begin_layout Enumerate
12701 file with a text editor and make the following changes
12705 \begin_layout Enumerate
12706 remove the comment lines before the
12715 \begin_layout Enumerate
12716 remove everything between (and including) the
12728 commands, except for any commands you specifically put into the LaTeX preamble.
12731 \begin_layout Standard
12740 \begin_layout Enumerate
12745 file through LaTeX as many times as necessary (usually up to three).
12748 \begin_layout Enumerate
12754 \begin_inset space \thinspace{}
12758 \begin_inset space \space{}
12765 , and check if everything is OK (it should, if you didn't make any mistake).
12768 \begin_layout Subsection
12769 \begin_inset Quotes eld
12773 \begin_inset Quotes erd
12776 of the Kluwer package
12777 \begin_inset CommandInset label
12779 name "subsec:kluwer_peculiarities"
12786 \begin_layout Standard
12787 The Kluwer package has the following
12788 \begin_inset Quotes eld
12792 \begin_inset Quotes erd
12798 \begin_layout Enumerate
12799 It is possible to write multiple articles in the same LaTeX file
12803 \begin_layout Plain Layout
12804 I can't imagine any good reason to do this.
12810 Each article must be included in the environment
12811 \begin_inset Quotes eld
12815 \begin_inset Quotes erd
12819 Unfortunately, this environment cannot be omitted, even if you write just
12821 Therefore, each article starts with the command
12827 and, obviously, ends with the command
12834 Although this can be implemented in LyX, I didn't included it, since it
12835 looks ugly and can confuse the novice user.
12836 Therefore, you need to enter them directly and mark them as LaTeX code
12838 \begin_inset Quotes eld
12842 \begin_inset Quotes erd
12848 \begin_layout Enumerate
12849 Information given at the beginning of the article (i.
12850 \begin_inset space \thinspace{}
12854 \begin_inset space \space{}
12857 title, subtitle, author, institution, running title, running author, abstract
12858 and keywords) must be included in an environment called
12859 \begin_inset Quotes eld
12863 \begin_inset Quotes erd
12867 This is not implemented in LyX, so you must enter title, subtitle etc.
12868 \begin_inset space ~
12871 between two TeX code lines (
12886 \begin_layout Enumerate
12887 According to the user manual, the label of each bibliography item must be
12911 \begin_layout Standard
12916 template takes care of all these
12917 \begin_inset Quotes eld
12921 \begin_inset Quotes erd
12925 If you start a new paper using this template you don't need to do anything
12930 \begin_layout Enumerate
12931 don't delete the TeX code included in the template, and
12934 \begin_layout Enumerate
12935 copy the example bibliography item included in the template and modify it
12936 as necessary to enter new bibliography items.
12939 \begin_layout Section
12943 \begin_layout Standard
12949 \begin_layout Subsection
12953 \begin_layout Standard
12954 The LyX document classes
12956 article (koma-script)
12960 report (koma-script)
12978 correspond to the LaTeX document classes
12995 \begin_inset space ~
12998 of the Koma-Script family.
12999 They are replacements for the standard document classes
13015 , resp., and fit better to European typography conventions in a number of
13019 \begin_layout Itemize
13020 Standard character size is 11pt in
13022 article (koma-script)
13026 report (koma-script)
13034 letter (koma-script)
13039 \begin_layout Itemize
13040 Headings, labels of the description environment, and a number of elements
13043 letter (koma-script)
13045 document class are set in a bold sans serif font.
13049 \begin_layout Plain Layout
13050 There is a big difference between the bold sans serif old cm fonts and new
13051 ec fonts, especially in the appearance of headings.
13052 In comparison, the ec bold sans serif fonts look a bit thin.
13053 Here the LaTeX package
13061 helps to produce the
13062 \begin_inset Quotes eld
13066 \begin_inset Quotes erd
13069 appearance when using the ec fonts.
13074 The numbering of chapter headings is made in the same way as the numbering
13075 of section headings, that is without the extra line
13076 \begin_inset Quotes eld
13079 Chapter\SpecialChar \ldots{}
13081 \begin_inset Quotes erd
13085 In addition, the appearance of the headings can be modified by using a
13086 number of options (in LyX to be entered in the field
13089 \begin_inset space ~
13096 Layout\SpecialChar \menuseparator
13103 \begin_layout Itemize
13104 The main means in the Koma-Script document classes to design the type area
13113 (in LyX to be entered in the extra class options field in the dialog
13115 Document\SpecialChar \menuseparator
13119 They make a clearer modification of page margins possible as do the options
13122 Document\SpecialChar \menuseparator
13129 \begin_layout Itemize
13130 The LaTeX document classes of the Koma-Script family define a number of
13131 additional commands.
13132 Those part of it which makes sense in LyX is implemented in corresponding
13136 \begin_layout Standard
13137 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13138 can be found in the Koma-Script documentation
13149 \begin_layout Subsection
13150 article (koma-script), report (koma-script), and book (koma-script)
13153 \begin_layout Standard
13154 The document classes
13156 article (koma-script)
13160 report (koma-script)
13170 are implemented in the layout files
13183 They contain all the paragraph types of the corresponding standard document
13196 , resp., partly modified, with the exception of the LyX specific
13200 -type, which is replaced by the new
13204 -type having the same functionality.
13209 -Type there is a number of new paragraph types added.
13216 letter (koma-script)
13221 \begin_layout Itemize
13230 : are equivalents to
13238 , resp., additionally inserting an entry in the table of contents.
13247 are not contained in
13249 article (koma-script)
13254 \begin_layout Itemize
13263 : behave exactly as
13271 , resp., additionally clearing running heads.
13276 is not contained in
13278 article (koma-script)
13284 \begin_layout Plain Layout
13297 report (koma-script)
13299 , but since this is identical to
13303 , is has not been implemented in LyX.
13311 \begin_layout Itemize
13316 : generates a heading directly above the following paragraph in the standard
13317 character size without affecting the structure of the document.
13320 \begin_layout Itemize
13329 are special captions which respect the different space settings needed
13330 for captions placed above or below an element (if you follow strict typographic
13331 rules, you might want to place table captions always above the table).
13332 You can also use the class option
13336 , which will switch
13349 You need at least Koma-Script version 2.8q to use this.
13352 \begin_layout Itemize
13357 : can be used to set a bonmot, e.
13358 \begin_inset space \thinspace{}
13362 \begin_inset space \space{}
13365 at the beginning of a chapter.
13366 If you use the optional argument (
13368 Insert\SpecialChar \menuseparator
13370 \begin_inset space ~
13375 ), you can insert the dictum's author there.
13376 Dictum and author are separated by a line.
13377 You need at least Koma-Script version 2.8q to use this.
13382 is not contained in
13384 article (koma-script)
13389 \begin_layout Standard
13390 The following types, together with the standard types
13402 , form the title area of the document.
13403 They must be entered ahead of the first
13404 \begin_inset Quotes eld
13408 \begin_inset Quotes erd
13415 \begin_layout Plain Layout
13416 The corresponding LaTeX commands must appear before the
13427 When such a type is used more than once, the latter usage overwrites the
13428 former one, that means, for every type only the latest usage is valid.
13429 The order of the different types however has, like
13441 , no effect on the appearance of the produced document.
13444 \begin_layout Itemize
13449 : produces a centered paragraph above the ordinary title (
13461 ) for the subject of the document.
13464 \begin_layout Itemize
13469 : produces a centered paragraph below the ordinary title (
13481 ) for the publishers' name.
13484 \begin_layout Itemize
13491 report (koma-script)
13497 produces a centered paragraph on its own page behind the title page, or
13500 article (koma-script)
13502 produces a centered paragraph below the ordinary title (
13518 ) for a dedication.
13521 \begin_layout Itemize
13526 : produces a left aligned paragraph above the ordinary title (
13542 ) for a document`s head.
13545 \begin_layout Itemize
13550 : produces in a double-sided print in
13552 report (koma-script)
13558 a left-aligned paragraph at the top of the title page`s back or has no
13559 effect in a single-sided print or in
13561 article (koma-script)
13566 \begin_layout Itemize
13571 : produces in a double-sided print in
13573 report (koma-script)
13579 a left-aligned paragraph at the bottom of the title page`s back or has
13580 no effect in a single-sided print or in
13582 article (koma-script)
13587 \begin_layout Itemize
13592 : produces a special
13593 \begin_inset Quotes eld
13597 \begin_inset Quotes erd
13600 page ahead of the actual document containing a paragraph without special
13604 \begin_layout Standard
13605 The layout files for the document classes
13607 article (koma-script)
13611 report (koma-script)
13617 do include the file
13622 This is thought of as a place to define your own types.
13627 in your personal layout directory and edit the file!
13630 \begin_layout Subsection
13631 letter (koma-script)
13634 \begin_layout Standard
13638 letter (koma-script)
13640 is implemented in the layout file
13645 It contains all the paragraph types of the corresponding standard document
13650 , partly modified, with the exception of the LyX specific types
13662 type, which is replaced by the new
13667 In addition, it contains, in contrast to the standard document class, the
13685 Furthermore, there are a number of new letter specific types.
13688 \begin_layout Standard
13689 The appearance of the letter produced by this document class can be controlled
13690 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13694 \begin_layout Plain Layout
13695 For example, the standard appearance of the letter`s heading, consisting
13696 of name and address, is quite self-willed.
13698 \begin_inset Quotes eld
13702 \begin_inset Quotes erd
13705 heading is produced by the following LaTeX commands in the preamble:
13708 \begin_layout LyX-Code
13718 \begin_layout LyX-Code
13734 \begin_layout LyX-Code
13744 \begin_layout LyX-Code
13764 A detailed German description of such LaTeX commands can be found in the
13765 Koma-Script documentation
13770 With it, the letter's author can produce his personal letter layout.
13773 \begin_layout Standard
13782 define the beginning of the letter and must be used in every letter.
13783 To emphasize them in the LyX document class, they are marked with the letter
13793 \begin_inset space ~
13796 in the left margin.
13797 It is possible to write any number of letters in one file.
13802 type produces a new letter using the same addressee and a
13806 type produces a new addressee.
13823 are ordinary paragraph types and can also be used several times in one
13824 and the same letter.
13827 \begin_layout Itemize
13832 : produces a paragraph for the addressee and implicitly defines the beginning
13836 \begin_layout Itemize
13841 : produces a paragraph for the form of address and implicitly produces a
13845 \begin_layout Itemize
13850 : produces a paragraph for a close.
13853 \begin_layout Itemize
13858 : produces a paragraph for a postscript.
13861 \begin_layout Itemize
13866 : produces a paragraph for a distribution list.
13869 \begin_layout Itemize
13874 : produces a paragraph for enclosures.
13877 \begin_layout Standard
13918 are input types provided with a label to enter information, which will
13919 be processed by the document class.
13923 \begin_layout Plain Layout
13924 It could be seen as a matter of inconsequence, that the types
13932 described above are not such input types as well.
13933 Because of the special meaning of those types, however, I have implemented
13934 them as ordinary paragraph types with a one letter mark in the left margin.
13935 Moreover, it would affect my feeling of symmetry, if the
13943 type had such a serious different appearance.
13948 The types must be used ahead of the corresponding
13955 \begin_layout Standard
13956 An implementation of these types in a WYSIWYG fashion does not seem to make
13957 sense, because the real appearance of the produced letter does not only
13958 depend on the usage of the particular type, but also on other factors.
13959 For example, a signature entered in the
13963 type will in the standard behavior appear in the produced letter only,
13964 when in the same letter also a
13969 The entered value of the
13973 type will in the standard behavior not appear in the produced letter at
13975 The possibility to design the letter`s heading freely is already indicated
13976 in a footnote above.
13979 \begin_layout Standard
13980 The input types can also be used as empty paragraphs.
13981 This makes sense e.
13982 \begin_inset space \thinspace{}
13986 \begin_inset space \space{}
13998 type is not used at all, in the standard behavior the value of the
14002 type is used as signature, whereas if an empty
14006 type is used, no signature value is defined.
14009 \begin_layout Standard
14010 By using the input types it is possible to write a letter template, containing
14011 filled input types with your personal dates (name, address, etc.) and empty
14012 input types for other dates you want to enter.
14015 \begin_layout Itemize
14020 : sender's name, in the standard behavior appears as a centered paragraph
14021 in small caps in the letter`s heading.
14024 \begin_layout Itemize
14029 : sender's signature, in the standard behavior appears below the
14038 type is used, the value of the
14042 type appears instead.
14045 \begin_layout Itemize
14050 : sender's address, in the standard behavior appears in a centered paragraph
14051 in the letter`s heading below the sender's name.
14054 \begin_layout Itemize
14059 : sender's telephone number, in the standard behavior only sets the LaTeX
14069 \begin_layout Itemize
14074 : place of the letter`s making.
14077 \begin_layout Itemize
14082 : date of the letter`s making.
14091 , in the standard behavior, produce the place and the date in a right-aligned
14092 line below the addressee's field.
14097 type is used, neither place nor date appear, independent of the value of
14107 type is used, the date of the letter `s production is used.
14110 \begin_layout Itemize
14115 : sender`s back address, in the standard behavior appears above the addressee's
14116 field in a small sans serif font.
14119 \begin_layout Itemize
14124 : special mail information, in the standard behavior appears underlined
14125 above the addressee's field below the back address.
14128 \begin_layout Itemize
14133 : additional information, in the standard behavior appears on right side
14134 below the addressee`s field.
14137 \begin_layout Itemize
14142 : the letter's title, in the standard behavior appears in a big, bold, sans
14143 serif font above the subject.
14146 \begin_layout Itemize
14151 : the letter's subject, in the standard behavior appears in a bold font
14159 \begin_layout Standard
14180 produce a business letter like line above the
14184 line containing the fields
14185 \begin_inset Quotes eld
14189 \begin_inset Quotes erd
14193 \begin_inset Quotes eld
14197 \begin_inset Quotes erd
14201 \begin_inset Quotes eld
14205 \begin_inset Quotes erd
14209 \begin_inset Quotes eld
14213 \begin_inset Quotes erd
14217 \begin_inset Quotes eld
14221 \begin_inset Quotes erd
14225 \begin_inset Quotes eld
14229 \begin_inset Quotes erd
14233 For the date field, the value of the
14239 \begin_inset Quotes eld
14242 business letter types
14243 \begin_inset Quotes erd
14246 is used, the value of the
14250 type however does not appear, but only the LaTeX variable
14257 The ordinary output of place and date in a right-aligned line below the
14258 addressee`s field is suppressed.
14259 The types are implemented as input types provided with a label and must
14260 be used ahead of the corresponding
14267 \begin_layout Itemize
14275 \begin_layout Itemize
14283 \begin_layout Itemize
14291 \begin_layout Itemize
14299 \begin_layout Itemize
14307 \begin_layout Subsection
14308 The new letter class: letter (koma-script v.2)
14311 \begin_layout Standard
14317 \begin_layout Standard
14318 \begin_inset VSpace medskip
14324 \begin_layout Standard
14326 Koma-Script version 2.8 has introduced a new letter class
14330 which supersedes the now unsupported
14335 It has — on the LaTeX side — a completely new interface and is not compatible
14336 with the old class.
14337 Therefore, LyX supports both, though it is recommended you use the new
14341 \begin_layout Standard
14342 This class covers the same functionality as
14344 letter (koma-script),
14347 The basic items are
14351 (receiver's address, same as
14355 in the old layout),
14368 will start a new letter (i.
14369 \begin_inset space \thinspace{}
14373 \begin_inset space \space{}
14376 you can write several letters per document).
14377 New elements are sender's
14393 and the possibility to use a
14399 Insert\SpecialChar \menuseparator
14405 \begin_layout Standard
14406 The biggest improvement is, though, that the letter's layout is configurable
14407 to meet almost any needs.
14408 This can be done via the preamble or with a special style file (Letter
14409 Class Option, extension
14413 ), that will be read in as a class option.
14417 \begin_layout Plain Layout
14418 The KOMA package comes with some default
14423 There is, for instance, a
14427 file that follows german typesetting rules, or a
14431 that provides the default layout of the old
14436 The latter can be loaded with the class option
14445 ayout\SpecialChar \menuseparator
14450 ocument\SpecialChar \menuseparator
14462 template that is included in LyX for examples.
14463 A detailed description is to be found in the Koma-Script documentation
14471 \begin_layout Subsection
14475 \begin_layout Standard
14476 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14480 \begin_layout Itemize
14481 The chapter number of a
14485 type appears on a line of its own above the chapter heading instead of
14486 appearing in the same line ahead of it.
14487 The cause for that is the LyX internal behavior for the labeltype
14491 in the layout file.
14494 \begin_layout Itemize
14495 The headings of the types
14503 are only put in the
14504 \begin_inset Quotes eld
14508 \begin_inset Quotes erd
14511 LaTeX table of contents, but not in the LyX table of contents (
14513 Document\SpecialChar \menuseparator
14515 \begin_inset space ~
14519 \begin_inset space ~
14527 \begin_layout Itemize
14528 The paragraphs in a
14532 document class appear in a skip separation mode, not indented.
14533 This is the standard behavior, no special LaTeX commands are needed for
14537 Document\SpecialChar \menuseparator
14540 dialog the corresponding radio button indicates
14549 value always has the effect that extra LaTeX commands are inserted in the
14550 document to produce the gap, which is not what is wanted in this case.
14553 \begin_layout Section
14557 \begin_layout Standard
14563 \begin_layout Subsection
14567 \begin_layout Standard
14568 Memoir is a very powerful and constantly evolving class.
14569 It has been designed with regard to fictional and non-fictional literature.
14570 Its aim is to let the user have maximum control over the typesetting of
14572 Memoir is based on the standard book class, but it can also emulate the
14573 article class (see below).
14576 \begin_layout Standard
14577 Peter Wilson, the developer of Memoir, is known as the author of lots of
14578 useful packages in the LaTeX world.
14579 Most of them have been merged with Memoir.
14580 Therefore, it is much easier to layout the table of contents, appendices,
14581 chapter designs and such.
14582 LyX, though, does not support all of these goodies natively.
14583 Some of them might be added to forthcoming releases
14587 \begin_layout Plain Layout
14588 You are invited to send suggestions to
14589 \begin_inset Flex URL
14592 \begin_layout Plain Layout
14594 lyx-devel@lists.lyx.org
14604 , lots will probably never, due to the limitations of LyX's framework.
14605 Of course you can still use all features with the help of some native LaTeX
14610 \begin_layout Plain Layout
14615 \begin_layout Plain Layout
14625 \begin_inset space ~
14629 \begin_inset CommandInset ref
14631 reference "sec:Inserting-TeX-Code"
14641 In this section, we can only list those features which are natively supported
14643 For detailed descriptions (and for the rest of features) we recommend you
14644 have a look at the detailed manual of the Memoir class
14648 \begin_layout Plain Layout
14653 \begin_layout Plain Layout
14663 \begin_inset Flex URL
14666 \begin_layout Plain Layout
14668 CTAN:/macros/latex/memoir/memman.pdf
14678 , which is not only a user guide for the class, but also both a comprehensive
14679 description on good typesetting and a superb example for good typesetting
14683 \begin_layout Subsection
14684 Basic features and restrictions
14687 \begin_layout Standard
14688 Memoir supports basically all features of the standard book classes.
14689 There are, however, some differences, as follows:
14692 \begin_layout Description
14694 \begin_inset space ~
14697 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14700 \begin_layout Description
14702 \begin_inset space ~
14705 style: The fancy page style is not supported, due to a command clash between
14706 Memoir and the fancyhdr package (they both define a command with the same
14707 name, which confuses LaTeX).
14708 Instead, Memoir comes with a number of its own page styles (see
14710 Layout\SpecialChar \menuseparator
14711 Document\SpecialChar \menuseparator
14713 \begin_inset space ~
14719 If you want to use these for the chapter pages, you have to use the command
14726 in the main text or in preamble (e.
14727 \begin_inset space \thinspace{}
14731 \begin_inset space \space{}
14738 chapterstyle{companion}
14743 \begin_layout Description
14744 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14745 optional argument in the standard classes.
14746 With this, you can specify an alternative version of the title for the
14747 table of contents and the headers (for instance, if the title is too long).
14748 In LyX, you can do this via
14750 Insert\SpecialChar \menuseparator
14752 \begin_inset space ~
14757 at the beginning of a chapter/section.
14758 Memoir features a second optional argument and thus separates the table
14759 of contents from the header.
14760 You can define three variants of a title with this: one for the main text,
14761 one for the table of contents, and one for the headers.
14762 Simply insert two optional arguments if you need this feature, the first
14763 one containing the short title for the Table of Contents, the second one
14764 containing an alternative short title for the headers.
14767 \begin_layout Description
14768 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14769 of contents, the list of figures and the list of table start a new page
14771 Memoir does not follow this route.
14772 You have to insert a page break yourself, if you want to have one.
14775 \begin_layout Description
14776 Titlepage: For some unknown reason, Memoir uses pagination on the title
14777 page (in the standard classes, title pages are
14778 \begin_inset Quotes eld
14782 \begin_inset Quotes erd
14786 \begin_inset space \thinspace{}
14790 \begin_inset space \space{}
14794 If you want an empty title page, type
14798 aliaspagestyle{title}{empty}
14803 \begin_layout Description
14804 Article: With the class option
14810 Layout\SpecialChar \menuseparator
14811 Document\SpecialChar \menuseparator
14813 \begin_inset space ~
14818 ), you can emulate article style.
14819 That is, counters (footnotes, figures, tables etc.) will not be reset on
14820 new chapters, chapters don't start a new page (but are—in contrary to
14821 \begin_inset Quotes eld
14825 \begin_inset Quotes erd
14828 article classes—still allowed), parts, though, use their own page, as in
14832 \begin_layout Description
14833 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14834 font commands, which have been used in the old LaTeX version 2.09 (e.
14835 \begin_inset space \thinspace{}
14839 \begin_inset space \space{}
14855 It produces an error and stops LaTeX whenever such a command appears.
14860 reallows the commands and spits out warnings instead (which does at least
14862 Since a lot of packages and particularly BibTeX style files are still using
14863 those commands, we have decided to use this option by default.
14866 \begin_layout Subsection
14870 \begin_layout Standard
14871 We will only describe the features supported by LyX (which is not much currently
14873 Please consult the Memoir manual
14877 \begin_layout Plain Layout
14882 \begin_layout Plain Layout
14892 \begin_inset Flex URL
14895 \begin_layout Plain Layout
14897 CTAN:/macros/latex/memoir/memman.pdf
14910 \begin_layout Description
14911 Abstract: You may wonder why an abstract is an extra feature.
14912 Well, it is in book class.
14913 Usually books don't have abstracts.
14914 Memoir, however, has.
14915 You can use it wherever and how often you like.
14918 \begin_layout Description
14919 Chapterprecis: You may know this older typesetting style: The contents of
14920 a chapter are summarized below the title and also in the table of contents
14922 \begin_inset space \thinspace{}
14926 \begin_inset space \space{}
14931 Our hero arrives in Troia; he loses some friends; he finds others
14934 Chapterprecis does exactly this.
14935 It is therefore only sensible below a chapter.
14938 \begin_layout Description
14939 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14940 The epigraph environment provides an elegant way of typesetting such a
14942 The motto itself (text) and its author (source) are divided by a short
14944 Unfortunately, we have to fool LyX a bit here again, since the environment
14945 needs two arguments (text and source).
14946 In this case, we have to use curly brackets (in TeX mode) between the two
14957 <author of the slogan>.
14960 \begin_layout Description
14961 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14962 complex figurative poems).
14963 LyX can only support a few of them.
14964 One is poemtitle, which is a centered title for poems, which will also
14965 be added to the table of contents (verse is the standard environment for
14967 Memoir has some enhanced versions of verse, but you need to use TeX code,
14968 because they have to be nested inside regular verse environments, which
14969 is not possible with LyX).
14972 \begin_layout Description
14973 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14976 \begin_layout Section
14977 Article (mwart), book (mwbk) and report (mwrep)
14978 \begin_inset Argument
14981 \begin_layout Plain Layout
14994 \begin_layout Standard
15000 \begin_layout Standard
15001 The LyX document classes
15017 correspond to the LaTeX document classes
15030 They are replacements for the standard document classes
15042 , resp., and fit better to Polish typography conventions in a number of points.
15046 \begin_layout Standard
15050 \begin_layout Itemize
15051 Unnumbered titles (with star, e.
15052 \begin_inset space \thinspace{}
15056 \begin_inset space \space{}
15063 ) are added into table of contents,
15066 \begin_layout Itemize
15067 Additional page styles:
15071 \begin_layout Description
15072 uheadings header with separated lines,
15075 \begin_layout Description
15076 myheadings custom header, contents headers via commands:
15091 \begin_layout Description
15092 myuheadings custom header with separated lines,
15095 \begin_layout Description
15096 outer page number is placed on outer side of page
15100 \begin_layout Itemize
15105 \begin_layout Description
15106 rmheadings serif titles — default,
15109 \begin_layout Description
15110 sfheadings sansserif titles,
15113 \begin_layout Description
15114 authortitle on title page first placed is author next title — default,
15117 \begin_layout Description
15118 titleauthor on title page first placed is title next author,
15121 \begin_layout Description
15122 withmarginpar reserve place on page for margins.
15126 \begin_layout Section
15130 \begin_layout Standard
15135 provides an alternative to the standard
15140 It provides similar functionality, but you might prefer this layout with
15141 sans serif sections, headings, and more.
15144 \begin_layout Section
15148 \begin_layout Standard
15154 \begin_layout Standard
15155 \begin_inset VSpace bigskip
15161 \begin_layout Standard
15166 \begin_inset space ~
15171 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15172 \begin_inset Formula $\beta$
15175 release of May, 1999) class.
15178 \begin_layout Standard
15183 textclass, which works with RevTeX 3.1.
15184 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15185 That means that it doesn't interact very well with LyX, which requires
15186 LaTeX2e, although it has been kludged to work.
15187 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15191 \begin_inset space ~
15196 textclass should also be pretty easy to use.
15199 \begin_layout Standard
15200 These documents are supposed to be used in
15204 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15205 macros, and assume you'll know what to put in the preamble if necessary.
15208 \begin_layout Subsection
15212 \begin_layout Standard
15213 All you need to do is install RevTeX 4, as described in the package's README
15215 The package can be found at The RevTeX 4 Web Site
15216 \begin_inset Flex URL
15219 \begin_layout Plain Layout
15221 http://publish.aps.org/revtex4/
15227 Install it somewhere that LaTeX can see it.
15228 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15230 \begin_inset space \thinspace{}
15234 \begin_inset space \space{}
15237 not the directory where you installed the class file.) Then, if you reconfigure
15238 LyX, it will find the class file and let you use the RevTeX4 textclass.
15241 \begin_layout Standard
15242 Probably the easiest way to get started is either to import a RevTeX 4 document
15250 \begin_inset space ~
15255 template, found in the templates directory.
15258 \begin_layout Subsection
15262 \begin_layout Standard
15263 Optional arguments to
15270 \begin_inset Quotes eld
15274 \begin_inset Quotes erd
15278 \begin_inset Quotes eld
15282 \begin_inset Quotes erd
15292 \begin_inset space ~
15300 \begin_inset space ~
15306 Remember that in RevTeX, at least one optional argument is required!
15309 \begin_layout Standard
15310 Other preamble matter, like
15317 \begin_inset space ~
15323 \begin_inset space ~
15328 dialog, also as usual.
15331 \begin_layout Subsection
15335 \begin_layout Standard
15336 The layouts basically correspond to the commands in RevTeX4.0.
15337 For example, the Email layout corresponds to
15344 Note that (at least as of RevTeX 4.0 Beta), the
15352 layouts are exactly equivalent, so you shouldn't need to use both.
15356 \begin_layout Plain Layout
15357 In case you're curious, both were included so that
15361 would be able to translate both
15381 \begin_layout Subsection
15385 \begin_layout Standard
15386 There are a couple of important unique aspects of RevTeX 4 which might cause
15387 bugs that will be even more confusing in LyX.
15390 \begin_layout Standard
15408 The LyX equivalent is that there is a separate Thanks layout.
15413 write footnotes in the
15417 layout, or weird things may happen.
15418 See the RevTeX 4 documentation for more details.
15421 \begin_layout Standard
15425 \begin_inset space ~
15433 \begin_inset space ~
15442 layouts must be placed
15450 layout and the corresponding
15467 , the LaTeX won't compile.
15470 \begin_layout Subsection
15474 \begin_layout Standard
15475 The main problem with this layout is that you can't use the optional arguments
15476 to layouts like Email and Title.
15477 (The problem is not unique to this layout; you can't use optional arguments
15478 to the Section layouts either.) This means that after you export that file
15479 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15480 need to edit the LaTeX file with a text editor to add the optional arguments
15482 \begin_inset space \thinspace{}
15486 \begin_inset space \space{}
15489 the running title for the page headers.
15490 Lacking these layouts makes the
15496 (and the equivalent
15502 ) useless, so the corresponding layouts don't exist, and will have to be
15507 \begin_layout Plain Layout
15512 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15513 has not been updated yet to take advantage of it.
15521 \begin_layout Section
15522 Springer Journals (
15529 \begin_layout Standard
15535 \begin_layout Subsection
15539 \begin_layout Standard
15540 These are the layout files for some of the journal formats used by Springer
15541 Verlag and listed on
15542 \begin_inset Flex URL
15545 \begin_layout Plain Layout
15547 http://www.springer.de/author/tex/help-journals.html
15552 , where you should also go to fetch the class files (yes, these are LaTeX2e
15554 It is a modular system: the things common to all journals are implemented
15559 , which journal-specific layout files (such as, e.
15560 \begin_inset space \thinspace{}
15564 \begin_inset space \space{}
15571 for Journal of Geodesy) can include.
15574 \begin_layout Standard
15575 This means that implementing support for any other Springer journal on this
15576 list is as simple as writing your own
15584 file following the outline given in
15592 \begin_layout Standard
15593 It is reasonably well tested only for the Journal of Geodesy.
15602 come with the standard LyX distribution.
15603 Install the relevant class file (downloaded from Springer) in a proper
15604 directory, reconfigure LaTeX (in the teTeX case by running
15608 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15609 and it should work.
15612 \begin_layout Subsection
15616 \begin_layout Standard
15617 A large number of theorem-like styles —
15623 \SpecialChar \ldots{}
15629 \begin_layout Standard
15632 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15633 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15636 See the Springer class file documentation for details.
15639 \begin_layout Subsection
15643 \begin_layout Itemize
15655 \begin_layout Itemize
15658 Probability Theory and Related Fields
15664 — Jean-Marc Lasgouttes
15667 \begin_layout Standard
15668 Add your own, it isn't so hard!
15671 \begin_layout Subsection
15675 \begin_layout Standard
15676 These files are partly based on the older
15680 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15681 file from Springer.
15686 layout, are now defunct.
15687 Jean-Marc Lasgouttes helped out big in making me find my way around the
15688 LyX layout file mechanism.
15691 \begin_layout Subsection
15695 \begin_layout Standard
15697 But probably less than in the old hacked-LaTeX
15704 \begin_layout Standard
15706 \begin_inset space \thinspace{}
15709 g.: does not display the number for theorem-like layouts, just #.
15712 \begin_layout Section
15718 \begin_inset CommandInset label
15727 \begin_layout Standard
15735 \begin_layout Subsection
15739 \begin_layout Standard
15740 This section describes how to use LyX to make slides for overhead projectors.
15741 There are two document classes that can do this: the default slides class
15747 This section documents the former.
15750 \begin_layout Standard
15751 I'm going to say this again, nice and clear, so that there's no misunderstanding
15755 \begin_layout Standard
15756 \begin_inset VSpace bigskip
15762 \begin_layout Standard
15766 This section documents the class
15767 \begin_inset Quotes eld
15775 \begin_inset Quotes erd
15783 \begin_layout Standard
15784 \begin_inset VSpace bigskip
15790 \begin_layout Standard
15791 If you're looking for the documentation for
15792 \begin_inset Quotes eld
15800 \begin_inset Quotes erd
15803 , check out section
15804 \begin_inset space ~
15808 \begin_inset CommandInset ref
15810 reference "sec:foiltex"
15820 \begin_inset Quotes eld
15828 \begin_inset Quotes erd
15831 ] is actually somewhat better than the default
15839 \begin_layout Plain Layout
15840 \SpecialChar \ldots{}
15841 or so I've been told repeatedly by its advocates.
15842 Having never used it, I have no idea if this claim is true or not.
15847 which this section documents.
15850 \begin_layout Standard
15851 This class is the LaTeX2e improvement of the old
15856 Every LaTeX2e distribution includes this class [which I'll just refer to
15858 \begin_inset Quotes eld
15866 \begin_inset Quotes erd
15869 from now on], so you're bound to have it.
15870 As I noted earlier, there are other classes, such as
15874 , which also produce slides for overhead projectors and do a better job
15876 However, there are some things which
15880 can do which the others can't, such as generate overlays.
15881 Read on to learn more!
15884 \begin_layout Subsection
15886 \begin_inset CommandInset label
15888 name "sec:slidesetup"
15895 \begin_layout Standard
15896 Obviously, to use this document class, you need to select
15897 \begin_inset Quotes eld
15905 \begin_inset Quotes erd
15908 from the class list in the
15910 Document\SpecialChar \menuseparator
15914 There are some other special things you should know about this class:
15917 \begin_layout Itemize
15918 Don't bother changing the options
15923 They're not supported by the
15930 \begin_layout Itemize
15934 \begin_inset space ~
15939 behaves a bit differently for this class.
15940 The possible choices and what they do are as follows:
15944 \begin_layout Description
15949 The final output contains page numbers in the lower right corner.
15952 \begin_layout Description
15961 , but also prints out any time markers you've put in.
15962 This is the default.
15965 \begin_layout Description
15970 The final output contains no page numbers, time markers, or alignment markers.
15974 \begin_layout Itemize
15979 class has an extra option:
15985 \begin_inset Quotes eld
15993 \begin_inset Quotes erd
15996 in the extra class options.
16000 \begin_layout Standard
16001 Using this options allows you to add time markers to
16007 \begin_inset space ~
16011 \begin_inset CommandInset ref
16013 reference "sec:slideNote"
16021 \begin_layout Standard
16022 You can also use the template file
16023 \begin_inset Quotes eld
16031 \begin_inset Quotes erd
16034 to automatically set up a document to use the
16040 File\SpecialChar \menuseparator
16042 \begin_inset space ~
16046 \begin_inset space ~
16051 to open your new document].
16052 The template file also contains some examples of the special paragraph
16053 environments used by this class.
16054 I'll describe those next.
16057 \begin_layout Subsection
16058 Paragraph Environments
16061 \begin_layout Subsubsection
16062 Supported Environments
16065 \begin_layout Standard
16066 The first thing you'll notice when you start up a new
16070 document is the font size and type: it's the equivalent of the size
16071 \begin_inset Quotes eld
16079 \begin_inset Quotes erd
16085 \begin_inset space ~
16091 This is also what's used in the output.
16093 \begin_inset Quotes eld
16097 \begin_inset Quotes erd
16100 to remind you that this is a slide.
16101 Your final slides will use a larger font; ergo, you'll have less space.
16102 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16105 \begin_layout Standard
16106 The next thing that becomes obvious is the changes to the paragraph environment
16107 pull-down box [at the far-left end of the toolbar].
16108 Most of the paragraph environments you're used to seeing are missing.
16109 There are also five new ones.
16114 class itself only supports certain paragraph environments:
16117 \begin_layout Itemize
16123 \begin_layout Itemize
16129 \begin_layout Itemize
16135 \begin_layout Itemize
16141 \begin_layout Itemize
16147 \begin_layout Itemize
16153 \begin_layout Itemize
16159 \begin_layout Itemize
16165 \begin_layout Itemize
16171 \begin_layout Itemize
16177 \begin_layout Itemize
16183 \begin_layout Standard
16184 All of the other standard environments, including the section-heading environmen
16185 ts, aren't used in the
16192 \begin_layout Standard
16193 On the other hand, you'll notice the following new environments:
16196 \begin_layout Itemize
16202 \begin_layout Itemize
16208 \begin_layout Itemize
16214 \begin_layout Itemize
16220 \begin_layout Itemize
16226 \begin_layout Standard
16227 These five are kind of quirky, due to a
16228 \begin_inset Quotes eld
16232 \begin_inset Quotes erd
16236 You see, LyX doesn't permit you to nest any other paragraph environment
16237 into an empty environment.
16238 Now, that's fine and dandy, but it means that you wouldn't be able to start
16239 a slide with anything except plain text.
16240 To deal with this, I've performed a little
16241 \begin_inset Quotes eld
16245 \begin_inset Quotes erd
16251 \begin_layout Subsubsection
16252 Quirks of the New Environments
16253 \begin_inset CommandInset label
16255 name "sec:slideQuirk"
16262 \begin_layout Standard
16263 All five of the new paragraph environments are somewhat quirky due to inherent
16264 limitiations in the current version of LyX.
16265 As I just mentioned, LyX forbids environments that begin with another environme
16267 To get around this, the
16271 environment isn't a paragraph environment as described in the
16279 \begin_layout Standard
16280 You should consider
16293 \begin_inset Quotes eld
16296 pseudo-environments.
16297 \begin_inset Quotes erd
16300 They look like a section heading or a
16301 \begin_inset Quotes eld
16309 \begin_inset Quotes erd
16312 but really begin a [and, if necessary, end the previous] paragraph environment.
16322 \begin_inset Quotes eld
16326 \begin_inset Quotes erd
16329 These two perform some action.
16332 \begin_layout Standard
16333 A common feature of all five environments,
16353 , is a rather long-ish label.
16354 The text following this label — ordinarily the contents of the paragraph
16355 environment — is utterly irrelevant for
16376 LyX completely ignores it.
16377 In fact, you can leave these five environments completely empty.
16381 \begin_layout Standard
16386 to put any text after the rather long-ish label, you might want to.
16387 This could be a short description of the contents of the
16392 In that case, enter your descriptive comment and hit
16396 as you normally would.
16399 \begin_layout Standard
16400 If, on the other hand, you don't want to enter any descriptive text, you'll
16401 hit another LyX quirk.
16402 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16403 environment until you put something in the old one.
16407 \begin_layout Itemize
16408 Start entering the text that will
16436 \begin_layout Itemize
16437 Now move to the beginning of that paragraph.
16441 \begin_layout Itemize
16450 \begin_layout Itemize
16451 Finally, change this new, empty paragraph to a
16475 \begin_layout Standard
16476 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16480 \begin_layout Subsection
16481 Making a Presentation with
16494 \begin_layout Subsubsection
16502 \begin_layout Standard
16503 If you're expecting this section to teach you how to actually make a presentatio
16504 n, you'll be sorely disappointed.
16505 Naturally, I'll describe all of the ways the
16509 class can assist you in preparing the materials for a presentation.
16510 Filling in the contents, however, is up to you.
16515 the LyX philosophy.]
16518 \begin_layout Standard
16523 environment [in the manner described in section
16524 \begin_inset space ~
16528 \begin_inset CommandInset ref
16530 reference "sec:slideQuirk"
16534 ] tells LyX to begin a new slide [duh].
16535 The label for this environment/
16536 \begin_inset Quotes erd
16540 \begin_inset Quotes erd
16544 \begin_inset Quotes eld
16548 \begin_inset Quotes erd
16551 in cool blue, followed by the label,
16552 \begin_inset Quotes eld
16556 \begin_inset Quotes erd
16560 Any text or paragraph environments that follow this one go on the new slide.
16564 \begin_layout Standard
16565 Slides are probably the only time you'll need to forcibly end pages in LyX
16566 (this can be specified in the
16571 In fact, you'll want to, once you finish entering the contents of one slide.
16572 If you've entered more text than can physically fit on a slide, the extra
16573 overflows onto a new slide.
16574 I don't recommend doing this, however, since the overflow slide won't have
16575 any page number on it.
16576 Furthermore, it may interfere with any
16580 you've made to accompany the oversized
16587 \begin_layout Standard
16596 environments work the same way as the
16601 They both create an
16602 \begin_inset Quotes eld
16606 \begin_inset Quotes erd
16609 followed by a label [
16610 \begin_inset Quotes eld
16614 \begin_inset Quotes erd
16618 \begin_inset Quotes eld
16622 \begin_inset Quotes erd
16626 The color is a stunning magenta instead of blue, and the
16627 \begin_inset Quotes eld
16631 \begin_inset Quotes erd
16634 will look different, in style and in length.
16635 The label fonts of all three also differ from one another.
16638 \begin_layout Standard
16643 , if the contents of a
16651 exceed the physical size of a slide or sheet of paper, the extra will overflow
16653 Again, you should avoid this.
16654 It defeats the whole purpose of
16665 \begin_layout Subsubsection
16675 \begin_layout Standard
16680 is a slide that sits atop another slide.
16681 Perhaps you wish to discuss a figure on the main
16685 before displaying the text associated with it.
16686 One way to accomplish this is tape a flap of dark paper over the part of
16691 you want to display later.
16692 This method fails, however, if you wish to overlap one graph with another,
16694 You would then have to fumble while speaking to align the two separate,
16699 s to align the two graphs.
16704 environment in both cases makes life much easier.
16707 \begin_layout Standard
16712 receives the page number of its
16713 \begin_inset Quotes eld
16717 \begin_inset Quotes erd
16725 \begin_inset Quotes eld
16733 \begin_inset Quotes erd
16740 \begin_layout Plain Layout
16741 Presumably, mutliple
16746 \begin_inset Quotes eld
16754 \begin_inset Quotes erd
16758 \begin_inset Quotes eld
16766 \begin_inset Quotes erd
16770 \begin_inset Quotes eld
16778 \begin_inset Quotes erd
16782 \begin_inset space ~
16785 appended to the page number of the parent
16795 Clearly, you want the contents of both the
16803 to each fit on a single physical slide! You should probably consider an
16809 \begin_inset Quotes eld
16813 \begin_inset Quotes erd
16825 class provides a visual cue for this: the label at the start of an
16829 is shorter than that at the start of a
16834 Lastly, when you generate printable output, you'll find alignment markers
16835 in all four corners of both the
16839 page and its parent
16844 These will assist you in lining up the two physical slides.
16847 \begin_layout Standard
16848 The major problem in overlaying two slides is aligning the contents of the
16849 two transparencies.
16850 How much space should you leave for that graph on the second slide? Worse
16851 still, what if you want a graph and a sentence on second slide, but there
16852 is text on the main transparency that goes in between them? You could try
16853 and insert vertical space of the right size.
16854 The better way is to use
16865 \begin_layout Standard
16866 As their names imply,
16874 are two command-like paragraph environments that make all subsequent text
16875 invisible and visible, respectively.
16877 \begin_inset space ~
16881 \begin_inset CommandInset ref
16883 reference "sec:slideQuirk"
16887 that you don't place anything
16891 these two environments, however.
16896 , it inserts a centered, sky-blue label into the page reading
16897 \begin_inset Quotes eld
16900 <Invisible Text Follows>
16901 \begin_inset Quotes erd
16905 For paragraphs following this label, the parts of the
16913 ; it doesn't matter which] where they would be contain instead blank space.
16917 \begin_layout Standard
16922 , the corresponding centered label is
16923 \begin_inset Quotes eld
16926 <Visible Text Follows>
16927 \begin_inset Quotes erd
16931 Paragraphs following this label behave normally.
16932 Note that the beginning of a new
16944 automatically shuts off an
16949 It's therefore not necessary to use
16960 \begin_layout Standard
16961 By now, it should be obvious how to create overlay transparencies using
16962 the proper combination of
16981 \begin_layout Enumerate
16986 , including everything that will appear on it, whether on the main slide
16994 \begin_layout Enumerate
16995 Before each figure or paragraph that will appear only on the
17004 If necessary, insert a
17008 environment after the
17015 \begin_layout Enumerate
17020 immediately following the
17027 \begin_layout Enumerate
17028 Copy the contents of this
17039 \begin_layout Enumerate
17044 , change all of the
17055 \begin_layout Standard
17057 You've just made an
17064 \begin_layout Standard
17065 There's one problem with the way I've designed the LyX
17069 class: you can't make text in the middle of a paragraph invisible, nor
17070 make text in the middle of an invisible paragraph visible again.
17071 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17075 \begin_layout Plain Layout
17076 The commands of interest are:
17079 \begin_layout Itemize
17084 invisible \SpecialChar \ldots{}
17088 \begin_layout Itemize
17093 visible \SpecialChar \ldots{}
17097 \begin_layout Plain Layout
17098 \SpecialChar \ldots{}
17099 and need to be marked as TeX.
17101 \begin_inset Quotes eld
17105 \begin_inset Quotes erd
17108 you wish to change goes in between the brackets [and after the
17121 If you don't know how to mark text as TeX, see the appropriate section
17134 \begin_layout Subsubsection
17144 \begin_inset CommandInset label
17146 name "sec:slideNote"
17153 \begin_layout Standard
17162 is associated with a
17163 \begin_inset Quotes eld
17167 \begin_inset Quotes erd
17179 class provides visual cues.
17184 is shorter than that of a
17188 [yet longer than that of an
17192 ] and, like the label of an
17196 is shockingly magenta.
17197 Additionally, the printed
17201 has the page number of its
17202 \begin_inset Quotes eld
17206 \begin_inset Quotes erd
17214 \begin_inset Quotes eld
17222 \begin_inset Quotes erd
17226 \begin_inset Quotes eld
17234 \begin_inset Quotes erd
17238 \begin_inset Quotes eld
17246 \begin_inset Quotes erd
17250 You can have multiple
17254 s associated with a single
17266 , you'll probably want to break up long
17270 s so that they fit on a single sheet of paper.
17273 \begin_layout Standard
17278 is obvious: it contains anything additional you might want to say about
17284 It could also be used as a sheet of reminders for a particular
17289 In the case of the latter, you might want to make use of time markers.
17295 \begin_inset Quotes eld
17299 \begin_inset Quotes erd
17302 support for time markers, a
17307 So, you'll have to resort to using the LaTeX codes.
17310 \begin_layout Standard
17311 To use time markers, you'll need to specify the extra class option
17312 \begin_inset Quotes eld
17320 \begin_inset Quotes erd
17324 \begin_inset space ~
17328 \begin_inset CommandInset ref
17330 reference "sec:slidesetup"
17335 This option turns on timing marks, which will appear in the lower-left-hand
17341 To set what appears in the time marker, you use the LaTeX commands
17342 \begin_inset Quotes eld
17352 \begin_inset Quotes erd
17356 \begin_inset Quotes eld
17366 \begin_inset Quotes erd
17370 The arguments of both commands are time measured in seconds.
17372 \begin_inset Quotes eld
17382 \begin_inset Quotes erd
17385 sets the time marker to a given time.
17387 \begin_inset Quotes eld
17397 \begin_inset Quotes erd
17400 increments the time marker by the specified amount.
17401 Using time markers and
17405 s in this fashion, you can remind yourself how much time to spend on a particula
17413 \begin_layout Standard
17414 There's one last feature to describe.
17415 Clearly, you'd like to print out all of your
17423 s on transparencies while printing all of your
17440 with which it is associated.
17441 What's a person to do?
17444 \begin_layout Standard
17445 Luckily, there are two LaTeX commands that allow you to select what to print
17447 Both must be placed into the preamble of your document.
17449 \begin_inset Quotes eld
17461 \begin_inset Quotes erd
17464 will cause the output to contain only the
17473 Correspondingly, the command
17474 \begin_inset Quotes eld
17486 \begin_inset Quotes erd
17489 prevents the output of anything but
17494 I'd advise placing both commands in the preamble and initially comment
17496 You can then preview your entire presentation as you write.
17497 When you're done writing, you can then uncomment one of the two to select
17498 what you want to print.
17499 I like to uncomment
17500 \begin_inset Quotes eld
17512 \begin_inset Quotes erd
17515 , print to a file with
17516 \begin_inset Quotes eld
17524 \begin_inset Quotes erd
17527 in its name, comment it back out, then uncomment
17528 \begin_inset Quotes eld
17540 \begin_inset Quotes erd
17544 \begin_inset Quotes eld
17552 \begin_inset Quotes erd
17556 I can then send either file to a printer, loading transparencies or plain
17557 paper as appropriate.
17560 \begin_layout Standard
17561 You can also provide other arguments to the
17562 \begin_inset Quotes eld
17572 \begin_inset Quotes erd
17576 \begin_inset Quotes eld
17586 \begin_inset Quotes erd
17590 See a good LaTeX book for details.
17593 \begin_layout Subsection
17598 Class Template File
17601 \begin_layout Standard
17602 I have also provided a template file,
17603 \begin_inset Quotes eld
17611 \begin_inset Quotes erd
17619 To use it, begin your new presentation with
17624 ile\SpecialChar \menuseparator
17626 \begin_inset space ~
17630 \begin_inset space ~
17640 Your new LyX presentation file will contain an example
17661 additionally contain an example of the use of
17670 Lastly, the preamble will contain:
17673 \begin_layout LyX-Code
17674 % Uncomment to print out only slides and overlays
17677 \begin_layout LyX-Code
17681 \begin_layout LyX-Code
17687 \begin_inset Newline newline
17693 \begin_layout LyX-Code
17694 % Uncomment to print out only notes
17697 \begin_layout LyX-Code
17701 \begin_layout LyX-Code
17709 \begin_layout Standard
17710 One final thing: I created this class to support the LaTeX2e
17711 \begin_inset Quotes eld
17719 \begin_inset Quotes erd
17722 class, one of the built-in LaTeX2e classes.
17723 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17724 built-in slide class.
17725 It's here if you want it or need it.
17726 There exist other LaTeX2e classes for creating presentations, such as the
17732 \begin_inset space ~
17736 \begin_inset CommandInset ref
17738 reference "sec:foiltex"
17743 \begin_inset Quotes eld
17751 \begin_inset Quotes erd
17754 package [present on some TeX distributions].
17755 The latter is not yet supported under LyX.
17759 \begin_layout Plain Layout
17760 Perhaps you can take on the task\SpecialChar \ldots{}
17766 I know nothing about these other classes.
17767 Try them out to see what sort of alternative they provide.
17770 \begin_layout Chapter
17771 LyX Features needing Extra Software
17774 \begin_layout Section
17778 \begin_layout Standard
17784 \begin_layout Subsection
17788 \begin_layout Standard
17797 \begin_layout Plain Layout
17802 is not yet available when you are using the LaTeX distribution MiKTeX.
17807 , you'll find in the
17814 \begin_inset space ~
17825 \begin_inset CommandInset href
17827 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17834 \begin_layout Standard
17839 package is a program that was written by
17840 \begin_inset Flex Noun
17843 \begin_layout Plain Layout
17845 \begin_inset space ~
17853 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17854 and easy to forget.
17855 The program runs over your LaTeX file, checks the integrity of the file,
17856 and flags some common errors.
17857 In other technical words, it is
17864 \begin_layout Standard
17865 Well, what is a syntax checker doing in LyX which is supposed to produce
17866 correct LaTeX anyways? The answer is simple: Just as
17870 not only checks the
17874 of C programs, but also does
17878 checks for type-errors,
17882 catches some common
17886 errors, in addition to the syntactical ones.
17891 is capable of detecting several common errors, such as
17894 \begin_layout Itemize
17895 Ellipsis detection:
17896 \begin_inset Newline newline
17899 Use \SpecialChar \ldots{}
17903 \begin_layout Itemize
17904 No space in front of/after parenthesis:
17905 \begin_inset Newline newline
17911 \begin_layout Itemize
17912 Enforcement of normal space after common abbreviations:
17913 \begin_inset Newline newline
17917 \begin_inset space \thinspace{}
17921 \begin_inset space \space{}
17924 is too wide spacing.
17927 \begin_layout Itemize
17928 Enforcement of end-of-sentence space when the last sentence ends with a
17930 \begin_inset Newline newline
17934 And this is wrong spacing.
17937 \begin_layout Itemize
17938 Space in front of labels and similar commands:
17939 \begin_inset Newline newline
17942 The label should stick right up to the text to avoid falling to a wrong
17945 \begin_inset CommandInset label
17955 \begin_layout Plain Layout
17956 This footnote is in danger of falling off to a wrong page
17961 The label is separated too much.
17964 \begin_layout Itemize
17965 Space in front of references, instead of hard spaces:
17966 \begin_inset Newline newline
17969 In you are in bad luck, the text will break right between the referenced
17970 text and reference number, and that's a pity.
17972 \begin_inset CommandInset ref
17974 reference "sec:chktex"
17981 \begin_layout Itemize
17983 \begin_inset Quotes eld
17987 \begin_inset Quotes erd
17991 \begin_inset Formula $\times$
17995 \begin_inset Newline newline
17998 2x2 looks cheap compared to
17999 \begin_inset Formula $2\times2$
18005 \begin_layout Standard
18006 and more \SpecialChar \ldots{}
18007 It is an invaluable tool when you are
18008 \begin_inset Quotes eld
18012 \begin_inset Quotes erd
18015 your document before printing, and you should run it right after the obligatory
18016 spelling check, and before you go fine tuning the typesetting.
18019 \begin_layout Subsection
18023 \begin_layout Standard
18024 If you have the program installed, usage is as simple as choosing
18026 Tools\SpecialChar \menuseparator
18028 \begin_inset space ~
18034 This will make LyX generate a LaTeX file of your document, start
18038 to check it, and then make LyX insert
18039 \begin_inset Quotes eld
18043 \begin_inset Quotes erd
18046 with the warnings from
18050 , if there were any.
18051 The warnings will be placed close to the point of the mistake, and you
18052 can quickly find them by using the
18054 Navigate\SpecialChar \menuseparator
18057 menu item, or the shortcut key
18066 Open the error boxes by clicking on them with the mouse, or use the shortcut
18075 bindings, or the corresponding
18084 Read the warning and correct the mistake, if it is a mistake.
18085 If you have trouble understanding what the warning is about, you can safely
18087 Remember that there is a hidden layer between the document on screen and
18088 the technical details in invoking
18092 , and this gap can make some warnings seem arcane or just right down plain
18096 \begin_layout Standard
18097 This document is an excellent testing bed for the feature, and it should
18098 provide quite a few warnings for you to fiddle with.
18099 Since computers are only so smart, expect most of the warnings to be false
18103 \begin_layout Subsection
18104 How to fine tune it
18107 \begin_layout Standard
18108 Sometimes, you'll find that
18112 makes more noise than suits your mood.
18113 Then you can choose not to use it, wait until your mood changes, or try
18118 to get better along with you.
18121 \begin_layout Standard
18130 very configurable and extensible, you shouldn't expect to solve all problems
18136 Since LyX has to generate a somewhat special LaTeX file to be able to match
18137 the line numbers from the
18145 \begin_layout Plain Layout
18146 You can inspect the specific output from
18152 Edit\SpecialChar \menuseparator
18154 \begin_inset space ~
18158 \begin_inset space ~
18172 to the internal document structure, some of the warnings will not seen
18173 to appear correctly.
18174 There are two things you can do about this:
18177 \begin_layout Itemize
18182 invocation command line in
18198 installation configuration file (usually with the file
18203 See below to learn what warnings can be enabled and disabled on the command
18208 \begin_layout Itemize
18209 Export your document as a raw LaTeX file using
18211 File\SpecialChar \menuseparator
18212 Export\SpecialChar \menuseparator
18220 Invoked in this way, it can be a hassle to find the corresponding place
18221 in the document inside LyX, but with a little patience, you should be able
18225 \begin_layout Standard
18226 Here follows the warning messages that can be enabled and disabled in
18235 to disable a warning, and
18239 to enable a warning.
18240 The emphasized entries are disabled by default, because the default is
18243 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18248 \begin_layout Standard
18249 Notice that you should only use the options that enable and disable warnings,
18250 because LyX relies on some of the other command line parameters to be set
18251 in a specific way to have a chance to communicate with
18258 \begin_layout Enumerate
18262 Command terminated with space.
18265 \begin_layout Enumerate
18268 Non-breaking space (
18269 \begin_inset Quotes eld
18277 \begin_inset Quotes erd
18280 ) should have been used.
18283 \begin_layout Enumerate
18287 You should enclose the previous parenthesis with
18288 \begin_inset Quotes eld
18296 \begin_inset Quotes erd
18302 \begin_layout Enumerate
18305 Italic correction (
18306 \begin_inset Quotes eld
18316 \begin_inset Quotes erd
18319 ) found in non-italic buffer.
18322 \begin_layout Enumerate
18325 Italic correction (
18326 \begin_inset Quotes eld
18336 \begin_inset Quotes erd
18339 ) found more than once.
18342 \begin_layout Enumerate
18346 No italic correction (
18347 \begin_inset Quotes eld
18357 \begin_inset Quotes erd
18363 \begin_layout Enumerate
18367 \begin_inset Quotes eld
18375 \begin_inset Quotes erd
18379 \begin_inset Quotes eld
18387 \begin_inset Quotes erd
18393 \begin_layout Enumerate
18396 Wrong length of dash may have been used.
18399 \begin_layout Enumerate
18403 \begin_inset Quotes eld
18411 \begin_inset Quotes erd
18415 \begin_inset Quotes eld
18423 \begin_inset Quotes erd
18429 \begin_layout Enumerate
18433 \begin_inset Quotes eld
18441 \begin_inset Quotes erd
18447 \begin_layout Enumerate
18451 \begin_inset Quotes eld
18459 \begin_inset Quotes erd
18462 to achieve an ellipsis.
18465 \begin_layout Enumerate
18468 Inter-word spacing (
18469 \begin_inset Quotes eld
18479 \begin_inset Quotes eld
18482 ) should perhaps be used.
18485 \begin_layout Enumerate
18488 Inter-sentence spacing (
18489 \begin_inset Quotes eld
18499 \begin_inset Quotes erd
18502 ) should perhaps be used.
18505 \begin_layout Enumerate
18508 Could not find argument for command.
18511 \begin_layout Enumerate
18515 \begin_inset Quotes eld
18523 \begin_inset Quotes erd
18529 \begin_layout Enumerate
18532 Math mode still on at end of LaTeX file.
18535 \begin_layout Enumerate
18539 \begin_inset Quotes eld
18547 \begin_inset Quotes erd
18550 doesn't match the number of
18551 \begin_inset Quotes eld
18559 \begin_inset Quotes erd
18565 \begin_layout Enumerate
18568 You should use either
18571 \begin_inset Quotes eld
18579 \begin_inset Quotes erd
18584 as an alternative to
18585 \begin_inset Quotes eld
18593 \begin_inset Quotes erd
18599 \begin_layout Enumerate
18606 " (ASCII 39) instead of "
18613 \begin_layout Enumerate
18616 User-specified pattern found.
18619 \begin_layout Enumerate
18622 This command might not be intended.
18625 \begin_layout Enumerate
18632 \begin_layout Enumerate
18650 \begin_layout Enumerate
18653 Delete this space to maintain correct page references.
18656 \begin_layout Enumerate
18660 You might wish to put this between a pair of
18661 \begin_inset Quotes eld
18669 \begin_inset Quotes erd
18675 \begin_layout Enumerate
18678 You ought to remove spaces in front of punctuation.
18681 \begin_layout Enumerate
18684 Could not execute LaTeX command.
18687 \begin_layout Enumerate
18696 in front of small punctuation.
18699 \begin_layout Enumerate
18707 may look prettier here.
18710 \begin_layout Enumerate
18714 Multiple spaces detected in output.
18717 \begin_layout Enumerate
18720 This text may be ignored.
18723 \begin_layout Enumerate
18729 \begin_inset Quotes eld
18734 to begin quotation, not
18741 \begin_layout Enumerate
18748 to end quotation, not
18751 \begin_inset Quotes eld
18759 \begin_layout Enumerate
18765 \begin_layout Enumerate
18768 You should perhaps use
18769 \begin_inset Quotes eld
18777 \begin_inset Quotes erd
18783 \begin_layout Enumerate
18786 You should put a space in front of/after parenthesis.
18789 \begin_layout Enumerate
18792 You should avoid spaces in front of/after parenthesis.
18795 \begin_layout Enumerate
18799 You should not use punctuation in front of/after quotes.
18802 \begin_layout Enumerate
18805 Double space found.
18808 \begin_layout Enumerate
18811 You should put punctuation outside inner/inside display math mode.
18814 \begin_layout Enumerate
18817 You ought to not use primitive TeX in LaTeX code.
18820 \begin_layout Enumerate
18823 You should remove spaces in front of
18824 \begin_inset Quotes eld
18832 \begin_inset Quotes erd
18838 \begin_layout Enumerate
18841 \begin_inset Quotes eld
18849 \begin_inset Quotes erd
18852 is normally not followed by
18853 \begin_inset Quotes eld
18861 \begin_inset Quotes erd
18867 \begin_layout Standard
18868 In later versions of LyX, we hope to provide a more complete interface to
18869 this tool (and it's smaller cousin
18873 ) to exploit the full power of it.
18874 But it's not exactly useless as it is now: go try it on one of your existing
18875 documents of a certain length and be surprised.
18878 \begin_layout Section
18879 Version Control in LyX
18882 \begin_layout Standard
18885 Lars Gullik Bjønnes
18892 \begin_layout Subsection
18896 \begin_layout Standard
18897 A friend of mine wanted to try LyX for a group project.
18898 When he didn't find support for version control or file locking, he dropped
18900 This angered me a bit, so I thought that I should at least make support
18901 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18902 This has been done.
18903 LyX now supports some of the most basic RCS/CVS/SVN commands.
18904 If you need something a bit more sophisticated you will have to do that
18905 manually in a terminal.
18908 \begin_layout Standard
18909 Also note that CVS support is not as good as subversion support so we advice
18911 Good place to start with Subversion is SVN Book
18915 \begin_layout Plain Layout
18916 \begin_inset CommandInset href
18918 target "http://svnbook.red-bean.com/"
18928 In case of RCS you should read
18929 \begin_inset Quotes eld
18933 \begin_inset Quotes erd
18936 (a man file, read it with
18941 This file describes all the basic features of RCS.
18942 You should especially notice the comment about a RCS directory, and the
18943 notion of a master RCS file (the file ending in
18950 \begin_layout Standard
18951 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18952 package—no guarantees are made for older versions.
18953 Most of the log messages are not currently displayed after operations —
18954 you can check them in Messages pane if unsure.
18957 \begin_layout Standard
18958 For introducing your own external commands consult vc-command in the manual
18962 \begin_layout Subsection
18963 RCS commands in LyX
18966 \begin_layout Standard
18967 The following sections describe the RCS commands supported by LyX.
18968 You can find them in the
18970 File\SpecialChar \menuseparator
18972 \begin_inset space ~
18978 LyX was tested against RCS 5.7.
18981 \begin_layout Subsubsection
18987 \begin_layout Standard
18988 If your document is not under revision control, this is the only item shown
18990 And if it is under revision control, the
18994 item is not visible.
18998 \begin_layout Standard
18999 This command registers your document with RCS (unless you are under the
19000 directory managed by CVS)\SpecialChar \@.
19001 You are asked interactively to supply an initial
19002 description of the document.
19003 The document is now set in Read-Only mode and you have to
19006 \begin_inset space ~
19010 \begin_inset space ~
19014 \begin_inset space ~
19019 , before making any changes to it.
19020 A document under revision control has a
19021 \begin_inset Quotes eld
19024 [RCS:<version> <locker>]
19025 \begin_inset Quotes erd
19028 item tagged to the filename in the minibuffer.
19031 \begin_layout Standard
19032 RCS command that is run:
19034 ci -q -u -i -t-"<initial description>" <file-name>
19037 \begin_layout Standard
19042 to understand the switches.
19046 \begin_layout Subsubsection
19052 \begin_layout Standard
19053 When you are finished editing a file, you check in your changes.
19054 When you do this, you are asked for a description of the changes.
19055 This is stored in the history log.
19056 The version number is bumped, your changes are applied to the master RCS
19057 file, the document is unlocked and set to Read-Only mode.
19061 \begin_layout Standard
19064 ci -q -u -m"<description>" <file-name>
19067 \begin_layout Subsubsection
19073 \begin_layout Standard
19074 By doing this you lock the document so that only you can edit it.
19075 This will also make the document Read-Write only for you.
19076 You will usually continue editing for a while and when you are finished
19077 you check in your changes.
19078 The status line is changed to reflect that you have locked the file.
19082 \begin_layout Standard
19085 co -q -l <file-name>
19088 \begin_layout Subsubsection
19091 Revert To Repository Version
19094 \begin_layout Standard
19095 This will discard all changes made to the document since the last check
19097 You get a warning before changes are discarded.
19100 \begin_layout Standard
19103 co -f -u<version> <file-name>
19106 \begin_layout Subsubsection
19112 \begin_layout Standard
19113 This makes as if the last check in never happened.
19114 No changes are made to the document loaded into LyX, but the last version
19115 is removed from the master RCS file.
19119 \begin_layout Standard
19122 rcs -o<version> <file-name>
19125 \begin_layout Subsubsection
19131 \begin_layout Standard
19132 This shows the complete history of the RCS document.
19137 is shown in a browser.
19145 \begin_layout Subsubsection
19149 \begin_layout Standard
19150 LyX supports RCS version number, author name, date and time of last commit.
19151 All those are extracted from
19153 rlog -r <file-name>
19156 For other details see
19157 \begin_inset CommandInset ref
19159 reference "sub:VCS-Revision-Information"
19166 \begin_layout Subsection
19167 CVS commands in LyX
19170 \begin_layout Standard
19171 A subset of CVS operations is supported by LyX.
19172 You can find the commands in the
19174 File\SpecialChar \menuseparator
19176 \begin_inset space ~
19182 The version control system SVN is more powerful, so please use it instead
19183 of CVS if possible.
19186 \begin_layout Subsubsection
19192 \begin_layout Standard
19193 If you start from scratch with CVS you have to create your repository and
19194 checkout the working copy with external tools.
19195 If you're using a client-server setup you may need to login before doing
19196 the first repository checkout.
19199 \begin_layout Standard
19200 If your documents are under revision control and others are using the same
19201 repository problems arise when different changes to the same document at
19202 the same location happen.
19203 Standard CVS repositories doesn't operate with a file locking mechanism.
19204 This may be surprising, but conflicts only occur if people disagree on
19205 the proper content of the same part of a document.
19206 So, if co-workers are used to communicate regularly, these conflicts occur
19208 If they don't communicate they have a fundamental problem anyway.
19209 Nevertheless some people like to work with so called
19210 \begin_inset Quotes eld
19214 \begin_inset Quotes erd
19218 If they do so the working copy of all files is readonly when checked out
19219 first and the user starts editing after using a special command to make
19220 the working copy writable.
19221 When the changes are checked in the working copy returns to readonly state.
19222 With LyX one has to edit the
19223 \begin_inset Flex Code
19226 \begin_layout Plain Layout
19232 file and add the line
19233 \begin_inset Flex Code
19236 \begin_layout Plain Layout
19242 to work with reserved checkouts.
19243 The benefit is the possibility to see who is using a writable copy of some
19245 It's not guaranteed only one user makes a copy writable.
19248 \begin_layout Standard
19249 LyX tries to guess if you're using reserved or non-reserved checkouts.
19250 If your working copy is readonly or it is writable and an additional copy
19251 of your document exists in the CVS/Base sub-directory a reserved otherwise
19252 a non-reserved checkout is assumed.
19253 When a reserved checkout is detected you have to use
19254 \begin_inset Flex MenuItem
19257 \begin_layout Plain Layout
19263 to make your working copy writable if it's readonly.
19265 \begin_inset Flex MenuItem
19268 \begin_layout Plain Layout
19274 operation is possible and that makes your working copy readonly again after
19275 transferring your changes to the repository.
19278 \begin_layout Standard
19279 More information about CVS can be found here
19280 \begin_inset Flex URL
19283 \begin_layout Plain Layout
19285 http://www.nongnu.org/cvs
19291 \begin_inset Flex URL
19294 \begin_layout Plain Layout
19296 http://ximbiot.com/cvs
19304 \begin_layout Standard
19309 to understand the sub-commands and the switches mentioned below.
19312 \begin_layout Subsubsection
19318 \begin_layout Standard
19319 If your document is not under revision control, this is the only item shown
19321 And if it is under revision control, the
19328 item is not visible.
19332 \begin_layout Standard
19333 This command registers in CVS your document
19334 \begin_inset Flex Strong
19337 \begin_layout Plain Layout
19345 in case you have already the documents directory under CVS control (in
19351 This means you have to create or checkout the archive by yourself using
19353 (In case you forget that step LyX registers the document with RCS.)
19356 \begin_layout Standard
19357 Then you are asked interactively to supply an initial description of the
19359 Don't forget that registered file is not yet checked in.
19362 \begin_layout Standard
19363 CVS command that is run:
19365 cvs -q add -m"<entered message>" "<file-name>"
19368 \begin_layout Standard
19373 above and for all other CVS commands is an abbreviation for
19374 \begin_inset Quotes eld
19377 change the current working directory to file location and use the file name
19378 without path component as argument
19379 \begin_inset Quotes erd
19385 \begin_layout Subsubsection
19391 \begin_layout Standard
19392 When you are finished editing a file, you commit your changes.
19393 When you do this and you had changed the document, you are asked for a
19394 description of the changes.
19395 After that changes are written to the repository.
19396 In case you didn't change the document and a reserved checkout is detected
19397 the reservation made on
19398 \begin_inset Flex MenuItem
19401 \begin_layout Plain Layout
19410 \begin_layout Labeling
19411 \labelwidthstring 00.00.0000
19413 \begin_inset space ~
19417 \begin_inset space ~
19421 \begin_inset Newline newline
19425 \begin_inset Flex Code
19428 \begin_layout Plain Layout
19431 -q commit -m"<description>" "<file-name>"
19437 \begin_inset Newline newline
19441 \begin_inset Flex Code
19444 \begin_layout Plain Layout
19455 \begin_layout Subsubsection
19461 \begin_layout Standard
19462 When you are sharing a repository with others, you may have to incorporate
19463 their changes into your working copy.
19466 \begin_layout Standard
19469 cvs -q update "<file-name>"
19472 \begin_layout Standard
19473 If a readonly checkout is detected the working copy is made writable and
19477 \begin_layout Standard
19480 cvs -q edit "<file-name>"
19483 \begin_layout Subsubsection
19486 Revert To Repository Version
19489 \begin_layout Standard
19490 This will discard all changes made to the document since the last check
19492 You get a warning before changes are discarded.
19493 Firstly the file is deleted, secondly CVS update command is run.
19496 \begin_layout Standard
19499 cvs -q update "<file-name>"
19502 \begin_layout Standard
19503 If a reserved checkout is detected and the working copy has no changes only
19504 the reservation is undone.
19507 \begin_layout Standard
19510 cvs -q unedit "<file-name>"
19513 \begin_layout Subsubsection
19514 Update of the local directory checkout from repository
19517 \begin_layout Standard
19518 Once your documents gets more complex, containing sub-documents and pictures,
19520 \begin_inset Flex Code
19523 \begin_layout Plain Layout
19529 files and so on using version control becomes more complicated.
19530 LyX supports updating the whole tree in which resides the document.
19531 This become especially useful once you cooperate with people which neither
19532 have detailed knowledge about CVS usage nor they have ambition to commit
19533 additional material to the repository.
19534 You have to organize the files structure so that all external files are
19535 in the same directory or subdirectories of the document.
19536 It's good practice anyway to store multipart documents in an extra directory.
19539 \begin_layout Standard
19541 \begin_inset Flex Code
19544 \begin_layout Plain Layout
19545 Update local directory from repository
19550 command updates the whole directory.
19551 If local changes are detected user is warned before update starts.
19552 In case of merge conflicts both versions of the conflicting document parts
19553 are placed in the final document.
19554 You have to review and correct the result of the merge.
19555 You'll find the conflicts enclosed in pairs of
19556 \begin_inset Flex Code
19559 \begin_layout Plain Layout
19566 \begin_inset Flex Code
19569 \begin_layout Plain Layout
19576 \begin_inset Flex Code
19579 \begin_layout Plain Layout
19586 The first part is your version as before the update operation with the
19587 document name prepended.
19588 The second one is the repository version with the version number after
19590 \begin_inset Flex Code
19593 \begin_layout Plain Layout
19602 \begin_layout Labeling
19603 \labelwidthstring 00.00.0000
19605 \begin_inset space ~
19609 \begin_inset space ~
19613 \begin_inset Newline newline
19617 \begin_inset Flex Code
19620 \begin_layout Plain Layout
19628 (Ask if changes are detected.)
19629 \begin_inset Newline newline
19633 \begin_inset Flex Code
19636 \begin_layout Plain Layout
19637 cd $path; cvs -q update
19647 \begin_layout Standard
19649 \begin_inset Flex Code
19652 \begin_layout Plain Layout
19658 stands for the path to the document.
19661 \begin_layout Subsubsection
19667 \begin_layout Standard
19668 This shows the complete history of the CVS document.
19671 cvs log "<file-name>"
19673 is shown in a browser.
19676 \begin_layout Subsection
19677 SVN commands in LyX
19680 \begin_layout Standard
19681 SVN is now partially supported by LyX.
19682 You can find the commands in the
19684 File\SpecialChar \menuseparator
19686 \begin_inset space ~
19692 Please note that if you use password protected access to repository via
19693 ssh, you will be asked in terminal window.
19694 LyX was tested against SVN 1.5 and 1.6
19698 \begin_layout Plain Layout
19699 Most of the commands will work with 1.4 too, see
19700 \begin_inset CommandInset ref
19702 reference "sub:SVN-Repo-Update"
19714 \begin_layout Subsubsection
19720 \begin_layout Standard
19721 If your document is not under revision control, this is the only item shown
19723 And if it is under revision control, the
19730 item is not visible.
19734 \begin_layout Standard
19735 This command registers in SVN your document ONLY in case you have already
19736 the documents directory under SVN control (in particular
19741 This means you have to checkout the archive by yourself.
19745 \begin_layout Standard
19746 Then you are asked interactively to supply an initial description of the
19748 Don't forget that registered file is not yet commited.
19751 \begin_layout Standard
19752 SVN command that is run:
19755 \begin_inset Quotes eld
19759 \begin_inset Quotes erd
19765 \begin_layout Standard
19770 to understand the switches.
19774 \begin_layout Subsubsection
19780 \begin_layout Standard
19781 When you are finished editing a file, you commit your changes.
19782 When you do this, you are asked for a description of the changes.
19783 After that changes are commited.
19786 \begin_layout Standard
19791 \begin_layout Plain Layout
19792 In case locking is not enabled.
19794 \begin_inset CommandInset ref
19796 reference "subsec:SVN-File-Locking"
19807 svn commit -q -m"<description>" <file-name>
19810 \begin_layout Subsubsection
19816 \begin_layout Standard
19817 Updates the changes of this file from the repository.
19818 Be sure you understand SVN merging and conflicts resolving before using
19819 this function, because all conflicts has to be resolved manually by you!
19822 \begin_layout Standard
19827 \begin_layout Plain Layout
19835 svn update --non-interactive
19836 \begin_inset Quotes eld
19840 \begin_inset Quotes erd
19846 \begin_layout Subsubsection
19849 Revert To Repository Version
19852 \begin_layout Standard
19853 This will discard all changes made to the document since the last check
19855 You get a warning before changes are discarded.
19859 \begin_layout Standard
19863 \begin_inset Quotes eld
19867 \begin_inset Quotes erd
19873 \begin_layout Subsubsection
19874 \begin_inset CommandInset label
19876 name "sub:SVN-Repo-Update"
19880 Update of the local directory checkout from repository
19884 \begin_layout Plain Layout
19885 Note that this command will work only with subversion
19886 \begin_inset Formula $\geqq1.5$
19897 \begin_layout Standard
19898 All the commands above have one shortcomming - they deal with the current
19900 Once your document contains pictures, includes external
19901 \begin_inset Flex Code
19904 \begin_layout Plain Layout
19910 files and so on administration becomes more complicated.
19911 LyX now supports updating the whole tree in which resides the document
19915 \begin_layout Plain Layout
19916 One need to organize the files structure so that all external files are
19917 in the same directory or subdirectories of the document.
19924 This become especially useful once you cooperate with people which neither
19925 know about subversion management nor they have ambition to commit additional
19926 material to the repository.
19930 \begin_layout Standard
19931 \begin_inset Flex Code
19934 \begin_layout Plain Layout
19935 Update local directory from repository
19940 command updates the whole directory and in case of merge conflicts local
19941 version of the files are left, so no unintended data loss occurs.
19942 If local changes are detected user is warned before update starts.
19945 \begin_layout Labeling
19946 \labelwidthstring 00.00.0000
19948 \begin_inset space ~
19952 \begin_inset space ~
19956 \begin_inset Newline newline
19960 \begin_inset Flex Code
19963 \begin_layout Plain Layout
19969 (Ask if changes are detected.)
19970 \begin_inset Newline newline
19974 \begin_inset Flex Code
19977 \begin_layout Plain Layout
19978 svn update --accept mine-full $path
19986 \begin_layout Standard
19988 \begin_inset Flex Code
19991 \begin_layout Plain Layout
19997 stands for the path to the document.
20000 \begin_layout Subsubsection
20006 \begin_layout Standard
20007 This shows the complete history of the SVN document.
20011 \begin_inset Quotes eld
20015 \begin_inset Quotes erd
20020 is shown in a browser.
20023 \begin_layout Subsubsection
20025 \begin_inset CommandInset label
20027 name "subsec:SVN-File-Locking"
20034 \begin_layout Standard
20035 The file exchange through various revision control systems brings the problem
20036 of merge conflicts in case two different users try to edit the same (parts
20038 When such a conflict happens it needs manual resolving and one reasonable
20039 alternative is to provide some kind of locking mechanism, which guarantees
20040 that only one user is allowed to edit file at the given time.
20043 \begin_layout Standard
20044 SVN has two such mechanisms to provide mutual exclusivity for file access
20045 - locks and automatic setting of write permissions (see sec.
20047 \begin_inset CommandInset ref
20049 reference "subsec:Automatical-Locking-Property"
20054 \begin_inset Flex Code
20057 \begin_layout Plain Layout
20067 \begin_layout Plain Layout
20068 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20074 If this property is detected for a given document LyX starts to use SVN
20075 locks for document editing automatically and the whole check-in/out mechanism
20076 switches to the same regimen as for RCS.
20077 This in particular means there are two different modes of file use in LyX:
20080 \begin_layout Itemize
20082 The loaded file is in the read-only mode.
20083 For editing on needs to check-out.
20088 consists of updating from the repository and gaining write lock.
20089 If the lock is not possible to obtain, we remain in unlocked state.
20092 \begin_layout Itemize
20094 The loaded file is in the 'normal' edit mode.
20095 No other user is allowed to edit the file.
20100 consists of commiting changes and releasing write-lock.
20101 If no changes have been made to the document, no commit will be produced
20105 \begin_layout Plain Layout
20106 Don't be puzzled by the fact that you will be asked for commit message anyway.
20111 and only the write-lock will be released.
20114 \begin_layout Standard
20118 \begin_layout Labeling
20119 \labelwidthstring 00.00.0000
20122 svn commit -q -m"<description>" "<file-name>"
20123 \begin_inset Newline newline
20126 svn unlock "<file-name>"
20129 \begin_layout Labeling
20130 \labelwidthstring 00.00.0000
20133 svn update "<file-name>"
20134 \begin_inset Newline newline
20137 svn lock "<file-name>"
20140 \begin_layout Subsubsection
20143 \begin_inset CommandInset label
20145 name "subsec:Automatical-Locking-Property"
20151 Automatic Locking Property
20154 \begin_layout Standard
20155 The above mentioned automatic setting of write permissions of the .lyx file
20161 ile\SpecialChar \menuseparator
20167 \begin_inset space ~
20170 Control\SpecialChar \menuseparator
20175 oggle locking property
20178 This command is active only when the file is not locked on the svn server
20180 you need to check-out before proceeding).
20183 \begin_layout Labeling
20184 \labelwidthstring 00.00.0000
20186 \begin_inset space ~
20192 \begin_layout Labeling
20193 \labelwidthstring 00.00.0000
20196 svn propset svn:needs-lock ON "<file-name>"
20199 \begin_layout Labeling
20200 \labelwidthstring 00.00.0000
20203 svn propdel svn:needs-lock "<file-name>"
20206 \begin_layout Subsubsection
20207 \begin_inset CommandInset label
20209 name "sub:VCS-Revision-Information"
20213 Revision Information in Documents
20216 \begin_layout Standard
20217 There are more possibilities how to activate revision information in our
20221 \begin_layout Itemize
20222 LyX supports directly:
20226 \begin_layout Itemize
20227 tree revision information (
20228 \begin_inset Flex Code
20231 \begin_layout Plain Layout
20238 The result is the output of the
20239 \begin_inset Flex Code
20242 \begin_layout Plain Layout
20248 command, the following table gives you an idea, how to read the results.
20251 \begin_layout Standard
20253 \begin_inset Tabular
20254 <lyxtabular version="3" rows="6" columns="2">
20255 <features tabularvalignment="middle">
20256 <column alignment="center" valignment="top" width="0">
20257 <column alignment="center" valignment="top" width="0">
20259 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20262 \begin_layout Plain Layout
20268 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20271 \begin_layout Plain Layout
20279 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20282 \begin_layout Plain Layout
20288 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20291 \begin_layout Plain Layout
20292 mixed revision working copy
20299 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20302 \begin_layout Plain Layout
20308 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20311 \begin_layout Plain Layout
20312 modified working copy
20319 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20322 \begin_layout Plain Layout
20328 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20331 \begin_layout Plain Layout
20332 switched working copy
20339 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20342 \begin_layout Plain Layout
20348 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20351 \begin_layout Plain Layout
20352 partial working copy, from a sparse checkout
20359 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20362 \begin_layout Plain Layout
20368 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20371 \begin_layout Plain Layout
20372 mixed revision, modified, switched working copy
20385 \begin_layout Itemize
20386 file revision information.
20387 The result comes from parsing the output of
20388 \begin_inset Flex Code
20391 \begin_layout Plain Layout
20393 \begin_inset space ~
20397 \begin_inset space ~
20401 \begin_inset space ~
20410 Supported flags are:
20414 \begin_layout Itemize
20415 version number of the last commit (
20416 \begin_inset Flex Code
20419 \begin_layout Plain Layout
20428 \begin_layout Itemize
20429 author of the last commit (
20430 \begin_inset Flex Code
20433 \begin_layout Plain Layout
20442 \begin_layout Itemize
20443 date of the last commit (
20444 \begin_inset Flex Code
20447 \begin_layout Plain Layout
20456 \begin_layout Itemize
20457 time of the last commit (
20458 \begin_inset Flex Code
20461 \begin_layout Plain Layout
20471 \begin_layout Standard
20472 You can obtain this info via InsetInfo (e.g.
20474 \begin_inset Flex Code
20477 \begin_layout Plain Layout
20478 info-insert buffer vcs-date
20484 The information will be available only when you have the file stored under
20485 svn managment (i.e.
20487 \begin_inset Flex Code
20490 \begin_layout Plain Layout
20496 directory is available with your document).
20500 \begin_layout Itemize
20501 Another---a hacking one---possibility is to use svn keywords
20505 \begin_layout Plain Layout
20506 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20512 In short -- you set file keywords property (e.g.
20515 svn propset svn:keywords 'Rev' file.lyx
20517 ) and then paste keyword TeX code
20521 \begin_layout Plain Layout
20522 This is an easy way how to ensure that LyX won't break the line in the middle
20528 tag in your document (e.g.
20533 \begin_layout Plain Layout
20541 This way svn client will automatically substitute revision number (e.g.
20546 \begin_layout Plain Layout
20553 ) after each update and commit.
20554 There are more problems with this approach.
20555 Firstly, the '$' character is used in TeX world for math equations, so
20556 any occurence of math formula
20557 \begin_inset Formula $Rev$
20561 \begin_inset Formula $Rev:59$
20564 in your LyX document.
20565 Similarly for other keywords like Id, Date, Author, etc.
20566 Secondly svn output is dependent on your locales, so its very easy that
20567 svn would produce some problematic strings once Date is used.
20568 Thirdly you get the whole 'Rev: 59' string in your document instead of
20570 Until subversion implements user's custom keywords it will be hard to use
20571 this approach reliably or let LyX to support it directly.
20574 \begin_layout Subsection
20575 SVN and Windows Environment
20578 \begin_layout Quote
20579 My inclination is to say that if the user cannot figure out the command
20580 line operations on their own fairly quickly, they would be well advised
20581 to use TortoiseSVN.
20587 \begin_layout Subsubsection
20591 \begin_layout Standard
20592 In addition to installing LyX, and having access to a Subversion repository,
20593 the user will need to install the Subversion client program.
20594 A Windows installer for the client program is available from
20595 \begin_inset CommandInset href
20598 target "http://www.collab.net/nonav/downloads/subversion/"
20603 The user may also want to install
20604 \begin_inset CommandInset href
20607 target "http://tortoisesvn.tigris.org/"
20611 , which integrates Subversion operations into the context (rightclick) menu
20612 of Windows Explorer.
20613 Operations done outside LyX will typically be more convenient using the
20614 Explorer context menu.
20615 Note that TortoiseSVN is not a replacement for the client program, which
20616 is what LyX itself will use.
20619 \begin_layout Subsubsection
20620 Bringing a document under Subversion control
20623 \begin_layout Standard
20624 Before a LyX document can be brought under version control in Subversion,
20625 its parent directory needs to be under version control.
20626 If the document is being added to a project already in the repository,
20627 this is accomplished by checking the project out to the directory where
20628 the new document will be placed.
20629 If the project itself is not yet under version control (for instance, if
20630 this document starts a new project), the directory must be imported into
20632 This is done outside LyX.
20633 Both import and checkout are easily accomplished from the Explorer context
20634 menu using TortoiseSVN, or alternatively can be done using the command
20635 line client at a DOS prompt.
20636 The procedure for importing the project using TortoiseSVN is described
20637 below, assuming an existing repository and a new project being started
20645 For information on using the Subversion client program, run
20652 \begin_layout Enumerate
20659 in Windows Explorer, right click it, and select
20661 TortoiseSVN > Repo-browser
20664 If necessary, adjust the URL for the repository, then click OK.
20667 \begin_layout Enumerate
20668 Right click the level of the repository under which you want to place the
20669 new project folder (typically the top level) and click
20671 Create folder\SpecialChar \ldots{}
20674 Supply a name for the project folder and click OK.
20675 Add a message for the log file if desired, then click OK again.
20676 The new project folder should appear in the repository.
20677 Finally, click OK again to exit the repository browser.
20680 \begin_layout Enumerate
20681 Once again right click
20687 , this time selecting SVN Checkout\SpecialChar \ldots{}
20688 Select the URL of the project folder
20689 you just created in the repository, and set the checkout directory to
20697 You will be warned about a non-empty folder; click OK to proceed.
20698 You should now have a
20709 \begin_layout Enumerate
20710 Create or open your document in LyX and click
20715 ile\SpecialChar \menuseparator
20721 \begin_inset space ~
20724 Control\SpecialChar \menuseparator
20732 Add a log message and click OK to commit the document to version control.
20735 \begin_layout Standard
20736 From this point onward, you should have full functionality in the
20741 ile\SpecialChar \menuseparator
20747 \begin_inset space ~
20753 You also have the option of checking the document in and out, viewing its
20755 using the TortoiseSVN context menu in Windows Explorer or the Subversion
20756 client program from a command prompt.
20759 \begin_layout Subsubsection
20760 SSH tunnel used with SVN under Windows
20763 \begin_layout Standard
20764 Compared with Linux setting up svn client to communicate over ssh under
20765 Windows is a rather troublesome task.
20766 We will at least offer some hints how to setup the client side but prior
20767 knowledge about ssh and the Windows command line is needed, also be prepared
20768 for a great deal of frustration\SpecialChar \ldots{}
20772 \begin_layout Enumerate
20773 Get a svn client for windows, as described in the previous sections.
20774 When it is a fresh install run some svn command (e.g.
20776 \begin_inset Flex Code
20779 \begin_layout Plain Layout
20785 ) to create config files, which you will need to change later on.
20788 \begin_layout Enumerate
20789 Choose a ssh client for Windows.
20790 There are several possibilities, we will use the one from Putty tools
20794 \begin_layout Plain Layout
20795 \begin_inset Flex URL
20798 \begin_layout Plain Layout
20800 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20811 You will need to set the connection up so that the client doesn't ask for
20812 any password from you.
20813 To keep things easy we will use only keys without any additional password
20818 \begin_layout Enumerate
20820 \begin_inset Flex Code
20823 \begin_layout Plain Layout
20830 Save your private .ppk key file and put the public one on the server side.
20831 If the SVN server runs on Linux, note that the format of the public key
20832 is not compatible with Linux openssh and you will need to direcly copy-paste
20835 Public key for pasting into OpenSSH authorized_keys file
20837 :” edit field into the server's
20838 \begin_inset Flex Code
20841 \begin_layout Plain Layout
20842 ~/.ssh/authorized_keys
20848 \begin_inset Flex Code
20851 \begin_layout Plain Layout
20860 \begin_layout Enumerate
20862 \begin_inset Flex Code
20865 \begin_layout Plain Layout
20872 In the SVN config file
20876 \begin_layout Plain Layout
20877 Exact path depends on Windows version, usually somewhere around
20878 \begin_inset Flex Code
20881 \begin_layout Plain Layout
20884 Documents and Settings
20898 \begin_inset Flex Code
20901 \begin_layout Plain Layout
20916 , section [tunnels], setup ssh command, e.g.
20918 \begin_inset Flex Code
20921 \begin_layout Plain Layout
20922 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20931 \begin_layout Plain Layout
20932 It will usually take a lot of time to get exact command right and it depends
20934 For example do not have some remote server saved as a default session in
20936 If things fail, try to connect via plink without SVN first.
20945 \begin_layout Enumerate
20946 Checkout the SVN archive, e.g.
20948 \begin_inset Flex Code
20951 \begin_layout Plain Layout
20952 svn co svn+ssh://user@server/repository_path
20960 \begin_layout Subsubsection
20961 End-of-Line Conversions
20964 \begin_layout Standard
20965 When the collsraborators are mixing Linux and Windows environments, LyX
20966 will use different line endings inside the .lyx files.
20967 This is not a problem as far as LyX functionality is concerned, but the
20968 commit diffs will be huge and merge-conflicts prone.
20969 Fortunately SVN itself knows
20973 \begin_layout Plain Layout
20974 \begin_inset Flex URL
20977 \begin_layout Plain Layout
20979 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20989 how to deal with CR/LF problems when switching .lyx files to the
20990 \begin_inset Flex Code
20993 \begin_layout Plain Layout
21003 \begin_layout Plain Layout
21005 \begin_inset Flex Code
21008 \begin_layout Plain Layout
21009 svn propset svn:eol-style native FILE_NAME
21022 \begin_layout Subsection
21026 \begin_layout Standard
21027 With the recent addition of the vc-command function LyX power users are
21028 allowed to create their own commands for revision control.
21031 \begin_layout Standard
21032 As an example you can see how two TortoiseSVN commands could be integrated
21036 \begin_layout Description
21038 \begin_inset Flex Code
21041 \begin_layout Plain Layout
21042 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21050 \begin_layout Description
21052 \begin_inset Flex Code
21055 \begin_layout Plain Layout
21056 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21064 \begin_layout Subsection
21065 Version control and Document comparison
21068 \begin_layout Standard
21069 One of the typical uses of version control is to inspect the changes between
21070 revisions, usually by creating
21071 \begin_inset Flex Code
21074 \begin_layout Plain Layout
21081 While this is useful for plain text files, it is much less useful in the
21082 case of LyX files, which have more complicated structure.
21083 Hence we provide binding to the Document comparison feature.
21084 They are two ways of calling this feature - either by direct call of
21085 \begin_inset Flex Code
21088 \begin_layout Plain Layout
21094 LyX function (for details see LyX functions manual) or by icon/menu item
21096 \begin_inset Flex MenuItem
21099 \begin_layout Plain Layout
21100 Compare with older revision...
21106 One can either compare two chosen revisions of the document or he can simply
21107 compare the current version of edited text with older revisions (where
21109 \begin_inset Flex MenuItem
21112 \begin_layout Plain Layout
21118 ' revisions back means comparison of the edited file with last commited
21123 \begin_layout Standard
21124 This feature is supported for SVN and RCS though due to the more complicated
21125 versioning scheme of RCS there is a constraint -- when addressing the revisions
21126 in dialog, numbers always point to the last number in RCS revision number,
21131 \begin_layout Section
21132 Literate Programming
21135 \begin_layout Standard
21140 (kayvan@sylvan.com)
21144 original documentation written by
21146 Edmar Wienskoski Jr.
21149 (edmar-w-jr@technologist.com)
21152 \begin_layout Subsection
21156 \begin_layout Standard
21157 The main purpose of this documentation is to show you how to use LyX for
21158 literate programming, where it is assumed that you are familiar with this
21159 programming technique, and know what
21160 \begin_inset Quotes eld
21164 \begin_inset Quotes erd
21168 \begin_inset Quotes eld
21172 \begin_inset Quotes erd
21176 If that is not the case, please follow the web links provided in the following
21178 There is a lot of good documentation out there covering old development
21179 history to the latest tools tips.
21182 \begin_layout Standard
21183 It is also assumed that you are familiar with LyX itself to a point that
21184 you are comfortable changing your LyX preferences, and X resources file.
21185 If that is not the case please refer to other LyX documentation to cover
21186 your specific needs.
21189 \begin_layout Subsection
21190 Literate Programming
21193 \begin_layout Standard
21194 From the Literate Programming FAQ:
21197 \begin_layout Quotation
21198 Literate programming is the combination of documentation and source together
21199 in a fashion suited for reading by human beings.
21200 In fact, literate programs should be enjoyable reading, even inviting!
21201 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21202 and documentation in a single file.
21203 Literate programming tools then parse the file to produce either readable
21204 documentation or compilable source.
21205 The WEB style of literate programming was created by D.
21206 \begin_inset space \thinspace{}
21210 Knuth during the development of his TeX typesetting software.
21214 \begin_layout Standard
21215 Another excerpt says:
21218 \begin_layout Quotation
21221 How is literate programming different from verbose commenting?
21224 \begin_layout Quotation
21225 There are three distinguishing characteristics.
21226 In order of importance, they are:
21230 \begin_layout Itemize
21231 flexible order of elaboration
21234 \begin_layout Itemize
21235 automatic support for browsing
21238 \begin_layout Itemize
21239 typeset documentation, especially diagrams and mathematics
21243 \begin_layout Standard
21244 Now that I sparked your curiosity, take a look in the references.
21247 \begin_layout Subsubsection
21251 \begin_layout Standard
21252 The complete Literate Programming FAQ can be found at:
21255 \begin_layout Quote
21256 Literate Programming FAQ
21257 \begin_inset Flex URL
21260 \begin_layout Plain Layout
21262 http://www.literateprogramming.com/lpfaq.pdf
21270 \begin_layout Standard
21271 The FAQ lists 23 (twenty three!) different literate programming tools.
21272 Where some are specialized or
21273 \begin_inset Quotes eld
21277 \begin_inset Quotes erd
21280 for particular programming languages, while other have general scope.
21285 for my own use for several reasons:
21288 \begin_layout Itemize
21289 It can generate the documentation either in LaTeX or HTML.
21292 \begin_layout Itemize
21293 It has a open architecture, i.
21294 \begin_inset space \thinspace{}
21298 \begin_inset space \space{}
21301 it is easy to plug in new filters and to perform special processing that
21306 \begin_layout Itemize
21307 There is a good selection of filters available already (the HTML is one
21311 \begin_layout Itemize
21315 \begin_layout Standard
21316 The Noweb web page can be found at:
21319 \begin_layout Quote
21321 \begin_inset Flex URL
21324 \begin_layout Plain Layout
21326 http://www.cs.virginia.edu/~nr/noweb/
21334 \begin_layout Standard
21335 Starting from there you can reach many other interesting links and even
21336 some literate program examples.
21339 \begin_layout Subsection
21340 LyX and Literate Programming
21343 \begin_layout Standard
21344 The LyX support for Literate Programming is provided by using the generic
21345 LyX converters mechanism.
21346 This support is provided in a
21347 \begin_inset Quotes eld
21351 \begin_inset Quotes erd
21355 \begin_inset space \thinspace{}
21359 \begin_inset space \space{}
21362 you will be able to use this new LyX feature with some other literate programmin
21363 g tool of your choice by just changing your LyX preferences.
21366 \begin_layout Subsubsection
21367 Generating documents and code (weaving and tangling)
21370 \begin_layout Paragraph
21371 Selecting the document class
21374 \begin_layout Standard
21375 If you have installed Noweb and LyX successfully, whenever you open a new
21376 document or try to change the document class of an existing one, you will
21377 find that there are three new document classes available:
21380 \begin_layout Itemize
21384 \begin_layout Itemize
21388 \begin_layout Itemize
21392 \begin_layout Standard
21393 You must select one of them to create your literate documents from.
21397 \begin_layout Standard
21398 Note that literate documents are not limited to these three classes.
21399 New classes can be generated from other styles like letter or in combination
21400 with other class variations like Article (AMS).
21401 If you have special needs that cannot be covered by one of the existing
21402 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21403 will arrange to insert a new entry, or teach you how to do it.
21407 \begin_layout Plain Layout
21408 It is very simple, it involves the creation of a file with four lines, and
21409 re-running of the auto configuration.
21414 Moreover, if you use a literate tool other than Noweb you may need to create
21415 a new set of document classes for it.
21418 \begin_layout Paragraph
21422 \begin_layout Standard
21423 LyX enables you to write code with a layout named
21431 \begin_layout Plain Layout
21432 The equivalent Noweb term is
21433 \begin_inset Quotes eld
21437 \begin_inset Quotes erd
21441 For historical reasons, I got used to the term
21442 \begin_inset Quotes eld
21446 \begin_inset Quotes erd
21449 introduced by other literate tool named Nuweb, which I used for many years
21450 before rendering myself to Noweb.
21455 Noweb delimits scraps like this:
21458 \begin_layout LyX-Code
21462 \begin_layout LyX-Code
21466 \begin_layout LyX-Code
21470 \begin_layout LyX-Code
21474 \begin_layout LyX-Code
21478 \begin_layout Standard
21479 The problem is that whatever is written in between the << and the
21483 must be taken literally, i.
21484 \begin_inset space \thinspace{}
21488 \begin_inset space \space{}
21491 LyX should be prevented from making any special interpretation of what has
21493 This is handled by a special layout named Scrap, that works like a normal
21494 paragraph but has a free spacing capability.
21497 \begin_layout Standard
21498 The down side of the Scrap paragraph layout is that consecutive paragraphs
21499 of code will be spaced with one empty line in the source code and also
21500 in the printed documentation.
21501 The work around is to enter each line of code within a single Scrap, with
21502 a newline (ctrl-return).
21503 The example above will look like this:
21507 \begin_layout Plain Layout
21508 If you have a printed version of this document you will not see any difference
21509 between the previous example and this one.
21517 \begin_layout LyX-Code
21519 \begin_inset Newline newline
21523 \begin_inset Newline newline
21527 \begin_inset Newline newline
21531 \begin_inset Newline newline
21537 \begin_layout Standard
21538 This layout works fine.
21539 The only real inconvenience is that you have to type ctrl-return instead
21544 \begin_layout Plain Layout
21545 It is in my list of
21546 \begin_inset Quotes eld
21550 \begin_inset Quotes erd
21561 \begin_layout Standard
21562 As a special note, you can also use the
21563 \begin_inset Quotes eld
21567 \begin_inset Quotes erd
21570 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21574 \begin_layout LyX-Code
21576 \begin_inset Newline newline
21579 def some_function(args):
21580 \begin_inset Newline newline
21583 "This is the doc string for this function."
21584 \begin_inset Newline newline
21587 print "My args: ", args
21590 \begin_layout LyX-Code
21591 @ %def some_function
21594 \begin_layout Standard
21595 For an example of this usage and the resulting cross-reference output, look
21596 at the Literate python program in
21598 LIBDIR/examples/listerrors.lyx
21600 which should make this all clear.
21603 \begin_layout Paragraph
21604 Generating the documentation
21607 \begin_layout Standard
21608 At this point you already have a new document file with a proper document
21609 class, and with some code and text on it.
21610 How do I print it? The answer is simple, you select
21612 View\SpecialChar \menuseparator
21616 Just like you would do for a plain document.
21617 No special procedure is required.
21620 \begin_layout Standard
21621 To help orientate you, I will now explain what happens inside LyX:
21624 \begin_layout Enumerate
21627 Update\SpecialChar \menuseparator
21630 menu option is chosen, a LaTeX file is generated.
21635 \begin_layout Standard
21636 If the document is of any literate class the generated file will be named
21637 with an extension name defined by the
21638 \begin_inset Quotes eld
21642 \begin_inset Quotes erd
21645 format (defined in the Preferences panel), otherwise the file will have
21654 \begin_layout Enumerate
21655 Note that the only difference so far is in the name of the file, no special
21656 processing is required by LyX.
21657 Given that you formatted the code using the Scrap layout that, by itself,
21658 takes care of the business.
21661 \begin_layout Enumerate
21662 If the document is of any literate class LyX will then use the internal
21663 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21667 \begin_layout Plain Layout
21668 The converters are defined in the
21670 Tools\SpecialChar \menuseparator
21674 \begin_inset Quotes eld
21678 \begin_inset Quotes erd
21690 manual for general information about converters.
21695 to generate the LaTeX file.
21699 \begin_layout Standard
21700 Otherwise it will just skip this step.
21704 \begin_layout Enumerate
21705 Finally, LaTeX is invoked and the regular post processing continues as in
21709 \begin_layout Standard
21710 Independence from a particular
21711 \begin_inset Quotes eld
21715 \begin_inset Quotes erd
21718 is easily achieved by changing the commands that are run by the various
21722 \begin_layout Paragraph
21723 Generating the code
21726 \begin_layout Standard
21727 When the build menu option is chosen or the corresponding button in the
21728 toolbar is pressed, a LaTeX file is generated just like step 1 above.
21729 Next, LyX invokes the
21734 This converter needs to be defined by the user and is not installed by
21735 default, though the Program format is.
21736 This converter (like any other converter) will have two parts:
21739 \begin_layout Enumerate
21740 The converter program itself.
21741 This program performs the conversion from the one format to the other (in
21742 this case, from the Noweb format to the Program pseudo-format).
21745 \begin_layout Enumerate
21746 The error log parser.
21747 This is a program whose sole purpose is to rewrite error messages in a
21748 format that LyX understands.
21749 This makes it possible for LyX to place error boxes in the right places
21750 in the file buffer.
21753 \begin_layout Standard
21754 The first part, the
21755 \begin_inset Quotes eld
21759 \begin_inset Quotes erd
21762 setting, should be set to
21763 \begin_inset Quotes eld
21771 \begin_inset Quotes erd
21775 This basically means that LyX will call
21776 \begin_inset Quotes eld
21780 \begin_inset Quotes erd
21783 (a program or script) with the name of the Noweb file (normally a file
21784 in the LyX temp directory).
21788 \begin_layout Standard
21789 This is an implementation of
21790 \begin_inset Quotes eld
21794 \begin_inset Quotes erd
21797 that you can place in a directory on your path:
21800 \begin_layout LyX-Code
21804 \begin_layout LyX-Code
21808 \begin_layout LyX-Code
21809 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21812 \begin_layout Standard
21813 The next part of the converter setting is the
21814 \begin_inset Quotes eld
21818 \begin_inset Quotes erd
21821 which is to be set to
21822 \begin_inset Quotes eld
21827 parselog=listerrors
21830 \begin_inset Quotes erd
21834 This will run any errors that are generated by the
21835 \begin_inset Quotes eld
21839 \begin_inset Quotes erd
21842 process through the
21843 \begin_inset Quotes eld
21847 \begin_inset Quotes erd
21853 \begin_layout Standard
21854 The converter code looks in
21862 then on the path for the
21863 \begin_inset Quotes eld
21867 \begin_inset Quotes erd
21873 \begin_layout Standard
21874 The build will normally take place in LyX's temporary directory, so the
21875 files produced by the conversion will be in that directory.
21876 LyX will copy out what it regards as the `main' file, but the
21880 conversion may produce several files, and so most of these would then be
21881 deleted when LyX was closed.
21882 The present solution is to use a `copier',
21886 \begin_layout Plain Layout
21895 manual for information on these.
21904 script in its default mode, so that the entire contents of the temporary
21905 directory is copied.
21906 More will get copied than is needed, to be sure, but nothing will be lost.
21907 If, however, you know what extensions the generated files will have, this
21908 can be improved by using the
21917 This option takes a comma-separated list of extensions to copy.
21918 So, for example, if the conversion will generate only files with the extensions
21927 , then the correct definition would be:
21930 \begin_layout LyX-Code
21931 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21934 \begin_layout Standard
21935 The result will be that only files with these two extensions will be copied
21939 \begin_layout Paragraph
21940 Build instructions in the document
21943 \begin_layout Standard
21944 The last piece of the integration between LyX and noweb is the
21945 \begin_inset Quotes eld
21949 \begin_inset Quotes erd
21953 Generally, the instructions for building your program should be embedded
21954 in a scrap of its own.
21956 \begin_inset Quotes eld
21960 \begin_inset Quotes erd
21963 above uses the notangle command to look for this scrap (called
21964 \begin_inset Quotes eld
21968 \begin_inset Quotes erd
21971 ) and runs its contents through
21972 \begin_inset Quotes eld
21976 \begin_inset Quotes erd
21982 \begin_layout Standard
21983 Typically, such a scrap would look something like this:
21986 \begin_layout LyX-Code
21988 \begin_inset Newline newline
21992 \begin_inset Newline newline
21996 \begin_inset Newline newline
21999 if [ -z "${NOWEB_SOURCE}" ]
22000 \begin_inset Newline newline
22004 \begin_inset Newline newline
22007 NOWEB_SOURCE=myfile.nw
22008 \begin_inset Newline newline
22012 \begin_inset Newline newline
22016 code to extract files ...]
22017 \begin_inset Newline newline
22021 code to compile files ...]
22022 \begin_inset Newline newline
22028 \begin_layout Standard
22031 LIBDIR/examples/listerrors.lyx
22035 LIBDIR/examples/Literate.lyx
22037 which implement two versions of the
22038 \begin_inset Quotes eld
22042 \begin_inset Quotes erd
22045 program for some illustrations of how all of these pieces go together or
22048 LIBDIR/examples/noweb2lyx.lyx.
22051 Interestingly, these three files show off the language-indepence of the
22052 LyX literate programming support since they are written in Python, C and
22056 \begin_layout Subsubsection
22060 \begin_layout Standard
22061 All the Literate Programming support is configured by the
22063 Tools\SpecialChar \menuseparator
22067 \begin_inset Quotes eld
22071 \begin_inset Quotes erd
22075 The important parts are:
22078 \begin_layout Description
22080 \begin_inset space ~
22084 \begin_inset Quotes eld
22088 \begin_inset Quotes erd
22092 \begin_inset space ~
22095 format Set up via the Formats tab, this is where the Noweb-specific pieces
22105 , the file extension is set to
22110 This tells LyX to create a file with a
22114 extension in the first step of the conversion process.
22117 \begin_layout Description
22119 \begin_inset space ~
22127 \begin_inset space ~
22130 format This is an empty format whose sole purpose is to be the endpoint
22131 of a conversion (which then allows us to set up a converter for it).
22134 \begin_layout Description
22143 This converter performs the
22144 \begin_inset Quotes eld
22148 \begin_inset Quotes erd
22151 of the literate document.
22152 For Noweb, it is set to
22153 \begin_inset Quotes eld
22158 noweave -delay -index $$i > $$o
22161 \begin_inset Quotes erd
22167 \begin_layout Description
22177 \begin_inset Quotes eld
22181 \begin_inset Quotes erd
22185 As stated above, the Converter is set to
22186 \begin_inset Quotes eld
22194 \begin_inset Quotes erd
22197 , with Flags set to
22198 \begin_inset Quotes eld
22203 originaldir,parselog=listerrors
22206 \begin_inset Quotes erd
22212 \begin_layout Subsubsection
22216 \begin_layout Standard
22217 There is also a new function implemented in the LyX server, the
22218 \begin_inset Quotes eld
22221 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22225 \begin_layout Standard
22226 When debugging code with ddd/gdb, it is possible to invoke a text editor
22227 at the current execution position with a single key stroke.
22228 The default ddd configuration for that is shift-ctrl-V.
22229 It happens that you can define the editor command line invocation in ddd
22232 Edit\SpecialChar \menuseparator
22233 Preferences\SpecialChar \menuseparator
22236 dialog and changing the "Edit Sources" entry.
22239 \begin_layout Standard
22240 I take advantage of the new created LyX server function and this ddd feature,
22242 \begin_inset Quotes eld
22246 \begin_inset Quotes erd
22252 \begin_layout LyX-Code
22253 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22256 \begin_layout Standard
22257 With this, whenever you are using ddd and find a point in the program that
22258 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22259 ddd you forward this information to LyX through the LyX server and then
22260 the LyX window will show the same file with the cursor at the same position
22261 ddd was pointing to.
22262 No more guessing or long scrolling to locate a point in the program back
22266 \begin_layout Standard
22267 Note however that you must enable the LyX server to get this feature working
22268 (it is disabled by default).
22269 You can enable it in
22281 ) by entering in the
22286 \begin_inset Quotes eld
22291 /home/<your-home-directory>/.lyx/lyxpipe
22294 \begin_inset Quotes erd
22300 \begin_layout Standard
22301 Read the LyX server documentation in the
22303 Customization Manual
22305 for further information.
22308 \begin_layout Subsubsection
22312 \begin_layout Standard
22313 There are six new buttons that can be added to your LyX toolbar.
22314 Five of these buttons are short cuts to layout styles:
22335 The last one is a short cut to the
22336 \begin_inset Quotes eld
22340 \begin_inset Quotes erd
22347 \begin_layout Standard
22348 LyX has a range of buttons that are available for tool bar customization.
22349 In my toolbar I like to combine the six short cuts above with two more:
22354 \SpecialChar \menuseparator
22359 \SpecialChar \menuseparator
22366 View\SpecialChar \menuseparator
22370 Here is how it looks like:
22373 \begin_layout LyX-Code
22377 \begin_layout LyX-Code
22381 \begin_layout LyX-Code
22382 Icon "layout Standard"
22385 \begin_layout LyX-Code
22386 Icon "layout Section"
22389 \begin_layout LyX-Code
22390 Icon "layout LaTeX"
22393 \begin_layout LyX-Code
22394 Icon "layout LyX-Code"
22397 \begin_layout LyX-Code
22398 Icon "layout Scrap"
22401 \begin_layout LyX-Code
22405 \begin_layout LyX-Code
22409 \begin_layout LyX-Code
22410 Icon "buffer-typeset"
22413 \begin_layout LyX-Code
22414 Icon "build-program"
22417 \begin_layout LyX-Code
22421 \begin_layout LyX-Code
22425 \begin_layout LyX-Code
22429 \begin_layout LyX-Code
22433 \begin_layout LyX-Code
22437 \begin_layout Subsubsection
22438 Colors customization
22441 \begin_layout Standard
22442 There are a number of colors in LyX that can be customized in
22447 One of the things that bothers people is the LaTeX font color.
22448 The default color is red, since the scraps uses LaTeX font, and there is
22449 a lot of scraps in literate documents, you may get tired of seeing everything
22451 You can change it by going to the tabs
22460 \begin_layout Standard
22461 The next thing is the visible presence of the newline character in the screen.
22462 You can choose the color of this particular character and make it blend
22464 I recommend you choosing a color that is close to the background but not
22465 equal, that way you still can see it is there, but it is not bothering
22470 \begin_layout Chapter
22474 \begin_layout Standard
22475 You can do everything with LyX that you can do with LaTeX.
22476 However, LyX cannot support every LaTeX feature directly.
22477 But you can always use TeX Code.
22478 This chapter shows you some more special things you might want to use.
22479 For other special things you can do with figures, tables, floats, boxes
22480 and notes, have a look at the
22487 \begin_layout Section
22488 LyX Multiple Columns
22491 \begin_layout Standard
22492 The aim for this section is to show how the LaTeX package
22496 can be used in a LyX document.
22497 LyX does not support the
22501 package natively yet, so you have to use some TeX code.
22504 \begin_layout Standard
22509 package allows switching between one and multicolumn format on the same
22511 Footnotes are handled correctly, but will be placed at the bottom of the
22512 page and not under each column.
22513 Within the different columns you can use everyting, with the limitation
22514 that for floats you need to use the option
22521 \begin_layout Subsection
22525 \begin_layout Standard
22526 If you want to have two columns in your text, insert the comand
22529 \begin_layout Standard
22534 begin{multicols}{2}
22537 \begin_layout Standard
22538 at the point where you want the two column layout to start, and then
22541 \begin_layout Standard
22549 \begin_layout Standard
22550 where you want it to end.
22554 \begin_layout Standard
22558 \begin_layout Plain Layout
22562 begin{multicols}{2}
22570 \begin_layout Standard
22575 The Adventure of the Empty House
22578 \begin_inset Newline newline
22583 Sir Arthur Conan Doyle
22586 \begin_layout Standard
22589 It was in the spring of the year 1894 that all London was interested, and
22590 the fashionable world dismayed, by the murder of the Honourable Ronald
22591 Adair under most unusual and inexplicable circumstances.
22592 The public has already learned those particulars of the crime which came
22593 out in the police investigation, but a good deal was suppressed upon that
22594 occasion, since the case for the prosecution was so overwhelmingly strong
22595 that it was not necessary to bring forward all the facts.
22596 Only now, at the end of nearly ten years, am I allowed to supply those
22597 missing links which make up the whole of that remarkable chain.
22598 The crime was of interest in itself, but that interest was as nothing to
22599 me compared to the inconceivable sequel, which afforded me the greatest
22600 shock and surprise of any event in my adventurous life.
22601 Even now, after this long interval, I find myself thrilling as I think
22602 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22603 ty which utterly submerged my mind.
22604 Let me say to that public, which has shown some interest in those glimpses
22605 which I have occasionally given them of the thoughts and actions of a very
22606 remarkable man, that they are not to blame me if I have not shared my knowledge
22607 with them, for I should have considered it my first duty to do so, had
22608 I not been barred by a positive prohibition from his own lips, which was
22609 only withdrawn upon the third of last month.
22612 \begin_layout Standard
22616 \begin_layout Plain Layout
22628 \begin_layout Subsection
22632 \begin_layout Standard
22633 The same pattern is used when you want more than two columns:
22636 \begin_layout Standard
22640 \begin_layout Plain Layout
22644 begin{multicols}{3}
22652 \begin_layout Standard
22655 It can be imagined that my close intimacy with Sherlock Holmes had interested
22656 me deeply in crime, and that after his disappearance I never failed to
22657 read with care the various problems which came before the public.
22658 And I even attempted, more than once, for my own private satisfaction,
22659 to employ his methods in their solution, though with indifferent success.
22660 There was none, however, which appealed to me like this tragedy of Ronald
22662 As I read the evidence at the inquest, which led up to a verdict of willful
22663 murder against some person or persons unknown, I realized more clearly
22664 than I had ever done the loss which the community had sustained by the
22665 death of Sherlock Holmes.
22666 There were points about this strange business which would, I was sure,
22667 have specially appealed to him, and the efforts of the police would have
22668 been supplemented, or more probably anticipated, by the trained observation
22669 and the alert mind of the first criminal agent in Europe.
22670 All day, as I drove upon my round, I turned over the case in my mind and
22671 found no explanation which appeared to me to be adequate.
22672 At the risk of telling a twice-told tale, I will recapitulate the facts
22673 as they were known to the public at the conclusion of the inquest.
22676 \begin_layout Standard
22680 \begin_layout Plain Layout
22692 \begin_layout Standard
22693 You can have more than 3
22694 \begin_inset space ~
22697 columns if you want to, but that might not be very pleasant for the eye.
22700 \begin_layout Subsection
22701 Columns inside columns
22704 \begin_layout Standard
22705 You can even have columns inside columns:
22708 \begin_layout Standard
22712 \begin_layout Plain Layout
22716 begin{multicols}{2}
22724 \begin_layout Standard
22727 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22728 at that time governor of one of the Australian colonies.
22729 Adair's mother had returned from Australia to undergo the operation for
22730 cataract, and she, her son Ronald, and her daughter Hilda were living together
22734 \begin_layout Standard
22738 \begin_layout Plain Layout
22742 begin{multicols}{2}
22750 \begin_layout Standard
22753 The youth moved in the best society–had, so far as was known, no enemies
22754 and no particular vices.
22755 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22756 had been broken off by mutual consent some months before, and there was
22757 no sign that it had left any very profound feeling behind it.
22758 For the rest {sic} the man's life moved in a narrow and conventional circle,
22759 for his habits were quiet and his nature unemotional.
22760 Yet it was upon this easy-going young aristocrat that death came, in most
22761 strange and unexpected form, between the hours of ten and eleven-twenty
22762 on the night of March 30, 1894.
22765 \begin_layout Standard
22769 \begin_layout Plain Layout
22781 \begin_layout Standard
22784 Ronald Adair was fond of cards–playing continually, but never for such stakes
22786 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22787 It was shown that, after dinner on the day of his death, he had played
22788 a rubber of whist at the latter club.
22789 He had also played there in the afternoon.
22794 The evidence of those who had played with him– Mr.
22795 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22796 and that there was a fairly equal fall of the cards.
22797 Adair might have lost five pounds, but not more.
22798 His fortune was a considerable one, and such a loss could not in any way
22800 He had played nearly every day at one club or other, but he was a cautious
22801 player, and usually rose a winner.
22802 It came out in evidence that, in partnership with Colonel Moran, he had
22803 actually won as much as four hundred and twenty pounds in a sitting, some
22804 weeks before, from Godfrey Milner and Lord Balmoral.
22805 So much for his recent history as it came out at the inquest.
22808 \begin_layout Standard
22812 \begin_layout Plain Layout
22824 \begin_layout Standard
22825 Please read the example file
22829 for more advanced examples including column and header spacing, vertical
22830 separator lines, and more.
22833 \begin_layout Standard
22834 \begin_inset Newpage newpage
22840 \begin_layout Section
22841 Non-standard Paragraph Shapes
22844 \begin_layout Standard
22848 \begin_layout Plain Layout
22860 \begin_layout Standard
22864 \begin_layout Plain Layout
22873 \begin_layout Plain Layout
22887 \begin_layout Standard
22892 \begin_layout Plain Layout
22903 \begin_layout Plain Layout
22912 \begin_layout Plain Layout
22921 \begin_layout Plain Layout
22930 \begin_layout Plain Layout
22939 \begin_layout Plain Layout
22948 \begin_layout Plain Layout
22957 \begin_layout Plain Layout
22966 \begin_layout Plain Layout
22975 \begin_layout Plain Layout
22984 \begin_layout Plain Layout
22993 \begin_layout Plain Layout
23002 \begin_layout Plain Layout
23011 \begin_layout Plain Layout
23020 \begin_layout Plain Layout
23029 \begin_layout Plain Layout
23038 \begin_layout Plain Layout
23047 \begin_layout Plain Layout
23056 \begin_layout Plain Layout
23065 \begin_layout Plain Layout
23071 There are times when the tyranny of rectangular paragraphs must be overthrown.
23072 In such situations, a call to the delightful plain TeX command
23079 As you can see, completely arbitrary shapes can be laid out with a suitable
23080 set of linelength definitions.
23081 While this parshape may look a bit silly and useless, one could conceive
23082 of situations such as finely tuned dropped capitals, word wrapping around
23083 non-rectangular graphics, etc.
23084 which will benefit from such handcrafting.
23087 \begin_layout Standard
23088 \begin_inset VSpace bigskip
23094 \begin_layout Standard
23099 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23106 is the number of lines of text which define the paragraph.
23107 If there turn out to be fewer lines, the shape is truncated; if there are
23108 more, the excess lines have the same dimensions as the last line of the
23118 entries specify the indentation of the line from the left margin, and the
23119 length of the line as measured from that point.
23120 The shape applies only to the current paragraph; everything is reset to
23121 normal for the next paragraph.
23124 \begin_layout Standard
23128 \begin_layout Plain Layout