1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 % This preamble is designed to ensure that the manual prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the manual may not print out as expected. If you
12 % have problems LaTeXing this file, please contact
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
20 % set fonts for nicer pdf view
21 \IfFileExists{lmodern.sty}
22 {\usepackage{lmodern}}{}
24 \fi % end if pdflatex is used
26 % the pages of the TOC are numbered roman
27 % and a PDF-bookmark for the TOC is added
29 \let\myTOC\tableofcontents
30 \renewcommand{\tableofcontents}{%
31 \pdfbookmark[1]{\contentsname}{}
34 \pagenumbering{arabic}}
36 % used for multi-column text
39 % extra space for tables
40 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
42 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
43 \use_default_options false
50 \maintain_unincluded_children false
53 InsetLayout CharStyle:MenuItem
62 \newcommand*{\menuitem}[1]{{\sffamily #1}}
67 \language_package default
72 \font_typewriter default
73 \font_default_family default
74 \use_non_tex_fonts false
81 \default_output_format default
83 \bibtex_command default
84 \index_command default
88 \pdf_title "LyX's Additional Features manual"
89 \pdf_author "LyX Team"
90 \pdf_subject "LyX's additional features documentation"
91 \pdf_keywords "LyX, Documentation, Additional"
93 \pdf_bookmarksnumbered true
94 \pdf_bookmarksopen false
95 \pdf_bookmarksopenlevel 1
100 \pdf_pdfusetitle false
101 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
111 \paperorientation portrait
120 \paragraph_separation indent
121 \paragraph_indentation default
122 \quotes_language english
125 \paperpagestyle headings
126 \tracking_changes false
127 \output_changes false
136 Additional LyX Features
139 \begin_layout Subtitle
148 \begin_layout Plain Layout
150 Principal maintainer of this file is
155 If you have comments or error corrections, please send them to the LyX
156 Documentation mailing list,
157 \begin_inset Flex Code
160 \begin_layout Plain Layout
162 <lyx-docs@lists.lyx.org>
175 \begin_layout Standard
176 \begin_inset CommandInset toc
177 LatexCommand tableofcontents
184 \begin_layout Chapter
188 \begin_layout Standard
189 This manual is essentially Part II of the
191 User's Guide\SpecialChar \@.
194 The reason for separating this document out is simple: the
198 is already quite lengthy, and it contains information on all of the basic
199 features one needs to know in order to prepare most documents.
200 However, the LyX Team has worked to make LyX extensible through various
201 configuration files and external packages.
202 That means that if you want to support the Fizzwizzle LaTeX package, you
203 can create a layout file (or module) for it without having to alter LyX
205 We've already had contributions of several new features this way, and some
206 of them are documented here.
207 There are also some more `advanced' features, such as how to control the
208 presentation of bibliographies and how to work with multi-part documents,
209 that are not covered in the
213 and are discussed here.
216 \begin_layout Standard
217 This manual also documents some special features, like fax support, version
218 control, and SGML support, which require additional software to work properly.
219 There is also a chapter on LyX's support for HTML.
220 And lastly, there's a chapter of LaTeX tools and tips, things you can use
221 to spruce up your documents by directly using the powerful features of
227 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
230 \begin_layout Standard
231 If you haven't read the
235 yet, you are definitely in the wrong manual.
240 is the first place to go, since it describes the notation and format of
242 You should also be thoroughly familiar with the
246 and all of the basic features of LyX before attempting to read this one.
249 \begin_layout Standard
250 Since many of the topics in this manual depend heavily on LyX's interaction
251 with LaTeX, this first chapter covers the inner workings of LyX and how
252 to direct LyX to generate exactly the LaTeX code you want.
253 It is obviously for more seasoned LyX users.
256 \begin_layout Chapter
260 \begin_layout Section
264 \begin_layout Standard
265 This chapter is for both TeX-nicians and the LaTeX-curious.
266 In it, we'll explain how LyX and LaTeX work together to produce printable
268 This is the only place in any of the manuals where we assume you know something
272 \begin_layout Standard
273 At one time, LyX was called a
274 \begin_inset Quotes eld
277 WYSIWYM frontend to LaTeX,
278 \begin_inset Quotes erd
281 but that's no longer true.
282 There are frontends to LaTeX out there.
286 \begin_layout Plain Layout
287 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
288 There are also the LaTeX modes for vi and emacs, of course.
293 These are basically text editors with the ability to run LaTeX and mark
294 any errors in the file you're editing.
303 run LaTeX, and it also indicates errors in the file, it also does much,
305 For one thing, you don't need to know LaTeX to use LyX effectively.
306 And LyX has added its own extensions to LaTeX.
307 Try the following sometime: select
308 \begin_inset Flex MenuItem
311 \begin_layout Plain Layout
312 Export\SpecialChar \menuseparator
319 \begin_inset Flex MenuItem
322 \begin_layout Plain Layout
329 \begin_inset Flex MenuItem
332 \begin_layout Plain Layout
333 View\SpecialChar \menuseparator
339 ), then look at the preamble of the resulting
340 \begin_inset Flex Code
343 \begin_layout Plain Layout
350 You'll notice a variety of new macros defined specifically by LyX.
351 These macros are defined automatically, according to the features you use
355 \begin_layout Standard
356 There are several commands that automatically invoke LaTeX.
360 \begin_layout Itemize
361 \begin_inset Flex MenuItem
364 \begin_layout Plain Layout
365 View\SpecialChar \menuseparator
374 \begin_layout Itemize
375 \begin_inset Flex MenuItem
378 \begin_layout Plain Layout
379 View\SpecialChar \menuseparator
380 Update\SpecialChar \menuseparator
389 \begin_layout Itemize
390 \begin_inset Flex MenuItem
393 \begin_layout Plain Layout
394 File\SpecialChar \menuseparator
403 \begin_layout Itemize
404 \begin_inset Flex MenuItem
407 \begin_layout Plain Layout
408 File\SpecialChar \menuseparator
417 \begin_layout Standard
418 They will only invoke LaTeX if the file has changed since the last time
423 \begin_layout Standard
424 When LyX runs LaTeX on the file you're editing, it performs these steps:
427 \begin_layout Enumerate
428 Convert the document to LaTeX and save to a file with the extension
429 \begin_inset Flex Code
432 \begin_layout Plain Layout
439 \begin_inset Flex Code
442 \begin_layout Plain Layout
451 \begin_layout Enumerate
453 \begin_inset Flex Code
456 \begin_layout Plain Layout
462 file (maybe several times), and run any other commands (such as
463 \begin_inset Flex Code
466 \begin_layout Plain Layout
473 \begin_inset Flex Code
476 \begin_layout Plain Layout
482 ) needed to compile the LaTeX file.
485 \begin_layout Enumerate
486 If there are any errors, show the error log.
489 \begin_layout Standard
490 If you've run LaTeX using
491 \begin_inset Flex MenuItem
494 \begin_layout Plain Layout
497 \SpecialChar \menuseparator
505 , LyX then runs a DVI viewer to display the DVI-file.
507 \begin_inset Flex MenuItem
510 \begin_layout Plain Layout
513 \SpecialChar \menuseparator
521 , LyX performs further steps:
524 \begin_layout Itemize
526 \begin_inset Flex Code
529 \begin_layout Plain Layout
535 to convert the DVI file to PostScript.
538 \begin_layout Itemize
539 Run a PostScript viewer, such as
540 \begin_inset Flex Code
543 \begin_layout Plain Layout
549 , to display the PostScript file.
552 \begin_layout Standard
553 LyX does similar things when viewing, or exporting, other formats.
556 \begin_layout Section
557 Translating LaTeX files into LyX
560 \begin_layout Standard
561 You can import a LaTeX file into LyX by using the
562 \begin_inset Flex MenuItem
565 \begin_layout Plain Layout
566 File\SpecialChar \menuseparator
567 Import\SpecialChar \menuseparator
574 This will call a program named
575 \begin_inset Flex Code
578 \begin_layout Plain Layout
584 which will create a file
585 \begin_inset Flex Code
588 \begin_layout Plain Layout
595 \begin_inset Flex Code
598 \begin_layout Plain Layout
605 LyX will then open that file.
609 \begin_layout Plain Layout
610 \begin_inset Flex Code
613 \begin_layout Plain Layout
619 can also be run from the command line, of course.
627 \begin_layout Standard
628 \begin_inset Flex Code
631 \begin_layout Plain Layout
637 will translate most legal LaTeX, but not everything.
638 It will put things it doesn't understand into TeX code, so after translating
640 \begin_inset Flex Code
643 \begin_layout Plain Layout
649 , you can look for TeX code and hand-edit it until it looks right.
652 \begin_layout Standard
653 If you don't know what TeX code is, read the next section.
656 \begin_layout Section
657 \begin_inset CommandInset label
659 name "sec:Inserting-TeX-Code"
663 Inserting TeX Code into LyX Documents
666 \begin_layout Standard
667 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
668 You can always insert TeX code into any LyX document.
669 LyX cannot, and will never be able to, display every possible LaTeX construct.
670 If ever you need to insert LaTeX commands into your LyX document, you can
672 \begin_inset Flex Code
675 \begin_layout Plain Layout
681 box, which you can insert into your document with
682 \begin_inset Flex MenuItem
685 \begin_layout Plain Layout
686 Insert\SpecialChar \menuseparator
695 \begin_layout Standard
696 Here's an example of inserting LaTeX commands in a LyX document.
697 The code looks like this:
700 \begin_layout LyX-Code
704 \begin_inset Newline newline
710 \begin_inset Newline newline
713 This is an example for a minipage environment.
715 \begin_inset Newline newline
718 can put nearly everything in it, even (non-floating)
719 \begin_inset Newline newline
724 \begin_inset Newline newline
730 \begin_inset Newline newline
734 \begin_inset Newline newline
740 \begin_inset Newline newline
746 \begin_inset Newline newline
752 \begin_inset Newline newline
757 \begin_inset Newline newline
763 \begin_inset Newline newline
769 \begin_inset Newline newline
775 \begin_inset Newline newline
783 \begin_layout LyX-Code
787 \begin_layout Standard
789 \begin_inset Flex Code
792 \begin_layout Plain Layout
798 box containing this text is directly after this paragraph.
799 Those of you reading the manual in LyX will only see the TeX code inset.
800 Those reading a printed version of the manuals will see the actual results:
803 \begin_layout Standard
807 \begin_layout Plain Layout
814 \begin_layout Plain Layout
821 \begin_layout Plain Layout
823 This is an example for a minipage environment.
824 You can put nearly everything in it, even (non-floating) figures and tables.
828 \begin_layout Plain Layout
835 \begin_layout Plain Layout
840 \begin_layout Plain Layout
847 \begin_layout Plain Layout
854 \begin_layout Plain Layout
861 \begin_layout Plain Layout
867 \begin_layout Plain Layout
874 \begin_layout Plain Layout
881 \begin_layout Plain Layout
888 \begin_layout Plain Layout
900 \begin_layout Standard
901 In addition to using TeX code, you can also create a separate file containing
902 some complex LaTeX structure and then use
903 \begin_inset Flex MenuItem
906 \begin_layout Plain Layout
907 Insert\SpecialChar \menuseparator
917 to include your file (you should select the type
918 \begin_inset Flex Code
921 \begin_layout Plain Layout
928 We recommend that you only do this if you have a
929 \begin_inset Flex Code
932 \begin_layout Plain Layout
943 Otherwise, you'll have a big job tracking down LaTeX errors.
946 \begin_layout Standard
947 There are a few last points to emphasize:
950 \begin_layout Itemize
955 check if your LaTeX code is correct.
958 \begin_layout Itemize
959 Beware reinventing the wheel.
962 \begin_layout Standard
963 On that last point, LyX does have quite a few features tucked into it, and
965 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
966 feature before you decide you have to do it by hand.
967 Moreover, there are numerous LaTeX packages out there to do all sorts of
968 things, from labels to envelopes to fancy multipage tables.
970 \begin_inset CommandInset href
973 target "http://www.ctan.org/"
977 for details, and see chapter
978 \begin_inset CommandInset ref
980 reference "cha:secrets"
987 \begin_layout Standard
988 If you do need to do some wild and fancy things within your document, be
989 sure to check out a good LaTeX book for assistance.
990 There are a number of them listed in the bibliography of the
997 \begin_layout Section
998 LyX and the LaTeX Preamble
1001 \begin_layout Subsection
1002 About the LaTeX Preamble
1005 \begin_layout Standard
1006 If you already know LaTeX, there is no need to explain here what the preamble
1008 If you don't, the following will give you some ideas—we recommend again
1009 that you consult a LaTeX book for further information.
1010 In any case, you should read the points below, because they explain what
1011 you can do and what you don't need to do in the LaTeX preamble of a LyX
1015 \begin_layout Standard
1016 The LaTeX preamble comes at the very beginning of a document,
1024 \begin_layout Itemize
1025 Declare the document class.
1027 \begin_inset Newline newline
1030 LyX already does this for you.
1031 If you're a seasoned LaTeX-nician, and you have a custom document class
1032 you want to use, check out the
1034 Customization Manual
1036 for information on how to make LyX interface to it.
1039 \begin_layout Itemize
1040 Declare the usage of packages.
1042 \begin_inset Newline newline
1045 LaTeX packages provide special commands, which are only available within
1046 a document when the package has been declared in the preamble.
1047 For example, the package
1048 \begin_inset Flex Code
1051 \begin_layout Plain Layout
1057 forces all paragraphs to be indented.
1058 There are other packages for labels, envelopes, margins, etc.
1062 \begin_layout Itemize
1063 Set counters, variables, lengths and widths.
1065 \begin_inset Newline newline
1068 There are several LaTeX counters and variables which
1072 be set globally from within the preamble in order to have the desired effect.
1073 (There are variables which you can set and reset inside the document, too.)
1074 Margins are a good example of something which must be set in the preamble.
1075 Another example is the label format for lists.
1076 You can actually set these just about anywhere, but it's best to do it
1077 just once, inside the preamble.
1080 \begin_layout Itemize
1081 Declare user defined commands (with
1082 \begin_inset Flex Code
1085 \begin_layout Plain Layout
1094 \begin_inset Flex Code
1097 \begin_layout Plain Layout
1106 \begin_inset Newline newline
1109 These are abbreviations for LaTeX commands which appear very often inside
1111 Although the preamble is a good place to declare such commands, they
1115 be declared anywhere (before they are used for the first time, of course).
1116 This can be useful if there is a lot of raw LaTeX code in your document,
1117 which normally should not be the case.
1120 \begin_layout Standard
1121 LyX adds its own set of definitions to the preamble of the
1122 \begin_inset Flex Code
1125 \begin_layout Plain Layout
1132 This makes LaTeX files generated by LyX portable.
1135 \begin_layout Subsection
1136 Changing the Preamble
1139 \begin_layout Standard
1140 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1141 can't change them without patching LyX itself.
1142 You can, however, add your own stuff to the preamble by selecting
1143 \begin_inset Flex MenuItem
1146 \begin_layout Plain Layout
1148 \begin_inset space ~
1157 \begin_inset Flex MenuItem
1160 \begin_layout Plain Layout
1161 Document\SpecialChar \menuseparator
1168 LyX adds anything in the
1169 \begin_inset Flex MenuItem
1172 \begin_layout Plain Layout
1178 dialog to its own built-in preamble.
1179 Before adding your own declarations in the preamble, you should make sure
1180 that LyX doesn't already support what you want to do.
1181 (Remember what we said about reinventing the wheel?) Also,
1183 make sure your preamble code is correct
1186 LyX doesn't check it for you.
1187 If there is an error, you're likely to get an error like
1188 \begin_inset Quotes eld
1192 \begin_inset Flex Code
1195 \begin_layout Plain Layout
1204 \begin_inset Quotes erd
1208 If you see this error, check your preamble.
1211 \begin_layout Subsection
1215 \begin_layout Standard
1216 Here are some examples of what you can add to a preamble, and what they
1220 \begin_layout Subsubsection
1224 \begin_layout Standard
1225 There are two variables under LaTeX that control page position:
1226 \begin_inset Flex Code
1229 \begin_layout Plain Layout
1238 \begin_inset Flex Code
1241 \begin_layout Plain Layout
1250 Their names should be self-explanatory.
1251 These variables are useful if you think for a moment about computer labels.
1252 Sometimes, the size of a print medium and the area of the medium that you
1253 can actually print on aren't the same.
1255 \begin_inset Flex Code
1258 \begin_layout Plain Layout
1267 \begin_inset Flex Code
1270 \begin_layout Plain Layout
1281 \begin_layout Standard
1282 The default values for
1283 \begin_inset Flex Code
1286 \begin_layout Plain Layout
1295 \begin_inset Flex Code
1298 \begin_layout Plain Layout
1307 \begin_inset space \thinspace{}
1311 \begin_inset space \thinspace{}
1315 \begin_inset space \space{}
1318 the page isn't shifted.
1319 Unfortunately, some DVI drivers always seem to shift the page.
1320 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1321 If you're using LyX on a system that you don't personally maintain, and
1322 your sysadmin is a doofus,
1323 \begin_inset Flex Code
1326 \begin_layout Plain Layout
1335 \begin_inset Flex Code
1338 \begin_layout Plain Layout
1347 Suppose your left and top margins are always 0.5
1348 \begin_inset space \thinspace{}
1352 You can add this to the preamble:
1355 \begin_layout LyX-Code
1363 \begin_layout LyX-Code
1371 \begin_layout Standard
1372 and your margins should now be correct.
1375 \begin_layout Subsubsection
1379 \begin_layout Standard
1380 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1381 There's a rather nice package, available at your nearest CTAN archive,
1382 for printing sheets of labels:
1383 \begin_inset Flex Code
1386 \begin_layout Plain Layout
1393 Now, your system may not have this package installed by default.
1394 We leave that up to you to check.
1395 You'll also want to read the documentation for it; we're not going to do
1397 Since this is an example, however, we'll give you an example of how you
1401 \begin_layout Standard
1402 First, make sure you're using the
1403 \begin_inset Flex Code
1406 \begin_layout Plain Layout
1413 Next, you need to put the following in your preamble:
1416 \begin_layout LyX-Code
1422 \begin_layout LyX-Code
1428 \begin_layout LyX-Code
1434 \begin_layout LyX-Code
1440 \begin_layout LyX-Code
1446 \begin_layout LyX-Code
1452 \begin_layout LyX-Code
1458 \begin_layout Standard
1459 This sets things up for Avery label sheets, stock #5360.
1460 You're now ready to print labels, but you'll need to insert LaTeX code,
1461 placing the commands
1462 \begin_inset Flex Code
1465 \begin_layout Plain Layout
1474 \begin_inset Flex Code
1477 \begin_layout Plain Layout
1485 around each label text.
1486 This and other special features of
1487 \begin_inset Flex Code
1490 \begin_layout Plain Layout
1496 are explained in its documentation.
1499 \begin_layout Standard
1500 Someday, someone may write a LyX layout file to support this package directly.
1501 Maybe that someone is you.
1504 \begin_layout Subsubsection
1505 Example #3: Paragraph Indentation
1508 \begin_layout Standard
1509 Americans are trained to indent the first line of
1514 As with all of their other weird quirks, most Americans will whine and
1515 moan until they can have their way and indent the first line of all paragraphs.
1524 \begin_layout Standard
1525 Of course, this behavior isn't standard typography.
1526 In books, you typically only indent the first line of a paragraph
1530 it follows another one.
1531 The idea behind indenting the first line of a paragraph is to distinguish
1532 neighboring paragraphs from one another.
1533 If there is no previous paragraph—for example, if it follows a figure or
1534 is the first paragraph in a section—then there is no need for indentation.
1538 \begin_layout Standard
1539 If you're a typical American (we're still joking!), though, you don't care
1540 about such esoteric things; you want your indentation! Add this to the
1544 \begin_layout LyX-Code
1547 usepackage{indentfirst}
1550 \begin_layout Standard
1551 If your TeX distribution isn't braindead, you'll have this package, and
1552 all of your paragraphs will get the indentation the Founding Fathers intended
1556 \begin_layout Subsubsection
1557 Example #4: This Document
1560 \begin_layout Standard
1561 You can also check out the preamble of this document to get an idea of some
1562 of the advanced things you can do.
1563 Also, there are more examples and an assortment of LaTeX
1564 \begin_inset Quotes eld
1568 \begin_inset Quotes erd
1572 \begin_inset space ~
1576 \begin_inset CommandInset ref
1578 reference "cha:secrets"
1586 \begin_layout Section
1587 LyX and LaTeX Errors
1590 \begin_layout Standard
1591 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1593 It then uses the logfile from the LaTeX run to do a post-mortem.
1594 After analyzing the logfile,LyX displays a dialog listing the errors.
1595 Clicking on any one of them will take you to the position in your LyX file
1596 where the error occurred.
1600 \begin_layout Plain Layout
1602 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1604 There are also cases where LaTeX reports the error on one line, but the
1605 actual error is earlier.
1606 This is not unlike forgetting a closing brace in a program: You'll get
1607 an error, but only later.
1615 \begin_layout Standard
1616 Some folks also like to look at the log file directly: It is available from
1618 \begin_inset Flex MenuItem
1621 \begin_layout Plain Layout
1624 \SpecialChar \menuseparator
1628 \begin_inset space ~
1637 There are some fairly common error messages and warnings.
1638 We'll cover those here.
1639 You should look at a good LaTeX book for a complete listing.
1642 \begin_layout Itemize
1643 \begin_inset Flex Code
1646 \begin_layout Plain Layout
1653 \begin_inset Newline newline
1656 Anything beginning with these words is a warning message for the purpose
1658 \begin_inset Quotes eld
1662 \begin_inset Quotes erd
1665 the LaTeX code itself.
1666 You'll get messages like this if you added or changed cross-references
1667 or bibliography entries, in which case, LaTeX is trying to tell you that
1668 you need to make another run.
1669 You can by-and-large ignore these.
1672 \begin_layout Itemize
1673 \begin_inset Flex Code
1676 \begin_layout Plain Layout
1683 \begin_inset Newline newline
1686 Another warning message, this time about fonts which LaTeX couldn't find.
1687 The rest of the message will often say something about a replacement font
1689 You can safely ignore these, too.
1692 \begin_layout Itemize
1693 \begin_inset Flex Code
1696 \begin_layout Plain Layout
1705 \begin_inset Newline newline
1713 They are warnings about lines that were too long and run past the right
1715 Almost always, this is unnoticeable in the final output.
1716 (It can be just a point or two.) Or, only one or two characters extend past
1718 LaTeX seems to generate at least one of these messages for just about any
1720 \begin_inset Newline newline
1723 You can ignore these messages.
1724 Your eyes will tell you if there's a problem with something that's too
1725 wide; just look at the output.
1729 \begin_layout Plain Layout
1730 You can also enable the `draft' option in
1731 \begin_inset Flex MenuItem
1734 \begin_layout Plain Layout
1737 \SpecialChar \menuseparator
1745 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1753 \begin_layout Itemize
1754 \begin_inset Flex Code
1757 \begin_layout Plain Layout
1766 \begin_inset Newline newline
1769 Not quite as common as its cousin.
1770 LaTeX seems to like to print lines that are a bit too wide as opposed to
1771 ones that are a bit too narrow.
1772 We have no idea why.
1775 \begin_layout Itemize
1776 \begin_inset Flex Code
1779 \begin_layout Plain Layout
1788 \begin_inset Flex Code
1791 \begin_layout Plain Layout
1800 \begin_inset Newline newline
1803 Warnings about troubles breaking the page.
1804 Once again, just look at the output.
1805 Your eyes will tell you where something has gone wrong.
1808 \begin_layout Itemize
1809 \begin_inset Flex Code
1812 \begin_layout Plain Layout
1814 \begin_inset Quotes els
1818 \begin_inset Quotes ers
1827 \begin_inset Newline newline
1831 \begin_inset Quotes eld
1835 \begin_inset Quotes erd
1838 isn't installed on this system.
1839 This usually appears because some package your document needs isn't installed.
1840 If you didn't touch the preamble or didn't use the
1841 \begin_inset Flex Code
1844 \begin_layout Plain Layout
1852 command, then one of the packages LyX tried to load is missing.
1854 \begin_inset Flex MenuItem
1857 \begin_layout Plain Layout
1858 Help\SpecialChar \menuseparator
1864 to get a list of packages that LyX knows about.
1865 This file is updated whenever you reconfigure LyX (using
1866 \begin_inset Flex MenuItem
1869 \begin_layout Plain Layout
1870 Tools\SpecialChar \menuseparator
1876 ) and tells you which packages have been detected and what they do.
1877 \begin_inset Newline newline
1881 \begin_inset Flex Code
1884 \begin_layout Plain Layout
1892 command and the package in question isn't installed, then you'll need to
1893 install it yourself.
1896 \begin_layout Itemize
1897 \begin_inset Flex Code
1900 \begin_layout Plain Layout
1901 LaTeX Error: Unknown option
1907 \begin_inset Newline newline
1910 Error messages beginning with this are trying to tell you that you specified
1911 a bad or undefined option to a package.
1912 Check the package's documentation.
1915 \begin_layout Itemize
1916 \begin_inset Flex Code
1919 \begin_layout Plain Layout
1920 Undefined control sequence
1926 \begin_inset Newline newline
1929 If you've inserted LaTeX code into your document, but made a typo, you'll
1931 You may have forgotten to load a package.
1932 In any case, this error message usually means that you used an undefined
1937 \begin_layout Standard
1938 There are other error and warning messages.
1939 Some are self-explanatory.
1940 These are usually LaTeX messages.
1941 Others are downright cryptic.
1942 These are usually TeX error messages, and we really have
1946 what they mean or how to decipher them.
1950 \begin_layout Standard
1951 There's a general sequence you should follow if you get error messages:
1954 \begin_layout Enumerate
1955 Look at the LaTeX code you inserted for typos.
1958 \begin_layout Enumerate
1959 If there are no typos, check that you used the command(s) correctly.
1962 \begin_layout Enumerate
1963 If you get a bunch of error boxes piled up at the very top of the document—and
1964 especially if you see a
1965 \begin_inset Quotes eld
1969 \begin_inset Flex Code
1972 \begin_layout Plain Layout
1981 \begin_inset Quotes erd
1984 error—it means that there are errors in the preamble.
1985 Start debugging your preamble.
1988 \begin_layout Enumerate
1989 If you didn't add anything to the preamble and didn't add any LaTeX code
1990 to the document, the first suspect is your LaTeX distribution itself.
1991 Check for missing packages and install them.
1994 \begin_layout Enumerate
1995 Okay, so there are no missing packages.
1996 Did you use any of the fine-tuning options in LyX? Specifically, did you
2001 any of them, like trying to manually insert lots of
2002 \begin_inset Flex Code
2005 \begin_layout Plain Layout
2007 \begin_inset space ~
2016 \begin_inset Flex Code
2019 \begin_layout Plain Layout
2026 \begin_inset Flex Code
2029 \begin_layout Plain Layout
2035 ? Did you try to kludge something together with these instead of using the
2036 appropriate paragraph environment?
2039 \begin_layout Enumerate
2040 All right, you didn't use any of the fine-tuning options, you played by
2042 Did you try to pull a fancy maneuver? Did you do something funky inside
2043 a table or an equation, like inserting a graphic into a table cell?
2046 \begin_layout Enumerate
2047 Do you have long sections of text where LaTeX cannot find a place to break
2048 a line? By default, LaTeX is rather strict about how much extra inter-word
2049 spacing it will add in order to break a line.
2050 Preferably, you should rework the paragraph to avoid the problem.
2051 If this isn't an option, you can wrap your text in
2052 \begin_inset Flex Code
2055 \begin_layout Plain Layout
2063 to make LaTeX's line breaking more, well, sloppy.
2066 \begin_layout Enumerate
2067 Did you go overboard with the nesting? LyX (currently) doesn't check to
2068 make sure you're in the limits for nesting environments.
2069 If you nested a bunch of environments to the
2070 \begin_inset Formula $17^{\mathrm{th}}$
2073 level, that's the problem.
2074 (The limit in LaTeX is five.)
2077 \begin_layout Enumerate
2078 Okay, you didn't get any error messages, but your output looks awful.
2079 If you have a table or figure that's too wide or long for the page, you
2084 \begin_layout Enumerate
2085 rescale the figure so it fits.
2088 \begin_layout Enumerate
2089 trim down the table so it fits.
2093 \begin_layout Enumerate
2094 If something else is wrong with the output, and you didn't try to pull anything
2095 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2098 \begin_layout Standard
2099 If all this doesn't help—well, then
2103 you might have found a bug in LyX\SpecialChar \ldots{}
2107 \begin_layout Chapter
2111 \begin_layout Section
2112 Customizing Bibliographies with BibTeX
2115 \begin_layout Standard
2116 The most basic information about how to use BibTeX with LyX is contained
2119 Bibliography databases (BibTeX)
2126 The following subsections explain special bibliography features supported
2130 \begin_layout Subsection
2131 Alternative Citation Styles
2134 \begin_layout Standard
2135 Standard BibTeX uses numbers (e.
2136 \begin_inset space \thinspace{}
2140 \begin_inset space \space{}
2144 \begin_inset Quotes eld
2148 \begin_inset Quotes erd
2151 ) to refer to a cited work.
2152 However, in many scientific disciplines, other citation styles are in use.
2153 The most common one is the author-year style (e.
2154 \begin_inset space \thinspace{}
2158 \begin_inset space \space{}
2162 \begin_inset Quotes eld
2166 \begin_inset Quotes erd
2170 LyX supports two packages that provide this style,
2171 \begin_inset Flex Code
2174 \begin_layout Plain Layout
2181 \begin_inset Flex Code
2184 \begin_layout Plain Layout
2191 Both packages have their pros and cons, which cannot be listed in detail.
2192 If you only want to have simple author-year (or author-numerical) style,
2193 or if you want to use one of the countless style files for
2194 \begin_inset Flex Code
2197 \begin_layout Plain Layout
2203 , than the established
2204 \begin_inset Flex Code
2207 \begin_layout Plain Layout
2213 package is probably your choice.
2214 If you need special features like short title references, ibidem etc., you
2216 \begin_inset Flex Code
2219 \begin_layout Plain Layout
2228 \begin_layout Standard
2229 The handling of both packages in LyX is basically the same.
2231 \begin_inset Flex MenuItem
2234 \begin_layout Plain Layout
2235 Document\SpecialChar \menuseparator
2242 \begin_inset Flex MenuItem
2245 \begin_layout Plain Layout
2252 \begin_inset Flex MenuItem
2255 \begin_layout Plain Layout
2262 \begin_inset Flex MenuItem
2265 \begin_layout Plain Layout
2272 With both packages, you will get some extra features in the citation dialog
2273 and you can select the style of the reference (
2274 \begin_inset Quotes eld
2278 \begin_inset Quotes erd
2282 \begin_inset Quotes eld
2286 \begin_inset Quotes erd
2290 \begin_inset Quotes eld
2294 \begin_inset Quotes erd
2298 \begin_inset Quotes eld
2302 \begin_inset Quotes erd
2306 Note that both packages need specifically designed style files.
2307 They both ship their own, but there are lots of additional style files,
2308 and there is even an interactive style file builder
2312 \begin_layout Plain Layout
2314 \begin_inset Flex URL
2317 \begin_layout Plain Layout
2319 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2330 \begin_inset Flex Code
2333 \begin_layout Plain Layout
2342 \begin_layout Subsection
2343 Sectioned Bibliographies
2346 \begin_layout Standard
2347 Sometimes you might need to divide your bibliography into several sections.
2348 If you are for instance a historian, the possibility to separate sources
2349 and scientific works is most likely a
2350 \begin_inset Quotes eld
2354 \begin_inset Quotes erd
2358 Unfortunately, BibTeX itself does not allow you to do this.
2359 But with the help of some LaTeX packages, BibTeX can be extended to fit
2363 \begin_layout Standard
2364 LyX provides native support for one of these packages,
2372 \begin_layout Plain Layout
2374 \begin_inset Flex URL
2377 \begin_layout Plain Layout
2379 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2389 The advantage of this package (compared to other packages like
2393 ) is that you don't need to define new citation commands.
2394 Instead, you need to prepare different bibliographic databases which include
2395 the entries for the different sections of the bibliography.
2396 For example: If you want to divide your bibliography into the sections
2398 \begin_inset Quotes eld
2402 \begin_inset Quotes erd
2406 \begin_inset Quotes eld
2410 \begin_inset Quotes erd
2413 , you first need to create two bibliographic databases, e.
2414 \begin_inset space \thinspace{}
2418 \begin_inset space \space{}
2422 \begin_inset Flex Code
2425 \begin_layout Plain Layout
2432 \begin_inset Flex Code
2435 \begin_layout Plain Layout
2445 \begin_layout Standard
2447 \begin_inset Flex MenuItem
2450 \begin_layout Plain Layout
2451 Document\SpecialChar \menuseparator
2458 \begin_inset Flex MenuItem
2461 \begin_layout Plain Layout
2468 \begin_inset Flex MenuItem
2471 \begin_layout Plain Layout
2472 Sectioned bibliography
2478 Now you can insert multiple BibTeX bibliographies, one for each section
2479 of your bibliography.
2480 Returning to our example: Insert the BibTeX bibliography
2481 \begin_inset Flex Code
2484 \begin_layout Plain Layout
2490 and a second one for the database
2491 \begin_inset Flex Code
2494 \begin_layout Plain Layout
2501 You are free to use the same or different styles for each section.
2502 Additionally, you can chose if the bibliography section should contain
2504 \begin_inset Quotes eld
2507 all cited references
2508 \begin_inset Quotes erd
2511 of the specified database(s) (which is the default),
2512 \begin_inset Quotes eld
2515 all uncited references
2516 \begin_inset Quotes erd
2520 \begin_inset Quotes eld
2524 \begin_inset Quotes erd
2528 This might be useful if you would like to separate your bibliography into
2530 \begin_inset Quotes eld
2534 \begin_inset Quotes erd
2538 \begin_inset Quotes eld
2542 \begin_inset Quotes erd
2546 \begin_inset Quotes eld
2550 \begin_inset Quotes erd
2554 The titles for the sections can be added as ordinary sections or subsections.
2556 \begin_inset Flex Code
2559 \begin_layout Plain Layout
2565 removes the bibliography title, you have manually re-add that, too (as
2566 a chapter* or section*, for instance).
2569 \begin_layout Subsection
2570 Multiple Bibliographies
2573 \begin_layout Standard
2574 Multiple bibliographies, e.
2575 \begin_inset space \thinspace{}
2579 \begin_inset space \space{}
2582 a bibliography for each section or chapter of the document, are not supported
2585 \begin_inset Flex Code
2588 \begin_layout Plain Layout
2594 package, which is used for the creation of sectioned bibliographies in
2595 LyX (see the previous section), provides an easy way to solve this task,
2596 if you are willing to use some
2597 \begin_inset Flex MenuItem
2600 \begin_layout Plain Layout
2607 \begin_inset space ~
2611 \begin_inset CommandInset ref
2613 reference "sec:Inserting-TeX-Code"
2621 \begin_layout Plain Layout
2622 An alternative approach is to use the
2623 \begin_inset Flex Code
2626 \begin_layout Plain Layout
2633 \begin_inset Flex Code
2636 \begin_layout Plain Layout
2642 package, respectively.
2650 \begin_layout Standard
2652 \begin_inset Flex MenuItem
2655 \begin_layout Plain Layout
2656 Document\SpecialChar \menuseparator
2663 \begin_inset Flex MenuItem
2666 \begin_layout Plain Layout
2673 \begin_inset Flex MenuItem
2676 \begin_layout Plain Layout
2677 Sectioned bibliography
2683 In the document, you have to enclose the sections, which shall contain
2684 their own bibliography (including the BibTeX bibliography itself), between
2686 \begin_inset Flex Code
2689 \begin_layout Plain Layout
2698 \begin_inset Flex Code
2701 \begin_layout Plain Layout
2709 (those commands have to be inserted as TeX code).
2710 The bibliography will contain all references which have been cited in the
2712 \begin_inset Flex Code
2715 \begin_layout Plain Layout
2726 If you are using this approach, then every citation reference has to be
2728 \begin_inset Flex Code
2731 \begin_layout Plain Layout
2739 \begin_inset Flex Code
2742 \begin_layout Plain Layout
2751 \begin_layout Section
2755 \begin_layout Subsection
2759 \begin_layout Standard
2760 When you are working on a large file with many sections, it is often convenient
2761 to break up the document into several files, or perhaps you have something
2762 where a table may change from time to time, but the preceding text does
2764 In these cases, you should seriously consider using multipart documents.
2765 For example, scientific papers often have five major sections: the introduction
2766 , observations, results, discussion, and conclusion.
2767 Each of these could be its own separate LyX file, with one
2768 \begin_inset Quotes eld
2772 \begin_inset Quotes erd
2775 file which contains the title, authors, abstract, references, etc., plus
2776 the five included files.
2777 It is important to note that each of these files is a full LyX file which
2778 can be formatted and printed on its own, as well as included in a master
2780 Each of these files must have the same document class, however—don't attempt
2781 to mix book classes with article classes.
2782 You may also include LaTeX files; however, these files must not have their
2784 \begin_inset space \thinspace{}
2788 \begin_inset space \space{}
2791 everything up to and including the
2792 \begin_inset Flex Code
2795 \begin_layout Plain Layout
2804 \begin_inset Flex Code
2807 \begin_layout Plain Layout
2815 line must be deleted) or else errors will be generated when you try to
2819 \begin_layout Standard
2820 LyX allows you to include files quite easily with
2821 \begin_inset Flex MenuItem
2824 \begin_layout Plain Layout
2825 Insert\SpecialChar \menuseparator
2827 \begin_inset space ~
2836 When you click on this selection a small box is inserted into the file
2837 at the current cursor location.
2838 Clicking on the box raises a dialog which allows you to select the file
2839 to be included, and the method of its inclusion.
2843 \begin_layout Standard
2844 The file selection box should by now be obvious.
2845 The three inclusion methods are
2846 \begin_inset Quotes eld
2850 \begin_inset Quotes erd
2854 \begin_inset Quotes eld
2858 \begin_inset Quotes erd
2862 \begin_inset Quotes eld
2866 \begin_inset Quotes erd
2870 The difference between
2871 \begin_inset Quotes eld
2875 \begin_inset Quotes erd
2879 \begin_inset Quotes eld
2883 \begin_inset Quotes erd
2886 is really only meaningful to LaTeXperts, but the practical difference is
2887 that files which are
2888 \begin_inset Quotes eld
2892 \begin_inset Quotes erd
2895 are typeset beginning on a new page, while files which are
2896 \begin_inset Quotes eld
2900 \begin_inset Quotes erd
2903 are typeset starting on the current page.
2906 \begin_layout Standard
2907 Generally, the master file is converted into a full LaTeX file before typesettin
2908 g, while the included files are converted to LaTeX files which do not have
2909 all the preamble information.
2912 \begin_layout Standard
2914 \begin_inset Quotes eld
2918 \begin_inset Quotes erd
2921 included file allows you to include a file typeset exactly as it appears
2923 \begin_inset space \thinspace{}
2927 \begin_inset space \space{}
2931 \begin_inset Flex Code
2934 \begin_layout Plain Layout
2940 mode, with the characters set in a fixed-width typewriter font.
2941 Normally, spaces in this file are invisible, though two consecutive spaces
2942 are conserved, unlike LyX's normal treatment of spaces.
2943 However, setting the
2944 \begin_inset Flex MenuItem
2947 \begin_layout Plain Layout
2949 \begin_inset space ~
2953 \begin_inset space ~
2957 \begin_inset space ~
2965 checkbox typesets a mark to unambiguously define the presence of a space.
2969 \begin_layout Subsection
2970 Cross-References Between Files
2973 \begin_layout Standard
2974 \begin_inset Box Shadowbox
2984 height_special "totalheight"
2987 \begin_layout Plain Layout
2988 This section is somewhat out of date.
2989 Need to describe default master documents and how children are opened when
2999 \begin_layout Standard
3000 It is possible to set up cross-references between the different files.
3001 First, open all the files in question: let's call them A and B in a two
3002 file example, where B is included in A.
3003 Let's say you insert a label in A, then want to reference it in B.
3004 Open the cross-reference dialog in whilst in document B, and you can select
3006 \begin_inset Quotes eld
3010 \begin_inset Quotes erd
3016 \begin_layout Subsection
3017 Bibliography Lists in all Subdocuments
3020 \begin_layout Standard
3021 \begin_inset Box Frameless
3031 height_special "totalheight"
3034 \begin_layout Plain Layout
3035 This section also needs updating.
3036 There is now material about this on the wiki, and it could be copied here.
3044 \begin_layout Standard
3045 Copy the bibliography list with all entries to all subdocuments and transform
3047 This way LyX will find the
3048 \begin_inset Flex Code
3051 \begin_layout Plain Layout
3057 -files and you can easily insert references without making the bibliography
3061 \begin_layout Standard
3062 As the bibliography list is in a comment, LaTeX won't use use it and the
3063 references will look like this: [?], instead of like this: [1].
3064 One solution is to use the LaTeX-package
3065 \begin_inset Flex Code
3068 \begin_layout Plain Layout
3074 that will only include comments by processing the files separately.
3075 To do this, add in the LaTeX preamble of every subdocument the following:
3078 \begin_layout LyX-Code
3084 \begin_layout LyX-Code
3087 includecomment{comment}
3090 \begin_layout Standard
3092 \begin_inset Flex URL
3095 \begin_layout Plain Layout
3097 http://wiki.lyx.org/FAQ/Unsorted#toc31
3105 \begin_layout Section
3109 \begin_layout Standard
3110 Users sometimes need to be able to
3111 \begin_inset Quotes eld
3115 \begin_inset Quotes erd
3118 a LyX file together with all the images (and other files) on which it depends,
3119 either for sending to a publisher or for sharing with a co-author.
3120 LyX 2.0 includes a Python script (
3121 \begin_inset Flex Code
3124 \begin_layout Plain Layout
3130 ) that automates this process.
3131 To use it, you must have either the
3132 \begin_inset Flex Code
3135 \begin_layout Plain Layout
3142 \begin_inset Flex Code
3145 \begin_layout Plain Layout
3151 python modules installed on your system.
3152 By default, the script prefers the
3153 \begin_inset Flex Code
3156 \begin_layout Plain Layout
3163 \begin_inset Flex Code
3166 \begin_layout Plain Layout
3172 format on Unix-like systems and the
3173 \begin_inset Flex Code
3176 \begin_layout Plain Layout
3185 \begin_layout Standard
3186 LyX's configuration process will set the script up to export a `LyX Archive',
3187 and this format will then be available under
3188 \begin_inset Flex Code
3191 \begin_layout Plain Layout
3192 File\SpecialChar \menuseparator
3201 \begin_layout Standard
3202 Independently of the platform, the generation of a particular archive format
3203 can be forced by adding either the
3204 \begin_inset Flex Code
3207 \begin_layout Plain Layout
3214 \begin_inset Flex Code
3217 \begin_layout Plain Layout
3224 \begin_inset Flex Code
3227 \begin_layout Plain Layout
3234 \begin_inset Flex Code
3237 \begin_layout Plain Layout
3243 format) switch to the
3244 \begin_inset Flex Code
3247 \begin_layout Plain Layout
3248 LyX\SpecialChar \menuseparator
3255 \begin_inset Flex Code
3258 \begin_layout Plain Layout
3259 Tools\SpecialChar \menuseparator
3260 Preferences\SpecialChar \menuseparator
3261 File Handling\SpecialChar \menuseparator
3268 (Make sure you add the switch after the script name, not before it.)
3271 \begin_layout Section
3272 Fancy Headers and Footers
3275 \begin_layout Standard
3276 The default page layout is rather plain; for an
3277 \begin_inset Flex Code
3280 \begin_layout Plain Layout
3286 document class, all you get is a centered page number at the bottom of
3288 This document uses KOMA-script's book class, so it appears to be a bit
3290 But to really put on a show, you need to set the document page style to
3292 \begin_inset Quotes eld
3296 \begin_inset Quotes erd
3299 , as mentioned in the
3304 This section describes the LaTeX code you need to insert in your LaTeX
3305 preamble in order to get the desired effects.
3308 \begin_layout Standard
3309 For more information on fancy headers, see the
3310 \begin_inset Flex Code
3313 \begin_layout Plain Layout
3319 package documentation.
3321 \begin_inset Flex URL
3324 \begin_layout Plain Layout
3326 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3334 \begin_layout Standard
3335 The page header is divided into three fields, not surprisingly labeled
3336 \begin_inset Quotes eld
3340 \begin_inset Quotes erd
3344 \begin_inset Quotes eld
3348 \begin_inset Quotes erd
3352 \begin_inset Quotes eld
3356 \begin_inset Quotes erd
3360 The footer is also divided into these three fields.
3361 The LaTeX commands to set these fields in the simplest manner are
3362 \begin_inset Flex Code
3365 \begin_layout Plain Layout
3374 \begin_inset Flex Code
3377 \begin_layout Plain Layout
3386 \begin_inset Flex Code
3389 \begin_layout Plain Layout
3398 \begin_inset Flex Code
3401 \begin_layout Plain Layout
3410 Suppose you wish to put your name in the upper left hand corner of each
3412 Simply insert the following command in the preamble:
3415 \begin_layout Standard
3424 \begin_layout Standard
3425 You will now see your name in the upper left.
3426 If a field has a default entry that you would like to get rid of (often
3427 the page number appears in the central footer, simply include a command
3428 with a blank argument, e.
3429 \begin_inset space \thinspace{}
3435 \begin_layout Standard
3443 \begin_layout Standard
3444 Let's get really fancy: lets put the section number with the word
3445 \begin_inset Quotes eld
3449 \begin_inset Quotes erd
3453 \begin_inset space \thinspace{}
3457 \begin_inset space \space{}
3460 Section 3) in the upper left, the page number (e.
3461 \begin_inset space \thinspace{}
3465 \begin_inset space \space{}
3468 Page 4) in the upper right, your name in the lower left, and the date in
3470 The following commands should now appear in the preamble:
3473 \begin_layout Standard
3483 \begin_layout Standard
3491 \begin_layout Standard
3501 \begin_layout Standard
3510 \begin_layout Standard
3518 \begin_layout Standard
3528 \begin_layout Standard
3530 \begin_inset Flex Code
3533 \begin_layout Plain Layout
3542 \begin_inset Flex Code
3545 \begin_layout Plain Layout
3553 access LaTeX's section and page counters, and so print out the current
3554 section and page numbers.
3556 \begin_inset Flex Code
3559 \begin_layout Plain Layout
3567 simply prints out today's date.
3570 \begin_layout Standard
3571 The thicknesses of the horizontal rules drawn beneath the header and above
3572 the footer can also be modified.
3573 If you don't want one of the rules, set its thickness to 0.
3574 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3580 \begin_inset Flex Code
3583 \begin_layout Plain Layout
3588 headrulewidth}{0.4pt}
3594 \begin_inset Flex Code
3597 \begin_layout Plain Layout
3602 footrulewidth}{0.4pt}
3607 to set the thicknesses.
3610 \begin_layout Standard
3611 You can switch the header/footer settings on and off for individual pages
3613 \begin_inset Flex Code
3616 \begin_layout Plain Layout
3619 thispagestyle{empty}
3625 \begin_inset Flex Code
3628 \begin_layout Plain Layout
3631 thispagestyle{plain}
3637 \begin_inset Flex Code
3640 \begin_layout Plain Layout
3643 thispagestyle{fancy}
3649 Simply insert them in the text on the page you want changed and mark them
3651 In fact, title pages are marked as plain by default, while following pages
3652 are marked fancy when using the global fancy setting.
3655 \begin_layout Standard
3656 As a final example, it is possible to include an image in the header or
3658 Suppose you want to put a company logo in the upper lefthand corner.
3659 You might try something like
3662 \begin_layout Standard
3671 includegraphics{logo.eps}}}
3674 \begin_layout Standard
3676 (you may need to preface this with
3677 \begin_inset Flex Code
3680 \begin_layout Plain Layout
3684 usepackage{graphics}
3689 if you don't include graphics elsewhere in your document).
3692 \begin_layout Section
3693 Itemize Bullet Selection
3694 \begin_inset CommandInset label
3703 \begin_layout Standard
3709 \begin_layout Subsection
3713 \begin_layout Standard
3714 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3715 Using this dialog you can easily specify what bullet shape to use at each
3716 level of an itemized list.
3717 These settings are document-wide so you won't be able to specify different
3718 sets of bullets for different paragraphs.
3722 \begin_layout Plain Layout
3723 Well, actually you can but you'll have to do it by hand.
3731 \begin_layout Subsection
3735 \begin_layout Standard
3736 Open the dialog by selecting the
3737 \begin_inset Flex MenuItem
3740 \begin_layout Plain Layout
3741 Document\SpecialChar \menuseparator
3747 menu item and then select the
3748 \begin_inset Flex MenuItem
3751 \begin_layout Plain Layout
3760 \begin_layout Standard
3761 The dialog provides you with a table of bullet shapes.
3762 A column of buttons on the left of the table provides access to the six
3763 different panels of bullet shapes.
3764 The row of buttons across the top is used to select which bullet depth
3766 A text entry under the table shows the currently selected bullet shape's
3767 LaTeX equivalent and this can be edited if desired.
3768 If you do modify the text you will also need to specify any needed packages
3769 in the LaTeX preamble.
3772 \begin_layout Standard
3773 The six panels are divided up by the packages they require.
3774 The following table shows the mappings from button name to LaTeX packages.
3777 \begin_layout Standard
3779 \begin_inset Tabular
3780 <lyxtabular version="3" rows="7" columns="2">
3781 <features tabularvalignment="middle">
3782 <column alignment="center" valignment="top" width="0pt">
3783 <column alignment="center" valignment="top" width="0pt">
3785 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3788 \begin_layout Plain Layout
3803 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3806 \begin_layout Plain Layout
3823 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3826 \begin_layout Plain Layout
3841 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3844 \begin_layout Plain Layout
3860 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3863 \begin_layout Plain Layout
3878 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3881 \begin_layout Plain Layout
3898 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3901 \begin_layout Plain Layout
3916 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3919 \begin_layout Plain Layout
3936 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3939 \begin_layout Plain Layout
3954 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3957 \begin_layout Plain Layout
3974 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3977 \begin_layout Plain Layout
3992 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3995 \begin_layout Plain Layout
4012 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4015 \begin_layout Plain Layout
4030 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4033 \begin_layout Plain Layout
4056 \begin_layout Standard
4057 LyX doesn't stop you using bullets from packages you don't have.
4058 If you get errors from LaTeX when you try to view or print the file, then
4059 it is likely you are missing a package.
4063 \begin_layout Plain Layout
4064 LyX doesn't restrict your use since you may be editing locally and exporting
4073 \begin_layout Subsection
4077 \begin_layout Standard
4078 Select which bullet depth you want to change then select the bullet shape
4080 Any changes will not be visible in LyX, but are visible when viewing the
4084 \begin_layout Standard
4085 You can reset a bullet shape to the default simply by clicking your right
4086 mouse button on the appropriate bullet depth button.
4090 \begin_layout Plain Layout
4095 want to have multiple sets of paragraphs with different sets of bullets
4096 in each, then you're going to have to get your hands dirty with TeX code.
4097 The bullet selection dialog can help though because it provides you with
4098 the LaTeX code for a wide range of bullet shapes.
4099 To make your own custom paragraphs you have the following options:
4102 \begin_layout Plain Layout
4106 \begin_layout Plain Layout
4122 \begin_layout Plain Layout
4126 \begin_layout Plain Layout
4148 \begin_layout Itemize
4149 Use the LaTeX command
4150 \begin_inset Flex Code
4153 \begin_layout Plain Layout
4161 to specify a new bullet shape for a given depth.
4162 You'll also need to save the current bullet shape so you can restore it
4164 In this itemized list the following LaTeX code was used to change the bullet
4165 used for the first depth.
4169 \begin_layout LyX-Code
4179 \begin_layout LyX-Code
4196 \begin_layout Itemize
4197 Note that the itemize depth is specified in Roman numerals as part of the
4207 \begin_layout Itemize
4211 \begin_layout Plain Layout
4224 Specify each individual entry by starting each item with the bullet shape
4225 enclosed in square brackets and set as
4226 \begin_inset Flex MenuItem
4229 \begin_layout Plain Layout
4236 For example, this item was started with
4237 \begin_inset Flex Code
4240 \begin_layout Plain Layout
4255 \begin_layout Plain Layout
4259 \begin_layout Plain Layout
4275 \begin_layout Plain Layout
4276 You'll also need to revert the labelitem back to its previous setting for
4277 the global bullet shape settings to remain in effect.
4278 The way used here was:
4281 \begin_layout LyX-Code
4296 \begin_layout Chapter
4297 LyX and the World Wide Web
4300 \begin_layout Standard
4301 LyX has long supported the export of documents to various web-friendly formats,
4303 Before verson 2.0, however, HTML export was always accomplished by the use
4304 of external converters.
4308 \begin_layout Plain Layout
4309 For details on the use of external converters with LyX, see the
4313 section of the Customization manual.
4318 These fall into two large groups: there are converters that use LaTeX as
4319 an intermediate format, such as
4320 \begin_inset Flex Code
4323 \begin_layout Plain Layout
4330 \begin_inset Flex Code
4333 \begin_layout Plain Layout
4340 \begin_inset Flex Code
4343 \begin_layout Plain Layout
4349 , relying upon LyX to produce the LaTeX; and there is a converter that works
4350 directly on LyX files,
4351 \begin_inset Flex Code
4354 \begin_layout Plain Layout
4361 All of these have different advantages and disadvantages.
4365 \begin_layout Standard
4366 The LaTeX-based converters have the advantage that, in principle, they know
4367 everything about the exported document that LaTeX does.
4368 Such converters do not care, for example, if a certain block of code was
4369 produced by LyX or was Evil Red Text.
4370 These converters know about
4371 \begin_inset Flex Code
4374 \begin_layout Plain Layout
4380 files, counters, and references, and can often make use of the
4381 \begin_inset Flex Code
4384 \begin_layout Plain Layout
4390 files generated by BibTeX.
4391 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4392 said that only TeX itself understands TeX---and LaTeX-based converters
4393 will often choke on what seem to be quite simple constructs; complex ones
4394 can throw them completely, and as of this writing, for example, the
4398 manual will not export with
4399 \begin_inset Flex Code
4402 \begin_layout Plain Layout
4408 , though the others will.
4409 The other issue concerns how math is handled.
4410 These converters typically convert the formulae into little pictures that
4411 are then linked from the HTML document.
4412 Since these are actually generated by LaTeX, they are accurate.
4413 But they do not scale well, and just getting them to look as if they are
4414 actually meant to be in your document---so that the font sizes seem to
4415 be roughly the same---can be a challenge.
4418 \begin_layout Standard
4420 \begin_inset Flex Code
4423 \begin_layout Plain Layout
4430 \begin_inset CommandInset href
4432 name "http://elyxer.nongnu.org/"
4433 target "http://elyxer.nongnu.org/"
4437 ) solves some of these problems.
4438 In particular, the formulae it produces scale perfectly, since it renders
4439 math using a combination of HTML and CSS rather than converting the formulae
4441 But even moderately complex formula are rendered less well than with
4442 \begin_inset Flex Code
4445 \begin_layout Plain Layout
4451 ; this reflects the limitations of HTML.
4455 \begin_layout Plain Layout
4457 \begin_inset Flex Code
4460 \begin_layout Plain Layout
4466 can also use jsMath and MathJax for equations, but this setting is only
4467 available globally and requires one to have access to a server that runs
4473 More importantly (as of version 1.1.1, at least),
4474 \begin_inset Flex Code
4477 \begin_layout Plain Layout
4483 has limited support for math macros and no support for user-defined paragraph
4484 or character styles.
4485 These limitations make
4486 \begin_inset Flex Code
4489 \begin_layout Plain Layout
4495 unsuitable for many of the documents LyX users produce.
4496 In principle, of course, these problems could be solved, but the LyX developers
4497 have decided to follow a different path and have made LyX itself capable
4498 of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4502 \begin_layout Standard
4503 As of this writing, XHTML output remains under development and should probably
4505 \begin_inset Quotes eld
4509 \begin_inset Quotes erd
4516 \begin_layout Plain Layout
4518 \begin_inset Flex Code
4521 \begin_layout Plain Layout
4522 development/HTML.notes
4527 , which can be found in the LyX source tree or
4528 \begin_inset CommandInset href
4530 name "accessed online"
4531 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4535 , usually contains up-to-date information about the state of XHTML output.
4536 See also the list of XHTML bugs on
4537 \begin_inset CommandInset href
4539 name "the bug tracker"
4540 target "http://www.lyx.org/trac/query?status=reopened&status=assigned&status=new&max=0&component=xhtml+export&order=id&col=id&col=summary&col=reporter&col=keywords&keywords=%21%7Efixedintrunk&desc=1"
4549 Still, the developers have chosen this approach because it has several
4550 potential advantages over the other two.
4553 \begin_layout Standard
4554 These advantages are primarily due to the fact that the XHTML output routines,
4555 since they are part of LyX, know everything LyX knows about the document
4560 \begin_layout Plain Layout
4561 Another advantage is that, since these routines are internal to LyX, they
4562 are immune to changes in LyX's file format, or to changes in the semantics
4568 So they know about the table of contents (as displayed in the outline),
4569 about the counters associated with different paragraph styles, and about
4570 user-defined styles.
4571 The XHTML output routines know what LyX knows about internationalization,
4572 too, so they will output
4573 \begin_inset Quotes eld
4577 \begin_inset Quotes erd
4581 \begin_inset Quotes eld
4589 \begin_inset Quotes erd
4592 , depending upon the language in effect at the time.
4596 \begin_layout Standard
4597 Quite generally, the output routines know what LyX knows about document
4598 layout, that is, about how the document is to be rendered on screen.
4599 We use this information when we output the document as XHTML.
4604 generates CSS style information corresponding to the layout information
4605 it uses to render the document on screen: if section headings are supposed
4606 to be sans-serif and bold as seen in LyX, then (by default) they will be
4607 sans-serif and bold when viewed in a web browser, too.
4608 And this is true not just for pre-defined styles, like Section, but for
4609 any style, including user-defined styles.
4610 Indeed, the XHTML output routines make no distinction between user-defined
4611 paragraph and character styles and LyX's own pre-defined styles: in each
4612 case, everything LyX knows about the styles is contained in the layout
4614 And much the same is true as regards pre-defined textual insets, such as
4615 footnotes, and various custom insets.
4619 \begin_layout Standard
4620 The result is that XHTML output can be customized and extended in exactly
4621 the same way LaTeX output can be customized and extended: through layout
4623 See chapter five of the
4627 manual for the details.
4630 \begin_layout Standard
4631 The remainder of this chapter contains more detailed information on XHTML
4632 output, its limitations, and ways to work around those limitations.
4635 \begin_layout Section
4636 Math Output in XHTML
4639 \begin_layout Standard
4640 LyX offers four choices for how math is rendered.
4641 These have various advantages and disadvantages:
4644 \begin_layout Itemize
4646 \begin_inset Newline newline
4649 MathML is a dialect of XML designed specifically for mathematics on the
4650 web, and it typically renders very well in browsers that support it.
4651 The disadvantage is that not all browsers support MathML, and support is
4652 not complete even in the Gecko-based browsers, such as Firefox.
4653 \begin_inset Newline newline
4656 If LyX is unable to render a formula as MathML---for example, if the formula
4658 \begin_inset Flex Code
4661 \begin_layout Plain Layout
4667 package or ERT---then it will instead output the formula as an image.
4671 \begin_layout Itemize
4673 \begin_inset Newline newline
4677 \begin_inset Flex Code
4680 \begin_layout Plain Layout
4686 outputs math as HTML, styled by CSS.
4690 \begin_layout Plain Layout
4691 LyX has borrowed some of the CSS for its HTML output from
4692 \begin_inset Flex Code
4695 \begin_layout Plain Layout
4706 For simple formulae, this can work quite well, though with more complicated
4707 formulae it tends to break down.
4708 Still, this method has the advantage that it is very widely supported and
4709 so it may be appropriate for documents that contain only a little, fairly
4711 \begin_inset Newline newline
4714 If Lyx is unable to render a formula as HTML---for example, if the formula
4716 \begin_inset Flex Code
4719 \begin_layout Plain Layout
4725 package or ERT---then it will instead output the formula as an image.
4729 \begin_layout Itemize
4731 \begin_inset Newline newline
4735 \begin_inset Flex Code
4738 \begin_layout Plain Layout
4744 , LyX will output formulae as images, the very same images, in fact, that
4745 are used for instant preview.
4749 \begin_layout Plain Layout
4750 Instant preview does
4754 have to be on for images to be output, however.
4759 The advantage to this method is that the images are simply generated by
4760 LaTeX, so they are very accurate.
4761 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4762 so they do not scale terribly well, and one cannot copy them, etc.
4763 (As of this writing, there are also problems about equation numbering.
4765 \begin_inset CommandInset href
4768 target "http://www.lyx.org/trac/ticket/6894"
4773 \begin_inset Newline newline
4776 The size of the images can be controlled by setting the
4777 \begin_inset Quotes eld
4781 \begin_inset Quotes erd
4785 \begin_inset Flex MenuItem
4788 \begin_layout Plain Layout
4789 Document\SpecialChar \menuseparator
4790 Settings\SpecialChar \menuseparator
4800 \begin_layout Plain Layout
4801 For those who want to know, this controls the resolution of the image in
4802 dots per inch and is based upon a default of 75 dpi.
4808 \begin_inset Newline newline
4811 If LyX for some reason fails to create an image for a formula (e.g., if a
4812 required LaTeX package is not installed), then it will fall back to outputing
4816 \begin_layout Itemize
4818 \begin_inset Newline newline
4821 Finally, LyX will happily output math as LaTeX.
4822 As well as being the output of last resort, this method can be used with
4824 \begin_inset CommandInset href
4827 target "http://www.math.union.edu/~dpvc/jsMath/"
4831 , which uses JavaScript to render LaTeX embedded in HTML documents.
4832 LyX wraps the LaTeX in either a
4833 \begin_inset Flex Code
4836 \begin_layout Plain Layout
4842 (for inline formulas) or
4843 \begin_inset Flex Code
4846 \begin_layout Plain Layout
4852 (for displayed formulas) with
4853 \begin_inset Flex Code
4856 \begin_layout Plain Layout
4862 , as is required for jsMath.
4865 \begin_layout Standard
4866 One of these output methods must be selected under
4867 \begin_inset Flex MenuItem
4870 \begin_layout Plain Layout
4871 Document\SpecialChar \menuseparator
4872 Settings\SpecialChar \menuseparator
4879 By default, LyX outputs MathML.
4880 This is a document-wide setting, therefore.
4883 \begin_layout Standard
4884 Eventually, LyX will offer the user the option to select an alternate output
4885 method for a particular inset, say, one that isn't being rendered very
4890 \begin_layout Plain Layout
4891 That said, since LyX falls back to images if the inset contains ERT, then
4892 one can force output as an image by putting some harmless ERT into the
4894 \begin_inset Formula $a=b\relax$
4905 \begin_layout Section
4906 Bibliography and Citations
4909 \begin_layout Standard
4910 XHTML output fully supports bibliographies and citations.
4914 \begin_layout Standard
4915 Citation labels are generated by the same machinery that generates LyX's
4916 on-screen labels, so the labels will look in the output much as they do
4917 in LyX, though better.
4918 If you are using numerical citations, then LyX will output numerical labels,
4919 such as [1] or [17], rather than simply showing the citation key in square
4920 brackets, as it does on-screen.
4921 If you are using author-year citations, then LyX will add lowercase letters
4922 to the years, just as BibTeX does, if it finds more than one citation for
4923 a given author-year combination.
4924 The labels will be printed with the bibliography entries.
4925 Note that there is, at present, no way to customize the appearance of the
4926 labels, for example, to choose between square brackets and parentheses.
4929 \begin_layout Standard
4930 Bibliography output is handled by the same machinery that handles the presentati
4931 on of reference information in the citation dialog, so you will see in the
4932 XHTML output pretty much what you would see if you were to look at a given
4933 entry in the citation dialog.
4934 The formatting can be customized in your layout file or, preferably, in
4940 manual for the details.
4943 \begin_layout Standard
4944 The main defect at present is that cross-referenced information is printed
4945 with every entry with which it is associated.
4946 So you can see things like this:
4951 \begin_inset Quotes eld
4954 Context and Logical Form
4955 \begin_inset Quotes erd
4960 Language in Context: Selected Essays
4962 (Oxford: Oxford University Press, 2007), pp.
4968 \begin_inset Quotes eld
4971 Semantics in Context
4972 \begin_inset Quotes erd
4977 Language in Context: Selected Essays
4979 (Oxford: Oxford University Press, 2007), pp.
4983 \begin_layout Standard
4984 This should be fixed before long.
4987 \begin_layout Standard
4988 There is no support at present for sectioned bibliographies.
4989 If you have multiple bibliographies, then LyX will print the same bibliography
4993 \begin_layout Section
4997 \begin_layout Standard
4998 LyX will happily export indexes as XHTML, but with certain limitations at
5002 \begin_layout Standard
5003 Index export will be most reliable when you do not attempt to use the fancy
5004 constructs that are described in the section on indexes in the
5012 \begin_layout Plain Layout
5013 The main issue here is that LyX itself does not really handle these.
5014 It just lets you enter what you would have to enter in raw LaTeX.
5019 We'll describe how they are handled using the subsection headings from
5023 \begin_layout Itemize
5024 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5025 these, but the entries must be separated by
5026 \begin_inset Quotes eld
5030 \begin_inset Quotes erd
5033 , that is, there must be spaces around the exclamation point.
5034 This is because it is otherwise too difficult to check for escaped exclamation
5035 points, ones in math, and so forth.
5038 \begin_layout Itemize
5039 Page Ranges: There is no support at all for page ranges, since these make
5040 no sense with XHMTL.
5041 Instead, you will just get two index entries, one at either end.
5044 \begin_layout Itemize
5045 Cross-referencing: There is no support for cross-referencing.
5046 If LyX finds an entry containing the
5047 \begin_inset Quotes eld
5050 |see\SpecialChar \ldots{}
5052 \begin_inset Quotes erd
5055 construct, it is just dropped, and the rest is treated as an ordinary index
5059 \begin_layout Itemize
5060 Index Entry Order: LyX does support attempts to fix the sorting order.
5061 It will take what is before the first `@' it finds and use that for sorting,
5062 taking what follows the first `@' to be the actual entry.
5063 At present, LyX does not check for escaped `@', so do not try to index
5067 \begin_layout Itemize
5068 Index Entry Layout: You can format entries by using the text style dialog,
5069 or by using any other method available within LyX itself.
5070 There is no support for constructs like:
5071 \begin_inset Quotes eld
5075 \begin_inset Quotes erd
5079 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5080 and everything that follows it.
5083 \begin_layout Itemize
5084 Multiple Indexes: There is no support for multiple indexes.
5085 Rather, all index entries will be printed as one large index.
5086 To avoid our printing several versions of the index, we print only the
5087 main index, so make sure you have one.
5090 \begin_layout Section
5091 Nomenclature and Glossary
5094 \begin_layout Standard
5095 There is at present no support for glossaries.
5096 Adding it would be fairly trivial, and welcome.
5099 \begin_layout Chapter
5103 \begin_layout Section
5107 \begin_layout Standard
5108 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5109 and retrieve information about the LyX internal state.
5110 This is only intended for advanced users, but they should find it useful.
5111 It is by writing to the LyX server, for example, that bibliography managers,
5112 such as JabRef, are able to
5113 \begin_inset Quotes eld
5117 \begin_inset Quotes erd
5123 \begin_layout Section
5124 Starting the LyX Server
5127 \begin_layout Standard
5128 The LyX server works through the use of a pair of named pipes.
5129 These are usually located in
5130 \begin_inset Flex Code
5133 \begin_layout Plain Layout
5139 , (except on Windows, where
5143 named pipes are special objects located in
5144 \begin_inset Flex Code
5147 \begin_layout Plain Layout
5159 ) and have the names
5160 \begin_inset Quotes eld
5164 \begin_inset Flex Code
5167 \begin_layout Plain Layout
5174 \begin_inset Quotes erd
5178 \begin_inset Quotes eld
5182 \begin_inset Flex Code
5185 \begin_layout Plain Layout
5192 \begin_inset Quotes erd
5196 External programs write into
5197 \begin_inset Flex Code
5200 \begin_layout Plain Layout
5206 and read back data from
5207 \begin_inset Flex Code
5210 \begin_layout Plain Layout
5217 The stem of the pipe names can be defined in the
5218 \begin_inset Flex MenuItem
5221 \begin_layout Plain Layout
5222 Tools\SpecialChar \menuseparator
5229 \begin_inset Flex Code
5232 \begin_layout Plain Layout
5233 "/home/myhome/lyxpipe"
5239 \begin_inset Flex Code
5242 \begin_layout Plain Layout
5256 on Windows (but any working path can be used).
5261 configure this manually in order for the server to start.
5264 \begin_layout Standard
5266 \begin_inset Flex Code
5269 \begin_layout Plain Layout
5276 \begin_inset Flex Code
5279 \begin_layout Plain Layout
5285 ' to create the pipes.
5286 If one of the pipes already exists, LyX will assume that another LyX process
5287 is already running and will not start the server.
5288 On POSIX (Unix like) systems, if for some other reason, an unused
5289 \begin_inset Quotes eld
5293 \begin_inset Quotes erd
5296 pipe is left in existence when LyX closes, then LyX will try to delete
5298 If this fails for some reason, you will need to delete the pipes manually
5299 and then restart LyX.
5300 On Windows, pipes are deleted by the OS on program termination or crash,
5302 \begin_inset Quotes eld
5306 \begin_inset Quotes erd
5309 pipes should not be possible.
5312 \begin_layout Standard
5313 To have several LyX processes with servers at the same time, you have to
5314 use different configurations, perhaps by using separate user directories,
5316 \begin_inset Flex Code
5319 \begin_layout Plain Layout
5325 file, for each process.
5328 \begin_layout Standard
5329 If you are developing a client program, you might find it useful to enable
5330 debugging information from the LyX server.
5331 Do this by starting LyX as
5332 \begin_inset Flex Code
5335 \begin_layout Plain Layout
5344 \begin_layout Standard
5345 You can find a complete example client written in C in the source distribution
5347 \begin_inset Flex Code
5350 \begin_layout Plain Layout
5351 development/lyxserver/server_monitor.c
5359 \begin_layout Standard
5360 Another useful tool is command-line based client you will find in
5361 \begin_inset Flex Code
5364 \begin_layout Plain Layout
5365 src/client/lyxclient
5373 \begin_layout Section
5374 Normal communication
5377 \begin_layout Standard
5378 To issue a LyX call, the client writes a line of ASCII text into the input
5380 This line has the following format:
5397 \begin_layout Description
5398 clientname is a name that the client can choose arbitrarily.
5399 Its only use is that LyX will echo it if it sends an answer—so a client
5400 can dispatch results from different requesters.
5403 \begin_layout Description
5404 function is the function you want LyX to perform.
5405 It is the same as the commands you'd use in the minibuffer.
5408 \begin_layout Description
5409 argument is an optional argument which is meaningful only to some functions
5411 \begin_inset Quotes eld
5415 \begin_inset Quotes erd
5418 LFUN will insert the argument as text at the cursor position).
5421 \begin_layout Standard
5422 The answer from LyX will arrive in the output pipe and be of the form
5439 \begin_layout Standard
5448 are just echoed from the command request, while
5452 is more or less useful information filled according to how the command
5453 execution worked out.
5454 Some commands, such as
5455 \begin_inset Quotes eld
5459 \begin_inset Quotes erd
5462 , will return information about the internal state of LyX, while other will
5463 return an empty data-response.
5464 This means that the command execution went fine.
5467 \begin_layout Standard
5468 In case of errors, the response from LyX will have this form
5485 \begin_layout Standard
5490 should contain an explanation of why the command failed.
5493 \begin_layout Standard
5497 \begin_layout LyX-Code
5498 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5499 \begin_inset Newline newline
5502 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5503 \begin_inset Newline newline
5506 read a <~/.lyxpipe.out
5507 \begin_inset Newline newline
5513 \begin_layout Section
5517 \begin_layout Standard
5518 LyX can notify clients of events going on asynchronously.
5519 Currently it will only do this if the user binds a key sequence with the
5521 \begin_inset Quotes eld
5525 \begin_inset Quotes erd
5529 The format of the string LyX sends is as follows:
5533 \begin_inset Flex Code
5536 \begin_layout Plain Layout
5547 \begin_layout Standard
5552 is the printed representation of the key sequence that was actually typed
5556 \begin_layout Standard
5557 This mechanism can be used to extend LyX's command set and implement macros.
5558 Bind some key sequence to
5559 \begin_inset Quotes eld
5563 \begin_inset Quotes erd
5567 Then start a client that listens on the output pipe, dispatches the command
5568 according to the sequence, and starts a function that may use LyX calls
5569 and LyX requests to issue a command or a series of commands to LyX.
5572 \begin_layout Section
5573 The simple LyX Server Protocol
5576 \begin_layout Standard
5577 LyX implements a simple protocol that can be used for session management.
5578 All messages are of the form
5591 \begin_layout Standard
5597 \begin_inset Quotes eld
5601 \begin_inset Quotes erd
5605 \begin_inset Quotes eld
5609 \begin_inset Quotes erd
5614 \begin_inset Quotes eld
5618 \begin_inset Quotes erd
5621 is received from a client, LyX will report back to inform the client that
5622 it's listening to it's messages, while
5623 \begin_inset Quotes eld
5627 \begin_inset Quotes erd
5630 sent from LyX will inform clients that LyX is closing.
5633 \begin_layout Section
5634 Reverse DVI/PDF search
5637 \begin_layout Standard
5638 Some DVI/PDF viewers
5642 \begin_layout Plain Layout
5643 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5644 Skim on Mac OSX and SumatraPDF on Windows.
5653 facility (also called
5658 This means that you can tell LyX to put the cursor to a specific line in
5659 the document by clicking at the respective position in the DVI/PDF output.
5660 To achieve this, the viewer must be able to communicate with LyX.
5661 This is done via the LyX server either by using the named pipe (
5665 ), or the UNIX domain socket (
5669 ) that LyX creates in its temporary directory (this is the way the
5670 \begin_inset Flex Code
5673 \begin_layout Plain Layout
5679 program communicates with LyX).
5680 In some cases, you need a helper script that mediates between the viewer
5681 and LyX, in others, the viewer can communicate with LyX directly.
5682 This depends on the selected viewer and on your operating system.
5683 The same applies to the way viewers need to be configured and the way the
5684 reverse search is actually performed.
5685 In what follows, we will thus describe how to setup reverse search for
5687 Before we turn to this, though, we will explain what needs to be done generally
5688 to enable reverse search in the DVI/PDF output.
5691 \begin_layout Subsection
5693 \begin_inset CommandInset label
5695 name "sub:rev-search"
5702 \begin_layout Standard
5703 In most cases LyX will do the work for you by enabling the option
5704 \begin_inset Flex MenuItem
5707 \begin_layout Plain Layout
5708 Synchronize with Output
5714 \begin_inset Flex MenuItem
5717 \begin_layout Plain Layout
5718 Document\SpecialChar \menuseparator
5719 Settings\SpecialChar \menuseparator
5726 In such a case LyX will automatically insert the necessary SyncTeX macro
5727 (for PDF) or load the srcltx package (for DVI) respectively.
5728 This option can be easily reached also on
5729 \begin_inset Flex Code
5732 \begin_layout Plain Layout
5741 \begin_layout Standard
5742 If you need a different setting, you can select or input a custom macro
5743 from the drop down box just below
5744 \begin_inset Flex MenuItem
5747 \begin_layout Plain Layout
5748 Document\SpecialChar \menuseparator
5749 Settings\SpecialChar \menuseparator
5750 Output\SpecialChar \menuseparator
5751 Synchronize with Output
5759 \begin_layout Standard
5760 Please note that including the
5761 \begin_inset Flex Code
5764 \begin_layout Plain Layout
5771 \begin_inset Flex Code
5774 \begin_layout Plain Layout
5780 sometimes has an undesired impact on the typesetting.
5781 Thus, you should switch output synchronization off for the final typesetting
5783 \begin_inset Flex Code
5786 \begin_layout Plain Layout
5793 \begin_inset Flex Code
5796 \begin_layout Plain Layout
5805 \begin_layout Standard
5806 In case you need some more special settings that are not covered by the
5807 automatic settings, read the next section about how to set up output synchroniz
5809 If the automatic setup suits your needs, you can readily jump to section
5810 \begin_inset space ~
5814 \begin_inset CommandInset ref
5816 reference "sub:configuring-viewers"
5820 , where the necessary configuration steps in your viewer -- needed both
5821 with the automatic and the manual setup -- are described.
5824 \begin_layout Subsection
5828 \begin_layout Standard
5829 LaTeX provides several different methods for reverse search.
5830 Some are built-in in the
5831 \begin_inset Flex Code
5834 \begin_layout Plain Layout
5840 program, some are provided by external packages.
5841 Your choice depends on whether your LaTeX distribution already provides
5842 a given method (the built-in methods are rather new) and whether your viewer
5844 The available methods are described in the following.
5847 \begin_layout Subsubsection*
5848 Built-in DVI-search via src-specials (DVI only)
5851 \begin_layout Standard
5852 This method provides the DVI file with the necessary information for reverse
5854 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5855 distribution should include it), and it works reliably.
5856 To enable it, change the
5857 \begin_inset Flex MenuItem
5860 \begin_layout Plain Layout
5865 \begin_layout Plain Layout
5878 \begin_inset Flex MenuItem
5881 \begin_layout Plain Layout
5886 \begin_layout Plain Layout
5893 eX (plain)->DraftDVI
5899 \begin_inset Flex MenuItem
5902 \begin_layout Plain Layout
5903 Preferences\SpecialChar \menuseparator
5904 File Handling\SpecialChar \menuseparator
5911 \begin_inset Flex Code
5914 \begin_layout Plain Layout
5915 latex -src-specials $$i
5921 If this doesn't work, check if your TeX engine needs different options
5922 (the syntax might differ in some distributions).
5925 \begin_layout Subsubsection*
5926 External Packages (PDFSync and scrltx)
5929 \begin_layout Standard
5938 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5940 In order to enable it, load the packages in the LyX preamble:
5943 \begin_layout Itemize
5944 \begin_inset Flex Code
5947 \begin_layout Plain Layout
5955 for reverse PDF search,
5958 \begin_layout Itemize
5959 \begin_inset Flex Code
5962 \begin_layout Plain Layout
5965 usepackage[active]{srcltx}
5970 for reverse DVI search.
5973 \begin_layout Standard
5974 If you want to be able to perform both DVI and PDF reverse searches, you
5975 can also insert in the preamble the following lines
5978 \begin_layout LyX-Code
5982 \begin_inset Newline newline
5988 \begin_inset Newline newline
5994 \begin_inset Newline newline
6000 \begin_inset Newline newline
6005 usepackage[active]{srcltx}
6006 \begin_inset Newline newline
6014 \begin_layout Standard
6015 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6016 right package will be used.
6019 \begin_layout Standard
6020 Note that PDFSync might affect the output layout of your document.
6021 It is therefore advised to disable PDFsync for final documents.
6024 \begin_layout Subsubsection*
6025 Built-in reverse search via SyncTeX (DVI and PDF)
6028 \begin_layout Standard
6030 \begin_inset Flex Code
6033 \begin_layout Plain Layout
6039 have built-in support for both PDF and DVI reverse search.
6044 facility is basically the result of the integration of the PDFSync package
6045 to the pdftex program and its merge with the
6050 You need at least TeXLive 2008 or a recent MikTeX distribution in order
6052 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6053 already provide SyncTeX support.
6056 \begin_layout Standard
6057 To enable SyncTeX for DVI output, change the
6058 \begin_inset Flex MenuItem
6061 \begin_layout Plain Layout
6066 \begin_layout Plain Layout
6079 \begin_inset Flex MenuItem
6082 \begin_layout Plain Layout
6087 \begin_layout Plain Layout
6094 eX (plain) -> DraftDVI
6100 \begin_inset Flex MenuItem
6103 \begin_layout Plain Layout
6104 Preferences\SpecialChar \menuseparator
6105 File Handling\SpecialChar \menuseparator
6112 \begin_inset Flex Code
6115 \begin_layout Plain Layout
6116 latex -synctex=1 $$i
6121 , and for PDF output, change the
6122 \begin_inset Flex MenuItem
6125 \begin_layout Plain Layout
6130 \begin_layout Plain Layout
6137 eX (pdflatex) -> PDF (pdflatex)
6143 \begin_inset Flex Code
6146 \begin_layout Plain Layout
6147 pdflatex -synctex=1 $$i
6153 Check the documentation of your viewer whether the viewer needs to be configure
6154 d for the use with SyncTeX.
6158 \begin_layout Plain Layout
6160 \begin_inset Flex Code
6163 \begin_layout Plain Layout
6169 option enables gzip compression.
6170 If your viewer does not support it, you should instead use
6171 \begin_inset Flex Code
6174 \begin_layout Plain Layout
6188 \begin_layout Subsection
6189 Configuring and using specific viewers
6190 \begin_inset CommandInset label
6192 name "sub:configuring-viewers"
6199 \begin_layout Subsubsection*
6200 Xdvi (all platforms)
6203 \begin_layout Standard
6205 \begin_inset Flex Code
6208 \begin_layout Plain Layout
6214 , you don't need to do anything else for performing a reverse DVI search,
6215 as LyX already provides the necessary hooks for automatically using the
6217 \begin_inset Flex Code
6220 \begin_layout Plain Layout
6227 Just setup your document as described above (reverse search is triggered
6228 by Ctrl-click or Alt-click on Mac OSX, respectively).
6231 \begin_layout Standard
6232 However, if for whatever reason you want to use the named pipe instead of
6233 the socket for communicating with LyX, simply change the DVI viewer in
6235 \begin_inset Flex MenuItem
6238 \begin_layout Plain Layout
6239 Preferences\SpecialChar \menuseparator
6240 File Handling\SpecialChar \menuseparator
6250 \begin_layout Plain Layout
6251 On Mac OSX you have to use
6252 \begin_inset Flex Code
6255 \begin_layout Plain Layout
6256 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6267 \begin_inset Flex Code
6270 \begin_layout Plain Layout
6271 xdvi -editor 'lyxeditor.sh %f %l'
6277 \begin_inset Flex Code
6280 \begin_layout Plain Layout
6286 is a suitable script.
6287 For example, a minimal shell script is the following one:
6290 \begin_layout LyX-Code
6292 \begin_inset Newline newline
6295 LYXPIPE="/path/to/lyxpipe"
6296 \begin_inset Newline newline
6299 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6300 \begin_inset Newline newline
6303 echo "$COMMAND" > "${LYXPIPE}".in || exit
6304 \begin_inset Newline newline
6307 read < "${LYXPIPE}".out || exit
6310 \begin_layout Standard
6312 \begin_inset Flex Code
6315 \begin_layout Plain Layout
6325 \begin_layout Plain Layout
6332 XServer pipe path specified in
6333 \begin_inset Flex MenuItem
6336 \begin_layout Plain Layout
6337 Preferences\SpecialChar \menuseparator
6347 \begin_layout Plain Layout
6349 \begin_inset Flex Code
6352 \begin_layout Plain Layout
6358 folder of a source distribution you can find a
6359 \begin_inset Flex Code
6362 \begin_layout Plain Layout
6368 script which is able to locate the
6372 based on your preferences.
6380 \begin_layout Subsubsection*
6384 \begin_layout Standard
6386 \begin_inset Flex Code
6389 \begin_layout Plain Layout
6390 /Applications/MacDviX_Folder/calleditor.script
6395 , add the following lines:
6398 \begin_layout LyX-Code
6403 \begin_layout Plain Layout
6410 X.app/Contents/MacOS/lyxeditor "$2" $1
6411 \begin_inset Newline newline
6417 \begin_layout Standard
6418 Modify the lines accordingly if you install LyX somewhere else than in the
6419 Applications folder.
6422 \begin_layout Standard
6423 Reverse search is triggered by Alt-click (OPTION-click).
6426 \begin_layout Subsubsection*
6430 \begin_layout Standard
6432 \begin_inset Flex Code
6435 \begin_layout Plain Layout
6436 open -a Skim.app $$i
6441 to the viewer setting in
6442 \begin_inset Flex MenuItem
6445 \begin_layout Plain Layout
6446 Preferences\SpecialChar \menuseparator
6447 File Handling\SpecialChar \menuseparator
6448 File formats\SpecialChar \menuseparator
6455 \begin_inset Flex MenuItem
6458 \begin_layout Plain Layout
6459 Skim\SpecialChar \menuseparator
6460 Preferences\SpecialChar \menuseparator
6470 \begin_layout Plain Layout
6480 \begin_layout Standard
6481 Reverse search is triggered by COMMAND-SHIFT-click
6484 \begin_layout Subsubsection*
6488 \begin_layout Standard
6490 \begin_inset Flex MenuItem
6493 \begin_layout Plain Layout
6494 Settings\SpecialChar \menuseparator
6495 Configure Okular\SpecialChar \ldots{}
6496 \SpecialChar \menuseparator
6503 \begin_inset Quotes eld
6507 \begin_inset Quotes erd
6511 \begin_inset Flex Code
6514 \begin_layout Plain Layout
6523 \begin_layout Standard
6524 Reverse search is triggered by SHIFT-click.
6527 \begin_layout Subsubsection*
6531 \begin_layout Standard
6532 Launch yap, choose its
6533 \begin_inset Flex MenuItem
6536 \begin_layout Plain Layout
6537 View\SpecialChar \menuseparator
6544 \begin_inset Quotes eld
6548 \begin_inset Quotes erd
6553 \begin_inset Quotes eld
6556 New\SpecialChar \ldots{}
6558 \begin_inset Quotes erd
6561 button and, in the window that opens, enter
6562 \begin_inset Quotes eld
6566 \begin_inset Quotes erd
6569 (or any other name you like) in the
6570 \begin_inset Quotes eld
6574 \begin_inset Quotes erd
6578 Now click on the button labeled
6579 \begin_inset Quotes eld
6582 \SpecialChar \ldots{}
6584 \begin_inset Quotes erd
6587 to open a file dialog and navigate to the directory containing the batch
6589 \begin_inset Flex Code
6592 \begin_layout Plain Layout
6600 \begin_inset Flex Code
6603 \begin_layout Plain Layout
6609 and then specify the program arguments as
6610 \begin_inset Flex Code
6613 \begin_layout Plain Layout
6621 \begin_inset Flex Code
6624 \begin_layout Plain Layout
6630 wrapper is used for communicating with LyX through the
6637 \begin_layout LyX-Code
6639 \begin_inset Newline newline
6642 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6651 \begin_inset Newline newline
6665 \begin_layout Standard
6666 Make sure that the LyXServer pipe path you specified in LyX is
6667 \begin_inset Flex Code
6670 \begin_layout Plain Layout
6684 , otherwise change the
6685 \begin_inset Flex Code
6688 \begin_layout Plain Layout
6694 wrapper accordingly.
6697 \begin_layout Standard
6698 In yap, reverse search is triggered by double-click.
6701 \begin_layout Subsubsection*
6702 SumatraPDF (Windows)
6705 \begin_layout Standard
6706 In order to use SumatraPDF for inverse search, enter
6707 \begin_inset Flex Code
6710 \begin_layout Plain Layout
6711 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6716 in the viewer setting in
6717 \begin_inset Flex MenuItem
6720 \begin_layout Plain Layout
6721 Preferences\SpecialChar \menuseparator
6722 File Handling\SpecialChar \menuseparator
6723 File formats\SpecialChar \menuseparator
6730 \begin_inset Flex Code
6733 \begin_layout Plain Layout
6739 is the previous wrapper.
6740 If SumatraPDF.exe is not in your command PATH, use its full file name.
6743 \begin_layout Standard
6744 Reverse search is triggered by double-click.
6747 \begin_layout Subsubsection*
6751 \begin_layout Standard
6752 First of all, make sure that yap is your default DVI viewer in the Windows
6753 environment, then launch it, choose its
6754 \begin_inset Flex MenuItem
6757 \begin_layout Plain Layout
6758 View\SpecialChar \menuseparator
6765 \begin_inset Quotes eld
6769 \begin_inset Quotes erd
6774 \begin_inset Quotes eld
6777 New\SpecialChar \ldots{}
6779 \begin_inset Quotes erd
6782 button and, in the window that opens, enter
6783 \begin_inset Quotes eld
6787 \begin_inset Quotes erd
6790 (or any other name you like) in the
6791 \begin_inset Quotes eld
6795 \begin_inset Quotes erd
6799 Now click on the button labeled
6800 \begin_inset Quotes eld
6803 \SpecialChar \ldots{}
6805 \begin_inset Quotes erd
6808 to open a file dialog and navigate to the directory containing the
6809 \begin_inset Flex Code
6812 \begin_layout Plain Layout
6818 program (which is installed by default on Cygwin along with the LyX executable).
6820 \begin_inset Flex Code
6823 \begin_layout Plain Layout
6829 and then specify the program arguments as
6830 \begin_inset Flex Code
6833 \begin_layout Plain Layout
6840 In this way, you will be using the
6844 for communicating with LyX.
6845 If, for whatever reason, you want to use the
6850 \begin_inset Flex Code
6853 \begin_layout Plain Layout
6859 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6862 \begin_layout Standard
6863 In yap, reverse search is triggered by double-click.
6866 \begin_layout Subsubsection*
6870 \begin_layout Standard
6871 In order to use SumatraPDF for inverse search, enter
6872 \begin_inset Flex Code
6875 \begin_layout Plain Layout
6876 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6881 in the viewer setting in
6882 \begin_inset Flex MenuItem
6885 \begin_layout Plain Layout
6886 Preferences\SpecialChar \menuseparator
6887 File Handling\SpecialChar \menuseparator
6888 File formats\SpecialChar \menuseparator
6895 If SumatraPDF.exe is not in your command PATH, use its full posix path.
6897 \begin_inset Flex Code
6900 \begin_layout Plain Layout
6906 enables communication via the
6912 \begin_inset Flex Code
6915 \begin_layout Plain Layout
6921 option if you want to use the
6925 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6928 \begin_layout Standard
6929 Reverse search is triggered by double-click.
6932 \begin_layout Section
6936 \begin_layout Standard
6937 Forward search is, as the name implies, in a sense the
6938 \begin_inset Quotes eld
6942 \begin_inset Quotes erd
6946 It allows you to let the viewer jump to a given position from within LyX.
6947 If forward search is set up (as described in what follows), you can put
6948 the cursor anywhere in your LyX document, and hit
6949 \begin_inset Flex MenuItem
6952 \begin_layout Plain Layout
6953 Navigate\SpecialChar \menuseparator
6960 \begin_inset Flex MenuItem
6963 \begin_layout Plain Layout
6969 in the context menu via right mouse click), and then the viewer will jump
6970 to that position as well.
6971 This implies, of course, that your viewer supports this function.
6974 \begin_layout Standard
6975 To make forward search possible, you first need to provide the generated
6976 output PDF/DVI file with additional information about the TeX sources.
6977 This can be done via the methods described in the section
6978 \begin_inset CommandInset ref
6980 reference "sub:rev-search"
6987 \begin_layout Standard
6988 Additionally, you need to configure LyX for using your viewers in
6989 \begin_inset Flex MenuItem
6992 \begin_layout Plain Layout
6993 Tools\SpecialChar \menuseparator
6994 Preferences\SpecialChar \menuseparator
6995 Output\SpecialChar \menuseparator
7002 We provide a range of tested configurations for some viewers, which you
7003 can select from the drop down list.
7004 If none of these configurations suits you, you have to find out and enter
7005 a suitable configuration yourself.
7006 The definition syntax uses the following placeholders:
7009 \begin_layout Itemize
7011 \begin_inset Flex Code
7014 \begin_layout Plain Layout
7023 \begin_layout Itemize
7025 \begin_inset Flex Code
7028 \begin_layout Plain Layout
7034 : name of the (temporary) exported .tex file
7037 \begin_layout Itemize
7039 \begin_inset Flex Code
7042 \begin_layout Plain Layout
7048 : name of the exported output file (either dvi or pdf, depending on which
7049 one exists in the temporary directory)
7052 \begin_layout Standard
7053 Note that only some of the viewers provide full forward search functionality,
7054 among them yap, xdvi, okular and Sumatra PDF.
7058 \begin_layout Plain Layout
7059 For Sumatra CMCDDE is needed --- downloadable from
7060 \begin_inset CommandInset href
7062 target "http://www.istri.fr/zip/CMCDDE.zip"
7071 While many of the widespread PDF viewers (most notably Adobe Reader) do
7072 not support forward search at all, some other viewers -- e.
7073 \begin_inset space \thinspace{}
7077 evince and xpdf -- allow at least to reload the document and jump to a
7078 specific page of the file, so you can at least navigate
7079 \begin_inset Quotes eld
7083 \begin_inset Quotes erd
7087 These latter functionality is provided by an external call of synctex (see
7088 the predefined example configurations).
7092 \begin_layout Standard
7093 Forward search works both with DVI and PDF output.
7094 LyX simply checks which preview format you have used before (i.
7095 \begin_inset space \thinspace{}
7098 e., which format is already there in the temporary directory) and chooses
7099 the appropriate configuration for the respective format.
7102 \begin_layout Chapter
7103 Special Document Classes
7106 \begin_layout Section
7110 \begin_layout Standard
7116 \begin_layout Subsection
7120 \begin_layout Standard
7121 This section describes how LyX can be used to write articles for submission
7122 to the scientific journal
7124 Astronomy and Astrophysics
7126 (www.edpsciences.fr/aa/
7127 \begin_inset Flex URL
7130 \begin_layout Plain Layout
7132 http://www.edpsciences.fr/aa/
7137 ) using Version 5.01 of the document class
7142 This package can be downloaded from the ftp site
7145 \begin_layout Standard
7146 \begin_inset VSpace medskip
7152 \begin_layout Standard
7154 \begin_inset Flex URL
7157 \begin_layout Plain Layout
7159 ftp://ftp.edpsciences.org/pub/aa/readme.html
7167 \begin_layout Standard
7168 \begin_inset VSpace medskip
7174 \begin_layout Standard
7175 A manual comes together with that package, and this text is not meant to
7176 replace the original manual but is merely a short guide in how to realize
7177 the correct form of your paper.
7181 \begin_layout Standard
7182 Please note that the publisher of the journal was changed from Springer
7183 to EDP Sciences starting January 1, 2001.
7184 That change involved also some slight changes to the style files, namely
7185 the removal of the thesaurus command.
7186 The LyX class aa supports the newest version of these style files, V 5.01.
7187 If you have an older version installed, please upgrade.
7188 For compatibility, the old (version 4) layout has been kept as
7193 Please refer to the comments in
7195 LyXDir/layouts/aapaper.layout
7200 \begin_layout Subsection
7204 \begin_layout Standard
7205 It is recommended you start from the example template distributed with LyX.
7206 If you are not using a template, note the following settings:
7209 \begin_layout Itemize
7216 Document\SpecialChar \menuseparator
7219 dialog (OK, that one was obvious).
7222 \begin_layout Itemize
7223 Don't change the option
7226 \begin_inset space ~
7236 The whole layout is done by the macros, you shouldn't change anything.
7239 \begin_layout Subsection
7243 \begin_layout Standard
7244 First thing to enter is the header information.
7245 It consists of seven entries, of which some are optional.
7249 \begin_layout Itemize
7257 \begin_layout Itemize
7265 \begin_layout Itemize
7273 \begin_layout Itemize
7281 \begin_layout Itemize
7286 : [optional] if more than one author: whom to contact for offprint requests.
7289 \begin_layout Itemize
7294 : [optional] mail address for contacts.
7297 \begin_layout Itemize
7305 Received: <date>; Accepted <date>
7308 \begin_layout Standard
7309 There is no need to issue the
7315 command, this is done automatically by LyX when the header is finished.
7316 Although the order of the single header entries doesn't matter it is advised
7317 to keep the above sequence, just to get the best optics and meets the layout
7318 of the real document.
7321 \begin_layout Standard
7322 If you want to place footnotes in the header block, e.
7323 \begin_inset space \thinspace{}
7327 \begin_inset space \space{}
7330 to state your present address, just use the standard footnote via the menu
7333 Insert\SpecialChar \menuseparator
7337 LyX will automagically use the term
7346 \begin_layout Standard
7347 In addition to these topics, the macros use three additional LaTeX commands
7348 that have no counterpart in LyX:
7351 \begin_layout Itemize
7358 to separate different names for more than one author and institute, respectivel
7362 \begin_layout Itemize
7369 to mark corresponding author/institute pairs.
7370 The institutes are numbered sequentially as they appear in the
7374 field, so you have to put a marker to each author.
7377 \begin_layout Itemize
7384 to supply an email address for fast contact.
7387 \begin_layout Standard
7388 In all cases, the appropriate command has to be entered in LyX and marked
7394 \begin_layout Subsection
7398 \begin_layout Standard
7399 The abstract should immediately follow the header block.
7400 With version 5 the abstract environment was changed to a command, and there
7401 is now a resctriction to only one paragraph.
7402 In addition, it should contain an entry with the keywords.
7403 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7410 by hand and mark it as LaTeX code.
7411 Refer to the example paper.
7414 \begin_layout Subsection
7415 Supported environments
7418 \begin_layout Standard
7419 The A&A paper layout supports the following environments for structuring
7423 \begin_layout Itemize
7429 \begin_layout Itemize
7435 \begin_layout Itemize
7441 \begin_layout Itemize
7447 \begin_layout Itemize
7453 \begin_layout Itemize
7459 \begin_layout Itemize
7465 \begin_layout Itemize
7471 \begin_layout Itemize
7477 \begin_layout Itemize
7483 \begin_layout Itemize
7489 \begin_layout Itemize
7495 \begin_layout Subsection
7496 Commands not supported by LyX
7499 \begin_layout Standard
7500 Some commands are not yet supported by the
7505 Some have already been mentioned.
7506 For the sake of completeness, they are listed all together here:
7509 \begin_layout Itemize
7517 \begin_layout Itemize
7525 \begin_layout Itemize
7533 \begin_layout Itemize
7541 \begin_layout Itemize
7549 \begin_layout Itemize
7557 \begin_layout Itemize
7565 \begin_layout Itemize
7573 \begin_layout Standard
7574 If you want to use any of these commands, you have to enter them yourself.
7577 Do not forget to mark them as LaTeX code!
7580 \begin_layout Subsection
7581 Figure and Table Floats
7584 \begin_layout Standard
7585 LyX provides support for the necessary float environments
7587 figure, figure*, table
7593 , therefore we won't tell much about it here.
7597 \begin_inset space ~
7603 Just remember that tables should be left-aligned.
7604 For that, select the table and change the alignment in
7606 Edit\SpecialChar \menuseparator
7608 \begin_inset space ~
7614 \begin_layout Standard
7615 There is only one special thing: the figures with caption besides the figure.
7616 To create such a figure, you have to do the following:
7619 \begin_layout Enumerate
7620 Create a wide figure float:
7622 Insert\SpecialChar \menuseparator
7623 Float\SpecialChar \menuseparator
7626 , then right click in the figure and select
7632 \begin_inset space ~
7640 \begin_layout Enumerate
7641 Enter your caption text.
7644 \begin_layout Enumerate
7649 to move the cursor above the caption.
7652 \begin_layout Enumerate
7656 \begin_layout Enumerate
7657 Position the cursor behind the figure and insert a horizontal fill:
7659 Insert\SpecialChar \menuseparator
7661 \begin_inset space ~
7664 Character\SpecialChar \menuseparator
7666 \begin_inset space ~
7674 \begin_layout Enumerate
7675 Switch to LaTeX mode:
7678 \begin_inset space ~
7686 \begin_layout Enumerate
7696 Do not close the brace!
7699 \begin_layout Enumerate
7700 Position the cursor behind the caption text, switch to LaTeX mode and insert
7704 \begin_inset space ~
7716 \begin_layout Standard
7717 Also, refer to the figures in the example paper.
7720 \begin_layout Subsection
7724 \begin_layout Standard
7725 For submission, the paper has to be formated in a special double-spacing
7727 For this purpose, you have to give the option
7731 to the documentclass.
7732 This must be done using the extra class options field in the
7734 Document\SpecialChar \menuseparator
7738 Just enter the string
7745 \begin_layout Subsection
7749 \begin_layout Standard
7754 directory contains an example paper written with LyX.
7755 It is the example paper from the original macro package, translated to
7757 Use it for inspiration, and compare the original LaTeX code with LyX way
7761 \begin_layout Section
7765 \begin_layout Standard
7771 \begin_layout Subsection
7775 \begin_layout Standard
7776 AASTeX is a set of macros produced by the American Astronomical Society
7777 to facilitate electronic manuscript submission to the three journals they
7778 publish: the Astrophysical Journal (including the Letters and Supplement),
7779 the Astronomical Journal, and the Publications of the Astronomical Society
7781 LyX has proven to be an excellent tool for generating these documents,
7782 especially given its equation, citation, and figure handling capabilities.
7783 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7784 is the version described here, or higher.
7785 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7786 incompatible with LyX.
7787 The AASTeX package may be downloaded from the AASTeX Web site
7790 \begin_layout Standard
7791 \begin_inset VSpace medskip
7797 \begin_layout Standard
7799 \begin_inset Flex URL
7802 \begin_layout Plain Layout
7804 http://www.journals.uchicago.edu/AAS/AASTeX
7812 \begin_layout Standard
7813 \begin_inset VSpace medskip
7819 \begin_layout Standard
7820 A complete user guide is contained in that package and you should familiarize
7821 yourself with it thoroughly before embarking on writing a paper in LyX.
7822 LyX will not reduce the need to figure out all the AASTeX commands, it
7823 will only reduce the drudgery of typing everything in.
7824 It is your responsibility to ensure that the final exported LaTeX document
7825 conforms completely to the requirements of the journal to which you are
7826 submitting your paper.
7829 \begin_layout Subsection
7830 Starting a New Paper
7833 \begin_layout Standard
7834 I strongly suggest that you start with the AASTeX template file.
7837 File\SpecialChar \menuseparator
7844 , enter the new file name, then choose the
7849 This will show the most common fields found in a manuscript.
7850 Simply overwrite the existing text (including the brackets,
7854 ) with the correct information.
7855 Many of the AASTeX commands and environments can be implemented directly
7856 in LyX, but some cannot: most noticeably
7868 , which should stick out like a sore thumb if you actually just opened the
7870 For commands such as these, the LaTeX code must be entered directly and
7872 Such commands are referred to as TeX code, or Evil Red Text.
7873 I tried to minimize the amount of TeX code needed in an AASTeX document,
7874 but there is still a bit more required than any of us would like.
7877 \begin_layout Subsection
7878 Finishing Your Paper
7881 \begin_layout Standard
7882 When the paper is finished to your satisfaction and previews/prints correctly,
7884 \begin_inset Quotes eld
7888 \begin_inset Quotes erd
7891 actions which need to be done before you submit it to the journals.
7895 \begin_layout Enumerate
7896 Export your paper as a LaTeX file (
7898 File\SpecialChar \menuseparator
7899 Export\SpecialChar \menuseparator
7906 \begin_layout Enumerate
7911 file with your favorite text editor
7915 \begin_layout Enumerate
7916 remove the comment lines before the
7925 \begin_layout Enumerate
7930 usepackage...{fontenc}
7932 line if it appears (usually just after
7947 \begin_layout Enumerate
7948 remove everything between (and including) the
7960 commands, except for any commands you specifically put into the LaTeX preamble
7961 (which should appear immediately after the
7962 \begin_inset Quotes eld
7965 User specified LaTeX commands
7966 \begin_inset Quotes erd
7977 \begin_layout Enumerate
7978 Run the resulting file through LaTeX to make sure it still processes correctly.
7981 \begin_layout Enumerate
7982 Reread the journal requirements to make sure your filenames and formats
7986 \begin_layout Enumerate
7990 \begin_layout Subsection
7991 Comments On Specific Commands
7994 \begin_layout Standard
7995 I will not describe the detailed usage of the individual AASTeX commands:
7996 the AASTeX User Guide (
8000 ) gives a good description of each.
8001 Thus it's probably easiest for me to go down the list as found in the guide
8002 and offer comments where necessary.
8003 So let's begin \SpecialChar \ldots{}
8007 \begin_layout Subsubsection
8008 Things that work as expected
8011 \begin_layout Standard
8012 Because they work as you might expect, I simply list them and the section
8113 begin{thebibliography}
8121 (2.13.2), all the cite commands and their variations (2.13.2), the generic
8122 graphicx figure commands (2.14.1),
8146 (2.15.4, amongst other places),
8173 \begin_layout Standard
8174 The following style options also work correctly:
8195 Simply put them in the
8201 Layout\SpecialChar \menuseparator
8207 \begin_layout Subsubsection
8208 Things that work, but require more comment
8211 \begin_layout Standard
8212 The following items work, but require a little more discussion:
8215 \begin_layout Itemize
8216 These items are reserved for use by the journal editors, but you can put
8217 them into the LaTeX preamble if you feel compelled to do so:
8250 \begin_layout Itemize
8251 These items may be placed in the LaTeX preamble, and are included as blanks
8252 in the template file:
8273 \begin_layout Itemize
8280 (2.3) – can only be used
8281 \begin_inset Quotes eld
8285 \begin_inset Quotes erd
8288 , not in the middle of a paragraph.
8289 Use TeX code if you need to embed it.
8292 \begin_layout Itemize
8299 (2.3) – will have extra {} after it.
8300 This should not cause an error.
8303 \begin_layout Itemize
8310 (2.6) – can only be used
8311 \begin_inset Quotes eld
8315 \begin_inset Quotes erd
8318 , not in the middle of a paragraph.
8319 Use TeX code if you need to embed it.
8322 \begin_layout Itemize
8329 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8333 \begin_layout Itemize
8347 \begin_layout Itemize
8354 (2.9) – will have extra {} after it.
8355 This should not cause an error.
8358 \begin_layout Itemize
8365 (2.11) – will have extra {} after it.
8366 This should not cause an error.
8369 \begin_layout Itemize
8376 (2.14.2) – you can insert an optional filename argument by placing the cursor
8377 at the beginning of the text and selecting
8379 Insert\SpecialChar \menuseparator
8384 \begin_inset Quotes eld
8388 \begin_inset Quotes erd
8391 inserts an optional argument of the type needed by
8398 Hopefully it will be renamed someday.
8401 \begin_layout Itemize
8414 for the catalog ID optional parameter
8417 \begin_layout Itemize
8430 for the catalog ID optional parameter
8433 \begin_layout Subsubsection
8434 Things not implemented, use TeX code
8437 \begin_layout Standard
8460 setcounter{equation}
8462 (2.12), Journal name abbreviations (2.13.4),
8498 (2.15.4, insert it as the first element in the lefthand cell after where
8500 Don't use any of LyX's rules in the table),
8512 (2.15.5), much of Misc (2.17, except
8563 \begin_layout Subsubsection
8564 Things that cannot be implemented
8567 \begin_layout Standard
8568 \SpecialChar \ldots{}
8569 at least in any meaningful sort of way, so I suggest ignoring them.
8570 They are the references environment (2.13.3), and the deluxetable environment
8572 If you really, really need to use deluxetable, I suggest editing it in
8573 a separate file with a text editor, then using
8575 Insert\SpecialChar \menuseparator
8577 \begin_inset space ~
8582 to include it in your LyX document.
8587 file to see an example of this.
8590 \begin_layout Subsection
8591 FAQs, Tips, Tricks, and Other Ruminations
8594 \begin_layout Subsubsection
8595 Getting LyX and AASTeX to cooperate
8598 \begin_layout Standard
8599 It can be a bit tricky to get LyX to recognize a new layout and document
8601 When all else fails, do this:
8604 \begin_layout Enumerate
8605 Make certain that LaTeX can find AASTeX.
8606 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8607 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8614 \begin_layout Enumerate
8626 \begin_layout Enumerate
8629 Tools\SpecialChar \menuseparator
8632 in LyX, then restart LyX.
8635 \begin_layout Enumerate
8636 Open a regular new file, not from a template.
8637 Does AASTeX appear in the class list in
8639 Document\SpecialChar \menuseparator
8645 \begin_layout Standard
8646 If you get a warning from an existing AASTeX document about not being able
8647 to find the AASTeX layout or a message about
8648 \begin_inset Quotes eld
8651 You should not mix title layouts with normal ones
8652 \begin_inset Quotes erd
8655 , things haven't been installed correctly.
8658 \begin_layout Subsubsection
8659 LaTeX error processing a table
8662 \begin_layout Standard
8663 LyX, by default, attempts to center the table caption/title.
8664 This seems to produce a bad interaction in AASTeX so you should click somewhere
8665 in the caption/title, then select
8667 Edit\SpecialChar \menuseparator
8669 \begin_inset space ~
8683 This took care of it for me.
8686 \begin_layout Subsubsection
8690 \begin_layout Standard
8691 A couple of things: 1) I have noticed some funny spacing in the reference
8692 entries in the text.
8693 When you enter the bibliography item data, make sure their is
8697 space between the last author and the parenthesis setting off the year;
8701 \begin_inset space \thinspace{}
8705 \begin_inset space \space{}
8719 2) Entering the references at all is not obvious.
8720 The easiest thing is to start typing your first reference at the end of
8721 the document, then mark it as type
8726 That will put a small gray box in front of what you just typed.
8727 Click on the box to fill in the rest of the information.
8728 For new references, go to the end of an existing reference and press return.
8729 That will create a new line with its own box, etc.
8732 \begin_layout Subsubsection
8736 \begin_layout Standard
8737 Even though AASTeX provides its own figure commands (
8743 , for example), I much prefer LaTeX's standard figure commands (with the
8752 \begin_inset space ~
8755 commands as TeX code into a Figure Float box if you desire, but I never
8756 have much luck getting the layout right.
8757 With the standard graphics, LyX will insert a
8761 usepackage{graphicx}
8763 command into the LaTeX preamble and handle the figures in the standard
8764 LaTeX2e way, interspersing the figures in the text.
8765 I believe ApJ accepts figures exactly this way now; AJ might still use
8767 \begin_inset Quotes eld
8770 stack everything at the end
8771 \begin_inset Quotes erd
8777 \begin_layout Subsubsection
8778 Things I could have done, but didn't
8781 \begin_layout Standard
8783 \begin_inset Quotes eld
8787 \begin_inset Quotes erd
8790 things I could have implemented, but chose not to.
8791 For instance, I saw no point in double-spacing the text in the LyX window,
8792 even though it is double-spaced in the paper manuscript.
8793 Also, I chose not to make separate layouts for the preprint and preprint2
8795 Since I assume you will spend most of your time in the plain manuscript
8796 mode anyway, I decided not to chew up more disk space with this.
8800 \begin_layout Subsection
8804 \begin_layout Standard
8805 Your mileage may vary.
8806 I've now had papers published by both ApJ and AJ that have had 98% of the
8807 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8809 I have had no trouble with the submission process, and I'm sure the journals
8810 were never aware that there might be a difference.
8811 So, go forth and publish!
8814 \begin_layout Section
8818 \begin_layout Standard
8828 \begin_layout Standard
8829 \begin_inset VSpace bigskip
8835 \begin_layout Standard
8837 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8838 papers to be submitted to American Mathematical Society publications.
8839 The layouts are not tailored to a specific journal, but easily can be.
8840 You should refer to the AMS documentation for specific instructions for
8841 each journal (usually it will entail only changing a single line in the
8843 That documentation is available on the Web at
8844 \begin_inset Flex URL
8847 \begin_layout Plain Layout
8855 \begin_inset Flex URL
8858 \begin_layout Plain Layout
8860 ftp://ftp.ams.org/pub/tex/amslatex/
8866 These layouts are appropriate, and useful, for any mathematical writing.
8870 \begin_layout Standard
8871 There are two basic AMS LaTeX layouts:
8874 \begin_layout Itemize
8875 amsart: The standard AMS article format.
8878 \begin_layout Itemize
8879 amsbook: the standard AMS book (really, monograph) format.
8883 \begin_layout Standard
8884 The layouts themselves contain only the minimum necessary to use the AMS
8886 They do not, in particular, contain any of the `theorem' environments used
8887 for setting theorems, lemmas, and the like.
8888 These are contained, instead, in the
8889 \begin_inset Flex Code
8892 \begin_layout Plain Layout
8898 module, which is loaded by default when when you select one of the AMS
8900 (It can also be used with other classes and can be removed, if you would
8901 rather use something else.) Less commonly used environments are in the
8902 \begin_inset Flex Code
8905 \begin_layout Plain Layout
8906 Theorems (AMS-Extended)
8911 module, which must be loaded manually.
8914 \begin_layout Standard
8915 By default, theorems and the like are numbered consecutively throughout
8916 the document, but this may be modified by loading the module
8917 \begin_inset Flex Code
8920 \begin_layout Plain Layout
8921 Theorems (Order by Section)
8926 or, if you are using
8927 \begin_inset Flex Code
8930 \begin_layout Plain Layout
8937 \begin_inset Flex Code
8940 \begin_layout Plain Layout
8941 Theorems (Order by Chapter)
8947 These will number the results as
8948 \begin_inset Formula $n.m$
8951 , where the first number refers to the section (or chapter) and the second
8952 refers to the total number of results so far in that section (or chapter).
8953 Many environments are also available unnumbered.
8954 These are indicated by an asterisk at the end.
8955 If you happen to want
8959 unnumbered results, the module
8960 \begin_inset Flex Code
8963 \begin_layout Plain Layout
8969 provides that option.
8972 \begin_layout Standard
8973 Note that these modules do not
8977 to be used with the AMS classes.
8978 It is perfectly possible to use the
8979 \begin_inset Flex Code
8982 \begin_layout Plain Layout
8988 module, and the others mentioned, with other classes, such as
8989 \begin_inset Flex Code
8992 \begin_layout Plain Layout
8999 \begin_inset Flex Code
9002 \begin_layout Plain Layout
9009 \begin_inset Flex Code
9012 \begin_layout Plain Layout
9021 \begin_layout Subsection
9022 What these layouts provide
9025 \begin_layout Standard
9026 There is a long list of included environments provided by these layouts.
9027 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9028 variety of `theorem' environments.
9029 However, the AMS recommends the environments that are available in LyX.
9033 \begin_layout Standard
9034 The following environments—as well as the standard environments, such as
9036 \begin_inset Flex Noun
9039 \begin_layout Plain Layout
9046 \begin_inset Flex Noun
9049 \begin_layout Plain Layout
9056 \begin_inset Flex Noun
9059 \begin_layout Plain Layout
9066 \begin_inset Flex Noun
9069 \begin_layout Plain Layout
9076 \begin_inset Flex Noun
9079 \begin_layout Plain Layout
9086 \begin_inset Flex Code
9089 \begin_layout Plain Layout
9096 \begin_inset Flex Code
9099 \begin_layout Plain Layout
9108 \begin_layout Description
9109 Address This should be the author's permanent address.
9112 \begin_layout Description
9114 \begin_inset space ~
9117 Address This should be the author's temporary address at the time of submission,
9118 if different from the Address.
9121 \begin_layout Description
9122 Email Author's e-mail address
9125 \begin_layout Description
9126 URL Author's Web address, if desired.
9129 \begin_layout Description
9130 Keywords Key words or phrases used to identify specific topics discussed
9134 \begin_layout Description
9135 Subjectclass These refer to the AMS Subject Classifications, published and
9138 Mathematical Reviews
9141 These are also available online at the AMS cites listed above.
9144 \begin_layout Description
9148 \begin_layout Description
9152 \begin_layout Description
9156 \begin_layout Standard
9157 The following environments are provided by both the
9158 \begin_inset Flex Code
9161 \begin_layout Plain Layout
9168 \begin_inset Flex Code
9171 \begin_layout Plain Layout
9177 modules, in the latter case in both starred (unnumbered) and unstarred
9178 (numbered) versions.
9179 These same environments are provided only in the starred versions by the
9181 \begin_inset Flex Code
9184 \begin_layout Plain Layout
9193 \begin_layout Theorem
9194 This is typically used for the statements of major results.
9198 \begin_layout Corollary*
9199 This is used for statements which follow fairly directly from previous statement
9201 Again, these can be major results.
9206 These are smaller results needed to prove other statements.
9209 \begin_layout Proposition
9210 These are less major results which (hopefully) add to the general theory
9214 \begin_layout Conjecture
9215 These are statements provided without justification, which the author does
9216 not know how to prove, but which seem to be true (to the author, at least).
9219 \begin_layout Definition*
9220 Guess what this is for.
9221 The font is different for this environment than for the previous ones.
9225 \begin_layout Example*
9226 Used for examples illustrating proven results.
9229 \begin_layout Problem
9230 It's not really known what this is for.
9231 You should figure it out.
9234 \begin_layout Exercise*
9235 Write a description for this one.
9238 \begin_layout Remark
9239 This environment is also a type of theorem, usually a lesser sort of observation.
9242 \begin_layout Claim*
9243 Often used in the course of giving a proof of a larger result.
9247 Generally, these are used to break up long arguments, using specific instances
9253 The numbering scheme for cases is on its own, not together with other numbered
9259 At the end of this environment, a QED symbol (usually a square, but it can
9260 vary with different styles) is placed.
9261 If you want to have other environments within this one—for example, Case
9262 environments—and have the QED symbol appear only after them, then the other
9263 environments need to be nested within the proof environment.
9266 Nesting Environments
9272 for information on nesting.
9275 \begin_layout Standard
9276 And these environments are provided by
9277 \begin_inset Flex Code
9280 \begin_layout Plain Layout
9281 Theorems (AMS-Extended)
9289 \begin_layout Criterion*
9290 A required condition.
9293 \begin_layout Algorithm*
9294 A general procedure to be used.
9297 \begin_layout Axiom*
9298 This is a property or statement taken as true within the system being discussed.
9301 \begin_layout Condition*
9302 Sometimes used to state a condition assumed within the present context of
9307 Similar to a Remark.
9310 \begin_layout Notation*
9311 Used for the explanation of, yes, notation.
9314 \begin_layout Summary
9315 Do we really need to tell you?
9318 \begin_layout Acknowledgement*
9322 \begin_layout Conclusion*
9323 Sometimes used at the end of a long train of argument.
9327 Used in a way similar to Proposition, though perhaps lower on the scale.
9330 \begin_layout Standard
9331 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9333 They need to be available on your system in order to use these environments.
9336 \begin_layout Section
9344 \begin_layout Standard
9350 \begin_layout Subsection
9354 \begin_layout Standard
9355 These are the layout files for some of the journals of the American Geophysical
9357 It is assumed that you have both the AGU's own class files and AGUplus
9358 installed (everything to be found at
9359 \begin_inset Flex URL
9362 \begin_layout Plain Layout
9364 ftp://ftp.agu.org/journals/latex/journals
9372 \begin_layout Subsection
9376 \begin_layout Standard
9386 They are still called this in the LyX GUI, though their LaTeX equivalents
9387 in the AGU classes are
9398 \begin_layout Standard
9399 Newly defined styles are
9436 These are mostly manuscript attributes and defined in the AGU class documentati
9440 \begin_layout Standard
9441 I suspect this is still badly incomplete.
9444 \begin_layout Subsection
9448 \begin_layout Standard
9465 \begin_layout Subsection
9469 \begin_layout Itemize
9472 Journal of Geophysical Research
9481 \begin_layout Standard
9482 Add your own, it isn't so hard! Look at the
9493 \begin_layout Subsection
9494 Bugs and things to remember
9497 \begin_layout Standard
9498 In order to use the new layouts, you must remember to do the following for
9502 \begin_layout Enumerate
9508 This can be done in the
9510 Layout\SpecialChar \menuseparator
9515 Document\SpecialChar \menuseparator
9519 (AGU articles are always in English, right? So
9526 \begin_layout Enumerate
9536 (Yes, this is a bug.)
9539 \begin_layout Enumerate
9540 Make sure you use the
9544 bibliography style, by entering
9548 into the second field of the BibTeX inset.
9549 None of the standard styles will do.
9552 \begin_layout Section
9556 \begin_layout Standard
9562 \begin_layout Subsection
9566 \begin_layout Standard
9567 Broadway is for writing plays.
9568 The format is more decorative than Hollywood, and much less standardized.
9569 This format should be suitable for workshops.
9572 \begin_layout Subsection
9576 \begin_layout Standard
9577 The same as in Hollywood.
9580 \begin_layout Subsection
9584 \begin_layout Standard
9589 names as labels then cross-reference the label to insert the name.
9590 The cross-reference dialog will show the current cast of characters.
9593 \begin_layout Subsection
9594 Paper size and Margins
9597 \begin_layout Standard
9598 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9601 \begin_layout Subsection
9605 \begin_layout Standard
9606 The following environments are available.
9607 You can use broadway.bind to get the bind keys shown at the right.
9610 \begin_layout Itemize
9614 \begin_inset Newline newline
9619 You should not have to use this, but it is here for anything that does not
9623 \begin_layout Itemize
9627 \begin_inset space \hfill{}
9631 \begin_inset Newline newline
9636 Used to describe stage setting and the action.
9637 First use of speaker names in all CAPs.
9640 \begin_layout Itemize
9644 \begin_inset space \hfill{}
9648 \begin_inset Newline newline
9653 Automatically numbered.
9654 On screen it will be arabic, but will print as Roman.
9657 \begin_layout Itemize
9661 \begin_inset space \hfill{}
9665 \begin_inset Newline newline
9675 It is just centered text.
9678 \begin_layout Itemize
9682 \begin_inset space \hfill{}
9686 \begin_inset Newline newline
9691 Not automatically numbered.
9692 You supply the number.
9693 This is because I couldn't figure out how.
9696 \begin_layout Itemize
9700 \begin_inset space \hfill{}
9704 \begin_inset Newline newline
9709 A special case of Narrative to describe the setting and action as the curtain
9713 \begin_layout Itemize
9717 \begin_inset space \hfill{}
9721 \begin_inset Newline newline
9726 The speaker's (actor's) title, centered in all CAPS.
9729 \begin_layout Itemize
9733 \begin_inset space \hfill{}
9737 \begin_inset Newline newline
9742 Instructions to the speaker.
9743 The parentheses are automatically inserted.
9744 The ( will appear on screen, but both will be in the printed play.
9745 This environment is only used within
9752 \begin_layout Itemize
9756 \begin_inset space \hfill{}
9760 \begin_inset Newline newline
9765 What the Speaker says.
9768 \begin_layout Itemize
9772 \begin_inset space \hfill{}
9776 \begin_inset Newline newline
9781 The curtain comes down.
9784 \begin_layout Itemize
9788 \begin_inset space \hfill{}
9794 \begin_layout Itemize
9798 \begin_inset space \hfill{}
9804 \begin_layout Itemize
9808 \begin_inset space \hfill{}
9814 \begin_layout Standard
9818 \begin_layout Section
9822 \begin_layout Standard
9827 can be used to type letters according to German conventions.
9828 A template file is included in
9830 .../lyx/share/templates
9832 for you to use as a starting point.
9835 \begin_layout Section
9843 \begin_layout Standard
9849 \begin_layout Subsection
9853 \begin_layout Standard
9854 This is the layout file for the European Geophysical Society journals.
9859 can be downloaded from the web site of the EGS under
9860 \begin_inset Flex URL
9863 \begin_layout Plain Layout
9873 \begin_layout Subsection
9877 \begin_layout Standard
9880 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9888 The current layout file is unfortunately very unmodular and would benefit
9889 from using the various
9896 \begin_layout Section
9900 \begin_layout Standard
9901 See the LyX template file
9906 It contains all infos you need.
9909 \begin_layout Section
9915 \begin_inset CommandInset label
9924 \begin_layout Standard
9930 \begin_layout Subsection
9934 \begin_layout Standard
9935 This section describes how to use LyX to make slides for overhead projectors.
9936 There are two document classes that can do this: the default slides class
9942 This section documents the latter.
9945 \begin_layout Standard
9946 I'm going to say this again, nice and clear, so that there's no misunderstanding
9950 \begin_layout Standard
9951 \begin_inset VSpace bigskip
9957 \begin_layout Standard
9961 This section documents the class
9962 \begin_inset Quotes eld
9970 \begin_inset Quotes erd
9978 \begin_layout Standard
9979 \begin_inset VSpace bigskip
9985 \begin_layout Standard
9986 If you're looking for the documentation for
9987 \begin_inset Quotes eld
9995 \begin_inset Quotes erd
9999 \begin_inset space ~
10003 \begin_inset CommandInset ref
10005 reference "sec:slitex"
10010 If your machine doesn't have the
10015 \begin_inset Quotes eld
10023 \begin_inset Quotes erd
10026 ] installed, you'll probably have to use the default
10030 class, which isn't quite as good as
10035 \begin_layout Standard
10040 class is designed for use with version 2.1 of the
10044 LaTeX class file which is now an integral part of LaTeX2e.
10047 \begin_layout Subsection
10051 \begin_layout Standard
10052 Obviously, to use this document class, you need to select
10053 \begin_inset Quotes eld
10061 \begin_inset Quotes erd
10071 \begin_inset space ~
10077 There are some settings in the
10080 \begin_inset space ~
10085 dialog that you should know about that are specific to this class:
10088 \begin_layout Itemize
10089 Don't change the options
10100 \begin_inset space ~
10106 They're ignored by the
10113 \begin_layout Itemize
10114 The default font size is 20
10115 \begin_inset space \thinspace{}
10118 pt with the other options being 17
10119 \begin_inset space \thinspace{}
10123 \begin_inset space \thinspace{}
10127 \begin_inset space \thinspace{}
10133 \begin_layout Itemize
10134 The default font is
10142 but all math equations are still typeset in the usual roman font.
10145 \begin_layout Itemize
10150 supports A4 and Letter paper sizes as well as a special size for working
10152 \begin_inset space \thinspace{}
10156 It doesn't support A5, B5, legal or executive paper sizes.
10159 \begin_layout Itemize
10160 Don't bother changing the
10164 settings because they are ignored anyway.
10165 All floats appear where they are defined in the text.
10168 \begin_layout Itemize
10173 setting behaves a bit differently for this class.
10178 provides extensive footer and header capabilities including a user-defined
10181 \begin_inset space ~
10185 \begin_inset CommandInset ref
10187 reference "sec:foilfoot"
10192 The title page is treated differently to all other pages in the document
10201 has the logo centered at the bottom of the page (if one is defined).
10202 The possible page style choices and what they do are as follows:
10206 \begin_layout Labeling
10207 \labelwidthstring MMMMMMM
10214 The final output contains no page numbers, or other headers or footers
10215 (except footnotes of course).
10219 \begin_layout Labeling
10220 \labelwidthstring MMMMMMM
10227 The final output contains page numbers centered at the bottom of the page.
10228 No other headings or footers (other than footnotes).
10231 \begin_layout Labeling
10232 \labelwidthstring MMMMMMM
10237 Page numbers in lower right corner.
10238 Additional headers and footers are also shown.
10239 This is also the default.
10242 \begin_layout Labeling
10243 \labelwidthstring MMMMMMM
10248 Gives you access to the
10252 package although its use with
10256 is discouraged by the writer of the
10260 package because of some potential page layout clashes.
10264 \begin_layout Subsubsection
10268 \begin_layout Standard
10269 The following options may be used in the extra class options in the
10271 Document\SpecialChar \menuseparator
10277 \begin_layout Labeling
10278 \labelwidthstring MMMMMMx
10283 This sets up the page layout for 7.33
10284 \begin_inset space \thinspace{}
10288 \begin_inset space \thinspace{}
10291 in paper, which is about the same aspect ratio as a 35
10292 \begin_inset space \thinspace{}
10295 mm slide, making it a bit easier to work with this medium.
10298 \begin_layout Labeling
10299 \labelwidthstring MMMMMMx
10304 Places a rule across the page below the header on every page except the
10308 \begin_layout Labeling
10309 \labelwidthstring MMMMMMx
10314 Places a rule across the page above the footer on every page except the
10318 \begin_layout Labeling
10319 \labelwidthstring MMMMMMx
10324 This is automatically set each time you create a new
10333 to use the dvips driver to rotate those pages that are set as landscape
10337 \begin_layout Labeling
10338 \labelwidthstring MMMMMMx
10343 Simply changes the page dimensions to those of a landscape page but doesn't
10345 Thus if you use this option you need to use an external program to rotate
10346 each page or feed your paper through your printer as landscape.
10347 Note that this option effectively reverses the roles of the
10355 environments (don't worry these are described in the next section).
10358 \begin_layout Labeling
10359 \labelwidthstring MMMMMMx
10364 Equation numbers on the left.
10367 \begin_layout Labeling
10368 \labelwidthstring MMMMMMx
10373 Flush-left equations.
10376 \begin_layout Subsection
10377 Supported Environments
10380 \begin_layout Standard
10381 Most of the environments commonly supported in other classes are also supported
10387 There are several additional environments provided by
10391 as well as a couple added by LyX.
10392 The following environments are shared with other classes:
10395 \begin_layout Standard
10399 \begin_layout Plain Layout
10403 begin{multicols}{2}
10411 \begin_layout Itemize
10417 \begin_layout Itemize
10423 \begin_layout Itemize
10429 \begin_layout Itemize
10435 \begin_layout Itemize
10441 \begin_layout Itemize
10447 \begin_layout Itemize
10453 \begin_layout Itemize
10459 \begin_layout Itemize
10465 \begin_layout Itemize
10471 \begin_layout Itemize
10477 \begin_layout Itemize
10483 \begin_layout Itemize
10489 \begin_layout Itemize
10495 \begin_layout Itemize
10501 \begin_layout Itemize
10507 \begin_layout Itemize
10513 \begin_layout Itemize
10519 \begin_layout Standard
10523 \begin_layout Plain Layout
10535 \begin_layout Standard
10536 That is, all the major environments apart from the sectioning environments.
10537 Since foils are essentially self-contained sections, with a title and body,
10542 provides specific commands for starting new foils and these are:
10545 \begin_layout Itemize
10551 \begin_layout Itemize
10557 \begin_layout Standard
10558 LyX also provides slightly modified versions of these two environments called:
10561 \begin_layout Itemize
10567 \begin_layout Itemize
10570 ShortRotatefoilhead
10573 \begin_layout Standard
10574 and the differences will be explained in the next section.
10577 \begin_layout Standard
10578 Since foils are often used in presenting ideas or new theorems and such
10583 also provides a comprehensive box of goodies for presenting them:
10586 \begin_layout Standard
10590 \begin_layout Plain Layout
10594 begin{multicols}{2}
10602 \begin_layout Itemize
10608 \begin_layout Itemize
10614 \begin_layout Itemize
10620 \begin_layout Itemize
10626 \begin_layout Itemize
10632 \begin_layout Itemize
10638 \begin_layout Itemize
10644 \begin_layout Itemize
10650 \begin_layout Itemize
10656 \begin_layout Itemize
10662 \begin_layout Itemize
10668 \begin_layout Standard
10672 \begin_layout Plain Layout
10684 \begin_layout Standard
10685 The starred versions are unnumbered while the unstarred versions are numbered.
10686 There are also two list environments added by LyX and these are:
10689 \begin_layout Itemize
10695 \begin_layout Itemize
10701 \begin_layout Standard
10706 provides some powerful header and footer capabilities that are best set
10707 in the preamble although they may be set at any point in a document.
10708 If you want to change these settings in your document the best place to
10709 do so is at the very top of a foil, i.
10710 \begin_inset space \thinspace{}
10716 \begin_inset space \space{}
10721 straight after the foilhead.
10724 \begin_layout Standard
10725 For this purpose, the following command styles are provided [
10732 \begin_layout Standard
10736 \begin_layout Plain Layout
10740 begin{multicols}{2}
10748 \begin_layout Itemize
10752 \begin_inset space ~
10758 \begin_layout Itemize
10764 \begin_layout Itemize
10768 \begin_inset space ~
10774 \begin_layout Itemize
10778 \begin_inset space ~
10784 \begin_layout Itemize
10788 \begin_inset space ~
10795 \begin_layout Standard
10796 \begin_inset space ~
10803 \begin_layout Standard
10807 \begin_layout Plain Layout
10819 \begin_layout Standard
10820 There are also a few commands provided by
10824 that aren't directly supported by LyX but I'll tell you what they do and
10825 how to use them in section
10826 \begin_inset space ~
10830 \begin_inset CommandInset ref
10832 reference "sec:unsuppfoils"
10839 \begin_layout Subsection
10840 Building a Set of Foils
10843 \begin_layout Standard
10844 This section will give a simple introduction to using the different environments
10845 to build a set of foils.
10846 If you want to see an example set of foils, take a look at the
10850 file you find in LyX's
10857 \begin_layout Subsubsection
10858 Give It a Title Page
10861 \begin_layout Standard
10862 Unlike other classes that provide
10882 creates the title on a page of its own.
10883 If you leave out the
10887 environment LaTeX will substitute the current date (every time you regenerate
10891 \begin_layout Subsubsection
10895 \begin_layout Standard
10896 As I mentioned earlier, there are four ways of starting a new foil.
10897 For portrait foils you should use
10906 The difference between these two environments is the amount of space between
10907 the title of the foil (the foilhead) and the body of the foil.
10910 \begin_layout Standard
10911 Landscape foils are generated using the
10917 ShortRotatefoilhead
10920 Again the only difference is the spacing between foilhead and body.
10921 Both of the short versions have 0.5 inches less separation between the foilhead
10926 \begin_layout Standard
10927 One problem with the support for landscape foils is the requirement that
10928 you have to use the
10932 driver to generate the PostScript output otherwise the foils won't be rotated.
10933 It is possible to get landscape foils even if you haven't got the
10937 driver provided you can feed your foils sideways through your printer ;-)
10940 \begin_layout Subsubsection
10941 Theorems, Lemmas, Proofs and more
10944 \begin_layout Standard
10945 Due to a small bug in LyX you can't have two of the same type of these environme
10946 nts directly following each other.
10947 They must be separated by something.
10948 If you try, you will just be extending the previous environment as if you
10949 had merged the two environments together.
10950 So, how do you get around this problem? The simplest option is to insert
10951 some text between the two environments or add a
10955 environment between the two with just a
10956 \begin_inset Quotes eld
10964 \begin_inset Quotes erd
10968 This will force LyX to produce two separate environments and hence the
10969 correct LaTeX output.
10970 An example is provided in the example file included with the LyX distribution.
10971 Remember, this problem only occurs if you are trying to place two of the
10972 same type of theorem-like environments one directly after the other.
10975 \begin_layout Subsubsection
10979 \begin_layout Standard
10980 You get all the commonly supported list styles found in other classes as
10981 well as two new ones.
10982 I'll only describe the new ones here.
10983 If you want to find out more about the other list environments check out
10989 If you intend to use itemized lists you might also want to read about the
10993 \begin_inset space ~
10997 \begin_inset space ~
11002 dialog described above in section
11003 \begin_inset space ~
11007 \begin_inset CommandInset ref
11009 reference "sec:bullet"
11016 \begin_layout Standard
11017 The two new list styles,
11025 , are designed to make it easier for you to create lists of do's and don'ts
11026 or right and wrong by providing dedicated environments that use a tick
11027 or a cross as the label of the list.
11028 These lists are in fact dedicated variants of the
11033 They do however require that you have the
11037 packages installed.
11040 \begin_layout Subsubsection
11044 \begin_layout Standard
11049 redefines the floating tables and figures so that they appear exactly where
11050 they are in the text rather than pushing them to the top of the page or
11051 to some user specified location.
11052 In fact if you change the float placement settings they are simply ignored.
11055 \begin_layout Subsubsection
11056 Page Headers and Footers
11057 \begin_inset CommandInset label
11059 name "sec:foilfoot"
11066 \begin_layout Standard
11070 \begin_inset space ~
11079 are two commands used to control the left-footer text string.
11080 The first is meant to allow you to include a graphic logo on your foils
11082 \begin_inset Quotes eld
11090 \begin_inset Quotes erd
11094 While the second is meant to provide a classification for the audience,
11098 \begin_inset space \thinspace{}
11104 \begin_inset space \space{}
11108 It is empty by default.
11111 \begin_layout Standard
11112 The remaining page corners can be filled by
11115 \begin_inset space ~
11120 (which defaults to page numbers),
11123 \begin_inset space ~
11131 \begin_inset space ~
11139 \begin_layout Subsection
11145 \begin_inset CommandInset label
11147 name "sec:unsuppfoils"
11154 \begin_layout Standard
11155 All the commands mentioned below need to be set in a
11163 within another environment.
11166 \begin_layout Subsubsection
11170 \begin_layout Standard
11171 All lengths are adjusted using the
11194 should be replaced by the name given to the length you want to change and
11199 is the length value.
11200 All lengths should be specified in units of length such as inches (
11212 ) or relative to some document or font-based length such as
11222 \begin_layout Standard
11223 It's possible to change the spacing between a foilhead and the body of the
11224 foil by adjusting the length specified by
11231 For example, to make
11236 \begin_inset space \space{}
11239 in closer to their bodies put the following in the preamble:
11245 foilheadskip}{-0.5in}
11248 \begin_layout Standard
11249 The spacings around floats can be adjusted by setting these lengths:
11252 \begin_layout Labeling
11253 \labelwidthstring MMMMMMMMMMM
11260 Separation between the text and the top of the float
11263 \begin_layout Labeling
11264 \labelwidthstring MMMMMMMMMMM
11271 Separation between the float and the caption
11274 \begin_layout Labeling
11275 \labelwidthstring MMMMMMMMMMM
11282 Separation between the caption and the following text
11285 \begin_layout Labeling
11286 \labelwidthstring MMMMMMMMMMM
11293 You can make the captions narrower than the surrounding text by adjusting
11295 Best done relative to
11304 \begin_layout Standard
11305 There are also several title page related lengths that you may find useful
11306 if you have a long title or several authors:
11309 \begin_layout Labeling
11310 \labelwidthstring MMMMMMMMMMM
11317 Separation from headers to
11322 \begin_layout Labeling
11323 \labelwidthstring MMMMMMMMMMM
11341 \begin_layout Labeling
11342 \labelwidthstring MMMMMMMMMMM
11356 \begin_layout Labeling
11357 \labelwidthstring MMMMMMMMMMM
11373 \begin_layout Labeling
11374 \labelwidthstring MMMMMMMMMMM
11390 \begin_layout Standard
11391 The last length related command affects all the list environments.
11402 a list environment then all the vertical spacing between the list items
11404 Note that this is a command not a length so it doesn't require
11410 like the stuff mentioned above.
11413 \begin_layout Subsubsection
11414 Headers and Footers
11417 \begin_layout Standard
11430 commands control whether the logo in the
11434 definition appear on a given page.
11441 in the preamble then none of the foils will have the logo on them.
11442 If you don't want the logo on a particular page place the
11448 directly after the foilhead of that page and the
11454 directly after the next foilhead.
11457 \begin_layout Standard
11458 If you decide to use the
11462 page style setting in the
11465 \begin_inset space ~
11470 dialog you should probably add
11480 to your preamble so headers and footers on landscape pages are correctly
11481 placed when rotated.
11482 This is due to some clashes between the page layouts provided by the
11493 \begin_layout Section
11494 Hollywood (Hollywood spec scripts)
11497 \begin_layout Standard
11503 \begin_layout Subsection
11507 \begin_layout Standard
11508 Getting the format of a Hollywood script right is a
11509 \begin_inset Quotes eld
11513 \begin_inset Quotes erd
11516 It is designed to make the readers focus on content and to be easy and
11517 familiar for the actors to read.
11518 Each page of a script should be one minute of film.
11519 Nothing goes in a script that you cannot see or hear on screen.
11520 The courier 12 pt font should be used throughout.
11524 \begin_layout Subsection
11528 \begin_layout Standard
11529 Speakers' lines should NEVER break in mid-sentence.
11530 If a speaker's lines continue over a page break, repeat the
11534 title followed by (Cont'd).
11537 \begin_layout Subsection
11541 \begin_layout Standard
11546 names as labels then cross-reference the label to insert the name.
11547 The cross-reference dialog will show the current cast of characters.
11548 You can use this to insert the speaker name in narratives also.
11551 \begin_layout Subsection
11552 Paper size and Margins
11555 \begin_layout Standard
11556 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11559 \begin_layout Subsection
11563 \begin_layout Standard
11564 The following environments are available.
11565 You can use hollywood.bind to get the bind keys shown at the right.
11568 \begin_layout Itemize
11572 \begin_inset Newline newline
11577 Used where nothing else works.
11581 \begin_layout Itemize
11587 \begin_inset space \hfill{}
11595 \begin_inset Newline newline
11598 Usually followed by something like
11599 \begin_inset Quotes eld
11602 on Sally waking up.
11603 \begin_inset Quotes erd
11609 \begin_layout Itemize
11613 \begin_inset space \hfill{}
11617 \begin_inset Newline newline
11622 Introduces a new INTERIOR camera set-up.
11623 Always followed by DAY or NIGHT, or something similar to define the lighting
11625 Everthing on this line in CAPS.
11628 \begin_layout Itemize
11632 \begin_inset space \hfill{}
11636 \begin_inset Newline newline
11641 Introduces a new EXTERIOR camera set-up.
11642 Everthing on this line in CAPS.
11645 \begin_layout Itemize
11649 \begin_inset space \hfill{}
11653 \begin_inset Newline newline
11658 The character speaking.
11661 \begin_layout Itemize
11665 \begin_inset space \hfill{}
11669 \begin_inset Newline newline
11674 Instructions to the speaker.
11675 The () are automatically inserted, but only the ( will show in LyX.
11676 Both will be printed.
11679 \begin_layout Itemize
11683 \begin_inset space \hfill{}
11687 \begin_inset Newline newline
11699 \begin_layout Itemize
11703 \begin_inset space \hfill{}
11707 \begin_inset Newline newline
11712 Camera movement instruction.
11714 \begin_inset space \thinspace{}
11718 \begin_inset space \space{}
11724 \begin_layout Itemize
11728 \begin_inset space \hfill{}
11734 \begin_layout Itemize
11738 \begin_inset space \hfill{}
11744 \begin_layout Itemize
11748 \begin_inset space \hfill{}
11754 \begin_layout Itemize
11758 \begin_inset space \hfill{}
11764 \begin_layout Subsection
11768 \begin_layout Itemize
11772 \begin_layout Itemize
11776 \begin_layout Itemize
11778 \begin_inset space \thinspace{}
11785 \begin_layout Itemize
11790 \begin_layout Itemize
11791 PAN — camera movement
11794 \begin_layout Itemize
11795 INSERT — cut to close-up of
11798 \begin_layout Section
11802 \begin_layout Standard
11805 Panayotis Papasotiriou
11808 \begin_layout Subsection
11812 \begin_layout Standard
11813 The ijmpc package is a set of macros that facilitates electronic manuscript
11816 International Journal of Modern Physics C
11819 Similarly, the ijmpd package is for creating manuscripts to be submitted
11822 International Journal of Modern Physics D
11825 Both journals are published by World Scientific.
11826 The corresponding document classes are named
11835 These files, together with instructions for the authors, can be downloaded
11837 \begin_inset Flex URL
11840 \begin_layout Plain Layout
11842 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11848 \begin_inset Flex URL
11851 \begin_layout Plain Layout
11853 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11859 Both packages are modified versions of the standard
11860 \begin_inset Quotes eld
11864 \begin_inset Quotes erd
11867 package, and they are almost (but not exactly) identical.
11868 Most of their features are supported by LyX.
11869 I have used LyX successfully to write articles submitted to both journals
11870 without any problem.
11873 \begin_layout Subsection
11877 \begin_layout Standard
11878 As usual, the easiest way to write a paper is to start with a template.
11881 File\SpecialChar \menuseparator
11900 This will give an (almost) empty document that includes the most common
11901 fields found in a manuscript.
11902 Simply overwrite the existing text (including the brackets,
11907 You should keep in mind the following remarks.
11910 \begin_layout Enumerate
11911 LyX won't let you change the font size and the page style of the document,
11912 because such modifications are not allowed by both packages.
11915 \begin_layout Enumerate
11916 The language of the document should not be changed.
11917 Before previewing your paper, be sure that the babel package is not used.
11918 To do this, click on
11920 Tools\SpecialChar \menuseparator
11931 checkbox in the language settings, and click on
11939 , if you wish to make this change permanent).
11942 \begin_layout Enumerate
11944 \begin_inset Quotes eld
11948 \begin_inset Quotes erd
11951 style must be used to define keywords.
11954 \begin_layout Enumerate
11955 The ijmpc package provides a style named
11956 \begin_inset Quotes eld
11959 Classification Codes
11960 \begin_inset Quotes erd
11963 , which can be used to define classification codes, such as PACS numbers.
11964 Note that this facility is not supported by the ijmpd package.
11967 \begin_layout Enumerate
11968 Several new environments are available:
11969 \begin_inset Quotes eld
11973 \begin_inset Quotes erd
11977 \begin_inset Quotes eld
11981 \begin_inset Quotes erd
11985 \begin_inset Quotes eld
11989 \begin_inset Quotes erd
11993 \begin_inset Quotes eld
11997 \begin_inset Quotes erd
12001 \begin_inset Quotes eld
12005 \begin_inset Quotes erd
12009 \begin_inset Quotes eld
12013 \begin_inset Quotes erd
12017 \begin_inset Quotes eld
12021 \begin_inset Quotes erd
12025 \begin_inset Quotes eld
12029 \begin_inset Quotes erd
12033 \begin_inset Quotes eld
12037 \begin_inset Quotes erd
12041 \begin_inset Quotes eld
12045 \begin_inset Quotes erd
12049 \begin_inset Quotes eld
12053 \begin_inset Quotes erd
12057 \begin_inset Quotes eld
12061 \begin_inset Quotes erd
12065 \begin_inset Quotes eld
12069 \begin_inset Quotes erd
12073 \begin_inset Quotes eld
12077 \begin_inset Quotes erd
12081 Their use is more or less obvious.
12082 LyX supports all these environments; it will use the proper label, text
12083 style, and numbering scheme for each of them.
12086 \begin_layout Enumerate
12087 Both packages use basic citations; the natbib package should not be used.
12088 In LyX, citation references are shown as usual; in the output, citations
12089 are shown as superscripts.
12090 If you want to use a citation as normal text, you should use the
12095 \begin_inset space \thinspace{}
12099 \begin_inset space \space{}
12103 \begin_inset Quotes eld
12107 \begin_inset space \space{}
12117 \begin_inset Quotes erd
12123 \begin_layout Enumerate
12125 \begin_inset Quotes eld
12129 \begin_inset Quotes erd
12132 section in both packages.
12133 To put acknowledgments, just use the
12134 \begin_inset Quotes eld
12138 \begin_inset Quotes erd
12144 \begin_layout Enumerate
12145 Appendices may be added to the paper,
12149 the Acknowledgments and
12154 LyX provides a special environment, called
12155 \begin_inset Quotes eld
12159 \begin_inset Quotes erd
12162 which marks the beginning of the appendices.
12163 This environment should be left blank; it just sends a LaTeX command, but
12164 nothing is really printed.
12166 \begin_inset Quotes eld
12170 \begin_inset Quotes erd
12173 is printed with blue letters, as a signal that all sections after that
12174 point are appendices.
12175 To write an appendix, use the
12176 \begin_inset Quotes eld
12180 \begin_inset Quotes erd
12184 LyX will number each appendix with capital letters, as required by both
12187 \begin_inset Quotes eld
12191 \begin_inset Quotes erd
12198 be present before the first appendix; if not, all appendices will be numbered
12199 as normal sections in the output.
12202 \begin_layout Enumerate
12203 The ijmpc and the ijmpd packages use the
12207 command to implement table captions.
12208 As a result, a table created by LyX is printed correctly, but its caption
12210 However, you can use some TeX code to overcome this problem, so that captions
12211 are printed as expected.
12212 To do so, create a float table as usual, remove the caption, and replace
12213 it with the TeX code
12223 (sic); you must also the TeX code
12227 immediately after the tabular material.
12228 Study the example table included in the template files to see how this
12229 trick is implemented.
12230 Alternatively, If you need table captions, you should implement the whole
12235 file, then include this file to the LyX document (
12237 Insert\SpecialChar \menuseparator
12238 File\SpecialChar \menuseparator
12240 \begin_inset space ~
12246 Details on how to create a table float can be found in the files
12254 , included in the corresponding packages.
12257 \begin_layout Subsection
12258 Preparing a paper for submission
12261 \begin_layout Standard
12262 Before you submit your paper you must export the LyX document as a LaTeX
12265 File\SpecialChar \menuseparator
12266 Export\SpecialChar \menuseparator
12273 \begin_layout Plain Layout
12274 Actually you have the choice between LaTeX (plain) and pdflatex.
12275 If you intend to use pdflatex to prepare the paper, you should use the
12276 pdflatex option so that included graphics are converted to PDF format,
12277 ready for use by pdflatex.
12282 , then make the following changes to the resulting
12289 \begin_layout Enumerate
12290 Remove the comment lines before the
12299 \begin_layout Enumerate
12300 Remove everything between (and including) the
12312 commands, except for any commands you specifically put into the LaTeX preamble.
12315 \begin_layout Standard
12320 file should be saved and processed through LaTeX as many times as necessary.
12321 You may also want to check the resulting
12328 \begin_layout Subsection
12332 \begin_layout Standard
12333 The use of TeX code is reduced to two commands, which must be placed at
12334 the top of the document.
12335 If you started writing your paper by using the
12343 template, the TeX code needed is already in its place; you usually don't
12345 You may only modify the first TeX code to specify the information printed
12346 to the top of odd and even pages (authors' names and short paper's title,
12348 This TeX code must have the form
12352 markboth{Authors' Names}{Short Paper's Title}
12357 \begin_layout Section
12361 \begin_layout Standard
12367 \begin_layout Subsection
12371 \begin_layout Standard
12372 The iopart package provides a document class to create electronic manuscript
12373 submission to the journals published by the Institute of Physics.
12374 Instructions for the authors how to create a paper using the iopart class
12375 can be downloaded together with the iopart package from the site
12376 \begin_inset Flex URL
12379 \begin_layout Plain Layout
12381 ftp://ftp.iop.org/pub/journals/latex2e
12389 \begin_layout Subsection
12393 \begin_layout Standard
12394 The easiest way to write a paper is to start with the file
12398 that is available in LyX's examples files folder.
12399 Open this file, save it under a new name, and start writing.
12400 The example file explains how to use the special text environments.
12401 Here are the most important advices:
12404 \begin_layout Itemize
12405 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12408 Use AMS math package
12410 in the document settings under
12417 \begin_layout Itemize
12420 The title environment defines the kind of your paper.
12421 So use one of the following environments for the title:
12425 \begin_layout Itemize
12434 \begin_layout Itemize
12443 \begin_layout Itemize
12449 for a Topical review
12452 \begin_layout Itemize
12461 \begin_layout Itemize
12470 \begin_layout Itemize
12476 for a Paper (same as Title)
12479 \begin_layout Itemize
12485 for a Preliminary communication
12488 \begin_layout Itemize
12494 for a Rapid communication
12497 \begin_layout Itemize
12503 for a Letter to the editor
12507 \begin_layout Itemize
12510 All title environments except of
12514 can have an optional short title.
12517 \begin_layout Itemize
12518 There is a general title environment
12522 which is not directly supported by the LyX.
12523 This can be used as TeX code when your document doesn't fit into one of
12524 the other title types.
12527 \begin_layout Standard
12528 For more informations like hints for special table and formula formatting,
12529 look at the IOP author guidelines.
12532 \begin_layout Section
12536 \begin_layout Standard
12539 Panayotis Papasotiriou
12542 \begin_layout Subsection
12546 \begin_layout Standard
12547 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12548 that facilitates electronic manuscript submission to the journals they
12550 Most known of them (at least in my domain of interest) are
12552 Astrophysics and Space Science
12558 , but there are many others (see a complete list at
12559 \begin_inset Flex URL
12562 \begin_layout Plain Layout
12564 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12570 The Kluwer package may be downloaded from the site
12571 \begin_inset Flex URL
12574 \begin_layout Plain Layout
12576 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12582 A complete user guide is contained in that package (but it can also be
12583 downloaded separately).
12586 \begin_layout Standard
12587 LyX supports many features of the package but not everything.
12588 However, the TeX code needed is reduced to some
12589 \begin_inset Quotes eld
12593 \begin_inset Quotes erd
12596 commands of the package (see
12597 \begin_inset space ~
12601 \begin_inset CommandInset ref
12603 reference "subsec:kluwer_peculiarities"
12608 I have recently used LyX to write an article submitted to the
12610 Astrophysics and Space Science
12612 without any problem.
12615 \begin_layout Subsection
12619 \begin_layout Standard
12620 The easiest way to write a paper is to start with the Kluwer template file.
12623 File\SpecialChar \menuseparator
12635 This will give an (almost) empty document that includes the most common
12636 fields found in a manuscript and a short description of their use.
12637 As in most templates, simply overwrite the existing text (including the
12642 ) with the correct information.
12645 \begin_layout Subsection
12646 Preparing a paper for submission
12649 \begin_layout Standard
12650 As in the AASTeX package, before you submit your paper to a journal you
12652 \begin_inset Quotes eld
12656 \begin_inset Quotes erd
12662 \begin_layout Enumerate
12663 Export your paper as a LaTeX file.
12664 To do this, click on
12666 File\SpecialChar \menuseparator
12667 Export\SpecialChar \menuseparator
12674 \begin_layout Enumerate
12679 file with a text editor and make the following changes
12683 \begin_layout Enumerate
12684 remove the comment lines before the
12693 \begin_layout Enumerate
12694 remove everything between (and including) the
12706 commands, except for any commands you specifically put into the LaTeX preamble.
12709 \begin_layout Standard
12718 \begin_layout Enumerate
12723 file through LaTeX as many times as necessary (usually up to three).
12726 \begin_layout Enumerate
12732 \begin_inset space \thinspace{}
12736 \begin_inset space \space{}
12743 , and check if everything is OK (it should, if you didn't make any mistake).
12746 \begin_layout Subsection
12747 \begin_inset Quotes eld
12751 \begin_inset Quotes erd
12754 of the Kluwer package
12755 \begin_inset CommandInset label
12757 name "subsec:kluwer_peculiarities"
12764 \begin_layout Standard
12765 The Kluwer package has the following
12766 \begin_inset Quotes eld
12770 \begin_inset Quotes erd
12776 \begin_layout Enumerate
12777 It is possible to write multiple articles in the same LaTeX file
12781 \begin_layout Plain Layout
12782 I can't imagine any good reason to do this.
12788 Each article must be included in the environment
12789 \begin_inset Quotes eld
12793 \begin_inset Quotes erd
12797 Unfortunately, this environment cannot be omitted, even if you write just
12799 Therefore, each article starts with the command
12805 and, obviously, ends with the command
12812 Although this can be implemented in LyX, I didn't included it, since it
12813 looks ugly and can confuse the novice user.
12814 Therefore, you need to enter them directly and mark them as LaTeX code
12816 \begin_inset Quotes eld
12820 \begin_inset Quotes erd
12826 \begin_layout Enumerate
12827 Information given at the beginning of the article (i.
12828 \begin_inset space \thinspace{}
12832 \begin_inset space \space{}
12835 title, subtitle, author, institution, running title, running author, abstract
12836 and keywords) must be included in an environment called
12837 \begin_inset Quotes eld
12841 \begin_inset Quotes erd
12845 This is not implemented in LyX, so you must enter title, subtitle etc.
12846 \begin_inset space ~
12849 between two TeX code lines (
12864 \begin_layout Enumerate
12865 According to the user manual, the label of each bibliography item must be
12889 \begin_layout Standard
12894 template takes care of all these
12895 \begin_inset Quotes eld
12899 \begin_inset Quotes erd
12903 If you start a new paper using this template you don't need to do anything
12908 \begin_layout Enumerate
12909 don't delete the TeX code included in the template, and
12912 \begin_layout Enumerate
12913 copy the example bibliography item included in the template and modify it
12914 as necessary to enter new bibliography items.
12917 \begin_layout Section
12921 \begin_layout Standard
12927 \begin_layout Subsection
12931 \begin_layout Standard
12932 The LyX document classes
12934 article (koma-script)
12938 report (koma-script)
12956 correspond to the LaTeX document classes
12973 \begin_inset space ~
12976 of the Koma-Script family.
12977 They are replacements for the standard document classes
12993 , resp., and fit better to European typography conventions in a number of
12997 \begin_layout Itemize
12998 Standard character size is 11pt in
13000 article (koma-script)
13004 report (koma-script)
13012 letter (koma-script)
13017 \begin_layout Itemize
13018 Headings, labels of the description environment, and a number of elements
13021 letter (koma-script)
13023 document class are set in a bold sans serif font.
13027 \begin_layout Plain Layout
13028 There is a big difference between the bold sans serif old cm fonts and new
13029 ec fonts, especially in the appearance of headings.
13030 In comparison, the ec bold sans serif fonts look a bit thin.
13031 Here the LaTeX package
13039 helps to produce the
13040 \begin_inset Quotes eld
13044 \begin_inset Quotes erd
13047 appearance when using the ec fonts.
13052 The numbering of chapter headings is made in the same way as the numbering
13053 of section headings, that is without the extra line
13054 \begin_inset Quotes eld
13057 Chapter\SpecialChar \ldots{}
13059 \begin_inset Quotes erd
13063 In addition, the appearance of the headings can be modified by using a
13064 number of options (in LyX to be entered in the field
13067 \begin_inset space ~
13074 Layout\SpecialChar \menuseparator
13081 \begin_layout Itemize
13082 The main means in the Koma-Script document classes to design the type area
13091 (in LyX to be entered in the extra class options field in the dialog
13093 Document\SpecialChar \menuseparator
13097 They make a clearer modification of page margins possible as do the options
13100 Document\SpecialChar \menuseparator
13107 \begin_layout Itemize
13108 The LaTeX document classes of the Koma-Script family define a number of
13109 additional commands.
13110 Those part of it which makes sense in LyX is implemented in corresponding
13114 \begin_layout Standard
13115 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13116 can be found in the Koma-Script documentation
13127 \begin_layout Subsection
13128 article (koma-script), report (koma-script), and book (koma-script)
13131 \begin_layout Standard
13132 The document classes
13134 article (koma-script)
13138 report (koma-script)
13148 are implemented in the layout files
13161 They contain all the paragraph types of the corresponding standard document
13174 , resp., partly modified, with the exception of the LyX specific
13178 -type, which is replaced by the new
13182 -type having the same functionality.
13187 -Type there is a number of new paragraph types added.
13194 letter (koma-script)
13199 \begin_layout Itemize
13208 : are equivalents to
13216 , resp., additionally inserting an entry in the table of contents.
13225 are not contained in
13227 article (koma-script)
13232 \begin_layout Itemize
13241 : behave exactly as
13249 , resp., additionally clearing running heads.
13254 is not contained in
13256 article (koma-script)
13262 \begin_layout Plain Layout
13275 report (koma-script)
13277 , but since this is identical to
13281 , is has not been implemented in LyX.
13289 \begin_layout Itemize
13294 : generates a heading directly above the following paragraph in the standard
13295 character size without affecting the structure of the document.
13298 \begin_layout Itemize
13307 are special captions which respect the different space settings needed
13308 for captions placed above or below an element (if you follow strict typographic
13309 rules, you might want to place table captions always above the table).
13310 You can also use the class option
13314 , which will switch
13327 You need at least Koma-Script version 2.8q to use this.
13330 \begin_layout Itemize
13335 : can be used to set a bonmot, e.
13336 \begin_inset space \thinspace{}
13340 \begin_inset space \space{}
13343 at the beginning of a chapter.
13344 If you use the optional argument (
13346 Insert\SpecialChar \menuseparator
13348 \begin_inset space ~
13353 ), you can insert the dictum's author there.
13354 Dictum and author are separated by a line.
13355 You need at least Koma-Script version 2.8q to use this.
13360 is not contained in
13362 article (koma-script)
13367 \begin_layout Standard
13368 The following types, together with the standard types
13380 , form the title area of the document.
13381 They must be entered ahead of the first
13382 \begin_inset Quotes eld
13386 \begin_inset Quotes erd
13393 \begin_layout Plain Layout
13394 The corresponding LaTeX commands must appear before the
13405 When such a type is used more than once, the latter usage overwrites the
13406 former one, that means, for every type only the latest usage is valid.
13407 The order of the different types however has, like
13419 , no effect on the appearance of the produced document.
13422 \begin_layout Itemize
13427 : produces a centered paragraph above the ordinary title (
13439 ) for the subject of the document.
13442 \begin_layout Itemize
13447 : produces a centered paragraph below the ordinary title (
13459 ) for the publishers' name.
13462 \begin_layout Itemize
13469 report (koma-script)
13475 produces a centered paragraph on its own page behind the title page, or
13478 article (koma-script)
13480 produces a centered paragraph below the ordinary title (
13496 ) for a dedication.
13499 \begin_layout Itemize
13504 : produces a left aligned paragraph above the ordinary title (
13520 ) for a document`s head.
13523 \begin_layout Itemize
13528 : produces in a double-sided print in
13530 report (koma-script)
13536 a left-aligned paragraph at the top of the title page`s back or has no
13537 effect in a single-sided print or in
13539 article (koma-script)
13544 \begin_layout Itemize
13549 : produces in a double-sided print in
13551 report (koma-script)
13557 a left-aligned paragraph at the bottom of the title page`s back or has
13558 no effect in a single-sided print or in
13560 article (koma-script)
13565 \begin_layout Itemize
13570 : produces a special
13571 \begin_inset Quotes eld
13575 \begin_inset Quotes erd
13578 page ahead of the actual document containing a paragraph without special
13582 \begin_layout Standard
13583 The layout files for the document classes
13585 article (koma-script)
13589 report (koma-script)
13595 do include the file
13600 This is thought of as a place to define your own types.
13605 in your personal layout directory and edit the file!
13608 \begin_layout Subsection
13609 letter (koma-script)
13612 \begin_layout Standard
13616 letter (koma-script)
13618 is implemented in the layout file
13623 It contains all the paragraph types of the corresponding standard document
13628 , partly modified, with the exception of the LyX specific types
13640 type, which is replaced by the new
13645 In addition, it contains, in contrast to the standard document class, the
13663 Furthermore, there are a number of new letter specific types.
13666 \begin_layout Standard
13667 The appearance of the letter produced by this document class can be controlled
13668 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13672 \begin_layout Plain Layout
13673 For example, the standard appearance of the letter`s heading, consisting
13674 of name and address, is quite self-willed.
13676 \begin_inset Quotes eld
13680 \begin_inset Quotes erd
13683 heading is produced by the following LaTeX commands in the preamble:
13686 \begin_layout LyX-Code
13696 \begin_layout LyX-Code
13712 \begin_layout LyX-Code
13722 \begin_layout LyX-Code
13742 A detailed German description of such LaTeX commands can be found in the
13743 Koma-Script documentation
13748 With it, the letter's author can produce his personal letter layout.
13751 \begin_layout Standard
13760 define the beginning of the letter and must be used in every letter.
13761 To emphasize them in the LyX document class, they are marked with the letter
13771 \begin_inset space ~
13774 in the left margin.
13775 It is possible to write any number of letters in one file.
13780 type produces a new letter using the same addressee and a
13784 type produces a new addressee.
13801 are ordinary paragraph types and can also be used several times in one
13802 and the same letter.
13805 \begin_layout Itemize
13810 : produces a paragraph for the addressee and implicitly defines the beginning
13814 \begin_layout Itemize
13819 : produces a paragraph for the form of address and implicitly produces a
13823 \begin_layout Itemize
13828 : produces a paragraph for a close.
13831 \begin_layout Itemize
13836 : produces a paragraph for a postscript.
13839 \begin_layout Itemize
13844 : produces a paragraph for a distribution list.
13847 \begin_layout Itemize
13852 : produces a paragraph for enclosures.
13855 \begin_layout Standard
13896 are input types provided with a label to enter information, which will
13897 be processed by the document class.
13901 \begin_layout Plain Layout
13902 It could be seen as a matter of inconsequence, that the types
13910 described above are not such input types as well.
13911 Because of the special meaning of those types, however, I have implemented
13912 them as ordinary paragraph types with a one letter mark in the left margin.
13913 Moreover, it would affect my feeling of symmetry, if the
13921 type had such a serious different appearance.
13926 The types must be used ahead of the corresponding
13933 \begin_layout Standard
13934 An implementation of these types in a WYSIWYG fashion does not seem to make
13935 sense, because the real appearance of the produced letter does not only
13936 depend on the usage of the particular type, but also on other factors.
13937 For example, a signature entered in the
13941 type will in the standard behavior appear in the produced letter only,
13942 when in the same letter also a
13947 The entered value of the
13951 type will in the standard behavior not appear in the produced letter at
13953 The possibility to design the letter`s heading freely is already indicated
13954 in a footnote above.
13957 \begin_layout Standard
13958 The input types can also be used as empty paragraphs.
13959 This makes sense e.
13960 \begin_inset space \thinspace{}
13964 \begin_inset space \space{}
13976 type is not used at all, in the standard behavior the value of the
13980 type is used as signature, whereas if an empty
13984 type is used, no signature value is defined.
13987 \begin_layout Standard
13988 By using the input types it is possible to write a letter template, containing
13989 filled input types with your personal dates (name, address, etc.) and empty
13990 input types for other dates you want to enter.
13993 \begin_layout Itemize
13998 : sender's name, in the standard behavior appears as a centered paragraph
13999 in small caps in the letter`s heading.
14002 \begin_layout Itemize
14007 : sender's signature, in the standard behavior appears below the
14016 type is used, the value of the
14020 type appears instead.
14023 \begin_layout Itemize
14028 : sender's address, in the standard behavior appears in a centered paragraph
14029 in the letter`s heading below the sender's name.
14032 \begin_layout Itemize
14037 : sender's telephone number, in the standard behavior only sets the LaTeX
14047 \begin_layout Itemize
14052 : place of the letter`s making.
14055 \begin_layout Itemize
14060 : date of the letter`s making.
14069 , in the standard behavior, produce the place and the date in a right-aligned
14070 line below the addressee's field.
14075 type is used, neither place nor date appear, independent of the value of
14085 type is used, the date of the letter `s production is used.
14088 \begin_layout Itemize
14093 : sender`s back address, in the standard behavior appears above the addressee's
14094 field in a small sans serif font.
14097 \begin_layout Itemize
14102 : special mail information, in the standard behavior appears underlined
14103 above the addressee's field below the back address.
14106 \begin_layout Itemize
14111 : additional information, in the standard behavior appears on right side
14112 below the addressee`s field.
14115 \begin_layout Itemize
14120 : the letter's title, in the standard behavior appears in a big, bold, sans
14121 serif font above the subject.
14124 \begin_layout Itemize
14129 : the letter's subject, in the standard behavior appears in a bold font
14137 \begin_layout Standard
14158 produce a business letter like line above the
14162 line containing the fields
14163 \begin_inset Quotes eld
14167 \begin_inset Quotes erd
14171 \begin_inset Quotes eld
14175 \begin_inset Quotes erd
14179 \begin_inset Quotes eld
14183 \begin_inset Quotes erd
14187 \begin_inset Quotes eld
14191 \begin_inset Quotes erd
14195 \begin_inset Quotes eld
14199 \begin_inset Quotes erd
14203 \begin_inset Quotes eld
14207 \begin_inset Quotes erd
14211 For the date field, the value of the
14217 \begin_inset Quotes eld
14220 business letter types
14221 \begin_inset Quotes erd
14224 is used, the value of the
14228 type however does not appear, but only the LaTeX variable
14235 The ordinary output of place and date in a right-aligned line below the
14236 addressee`s field is suppressed.
14237 The types are implemented as input types provided with a label and must
14238 be used ahead of the corresponding
14245 \begin_layout Itemize
14253 \begin_layout Itemize
14261 \begin_layout Itemize
14269 \begin_layout Itemize
14277 \begin_layout Itemize
14285 \begin_layout Subsection
14286 The new letter class: letter (koma-script v.2)
14289 \begin_layout Standard
14295 \begin_layout Standard
14296 \begin_inset VSpace medskip
14302 \begin_layout Standard
14304 Koma-Script version 2.8 has introduced a new letter class
14308 which supersedes the now unsupported
14313 It has — on the LaTeX side — a completely new interface and is not compatible
14314 with the old class.
14315 Therefore, LyX supports both, though it is recommended you use the new
14319 \begin_layout Standard
14320 This class covers the same functionality as
14322 letter (koma-script),
14325 The basic items are
14329 (receiver's address, same as
14333 in the old layout),
14346 will start a new letter (i.
14347 \begin_inset space \thinspace{}
14351 \begin_inset space \space{}
14354 you can write several letters per document).
14355 New elements are sender's
14371 and the possibility to use a
14377 Insert\SpecialChar \menuseparator
14383 \begin_layout Standard
14384 The biggest improvement is, though, that the letter's layout is configurable
14385 to meet almost any needs.
14386 This can be done via the preamble or with a special style file (Letter
14387 Class Option, extension
14391 ), that will be read in as a class option.
14395 \begin_layout Plain Layout
14396 The KOMA package comes with some default
14401 There is, for instance, a
14405 file that follows german typesetting rules, or a
14409 that provides the default layout of the old
14414 The latter can be loaded with the class option
14423 ayout\SpecialChar \menuseparator
14428 ocument\SpecialChar \menuseparator
14440 template that is included in LyX for examples.
14441 A detailed description is to be found in the Koma-Script documentation
14449 \begin_layout Subsection
14453 \begin_layout Standard
14454 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14458 \begin_layout Itemize
14459 The chapter number of a
14463 type appears on a line of its own above the chapter heading instead of
14464 appearing in the same line ahead of it.
14465 The cause for that is the LyX internal behavior for the labeltype
14469 in the layout file.
14472 \begin_layout Itemize
14473 The headings of the types
14481 are only put in the
14482 \begin_inset Quotes eld
14486 \begin_inset Quotes erd
14489 LaTeX table of contents, but not in the LyX table of contents (
14491 Document\SpecialChar \menuseparator
14493 \begin_inset space ~
14497 \begin_inset space ~
14505 \begin_layout Itemize
14506 The paragraphs in a
14510 document class appear in a skip separation mode, not indented.
14511 This is the standard behavior, no special LaTeX commands are needed for
14515 Document\SpecialChar \menuseparator
14518 dialog the corresponding radio button indicates
14527 value always has the effect that extra LaTeX commands are inserted in the
14528 document to produce the gap, which is not what is wanted in this case.
14531 \begin_layout Section
14535 \begin_layout Standard
14541 \begin_layout Subsection
14545 \begin_layout Standard
14546 Memoir is a very powerful and constantly evolving class.
14547 It has been designed with regard to fictional and non-fictional literature.
14548 Its aim is to let the user have maximum control over the typesetting of
14550 Memoir is based on the standard book class, but it can also emulate the
14551 article class (see below).
14554 \begin_layout Standard
14555 Peter Wilson, the developer of Memoir, is known as the author of lots of
14556 useful packages in the LaTeX world.
14557 Most of them have been merged with Memoir.
14558 Therefore, it is much easier to layout the table of contents, appendices,
14559 chapter designs and such.
14560 LyX, though, does not support all of these goodies natively.
14561 Some of them might be added to forthcoming releases
14565 \begin_layout Plain Layout
14566 You are invited to send suggestions to
14567 \begin_inset Flex URL
14570 \begin_layout Plain Layout
14572 lyx-devel@lists.lyx.org
14582 , lots will probably never, due to the limitations of LyX's framework.
14583 Of course you can still use all features with the help of some native LaTeX
14588 \begin_layout Plain Layout
14593 \begin_layout Plain Layout
14603 \begin_inset space ~
14607 \begin_inset CommandInset ref
14609 reference "sec:Inserting-TeX-Code"
14619 In this section, we can only list those features which are natively supported
14621 For detailed descriptions (and for the rest of features) we recommend you
14622 have a look at the detailed manual of the Memoir class
14626 \begin_layout Plain Layout
14631 \begin_layout Plain Layout
14641 \begin_inset Flex URL
14644 \begin_layout Plain Layout
14646 CTAN:/macros/latex/memoir/memman.pdf
14656 , which is not only a user guide for the class, but also both a comprehensive
14657 description on good typesetting and a superb example for good typesetting
14661 \begin_layout Subsection
14662 Basic features and restrictions
14665 \begin_layout Standard
14666 Memoir supports basically all features of the standard book classes.
14667 There are, however, some differences, as follows:
14670 \begin_layout Description
14672 \begin_inset space ~
14675 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14678 \begin_layout Description
14680 \begin_inset space ~
14683 style: The fancy page style is not supported, due to a command clash between
14684 Memoir and the fancyhdr package (they both define a command with the same
14685 name, which confuses LaTeX).
14686 Instead, Memoir comes with a number of its own page styles (see
14688 Layout\SpecialChar \menuseparator
14689 Document\SpecialChar \menuseparator
14691 \begin_inset space ~
14697 If you want to use these for the chapter pages, you have to use the command
14704 in the main text or in preamble (e.
14705 \begin_inset space \thinspace{}
14709 \begin_inset space \space{}
14716 chapterstyle{companion}
14721 \begin_layout Description
14722 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14723 optional argument in the standard classes.
14724 With this, you can specify an alternative version of the title for the
14725 table of contents and the headers (for instance, if the title is too long).
14726 In LyX, you can do this via
14728 Insert\SpecialChar \menuseparator
14730 \begin_inset space ~
14735 at the beginning of a chapter/section.
14736 Memoir features a second optional argument and thus separates the table
14737 of contents from the header.
14738 You can define three variants of a title with this: one for the main text,
14739 one for the table of contents, and one for the headers.
14740 Simply insert two optional arguments if you need this feature, the first
14741 one containing the short title for the Table of Contents, the second one
14742 containing an alternative short title for the headers.
14745 \begin_layout Description
14746 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14747 of contents, the list of figures and the list of table start a new page
14749 Memoir does not follow this route.
14750 You have to insert a page break yourself, if you want to have one.
14753 \begin_layout Description
14754 Titlepage: For some unknown reason, Memoir uses pagination on the title
14755 page (in the standard classes, title pages are
14756 \begin_inset Quotes eld
14760 \begin_inset Quotes erd
14764 \begin_inset space \thinspace{}
14768 \begin_inset space \space{}
14772 If you want an empty title page, type
14776 aliaspagestyle{title}{empty}
14781 \begin_layout Description
14782 Article: With the class option
14788 Layout\SpecialChar \menuseparator
14789 Document\SpecialChar \menuseparator
14791 \begin_inset space ~
14796 ), you can emulate article style.
14797 That is, counters (footnotes, figures, tables etc.) will not be reset on
14798 new chapters, chapters don't start a new page (but are—in contrary to
14799 \begin_inset Quotes eld
14803 \begin_inset Quotes erd
14806 article classes—still allowed), parts, though, use their own page, as in
14810 \begin_layout Description
14811 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14812 font commands, which have been used in the old LaTeX version 2.09 (e.
14813 \begin_inset space \thinspace{}
14817 \begin_inset space \space{}
14833 It produces an error and stops LaTeX whenever such a command appears.
14838 reallows the commands and spits out warnings instead (which does at least
14840 Since a lot of packages and particularly BibTeX style files are still using
14841 those commands, we have decided to use this option by default.
14844 \begin_layout Subsection
14848 \begin_layout Standard
14849 We will only describe the features supported by LyX (which is not much currently
14851 Please consult the Memoir manual
14855 \begin_layout Plain Layout
14860 \begin_layout Plain Layout
14870 \begin_inset Flex URL
14873 \begin_layout Plain Layout
14875 CTAN:/macros/latex/memoir/memman.pdf
14888 \begin_layout Description
14889 Abstract: You may wonder why an abstract is an extra feature.
14890 Well, it is in book class.
14891 Usually books don't have abstracts.
14892 Memoir, however, has.
14893 You can use it wherever and how often you like.
14896 \begin_layout Description
14897 Chapterprecis: You may know this older typesetting style: The contents of
14898 a chapter are summarized below the title and also in the table of contents
14900 \begin_inset space \thinspace{}
14904 \begin_inset space \space{}
14909 Our hero arrives in Troia; he loses some friends; he finds others
14912 Chapterprecis does exactly this.
14913 It is therefore only sensible below a chapter.
14916 \begin_layout Description
14917 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14918 The epigraph environment provides an elegant way of typesetting such a
14920 The motto itself (text) and its author (source) are divided by a short
14922 Unfortunately, we have to fool LyX a bit here again, since the environment
14923 needs two arguments (text and source).
14924 In this case, we have to use curly brackets (in TeX mode) between the two
14935 <author of the slogan>.
14938 \begin_layout Description
14939 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14940 complex figurative poems).
14941 LyX can only support a few of them.
14942 One is poemtitle, which is a centered title for poems, which will also
14943 be added to the table of contents (verse is the standard environment for
14945 Memoir has some enhanced versions of verse, but you need to use TeX code,
14946 because they have to be nested inside regular verse environments, which
14947 is not possible with LyX).
14950 \begin_layout Description
14951 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14954 \begin_layout Section
14955 Article (mwart), book (mwbk) and report (mwrep)
14956 \begin_inset Argument
14959 \begin_layout Plain Layout
14972 \begin_layout Standard
14978 \begin_layout Standard
14979 The LyX document classes
14995 correspond to the LaTeX document classes
15008 They are replacements for the standard document classes
15020 , resp., and fit better to Polish typography conventions in a number of points.
15024 \begin_layout Standard
15028 \begin_layout Itemize
15029 Unnumbered titles (with star, e.
15030 \begin_inset space \thinspace{}
15034 \begin_inset space \space{}
15041 ) are added into table of contents,
15044 \begin_layout Itemize
15045 Additional page styles:
15049 \begin_layout Description
15050 uheadings header with separated lines,
15053 \begin_layout Description
15054 myheadings custom header, contents headers via commands:
15069 \begin_layout Description
15070 myuheadings custom header with separated lines,
15073 \begin_layout Description
15074 outer page number is placed on outer side of page
15078 \begin_layout Itemize
15083 \begin_layout Description
15084 rmheadings serif titles — default,
15087 \begin_layout Description
15088 sfheadings sansserif titles,
15091 \begin_layout Description
15092 authortitle on title page first placed is author next title — default,
15095 \begin_layout Description
15096 titleauthor on title page first placed is title next author,
15099 \begin_layout Description
15100 withmarginpar reserve place on page for margins.
15104 \begin_layout Section
15108 \begin_layout Standard
15113 provides an alternative to the standard
15118 It provides similar functionality, but you might prefer this layout with
15119 sans serif sections, headings, and more.
15122 \begin_layout Section
15126 \begin_layout Standard
15132 \begin_layout Standard
15133 \begin_inset VSpace bigskip
15139 \begin_layout Standard
15144 \begin_inset space ~
15149 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15150 \begin_inset Formula $\beta$
15153 release of May, 1999) class.
15156 \begin_layout Standard
15161 textclass, which works with RevTeX 3.1.
15162 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15163 That means that it doesn't interact very well with LyX, which requires
15164 LaTeX2e, although it has been kludged to work.
15165 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15169 \begin_inset space ~
15174 textclass should also be pretty easy to use.
15177 \begin_layout Standard
15178 These documents are supposed to be used in
15182 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15183 macros, and assume you'll know what to put in the preamble if necessary.
15186 \begin_layout Subsection
15190 \begin_layout Standard
15191 All you need to do is install RevTeX 4, as described in the package's README
15193 The package can be found at The RevTeX 4 Web Site
15194 \begin_inset Flex URL
15197 \begin_layout Plain Layout
15199 http://publish.aps.org/revtex4/
15205 Install it somewhere that LaTeX can see it.
15206 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15208 \begin_inset space \thinspace{}
15212 \begin_inset space \space{}
15215 not the directory where you installed the class file.) Then, if you reconfigure
15216 LyX, it will find the class file and let you use the RevTeX4 textclass.
15219 \begin_layout Standard
15220 Probably the easiest way to get started is either to import a RevTeX 4 document
15228 \begin_inset space ~
15233 template, found in the templates directory.
15236 \begin_layout Subsection
15240 \begin_layout Standard
15241 Optional arguments to
15248 \begin_inset Quotes eld
15252 \begin_inset Quotes erd
15256 \begin_inset Quotes eld
15260 \begin_inset Quotes erd
15270 \begin_inset space ~
15278 \begin_inset space ~
15284 Remember that in RevTeX, at least one optional argument is required!
15287 \begin_layout Standard
15288 Other preamble matter, like
15295 \begin_inset space ~
15301 \begin_inset space ~
15306 dialog, also as usual.
15309 \begin_layout Subsection
15313 \begin_layout Standard
15314 The layouts basically correspond to the commands in RevTeX4.0.
15315 For example, the Email layout corresponds to
15322 Note that (at least as of RevTeX 4.0 Beta), the
15330 layouts are exactly equivalent, so you shouldn't need to use both.
15334 \begin_layout Plain Layout
15335 In case you're curious, both were included so that
15339 would be able to translate both
15359 \begin_layout Subsection
15363 \begin_layout Standard
15364 There are a couple of important unique aspects of RevTeX 4 which might cause
15365 bugs that will be even more confusing in LyX.
15368 \begin_layout Standard
15386 The LyX equivalent is that there is a separate Thanks layout.
15391 write footnotes in the
15395 layout, or weird things may happen.
15396 See the RevTeX 4 documentation for more details.
15399 \begin_layout Standard
15403 \begin_inset space ~
15411 \begin_inset space ~
15420 layouts must be placed
15428 layout and the corresponding
15445 , the LaTeX won't compile.
15448 \begin_layout Subsection
15452 \begin_layout Standard
15453 The main problem with this layout is that you can't use the optional arguments
15454 to layouts like Email and Title.
15455 (The problem is not unique to this layout; you can't use optional arguments
15456 to the Section layouts either.) This means that after you export that file
15457 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15458 need to edit the LaTeX file with a text editor to add the optional arguments
15460 \begin_inset space \thinspace{}
15464 \begin_inset space \space{}
15467 the running title for the page headers.
15468 Lacking these layouts makes the
15474 (and the equivalent
15480 ) useless, so the corresponding layouts don't exist, and will have to be
15485 \begin_layout Plain Layout
15490 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15491 has not been updated yet to take advantage of it.
15499 \begin_layout Section
15500 Springer Journals (
15507 \begin_layout Standard
15513 \begin_layout Subsection
15517 \begin_layout Standard
15518 These are the layout files for some of the journal formats used by Springer
15519 Verlag and listed on
15520 \begin_inset Flex URL
15523 \begin_layout Plain Layout
15525 http://www.springer.de/author/tex/help-journals.html
15530 , where you should also go to fetch the class files (yes, these are LaTeX2e
15532 It is a modular system: the things common to all journals are implemented
15537 , which journal-specific layout files (such as, e.
15538 \begin_inset space \thinspace{}
15542 \begin_inset space \space{}
15549 for Journal of Geodesy) can include.
15552 \begin_layout Standard
15553 This means that implementing support for any other Springer journal on this
15554 list is as simple as writing your own
15562 file following the outline given in
15570 \begin_layout Standard
15571 It is reasonably well tested only for the Journal of Geodesy.
15580 come with the standard LyX distribution.
15581 Install the relevant class file (downloaded from Springer) in a proper
15582 directory, reconfigure LaTeX (in the teTeX case by running
15586 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15587 and it should work.
15590 \begin_layout Subsection
15594 \begin_layout Standard
15595 A large number of theorem-like styles —
15601 \SpecialChar \ldots{}
15607 \begin_layout Standard
15610 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15611 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15614 See the Springer class file documentation for details.
15617 \begin_layout Subsection
15621 \begin_layout Itemize
15633 \begin_layout Itemize
15636 Probability Theory and Related Fields
15642 — Jean-Marc Lasgouttes
15645 \begin_layout Standard
15646 Add your own, it isn't so hard!
15649 \begin_layout Subsection
15653 \begin_layout Standard
15654 These files are partly based on the older
15658 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15659 file from Springer.
15664 layout, are now defunct.
15665 Jean-Marc Lasgouttes helped out big in making me find my way around the
15666 LyX layout file mechanism.
15669 \begin_layout Subsection
15673 \begin_layout Standard
15675 But probably less than in the old hacked-LaTeX
15682 \begin_layout Standard
15684 \begin_inset space \thinspace{}
15687 g.: does not display the number for theorem-like layouts, just #.
15690 \begin_layout Section
15696 \begin_inset CommandInset label
15705 \begin_layout Standard
15713 \begin_layout Subsection
15717 \begin_layout Standard
15718 This section describes how to use LyX to make slides for overhead projectors.
15719 There are two document classes that can do this: the default slides class
15725 This section documents the former.
15728 \begin_layout Standard
15729 I'm going to say this again, nice and clear, so that there's no misunderstanding
15733 \begin_layout Standard
15734 \begin_inset VSpace bigskip
15740 \begin_layout Standard
15744 This section documents the class
15745 \begin_inset Quotes eld
15753 \begin_inset Quotes erd
15761 \begin_layout Standard
15762 \begin_inset VSpace bigskip
15768 \begin_layout Standard
15769 If you're looking for the documentation for
15770 \begin_inset Quotes eld
15778 \begin_inset Quotes erd
15781 , check out section
15782 \begin_inset space ~
15786 \begin_inset CommandInset ref
15788 reference "sec:foiltex"
15798 \begin_inset Quotes eld
15806 \begin_inset Quotes erd
15809 ] is actually somewhat better than the default
15817 \begin_layout Plain Layout
15818 \SpecialChar \ldots{}
15819 or so I've been told repeatedly by its advocates.
15820 Having never used it, I have no idea if this claim is true or not.
15825 which this section documents.
15828 \begin_layout Standard
15829 This class is the LaTeX2e improvement of the old
15834 Every LaTeX2e distribution includes this class [which I'll just refer to
15836 \begin_inset Quotes eld
15844 \begin_inset Quotes erd
15847 from now on], so you're bound to have it.
15848 As I noted earlier, there are other classes, such as
15852 , which also produce slides for overhead projectors and do a better job
15854 However, there are some things which
15858 can do which the others can't, such as generate overlays.
15859 Read on to learn more!
15862 \begin_layout Subsection
15864 \begin_inset CommandInset label
15866 name "sec:slidesetup"
15873 \begin_layout Standard
15874 Obviously, to use this document class, you need to select
15875 \begin_inset Quotes eld
15883 \begin_inset Quotes erd
15886 from the class list in the
15888 Document\SpecialChar \menuseparator
15892 There are some other special things you should know about this class:
15895 \begin_layout Itemize
15896 Don't bother changing the options
15901 They're not supported by the
15908 \begin_layout Itemize
15912 \begin_inset space ~
15917 behaves a bit differently for this class.
15918 The possible choices and what they do are as follows:
15922 \begin_layout Description
15927 The final output contains page numbers in the lower right corner.
15930 \begin_layout Description
15939 , but also prints out any time markers you've put in.
15940 This is the default.
15943 \begin_layout Description
15948 The final output contains no page numbers, time markers, or alignment markers.
15952 \begin_layout Itemize
15957 class has an extra option:
15963 \begin_inset Quotes eld
15971 \begin_inset Quotes erd
15974 in the extra class options.
15978 \begin_layout Standard
15979 Using this options allows you to add time markers to
15985 \begin_inset space ~
15989 \begin_inset CommandInset ref
15991 reference "sec:slideNote"
15999 \begin_layout Standard
16000 You can also use the template file
16001 \begin_inset Quotes eld
16009 \begin_inset Quotes erd
16012 to automatically set up a document to use the
16018 File\SpecialChar \menuseparator
16020 \begin_inset space ~
16024 \begin_inset space ~
16029 to open your new document].
16030 The template file also contains some examples of the special paragraph
16031 environments used by this class.
16032 I'll describe those next.
16035 \begin_layout Subsection
16036 Paragraph Environments
16039 \begin_layout Subsubsection
16040 Supported Environments
16043 \begin_layout Standard
16044 The first thing you'll notice when you start up a new
16048 document is the font size and type: it's the equivalent of the size
16049 \begin_inset Quotes eld
16057 \begin_inset Quotes erd
16063 \begin_inset space ~
16069 This is also what's used in the output.
16071 \begin_inset Quotes eld
16075 \begin_inset Quotes erd
16078 to remind you that this is a slide.
16079 Your final slides will use a larger font; ergo, you'll have less space.
16080 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16083 \begin_layout Standard
16084 The next thing that becomes obvious is the changes to the paragraph environment
16085 pull-down box [at the far-left end of the toolbar].
16086 Most of the paragraph environments you're used to seeing are missing.
16087 There are also five new ones.
16092 class itself only supports certain paragraph environments:
16095 \begin_layout Itemize
16101 \begin_layout Itemize
16107 \begin_layout Itemize
16113 \begin_layout Itemize
16119 \begin_layout Itemize
16125 \begin_layout Itemize
16131 \begin_layout Itemize
16137 \begin_layout Itemize
16143 \begin_layout Itemize
16149 \begin_layout Itemize
16155 \begin_layout Itemize
16161 \begin_layout Standard
16162 All of the other standard environments, including the section-heading environmen
16163 ts, aren't used in the
16170 \begin_layout Standard
16171 On the other hand, you'll notice the following new environments:
16174 \begin_layout Itemize
16180 \begin_layout Itemize
16186 \begin_layout Itemize
16192 \begin_layout Itemize
16198 \begin_layout Itemize
16204 \begin_layout Standard
16205 These five are kind of quirky, due to a
16206 \begin_inset Quotes eld
16210 \begin_inset Quotes erd
16214 You see, LyX doesn't permit you to nest any other paragraph environment
16215 into an empty environment.
16216 Now, that's fine and dandy, but it means that you wouldn't be able to start
16217 a slide with anything except plain text.
16218 To deal with this, I've performed a little
16219 \begin_inset Quotes eld
16223 \begin_inset Quotes erd
16229 \begin_layout Subsubsection
16230 Quirks of the New Environments
16231 \begin_inset CommandInset label
16233 name "sec:slideQuirk"
16240 \begin_layout Standard
16241 All five of the new paragraph environments are somewhat quirky due to inherent
16242 limitiations in the current version of LyX.
16243 As I just mentioned, LyX forbids environments that begin with another environme
16245 To get around this, the
16249 environment isn't a paragraph environment as described in the
16257 \begin_layout Standard
16258 You should consider
16271 \begin_inset Quotes eld
16274 pseudo-environments.
16275 \begin_inset Quotes erd
16278 They look like a section heading or a
16279 \begin_inset Quotes eld
16287 \begin_inset Quotes erd
16290 but really begin a [and, if necessary, end the previous] paragraph environment.
16300 \begin_inset Quotes eld
16304 \begin_inset Quotes erd
16307 These two perform some action.
16310 \begin_layout Standard
16311 A common feature of all five environments,
16331 , is a rather long-ish label.
16332 The text following this label — ordinarily the contents of the paragraph
16333 environment — is utterly irrelevant for
16354 LyX completely ignores it.
16355 In fact, you can leave these five environments completely empty.
16359 \begin_layout Standard
16364 to put any text after the rather long-ish label, you might want to.
16365 This could be a short description of the contents of the
16370 In that case, enter your descriptive comment and hit
16374 as you normally would.
16377 \begin_layout Standard
16378 If, on the other hand, you don't want to enter any descriptive text, you'll
16379 hit another LyX quirk.
16380 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16381 environment until you put something in the old one.
16385 \begin_layout Itemize
16386 Start entering the text that will
16414 \begin_layout Itemize
16415 Now move to the beginning of that paragraph.
16419 \begin_layout Itemize
16428 \begin_layout Itemize
16429 Finally, change this new, empty paragraph to a
16453 \begin_layout Standard
16454 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16458 \begin_layout Subsection
16459 Making a Presentation with
16472 \begin_layout Subsubsection
16480 \begin_layout Standard
16481 If you're expecting this section to teach you how to actually make a presentatio
16482 n, you'll be sorely disappointed.
16483 Naturally, I'll describe all of the ways the
16487 class can assist you in preparing the materials for a presentation.
16488 Filling in the contents, however, is up to you.
16493 the LyX philosophy.]
16496 \begin_layout Standard
16501 environment [in the manner described in section
16502 \begin_inset space ~
16506 \begin_inset CommandInset ref
16508 reference "sec:slideQuirk"
16512 ] tells LyX to begin a new slide [duh].
16513 The label for this environment/
16514 \begin_inset Quotes erd
16518 \begin_inset Quotes erd
16522 \begin_inset Quotes eld
16526 \begin_inset Quotes erd
16529 in cool blue, followed by the label,
16530 \begin_inset Quotes eld
16534 \begin_inset Quotes erd
16538 Any text or paragraph environments that follow this one go on the new slide.
16542 \begin_layout Standard
16543 Slides are probably the only time you'll need to forcibly end pages in LyX
16544 (this can be specified in the
16549 In fact, you'll want to, once you finish entering the contents of one slide.
16550 If you've entered more text than can physically fit on a slide, the extra
16551 overflows onto a new slide.
16552 I don't recommend doing this, however, since the overflow slide won't have
16553 any page number on it.
16554 Furthermore, it may interfere with any
16558 you've made to accompany the oversized
16565 \begin_layout Standard
16574 environments work the same way as the
16579 They both create an
16580 \begin_inset Quotes eld
16584 \begin_inset Quotes erd
16587 followed by a label [
16588 \begin_inset Quotes eld
16592 \begin_inset Quotes erd
16596 \begin_inset Quotes eld
16600 \begin_inset Quotes erd
16604 The color is a stunning magenta instead of blue, and the
16605 \begin_inset Quotes eld
16609 \begin_inset Quotes erd
16612 will look different, in style and in length.
16613 The label fonts of all three also differ from one another.
16616 \begin_layout Standard
16621 , if the contents of a
16629 exceed the physical size of a slide or sheet of paper, the extra will overflow
16631 Again, you should avoid this.
16632 It defeats the whole purpose of
16643 \begin_layout Subsubsection
16653 \begin_layout Standard
16658 is a slide that sits atop another slide.
16659 Perhaps you wish to discuss a figure on the main
16663 before displaying the text associated with it.
16664 One way to accomplish this is tape a flap of dark paper over the part of
16669 you want to display later.
16670 This method fails, however, if you wish to overlap one graph with another,
16672 You would then have to fumble while speaking to align the two separate,
16677 s to align the two graphs.
16682 environment in both cases makes life much easier.
16685 \begin_layout Standard
16690 receives the page number of its
16691 \begin_inset Quotes eld
16695 \begin_inset Quotes erd
16703 \begin_inset Quotes eld
16711 \begin_inset Quotes erd
16718 \begin_layout Plain Layout
16719 Presumably, mutliple
16724 \begin_inset Quotes eld
16732 \begin_inset Quotes erd
16736 \begin_inset Quotes eld
16744 \begin_inset Quotes erd
16748 \begin_inset Quotes eld
16756 \begin_inset Quotes erd
16760 \begin_inset space ~
16763 appended to the page number of the parent
16773 Clearly, you want the contents of both the
16781 to each fit on a single physical slide! You should probably consider an
16787 \begin_inset Quotes eld
16791 \begin_inset Quotes erd
16803 class provides a visual cue for this: the label at the start of an
16807 is shorter than that at the start of a
16812 Lastly, when you generate printable output, you'll find alignment markers
16813 in all four corners of both the
16817 page and its parent
16822 These will assist you in lining up the two physical slides.
16825 \begin_layout Standard
16826 The major problem in overlaying two slides is aligning the contents of the
16827 two transparencies.
16828 How much space should you leave for that graph on the second slide? Worse
16829 still, what if you want a graph and a sentence on second slide, but there
16830 is text on the main transparency that goes in between them? You could try
16831 and insert vertical space of the right size.
16832 The better way is to use
16843 \begin_layout Standard
16844 As their names imply,
16852 are two command-like paragraph environments that make all subsequent text
16853 invisible and visible, respectively.
16855 \begin_inset space ~
16859 \begin_inset CommandInset ref
16861 reference "sec:slideQuirk"
16865 that you don't place anything
16869 these two environments, however.
16874 , it inserts a centered, sky-blue label into the page reading
16875 \begin_inset Quotes eld
16878 <Invisible Text Follows>
16879 \begin_inset Quotes erd
16883 For paragraphs following this label, the parts of the
16891 ; it doesn't matter which] where they would be contain instead blank space.
16895 \begin_layout Standard
16900 , the corresponding centered label is
16901 \begin_inset Quotes eld
16904 <Visible Text Follows>
16905 \begin_inset Quotes erd
16909 Paragraphs following this label behave normally.
16910 Note that the beginning of a new
16922 automatically shuts off an
16927 It's therefore not necessary to use
16938 \begin_layout Standard
16939 By now, it should be obvious how to create overlay transparencies using
16940 the proper combination of
16959 \begin_layout Enumerate
16964 , including everything that will appear on it, whether on the main slide
16972 \begin_layout Enumerate
16973 Before each figure or paragraph that will appear only on the
16982 If necessary, insert a
16986 environment after the
16993 \begin_layout Enumerate
16998 immediately following the
17005 \begin_layout Enumerate
17006 Copy the contents of this
17017 \begin_layout Enumerate
17022 , change all of the
17033 \begin_layout Standard
17035 You've just made an
17042 \begin_layout Standard
17043 There's one problem with the way I've designed the LyX
17047 class: you can't make text in the middle of a paragraph invisible, nor
17048 make text in the middle of an invisible paragraph visible again.
17049 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17053 \begin_layout Plain Layout
17054 The commands of interest are:
17057 \begin_layout Itemize
17062 invisible \SpecialChar \ldots{}
17066 \begin_layout Itemize
17071 visible \SpecialChar \ldots{}
17075 \begin_layout Plain Layout
17076 \SpecialChar \ldots{}
17077 and need to be marked as TeX.
17079 \begin_inset Quotes eld
17083 \begin_inset Quotes erd
17086 you wish to change goes in between the brackets [and after the
17099 If you don't know how to mark text as TeX, see the appropriate section
17112 \begin_layout Subsubsection
17122 \begin_inset CommandInset label
17124 name "sec:slideNote"
17131 \begin_layout Standard
17140 is associated with a
17141 \begin_inset Quotes eld
17145 \begin_inset Quotes erd
17157 class provides visual cues.
17162 is shorter than that of a
17166 [yet longer than that of an
17170 ] and, like the label of an
17174 is shockingly magenta.
17175 Additionally, the printed
17179 has the page number of its
17180 \begin_inset Quotes eld
17184 \begin_inset Quotes erd
17192 \begin_inset Quotes eld
17200 \begin_inset Quotes erd
17204 \begin_inset Quotes eld
17212 \begin_inset Quotes erd
17216 \begin_inset Quotes eld
17224 \begin_inset Quotes erd
17228 You can have multiple
17232 s associated with a single
17244 , you'll probably want to break up long
17248 s so that they fit on a single sheet of paper.
17251 \begin_layout Standard
17256 is obvious: it contains anything additional you might want to say about
17262 It could also be used as a sheet of reminders for a particular
17267 In the case of the latter, you might want to make use of time markers.
17273 \begin_inset Quotes eld
17277 \begin_inset Quotes erd
17280 support for time markers, a
17285 So, you'll have to resort to using the LaTeX codes.
17288 \begin_layout Standard
17289 To use time markers, you'll need to specify the extra class option
17290 \begin_inset Quotes eld
17298 \begin_inset Quotes erd
17302 \begin_inset space ~
17306 \begin_inset CommandInset ref
17308 reference "sec:slidesetup"
17313 This option turns on timing marks, which will appear in the lower-left-hand
17319 To set what appears in the time marker, you use the LaTeX commands
17320 \begin_inset Quotes eld
17330 \begin_inset Quotes erd
17334 \begin_inset Quotes eld
17344 \begin_inset Quotes erd
17348 The arguments of both commands are time measured in seconds.
17350 \begin_inset Quotes eld
17360 \begin_inset Quotes erd
17363 sets the time marker to a given time.
17365 \begin_inset Quotes eld
17375 \begin_inset Quotes erd
17378 increments the time marker by the specified amount.
17379 Using time markers and
17383 s in this fashion, you can remind yourself how much time to spend on a particula
17391 \begin_layout Standard
17392 There's one last feature to describe.
17393 Clearly, you'd like to print out all of your
17401 s on transparencies while printing all of your
17418 with which it is associated.
17419 What's a person to do?
17422 \begin_layout Standard
17423 Luckily, there are two LaTeX commands that allow you to select what to print
17425 Both must be placed into the preamble of your document.
17427 \begin_inset Quotes eld
17439 \begin_inset Quotes erd
17442 will cause the output to contain only the
17451 Correspondingly, the command
17452 \begin_inset Quotes eld
17464 \begin_inset Quotes erd
17467 prevents the output of anything but
17472 I'd advise placing both commands in the preamble and initially comment
17474 You can then preview your entire presentation as you write.
17475 When you're done writing, you can then uncomment one of the two to select
17476 what you want to print.
17477 I like to uncomment
17478 \begin_inset Quotes eld
17490 \begin_inset Quotes erd
17493 , print to a file with
17494 \begin_inset Quotes eld
17502 \begin_inset Quotes erd
17505 in its name, comment it back out, then uncomment
17506 \begin_inset Quotes eld
17518 \begin_inset Quotes erd
17522 \begin_inset Quotes eld
17530 \begin_inset Quotes erd
17534 I can then send either file to a printer, loading transparencies or plain
17535 paper as appropriate.
17538 \begin_layout Standard
17539 You can also provide other arguments to the
17540 \begin_inset Quotes eld
17550 \begin_inset Quotes erd
17554 \begin_inset Quotes eld
17564 \begin_inset Quotes erd
17568 See a good LaTeX book for details.
17571 \begin_layout Subsection
17576 Class Template File
17579 \begin_layout Standard
17580 I have also provided a template file,
17581 \begin_inset Quotes eld
17589 \begin_inset Quotes erd
17597 To use it, begin your new presentation with
17602 ile\SpecialChar \menuseparator
17604 \begin_inset space ~
17608 \begin_inset space ~
17618 Your new LyX presentation file will contain an example
17639 additionally contain an example of the use of
17648 Lastly, the preamble will contain:
17651 \begin_layout LyX-Code
17652 % Uncomment to print out only slides and overlays
17655 \begin_layout LyX-Code
17659 \begin_layout LyX-Code
17665 \begin_inset Newline newline
17671 \begin_layout LyX-Code
17672 % Uncomment to print out only notes
17675 \begin_layout LyX-Code
17679 \begin_layout LyX-Code
17687 \begin_layout Standard
17688 One final thing: I created this class to support the LaTeX2e
17689 \begin_inset Quotes eld
17697 \begin_inset Quotes erd
17700 class, one of the built-in LaTeX2e classes.
17701 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17702 built-in slide class.
17703 It's here if you want it or need it.
17704 There exist other LaTeX2e classes for creating presentations, such as the
17710 \begin_inset space ~
17714 \begin_inset CommandInset ref
17716 reference "sec:foiltex"
17721 \begin_inset Quotes eld
17729 \begin_inset Quotes erd
17732 package [present on some TeX distributions].
17733 The latter is not yet supported under LyX.
17737 \begin_layout Plain Layout
17738 Perhaps you can take on the task\SpecialChar \ldots{}
17744 I know nothing about these other classes.
17745 Try them out to see what sort of alternative they provide.
17748 \begin_layout Chapter
17749 LyX Features needing Extra Software
17752 \begin_layout Section
17756 \begin_layout Standard
17762 \begin_layout Subsection
17766 \begin_layout Standard
17775 \begin_layout Plain Layout
17780 is not yet available when you are using the LaTeX distribution MiKTeX.
17785 , you'll find in the
17792 \begin_inset space ~
17803 \begin_inset CommandInset href
17805 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17812 \begin_layout Standard
17817 package is a program that was written by
17818 \begin_inset Flex Noun
17821 \begin_layout Plain Layout
17823 \begin_inset space ~
17831 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17832 and easy to forget.
17833 The program runs over your LaTeX file, checks the integrity of the file,
17834 and flags some common errors.
17835 In other technical words, it is
17842 \begin_layout Standard
17843 Well, what is a syntax checker doing in LyX which is supposed to produce
17844 correct LaTeX anyways? The answer is simple: Just as
17848 not only checks the
17852 of C programs, but also does
17856 checks for type-errors,
17860 catches some common
17864 errors, in addition to the syntactical ones.
17869 is capable of detecting several common errors, such as
17872 \begin_layout Itemize
17873 Ellipsis detection:
17874 \begin_inset Newline newline
17877 Use \SpecialChar \ldots{}
17881 \begin_layout Itemize
17882 No space in front of/after parenthesis:
17883 \begin_inset Newline newline
17889 \begin_layout Itemize
17890 Enforcement of normal space after common abbreviations:
17891 \begin_inset Newline newline
17895 \begin_inset space \thinspace{}
17899 \begin_inset space \space{}
17902 is too wide spacing.
17905 \begin_layout Itemize
17906 Enforcement of end-of-sentence space when the last sentence ends with a
17908 \begin_inset Newline newline
17912 And this is wrong spacing.
17915 \begin_layout Itemize
17916 Space in front of labels and similar commands:
17917 \begin_inset Newline newline
17920 The label should stick right up to the text to avoid falling to a wrong
17923 \begin_inset CommandInset label
17933 \begin_layout Plain Layout
17934 This footnote is in danger of falling off to a wrong page
17939 The label is separated too much.
17942 \begin_layout Itemize
17943 Space in front of references, instead of hard spaces:
17944 \begin_inset Newline newline
17947 In you are in bad luck, the text will break right between the referenced
17948 text and reference number, and that's a pity.
17950 \begin_inset CommandInset ref
17952 reference "sec:chktex"
17959 \begin_layout Itemize
17961 \begin_inset Quotes eld
17965 \begin_inset Quotes erd
17969 \begin_inset Formula $\times$
17973 \begin_inset Newline newline
17976 2x2 looks cheap compared to
17977 \begin_inset Formula $2\times2$
17983 \begin_layout Standard
17984 and more \SpecialChar \ldots{}
17985 It is an invaluable tool when you are
17986 \begin_inset Quotes eld
17990 \begin_inset Quotes erd
17993 your document before printing, and you should run it right after the obligatory
17994 spelling check, and before you go fine tuning the typesetting.
17997 \begin_layout Subsection
18001 \begin_layout Standard
18002 If you have the program installed, usage is as simple as choosing
18004 Tools\SpecialChar \menuseparator
18006 \begin_inset space ~
18012 This will make LyX generate a LaTeX file of your document, start
18016 to check it, and then make LyX insert
18017 \begin_inset Quotes eld
18021 \begin_inset Quotes erd
18024 with the warnings from
18028 , if there were any.
18029 The warnings will be placed close to the point of the mistake, and you
18030 can quickly find them by using the
18032 Navigate\SpecialChar \menuseparator
18035 menu item, or the shortcut key
18044 Open the error boxes by clicking on them with the mouse, or use the shortcut
18053 bindings, or the corresponding
18062 Read the warning and correct the mistake, if it is a mistake.
18063 If you have trouble understanding what the warning is about, you can safely
18065 Remember that there is a hidden layer between the document on screen and
18066 the technical details in invoking
18070 , and this gap can make some warnings seem arcane or just right down plain
18074 \begin_layout Standard
18075 This document is an excellent testing bed for the feature, and it should
18076 provide quite a few warnings for you to fiddle with.
18077 Since computers are only so smart, expect most of the warnings to be false
18081 \begin_layout Subsection
18082 How to fine tune it
18085 \begin_layout Standard
18086 Sometimes, you'll find that
18090 makes more noise than suits your mood.
18091 Then you can choose not to use it, wait until your mood changes, or try
18096 to get better along with you.
18099 \begin_layout Standard
18108 very configurable and extensible, you shouldn't expect to solve all problems
18114 Since LyX has to generate a somewhat special LaTeX file to be able to match
18115 the line numbers from the
18123 \begin_layout Plain Layout
18124 You can inspect the specific output from
18130 Edit\SpecialChar \menuseparator
18132 \begin_inset space ~
18136 \begin_inset space ~
18150 to the internal document structure, some of the warnings will not seen
18151 to appear correctly.
18152 There are two things you can do about this:
18155 \begin_layout Itemize
18160 invocation command line in
18176 installation configuration file (usually with the file
18181 See below to learn what warnings can be enabled and disabled on the command
18186 \begin_layout Itemize
18187 Export your document as a raw LaTeX file using
18189 File\SpecialChar \menuseparator
18190 Export\SpecialChar \menuseparator
18198 Invoked in this way, it can be a hassle to find the corresponding place
18199 in the document inside LyX, but with a little patience, you should be able
18203 \begin_layout Standard
18204 Here follows the warning messages that can be enabled and disabled in
18213 to disable a warning, and
18217 to enable a warning.
18218 The emphasized entries are disabled by default, because the default is
18221 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18226 \begin_layout Standard
18227 Notice that you should only use the options that enable and disable warnings,
18228 because LyX relies on some of the other command line parameters to be set
18229 in a specific way to have a chance to communicate with
18236 \begin_layout Enumerate
18240 Command terminated with space.
18243 \begin_layout Enumerate
18246 Non-breaking space (
18247 \begin_inset Quotes eld
18255 \begin_inset Quotes erd
18258 ) should have been used.
18261 \begin_layout Enumerate
18265 You should enclose the previous parenthesis with
18266 \begin_inset Quotes eld
18274 \begin_inset Quotes erd
18280 \begin_layout Enumerate
18283 Italic correction (
18284 \begin_inset Quotes eld
18294 \begin_inset Quotes erd
18297 ) found in non-italic buffer.
18300 \begin_layout Enumerate
18303 Italic correction (
18304 \begin_inset Quotes eld
18314 \begin_inset Quotes erd
18317 ) found more than once.
18320 \begin_layout Enumerate
18324 No italic correction (
18325 \begin_inset Quotes eld
18335 \begin_inset Quotes erd
18341 \begin_layout Enumerate
18345 \begin_inset Quotes eld
18353 \begin_inset Quotes erd
18357 \begin_inset Quotes eld
18365 \begin_inset Quotes erd
18371 \begin_layout Enumerate
18374 Wrong length of dash may have been used.
18377 \begin_layout Enumerate
18381 \begin_inset Quotes eld
18389 \begin_inset Quotes erd
18393 \begin_inset Quotes eld
18401 \begin_inset Quotes erd
18407 \begin_layout Enumerate
18411 \begin_inset Quotes eld
18419 \begin_inset Quotes erd
18425 \begin_layout Enumerate
18429 \begin_inset Quotes eld
18437 \begin_inset Quotes erd
18440 to achieve an ellipsis.
18443 \begin_layout Enumerate
18446 Inter-word spacing (
18447 \begin_inset Quotes eld
18457 \begin_inset Quotes eld
18460 ) should perhaps be used.
18463 \begin_layout Enumerate
18466 Inter-sentence spacing (
18467 \begin_inset Quotes eld
18477 \begin_inset Quotes erd
18480 ) should perhaps be used.
18483 \begin_layout Enumerate
18486 Could not find argument for command.
18489 \begin_layout Enumerate
18493 \begin_inset Quotes eld
18501 \begin_inset Quotes erd
18507 \begin_layout Enumerate
18510 Math mode still on at end of LaTeX file.
18513 \begin_layout Enumerate
18517 \begin_inset Quotes eld
18525 \begin_inset Quotes erd
18528 doesn't match the number of
18529 \begin_inset Quotes eld
18537 \begin_inset Quotes erd
18543 \begin_layout Enumerate
18546 You should use either
18549 \begin_inset Quotes eld
18557 \begin_inset Quotes erd
18562 as an alternative to
18563 \begin_inset Quotes eld
18571 \begin_inset Quotes erd
18577 \begin_layout Enumerate
18584 " (ASCII 39) instead of "
18591 \begin_layout Enumerate
18594 User-specified pattern found.
18597 \begin_layout Enumerate
18600 This command might not be intended.
18603 \begin_layout Enumerate
18610 \begin_layout Enumerate
18628 \begin_layout Enumerate
18631 Delete this space to maintain correct page references.
18634 \begin_layout Enumerate
18638 You might wish to put this between a pair of
18639 \begin_inset Quotes eld
18647 \begin_inset Quotes erd
18653 \begin_layout Enumerate
18656 You ought to remove spaces in front of punctuation.
18659 \begin_layout Enumerate
18662 Could not execute LaTeX command.
18665 \begin_layout Enumerate
18674 in front of small punctuation.
18677 \begin_layout Enumerate
18685 may look prettier here.
18688 \begin_layout Enumerate
18692 Multiple spaces detected in output.
18695 \begin_layout Enumerate
18698 This text may be ignored.
18701 \begin_layout Enumerate
18707 \begin_inset Quotes eld
18712 to begin quotation, not
18719 \begin_layout Enumerate
18726 to end quotation, not
18729 \begin_inset Quotes eld
18737 \begin_layout Enumerate
18743 \begin_layout Enumerate
18746 You should perhaps use
18747 \begin_inset Quotes eld
18755 \begin_inset Quotes erd
18761 \begin_layout Enumerate
18764 You should put a space in front of/after parenthesis.
18767 \begin_layout Enumerate
18770 You should avoid spaces in front of/after parenthesis.
18773 \begin_layout Enumerate
18777 You should not use punctuation in front of/after quotes.
18780 \begin_layout Enumerate
18783 Double space found.
18786 \begin_layout Enumerate
18789 You should put punctuation outside inner/inside display math mode.
18792 \begin_layout Enumerate
18795 You ought to not use primitive TeX in LaTeX code.
18798 \begin_layout Enumerate
18801 You should remove spaces in front of
18802 \begin_inset Quotes eld
18810 \begin_inset Quotes erd
18816 \begin_layout Enumerate
18819 \begin_inset Quotes eld
18827 \begin_inset Quotes erd
18830 is normally not followed by
18831 \begin_inset Quotes eld
18839 \begin_inset Quotes erd
18845 \begin_layout Standard
18846 In later versions of LyX, we hope to provide a more complete interface to
18847 this tool (and it's smaller cousin
18851 ) to exploit the full power of it.
18852 But it's not exactly useless as it is now: go try it on one of your existing
18853 documents of a certain length and be surprised.
18856 \begin_layout Section
18857 Version Control in LyX
18860 \begin_layout Standard
18863 Lars Gullik Bjønnes
18870 \begin_layout Subsection
18874 \begin_layout Standard
18875 A friend of mine wanted to try LyX for a group project.
18876 When he didn't find support for version control or file locking, he dropped
18878 This angered me a bit, so I thought that I should at least make support
18879 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18880 This has been done.
18881 LyX now supports some of the most basic RCS/CVS/SVN commands.
18882 If you need something a bit more sophisticated you will have to do that
18883 manually in a terminal.
18886 \begin_layout Standard
18887 Also note that CVS support is not as good as subversion support so we advice
18889 Good place to start with Subversion is SVN Book
18893 \begin_layout Plain Layout
18894 \begin_inset CommandInset href
18896 target "http://svnbook.red-bean.com/"
18906 In case of RCS you should read
18907 \begin_inset Quotes eld
18911 \begin_inset Quotes erd
18914 (a man file, read it with
18919 This file describes all the basic features of RCS.
18920 You should especially notice the comment about a RCS directory, and the
18921 notion of a master RCS file (the file ending in
18928 \begin_layout Standard
18929 Before you begin to use the version control features in LyX, you should
18930 be familiar with RCS/CVS/SVN usage.
18931 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18932 package—no guarantees are made for older versions.
18933 Most of the log messages are not currently displayed after operations —
18934 you can check them in Messages pane if unsure.
18937 \begin_layout Standard
18938 For introducing your own external commands consult vc-command in the manual
18942 \begin_layout Subsection
18943 RCS commands in LyX
18946 \begin_layout Standard
18947 The following sections describe the RCS commands supported by LyX.
18948 You can find them in the
18950 File\SpecialChar \menuseparator
18952 \begin_inset space ~
18958 LyX was tested against RCS 5.7.
18961 \begin_layout Subsubsection
18967 \begin_layout Standard
18968 If your document is not under revision control, this is the only item shown
18970 And if it is under revision control, the
18974 item is not visible.
18978 \begin_layout Standard
18979 This command registers your document with RCS (unless you are under the
18980 directory managed by CVS)\SpecialChar \@.
18981 You are asked interactively to supply an initial
18982 description of the document.
18983 The document is now set in Read-Only mode and you have to
18986 \begin_inset space ~
18990 \begin_inset space ~
18994 \begin_inset space ~
18999 , before making any changes to it.
19000 A document under revision control has a
19001 \begin_inset Quotes eld
19004 [RCS:<version> <locker>]
19005 \begin_inset Quotes erd
19008 item tagged to the filename in the minibuffer.
19011 \begin_layout Standard
19012 RCS command that is run:
19014 ci -q -u -i -t-"<initial description>" <file-name>
19017 \begin_layout Standard
19022 to understand the switches.
19026 \begin_layout Subsubsection
19032 \begin_layout Standard
19033 When you are finished editing a file, you check in your changes.
19034 When you do this, you are asked for a description of the changes.
19035 This is stored in the history log.
19036 The version number is bumped, your changes are applied to the master RCS
19037 file, the document is unlocked and set to Read-Only mode.
19041 \begin_layout Standard
19044 ci -q -u -m"<description>" <file-name>
19047 \begin_layout Subsubsection
19053 \begin_layout Standard
19054 By doing this you lock the document so that only you can edit it.
19055 This will also make the document Read-Write only for you.
19056 You will usually continue editing for a while and when you are finished
19057 you check in your changes.
19058 The status line is changed to reflect that you have locked the file.
19062 \begin_layout Standard
19065 co -q -l <file-name>
19068 \begin_layout Subsubsection
19071 Revert To Repository Version
19074 \begin_layout Standard
19075 This will discard all changes made to the document since the last check
19077 You get a warning before changes are discarded.
19080 \begin_layout Standard
19083 co -f -u<version> <file-name>
19086 \begin_layout Subsubsection
19092 \begin_layout Standard
19093 This makes as if the last check in never happened.
19094 No changes are made to the document loaded into LyX, but the last version
19095 is removed from the master RCS file.
19099 \begin_layout Standard
19102 rcs -o<version> <file-name>
19105 \begin_layout Subsubsection
19111 \begin_layout Standard
19112 This shows the complete history of the RCS document.
19117 is shown in a browser.
19125 \begin_layout Subsubsection
19129 \begin_layout Standard
19130 LyX supports RCS version number, author name, date and time of last commit.
19131 All those are extracted from
19133 rlog -r <file-name>
19136 For other details see
19137 \begin_inset CommandInset ref
19139 reference "sub:VCS-Revision-Information"
19146 \begin_layout Subsection
19147 CVS commands in LyX
19150 \begin_layout Standard
19151 A subset of CVS operations is supported by LyX.
19152 You can find the commands in the
19154 File\SpecialChar \menuseparator
19156 \begin_inset space ~
19162 The version control system SVN is more powerful, so please use it instead
19163 of CVS if possible.
19166 \begin_layout Subsubsection
19172 \begin_layout Standard
19173 If you start from scratch with CVS you have to create your repository and
19174 checkout the working copy with external tools.
19175 If you're using a client-server setup you may need to login before doing
19176 the first repository checkout.
19179 \begin_layout Standard
19180 If your documents are under revision control and others are using the same
19181 repository problems arise when different changes to the same document at
19182 the same location happen.
19183 Standard CVS repositories doesn't operate with a file locking mechanism.
19184 This may be surprising, but conflicts only occur if people disagree on
19185 the proper content of the same part of a document.
19186 So, if co-workers are used to communicate regularly, these conflicts occur
19188 If they don't communicate they have a fundamental problem anyway.
19189 Nevertheless some people like to work with so called
19190 \begin_inset Quotes eld
19194 \begin_inset Quotes erd
19198 If they do so the working copy of all files is readonly when checked out
19199 first and the user starts editing after using a special command to make
19200 the working copy writable.
19201 When the changes are checked in the working copy returns to readonly state.
19202 With LyX one has to edit the
19203 \begin_inset Flex Code
19206 \begin_layout Plain Layout
19212 file and add the line
19213 \begin_inset Flex Code
19216 \begin_layout Plain Layout
19222 to work with reserved checkouts.
19223 The benefit is the possibility to see who is using a writable copy of some
19225 It's not guaranteed only one user makes a copy writable.
19228 \begin_layout Standard
19229 LyX tries to guess if you're using reserved or non-reserved checkouts.
19230 If your working copy is readonly or it is writable and an additional copy
19231 of your document exists in the CVS/Base sub-directory a reserved otherwise
19232 a non-reserved checkout is assumed.
19233 When a reserved checkout is detected you have to use
19234 \begin_inset Flex MenuItem
19237 \begin_layout Plain Layout
19243 to make your working copy writable if it's readonly.
19245 \begin_inset Flex MenuItem
19248 \begin_layout Plain Layout
19254 operation is possible and that makes your working copy readonly again after
19255 transferring your changes to the repository.
19258 \begin_layout Standard
19259 More information about CVS can be found here
19260 \begin_inset Flex URL
19263 \begin_layout Plain Layout
19265 http://www.nongnu.org/cvs
19271 \begin_inset Flex URL
19274 \begin_layout Plain Layout
19276 http://ximbiot.com/cvs
19284 \begin_layout Standard
19289 to understand the sub-commands and the switches mentioned below.
19292 \begin_layout Subsubsection
19298 \begin_layout Standard
19299 If your document is not under revision control, this is the only item shown
19301 And if it is under revision control, the
19308 item is not visible.
19312 \begin_layout Standard
19313 This command registers in CVS your document
19314 \begin_inset Flex Strong
19317 \begin_layout Plain Layout
19325 in case you have already the documents directory under CVS control (in
19331 This means you have to create or checkout the archive by yourself using
19333 (In case you forget that step LyX registers the document with RCS.)
19336 \begin_layout Standard
19337 Then you are asked interactively to supply an initial description of the
19339 Don't forget that registered file is not yet checked in.
19342 \begin_layout Standard
19343 CVS command that is run:
19345 cvs -q add -m"<entered message>" "<file-name>"
19348 \begin_layout Standard
19353 above and for all other CVS commands is an abbreviation for
19354 \begin_inset Quotes eld
19357 change the current working directory to file location and use the file name
19358 without path component as argument
19359 \begin_inset Quotes erd
19365 \begin_layout Subsubsection
19371 \begin_layout Standard
19372 When you are finished editing a file, you commit your changes.
19373 When you do this and you had changed the document, you are asked for a
19374 description of the changes.
19375 After that changes are written to the repository.
19376 In case you didn't change the document and a reserved checkout is detected
19377 the reservation made on
19378 \begin_inset Flex MenuItem
19381 \begin_layout Plain Layout
19390 \begin_layout Labeling
19391 \labelwidthstring 00.00.0000
19393 \begin_inset space ~
19397 \begin_inset space ~
19401 \begin_inset Newline newline
19405 \begin_inset Flex Code
19408 \begin_layout Plain Layout
19411 -q commit -m"<description>" "<file-name>"
19417 \begin_inset Newline newline
19421 \begin_inset Flex Code
19424 \begin_layout Plain Layout
19435 \begin_layout Subsubsection
19441 \begin_layout Standard
19442 When you are sharing a repository with others, you may have to incorporate
19443 their changes into your working copy.
19446 \begin_layout Standard
19449 cvs -q update "<file-name>"
19452 \begin_layout Standard
19453 If a readonly checkout is detected the working copy is made writable and
19457 \begin_layout Standard
19460 cvs -q edit "<file-name>"
19463 \begin_layout Subsubsection
19466 Revert To Repository Version
19469 \begin_layout Standard
19470 This will discard all changes made to the document since the last check
19472 You get a warning before changes are discarded.
19473 Firstly the file is deleted, secondly CVS update command is run.
19476 \begin_layout Standard
19479 cvs -q update "<file-name>"
19482 \begin_layout Standard
19483 If a reserved checkout is detected and the working copy has no changes only
19484 the reservation is undone.
19487 \begin_layout Standard
19490 cvs -q unedit "<file-name>"
19493 \begin_layout Subsubsection
19494 Update of the local directory checkout from repository
19497 \begin_layout Standard
19498 Once your documents gets more complex, containing sub-documents and pictures,
19500 \begin_inset Flex Code
19503 \begin_layout Plain Layout
19509 files and so on using version control becomes more complicated.
19510 LyX supports updating the whole tree in which resides the document.
19511 This become especially useful once you cooperate with people which neither
19512 have detailed knowledge about CVS usage nor they have ambition to commit
19513 additional material to the repository.
19514 You have to organize the files structure so that all external files are
19515 in the same directory or subdirectories of the document.
19516 It's good practice anyway to store multipart documents in an extra directory.
19519 \begin_layout Standard
19521 \begin_inset Flex Code
19524 \begin_layout Plain Layout
19525 Update local directory from repository
19530 command updates the whole directory.
19531 If local changes are detected user is warned before update starts.
19532 In case of merge conflicts both versions of the conflicting document parts
19533 are placed in the final document.
19534 You have to review and correct the result of the merge.
19535 You'll find the conflicts enclosed in pairs of
19536 \begin_inset Flex Code
19539 \begin_layout Plain Layout
19546 \begin_inset Flex Code
19549 \begin_layout Plain Layout
19556 \begin_inset Flex Code
19559 \begin_layout Plain Layout
19566 The first part is your version as before the update operation with the
19567 document name prepended.
19568 The second one is the repository version with the version number after
19570 \begin_inset Flex Code
19573 \begin_layout Plain Layout
19582 \begin_layout Labeling
19583 \labelwidthstring 00.00.0000
19585 \begin_inset space ~
19589 \begin_inset space ~
19593 \begin_inset Newline newline
19597 \begin_inset Flex Code
19600 \begin_layout Plain Layout
19608 (Ask if changes are detected.)
19609 \begin_inset Newline newline
19613 \begin_inset Flex Code
19616 \begin_layout Plain Layout
19617 cd $path; cvs -q update
19627 \begin_layout Standard
19629 \begin_inset Flex Code
19632 \begin_layout Plain Layout
19638 stands for the path to the document.
19641 \begin_layout Subsubsection
19647 \begin_layout Standard
19648 This shows the complete history of the CVS document.
19651 cvs log "<file-name>"
19653 is shown in a browser.
19656 \begin_layout Subsection
19657 SVN commands in LyX
19660 \begin_layout Standard
19661 SVN is now partially supported by LyX.
19662 You can find the commands in the
19664 File\SpecialChar \menuseparator
19666 \begin_inset space ~
19672 Please note that if you use password protected access to repository via
19673 ssh, you will be asked in terminal window.
19674 LyX was tested against SVN 1.5 and 1.6
19678 \begin_layout Plain Layout
19679 Most of the commands will work with 1.4 too, see
19680 \begin_inset CommandInset ref
19682 reference "sub:SVN-Repo-Update"
19694 \begin_layout Subsubsection
19700 \begin_layout Standard
19701 If your document is not under revision control, this is the only item shown
19703 And if it is under revision control, the
19710 item is not visible.
19714 \begin_layout Standard
19715 This command registers in SVN your document ONLY in case you have already
19716 the documents directory under SVN control (in particular
19721 This means you have to checkout the archive by yourself.
19725 \begin_layout Standard
19726 Then you are asked interactively to supply an initial description of the
19728 Don't forget that registered file is not yet commited.
19731 \begin_layout Standard
19732 SVN command that is run:
19735 \begin_inset Quotes eld
19739 \begin_inset Quotes erd
19745 \begin_layout Standard
19750 to understand the switches.
19754 \begin_layout Subsubsection
19760 \begin_layout Standard
19761 When you are finished editing a file, you commit your changes.
19762 When you do this, you are asked for a description of the changes.
19763 After that changes are commited.
19766 \begin_layout Standard
19771 \begin_layout Plain Layout
19772 In case locking is not enabled.
19774 \begin_inset CommandInset ref
19776 reference "subsec:SVN-File-Locking"
19787 svn commit -q -m"<description>" <file-name>
19790 \begin_layout Subsubsection
19796 \begin_layout Standard
19797 Updates the changes of this file from the repository.
19798 Be sure you understand SVN merging and conflicts resolving before using
19799 this function, because all conflicts has to be resolved manually by you!
19802 \begin_layout Standard
19807 \begin_layout Plain Layout
19815 svn update --non-interactive
19816 \begin_inset Quotes eld
19820 \begin_inset Quotes erd
19826 \begin_layout Subsubsection
19829 Revert To Repository Version
19832 \begin_layout Standard
19833 This will discard all changes made to the document since the last check
19835 You get a warning before changes are discarded.
19839 \begin_layout Standard
19843 \begin_inset Quotes eld
19847 \begin_inset Quotes erd
19853 \begin_layout Subsubsection
19854 \begin_inset CommandInset label
19856 name "sub:SVN-Repo-Update"
19860 Update of the local directory checkout from repository
19864 \begin_layout Plain Layout
19865 Note that this command will work only with subversion
19866 \begin_inset Formula $\geqq1.5$
19877 \begin_layout Standard
19878 All the commands above have one shortcomming - they deal with the current
19880 Once your document contains pictures, includes external
19881 \begin_inset Flex Code
19884 \begin_layout Plain Layout
19890 files and so on administration becomes more complicated.
19891 LyX now supports updating the whole tree in which resides the document
19895 \begin_layout Plain Layout
19896 One need to organize the files structure so that all external files are
19897 in the same directory or subdirectories of the document.
19904 This become especially useful once you cooperate with people which neither
19905 know about subversion management nor they have ambition to commit additional
19906 material to the repository.
19910 \begin_layout Standard
19911 \begin_inset Flex Code
19914 \begin_layout Plain Layout
19915 Update local directory from repository
19920 command updates the whole directory and in case of merge conflicts local
19921 version of the files are left, so no unintended data loss occurs.
19922 If local changes are detected user is warned before update starts.
19925 \begin_layout Labeling
19926 \labelwidthstring 00.00.0000
19928 \begin_inset space ~
19932 \begin_inset space ~
19936 \begin_inset Newline newline
19940 \begin_inset Flex Code
19943 \begin_layout Plain Layout
19949 (Ask if changes are detected.)
19950 \begin_inset Newline newline
19954 \begin_inset Flex Code
19957 \begin_layout Plain Layout
19958 svn update --accept mine-full $path
19966 \begin_layout Standard
19968 \begin_inset Flex Code
19971 \begin_layout Plain Layout
19977 stands for the path to the document.
19980 \begin_layout Subsubsection
19986 \begin_layout Standard
19987 This shows the complete history of the SVN document.
19991 \begin_inset Quotes eld
19995 \begin_inset Quotes erd
20000 is shown in a browser.
20003 \begin_layout Subsubsection
20005 \begin_inset CommandInset label
20007 name "subsec:SVN-File-Locking"
20014 \begin_layout Standard
20015 The file exchange through various revision control systems brings the problem
20016 of merge conflicts in case two different users try to edit the same (parts
20018 When such a conflict happens it needs manual resolving and one reasonable
20019 alternative is to provide some kind of locking mechanism, which guarantees
20020 that only one user is allowed to edit file at the given time.
20023 \begin_layout Standard
20024 SVN has two such mechanisms to provide mutual exclusivity for file access
20025 - locks and automatic setting of write permissions (see sec.
20027 \begin_inset CommandInset ref
20029 reference "subsec:Automatical-Locking-Property"
20034 \begin_inset Flex Code
20037 \begin_layout Plain Layout
20047 \begin_layout Plain Layout
20048 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20054 If this property is detected for a given document LyX starts to use SVN
20055 locks for document editing automatically and the whole check-in/out mechanism
20056 switches to the same regimen as for RCS.
20057 This in particular means there are two different modes of file use in LyX:
20060 \begin_layout Itemize
20062 The loaded file is in the read-only mode.
20063 For editing on needs to check-out.
20068 consists of updating from the repository and gaining write lock.
20069 If the lock is not possible to obtain, we remain in unlocked state.
20072 \begin_layout Itemize
20074 The loaded file is in the 'normal' edit mode.
20075 No other user is allowed to edit the file.
20080 consists of commiting changes and releasing write-lock.
20081 If no changes have been made to the document, no commit will be produced
20085 \begin_layout Plain Layout
20086 Don't be puzzled by the fact that you will be asked for commit message anyway.
20091 and only the write-lock will be released.
20094 \begin_layout Standard
20098 \begin_layout Labeling
20099 \labelwidthstring 00.00.0000
20102 svn commit -q -m"<description>" "<file-name>"
20103 \begin_inset Newline newline
20106 svn unlock "<file-name>"
20109 \begin_layout Labeling
20110 \labelwidthstring 00.00.0000
20113 svn update "<file-name>"
20114 \begin_inset Newline newline
20117 svn lock "<file-name>"
20120 \begin_layout Subsubsection
20123 \begin_inset CommandInset label
20125 name "subsec:Automatical-Locking-Property"
20131 Automatic Locking Property
20134 \begin_layout Standard
20135 The above mentioned automatic setting of write permissions of the .lyx file
20141 ile\SpecialChar \menuseparator
20147 \begin_inset space ~
20150 Control\SpecialChar \menuseparator
20155 oggle locking property
20158 This command is active only when the file is not locked on the svn server
20160 you need to check-out before proceeding).
20163 \begin_layout Labeling
20164 \labelwidthstring 00.00.0000
20166 \begin_inset space ~
20172 \begin_layout Labeling
20173 \labelwidthstring 00.00.0000
20176 svn propset svn:needs-lock ON "<file-name>"
20179 \begin_layout Labeling
20180 \labelwidthstring 00.00.0000
20183 svn propdel svn:needs-lock "<file-name>"
20186 \begin_layout Subsubsection
20187 \begin_inset CommandInset label
20189 name "sub:VCS-Revision-Information"
20193 Revision Information in Documents
20196 \begin_layout Standard
20197 There are more possibilities how to activate revision information in our
20201 \begin_layout Itemize
20202 LyX supports directly:
20206 \begin_layout Itemize
20207 tree revision information (
20208 \begin_inset Flex Code
20211 \begin_layout Plain Layout
20218 The result is the output of the
20219 \begin_inset Flex Code
20222 \begin_layout Plain Layout
20228 command, the following table gives you an idea, how to read the results.
20231 \begin_layout Standard
20233 \begin_inset Tabular
20234 <lyxtabular version="3" rows="6" columns="2">
20235 <features tabularvalignment="middle">
20236 <column alignment="center" valignment="top" width="0">
20237 <column alignment="center" valignment="top" width="0">
20239 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20242 \begin_layout Plain Layout
20248 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20251 \begin_layout Plain Layout
20259 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20262 \begin_layout Plain Layout
20268 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20271 \begin_layout Plain Layout
20272 mixed revision working copy
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 modified 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 switched 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 partial working copy, from a sparse checkout
20339 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20342 \begin_layout Plain Layout
20348 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20351 \begin_layout Plain Layout
20352 mixed revision, modified, switched working copy
20365 \begin_layout Itemize
20366 file revision information.
20367 The result comes from parsing the output of
20368 \begin_inset Flex Code
20371 \begin_layout Plain Layout
20373 \begin_inset space ~
20377 \begin_inset space ~
20381 \begin_inset space ~
20390 Supported flags are:
20394 \begin_layout Itemize
20395 version number of the last commit (
20396 \begin_inset Flex Code
20399 \begin_layout Plain Layout
20408 \begin_layout Itemize
20409 author of the last commit (
20410 \begin_inset Flex Code
20413 \begin_layout Plain Layout
20422 \begin_layout Itemize
20423 date of the last commit (
20424 \begin_inset Flex Code
20427 \begin_layout Plain Layout
20436 \begin_layout Itemize
20437 time of the last commit (
20438 \begin_inset Flex Code
20441 \begin_layout Plain Layout
20451 \begin_layout Standard
20452 You can obtain this info via InsetInfo (e.g.
20454 \begin_inset Flex Code
20457 \begin_layout Plain Layout
20458 info-insert buffer vcs-date
20464 The information will be available only when you have the file stored under
20465 svn managment (i.e.
20467 \begin_inset Flex Code
20470 \begin_layout Plain Layout
20476 directory is available with your document).
20480 \begin_layout Itemize
20481 Another---a hacking one---possibility is to use svn keywords
20485 \begin_layout Plain Layout
20486 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20492 In short -- you set file keywords property (e.g.
20495 svn propset svn:keywords 'Rev' file.lyx
20497 ) and then paste keyword TeX code
20501 \begin_layout Plain Layout
20502 This is an easy way how to ensure that LyX won't break the line in the middle
20508 tag in your document (e.g.
20513 \begin_layout Plain Layout
20521 This way svn client will automatically substitute revision number (e.g.
20526 \begin_layout Plain Layout
20533 ) after each update and commit.
20534 There are more problems with this approach.
20535 Firstly, the '$' character is used in TeX world for math equations, so
20536 any occurence of math formula
20537 \begin_inset Formula $Rev$
20541 \begin_inset Formula $Rev:59$
20544 in your LyX document.
20545 Similarly for other keywords like Id, Date, Author, etc.
20546 Secondly svn output is dependent on your locales, so its very easy that
20547 svn would produce some problematic strings once Date is used.
20548 Thirdly you get the whole 'Rev: 59' string in your document instead of
20550 Until subversion implements user's custom keywords it will be hard to use
20551 this approach reliably or let LyX to support it directly.
20554 \begin_layout Subsection
20555 SVN and Windows Environment
20558 \begin_layout Quote
20559 My inclination is to say that if the user cannot figure out the command
20560 line operations on their own fairly quickly, they would be well advised
20561 to use TortoiseSVN.
20567 \begin_layout Subsubsection
20571 \begin_layout Standard
20572 In addition to installing LyX, and having access to a Subversion repository,
20573 the user will need to install the Subversion client program.
20574 A Windows installer for the client program is available from
20575 \begin_inset CommandInset href
20578 target "http://www.collab.net/nonav/downloads/subversion/"
20583 The user may also want to install
20584 \begin_inset CommandInset href
20587 target "http://tortoisesvn.tigris.org/"
20591 , which integrates Subversion operations into the context (rightclick) menu
20592 of Windows Explorer.
20593 Operations done outside LyX will typically be more convenient using the
20594 Explorer context menu.
20595 Note that TortoiseSVN is not a replacement for the client program, which
20596 is what LyX itself will use.
20599 \begin_layout Subsubsection
20600 Bringing a document under Subversion control
20603 \begin_layout Standard
20604 Before a LyX document can be brought under version control in Subversion,
20605 its parent directory needs to be under version control.
20606 If the document is being added to a project already in the repository,
20607 this is accomplished by checking the project out to the directory where
20608 the new document will be placed.
20609 If the project itself is not yet under version control (for instance, if
20610 this document starts a new project), the directory must be imported into
20612 This is done outside LyX.
20613 Both import and checkout are easily accomplished from the Explorer context
20614 menu using TortoiseSVN, or alternatively can be done using the command
20615 line client at a DOS prompt.
20616 The procedure for importing the project using TortoiseSVN is described
20617 below, assuming an existing repository and a new project being started
20625 For information on using the Subversion client program, run
20632 \begin_layout Enumerate
20639 in Windows Explorer, right click it, and select
20641 TortoiseSVN > Repo-browser
20644 If necessary, adjust the URL for the repository, then click OK.
20647 \begin_layout Enumerate
20648 Right click the level of the repository under which you want to place the
20649 new project folder (typically the top level) and click
20651 Create folder\SpecialChar \ldots{}
20654 Supply a name for the project folder and click OK.
20655 Add a message for the log file if desired, then click OK again.
20656 The new project folder should appear in the repository.
20657 Finally, click OK again to exit the repository browser.
20660 \begin_layout Enumerate
20661 Once again right click
20667 , this time selecting SVN Checkout\SpecialChar \ldots{}
20668 Select the URL of the project folder
20669 you just created in the repository, and set the checkout directory to
20677 You will be warned about a non-empty folder; click OK to proceed.
20678 You should now have a
20689 \begin_layout Enumerate
20690 Create or open your document in LyX and click
20695 ile\SpecialChar \menuseparator
20701 \begin_inset space ~
20704 Control\SpecialChar \menuseparator
20712 Add a log message and click OK to commit the document to version control.
20715 \begin_layout Standard
20716 From this point onward, you should have full functionality in the
20721 ile\SpecialChar \menuseparator
20727 \begin_inset space ~
20733 You also have the option of checking the document in and out, viewing its
20735 using the TortoiseSVN context menu in Windows Explorer or the Subversion
20736 client program from a command prompt.
20739 \begin_layout Subsubsection
20740 SSH tunnel used with SVN under Windows
20743 \begin_layout Standard
20744 Compared with Linux setting up svn client to communicate over ssh under
20745 Windows is a rather troublesome task.
20746 We will at least offer some hints how to setup the client side but prior
20747 knowledge about ssh and the Windows command line is needed, also be prepared
20748 for a great deal of frustration\SpecialChar \ldots{}
20752 \begin_layout Enumerate
20753 Get a svn client for windows, as described in the previous sections.
20754 When it is a fresh install run some svn command (e.g.
20756 \begin_inset Flex Code
20759 \begin_layout Plain Layout
20765 ) to create config files, which you will need to change later on.
20768 \begin_layout Enumerate
20769 Choose a ssh client for Windows.
20770 There are several possibilities, we will use the one from Putty tools
20774 \begin_layout Plain Layout
20775 \begin_inset Flex URL
20778 \begin_layout Plain Layout
20780 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20791 You will need to set the connection up so that the client doesn't ask for
20792 any password from you.
20793 To keep things easy we will use only keys without any additional password
20798 \begin_layout Enumerate
20800 \begin_inset Flex Code
20803 \begin_layout Plain Layout
20810 Save your private .ppk key file and put the public one on the server side.
20811 If the SVN server runs on Linux, note that the format of the public key
20812 is not compatible with Linux openssh and you will need to direcly copy-paste
20815 Public key for pasting into OpenSSH authorized_keys file
20817 :” edit field into the server's
20818 \begin_inset Flex Code
20821 \begin_layout Plain Layout
20822 ~/.ssh/authorized_keys
20828 \begin_inset Flex Code
20831 \begin_layout Plain Layout
20840 \begin_layout Enumerate
20842 \begin_inset Flex Code
20845 \begin_layout Plain Layout
20852 In the SVN config file
20856 \begin_layout Plain Layout
20857 Exact path depends on Windows version, usually somewhere around
20858 \begin_inset Flex Code
20861 \begin_layout Plain Layout
20864 Documents and Settings
20878 \begin_inset Flex Code
20881 \begin_layout Plain Layout
20896 , section [tunnels], setup ssh command, e.g.
20898 \begin_inset Flex Code
20901 \begin_layout Plain Layout
20902 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20911 \begin_layout Plain Layout
20912 It will usually take a lot of time to get exact command right and it depends
20914 For example do not have some remote server saved as a default session in
20916 If things fail, try to connect via plink without SVN first.
20925 \begin_layout Enumerate
20926 Checkout the SVN archive, e.g.
20928 \begin_inset Flex Code
20931 \begin_layout Plain Layout
20932 svn co svn+ssh://user@server/repository_path
20940 \begin_layout Subsubsection
20941 End-of-Line Conversions
20944 \begin_layout Standard
20945 When the collaborators are mixing Linux and Windows environments, LyX will
20946 use different line endings inside the .lyx files.
20947 This is not a problem as far as LyX functionality is concerned, but the
20948 commit diffs will be huge and merge-conflicts prone.
20949 Fortunately SVN itself knows
20953 \begin_layout Plain Layout
20954 \begin_inset Flex URL
20957 \begin_layout Plain Layout
20959 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20969 how to deal with CR/LF problems when switching .lyx files to the
20970 \begin_inset Flex Code
20973 \begin_layout Plain Layout
20983 \begin_layout Plain Layout
20985 \begin_inset Flex Code
20988 \begin_layout Plain Layout
20989 svn propset svn:eol-style native FILE_NAME
21002 \begin_layout Subsection
21006 \begin_layout Standard
21007 With the recent addition of the vc-command function LyX power users are
21008 allowed to create their own commands for revision control.
21011 \begin_layout Standard
21012 As an example you can see how two TortoiseSVN commands could be integrated
21016 \begin_layout Description
21018 \begin_inset Flex Code
21021 \begin_layout Plain Layout
21022 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21030 \begin_layout Description
21032 \begin_inset Flex Code
21035 \begin_layout Plain Layout
21036 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21044 \begin_layout Subsection
21045 Version control and Document comparison
21048 \begin_layout Standard
21049 One of the typical uses of version control is to inspect the changes between
21050 revisions, usually by creating
21051 \begin_inset Flex Code
21054 \begin_layout Plain Layout
21061 While this is useful for plain text files, it is much less useful in the
21062 case of LyX files, which have more complicated structure.
21063 Hence we provide binding to the Document comparison feature.
21064 They are two ways of calling this feature - either by direct call of
21065 \begin_inset Flex Code
21068 \begin_layout Plain Layout
21074 LyX function (for details see LyX functions manual) or by icon/menu item
21076 \begin_inset Flex MenuItem
21079 \begin_layout Plain Layout
21080 Compare with older revision...
21086 One can either compare two chosen revisions of the document or he can simply
21087 compare the current version of edited text with older revisions (where
21089 \begin_inset Flex MenuItem
21092 \begin_layout Plain Layout
21098 ' revisions back means comparison of the edited file with last commited
21103 \begin_layout Standard
21104 This feature is supported for SVN and RCS though due to the more complicated
21105 versioning scheme of RCS there is a constraint -- when addressing the revisions
21106 in dialog, numbers always point to the last number in RCS revision number,
21111 \begin_layout Section
21112 Literate Programming
21115 \begin_layout Standard
21120 (kayvan@sylvan.com)
21124 original documentation written by
21126 Edmar Wienskoski Jr.
21129 (edmar-w-jr@technologist.com)
21132 \begin_layout Subsection
21136 \begin_layout Standard
21137 The main purpose of this documentation is to show you how to use LyX for
21138 literate programming, where it is assumed that you are familiar with this
21139 programming technique, and know what
21140 \begin_inset Quotes eld
21144 \begin_inset Quotes erd
21148 \begin_inset Quotes eld
21152 \begin_inset Quotes erd
21156 If that is not the case, please follow the web links provided in the following
21158 There is a lot of good documentation out there covering old development
21159 history to the latest tools tips.
21162 \begin_layout Standard
21163 It is also assumed that you are familiar with LyX itself to a point that
21164 you are comfortable changing your LyX preferences, and X resources file.
21165 If that is not the case please refer to other LyX documentation to cover
21166 your specific needs.
21169 \begin_layout Subsection
21170 Literate Programming
21173 \begin_layout Standard
21174 From the Literate Programming FAQ:
21177 \begin_layout Quotation
21178 Literate programming is the combination of documentation and source together
21179 in a fashion suited for reading by human beings.
21180 In fact, literate programs should be enjoyable reading, even inviting!
21181 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21182 and documentation in a single file.
21183 Literate programming tools then parse the file to produce either readable
21184 documentation or compilable source.
21185 The WEB style of literate programming was created by D.
21186 \begin_inset space \thinspace{}
21190 Knuth during the development of his TeX typesetting software.
21194 \begin_layout Standard
21195 Another excerpt says:
21198 \begin_layout Quotation
21201 How is literate programming different from verbose commenting?
21204 \begin_layout Quotation
21205 There are three distinguishing characteristics.
21206 In order of importance, they are:
21210 \begin_layout Itemize
21211 flexible order of elaboration
21214 \begin_layout Itemize
21215 automatic support for browsing
21218 \begin_layout Itemize
21219 typeset documentation, especially diagrams and mathematics
21223 \begin_layout Standard
21224 Now that I sparked your curiosity, take a look in the references.
21227 \begin_layout Subsubsection
21231 \begin_layout Standard
21232 The complete Literate Programming FAQ can be found at:
21235 \begin_layout Quote
21236 Literate Programming FAQ
21237 \begin_inset Flex URL
21240 \begin_layout Plain Layout
21242 http://www.literateprogramming.com/lpfaq.pdf
21250 \begin_layout Standard
21251 The FAQ lists 23 (twenty three!) different literate programming tools.
21252 Where some are specialized or
21253 \begin_inset Quotes eld
21257 \begin_inset Quotes erd
21260 for particular programming languages, while other have general scope.
21265 for my own use for several reasons:
21268 \begin_layout Itemize
21269 It can generate the documentation either in LaTeX or HTML.
21272 \begin_layout Itemize
21273 It has a open architecture, i.
21274 \begin_inset space \thinspace{}
21278 \begin_inset space \space{}
21281 it is easy to plug in new filters and to perform special processing that
21286 \begin_layout Itemize
21287 There is a good selection of filters available already (the HTML is one
21291 \begin_layout Itemize
21295 \begin_layout Standard
21296 The Noweb web page can be found at:
21299 \begin_layout Quote
21301 \begin_inset Flex URL
21304 \begin_layout Plain Layout
21306 http://www.cs.virginia.edu/~nr/noweb/
21314 \begin_layout Standard
21315 Starting from there you can reach many other interesting links and even
21316 some literate program examples.
21319 \begin_layout Subsection
21320 LyX and Literate Programming
21323 \begin_layout Standard
21324 The LyX support for Literate Programming is provided by using the generic
21325 LyX converters mechanism.
21326 This support is provided in a
21327 \begin_inset Quotes eld
21331 \begin_inset Quotes erd
21335 \begin_inset space \thinspace{}
21339 \begin_inset space \space{}
21342 you will be able to use this new LyX feature with some other literate programmin
21343 g tool of your choice by just changing your LyX preferences.
21346 \begin_layout Subsubsection
21347 Generating documents and code (weaving and tangling)
21350 \begin_layout Paragraph
21351 Selecting the document class
21354 \begin_layout Standard
21355 If you have installed Noweb and LyX successfully, whenever you open a new
21356 document or try to change the document class of an existing one, you will
21357 find that there are three new document classes available:
21360 \begin_layout Itemize
21364 \begin_layout Itemize
21368 \begin_layout Itemize
21372 \begin_layout Standard
21373 You must select one of them to create your literate documents from.
21377 \begin_layout Standard
21378 Note that literate documents are not limited to these three classes.
21379 New classes can be generated from other styles like letter or in combination
21380 with other class variations like Article (AMS).
21381 If you have special needs that cannot be covered by one of the existing
21382 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21383 will arrange to insert a new entry, or teach you how to do it.
21387 \begin_layout Plain Layout
21388 It is very simple, it involves the creation of a file with four lines, and
21389 re-running of the auto configuration.
21394 Moreover, if you use a literate tool other than Noweb you may need to create
21395 a new set of document classes for it.
21398 \begin_layout Paragraph
21402 \begin_layout Standard
21403 LyX enables you to write code with a layout named
21411 \begin_layout Plain Layout
21412 The equivalent Noweb term is
21413 \begin_inset Quotes eld
21417 \begin_inset Quotes erd
21421 For historical reasons, I got used to the term
21422 \begin_inset Quotes eld
21426 \begin_inset Quotes erd
21429 introduced by other literate tool named Nuweb, which I used for many years
21430 before rendering myself to Noweb.
21435 Noweb delimits scraps like this:
21438 \begin_layout LyX-Code
21442 \begin_layout LyX-Code
21446 \begin_layout LyX-Code
21450 \begin_layout LyX-Code
21454 \begin_layout LyX-Code
21458 \begin_layout Standard
21459 The problem is that whatever is written in between the << and the
21463 must be taken literally, i.
21464 \begin_inset space \thinspace{}
21468 \begin_inset space \space{}
21471 LyX should be prevented from making any special interpretation of what has
21473 This is handled by a special layout named Scrap, that works like a normal
21474 paragraph but has a free spacing capability.
21477 \begin_layout Standard
21478 The down side of the Scrap paragraph layout is that consecutive paragraphs
21479 of code will be spaced with one empty line in the source code and also
21480 in the printed documentation.
21481 The work around is to enter each line of code within a single Scrap, with
21482 a newline (ctrl-return).
21483 The example above will look like this:
21487 \begin_layout Plain Layout
21488 If you have a printed version of this document you will not see any difference
21489 between the previous example and this one.
21497 \begin_layout LyX-Code
21499 \begin_inset Newline newline
21503 \begin_inset Newline newline
21507 \begin_inset Newline newline
21511 \begin_inset Newline newline
21517 \begin_layout Standard
21518 This layout works fine.
21519 The only real inconvenience is that you have to type ctrl-return instead
21524 \begin_layout Plain Layout
21525 It is in my list of
21526 \begin_inset Quotes eld
21530 \begin_inset Quotes erd
21541 \begin_layout Standard
21542 As a special note, you can also use the
21543 \begin_inset Quotes eld
21547 \begin_inset Quotes erd
21550 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21554 \begin_layout LyX-Code
21556 \begin_inset Newline newline
21559 def some_function(args):
21560 \begin_inset Newline newline
21563 "This is the doc string for this function."
21564 \begin_inset Newline newline
21567 print "My args: ", args
21570 \begin_layout LyX-Code
21571 @ %def some_function
21574 \begin_layout Standard
21575 For an example of this usage and the resulting cross-reference output, look
21576 at the Literate python program in
21578 LIBDIR/examples/listerrors.lyx
21580 which should make this all clear.
21583 \begin_layout Paragraph
21584 Generating the documentation
21587 \begin_layout Standard
21588 At this point you already have a new document file with a proper document
21589 class, and with some code and text on it.
21590 How do I print it? The answer is simple, you select
21592 View\SpecialChar \menuseparator
21596 Just like you would do for a plain document.
21597 No special procedure is required.
21600 \begin_layout Standard
21601 To help orientate you, I will now explain what happens inside LyX:
21604 \begin_layout Enumerate
21607 Update\SpecialChar \menuseparator
21610 menu option is chosen, a LaTeX file is generated.
21615 \begin_layout Standard
21616 If the document is of any literate class the generated file will be named
21617 with an extension name defined by the
21618 \begin_inset Quotes eld
21622 \begin_inset Quotes erd
21625 format (defined in the Preferences panel), otherwise the file will have
21634 \begin_layout Enumerate
21635 Note that the only difference so far is in the name of the file, no special
21636 processing is required by LyX.
21637 Given that you formatted the code using the Scrap layout that, by itself,
21638 takes care of the business.
21641 \begin_layout Enumerate
21642 If the document is of any literate class LyX will then use the internal
21643 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21647 \begin_layout Plain Layout
21648 The converters are defined in the
21650 Tools\SpecialChar \menuseparator
21654 \begin_inset Quotes eld
21658 \begin_inset Quotes erd
21670 manual for general information about converters.
21675 to generate the LaTeX file.
21679 \begin_layout Standard
21680 Otherwise it will just skip this step.
21684 \begin_layout Enumerate
21685 Finally, LaTeX is invoked and the regular post processing continues as in
21689 \begin_layout Standard
21690 Independence from a particular
21691 \begin_inset Quotes eld
21695 \begin_inset Quotes erd
21698 is easily achieved by changing the commands that are run by the various
21702 \begin_layout Paragraph
21703 Generating the code
21706 \begin_layout Standard
21707 When the build menu option is chosen or the corresponding button in the
21708 toolbar is pressed, a LaTeX file is generated just like step 1 above.
21709 Next, LyX invokes the
21714 This converter needs to be defined by the user and is not installed by
21715 default, though the Program format is.
21716 This converter (like any other converter) will have two parts:
21719 \begin_layout Enumerate
21720 The converter program itself.
21721 This program performs the conversion from the one format to the other (in
21722 this case, from the Noweb format to the Program pseudo-format).
21725 \begin_layout Enumerate
21726 The error log parser.
21727 This is a program whose sole purpose is to rewrite error messages in a
21728 format that LyX understands.
21729 This makes it possible for LyX to place error boxes in the right places
21730 in the file buffer.
21733 \begin_layout Standard
21734 The first part, the
21735 \begin_inset Quotes eld
21739 \begin_inset Quotes erd
21742 setting, should be set to
21743 \begin_inset Quotes eld
21751 \begin_inset Quotes erd
21755 This basically means that LyX will call
21756 \begin_inset Quotes eld
21760 \begin_inset Quotes erd
21763 (a program or script) with the name of the Noweb file (normally a file
21764 in the LyX temp directory).
21768 \begin_layout Standard
21769 This is an implementation of
21770 \begin_inset Quotes eld
21774 \begin_inset Quotes erd
21777 that you can place in a directory on your path:
21780 \begin_layout LyX-Code
21784 \begin_layout LyX-Code
21788 \begin_layout LyX-Code
21789 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21792 \begin_layout Standard
21793 The next part of the converter setting is the
21794 \begin_inset Quotes eld
21798 \begin_inset Quotes erd
21801 which is to be set to
21802 \begin_inset Quotes eld
21807 parselog=listerrors
21810 \begin_inset Quotes erd
21814 This will run any errors that are generated by the
21815 \begin_inset Quotes eld
21819 \begin_inset Quotes erd
21822 process through the
21823 \begin_inset Quotes eld
21827 \begin_inset Quotes erd
21833 \begin_layout Standard
21834 The converter code looks in
21842 then on the path for the
21843 \begin_inset Quotes eld
21847 \begin_inset Quotes erd
21853 \begin_layout Standard
21854 The build will normally take place in LyX's temporary directory, so the
21855 files produced by the conversion will be in that directory.
21856 LyX will copy out what it regards as the `main' file, but the
21860 conversion may produce several files, and so most of these would then be
21861 deleted when LyX was closed.
21862 The present solution is to use a `copier',
21866 \begin_layout Plain Layout
21875 manual for information on these.
21884 script in its default mode, so that the entire contents of the temporary
21885 directory is copied.
21886 More will get copied than is needed, to be sure, but nothing will be lost.
21887 If, however, you know what extensions the generated files will have, this
21888 can be improved by using the
21897 This option takes a comma-separated list of extensions to copy.
21898 So, for example, if the conversion will generate only files with the extensions
21907 , then the correct definition would be:
21910 \begin_layout LyX-Code
21911 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21914 \begin_layout Standard
21915 The result will be that only files with these two extensions will be copied
21919 \begin_layout Paragraph
21920 Build instructions in the document
21923 \begin_layout Standard
21924 The last piece of the integration between LyX and noweb is the
21925 \begin_inset Quotes eld
21929 \begin_inset Quotes erd
21933 Generally, the instructions for building your program should be embedded
21934 in a scrap of its own.
21936 \begin_inset Quotes eld
21940 \begin_inset Quotes erd
21943 above uses the notangle command to look for this scrap (called
21944 \begin_inset Quotes eld
21948 \begin_inset Quotes erd
21951 ) and runs its contents through
21952 \begin_inset Quotes eld
21956 \begin_inset Quotes erd
21962 \begin_layout Standard
21963 Typically, such a scrap would look something like this:
21966 \begin_layout LyX-Code
21968 \begin_inset Newline newline
21972 \begin_inset Newline newline
21976 \begin_inset Newline newline
21979 if [ -z "${NOWEB_SOURCE}" ]
21980 \begin_inset Newline newline
21984 \begin_inset Newline newline
21987 NOWEB_SOURCE=myfile.nw
21988 \begin_inset Newline newline
21992 \begin_inset Newline newline
21996 code to extract files ...]
21997 \begin_inset Newline newline
22001 code to compile files ...]
22002 \begin_inset Newline newline
22008 \begin_layout Standard
22011 LIBDIR/examples/listerrors.lyx
22015 LIBDIR/examples/Literate.lyx
22017 which implement two versions of the
22018 \begin_inset Quotes eld
22022 \begin_inset Quotes erd
22025 program for some illustrations of how all of these pieces go together or
22028 LIBDIR/examples/noweb2lyx.lyx.
22031 Interestingly, these three files show off the language-indepence of the
22032 LyX literate programming support since they are written in Python, C and
22036 \begin_layout Subsubsection
22040 \begin_layout Standard
22041 All the Literate Programming support is configured by the
22043 Tools\SpecialChar \menuseparator
22047 \begin_inset Quotes eld
22051 \begin_inset Quotes erd
22055 The important parts are:
22058 \begin_layout Description
22060 \begin_inset space ~
22064 \begin_inset Quotes eld
22068 \begin_inset Quotes erd
22072 \begin_inset space ~
22075 format Set up via the Formats tab, this is where the Noweb-specific pieces
22085 , the file extension is set to
22090 This tells LyX to create a file with a
22094 extension in the first step of the conversion process.
22097 \begin_layout Description
22099 \begin_inset space ~
22107 \begin_inset space ~
22110 format This is an empty format whose sole purpose is to be the endpoint
22111 of a conversion (which then allows us to set up a converter for it).
22114 \begin_layout Description
22123 This converter performs the
22124 \begin_inset Quotes eld
22128 \begin_inset Quotes erd
22131 of the literate document.
22132 For Noweb, it is set to
22133 \begin_inset Quotes eld
22138 noweave -delay -index $$i > $$o
22141 \begin_inset Quotes erd
22147 \begin_layout Description
22157 \begin_inset Quotes eld
22161 \begin_inset Quotes erd
22165 As stated above, the Converter is set to
22166 \begin_inset Quotes eld
22174 \begin_inset Quotes erd
22177 , with Flags set to
22178 \begin_inset Quotes eld
22183 originaldir,parselog=listerrors
22186 \begin_inset Quotes erd
22192 \begin_layout Subsubsection
22196 \begin_layout Standard
22197 There is also a new function implemented in the LyX server, the
22198 \begin_inset Quotes eld
22201 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22205 \begin_layout Standard
22206 When debugging code with ddd/gdb, it is possible to invoke a text editor
22207 at the current execution position with a single key stroke.
22208 The default ddd configuration for that is shift-ctrl-V.
22209 It happens that you can define the editor command line invocation in ddd
22212 Edit\SpecialChar \menuseparator
22213 Preferences\SpecialChar \menuseparator
22216 dialog and changing the "Edit Sources" entry.
22219 \begin_layout Standard
22220 I take advantage of the new created LyX server function and this ddd feature,
22222 \begin_inset Quotes eld
22226 \begin_inset Quotes erd
22232 \begin_layout LyX-Code
22233 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22236 \begin_layout Standard
22237 With this, whenever you are using ddd and find a point in the program that
22238 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22239 ddd you forward this information to LyX through the LyX server and then
22240 the LyX window will show the same file with the cursor at the same position
22241 ddd was pointing to.
22242 No more guessing or long scrolling to locate a point in the program back
22246 \begin_layout Standard
22247 Note however that you must enable the LyX server to get this feature working
22248 (it is disabled by default).
22249 You can enable it in
22261 ) by entering in the
22266 \begin_inset Quotes eld
22271 /home/<your-home-directory>/.lyx/lyxpipe
22274 \begin_inset Quotes erd
22280 \begin_layout Standard
22281 Read the LyX server documentation in the
22283 Customization Manual
22285 for further information.
22288 \begin_layout Subsubsection
22292 \begin_layout Standard
22293 There are six new buttons that can be added to your LyX toolbar.
22294 Five of these buttons are short cuts to layout styles:
22315 The last one is a short cut to the
22316 \begin_inset Quotes eld
22320 \begin_inset Quotes erd
22327 \begin_layout Standard
22328 LyX has a range of buttons that are available for tool bar customization.
22329 In my toolbar I like to combine the six short cuts above with two more:
22334 \SpecialChar \menuseparator
22339 \SpecialChar \menuseparator
22346 View\SpecialChar \menuseparator
22350 Here is how it looks like:
22353 \begin_layout LyX-Code
22357 \begin_layout LyX-Code
22361 \begin_layout LyX-Code
22362 Icon "layout Standard"
22365 \begin_layout LyX-Code
22366 Icon "layout Section"
22369 \begin_layout LyX-Code
22370 Icon "layout LaTeX"
22373 \begin_layout LyX-Code
22374 Icon "layout LyX-Code"
22377 \begin_layout LyX-Code
22378 Icon "layout Scrap"
22381 \begin_layout LyX-Code
22385 \begin_layout LyX-Code
22389 \begin_layout LyX-Code
22390 Icon "buffer-typeset"
22393 \begin_layout LyX-Code
22394 Icon "build-program"
22397 \begin_layout LyX-Code
22401 \begin_layout LyX-Code
22405 \begin_layout LyX-Code
22409 \begin_layout LyX-Code
22413 \begin_layout LyX-Code
22417 \begin_layout Subsubsection
22418 Colors customization
22421 \begin_layout Standard
22422 There are a number of colors in LyX that can be customized in
22427 One of the things that bothers people is the LaTeX font color.
22428 The default color is red, since the scraps uses LaTeX font, and there is
22429 a lot of scraps in literate documents, you may get tired of seeing everything
22431 You can change it by going to the tabs
22440 \begin_layout Standard
22441 The next thing is the visible presence of the newline character in the screen.
22442 You can choose the color of this particular character and make it blend
22444 I recommend you choosing a color that is close to the background but not
22445 equal, that way you still can see it is there, but it is not bothering
22450 \begin_layout Chapter
22454 \begin_layout Standard
22455 You can do everything with LyX that you can do with LaTeX.
22456 However, LyX cannot support every LaTeX feature directly.
22457 But you can always use TeX Code.
22458 This chapter shows you some more special things you might want to use.
22459 For other special things you can do with figures, tables, floats, boxes
22460 and notes, have a look at the
22467 \begin_layout Section
22468 Multiple Text Columns
22471 \begin_layout Standard
22472 This feature is independent of the option
22474 Two-column document
22476 in the document settings under
22481 If you want to have 2
22482 \begin_inset space ~
22485 columns for the whole document, it is recommended to use the
22487 Two-column document
22490 For all other cases use this feature.
22493 \begin_layout Standard
22494 To use multiple text columns in your document, you have to load the module
22501 Document\SpecialChar \menuseparator
22502 Settings\SpecialChar \menuseparator
22505 ) and must have the LaTeX-package
22510 \begin_inset Index idx
22513 \begin_layout Plain Layout
22514 LaTeX-packages ! multicol
22522 \begin_layout Standard
22523 Footnotes within multiple columns will be placed at the bottom of the page
22524 and not under each column.
22525 Within the different columns you can use everything, with the limitation
22526 that for floats you need to use the float option
22533 \begin_layout Subsection
22537 \begin_layout Standard
22538 If you want to have 2 columns in your text, use the style
22540 Begin Multiple Columns
22542 where the columns should start.
22543 The content of the style is the number of the columns, so in this case
22545 \begin_inset Quotes eld
22549 \begin_inset Quotes erd
22553 At the point where the columns should end use the style
22555 End Multiple Columns
22560 \begin_layout Standard
22561 Here is an example:
22564 \begin_layout Begin Multiple Columns
22568 \begin_layout Standard
22573 The Adventure of the Empty House
22576 \begin_inset Newline newline
22581 Sir Arthur Conan Doyle
22584 \begin_layout Standard
22587 It was in the spring of the year 1894 that all London was interested, and
22588 the fashionable world dismayed, by the murder of the Honourable Ronald
22589 Adair under most unusual and inexplicable circumstances.
22590 The public has already learned those particulars of the crime which came
22591 out in the police investigation, but a good deal was suppressed upon that
22592 occasion, since the case for the prosecution was so overwhelmingly strong
22593 that it was not necessary to bring forward all the facts.
22594 Only now, at the end of nearly ten years, am I allowed to supply those
22595 missing links which make up the whole of that remarkable chain.
22596 The crime was of interest in itself, but that interest was as nothing to
22597 me compared to the inconceivable sequel, which afforded me the greatest
22598 shock and surprise of any event in my adventurous life.
22599 Even now, after this long interval, I find myself thrilling as I think
22600 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22601 ty which utterly submerged my mind.
22602 Let me say to that public, which has shown some interest in those glimpses
22603 which I have occasionally given them of the thoughts and actions of a very
22604 remarkable man, that they are not to blame me if I have not shared my knowledge
22605 with them, for I should have considered it my first duty to do so, had
22606 I not been barred by a positive prohibition from his own lips, which was
22607 only withdrawn upon the third of last month.
22610 \begin_layout End Multiple Columns
22614 \begin_layout Standard
22615 Here is an example with 3
22616 \begin_inset space ~
22622 \begin_layout Begin Multiple Columns
22626 \begin_layout Standard
22629 It can be imagined that my close intimacy with Sherlock Holmes had interested
22630 me deeply in crime, and that after his disappearance I never failed to
22631 read with care the various problems which came before the public.
22632 And I even attempted, more than once, for my own private satisfaction,
22633 to employ his methods in their solution, though with indifferent success.
22634 There was none, however, which appealed to me like this tragedy of Ronald
22636 As I read the evidence at the inquest, which led up to a verdict of willful
22637 murder against some person or persons unknown, I realized more clearly
22638 than I had ever done the loss which the community had sustained by the
22639 death of Sherlock Holmes.
22640 There were points about this strange business which would, I was sure,
22641 have specially appealed to him, and the efforts of the police would have
22642 been supplemented, or more probably anticipated, by the trained observation
22643 and the alert mind of the first criminal agent in Europe.
22644 All day, as I drove upon my round, I turned over the case in my mind and
22645 found no explanation which appeared to me to be adequate.
22646 At the risk of telling a twice-told tale, I will recapitulate the facts
22647 as they were known to the public at the conclusion of the inquest.
22650 \begin_layout End Multiple Columns
22654 \begin_layout Standard
22655 You can have up to 10
22656 \begin_inset space ~
22659 columns if you want to, but that might not be very pleasant for the readers
22663 \begin_layout Standard
22664 \begin_inset Newpage newpage
22670 \begin_layout Subsection
22671 Columns inside Columns
22674 \begin_layout Standard
22675 You can also have columns inside columns:
22678 \begin_layout Begin Multiple Columns
22682 \begin_layout Standard
22685 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22686 at that time governor of one of the Australian colonies.
22687 Adair's mother had returned from Australia to undergo the operation for
22688 cataract, and she, her son Ronald, and her daughter Hilda were living together
22692 \begin_layout Begin Multiple Columns
22696 \begin_layout Standard
22699 The youth moved in the best society–had, so far as was known, no enemies
22700 and no particular vices.
22701 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22702 had been broken off by mutual consent some months before, and there was
22703 no sign that it had left any very profound feeling behind it.
22704 For the rest {sic} the man's life moved in a narrow and conventional circle,
22705 for his habits were quiet and his nature unemotional.
22706 Yet it was upon this easy-going young aristocrat that death came, in most
22707 strange and unexpected form, between the hours of ten and eleven-twenty
22708 on the night of March 30, 1894.
22711 \begin_layout End Multiple Columns
22715 \begin_layout Standard
22718 Ronald Adair was fond of cards–playing continually, but never for such stakes
22720 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22721 It was shown that, after dinner on the day of his death, he had played
22722 a rubber of whist at the latter club.
22723 He had also played there in the afternoon.
22728 The evidence of those who had played with him– Mr.
22729 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22730 and that there was a fairly equal fall of the cards.
22731 Adair might have lost five pounds, but not more.
22732 His fortune was a considerable one, and such a loss could not in any way
22734 He had played nearly every day at one club or other, but he was a cautious
22735 player, and usually rose a winner.
22736 It came out in evidence that, in partnership with Colonel Moran, he had
22737 actually won as much as four hundred and twenty pounds in a sitting, some
22738 weeks before, from Godfrey Milner and Lord Balmoral.
22739 So much for his recent history as it came out at the inquest.
22742 \begin_layout End Multiple Columns
22746 \begin_layout Subsection
22750 \begin_layout Standard
22751 The examples in this section show some more special features of multiple
22755 \begin_layout Standard
22756 For more features of multiple columns, have a look at the documentation
22757 of the LaTeX-package
22762 \begin_inset Index idx
22765 \begin_layout Plain Layout
22766 LaTeX-packages ! multicol
22772 \begin_inset CommandInset citation
22781 \begin_layout Subsubsection
22785 \begin_layout Standard
22786 To add a preface text for multiple columns, add the command
22789 \begin_layout Standard
22795 \begin_layout Standard
22796 as TeX Code behind the number of columns in the
22798 Begin Multiple Columns
22801 behind the command write the text.
22802 At the end of the style use the command
22805 \begin_layout Standard
22811 \begin_layout Standard
22813 An example with some preface text:
22816 \begin_layout Standard
22817 \begin_inset VSpace bigskip
22823 \begin_layout Begin Multiple Columns
22828 \begin_layout Plain Layout
22835 And the story continues and continues and continues and continues\SpecialChar \ldots{}
22840 \begin_layout Plain Layout
22850 \begin_layout Standard
22853 On the evening of the crime, he returned from the club exactly at ten.
22854 His mother and sister were out spending the evening with a relation.
22855 The servant deposed that she heard him enter the front room on the second
22856 floor, generally used as his sitting-room.
22857 She had lit a fire there, and as it smoked she had opened the window.
22858 No sound was heard from the room until eleven-twenty, the hour of the return
22859 of Lady Maynooth and her daughter.
22860 Desiring to say good-night, she attempted to enter her son's room.
22861 The door was locked on the inside, and no answer could be got to their
22862 cries and knocking.
22863 Help was obtained, and the door forced.
22864 The unfortunate young man was found lying near the table.
22865 His head had been horribly mutilated by an expanding revolver bullet, but
22866 no weapon of any sort was to be found in the room.
22869 \begin_layout End Multiple Columns
22873 \begin_layout Standard
22874 You can also use a section heading as the preface if you use a section command
22875 as TeX Code behind the first TeX Code.
22876 For example the command
22879 \begin_layout Standard
22884 subsection{subsection title}
22887 \begin_layout Standard
22888 creates a subsection.
22889 In this example the preface is a subsubsection:
22892 \begin_layout Begin Multiple Columns
22897 \begin_layout Plain Layout
22908 \begin_layout Plain Layout
22917 This is a subsubsection heading as a preface
22921 \begin_layout Plain Layout
22932 \begin_layout Plain Layout
22942 \begin_layout Standard
22945 A minute examination of the circumstances served only to make the case more
22947 In the first place, no reason could be given why the young man should have
22948 fastened the door upon the inside.
22949 There was the possibility that the murderer had done this, and had afterwards
22950 escaped by the window.
22951 The drop was at least twenty feet, however, and a bed of crocuses in full
22953 Neither the flowers nor the earth showed any sign of having been disturbed,
22954 nor were there any marks upon the narrow strip of grass which separated
22955 the house from the road.
22956 Apparently, therefore, it was the young man himself who had fastened the
22958 But how did he come by his death? No one could have climbed up to the window
22959 without leaving traces.
22960 Suppose a man had fired through the window, he would indeed be a remarkable
22961 shot who could with a revolver inflict so deadly a wound.
22962 Again, Park Lane is a frequented thoroughfare; there is a cab stand within
22963 a hundred yards of the house.
22964 No one had heard a shot.
22967 \begin_layout End Multiple Columns
22971 \begin_layout Standard
22972 If there is less vertical space left on the page at the beginning of the
22973 multiple columns than needed for 6
22974 \begin_inset space ~
22977 text lines, a page break will be inserted before the multiple columns.
22978 Depending on the number of lines of the preface text, you might want to
22980 It is determined by inserting the command
22983 \begin_layout Standard
22991 \begin_layout Standard
22992 as TeX Code behind the preface definition but before the final
23001 is hereby the number of text lines.
23002 In this example the space is set to 7
23003 \begin_inset space ~
23009 \begin_layout Begin Multiple Columns
23014 \begin_layout Plain Layout
23025 \begin_layout Plain Layout
23034 This is the sectioning command
23035 \begin_inset Newline newline
23039 \begin_inset Newline newline
23042 with multiple text lines
23046 \begin_layout Plain Layout
23057 \begin_layout Plain Layout
23070 \begin_layout Plain Layout
23080 \begin_layout Standard
23083 On the evening of the crime, he returned from the club exactly at ten.
23084 His mother and sister were out spending the evening with a relation.
23085 The servant deposed that she heard him enter the front room on the second
23086 floor, generally used as his sitting-room.
23087 She had lit a fire there, and as it smoked she had opened the window.
23088 No sound was heard from the room until eleven-twenty, the hour of the return
23089 of Lady Maynooth and her daughter.
23090 Desiring to say good-night, she attempted to enter her son's room.
23091 The door was locked on the inside, and no answer could be got to their
23092 cries and knocking.
23093 Help was obtained, and the door forced.
23094 The unfortunate young man was found lying near the table.
23095 His head had been horribly mutilated by an expanding revolver bullet, but
23096 no weapon of any sort was to be found in the room.
23099 \begin_layout End Multiple Columns
23103 \begin_layout Subsubsection
23107 \begin_layout Standard
23108 The amount of space before and after multiple columns can be changed by
23109 changing the length
23116 For example the command
23119 \begin_layout Standard
23129 \begin_layout Standard
23130 in TeX Code changes its value to 3
23131 \begin_inset space \thinspace{}
23135 The change must be made before the multiple columns' start.
23136 The predefined value is 13
23137 \begin_inset space \thinspace{}
23143 \begin_layout Standard
23151 \begin_inset space \thinspace{}
23157 \begin_layout Standard
23161 \begin_layout Plain Layout
23167 multicolsep}{2.5cm}
23175 \begin_layout Begin Multiple Columns
23179 \begin_layout Standard
23182 All day I turned these facts over in my mind, endeavouring to hit upon some
23183 theory which could reconcile them all, and to find that line of least resistanc
23184 e which my poor friend had declared to be the starting-point of every investigat
23186 I confess that I made little progress.
23187 In the evening I strolled across the Park, and found myself about six o'clock
23188 at the Oxford Street end of Park Lane.
23189 A group of loafers upon the pavements, all staring up at a particular window,
23190 directed me to the house which I had come to see.
23191 A tall, thin man with coloured glasses, whom I strongly suspected of being
23192 a plain-clothes detective, was pointing out some theory of his own, while
23193 the others crowded round to listen to what he said.
23194 I got as near him as I could, but his observations seemed to me to be absurd,
23195 so I withdrew again in some disgust.
23196 As I did so I struck against an elderly, deformed man, who had been behind
23197 me, and I knocked down several books which he was carrying.
23200 \begin_layout End Multiple Columns
23204 \begin_layout Standard
23205 \begin_inset Note Greyedout
23208 \begin_layout Plain Layout
23213 The values you set with
23219 will be used for all following multiple columns until to change them again.
23227 \begin_layout Standard
23231 \begin_layout Plain Layout
23243 \begin_inset Note Note
23246 \begin_layout Plain Layout
23247 go back to the default
23255 \begin_layout Subsubsection
23259 \begin_layout Standard
23260 The width of the columns is automatically calculated, but you can modify
23261 the space between the columns.
23262 This is done by changing the length
23269 Its predefined value is 10
23270 \begin_inset space \thinspace{}
23274 Here is an example where
23281 \begin_inset space \thinspace{}
23287 \begin_layout Standard
23291 \begin_layout Plain Layout
23305 \begin_layout Begin Multiple Columns
23309 \begin_layout Standard
23312 My observations of No.
23313 \begin_inset space \space{}
23316 427 Park Lane did little to clear up the problem in which I was interested.
23317 The house was separated from the street by a low wall and railing, the
23318 whole not more than five feet high.
23319 It was perfectly easy, therefore, for anyone to get into the garden, but
23320 the window was entirely inaccessible, since there was no water pipe or
23321 anything which could help the most active man to climb it.
23322 More puzzled than ever, I retraced my steps to Kensington.
23323 I had not been in my study five minutes when the maid entered to say that
23324 a person desired to see me.
23325 To my astonishment it was none other than my strange old book collector,
23326 his sharp, wizened face peering out from a frame of white hair, and his
23327 precious volumes, a dozen of them at least, wedged under his right arm.
23330 \begin_layout End Multiple Columns
23334 \begin_layout Standard
23338 \begin_layout Plain Layout
23350 \begin_inset Note Note
23353 \begin_layout Plain Layout
23354 go back to the default
23362 \begin_layout Subsubsection
23366 \begin_layout Standard
23367 Between the columns a rule with a width of the length
23374 If this rule width is set to 0
23375 \begin_inset space \thinspace{}
23378 pt (this is the default), the rule is suppressed.
23379 In the following example, the line separating the columns is 2
23380 \begin_inset space \thinspace{}
23386 \begin_layout Standard
23390 \begin_layout Plain Layout
23396 columnseprule}{2pt}
23404 \begin_layout Begin Multiple Columns
23408 \begin_layout Standard
23411 \begin_inset Quotes eld
23414 You're surprised to see me, sir,
23415 \begin_inset Quotes erd
23418 said he, in a strange, croaking voice.
23421 \begin_layout Standard
23424 I acknowledged that I was.
23427 \begin_layout Standard
23430 \begin_inset Quotes eld
23433 Well, I've a conscience, sir, and when I chanced to see you go into this
23434 house, as I came hobbling after you, I thought to myself, I'll just step
23435 in and see that kind gentleman, and tell him that if I was a bit gruff
23436 in my manner there was not any harm meant, and that I am much obliged to
23437 him for picking up my books.
23438 \begin_inset Quotes erd
23444 \begin_layout Standard
23447 \begin_inset Quotes eld
23450 You make too much of a trifle,
23451 \begin_inset Quotes erd
23456 \begin_inset Quotes eld
23459 May I ask how you knew who I was?
23460 \begin_inset Quotes erd
23466 \begin_layout Standard
23469 \begin_inset Quotes eld
23472 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
23473 you'll find my little bookshop at the corner of Church Street, and very
23474 happy to see you, I am sure.
23475 Maybe you collect yourself, sir.
23479 \begin_inset space ~
23492 --a bargain, every one of them.
23493 With five volumes you could just fill that gap on that second shelf.
23494 It looks untidy, does it not, sir?
23495 \begin_inset Quotes erd
23501 \begin_layout End Multiple Columns
23505 \begin_layout Standard
23509 \begin_layout Plain Layout
23515 columnseprule}{0pt}
23521 \begin_inset Note Note
23524 \begin_layout Plain Layout
23525 go back to the default
23533 \begin_layout Standard
23534 \begin_inset Newpage newpage
23540 \begin_layout Section
23541 Non-standard Paragraph Shapes
23544 \begin_layout Standard
23548 \begin_layout Plain Layout
23560 \begin_layout Standard
23564 \begin_layout Plain Layout
23573 \begin_layout Plain Layout
23587 \begin_layout Standard
23592 \begin_layout Plain Layout
23603 \begin_layout Plain Layout
23612 \begin_layout Plain Layout
23621 \begin_layout Plain Layout
23630 \begin_layout Plain Layout
23639 \begin_layout Plain Layout
23648 \begin_layout Plain Layout
23657 \begin_layout Plain Layout
23666 \begin_layout Plain Layout
23675 \begin_layout Plain Layout
23684 \begin_layout Plain Layout
23693 \begin_layout Plain Layout
23702 \begin_layout Plain Layout
23711 \begin_layout Plain Layout
23720 \begin_layout Plain Layout
23729 \begin_layout Plain Layout
23738 \begin_layout Plain Layout
23747 \begin_layout Plain Layout
23756 \begin_layout Plain Layout
23765 \begin_layout Plain Layout
23771 There are times when the tyranny of rectangular paragraphs must be overthrown.
23772 In such situations, a call to the delightful plain TeX command
23779 As you can see, completely arbitrary shapes can be laid out with a suitable
23780 set of line length definitions.
23781 While this parshape may look a bit silly and useless, one could conceive
23782 of situations such as finely tuned dropped capitals, word wrapping around
23783 non-rectangular graphics, etc.
23784 which will benefit from such handcrafting.
23787 \begin_layout Standard
23788 \begin_inset VSpace bigskip
23794 \begin_layout Standard
23799 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23806 is the number of lines of text which define the paragraph.
23807 If there turn out to be fewer lines, the shape is truncated; if there are
23808 more, the excess lines have the same dimensions as the last line of the
23818 entries specify the indentation of the line from the left margin, and the
23819 length of the line as measured from that point.
23820 The shape applies only to the current paragraph; everything is reset to
23821 normal for the next paragraph.
23824 \begin_layout Standard
23828 \begin_layout Plain Layout
23840 \begin_layout Bibliography
23841 \begin_inset CommandInset bibitem
23842 LatexCommand bibitem
23847 Documentation of the LaTeX-package
23848 \begin_inset CommandInset href
23851 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
23856 \begin_inset Index idx
23859 \begin_layout Plain Layout
23860 LaTeX-packages ! multicol